[med-svn] [fis-gtm] 01/03: Imported Upstream version 6.2-002

Amul Shah tuskentower-guest at moszumanska.debian.org
Tue Jun 9 04:29:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

tuskentower-guest pushed a commit to branch master
in repository fis-gtm.

commit 83be86e35997b98a0bef9d9a1e773532441088e7
Author: Amul Shah <Amul.Shah at fisglobal.com>
Date:   Mon Jun 8 20:35:48 2015 -0400

    Imported Upstream version 6.2-002
---
 CMakeLists.txt                                     |    77 +-
 LICENSE                                            |     2 +-
 README                                             |    22 +-
 sr_alpha/axp.h                                     |   133 -
 sr_alpha/cacheflush.m64                            |    27 -
 sr_alpha/double2s.c                                |   158 -
 sr_alpha/emit_code_sp.c                            |   278 -
 sr_alpha/emit_code_sp.h                            |   206 -
 sr_alpha/follow.m64                                |    32 -
 sr_alpha/gtm_dump.c                                |    17 -
 sr_alpha/inst_flush.m64                            |    24 -
 sr_alpha/mint2mval.m64                             |    51 -
 sr_alpha/movq.m64                                  |    21 -
 sr_alpha/mval2bool.m64                             |    39 -
 sr_alpha/mval2mint.m64                             |    39 -
 sr_alpha/objlangdefs.h                             |   457 -
 sr_alpha/op_call.m64                               |    51 -
 sr_alpha/op_equnul.m64                             |    61 -
 sr_alpha/op_forlcldo.m64                           |    51 -
 sr_alpha/op_linestart.m64                          |    24 -
 sr_alpha/op_pattern.m64                            |    51 -
 sr_alpha/op_sorts_after.m64                        |    41 -
 sr_alpha/pseudo_ret.m64                            |    37 -
 sr_alpha/zbreaksp.h                                |    28 -
 sr_avms/adawi.c                                    |    22 -
 sr_avms/aswp.m64                                   |    14 -
 sr_avms/aswp_secshr.m64                            |    14 -
 sr_avms/aswp_src.h                                 |    85 -
 sr_avms/auto_zlink.c                               |   110 -
 sr_avms/auto_zlink.h                               |    17 -
 sr_avms/axp_gtm_registers.h                        |    44 -
 sr_avms/axp_registers.h                            |    56 -
 sr_avms/base_frame.max                             |   168 -
 sr_avms/bci.mar                                    |     9 -
 sr_avms/bind_symbol.m64                            |    32 -
 sr_avms/bndsym.max                                 |    70 -
 sr_avms/bsi.mar                                    |    11 -
 sr_avms/call_dm.m64                                |    33 -
 sr_avms/caller_id.m64                              |    18 -
 sr_avms/callg.mar                                  |    12 -
 sr_avms/cmi_symbols.m64                            |    13 -
 sr_avms/cmilink.axp                                |    28 -
 sr_avms/code_psect.max                             |     3 -
 sr_avms/compswap.m64                               |    14 -
 sr_avms/compswap_secshr.m64                        |    14 -
 sr_avms/compswap_src.h                             |   104 -
 sr_avms/create_base_frame.max                      |    51 -
 sr_avms/data_psect_bound.m64                       |    34 -
 sr_avms/ddp_dal_dispatch.m64                       |   113 -
 sr_avms/ddpgvusr_symbols.m64                       |    15 -
 sr_avms/ddplink.axp                                |    38 -
 sr_avms/error_return_vms.m64                       |    32 -
 sr_avms/fetch_all.m64                              |    41 -
 sr_avms/fetch_args.max                             |    50 -
 sr_avms/fgncal_dispatch.m64                        |  1108 --
 sr_avms/fgncal_rtn.m64                             |   136 -
 sr_avms/find_line_call.c                           |    98 -
 sr_avms/g_msf.max                                  |    76 -
 sr_avms/get_registers.m64                          |    11 -
 sr_avms/getframe.max                               |    33 -
 sr_avms/gtm$defaults.m64                           |    27 -
 sr_avms/gtm$fgncall.m64                            |   231 -
 sr_avms/gtm_code_address.m64                       |    17 -
 sr_avms/gtm_dyn_ch.m64                             |    80 -
 sr_avms/gtm_main.m64                               |   218 -
 sr_avms/gtm_memmove.c                              |    57 -
 sr_avms/gtm_ret_code.m64                           |    48 -
 sr_avms/gtm_zc.m64                                 |    19 -
 sr_avms/gtmi$def.m64                               |    14 -
 sr_avms/gtmsecplv.m64                              |    60 -
 sr_avms/gtmshrlink.axp                             |    74 -
 sr_avms/gtmstopzc.m64                              |    22 -
 sr_avms/gtmzcall.max                               |   483 -
 sr_avms/i2s.mar                                    |    37 -
 sr_avms/incr_link.c                                |   555 -
 sr_avms/mdefsp.h                                   |   130 -
 sr_avms/mem_access.c                               |    49 -
 sr_avms/memcmp.mar                                 |    27 -
 sr_avms/mum_tstart.m64                             |    96 -
 sr_avms/mumps_binding.max                          |    96 -
 sr_avms/mutex.mar                                  |   952 -
 sr_avms/mutex_stoprel.mar                          |   140 -
 sr_avms/mval$def.max                               |   149 -
 sr_avms/mval2num.m64                               |    39 -
 sr_avms/obj_file.c                                 |  1283 --
 sr_avms/obj_filesp.h                               |    28 -
 sr_avms/op_bkpt.m64                                |   427 -
 sr_avms/op_call.m64                                |    51 -
 sr_avms/op_callsp.m64                              |    54 -
 sr_avms/op_contain.m64                             |   243 -
 sr_avms/op_currtn.m64                              |    39 -
 sr_avms/op_equ.m64                                 |    32 -
 sr_avms/op_exfun.m64                               |    85 -
 sr_avms/op_extcall.m64                             |   111 -
 sr_avms/op_extexfun.m64                            |   161 -
 sr_avms/op_extjmp.m64                              |   115 -
 sr_avms/op_fetchintrrpt.m64                        |    53 -
 sr_avms/op_fnget.m64                               |    52 -
 sr_avms/op_fnzextract.m64                          |    71 -
 sr_avms/op_follow.m64                              |    69 -
 sr_avms/op_forcenum.m64                            |    96 -
 sr_avms/op_forchk1.m64                             |    24 -
 sr_avms/op_forinit.m64                             |    74 -
 sr_avms/op_forintrrpt.m64                          |    49 -
 sr_avms/op_forlcldo.m64                            |    51 -
 sr_avms/op_forloop.m64                             |   260 -
 sr_avms/op_gettruth.m64                            |    42 -
 sr_avms/op_iretmvad.m64                            |    29 -
 sr_avms/op_linefetch.m64                           |    31 -
 sr_avms/op_mprofcall.m64                           |    51 -
 sr_avms/op_mprofcallsp.m64                         |    54 -
 sr_avms/op_mprofexfun.m64                          |    85 -
 sr_avms/op_mprofextcall.m64                        |   111 -
 sr_avms/op_mprofextexfun.m64                       |   161 -
 sr_avms/op_mprofforchk1.m64                        |    31 -
 sr_avms/op_mprofforlcldo.m64                       |    51 -
 sr_avms/op_mproflinefetch.m64                      |    34 -
 sr_avms/op_mproflinestart.m64                      |    24 -
 sr_avms/op_neg.m64                                 |    98 -
 sr_avms/op_numcmp.m64                              |    22 -
 sr_avms/op_restartpc.m64                           |    31 -
 sr_avms/op_retarg.m64                              |    41 -
 sr_avms/op_startintrrpt.m64                        |    52 -
 sr_avms/op_sto.m64                                 |    67 -
 sr_avms/opp_break.m64                              |    27 -
 sr_avms/opp_commarg.m64                            |    27 -
 sr_avms/opp_dmode.m64                              |    27 -
 sr_avms/opp_hardret.m64                            |    26 -
 sr_avms/opp_inddevparms.m64                        |    27 -
 sr_avms/opp_indfnname.m64                          |    27 -
 sr_avms/opp_indfun.m64                             |    27 -
 sr_avms/opp_indglvn.m64                            |    27 -
 sr_avms/opp_indincr.m64                            |    37 -
 sr_avms/opp_indlvadr.m64                           |    27 -
 sr_avms/opp_indlvarg.m64                           |    27 -
 sr_avms/opp_indlvnamadr.m64                        |    27 -
 sr_avms/opp_indmerge.m64                           |    27 -
 sr_avms/opp_indpat.m64                             |    27 -
 sr_avms/opp_indrzshow.m64                          |    27 -
 sr_avms/opp_indsavglvn.m64                         |    37 -
 sr_avms/opp_indsavlvn.m64                          |    37 -
 sr_avms/opp_indset.m64                             |    27 -
 sr_avms/opp_indtext.m64                            |    27 -
 sr_avms/opp_iretmval.m64                           |    26 -
 sr_avms/opp_newintrinsic.m64                       |    27 -
 sr_avms/opp_newvar.m64                             |    27 -
 sr_avms/opp_ret.m64                                |   112 -
 sr_avms/opp_rterror.m64                            |    27 -
 sr_avms/opp_svput.m64                              |    27 -
 sr_avms/opp_tcommit.m64                            |    27 -
 sr_avms/opp_trestart.m64                           |    26 -
 sr_avms/opp_trollback.m64                          |    24 -
 sr_avms/opp_tstart.m64                             |    97 -
 sr_avms/opp_xnew.m64                               |    66 -
 sr_avms/opp_zcont.m64                              |    26 -
 sr_avms/opp_zg1.m64                                |    34 -
 sr_avms/opp_zgoto.m64                              |    34 -
 sr_avms/pdscdef.h                                  |    99 -
 sr_avms/prober.mar                                 |    18 -
 sr_avms/probew.mar                                 |    19 -
 sr_avms/proc_desc.h                                |    26 -
 sr_avms/procdesc.max                               |     6 -
 sr_avms/putframe.max                               |    15 -
 sr_avms/release_name.h                             |    14 -
 sr_avms/rundown_dispatch.m64                       |    12 -
 sr_avms/secshrlink.axp                             |    32 -
 sr_avms/zc_call.m64                                |   363 -
 sr_avms/zc_makespace.m64                           |    55 -
 sr_cmi/cmi_close.c                                 |    63 -
 sr_cmi/cmi_init.c                                  |    78 -
 sr_cmi/cmi_open.c                                  |    64 -
 sr_cmi/cmi_read.c                                  |    21 -
 sr_cmi/cmi_write.c                                 |    20 -
 sr_cmi/cmi_write_int.c                             |    28 -
 sr_cmi/cmierrors.msg                               |    20 -
 sr_cmi/cmihdr.h                                    |    30 -
 sr_cmi/cmivector.mar                               |    23 -
 sr_cmi/cmj_ast.c                                   |    26 -
 sr_cmi/cmj_disconn2.c                              |    28 -
 sr_cmi/cmj_fini.c                                  |    33 -
 sr_cmi/cmj_iostart.c                               |    46 -
 sr_cmi/cmj_mbx_ast.c                               |   231 -
 sr_cmi/cmj_mbx_read_start.c                        |    25 -
 sr_cmi/cmj_netinit.c                               |    62 -
 sr_cmi/cmj_unit2clb.c                              |    27 -
 sr_cmi/cmj_util.mar                                |    70 -
 sr_cmi/cmu_getclb.c                                |    35 -
 sr_cmi/cmu_makclb.c                                |    22 -
 sr_cmi/cmu_ntdroot.c                               |    20 -
 sr_i386/cmerrors_ctl.c                             |     4 +-
 sr_i386/cmierrors_ctl.c                            |     4 +-
 sr_i386/gdeerrors_ctl.c                            |     4 +-
 .../gtm_threadgbl_asm_access.txt                   |    24 +-
 sr_i386/gtm_threadgbl_deftypes.h                   |   886 +
 sr_i386/gtm_threadgbl_deftypes_asm_dbg.si          |     3 +
 sr_i386/gtm_threadgbl_deftypes_asm_pro.si          |     3 +
 sr_i386/incr_link.c                                |    25 +-
 sr_i386/merrors_ansi.h                             |    33 +-
 sr_i386/merrors_ctl.c                              |    70 +-
 sr_i386/op_callsp.s                                |    38 +-
 sr_i386/ttt.c                                      |     3 +-
 sr_linux/gtm_env_sp.csh                            |     5 +-
 sr_linux/release_name.h                            |    10 +-
 sr_port/adjust_frames.c                            |    23 +-
 sr_port/advancewindow.c                            |    11 +-
 sr_port/alias_funcs.c                              |    11 +-
 sr_port/azl_geturxrtn.c                            |     8 +-
 sr_port/bx_boolop.c                                |    14 +-
 sr_port/callg.h                                    |     5 +-
 sr_port/cdbg_dump.c                                |   103 +-
 sr_port/cgp.h                                      |    24 +-
 sr_port/comp_init.c                                |     6 +-
 sr_port/compiler.h                                 |    43 +-
 sr_port/copyright.txt                              |     9 +
 sr_port/cre_jnl_file.c                             |    64 +-
 sr_port/cre_private_code_copy.c                    |    52 +-
 sr_port/create_fatal_error_zshow_dmp.c             |    60 +-
 sr_port/create_fatal_error_zshow_dmp.h             |    12 +-
 sr_port/db_auto_upgrade.c                          |    43 +-
 sr_port/dbcertify.h                                |     6 +-
 sr_port/dbcertify_certify_phase.c                  |   750 +-
 sr_port/dbcertify_funcs.c                          |    55 +-
 sr_port/do_indir_do.c                              |    15 +-
 sr_port/do_pattern.c                               |    11 +-
 sr_port/dse.hlp                                    |    51 +-
 sr_port/dse_chng_fhead.c                           |    17 +-
 sr_port/dse_dmp_fhead.c                            |     5 +-
 sr_port/eintr_wrappers.h                           |    67 +-
 sr_port/emit_code.c                                |   256 +-
 sr_port/entryref.c                                 |    70 +-
 sr_port/error.h                                    |    10 +-
 sr_port/exfun_frame.c                              |     9 +-
 sr_port/exfunc.c                                   |    10 +-
 sr_port/expritem.c                                 |    13 +-
 sr_port/ext2jnl.c                                  |    30 +-
 sr_port/f_order.c                                  |    12 +-
 sr_port/f_select.c                                 |    50 +-
 sr_port/f_zchar.c                                  |     4 +-
 sr_port/find_line_addr.c                           |     7 +-
 sr_port/flush_jmp.c                                |    15 +-
 sr_port/flush_pio.c                                |   162 +-
 sr_port/gbldefs.c                                  |    12 +-
 sr_port/gde.hlp                                    |   164 +-
 sr_port/gdeinit.m                                  |    22 +-
 sr_port/gdeshow.m                                  |    21 +-
 sr_port/gdsbt.h                                    |    79 +-
 sr_port/gdscc.h                                    |     5 +-
 sr_port/gdsdbver.h                                 |     4 +-
 sr_port/gdsfhead.h                                 |   142 +-
 sr_port/genout.m                                   |    30 +-
 sr_port/glvn.c                                     |     5 +-
 sr_port/gtm_fetch.c                                |     4 +-
 sr_port/gtm_malloc_src.h                           |     8 +-
 sr_port/gtm_socket.h                               |    16 +-
 sr_port/gtm_string.h                               |     5 +-
 sr_port/gtm_threadgbl.h                            |     7 +-
 sr_port/gtm_threadgbl_defs.h                       |    33 +-
 sr_port/gtm_threadgbl_deftypes.c                   |     6 +-
 sr_port/gtm_threadgbl_init.c                       |     6 +-
 sr_port/gtm_unistd.h                               |    20 +-
 sr_port/gtmsource_ch.c                             |    11 +-
 sr_port/gtmsource_exit.c                           |    21 +-
 sr_port/gtmsource_poll_actions.c                   |     5 +-
 sr_port/gv_select.c                                |     7 +-
 sr_port/gv_trigger_common.h                        |    16 +-
 sr_port/gvcst_blk_search.c                         |   343 +-
 sr_port/gvcst_blk_search.h                         |   350 +
 sr_port/gvcst_expand_key.c                         |   127 +-
 sr_port/gvcst_expand_key.h                         |   161 +-
 sr_port/gvcst_init.c                               |    51 +-
 sr_port/gvcst_kill.c                               |    16 +-
 sr_port/gvcst_kill_blk.c                           |    17 +-
 sr_port/gvcst_protos.h                             |     7 +-
 sr_port/gvcst_put.c                                |    46 +-
 sr_port/gvcst_query.c                              |    14 +-
 sr_port/gvcst_queryget.c                           |    33 +-
 sr_port/gvcst_search.c                             |   100 +-
 sr_port/gvcst_zprevious.c                          |    73 +-
 sr_port/gvn.c                                      |    20 +-
 sr_port/hashtab.h                                  |    16 +-
 sr_port/have_crit.h                                |     4 +-
 sr_port/indirection.c                              |     7 +-
 sr_port/ins_errtriple.c                            |     7 +-
 sr_port/io.h                                       |    51 +-
 sr_port/iorm_wtff.c                                |    17 +-
 sr_port/iosocket_close.c                           |     7 +-
 sr_port/iosocket_create.c                          |    17 +-
 sr_port/iosocket_flush.c                           |    10 +-
 sr_port/iosocket_iocontrol.c                       |    19 +-
 sr_port/iosocket_listen.c                          |    10 +-
 sr_port/iosocket_open.c                            |    24 +-
 sr_port/iosocket_readfl.c                          |    18 +-
 sr_port/iosocket_snr.c                             |     5 +-
 sr_port/iosocket_use.c                             |    22 +-
 sr_port/iosocket_wait.c                            |    20 +-
 sr_port/iosocket_write.c                           |    10 +-
 sr_port/iosocket_wteol.c                           |     8 +-
 sr_port/iosocket_wtff.c                            |     8 +-
 sr_port/iott_wteol.c                               |    17 +-
 sr_port/iott_wtff.c                                |     8 +-
 sr_port/is_proc_alive.h                            |     5 +-
 sr_port/jnl.h                                      |    18 +-
 sr_port/jnl_file_open_common.c                     |    19 +-
 sr_port/jnl_write.c                                |    12 +-
 sr_port/job_addr.c                                 |    15 +-
 sr_port/jobexam_process.c                          |    41 +-
 sr_port/jobexam_process.h                          |     5 +-
 sr_port/jobinterrupt_process.c                     |    15 +-
 sr_port/linktrc.h                                  |    33 +
 sr_port/lk_check_own.c                             |     5 +-
 sr_port/lke.hlp                                    |     4 +-
 sr_port/lke_showtree.c                             |     7 +-
 sr_port/locklits.h                                 |     5 +-
 sr_port/m_do.c                                     |    38 +-
 sr_port/m_merge.c                                  |   193 +-
 sr_port/m_read.c                                   |     5 +-
 sr_port/m_set.c                                    |     5 +-
 sr_port/m_tstart.c                                 |     7 +-
 sr_port/m_write.c                                  |     4 +-
 sr_port/m_zwrite.c                                 |   392 +-
 sr_port/make_gvsubsc.c                             |     4 +-
 sr_port/mdb_condition_handler.c                    |    24 +-
 sr_port/mdef.h                                     |    22 +-
 sr_port/merrors.msg                                |    38 +-
 sr_port/mlk_lock.c                                 |    12 +-
 sr_port/mlk_nocrit_unlock.c                        |    55 +
 sr_port/mlk_prcblk_add.c                           |    18 +-
 sr_port/mlk_prcblk_add.h                           |     9 +-
 sr_port/mlk_shrblk_delete_if_empty.c               |    31 +-
 sr_port/mlk_shrblk_delete_if_empty.h               |     5 +-
 sr_port/mlk_shrblk_find.c                          |     7 +-
 sr_port/mlk_shrclean.c                             |    24 +-
 sr_port/mlk_unlock.h                               |     4 +-
 sr_port/mlkdef.h                                   |     7 +-
 sr_port/msg.m                                      |    34 +-
 sr_port/mtables.c                                  |    11 +-
 sr_port/mu_extr_gblout.c                           |    54 +-
 sr_port/mucregini.c                                |    12 +-
 sr_port/muextr.h                                   |   124 +-
 sr_port/mumps.hlp                                  |  2531 ++-
 sr_port/mupip.hlp                                  |   978 +-
 sr_port/mupip_backup.c                             |    34 +-
 sr_port/mupip_extend.c                             |    31 +-
 sr_port/mupip_reorg.c                              |    34 +-
 sr_port/mupip_reorg.h                              |     5 +-
 sr_port/mupip_set.c                                |     7 +-
 sr_port/mupip_set_journal.c                        |    11 +-
 sr_port/mur_back_process.c                         |    14 +-
 sr_port/mur_close_files.c                          |   140 +-
 sr_port/mur_process_intrpt_recov.c                 |     7 +-
 sr_port/mv_stent.h                                 |    25 +-
 sr_port/new_stack_frame.c                          |    22 +-
 sr_port/objlabel.h                                 |     5 +-
 sr_port/op.h                                       |     6 +-
 sr_port/op_fnzsearch.h                             |     7 +-
 sr_port/op_fnzsocket.c                             |   183 +-
 sr_port/op_fnzwidth.c                              |     5 +-
 sr_port/op_hang.c                                  |     7 +-
 sr_port/op_labaddr.c                               |    70 +-
 sr_port/op_lock2.c                                 |    63 +-
 sr_port/op_merge.c                                 |     4 +-
 sr_port/op_open.c                                  |    52 +-
 sr_port/op_rhdaddr.c                               |   164 +-
 sr_port/op_setzbrk.c                               |    12 +-
 sr_port/op_svget.c                                 |    63 +-
 sr_port/op_unlock.c                                |    32 +-
 sr_port/op_unwind.c                                |     4 +-
 sr_port/op_use.c                                   |    73 +-
 sr_port/op_view.c                                  |   118 +-
 sr_port/op_zbreak.c                                |     5 +-
 sr_port/op_zgoto.c                                 |    31 +-
 sr_port/op_zprint.c                                |    12 +-
 sr_port/op_zshow.c                                 |     5 +-
 sr_port/opcode_def.h                               |    16 +-
 sr_port/parm_pool.c                                |     7 +-
 sr_port/preemptive_db_clnup.c                      |     6 +-
 sr_port/put_cdlt.c                                 |    12 +-
 sr_port/put_mlab.c                                 |    18 +-
 sr_port/put_tref.c                                 |    15 +-
 sr_port/region_freeze.c                            |    23 +-
 sr_port/release_private_code_copy.c                |    23 +-
 sr_port/relqueopi.c                                |    23 +-
 sr_port/repl_filter.c                              |    15 +-
 sr_port/resolve_ref.c                              |     5 +-
 sr_port/rsel.mpt                                   |     5 +-
 sr_port/rwformat.c                                 |     4 +-
 sr_port/s2n.c                                      |     4 +-
 sr_port/setcurtchain.c                             |     5 +-
 sr_port/shmpool.c                                  |    31 +-
 sr_port/sleep_cnt.h                                |    32 +-
 sr_port/stp_gcol_src.h                             |    57 +-
 sr_port/stx_error.c                                |     5 +-
 sr_port/svnames.h                                  |     7 +-
 sr_port/t_end.c                                    |     9 +-
 sr_port/t_end_sysops.c                             |    23 +-
 sr_port/t_qread.c                                  |    19 +-
 sr_port/targ_alloc.c                               |    10 +-
 sr_port/tp_restart.c                               |    34 +-
 sr_port/tp_tend.c                                  |    10 +-
 sr_port/tttscan.m                                  |     4 +-
 sr_port/unw_mv_ent.c                               |     6 +-
 sr_port/unw_retarg.c                               |     5 +-
 sr_port/updhelper_reader.c                         |    22 +-
 sr_port/verify_queue.c                             |    47 +-
 sr_port/view_arg_convert.c                         |    50 +-
 sr_port/wbox_test_init.h                           |     6 +-
 sr_port/xfer.h                                     |     7 +-
 sr_port/zbreak.h                                   |     8 +-
 sr_port/zlput_rname.c                              |    97 +-
 sr_port/zr_find.c                                  |    38 +-
 sr_port/zr_remove_zbreak.c                         |    25 +-
 sr_port/zr_remove_zbrks.c                          |    19 +-
 sr_port/zr_unlink_rtn.c                            |    35 +-
 sr_port/zshow_output.c                             |   135 +-
 sr_port/zshow_svn.c                                |   128 +-
 sr_port/zsockettab.h                               |     4 +-
 sr_port/zwrite.h                                   |    58 +-
 sr_port_cm/gtcml_chklck.c                          |     5 +-
 sr_unix/CMakeLists.txt                             |    75 +-
 sr_unix/Makefile.mk                                |     5 +-
 sr_unix/anticipatory_freeze.c                      |     9 +-
 sr_unix/arlinkdbg.h                                |     4 +-
 sr_unix/auto_zlink.c                               |   237 +-
 sr_unix/auto_zlink.h                               |     9 +-
 sr_unix/bin_load.c                                 |    95 +-
 sr_unix/callg.c                                    |    38 +-
 sr_unix/check_encrypt_support.sh                   |     6 +-
 sr_unix/check_trigger_support.csh                  |     5 +-
 sr_unix/check_unicode_support.csh                  |    14 +-
 sr_unix/comlist.csh                                |    10 +-
 sr_unix/condstk_expand.c                           |    62 +-
 sr_unix/configure.gtc                              |   129 +-
 sr_unix/dm_read.c                                  |     9 +-
 sr_unix/do_shmat.c                                 |     7 +-
 sr_unix/dollarh.c                                  |    57 +-
 sr_unix/dollarh.h                                  |     5 +-
 sr_unix/dse_cmd.c                                  |     4 +-
 sr_unix/errorsp.h                                  |    56 +-
 sr_unix/exi_ch.c                                   |     8 +-
 sr_unix/f_char.c                                   |     4 +-
 sr_unix/ftok.c                                     |     5 +-
 sr_unix/gbldirnam.h                                |     5 +-
 sr_unix/gdeget.m                                   |    57 +-
 sr_unix/gdeput.m                                   |    24 +-
 sr_unix/gds_rundown.c                              |    11 +-
 sr_unix/gdsfilext.c                                |    85 +-
 sr_unix/gen_gtm_threadgbl_deftypes.csh             |   114 +-
 sr_unix/generic_signal_handler.c                   |     5 +-
 sr_unix/get_src_line.c                             |    52 +-
 sr_unix/geteuid.c                                  |     7 +-
 sr_unix/getjobnum.c                                |     6 +-
 sr_unix/grab_crit.c                                |    13 +-
 sr_unix/grab_crit_immediate.c                      |     5 +-
 sr_unix/grab_latch.c                               |    57 +-
 sr_unix/grab_lock.c                                |     7 +-
 sr_unix/gt_timers.c                                |    13 +-
 sr_unix/gtm_compile.c                              |     7 +-
 sr_unix/gtm_env_init_sp.c                          |   173 +-
 sr_unix/gtm_exit_handler.c                         |    17 +-
 sr_unix/gtm_getpwuid.c                             |    33 +-
 sr_unix/gtm_icu.c                                  |     9 +-
 sr_unix/gtm_logicals.h                             |     4 +-
 sr_unix/gtm_permissions.c                          |   371 +-
 sr_unix/gtm_permissions.h                          |    39 +-
 sr_unix/gtm_putmsg_list.c                          |    13 +-
 sr_unix/gtm_startup.c                              |    25 +-
 sr_unix/gtm_test_install.csh                       |    16 +-
 .../gtm_threadgbl_asm_access.txt                   |    27 +-
 sr_unix/gtm_tls.c                                  |    23 +-
 sr_unix/gtm_tls.h                                  |     9 +-
 sr_unix/gtm_tls_funclist.h                         |     5 +-
 sr_unix/gtm_tls_impl.c                             |   436 +-
 sr_unix/gtm_tls_impl.h                             |     5 +-
 sr_unix/gtm_tls_interface.h                        |    43 +-
 sr_unix/gtm_trigger.c                              |    42 +-
 sr_unix/gtmci.c                                    |    15 +-
 sr_unix/gtmcrypt_dbk_ref.c                         |   701 +-
 sr_unix/gtmcrypt_dbk_ref.h                         |   201 +-
 sr_unix/gtmcrypt_interface.h                       |     6 +-
 sr_unix/gtmcrypt_ref.c                             |    13 +-
 sr_unix/gtmcrypt_util.c                            |    65 +-
 sr_unix/gtminstall.sh                              |     4 +-
 sr_vvms/iomb_wtone.c => sr_unix/gtmio_ch.c         |    21 +-
 sr_unix/gtmprofile.gtc                             |    54 +-
 sr_unix/gtmrecv_process.c                          |    35 +-
 sr_unix/gtmsource.c                                |    22 +-
 sr_unix/gtmsource_get_opt.c                        |    10 +-
 sr_unix/gtmsource_rootprimary_init.c               |    64 +-
 sr_unix/gtmsource_srv_latch.c                      |    16 +-
 sr_unix/gtmthreadgblasm.m                          |   196 +
 sr_unix/gv_trigger.h                               |    25 +-
 sr_unix/gvcst_init_sysops.c                        |    56 +-
 sr_unix/gvcst_spr_queryget.c                       |     5 +-
 sr_unix/gvcst_spr_zprevious.c                      |     9 +-
 sr_unix/incr_link.c                                |   182 +-
 sr_unix/incr_link.h                                |     7 +-
 sr_unix/iopi_iocontrol.c                           |    20 +-
 sr_unix/iorm_close.c                               |    84 +-
 sr_unix/iorm_flush.c                               |    12 +-
 sr_unix/iorm_get.c                                 |    52 +-
 sr_unix/iorm_open.c                                |    30 +-
 sr_unix/iorm_readfl.c                              |    59 +-
 sr_unix/iorm_use.c                                 |    60 +-
 sr_unix/iorm_write.c                               |    71 +-
 sr_unix/iorm_wteol.c                               |    43 +-
 sr_unix/iormdef.h                                  |    60 +-
 sr_unix/iosocket_pass_local.c                      |    22 +-
 sr_unix/iosocket_tls.c                             |   118 +-
 sr_unix/iott_close.c                               |    18 +-
 sr_unix/iott_edit.c                                |    65 +-
 sr_unix/iott_flush.c                               |    63 +-
 sr_unix/iott_open.c                                |     7 +-
 sr_unix/iott_rdone.c                               |    10 +-
 sr_unix/iott_readfl.c                              |     8 +-
 sr_unix/iott_use.c                                 |    18 +-
 sr_unix/iott_write.c                               |    57 +-
 sr_unix/iottdef.h                                  |    23 +-
 sr_unix/is_proc_alive.c                            |     6 +-
 sr_unix/jnl_file_extend.c                          |    33 +-
 sr_unix/jobsp.h                                    |     6 +-
 sr_unix/laberror.c                                 |    60 +
 sr_unix/lockdefs.h                                 |     9 +-
 sr_unix/mu_cre_file.c                              |    25 +-
 sr_unix/mu_extract.c                               |    11 +-
 sr_unix/mu_rndwn_rlnkctl.c                         |    88 +-
 sr_unix/mu_swap_root.c                             |    23 +-
 sr_unix/mu_term_setup.c                            |    79 +-
 sr_unix/mubfilcpy.c                                |    24 +-
 sr_unix/mubinccpy.c                                |    22 +-
 sr_unix/mumps.cmake                                |     5 +-
 sr_unix/mupip.c                                    |     5 +-
 sr_unix/mupip_cmd.c                                |     5 +-
 sr_unix/mupip_rctldump.c                           |     6 +-
 sr_unix/mupip_set_file.c                           |    47 +-
 sr_unix/mupip_trigger.c                            |     4 +-
 sr_unix/mutex.c                                    |   563 +-
 sr_unix/mutexsp.h                                  |    20 +-
 sr_unix/obj_code.c                                 |     5 +-
 sr_unix/obj_file.c                                 |     9 +-
 sr_unix/obj_fileu.c                                |     5 +-
 sr_unix/ojchildparms.c                             |    22 +-
 sr_unix/ojstartchild.c                             |    92 +-
 sr_unix/op_currhd.c                                |    35 +
 sr_unix/op_fnzsearch.c                             |   561 +-
 sr_unix/op_horolog.c                               |    23 +-
 sr_unix/op_lab_ext.c                               |    32 -
 sr_unix/op_rhd_ext.c                               |    95 -
 sr_unix/op_zhorolog.c                              |    55 +
 sr_unix/op_zlink.c                                 |    35 +-
 sr_unix/op_zmess.c                                 |    13 +-
 sr_unix/op_zrupdate.c                              |   321 +-
 sr_unix/op_zut.c                                   |    57 +
 sr_unix/parse_file.h                               |   153 +-
 sr_unix/pinentry-gtm.sh                            |    81 +-
 sr_unix/pinentry.m                                 |    63 +-
 sr_unix/put_cdidx.c                                |    47 +
 sr_unix/rel_latch.c                                |     5 +-
 sr_unix/relinkctl.c                                |   572 +-
 sr_unix/relinkctl.h                                |    79 +-
 sr_unix/repl_instance.c                            |    13 +-
 sr_unix/rtnhdr.h                                   |    40 +-
 sr_unix/rtnobj.c                                   |   224 +-
 sr_unix/runall.csh                                 |     8 +-
 sr_unix/same_device_check.c                        |   184 +-
 sr_unix/sleep.h                                    |     6 +-
 sr_unix/source_file.c                              |    16 +-
 sr_unix/ss_initiate.c                              |    20 +-
 sr_unix/ss_lock_facility.c                         |     7 +-
 sr_unix/std_dev_outbndset.c                        |     7 +-
 sr_unix/trigger.h                                  |     4 +-
 sr_unix/trigger_compare.c                          |    20 +-
 sr_unix/trigger_delete.c                           |   101 +-
 sr_unix/trigger_parse.c                            |    10 +-
 sr_unix/trigger_select.c                           |    84 +-
 sr_unix/trigger_source_read_andor_verify.c         |    54 +-
 sr_unix/trigger_update.c                           |   193 +-
 sr_unix/trigger_upgrade.c                          |   185 +-
 sr_unix/ttt.txt                                    |   131 +-
 sr_unix/util_output.c                              |    79 +-
 sr_unix/wcs_flu.c                                  |     5 +-
 sr_unix/wcs_get_space.c                            |     7 +-
 sr_unix/zhist.c                                    |    49 +-
 sr_unix/zlmov_lnames.c                             |    33 +-
 sr_unix/zro_load.c                                 |    25 +-
 sr_unix/zro_search.c                               |     8 +-
 sr_unix/zroutinessp.h                              |    23 +-
 sr_unix/zshow_rctldump.c                           |     7 +-
 sr_unix/zshow_zcalls.c                             |    52 +-
 sr_unix_nsb/m_do.c                                 |    29 +-
 sr_unix_nsb/rtnhdr.h                               |     4 +-
 sr_unix_nsb/ttt.txt                                |    86 +-
 sr_vms_cm/gtcm_ch.c                                |   381 -
 sr_vms_cm/gtcm_exi_ch.c                            |   124 -
 sr_vms_cm/gtcm_mbxread_ast.c                       |    74 -
 sr_vms_cm/gtcm_server.c                            |   365 -
 sr_vms_cm/gtcmd_ini_reg.c                          |   130 -
 sr_vms_cm/gvcmz_errmsg.c                           |   131 -
 sr_vvms/append_time_stamp.c                        |    79 -
 sr_vvms/ast.h                                      |    16 -
 sr_vvms/ast_get_static.c                           |    38 -
 sr_vvms/ast_init.c                                 |    31 -
 sr_vvms/ast_init.h                                 |    17 -
 sr_vvms/backup_buffer_flush.c                      |   170 -
 sr_vvms/bin_load.c                                 |   517 -
 sr_vvms/bt_que_refresh.c                           |    47 -
 sr_vvms/build_print_stage.com                      |    20 -
 sr_vvms/buildaux.com                               |   420 -
 sr_vvms/buildbta.com                               |    47 -
 sr_vvms/buildcm.com                                |    20 -
 sr_vvms/buildcmi.com                               |    18 -
 sr_vvms/builddbcertify.com                         |    18 -
 sr_vvms/builddbg.com                               |    32 -
 sr_vvms/buildddp.com                               |    18 -
 sr_vvms/builddse.com                               |    18 -
 sr_vvms/buildgde.com                               |    18 -
 sr_vvms/buildhlp.com                               |    43 -
 sr_vvms/buildlke.com                               |    18 -
 sr_vvms/buildmapdb.com                             |    78 -
 sr_vvms/buildmupip.com                             |    18 -
 sr_vvms/buildpro.com                               |    64 -
 sr_vvms/buildsec.com                               |   130 -
 sr_vvms/buildshr.com                               |   208 -
 sr_vvms/buildtcx.com                               |    93 -
 sr_vvms/cce.c                                      |    88 -
 sr_vvms/cce.hlp                                    |   253 -
 sr_vvms/cce_ccp.c                                  |   118 -
 sr_vvms/cce_ccp_ch.c                               |    15 -
 sr_vvms/cce_ccpdmp.c                               |   106 -
 sr_vvms/cce_cluster.c                              |   170 -
 sr_vvms/cce_cmd.cld                                |   110 -
 sr_vvms/cce_dbdump.c                               |   190 -
 sr_vvms/cce_dump.c                                 |    26 -
 sr_vvms/cce_get_return_channel.c                   |    47 -
 sr_vvms/cce_help.c                                 |    35 -
 sr_vvms/cce_output.c                               |    76 -
 sr_vvms/cce_output.h                               |    20 -
 sr_vvms/cce_read_return_channel.c                  |    59 -
 sr_vvms/cce_sec_size.c                             |    61 -
 sr_vvms/cce_sec_size.h                             |    17 -
 sr_vvms/cce_show_file.c                            |   146 -
 sr_vvms/cce_show_locks.c                           |   232 -
 sr_vvms/cce_start.c                                |    75 -
 sr_vvms/ccp.c                                      |    60 -
 sr_vvms/ccp_add_reg.c                              |    25 -
 sr_vvms/ccp_bt_get.c                               |    40 -
 sr_vvms/ccp_ch.c                                   |   141 -
 sr_vvms/ccp_close1.c                               |   237 -
 sr_vvms/ccp_close_timeout.c                        |    39 -
 sr_vvms/ccp_closejnl_ast.c                         |    44 -
 sr_vvms/ccp_cluster_lock_wake.c                    |    27 -
 sr_vvms/ccp_dump.c                                 |   168 -
 sr_vvms/ccp_enq.c                                  |    42 -
 sr_vvms/ccp_enqw.c                                 |    44 -
 sr_vvms/ccp_ewmwtbf_interrupt.c                    |    33 -
 sr_vvms/ccp_exi_ch.c                               |    26 -
 sr_vvms/ccp_exitwm1.c                              |    53 -
 sr_vvms/ccp_exitwm1a.c                             |    29 -
 sr_vvms/ccp_exitwm2.c                              |    35 -
 sr_vvms/ccp_exitwm2a.c                             |    42 -
 sr_vvms/ccp_exitwm3.c                              |    90 -
 sr_vvms/ccp_exitwm_attempt.c                       |   177 -
 sr_vvms/ccp_exitwm_blkast.c                        |    40 -
 sr_vvms/ccp_extra_tick.c                           |    29 -
 sr_vvms/ccp_format_querec.c                        |   166 -
 sr_vvms/ccp_get_reg.c                              |    36 -
 sr_vvms/ccp_get_reg_by_fab.c                       |    33 -
 sr_vvms/ccp_gotdrt_tick.c                          |    23 -
 sr_vvms/ccp_init.c                                 |   178 -
 sr_vvms/ccp_lkdowake_blkast.c                      |    25 -
 sr_vvms/ccp_lkrqwake1.c                            |    45 -
 sr_vvms/ccp_mbx_manager.c                          |    62 -
 sr_vvms/ccp_opendb.c                               |    69 -
 sr_vvms/ccp_opendb1.c                              |    35 -
 sr_vvms/ccp_opendb1a.c                             |    28 -
 sr_vvms/ccp_opendb1e.c                             |    28 -
 sr_vvms/ccp_opendb2.c                              |   131 -
 sr_vvms/ccp_opendb3.c                              |    35 -
 sr_vvms/ccp_opendb3a.c                             |    34 -
 sr_vvms/ccp_opendb3a.h                             |    16 -
 sr_vvms/ccp_opendb3b.c                             |    43 -
 sr_vvms/ccp_opendb3c.c                             |   101 -
 sr_vvms/ccp_pndg_proc_add.c                        |    36 -
 sr_vvms/ccp_pndg_proc_wake.c                       |    30 -
 sr_vvms/ccp_quantum_interrupt.c                    |    39 -
 sr_vvms/ccp_queue_manager.c                        |   250 -
 sr_vvms/ccp_release_name.c                         |    20 -
 sr_vvms/ccp_reqdrtbuf_interrupt.c                  |    59 -
 sr_vvms/ccp_request_write_mode.c                   |    44 -
 sr_vvms/ccp_reqwm_interrupt.c                      |   109 -
 sr_vvms/ccp_retchan_manager.c                      |   168 -
 sr_vvms/ccp_retchan_manager.h                      |    35 -
 sr_vvms/ccp_rundown.c                              |    59 -
 sr_vvms/ccp_sendmsg.c                              |    55 -
 sr_vvms/ccp_signal_cont.c                          |    56 -
 sr_vvms/ccp_staleness.c                            |    38 -
 sr_vvms/ccp_tick_interrupt.c                       |    44 -
 sr_vvms/ccp_tick_start.c                           |    42 -
 sr_vvms/ccp_tr_checkdb.c                           |    60 -
 sr_vvms/ccp_tr_close.c                             |    86 -
 sr_vvms/ccp_tr_closejnl.c                          |    63 -
 sr_vvms/ccp_tr_debug.c                             |    23 -
 sr_vvms/ccp_tr_ewmwtbf.c                           |    79 -
 sr_vvms/ccp_tr_exitwm.c                            |   147 -
 sr_vvms/ccp_tr_exwmreq.c                           |    37 -
 sr_vvms/ccp_tr_flushlk.c                           |    39 -
 sr_vvms/ccp_tr_gotdrt.c                            |    54 -
 sr_vvms/ccp_tr_lkrqwake.c                          |    54 -
 sr_vvms/ccp_tr_null.c                              |    20 -
 sr_vvms/ccp_tr_opendb1.c                           |   119 -
 sr_vvms/ccp_tr_opendb1a.c                          |    42 -
 sr_vvms/ccp_tr_opendb1b.c                          |   154 -
 sr_vvms/ccp_tr_opendb1e.c                          |    60 -
 sr_vvms/ccp_tr_opendb3.c                           |   103 -
 sr_vvms/ccp_tr_opendb3a.c                          |    28 -
 sr_vvms/ccp_tr_stop.c                              |    43 -
 sr_vvms/ccp_tr_writedb.c                           |    53 -
 sr_vvms/ccp_tr_writedb1.c                          |   151 -
 sr_vvms/ccp_userwait.c                             |    89 -
 sr_vvms/ccp_writedb2.c                             |   192 -
 sr_vvms/ccp_writedb2.h                             |    16 -
 sr_vvms/ccp_writedb3.c                             |    76 -
 sr_vvms/ccp_writedb3.h                             |    16 -
 sr_vvms/ccp_writedb4.c                             |    61 -
 sr_vvms/ccp_writedb4a.c                            |    39 -
 sr_vvms/ccp_writedb5.c                             |    26 -
 sr_vvms/ce_init.c                                  |    56 -
 sr_vvms/ce_substitute.c                            |    86 -
 sr_vvms/change_fhead_timer.c                       |    75 -
 sr_vvms/cli.c                                      |   370 -
 sr_vvms/cli.h                                      |    27 -
 sr_vvms/cli_get_str_all_piece.c                    |    61 -
 sr_vvms/cmicom.com                                 |    73 -
 sr_vvms/cmidefsp.h                                 |   168 -
 sr_vvms/cms_load.com                               |   105 -
 sr_vvms/cms_load_verify_from_to_version.com        |    99 -
 sr_vvms/comall.m                                   |   259 -
 sr_vvms/comimage.com                               |   110 -
 sr_vvms/comp_lits.c                                |    48 -
 sr_vvms/comque.com                                 |    53 -
 sr_vvms/cre_comlist.com                            |    45 -
 sr_vvms/cre_comlistxp.com                          |    32 -
 sr_vvms/crit_wake.c                                |    32 -
 sr_vvms/ctrap_set.c                                |    49 -
 sr_vvms/ctrlc_set.c                                |    71 -
 sr_vvms/ctrly_set.c                                |    56 -
 sr_vvms/curr_dev_outbndset.c                       |    30 -
 sr_vvms/curr_dev_outbndset.h                       |    17 -
 sr_vvms/cvtprot.c                                  |    51 -
 sr_vvms/cvttime.c                                  |    27 -
 sr_vvms/dbcertify_cmd.cld                          |    20 -
 sr_vvms/dbcertify_dbfilop.c                        |   222 -
 sr_vvms/dbcertify_exit_handler.c                   |   127 -
 sr_vvms/dbcertify_parse_and_dispatch.c             |    62 -
 sr_vvms/dbcx_ref.c                                 |    54 -
 sr_vvms/dbcx_ref.h                                 |    17 -
 sr_vvms/dbfilop.c                                  |   241 -
 sr_vvms/dbgflip.com                                |    38 -
 sr_vvms/dbinit_ch.c                                |   240 -
 sr_vvms/dcp_a2c.c                                  |   198 -
 sr_vvms/dcp_a2c.h                                  |    24 -
 sr_vvms/dcp_get_circuit.c                          |    44 -
 sr_vvms/dcp_get_groups.c                           |    73 -
 sr_vvms/dcp_get_maxrecsize.c                       |    50 -
 sr_vvms/dcp_get_volsets.c                          |   163 -
 sr_vvms/dcpsubs.c                                  |   180 -
 sr_vvms/dcpsubs.h                                  |    17 -
 sr_vvms/ddp_db_op.c                                |   348 -
 sr_vvms/ddp_spkitbld.dat                           |     6 -
 sr_vvms/ddp_trace_output.c                         |    52 -
 sr_vvms/ddp_trace_output.h                         |    25 -
 sr_vvms/ddpcom.h                                   |   102 -
 sr_vvms/ddpgvusr.c                                 |   772 -
 sr_vvms/ddpkithlp.com                              |   157 -
 sr_vvms/ddpkitinstal.com                           |   557 -
 sr_vvms/ddpserver.c                                |   466 -
 sr_vvms/dec_err.c                                  |    42 -
 sr_vvms/decddp.c                                   |   393 -
 sr_vvms/decddp.h                                   |    44 -
 sr_vvms/decddp_log_error.c                         |    86 -
 sr_vvms/define-old-library-logicals.com            |   137 -
 sr_vvms/del_sec.c                                  |    37 -
 sr_vvms/del_sec.h                                  |    17 -
 sr_vvms/desblk.h                                   |    25 -
 sr_vvms/desc2mval.c                                |   162 -
 sr_vvms/desc2mval.h                                |    19 -
 sr_vvms/dfntmpmbx.c                                |    39 -
 sr_vvms/dfntmpmbx.h                                |    17 -
 sr_vvms/disable_ctrl.c                             |    20 -
 sr_vvms/disk_block_available.c                     |    55 -
 sr_vvms/disk_block_available.h                     |    17 -
 sr_vvms/dm_read.c                                  |   263 -
 sr_vvms/do_verify.c                                |    24 -
 sr_vvms/do_xform.c                                 |    80 -
 sr_vvms/do_zcall.c                                 |   569 -
 sr_vvms/dpgbldir_sysops.c                          |   161 -
 sr_vvms/dpgbldir_sysops.h                          |    22 -
 sr_vvms/dse.c                                      |   168 -
 sr_vvms/dse.hlp                                    |  1158 --
 sr_vvms/dse_cmd.cld                                |   364 -
 sr_vvms/dse_ctrlc_setup.c                          |    65 -
 sr_vvms/dse_help.c                                 |    66 -
 sr_vvms/dse_open.c                                 |   184 -
 sr_vvms/dse_puttime.c                              |    26 -
 sr_vvms/dsk_read.c                                 |   173 -
 sr_vvms/dsk_write.c                                |   184 -
 sr_vvms/dsk_write_nocache.c                        |   111 -
 sr_vvms/dsm_api.c                                  |   895 -
 sr_vvms/dtgbldir.c                                 |   202 -
 sr_vvms/edrelbta.m                                 |    37 -
 sr_vvms/edrelnam.m                                 |    37 -
 sr_vvms/efn.h                                      |    39 -
 sr_vvms/error_return.c                             |    97 -
 sr_vvms/errorsp.h                                  |   171 -
 sr_vvms/ether_trace.c                              |   100 -
 sr_vvms/exi_ch.c                                   |    31 -
 sr_vvms/exttime.c                                  |    37 -
 sr_vvms/f_piece.c                                  |    88 -
 sr_vvms/fetch_cms_version.com                      |    90 -
 sr_vvms/fgn_parms.c                                |    50 -
 sr_vvms/fgn_resolve_lab.c                          |    22 -
 sr_vvms/fgncal_ch.c                                |    61 -
 sr_vvms/fgncal_rundown.c                           |    60 -
 sr_vvms/fgncal_zlinit.c                            |    23 -
 sr_vvms/fgncalsp.h                                 |    17 -
 sr_vvms/fid_from_sec.c                             |    43 -
 sr_vvms/fid_from_sec.h                             |    17 -
 sr_vvms/file_head_read.c                           |    97 -
 sr_vvms/file_head_write.c                          |    80 -
 sr_vvms/filestruct.h                               |    54 -
 sr_vvms/finish_active_jnl_qio.c                    |    57 -
 sr_vvms/fix_pages.c                                |    66 -
 sr_vvms/gbldirnam.h                                |    15 -
 sr_vvms/gde.hlp                                    |   887 -
 sr_vvms/gdeget.m                                   |   443 -
 sr_vvms/gdeput.m                                   |   237 -
 sr_vvms/gdeverif.m                                 |   231 -
 sr_vvms/gds_file_size.c                            |    59 -
 sr_vvms/gds_rundown.c                              |   586 -
 sr_vvms/gdsfheadsp.h                               |    22 -
 sr_vvms/gdsfilext.c                                |   387 -
 sr_vvms/gen_gtm_threadgbl_deftypes.com             |   159 -
 sr_vvms/generic_exit_handler.c                     |   214 -
 sr_vvms/generic_exit_handler.h                     |    18 -
 sr_vvms/get_command_line.c                         |    46 -
 sr_vvms/get_full_path.c                            |    70 -
 sr_vvms/get_page_size.c                            |    26 -
 sr_vvms/get_proc_info.c                            |    60 -
 sr_vvms/get_src_line.c                             |   276 -
 sr_vvms/get_tpu_addr.c                             |    26 -
 sr_vvms/get_tpu_addr.h                             |    17 -
 sr_vvms/getjobnum.c                                |    34 -
 sr_vvms/getline.com                                |    66 -
 sr_vvms/getstorage.c                               |    24 -
 sr_vvms/getzmode.c                                 |    38 -
 sr_vvms/getzprocess.c                              |    43 -
 sr_vvms/global_name.c                              |    47 -
 sr_vvms/go_load.c                                  |   344 -
 sr_vvms/golevel.c                                  |    53 -
 sr_vvms/goq_load.c                                 |   193 -
 sr_vvms/goq_m11_load.c                             |   447 -
 sr_vvms/goq_mvx_load.c                             |   534 -
 sr_vvms/grab_crit.c                                |   111 -
 sr_vvms/grab_crit_immediate.c                      |   109 -
 sr_vvms/grab_lock.c                                |    67 -
 sr_vvms/gse.mpt                                    |    77 -
 sr_vvms/gt_timer.h                                 |    73 -
 sr_vvms/gt_timers.c                                |   155 -
 sr_vvms/gtcm_spkitbld.dat                          |     6 -
 sr_vvms/gtcmkithlp.com                             |   146 -
 sr_vvms/gtcmkitinstal.com                          |   363 -
 sr_vvms/gtcmstop.m                                 |    58 -
 sr_vvms/gtcx_spkitbld.dat                          |     6 -
 sr_vvms/gtcxkithlp.com                             |   126 -
 sr_vvms/gtcxkitinstal.com                          |   302 -
 sr_vvms/gtm$ce.h                                   |    28 -
 sr_vvms/gtm$ce_establish.c                         |    58 -
 sr_vvms/gtm$ce_getinfo.c                           |   136 -
 sr_vvms/gtm$compile.c                              |   156 -
 sr_vvms/gtm$dmod.m                                 |     1 -
 sr_vvms/gtm$interrupt.c                            |    42 -
 sr_vvms/gtm$ivp.tlb                                |   Bin 11265 -> 0 bytes
 sr_vvms/gtm$startup.c                              |   451 -
 sr_vvms/gtm_bintim.c                               |    65 -
 sr_vvms/gtm_blkast.c                               |    41 -
 sr_vvms/gtm_ce.h                                   |    28 -
 sr_vvms/gtm_conv.c                                 |    38 -
 sr_vvms/gtm_conv.h                                 |    27 -
 sr_vvms/gtm_deq.c                                  |    67 -
 sr_vvms/gtm_enq.c                                  |    53 -
 sr_vvms/gtm_enqw.c                                 |    88 -
 sr_vvms/gtm_env_init_sp.c                          |    54 -
 sr_vvms/gtm_env_translate.c                        |   110 -
 sr_vvms/gtm_event_log.c                            |    22 -
 sr_vvms/gtm_file_remove.c                          |    55 -
 sr_vvms/gtm_file_stat.c                            |   110 -
 sr_vvms/gtm_getlkiw.c                              |    31 -
 sr_vvms/gtm_getlkiw.h                              |    17 -
 sr_vvms/gtm_getmsg.c                               |    36 -
 sr_vvms/gtm_logicals.h                             |    90 -
 sr_vvms/gtm_mtio.h                                 |    15 -
 sr_vvms/gtm_putmsg.c                               |    42 -
 sr_vvms/gtm_rename.c                               |    64 -
 sr_vvms/gtm_snprintf.c                             |    29 -
 sr_vvms/gtm_spkitbld.dat                           |    11 -
 sr_vvms/gtm_stdio.h                                |    50 -
 sr_vvms/gtm_utf8.c                                 |    28 -
 sr_vvms/gtm_utf8.h                                 |    46 -
 sr_vvms/gtm_verify_symbols.com                     |    38 -
 sr_vvms/gtm_wake.c                                 |    19 -
 sr_vvms/gtmcollect.opt                             |    41 -
 sr_vvms/gtmcommands.cldx                           |    28 -
 sr_vvms/gtmdc_spkitbld.dat                         |     6 -
 sr_vvms/gtmdckithlp.com                            |    94 -
 sr_vvms/gtmdckitinstal.com                         |   229 -
 sr_vvms/gtmfi_spkitbld.dat                         |     6 -
 sr_vvms/gtmfikithlp.com                            |   131 -
 sr_vvms/gtmfikitinstal.com                         |   239 -
 sr_vvms/gtmidef.h                                  |    26 -
 sr_vvms/gtmio.h                                    |   104 -
 sr_vvms/gtmkithlp.com                              |   172 -
 sr_vvms/gtmkitinstal.com                           |   443 -
 sr_vvms/gtmrecv.c                                  |   334 -
 sr_vvms/gtmrecv.h                                  |   330 -
 sr_vvms/gtmrecv_end.c                              |   167 -
 sr_vvms/gtmrecv_fetchresync.c                      |   291 -
 sr_vvms/gtmrecv_poll_actions.c                     |   446 -
 sr_vvms/gtmrecv_process.c                          |  1111 --
 sr_vvms/gtmrecv_shutdown.c                         |   150 -
 sr_vvms/gtmsecshr.h                                |    34 -
 sr_vvms/gtmsource.c                                |   556 -
 sr_vvms/gtmsource.h                                |   410 -
 sr_vvms/gtmsource_changelog.c                      |    85 -
 sr_vvms/gtmsource_checkhealth.c                    |   134 -
 sr_vvms/gtmsource_end.c                            |   138 -
 sr_vvms/gtmsource_flush_fh.c                       |   102 -
 sr_vvms/gtmsource_get_opt.c                        |   349 -
 sr_vvms/gtmsource_heartbeat.c                      |   243 -
 sr_vvms/gtmsource_mode_change.c                    |   116 -
 sr_vvms/gtmsource_process.c                        |   839 -
 sr_vvms/gtmsource_process_ops.c                    |   726 -
 sr_vvms/gtmsource_readfiles.c                      |  1704 --
 sr_vvms/gtmsource_readpool.c                       |   201 -
 sr_vvms/gtmsource_secnd_update.c                   |    61 -
 sr_vvms/gtmsource_seqno_init.c                     |    82 -
 sr_vvms/gtmsource_showbacklog.c                    |    65 -
 sr_vvms/gtmsource_shutdown.c                       |   185 -
 sr_vvms/gtmsource_statslog.c                       |    83 -
 sr_vvms/gtmsource_stopfilter.c                     |    68 -
 sr_vvms/gtmstop.m                                  |    47 -
 sr_vvms/gvcmy_open.h                               |    17 -
 sr_vvms/gvcst_init_sysops.c                        |   902 -
 sr_vvms/gvusr_queryget.c                           |    47 -
 sr_vvms/ident.h                                    |    12 -
 sr_vvms/incr_link.h                                |    17 -
 sr_vvms/init_sec.c                                 |    38 -
 sr_vvms/init_sec.h                                 |    17 -
 sr_vvms/interlock.h                                |    58 -
 sr_vvms/io_get_fgn_driver.c                        |    76 -
 sr_vvms/io_init_name.c                             |    37 -
 sr_vvms/io_is_rm.c                                 |    23 -
 sr_vvms/io_is_sn.c                                 |    44 -
 sr_vvms/io_open_try.c                              |   151 -
 sr_vvms/io_type.c                                  |    98 -
 sr_vvms/ioff_open.c                                |    19 -
 sr_vvms/iomb_cancel_read.c                         |    34 -
 sr_vvms/iomb_close.c                               |    55 -
 sr_vvms/iomb_dataread.c                            |   134 -
 sr_vvms/iomb_dummy.c                               |    18 -
 sr_vvms/iomb_flush.c                               |    18 -
 sr_vvms/iomb_open.c                                |   188 -
 sr_vvms/iomb_rdone.c                               |    55 -
 sr_vvms/iomb_read.c                                |    57 -
 sr_vvms/iomb_readfl.c                              |    59 -
 sr_vvms/iomb_use.c                                 |   104 -
 sr_vvms/iomb_write.c                               |    82 -
 sr_vvms/iomb_wteol.c                               |    35 -
 sr_vvms/iomb_wtff.c                                |    29 -
 sr_vvms/iombdef.h                                  |    45 -
 sr_vvms/iomt_closesp.c                             |    19 -
 sr_vvms/iomt_open.c                                |   338 -
 sr_vvms/iomt_opensp.c                              |    40 -
 sr_vvms/iomt_qio.c                                 |    44 -
 sr_vvms/iomt_rdlblk.c                              |    36 -
 sr_vvms/iomt_sense.c                               |    29 -
 sr_vvms/iomt_tm.c                                  |    30 -
 sr_vvms/iomt_wtlblk.c                              |    22 -
 sr_vvms/iomtdef.h                                  |   106 -
 sr_vvms/iorm_close.c                               |   128 -
 sr_vvms/iorm_flush.c                               |    28 -
 sr_vvms/iorm_get.c                                 |   105 -
 sr_vvms/iorm_jbc.c                                 |   206 -
 sr_vvms/iorm_open.c                                |   405 -
 sr_vvms/iorm_put.c                                 |    72 -
 sr_vvms/iorm_rdone.c                               |    93 -
 sr_vvms/iorm_read.c                                |   100 -
 sr_vvms/iorm_readfl.c                              |   107 -
 sr_vvms/iorm_use.c                                 |   280 -
 sr_vvms/iorm_write.c                               |    63 -
 sr_vvms/iorm_wteol.c                               |    73 -
 sr_vvms/iormdef.h                                  |    55 -
 sr_vvms/iosb_disk.h                                |    26 -
 sr_vvms/iosize.h                                   |    12 -
 sr_vvms/iosp.h                                     |    25 -
 sr_vvms/iott_cancel_read.c                         |    39 -
 sr_vvms/iott_clockfini.c                           |    21 -
 sr_vvms/iott_close.c                               |   111 -
 sr_vvms/iott_flush.c                               |    73 -
 sr_vvms/iott_open.c                                |   254 -
 sr_vvms/iott_rdone.c                               |   320 -
 sr_vvms/iott_read.c                                |    30 -
 sr_vvms/iott_readfl.c                              |   223 -
 sr_vvms/iott_resetast.c                            |    58 -
 sr_vvms/iott_use.c                                 |   494 -
 sr_vvms/iott_write.c                               |    96 -
 sr_vvms/iott_wtclose.c                             |    57 -
 sr_vvms/iott_wtctrlu.c                             |    63 -
 sr_vvms/iott_wtfini.c                              |    29 -
 sr_vvms/iott_wtstart.c                             |    76 -
 sr_vvms/iottdef.h                                  |   147 -
 sr_vvms/iottdefsp.h                                |    34 -
 sr_vvms/ious_iocontrol.c                           |    58 -
 sr_vvms/ious_open.c                                |    49 -
 sr_vvms/ious_rdone.c                               |    32 -
 sr_vvms/ious_read.c                                |    34 -
 sr_vvms/ious_readfl.c                              |    36 -
 sr_vvms/ious_write.c                               |    28 -
 sr_vvms/ious_wtone.c                               |    28 -
 sr_vvms/is_file_identical.c                        |   140 -
 sr_vvms/is_five_bit.c                              |    27 -
 sr_vvms/is_five_bit.h                              |    17 -
 sr_vvms/is_proc_alive.c                            |    31 -
 sr_vvms/jnl_file_extend.c                          |   393 -
 sr_vvms/jnl_file_open.c                            |   299 -
 sr_vvms/jnl_output_sp.c                            |   298 -
 sr_vvms/jnl_prc_vector.c                           |    99 -
 sr_vvms/jnlext_write.c                             |    42 -
 sr_vvms/jnlpool_init.c                             |   384 -
 sr_vvms/jnlsp.h                                    |   133 -
 sr_vvms/jobchild_init.c                            |   298 -
 sr_vvms/jobchild_init.h                            |    17 -
 sr_vvms/jobsp.h                                    |    86 -
 sr_vvms/jpv_v10to12.c                              |    39 -
 sr_vvms/jpv_v10to12.h                              |    37 -
 sr_vvms/kitprepare.com                             |    73 -
 sr_vvms/kitstart.com                               |   153 -
 sr_vvms/la.hlp                                     |   170 -
 sr_vvms/la_cmnd.cld                                |   114 -
 sr_vvms/la_convert.c                               |    42 -
 sr_vvms/la_create.c                                |   103 -
 sr_vvms/la_edit.c                                  |   150 -
 sr_vvms/la_encrypt.c                               |    51 -
 sr_vvms/la_exit.c                                  |    21 -
 sr_vvms/la_fputmsgu.c                              |    48 -
 sr_vvms/la_fputmsgu.h                              |    16 -
 sr_vvms/la_getcli.c                                |   138 -
 sr_vvms/la_getdat.c                                |    81 -
 sr_vvms/la_getdb.c                                 |    85 -
 sr_vvms/la_getnum.c                                |    77 -
 sr_vvms/la_getstr.c                                |    71 -
 sr_vvms/la_help.c                                  |    42 -
 sr_vvms/la_initial.c                               |   111 -
 sr_vvms/la_initpak.c                               |    45 -
 sr_vvms/la_io.c                                    |   201 -
 sr_vvms/la_io.h                                    |    61 -
 sr_vvms/la_listpak.c                               |   132 -
 sr_vvms/la_maint.c                                 |   126 -
 sr_vvms/la_match.c                                 |    92 -
 sr_vvms/la_mdl2nam.c                               |    75 -
 sr_vvms/la_nam2mdl.c                               |    98 -
 sr_vvms/la_putdb.c                                 |    71 -
 sr_vvms/la_putfldr.c                               |    38 -
 sr_vvms/la_puthead.c                               |    41 -
 sr_vvms/la_putline.c                               |    32 -
 sr_vvms/la_putline.h                               |    16 -
 sr_vvms/la_putmsgs.c                               |    27 -
 sr_vvms/la_putmsgu.c                               |    48 -
 sr_vvms/la_showpak.c                               |    55 -
 sr_vvms/la_store.c                                 |    61 -
 sr_vvms/la_uniqlid.c                               |    48 -
 sr_vvms/la_validate.c                              |    65 -
 sr_vvms/la_writepak.c                              |   153 -
 sr_vvms/la_writepak.h                              |    16 -
 sr_vvms/ladef.h                                    |   133 -
 sr_vvms/laerrors.msg                               |    89 -
 sr_vvms/lastchance1.c                              |    56 -
 sr_vvms/lastchance2.c                              |    62 -
 sr_vvms/lastchance3.c                              |    49 -
 sr_vvms/lbrdef.h                                   |   143 -
 sr_vvms/license_adm.c                              |    45 -
 sr_vvms/linkshr.com                                |    28 -
 sr_vvms/list_file.c                                |   279 -
 sr_vvms/lke.c                                      |   126 -
 sr_vvms/lke.hlp                                    |   305 -
 sr_vvms/lke_cmd.cld                                |    46 -
 sr_vvms/lke_getansw.c                              |    53 -
 sr_vvms/lke_help.c                                 |    44 -
 sr_vvms/lke_setgdr.c                               |    74 -
 sr_vvms/lm_cmnd.cld                                |    82 -
 sr_vvms/lm_convert.c                               |    36 -
 sr_vvms/lm_edit.c                                  |   115 -
 sr_vvms/lm_getnid.c                                |   107 -
 sr_vvms/lm_help.c                                  |    42 -
 sr_vvms/lm_listpak.c                               |   123 -
 sr_vvms/lm_maint.c                                 |   138 -
 sr_vvms/lm_mdl_nid.c                               |    51 -
 sr_vvms/lm_putmsgu.c                               |    41 -
 sr_vvms/lm_register.c                              |    99 -
 sr_vvms/lm_showcl.c                                |    92 -
 sr_vvms/lmdef.h                                    |    24 -
 sr_vvms/lmu.c                                      |    49 -
 sr_vvms/lmu.hlp                                    |   589 -
 sr_vvms/load.h                                     |    21 -
 sr_vvms/lockdefs.h                                 |    17 -
 sr_vvms/locks.h                                    |    35 -
 sr_vvms/lp_acquire.c                               |    95 -
 sr_vvms/lp_confirm.c                               |    64 -
 sr_vvms/lp_id.c                                    |    64 -
 sr_vvms/lp_licensed.c                              |   118 -
 sr_vvms/lperrors.msg                               |    22 -
 sr_vvms/m_recall.c                                 |   133 -
 sr_vvms/m_recall.h                                 |    17 -
 sr_vvms/map_sym.c                                  |   143 -
 sr_vvms/mapdb.awk                                  |    74 -
 sr_vvms/mapoff.m                                   |   115 -
 sr_vvms/mapoffset.awk                              |    32 -
 sr_vvms/mcompile.c                                 |    18 -
 sr_vvms/mdefsa.h                                   |    82 -
 sr_vvms/mem_access.c                               |    45 -
 sr_vvms/mem_list.c                                 |   328 -
 sr_vvms/mem_list.h                                 |    21 -
 sr_vvms/movempt.com                                |    63 -
 sr_vvms/msg.h                                      |    45 -
 sr_vvms/mu_cre_file.c                              |   308 -
 sr_vvms/mu_cre_vms_structs.c                       |    60 -
 sr_vvms/mu_cre_vms_structs.h                       |    17 -
 sr_vvms/mu_extract.c                               |   388 -
 sr_vvms/mu_getlst.c                                |   144 -
 sr_vvms/mu_gvis.c                                  |    45 -
 sr_vvms/mu_load_stat.c                             |    50 -
 sr_vvms/mu_load_stat.h                             |    18 -
 sr_vvms/mu_outofband_setup.c                       |    61 -
 sr_vvms/mu_rndwn_file.c                            |   607 -
 sr_vvms/mu_rndwn_file.h                            |    17 -
 sr_vvms/mu_rndwn_replpool.c                        |   148 -
 sr_vvms/mu_rndwn_replpool.h                        |    18 -
 sr_vvms/mu_signal_process.c                        |   118 -
 sr_vvms/mu_upgrd_outofband.c                       |    58 -
 sr_vvms/mubchkfs.c                                 |    82 -
 sr_vvms/mubexpfilnam.c                             |    76 -
 sr_vvms/mubfilcpy.c                                |   492 -
 sr_vvms/mubgetfil.c                                |    98 -
 sr_vvms/mubinccpy.c                                |   747 -
 sr_vvms/mucblkini.c                                |    75 -
 sr_vvms/mumps.hlp                                  | 19589 -------------------
 sr_vvms/mumps_clitab.cld                           |    25 -
 sr_vvms/mup_bak_sys.c                              |    56 -
 sr_vvms/mupip.c                                    |   135 -
 sr_vvms/mupip.hlp                                  |  2355 ---
 sr_vvms/mupip_cmd.cld                              |   482 -
 sr_vvms/mupip_ctrl.c                               |    33 -
 sr_vvms/mupip_ctrl.h                               |    17 -
 sr_vvms/mupip_cvtgbl.c                             |   177 -
 sr_vvms/mupip_cvtpgm.c                             |   215 -
 sr_vvms/mupip_dispatch.c                           |   148 -
 sr_vvms/mupip_exit.c                               |    23 -
 sr_vvms/mupip_ftok.c                               |    52 -
 sr_vvms/mupip_getcmd.c                             |    76 -
 sr_vvms/mupip_getcmd.h                             |    17 -
 sr_vvms/mupip_help.c                               |    36 -
 sr_vvms/mupip_restore.c                            |   559 -
 sr_vvms/mupip_rundown.c                            |   380 -
 sr_vvms/mupip_set_file.c                           |   562 -
 sr_vvms/mupip_set_jnlfile.c                        |   137 -
 sr_vvms/muprecsp.h                                 |    21 -
 sr_vvms/mur_cre_file_extfmt.c                      |   136 -
 sr_vvms/mur_read_file_sp.c                         |   171 -
 sr_vvms/murgetlst.c                                |    48 -
 sr_vvms/mutexsp.h                                  |    51 -
 sr_vvms/mval2desc.c                                |   255 -
 sr_vvms/mval2desc.h                                |    19 -
 sr_vvms/newincver.com                              |   224 -
 sr_vvms/nmadef.h                                   |  1128 --
 sr_vvms/ntd_root.c                                 |    15 -
 sr_vvms/obj_code.c                                 |   214 -
 sr_vvms/ojastread.c                                |    62 -
 sr_vvms/ojch.c                                     |    56 -
 sr_vvms/ojchkbytcnt.c                              |    47 -
 sr_vvms/ojchkfs.c                                  |    47 -
 sr_vvms/ojcleanup.c                                |    60 -
 sr_vvms/ojcrembxs.c                                |   160 -
 sr_vvms/ojdefbaspri.c                              |    40 -
 sr_vvms/ojdefdeffs.c                               |    40 -
 sr_vvms/ojdefimage.c                               |    50 -
 sr_vvms/ojdefprcnam.c                              |    82 -
 sr_vvms/ojerrcleanup.c                             |    50 -
 sr_vvms/ojhex_to_str.c                             |    33 -
 sr_vvms/ojmba_to_unit.c                            |    34 -
 sr_vvms/ojmbxio.c                                  |    39 -
 sr_vvms/ojparams.c                                 |   269 -
 sr_vvms/ojsetattn.c                                |    44 -
 sr_vvms/ojtmrinit.c                                |    54 -
 sr_vvms/ojtmrrtn.c                                 |    27 -
 sr_vvms/ojunit_to_mba.c                            |    38 -
 sr_vvms/op_fgnlookup.c                             |    65 -
 sr_vvms/op_fgnlookup.h                             |    17 -
 sr_vvms/op_fn.h                                    |    31 -
 sr_vvms/op_fnfgncal.c                              |    71 -
 sr_vvms/op_fngetdvi.c                              |   297 -
 sr_vvms/op_fngetjpi.c                              |   227 -
 sr_vvms/op_fngetlki.c                              |   171 -
 sr_vvms/op_fngetsyi.c                              |   181 -
 sr_vvms/op_fnrandom.c                              |    40 -
 sr_vvms/op_fnzcall.c                               |    86 -
 sr_vvms/op_fnzfile.c                               |   491 -
 sr_vvms/op_fnzlkid.c                               |    52 -
 sr_vvms/op_fnzp1.c                                 |   219 -
 sr_vvms/op_fnzparse.c                              |   211 -
 sr_vvms/op_fnzpid.c                                |    94 -
 sr_vvms/op_fnzpiece.c                              |    97 -
 sr_vvms/op_fnzpriv.c                               |   135 -
 sr_vvms/op_fnzsearch.c                             |   145 -
 sr_vvms/op_fnzsetprv.c                             |   182 -
 sr_vvms/op_fnztrnlnm.c                             |   296 -
 sr_vvms/op_horolog.c                               |    36 -
 sr_vvms/op_job.c                                   |   366 -
 sr_vvms/op_setzbrk.c                               |   238 -
 sr_vvms/op_setzp1.c                                |   292 -
 sr_vvms/op_zattach.c                               |    82 -
 sr_vvms/op_zedit.c                                 |   128 -
 sr_vvms/op_zhelp.c                                 |    53 -
 sr_vvms/op_zlink.c                                 |   421 -
 sr_vvms/op_zmess.c                                 |    68 -
 sr_vvms/pid.m                                      |    64 -
 sr_vvms/probe.c                                    |    44 -
 sr_vvms/prvdef.h                                   |    87 -
 sr_vvms/quad2asc.c                                 |    96 -
 sr_vvms/quad2asc.h                                 |    18 -
 sr_vvms/rc_cpt_ops.c                               |    37 -
 sr_vvms/recvpool_init.c                            |   216 -
 sr_vvms/reg_cmcheck.c                              |    51 -
 sr_vvms/rel_crit.c                                 |    85 -
 sr_vvms/rel_lock.c                                 |    63 -
 sr_vvms/rel_quant.c                                |    51 -
 sr_vvms/relqueopi.mar                              |   195 -
 sr_vvms/remove_rms.c                               |    48 -
 sr_vvms/repl_create_server.c                       |   301 -
 sr_vvms/repl_fork_rcvr_server.c                    |   107 -
 sr_vvms/repl_ipc_cleanup.c                         |   184 -
 sr_vvms/repl_log.c                                 |    98 -
 sr_vvms/repl_log_init.c                            |    23 -
 sr_vvms/repl_msg.h                                 |   119 -
 sr_vvms/repl_sem.c                                 |   326 -
 sr_vvms/repl_sem.h                                 |    74 -
 sr_vvms/repl_sem_sp.h                              |    40 -
 sr_vvms/repl_shm.c                                 |   224 -
 sr_vvms/repl_shm.h                                 |    49 -
 sr_vvms/repl_sp.h                                  |    90 -
 sr_vvms/repl_utils.c                               |    99 -
 sr_vvms/route_table.c                              |   208 -
 sr_vvms/route_table.h                              |    24 -
 sr_vvms/rtn_tbl_sort.c                             |   164 -
 sr_vvms/rtnhdr.h                                   |   156 -
 sr_vvms/runall.com                                 |   170 -
 sr_vvms/same_device_check.c                        |    32 -
 sr_vvms/send_msg.c                                 |   117 -
 sr_vvms/set_jnl_file_close.c                       |   135 -
 sr_vvms/set_num_additional_processors.c            |    50 -
 sr_vvms/set_zstatus.c                              |   122 -
 sr_vvms/setactive_silent.com                       |    24 -
 sr_vvms/setfileprot.c                              |    52 -
 sr_vvms/setfileprot.h                              |    17 -
 sr_vvms/setterm.c                                  |    54 -
 sr_vvms/sgtm_putmsg.c                              |   109 -
 sr_vvms/source_file.c                              |   207 -
 sr_vvms/spawn_and_bgwait.c                         |    33 -
 sr_vvms/spkitbld.m                                 |    48 -
 sr_vvms/spkitupdate.com                            |    29 -
 sr_vvms/srm_check.com                              |    29 -
 sr_vvms/st.mpt                                     |    77 -
 sr_vvms/std_dev_outbndset.c                        |    52 -
 sr_vvms/stpimg.m                                   |    22 -
 sr_vvms/term_setup.c                               |    43 -
 sr_vvms/timedef.h                                  |    24 -
 sr_vvms/timersp.h                                  |    22 -
 sr_vvms/trans_log_name.c                           |   134 -
 sr_vvms/ttt.c                                      |   699 -
 sr_vvms/ttt.txt                                    |  1016 -
 sr_vvms/upd_log_init.c                             |    74 -
 sr_vvms/user_rundown.c                             |    76 -
 sr_vvms/util_input.c                               |    76 -
 sr_vvms/util_output.c                              |   330 -
 sr_vvms/util_output_cm.c                           |    91 -
 sr_vvms/util_spawn.c                               |    38 -
 sr_vvms/v010_jnl_prc_vector.c                      |   100 -
 sr_vvms/v010_jnlsp.h                               |    80 -
 sr_vvms/v15_filestruct.h                           |    15 -
 sr_vvms/vaxsym.h                                   |    19 -
 sr_vvms/vms_cms_load.com                           |   211 -
 sr_vvms/vmsdtype.h                                 |    29 -
 sr_vvms/wait_for_block_flush.c                     |    42 -
 sr_vvms/wcs_clean_dbsync_ast.c                     |   306 -
 sr_vvms/wcs_clean_dbsync_timer_ast.c               |    57 -
 sr_vvms/wcs_flu.c                                  |   296 -
 sr_vvms/wcs_get_space.c                            |   162 -
 sr_vvms/wcs_wtfini.c                               |   227 -
 sr_vvms/wcs_wtstart.c                              |   229 -
 sr_vvms/zcall.h                                    |    66 -
 sr_vvms/zcch.c                                     |    46 -
 sr_vvms/zcdef.h                                    |    51 -
 sr_vvms/zl_cmd_qlf.c                               |    47 -
 sr_vvms/zl_olb.c                                   |    53 -
 sr_vvms/zl_olb.h                                   |    17 -
 sr_vvms/zro_gettok.c                               |    54 -
 sr_vvms/zro_load.c                                 |   282 -
 sr_vvms/zro_search.c                               |   163 -
 sr_vvms/zroutinessp.h                              |    39 -
 sr_vvms/zshow_devices.c                            |   562 -
 sr_vvms/zshow_zcalls.c                             |    93 -
 sr_x86_64/aswp.s                                   |    20 +-
 sr_x86_64/auto_zlink_sp.c                          |   130 -
 sr_x86_64/auto_zlink_sp.h                          |    29 -
 sr_x86_64/call_dm.s                                |    33 +-
 sr_x86_64/ci_restart.s                             |    59 +-
 sr_x86_64/cmerrors_ctl.c                           |     4 +-
 sr_x86_64/cmierrors_ctl.c                          |     4 +-
 sr_x86_64/compswap.s                               |    36 +-
 sr_x86_64/debug.si                                 |    46 +
 sr_x86_64/dm_start.s                               |    70 +-
 sr_x86_64/emit_code_sp.c                           |    57 +-
 sr_x86_64/error.si                                 |    33 +-
 sr_x86_64/follow.s                                 |    41 +-
 sr_x86_64/g_msf.si                                 |    79 +-
 sr_x86_64/gdeerrors_ctl.c                          |     4 +-
 sr_x86_64/gtm_threadgbl_deftypes.h                 |   906 +
 sr_x86_64/gtm_threadgbl_deftypes_asm_dbg.si        |     4 +
 sr_x86_64/gtm_threadgbl_deftypes_asm_pro.si        |     4 +
 sr_x86_64/linkage.si                               |    12 +-
 sr_x86_64/merrors_ansi.h                           |    33 +-
 sr_x86_64/merrors_ctl.c                            |    70 +-
 sr_x86_64/mint2mval.s                              |    45 +-
 sr_x86_64/mum_tstart.s                             |    35 +-
 sr_x86_64/mval2bool.s                              |    47 +-
 sr_x86_64/mval2mint.s                              |    47 +-
 sr_x86_64/mval2num.s                               |    45 +-
 sr_x86_64/mval_def.si                              |   208 +-
 sr_x86_64/obj_filesp.c                             |     6 +-
 sr_x86_64/op_bkpt.s                                |   338 +-
 sr_x86_64/op_call.s                                |    53 +-
 sr_x86_64/op_callsp.s                              |    64 +-
 sr_x86_64/op_contain.s                             |    78 +-
 sr_x86_64/op_currtn.s                              |    48 +-
 sr_x86_64/op_equ.s                                 |    28 +-
 sr_x86_64/op_equnul.s                              |    92 +-
 sr_x86_64/op_exfun.s                               |   215 +-
 sr_x86_64/op_extcall.s                             |   223 +-
 sr_x86_64/op_extexfun.s                            |   367 +-
 sr_x86_64/op_extjmp.s                              |   248 +-
 sr_x86_64/op_fetchintrrpt.s                        |    54 +-
 sr_x86_64/op_fnget.s                               |    64 +-
 sr_x86_64/op_fnzextract.s                          |   112 +-
 sr_x86_64/op_follow.s                              |    61 +-
 sr_x86_64/op_forcenum.s                            |   112 +-
 sr_x86_64/op_forchk1.s                             |    25 +-
 sr_x86_64/op_forinit.s                             |    85 +-
 sr_x86_64/op_forintrrpt.s                          |    43 +-
 sr_x86_64/op_forlcldo.s                            |    48 +-
 sr_x86_64/op_forloop.s                             |   281 +-
 sr_x86_64/op_gettruth.s                            |    52 +-
 sr_x86_64/op_iretmvad.s                            |    41 +-
 sr_x86_64/op_linefetch.s                           |    47 +-
 sr_x86_64/op_linestart.s                           |    41 +-
 sr_x86_64/op_mprofcall.s                           |    53 +-
 sr_x86_64/op_mprofcallsp.s                         |    66 +-
 sr_x86_64/op_mprofexfun.s                          |   224 +-
 sr_x86_64/op_mprofextcall.s                        |   229 +-
 sr_x86_64/op_mprofextexfun.s                       |   369 +-
 sr_x86_64/op_mprofforchk1.s                        |    31 +-
 sr_x86_64/op_mprofforlcldo.s                       |    51 +-
 sr_x86_64/op_mproflinefetch.s                      |    53 +-
 sr_x86_64/op_mproflinestart.s                      |    42 +-
 sr_x86_64/op_neg.s                                 |    81 +-
 sr_x86_64/op_numcmp.s                              |    48 +-
 sr_x86_64/op_pattern.s                             |    50 +-
 sr_x86_64/op_restartpc.s                           |    45 +-
 sr_x86_64/op_retarg.s                              |    47 +-
 sr_x86_64/op_sorts_after.s                         |    58 +-
 sr_x86_64/op_startintrrpt.s                        |    47 +-
 sr_x86_64/op_sto.s                                 |    67 +-
 sr_x86_64/op_zhelp.s                               |    34 +-
 sr_x86_64/opp_break.s                              |    31 +-
 sr_x86_64/opp_commarg.s                            |    31 +-
 sr_x86_64/opp_dmode.s                              |    31 +-
 sr_x86_64/opp_hardret.s                            |    31 +-
 sr_x86_64/opp_inddevparms.s                        |    31 +-
 sr_x86_64/opp_indfnname.s                          |    31 +-
 sr_x86_64/opp_indfun.s                             |    31 +-
 sr_x86_64/opp_indglvn.s                            |    31 +-
 sr_x86_64/opp_indincr.s                            |    31 +-
 sr_x86_64/opp_indlvadr.s                           |    31 +-
 sr_x86_64/opp_indlvarg.s                           |    31 +-
 sr_x86_64/opp_indlvnamadr.s                        |    31 +-
 sr_x86_64/opp_indmerge.s                           |    31 +-
 sr_x86_64/opp_indpat.s                             |    31 +-
 sr_x86_64/opp_indrzshow.s                          |    31 +-
 sr_x86_64/opp_indsavglvn.s                         |    31 +-
 sr_x86_64/opp_indsavlvn.s                          |    31 +-
 sr_x86_64/opp_indset.s                             |    31 +-
 sr_x86_64/opp_indtext.s                            |    31 +-
 sr_x86_64/opp_iretmval.s                           |    31 +-
 sr_x86_64/opp_newintrinsic.s                       |    31 +-
 sr_x86_64/opp_newvar.s                             |    31 +-
 sr_x86_64/opp_ret.s                                |    31 +-
 sr_x86_64/opp_rterror.s                            |    31 +-
 sr_x86_64/opp_setzbrk.s                            |    31 +-
 sr_x86_64/opp_svput.s                              |    33 +-
 sr_x86_64/opp_tcommit.s                            |    31 +-
 sr_x86_64/opp_trestart.s                           |    31 +-
 sr_x86_64/opp_trollback.s                          |    31 +-
 sr_x86_64/opp_tstart.s                             |   131 +-
 sr_x86_64/opp_xnew.s                               |    33 +-
 sr_x86_64/opp_zcont.s                              |    29 +-
 sr_x86_64/opp_zg1.s                                |    29 +-
 sr_x86_64/opp_zgoto.s                              |    38 +-
 sr_x86_64/pseudo_ret.s                             |    32 +-
 sr_x86_64/ttt.c                                    |  1408 +-
 1425 files changed, 19765 insertions(+), 136999 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04203d1..6b1625e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ foreach(lang ${languages})
 endforeach()
 
 # Defaults
-set(version V6.2-001)
+set(version V6.2-002)
 if("${version}" STREQUAL "")
         set(version V9.9-0)
 endif()
@@ -36,6 +36,12 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
 endif()
 
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+  set(GTM_BUILD_TYPE "pro")
+elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+  set(GTM_BUILD_TYPE "dbg")
+endif()
+
 # Enable GT.M debug options unless directed not to enable them. Added to build without whitebox tests.
 set(GTM_ENABLE_DEBUG 1 CACHE BOOL "Enable GT.M debug options")
 if(GTM_ENABLE_DEBUG)
@@ -87,6 +93,7 @@ if(GTM_DIST)
 else()
   # Bootstrap using pre-generated bootstrap sources.
   # We generate them again only for comparison.
+  message(STATUS "Bootstraping from pre-generated sources.")
   set(gen_bootstrap 0)
   set(gen_bootstrap_dist "${GTM_BINARY_DIR}")
   set(gen_bootstrap_mumps "$<TARGET_FILE:mumps>")
@@ -120,14 +127,15 @@ list(APPEND gt_src_list
 foreach(d ${gt_src_list})
   set(source_dir_${d} ${GTM_SOURCE_DIR}/${d})
   file(GLOB sources_${d} RELATIVE ${source_dir_${d}}
-	  ${d}/*.c ${d}/*.s ${d}/*.si)
+	  ${d}/*.c ${d}/*.s ${d}/*.si ${d}/*.txt)
 endforeach()
 if(gen_bootstrap)
   # Prefer generated sources over all other locations.
   set(gt_src_list gen ${gt_src_list})
   set(source_dir_gen ${GTM_BINARY_DIR}/gen)
   # Hard-code list since we cannot glob files that do not exist.
-  set(sources_gen cmerrors_ctl.c cmierrors_ctl.c gdeerrors_ctl.c merrors_ctl.c ttt.c)
+  set(sources_gen cmerrors_ctl.c cmierrors_ctl.c gdeerrors_ctl.c merrors_ctl.c ttt.c
+  		  gtmthreadgblasm.m gtm_threadgbl_deftypes.h gtm_threadgbl_deftypes_asm.si)
 endif()
 
 # The C preprocessor include search path consists of every source
@@ -262,6 +270,7 @@ add_custom_command(
   WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen
   COMMAND ${CMAKE_COMMAND}
     -D gtm_dist=${gen_bootstrap_dist}
+    -D gtm_tools=${GTM_SOURCE_DIR}/sr_port
     -D gtmroutines=.
     -D mumps=${gen_bootstrap_mumps}
     -D "args=${mumps_ttt_args}"
@@ -288,6 +297,7 @@ foreach(msg
     WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen
     COMMAND ${CMAKE_COMMAND}
       -D gtm_dist=${gen_bootstrap_dist}
+      -D gtm_tools=${GTM_SOURCE_DIR}/sr_port
       -D gtmroutines=.
       -D mumps=${gen_bootstrap_mumps}
       -D "args=${mumps_msg_args}"
@@ -335,20 +345,56 @@ elseif(gen_bootstrap)
   add_dependencies(gtm_threadgbl_deftypes gen_bootstrap)
 endif()
 
-add_custom_command(
-  OUTPUT gtm_threadgbl_deftypes.h
-  DEPENDS gtm_threadgbl_deftypes
-  COMMAND gtm_threadgbl_deftypes > gtm_threadgbl_deftypes.h.tmp
-  COMMAND ${CMAKE_COMMAND} -E rename gtm_threadgbl_deftypes.h.tmp gtm_threadgbl_deftypes.h
-  )
-add_custom_target(gen_gtm_threadgbl_deftypes DEPENDS gtm_threadgbl_deftypes.h)
+if(gen_bootstrap)
+  add_custom_command(
+    OUTPUT gen/gtm_threadgbl_deftypes.h
+    DEPENDS gtm_threadgbl_deftypes
+    COMMAND gtm_threadgbl_deftypes > gen/gtm_threadgbl_deftypes.h
+    )
+  set(gtmthreadgblasmaccess "${gtmthreadgblasmaccessdir}/gtm_threadgbl_asm_access.txt")
+  select_file(gtmthreadgblasmaccess "gtm_threadgbl_asm_access.txt")
+  add_custom_command(
+    OUTPUT ${GTM_BINARY_DIR}/gen/gtmthreadgblasm.m
+    DEPENDS ${GTM_SOURCE_DIR}/sr_unix/gtmthreadgblasm.m
+    COMMAND ${CMAKE_COMMAND} -E copy ${GTM_SOURCE_DIR}/sr_unix/gtmthreadgblasm.m ${GTM_BINARY_DIR}/gen/gtmthreadgblasm.m
+    )
+  add_custom_command(
+    OUTPUT ${GTM_BINARY_DIR}/gen/gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si
+    DEPENDS ${GTM_BINARY_DIR}/gen/gtmthreadgblasm.m gen/gtm_threadgbl_deftypes.h ${gtmthreadgblasmaccess}
+	    ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake ${gen_bootstrap_depend}
+    WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen
+    COMMAND ${CMAKE_COMMAND}
+      -D gtm_dist=${gen_bootstrap_dist}
+      -D gtm_inc=${GTM_BINARY_DIR}/gen
+      -D gtmroutines=.
+      -D mumps=${gen_bootstrap_mumps}
+      -D "args=-r;gtmthreadgblasm;${gtmthreadgblasmaccess};gtm_threadgbl_deftypes.h;gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si"
+      -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake
+    VERBATIM
+    )
+  add_custom_command(
+    OUTPUT gen/gtm_threadgbl_deftypes_asm.si
+    DEPENDS gen/gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si
+    COMMAND ${CMAKE_COMMAND} -E copy gen/gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si gen/gtm_threadgbl_deftypes_asm.si
+    )
+  add_custom_target(gen_gtm_threadgbl_deftypes
+  	DEPENDS ${GTM_BINARY_DIR}/gen/gtm_threadgbl_deftypes.h ${GTM_BINARY_DIR}/gen/gtm_threadgbl_deftypes_asm.si)
+else()
+  select_file(gtm_threadgbl_deftypes_asm "gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si")
+  add_custom_command(
+    OUTPUT gtm_threadgbl_deftypes_asm.si
+    DEPENDS ${gtm_threadgbl_deftypes_asm}
+    COMMAND ${CMAKE_COMMAND} -E copy ${gtm_threadgbl_deftypes_asm} gtm_threadgbl_deftypes_asm.si
+    )
+  add_custom_target(gen_gtm_threadgbl_deftypes DEPENDS gtm_threadgbl_deftypes_asm.si)
+endif()
 
 foreach(exp exe shr)
   set(out gtm${exp}_symbols.export)
   set(in ${GTM_SOURCE_DIR}/sr_unix/gtm${exp}_symbols.exp)
   add_custom_command(
     OUTPUT ${out}
-    DEPENDS ${in}
+    DEPENDS ${in} gen_gtm_threadgbl_deftypes
     COMMAND tcsh -f ${GTM_SOURCE_DIR}/sr_linux/genexport.csh ${in} ${out}
     )
 endforeach()
@@ -376,6 +422,7 @@ endforeach()
 # TODO: find_package or find_library for system libs?
 include_directories (/usr/local/include)
 target_link_libraries(libmumps		${libmumpslibs})
+add_dependencies(libmumps		gen_gtm_threadgbl_deftypes)
 
 add_executable(mumps			${mumps_SOURCES})
 target_link_libraries(mumps		libmumps)
@@ -388,6 +435,8 @@ add_executable(dbcertify		${dbcertify_SOURCES})
 target_link_libraries(dbcertify		libdbcertify libmupip libmumps libstub)
 
 add_executable(geteuid			${geteuid_SOURCES})
+target_link_libraries(geteuid		libmumps)
+add_dependencies(geteuid		gen_gtm_threadgbl_deftypes)
 
 add_executable(gtmsecshr		${gtmsecshr_SOURCES})
 add_dependencies(gtmsecshr		gen_gtm_threadgbl_deftypes)
@@ -428,6 +477,7 @@ add_executable(gtcm_shmclean 		${gtcm_shmclean_SOURCES})
 target_link_libraries(gtcm_shmclean	libgtcm libmumps libstub)
 
 add_executable(semstat2		 	${semstat2_SOURCES})
+add_dependencies(semstat2		gen_gtm_threadgbl_deftypes)
 
 add_executable(ftok 			${ftok_SOURCES})
 target_link_libraries(ftok 		libmumps libstub)
@@ -462,12 +512,14 @@ endforeach()
 # manually creating each target is way easier.
 
 # Library=GCRYPT Algorithm=AES256CFB
+include_directories (/usr/local/ssl/include)
 add_library(libgtmcrypt_gcrypt_AES256CFB.so MODULE ${libgtmcrypt_SOURCES})
 set_target_properties(libgtmcrypt_gcrypt_AES256CFB.so PROPERTIES
   OUTPUT_NAME gtmcrypt_gcrypt_AES256CFB
   COMPILE_DEFINITIONS "USE_GCRYPT -DUSE_AES256CFB"
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
+add_dependencies(libgtmcrypt_gcrypt_AES256CFB.so gen_gtm_threadgbl_deftypes)
 target_link_libraries(libgtmcrypt_gcrypt_AES256CFB.so ${GPG_LIBRARIES})
 install(TARGETS libgtmcrypt_gcrypt_AES256CFB.so DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
@@ -491,6 +543,7 @@ set_target_properties(libgtmcrypt_openssl_AES256CFB PROPERTIES
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
 target_link_libraries(libgtmcrypt_openssl_AES256CFB ${GPG_LIBRARIES} ${TLS_LIBRARIES})
+add_dependencies(libgtmcrypt_openssl_AES256CFB gen_gtm_threadgbl_deftypes)
 install(TARGETS libgtmcrypt_openssl_AES256CFB DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
 # Library=OPENSSL Algorithm=BLOWFISHCFB
@@ -501,6 +554,7 @@ set_target_properties(libgtmcrypt_openssl_BLOWFISHCFB PROPERTIES
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
 target_link_libraries(libgtmcrypt_openssl_BLOWFISHCFB ${GPG_LIBRARIES} ${TLS_LIBRARIES})
+add_dependencies(libgtmcrypt_openssl_BLOWFISHCFB gen_gtm_threadgbl_deftypes)
 install(TARGETS libgtmcrypt_openssl_BLOWFISHCFB DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
 add_library(libgtmtls MODULE ${libgtmtls_SOURCES})
@@ -510,6 +564,7 @@ set_target_properties(libgtmtls PROPERTIES
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
 target_link_libraries(libgtmtls ${TLS_LIBRARIES})
+add_dependencies(libgtmtls gen_gtm_threadgbl_deftypes)
 install(TARGETS libgtmtls DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
 add_executable(maskpass ${maskpass_SOURCES})
diff --git a/LICENSE b/LICENSE
index 4c843de..b60231f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-All software in this package is part of FIS GT.M (http://fis-gtm.com) which is Copyright 2014 Fidelity Information
+All software in this package is part of FIS GT.M (http://fis-gtm.com) which is Copyright 2015 Fidelity Information
 Services, Inc., and provided to you under the terms of a license. If there is a COPYING file included in this package,
 it contains the terms of the license under which the package is provided to you. If there is not a COPYING file in the
 package, you must ensure that your use of FIS GT.M complies with the license under which it is provided. If you are
diff --git a/README b/README
index 53a67e2..aab5a15 100644
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
 All software in this package is part of FIS GT.M (http://fis-gtm.com)
-which is Copyright 2014 Fidelity Information Services, Inc., and
+which is Copyright 2015 Fidelity Information Services, Inc., and
 provided to you under the terms of a license. If there is a COPYING
 file included in this package, it contains the terms of the license under
 which the package is provided to you. If there is not a COPYING file in
@@ -35,11 +35,11 @@ To build GT.M for Linux, do the following steps:
    from http://sourceforge.net/projects/fis-gtm/ Unpack the tar file and run
    the configure script as root. Note: the tar file unpacks everything into
    your current working directory, not a new subdirectory. The Linux Standard
-   Base (LSB) install path for GT.M V6.2-001 is /opt/fis-gtm/V6.2-001_i586 or
-   /opt/fis-gtm/V6.2-001_x8664. These instructions are written using x8664, please
+   Base (LSB) install path for GT.M V6.2-002 is /opt/fis-gtm/V6.2-002_i586 or
+   /opt/fis-gtm/V6.2-002_x8664. These instructions are written using x8664, please
    use i586 as necessary.
 
-   $ tar xfz gtm_V62001_linux_x8664_pro.tar.gz
+   $ tar xfz gtm_V62002_linux_x8664_pro.tar.gz
 
    # Note down the installation path for use with cmake below
 
@@ -47,16 +47,16 @@ To build GT.M for Linux, do the following steps:
 
 2. Unpack the GT.M sources
    The GT.M source tarball extracts to a directory with the version number in
-   the name, fis-gtm-V6.2-001
-   $ tar xfz fis-gtm-V6.2-001.tar.gz
-   $ cd fis-gtm-V6.2-001
+   the name, fis-gtm-V6.2-002
+   $ tar xfz fis-gtm-V6.2-002.tar.gz
+   $ cd fis-gtm-V6.2-002
 
    You should find this README, LICENSE, COPYING and CMakeLists.txt file and
    sr_* source directories.
 
 3. Building GT.M -
    <fis-gtm-build> can be a sub directory of the source directory,
-   fis-gtm-V6.2-001, or any other valid path.
+   fis-gtm-V6.2-002, or any other valid path.
 
    $ mkdir <fis-gtm-build>
    $ cd <fis-gtm-build>
@@ -75,16 +75,16 @@ To build GT.M for Linux, do the following steps:
    #
    #     -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package
    #
-   $ cmake -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package <path to>/fis-gtm-V6.2-001
+   $ cmake -D CMAKE_INSTALL_PREFIX:PATH=${PWD}/package <path to>/fis-gtm-V6.2-002
 
    $ make
 
    $ make install
 
-   $ cd package/lib/fis-gtm/V6.2-001_x86_64
+   $ cd package/lib/fis-gtm/V6.2-002_x86_64
 
    # Now you are ready to install GT.M. Answer a few questions and install it.
-   # The recommended installation path is /opt/fis-gtm/V6.2-001_x86_64
+   # The recommended installation path is /opt/fis-gtm/V6.2-002_x86_64
 
    $ sudo ./configure
 
diff --git a/sr_alpha/axp.h b/sr_alpha/axp.h
deleted file mode 100644
index 1f514ce..0000000
--- a/sr_alpha/axp.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*	axp.h - AXP machine instruction information.
- *
- *	Requires "axp_registers.h" and "axp_gtm_registers.h".
- *
- */
-
-
-/*	Machine instruction templates.  */
-
-#define	ALPHA_INS_ADDL		((unsigned)0x10 << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BEQ		((unsigned)0x39 << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BGE		((unsigned)0x3e << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BGT		((unsigned)0x3f << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_BIS		((unsigned)0x11 << ALPHA_SHIFT_OP | 0x20 << ALPHA_SHIFT_FUNC)
-#define ALPHA_INS_BLE		((unsigned)0x3b << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BLT		((unsigned)0x3a << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BLBC		((unsigned)0x38 << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BLBS		((unsigned)0x3c << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BNE		((unsigned)0x3d << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BSR		((unsigned)0x34 << ALPHA_SHIFT_OP)
-#define ALPHA_INS_BR		((unsigned)0x30 << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_JMP		((unsigned)0x1a << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_JSR		((unsigned)0x1a << ALPHA_SHIFT_OP | 1 << ALPHA_SHIFT_BRANCH_FUNC)
-#define	ALPHA_INS_LDA		((unsigned)0x08 << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_LDAH		((unsigned)0x09 << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_LDL		((unsigned)0x28 << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_LDQ		((unsigned)0x29 << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_RET		((unsigned)0x1a << ALPHA_SHIFT_OP | 2 << ALPHA_SHIFT_BRANCH_FUNC)
-#define	ALPHA_INS_STL		((unsigned)0x2c << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_STQ		((unsigned)0x2d << ALPHA_SHIFT_OP)
-#define	ALPHA_INS_SUBL		((unsigned)0x10 << ALPHA_SHIFT_OP | 0x9 << ALPHA_SHIFT_FUNC)
-#define	ALPHA_INS_SUBQ		((unsigned)0x10 << ALPHA_SHIFT_OP | 0x29 << ALPHA_SHIFT_FUNC)
-
-
-/*	Bit offsets to instruction fields.  */
-
-#define ALPHA_SHIFT_OP		26
-#define	ALPHA_SHIFT_BRANCH_FUNC	14
-#define	ALPHA_SHIFT_FUNC	5
-#define	ALPHA_SHIFT_LITERAL	13
-#define ALPHA_SHIFT_RA		21
-#define	ALPHA_SHIFT_RB		16
-#define	ALPHA_SHIFT_RC		0
-#define ALPHA_SHIFT_BRANCH_DISP	0
-#define ALPHA_SHIFT_DISP	0
-
-
-/*	Bit masks for instruction fields.  */
-
-#define	ALPHA_BIT_LITERAL	(1 << 12)
-#define ALPHA_MASK_BRANCH_DISP	0x1fffff
-#define	ALPHA_MASK_BRANCH_FUNC	0xc00000
-#define ALPHA_MASK_DISP		0xffff
-#define	ALPHA_MASK_FUNC		0x7f
-#define	ALPHA_MASK_LITERAL	0xff
-#define	ALPHA_MASK_OP		0x3f
-#define	ALPHA_MASK_REG		0x1f
-
-
-/*	Alternative assembler mnemonics for machine instruction.  */
-
-#define	ALPHA_INS_CLRQ	(ALPHA_INS_BIS \
-				| (ALPHA_REG_ZERO << ALPHA_SHIFT_RA) \
-				| (ALPHA_REG_ZERO << ALPHA_SHIFT_RB))
-#define ALPHA_INS_LPC	(ALPHA_INS_BR \
-				| (GTM_REG_CODEGEN_TEMP << ALPHA_SHIFT_RA))
-#define	ALPHA_INS_MOVE	(ALPHA_INS_BIS \
-				| ALPHA_REG_ZERO << ALPHA_SHIFT_RB)
-#define ALPHA_INS_NOP	(ALPHA_INS_BIS \
-				| (ALPHA_REG_ZERO << ALPHA_SHIFT_RA) \
-				| (ALPHA_REG_ZERO << ALPHA_SHIFT_RB) \
-				| (ALPHA_REG_ZERO << ALPHA_SHIFT_RC))
-
-
-/*	Construction forms.  */
-
-#define ALPHA_BRA(op,ra,disp)	((op) | ((ra) << ALPHA_SHIFT_RA) | (disp)&ALPHA_MASK_BRANCH_DISP)
-#define ALPHA_JMP(op,ra,rb)	((op) | ((ra) << ALPHA_SHIFT_RA) | ((rb) << ALPHA_SHIFT_RB))
-#define ALPHA_LIT(op,ra,lit,rc)	((op) | ((ra) << ALPHA_SHIFT_RA) \
-					| (((lit)&ALPHA_MASK_LITERAL) << ALPHA_SHIFT_LITERAL) \
-					| ALPHA_BIT_LITERAL \
-					| ((rc) << ALPHA_SHIFT_RC))
-#define ALPHA_MEM(op,ra,rb,disp)((op) | ((ra) << ALPHA_SHIFT_RA) | ((rb) << ALPHA_SHIFT_RB) | (disp)&ALPHA_MASK_DISP)
-#define ALPHA_OPR(op,ra,rb,rc)	((op) | ((ra) << ALPHA_SHIFT_RA) | ((rb) << ALPHA_SHIFT_RB) | ((rc) << ALPHA_SHIFT_RC))
-
-#ifdef DEBUG
-#define GET_OPCODE(ains) ((ains >> ALPHA_SHIFT_OP) & ALPHA_MASK_OP)
-#define GET_RA(ains) ((ains >> ALPHA_SHIFT_RA) & ALPHA_MASK_REG)
-#define GET_RB(ains) ((ains >> ALPHA_SHIFT_RB) & ALPHA_MASK_REG)
-#define GET_RC(ains) ((ains >> ALPHA_SHIFT_RC) & ALPHA_MASK_REG)
-#define GET_MEMDISP(ains) ((ains >> ALPHA_SHIFT_DISP) & ALPHA_MASK_DISP)
-#define GET_BRDISP(ains) ((ains >> ALPHA_SHIFT_BRANCH_DISP) & ALPHA_MASK_BRANCH_DISP)
-#define GET_FUNC(ains) ((ains >> ALPHA_SHIFT_FUNC) & ALPHA_MASK_FUNC)
-
-#define ADDL_INST	"addl"
-#define SUBL_INST	"subl"
-#define SUBQ_INST	"subq"
-#define BIS_INST	"bis"
-#define JSR_INST	"jsr"
-#define RET_INST	"ret"
-#define JMP_INST	"jmp"
-#define LDA_INST	"lda"
-#define LDAH_INST	"ldah"
-#define LDL_INST	"ldl"
-#define LDQ_INST	"ldq"
-#define STL_INST	"stl"
-#define STQ_INST	"stq"
-#define BR_INST		"br"
-#define BSR_INST	"bsr"
-#define BLBC_INST	"blbc"
-#define BEQ_INST	"beq"
-#define BLT_INST	"blt"
-#define BLE_INST	"ble"
-#define BLBS_INST	"blbs"
-#define BNE_INST	"bne"
-#define BGE_INST	"bge"
-#define BGT_INST	"bgt"
-#define CONSTANT	"Constant 0x"
-
-/* Space for op_code to be in */
-#define OPSPC		7
-#endif
diff --git a/sr_alpha/cacheflush.m64 b/sr_alpha/cacheflush.m64
deleted file mode 100644
index 27a553d..0000000
--- a/sr_alpha/cacheflush.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	cacheflush - flush data and instruction caches
-
-;	cacheflush
-;
-;	entry:
-;		a0 (r16)	address of start of region to flush
-;		a1 (r17)	length (in bytes) of region to flush
-;		a2 (r18)	flag indicating which region to flush (not used on AXP)
-
-	$routine	name=cacheflush, entry=cacheflush_ca, kind=null
-
-	imb
-
-	ret	r26
-
-	$end_routine	name=cacheflush
diff --git a/sr_alpha/double2s.c b/sr_alpha/double2s.c
deleted file mode 100644
index 7b7efd8..0000000
--- a/sr_alpha/double2s.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "stringpool.h"
-
-#define MAX_NUM_SIZE	64
-
-GBLREF spdesc stringpool;
-
-static	char	pot_index [256] =
-		{
-			-78,  78, -77,  77,  77,  77, -76,  76,  76, -75,  75,  75, -74,  74,  74,  74,
-			-73,  73,  73, -72,  72,  72, -71,  71,  71,  71, -70,  70,  70, -69,  69,  69,
-			-68,  68,  68, -67,  67,  67,  67, -66,  66,  66, -65,  65,  65, -64,  64,  64,
-			 64, -63,  63,  63, -62,  62,  62, -61,  61,  61,  61, -60,  60,  60, -59,  59,
-			 59, -58,  58,  58,  58, -57,  57,  57, -56,  56,  56, -55,  55,  55,  55, -54,
-			 54,  54, -53,  53,  53, -52,  52,  52,  52, -51,  51,  51, -50,  50,  50, -49,
-			 49,  49,  49, -48,  48,  48, -47,  47,  47, -46,  46,  46,  46, -45,  45,  45,
-			-44,  44,  44, -43,  43,  43,  43, -42,  42,  42, -41,  41,  41, -40,  40,  40,
-			 40, -39,  39,  39, -38,  38,  38, -37,  37,  37, -36,  36,  36,  36, -35,  35,
-			 35, -34,  34,  34, -33,  33,  33,  33, -32,  32,  32, -31,  31,  31, -30,  30,
-			 30,  30, -29,  29,  29, -28,  28,  28, -27,  27,  27,  27, -26,  26,  26, -25,
-			 25,  25, -24,  24,  24,  24, -23,  23,  23, -22,  22,  22, -21,  21,  21,  21,
-			-20,  20,  20, -19,  19,  19, -18,  18,  18,  18, -17,  17,  17, -16,  16,  16,
-			-15,  15,  15,  15, -14,  14,  14, -13,  13,  13, -12,  12,  12,  12, -11,  11,
-			 11, -10,  10,  10,  -9,   9,   9,  -8,   8,   8,   8,  -7,   7,   7,  -6,   6,
-			  6,  -5,   5,   5,   5,  -4,   4,   4,  -3,   3,   3,  -2,   2,   2,   2,  -1
-		};
-
-static	double	pot [79] =
-		{
-			1.701411834604692e+38 + 2.83e+22,
-				1e+38,	1e+37,	1e+36,	1e+35,	1e+34,	1e+33,	1e+32,
-			1e+31,	1e+30,	1e+29,	1e+28,	1e+27,	1e+26,	1e+25,	1e+24,
-			1e+23,	1e+22,	1e+21,	1e+20,	1e+19,	1e+18,	1e+17,	1e+16,
-			1e+15,	1e+14,	1e+13,	1e+12,	1e+11,	1e+10,	 1e+9,	 1e+8,
-			 1e+7,	 1e+6,	 1e+5,	 1e+4,	 1e+3,	 1e+2,	 1e+1,	  1.0,
-			 1e-1,	 1e-2,	 1e-3,	 1e-4,	 1e-5,	 1e-6,	 1e-7,	 1e-8,
-			 1e-9,	1e-10,	1e-11,	1e-12,	1e-13,	1e-14,	1e-15,	1e-16,
-			1e-17,	1e-18,	1e-19,	1e-20,	1e-21,	1e-22,	1e-23,	1e-24,
-			1e-25,	1e-26,	1e-27,	1e-28,	1e-29,	1e-30,	1e-31,	1e-32,
-			1e-33,	1e-34,	1e-35,	1e-36,	1e-37,	1e-38,	0
-		};
-
-#define POT_UNITY	39	/* Subscript of pot:  pot[POT_UNITY] == 1.0 */
-
-
-struct	D_float		/* Format of D-floating point datum */
-{
-	unsigned int	     : 7;	/* fraction, bits 0:6 */
-	unsigned int	exp  : 8;	/* exponent, bits 7:14 */
-	unsigned int	sign : 1;	/* sign, bit 15 */
-	unsigned int	     : 16;	/* fraction, bits 16:31 */
-	unsigned int	     : 32;	/* fraction, bits 32:63 */
-};
-
-void	double2s (double *dp, mval *v)
-{
-	double		d = *dp;
-	char		*p, *q;
-	int		i, j, k;
-
-	ENSURE_STP_FREE_SPACE(MAX_NUM_SIZE);
-	assert (stringpool.free >= stringpool.base);
-	v->mvtype = MV_STR;
-	p = v->str.addr
-	  = (char *)stringpool.free;
-
-	if (d == 0.0)
-		*p++ = '0';
-	else
-	{
-		if (d < 0.0)
-		{
-			*p++ = '-';	/* plug in a minus sign */
-			d = -d;		/* but make d positive */
-		}
-
-		i = pot_index[((struct D_float *)dp)->exp];
-		if (i < 0)
-		{
-			i = -i;
-			if (d < pot[i])
-				++i;
-		}
-		i = POT_UNITY + 1 - i;
-
-		/* "Normalize" the number;  i.e. adjust it to be between 0.0 and 1.0 */
-		d *= pot[i + POT_UNITY];
-
-		if (d < 5e-16)
-			/* Call it zero */
-			*p++ = '0';
-		else
-		{
-			/* Round the sixteenth digit */
-			d += 5e-16;
-
-			if (d >= 1.0)
-			{
-				/* Readjust it to be between 0.0 and 1.0 */
-				d /= 10.0;
-				++i;
-			}
-
-			q = p;		/* q will point to the last non-zero byte */
-			j = i;
-
-			if (i <= 0)
-			{
-				*p++ = '.';
-				for (;  i < 0;  ++i)
-					*p++ = '0';
-			}
-
-			for (i = 15;  i > 0;  --i)
-			{
-				/* Multiply the value by ten, put the integer portion
-				   of the result into k (0 <= k <= 9), and replace the
-				   value with the fractional portion of the result	*/
-				k = d *= 10.0;
-				d -= k;
-
-				*p++ = '0' + k;
-
-				if (k > 0)
-					q = p;
-				if (--j == 0)
-				{
-					q = p;
-					*p++ = '.';
-				}
-			}
-
-			if (j > 0)
-				do
-					*p++ = '0';
-				while (--j > 0);
-			else
-				p = q;
-		}
-	}
-
-	v->str.len = p - (char *)stringpool.free;
-	stringpool.free = (unsigned char *)p;
-	assert(stringpool.free <= stringpool.top);
-
-	return;
-}
diff --git a/sr_alpha/emit_code_sp.c b/sr_alpha/emit_code_sp.c
deleted file mode 100644
index 6aaf4b7..0000000
--- a/sr_alpha/emit_code_sp.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "cgp.h"
-#include "compiler.h"
-#include <rtnhdr.h>
-#include "list_file.h"
-#include <emit_code.h>
-
-GBLREF uint4		code_buf[];	/* Instruction buffer */
-GBLREF int		code_idx;	/* Index into code_buf */
-GBLREF char		cg_phase;	/* Current compiler phase */
-GBLREF int4		curr_addr;
-#ifdef DEBUG
-GBLREF unsigned char    *obpt;		/* output buffer index */
-GBLREF unsigned char    outbuf[];	/* assembly language output buffer */
-static unsigned int	ains;		/* assembler instruction (binary) */
-#endif
-
-
-/* Used by emit_base_offset to extract offset parts */
-int	alpha_adjusted_upper(int offset)
-{
-	int	upper;
-
-	upper = (offset >> 16) & 0xFFFF;
-	if (offset & 0x8000)
-		upper = (upper + 1) & 0xFFFF;
-
-	return upper;
-}
-
-
-void	emit_base_offset(int base, int offset)
-{
-	/* NOTE: emit_base_offset does not advance past its last
-	   generated instruction because that instruction is
-	   incomplete; it contains only a base and offset -- the
-	   rt and opcode field are left empty for use by the caller. */
-	int	upper, low, source;
-
-	switch (cg_phase)
-	{
-#ifdef DEBUG
-		case CGP_ASSEMBLY:
-#endif
-		case CGP_ADDR_OPT:
-		case CGP_APPROX_ADDR:
-		case CGP_MACHINE:
-			assert(base >= 0  &&  base <= 31);
-			source = base;
-			upper = alpha_adjusted_upper(offset);
-
-			if (0 != upper)
-			{
-				code_buf[code_idx++] = ALPHA_INS_LDAH
-					| (GTM_REG_CODEGEN_TEMP << ALPHA_SHIFT_RA)
-					| (source               << ALPHA_SHIFT_RB)
-					| (upper & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP;
-				source = GTM_REG_CODEGEN_TEMP;
-			}
-			low = offset & 0xFFFF;
-			code_buf[code_idx] = source << ALPHA_SHIFT_RB
-				| (low & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP;
-			break;
-		default:
-			GTMASSERT;
-	}
-}
-
-
-#ifdef DEBUG
-void fmt_ra()
-{
-	*obpt++ = 'r';
-	obpt = i2asc(obpt, GET_RA(ains));
-}
-void fmt_ra_rb()
-{
-	fmt_ra();
-	*obpt++ = ',';
-	*obpt++;
-	*obpt++ = 'r';
-	obpt = i2asc(obpt, GET_RB(ains));
-}
-void fmt_ra_rb_rc()
-{
-	fmt_ra_rb();
-	*obpt++ = ',';
-	*obpt++;
-	*obpt++ = 'r';
-	obpt = i2asc(obpt, GET_RC(ains));
-}
-void fmt_ra_mem()
-{
-	fmt_ra();
-	*obpt++ = ',';
-	obpt++;
-	*obpt++ = '0';
-	*obpt++ = 'x';
-	obpt += i2hex_nofill(GET_MEMDISP(ains), obpt, 6);
-	*obpt++ = '(';
-	*obpt++ = 'r';
-	obpt = i2asc(obpt, GET_RB(ains));
-	*obpt++ = ')';
-}
-void fmt_ra_brdisp()
-{
-	fmt_ra();
-	*obpt++ = ',';
-	obpt++;
-	*obpt++ = '0';
-	*obpt++ = 'x';
-	obpt += i2hex_nofill(GET_BRDISP(ains) * 4, obpt, 6);
-}
-void 	format_machine_inst(void)
-{
-	int	instindx;
-
-	for (instindx = 0; instindx < code_idx; instindx++)
-	{
-		list_chkpage();
-		obpt = &outbuf[0];
-		memset(obpt, SP, ASM_OUT_BUFF);
-		obpt += 10;
-		i2hex((curr_addr - SIZEOF(rhdtyp)), (uchar_ptr_t)obpt, 8);
-		curr_addr += 4;
-		obpt += 10;
-		i2hex(code_buf[instindx], (uchar_ptr_t)obpt, 8);
-		obpt += 10;
-		ains = code_buf[instindx];
-		switch(GET_OPCODE(ains))
-		{
-			case 0x8:
-				memcpy(obpt, LDA_INST, SIZEOF(LDA_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_mem();
-				break;
-			case 0x9:
-				memcpy(obpt, LDAH_INST, SIZEOF(LDAH_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_mem();
-				break;
-			case 0x10:
-			/* Note opcodes 0x10, 0x11, have overlapping functions but none that we generate
-			   so we can combine their disassembly.
-			*/
-			case 0x11:
-				switch(GET_FUNC(ains))
-				{
-					case 0x0:	/* main opcode 0x10 */
-						memcpy(obpt, ADDL_INST, SIZEOF(ADDL_INST) - 1);
-						break;
-					case 0x9:	/* main opcode 0x10 */
-						memcpy(obpt, SUBL_INST, SIZEOF(SUBL_INST) - 1);
-						break;
-					case 0x29:	/* main opcode 0x10 */
-						memcpy(obpt, SUBQ_INST, SIZEOF(SUBQ_INST) - 1);
-						break;
-					case 0x20:	/* main opcode 0x11 */
-						memcpy(obpt, BIS_INST, SIZEOF(BIS_INST) - 1);
-						break;
-					default:
-						GTMASSERT;
-				}
-				obpt += OPSPC;
-				fmt_ra_rb_rc();
-				break;
-			case 0x1a:
-				switch(GET_MEMDISP(ains) & 0x3)
-				{
-					case 0x0:
-						memcpy(obpt, JMP_INST, SIZEOF(JMP_INST) - 1);
-						break;
-					case 0x1:
-						memcpy(obpt, JSR_INST, SIZEOF(JSR_INST) - 1);
-						break;
-					case 0x2:
-						memcpy(obpt, RET_INST, SIZEOF(RET_INST) - 1);
-						break;
-					default:
-						GTMASSERT;
-				}
-				obpt += OPSPC;
-				fmt_ra_rb();
-				break;
-			case 0x28:
-				memcpy(obpt, LDL_INST, SIZEOF(LDL_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_mem();
-				break;
-			case 0x29:
-				memcpy(obpt, LDQ_INST, SIZEOF(LDQ_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_mem();
-				break;
-			case 0x2c:
-				memcpy(obpt, STL_INST, SIZEOF(STL_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_mem();
-				break;
-			case 0x2d:
-				memcpy(obpt, STQ_INST, SIZEOF(STQ_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_mem();
-				break;
-			case 0x30:
-				memcpy(obpt, BR_INST, SIZEOF(BR_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x34:
-				memcpy(obpt, BSR_INST, SIZEOF(BSR_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x38:
-				memcpy(obpt, BLBC_INST, SIZEOF(BLBC_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x39:
-				memcpy(obpt, BEQ_INST, SIZEOF(BEQ_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x3a:
-				memcpy(obpt, BLT_INST, SIZEOF(BLT_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x3b:
-				memcpy(obpt, BLE_INST, SIZEOF(BLE_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x3c:
-				memcpy(obpt, BLBS_INST, SIZEOF(BLBS_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x3d:
-				memcpy(obpt, BNE_INST, SIZEOF(BNE_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x3e:
-				memcpy(obpt, BGE_INST, SIZEOF(BGE_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			case 0x3f:
-				memcpy(obpt, BGT_INST, SIZEOF(BGT_INST) - 1);
-				obpt += OPSPC;
-				fmt_ra_brdisp();
-				break;
-			default: /* Not an instruction but a constant */
-				memcpy(obpt, CONSTANT, SIZEOF(CONSTANT) - 1);
-				obpt += SIZEOF(CONSTANT) - 1;
-				i2hex(ains, obpt, 8);
-				obpt += 8;
-		}
-		emit_eoi();
-	}
-}
-#endif
diff --git a/sr_alpha/emit_code_sp.h b/sr_alpha/emit_code_sp.h
deleted file mode 100644
index c7da71b..0000000
--- a/sr_alpha/emit_code_sp.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef EMIT_CODE_SP_INCLUDED
-#define EMIT_CODE_SP_INCLUDED
-
-#include "axp_registers.h"
-#include "axp_gtm_registers.h"
-#include "axp.h"
-
-void	emit_base_offset(int base, int offset);
-int	alpha_adjusted_upper(int offset);
-
-#ifdef DEBUG
-void    format_machine_inst(void);
-void	fmt_ra(void);
-void	fmt_ra_rb(void);
-void	fmt_ra_rb_rc(void);
-void	fmt_ra_mem(void);
-void	fmt_ra_brdisp(void);
-#endif
-
-#define INST_SIZE (int)SIZEOF(uint4)
-#define BRANCH_OFFSET_FROM_IDX(idx_start, idx_end) (idx_end - (idx_start + 1))
-#define LONG_JUMP_OFFSET (0x4ffffffc) /* should be large enough to force the long jump instruction sequence */
-#define MAX_BRANCH_CODEGEN_SIZE 32  /* The length in bytes, of the longest form of branch instruction sequence */
-
-#define MAX_OFFSET 			0x3fff
-#define STACK_ARG_OFFSET(indx)		(8 * (indx)) /* All arguments on Alpha platforms are 8 bytes wide on stack */
-#define MACHINE_FIRST_ARG_REG		ALPHA_REG_A0
-
-/* Register usage in some of the code generation expansions */
-#define CALLS_TINT_TEMP_REG		ALPHA_REG_R1
-#define CLRL_REG			ALPHA_REG_ZERO
-#define CMPL_TEMP_REG			ALPHA_REG_T1
-#define GET_ARG_REG(indx)		(ALPHA_REG_A0 + (indx))
-#define MOVC3_SRC_REG			ALPHA_REG_R0
-#define MOVC3_TRG_REG			ALPHA_REG_R1
-#define MOVL_RETVAL_REG			ALPHA_REG_V0
-#define MOVL_REG_R1			ALPHA_REG_R1
-
-/* Macros to define the opcodes for use in emit_jmp() and emit_tip() args */
-
-#define GENERIC_OPCODE_BEQ		((uint4)ALPHA_INS_BEQ)
-#define GENERIC_OPCODE_BGE		((uint4)ALPHA_INS_BGE)
-#define GENERIC_OPCODE_BGT		((uint4)ALPHA_INS_BGT)
-#define GENERIC_OPCODE_BLE		((uint4)ALPHA_INS_BLE)
-#define GENERIC_OPCODE_BLT		((uint4)ALPHA_INS_BLT)
-#define GENERIC_OPCODE_BNE		((uint4)ALPHA_INS_BNE)
-#define GENERIC_OPCODE_BLBC		((uint4)ALPHA_INS_BLBC)
-#define GENERIC_OPCODE_BLBS		((uint4)ALPHA_INS_BLBS)
-#define GENERIC_OPCODE_BR		((uint4)ALPHA_INS_BR)
-#define GENERIC_OPCODE_LDA		((uint4)ALPHA_INS_LDA)
-#define GENERIC_OPCODE_LOAD		((uint4)ALPHA_INS_LDL)
-#define GENERIC_OPCODE_STORE		((uint4)ALPHA_INS_STL)
-#define GENERIC_OPCODE_NOP		((uint4)ALPHA_INS_NOP)
-
-/* Macro to extract parts of generic opcodes */
-#define GENXCT_LOAD_SRCREG(inst)	((inst >> ALPHA_SHIFT_RB) & ALPHA_MASK_REG)
-
-/* Macros to create specific generated code sequences */
-
-/* Note that the GEN_CLEAR/SET_TRUTH macros are only used on VMS (TRUTH_IN_REG) */
-#define GEN_CLEAR_TRUTH			code_buf[code_idx++] = (ALPHA_INS_STL | ALPHA_REG_ZERO << ALPHA_SHIFT_RA \
-                                                                | GTM_REG_DOLLAR_TRUTH << ALPHA_SHIFT_RB \
-								| 0 << ALPHA_SHIFT_DISP)
-#define GEN_SET_TRUTH                   { \
-                                                code_buf[code_idx++] = (ALPHA_INS_BIS | ALPHA_REG_ZERO << ALPHA_SHIFT_RA \
-                                                                        | 1 << ALPHA_SHIFT_LITERAL | ALPHA_BIT_LITERAL \
-                                                                        | GTM_REG_CODEGEN_TEMP << ALPHA_SHIFT_RC); \
-						code_buf[code_idx++] = (ALPHA_INS_STL | GTM_REG_CODEGEN_TEMP << ALPHA_SHIFT_RA \
-                                                                        | GTM_REG_DOLLAR_TRUTH << ALPHA_SHIFT_RB \
-                                                                        | 0 << ALPHA_SHIFT_DISP); \
-                                        }
-#define GEN_LOAD_ADDR(reg, breg, disp)	code_buf[code_idx++] = (ALPHA_INS_LDA | reg << ALPHA_SHIFT_RA \
-								| breg << ALPHA_SHIFT_RB \
-								| (disp & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP)
-#define GEN_LOAD_WORD(reg, breg, disp)	code_buf[code_idx++] = (ALPHA_INS_LDL | reg << ALPHA_SHIFT_RA \
-								| breg << ALPHA_SHIFT_RB \
-								| (disp & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP)
-#define GEN_STORE_WORD(reg, breg, disp)	code_buf[code_idx++] = (ALPHA_INS_STL | reg << ALPHA_SHIFT_RA \
-								| breg << ALPHA_SHIFT_RB \
-								| (disp & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP)
-#define GEN_LOAD_IMMED(reg, disp)	GEN_LOAD_ADDR(reg, ALPHA_REG_ZERO, disp)
-#define GEN_CLEAR_WORD_EMIT(reg)        emit_trip(*(fst_opr + *inst++), TRUE, ALPHA_INS_STL, reg)
-#define GEN_LOAD_WORD_EMIT(reg)		emit_trip(*(fst_opr + *inst++), TRUE, ALPHA_INS_LDL, reg)
-#define GEN_SUBTRACT_REGS(src1, src2, trgt) \
-                                        code_buf[code_idx++] = (ALPHA_INS_SUBL \
-								| src1 << ALPHA_SHIFT_RA \
-								| src2 << ALPHA_SHIFT_RB \
-								| trgt << ALPHA_SHIFT_RC)
-#define GEN_ADD_IMMED(reg, imval)	code_buf[code_idx++] = (ALPHA_INS_ADDL \
-								| reg << ALPHA_SHIFT_RA \
-								| imval << ALPHA_SHIFT_LITERAL | ALPHA_BIT_LITERAL \
-								| reg << ALPHA_SHIFT_RC)
-#define GEN_JUMP_REG(reg)		code_buf[code_idx++] = (ALPHA_INS_JMP | ALPHA_REG_ZERO << ALPHA_SHIFT_RA \
-								| reg << ALPHA_SHIFT_RB)
-#define GEN_STORE_ARG(reg, offset)	code_buf[code_idx++] = (ALPHA_INS_STQ | reg << ALPHA_SHIFT_RA \
-								| ALPHA_REG_SP << ALPHA_SHIFT_RB \
-								| (offset & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP)
-#define GEN_PCREL			code_buf[code_idx++] = (ALPHA_INS_LPC)
-#define GEN_MOVE_REG(trg, src)		code_buf[code_idx++] = (ALPHA_INS_MOVE | src << ALPHA_SHIFT_RA | trg << ALPHA_SHIFT_RC)
-
-#if	defined(__vms)
-/*	CALL_INST_SIZE is the byte length of the minimum-length instruction sequence to implement a transfer
- *	table call.  In the case of OpenVMS AXP, this is the sequence:
- *
- *		ldl	r27, xfer(r11)		; get address of procedure descriptor from transfer table
- *		ldq	r26, 8(r27)		; get code address of procedure from procedure descriptor
- *		jmp	r26, (r26)		; call it
- *
- *	This value is used to determine how to adjust the offset value for a relative call and may not
- *	be appropriate for the Alpha because VAX relative calls are emulated on the Alpha differently.
-*/
-#  define CALL_INST_SIZE (3 * INST_SIZE)
-#  define GEN_XFER_TBL_CALL(xfer)							\
-   {											\
-	emit_base_offset(GTM_REG_XFER_TABLE, xfer);					\
-	code_buf[code_idx++] |= ALPHA_INS_LDL | ALPHA_REG_PV << ALPHA_SHIFT_RA;		\
-	emit_base_offset(ALPHA_REG_PV, 8);						\
-	code_buf[code_idx++] |= ALPHA_INS_LDQ | ALPHA_REG_RA << ALPHA_SHIFT_RA;		\
-	code_buf[code_idx++] = ALPHA_INS_JSR | ALPHA_REG_RA << ALPHA_SHIFT_RA | ALPHA_REG_RA << ALPHA_SHIFT_RB; \
-   }
-#elif	defined(__osf__)
-/*	CALL_INST_SIZE is the byte length of the minimum-length instruction sequence to implement a transfer
- *	table call.  In the case of OSF/1 (Digital Unix) AXP, this is the sequence:
- *
- *		ldl	r27, offset(r12)	# get address of entry point from transfer table
- *		jmp	r26, (r27)		# call it
- *
- *	This value is used to determine how to adjust the offset value for a relative call and may not
- *	be appropriate for the Alpha because VAX relative calls are emulated on the Alpha differently.
-*/
-#  define CALL_INST_SIZE (2 * INST_SIZE)
-#  define GEN_XFER_TBL_CALL(xfer)							\
-   {											\
-	emit_base_offset(GTM_REG_XFER_TABLE, xfer);					\
-	code_buf[code_idx++] |= ALPHA_INS_LDL | ALPHA_REG_PV << ALPHA_SHIFT_RA;		\
-	code_buf[code_idx++] = ALPHA_INS_JSR | ALPHA_REG_RA << ALPHA_SHIFT_RA | ALPHA_REG_PV << ALPHA_SHIFT_RB; \
-   }
-#else
-#	error "Unsupported platform"
-#endif
-
-
-/* Macros to return an instruction value. This is typcically used to modify an instruction
-   that is already in the instruction buffer such as the last instruction that was created
-   by emit_pcrel().
-*/
-#define IGEN_COND_BRANCH_REG_OFFSET(opcode, reg, disp) (opcode | ((reg & ALPHA_MASK_REG) << ALPHA_SHIFT_RA) \
-					| ((disp & ALPHA_MASK_DISP) << ALPHA_SHIFT_BRANCH_DISP))
-#define IGEN_UCOND_BRANCH_REG_OFFSET(opcode, reg, disp) IGEN_COND_BRANCH_REG_OFFSET(opcode, reg, disp)
-#define IGEN_LOAD_ADDR_REG(reg)		(ALPHA_INS_LDA | (reg & ALPHA_MASK_REG) << ALPHA_SHIFT_RA)
-#define IGEN_LOAD_WORD_REG(reg)		(ALPHA_INS_LDL | (reg & ALPHA_MASK_REG) << ALPHA_SHIFT_RA)
-#define IGEN_LOAD_NATIVE_REG(reg)	IGEN_LOAD_WORD_REG(reg)
-#define IGEN_COND_BRANCH_OFFSET(disp)	((disp & ALPHA_MASK_BRANCH_DISP) << ALPHA_SHIFT_BRANCH_DISP)
-#define IGEN_UCOND_BRANCH_OFFSET(disp)	IGEN_COND_BRANCH_OFFSET(disp)
-#define IGEN_LOAD_LINKAGE(reg)		(ALPHA_INS_LDQ | (reg & ALPHA_MASK_REG) << ALPHA_SHIFT_RA)
-#define IGEN_GENERIC_REG(opcode, reg)	(opcode | ((reg & ALPHA_MASK_REG) << ALPHA_SHIFT_RA))
-
-/* Some macros that are used in certain routines in emit_code.c. The names of these
-   macros start with the routine name they are used in.
-*/
-
-/* Branch has origin of +1 instructions. However, if the branch was nullified in an earlier shrink_trips,
- * the origin is the current instruction itself */
-#define EMIT_JMP_ADJUST_BRANCH_OFFSET	branch_offset = ((branch_offset != 0) ? branch_offset - 1 : 0)
-/* Can jump be done within range of immediate operand */
-#define EMIT_JMP_SHORT_CODE_CHECK	(branch_offset >= (-(ALPHA_MASK_BRANCH_DISP/2) - 1)	\
-					 && branch_offset <= (ALPHA_MASK_BRANCH_DISP/2))
-/* Emit the short jump */
-#define EMIT_JMP_SHORT_CODE_GEN									\
-{												\
-	code_buf[code_idx++] = (branchop | (reg << ALPHA_SHIFT_RA)				\
-		| ((branch_offset & ALPHA_MASK_BRANCH_DISP) << ALPHA_SHIFT_BRANCH_DISP));	\
-	branch_offset--;									\
-}
-/* Is this a conditional branch? */
-#define EMIT_JMP_OPPOSITE_BR_CHECK	(branchop != ALPHA_INS_BR && (branchop != ALPHA_INS_BEQ || reg != ALPHA_REG_ZERO))
-#define EMIT_JMP_GEN_COMPARE		/* No compare necessary */
-#define EMIT_JMP_LONG_CODE_CHECK	FALSE
-/* Is the offset field in this instruction zero? */
-#define EMIT_JMP_ZERO_DISP_COND		(0 == ((code_buf[code_idx] >> ALPHA_SHIFT_DISP) & ALPHA_MASK_DISP))
-/* Emit code to load a given numeric literal */
-#define EMIT_TRIP_ILIT_GEN		{	/* Emit liternal number */						\
-	                                        emit_base_offset(ALPHA_REG_ZERO, immediate);				\
-						code_buf[code_idx++] |= (ALPHA_INS_LDA |				\
-									 (trg_reg & ALPHA_MASK_REG) << ALPHA_SHIFT_RA); \
-                                        }
-/*
- * GT.M on AIX and SPARC is 64bit
- * By default the loads/stores use ldd/std(load double),
- * but if the value being dealt with is a word,the
- * opcode in generic_inst is changed to ldw/stw
- */
-#define REVERT_GENERICINST_TO_WORD(inst)
-
-#endif
diff --git a/sr_alpha/follow.m64 b/sr_alpha/follow.m64
deleted file mode 100644
index 7267a82..0000000
--- a/sr_alpha/follow.m64
+++ /dev/null
@@ -1,32 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	FOLLOW	"Allows run-time modules to call OP_FOLLOW"
-
-;	FOLLOW simply passes its two arguments, which are pointers to
-;	mval's, to OP_FOLLOW, which expects them in registers r0 and r1.
-;	OP_FOLLOW returns 1, 0, or -1;  FOLLOW returns a boolean result:
-;	1 (true) if OP_FOLLOW returned 1, otherwise 0 (false).
-
-	$routine FOLLOW, entry=FOLLOW_CA, kind=stack
-	.base	r27, $ls
-
-	sextl	r16, r0
-	sextl	r17, r1
-	$call	OP_FOLLOW, set_arg_info=false
-	sextl	r0, r0
-	cmovlt	r0, 0, r0
-
-	$return
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/gtm_dump.c b/sr_alpha/gtm_dump.c
deleted file mode 100644
index 422d9b7..0000000
--- a/sr_alpha/gtm_dump.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*** STUB FILE ***/
-
-#include "mdef.h"
-#include "error.h"
-
-void gtm_dump(void) {};
diff --git a/sr_alpha/inst_flush.m64 b/sr_alpha/inst_flush.m64
deleted file mode 100644
index 8f63803..0000000
--- a/sr_alpha/inst_flush.m64
+++ /dev/null
@@ -1,24 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	inst_flush	flush instruction cache
-
-;	inst_flush is a C-callable routine that makes the instruction cache coherent with memory.
-
-	$routine	name=inst_flush,entry=inst_flush_ca,kind=null
-
-	imb
-
-	ret	r26
-
-	$end_routine	name=inst_flush
-
-	.end
diff --git a/sr_alpha/mint2mval.m64 b/sr_alpha/mint2mval.m64
deleted file mode 100644
index 262527d..0000000
--- a/sr_alpha/mint2mval.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	mint2mval "Convert integer to mval"
-
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; #	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-;	On input, r1 = integer value, r0 -> mval
-
-	mval$def
-
-	$linkage_section
-
-int_hi_val:
-	.quad	INT_HI
-
-	$routine MINT2MVAL, entry=MINT2MVAL_CA, kind=null
-	lda	sp, -24(sp)
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r22, int_hi_val
-	cmplt	r1, r22, r28
-	beq	r28, 11$		; int >= INT_HI
-	negq	r22, r22
-	cmple	r1, r22, r28
-	bne	r28, 11$		; int <= -INT_HI
-
-	mv_i2mval r1, r0
-
-12$:	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 24(sp)
-	ret	r26
-
-11$:	mov	r0, r16
-	mov	r1, r17
-	$call I2MVAL, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	br	12$
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/movq.m64 b/sr_alpha/movq.m64
deleted file mode 100644
index ef9d980..0000000
--- a/sr_alpha/movq.m64
+++ /dev/null
@@ -1,21 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	movq	move quadword
-
-	$routine	name=movq,entry=movq_ca,kind=null
-
-	ldq	r28, (r16)
-	stq	r28, (r17)
-
-	ret	r26
-
-	$end_routine	name=movq
diff --git a/sr_alpha/mval2bool.m64 b/sr_alpha/mval2bool.m64
deleted file mode 100644
index d294d1f..0000000
--- a/sr_alpha/mval2bool.m64
+++ /dev/null
@@ -1,39 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2000, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	mval2bool "Sets condition code from mval"
-
-;	On entry, r1 -> mval.
-;	On exit, r24 = numeric value of mval
-
-	mval$def
-
-	$routine MVAL2BOOL, entry=MVAL2BOOL_CA, kind=null
-	lda	sp, -24(sp)
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mv_force_defined r1
-	stq	r1, 16(sp)
-	mv_force_num (r1)
-	ldq	r1, 16(sp)
-	ldl	r24, mval$l_m1(r1)
-
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 24(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/mval2mint.m64 b/sr_alpha/mval2mint.m64
deleted file mode 100644
index a27508c..0000000
--- a/sr_alpha/mval2mint.m64
+++ /dev/null
@@ -1,39 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2000, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	mval2mint "Converts an mval to integer"
-
-;	On entry, r1 -> mval
-;	On exit, r0 = integer value
-
-	mval$def
-
-	$routine MVAL2MINT, entry=MVAL2MINT_CA, kind=null
-	lda	sp, -24(sp)
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mv_force_defined r1
-	stq	r1, 16(sp)
-	mv_force_num (r1)
-	ldq	r16, 16(sp)
-	$call	MVAL2I, args=<r16>, set_arg_info=false, nonstandard=true
-
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 24(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/objlangdefs.h b/sr_alpha/objlangdefs.h
deleted file mode 100644
index 1d5d6c0..0000000
--- a/sr_alpha/objlangdefs.h
+++ /dev/null
@@ -1,457 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* Object record types: */
-#define	EOBJ$C_EMH		8
-#define	EOBJ$C_EEOM		9
-#define	EOBJ$C_EGSD		10
-#define	EOBJ$C_ETIR		11
-#define	EOBJ$C_EDBG		12
-#define	EOBJ$C_ETBT		13
-#define	EOBJ$C_MAXRECTYP	13
-
-/* Byte offsets into object record and related constants: */
-#define	EOBJ$K_SUBTYP		4
-#define	EOBJ$C_SUBTYP		4
-#define	EOBJ$C_MAXRECSIZ	8192
-#define	EOBJ$C_STRLVL		2
-#define	EOBJ$C_SYMSIZ		31
-#define	EOBJ$C_STOREPLIM	-1
-#define	EOBJ$C_PSCALILIM	16
-#define	EOBJ$S_EOBJRECDEF	10
-#define	EOBJ$W_RECTYP		0
-#define	EOBJ$W_SIZE		2
-#define	EOBJ$W_SUBTYP		4
-#define	EOBJ$B_MHD_STRLV	6
-#define	EOBJ$B_MHD_HOLD		7
-#define	EOBJ$W_MHD_RECSZ	8
-#define	EOBJ$T_MHD_NAME		10
-
-/* Object header record (EOBJ$C_EMH) subtypes: */
-#define	EMH$C_MHD		0
-#define	EMH$C_LNM		1
-#define	EMH$C_SRC		2
-#define	EMH$C_TTL		3
-#define	EMH$C_CPR		4
-#define	EMH$C_MTC		5
-#define	EMH$C_GTX		6
-#define	EMH$C_MAXHDRTYP		6
-
-/* Byte offsets of fields in object header record (EOBJ$C_EMH): */
-#define	EMH$S_EMHDEF		52
-#define	EMH$W_RECTYP		0
-#define	EMH$W_SIZE		2
-#define	EMH$W_HDRTYP		4
-#define	EMH$B_STRLVL		6
-#define	EMH$B_TEMP		7
-#define	EMH$L_ARCH1		8
-#define	EMH$L_ARCH2		12
-#define	EMH$L_RECSIZ		16
-#define	EMH$B_NAMLNG		20
-#define	EMH$S_NAME		31
-#define	EMH$T_NAME		21
-
-#define	EEOM$C_SUCCESS		0
-#define	EEOM$C_WARNING		1
-#define	EEOM$C_ERROR		2
-#define	EEOM$C_ABORT		3
-#define	EEOM$K_EOMMIN		10
-#define	EEOM$C_EOMMIN		10
-#define	EEOM$K_EOMMX1		10
-#define	EEOM$C_EOMMX1		10
-#define	EEOM$M_WKTFR		0X1
-#define	EEOM$K_EOMMAX		24
-#define	EEOM$C_EOMMAX		24
-#define	EEOM$S_EEOMDEF		24
-#define	EEOM$W_RECTYP		0
-#define	EEOM$W_SIZE		2
-#define	EEOM$L_TOTAL_LPS	4
-#define	EEOM$W_COMCOD		8
-#define	EEOM$B_TFRFLG		10
-#define	EEOM$V_WKTFR		0
-#define	EEOM$B_TEMP		11
-#define	EEOM$L_PSINDX		12
-#define	EEOM$S_TFRADR		8
-#define	EEOM$Q_TFRADR		16
-#define	EEOM$L_TFRADR		16
-
-
-#define	EGSD$K_ENTRIES		2
-#define	EGSD$C_ENTRIES		2
-
-#define	EGSD$C_PSC		0
-#define	EGSD$C_SYM		1
-#define	EGSD$C_IDC		2
-#define	EGSD$C_ENV		3
-#define	EGSD$C_LSY		4
-#define	EGSD$C_SPSC		5
-#define	EGSD$C_SYMV		6
-#define	EGSD$C_SYMM		7
-#define	EGSD$C_SYMG		8
-#define	EGSD$C_MAXRECTYP	8
-
-#define	EGSD$S_EGSDEF		12
-#define	EGSD$W_RECTYP		0
-#define	EGSD$W_RECSIZ		2
-#define	EGSD$L_ALIGNLW		4
-#define	EGSD$W_GSDTYP		8
-#define	EGSD$W_GSDSIZ		10
-
-#define	EGPS$M_PIC		0X1
-#define	EGPS$M_LIB		0X2
-#define	EGPS$M_OVR		0X4
-#define	EGPS$M_REL		0X8
-#define	EGPS$M_GBL		0X10
-#define	EGPS$M_SHR		0X20
-#define	EGPS$M_EXE		0X40
-#define	EGPS$M_RD		0X80
-#define	EGPS$M_WRT		0X100
-#define	EGPS$M_VEC		0X200
-#define	EGPS$M_NOMOD		0X400
-#define	EGPS$M_COM		0X800
-#define	EGPS$K_NAME		12
-#define	EGPS$C_NAME		12
-#define	EGPS$S_EGPSDEF		44
-#define	EGPS$W_GSDTYP		0
-#define	EGPS$T_START		0
-#define	EGPS$W_SIZE		2
-#define	EGPS$B_ALIGN		4
-#define	EGPS$B_TEMP		5
-#define	EGPS$W_FLAGS		6
-#define	EGPS$V_PIC		0
-#define	EGPS$V_LIB		1
-#define	EGPS$V_OVR		2
-#define	EGPS$V_REL		3
-#define	EGPS$V_GBL		4
-#define	EGPS$V_SHR		5
-#define	EGPS$V_EXE		6
-#define	EGPS$V_RD		7
-#define	EGPS$V_WRT		8
-#define	EGPS$V_VEC		9
-#define	EGPS$V_NOMOD		10
-#define	EGPS$V_COM		11
-#define	EGPS$L_ALLOC		8
-#define	EGPS$B_NAMLNG		12
-#define	EGPS$S_NAME		31
-#define	EGPS$T_NAME		13
-
-#define	ESGPS$M_PIC		0X1
-#define	ESGPS$M_LIB		0X2
-#define	ESGPS$M_OVR		0X4
-#define	ESGPS$M_REL		0X8
-#define	ESGPS$M_GBL		0X10
-#define	ESGPS$M_SHR		0X20
-#define	ESGPS$M_EXE		0X40
-#define	ESGPS$M_RD		0X80
-#define	ESGPS$M_WRT		0X100
-#define	ESGPS$M_VEC		0X200
-#define	ESGPS$M_NOMOD		0X400
-#define	ESGPS$M_COM		0X800
-#define	ESGPS$K_NAME		25
-#define	ESGPS$C_NAME		25
-#define	ESGPS$S_ESGPSDEF	56
-#define	ESGPS$W_GSDTYP		0
-#define	ESGPS$T_START		0
-#define	ESGPS$W_SIZE		2
-#define	ESGPS$B_ALIGN		4
-#define	ESGPS$B_TEMP		5
-#define	ESGPS$W_FLAGS		6
-#define	ESGPS$V_PIC		0
-#define	ESGPS$V_LIB		1
-#define	ESGPS$V_OVR		2
-#define	ESGPS$V_REL		3
-#define	ESGPS$V_GBL		4
-#define	ESGPS$V_SHR		5
-#define	ESGPS$V_EXE		6
-#define	ESGPS$V_RD		7
-#define	ESGPS$V_WRT		8
-#define	ESGPS$V_VEC		9
-#define	ESGPS$V_NOMOD		10
-#define	ESGPS$V_COM		11
-#define	ESGPS$L_ALLOC		8
-#define	ESGPS$L_BASE		12
-#define	ESGPS$S_VALUE		8
-#define	ESGPS$Q_VALUE		16
-#define	ESGPS$L_VALUE		16
-#define	ESGPS$B_NAMLNG		24
-#define	ESGPS$S_NAME		31
-#define	ESGPS$T_NAME		25
-
-#define	EGSY$M_WEAK		0X1
-#define	EGSY$M_DEF		0X2
-#define	EGSY$M_UNI		0X4
-#define	EGSY$M_REL		0X8
-#define	EGSY$M_COMM		0X10
-#define	EGSY$M_VECEP		0X20
-#define	EGSY$M_NORM		0X40
-#define	EGSY$S_EGSYDEF		8
-#define	EGSY$W_GSDTYP		0
-#define	EGSY$T_START		0
-#define	EGSY$W_SIZE		2
-#define	EGSY$B_DATYP		4
-#define	EGSY$B_TEMP		5
-#define	EGSY$W_FLAGS		6
-#define	EGSY$V_WEAK		0
-#define	EGSY$V_DEF		1
-#define	EGSY$V_UNI		2
-#define	EGSY$V_REL		3
-#define	EGSY$V_COMM		4
-#define	EGSY$V_VECEP		5
-#define	EGSY$V_NORM		6
-
-#define	EGST$K_NAME		37
-#define	EGST$C_NAME		37
-#define	EGST$S_EGSTDEF		68
-#define	EGST$W_GSDTYP		0
-#define	EGST$T_START		0
-#define	EGST$W_SIZE		2
-#define	EGST$B_DATYP		4
-#define	EGST$B_TEMP		5
-#define	EGST$W_FLAGS		6
-#define	EGST$S_VALUE		8
-#define	EGST$Q_VALUE		8
-#define	EGST$L_VALUE		8
-#define	EGST$S_LP_1		8
-#define	EGST$Q_LP_1		16
-#define	EGST$L_LP_1		16
-#define	EGST$S_LP_2		8
-#define	EGST$Q_LP_2		24
-#define	EGST$L_LP_2		24
-#define	EGST$L_PSINDX		32
-#define	EGST$B_NAMLNG		36
-#define	EGST$S_NAME		31
-#define	EGST$T_NAME		37
-
-#define	ESDF$K_NAME		33
-#define	ESDF$C_NAME		33
-#define	ESDF$S_ESDFDEF		64
-#define	ESDF$W_GSDTYP		0
-#define	ESDF$T_START		0
-#define	ESDF$W_SIZE		2
-#define	ESDF$B_DATYP		4
-#define	ESDF$B_TEMP		5
-#define	ESDF$W_FLAGS		6
-#define	ESDF$S_VALUE		8
-#define	ESDF$Q_VALUE		8
-#define	ESDF$L_VALUE		8
-#define	ESDF$S_CODE_ADDRESS	8
-#define	ESDF$Q_CODE_ADDRESS	16
-#define	ESDF$L_CODE_ADDRESS	16
-#define	ESDF$L_CA_PSINDX	24
-#define	ESDF$L_PSINDX		28
-#define	ESDF$B_NAMLNG		32
-#define	ESDF$S_NAME		31
-#define	ESDF$T_NAME		33
-
-#define	ESDFV$K_NAME		25
-#define	ESDFV$C_NAME		25
-#define	ESDFV$S_ESDFVDEF	56
-#define	ESDFV$W_GSDTYP		0
-#define	ESDFV$T_START		0
-#define	ESDFV$W_SIZE		2
-#define	ESDFV$B_DATYP		4
-#define	ESDFV$B_TEMP		5
-#define	ESDFV$W_FLAGS		6
-#define	ESDFV$S_VALUE		8
-#define	ESDFV$Q_VALUE		8
-#define	ESDFV$L_VALUE		8
-#define	ESDFV$L_PSINDX		16
-#define	ESDFV$L_VECTOR		20
-#define	ESDFV$B_NAMLNG		24
-#define	ESDFV$S_NAME		31
-#define	ESDFV$T_NAME		25
-#define	ESDFM$K_NAME		25
-#define	ESDFM$C_NAME		25
-#define	ESDFM$S_ESDFMDEF	56
-#define	ESDFM$W_GSDTYP		0
-#define	ESDFM$T_START		0
-#define	ESDFM$W_SIZE		2
-#define	ESDFM$B_DATYP		4
-#define	ESDFM$B_TEMP		5
-#define	ESDFM$W_FLAGS		6
-#define	ESDFM$S_VALUE		8
-#define	ESDFM$Q_VALUE		8
-#define	ESDFM$L_VALUE		8
-#define	ESDFM$L_PSINDX		16
-#define	ESDFM$L_VERSION_MASK	20
-#define	ESDFM$B_NAMLNG		24
-#define	ESDFM$S_NAME		31
-#define	ESDFM$T_NAME		25
-#define	ESRF$K_NAME		9
-#define	ESRF$C_NAME		9
-#define	ESRF$S_ESRFDEF		40
-#define	ESRF$W_GSDTYP		0
-#define	ESRF$T_START		0
-#define	ESRF$W_SIZE		2
-#define	ESRF$B_DATYP		4
-#define	ESRF$B_TEMP		5
-#define	ESRF$W_FLAGS		6
-#define	ESRF$B_NAMLNG		8
-#define	ESRF$S_NAME		31
-#define	ESRF$T_NAME		9
-#define	EIDC$C_LEQ		0
-#define	EIDC$C_EQUAL		1
-#define	EIDC$S_EIDCDEF		7
-#define	EIDC$W_GSDTYP		0
-#define	EIDC$W_SIZE		2
-#define	EIDC$B_NAMLNG		4
-#define	EIDC$T_NAME		5
-#define	EIDC$W_FLAGS		5
-#define	EIDC$V_BINIDENT		0
-#define	EIDC$S_IDMATCH		2
-#define	EIDC$V_IDMATCH		1
-#define	EIDC$S_ERRSEV		3
-#define	EIDC$V_ERRSEV		3
-
-#define	EENV$M_DEF		0X1
-#define	EENV$M_NESTED		0X2
-#define	EENV$S_EENVDEF		40
-#define	EENV$W_GSDTYP		0
-#define	EENV$W_SIZE		2
-#define	EENV$W_FLAGS		4
-#define	EENV$V_DEF		0
-#define	EENV$V_NESTED		1
-#define	EENV$W_ENVINDX		6
-#define	EENV$B_NAMLNG		8
-#define	EENV$S_NAME		31
-#define	EENV$T_NAME		9
-
-#define	ELSY$M_WEAK		0X1
-#define	ELSY$M_DEF		0X2
-#define	ELSY$M_UNI		0X4
-#define	ELSY$M_REL		0X8
-#define	ELSY$S_ELSYDEF		14
-#define	ELSY$W_GSDTYP		0
-#define	ELSY$T_START		0
-#define	ELSY$W_SIZE		2
-#define	ELSY$B_DATYP		4
-#define	ELSY$B_TEMP1		5
-#define	ELSY$W_FLAGS		6
-#define	ELSY$V_WEAK		0
-#define	ELSY$V_DEF		1
-#define	ELSY$V_UNI		2
-#define	ELSY$V_REL		3
-#define	ELSY$L_PSINDX		8
-#define	ELSY$W_ENVINDX		12
-
-#define	ELSRF$K_NAME		17
-#define	ELSRF$C_NAME		17
-#define	ELSRF$S_ELSRFDEF	48
-#define	ELSRF$W_GSDTYP		0
-#define	ELSRF$T_START		0
-#define	ELSRF$W_SIZE		2
-#define	ELSRF$B_DATYP		4
-#define	ELSRF$B_TEMP1		5
-#define	ELSRF$W_FLAGS		6
-#define	ELSRF$L_PSINDX		8
-#define	ELSRF$W_ENVINDX		12
-#define	ELSRF$W_TEMP2		14
-#define	ELSRF$B_NAMLNG		16
-#define	ELSRF$S_NAME		31
-#define	ELSRF$T_NAME		17
-
-#define	ELSDF$K_NAME		25
-#define	ELSDF$C_NAME		25
-#define	ELSDF$S_ELSDFDEF	56
-#define	ELSDF$W_GSDTYP		0
-#define	ELSDF$T_START		0
-#define	ELSDF$W_SIZE		2
-#define	ELSDF$B_DATYP		4
-#define	ELSDF$B_TEMP1		5
-#define	ELSDF$W_FLAGS		6
-#define	ELSDF$S_VALUE		8
-#define	ELSDF$Q_VALUE		8
-#define	ELSDF$L_VALUE		8
-#define	ELSDF$L_PSINDX		16
-#define	ELSDF$W_ENVINDX		20
-#define	ELSDF$W_TEMP2		22
-#define	ELSDF$B_NAMLNG		24
-#define	ELSDF$S_NAME		31
-#define	ELSDF$T_NAME		25
-
-/* ETIR command types: */
-/* ETIR stack commands: */
-#define	ETIR$C_MINSTACOD	0
-#define	ETIR$C_STA_GBL		0
-#define	ETIR$C_STA_LW		1
-#define	ETIR$C_STA_QW		2
-#define	ETIR$C_STA_PQ		3
-#define	ETIR$C_STA_LI		4
-#define	ETIR$C_STA_MOD		5
-#define	ETIR$C_STA_CKARG	6
-#define	ETIR$C_MAXSTACOD	6
-
-#define	ETIR$C_MINSTOCOD	50
-#define	ETIR$C_STO_B		50
-#define	ETIR$C_STO_W		51
-#define	ETIR$C_STO_LW		52
-#define	ETIR$C_STO_QW		53
-#define	ETIR$C_STO_IMMR		54
-#define	ETIR$C_STO_GBL		55
-#define	ETIR$C_STO_CA		56
-#define	ETIR$C_STO_RB		57
-#define	ETIR$C_STO_AB		58
-#define	ETIR$C_STO_OFF		59
-#define	ETIR$C_STO_IMM		61
-#define	ETIR$C_STO_GBL_LW	62
-#define	ETIR$C_STO_HINT_GBL	64
-#define	ETIR$C_STO_HINT_PS	65
-#define	ETIR$C_MAXSTOCOD	65
-
-#define	ETIR$C_MINOPRCOD	100
-#define	ETIR$C_OPR_NOP		100
-#define	ETIR$C_OPR_ADD		101
-#define	ETIR$C_OPR_SUB		102
-#define	ETIR$C_OPR_MUL		103
-#define	ETIR$C_OPR_DIV		104
-#define	ETIR$C_OPR_AND		105
-#define	ETIR$C_OPR_IOR		106
-#define	ETIR$C_OPR_EOR		107
-#define	ETIR$C_OPR_NEG		108
-#define	ETIR$C_OPR_COM		109
-#define	ETIR$C_OPR_INSV		110
-#define	ETIR$C_OPR_ASH		111
-#define	ETIR$C_OPR_USH		112
-#define	ETIR$C_OPR_ROT		113
-#define	ETIR$C_OPR_SEL		114
-#define	ETIR$C_OPR_REDEF	115
-#define	ETIR$C_OPR_DFLIT	116
-#define	ETIR$C_MAXOPRCOD	116
-
-#define	ETIR$C_MINCTLCOD	150
-#define	ETIR$C_CTL_SETRB	150
-#define	ETIR$C_CTL_AUGRB	151
-#define	ETIR$C_CTL_DFLOC	152
-#define	ETIR$C_CTL_STLOC	153
-#define	ETIR$C_CTL_STKDL	154
-#define	ETIR$C_MAXCTLCOD	154
-
-#define	ETIR$C_MINSTCCOD	200
-#define	ETIR$C_STC_LP		200
-#define	ETIR$C_STC_LP_PSB	201
-#define	ETIR$C_STC_GBL		202
-#define	ETIR$C_STC_GCA		203
-#define	ETIR$C_STC_PS		204
-#define	ETIR$C_STC_NOP_GBL	205
-#define	ETIR$C_STC_NOP_PS	206
-#define	ETIR$C_STC_BSR_GBL	207
-#define	ETIR$C_STC_BSR_PS	208
-#define	ETIR$C_STC_LDA_GBL	209
-#define	ETIR$C_STC_LDA_PS	210
-#define	ETIR$C_STC_BOH_GBL	211
-#define	ETIR$C_STC_BOH_PS	212
-#define	ETIR$C_STC_NBH_GBL	213
-#define	ETIR$C_STC_NBH_PS	214
-#define	ETIR$C_MAXSTCCOD	214
-
-#define	ETIR$S_ETIRDEF		4
-#define	ETIR$W_RECTYP		0
-#define	ETIR$W_SIZE		2
diff --git a/sr_alpha/op_call.m64 b/sr_alpha/op_call.m64
deleted file mode 100644
index d2e6d27..0000000
--- a/sr_alpha/op_call.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	OP_CALL
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_CALLB, entry=OP_CALL_CA, aliases=<OP_CALLW, OP_CALLL>, kind=null
-
-	lda	sp, -16(sp)
-	stq	r13, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch sequence following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	COPY_STACK_FRAME, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 16(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/op_equnul.m64 b/sr_alpha/op_equnul.m64
deleted file mode 100644
index 713ecc3..0000000
--- a/sr_alpha/op_equnul.m64
+++ /dev/null
@@ -1,61 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	OP_EQUNUL "Compare mval to null string"
-
-	mval$def
-
-
-	$linkage_section
-
-a_undef_inhibit:
-	.address undef_inhibit
-
-
-	$code_section
-
-	$routine OP_EQUNUL, entry=OP_EQUNUL_CA, kind=null
-	.base	r27, $ls
-
-	mv_if_notdefined (r0), 30$
-
-	mv_if_notstring (r0), 20$
-	ldl	r28, mval$l_strlen(r0)
-	bne	r28, 20$
-
-;	Mval is a null string
-10$:	mov	1, r24
-	ret	r26
-
-;	Mval is not a null string
-20$:	clr	r24
-	ret	r26
-
-;	If undef_inhibit is set, then all undefined values are equal to the null string:
-30$:	ldq	r28, a_undef_inhibit
-	ldq_u	r24, (r28)
-	extbl	r24, r28, r24
-	bne	r24, 10$		; it's set;  treat mval as a null string
-
-;	It's not set, so issue a message:
-	lda	sp, -8(sp)	; but first,
-	stq	r26, (sp)	; save the return address
-	mov	r0, r16
-	$call	UNDERR, args=<r16>, set_arg_info=false, nonstandard=true
-
-	ldq	r26, (sp)	; restore our return address
-	lda	sp, 8(sp)
-
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/op_forlcldo.m64 b/sr_alpha/op_forlcldo.m64
deleted file mode 100644
index b88cdb3..0000000
--- a/sr_alpha/op_forlcldo.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	OP_FORLCLDO
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_FORLCLDOB, entry=OP_FORLCLDO_CA, aliases=<OP_FORLCLDOW,OP_FORLCLDOL>, kind=null
-	lda	sp, -16(sp)
-	stq	r13, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	EXFUN_FRAME, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-	ldl	r9, msf$temps_ptr_off(r12)
-
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 16(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/op_linestart.m64 b/sr_alpha/op_linestart.m64
deleted file mode 100644
index 725b26a..0000000
--- a/sr_alpha/op_linestart.m64
+++ /dev/null
@@ -1,24 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	op_linestart
-	G_MSF
-
-;	op_linestart - establish start of line in GT.M MUMPS stack frame
-
-	$routine	name=op_linestart,entry=op_linestart_ca,kind=null
-
-	stl	r26, msf$mpc_off(r12)
-	stl	r13, msf$ctxt_off(r12)
-
-	ret	r26
-
-	$end_routine	name=op_linestart
diff --git a/sr_alpha/op_pattern.m64 b/sr_alpha/op_pattern.m64
deleted file mode 100644
index 726f0d8..0000000
--- a/sr_alpha/op_pattern.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	OP_PATTERN
-
-	mval$def
-
-	$routine OP_PATTERN, entry=OP_PATTERN_CA, kind=null
-	lda	sp, -16(sp)
-	stq	r13, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mov	r0, r16
-	mov	r1, r17
-
-	;
-	; This is an array of unaligned ints. If the first word is zero, then call do_pattern
-	; instead of do_patfixed. Only the low order byte is significant and so it is the only
-	; one we need to test. We would do this in assembly because (1) we need the assmembly
-	; routine anyway to save the return value into $TEST and (2) it saves an extra level of
-	; call linkage at the C level to do the decision here.
-	;
-	ldl	r28, mval$a_straddr(r1)
-	ldq_u	r24, (r28)
-	extbl	r24, r28, r24
-	beq	r24, 20$
-
-10$:	$call	DO_PATFIXED, args=<r16, r17>, set_arg_info=false, nonstandard=true
-
-15$:	mov	r0, r24
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 16(sp)
-	ret	r26
-
-20$:	$call	DO_PATTERN, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	br	15$
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/op_sorts_after.m64 b/sr_alpha/op_sorts_after.m64
deleted file mode 100644
index d664244..0000000
--- a/sr_alpha/op_sorts_after.m64
+++ /dev/null
@@ -1,41 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	OP_SORTS_AFTER
-
-; On entry:
-;	r0 -> mval for left hand side
-;	r1 -> mval for right hand side
-;
-; On exit:
-;	r24 < 0  : lhs ']] rhs  (lhs ]] rhs is false)
-;	r24 = 0  : lhs  =  rhs  (lhs ]] rhs is false)
-;	r24 > 0  : lhs  ]] rhs  (lhs ]] rhs is true)
-
-
-	$routine OP_SORTS_AFTER, entry=OP_SORTS_AFTER_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r26, (sp)
-	.base	r27, $ls
-
-	mov	r0, r16
-	mov	r1, r17
-	$call	SORTS_AFTER, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	mov	r0, r24
-
-	ldq	r26, (sp)
-	lda	sp, 8(sp)
-
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/pseudo_ret.m64 b/sr_alpha/pseudo_ret.m64
deleted file mode 100644
index 3fa3e45..0000000
--- a/sr_alpha/pseudo_ret.m64
+++ /dev/null
@@ -1,37 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2001, 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	PSEUDO_RET
-
-;	PSEUDO_RET calls opp_ret (which doesn't return).  It executes in a
-;	GT.M MUMPS stack frame and is, in fact, normally entered via a
-;	getframe/ret instruction sequence.
-;
-;	entry:
-;		r13 -	address of PSEUDO_RET's procedure descriptor (not r27)
-;
-;	WARNING: because PSEUDO_RET is designed to be invoked from a GT.M
-;	MUMPS stack frame, it does not conform to the Alpha calling
-;	standard and cannot be invoked from any high-level language.  The
-;	invoker should load the address of PSEUDO_RET's procedure descriptor
-;	into r13, not r27.
-
-
-	$code_section
-
-	$routine	PSEUDO_RET, entry=PSEUDO_RET_CA, kind=null
-	.base	r13, $ls
-
-	$call	opp_ret, set_arg_info=false, nonstandard=true
-
-	$end_routine
-
-	.end
diff --git a/sr_alpha/zbreaksp.h b/sr_alpha/zbreaksp.h
deleted file mode 100644
index cc91060..0000000
--- a/sr_alpha/zbreaksp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-typedef unsigned short	zb_code;
-#define ZB_CODE_MASK	0xffff
-#define INST_TYPE	zb_code
-
-/* The ZBreak command operates by finding the generated code for the op_linestart or op_linefetch for the source
- * line in question and changing the offset in the transfer table load address instruction from the op_linestart or
- * op_linefetch offset to the appropriate zbreak functionality opcode offset.
- * In some platforms(IA64 and ZOS) since the INSTRUCTION LAYOUT is complex we need following
- * macros for instruction manipulation.
- *      EXTRACT_OFFSET_TO_M_OPCODE
- *      FIX_OFFSET_WITH_ZBREAK_OFFSET
- *      EXTRACT_AND_UPDATE_INST
- * These macros are called only when COMPLEX_INSTRUCTION_UPDATE is defined
- * If COMPLEX_INSTRUCTION_UPDATE is not defined portable code in the caller of these macros
- * is invoked.
- */
-#undef COMPLEX_INSTRUCTION_UPDATE
diff --git a/sr_avms/adawi.c b/sr_avms/adawi.c
deleted file mode 100644
index d76befb..0000000
--- a/sr_avms/adawi.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <builtins.h>
-
-/* __ADAWI on Alpha returns a simulated VAX PSL, NOT a value representing a condition code (-1, 0, or +1).
-   adawi is defined here as a static routine to convert the PSL to an appropriate value.   */
-int adawi(short x, short *y)
-{
-	int vax_psl = __ADAWI(x, y);
-	if (vax_psl & 4 /* Z bit */) return 0;
-	if (vax_psl & 8 /* N bit */) return -1;
-	return 1;
-}
diff --git a/sr_avms/aswp.m64 b/sr_avms/aswp.m64
deleted file mode 100644
index df13826..0000000
--- a/sr_avms/aswp.m64
+++ /dev/null
@@ -1,14 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-GTMSHR_ASWP = 1
-
-.INCLUDE "gtm$src:aswp_src.h"
diff --git a/sr_avms/aswp_secshr.m64 b/sr_avms/aswp_secshr.m64
deleted file mode 100644
index 5f4845b..0000000
--- a/sr_avms/aswp_secshr.m64
+++ /dev/null
@@ -1,14 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-GTMSECSHR_ASWP = 1
-
-.INCLUDE "gtm$src:aswp_src.h"
diff --git a/sr_avms/aswp_src.h b/sr_avms/aswp_src.h
deleted file mode 100644
index 5dd6d5a..0000000
--- a/sr_avms/aswp_src.h
+++ /dev/null
@@ -1,85 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-; Atomic swap operation
-;  int aswp(int *loc, int value)
-;
-; set *loc to value and return the old value of *loc,
-; in the equivalent of one atomic operation.
-;
-
-.IF DEFINED GTMSHR_ASWP
-
-	.title	ASWP
-
-	$routine ASWP, entry=ASWP_CA, kind=null
-.ELSE
-.IF DEFINED GTMSECSHR_ASWP
-
-	.title	ASWP_SECSHR
-
-	$routine ASWP_SECSHR, entry=ASWP_SECSHR_CA, kind=null
-.ELSE
-.ERROR "Unsupported Image"
-.ENDC
-.ENDC
-
-RETRY_COUNT = 1024	; of times to attempt swap before sleeping
-SLEEP_TIME = 500	; 1/2 ms
-stack_size = 32
-
-	lda	sp, -stack_size(sp)
-	stq	r26,0(sp)
-	stq	r16,8(sp)			; loc
-	stq	r17,16(sp)			; value
-	.base	r27, $ls
-
-	mov	RETRY_COUNT,r23
-
-; Make sure we know what we're about to pick up.
-	mb
-
-; the ldl_l/stl_c combination detects whether the location has been modified
-; in between load and store.
-retry:	ldl_l	r22,(r16)
-	mov	r22, r0
-	mov	r17, r22
-	stl_c	r22,(r16)
-; r22 == 0:  unsuccessful, retry operation
-; r22 == 1:  successful swap
-	beq	r22,store_failed
-
-; Make sure what we put down is really there..
-	mb
-
-; Return...
-	ldq	r26,0(sp)
-	lda	sp, stack_size(sp)
-	ret	(r26)
-
-; retry operation immediately unless we've retried too many times.  In that
-; case hibernate for a short while defined above.
-store_failed:
-	subq	r23,1,r23
-	bne	r23,retry
-.IF DEFINED GTMSHR_ASWP
-; for GTMSECSHR, we do not sleep - not a good idea in privileged mode
-	mov	SLEEP_TIME,r16
-	$call	HIBER_START, args=<r16>, set_arg_info=false, nonstandard=true
-.ENDC
-	mov	RETRY_COUNT,r23
-	ldq	r16,8(sp)
-	ldq	r17,16(sp)
-	br	retry
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/auto_zlink.c b/sr_avms/auto_zlink.c
deleted file mode 100644
index 80e11cf..0000000
--- a/sr_avms/auto_zlink.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "axp_registers.h"
-#include "axp_gtm_registers.h"
-#include "axp.h"
-#include "urx.h"
-#include <rtnhdr.h>
-#include "stack_frame.h"
-#include "op.h"
-#include <auto_zlink.h>
-
-#define INST_SZ	1
-
-#define LDQ_R17_OFF	((-5)*INST_SZ)
-#define LDQ_R16_OFF	((-4)*INST_SZ)
-#define LDL_R27_OFF	((-3)*INST_SZ)
-#define LDQ_R26_OFF	((-2)*INST_SZ)
-#define JMP_R26_OFF	((-1)*INST_SZ)
-
-#define LDQ_R17_X2_R13	(ALPHA_INS_LDQ  |  (ALPHA_REG_A1 << ALPHA_SHIFT_RA)  |  (GTM_REG_PV << ALPHA_SHIFT_RB))
-#define LDQ_R16_X1_R13	(ALPHA_INS_LDQ  |  (ALPHA_REG_A0 << ALPHA_SHIFT_RA)  |  (GTM_REG_PV << ALPHA_SHIFT_RB))
-#define LDL_R27_XF_R11	(ALPHA_INS_LDL  |  (ALPHA_REG_PV << ALPHA_SHIFT_RA)  |  (GTM_REG_XFER_TABLE << ALPHA_SHIFT_RB))
-#define LDQ_R26_8_R27	(ALPHA_INS_LDQ  |  (ALPHA_REG_RA << ALPHA_SHIFT_RA)  |  (ALPHA_REG_PV << ALPHA_SHIFT_RB)  \
-					|  (8 << ALPHA_SHIFT_DISP))
-#define JMP_R26_R26	(ALPHA_INS_JSR  |  (ALPHA_REG_RA << ALPHA_SHIFT_RA)  |  (ALPHA_REG_RA << ALPHA_SHIFT_RB))
-
-GBLREF stack_frame	*frame_pointer;
-
-error_def(ERR_LABELUNKNOWN);
-error_def(ERR_ROUTINEUNKNOWN);
-
-rhdtyp *auto_zlink(uint4 *pc, uint4 *line)
-{
-	uint4		*A_proc_desc, *A_labaddr;
-	mstr		rname;
-	mval		rtn;
-	rhdtyp		*rhead;
-	urx_rtnref	*rtnurx;
-	mident_fixed	rname_local;
-
-/* ASSUMPTION	The instructions immediately preceding the current mpc form a transfer table call.
- *		There will be two arguments to this call:
- *			the address of a procedure descriptor and
- *			the address of a pointer to a value which is the offset from the beginning of the routine header to
- *				the address of the first instruction to be executed in the routine to be called, as specified
- *				by the [label][+offset] field (or the beginning of the routine if label and offset are not
- *				specified
- *
- *		The entire instruction sequence will look like this:
- *			ldq	r17, x2(r13)
- *			ldq	r16, x1(r13)
- *			ldl	r27, 4*xf_off(r11)
- *			ldq	r26, 8(r27)
- *			jmp	r26, (r26)
- *
- *		N.B., the instruction sequence above occurs in compiled object modules; in direct mode, the argument
- *		registers are loaded via "ldl" instructions.  However, this routine should never be invoked from direct
- *		mode because the applicable routine should have been ZLINK'ed by prior calls to op_labaddr and op_rhdaddr.
- */
-
-	/* Verify calling sequence. */
-	if (   (*(pc + LDQ_R17_OFF) & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)) != LDQ_R17_X2_R13
-	    || (*(pc + LDQ_R16_OFF) & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)) != LDQ_R16_X1_R13
-	    || (*(pc + LDL_R27_OFF) & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)) != LDL_R27_XF_R11
-	    || (*(pc + LDQ_R26_OFF) != LDQ_R26_8_R27)
-	    || (*(pc + JMP_R26_OFF) != JMP_R26_R26)							)
-		GTMASSERT;
-	/* Calling sequence O.K.; get address(address(procedure descriptor)) and address(address(label offset)).  */
-	A_proc_desc = (*(pc + LDQ_R16_OFF) & (ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)) + frame_pointer->ctxt;
-	A_labaddr   = (*(pc + LDQ_R17_OFF) & (ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)) + frame_pointer->ctxt;
-	if (azl_geturxrtn(A_proc_desc, &rname, &rtnurx))
-	{
-		assert(rname.len <= MAX_MIDENT_LEN);
-		assert(0 != rname.addr);
-
-		/* Copy rname into local storage because azl_geturxrtn sets rname.addr to an address that is
-		 * free'd during op_zlink and before the call to find_rtn_hdr.
-		 */
-                memcpy(rname_local.c, rname.addr, rname.len);
-                rname.addr = rname_local.c;
-		assert(0 != rtnurx);
-		assert(azl_geturxlab(A_labaddr, rtnurx));
-		assert(0 == find_rtn_hdr(&rname));
-		rtn.mvtype = MV_STR;
-		rtn.str.len = rname.len;
-		rtn.str.addr = rname.addr;
-		op_zlink(&rtn, 0);
-		if (0 != (rhead = find_rtn_hdr(&rname)))
-		{
-			*line = *A_labaddr;
-			if (0 == *line)
-				rts_error(VARLSTCNT(1) ERR_LABELUNKNOWN);
-			return rhead;
-		}
-	}
-	rts_error(VARLSTCNT(1) ERR_ROUTINEUNKNOWN);
-}
diff --git a/sr_avms/auto_zlink.h b/sr_avms/auto_zlink.h
deleted file mode 100644
index a93ad3d..0000000
--- a/sr_avms/auto_zlink.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __AUTO_ZLINK_H__
-#define __AUTO_ZLINK_H__
-
-rhdtyp *auto_zlink(uint4 *pc, uint4 *line);
-
-#endif
diff --git a/sr_avms/axp_gtm_registers.h b/sr_avms/axp_gtm_registers.h
deleted file mode 100644
index 1a74097..0000000
--- a/sr_avms/axp_gtm_registers.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*	axp_gtm_registers.h - GT.M OpenVMS AXP register usage.
- *
- *	Requires "axp_registers.h".
- *
- */
-
-
-#define GTM_REG_FRAME_POINTER	ALPHA_REG_S10		/* r12 */
-#define GTM_REG_FRAME_VAR_PTR	ALPHA_REG_S6		/* r8  */
-#define GTM_REG_FRAME_TMP_PTR	ALPHA_REG_S7		/* r9  */
-#define GTM_REG_LITERAL_BASE	ALPHA_REG_S12		/* r14 */
-#define GTM_REG_XFER_TABLE	ALPHA_REG_S9		/* r11 */
-#define GTM_REG_DOLLAR_TRUTH	ALPHA_REG_S8		/* r10 */
-
-#define	GTM_REG_R0		ALPHA_REG_R0
-#define	GTM_REG_R1		ALPHA_REG_R1
-
-#define GTM_REG_ACCUM		ALPHA_REG_T1		/* r23 */
-#define GTM_REG_COND_CODE	ALPHA_REG_T2		/* r24 */
-#define GTM_REG_CODEGEN_TEMP	ALPHA_REG_VS		/* r28 */
-
-
-/*	The generated code uses GTM_REG_PV for its PV.  Also, the VAX Macro
- *	translator uses S11 (R13) to save the current PV.  So, for consistency,
- *	we make the GTM PV the same (S11).  In addition, when returning from
- *	C, we usually reload the PV of the procedure to which we are returning
- *	into S11 where it is expected (from the Mumps stack frame).  In some
- *	routines (OPP_RET, for example), we intend to "return" to a new procedure
- *	and enter it via its prolog: in that case, we need to set the PV into
- *	R27, the Alpha PV register.
- */
-
-#define	GTM_REG_PV		ALPHA_REG_S11		/* r13 */
diff --git a/sr_avms/axp_registers.h b/sr_avms/axp_registers.h
deleted file mode 100644
index ce96ddd..0000000
--- a/sr_avms/axp_registers.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*	axp_registers.h - OpenVMS AXP register usage.  */
-
-
-/*	Register names according to OpenVMS usage.  */
-
-#define ALPHA_REG_R0	0	/* corresponds to VAX register r0 */
-#define ALPHA_REG_R1	1	/* corresponds to VAX register r1 */
-#define	ALPHA_REG_S0	2	/* saved */
-#define	ALPHA_REG_S1	3
-#define	ALPHA_REG_S2	4
-#define	ALPHA_REG_S3	5
-#define	ALPHA_REG_S4	6
-#define	ALPHA_REG_S5	7
-#define	ALPHA_REG_S6	8
-#define	ALPHA_REG_S7	9
-#define	ALPHA_REG_S8	10
-#define	ALPHA_REG_S9	11
-#define	ALPHA_REG_S10	12
-#define	ALPHA_REG_S11	13
-#define	ALPHA_REG_S12	14
-#define	ALPHA_REG_S13	15
-#define	ALPHA_REG_A0	16	/* argument */
-#define	ALPHA_REG_A1	17
-#define	ALPHA_REG_A2	18
-#define	ALPHA_REG_A3	19
-#define	ALPHA_REG_A4	20
-#define	ALPHA_REG_A5	21
-#define	ALPHA_REG_T0	22	/* temp */
-#define	ALPHA_REG_T1	23
-#define	ALPHA_REG_T2	24
-#define	ALPHA_REG_AI	25	/* arg info */
-#define	ALPHA_REG_RA	26	/* return address */
-#define	ALPHA_REG_PV	27	/* procedure value */
-#define	ALPHA_REG_VS	28	/* volatile scratch */
-#define	ALPHA_REG_FP	29	/* frame pointer */
-#define	ALPHA_REG_SP	30	/* stack pointer */
-#define ALPHA_REG_ZERO	31	/* hard-wired zero */
-
-#define	ALPHA_REG_V0	ALPHA_REG_R0	/* function return value */
-
-
-/*	Number of arguments passed in registers.  */
-
-#define MACHINE_REG_ARGS	6
-
diff --git a/sr_avms/base_frame.max b/sr_avms/base_frame.max
deleted file mode 100644
index 1e3ca12..0000000
--- a/sr_avms/base_frame.max
+++ /dev/null
@@ -1,168 +0,0 @@
-	.macro	base_frame
-
-;	base_frame describes the machine stack frame in which all GT.M MUMPS object code
-;	executes.  It has a fixed stack size large enough for the saved registers and
-;	the condition handler address as expected by GTM$DYN_CH.  In addition, there is
-;	a stack temporary area large enough for the largest allowable number of parameters
-;	(limited by the VAX 'calls' instruction whose count parameter must be <= 255).
-
-;	Stack size information.  These fields MUST match values in create_object_file() in
-;	obj_file.c.  Changes to any of these values will require customers both to recompile
-;	their GT.M source files and to re-link the new object files.
-
-;	Note: the intricacy of the offset calculations is required in order to duplicate
-;	the structure expected by the $routine and $return macros which require certain
-;	blocks of data in a stack frame to be aligned on 16-byte boundaries.
-
-NQUADS_REQUIRED	=	2		; one at (sp) for r27 and one at 8(sp) for A(condition handler)
-NLOCALS		=	16		; allows room for expansion
-base_frame_regs	=	"r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, fp"
-NREGS_SAVED	=	16		; <r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,fp> and r26 (default)
-NARGS_SAVED	=	<1+6>		; r25 (count) and r16-r21
-RSA_END		=	<<<<<NQUADS_REQUIRED+NLOCALS+NREGS_SAVED>*8>+15>/16>*16>	; end of register save area
-RSA_OFFSET	=	<RSA_END-<NREGS_SAVED*8>>
-STACK_SIZE	=	<<<RSA_END+<NARGS_SAVED*8>+15>/16>*16>	; add room for argument save area (round up again)
-ARG_OFFSET	=	<STACK_SIZE-<NARGS_SAVED*8>>		; offset of r25, r16-r21 save area in stack frame
-
-;	Offsets from fp into stack frame for locals:
-GTM_LOCAL_1	=	16
-GTM_LOCAL_2	=	24
-GTM_LOCAL_3	=	32
-GTM_LOCAL_4	=	40
-GTM_LOCAL_5	=	48
-GTM_LOCAL_6	=	56
-GTM_LOCAL_7	=	64
-GTM_LOCAL_8	=	72
-GTM_LOCAL_9	=	80
-GTM_LOCAL_10	=	88
-GTM_LOCAL_11	=	96
-GTM_LOCAL_12	=	104
-GTM_LOCAL_13	=	112
-GTM_LOCAL_14	=	120
-GTM_LOCAL_15	=	128
-GTM_LOCAL_16	=	136
-
-GTM_LOCAL_SIZE	=	GTM_LOCAL_16+8
-
-;	Stack extension area for building argument lists for calling other routines and for internal use.
-ARG_AREA_SZ	=	256*8		; room for 256 arguments + 6 extra quadwords.  The VAX 'calls' instruction allows a maximum
-					; of 255 arguments and we pass the count as an argument sometimes, but because the AXP
-					; passes the first six arguments and the argument count in registers, we only need 250
-					; locations for argument-passing and the other 6 quadwords are available for internal
-					; GT.M use.
-
-;	Offsets from fp into stack extension area for internal use-quadwords (hidden locals):
-GTM_INTERNAL_1	=	-1*8
-GTM_INTERNAL_2	=	-2*8
-GTM_INTERNAL_3	=	-3*8
-GTM_INTERNAL_4	=	-4*8
-GTM_INTERNAL_5	=	-5*8
-GTM_INTERNAL_6	=	-6*8
-
-;	Here's the stack frame defined by base_frame and created by create_base_frame:
-
-
-;			+---------------------------------------+	<- caller's sp 		-----
-;			|	r21	(argument 6)		|\	  (Q-aligned)		  ^
-;			+---------------------------------------+ \				  |
-;			|	r20	(argument 5)		|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r19	(argument 4)		|  |				  |
-;			+---------------------------------------+  |	home area for arguments	  |
-;			|	r18	(argument 3)		|  |---	passed in registers; must |
-;			+---------------------------------------+  |	be contiguous with	  |
-;			|	r17	(argument 2)		|  |	caller's sp for varargs	  |
-;			+---------------------------------------+  |	to work			  |
-;			|	r16	(argument 1)		|  |				  |
-;			+---------------------------------------+ /				  |
-;			|	r25	(argument info/count)	|/				  |
-;			+---------------------------------------+				  |
-;			=	<probable alignment padding>	=				  |
-;	fp+RSA_END->	+---------------------------------------+	(Q-aligned)		  |
-;			|	fp				|\				  |
-;			+---------------------------------------+ \				  |
-;			|	r15				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r14				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r13				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r12				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r11				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r10				|  |				  |
-;			+---------------------------------------+  |---	saved registers		  |
-;			|	r9				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r8				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r7				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r6				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r5				|  |				  |
-;			+---------------------------------------+  |				  |
-;			|	r4				|  |				  |
-;			+---------------------------------------+  |				  |--- STACK_SIZE
-;			|	r3				|  |				  |
-;			+---------------------------------------+ /				  |
-;			|	r2				|/				  |
-;	fp+RSA_OFFSET-> +---------------------------------------+				  |
-;			=	<possible alignment padding>	=				  |
-;			+---------------------------------------+				  |
-;	fp+136		|	GTM_LOCAL_16			|				  |
-;			+---------------------------------------+				  |
-;	fp+128		|	GTM_LOCAL_15			|				  |
-;			+---------------------------------------+				  |
-;	fp+120		|	GTM_LOCAL_14			|				  |
-;			+---------------------------------------+				  |
-;	fp+112		|	GTM_LOCAL_13			|				  |
-;			+---------------------------------------+				  |
-;	fp+104		|	GTM_LOCAL_12			|				  |
-;			+---------------------------------------+				  |
-;	fp+96		|	GTM_LOCAL_11			|				  |
-;			+---------------------------------------+				  |
-;	fp+88		|	GTM_LOCAL_10			|				  |
-;			+---------------------------------------+				  |
-;	fp+80		|	GTM_LOCAL_9			|				  |
-;			+---------------------------------------+				  |
-;	fp+72		|	GTM_LOCAL_8			|				  |
-;			+---------------------------------------+				  |
-;	fp+64		|	GTM_LOCAL_7			|				  |
-;			+---------------------------------------+				  |
-;	fp+56		|	GTM_LOCAL_6			|				  |
-;			+---------------------------------------+				  |
-;	fp+48		|	GTM_LOCAL_5			|				  |
-;			+---------------------------------------+				  |
-;	fp+40		|	GTM_LOCAL_4			|				  |
-;			+---------------------------------------+				  |
-;	fp+32		|	GTM_LOCAL_3			|				  |
-;			+---------------------------------------+				  |
-;	fp+24		|	GTM_LOCAL_2			|				  |
-;			+---------------------------------------+				  |
-;	fp+16		|	GTM_LOCAL_1			|				  |
-;			+---------------------------------------+				  |
-;	fp+8		|	A(condition handler)		|	GTM$DYN_CH looks here	  |
-;			+---------------------------------------+	(0 => no handler)	  |
-;			|	r27 (PV)			|				  v
-;			+---------------------------------------+	<- fp (Q-aligned)	-----
-;	fp-8		|	GTM_INTERNAL_1			|\				  ^
-;			+---------------------------------------+ \				  |
-;	fp-16		|	GTM_INTERNAL_2			|  |				  |
-;			+---------------------------------------+  |				  |
-;	fp-24		|	GTM_INTERNAL_3			|  |				  |
-;			+---------------------------------------+  |---	internal-use quadwords	  |
-;	fp-32		|	GTM_INTERNAL_4			|  |	(hidden locals)		  |--- ARG_AREA_SZ
-;			+---------------------------------------+  |				  |
-;	fp-40		|	GTM_INTERNAL_5			|  |				  |
-;			+---------------------------------------+ /				  |
-;	fp-48		|	GTM_INTERNAL_6			|/				  |
-;			+---------------------------------------+				  |
-;			=	<argument build area>		=				  |
-;			|	(room for 250 arguments)	|				  |
-;			=					=				  V
-;	fp-ARG_AREA_SZ	+---------------------------------------+	<- sp (Q-aligned)	-----
-
-
-	.endm	base_frame
diff --git a/sr_avms/bci.mar b/sr_avms/bci.mar
deleted file mode 100644
index f727382..0000000
--- a/sr_avms/bci.mar
+++ /dev/null
@@ -1,9 +0,0 @@
-	.title	bci	bit clear interlocked
-VAX	=	1
-	code_psect
-	.entry	bci,^m<>
-	clrl	r0
-	bbcci	#0, at 4(ap),10$
-	incl	r0
-10$:	ret
-	.end
diff --git a/sr_avms/bind_symbol.m64 b/sr_avms/bind_symbol.m64
deleted file mode 100644
index 8b85bdd..0000000
--- a/sr_avms/bind_symbol.m64
+++ /dev/null
@@ -1,32 +0,0 @@
-	.title	BIND_SYMBOL  "Utility routine for bndsym macro"
-
-	$routine BIND_SYMBOL, entry=BIND_SYMBOL_CA, kind=null
-	lda	sp, -32(sp)
-	stq	r13, 24(sp)
-	stq	r26, 16(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	stq	r18, 8(sp)	; save pointer to linkage pair
-
-	$call	LIB$FIND_IMAGE_SYMBOL, args=<r16,r17,sp>, nonstandard=true
-	blbc	r0, 10$
-
-	ldq	r18, 8(sp)	; r18 -> linkage pair
-	ldl	r28, (sp)	; r28 = procedure value returned by LIB$FIND_IMAGE_SYMBOL
-	stq	r28, 8(r18)	; store PV in 2nd quadword of linkage pair
-	ldq	r28, 8(r28)	; r28 = entry address from procedure descriptor
-	stq	r28, (r18)	; store entry in 1st quadword of linkage pair
-
-5$:	ldq	r28, 16(sp)
-	ldq	r13, 24(sp)
-	lda	sp, 32(sp)
-	ret	r28
-
-10$:	mov	r0, r16
-	$call	LIB$SIGNAL, args=<r16>, nonstandard=true
-	br	5$
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/bndsym.max b/sr_avms/bndsym.max
deleted file mode 100644
index e484b04..0000000
--- a/sr_avms/bndsym.max
+++ /dev/null
@@ -1,70 +0,0 @@
-	.macro	bndsym	symbol, image, ?entry_point, ?proc_value, ?symdesc, ?imdesc
-
-;	Bind a universal symbol at run time
-
-
-	$routine symbol, entry=symbol'_CA, kind=null, -
-		data_section=<$bndsym_data,pic,noexe>, data_section_pointer=true
-
-	$data_section
-
-	.align	quad
-entry_point:	.quad	0	; entry_point and proc_value together
-proc_value:	.quad	0	;  define a linkage pair
-
-	.align	long
-symdesc:	.ascid	/symbol/
-
-	.align	long
-imdesc:		.ascid	/image/
-
-
-	$code_section
-
-	.base	r27, $ls
-
-	ldq	r22, $dp
-	.base	r22, $ds
-
-	ldq	r28, entry_point
-	beq	r28, 10$
-
-	ldq	r27, proc_value
-	jmp	r28
-
-
-; Call BIND_SYMBOL to resolve the symbol's address, then jmp to it.
-; This must be transparent, so save (and restore) all of the
-; argument-related registers, as well as the original return address.
-
-10$:	lda	sp, -80(sp)
-	stq	r16,  0(sp)
-	stq	r17,  8(sp)
-	stq	r18, 16(sp)
-	stq	r19, 24(sp)
-	stq	r20, 32(sp)
-	stq	r21, 40(sp)
-	stq	r22, 48(sp)	; data section base register
-	stq	r25, 56(sp)	; original argument count
-	stq	r26, 64(sp)	; original return address
-
-	$call	BIND_SYMBOL, args=<imdesc/a, symdesc/a, entry_point/a>, nonstandard=true
-
-	ldq	r16,  0(sp)
-	ldq	r17,  8(sp)
-	ldq	r18, 16(sp)
-	ldq	r19, 24(sp)
-	ldq	r20, 32(sp)
-	ldq	r21, 40(sp)
-	ldq	r22, 48(sp)
-	ldq	r25, 56(sp)
-	ldq	r26, 64(sp)
-	lda	sp,  80(sp)
-
-	ldq	r28, entry_point
-	ldq	r27, proc_value
-	jmp	r28
-
-	$end_routine
-
-	.endm
diff --git a/sr_avms/bsi.mar b/sr_avms/bsi.mar
deleted file mode 100644
index 6fc5642..0000000
--- a/sr_avms/bsi.mar
+++ /dev/null
@@ -1,11 +0,0 @@
-	.title	bsi	bit set interlocked
-VAX	=	1
-	code_psect
-	.entry	bsi,^m<>
-	clrl	r0
-	bbssi	#0, at 4(ap),10$
-	ret
-
-10$:	incl	r0
-	ret
-	.end
diff --git a/sr_avms/call_dm.m64 b/sr_avms/call_dm.m64
deleted file mode 100644
index 42a1dea..0000000
--- a/sr_avms/call_dm.m64
+++ /dev/null
@@ -1,33 +0,0 @@
-	.title	CALL_DM
-
-;	CALL_DM - call direct mode
-;
-;	CALL_DM controls execution of GT.M direct mode.  It executes in a
-;	GT.M MUMPS stack frame and is, in fact, normally entered via a
-;	getframe/ret instruction sequence.  CALL_DM invokes OPP_DMODE
-;	for each input line.
-;
-;	entry:
-;		r13 -	address of CALL_DM's procedure descriptor (not r27)
-;
-;	WARNING: because CALL_DM is designed to be invoked from a GT.M
-;	MUMPS stack frame, it does not conform to the Alpha calling
-;	standard and cannot be invoked from any high-level language.
-;	The invoker should load the address of PSEUDO_RET's procedure
-;	descriptor into r13, not r27.
-
-	$linkage_section
-
-	$code_section
-
-	$routine CALL_DM, entry=CALL_DM_CA, kind=null
-
-	.base	r13, $ls
-
-loop:	$call	OPP_DMODE, nonstandard=true
-	$call	OP_OLDVAR, nonstandard=true
-	br	loop
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/caller_id.m64 b/sr_avms/caller_id.m64
deleted file mode 100644
index b5b9d15..0000000
--- a/sr_avms/caller_id.m64
+++ /dev/null
@@ -1,18 +0,0 @@
-	.title	CALLER_ID	"Get PC of caller's caller"
-
-	$LIBICBDEF
-
-	$routine CALLER_ID, entry=CALLER_ID_CA, kind=stack, saved_regs=<r13,fp>
-	mov	r27, r13
-	.base	r13, $ls
-
-	lda	sp, -LIBICB$K_INVO_CONTEXT_BLK_SIZE(sp)	; Allocate an Invocation Context Block
-	$call	LIB$GET_CURR_INVO_CONTEXT, args=<sp>	; Get our invocation context
-	$call	LIB$GET_PREV_INVO_CONTEXT, args=<sp>	; Get our caller's invocation context
-	$call	LIB$GET_PREV_INVO_CONTEXT, args=<sp>	; Get our caller's caller's invocation context
-	ldq	r0, LIBICB$Q_PROGRAM_COUNTER(sp)	; Extract its PC
-	$return
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/callg.mar b/sr_avms/callg.mar
deleted file mode 100644
index 367b0e6..0000000
--- a/sr_avms/callg.mar
+++ /dev/null
@@ -1,12 +0,0 @@
-	.title callg
-
-	;callg(rout, args)
-
-VAX	=	1
-	code_psect
-	.entry	callg,^m<>
-	movl	8(ap),r0
-	callg	(r0), at 4(ap)
-	ret
-
-	.end
diff --git a/sr_avms/cmi_symbols.m64 b/sr_avms/cmi_symbols.m64
deleted file mode 100644
index fd4eac9..0000000
--- a/sr_avms/cmi_symbols.m64
+++ /dev/null
@@ -1,13 +0,0 @@
-	.title	CMI_SYMBOLS  "Bind CMISHR at run time"
-
-	bndsym	CMI_CLOSE,	CMISHR
-	bndsym	CMI_INIT,	CMISHR
-	bndsym	CMI_OPEN,	CMISHR
-	bndsym	CMI_READ,	CMISHR
-	bndsym	CMI_WRITE,	CMISHR
-	bndsym	CMI_WRITE_INT,	CMISHR
-	bndsym	CMU_GETCLB,	CMISHR
-	bndsym	CMU_MAKCLB,	CMISHR
-	bndsym	CMU_NTDROOT,	CMISHR
-
-	.end
diff --git a/sr_avms/cmilink.axp b/sr_avms/cmilink.axp
deleted file mode 100644
index a2dd5c3..0000000
--- a/sr_avms/cmilink.axp
+++ /dev/null
@@ -1,28 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-cluster = code_clust
-collect = code_clust,$code
-psect_attr = $char_string_constants,shr,nowrt
-cluster = gtmvector
-collect = gtmvector,gtmvector
-gsmatch = lequal,4,0
-symbol_vector=( -
-	cmi_close	= PROCEDURE, -
-	cmi_init	= PROCEDURE, -
-	cmi_open	= PROCEDURE, -
-	cmi_read	= PROCEDURE, -
-	cmi_write	= PROCEDURE, -
-	cmi_write_int	= PROCEDURE, -
-	cmu_makclb	= PROCEDURE, -
-	cmu_getclb	= PROCEDURE, -
-	cmu_ntdroot	= PROCEDURE -
-	)
diff --git a/sr_avms/code_psect.max b/sr_avms/code_psect.max
deleted file mode 100644
index 69e30b7..0000000
--- a/sr_avms/code_psect.max
+++ /dev/null
@@ -1,3 +0,0 @@
-	.macro code_psect
-	.psect	$code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec
-	.endm
diff --git a/sr_avms/compswap.m64 b/sr_avms/compswap.m64
deleted file mode 100644
index 0552bd6..0000000
--- a/sr_avms/compswap.m64
+++ /dev/null
@@ -1,14 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-GTMSHR_COMPSWAP = 1
-
-.INCLUDE "gtm$src:compswap_src.h"
diff --git a/sr_avms/compswap_secshr.m64 b/sr_avms/compswap_secshr.m64
deleted file mode 100644
index b56eb11..0000000
--- a/sr_avms/compswap_secshr.m64
+++ /dev/null
@@ -1,14 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-GTMSECSHR_COMPSWAP = 1
-
-.INCLUDE "gtm$src:compswap_src.h"
diff --git a/sr_avms/compswap_src.h b/sr_avms/compswap_src.h
deleted file mode 100644
index 522c98b..0000000
--- a/sr_avms/compswap_src.h
+++ /dev/null
@@ -1,104 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-; Compare and Swap
-;  int compswap(gtm_global_latch_t *loc, int cmpvalue1, int cmpvalue2, int newvalue1, int newvalue2)
-;
-; For VMS, the latch is the form of an aligned 8 byte field. The comparison value is
-; constructed from (cmpvalue2 << 32 | cmpvalue1) and likewise the swap value
-; is constructed from (newvalue2 << 32 | cmpvalue1). If the supplied latch contains
-; the constructed comparison value, the constructed swap value is stored in the latch atomically.
-; Return TRUE if store succeeds and lock reset. Otherwise return FALSE.
-
-.IF DEFINED GTMSHR_COMPSWAP
-
-	.title	COMPSWAP
-
-	$routine COMPSWAP, entry=COMPSWAP_CA, kind=null
-.ELSE
-.IF DEFINED GTMSECSHR_COMPSWAP
-
-	.title	COMPSWAP_SECSHR
-
-	$routine COMPSWAP_SECSHR, entry=COMPSWAP_SECSHR_CA, kind=null
-.ELSE
-.ERROR "Unsupported image"
-.ENDC
-.ENDC
-
-RETRY_COUNT = 1000	; of times to attempts before sleeping
-SLEEP_TIME = 500	; 1/2 ms
-TRUE = 1
-FALSE = 0
-stack_size = 56
-
-	lda	sp, -stack_size(sp)
-	stq	r26, 0(sp)
-	stq	r16, 8(sp)			; ->loc
-	stq	r17, 16(sp)			; cmpvalue1
-	stq	r18, 24(sp)			; cmpvalue2
-	stq	r19, 32(sp)			; newvalue1
-	stq	r20, 40(sp)			; newvalue2
-	.base	r27, $ls
-
-	mov	RETRY_COUNT, r24
-
-; Make sure we know what we are about to pick up.
-	mb
-
-; the ldl_l/stl_c combination detects whether the location has been modified
-; in between load and store.
-	mov	FALSE,r0			; assume failure
-retry:
-	sll	r18, 32, r21			; r21 = r18 << 32
-	bis	r21, r17, r21			; add in low order part of comparison value
-	ldq_l	r22, (r16)			; load and lock the value
-	cmpeq	r22, r21, r23			; expected value supplied?
-	beq	r23, return_now			; return fact that compare failed
-	sll	r20, 32, r21			; create 8 byte swap value
-	bis	r21, r19, r21
-	stq_c	r21, (r16)			; store and return
-; r22 == 0:  unsuccessful, retry operation
-; r22 == 1:  successful swap
-	beq	r21, store_failed
-
-; Make sure what we put down is really there..
-	mb
-	mov	TRUE,r0				; Store was a success
-return_now:					; both error and normal return
-	ldq	r26,0(sp)
-	lda	sp, stack_size(sp)
-	ret	(r26)
-
-
-; retry operation immediately unless we have retried too many times.  In that
-; case hibernate for a short period..
-store_failed:
-	subq	r24, 1, r24
-	bne	r24, retry
-.IF DEFINED GTMSHR_COMPSWAP
-; for GTMSECSHR, we do not sleep - not a good idea in privileged mode
-	mov	SLEEP_TIME, r16
-	$call	HIBER_START, args=<r16>, set_arg_info=false, nonstandard=true
-.ENDC
-	mov	RETRY_COUNT,r24
-	ldq	r16, 8(sp)
-	ldq	r17, 16(sp)
-	ldq	r18, 24(sp)
-        ldq	r19, 32(sp)
-        ldq	r20, 40(sp)
-	mov	FALSE, r0
-	br	retry
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/create_base_frame.max b/sr_avms/create_base_frame.max
deleted file mode 100644
index f6762a6..0000000
--- a/sr_avms/create_base_frame.max
+++ /dev/null
@@ -1,51 +0,0 @@
-	.macro	create_base_frame
-
-;	create_base_frame is the routine prologue code that sets up the machine
-;	stack frame in which all GT.M MUMPS object code executes.
-
-	.if	ne,$SIZE,STACK_SIZE
-		.error	"The stack frame size computed by $routine (%integer(%SIZE)) differs from that defined in the -
-base_frame macro (%integer(STACK_SIZE))."
-	.endc
-
-	.if	ne,$SIZE-56,ARG_OFFSET
-		.error	"The homed argument list offset computed by $routine (%integer($SIZE-56)) differs from -
-that expected (%integer(ARG_OFFSET))."
-	.endc
-
-	lda	sp,  -$SIZE(sp)
-	stq	r27, (sp)		; linkage Psect pointer
-	stq	r26, $RSA_OFFSET(sp)
-	stq	r2,  $RSA_OFFSET+8(sp)
-     	stq	r3,  $RSA_OFFSET+16(sp)
-	stq	r4,  $RSA_OFFSET+24(sp)
-	stq	r5,  $RSA_OFFSET+32(sp)
-	stq	r6,  $RSA_OFFSET+40(sp)
-	stq	r7,  $RSA_OFFSET+48(sp)
-	stq	r8,  $RSA_OFFSET+56(sp)
-	stq	r9,  $RSA_OFFSET+64(sp)
-	stq	r10, $RSA_OFFSET+72(sp)
-	stq	r11, $RSA_OFFSET+80(sp)
-	stq	r12, $RSA_OFFSET+88(sp)
-	stq	r13, $RSA_OFFSET+96(sp)
-	stq	r14, $RSA_OFFSET+104(sp)
-	stq	r15, $RSA_OFFSET+112(sp)
-	stq	fp,  $RSA_OFFSET+120(sp)
-	stq	r31, 8(sp)		; establish no condition handler
-
-;	Copy the register arguments onto the stack (a la varargs).
-	stq	r21, $SIZE-8(sp)
-	stq	r20, $SIZE-16(sp)
-	stq	r19, $SIZE-24(sp)
-	stq	r18, $SIZE-32(sp)
-	stq	r17, $SIZE-40(sp)
-	stq	r16, $SIZE-48(sp)
-	stq	r25, $SIZE-56(sp)
-
-	trapb				; synchronize exceptions
-	mov	sp,  fp			; establish existence of stack frame
-$end_prologue
-
-	lda	sp,  -ARG_AREA_SZ(sp)	; extend for argument push area
-
-	.endm	create_base_frame
diff --git a/sr_avms/data_psect_bound.m64 b/sr_avms/data_psect_bound.m64
deleted file mode 100644
index b4eeb0e..0000000
--- a/sr_avms/data_psect_bound.m64
+++ /dev/null
@@ -1,34 +0,0 @@
-	.title	data_psect_bound	define boundaries of $DATA PSECT's
-	G_MSF
-
-	.psect $DAT9ZZZZZZZZZZ	pic,ovr,rel,gbl,noshr,noexe,rd,wrt,novec,long
-datastrt:
-
-	.psect $DATAAAAAAAAAAA	pic,ovr,rel,gbl,noshr,noexe,rd,wrt,novec,long
-dataend:
-
-	$linkage_section
-A_datastrt:
-	.address	datastrt
-A_dataend:
-	.address	dataend
-
-;	data_psect_bound
-;
-;		arg1	address of pointer to receive address of datastrt
-;		arg2	address of pointer to receive address of dataend
-
-	$routine	name=data_psect_bound,entry=data_psect_bound_ca,kind=null
-
-	.base	r27, $ls
-
-	ldq	r28, A_datastrt
-	ldq	r22, A_dataend
-	stl	r28, (r16)
-	stl	r22, (r17)
-
-	ret	r26
-
-	$end_routine	name=data_psect_bound
-
-	.end
diff --git a/sr_avms/ddp_dal_dispatch.m64 b/sr_avms/ddp_dal_dispatch.m64
deleted file mode 100644
index 37df821..0000000
--- a/sr_avms/ddp_dal_dispatch.m64
+++ /dev/null
@@ -1,113 +0,0 @@
-	.title	ddp_dal_dispatch
-
-
-MAX_SUBSCRIPTS	=	12
-MAX_ARG_SIZE	=	<<<<MAX_SUBSCRIPTS+3>*8>+15>/16>*16	; space for gtmi$_extgbl, destination, aux owner, all subscripts
-
-
-	$linkage_section
-
-A_subscript_array:	.address	subscript_array
-A_subscript_count:	.address	subscript_count
-
-Q_gtmi$_extgbl:		.quad		gtmi$_extgbl
-
-
-	$routine	name=ddp_dal_dispatch, entry=ddp_dal_dispatch_ca, -
-			kind=stack, base_reg_is_fp=true, standard_prologue=true
-
-	.base	r27, $ls
-
-	subq	sp, MAX_ARG_SIZE, sp
-	ldq	r0, A_subscript_count
-	ldq	r1, A_subscript_array
-	ldl	r0, (r0)
-	addq	r0, 1, r25		; argument count (array starts @ 0, argument count @ 1)
-
-;	If destination argument (argument 2) is non-zero, pass it as 2nd argument, else skip it.
-;	Rest of argument list to dispatched routine is addresses of elements in subscript array.
-	beq	r17, 3$			; if no destination argument
-	addq	r25, 1, r25		; need another argument position for destination (leave in r17)
-	br	5$
-
-3$:	lda	r17, (r1)		; if no destination argument, start with first array element in r17
-	addq	r1, 8, r1		; skip over first array element (already in argument list)
-	subq	r0, 1, r0		; remember not to count it twice
-5$:	lda	r18, (r1)
-	lda	r19, 8(r1)
-	lda	r20, 16(r1)
-	lda	r21, 24(r1)
-	subq	r0, 4, r0
-	ble	r0, 20$			; if no more arguments
-
-;	Copy rest of array element addresses to stack area.
-	addq	r1, 32, r1
-	mov	sp, r22
-10$:	lda	r28, (r1)
-	stq	r28, (r22)
-	subq	r0, 1, r0
-	addq	r1, 8, r1
-	addq	r22, 8, r22
-	bgt	r0, 10$
-
-20$:	ldq	r0, Q_gtmi$_extgbl
-	mov	r16, r27
-	ldq	r26, 8(r16)
-	mov	r0, r16
-	jsr	r26, (r26)
-
-	$return
-
-	$end_routine	name=ddp_dal_dispatch
-
-
-	$routine	name=ddp_lock_dispatch, entry=ddp_lock_dispatch_ca, -
-			kind=stack, base_reg_is_fp=true, standard_prologue=true
-
-	.base	r27, $ls
-
-	subq	sp, MAX_ARG_SIZE, sp
-	ldq	r0, A_subscript_count
-	ldq	r1, A_subscript_array
-	ldl	r0, (r0)
-	addq	r0, 2, r25		; array elements + 1 for auxown
-	mov	r16, r22		; save A(routine to call) for later
-
-;	Skip timeout on unlock.
-	and	r17, ^Xff, r16
-	bne	r16, 3$			; skip timeout on unlock (otherwise timeout in r16 == 0)
-	mov	r18, r17		; aux owner
-	ldq	r18, Q_gtmi$_extgbl
-	addq	r25, 1, r25		; need another argument position
-	br	5$
-
-3$:	mov	r18, r16		; aux owner
-	ldq	r17, Q_gtmi$_extgbl
-	lda	r18, (r1)
-	addq	r1, 8, r1		; skip over first array element (already in argument list)
-	subq	r0, 1, r0		; remember not to count it twice
-5$:	lda	r19, (r1)
-	lda	r20, 8(r1)
-	lda	r21, 16(r1)
-	subq	r0, 3, r0
-	ble	r0, 20$			; if no more arguments
-
-;	Copy rest of array element addresses to stack area.
-	addq	r1, 24, r1
-	mov	sp, r23
-10$:	lda	r28, (r1)
-	stq	r28, (r23)
-	subq	r0, 1, r0
-	addq	r1, 8, r1
-	addq	r23, 8, r23
-	bgt	r0, 10$
-
-20$:	ldq	r26, 8(r22)
-	mov	r22, r27
-	jsr	r26, (r26)
-
-	$return
-
-	$end_routine	name=ddp_lock_dispatch
-
-	.end
diff --git a/sr_avms/ddpgvusr_symbols.m64 b/sr_avms/ddpgvusr_symbols.m64
deleted file mode 100644
index c6bd258..0000000
--- a/sr_avms/ddpgvusr_symbols.m64
+++ /dev/null
@@ -1,15 +0,0 @@
-	.title	DDPGVUSR_SYMBOLS  "Bind DDPGVUSR at run time"
-
-	bndsym	GVUSR_INIT,	DDPGVUSR
-	bndsym	GVUSR_RUNDOWN,	DDPGVUSR
-	bndsym	GVUSR_DATA,	DDPGVUSR
-	bndsym	GVUSR_ORDER,	DDPGVUSR
-	bndsym	GVUSR_QUERY,	DDPGVUSR
-	bndsym	GVUSR_ZPREVIOUS,DDPGVUSR
-	bndsym	GVUSR_GET,	DDPGVUSR
-	bndsym	GVUSR_KILL,	DDPGVUSR
-	bndsym	GVUSR_PUT,	DDPGVUSR
-	bndsym	GVUSR_LOCK,	DDPGVUSR
-	bndsym	GVUSR_UNLOCK,	DDPGVUSR
-
-	.end
diff --git a/sr_avms/ddplink.axp b/sr_avms/ddplink.axp
deleted file mode 100644
index 470055f..0000000
--- a/sr_avms/ddplink.axp
+++ /dev/null
@@ -1,38 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-ddpobj/lib
-gtmshr/share
-gtmsecshr/share
-symbol_vector=( -
-	gvusr_init	= PROCEDURE, -
-	gvusr_rundown	= PROCEDURE, -
-	gvusr_data	= PROCEDURE, -
-	gvusr_order	= PROCEDURE, -
-	gvusr_query	= PROCEDURE, -
-	gvusr_zprevious	= PROCEDURE, -
-	gvusr_get	= PROCEDURE, -
-	gvusr_kill	= PROCEDURE, -
-	gvusr_put	= PROCEDURE, -
-	gvusr_lock	= PROCEDURE, -
-	gvusr_unlock	= PROCEDURE -
-	)
-gsmatch=lequal,4,0
-! Because the linker creates image sections on a per-cluster
-! basis, create a cluster for all of the code Psect's (whose
-! pages can be shared among processes) and collect all of the
-! code Psect's into it so the pages corresponding to that image
-! section can be shared.  Note the MACRO/MIGRATION compiler
-! names its code Psect "$CODE" (as do most of the VAX compilers),
-! while the AXP C compiler and MACRO assembler name their code
-! Psect's "$CODE$".
-cluster = code_clust
-collect = code_clust,$CODE,$CODE$
diff --git a/sr_avms/error_return_vms.m64 b/sr_avms/error_return_vms.m64
deleted file mode 100644
index 76e9774..0000000
--- a/sr_avms/error_return_vms.m64
+++ /dev/null
@@ -1,32 +0,0 @@
-	.title	ERROR_RETURN_VMS
-
-;	ERROR_RETURN_VMS calls error_return (which doesn't return).
-;
-;	entry:
-;		r13 -	address of ERROR_RETURN_VMS's procedure descriptor (not r27)
-;
-;	WARNING: because ERROR_RETURN_VMS is designed to be invoked from a GT.M
-;	MUMPS stack frame, it does not conform to the Alpha calling
-;	standard and cannot be invoked from any high-level language.
-;	The invoker should load the address of ERROR_RETURN_VMS's procedure
-;	descriptor into r13, not r27.
-
-	g_msf
-
-	$linkage_section
-A_frame_pointer:
-	.address  frame_pointer
-
-	$code_section
-
-	$routine	ERROR_RETURN_VMS, entry=ERROR_RETURN_VMS_CA, kind=null
-	.base	r13, $ls
-
-	mov	r13, r27
-	$call	error_return, set_arg_info=false, nonstandard=true
-	getframe
-	ret     r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/fetch_all.m64 b/sr_avms/fetch_all.m64
deleted file mode 100644
index 183ec2a..0000000
--- a/sr_avms/fetch_all.m64
+++ /dev/null
@@ -1,41 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;                                                               ;
-;       Copyright 2014 Fidelity Information Services, Inc       ;
-;                                                               ;
-;       This source code contains the intellectual property     ;
-;       of its copyright holder(s), and is made available       ;
-;       under a license.  If you do not know the terms of       ;
-;       the license, please stop and do not read further.       ;
-;                                                               ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; this calls gtm_fetch with a count of zero arguments - something varargs processing in VMS can't do without help
-; this form of call to gtm_fetch binds all existing local variables instead of a passed list
-	 .title    FETCH_ALL
-
-	 G_MSF
-
-	 $linkage_section
-
-a_fetch_all:
-	 .linkage_pair fetch_all
-
-	 $code_section
-
-
-;*1*********************************************************************
-    $routine FETCH_ALL, entry=FETCH_ALL_CA, kind=null
-
-	lda	sp, -8(sp)
-	stq	r26, (sp)
-	.base	r27, $ls
-	mov    0, r25        ; argument count
-	mov    0, r28        ; argument count on the stack
-	$call    gtm_fetch, set_arg_info=false, nonstandard=true
-	ldq	r26, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	 $end_routine
-
-	 .end
-
diff --git a/sr_avms/fetch_args.max b/sr_avms/fetch_args.max
deleted file mode 100644
index 00ac333..0000000
--- a/sr_avms/fetch_args.max
+++ /dev/null
@@ -1,50 +0,0 @@
-	.macro	fetch_args sp_save_reg, stack_offset, ?loop, ?skip
-
-; This macro is used to call routine GTM_FETCH, passing a variable-length argument list
-; in which the first argument (i.e. R16) is the argument count.  It moves the argument
-; count from R16 to the Argument Information register, R25, and then moves the remaining
-; arguments down one slot in the argument list.  Since any arguments after the first six
-; would have been passed on the stack, it also must move these arguments from their
-; position above the current routine's save area to new slots below it.
-;
-; Arguments to this macro are:
-;
-;	sp_save_reg	: a register in which to save the current value of SP, and from
-;			  which SP will be restored when done.  This register must be
-;			  one which is normally saved across routine calls, i.e. in the
-;			  range of R2 to R15.
-;
-;	stack_offset	: the size, in bytes, of the current routine's save area.  This
-;			  value plus the current value of SP will be the address of the
-;			  first stacked argument.
-;
-; Registers R16 through R21 and R25 through R28 are modified by this macro.
-
-	mov	r16, r25		; argument count
-	mov	r17, r16		; arg1 (to GTM_FETCH)
-	mov	r18, r17		; arg2
-	mov	r19, r18		; arg3
-	mov	r20, r19		; arg4
-	mov	r21, r20		; arg5
-	ldq	r21, stack_offset(sp)	; arg6 was on the stack
-
-	subq	r25, 6, r28		; r28 = the number of arguments left on the stack
-	mov	sp, sp_save_reg		; save the current stack pointer
-	ble	r28, skip		; skip if no arguments left
-
-	sll	r28, 3, r27		; r27 = the number of arguments to move, times 8 bytes
-	addq	r27, stack_offset, r27	; account for the saved registers
-	addq	r27, sp, r27		; r27 -> ArgN
-loop:
-	ldq	r26, (r27)
-	lda	sp, -8(sp)
-	lda	r27, -8(r27)
-	subq	r28, 1, r28
-	stq	r26, (sp)
-	bgt	r28, loop
-
-skip:	$call	gtm_fetch, set_arg_info=false, nonstandard=true
-
-	mov	sp_save_reg, sp		; restore the stack
-
-	.endm	fetch_args
diff --git a/sr_avms/fgncal_dispatch.m64 b/sr_avms/fgncal_dispatch.m64
deleted file mode 100644
index 66386b2..0000000
--- a/sr_avms/fgncal_dispatch.m64
+++ /dev/null
@@ -1,1108 +0,0 @@
-	.title	fgncal_dispatch
-
-
-	G_MSF
-	base_frame
-
-
-;	Syntax codes.
-syn0		=	0	; no mode argument (gtm$xecute)
-syn1		=	1	; mode is in position 1, counting from 0 (gtm$lock)
-syn2		=	3	; mode is in position 0, counting from 0 (gtm$get)
-syn3		=	4	; mode is in position 2, counting from 0 (gtm$lock2)
-
-;	Stack offsets and related information.
-
-;	Locals.
-SAVE_R13	=	GTM_LOCAL_1
-
-
-	$linkage_section
-
-A_active_lv:		.address	active_lv
-
-A_FGNCAL_CH:		.address	FGNCAL_CH
-A_fgncal_stack:		.address	fgncal_stack
-A_fgncal_rtn:		.address	fgncal_rtn
-A_frame_pointer:	.address	frame_pointer
-
-A_literal_null:		.address	literal_null
-A_mdb_condition_handler:.address	mdb_condition_handler
-A_msp:			.address	msp
-A_mumps_status:		.address	mumps_status
-A_stringpool:		.address	stringpool
-A_xfer_table:		.address	xfer_table
-A_dollar_zstatus:	.address	dollar_zstatus
-
-L_ERR_IFBADPARM:	.long		ERR_IFBADPARM
-L_ERR_IFNOTINIT:	.long		ERR_IFNOTINIT
-L_ERR_LCKSTIMOUT:	.long		ERR_LCKSTIMOUT
-L_ERR_ORDER2:		.long		ERR_ORDER2
-L_ERR_VAREXPECTED:	.long		ERR_VAREXPECTED
-
-Q_gtmi$_extgbl:		.quad		gtmi$_extgbl
-Q_gtmi$_extlcl:		.quad		gtmi$_extlcl
-Q_gtmi$_global:		.quad		gtmi$_global
-Q_gtmi$_local:		.quad		gtmi$_local
-Q_gtmi$_naked:		.quad		gtmi$_naked
-
-;	Strictly speaking, no_timeout should be in the data section,
-;	but it'll work here and save a base register.
-no_timeout:		.long	^X0007fffe
-
-
-
-;
-	.macro	fgncal_entry	name, syn, fk, dst, ?A
-
-	$routine	name, entry=%string(name)_CA, kind=stack, -
-			saved_regs=<%string(base_frame_regs)>, -
-			rsa_offset=RSA_OFFSET, size=STACK_SIZE, -
-			standard_prologue=false, handler=GTM$DYN_CH, synch_exceptions=true
-
-
-	.if	ne,$SIZE,STACK_SIZE
-		.error	"The stack frame size computed by $routine (%integer($SIZE)) differs from that expected -
-(%integer(STACK_SIZE))."
-	.endc
-
-	.if	ne,$SIZE-56,ARG_OFFSET
-		.error	"The homed argument list offset computed by $routine (%integer($SIZE-56)) differs from -
-that expected (%integer(ARG_OFFSET))."
-	.endc
-
-	create_base_frame
-
-	mov	r27, r13		; establish local base register
-	.base	r13, $ls
-
-	ldq	r28, A_stringpool
-	ldl	r28, (r28)
-	bne	r28, A			; if stringpool.base == 0, not initialized yet
-	$call	lib$signal, args=<L_ERR_IFNOTINIT/L>
-	$return
-
-A:	ldq	r28, A_FGNCAL_CH
-	stq	r28, 8(fp)		; establish fgncal_ch as condition handler
-	lda	r2,  syn(r31)
-	lda	r5,  dst(r31)		; [Vinaya 10/30/2002] see note about dst in fgncal_procarg
-	lda	r7,  fk(r31)
-	ldq	r28, A_mumps_status
-	lda	r22, 1(r31)
-	stl	r22, (r28)
-	ldq	r23, A_msp
-	ldq	r24, A_fgncal_stack
-	ldl	r23, (r23)
-	stl	r23, (r24)
-
-	.endm
-
-
-;	fgncal_old provides an interface between old DAL entry points
-;	and new ones.  The old version used separate names for the global
-;	and local versions of each function, while the new version uses
-;	the same name for both.  fgncal_old creates dummy procedures that
-;	reset the link register and transfer execution to the new entry
-;	point.
-;
-;	arguments:
-;		newname	- name of new entry point
-;		gname	- name of old global entry point
-;		lname	- name of old local entry point
-
-	.macro	fgncal_old	newname, gname, lname
-
-	$linkage_section
-
-L_'newname:	.linkage_pair	newname
-
-
-	$routine	gname, entry=%string(gname)_CA, kind=null
-
-	.base	r27, $ls
-
-	ldq	r28, L_'newname	; N.B. don't modify r26
-	ldq	r27, L_'newname+8
-	jmp	r28		; jump to name as if it were the entry point invoked
-
-	$end_routine	name=gname
-
-
-	$routine	lname, entry=%string(lname)_CA, kind=null
-
-	.base	r27, $ls
-
-	ldq	r28, L_'newname	; N.B. don't modify r26
-	ldq	r27, L_'newname+8
-	jmp	r28		; jump to name as if it were the entry point invoked
-
-	$end_routine	name=lname
-
-	.endm
-
-
-;	calls mimics the VAX calls instruction.  It assumes all of
-;	the arguments to the routine to be called are on the stack.
-;	First, it copies the top 6 stack values to argument registers
-;	and pops the top 6 (or fewer, if fewer arguments) off the
-;	stack.  After the call, it further adjusts the stack by
-;	removing any arguments after the first six.
-;
-;	Arguments:
-;		args	- number of arguments, must be either a saved
-;				register or an integer expression
-;		routine	- routine to be called
-
-	.macro	calls	args, routine
-
-;	Move arguments from stack to registers.
-	mov	args, r25
-	ldq	r16, (sp)
-	ldq	r17, 8(sp)
-	ldq	r18, 16(sp)
-	ldq	r19, 24(sp)
-	ldq	r20, 32(sp)
-	ldq	r21, 40(sp)
-
-;	Adjust stack for arguments moved to registers.
-	lda	r22, 6(r31)
-	subq	r22, args, r28
-	cmovgt	r28, args, r22	; lesser of 6, actual number of arguments
-	s8addq	r22, sp, sp	; pop stack accordingly
-
-	$call	routine, set_arg_info=false, nonstandard=true
-
-;	If more than 6 arguments; remove rest from stack.
-	mov	args, r28
-	subq	r28, 6, r28
-	cmovlt	r28, r31, r28	; number of arguments not in registers
-	s8addq	r28, sp, sp	; adjust stack
-
-	.endm
-
-
-	.macro	bind	sbc, mode, ?A, ?B, ?C, ?D, ?E, ?F, ?G
-
-	ldq	r28, Q_gtmi$_global
-	subq	mode, r28, r28
-	beq	r28, B
-
-	ldq	r28, Q_gtmi$_extgbl
-	subq	mode, r28, r28
-	beq	r28, D
-
-	ldq	r28, Q_gtmi$_local
-	subq	mode, r28, r28
-	beq	r28, A
-
-	ldq	r28, Q_gtmi$_extlcl
-	subq	mode, r28, r28
-	beq	r28, C
-
-F:	br	bparm		; unknown mode
-
-C:	; extlcl
-	subq	sbc, 2, r28
-	blt	r28, F		; too few args
-	ldq	mode, (sp)
-	br	G
-
-D:	; extgbl
-	subq	sbc, 2, r28
-	blt	r28, F		; too few args
-	ldq	mode, (sp)
-
-;	NOTE: The VAX instruction is "calls #0,fgn_glopref" which will not affect
-;	the caller's stack and requires the callee to handle its arguments properly.
-;	Consequently, we make no stack adjustment after the call here.
-	$call	fgn_glopref, args=<8(sp)/Q>, nonstandard=true
-G:	stq	r31, (sp)	; add 2nd env arg
-	subq	sp, 8, sp
-	stq	mode, (sp)
-	br	E
-
-B:	; global
-;	NOTE: The VAX instruction is "calls #0,fgn_glopref" which will not affect
-;	the caller's stack and requires the callee to handle its arguments properly.
-;	Consequently, we make no stack adjustment after the call here.
-	$call	fgn_glopref, args=<0(sp)/Q>, nonstandard=true
-A:	subq	sp, 8, sp
-	stq	r31, (sp)
-E:	addq	sbc, 1, sbc
-
-;	Move arguments to registers and set up stack properly.
-	mov	sbc, r25
-	ldq	r16, (sp)
-	ldq	r17, 8(sp)
-	ldq	r18, 16(sp)
-	ldq	r19, 24(sp)
-	ldq	r20, 32(sp)
-	ldq	r21, 40(sp)
-	lda	r22, 6(r31)	; number of arguments in registers
-	subq	sbc, r22, r28
-	cmovlt	r28, sbc, r22	; lesser of 6, actual number of arguments
-	s8addq	r22, sp, sp	; pop register arguments off stack
-	$call	op_lkname, set_arg_info=false, nonstandard=true
-	subq	sbc, 6, r28
-	cmovlt	r28, r31, r28	; number of arguments not in registers
-	s8addq	r28, sp, sp	; pop rest off stack
-	mov	r31, sbc
-
-	.endm
-
-
-;	fgncal_procarg is called at the beginning of each gtm$ fgncal_entry
-;	routine to verify and process input arguments.
-;
-;	Entry:
-;		r2	- syntax code (syn)
-;		r5	- # of output arguments	[Vinaya 10/30/2002] see note about dst below
-;		r7	- position of first key (fk), minimum # of arguments
-;
-;	[Vinaya 10/30/2002] Note about dst. The role of this argument is not clear (to me).
-;			    Note that this argument is 2 for gtm$data (and other functions
-;			    that return a value) whereas $data returns only 1 result,
-;			    i.e., there is only 1 destination argument. Also, $put doesn't
-;			    provide any result, it takes input from arg in position 1
-;			    (counting from 0). In the below code, dst argument doesn't seem
-;			    to be used, and doesn't appear to be stored by fgncal_procarg
-;			    (in register or stack) for future use. I believe we could use
-;			    this argument during argument processing.
-;
-;	Exit:
-;		r0	- if local, pointer to lv_val -ret
-;		r2	- syntax code (syn)
-;		r3	- # of input arguments, # of subscripts
-;		r4	- return address of caller
-;		r5	- address of local name
-;		r6	- current key descriptor (b.j), mode -ret
-;		r7	- position of first key (fk), minimum # of arguments
-;		r8	- current arg in r25 (n)
-;		stack	- sequence of &mval
-
-
-	$routine	name=fgncal_procarg, entry=fgncal_procarg_ca, kind=null, local=true
-
-	stq	r13, SAVE_R13(fp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mov	r26, r4		; save return address
-	ldq	r8,  ARG_OFFSET(fp)	; n = ac
-	subq	r8, r7, r28	; compare minimum # of arguments
-	bge	r28, 0$
-	br	bparm		; too few
-
-0$:	bne	r8, 15$		; any args?
-	subq	r2, syn1, r28	; might be a lock with no timeout
-	bne	r28, 12$
-	ldl	r28, no_timeout
-	subq	sp, 8, sp
-	stq	r28, (sp)
-12$:	br	fgncal_procarg_ret
-
-15$:	mov	r31, r3		; argument count
-
-20$:	; loop top
-	lda	r6, ARG_OFFSET(fp)
-	s8addq	r8, r6, r6
-	ldq	r6, (r6)	; r6 = b.n
-	ldq	r28, Q_gtmi$_extlcl	; highest-valued mode
-	subq	r6, r28, r28
-	ble	r28, 22$	; is it a mode?
-	br	23$
-
-22$:	ldq	r28, Q_gtmi$_global	; lowest-valued mode
-	subq	r6, r28, r28
-	bge	r28, 24$	; it is a mode
-
-23$:	; It's not a mode.
-	$call	push_mval, args=<A_literal_null>, nonstandard=true
-	subq	sp, 8, sp
-	stq	r0, (sp)	; pointer to mval used by op_xxname (accumulate on the stack)
-	mov	r0, r17		; destination for conversion
-	mov	r6, r16		; source descriptor
-	$call	desc2mval, args=<r16, r17>, nonstandard=true	; convert descriptor to mval
-	addq	r3, 1, r3
-	subq	r8, 1, r8
-	subq	r8, r7, r28	; n - fk	cnt, bnd
-	bge	r28, 20$	; more arguments left
-	br	pfin		; n == fk
-
-24$:	; It's a mode.
-	subq	r2, syn1, r28
-	beq	r28, 25$
-	subq	r2, syn3, r28
-	beq	r28, 25$
-	br	bparm		; mode before done, but not a lock
-
-25$:	bne	r3, 27$		; any args?
-	subq	r8, r7, r28	; n - fk
-	bne	r28, bparm	; should be done
-	subq	r8, 1, r8
-	br	pfin		; n == fk
-
-27$:	bind	r3, r6		; bind.(k, nf, mode)
-	subq	r8, 1, r8
-	subq	r8, r7, r28	; n - fk	cnt, bnd
-	ble	r28, pfin	; n == fk
-	lda	r6, ARG_OFFSET(fp)
-	s8addq	r8, r6, r6
-	ldq	r6, (r6)	; r6 = b.n
-	bne	r6, bparm	; should be 0 delimiter between arguments
-	subq	r8, 1, r8
-	subq	r8, r7, r28	; n - fk	cnt, bnd
-	beq	r28, bparm	; should be more to do
-	br	20$
-
-bparm:	$call	lib$signal, args=<L_ERR_IFBADPARM/L>, nonstandard=true
-	br	fgncal_procarg_ret
-
-pfin:	; procarg wrap up
-	subq	r2, syn2, r28
-	beq	r28, 50$
-	subq	r2, syn1, r28
-	beq	r28, 30$
-	subq	r2, syn0, r28
-	beq	r28, 40$
-	lda	r28, ARG_OFFSET(fp)
-	s8addq	r8, r28, r28
-	ldq	r28, (r28)
-	subq	sp, 8, sp
-	stq	r28, (sp)	; auxowner
-	subq	r8, 1, r8
-30$:	beq	r8, 35$
-	subq	r8, 1, r28
-	beq	r28, 33$
-	br	bparm		; should be down to timeout in position 0, counting from 0
-
-33$:	lda	r6, ARG_OFFSET(fp)
-	s8addq	r8, r6, r6
-	ldq	r6, (r6)	; timeout
-	blt	r6, 35$
-	subq	sp, 8, sp
-	stq	r6, (sp)
-	br	40$
-
-35$:	ldl	r0, no_timeout
-	subq	sp, 8, sp
-	stq	r0, (sp)
-40$:	br	fgncal_procarg_ret
-
-50$:	subq	r3, 1, r28
-	blt	r28, bparm	; should have at least one arg
-	ldq	r6, ARG_OFFSET+8(fp)
-	ldq	r28, Q_gtmi$_global
-	subq	r6, r28, r28
-	bne	r28, 60$
-	calls	r3, op_gvname
-	br	fgncal_procarg_ret
-
-60$:	ldq	r28, Q_gtmi$_naked
-	subq	r6, r28, r28
-	bne	r28, 70$
-	calls	r3, op_gvnaked
-	br	fgncal_procarg_ret
-
-70$:	ldq	r28, Q_gtmi$_extgbl
-	subq	r6, r28, r28
-	bne	r28, 90$
-	subq	r3, 2, r28
-	blt	r28, bparm	; extended globals need at least 2 args
-	ldq	r1, (sp)	; put new second parameter in for extnam
-	ldq	r28, A_literal_null	; second param for extnam is "" string
-	stq	r28, (sp)
-	subq	sp, 8, sp
-	stq	r1, (sp)
-	addq	r3, 1, r3
-	calls	r3, op_gvextnam
-	br	fgncal_procarg_ret
-
-90$:	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	bne	r28, 95$
-	ldq	r5, (sp)
-	$call	fgncal_lookup, args=<r5>, nonstandard=true
-	addq	sp, 8, sp
-	beq	r0, 100$
-	subq	sp, 8, sp
-	stq	r0, (sp)
-	br	fgncal_procarg_ret
-
-95$:	br	bparm		; unknown mode
-
-100$:	$call	lib$signal, args=<L_ERR_VAREXPECTED/L>, nonstandard=true
-	br	fgncal_procarg_ret
-
-fgncal_procarg_ret:
-	ldq	r13, SAVE_R13(fp)
-	ret	r4
-
-	$end_routine	name=fgncal_procarg
-
-
-;	fgncal_dispget sets up a destination mval and calls the op_ routine whose
-;	address is in r2.
-;
-;	entry:
-;		r2	- address of routine to call
-;
-;	exit:
-;		to fgncal_lclfini
-
-	$routine	fgncal_dispget, entry=fgncal_dispget_ca, kind=null, local=true
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	$call	push_mval, args=<A_literal_null>, nonstandard=true	; prepare a destination
-	mov	r0,  r4		; save for fgncal_lclfini
-
-;	$call	(r2), args=<r0>	; do the real thing
-	mov	r0,  r16
-	lda	r25, 1(r31)
-	mov	r2,  r27
-	ldq	r26, 8(r27)
-	jsr	r26, (r26)
-
-	$call	fgncal_lclfini, set_arg_info=false, local=true, nonstandard=true
-;	doesn't return
-
-	$end_routine	name=fgncal_dispget
-
-
-;	fgncal_lclfini converts that to which r4 points from mval format to descriptor format.
-;
-;	entry:
-;		r4	- pointer to mval
-;
-;	exit:
-;		caller's second argument - descriptor created from mval
-
-	$routine	fgncal_lclfini, entry=fgncal_lclfini_ca, kind=null, local=true
-
-	mov	r27, r13
-	.base	R13, $ls
-
-	$call	mval2desc, args=<r4, ARG_OFFSET+16(fp)/Q>, nonstandard=true	; convert it for caller
-
-	$call	fgncal_dispret, set_arg_info=false, local=true, nonstandard=true
-;	doesn't return
-
-	$end_routine	name=fgncal_lclfini
-
-
-;	fgncal_dispret cleans up the fgncal stack and returns to the foreign caller.
-;	This is the routine that returns from the stack frame created by fgncal_entry.
-
-	$routine	fgncal_dispret, entry=fgncal_dispret_ca, kind=stack, local=true, -
-			saved_regs=<%string(base_frame_regs)>, -
-			rsa_offset=RSA_OFFSET, size=STACK_SIZE, -
-			standard_prologue=false, handler=GTM$DYN_CH, synch_exceptions=true
-
-;	Since fgncal_dispret executes in and returns from the stack frame set up by
-;	fgncal_entry, it need not set up its own stack frame although it needs to declare
-;	one for the $return macro to work properly.
-
-	$end_prologue
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	$call	fgncal_unwind, set_arg_info=false, nonstandard=true
-	ldq	r28, A_mumps_status
-	ldl	r0,  (r28)
-
-	$return		; to foreign caller
-
-	$end_routine	name=fgncal_dispret
-
-
-	fgncal_entry	gtm$get, syn2, 3, 2
-
-	$linkage_section
-
-A_op_gvget:	.address	op_gvget
-
-
-	$code_section
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	ldq	r2, A_op_gvget
-	$call	fgncal_dispget, set_arg_info=false, local=true
-	; doesn't return
-
-1$:	subq	r3, 1, r28
-	beq	r28, 10$
-	calls	r3, op_getindx
-10$:	mov	r0, r4
-	$call	fgncal_lclfini, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$get
-
-	fgncal_old	gtm$get, gtm$gblget, gtm$lclget
-
-
-	fgncal_entry	gtm$put, syn2, 3, 2
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	$call	push_mval, args=<A_literal_null>	; convert value assigned
-	mov	r0, r4
-	$call	desc2mval, args=<ARG_OFFSET+16(fp)/Q, r4>
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	$call	op_gvput, args=<r4>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-1$:	ldq	r0, (sp)	; local
-	subq	r3, 1, r28
-	beq	r28, 10$
-	calls	r3, op_putindx
-10$:	ldl	r16, (r4)
-	ldl	r17, 4(r4)
-	ldl	r18, 8(r4)
-	ldl	r19, 12(r4)
-	ldl	r20, 16(r4)
-	stl	r16, (r0)
-	stl	r17, 4(r0)
-	stl	r18, 8(r0)
-	stl	r19, 12(r0)
-	stl	r20, 16(r0)
-	ldq	r28, A_active_lv
-	stl	r31, (r28)
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$put
-
-	fgncal_old	gtm$put, gtm$gblput, gtm$lclput
-
-
-	fgncal_entry	gtm$kill, syn2, 2, 0
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	$call	op_gvkill, args=<>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-1$:	subq	r3, 1, r28
-	beq	r28, 10$
-	calls	r3, op_srchindx
-	subq	sp, 8, sp
-	stq	r0, (sp)
-10$:	calls	1, op_kill
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$kill
-
-	fgncal_old	gtm$kill, gtm$gblkill, gtm$lclkill
-
-
-	fgncal_entry	gtm$withdraw, syn2, 2, 0
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	$call	op_gvzwithdraw, args=<>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-1$:	subq	r3, 1, r28
-	beq	r28, 10$
-	calls	r3, op_srchindx
-	subq	sp, 8, sp
-	stq	r0, (sp)
-10$:	calls	1, op_lvzwithdraw
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$withdraw
-
-	fgncal_old	gtm$withdraw, gtm$gblwithdraw, gtm$lclwithdraw
-
-	$routine	gtm$zkill, entry=gtm$zkill_CA, kind=null
-
-	.base	r27, $ls
-
-	ldq	r28, L_gtm$withdraw	; defined by previous fgncal_old macro invocation
-	ldq	r27, L_gtm$withdraw+8
-	jmp	r28
-
-	$end_routine	name=gtm$zkill
-
-
-	fgncal_entry	gtm$data, syn2, 3, 2
-
-	$linkage_section
-
-A_op_gvdata:	.address	op_gvdata
-
-
-	$code_section
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	ldq	r2, A_op_gvdata
-	$call	fgncal_dispget, set_arg_info=false, local=true
-	; doesn't return
-
-1$:	subq	r3, 1, r28
-	beq	r28, 10$
-	calls	r3, op_srchindx
-	subq	sp, 8, sp
-	stq	r0, (sp)
-10$:	$call	push_mval, args=<A_literal_null>
-	mov	r0, r4
-	ldq	r0, (sp)
-	addq	sp, 8, sp
-	mov	r4, r17		; put return mval underneath lv_val
-	mov	r0, r16
-	$call	op_fndata, args=<r16, r17>
-	$call	fgncal_lclfini, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$data
-
-	fgncal_old	gtm$data, gtm$gbldata, gtm$lcldata
-
-
-	fgncal_entry	gtm$order, syn2, 4, 2
-
-	$linkage_section
-
-A_op_gvorder:	.address	op_gvorder
-
-
-	$code_section
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r1, ARG_OFFSET+24(fp)	; direction argument
-	addq	r1, 1, r28
-	beq	r28, 0$		; -1
-	subq	r1, 1, r28
-	beq	r28, 1$		; 1
-	$call	lib$signal, args=<L_ERR_ORDER2/L>	; second order arg must be -1 or 1
-	; shouldn't return
-
-0$:	$call	prev, set_arg_info=false, local=true	; based on direction, jump to zprevious
-	; shouldn't return
-
-1$:	$call	order, set_arg_info=false, local=true
-	; shouldn't return
-
-	$end_routine	name=gtm$order
-
-
-	$routine	order, entry=order_ca, kind=null, local=true
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	ldq	r2, A_op_gvorder
-	$call	fgncal_dispget, set_arg_info=false, local=true, nonstandard=true
-	; doesn't return
-
-1$:	$call	push_mval, args=<A_literal_null>, nonstandard=true
-	mov	r0, r4
-	subq	r3, 1, r3
-	beq	r3, 10$
-	subq	r3, 1, r28
-	beq	r28, 20$
-	calls	r3, op_srchindx
-	subq	sp, 8, sp
-	stq	r0, (sp)
-	br	20$
-
-10$:	addq	sp, 8, sp
-	$call	op_fnlvname, args=<r5, r31, r4>, nonstandard=true
-	$call	fgncal_lclfini, set_arg_info=false, local=true, nonstandard=true
-	; doesn't return
-
-20$:	ldq	r0, (sp)	; put dst under src and key arguments
-	ldq	r1, 8(sp)
-	addq	sp, 16, sp
-	mov	r0, r16
-	mov	r1, r17
-	mov	r4, r18
-	$call	op_fnorder, args=<r16, r17, r18>, nonstandard=true
-	$call	fgncal_lclfini, set_arg_info=false, local=true, nonstandard=true
-	; doesn't return
-
-	$end_routine	name=order
-
-
-	fgncal_entry	gtm$gblorder, syn2, 3, 2
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	$call	order, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$gblorder
-
-
-	$routine	gtm$lclorder, entry=gtm$lclorder_ca, kind=null
-
-	$linkage_section
-
-L_gtm$gblorder:	.linkage_pair	gtm$gblorder
-
-
-	$code_section
-
-	.base	r27, $ls
-
-	ldq	r28, L_gtm$gblorder	; N.B. don't modify r26
-	ldq	r27, L_gtm$gblorder+8
-	jmp	r28			; jump to gtm$gblorder as if it were the entry point invoked
-
-	$end_routine	name=gtm$lclorder
-
-
-	fgncal_entry	gtm$previous, syn2, 3, 2
-
-	$linkage_section
-
-A_op_zprevious:	.address	op_zprevious
-
-
-	$code_section
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	$call	prev, set_arg_info=false, local=true
-	; shouldn't return
-
-	$end_routine	name=gtm$previous
-
-
-	$routine	prev, entry=prev_ca, kind=null, local=true
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	ldq	r2, A_op_zprevious
-	$call	fgncal_dispget, set_arg_info=false, nonstandard=true
-	; doesn't return
-
-1$:	$call	push_mval, args=<A_literal_null>, nonstandard=true
-	mov	r0, r4
-	subq	r3, 1, r3
-	beq	r3, 10$
-	subq	r3, 1, r28
-	beq	r28, 20$
-	calls	r3, op_srchindx
-	subq	sp, 8, sp
-	stq	r0, (sp)
-	br	20$
-
-10$:	addq	sp, 8, sp
-	$call	op_fnlvprvname, args=<r5, r4>, nonstandard=true	; put return mval underneath lv name
-	$call	fgncal_lclfini, set_arg_info=false, local=true, nonstandard=true
-	; doesn't return
-
-20$:	ldq	r0, (sp)	; put dst under src and key arguments
-	ldq	r1, 8(sp)
-	addq	sp, 16, sp
-	mov	r0, r16
-	mov	r1, r17
-	$call	op_fnzprevious, args=<r16, r17, r4>, nonstandard=true
-	$call	fgncal_lclfini, set_arg_info=false, local=true, nonstandard=true
-	; doesn't return
-
-	$end_routine	name=prev
-
-	fgncal_old	gtm$previous, gtm$gblprevious, gtm$lclprevious
-
-
-	fgncal_entry	gtm$query, syn2, 3, 2
-
-	$linkage_section
-
-A_op_gvquery:	.address	op_gvquery
-
-
-	$code_section
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r28, Q_gtmi$_local
-	subq	r6, r28, r28
-	beq	r28, 1$
-	ldq	r2, A_op_gvquery
-	$call	fgncal_dispget, set_arg_info=false, local=true
-	; doesn't return
-
-1$:	subq	sp, 8, sp
-	stq	r5, (sp)
-	$call	push_mval, args=<A_literal_null>
-	mov	r0, r4
-	subq	sp, 8, sp
-	stq	r0, (sp)
-	addq	r3, 2, r3
-	calls	r3, op_fnquery
-	$call	fgncal_lclfini, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$query
-
-	fgncal_old	gtm$query, gtm$gblquery, gtm$lclquery
-
-
-	fgncal_entry	gtm$gblnext, syn2, 3, 2
-
-	$linkage_section
-
-A_op_gvnext:	.address	op_gvnext
-
-
-	$code_section
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r2, A_op_gvnext
-	$call	fgncal_dispget, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$gblnext
-
-
-
-	; NOTE:	For lock transactions, the mode is considered part of the key,
-	;	since there can be multiple keys in a lock transaction.
-	;
-
-
-	fgncal_entry	gtm$lock, syn1, 2, 0
-
-	$call	op_unlock, args=<>
-	ldq	r0, ARG_OFFSET(fp)
-	and	r0, ^Xff, r0		; number of original arguments
-	bne	r0, 100$
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-100$:	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	addq	sp, 8, sp
-	$call	op_lock, args=<r16>
-	subq	r0, 1, r28
-	beq	r28, 110$
-	ldl	r22, L_ERR_LCKSTIMOUT
-	ldq	r23, A_mumps_status
-	stl	r22, (r23)
-110$:	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$lock
-
-
-	fgncal_entry	gtm$inclock, syn1, 2, 0
-
-	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	addq	sp, 8, sp
-	$call	op_incrlock, args=<r16>
-	subq	r0, 1, r28
-	beq	r28, 111$
-	ldl	r22, L_ERR_LCKSTIMOUT
-	ldq	r23, A_mumps_status
-	stl	r22, (r23)
-111$:	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$inclock
-
-
-	fgncal_entry	gtm$declock, syn1, 1, 0
-
-	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	addq	sp, 8, sp
-	$call	op_decrlock, args=<r16>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$declock
-
-
-	fgncal_entry	gtm$zalloc, syn1, 2, 0
-
-	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	addq	sp, 8, sp
-	$call	op_zallocate, args=<r16>
-	subq	r0, 1, r28
-	beq	r28, 112$
-	ldl	r22, L_ERR_LCKSTIMOUT
-	ldq	r23, A_mumps_status
-	stl	r22, (r23)
-112$:	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$zalloc
-
-
-	fgncal_entry	gtm$zdealloc, syn1, 1, 0
-
-	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	addq	sp, 8, sp
-	$call	op_zdeallocate, args=<r16>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$zdealloc
-
-
-	fgncal_entry	gtm$lock2, syn3, 3, 0
-
-	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	ldq	r17, 8(sp)
-	addq	sp, 16, sp
-	$call	op_lock2, args=<r16, r17>
-	subq	r0, 1, r28
-	beq	r28, 113$
-	ldl	r22, L_ERR_LCKSTIMOUT
-	ldq	r23, A_mumps_status
-	stl	r22, (r23)
-113$:	$call	fgncal_dispret, set_arg_info=false, local=true
-
-	$end_routine	name=gtm$lock2
-
-
-	fgncal_entry	gtm$zdealloc2, syn3, 2, 0
-
-	$call	op_lkinit, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)
-	ldq	r17, 8(sp)
-	addq	sp, 16, sp
-	$call	op_zdealloc2, args=<r16, r17>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$zdealloc2
-
-
-	fgncal_entry	gtm$setgbldir, syn0, 1, 0
-
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r17, (sp)
-	addq	sp, 8, sp
-	lda	r16, 22(r31)
-	$call	op_svput, args=<r16, r17>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$setgbldir
-
-
-	fgncal_entry	gtm$ztstart, syn0, 0, 0
-
-	$call	op_ztstart, args=<>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$ztstart
-
-
-	fgncal_entry	gtm$ztcommit, syn0, 1, 0
-
-	ldq	r28, ARG_OFFSET(fp)
-	subq	r28, r7, r28
-	bge	r28, 10$
-	br	bparm
-
-10$:	$call	op_ztcommit, args=<ARG_OFFSET+8(fp)/Q>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$ztcommit
-
-
-	fgncal_entry	gtm$mval2subsc, syn0, 2, 0
-
-	ldq	r28, ARG_OFFSET(fp)
-	subq	r28, r7, r28
-	bge	r28, 10$
-	br	bparm
-
-10$:	$call	mval2subsc, args=<ARG_OFFSET+8(fp)/Q, ARG_OFFSET+16(fp)/Q>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$mval2subsc
-
-
-	fgncal_entry	gtm$rundown, syn0, 0, 0
-
-	$call	fgncal_rundown, args=<>
-	$call	fgncal_dispret, set_arg_info=false, local=true
-	; doesn't return
-
-	$end_routine	name=gtm$rundown
-
-
-	fgncal_entry	gtm$xecute, syn0, 1, 0
-
-	ldq	r28, ARG_OFFSET(fp)
-	subq	r28, r7, r28
-	bge	r28, 10$
-	br	bparm
-
-10$:	ldq	r11, A_xfer_table
-	ldq	r10, A_fgncal_rtn	; procedure descriptor
-	ldq	r10, 8(r10)	; entry point from procedure descriptor (=> routine header)
-	$call	base_frame, args=<r10>
-	$call	new_stack_frame, args=<r10, mrt$lnk_ptr(r10)/L, mrt$hdr_size(r10)/A>
-	$call	gtm_savetraps, args=<>
-	$call	fgncal_procarg, set_arg_info=false, local=true
-	ldq	r16, (sp)	; string to execute
-	addq	sp, 8, sp
-	lda	r17, 19(r31)	; indir_linetail
-	$call	op_commarg, args=<r16, r17>
-	ldq	r28, A_mdb_condition_handler
-	stq	r28, 8(fp)	; establish mdb_condition_handler as condition handler
-	getframe
-	imb
-	ret	r26		; it will go through gtm_ret_code on the way out
-
-	$end_routine	name=gtm$xecute
-
-	fgncal_entry	gtm$zstatus, syn0, 1, 0
-	ldq	r28, ARG_OFFSET(fp)
-	subq	r28, r7, r28
-	bge	r28, 10$
-	br	bparm
-
-10$:	ldq	r28, A_dollar_zstatus
-	$call	mval2desc, args=<r28, ARG_OFFSET+8(fp)/Q>, nonstandard=true	; convert it for caller
-	$call	fgncal_dispret, set_arg_info=false, local=true, nonstandard=true
-;	doesn't return
-
-	$end_routine	name=gtm$zstatus
-
-	.end
diff --git a/sr_avms/fgncal_rtn.m64 b/sr_avms/fgncal_rtn.m64
deleted file mode 100644
index 27fa710..0000000
--- a/sr_avms/fgncal_rtn.m64
+++ /dev/null
@@ -1,136 +0,0 @@
-	.title	fgncal_rtn dummy routine header for gtm$xecute
-
-	G_MSF
-
-
-;	The code PSECT must have the MIX attribute in order to contain data.
-$CODE$	=	"FGNCAL_RTN,QUAD,PIC,CON,REL,LCL,SHR,EXE,RD,MIX,NOWRT"
-
-	$routine	name=fgncal_rtn, entry=fgncal_rtn_ca, kind=stack, -
-			saved_regs=<r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, fp>, -
-			standard_prologue=false, data_section_pointer=true
-
-	$linkage_section
-L_ERR_GTMCHECK:	.long	ERR_GTMCHECK
-
-	$data_section
-literal_table:	.asciz	"$FGNXEC"
-
-	$code_section
-
-;	This is a dummy GT.M routine header so this routine can be treated as if
-;	it had been produced by the GT.M compiler (see rtnhdr.h).
-
-jsb:	; There should be no way to enter this code via the procedure descriptor
-	; but use the jsb field to handle that if it happens.
-	lda	sp, -$SIZE(sp)
-	stq	r27, (sp)
-	br	check		; jsb field full; finish this later
-
-	.if	ne,<.-jsb>,mrt$src_len
-	.error	"The dummy routine header jsb size is incorrect; please check it against g_msf.max."
-	.endc
-
-src_full_name:
-	.long		0			; source file name length
-	address_32	0			; source file name
-routine_name:
-	.long		7			; routine name length (sizeof("$FGNXEC") - 1)
-	address_32	$ds			; routine name (dummy)
-vartab_ptr:
-	.long		label_table - $cs	; variable table
-vartab_len:
-	.word		0			; variable table length
-	.word		0			; padding
-labtab_ptr:
-	.long		label_table - $cs	; label table
-labtab_len:
-	.word		2			; label table length
-	.word		0			; padding
-lnrtab_ptr:
-	.long		line_table - $cs	; line table
-lnrtab_len:
-	.word		1			; line table length
-	.word		0			; padding
-ptext_ptr:
-	.long		fgncal_rtn_code - $cs	; pointer to start of actual code
-checksum:
-	.long		0
-compiler_qlf:
-	.long		0
-old_rhead_ptr:
-	address_32	0
-current_rhead_ptr:
-	address_32	0
-temp_mvals:
-	.word		0
-temp_size:
-	.word		0
-linkage_ptr:
-	address_32	$ls
-literal_ptr:
-	address_32	$ds
-
-;	End of GT.M routine header.
-	.if	ne,<.-jsb>,mrt$hdr_size
-	.error	"The dummy routine header size is incorrect; please check it against g_msf.max."
-	.endc
-
-
-fgncal_rtn_code:
-	.base	r13, $ls	; should be set up by getframe
-	$call	opp_ret
-
-;	opp_ret shouldn't return; if it does, we have an error
-	br	check2		; skip pseudo prologue
-
-check:	; It should never EVER be possible to execute this from the top (jsb).
-
-	; First, finish the prologue begun in the jsb field (for debugging purposes)
-	stq	r26, $RSA_OFFSET(sp)
-	stq	r2, $RSA_OFFSET+8(sp)
-	stq	r3, $RSA_OFFSET+16(sp)
-	stq	r4, $RSA_OFFSET+24(sp)
-	stq	r5, $RSA_OFFSET+32(sp)
-	stq	r6, $RSA_OFFSET+48(sp)
-	stq	r7, $RSA_OFFSET+56(sp)
-	stq	r8, $RSA_OFFSET+64(sp)
-	stq	r9, $RSA_OFFSET+72(sp)
-	stq	r10, $RSA_OFFSET+80(sp)
-	stq	r11, $RSA_OFFSET+88(sp)
-	stq	r12, $RSA_OFFSET+96(sp)
-	stq	r13, $RSA_OFFSET+104(sp)
-	stq	r14, $RSA_OFFSET+112(sp)
-	stq	r15, $RSA_OFFSET+120(sp)
-	stq	fp, $RSA_OFFSET+128(sp)
-	mov	sp, fp
-	$end_prologue
-
-;	Set up base register r13 for either path to lib$signal call.
-	mov	r27, r13
-	.base	r13, $ls
-
-;	Next, complain bitterly about the invalid invocation.
-check2:	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-
-;	lib$signal should never return, but if it does, don't execute data:
-	$return
-
-
-;	Standard variable (null), label, and line tables for end of GT.M object module.
-
-
-;	Variable table would go here if there were one.
-
-label_table:	; initialize the lab_tabent entry
-	.long		0
-	address_32	0
-	.long		lte - fgncal_rtn_ca
-
-line_table:
-	.long	fgncal_rtn_code - fgncal_rtn_ca	; line 0
-lte:	.long	fgncal_rtn_code - fgncal_rtn_ca	; line 1
-
-	$end_routine	name=fgncal_rtn
-
-	.end
diff --git a/sr_avms/find_line_call.c b/sr_avms/find_line_call.c
deleted file mode 100644
index f60feb3..0000000
--- a/sr_avms/find_line_call.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "axp_registers.h"
-#include "axp_gtm_registers.h"
-#include "axp.h"
-#include "xfer_enum.h"
-#include <rtnhdr.h>	/* Needed by zbreak.h */
-#include "zbreak.h"
-
-/* Numeric literals are pushed on the stack or loaded into argument registers with a combination of the following instructions: */
-#define	PUSH_NUM_LIT1	(ALPHA_INS_LDAH)
-#define PUSH_NUM_LIT2	(ALPHA_INS_LDA)
-#define PUSH_NUM_LIT3	(ALPHA_INS_STQ	| (GTM_REG_ACCUM << ALPHA_SHIFT_RA)	| (ALPHA_REG_SP << ALPHA_SHIFT_RB))
-
-/* The first two instructions set up a procedure descriptor and transfer address; the third makes the call.  */
-#define	LOAD_XFER_ADDR1	(ALPHA_INS_LDL	| (ALPHA_REG_PV << ALPHA_SHIFT_RA)	| (GTM_REG_XFER_TABLE << ALPHA_SHIFT_RB))
-#define LOAD_XFER_ADDR2	(ALPHA_INS_LDQ	| (ALPHA_REG_RA << ALPHA_SHIFT_RA)	| (ALPHA_REG_PV << ALPHA_SHIFT_RB) \
-					| ((8 & ALPHA_MASK_DISP) << ALPHA_SHIFT_DISP))
-#define	XFER_CALL	(ALPHA_INS_JSR	| (ALPHA_REG_RA << ALPHA_SHIFT_RA)	| (ALPHA_REG_RA << ALPHA_SHIFT_RB))
-
-
-/*	find_line_call searches through machine instructions starting at the address corresponding to the
- *	beginning of a MUMPS statement looking for a call to any of op_linestart, op_zbstart, op_linefetch,
- *	or op_zbfetch.  It will return the address of the displacement field of the instruction that indexes
- *	to the desired runtime routine in order that its caller may examine or change that field.
- *
- *	find_line_call will skip over any number of numeric literal arguments to op_linefetch or op_zbfetch
- *	in its search for one of the desired calls.  If it doesn't find any, it will return the address of
- *	the offset field of the instruction to which addr points.
- *
- *	entry
- *		addr	address of beginning of MUMPS statement
- *
- *	exit
- *		returns address of displacement field containing offset into the transfer table in the
- *			instruction that refers to the transfer table
- */
-
-zb_code	*find_line_call(void *addr)
-{
-	uint4	*call_addr;
-	uint4	*xfer_addr;
-	short	xfer_offset;
-
-	call_addr = addr;
-	if ((LOAD_XFER_ADDR1 == (*call_addr & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP))) && (LOAD_XFER_ADDR2 == *(call_addr + 1)))
-	{
-		/* It's a transfer table load. */
-		xfer_addr = call_addr;
-		xfer_offset = (*xfer_addr >> ALPHA_SHIFT_DISP) & ALPHA_MASK_DISP;
-		call_addr += 2;
-		assert(XFER_CALL == *call_addr);
-		return ((zb_code *)addr);
-	}
-	/* Locate and skip over series of operand pushes.  This is not rigorous, but should catch a series of
-	 * numeric constant arguments:
-	 */
-	xfer_addr = call_addr;
-	if (   (PUSH_NUM_LIT1 == (*call_addr &  (ALPHA_MASK_OP << ALPHA_SHIFT_OP)))
-	    || (PUSH_NUM_LIT2 == (*call_addr &  (ALPHA_MASK_OP << ALPHA_SHIFT_OP)))
-            || (PUSH_NUM_LIT3 == (*call_addr & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP))))
-	{
-		while (    (PUSH_NUM_LIT1 == (*call_addr &  (ALPHA_MASK_OP << ALPHA_SHIFT_OP)))
-			|| (PUSH_NUM_LIT2 == (*call_addr &  (ALPHA_MASK_OP << ALPHA_SHIFT_OP)))
-			|| (PUSH_NUM_LIT3 == (*call_addr & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP))))
-			call_addr++;
-		/* If it's not a transfer table call, give up.  */
-		if (   (LOAD_XFER_ADDR1	!= (*call_addr & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)))
-		    || (LOAD_XFER_ADDR2	!= *(call_addr + 1))
-		    || (XFER_CALL 	!= *(call_addr + 2)))
-			return ((zb_code *)addr);
-		xfer_addr = call_addr;
-		xfer_offset = (*call_addr >> ALPHA_SHIFT_DISP) & ALPHA_MASK_DISP;
-		call_addr += 3;
-		if ((xf_linefetch * SIZEOF(int4) != xfer_offset) && (xf_zbfetch * SIZEOF(int4) != xfer_offset))
-			return ((zb_code *)addr);
-	} else if ((LOAD_XFER_ADDR1	== (*call_addr & ~(ALPHA_MASK_DISP << ALPHA_SHIFT_DISP)))
-		&& (LOAD_XFER_ADDR2	== *(call_addr + 1))
-		&& (XFER_CALL		== *(call_addr + 2)))
-	{
-		xfer_addr = call_addr;
-		xfer_offset = (*call_addr >> ALPHA_SHIFT_DISP) & ALPHA_MASK_DISP;
-		if ((xf_linestart * SIZEOF(int4) != xfer_offset) && (xf_zbstart * SIZEOF(int4) != xfer_offset))
-			return ((zb_code *)addr);
-	}
-	return ((zb_code *)xfer_addr);
-}
diff --git a/sr_avms/g_msf.max b/sr_avms/g_msf.max
deleted file mode 100644
index ea06c43..0000000
--- a/sr_avms/g_msf.max
+++ /dev/null
@@ -1,76 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2012 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.macro G_MSF
-
-;	msf - offsets into the GT.M MUMPS stack frame
-;
-;	note: these offsets correspond to fields in the stack frame defined in stack_frame.h
-
-	msf$rvector_off		=	0
-	msf$l_symtab_off	=	4
-	msf$mpc_off		=	8
-	msf$ctxt_off		=	12
-	msf$literal_ptr_off	=	16
-	msf$temps_ptr_off	=	20
-	msf$vartab_ptr_off	=	24
-	msf$vartab_len_off	=	28
-	msf$temp_mvals		=	30
-	msf$old_frame_off	=	32
-	msf$typ_off		=	36
-	msf$flags_off		=	38
-	msf$for_ctrl_stack	=	40
-
-	msf$frame_size		=	48
-
-;	Stack frame type (msf$typ_off) field bits (see also stack_frame.h):
-
-	sft_count		=	^X01	; frame counts (real code) or doesn't (transcendental code)
-	sft_dm			=	^X02	; direct mode
-	sft_rep_op		=	^X04	; frame to replace opcode (zbreak has already occurred)
-	sft_zbrk_act		=	^X08	; action frame for zbreak
-	sft_dev_act		=	^X10	; action frame for device error handler
-	sft_ztrap		=	^X20	; ztrap frame
-	sft_zstep_act		=	^X80	; action frame for a zstep
-	sft_zintr		=	^X100	; $zinterrupt frame
-
-;	Stack frame flag (msf$flags_off) bits (see in stack_frame.h)
-
-	sff_indce		=	^X01	; frame requires indr cache entry cleanup in op_unwind
-	sff_etrap_err		=	^X10	; A $ETRAP style error occurred while in this frame.
-
-;	mrt - offsets into the GT.M object file routine header
-;
-;	note: these offsets correspond to fields in the routine header defined in rtnhdr.h
-
-	mrt$jsb			=	0
-	mrt$src_len		=	12
-	mrt$src_addr		=	16
-	mrt$rtn_len		=	20
-	mrt$rtn_addr		=	24
-	mrt$var_ptr		=	28
-	mrt$var_len		=	32
-	mrt$lab_ptr		=	36
-	mrt$lab_len		=	40
-	mrt$lnr_ptr		=	44
-	mrt$lnr_len		=	48
-	mrt$ptxt_ptr		=	52
-	mrt$checksum		=	56
-	mrt$compiler_qlf	=	60
-	mrt$oldr_ptr		=	64
-	mrt$curr_ptr		=	68
-	mrt$tmp_mv		=	72
-	mrt$tmp_sz		=	74
-	mrt$lnk_ptr		=	76
-	mrt$lit_ptr		=	80
-
-	mrt$hdr_size	=	84
-
-	.endm
diff --git a/sr_avms/get_registers.m64 b/sr_avms/get_registers.m64
deleted file mode 100644
index 34de7a5..0000000
--- a/sr_avms/get_registers.m64
+++ /dev/null
@@ -1,11 +0,0 @@
-	.title	get_registers
-
-;	get_registers - copy machine registers into argument array
-;
-;	This is a stub.
-
-	$routine	name=get_registers,entry=get_registers_ca,kind=null
-
-	ret	r26
-
-	$end_routine	name=get_registers
diff --git a/sr_avms/getframe.max b/sr_avms/getframe.max
deleted file mode 100644
index bcf39e6..0000000
--- a/sr_avms/getframe.max
+++ /dev/null
@@ -1,33 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;                                                               ;
-;       Copyright 2001, 2011 Fidelity Information Services, Inc ;
-;                                                               ;
-;       This source code contains the intellectual property     ;
-;       of its copyright holder(s), and is made available       ;
-;       under a license.  If you do not know the terms of       ;
-;       the license, please stop and do not read further.       ;
-;                                                               ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;	Restore registers from the current GT.M MUMPS stack frame.
-;	Note: This macro puts the code address into some register; you may specify one or it will default to r26.
-
-	.macro	getframe	reg=r26, ?label
-
-	; A_frame_pointer must be address of quadword containing the address of frame_pointer
-	ldq	r12, A_frame_pointer
-	ldl	r12, (r12)
-        lda     r8, msf$flags_off(r12)
-        ldq_u   r9, (r8)
-        extbl   r9, r8, r9
-        and     r9, sff_etrap_err, r9
-        beq     r9, label
-        $call   ERROR_RETURN, set_arg_info=false, nonstandard=true
-        ldq     r12, A_frame_pointer
-        ldl     r12, (r12)
-label:	ldl	r8,  msf$l_symtab_off(r12)
-	ldl	r9,  msf$temps_ptr_off(r12)
-	ldl	r13, msf$ctxt_off(r12)
-	ldl	r14, msf$literal_ptr_off(r12)
-	ldl	reg, msf$mpc_off(r12)
-
-	.endm
diff --git a/sr_avms/gtm$defaults.m64 b/sr_avms/gtm$defaults.m64
deleted file mode 100644
index bbb69e2..0000000
--- a/sr_avms/gtm$defaults.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-;****************************************************************
-;*								*
-;*	Copyright 2002, 2011 Fidelity Information Services, Inc	*
-;*								*
-;*	This source code contains the intellectual property	*
-;*	of its copyright holder(s), and is made available	*
-;*	under a license.  If you do not know the terms of	*
-;*	the license, please stop and do not read further.	*
-;*								*
-;****************************************************************/
-
-	.TITLE	GTM$DEFAULTS
-GTM$USER_STACK_SIZE == 256 * 1024
-GTM$USER_SPAWN_FLAG == 0
-GTM$USER_INDRCACHE_SIZE == 32
-GTM$USER_STRPL_SIZE == 20480
-GTM$USER_IO_TIMER == 3300000
-GTM$USER_WRITE_FILTER == 0
-GTM$SPECIAL_INPUT == ^X000000
-GTM$UNDEF_INHIBIT == 0
-GTM$CTRLC_ENABLE  == 1
-GTM$BREAK_MESSAGE_MASK == 15
-GTM$LOWER_CASE_LABELS == 1
-GTM$LVNULLSUBS == 1
-GTM$ZDIR_FORM == 0
-GTM$ZDATE_FORM == 0
-	.END
diff --git a/sr_avms/gtm$fgncall.m64 b/sr_avms/gtm$fgncall.m64
deleted file mode 100644
index e1da2c0..0000000
--- a/sr_avms/gtm$fgncall.m64
+++ /dev/null
@@ -1,231 +0,0 @@
-	.title	gtm$fgncall perform calls from foreign languages to MUMPS
-
-
-	G_MSF
-	base_frame
-
-
-MAXARGS		=	32		; maximum number of arguments allowed
-
-;	Offsets from frame pointer into stack extension area.
-output		=	-8
-label		=	output - 8
-routine		=	label - 8
-argcnt		=	routine - 8
-arglist		=	argcnt - 8
-save_sp		=	arglist - 8
-
-end		=	save_sp - 8
-
-ARG_COPY	=	end - <<MAXARGS+1>*4>	; argument copy area (one extra space for argument count)
-
-
-;	Offsets from stack pointer into stack extension area.
-
-args		=	0		; address of local array [0:MAXARGS] into which fgn_parms builds its argument list
-retval		=	MAXARGS*4	; address of last element in the array into which fgn_parms puts return value address
-
-
-;	Invoked via entry created by MUMPS_BINDING macro.
-;
-;	Arguments:
-;		r16	address of MUMPS routine
-;		r17	address of MUMPS label
-;		r18	does MUMPS routine return a value (is it a function)? 1 => yes, 0 => no
-;		r19	address of argument list (starting with argument count)
-;		r20	= 0, if the MUMPS label has been resolved by VMS linker
-;			= length of the MUMPS label, if it hasn't been resolved by VMS linker
-
-;	The code PSECT must have the MIX attribute in order to contain data.
-$CODE$	=	"GTM$FGNCALL,QUAD,PIC,CON,REL,LCL,SHR,EXE,RD,MIX,NOWRT"
-
-	$routine	name=gtm$fgncall, entry=gtm$fgncall_ca, kind=stack, -
-			saved_regs=<%string(base_frame_regs)>, -
-			base_reg_is_fp=true, data_section_pointer=true -
-			rsa_offset=RSA_OFFSET, size=STACK_SIZE, -
-			standard_prologue=false, handler=GTM$DYN_CH, synch_exceptions=true
-
-	.if	ne,$SIZE,STACK_SIZE
-		.error "The stack size computed by $routine (%integer($SIZE)) differs from that defined in the -
-base_frame macro (%integer(STACK_SIZE))."
-	.endc
-
-	$linkage_section
-
-A_line1:		.address	line1
-A_var_on_cstack_ptr:	.address	var_on_cstack_ptr
-
-L_ERR_GTMCHECK:	.long		ERR_GTMCHECK
-
-	$data_section
-literal_table:	.asciz	"$FGNFNC"
-
-	$code_section
-
-jsb:
-	.base	r27, $ls
-
-;	the no-ops were introduced so that this code remains the same size
-;	at that of a generated mumps object file.
-	nop
-	nop
-	jsr	r0, (r0)	; gtm$main sets up the actual frame
-
-	$end_prologue
-
-	.if	ne,<.-$cs>,mrt$src_len
-		.error	"The dummy routine header jsb size is incorrect; please check it against g_msf.max."
-	.endc
-
-src_full_name:
-	.long		0			; source file name length
-	address_32	0			; source file name
-routine_name:
-	.long		7			; routine name length (sizeof("$FGNFNC") - 1)
-	address_32	$ds			; routine name (dummy)
-vartab_ptr:
-	.long		label_table - $cs	; variable table
-vartab_len:
-	.word		0			; variable table length
-	.word		0			; padding
-labtab_ptr:
-	.long		label_table - $cs	; label table
-labtab_len:
-	.word		1			; label table length
-	.word		0			; padding
-lnrtab_ptr:
-	.long		line_table - $cs	; line table
-lnrtab_len:
-	.word		2			; line table length
-	.word		0			; padding
-ptext_ptr:
-	.long		gtm$fgncode - $cs	; pointer to start of actual code
-checksum:
-	.long		0
-compiler_qlf:
-	.long		0
-old_rhead_ptr:
-	address_32	0
-current_rhead_ptr:
-	address_32	0
-temp_mvals:
-	.word		0
-temp_size:
-	.word		0
-linkage_ptr:
-	address_32	$ls
-literal_ptr:
-	address_32	$ds
-
-;	End of GT.M routine header.
-	.if	ne,<.-jsb>,mrt$hdr_size
-		.error	"The dummy routine header size is incorrect; please check it against g_msf.max."
-	.endc
-
-gtm$fgncode:
-;	gtm$main, among other things, creates a GT.M MUMPS stack frame for this routine;
-;	for which this is the entry point to which control is transferred by a
-;	"getframe/ret	r26" sequence.
-
-	.base	r13, $ls	; also set up by getframe/ret sequence
-
-;	Reset var_on_cstack_ptr for the new M environment
-	ldq	r28, A_var_on_cstack_ptr
-	stl	r31, (r28)	; var_on_cstack_ptr = NULL;
-
-;	Save the current error trap and NEW it before any error could possibly occur.
-	$call	gtm_savetraps, args=<>, set_arg_info=false
-
-;	Restore argument info and argument registers (saved here by gtm$main).
-	ldq	r20, $SIZE-16(fp)	; MUMPS label length (0 if resolved by LINK)
-	beq	r20, resolved
-	$call	fgn_resolve_lab, args=<$SIZE-48(fp)/Q, r20, $SIZE-40(fp)/Q>
-	stq	r0,  $SIZE-40(fp)
-resolved:
-	ldq	r16, $SIZE-48(fp)	; A(MUMPS routine)
-	ldq	r17, $SIZE-40(fp)	; A(MUMPS label)
-	ldq	r18, $SIZE-32(fp)	; output?
-	ldq	r19, $SIZE-24(fp)	; A(arg list to interface)
-
-	stq	r16, routine(fp)
-	stq	r17, label(fp)
-	stq	r18, output(fp)
-	stq	r19, arglist(fp)
-	stq	sp,  save_sp(fp)
-	ldq	r28, A_line1
-	stl	r28, msf$mpc_off(r12)
-line1:	ldq	r0, arglist(fp)	; original argument list
-	lda	r1, ARG_COPY(fp)
-	ldl	r22, (r0)	; number of arguments in arglist
-
-; 	Copy arguments from original arglist to array of longs (or address_32's).
-1$:	ldq	r28, (r0)
-	stl	r28, (r1)
-	lda	r0, 8(r0)
-	lda	r1, 4(r1)
-	subq	r22, 1, r22
-	bge	r22, 1$		; one extra iteration to include the argument count
-	$call	fgn_parms, args=<output(fp), sp, MAXARGS/A, ARG_COPY(fp)/A>
-	stq	r0, argcnt(fp)
-	bgt	r0, 5$		; if any arguments
-	ldq	r28, output(fp)
-	bgt	r28, 20$	; if it's a function
-	$call	op_extcall, args=<routine(fp), label(fp)>
-	br	after_call
-
-;	Extend stack and copy arguments returned from fgn_parms to extension.
-5$:	; Put first argument into appropriate register, then deal with rest.
-	ldl	r21, (sp)
-	mov	#MAXARGS+1, r22	; copy entire array, including extra space at end for retval
-	lda	r0, 4(sp)	; start of arguments that don't fit into argument registers
-	addq	r22, 1, r23	; round up to even double-quadword boundary
-	bic	r23, 1, r23
-	subq	r31, r23, r28	; negate because s8subq works backwards
-	s8addq	r28, sp, sp
-	mov	sp, r1
-10$:	ldl	r28, (r0)
-	stq	r28, (r1)
-	lda	r0, 4(r0)
-	lda	r1, 8(r1)
-	subq	r22, 1, r22
-	bgt	r22, 10$
-20$:	ldq	r22, save_sp(fp)
-	$call	op_extexfun, args=<routine(fp), label(fp), retval(r22)/L, 0/A, argcnt(fp), r21>, set_arg_info=false
-after_call:
-	ldq	sp,  save_sp(fp)
-	ldl	r16, retval(sp)
-	beq	r16, gohome
-	$call	op_exfunret, args=<r16>
-	ldq	r17, arglist(fp)
-	ldq	r17, 8(r17)
-	ldl	r16, retval(sp)
-	$call	mval2desc, args=<r16, r17>
-gohome:
-;	Leaving new M environment; reset var_on_cstack_ptr for the old M environment
-	ldq	r28, A_var_on_cstack_ptr
-	stl	r31, (r28)	; var_on_cstack_ptr = NULL;
-
-	$begin_epilogue
-	$call	opp_ret, set_arg_info=false
-
-;	shouldn't return
-	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-;	also shouldn't return
-
-
-;	Standard variable (null), label, and line tables for end of GT.M object module.
-
-;	Variable table would go here if there were one.
-
-label_table:	; initialize the lab_tabent entry
-	.long		0
-	address_32	0
-	.long		lte - $cs
-
-line_table:
-	.long	gtm$fgncode - $cs	; line 0
-lte:	.long	line1 - $cs		; line 1
-
-	$end_routine	name=gtm$fgncall
-
-	.end
diff --git a/sr_avms/gtm_code_address.m64 b/sr_avms/gtm_code_address.m64
deleted file mode 100644
index 649b6a6..0000000
--- a/sr_avms/gtm_code_address.m64
+++ /dev/null
@@ -1,17 +0,0 @@
-	.title	gtm_code_address	return code address for a routine given its procedure descriptor address
-
-;	gtm$code_address
-;
-;	entry:
-;		a0 (r16)	address of procedure descriptor
-;
-;	exit:
-;		r0		address of entry point indicated by procedure descriptor
-
-	$routine	name=gtm$code_address,entry=gtm$code_address_ca,kind=null
-
-	ldq	r0, 8(r16)
-
-	ret	r26
-
-	$end_routine	name=gtm$code_address
diff --git a/sr_avms/gtm_dyn_ch.m64 b/sr_avms/gtm_dyn_ch.m64
deleted file mode 100644
index 078c137..0000000
--- a/sr_avms/gtm_dyn_ch.m64
+++ /dev/null
@@ -1,80 +0,0 @@
-	.title	GTM_DYN_CH	dynamic condition handler interface
-
-;	WARNING: This condition handler uses an undocumented convention
-;	and library routine in Alpha VMS in order to emulate dynamic
-;	condition handlers for Alpha assembly language (MACRO) routines
-;	and GT.M-generated object modules.
-;
-;	This mechanism should be semantically identical to that of VAX VMS,
-;	whereby the address of the condition handler for a frame could be
-;	found in the longword at 0(FP) for that frame (0 => no condition
-;	handler in effect) at the time the condition occurred.  This
-;	allowed the condition handler for a frame to be changed by changing
-;	the value of that longword.
-;
-;	In order for a procedure P to support dynamic condition handler
-;	specifications for its activation stack frames:
-;
-;		1.  P must be a stack frame procedure
-;
-;		2.  P must establish GTM$DYN_CH as its static condition
-;		    handler (see OpenVMS Calling Standard and OpenVMS
-;		    Programming Concepts Manual)
-;
-;		3.  P must reserve the quadword at 8(FP) for the address
-;		    of the procedure value of the currently-active condition
-;		    handler; this quadword should be initialized to zero
-;		    (indicating no condition handler active) or to the
-;		    address of a real procedure value during the entry
-;		    prologue before setting FP to ensure a valid value is
-;		    always present.
-;
-;		4.  It is possible P should also reserve the quadword at
-;		    16(FP), although it need not be initialized.
-;
-;	It may be necessary to modify this at some future Alpha VMS
-;	operating system release to conform to any changes in the condition
-;	handler conventions.  In this instance, compile the following VAX
-;	MACRO program with:
-;
-;		macro/migration/machine/lis
-;
-;	and examine the resulting .LIS file to determine how the static
-;	condition handler works (use it as a basis for the changes to
-;	GTM$DYN_CH) and where to store the address of the dynamically-
-;	specified condition handler (mdb_condition_handler in the example):
-;
-;		.title	zero_fp
-;
-;		.psect	zero_fp pic,usr,rel,gbl,shr,exe,rd,nowrt,novec,quad
-;
-;		.call_entry	preserve=all,label=zero_fp
-;		movl	mdb_condition_handler, 0(fp)
-;		ret
-;		.end
-
-
-	$linkage_section
-
-l_ots$call_proc:
-	.linkage_pair	OTS$CALL_PROC
-
-
-	$routine	name=gtm$dyn_ch,entry=gtm$dym_ch_ca,kind=null
-
-	.base	r27, $ls
-
-	ldq	r28, 8(r17)	; 8(a1) = MCH_FRAME in the condition handler mechanism array (second argument)
-	ldl	r28, 8(r28)	; 8(establisher's FP) = A(currently established condition handler for that frame)
-	beq	r28, no_handler
-	mov	r28, r23	; t2 <- A(condition handler to invoke)
-	ldq	r28, l_ots$call_proc	; N.B., don't modify caller's r26
-	bis	r31, 1, r24	; t3 <- 1
-	lda	r27, l_ots$call_proc+8
-	jmp	r28		; goto OTS$CALL_PROC
-
-no_handler:			; no established condition handler for that frame
-	lda	r0, 2328(r31)	; r0 <- SS$_RESIGNAL
-	ret	r26
-
-	$end_routine	name=gtm$dyn_ch
diff --git a/sr_avms/gtm_main.m64 b/sr_avms/gtm_main.m64
deleted file mode 100644
index db2d2c0..0000000
--- a/sr_avms/gtm_main.m64
+++ /dev/null
@@ -1,218 +0,0 @@
-;****************************************************************
-;*								*
-;*	Copyright 2002, 2012 Fidelity Information Services, Inc	*
-;*								*
-;*	This source code contains the intellectual property	*
-;*	of its copyright holder(s), and is made available	*
-;*	under a license.  If you do not know the terms of	*
-;*	the license, please stop and do not read further.	*
-;*								*
-;****************************************************************/
-
-	.title	gtm_main	dispatch code for run-time system
-
-	G_MSF
-	base_frame
-
-$CODE$	=	"GTM$INIT,QUAD,PIC,CON,REL,LCL,SHR,EXE,NOWRT"
-$DATA$	=	"GTM$VECTOR,OCTA,PIC,OVR,REL,LCL,NOSHR,NOEXE,WRT"
-$LINK$	=	"GTM$LINK,OCTA,NOPIC,CON,REL,LCL,NOSHR,NOEXE,WRT"
-
-
-	$data_section
-gtm_vector:
-argcnt:			.long		<gtm_vector_end - gtm_vector>
-rtn_start:		address_32	start
-rtn_end:		address_32	end
-zctable_start:		address_32	gtm$startzc
-zctable_end:		address_32	gtm$endzc
-zcpack_start:		address_32	gtm$startzcpack
-zcpack_end:		address_32	gtm$endzcpack
-vax_fp:			.long		0
-xf_table:		.long		0
-frm_ptr:		.long		0
-base_addr:		.long		0
-gtm_main_inaddr:	address_32	gtm$main
-user_stack_size:	.long		GTM$USER_STACK_SIZE
-user_spawn_flag:        .long           GTM$USER_SPAWN_FLAG
-user_indrcache_size:	.long		GTM$USER_INDRCACHE_SIZE
-user_strpl_size:	.long		GTM$USER_STRPL_SIZE
-user_io_timer:		.long		GTM$USER_IO_TIMER
-user_write_filter:	.long		GTM$USER_WRITE_FILTER
-special_input:		.long		GTM$SPECIAL_INPUT
-undef_inhib:		.long		GTM$UNDEF_INHIBIT
-ctrlc_enable:		.long		GTM$CTRLC_ENABLE
-break_message_mask:	.long		GTM$BREAK_MESSAGE_MASK
-labels:			.long		GTM$LOWER_CASE_LABELS
-lvnullsubs:		.long		GTM$LVNULLSUBS
-zdir_form:		.long		GTM$ZDIR_FORM
-zdate_form:		.long		GTM$ZDATE_FORM
-sysid:			address_32	gtm_sysid_mstr
-dlr_truth:		.long		0
-gtm_vector_end = .
-
-gtm_sysid_mstr:		.long		9		;These lines
-			address_32	gtm_sysid	;		construct
-gtm_sysid:		.ascii		"gtm_sysid"	; 				an mstr
-
-;	These dummy PSECT's will be sorted (alphabetically) by the linker
-;	to delimit the beginning and end of the initial routines name
-;	(rtn_tables) table.  In order for this to work, they must have the
-;	same significant attributes as those of the PSECT generated by
-;	create_object_file (in obj_file.c) and must have alignment requirements
-;	no more restrictive than those of rtn_tables.
-
-;	GTM$R - beginning of initial routine tables
-	.psect	gtm$r		pic,rel,gbl,noshr,noexe,rd,wrt,novec,long
-	NUL = ^X00
-	DEL = ^X7F
-start:	.long	8			; length of start_rtn_name
-	address_32 start_rtn_name
-	.long	0			; dummy address
-
-;	GTM$RZZZZZZZZZZZZZZZZZZZZZZZZZZ - end of initial routine tables plus some room for expansion
-	.psect	gtm$rzzzzzzzzzzzzzzzzzzzzzzzzzz	pic,rel,gbl,noshr,noexe,rd,wrt,novec,long
-end:	.long	8			; length of end_rtn_name
-	address_32 end_rtn_name
-	.long	0			; dummy address
-	.blkl	17 * 3			; extra room for expansion (FREE_RTNTBL_SPACE * (sizeof(rtn_tables)/sizeof(long))) (BYPASSOK)
-
-	.psect	gtm$rtn_literals pic,rel,gbl,shr,noexe,rd,nowrt,novec,quad
-start_rtn_name:				; name guaranteed to sort before all others
-	.ascii	<NUL><NUL><NUL><NUL><NUL><NUL><NUL><NUL>
-	.align quad			; so the next name starts at 8-byte boundary
-end_rtn_name:				; name guaranteed to sort after all others
-	.ascii	<DEL><DEL><DEL><DEL><DEL><DEL><DEL><DEL>
-
-
-;	gtm$main - GT.M initialization interface
-;
-;	The routine header for all GT.M object files contains code to transfer control
-;	to gtm$main.  This code executes first whenever the GT.M object file is invoked
-;	by VMS (e.g., as the first module in an executable image) in order to set up
-;	the Alpha stack frame for GT.M and to ensure gtm$startup gets called to initialize
-;	the GT.M environment properly.
-;
-;	Dynamically-linked GT.M object modules or those not the first to execute are
-;	invoked at the address following the routine header and, so, do not invoke gtm$main.
-;
-;	gtm$main is invoked by the instruction sequence (see create_object_file in obj_file.c):
-;		ldq	r0, gtm$main_linkage_pair(r27)
-;		ldq	r1, gtm$main_linkage_pair+8(r27)
-;		jmp	r0, (r0)
-;	so that gtm$main can execute in its caller's stack frame (and initialize it).
-;
-;	Entry:
-;		r0	return address in gtm$main's GT.M caller (just after jsb field in routine header)
-;		r1	address of gtm$main's procedure descriptor
-
-	$routine	gtm$main, entry=gtm$main_ca, kind=stack, -
-			saved_regs=<%string(base_frame_regs)>, -
-			base_reg_is_fp=true, data_section_pointer=true, -
-			rsa_offset=RSA_OFFSET, size=STACK_SIZE, -
-			standard_prologue=false, handler=GTM$DYN_CH, synch_exceptions=true
-
-	create_base_frame	; special prologue code + extend stack for argument push area
-
-	mov	r1,  r13
-	.base	r13, $ls
-
-;	init_gtm (<return address (just past jsb field in routine header)>, <caller's and our frame pointer>)
-	mov	^x0, r18	; indicate that this is not a DAL case
-	$call	init_gtm, local=true, nonstandard=true, set_arg_info=false, scratch_regs=<r28>, args=<r0, fp, r18>
-
-	ldq	r22, $dp
-	.base	r22, $ds
-
-	ldl	r10, dlr_truth
-	ldl	r11, xf_table
-	ldl	r12, frm_ptr
-	ldl	r8,  msf$l_symtab_off(r12)
-	ldl	r9,  msf$temps_ptr_off(r12)
-	ldl	r28, msf$rvector_off(r12)	; get routine header of GT.M MUMPS routine to invoke
-	ldl	r13, mrt$lnk_ptr(r28)		; linkage Psect address not initialized by init_gtm -- obtain from routine header
-	stl	r13, msf$ctxt_off(r12)
-	ldl	r14, mrt$lit_ptr(r28)		; literal Psect address not initialized by init_gtm -- obtain from routine header
-	stl	r14, msf$literal_ptr_off(r12)
-	ldl	r26, msf$mpc_off(r12)
-
-;	Don't do a normal $return; leave stack unchanged.
-;	begin	pseudo-epilogue
-	$begin_epilogue
-	trapb					; synchronize exceptions
-	ret	r26
-	$end_epilogue
-;	end	pseudo-epilogue
-
-	$end_routine	name=gtm$main
-
-
-;	init_gtm - invoke gtm$startup to initialize GT.M
-;
-;	init_gtm initializes some fields in the startup vector, gtm_vector,
-;	and then invokes gtm$startup to complete GT.M environment
-;	initialization.
-;
-;	args	a0 (r16)  - return address of GT.M caller
-;			For a GT.M object module, this will be the
-;			  address immediately following the call to
-;			  gtm$main and will be in the routine header.
-;			For a foreign-language routine, this should
-;			  have been set to zero by gtm$init.
-;
-;		a1 (r17) - fp of condition handler
-;			This is the frame pointer of the stack frame
-;			that will contain the condition handler address.
-;			For GT.M objects that call gtm$main, this will be
-;			the first-invoked object module.
-;			For foreign-language calls, this will be the
-;			stack from for gtm$init.
-;
-;		a2 (r18) - flag that indicates whether this function was
-;			invoked from gtm$main (0) or gtm$init (1)
-
-	$routine	name=init_gtm, entry=init_gtm_ca, local=true, -
-			standard_prologue=true, kind=stack, -
-			base_reg_is_fp=true, saved_regs=<fp>, -
-			data_section_pointer=true
-
-	.base	r27, $ls
-	ldq	r22, $dp
-	.base	r22, $ds
-
-	stl	r16, base_addr
-	addq	r17, 8, r28	; add 8 to point to address of handler
-	stl	r28, vax_fp
-	$call	gtm$startup, args=<gtm_vector/A, r18>	; second parameter indicates whether this is DAL or not
-	$return
-
-	$end_routine	name=init_gtm
-
-
-;	gtm$init - interface to GT.M for foreign-language routines
-;
-;	Foreign-language (non-GT.M) programs that wish to invoke GT.M
-;	routines should call gtm$init first to invoke the GT.M initialization
-;	code.
-
-	$linkage_section
-A_LIB$SIG_TO_RET:
-	.address	LIB$SIG_TO_RET
-
-	$routine	name=gtm$init, entry=gtm$init_ca, standard_prologue=true, kind=stack, -
-			base_reg_is_fp=true, rsa_offset=24, saved_regs=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,fp>, -
-			handler=GTM$DYN_CH, synch_exceptions=true
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r28, A_LIB$SIG_TO_RET
-	stl	r28, 8(fp)	; establish LIB$SIG_TO_RET as handler
-	mov	^x1, r18	; indicate that this is a DAL case
-	$call	init_gtm, local=true, args=<r31, fp, r18>
-	lda	r0, 1(r31)	; return success
-	$return
-
-	$end_routine	name=gtm$init
-
-	.end
diff --git a/sr_avms/gtm_memmove.c b/sr_avms/gtm_memmove.c
deleted file mode 100644
index 73e1737..0000000
--- a/sr_avms/gtm_memmove.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- * ---------------------------------------------------
- * memmove() - Move memory.
- *	This routine may replace any existing memcpy()
- *	calls. It correctly handles overlapping memory
- *	regions.
- *
- * Arguments:
- *	same as memcpy()
- *	pdest	- pointer to destination
- *	psrc	- pointer to source
- *	cnt	- # of bytes to copy
- * Return:
- *	pointer to destination
- * ---------------------------------------------------
- */
-
-#include "mdef.h"
-
-char_ptr_t gtm_memmove(char_ptr_t pdest,
-		   char_ptr_t psrc,
-		   int cnt)
-{
-	register char_ptr_t src, dst;
-
-	assert((0 <= cnt) && (cnt <= MAXPOSINT4));	/* nothing beyond max positive int4 allowed */
-	src = psrc;
-	dst = pdest;
-	if (cnt && dst != src)
-	{
-		if (src < dst && src + cnt > dst)
-		{
-			/* Overlapping region, downward copy, copy backwards */
-			dst += cnt;
-			src += cnt;
-			while (cnt-- > 0)
-				*--dst = *--src;
-		}
-		else
-		{
-			while (cnt-- > 0)
-				*dst++ = *src++;
-		}
-	}
-	return (pdest);
-}
diff --git a/sr_avms/gtm_ret_code.m64 b/sr_avms/gtm_ret_code.m64
deleted file mode 100644
index c8a556b..0000000
--- a/sr_avms/gtm_ret_code.m64
+++ /dev/null
@@ -1,48 +0,0 @@
-	.title	gtm_ret_code
-
-	base_frame
-
-	$routine	gtm_ret_code, entry=gtm_ret_code_ca, kind=stack, -
-			saved_regs=<%string(base_frame_regs)>, -
-			rsa_offset=RSA_OFFSET, size=STACK_SIZE, -
-			standard_prologue=false, base_reg_is_fp=true, rsa_offset=RSA_OFFSET
-
-	.if	ne,$SIZE,STACK_SIZE
-		.error	"The stack frame size computed by $routine (%integer($SIZE)) differs from that defined in the base_frame -
-macro (%integer(STACK_SIZE))."
-	.endc
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-A_msp:			.address	msp
-A_mumps_status:		.address	mumps_status
-
-
-;	Since gtm_ret_code executes in the machine stack frame set up by gtm$main, it need not set
-;	up the stack frame and because gtm_ret_code can only be invoked via a getframe/ret sequence,
-;	r13 has the address of the procedure descriptor, not r27.
-
-	$code_section
-
-	.base	r13, $ls
-	$end_prologue
-
-	stq	r31, 8(fp)		; clear pointer to condition handler address
-	$call	op_unwind, set_arg_info=false, nonstandard=true
-	ldq	r0,  A_msp
-	ldl	r28, (r0)
-	ldq	r1,  A_frame_pointer
-	ldl	r22, (r28)
-	stl	r22, (r1)		; frame_pointer = msp
-	lda	r28, 4(r28)
-	stl	r28, (r0)		; msp += 4
-	ldq	r28, A_mumps_status
-	ldl	r0,  (r28)		; return code
-
-	$return				; use standard $return macro to ensure epilogue uses values from the
-					;	$routine macro as defined in the base_frame macro
-
-	$end_routine	name=gtm_ret_code
-
-	.end
diff --git a/sr_avms/gtm_zc.m64 b/sr_avms/gtm_zc.m64
deleted file mode 100644
index b69fe21..0000000
--- a/sr_avms/gtm_zc.m64
+++ /dev/null
@@ -1,19 +0,0 @@
-	.title	gtm_zc	GTM ZCALL PSECT DEFINITIONS
-
-	.psect gtm$zcalltabaaa	pic,ovr,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	.long	0
-gtm$startzc::
-
-	.psect gtm$zcalltabaac	pic,ovr,rel,gbl,shr,noexe,rd,nowrt,novec,byte
-gtm$endzc::
-	.byte	0
-
-	.psect gtm$zcallpackaa	pic,ovr,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	.long	0
-gtm$startzcpack::
-
-	.psect gtm$zcallpackac	pic,ovr,rel,gbl,shr,noexe,rd,nowrt,novec,byte
-gtm$endzcpack::
-	.byte	0
-
-	.end
diff --git a/sr_avms/gtmi$def.m64 b/sr_avms/gtmi$def.m64
deleted file mode 100644
index c7c0263..0000000
--- a/sr_avms/gtmi$def.m64
+++ /dev/null
@@ -1,14 +0,0 @@
-	.title	gtmi$def	definitions for gtm external interface
-gtmi$_global == 1
-gtmi$_naked  == 2
-gtmi$_extgbl == 3
-gtmi$_local  == 4
-gtmi$_extlcl == 5
-
-gtmi$_lock    == 6
-gtmi$_zalloc  == 7
-gtmi$_zdealloc== 8
-gtmi$_inclock == 9
-gtmi$_declock == 10
-gtmi$_unlock == 11
-	.end
diff --git a/sr_avms/gtmsecplv.m64 b/sr_avms/gtmsecplv.m64
deleted file mode 100644
index d8790e5..0000000
--- a/sr_avms/gtmsecplv.m64
+++ /dev/null
@@ -1,60 +0,0 @@
-	.title	gtmsecplv - GTMSECSHR PLV (privileged library vector)
-
-
-;	PLV (privileged library vector) for GTMSECSHR.
-;
-;	This is the Alpha AXP OpenVMS analogue for the VAX VMS PLV in the GT.M VAX source file: KERN_MODE.MAR
-;
-;	NOTE:  At the time this was written (10/29/93), the Alpha AXP OpenVMS documentation apparently did not
-;	match the actual implementation of this feature.  In particular, many of the following fields were
-;	described as 64 bits wide when, apparently, they must be 32 bits wide due to an as-yet-undocumented
-;	change to VMS.  Further, there seemed to be no system-supplied C header files or MACRO macro libraries
-;	that defined anything useful related to PLV's; if this situation changes, this file should be modified
-;	to use any system-supplied definitions that prove useful.
-;
-;	References:
-;		OpenVMS Programming Concepts Manual
-;		OpenVMS Linker Utility Manual
-;
-;	See also:
-;		Examples in files whose names start with "UWSS" (for User-Written System Service) in the
-;		directory SYS$EXAMPLES.  Pay special attention to the comments and revision history comments.
-
-
-PLV$C_TYP_CMOD	=	1	; not yet defined in any usable system include file (see $PLVDEF in some future VMS release?)
-
-	.psect	gtmsecplv, QUAD, PIC, CON, LCL, SHR, NOEXE, NOWRT, VEC
-
-
-	.long		PLV$C_TYP_CMOD		; PLV$L_TYPE
-	.long		0			; PLV$L_VERSION - system version number (unused)
-	.long		<kernel_routine_list_end - kernel_routine_list>/4	; PLV$L_KERNEL_ROUTINE_COUNT
-	.long		0			; PLV$L_EXEC_ROUTINE_COUNT
-	address_32	kernel_routine_list	; PLV$PS_KERNEL_ROUTINE_LIST
-	address_32	0			; PLV$PS_EXEC_ROUTINE_LIST
-	address_32	rundown_dispatch	; PLV$PS_KERNEL_RUNDOWN_HANDLER
-	.long		0			; reserved
-	address_32	0			; PLV$PS_RMS_DISPATCHER
-	.long		0			; reserved
-	.long		0			; reserved
-
-
-;	NOTE: I believe these addresses need to be in the same order as they appear in the symbol_vector
-;	definition in the buildsec.com GTMSECSHR linker options file.  That may not be the case, but it
-;	keeping them in the same order will probably not cause problems.
-
-kernel_routine_list:
-	address_32	crit_wake
-	address_32	del_sec
-	address_32	init_sec
-	address_32	gtm_enq
-	address_32	gtm_enqw
-	address_32	gtm_deq
-	address_32	gtm_blkast
-	address_32	get_proc_info
-	address_32	init_secshr_addrs
-	address_32	gtm_getlkiw
-	address_32	secshr_db_clnup
-kernel_routine_list_end:
-
-	.end
diff --git a/sr_avms/gtmshrlink.axp b/sr_avms/gtmshrlink.axp
deleted file mode 100644
index d103b0b..0000000
--- a/sr_avms/gtmshrlink.axp
+++ /dev/null
@@ -1,74 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001, 2013 Fidelity Information Services, Inc	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-objlib/lib
-symbol_vector=( -
-	gtm$compile	= PROCEDURE, -
-	gtm$startup	= PROCEDURE, -
-	gtm$gblget	= PROCEDURE, -
-	gtm$gblput	= PROCEDURE, -
-	gtm$gblnext	= PROCEDURE, -
-	gtm$gblorder	= PROCEDURE, -
-	gtm$gblprevious	= PROCEDURE, -
-	gtm$gbldata	= PROCEDURE, -
-	gtm$gblkill	= PROCEDURE, -
-	gtm$gblquery	= PROCEDURE, -
-	gtm$lock	= PROCEDURE, -
-	gtm$inclock	= PROCEDURE, -
-	gtm$declock	= PROCEDURE, -
-	gtm$zalloc	= PROCEDURE, -
-	gtm$zdealloc	= PROCEDURE, -
-	gtm$setgbldir	= PROCEDURE, -
-	gtm$ztstart	= PROCEDURE, -
-	gtm$ztcommit	= PROCEDURE, -
-	gtm$interrupt	= PROCEDURE, -
-	gtm$fgncall	= PROCEDURE, -
-	gtm$mval2subsc	= PROCEDURE, -
-	gtm$gblwithdraw	= PROCEDURE, -
-	gtm$lclget	= PROCEDURE, -
-	gtm$lclkill	= PROCEDURE, -
-	gtm$lclput	= PROCEDURE, -
-	gtm$lclwithdraw	= PROCEDURE, -
-	gtm$lcldata	= PROCEDURE, -
-	gtm$lclquery	= PROCEDURE, -
-	gtm$lclorder	= PROCEDURE, -
-	gtm$lclprevious	= PROCEDURE, -
-	gtm$xecute	= PROCEDURE, -
-	gtm$rundown	= PROCEDURE, -
-	gtm$get		= PROCEDURE, -
-	gtm$kill	= PROCEDURE, -
-	gtm$put		= PROCEDURE, -
-	gtm$withdraw	= PROCEDURE, -
-	gtm$data	= PROCEDURE, -
-	gtm$query	= PROCEDURE, -
-	gtm$order	= PROCEDURE, -
-	gtm$previous	= PROCEDURE, -
-	gtm$zkill	= PROCEDURE, -
-	gtm$lock2	= PROCEDURE, -
-	gtm$zdealloc2	= PROCEDURE, -
-	gtm$ce_establish	= PROCEDURE,-
-	gtm$ce_getinfo	= PROCEDURE, -
-	gtm$dyn_ch	= PROCEDURE, -
-	gtm_malloc	= PROCEDURE, -
-	gtm_free	= PROCEDURE, -
-	gtm$zstatus	= PROCEDURE -
-	)
-gsmatch=lequal,11,0
-! Because the linker creates image sections on a per-cluster
-! basis, create a cluster for all of the code Psect's (whose
-! pages can be shared among processes) and collect all of the
-! code Psect's into it so the pages corresponding to that image
-! section can be shared.  Note the MACRO/MIGRATION compiler
-! names its code Psect "$CODE" (as do most of the VAX compilers),
-! while the AXP C compiler and MACRO assembler name their code
-! Psect's "$CODE$".
-cluster = code_clust
-collect = code_clust,$CODE,$CODE$
diff --git a/sr_avms/gtmstopzc.m64 b/sr_avms/gtmstopzc.m64
deleted file mode 100644
index f5a3760..0000000
--- a/sr_avms/gtmstopzc.m64
+++ /dev/null
@@ -1,22 +0,0 @@
-	.TITLE	GTMSTOPZC
-	.LIBRARY	"GTM$VRT:[PRO]GTMZCALL.MLB"
-	.IDENT	"V1.00-1"
-;
-;	ZCALL table and routines for GTMSTOP.M and GTCMSTOP.M
-;
-	.EXTERNAL ERR_FORCEDHALT
-	ZCINIT
-
-	ROUTINE	CALLNAME=FORCEX, LINKNAME=SYS$FORCEX, INPUTS=3, OUTPUTS=0
-	RETURN	CLASS=VALUE, TYPE=LONG
-	INPUT	TYPE=LONG, MECHANISM=REFERENCE, POSITION=1, QUALIFIER=REQUIRED
-	INPUT	TYPE=LONG, MECHANISM=VALUE, POSITION=2, QUALIFIER=CONSTANT, VALUE=0
-	INPUT	TYPE=LONG, MECHANISM=VALUE, POSITION=3, QUALIFIER=CONSTANT, VALUE=ERR_FORCEDHALT
-
-
-	ROUTINE	CALLNAME=DELPRC, LINKNAME=SYS$DELPRC, INPUTS=2, OUTPUTS=0
-	RETURN	CLASS=VALUE, TYPE=LONG
-	INPUT	TYPE=LONG, MECHANISM=REFERENCE, POSITION=1, QUALIFIER=REQUIRED
-	INPUT	TYPE=LONG, MECHANISM=VALUE, POSITION=2, QUALIFIER=CONSTANT, VALUE=0
-	ZCALLFIN
-	.END
diff --git a/sr_avms/gtmzcall.max b/sr_avms/gtmzcall.max
deleted file mode 100644
index 7d2f4c9..0000000
--- a/sr_avms/gtmzcall.max
+++ /dev/null
@@ -1,483 +0,0 @@
-; ****************************************************************
-; *								 *
-; *      Copyright 2001, 2012 Fidelity Information Services, Inc   *
-; *      This source code contains the intellectual property     *
-; *      of its copyright holder(s), and is made available       *
-; *      under a license.  If you do not know the terms of       *
-; *      the license, please stop and do not read further.       *
-; *                                                              *
-; ****************************************************************
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro package zcpackage_name
-	.if	ge	zc$maxpos
-		endrout
-	.endc
-	.if	df	zcpack_start
-		endpack
-	.endc
-	.macro labelentry cname	; use of this macro is currently suppressed
-	__GTM$ZC'zcpackage_name'.'cname'::
-	.endm
-
-	zcpack_start = zctalloc
-	zcpack_name = zcvalloc
-	.save_psect	local_block
-	.psect	gtm$zcallvalues		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,quad
-	. = zcvalloc
-	.ascic	"zcpackage_name"
-	zcvalloc = .
-	.psect	gtm$zcalltabaab		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	.restore_psect
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	routine	callname, linkname, inputs=0, outputs=0, outofband=default
-
-	zc$num_args	= inputs + outputs
-
-	.irp	$$tmp, <callname, linkname, inputs, outputs>
-	.if	b	$$tmp
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: ROUTINE callname, linkname, inputs, outputs
-		.error		;REQUIRED KEYWORD OMITTED
-		.mexit
-	.endc
-	.endr
-
-	.irp	$$tmp, <inputs, outputs>
-	.if	lt	$$tmp
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: ROUTINE callname, linkname, inputs, outputs
-		.error		;INPUTS AND OUTPUTS MUST BE >= 0
-		.mexit
-	.endc
-	.endr
-
-	.if	ndf	zc$rout_'outofband
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: ROUTINE outofband
-		.error		; UNDEFINED OUT-OF-BAND KEYWORD: outofband
-		.mexit
-	.endc
-	.if	ge	zc$maxpos
-		endrout
-	.endc
-
-	;labelentry callname	;this is suppressed until case issues are resolved
-	.align		long
-	.word		<<<<<2+1+1+4+1+1+1+%length(callname)+2+3>/4>*4>+<8*inputs>+<8*outputs>+1+3>/4>*4
-	.byte		inputs
-	.byte		outputs
-	address_32	linkname
-	.byte		zc$rout_'outofband
-	.byte		0			; padding
-	.ascic		"callname"
-	zc$maxpos = 0
-	zc$retlin = 0
-	zc$ip = 0
-	zc$op = 0
-	zc$ips = inputs
-	zc$ops = outputs
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	return	class=status, type
-
-	.if	ne zc$retlin
-		.print	;GT.M EXTERNAL CALL FORMAT ERROR:
-		.error	;RETURN LINE MUST IMMEDIATELY FOLLOW ROUTINE
-		.mexit
-	.endc
-	.irp	$$tmp, <class>
-	.if	b	$$tmp
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: RETURN class, type
-		.error		;REQUIRED KEYWORD OMITTED
-		.mexit
-	.endc
-	.endr
-	.if	ndf	zc$retc_'class
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: RETURN class, type
-		.error		; UNDEFINED RETURN_CLASS KEYWORD: class
-		.mexit
-	.endc
-	.if	eq	zc$retc_'class - zc$retc_value
-		.if	b	type
-		.ift
-			.print		;GT.M EXTERNAL CALL FORMAT ERROR: RETURN class, type
-			.error		;REQUIRED KEYWORD OMITTED
-			.mexit
-		.iff
-			.if	ndf	zc$dtype_'type
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: RETURN class, type
-				.error		; UNDEFINED RETURN_CLASS KEYWORD: class
-				.mexit
-			.endc
-			.if	eq	zc$dtype_'type - zc$dtype_string
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: RETURN class, type
-				.error		;ILLEGAL COMBINATION
-				.mexit
-			.endc
-			.if	eq	zc$dtype_'type - zc$dtype_h_floating
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: RETURN class, type
-				.error		;ILLEGAL COMBINATION
-				.mexit
-			.endc
-		.endc
-	.endc
-
-	.byte		zc$retc_'class
-	.byte		zc$dtype_'type
-	.align		long
-	zc$retlin = 1
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	input	qualifier=required,type,mechanism,position,value
-
-	.if	eq zc$retlin
-		return
-	.endc
-	.irp	$$tmp, <type,mechanism,position>
-	.if	b	$$tmp
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		;REQUIRED KEYWORD OMITTED
-		.mexit
-	.endc
-	.endr
-	.if	ndf	zc$dtype_'type
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		; UNDEFINED INPUT_TYPE KEYWORD: type
-		.mexit
-	.endc
-	.if	ndf	zc$mech_'mechanism
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		; UNDEFINED INPUT_MECHANISM KEYWORD: mechanism
-		.mexit
-	.endc
-	.if	eq	zc$dtype_string - zc$dtype_'type
-		.if	ne	zc$mech_descriptor - zc$mech_'mechanism
-			.if	ne	zc$mech_descriptor64 - zc$mech_'mechanism
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-				.error		; ILLEGAL COMBINATION
-				.mexit
-			.endc
-		.endc
-	.endc
-	.if	ndf	zc$iqual_'qualifier
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		; UNDEFINED INPUT_QUALIFIER KEYWORD: qualifier
-		.mexit
-	.endc
-	.if	idn	zc$iqual_block,zc$iqual_'qualifier
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		; UNSUPPORTED INPUT_QUALIFIER KEYWORD: qualifier
-		.mexit
-	.endc
-
-	zc$iqual_constant		= 1
-	zc$iqual_optional		= 2
-	zc$iqual_optional_0		= 3
-	zc$iqual_default		= 4
-	zc$iqual_required		= 5
-	zc$iqual_block			= 6
-	.if	le	position
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		; POSITION MUST BE POSITIVE: position
-		.mexit
-	.endc
-	.if	lt	zc$num_args - position
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: INPUT type, mechanism, position
-		.error		; POSITION MUST NOT BE GREATER THAN NUMBER OF ARGUMENTS: position, zc$num_args
-		.mexit
-	.endc
-
-	.byte		zc$mech_'mechanism
-	.byte		zc$dtype_'type
-	.byte		position
-	.byte		zc$iqual_'qualifier
-	.if	b	<value>
-		.ift
-			.if	eq	zc$iqual_default - zc$iqual_'qualifier
-				.iff
-					.if	eq	zc$iqual_constant - zc$iqual_'qualifier
-						.iff
-							.long	0
-						.ift
-							putval type,value
-					.endc
-				.ift
-					putval type,value
-			.endc
-		.iff
-			putval type,<value>
-	.endc
-	zc$ip = zc$ip + 1
-	.if	lt zc$maxpos - position
-		zc$maxpos = position
-	.endc
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	putval	t,val
-
-	address_32	zcvalloc
-	.save_psect	local_block
-	.psect	gtm$zcallvalues		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,quad
-	. = zcvalloc
-	.if	eq	zc$dtype_string - zc$dtype_'t
-		.ift
-			.ascid	/val/
-		.iff
-		.if	eq	zc$dtype_floating - zc$dtype_'t
-			.ift
-				.f_floating	val
-			.iff
-				.'t	val
-		.endc
-	.endc
-	zcvalloc = .
-	.psect	gtm$zcalltabaab		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	.restore_psect
-
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	output	qualifier=required,type,mechanism,position,value
-
-	.if	eq zc$retlin
-		.if	eq zc$ips
-			return
-		.endc
-	.endc
-	.if	ne zc$ips - zc$ip
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR:
-		.error		;NOT ALL INPUT LINES DEFINED BEFORE OUTPUT
-		.mexit
-	.endc
-	.irp	$$tmp, <type,mechanism,position>
-	.if	b	$$tmp
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		;REQUIRED KEYWORD OMITTED
-		.mexit
-	.endc
-	.endr
-
-	.if	ndf	zc$dtype_'type
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		; UNDEFINED OUTPUT_TYPE KEYWORD: type
-		.mexit
-	.endc
-	.if	ndf	zc$mech_'mechanism
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		; UNDEFINED OUTPUT_MECHANISM KEYWORD: mechanism
-		.mexit
-	.endc
-	.if	eq	zc$dtype_string - zc$dtype_'type
-		.if	ne	zc$mech_descriptor - zc$mech_'mechanism
-			.if	ne	zc$mech_descriptor64 - zc$mech_'mechanism
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-				.error		; ILLEGAL COMBINATION
-				.mexit
-			.endc
-		.endc
-	.endc
-	.if	ndf	zc$oqual_'qualifier
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		; UNDEFINED INPUT_QUALIFIER KEYWORD: qualifier
-		.mexit
-	.endc
-	.if	le	position
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		; POSITION MUST BE POSITIVE: position
-		.mexit
-	.endc
-	.if	lt	zc$num_args - position
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		; POSITION MUST NOT BE GREATER THAN NUMBER OF ARGUMENTS: position, zc$num_args
-		.mexit
-	.endc
-	.if	eq	zc$mech_value - zc$mech_'mechanism
-		.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-		.error		; OUTPUT_MECHANISM MAY NOT BE BY VALUE
-		.mexit
-	.endc
-
-	.if	eq	zc$oqual_'qualifier - zc$oqual_preallocate
-		.if	ne	zc$dtype_string - zc$dtype_'type
-			.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-			.error		; PREALLOCATE QUALIFIER VALID ONLY WITH STRINGS
-			.mexit
-		.endc
-		.if	b	value
-			.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-			.error		; VALUE REQUIRED WITH PREALLOCATE QUALIFIER
-			.mexit
-		.endc
-		.if	le	value
-			.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-			.error		; PREALLOCATE SIZE MUST BE GREATER THAN ZERO
-			.mexit
-		.endc
-		.if	eq	zc$mech_descriptor - zc$mech_'mechanism
-			.if	gt	value - 65535
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-				.error		; PREALLOCATE SIZE CANNOT BE GREATER THAN 65535 WITH DESCRIPTOR
-				.mexit
-			.endc
-		.endc
-		.if	eq	zc$mech_descriptor64 - zc$mech_'mechanism
-			.if	gt	value - 1048576
-				.print		;GT.M EXTERNAL CALL FORMAT ERROR: OUTPUT type, mechanism, position
-				.error		; PREALLOCATE SIZE CANNOT BE GREATER THAN 1048576 WITH DESCRIPTOR64
-				.mexit
-			.endc
-		.endc
-	.endc
-
-	.byte		zc$mech_'mechanism
-	.byte		zc$dtype_'type
-	.byte		position
-	.byte		zc$oqual_'qualifier
-	.if	b	value
-		.ift
-			.long	0
-		.iff
-			.long	value
-	.endc
-	zc$op = zc$op + 1
-	.if	lt zc$maxpos - position
-		zc$maxpos = position
-	.endc
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	zcinit
-	.macro labelentry cname	;use of this macro is currently suppressed
-	__GTM$ZC.'cname'::
-	.endm
-	.psect	gtm$zcallvalues		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,quad
-	zcvalloc = .
-	.psect	gtm$zcalltabaab		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	zctalloc = .
-	zcdef
-	zc$maxpos = -1
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	zcallini
-	.psect	gtm$zcallvalues		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,quad
-	zcvalloc = .
-	.psect	gtm$zcalltabaab		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	zctalloc = .
-	zcdef
-	zc$maxpos = -1
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro  zcallfin
-	.if	df	zc$maxpos
-		endrout
-	.endc
-	.if	df	zcpack_start
-		endpack
-	.endc
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	endrout
-	.if	ne zc$ip - zc$ips
-		.print	;GT.M EXTERNAL CALL FORMAT ERROR:
-		.error	;INPUTS DO NOT MATCH INPUT LINES
-		.mexit
-	.endc
-	.if	ne zc$op - zc$ops
-		.print	;GT.M EXTERNAL CALL FORMAT ERROR:
-		.error	;OUTPUTS DO NOT MATCH OUTPUT LINES
-		.mexit
-	.endc
-	.if	eq zc$ips
-		.if	eq zc$ops
-			.if	eq zc$retlin
-				return
-			.endc
-		.endc
-	.endc
-	.byte zc$maxpos
-	zc$maxpos = -1
-	zctalloc = .
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	endpack
-	.save_psect	local_block
-	.psect	gtm$zcallpackab		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	address_32	zcpack_start
-	address_32	zctalloc
-	address_32	zcpack_name
-	.psect	gtm$zcalltabaab		pic,con,rel,gbl,shr,noexe,rd,nowrt,novec,long
-	.restore_psect
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	zcdef
-	$dscdef
-
-	zc$rout_default			= 0		; don't touch out-of-band handling
-	zc$rout_reset			= 1		; set out-of-band handling back to normal
-
-	zc$retc_			= 0		; Return classes
-	zc$retc_status			= 1
-	zc$retc_value			= 2
-	zc$retc_ignored			= 3
-
-	zc$mech_			= 0		; Argument-passing mechanisms
-	zc$mech_value			= 1
-	zc$mech_reference		= 2
-	zc$mech_descriptor		= 3
-	zc$mech_descriptor64		= 4
-
-	zc$dtype_			= 0		; Native data types
-	zc$dtype_string			= DSC$K_DTYPE_T
-	zc$dtype_byte			= DSC$K_DTYPE_B
-	zc$dtype_byteu			= DSC$K_DTYPE_BU
-	zc$dtype_word			= DSC$K_DTYPE_W
-	zc$dtype_wordu			= DSC$K_DTYPE_WU
-	zc$dtype_long			= DSC$K_DTYPE_L
-	zc$dtype_longu			= DSC$K_DTYPE_LU
-	zc$dtype_quad			= DSC$K_DTYPE_Q
-	zc$dtype_floating		= DSC$K_DTYPE_F
-	zc$dtype_double			= DSC$K_DTYPE_G
-	zc$dtype_g_floating		= DSC$K_DTYPE_G
-	zc$dtype_h_floating		= DSC$K_DTYPE_H
-
-	zc$iqual_			= 0		; Input argument qualifiers
-	zc$iqual_constant		= 1
-	zc$iqual_optional		= 2
-	zc$iqual_optional_0		= 3
-	zc$iqual_default		= 4
-	zc$iqual_required		= 5
-	zc$iqual_block			= 6
-
-	zc$oqual_			= 0		; Output argument qualifiers
-	zc$oqual_required		= 1
-	zc$oqual_dummy			= 2
-	zc$oqual_preallocate		= 3
-
-	.endm
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	; create 32-bit address item
-	.macro	address_32	item
-	.long	item
-	.endm	address_32
diff --git a/sr_avms/i2s.mar b/sr_avms/i2s.mar
deleted file mode 100644
index d4d3c8d..0000000
--- a/sr_avms/i2s.mar
+++ /dev/null
@@ -1,37 +0,0 @@
-	.title	i2s	converts integer to string 
-
-VAX	=	1
-
-;char *i2s(v->num.i)
-
-; The function i2s() recieves an integer as input and returns
-; an address to the first byte after the last character inserted
-; in the globally defined stringpool.
-; STRINGPOOL OFFSETS
-base = 0
-free = 4
-top = 8
-
-	code_psect
-
-	.entry	i2s,^m<r2,r3,r4,r5>
-
-	movl	stringpool + free,r4	;store address of stringpool.free
-	movl	@4(ap),r5
-	blss	10$			;if input is negative insert "-"
-	bneq	15$
-	movb	#^A"0",(r4)+		;insert "0" in stringpool 
-	movl	r4,r0
-	ret
-
-10$:	mnegl	r5,r5
-	movb	#^A"-",(r4)+
-15$:	subl2	#24,sp			;get space and convert integer to
-	cvtlp	r5,#10,(sp)		;packed decimal, then numeric string
-	cvtps	#10,(sp),#10,12(sp)
-	skpc	#^A"0",#10,13(sp)	;skip over leading zeroes
-	movc3	r0,(r1),(r4)		;insert string into stringpool and
-	movl	r3,r0			;return address of first byte after
-	ret				;last character insert
-
-	.end
diff --git a/sr_avms/incr_link.c b/sr_avms/incr_link.c
deleted file mode 100644
index 8e53b52..0000000
--- a/sr_avms/incr_link.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-#include <descrip.h>
-#include <fab.h>
-#include <rab.h>
-#include <rmsdef.h>
-
-#include "zcall.h"
-#include <rtnhdr.h>
-#include "compiler.h"
-#include "obj_gen.h"
-#include "objlangdefs.h"
-#include "urx.h"
-#include "vaxsym.h"
-#include "op.h"
-#include "incr_link.h"
-#include "inst_flush.h"
-#include "op_fgnlookup.h"
-#include "min_max.h"
-
-LITREF char		gtm_release_name[];
-LITREF int4		gtm_release_name_len;
-
-GBLREF mident_fixed	zlink_mname;
-GBLREF unsigned char 	*gtm_main_address;
-/* GBLREF unsigned char	*gtm_dyn_ch_address; */	/* if we need this variable, it should be defined in gtm$startup */
-
-static short		linker_stack_depth;
-static int4		stack_psect;
-static char		loading_psect, *reloc_base, *stack;
-static char		*load_base[GTM_LASTPSECT], *load_top[GTM_LASTPSECT];
-static int		zlink_mname_len;
-
-bool 			tir(char *buff, int size, urx_rtnref *urx_lcl_anchor);
-
-/* TIR - process Alpha text information and relocation subrecords from a GT.M MUMPS object file record. */
-#define GTMMAIN		"GTM$MAIN"
-#define GTMDYNCH	"GTM$DYN_CH"
-
-error_def(ERR_INVOBJ);
-error_def(ERR_LOADRUNNING);
-
-/* locc is defined here so that it may be inlined
- * locc - locate first occurrence of character in string
- */
-static char *locc(char c, char *string, int length)
-{
-	while (0 < length--)
-	{
-		if (c == *string)
-			return string;
-		++string;
-	}
-	return 0;
-}
-
-/* ZL_ERROR - perform cleanup and signal errors found in zlinking a mumps object module. */
-void zl_error(unsigned char *fab, bool libr, int4 err, int4 len, char *addr)
-{
-	if (load_base[GTM_LINKAGE])
-		free(load_base[GTM_LINKAGE]);
-	if (!libr)
-		sys$close(fab);
-	else
-		lbr$close(fab);	/* close library */
-	if (0 == len)
-		rts_error(VARLSTCNT(1) err);
-	else
-		rts_error(VARLSTCNT(4) err, 2, len, addr);
-}
-
-/* INCR_LINK - read and process a mumps object module.  Link said module to currently executing image.  */
-bool incr_link(unsigned char *fab, bool libr)
-{
-	struct RAB	rab;
-	rhdtyp		*hdr, *old_rhead;
-	lab_tabent	*lbt_ent, *lbt_bot, *lbt_top, *olbt_ent, *olbt_bot, *olbt_top;
-	int		status, rec_count, n1;
-	int4		linkage_size, lit_size, code_size;
-	int4		rhd_diff;
-	char		*bptr, *subrec, buff[OBJ_EMIT_BUF_SIZE], fake[SIZEOF(rtn_tabent)];
-	unsigned char	*cp, *cp1, tmpch;
-	unsigned short	rec_size;
-	urx_rtnref	urx_lcl_anchor;
-	char		module_name[SIZEOF(mident_fixed)];
-	int		order;
-	$DESCRIPTOR(buffdes, buff);
-
-	bptr = buff;	/* initialize buffer pointer to first buffer */
-	/* Safety initial values: */
-	loading_psect = -1;
-	reloc_base = -1;
-	load_base[GTM_CODE]     = load_top[GTM_CODE]     = 0;
-	load_base[GTM_LITERALS] = load_top[GTM_LITERALS] = 0;
-	load_base[GTM_LINKAGE]  = load_top[GTM_LINKAGE]  = 0;
-	if (!libr)
-	{
-		rab = cc$rms_rab;
-		rab.rab$l_fab = fab;
-		rab.rab$l_ubf = buff;
-		rab.rab$w_usz = OBJ_EMIT_BUF_SIZE;
-		status = sys$connect(&rab);
-		if (RMS$_NORMAL != status)
-			zl_error(fab, libr, status, 0, 0);
-	}
-	/* Although we process the linker commands relating to the GTM_RNAMESAAAAB PSECT,
-	 * we never use the data, so we create the image on the stack and ignore it.
-	 */
-	load_base[GTM_RNAMESAAAAB] = &fake[0];
-	load_top[GTM_RNAMESAAAAB]  = &fake[0] + SIZEOF(rtn_tabent);
-	urx_lcl_anchor.len = 0;
-	urx_lcl_anchor.addr = urx_lcl_anchor.lab = urx_lcl_anchor.next = 0;
-	for (rec_count = 0; rec_count < 3; rec_count++)
-	{
-		if (!libr)
-		{
-			status = sys$get(&rab);
-			rec_size = rab.rab$w_rsz;
-		} else
-		{
-			status = lbr$get_record(fab, 0, &buffdes);
-			rec_size = buffdes.dsc$w_length;
-			bptr = buffdes.dsc$a_pointer;
-		}
-		if (RMS$_EOF == status)
-			zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-		if (!(status & 1))
-			zl_error(fab, libr, status, 0, 0);
-		switch(*(short *)(&bptr[EOBJ$W_RECTYP]))
-		{
-		case EOBJ$C_EMH:
-			if (0 == rec_count)
-			{	/* First record must be module header record, subtype main module header.  */
-				if (EMH$C_MHD != *(short *)(&bptr[EOBJ$W_SUBTYP]))
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				zlink_mname_len = bptr[EMH$B_NAMLNG];
-				if (zlink_mname_len > MAX_MIDENT_LEN)
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				memcpy(&zlink_mname.c[0], &bptr[EMH$B_NAMLNG+1], zlink_mname_len);	/* copy module name */
-				zlink_mname.c[zlink_mname_len] = 0;
-				continue;
-			} else if (1 == rec_count)
-			{	/* Second record must be module header record, subtype language processor name header.  */
-				if (EMH$C_LNM != *(short *)(&bptr[EOBJ$W_SUBTYP]))
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				n1 = rec_size - 6;	/* record size minus bytes used up by header information */
-				if (n1 > gtm_release_name_len)
-					n1 = gtm_release_name_len;
-				for (cp = &bptr[6], cp1 = gtm_release_name; n1 > 0; n1--)
-				{
-					if (*cp++ != (tmpch = *cp1++))		/* verify GT.M release name matches current name */
-						return FALSE;
-					if ('-' == tmpch)
-						break;
-				}
-				/* VMS Linker looks at major and minor version numbers to see if recompile is necessary.
-				 * That is, if the current GTM version is V5.2, any object file created using V5.1
-				 * or lesser version will automatically be recompiled. But any object file created using
-				 * V5.2* version will NOT be automatically recompiled. On the other hand, we want
-				 * V5.2-000A to force unconditional recompile on all object files V5.2-000 (and previous)
-				 * GTM versions. We want to do that because of C9C05-002003 causing OC_NAMECHK opcode as well
-				 * as the xf_namechk/op_namechk transfer table entries to be removed.
-				 *
-				 * history of object file changes :
-				 * 	code gen changed 	in V4.4-003A,
-				 * 	dev params       	in V4.4-004,
-				 * 	$increment/longnames	in V4.4-005
-				 * 	OC_NAMECHK opcode nix	in V5.2-000A
-				 */
-				/* Example &bptr[6] = "GT.M V5.2-000 VMS AXP16-FEB-2007 16:04"
-				 * We want the index into bptr where 5.2 starts which is bptr[12]
-				 */
-				if (0 > STRNCMP_LIT(&bptr[12], "5.2-000A"))	/* was compiled using V5.2-000 */
-					return FALSE;
-				continue;
-			} else
-				zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-		case EOBJ$C_EGSD:
-			if (2 == rec_count)
-			{
-				/* Third record must be global symbol directory record.  */
-				subrec = bptr + 8;	/* skip over record header to first subrecord header */
-				/* GTM$CODE PSECT program section definition subrecord.  */
-				if (EGSD$C_PSC != *(short *)(&subrec[EGPS$W_GSDTYP]))
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				code_size = *(int4 *)(&subrec[EGPS$L_ALLOC]);
-				subrec += *(short *)(&subrec[EGPS$W_SIZE]);	/* skip to next subrecord */
-				/* GTM$LITERALS PSECT program section definition subrecord.  */
-				if (EGSD$C_PSC != *(short *)(&subrec[EGPS$W_GSDTYP]))
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				lit_size = *(int4 *)(&subrec[EGPS$L_ALLOC]);
-				subrec += *(short *)(&subrec[EGPS$W_SIZE]);	/* skip to next subrecord */
-				/* GTM$Rname PSECT program section definition subrecord.  */
-				if (EGSD$C_PSC != *(short *)(&subrec[EGPS$W_GSDTYP]))
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				subrec += *(short *)(&subrec[EGPS$W_SIZE]);	/* skip to next subrecord */
-				/* $LINKAGE PSECT program section definition subrecord.  */
-				if (EGSD$C_PSC != *(short *)(&subrec[EGPS$W_GSDTYP]))
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				linkage_size = *(int4 *)(&subrec[EGPS$L_ALLOC]);
-				subrec += *(short *)(&subrec[EGPS$W_SIZE]);	/* skip to next subrecord */
-				load_base[GTM_LINKAGE]  = malloc(code_size + lit_size + linkage_size);
-				load_base[GTM_LITERALS] = load_top[GTM_LINKAGE]  = load_base[GTM_LINKAGE]  + linkage_size;
-				load_base[GTM_CODE]     = load_top[GTM_LITERALS] = load_base[GTM_LITERALS] + lit_size;
-							  load_top[GTM_CODE]     = load_base[GTM_CODE]     + code_size;
-				assert(load_top[GTM_CODE] - load_base[GTM_LINKAGE] == linkage_size + lit_size + code_size);
-				continue;
-			}
-		/* caution : fall through */
-		default:
-			zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-		}
-		break;
-	}
-	linker_stack_depth = 0;
-	for(; ; rec_count++)
-	{
-		if (!libr)
-		{
-			status = sys$get(&rab);
-			rec_size = rab.rab$w_rsz;
-		} else
-		{
-			status = lbr$get_record(fab, 0, &buffdes);
-			rec_size = buffdes.dsc$w_length;
-			bptr = buffdes.dsc$a_pointer;
-		}
-		if (RMS$_EOF == status)
-		{
-			urx_free(&urx_lcl_anchor);
-			zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-		}
-		if (!(status & 1))
-		{
-			urx_free(&urx_lcl_anchor);
-			zl_error(fab, libr, status, 0, 0);
-		}
-		switch(*(short *)(&bptr[EOBJ$W_RECTYP]))
-		{
-		case EOBJ$C_ETIR:
-			assert(*(short *)(&bptr[EOBJ$W_SIZE]) == rec_size);
-			subrec = bptr + 4;	/* skip over record header to first subrecord header */
-			if (!tir(subrec, *(short *)(&bptr[EOBJ$W_SIZE]) - (subrec - bptr), &urx_lcl_anchor))
-			{
-				urx_free(&urx_lcl_anchor);
-				zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-			}
-			continue;
-		case EOBJ$C_EGSD:
-			continue;
-		case EOBJ$C_EEOM:
-			if (!libr)
-			{
-				if (RMS$_EOF != sys$get(&rab))
-				{
-					urx_free(&urx_lcl_anchor);
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				}
-			} else
-			{	if (RMS$_EOF != lbr$get_record(fab, 0, &buffdes))
-				{
-					urx_free(&urx_lcl_anchor);
-					zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-				}
-			}
-			break;
-		default:
-			urx_free(&urx_lcl_anchor);
-			zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-		}
-		break;
-	}
-	if (0 != linker_stack_depth)
-	{
-		urx_free(&urx_lcl_anchor);
-		zl_error(fab, libr, ERR_INVOBJ, 0, 0);
-	}
-	hdr = load_base[GTM_CODE];
-	if (!zlput_rname(hdr))
-	{
-		urx_free(&urx_lcl_anchor);
-		/* Copy routine name to local variable because zl_error frees it. */
-		memcpy(&module_name[0], hdr->routine_name.addr, hdr->routine_name.len);
-		zl_error(fab, libr, ERR_LOADRUNNING, hdr->routine_name.len, &module_name[0]);
-	}
-	urx_add(&urx_lcl_anchor);
-	old_rhead = hdr->old_rhead_ptr;
-	lbt_bot = (lab_tabent *)((char *)hdr + hdr->labtab_ptr);
-	lbt_top = lbt_bot + hdr->labtab_len;
-	while (old_rhead)
-	{
-		lbt_ent = lbt_bot;
-		olbt_bot = (lab_tabent *)((char *)old_rhead + old_rhead->labtab_ptr);
-		olbt_top = olbt_bot + old_rhead->labtab_len;
-		for (olbt_ent = olbt_bot;  olbt_ent < olbt_top;  ++olbt_ent)
-		{
-			for (; lbt_ent < lbt_top; lbt_ent++)
-			{
-				MIDENT_CMP(&olbt_ent->lab_name, &lbt_ent->lab_name, order);
-				if (order <= 0)
-					break;
-			}
-			if ((lbt_ent < lbt_top) && !order)
-			{
-				olbt_ent->lab_ln_ptr = lbt_ent->lab_ln_ptr;
-				olbt_ent->has_parms = lbt_ent->has_parms;
-			} else
-				olbt_ent->lab_ln_ptr = 0;
-		}
-		rhd_diff = (char *)hdr - (char *)old_rhead;
-		old_rhead->src_full_name = hdr->src_full_name;
-		old_rhead->routine_name = hdr->routine_name;
-		old_rhead->vartab_len = hdr->vartab_len;
-		old_rhead->vartab_ptr = hdr->vartab_ptr + rhd_diff;
-		old_rhead->ptext_ptr = hdr->ptext_ptr + rhd_diff;
-		old_rhead->current_rhead_ptr = rhd_diff;
-		old_rhead->temp_mvals = hdr->temp_mvals;
-		old_rhead->temp_size = hdr->temp_size;
-		old_rhead->linkage_ptr = hdr->linkage_ptr;
-		old_rhead->literal_ptr = hdr->literal_ptr;
-		old_rhead = (rhdtyp *)old_rhead->old_rhead_ptr;
-	}
-	urx_resolve (load_base[GTM_CODE], lbt_bot, lbt_top);
-	inst_flush(NULL, 0); /* flush instruction cache for resolved references on VMS, this flushes whole pipe */
-	return TRUE;
-}
-
-bool tir(				/* TRUE if no errors encountered;  FALSE upon encountering any error  */
-	 char *buff,			/* start of buffer containing TIR commands */
-	 int size,			/* size of buff */
-	 urx_rtnref *urx_lcl_anchor)	/* unresovled external local anchor */
-{
-	rhdtyp		*rtn;
-	lab_tabent	*label, *labtop;
-	mident_fixed	rtnid, labid;
-	mstr		str;
-	int4		sto_imm_length;
-	unsigned char	y;
-	char		*top, *loc;
-	int		len, len1, lab_len, n;
-	urx_rtnref	*urx_rp;
-	urx_addr	*urx_tmpaddr;
-	unsigned char	*cp1, *cp2, ch;
-	bool		now_lower;
-
-	top = buff + size;
-	for(;  buff < top;)
-	{
-		switch (loading_psect)
-		{
-		case -1:
-			assert(-1 == reloc_base);
-			break;
-		case GTM_CODE:
-		case GTM_LITERALS:
-		case GTM_RNAMESAAAAB:
-		case GTM_LINKAGE:
-			assert((load_base[loading_psect] <= reloc_base) && (reloc_base <= load_top[loading_psect]));
-			break;
-		default:
-			return FALSE;
-		}
-		/* Note: although the following code uses the term "stack", it should be noted this only works if the
-		 *	 maximum depth of the stack is one (1).
-		 */
-		switch(*(short *)(&buff[ETIR$W_RECTYP]))
-		{
-		case ETIR$C_STA_PQ:	/* stack PSECT base plus byte offset */
-			if ((0 != linker_stack_depth) || (0 != *(int4 *)(&buff[12])))	/* high-order 32 bits of quadword address */
-				return FALSE;
-			stack_psect = *(int4 *)(&buff[4]);
-			stack = load_base[stack_psect] + *(int4 *)(&buff[8]);
-			linker_stack_depth++;
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_CTL_SETRB:	/* set relocation base */
-			if (0 >= linker_stack_depth)
-				return FALSE;
-			loading_psect = stack_psect;
-			reloc_base = stack;
-			linker_stack_depth--;
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_STC_BOH_GBL:	/* store conditional BSR or hint at global address */
-		case ETIR$C_STC_LDA_GBL:	/* store conditional LDA at global address */
-		case ETIR$C_STC_NOP_GBL:	/* store conditional NOP at global address */
-			/* These linker commands are used by the OpenVMS Alpha Linker to replace instructions in the
-			 * current image with alternative, faster instructions if certain conditions about those
-			 * instructions and the displacement from them to other addresses are true.  The GT.M linker
-			 * does not use the same mechanisms, so these instructions are not generated except in the
-			 * routine header JSB prologue (which is never executed for a GT.M module that is dynamically
-			 * linked and can therefore be ignored by the GT.M linker).
-			 */
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_STC_LP_PSB:		/* store conditional linkage pair plus signature */
-			if (reloc_base + 4 * SIZEOF(int4) > load_top[loading_psect])
-				return FALSE;
-			/* Store dummy values for now (GTM$MAIN and GTM$DYN_CH aren't really used) [lidral] */
-			*((int4 *)reloc_base)++ = 0;
-			*((int4 *)reloc_base)++ = 0;
-			*((int4 *)reloc_base)++ = 0;
-			*((int4 *)reloc_base)++ = 0;
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_STO_GBL:	/* store global */
-			if (reloc_base + 2 * SIZEOF(int4) > load_top[loading_psect])
-				return FALSE;
-			len = buff[4];
-			if ((len > SIZEOF(ZCSYM_PREFIX)) && (0 == MEMCMP_LIT(&buff[5], ZCSYM_PREFIX)))
-			{
-				mval	package, extent;
-
-				len1 = len;
-				package.mvtype = extent.mvtype = MV_STR;
-				cp1 = &buff[5] + SIZEOF(ZCSYM_PREFIX) - 1;
-				len1 -= SIZEOF(ZCSYM_PREFIX) - 1;
-				package.str.addr = cp1;
-				loc = locc('.', cp1, len1);
-				assert(0 < loc);
-				package.str.len = (unsigned char *)loc - cp1;
-				len1 -= package.str.len + 1;		/* take off package and . */
-				extent.str.len = len1;
-				extent.str.addr = cp1 + 1;
-				if (0 == extent.str.len)
-					return FALSE;
-				if ((package.str.len > 0) && ('_' == *package.str.addr))
-					*package.str.addr = '%';
-				if ('_' == *extent.str.addr)
-					*extent.str.addr = '%';
-				*((int4 *)reloc_base)++ = (int4)op_fgnlookup(&package, &extent);
-				*((int4 *)reloc_base)++ = 0;	/* high-order 32 bits of address */
-			} else  if (0 != (loc = locc('.', &buff[5], len)))	/* global name contains a '.' */
-			{
-				len1 = loc - &buff[5]; /* length of the routine part before the '.' */
-				assert(MAX_MIDENT_LEN >= len1);
-				memcpy(&rtnid.c[0], &buff[5], len1);
-				rtnid.c[len1] = 0;
-				if ('_' == rtnid.c[0])
-					rtnid.c[0] = '%';
-				cp1 = loc + 1;
-				lab_len = len - ((char *)cp1 - &buff[5]); /* length of the label part following the '.' */
-				assert(MAX_MIDENT_LEN >= lab_len);
-				memcpy(&labid.c[0], cp1, lab_len);
-				labid.c[lab_len] = 0;
-				if ('_' == labid.c[0])
-					labid.c[0] = '%';
-				str.addr = &rtnid.c[0];
-				str.len = len1;
-				if (0 != (rtn = find_rtn_hdr(&str))) /* Routine already resolved? */
-				{
-					label = (lab_tabent *)((char *)rtn + rtn->labtab_ptr);
-					labtop = label + rtn->labtab_len;
-					for (; label < labtop && ((lab_len != label->lab_name.len)
-						|| memcmp(&labid.c[0], label->lab_name.addr, lab_len)); label++)
-						;
-					if (label < labtop)
-					{
-						*((int4 *)reloc_base)++ = (char *)&label->lab_ln_ptr;
-						*((int4 *)reloc_base)++ = 0;	/* high-order 32 bits of address */
-						buff += *(short *)(&buff[ETIR$W_SIZE]);
-						continue;
-					}
-				}
-				/* This symbol is unknown. Put on the (local) unresolved extern chain --
-				 * either for labels or routines
-				 */
-				urx_rp = urx_putrtn(&rtnid.c[0], len1, urx_lcl_anchor);
-				urx_putlab(&labid.c[0], lab_len, urx_rp, reloc_base);
-				*((int4 *)reloc_base)++ = 0;
-				*((int4 *)reloc_base)++ = 0;
-			} else if (0 != (loc = locc('$', &buff[5], len)))	/* global name contains a '$' */
-			{
-				if ((SIZEOF(GTMMAIN) - 1 == len) && (0 == memcmp(GTMMAIN, &buff[5], len)))
-					*((int4 *)reloc_base)++ = gtm_main_address;
-				else  if ((SIZEOF(GTMDYNCH) - 1 == len) && (0 == memcmp(GTMDYNCH, &buff[5], len)))
-				{
-					/* *((int4 *)reloc_base)++ = gtm_dyn_ch_address; */	/* don't need */
-					*((int4 *)reloc_base)++ = 0;	/* dummy value; GT.M frames are not machine frames */
-				} else
-					return FALSE;
-				*((int4 *)reloc_base)++ = 0;	/* high-order 32 bits of address */
-			} else	/* It's a bona fide global name. */
-			{
-				memcpy(&rtnid.c[0], &buff[5], len);
-				rtnid.c[len] = 0;
-				assert(zlink_mname_len > 0 && zlink_mname_len <= MAX_MIDENT_LEN);
-				if (zlink_mname_len == len && !memcmp(&zlink_mname.c[0], &rtnid.c[0], len))	/* program name */
-				{
-					*((int4 *)reloc_base)++ = load_base[GTM_CODE];
-					*((int4 *)reloc_base)++ = 0;	/* high-order 32 bits of address */
-				} else
-				{
-					if ('_' == rtnid.c[0])
-						rtnid.c[0] = '%';
-					str.addr = &rtnid.c[0];
-					str.len = len;
-					if (0 != (rtn = find_rtn_hdr(&str)))
-						*((int4 *)reloc_base)++ = rtn->linkage_ptr;
-					else
-					{
-						urx_rp = urx_putrtn(&rtnid.c[0], len, urx_lcl_anchor);
-						urx_tmpaddr = malloc(SIZEOF(urx_addr));
-						urx_tmpaddr->next = urx_rp->addr;
-						urx_tmpaddr->addr = reloc_base;
-						urx_rp->addr = urx_tmpaddr;
-						*((int4 *)reloc_base)++ = 0;
-					}
-					*((int4 *)reloc_base)++ = 0;
-				}
-			}
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_STO_IMM:	/* store immediate */
-			sto_imm_length = *(int4 *)(&buff[4]);
-			if (reloc_base + sto_imm_length > load_top[loading_psect])
-				return FALSE;
-			memcpy(reloc_base, &buff[8], sto_imm_length);
-			reloc_base += sto_imm_length;
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_STO_LW:	/* store longword */
-			if ((0 >= linker_stack_depth) || (reloc_base + SIZEOF(int4) > load_top[loading_psect]))
-				return FALSE;
-			*((int4 *)reloc_base)++ = stack;
-			linker_stack_depth--;
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		case ETIR$C_STO_OFF:	/* store offset to PSECT */
-			if ((0 >= linker_stack_depth) || (reloc_base + 2 * SIZEOF(int4) > load_top[loading_psect]))
-				return FALSE;
-			*((int4 *)reloc_base)++ = stack;	/* low-order 32 bits of quadword address */
-			*((int4 *)reloc_base)++ = 0;		/* high-order 32 bits always zero */
-			linker_stack_depth--;
-			buff += *(short *)(&buff[ETIR$W_SIZE]);
-			continue;
-		default:
-			return FALSE;
-		}
-	}
-	return TRUE;
-}
diff --git a/sr_avms/mdefsp.h b/sr_avms/mdefsp.h
deleted file mode 100644
index cc7b4a8..0000000
--- a/sr_avms/mdefsp.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MDEFSP_included
-#define MDEFSP_included
-
-#define INT8_SUPPORTED
-#define	INT8_FMT		"%llu"
-#define	INT8_FMTX		"[0x%llx]"
-#define INT8_NATIVE /* on Alpha processors, 8 byte operations are native to the chip and hence atomic */
-
-#include <builtins.h>
-#include <lib$routines>
-
-#define insqhi vax_insqhi
-#define insqti vax_insqti
-#define remqhi vax_remqhi
-#define remqti vax_remqti
-
-/* Use our own malloc and free to guarantee return value is checked for error condition.  */
-#ifdef __cplusplus
-extern "C" void *gtm_malloc(int);
-extern "C" void gtm_free(void *);
-/* extern "C" int gtm_memcmp (const void *, const void *, int); */
-#endif
-
-/* NOTE: this redefines stringpool.free as stringpool.gtm_free, but that appears benign.  */
-#define malloc gtm_malloc
-#define free gtm_free
-
-#define rts_error lib$signal
-#ifdef __cplusplus
-#define error_def(x) extern x
-#else
-#define error_def(x) globalvalue x
-#endif
-
-#define INTERLOCK_ADD(X,Y,Z) (__ATOMIC_ADD_LONG((sm_vint_ptr_t)(X), (Z)) + (Z))
-
-#undef BIGENDIAN
-
-#ifdef __cplusplus
-#define GBLDEF
-#define GBLREF extern
-#define LITDEF const
-#define LITREF extern const
-#else
-#define GBLDEF globaldef
-#define GBLREF globalref
-#define LITDEF const globaldef
-#define LITREF const globalref
-#endif
-
-/* Reserve enough space in routine header for call to GTM$MAIN.  */
-#define RHEAD_JSB_SIZE	12
-typedef struct
-{
-	unsigned short	mvtype;
-	unsigned	e   	:  7;
-	unsigned	sgn	:  1;
-	unsigned char	fnpc_indx;	/* Index to fnpc_work area this mval is using */
-	mstr		str    ;
-	int4		m[2]   ;
-} mval;
-/* Another version of mval with byte fields instead of bit fields */
-typedef struct
-{
-	unsigned short	mvtype;
-	unsigned char	sgne;
-	unsigned char	fnpc_indx;	/* Index to fnpc_work area this mval is using */
-	mstr		str    ;
-	int4		m[2]   ;
-} mval_b;
-
-#define VAR_START(a, b)	va_start(a, b)
-#define VARLSTCNT(a)			/* stub for argument count.  VAX CALLS instruction pushes count automatically */
-
-#define CHF_MCH_DEPTH	chf$q_mch_depth
-#define CHF_MCH_SAVR0	chf$q_mch_savr0
-
-typedef struct
-{
-	short		flags;
-	short		rsa_offset;
-	unsigned char	reserved_1;
-	unsigned char	fret;
-	short		signature_offset;
-	void		*entry;		/* actually a pointer to a code address, but not representable directly in C */
-	int4		reserved_2;	/* other half of quadword pointer (entry) not allocated by C compiler */
-	int4		size;
-	short		reserved_3;
-	short		entry_length;
-} alpha_procedure_descriptor;
-
-#define CODE_ADDRESS(func)	gtm$code_address(func)
-#define GTM_CONTEXT(func)	func
-
-/* External symbols (global symbols defined in another module) are represented as belonging to this PSECT: */
-#define GTM_ANOTHER_MODULE	-1
-
-/* Under Alpha AXP OpenVMS, the procedure value of a module is defined in the PSECT used for linkage: */
-#define GTM_MODULE_DEF_PSECT	GTM_LINKAGE
-
-#define OS_PAGELET_SIZE		512
-#define OS_VIRTUAL_BLOCK_SIZE	OS_PAGELET_SIZE
-
-typedef volatile	int4    latch_t;
-typedef volatile	uint4   ulatch_t;
-
-#define INSIDE_CH_SET		"ISO8859-1"
-#define OUTSIDE_CH_SET		"ISO8859-1"
-#define EBCDIC_SP		0x40
-#define NATIVE_SP		0x20
-#define DEFAULT_CODE_SET	ascii	/* enum ascii defined in io.h */
-
-#define util_out_print2 util_out_print
-
-int adawi(short x, short *y);
-
-#define CACHELINE_SIZE		256	/* alpha cache line size */
-
-#endif /* MDEFSP_included */
diff --git a/sr_avms/mem_access.c b/sr_avms/mem_access.c
deleted file mode 100644
index 085bde3..0000000
--- a/sr_avms/mem_access.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#define	PRT$C_NA	0
-
-/* Set a region of memory to be inaccessable */
-void set_noaccess(na_page, prvprt)
-unsigned char *na_page[2];		/* array of addresses: the low and high addresses to be protected */
-unsigned char *prvprt;			/* A place to save the previous protection, should the caller later
-					   wish to restore the protection */
-{
-	unsigned	status;
-	unsigned char *actual[2];		/* array of addresses: actual range of addresses affected by sys$setprt */
-
-	return;				/* STUB */
-
-	actual[0] = actual[1] = NULL;
-/*	status = sys$setprt (na_page, 0, 0, PRT$C_NA, prvprt);	/* [lidral] */
-	status = sys$setprt (na_page, actual, 0, PRT$C_NA, prvprt);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	return;
-}
-
-/* Return memory protection to the state of affairs which existed prior to a call to set_noaccess */
-void reset_access(na_page, oldprt)
-unsigned char *na_page[2];		/* array of addresses: the low and high addresses to be protected */
-unsigned char oldprt;			/* A place to save the previous protection, should the caller later
-					   wish to restore the protection */
-{
-	unsigned	status;
-
-	return;				/* STUB */
-
-	status = sys$setprt (na_page, 0, 0, oldprt, 0);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	return;
-}
diff --git a/sr_avms/memcmp.mar b/sr_avms/memcmp.mar
deleted file mode 100644
index 59b42ce..0000000
--- a/sr_avms/memcmp.mar
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title memcmp() compare two char strings
-
-	;memcmp(a,b,len)
-	;char *a,*b;
-	;int len;
-
-	;compare two character strings 
-	;return 0 iff they are equal
-	;return < 0 if a < b and > 0 if a > b
-
-	code_psect
-
-	.entry	memcmp,^m<r2,r3>
-
-	cmpc3	12(ap), at 4(ap), at 8(ap)
-	blssu	10$
-	bnequ	20$
-	clrl	r0
-	ret
-
-10$:	movl	#-1,r0
-	ret
-
-20$:	movl	#1,r0
-	ret
-
-	.end
diff --git a/sr_avms/mum_tstart.m64 b/sr_avms/mum_tstart.m64
deleted file mode 100644
index 78e445b..0000000
--- a/sr_avms/mum_tstart.m64
+++ /dev/null
@@ -1,96 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2008 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.title	mum_tstart	(re)start a GT.M frame from a sys$unwind
-
-	G_MSF
-	base_frame
-
-;	The code PSECT must have the MIX attribute in order to have read access to it.
-$CODE$	=	"MUM_TSTART,QUAD,PIC,CON,REL,LCL,SHR,EXE,RD,MIX,NOWRT"
-
-;	mum_tstart - (re)start a GT.M MUMPS stack frame
-;
-;	mum_tstart calls trans_code if proc_act_type is non-zero.  Then
-;	mum_tstart (re)loads the GT.M registers (including the code address)
-;	from the GT.M MUMPS stack frame, ensures the instruction cache and
-;	memory are consistent, reloads r10 with the current address of $TEST
-;	(mis-named "dollar_truth"), and then jumps to the code address indicated
-;	by the GT.M MUMPS stack frame.
-;
-;	mum_tstart is only invoked by sys$unwind after unwinding from a
-;	signal and not via the standard call mechanism.  Therefore,
-;	the context is that of the routine executing in the frame to
-;	which sys$unwind unwound and not to mum_tstart.  Consequently,
-;	we do not know what value may be in any of the registers and
-;	must establish pseudo PC-relative addressing in order to refer
-;	to any data, including the addresses of external items.
-
-	$code_section
-
-;	Pseudo linkage PSECT.
-
-A_dollar_truth:		.address	dollar_truth	; actually, $TEST
-A_frame_pointer:	.address	frame_pointer
-A_proc_act_type:	.address	proc_act_type
-
-L_trans_code:		.linkage_pair	trans_code
-L_error_return:		.linkage_pair	error_return
-
-	$routine	name=mum_tstart,entry=mum_tstart_ca,kind=null
-
-	br	r13, establish_base	; set up for PC-relative addressing
-establish_base:
-	.base	r13, establish_base
-
-	lda	sp,  -ARG_AREA_SZ(fp)	; (re)establish argument list area
-	ldq	r0,  A_proc_act_type
-	ldq_u	r28, (r0)
-	extwl	r28, r0, r28
-	beq	r28, l1
-	ldq	r26, L_trans_code
-	ldq	r27, L_trans_code+8
-	mov	r31, r25
-	jsr	r26, (r26)
-l1:	; We can't use getframe here with its imbedded $call invocation so hard code a getframe equivalent using
-	; the lobotomized manual linkages this module needs to use..
-	; start GETFRAME expansion
-        ; A_frame_pointer must be address of quadword containing the address of frame_pointer
-        ldq     r12, A_frame_pointer
-        ldl     r12, (r12)
-        lda     r8, msf$flags_off(r12)
-        ldq_u   r9, (r8)
-        extbl   r9, r8, r9
-        and     r9, sff_etrap_err, r9
-        beq     r9, l2
-        ; $call   ERROR_RETURN, set_arg_info=false, nonstandard=true
-	ldq	r26, L_error_return
-	ldq	r27, L_error_return+8
-	mov	r31, r25
-	jsr	r26,(r26)
-        ldq     r12, A_frame_pointer
-        ldl     r12, (r12)
-l2: 	ldl     r8,  msf$l_symtab_off(r12)
-        ldl     r9,  msf$temps_ptr_off(r12)
-        ldl     r13, msf$ctxt_off(r12)
-        ldl     r28, msf$literal_ptr_off(r12)
-        cmovne  r28, r28, r14                   ; only copy to r14 if initialized to non-zero value
-        ldl     r26, msf$mpc_off(r12)
-	; end getframe expansion
-	br	r0,  establish_base2	; r13 modified by getframe, set up another (temporary) base
-establish_base2:
-	.base	r0,  establish_base2
-	ldq	r10, A_dollar_truth
-	imb				; resynchronize instruction cache
-	ret	r26
-
-	$end_routine	name=mum_tstart
-
-	.end
diff --git a/sr_avms/mumps_binding.max b/sr_avms/mumps_binding.max
deleted file mode 100644
index a32a1b9..0000000
--- a/sr_avms/mumps_binding.max
+++ /dev/null
@@ -1,96 +0,0 @@
-;----------------------------------------------------------------------------------------------------------------------------------
-
-	.macro	MUMPS_BINDING ENTRYREF, LINKNAME, OUTPUT=no, ?rtnaddr, ?lbladdr
-
-	fgnout_yes	= 1
-	fgnout_ye	= 1
-	fgnout_y	= 1
-	fgnout_no	= 0
-	fgnout_n	= 0
-
-	.irp	$$tmp, <ENTRYREF, LINKNAME>
-	.if	b	$$tmp
-		.print		;MUMPS BINDING FORMAT ERROR: MUMPS ENTRYREF, LINKNAME, OUTPUT
-		.error		;REQUIRED KEYWORD OMITTED
-		.mexit
-	.endc
-	.endr
-
-	.if 	ndf	fgnout_%EDIT(OUTPUT,LOWERCASE)
-		.print		;MUMPS BINDING FORMAT ERROR: MUMPS ENTRYREF, LINKNAME, OUTPUT
-		.error		;OUTPUT MUST BE YES OR NO
-		.mexit
-	.endc
-
-	lablen = %LOCATE(<^>,ENTRYREF)
-	entlen = %LENGTH(ENTRYREF)
-	.if	eq	%LENGTH(ENTRYREF)-lablen
-		.print		;MUMPS BINDING FORMAT ERROR: MUMPS ENTRYREF, LINKNAME, OUTPUT
-		.error		;MUMPS ENTRYREF MUST SPECIFY ROUTINE
-		.mexit
-	.endc
-
-	rtnlen = entlen - lablen - 1
-	rstart = lablen+1
-
-	.if	gt	lablen-31
-		.print		;MUMPS BINDING FORMAT ERROR: MUMPS ENTRYREF, LINKNAME, OUTPUT
-		.error		;LABELS ARE LIMITED TO 31 CHARACTERS
-		.mexit
-	.endc
-
-	.if	gt	rtnlen-31
-		.print		;MUMPS BINDING FORMAT ERROR: MUMPS ENTRYREF, LINKNAME, OUTPUT
-		.error		;ROUTINES ARE LIMITED TO 31 CHARACTERS
-		.mexit
-	.endc
-
-	$routine	LINKNAME, entry=%string(LINKNAME)_CA, kind=stack, -
-			saved_regs=<r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15>, -
-			size=<<<$RSA_END+<7*8>+15>/16>*16>
-
-	$linkage_section
-		; Always generate the routine symbol in upper case so that routine's linkage
-		; works correctly even if the call table contains lower case routine name and
-		; the table is compiled with /NAMES={LOWERCASE,AS_IS}.
-rtnaddr:	.address	%EDIT(%EXTRACT(rstart, rtnlen, ENTRYREF),UPCASE)
-L_GTM$MAIN:	.linkage_pair	GTM$MAIN
-
-	.if	le	entlen-31
-		; The total length is within 31 chars. Generate a symbolic reference
-		; in the $linkage_section.
-lbladdr:	.address	%EXTRACT(rstart, rtnlen, ENTRYREF).%EXTRACT(0, lablen, ENTRYREF)
-		fgnlab_unresolved = 0
-	.else
-lbladdr:	.address	lblname
-		fgnlab_unresolved = lablen
-		; The MACRO compiler doesn't allow the symbol names of the form routine.label
-		; if the total length exceeds 31. So, generate a reference to a location in
-		; $data_section that stores the label string.
-	$data_section
-lblname:	.ascii		"%EXTRACT(0, lablen, ENTRYREF)"
-	.endc
-
-
-	$code_section
-
-	.base	r27, $ls
-
-;	Copy argument registers and argument information register to stack adjacent to any arguments that may be on stack.
-	stq	r21, $SIZE-8(fp)
-	stq	r20, $SIZE-16(fp)
-	stq	r19, $SIZE-24(fp)
-	stq	r18, $SIZE-32(fp)
-	stq	r17, $SIZE-40(fp)
-	stq	r16, $SIZE-48(fp)
-	stq	r25, $SIZE-56(fp)
-	ldq	r0,  L_GTM$MAIN
-	ldq	r1, L_GTM$MAIN+8
-
-; 	gtm$fgncall (A(MUMPS routine), A(MUMPS label), OUTPUT (yes or no), A(start of arguments on stack))
-	$call	GTM$FGNCALL, args=<rtnaddr, lbladdr, fgnout_%EDIT(OUTPUT,LOWERCASE)/A, $SIZE-56(fp)/A, fgnlab_unresolved/A>
-	$return
-
-	$end_routine	name=LINKNAME
-
-	.endm
diff --git a/sr_avms/mutex.mar b/sr_avms/mutex.mar
deleted file mode 100644
index b860319..0000000
--- a/sr_avms/mutex.mar
+++ /dev/null
@@ -1,952 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;                                                               ;
-;       Copyright 2000, 2007 Fidelity Information Services, Inc  ;
-;                                                               ;
-;       This source code contains the intellectual property     ;
-;       of its copyright holder(s), and is made available       ;
-;       under a license.  If you do not know the terms of       ;
-;       the license, please stop and do not read further.       ;
-;                                                               ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.title  MUTEX   GT.M Mutex Control (VMS)
-;
-;       General:
-;               Multiple readers are allowed at one time, but only one writer (no readers while there is a writer).
-;               A write request blocks access to additional readers until after the writer is granted crit and then
-;               releases it.  Freeze allows readers, but not writers, and write pendings do not block new readers.
-;
-;       Interface:
-;               void mutex_init(addr, n, crash)                 - Initialize a mutex at addr with n queue slots
-;                                                                 If crash is TRUE, then this is a "crash" reinitialization;
-;                                                                 otherwise, it's a "clean" initialization
-;               enum cdb_sc mutex_lockr(addr, seq, flag, spinparms)        - Read access to mutex at addr
-;               enum cdb_sc mutex_lockw(addr, seq, flag, spinparms)        - Write access to mutex at addr
-;               enum cdb_sc mutex_lockwim(addr, seq, flag)      - Write access to mutex at addr;  if cannot lock, immediately
-;                                                                 return cdb_sc_nolock
-;               enum cdb_sc mutex_lockw_ccp(addr, seq, flag, k) - Write access to mutex at addr;  if cannot lock, place CCP in
-;                                                                 queue for "wakeup" and return cdb_sc_nolock (do NOT hibernate)
-;               enum cdb_sc mutex_wtor(addr, rflag, wflag)      - Change write access to mutex at addr to read access, do a wakeup
-;               enum cdb_sc mutex_unlockr(addr, seq, flag)      - Unlock read access to mutex at addr
-;               enum cdb_sc mutex_unlockw(addr, seq, flag)      - Unlock write access to mutex at addr
-;
-;               For routines taking the seq argument, if seq != crash count, return cdb_sc_critreset.
-;
-;               See GDSBT.H for related C declarations
-;
-;       Mutex structure (must be quadword aligned):
-;
-;               ---------------------------------
-;               | write pending | ownership cnt | 0
-;               ---------------------------------
-;               | # of que slots| crash count   |
-;               ---------------------------------
-;               //                              //
-;               ---------------------------------
-;               |_ fl waiting process que head _| 64 MUTEX_PROCHEAD
-;               |_ bl                          _|
-;               |_      --- unused ---         _|
-;               |       --- unused ---          |
-;               ---------------------------------
-;               //                              //
-;               ---------------------------------
-;               |_ fl unused slots queue head  _| 128 MUTEX_FREEHEAD
-;               |_ bl                          _|
-;               |_      --- unused ---         _|
-;               |       --- unused ---          |
-;               ---------------------------------
-;               |_ fl   first queue entry      _|
-;               |_ bl                          _|
-;               |_ pid                         _|
-;               |  super_crit [CCP use only]*   |
-;               ---------------------------------
-;               |_ fl   second queue entry     _|
-;               |_ bl                          _|
-;               |_ pid                         _|
-;               |  super_crit [CCP use only]*   |
-;               ---------------------------------
-;               :       :       :       :       :
-;               ---------------------------------
-;               |_ fl   last queue entry       _|
-;               |_ bl                          _|
-;               |_ pid                         _|
-;               |  super_crit [CCP use only]*   |
-;               ---------------------------------
-;
-;               * Note:  only one entry at a time (at the head of the waiting process queue) will ever use this field.
-
-; Offsets from the beginning of the mutex structure:
-
-MUTEX_OWNCNT    = 0
-MUTEX_WRTPND_MASK = ^X10000
-MUTEX_WRTPND_BIT  = 16
-MUTEX_WRTPND    = 2
-MUTEX_CRASHCNT  = 4
-MUTEX_QUESLOTS  = 6
-MUTEX_PROCHEAD  = 64    ;  8
-MUTEX_FREEHEAD  = 128   ; 24
-
-; Offsets of spin counts in mutex_spin_parms, keep these offsets in sync with mutex_spin_parms_struct definition in gdsbt.h
-MUTEX_HARD_SPIN_COUNT_OFFSET    = 0
-MUTEX_SLEEP_SPIN_COUNT_OFFSET   = 4
-MUTEX_SPIN_SLEEP_MASK_OFFSET    = 8
-
-; Offsets from the beginning of a queue entry:
-MUTEX_PID       = 8
-MUTEX_SUPER_CRIT = 12
-
-; Retry counts for interlocked queue instructions:
-QUANT_RETRY     = 10000
-QUEUE_RETRY     = 255
-MAX_WAKE	= 37	;not actually a retry count but another queue loop limiter
-REST_FREQ	= ^X3	;sleep mask of complemented low order bits
-
-; NOTE:  The following definitions correspond to items of the same name in CDB_SC.H.
-;        Make sure that they are maintained compatibly!
-cdb_sc_nolock   = 3
-cdb_sc_dbccerr  = 81    ; 'Q'
-cdb_sc_critreset = 82   ; 'R'
-
-
-; NOTE:  The following definition corresponds to an item of the same name,
-;        defined in CCP.H via inclusion of CCPACT_TAB.H.
-;        Make sure that it is maintained compatibly!
-CCTR_SCRIT      = 10    ; Super_crit granted
-
-	$psldef
-	$efndef
-
-	code_psect
-
-;       void    mutex_init(mutex_struct *addr, int N, bool crash);
-;
-;       Initialize a mutex with N que entries.   If crash is TRUE, then this is
-;       a "crash" reinitialization;  otherwise it's a "clean" initialization.
-
-
-	.entry  mutex_init,^m<r2,r3,r4,r5,r6>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-	movl    8(ap),r3                ;r3 = number of queue entries
-	blbs    12(ap),crash            ;branch if this is a crash reinitialization
-
-; Clean initialization
-clean:  movw    r3,MUTEX_QUESLOTS(r2)   ;set the number of queue entries
-
-	;initialize the waiting process queue to be empty
-	.disable flagging
-	clrq    MUTEX_PROCHEAD(r2)
-	clrq    MUTEX_PROCHEAD+8(r2)
-
-	;initialize the free queue to be empty
-	movaq   MUTEX_FREEHEAD(r2),r1
-	clrq    (r1)
-	clrq    8(r1)
-
-	movaq   16(r1),r0               ;r0 -> first free entry
-	clrq    (r0)                    ;clear it
-	clrq    8(r0)
-	.enable flagging
-	decl    r3
-
-	;insert each entry into the free queue
-10$:    insqti  (r0),(r1)
-	bcs     30$                     ;branch if the secondary interlock failed
-	addl    #16,r0
-	sobgtr  r3,10$
-
-	;initialize the rest of the mutex structure
-	movw    #-1,(r2)                ;initial semaphore value = -1
-	clrw    MUTEX_WRTPND(r2)        ;initial flags value = 0;
-	blbs    12(ap),20$              ;if this was a crash, don't clear the count
-	clrw    MUTEX_CRASHCNT(r2)
-20$:    ret
-
-30$:    pushl   #ERR_DBCCERR
-	calls   #1,G^LIB$SIGNAL
-	ret
-
-
-; Crash reinitialization
-crash:  bbssi   #0,MUTEX_WRTPND(r2),10$ ;set the write pending bit
-10$:    adawi   #1,MUTEX_CRASHCNT(r2)   ;increment the crash sequence number
-	.disable flagging
-	clrq    MUTEX_FREEHEAD(r2)      ;assure that no one goes into the wait queue
-	.enable flagging
-
-	;wake up all sleeping processes;  they will crash
-	movab   MUTEX_PROCHEAD(r2),r4
-	movl    r4,r5                   ;r4,r5 -> queue head
-
-	addw3   #1,MUTEX_QUESLOTS(r2),r0 ;r0 = number of queue slots
-	cvtwl   r0,r0
-	ashl    r0,#4,r0                ;scale by 16
-	movab   MUTEX_PROCHEAD(r2)[r0],r6 ;r6 -> top of the queue array
-
-20$:    movl    (r4),r0
-	beql    clean                   ;the wait queue was empty;  do a clean initialization
-
-	addl    r0,r4                   ;r4 probably -> queue entry
-	cmpl    r4,r5                   ;if r4 -> queue head, then loop is done
-	blequ   clean                   ;if r4 -> below queue head, then the queue is corrupt
-					;... either way, do a clean initialization
-	cmpl    r4,r6                   ;if r4 -> above queue top, then the queue is corrupt
-	bgequ   clean                   ;... so do a clean initialization
-	bitb    r4,#3                   ;if r4 is not quadword aligned, then the queue is corrupt
-	beqlu   30$
-	brw     clean                   ;... so do a clean initialization
-
-	;otherwise, wake up the process
-30$:    pushal  MUTEX_PID(r4)
-	calls   #1,G^crit_wake
-	brb     20$
-
-
-;       enum    cdb_sc  mutex_lockr(mutex_struct *addr, int4 crash_count, uint4 *read_lock, mutex_spin_parms_ptr_t spin_parms);
-;
-;       Lock read access to the mutex at addr
-
-
-	.entry  mutex_lockr,^m<r2,r3,r4,r5,r6>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-	movl    12(ap),r4               ;r4 -> read lock flag
-
-10$:    cmpw    8(ap),MUTEX_CRASHCNT(r2) ;has the crash count changed?
-	bneq    30$                     ;if so, return an error
-
-	movl    #1,(r4)                 ;set the read lock flag
-;+
-;
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;        adawi   #1,(r2)                 ;increment the semaphore
-;        bbssi   #1,MUTEX_WRTPND(r2),20$ ;force access to the write pending byte
-;20$:    blbs    MUTEX_WRTPND(r2),40$    ;if write pending, sleep and try again later
-;-
-
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-	evax_mb                         ; need memory barrier
-15$:
-	evax_ldll r16,(r2)              ; read mutex locked
-	bbs     #16,r16,40$             ; skip, if write pending
-	incw    r16                     ; incr owner count
-	evax_stlc r16,(r2)              ; store mutex
-	.branch_unlikely
-	evax_beq r16,15$                ; retry, if store failed
-	evax_mb                         ; need memory barrier
-
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-30$:    movzbl  #cdb_sc_critreset,r0    ;return error
-	ret
-
-40$:    movl    16(ap),r6                               ;spin_parms
-	movl    MUTEX_HARD_SPIN_COUNT_OFFSET(r6),r6     ;spin_parms->mutex_hard_spin_count
-	bsbw    sleep                                   ;(clears the read lock flag)
-	brb     10$                                     ;try again
-
-
-;       enum    cdb_sc  mutex_lockw(mutex_struct *addr, int4 crash_count, uint4 *write_lock, mutex_spin_parms_ptr_t spin_parms);
-;
-;       Lock write access to the mutex at addr
-
-
-	.entry  mutex_lockw,^m<r2,r3,r4,r5,r6>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-	movl    12(ap),r4               ;r4 -> write lock flag
-
-10$:    cmpw    8(ap),MUTEX_CRASHCNT(r2) ;has the crash count changed?
-	bneq    40$                     ;if so, return an error
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),20$ ;set the write pending bit
-;20$:    movl    #1,(r4)                 ;set the write lock flag
-;        adawi   #1,(r2)                 ;increment the semaphore
-;        bgtr    50$                     ;branch if semaphore > 0 - there are other owners
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),30$ ;set write pending again
-;30$:    tstw    (r2)                    ;see if any other process has entered crit
-;        bneq    60$                     ;if so, sleep and try again later
-;-
-	evax_mb                         ; need memory barrier
-	movl    #MUTEX_WRTPND_MASK,r18  ; Get a write pending mask in R18
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-15$:    evax_ldll r16,(r2)              ; read mutex locked
-	evax_extwl r16,#0,r17           ; extract owner count from low word
-	evax_addq  r17,#1,r28           ; Owner plus 1
-	evax_extwl r28,#0,r28           ; maintain owner count as a word
-	evax_cmoveq     r28,#0,r17      ; If zero we can own, otherwise don't change
-	evax_addq r18,r17,r16           ; set write pending bit
-	evax_stlc r16,(r2)              ; store mutex
-	.branch_unlikely
-	evax_beq r16,15$                ; retry, if store failed
-	evax_mb                         ; need memory barrier
-	evax_bne r28,60$                ; branch, if wait flag set
-
-	movl    #1,(r4)                 ;set the write lock flag
-
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-40$:    movzbl  #cdb_sc_critreset,r0    ;return error
-	ret
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; The additional bbssi is not required - with the prior use of
-; multiple interlock operations, the probablity that a writer
-; unlocked the mutex was much greater.
-
-;50$:    bbssi   #0,MUTEX_WRTPND(r2),60$ ;set write pending again
-;-
-
-60$:    movl    16(ap),r6                               ;spin_parms
-	movl    MUTEX_HARD_SPIN_COUNT_OFFSET(r6),r6     ;spin_parms->mutex_hard_spin_count
-	bsbw    sleep                                   ;(clears the write lock flag)
-	brb     10$                                     ;try again
-
-
-;       enum    cdb_sc  mutex_lockwim(mutex_struct *addr, int4 crash_count, uint4 *write_lock);
-;
-;       Lock write access to the mutex at addr;  if cannot lock, immediately return cdb_sc_nolock
-
-
-	.entry  mutex_lockwim,^m<r2>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-
-	cmpw    8(ap),MUTEX_CRASHCNT(r2) ;has the crash count changed?
-	bneq    30$                     ;if so, return error condition
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),10$ ;set the write pending bit
-;10$:    adawi   #1,(r2)                 ;increment the semaphore
-;        bgtr    40$                     ;branch if semaphore > 0 - there are other owners
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),20$ ;set write pending again
-;20$:    tstw    (r2)                    ;see if any other process has entered crit
-;        bneq    40$                     ;branch if so
-;-
-	evax_mb                         ; need memory barrier to force all writes out
-15$:    movl    #MUTEX_WRTPND_MASK,r19  ; Get a write pending mask in R19
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-	evax_ldll r16,(r2)              ; read mutex locked
-	evax_addq  r16,#1,r19           ; Owner plus 1
-	evax_extwl r19,#0,r28           ; extract owner count
-	tstl    r28                     ; Can we obtain the mutex?
-	bneq    40$                     ; If other owners then no, branch and return error
-	evax_stlc r19,(r2)              ; store mutex
-	.branch_unlikely
-	evax_beq r19,15$                ; retry, if store failed
-	evax_mb                         ; need memory barrier
-
-	movl    #1, at 12(ap)              ;set the write lock flag
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-30$:    movzbl  #cdb_sc_critreset,r0    ;return error
-	ret
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; The mutex manipulation no longer leaves the owner count incremented
-; when the mutex is not acquired.  The decrement is thus no longer
-; required.  In addition, the Note below no longer applies since
-; the atomic manipulation above can not incorrectly leave the
-; write pending flag set.
-;
-;       adawi   #-1,(r2)                ;decrement the semaphore
-;       blss    10$
-;
-;40$:
-;
-;        ;Note:  this may incorrectly leave write pending set, but as long as there is
-;        ;       a process in crit, this will produce only a temporary inefficiency
-; -
-
-40$:    movzbl  #cdb_sc_nolock,r0       ;return failure
-	ret
-
-
-;       enum    cdb_sc  mutex_lockw_ccp(mutex_struct *addr, short crash_count, uint4 *write_lock, long super_crit);
-;
-;       Lock write access to the mutex at addr;  if cannot lock, queue the CCP process for "wakeup",
-;       and return cdb_sc_nolock (do NOT hibernate)
-
-
-	.entry  mutex_lockw_ccp,^m<r2,r3,r4,r5>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-
-	cmpw    8(ap),MUTEX_CRASHCNT(r2) ;has the crash count changed?
-	bneq    30$                     ;if so, return an error
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),10$ ;set the write pending bit
-;10$:    adawi   #1,(r2)                 ;increment the semaphore
-;        bgtr    40$                     ;branch if semaphore > 0 - there are other owners
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),20$ ;set write pending again
-;20$:    tstw    (r2)                    ;see if any other process has entered crit
-;        bneq    40$                     ;branch if so
-;
-;-
-	evax_mb                         ; need memory barrier to force all writes out
-15$:    movl    #MUTEX_WRTPND_MASK,r18  ; Get a write pending mask in R18
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-	evax_ldll r16,(r2)              ; read mutex locked
-
-	evax_extwl r16,#0,r17           ; extract owner count from low word
-	evax_addq  r17,#1,r28           ; Owner plus 1
-	evax_extwl r28,#0,r28           ; maintain owner count as a word
-	evax_cmoveq     r28,#0,r17      ; If zero we can own, otherwise don't change
-	evax_addq r18,r17,r16           ; set write pending bit
-	evax_stlc r16,(r2)              ; store mutex
-	.branch_unlikely
-	evax_beq r16,15$                ; retry, if store failed
-	evax_mb                         ; need memory barrier
-	evax_bne r28,40$                ; branch, if wait flag set
-
-	movl    #1, at 12(ap)              ;set the write lock flag
-
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-30$:    movzbl  #cdb_sc_critreset,r0    ;return error
-	ret
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;40$:    adawi   #-1,(r2)                ;decrement the semaphore
-;        blss    10$
-;-
-40$:
-
-; Insert the CCP process at the HEAD of the wakeup queue, but do NOT hibernate
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;        bbssi   #0,MUTEX_WRTPND(r2),50$ ;set write pending again
-;
-; I don't know enough about how this mutex code is used and wheter or not
-; this is an issue, but there is a window such that when we are placing a
-; CCP process in the wait queue for a mutex, if the existing owner should release
-; the mutex prior to us getting an entry on the wait queue, then no one will
-; try to wake up the CCP process.
-;-
-
-50$:    movl    #QUANT_RETRY,r5
-60$:    movzbl  #QUEUE_RETRY,r1
-
-70$:    remqhi  MUTEX_FREEHEAD(r2),r3   ;get a free slot
-	bvs     130$                    ;branch if the queue was empty or the secondary interlock failed
-
-	movl    16(ap),MUTEX_SUPER_CRIT(r3) ;stash the super_crit value (no need to stash the pid)
-
-	movl    #QUANT_RETRY,r5
-80$:    movzbl  #QUEUE_RETRY,r1
-
-90$:    insqhi  (R3),MUTEX_PROCHEAD(r2) ;insert at the HEAD of the wait queue
-	bcs     100$                    ;branch if the secondary interlock failed
-
-	movzbl  #cdb_sc_nolock,r0       ;return failure to lock - successfully queued
-	ret
-
-	;the secondary interlock failed on an attempt to insert into the wait queue
-100$:   sobgtr  r1,90$
-	sobgtr  r5,120$
-
-	;too many queue failures
-110$:   movzbl  #cdb_sc_dbccerr,r0      ;return error
-	ret
-
-120$:   calls   #0,G^rel_quant
-	brb     80$
-
-	;the free queue was empty or the secondary interlock failed
-130$:   sobgtr  r1,70$
-	sobgtr  r5,140$
-
-	;too many queue failures
-	brb     110$
-
-140$:   calls   #0,G^rel_quant
-	brb     60$
-
-
-;       enum    cdb_sc  mutex_wtor(mutex_struct *addr, uint4 *read_lock, uint4 *write_lock);
-;
-;       Change write access to the mutex at addr to read access, and do a wakeup
-
-	.entry  mutex_wtor,^m<r2,r3,r4,r5,r6>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-
-	movl    #1, at 8(ap)               ;set the read lock flag
-
-;        bbcci   #0,MUTEX_WRTPND(r2),10$ ;clear the write pending bit
-;10$:
-;-
-
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-	evax_mb                         ; need memory barrier
-15$:
-	evax_ldll r16,(r2)              ; read mutex locked
-	clrl    r16
-	evax_stlc r16,(r2)              ; store mutex as 0
-	.branch_unlikely
-	evax_beq r16,15$                ; retry, if store failed
-	evax_mb                         ; need memory barrier
-
-	bsbw    mutex_wakeup
-
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-
-;       enum    cdb_sc  mutex_unlockr(mutex_struct *addr, short crash_count, uint4 *read_lock);
-;
-;       Unlock read access to the mutex at addr
-
-
-	.entry  mutex_unlockr,^m<r2,r3,r4,r5,r6>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-
-	cmpw    8(ap),MUTEX_CRASHCNT(r2) ;has the crash count changed?
-	bneq    20$                     ;if so, return an error
-
-	clrl    @12(ap)                 ;clear the read lock flag
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;        adawi   #-1,(r2)                ;decrement the semaphore
-;-
-
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-	evax_mb                         ; need memory barrier
-15$:
-	evax_ldll r16,(r2)              ; read mutex locked
-	decw    r16                     ; decr owner count
-	evax_stlc r16,(r2)              ; store mutex
-	.branch_unlikely
-	evax_beq r16,15$                ; retry, if store failed
-	evax_mb
-
-;
-;
-; The following two source lines seem to be an attempt at recovering
-; from a situation in which a writer dies after setting it (and before
-; incrementing the semaphore) causing later readers to block. They are being
-; commented out for the following reasons -
-; a. If this reader clears wrtpnd after a new writer has set wrtpnd (and before
-;    incrementing semaphore), a new reader coming after the new writer might
-;    successfully grab read crit forcing the new writer to wait in violation of
-;       "A write request blocks access to additional readers until after
-;       the writer is granted crit and then releases it"
-;    as stated above.
-; b. Recovery from failures is anyway incomplete. We can live without this one!
-;
-; Vinaya, 07/21/98
-;
-;       bgeq    10$                     ;if less than zero, there are no more
-;                                       ;owners <--??? is this logic correct?
-;       bbcci   #0,MUTEX_WRTPND(r2),10$ ;clear the write pending bit;
-;                                       ;if already clear, skip the wakeup
-
-	bsbw    mutex_wakeup
-
-;Label no longer required. See comments above. Vinaya, 07/21/98
-;10$:   clrl    r0                      ;return success (cdb_sc_normal == 0)
-
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-20$:    movzbl  #cdb_sc_critreset,r0    ;return error
-	ret
-
-
-;       enum    cdb_sc  mutex_unlockw(mutex_struct *addr, short crash_count, uint4 *write_lock);
-;
-;       Unlock write access to the mutex at addr
-
-
-	.entry  mutex_unlockw,^m<r2,r3,r4,r5,r6>
-
-	movl    4(ap),r2                ;r2 -> mutex structure
-
-	cmpw    8(ap),MUTEX_CRASHCNT(r2) ;has the crash count changed?
-	bneq    20$                     ;if so, return an error
-
-	clrl    @12(ap)                 ;clear the write lock flag
-
-;
-;The order in which the semaphore is decremented and wrtpnd is cleared is
-;important. The order "decrement semaphore" and then "clear wrtpnd" might
-;lead to a writer and multiple readers all acquiring crit successfully
-;(violation of mutual exclusion). An example scenario -
-; 0. Writer A in the process of releasing crit, decrements semaphore
-; 1. Writer B acquires crit
-; 2. Writer A clears wrtpnd
-; 3. Readers C, D, etc grab read crit successfully
-;By changing the order to "clear wrtpnd" and then "decrement semaphore", we
-;prevent such scenarios from occuring. But we now have the possibility of
-;new readers beating a prior writer in violation of -
-;       "A write request blocks access to additional readers until after
-;       the writer is granted crit and then releases it"
-;as stated above. This might happen in the window between clearing wrtpnd and
-;decrementing the semaphore. Note that this won't violate mutual exclusion and
-;hence a better choice.
-;
-; Vinaya, 07/21/98
-;
-;       adawi   #-1,(r2)                ;decrement the semaphore
-;
-;       bbcci   #0,MUTEX_WRTPND(r2),10$ ;clear the write pending bit
-;10$:   bsbw    mutex_wakeup
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.  With the single
-; atomic operation, the ordering issue described above are no longer
-; possible.
-;
-;        bbcci   #0,MUTEX_WRTPND(r2),10$ ;clear the write pending bit
-;10$:    adawi   #-1,(r2)                ;decrement the semaphore
-;-
-
-	ASSUME  MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-	evax_mb                         ; need memory barrier
-15$:
-	evax_ldll r16,(r2)              ; read mutex locked
-	movl #^xffff,r17                ; create free mutex state
-	evax_stlc r17,(r2)              ; store mutex
-	.branch_unlikely
-	evax_beq r17,15$                ; retry, if store failed
-	evax_mb
-
-	bsbw    mutex_wakeup
-
-	clrl    r0                      ;return success (cdb_sc_normal == 0)
-	ret
-
-20$:    movzbl  #cdb_sc_critreset,r0    ;return error
-	ret
-
-
-;       Insert this process at the tail of the wait queue,
-;       and hibernate for 10 seconds
-;
-;       On entry, r2 -> mutex structure
-;                 r4 -> read lock flag or write lock flag
-
-
-sleep:
-	.jsb32_entry    input=<r2,r4,r6>
-
-	clrl    (r4)                    ;clear the lock flag (read or write)
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; The mutex manipulation no longer leaves the owner count incremented
-; when the mutex is not acquired.  The decrement is thus no longer
-; required.
-;
-;       adawi   #-1,(r2)                ;decrement the semaphore
-;       bgeq    10$                     ;branch if there are other owners
-;-
-	tstl    num_additional_processors ; If no other processors
-	beql    10$                     ; .. avoid spinlock and go right to sleep
-	evax_mb                         ; complete all reads/writes prior to lock ref
-5$:
-	tstw    (r2)
-	blss    7$                      ; branch if lock is available
-	sobgeq  r6,5$
-	brb     10$
-
-
-7$:
-; 06/19/2002 se: In previous incarnations of GT.M we used read locks. Because of that,
-; the jsb to mutex_wakeup below was warranted because we might need to wake up some
-; readers. Now with all locks being write locks what is happening is that if we fail
-; to get a write lock the first time and come here, then within some few number of hard-spin
-; iterations we see the lock available, we don't return to try and get the lock until after
-; we have gone to mutex_wakeup and woken up the first of any sleepers. This is also
-; another potential cause for the AST thrashing being seen at the VA. This sleep
-; routine has no reason to wake up anybody except itself.
-;       jsb     mutex_wakeup
-	rsb
-
-10$:    movl    #QUANT_RETRY,r5
-20$:    movzbl  #QUEUE_RETRY,r1
-
-30$:    remqhi  MUTEX_FREEHEAD(r2),r3   ;get a free slot
-	bvs     100$                    ;branch if the queue was empty or the secondary interlock failed
-
-	movl    process_id,MUTEX_PID(r3)
-
-	movl    #QUANT_RETRY,r5
-40$:    movzbl  #QUEUE_RETRY,r1
-
-50$:    insqti  (R3),MUTEX_PROCHEAD(r2) ;insert at the tail of the wait queue
-	bcs     70$                     ;branch if the secondary interlock failed
-
-	;08/20/2002 nars : we need to redo the crit test after inserting ourselves into the wait queue.
-	; this is because it is possible that crit became free in the time between our hard spin loop and
-	;       insertion into the wait queue in which case, if we otherwise decide to hibernate for
-	;       10 seconds there will be nobody to wake us up.
-	; also note that we will do a mutex_wakeup ONLY IF we see noone holding crit. this is therefore
-	;       not likely to result in cascading wakeups (for large number of processes) since the very
-	;       first process to be woken up and obtain crit will stop future wakeups.
-	tstw    (r2)                    ;see if any other process has entered crit
-	bgeq    60$                     ;branch if so
-	jsb     mutex_wakeup
-
-	;hibernate for 10 seconds
-60$:
-	clrl    crit_sleep_expired      ;clear timer so can know if it expired or we were woken up
-	pushl   #-1                     ;build the timer quadword on the stack...
-	pushl   #-100000000              ;... 10 seconds delta time
-	movl    sp,r0                   ;save its address
-
-	clrl    -(sp)                   ;flags argument:  elapsed time
-	pushl   r2                      ;reqidt argument:  address of the mutex structure
-	pushab  mutex_tickle            ;astadr argument:  see routine below
-	pushl   r0                      ;daytim argument:  address of the timer quadword on the stack
-	pushl   #efn$c_enf              ;use no efn argument
-	calls   #5,G^sys$setimr
-
-	addl    #8,sp                   ;pop the timer quadword
-
-	calls   #0,G^sys$hiber
-
-	tstl    crit_sleep_expired      ;if not expired, return now to try to get lock immediately
-	bnequ   65$                     ;branch if expired.
-	pushl   #PSL$C_USER             ;acmode argument
-	pushl   r2                      ;reqidt argument:  address of the mutex structure
-	calls   #2,G^sys$cantim         ; kill unpopped timer
-	rsb                             ; retry lock
-
-65$:    pushl   r2                      ; address of mutex structure
-	calls   #1,mutex_deadlock_check ;crit deadlock detection check
-	rsb                             ;retry lock even though we were not awakened.
-
-	;the secondary interlock failed on an attempt to insert into the wait queue
-70$:    sobgtr  r1,50$
-	sobgtr  r5,90$
-
-	;too many queue failures
-80$:    movzbl  #cdb_sc_dbccerr,r0      ;return error
-;        ret *** replaced with rsb below to eliminate compiler warnings. Using a ret here is not valid in the
-;                cross compiled environment due to not keeping args/save areas on the stack in
-;                the same way the vax did. se 8/2002
-	rsb
-
-90$:    calls   #0,G^rel_quant
-	brb     40$
-
-	;the free queue was empty or the secondary interlock failed
-100$:   bcs     110$                    ;branch if the secondary interlock failed
-
-	;the free queue was empty - wait a second, then try again
-; 2000/1/25 smw avoid link error for amac$flt_tsf
-;       movf    #1.0,-(sp)              ;store the value on the stack so that it can be passed by reference
-;       movl    sp,r0                   ;the argument to lib$wait is the address of the value
-;       pushl   r0
-;       calls   #1,G^lib$wait
-;       addl    #4,sp                   ;clean up the stack
-	pushl   #1000                   ; 1 second
-	calls   #1,G^hiber_start        ; wait
-	brw     10$
-
-	;the secondary interlock failed on an attempt to remove an entry from the free queue
-110$:   sobgtr  r1,120$
-	sobgtr  r5,130$
-
-	;too many queue failures
-	brb     80$
-
-120$:   brw     30$
-
-130$:   calls   #0,G^rel_quant
-	brw     20$
-
-
-;       AST routine for the timer in sleep, above
-;
-;       The argument is the address of a mutex structure
-
-	.entry  mutex_tickle,^m<r2,r3,r4,r5,r6>
-
-	movl    #1,crit_sleep_expired   ;we waited long and hard..
-	clrl    -(sp)
-	clrl    -(sp)
-	calls   #2,G^sys$wake
-
-	movl    4(ap),r2
-	bsb     mutex_wakeup
-
-	ret
-
-
-;       Wake up the process at the head of the wait queue
-;
-;       On entry, r2 -> mutex structure
-
-
-mutex_wakeup:
-	.jsb32_entry    input=<r2>
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; Perform a quick test to see if there are any processes waiting for the
-; mutex.  This avoids the more expensive REMQTI PAL Call at 20$ from
-; performing this test.
-;-
-	movzbl	#MAX_WAKE,r6
-3$:	evax_mb                         ; make sure we see changes done by other processor
-	tstl    MUTEX_PROCHEAD(r2)      ; Are there any waiters?
-	bneq    5$                      ; if neq, yes go release them
-	rsb                             ;  otherise return quickly
-
-5$:	movl    #QUANT_RETRY,r5
-10$:    movzbl  #QUEUE_RETRY,r1
-
-20$:    remqhi  MUTEX_PROCHEAD(r2),r3   ;get the first entry from the wait queue
-	bvs     90$                     ;branch if the queue was empty or the secondary interlock failed
-
-;	movl    MUTEX_SUPER_CRIT(r3),r6 ;save the super_crit value in r6 for wake_process - no more CCP 3/2007 RP
-;	clrl    MUTEX_SUPER_CRIT(r3)
-
-	movl    #QUANT_RETRY,r5
-30$:    movzbl  #QUEUE_RETRY,r1
-
-	movl    MUTEX_PID(r3),r0        ;save the pid in r0 for wake_process
-
-40$:    insqti  (r3),MUTEX_FREEHEAD(r2)
-	bcs     60$                     ;branch if the secondary interlock failed
-
-	bsb     wake_process
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001
-;
-; There is no need to force an interlock read on the write pending bit here.
-;
-;       bbssi   #1,MUTEX_WRTPND(r2),50$ ;force access to the write pending byte
-;50$:
-;-
-	sobgtr	r6,50$
-	rsb				;enough waking for one process
-50$:	bicl3	#REST_FREQ,r6,r0
-	bneq	55$
-	calls   #0,G^rel_quant	;to be sure that some process is awakened, pause and try another if still no pending rp 3/2007
-55$:	blbc    MUTEX_WRTPND(r2),3$
-	rsb				;write pending is set - stop wakeups
-
-	;the secondary interlock failed on an attempt to insert into the free queue
-60$:    sobgtr  r1,40$
-	sobgtr  r5,80$
-
-	bsb     wake_process
-
-	;too many queue failures
-70$:    movzbl  #cdb_sc_dbccerr,r0      ;return error
-;        ret *** replaced with rsb below to eliminate compiler warnings. Using a ret here is not valid in the
-;                cross compiled environment due to not keeping args/save areas on the stack in
-;                the same way the vax did. se 8/2002
-	rsb
-
-80$:    calls   #0,G^rel_quant
-	brb     30$
-
-	;the wait queue was empty or the secondary interlock failed
-90$:    bcs     100$                    ;branch if the secondary interlock failed
-
-	rsb
-
-	;the secondary interlock failed on an attempt to remove an entry from the wait queue
-100$:   sobgtr  r1,20$
-	sobgtr  r5,110$
-
-	;too many queue failures
-	brb     70$
-
-110$:   calls   #0,G^rel_quant
-	brb     10$
-
-
-;       Wake up a process
-;
-;       This is a subroutine because we wish to insert the queue entry into the free queue prior to
-;       doing the wakeup, in order to minimize the time that the queue entry is unattached.
-;       Also, we wish to wake up the process even if the insq fails.
-;
-;       On entry, r0 == process id,
-;                 r6 == super_crit value
-
-wake_process:
-	.jsb32_entry    input=<r0,r6>
-
-; 07/30/2002 se: Don't disturb pipe for a condition that is no longer needed
-;        tstl    r6              ;was super_crit set?
-;        bneq    wake_ccp        ;branch if so
-
-	pushl   r0              ;store the pid on the stack, so that it can be passed by reference
-	movl    sp,r0           ;the argument to crit_wake is the address of the pid
-	pushl   r0              ;use two instructions for safety
-	calls   #1,G^crit_wake
-	addl    #4,sp           ;clean up the stack
-
-	rsb
-
-; 07/30/2002 se: The following code is disabled because it is no longer used and the compiler
-;                complains about dead (unreachable) code.
-;       The CCP never hibernated, so it doesn't get awakened per se;
-;       rather, we send it an appropriate message:
-;wake_ccp:
-;        pushl   r6              ;store the super_crit value on the stack, so that it can be passed by reference
-;        movl    sp,r0           ;the second argument to ccp_sendmsg is the address of the super_crit value
-;        pushl   r0              ;use two instructions for safety
-;        pushl   #CCTR_SCRIT     ;the first argument to ccp_sendmsg is the action code:  super_crit granted
-;        calls   #2,G^ccp_sendmsg
-;        addl    #4,sp           ;clean up the stack
-;
-;        rsb
-
-	.end
diff --git a/sr_avms/mutex_stoprel.mar b/sr_avms/mutex_stoprel.mar
deleted file mode 100644
index 7d3ce57..0000000
--- a/sr_avms/mutex_stoprel.mar
+++ /dev/null
@@ -1,140 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;                                                               ;
-;       Copyright 2000, 2001 Sanchez Computer Associates, Inc.  ;
-;                                                               ;
-;       This source code contains the intellectual property     ;
-;       of its copyright holder(s), and is made available       ;
-;       under a license.  If you do not know the terms of       ;
-;       the license, please stop and do not read further.       ;
-;                                                               ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.title	mutex_stoprel	gtm mutex control
-
-MUTEX_OWNCNT = 0
-MUTEX_WRTPND = 2
-MUTEX_PROCHEAD =  64 ;  8
-MUTEX_FREEHEAD = 128 ; 24
-MQUE_PID = 8
-QUE_RETRY = 128
-
-; NOTE:  The following definition corresponds to an item of the same name in CDB_SC.H.
-;	 Make sure that it is maintained compatibly!
-cdb_sc_dbccerr = 81	; 'Q'
-
-	code_psect
-
-	.entry	mutex_stoprelr,^m<r2,r3>
-	movl	4(ap),r2		;r2 points to head of structure
-;+
-; Moser and Jordan (Compaq Computer Corporation))  2-APR-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.  With the single
-; atomic operation, the ordering issue described above are no longer
-; possible.
-;
-;	adawi	#-1,(r2)		;decrement semaphore
-;	bgeq	20$
-;	bbcci	#0,MUTEX_WRTPND(r2),20$	;if was a write pending do wakeup
-;-
- 
-	ASSUME	MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-15$:	evax_ldll r16,(r2)		; read mutex locked
-	evax_sll  r16,#16,r28		; Move WRTPND to bit pos 0
-	decw	r16			; decr owner count
-	evax_and r16,#^xffff,r16	; clear WRTPND bit
-	evax_stlc r16,(r2)		; store mutex	
-	.branch_unlikely
-	evax_beq r16,15$		; retry, if store failed
-	evax_mb
-
-	blbs	r28,20$ 		; skip, if no write pending
-        bsbw    mutex_wakeup
-
-20$:	clrl	r0			;return success:  cdb_sc_normal == 0
-	ret
-
-
-	.entry	mutex_stoprelw,^m<r2,r3>
-	movl	4(ap),r2		;r2 points to head of structure
-
-;+
-; Moser and Jordan (Compaq Computer Corporation))  2-APR-2001
-;
-; Change manipulation of the mutex owner count and write pending flag
-; to a single atomic operation using ldl_l/stl_c.
-;
-;        adawi   #-1,(r2)                ;decrement the semaphore
-;	bbcci	#0,MUTEX_WRTPND(r2),10$
-;-
-
-	ASSUME	MUTEX_WRTPND EQ MUTEX_OWNCNT+2
-15$:	evax_ldll r16,(r2)		; read mutex locked
-	decw	r16			; decr owner count
-	evax_and r16,#^xffff,r16	; clear WRTPND bit
-	evax_stlc r16,(r2)		; store mutex	
-	.branch_unlikely
-	evax_beq r16,15$		; retry, if store failed
-	evax_mb
-
-	bsb	mutex_wakeup
-	clrl	r0			;return success:  cdb_sc_normal == 0
-	ret
-
-
-mutex_wakeup:
-	.jsb32_entry
-
-	movzbl	#QUE_RETRY,r1
-5$:	remqhi	MUTEX_PROCHEAD(r2),r3	;get first entry in queue
-	bvc	20$			;got a que entry
-	bcc	70$			;no entries left...all done
-	sobgtr	r1,5$			;secondary interlock failed
-
-10$:	movl	#cdb_sc_dbccerr,r0
-	ret
-
-20$:	movl	MQUE_PID(r3),r0
-	movzbl	#QUE_RETRY,r1
-40$:	insqti	(r3),MUTEX_FREEHEAD(r2)
-	bcc	50$
-	sobgtr	r1,40$
-	bsb	wake_job
-	brb	10$
-
-50$:	bsb	wake_job
-
-;+
-; Moser and Jordan (Compaq Computer Corporation)) 29-Mar-2001 
-;
-; There is no need to foce an interlock read on the write pending bit here.
-;
-;	bbssi   #1,MUTEX_WRTPND(r2),60$ ;force access to the write pending byte
-;60$:
-;-
-	blbs	MUTEX_WRTPND(r2),70$	;if write pending set stop wakeups
-	brb	mutex_wakeup
-
-70$:	rsb
-
-
-; wake up a job
-; enter with r0 containing the pid
-; exit with job awakened, r0,r1 destroyed
-; this is a subroutine, because we wish to insert que entry in free
-; list prior to making service call in order to minimize the time
-; that the que entry is unattached.  Also we wish to wake up the
-; job, even if the insq fails
-
-wake_job:
-	.jsb32_entry
-
-	pushl	r0		;store pid on stack, so that it can be
-				;referenced by address
-	movl	sp,r0		;argument to crit_wake is address of pid
-	pushl	r0		;use two instructions for safety
-	calls	#1,G^crit_wake
-	moval	4(sp),sp	;clean-up the stack
-	rsb			;return to calling program
-
-	.end
diff --git a/sr_avms/mval$def.max b/sr_avms/mval$def.max
deleted file mode 100644
index 87bf3d4..0000000
--- a/sr_avms/mval$def.max
+++ /dev/null
@@ -1,149 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2012 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.macro	mval$def
-
-mval$v_nm 	  = 0
-mval$v_int	  = 1
-mval$v_str	  = 2
-mval$v_num_approx = 3
-mval$v_canonical  = 4
-mval$v_sym	  = 5
-mval$v_sublit	  = 6
-mval$v_retarg	  = 7
-mval$v_utflen     = 8
-mval$v_aliascont  = 9
-
-mval$m_nm 	  = ^x1
-mval$m_int	  = ^x3
-mval$m_str	  = ^x4
-mval$m_num_approx = ^x8
-mval$m_canonical  = ^x10
-mval$m_sym	  = ^x20
-mval$m_sublit	  = ^x40
-mval$m_retarg	  = ^x80
-mval$m_utflen     = ^x100
-mval$m_aliascont  = ^x200
-
-mval$w_mvtype	= 0
-mval$b_exp	= 2
-mval$l_strlen	= 4
-mval$a_straddr	= 8
-mval$q_num	= 12
-mval$l_m0	= 12
-mval$l_m1	= 16
-
-mval$size	= 20
-
-MV_BIAS		= 1000
-MANT_LO		= 100000000
-MANT_HI		= 1000000000
-INT_HI		= 1000000
-
-	.macro	mv_force_defined	mval, ?label
-	mv_if_defined (mval), label
-	$call	underr, args=<mval>, nonstandard=true
-	mov	r0, mval
-label:	.endm	mv_force_defined
-
-	.macro	mv_force_defined_strict	mval, ?label
-	mv_if_defined (mval), label
-	$call	underr_strict, args=<mval>, nonstandard=true
-label:	.endm	mv_force_defined_strict
-
-	.macro	mv_force_str	mval, ?label
-	mv_if_string mval, label
-	$call	n2s, args=<mval/a>, nonstandard=true
-label:	.endm	mv_force_str
-
-	.macro	mv_force_num	mval, ?label
-	mv_if_number mval, label
-	$call	s2n, args=<mval/a>, nonstandard=true
-label:	.endm	mv_force_num
-
-	.macro	mv_force_str_if_num_approx	mval, ?label
-	mv_if_notnumapprox mval, label
-	$call	n2s, args=<mval/a>, nonstandard=true
-label:	.endm	mv_force_str_if_num_approx
-
-	.macro	mv_i2mval	int, mval
-	mov	MV_BIAS, r22
-	ldl	r24, mval$w_mvtype(mval)
-	mov	mval$m_int, r23
-	mskwl	r24, 0, r24			; clear mval$w_mvtype
-	mull	r22, int, r28
-	or	r24, r23, r24
-	stl	r28, mval$l_m1(mval)
-	stl	r24, (mval)
-	.endm	mv_i2mval
-
-	.macro	mv_if_string	mval, label
-	ldl	r28, mval
-	and	r28, mval$m_str, r28
-	bne	r28, label
-	.endm	mv_if_string
-
-	.macro	mv_if_notstring	mval, label
-	ldl	r28, mval
-	and	r28, mval$m_str, r28
-	beq	r28, label
-	.endm	mv_if_notstring
-
-	.macro	mv_if_number	mval, label
-	ldl	r28, mval
-	blbs	r28, label
-	.endm	mv_if_number
-
-	.macro	mv_if_notnumber	mval, label
-	ldl	r28, mval
-	blbc	r28, label
-	.endm	mv_if_notnumber
-
-	.macro	mv_if_notnumapprox	mval, label
-	ldl	r28, mval
-	and	r28, mval$m_num_approx, r28
-	beq	r28, label
-	.endm	mv_if_notnumapprox
-
-	.macro	mv_if_int	mval, label
-	ldl	r28, mval
-	and	r28, mval$m_int-mval$m_nm, r28
-	bne	r28, label
-	.endm	mv_if_int
-
-	.macro	mv_if_notint	mval, label
-	ldl	r28, mval
-	and	r28, mval$m_int-mval$m_nm, r28
-	beq	r28, label
-	.endm	mv_if_notint
-
-	.macro	mv_if_defined	mval, label
-	ldl	r28, mval
-	and	r28, mval$m_nm+mval$m_str, r28
-	bne	r28, label
-	.endm	mv_if_defined
-
-	.macro	mv_if_notdefined mval, label
-	ldl	r28, mval
-	and	r28, mval$m_nm+mval$m_str, r28
-	beq	r28, label
-	.endm	mv_if_notdefined
-
-	.macro	mv_if_canonical	mval, label, ?label1, ?label2
-	mv_if_notnumber mval, label1
-	and	r28, mval$m_num_approx, r28
-	bne	label2
-	br	label
-label1:	$call	val_iscan, args=<mval/a>, nonstandard=true
-	bne	r0, label
-label2:	.endm	mv_if_canonical
-
-
-	.endm	mval$def
diff --git a/sr_avms/mval2num.m64 b/sr_avms/mval2num.m64
deleted file mode 100644
index abd0ed4..0000000
--- a/sr_avms/mval2num.m64
+++ /dev/null
@@ -1,39 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2008 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	mval2num "Convert an mval to a number"
-
-;	On entry, r1 -> mval
-
-	mval$def
-
-	$routine MVAL2NUM, entry=MVAL2NUM_CA, kind=null
-
-	subq	sp, 24, sp
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	stq	r2, 16(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mov	r1, r2
-	mv_force_defined r2
-	mv_force_num	(r2)
-	mv_force_str_if_num_approx	(r2)
-
-	ldq	r28, (sp)
-	ldq	r13, 8(sp)
-	ldq	r2, 16(sp)
-	addq	sp, 24, sp
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/obj_file.c b/sr_avms/obj_file.c
deleted file mode 100644
index 53840ad..0000000
--- a/sr_avms/obj_file.c
+++ /dev/null
@@ -1,1283 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-
-#include "compiler.h"
-#include <rtnhdr.h>
-#include "obj_gen.h"
-#include "pdscdef.h"
-#include "objlangdefs.h"
-#include "cmd_qlf.h"
-#include "mdq.h"
-#include "stringpool.h"
-#include "axp_registers.h"
-#include "axp_gtm_registers.h"
-#include "axp.h"
-#include "proc_desc.h"
-#include "mmemory.h"
-#include "obj_file.h"
-
-struct sym_table
-{
-	struct sym_table	*next;
-	int4			linkage_offset;
-	int4			psect;
-	uint4			value;
-	unsigned short		name_len;
-	unsigned char		name[1];
-};
-
-struct linkage_entry
-{
-	struct linkage_entry	*next;
-	struct sym_table	*symbol;
-};
-
-/* values used in the RMS calls and header records */
-#define INITIAL_ALLOC		2
-#define DEFAULT_EXTEN_QUAN	10
-/* N.B., a useful value for the Alpha is 8192 */
-#define MAX_REC_SIZE		OBJ_EMIT_BUF_SIZE
-#define MAX_REC_NUM		1024
-#define VERSION_NUM		"V1.0"
-#define VERSION_NUM_SIZE	SIZEOF(VERSION_NUM) - 1
-#define MAX_IMMED		(MAX_REC_SIZE - 2 * SIZEOF(short) - 2 * SIZEOF(short) - SIZEOF(int4))
-#define NO_IMMED		0
-#define MIN_LINK_PSECT_SIZE	56
-
-LITREF char		gtm_release_name[];
-LITREF int4		gtm_release_name_len;
-
-GBLREF command_qualifier cmd_qlf;
-GBLREF mident		routine_name;
-GBLREF mident		module_name;
-GBLREF char		rev_time_buf[];
-GBLREF boolean_t	run_time;
-GBLREF uint4		code_size, lits_size;
-GBLREF unsigned char	*runtime_base;
-
-GBLDEF int4		psect_use_tab[GTM_LASTPSECT];	/* bytes of each psect this module */
-GBLREF char		object_file_name[256];
-GBLREF short		object_name_len;
-GBLREF struct FAB	obj_fab;			/* file access block for the object file */
-
-static short int	current_psect;
-static int4		linkage_size;
-static struct RAB	obj_rab;  			/* record access block for the object file */
-static char		sym_buff[OBJ_SYM_BUF_SIZE];	/* buffer for global symbol defs */
-static short int	sym_buff_used;			/* number of chars in sym_buff */
-static char		emit_buff[OBJ_EMIT_BUF_SIZE];	/* buffer for emit output (must match size of buffer used by incr_link */
-static short int	emit_buff_used;			/* number of chars in emit_buff */
-static short int	emit_last_immed;		/* index of last STO_IMM */
-static short int	linker_stack_depth;		/* linker stack depth */
-
-/* Values that appear in the psect definitions.  */
-#define CODE_PSECT_ALIGN	4 /* octaword aligned */
-#define LIT_PSECT_ALIGN		3 /* quadword aligned */
-#define RNAMB_PSECT_ALIGN	2 /* longword aligned */
-#define LINK_PSECT_ALIGN	4 /* octaword aligned */
-#define CODE_PSECT_FLAGS	EGPS$M_PIC|EGPS$M_REL|EGPS$M_SHR|EGPS$M_EXE|EGPS$M_GBL|EGPS$M_RD
-#define LIT_PSECT_FLAGS		EGPS$M_PIC|EGPS$M_REL|EGPS$M_SHR|EGPS$M_GBL|EGPS$M_RD
-#define RNAMB_PSECT_FLAGS	EGPS$M_PIC|EGPS$M_REL|EGPS$M_GBL|EGPS$M_RD|EGPS$M_WRT
-#define LINK_PSECT_FLAGS	EGPS$M_REL|EGPS$M_RD|EGPS$M_WRT
-#define CODE_PSECT_NAME		"GTM$CODE"
-#define LIT_PSECT_NAME		"GTM$LITERALS"
-#define LINK_PSECT_NAME		"GTM$LINK"
-#define OBJ_STRUCTURE_LEVEL	2
-#define OBJ_ARCH_1		0
-#define OBJ_ARCH_2		0
-
-/* Values that appear in procedure descriptors.  These values MUST match values in gtm$main in gtm_main.m64.  */
-/* Note: both RSA_END and STACK_SIZE must be multiples of 16; this may introduce padding at the beginning of each region.  */
-#define RSA_END			ROUND_UP((1 + 1 + 9)*8, 16)	/* r27 + A(condition handler) + 9 saved registers */
-#define RSA_OFFSET		(RSA_END - 9*8)			/* beginning of register save area */
-#define STACK_SIZE		ROUND_UP(RSA_END + (1+6)*8, 16)	/* add room for r25 (arg info), r16-r21 (arguments) */
-
-static MSTR_CONST(gtm_dyn_ch_name,"GTM$DYN_CH");
-static MSTR_CONST(main_call_name,"GTM$MAIN");
-
-/* Linkage pair index values.  In order to take advantage of linker-time procedure call optimization, we
-   need one linkage pair for each external procedure called.  The linkage pair consists of two pointers,
-   each with its own index (the index of the second pointer is 1 plus the index of the first: the first is
-   the address of the called procedure's entry point and the second is the address of its procedure
-   descriptor.
-*/
-#define LP_MAIN		1
-
-error_def(ERR_OBJFILERR);
-
-typedef struct _Addr_ref
-{
-	struct _Addr_ref *	next;
-	int			psect;
-	int			offset;
-	int			index;
-} Addr_ref;
-
-static Addr_ref	*addr_list = (void *) 0;
-static Addr_ref	*addr_list_end = (void *) 0;
-static int	addr_index;
-
-void emit_linkages(void);
-void emit_lp_rel( int reltype, int lpx, int psect1, int off1, int repl_ins, int psect2, int off2, int namelen,
-			char *name);
-void emit_sta_pq(int psect, int offset);
-void emit_stc_lp_psb(int lpx, int len, char *name);
-void emit_sto_gbl(int len, char	*name);
-void emit_sto_lw(void);
-void set_psect( int psect, int offset);
-void output_symbol(void);
-void buff_emit( char *buff, short size);
-char *emit_psc( char *buf, int align, int flags, int alloc, int length, char *name);
-void emit_sto_off(void);
-void flush_addrs(void);
-
-/*
- *	create_object_file
- *
- *	Args:	routine header for object module
- *
- *	Description:	Create and open object file.
- *			Write module and language processor header records.
- *			Write global symbol directory (GSD) psect definition records.
- *			Write routine procedure descriptor to beginning of linkage psect.
- *			Write linkage pair and address records to linkage section for external procedures.
- *			Generate and write to code psect procedure prologue portion of routine header.
- *			Write rest of routine header to code psect.
- *
- */
-
-void	create_object_file(rhdtyp *rhead)
-{
-	char	obj_name_buff[SIZEOF(mident_fixed) + SIZEOF(".OBJ") - 1];
-	struct NAM	nam;
-
-	int	stat, mname_len;
-	register char	*fast;
-	mstr	maincall;
-	char	psect_def_rec[MAX_REC_SIZE];	/* psect definition records */
-
-	/* All object files have a PSECT named "GTM$R" followed by the first 8 characters of the name of the
-	   routine.  This PSECT contains the routines table entry (rtn_tables) for the routine.
-
-	   Because the linker sorts PSECT's with the same significant attributes alphabetically in the same
-	   image section, this naming convention causes the linker to build the initial routines table for
-	   GT.M native object files that are included in the initial (static) link.
-
-	   Two dummy PSECT's named "GTM$R" and "GTM$RZZZZZZZZZZ" are defined in GTM_MAIN.M64 and will be sorted
-	   by the linker to delimit the beginning and end, respectively, of the initial routines table.  In
-	   order for this to work properly, the GTM_RNAMESAAAAB PSECT generated here must have the same
-	   significant linker attributes as those in GTM_MAIN.M64 and their alignment requirements must be
-	   identical to those of entries of the routines name table.
-	*/
-	/* GTM_RNAMESAAAAB PSECT name prefix */
-	char	rnambuf[RNAMB_PREF_LEN + SIZEOF(mident_fixed) + 1];
-
-	/* First quadword of procedure descriptor contains flags and offset fields. */
-	short	pdbuf_head[4] =
-	{
-		PDSC_FLAGS,
-		RSA_OFFSET,		/* register save area offset in stack frame */
-		0,			/* includes FRET field */
-		0			/* offset of call signature */
-	};
-
-	/* Last 2 quadwords of procedure descriptor before handler information. */
-	int4	pdbuf_tail[4] =
-	{
-		STACK_SIZE,					/* size of stack frame */
-		0,						/* includes ENTRY_LENGTH field */
-
-			  (1 << ALPHA_REG_FP)			/* IREG_MASK (N.B. don't set bit for ALPHA_REG_RA) */
-			| (1 << ALPHA_REG_S0)			/* r2 */
-			| (1 << ALPHA_REG_S1)                   /* r3 */
-			| (1 << ALPHA_REG_S2)                   /* r4 */
-			| (1 << ALPHA_REG_S3)                   /* r5 */
-			| (1 << ALPHA_REG_S4)                   /* r6 */
-			| (1 << ALPHA_REG_S5)                   /* r7 */
-			| (1 << GTM_REG_FRAME_VAR_PTR)		/* r8 */
-			| (1 << GTM_REG_FRAME_TMP_PTR)		/* r9 */
-			| (1 << GTM_REG_DOLLAR_TRUTH)		/* r10 */
-			| (1 << GTM_REG_XFER_TABLE)		/* r11 */
-			| (1 << GTM_REG_FRAME_POINTER)		/* r12 */
-			| (1 << GTM_REG_PV)			/* r13 */
-			| (1 << GTM_REG_LITERAL_BASE),		/* r14 */
-
-		0						/* FREG_MASK */
-	};
-
-	int	length;
-	int4	code_buf[MAX_REC_SIZE / 4];
-	int4	*codep;
-	int	gtm_main_call, gtm_main_lp;
-
-	assert(!run_time);
-	/* create the object file */
-	obj_fab = cc$rms_fab;		/* initialize to default FAB values supplied by <rms.h> */
-	obj_fab.fab$l_dna = obj_name_buff;
-	mname_len = module_name.len;
-	assert(mname_len <= MAX_MIDENT_LEN);
-	if (!mname_len)
-	{
-		MEMCPY_LIT(obj_name_buff, "MDEFAULT.OBJ");
-		obj_fab.fab$b_dns = SIZEOF("MDEFAULT.OBJ") - 1;
-	}
-	else
-	{
-		memcpy(obj_name_buff, module_name.addr, mname_len);
-		MEMCPY_LIT(&obj_name_buff[mname_len], ".OBJ");
-		obj_fab.fab$b_dns = mname_len + SIZEOF(".OBJ") - 1;
-	}
-	obj_fab.fab$l_fop = FAB$M_CBT | FAB$M_TEF | FAB$M_MXV;
-	obj_fab.fab$l_alq = INITIAL_ALLOC;
-	obj_fab.fab$w_deq = DEFAULT_EXTEN_QUAN;
-	obj_fab.fab$b_fac = FAB$M_PUT | FAB$M_UPD | FAB$M_GET;
-	obj_fab.fab$w_mrs = MAX_REC_SIZE;
-	obj_fab.fab$l_mrn = MAX_REC_NUM;
-	obj_fab.fab$b_rfm = FAB$C_VAR;
-	obj_fab.fab$b_org = FAB$C_SEQ;
-	obj_fab.fab$l_nam = &nam;
-	nam = cc$rms_nam;		/* initialize to default NAM values supplied by <rms.h> */
-	nam.nam$l_esa = object_file_name;
-	nam.nam$b_ess = 255;
-
-	if (MV_DEFINED(&cmd_qlf.object_file))
-	{
-		obj_fab.fab$b_fns = cmd_qlf.object_file.str.len;
-		obj_fab.fab$l_fna = cmd_qlf.object_file.str.addr;
-	}
-	stat = sys$create(&obj_fab);
-	obj_fab.fab$l_nam = 0;
-	object_name_len = nam.nam$b_esl;
-	object_file_name[object_name_len] = 0;
-	switch (stat)
-	{
-	case RMS$_NORMAL:
-	case RMS$_CREATED:
-	case RMS$_SUPERSEDE:
-	case RMS$_FILEPURGED:
-		break;
-	default:
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-	}
-
-	obj_rab = cc$rms_rab;		/* initialize to default RAB values supplied by <rms.h> */
-	obj_rab.rab$l_fab = &obj_fab;
-
-	stat = sys$connect(&obj_rab);
-	if(stat!=RMS$_NORMAL)
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-
-	linker_stack_depth = 0;
-
-	/* output the Main Module Header Record */
-	fast = emit_buff;
-	*((short *) fast)++ = EOBJ$C_EMH;
-	*((short *) fast)++ = 0;	/* record length */
-	*((short *) fast)++ = EMH$C_MHD;
-	*((short *) fast)++ = OBJ_STRUCTURE_LEVEL;
-	*((int4 *) fast)++ = OBJ_ARCH_1;
-	*((int4 *) fast)++ = OBJ_ARCH_2;
-	*((int4 *) fast)++ = MAX_REC_SIZE;
-	*((char *) fast)++ = mname_len;
-	memcpy(fast, module_name.addr, mname_len);
-	fast += mname_len;
-	*((char *) fast)++ = VERSION_NUM_SIZE;
-	memcpy(fast,VERSION_NUM,VERSION_NUM_SIZE);
-	fast += VERSION_NUM_SIZE;
-	memcpy(fast,rev_time_buf,17);
-	fast += 17;
-	memcpy(fast,"                 ",17);
-	fast += 17;
-	length = fast - emit_buff;
-	((short *) emit_buff)[1] = length;
-	obj_rab.rab$l_rbf = emit_buff;
-	obj_rab.rab$w_rsz = length;
-	stat = sys$put(&obj_rab);
-	if(stat != RMS$_NORMAL)
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-
-	/* output the Language Name Header Record */
-	fast = emit_buff;
-	*((short *) fast)++ = EOBJ$C_EMH;
-	*((short *) fast)++ = 6 + gtm_release_name_len;
-	*((short *) fast)++ = EMH$C_LNM;
-	memcpy(fast,&gtm_release_name[0],gtm_release_name_len);
-	fast += gtm_release_name_len;
-	length = fast - emit_buff;
-	obj_rab.rab$w_rsz = length;
-	stat = sys$put(&obj_rab);
-	if(stat != RMS$_NORMAL)
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-
-	/* define psect's */
-	length = routine_name.len;
-	MEMCPY_LIT(&rnambuf[0], RNAMB_PREF);
-	memcpy(&rnambuf[RNAMB_PREF_LEN], routine_name.addr, length);
-	if ('%' == rnambuf[RNAMB_PREF_LEN])
-		rnambuf[RNAMB_PREF_LEN] = '.';
-	length += RNAMB_PREF_LEN;
-	if (length > EGPS$S_NAME) /* Truncate the PSECT name if it exceeeds the maximum allowed length (31) */
-		length = EGPS$S_NAME;
-	if (routine_name.len >= RNAME_SORTED_LEN && !memcmp(routine_name.addr, RNAME_ALL_Z, RNAME_SORTED_LEN))
-	{ /* If the first 26 chars of the routine name are all lower case z's (currently routine names cannot be
-	     in lower case, but if supported in future), we should not generate the psect name containing
-	     the routine name as it could conflict with the dummy anchor gtm$rrzzzzzzzzzzzzzzzzzzzzzzzzzz defined
-	     in gtm_main.m64. If such a conflict occurs, linker may not guarantee that the dummy anchor to be the
-	     last entry in the routine table. So, if the routine name starts with 26 z's, we generate the psect
-	     name changing the last (31st) character to '$' so that all such routines will be concatenated
-	     between the anchors.  However, they need to be sorted at runtime startup based on the complete
-	     routine name (see rtn_tbl_sort.c) */
-		assert(length == EGPS$S_NAME);
-		rnambuf[length - 1] = '$';
-	}
-	((short *) psect_def_rec)[0] = EOBJ$C_EGSD;
-	fast = psect_def_rec+8;
-	fast = emit_psc(fast, CODE_PSECT_ALIGN,  CODE_PSECT_FLAGS,  code_size,    LEN_AND_LIT(CODE_PSECT_NAME));
-	fast = emit_psc(fast, LIT_PSECT_ALIGN,   LIT_PSECT_FLAGS,   lits_size,    LEN_AND_LIT(LIT_PSECT_NAME));
-	fast = emit_psc(fast, RNAMB_PSECT_ALIGN, RNAMB_PSECT_FLAGS, SIZEOF(rtn_tabent), length, rnambuf);
-	fast = emit_psc(fast, LINK_PSECT_ALIGN,  LINK_PSECT_FLAGS,  linkage_size, LEN_AND_LIT(LINK_PSECT_NAME));
-	length = fast - psect_def_rec;
-	((short *) psect_def_rec)[1] = length;
-
-	obj_rab.rab$l_rbf = psect_def_rec;
-	obj_rab.rab$w_rsz = length;
-	stat = sys$put(&obj_rab);
-	if (stat != RMS$_NORMAL)
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-
-	/* set the appropriate buffer counts */
-	((short *) sym_buff)[0] = EOBJ$C_EGSD;
-	((short *) sym_buff)[1] = 0;
-	sym_buff_used = 8;
-	((short *) emit_buff)[0] = EOBJ$C_ETIR;
-	((short *) emit_buff)[1] = 0;
-	emit_buff_used = 4;
-	emit_last_immed = NO_IMMED;
-	memset(psect_use_tab, 0, SIZEOF(psect_use_tab));
-
-	/* Build GTM_LINKAGE ("$LINKAGE") psect. */
-	set_psect(GTM_LINKAGE, 0);
-
-	/* Generate a procedure descriptor pointing to prologue code (beginning of GTM_CODE psect). */
-	/* N.B. This procedure descriptor must be at offset 0 in $LINKAGE; that's the way it's defined in obj_code.  */
-	emit_immed(pdbuf_head, SIZEOF(pdbuf_head));
-	emit_sta_pq(GTM_CODE, 0);
-	emit_sto_off();
-	emit_immed(pdbuf_tail, SIZEOF(pdbuf_tail));
-
-	(void)define_symbol(GTM_ANOTHER_MODULE, &gtm_dyn_ch_name, 0);
-	emit_sto_gbl(gtm_dyn_ch_name.len, gtm_dyn_ch_name.addr);
-
-	/* Emit a linkage pair for to GTM$MAIN.  */
-	set_psect(GTM_LINKAGE, ROUND_UP(psect_use_tab[GTM_LINKAGE],8));	/* align to quadword boundary */
-	gtm_main_lp = psect_use_tab[GTM_LINKAGE];			/* remember for later */
-	(void)define_symbol(GTM_ANOTHER_MODULE, &main_call_name, 0);
-	emit_stc_lp_psb(LP_MAIN, main_call_name.len, main_call_name.addr);
-
-	assert (psect_use_tab[GTM_LINKAGE] == MIN_LINK_PSECT_SIZE);
-	emit_linkages ();
-
-	addr_index = 48;
-
-	set_psect(GTM_CODE, 0);
-
-	/* Emit the routine header, including procedure prologue (initialization call to GTM$MAIN).  */
-
-	/* Emit initialization call to GTM$MAIN.  */
-	/* (This is the routine header jsb field.) */
-	codep = code_buf;
-
-	gtm_main_call = (char *) codep - (char *) code_buf;
-	*codep++ = ALPHA_MEM(ALPHA_INS_LDQ,  ALPHA_REG_R0,   ALPHA_REG_PV,     gtm_main_lp);
-	*codep++ = ALPHA_MEM(ALPHA_INS_LDQ,  ALPHA_REG_R1,   ALPHA_REG_PV,     gtm_main_lp+8);
-	*codep++ = ALPHA_JMP(ALPHA_INS_JSR,  ALPHA_REG_R0,   ALPHA_REG_R0);	/* call GTM$MAIN */
-
-	assert ((char *)codep - (char *)code_buf == RHEAD_JSB_SIZE);
-	emit_immed(code_buf, (char *) codep - (char *) code_buf);
-
-	/* Emit conditional stores for instruction optimization of call to GTM$MAIN: */
-	emit_lp_rel(ETIR$C_STC_NOP_GBL, LP_MAIN,
-		    GTM_CODE, gtm_main_call,
-		    ALPHA_OPR(ALPHA_INS_BIS, ALPHA_REG_ZERO, ALPHA_REG_ZERO, ALPHA_REG_ZERO),
-		    GTM_CODE, gtm_main_call + 12,
-		    main_call_name.len, main_call_name.addr);
-	emit_lp_rel(ETIR$C_STC_LDA_GBL, LP_MAIN + 1,
-		    GTM_CODE, gtm_main_call + 4,
-		    ALPHA_MEM(ALPHA_INS_LDA, ALPHA_REG_R1,   ALPHA_REG_PV,   0),
-		    GTM_LINKAGE, 0,
-		    main_call_name.len, main_call_name.addr);
-	emit_lp_rel(ETIR$C_STC_BOH_GBL, LP_MAIN,
-		    GTM_CODE, gtm_main_call + 8,
-		    ALPHA_BRA(ALPHA_INS_BSR, ALPHA_REG_R0,   0),
-		    GTM_CODE, gtm_main_call + 12,
-		    main_call_name.len, main_call_name.addr);
-	/* Now emit the rest of the common part of the routine header (from src_full_name through temp_size).  */
-
-	/* src_full_name (mstr) */
-	emit_immed(&rhead->src_full_name.len, SIZEOF(rhead->src_full_name.len));
-	emit_pidr((int4)rhead->src_full_name.addr, GTM_LITERALS);
-	/* routine_name (mident) */
-	emit_immed(&rhead->routine_name.len, SIZEOF(rhead->routine_name.len));
-	emit_pidr((int4)rhead->routine_name.addr, GTM_LITERALS);
-	/* From vartab_off to the end of rhead.  */
-	emit_immed((char *)&rhead->vartab_off, ((char *)&rhead->linkage_ptr - (char *)&rhead->vartab_off));
-
-	emit_pidr(0, GTM_LINKAGE); /* Fill in linkage_ptr with the address of the beginning of the linkage Psect. */
-	emit_pidr(0, GTM_LITERALS); /* Fill in literal_ptr with the address of the beginning of the literal Psect. */
-}
-
-
-/*
- *	close_object_file
- *
- *	Description:	Write routine table entry psect.
- *			Write global symbol specifications records for defined global symbols.
- *			Generate and write end of module record.
- *			Close file.
- *
- */
-
-void	close_object_file(rhdtyp *rhead)
-{
-	int		stat;
-	register char	*fast;
-
-	flush_addrs();
-
-	/* emit the routine table entry (rtn_tabent) */
-	set_psect(GTM_RNAMESAAAAB, 0);
-	emit_immed(&rhead->routine_name.len, SIZEOF(rhead->routine_name.len));
-	emit_pidr((int4)rhead->routine_name.addr, GTM_LITERALS);
-
-	emit_pidr(0, GTM_CODE);
-
-	/* flush emit buffer */
-	if (emit_buff_used > 4)
-	{
-		((short *) emit_buff)[0] = EOBJ$C_ETIR;
-		((short *) emit_buff)[1] = emit_buff_used;
-		obj_rab.rab$l_rbf = emit_buff;
-		obj_rab.rab$w_rsz = emit_buff_used;
-		stat = sys$put(&obj_rab);
-		if (stat != RMS$_NORMAL)
-			rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-	}
-	output_symbol();
-
-	/* output the End of Module Record */
-	fast = emit_buff;
-	*((short *) fast)++ = EOBJ$C_EEOM;
-	*((short *) fast)++ = 24;
-	*((int4 *) fast)++ = 2;			/* total linkage indices (= linkage pairs / 2) */
-	*((short *) fast)++ = EEOM$C_SUCCESS;	/* should be completion code in range [0,3] [lidral] */
-	*((unsigned char *) fast)++ = 1 << EEOM$V_WKTFR;	/* EEOM$V_WKTFR = 1 => weak transfer address */
-	*((unsigned char *) fast)++ = 0;	/* alignment byte (must be zero) */
-	*((int4 *) fast)++ = GTM_LINKAGE;	/* program section index of program section containing transfer address */
-	*((int4 *) fast)++ = 0;			/* offset of transfer address within program section */
-	*((int4 *) fast)++ = 0;
-	obj_rab.rab$l_rbf = emit_buff;
-	obj_rab.rab$w_rsz = 24;
-	stat = sys$put(&obj_rab);
-	if (stat != RMS$_NORMAL)
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-
-	/* close up */
-	stat = sys$disconnect(&obj_rab);
-	if (stat != RMS$_NORMAL)
-		rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-
-	assert (linker_stack_depth == 0);
-}
-
-
-/*
- *	drop_object_file
- *
- *	Description:	Delete object file.
- */
-
-void drop_object_file(void)
-{
-	obj_fab.fab$l_fop |= FAB$M_DLT;
-	sys$close(&obj_fab);
-	obj_fab = cc$rms_fab;
-}
-
-
-/*
- *	define_symbol
- *
- *	Args:	psect index, symbol name, symbol value.
- *
- *	Description:	Buffers a definition of a global symbol with the given name and value in the given psect.
- *			psect == GTM_ANOTHER_MODULE  =>  external (not defined in this module) symbol
- *
- *	N.B. the return value for define_symbol is only used in this module; all other modules refer to it as type void.
- */
-
-
-static struct sym_table		*symbols;
-
-struct sym_table* define_symbol(int4 psect, mstr *name, int4 value)
-{
-	int4			cmp;
-	struct sym_table	**sym, *newsym;
-
-	sym = &symbols;
-	while(*sym != 0)
-	{
-		if ((cmp = memvcmp(name->addr, name->len, &((*sym)->name[0]), (*sym)->name_len)) <= 0)
-			break;
-		sym = &((*sym)->next);
-	}
-
-	if (cmp != 0  ||  *sym == 0)
-	{
-		/* Add new symbol in alphabetic order.  */
-		newsym = (struct sym_table *) mcalloc(SIZEOF(struct sym_table) + name->len - 1);
-		newsym->name_len = name->len;
-		memcpy(&newsym->name[0], name->addr, name->len);
-		newsym->linkage_offset = 0;	/* don't assign linkage psect offset until used */
-		newsym->psect = psect;
-		newsym->value = value;
-		newsym->next = *sym;
-		*sym = newsym;
-	}
-	else if (psect == GTM_CODE)		/* if psect is GTM_CODE, this is a def, not a ref */
-	{
-		(*sym)->psect = psect;
-		(*sym)->value = value;
-	}
-	return *sym;
-}
-
-
-/*
- *	emit_immed
- *
- *	Args:  buffer of executable code, and byte count to be output.
- *
- *	Description:  Issues TIR records to store the given number of bytes
- *		from the buffer directly into the image at the current image
- *		location.
- */
-
-GBLREF spdesc stringpool;
-
-error_def(ERR_STRINGOFLOW);
-
-
-#define CRITICAL 5
-
-void	emit_immed(char *source, uint4 size)
-{
-	char	buff[MAX_IMMED + 8];	/* MAX_IMMED + 2 * SIZEOF(short) + SIZEOF(int4) */
-	int	amount, r, s;
-
-	if (run_time)
-	{
-		if (stringpool.free + size > stringpool.top)
-			rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-		memcpy(stringpool.free, source, size);
-		stringpool.free += size;
-	}
-	else
-	{
-		/*  Check whether the last piece in the emit_buff is a STO_IMM, and calculate how much of the source
-		    can be concatenated with it.  Do not make the last immediate longer than the maximum allowed, do
-		    not overflow the buffer, and do not bother if we can only add 4 bytes or less.
-		*/
-		if (emit_last_immed == NO_IMMED)
-		{
-			r = 0;
-		}
-		else
-		{
-			r = MAX_IMMED - *((int4 *) (emit_buff + emit_last_immed + 2 * SIZEOF(short)));
-		}
-
-		s = OBJ_EMIT_BUF_SIZE - emit_buff_used;
-
-		if(r >= CRITICAL  &&  s >= CRITICAL)
-		{
-			r = (r < s) ? r : s;
-			amount = (size < r) ? size : r;
-			memcpy(emit_buff + emit_buff_used, source, amount);
-
-			/* emit_last_immed is the offset of the start of the last ETIR$C_STO_IMM command;
-                           increment the command size and data count fields.                               */
-			*((short *) (emit_buff + emit_last_immed +   SIZEOF(short))) += amount;	/* command size */
-			*((int4 *)  (emit_buff + emit_last_immed + 2 * SIZEOF(short))) += amount;	/* data size */
-			size -= amount;
-			source += amount;
-			psect_use_tab[current_psect] += amount;
-			emit_buff_used += amount;
-		}
-
-		while(size>0)
-		{
-			amount = (size <= MAX_IMMED) ? size : MAX_IMMED;
-			*(short *)(&buff[ETIR$W_RECTYP]) = ETIR$C_STO_IMM;
-			*(short *)(&buff[ETIR$W_SIZE]) = amount + 2 * SIZEOF(short) + SIZEOF(int4);	/* command size */
-			*(int4 *) (&buff[ETIR$W_SIZE + SIZEOF(short)]) = amount;			/* data size */
-			memcpy(buff + 2 * SIZEOF(short) + SIZEOF(int4), source, amount);
-			emit_last_immed = emit_buff_used;
-			buff_emit(buff, amount + 2 * SIZEOF(short) + SIZEOF(int4));
-			size -= amount;
-			source += amount;
-			psect_use_tab[current_psect] += amount;
-		}
-	}
-}
-
-
-/*	emit_linkages
- *
- *	Description:	Write symbol addresses to linkage psect.
- */
-
-static struct linkage_entry	*linkage_first, *linkage_last;
-
-void	emit_linkages(void)
-{
-	struct linkage_entry	*linkagep;
-
-	for (linkagep = linkage_first;  linkagep != 0;  linkagep = linkagep->next)
-	{
-		assert (psect_use_tab[GTM_LINKAGE] == linkagep->symbol->linkage_offset);
-		emit_sto_gbl (linkagep->symbol->name_len, linkagep->symbol->name);
-	}
-	assert (psect_use_tab[GTM_LINKAGE] == linkage_size);
-}
-
-
-/*
- *	emit_literals
- *
- *	Description:	Write each value in the literal chain to the literal psect.
- */
-
-GBLREF mliteral		literal_chain;
-GBLREF char		source_file_name[];
-GBLREF unsigned short	source_name_len;
-
-void	emit_literals(void)
-{
-	uint4		offset, padsize;
-	mliteral	*p;
-
-	assert (psect_use_tab[GTM_LITERALS] == 0);
-	set_psect(GTM_LITERALS, 0);
-	offset = stringpool.free - stringpool.base;
-	emit_immed(stringpool.base, offset);
-	padsize = PADLEN(offset, NATIVE_WSIZE); /* comp_lits aligns the start of source path on NATIVE_WSIZE boundary.*/
-	if (padsize)
-	{
-		emit_immed(PADCHARS, padsize);
-		offset += padsize;
-	}
-	emit_immed(source_file_name, source_name_len);
-	offset += source_name_len;
-	padsize = PADLEN(offset, NATIVE_WSIZE); /* comp_lits aligns the start of routine_name on NATIVE_WSIZE boundary.*/
-	if (padsize)
-	{
-		emit_immed(PADCHARS, padsize);
-		offset += padsize;
-	}
-	emit_immed(routine_name.addr, routine_name.len);
-	offset += routine_name.len;
-	padsize = PADLEN(offset, NATIVE_WSIZE); /* comp_lits aligns the start of literal area on NATIVE_WSIZE boundary.*/
-	if (padsize)
-	{
-		emit_immed(PADCHARS, padsize);
-		offset += padsize;
-	}
-
-	dqloop(&literal_chain, que, p)
-	{
-		assert (p->rt_addr >= 0);
-		MV_FORCE_NUMD(&p->v);
-		if (p->v.str.len != 0)
-		{
-			emit_immed(&p->v, (int)&p->v.str.addr - (int)&p->v);
-			emit_pidr(p->v.str.addr - (char *)stringpool.base, GTM_LITERALS);
-			emit_immed(&p->v.m, SIZEOF(p->v.m));	/* assumes no fill between end of p->v.str.addr and start of p->m */
-		}
-		else
-		{
-			p->v.str.addr = 0;
-			emit_immed(&p->v, SIZEOF(p->v));
-		}
-		offset += SIZEOF(p->v);
-	}
-	assert(offset == lits_size);
-}
-
-
-/*
- *	find_linkage
- *
- *	Arg:	the name of a global symbol.
- *
- *	Description:	Return the offset into the linkage psect for the address of a global symbol.
- */
-
-int4	find_linkage(mstr* name)
-{
-	struct linkage_entry	*newlnk;
-	struct sym_table	*sym;
-
-	sym = define_symbol(GTM_LITERALS, name, 0);
-
-	if (sym->linkage_offset == 0)
-	{
-		/* Add new linkage psect entry at end of list.  */
-		sym->linkage_offset = linkage_size;
-
-		newlnk = (struct linkage_entry *) mcalloc(SIZEOF(struct linkage_entry));
-		newlnk->symbol = sym;
-		newlnk->next = 0;
-		if (linkage_first == 0)
-			linkage_first = newlnk;
-		if (linkage_last != 0)
-			linkage_last->next = newlnk;
-		linkage_last = newlnk;
-
-		linkage_size += 2 * SIZEOF(int4);
-	}
-
-	return sym->linkage_offset;
-}
-
-
-/*
- *	flush_addrs
- *
- *	Description:	For every entry in the address pointer list, generate corresponding linkage psect entry.
- */
-
-void flush_addrs(void)
-{
-	Addr_ref *addrp;
-
-	if (!addr_list) return;
-	set_psect(GTM_LINKAGE, addr_list->index);
-	for (addrp = addr_list;  addrp != (void *) 0;  addrp = addrp->next)
-	{
-		emit_sta_pq(addrp->psect, addrp->offset);
-		emit_sto_off();
-	}
-}
-
-
-/*
- *	literal_offset
- *
- *	Description:	Return offset to literal from context register.
- *
- *	Argument:	Offset of literal in literal psect.
- */
-
-int4	literal_offset (UINTPTR_T offset)
-{
-        return (int4)((run_time ? (offset - (UINTPTR_T)runtime_base) : offset));
-}
-
-
-/*
- *	obj_init
- *
- *	Description:	Initialize symbol list, linkage psect list, linkage_size.
- */
-
-void	obj_init(void)
-{
-	symbols = 0;
-
-	linkage_first = linkage_last = 0;
-	linkage_size = MIN_LINK_PSECT_SIZE;	/* minimum size of linkage psect, assuming no references from generated code  */
-
-	return;
-}
-
-
-/*
- *	buff_emit
- *
- *	Args:  buffer pointer, number of bytes to emit
- *
- *	Description:  Does buffered i/o of TIR records.  Assumes that it will
- *		never be given more than OBJ_EMIT_BUF_SIZE-1 bytes to output;
- *		such overlength records should only arise from emit_immed, which
- *		handles the situation by itself.
- */
-
-void	buff_emit(
-char	*buff,
-short	size)
-{
-
-	int	stat;
-
-	if (OBJ_EMIT_BUF_SIZE < (emit_buff_used + size))
-	{
-		*(short *)(&emit_buff[EOBJ$W_RECTYP]) = EOBJ$C_ETIR;
-		*(short *)(&emit_buff[EOBJ$W_SIZE]) = emit_buff_used;
-		obj_rab.rab$l_rbf = emit_buff;
-		obj_rab.rab$w_rsz = emit_buff_used;
-		stat = sys$put(&obj_rab);
-		if (stat != RMS$_NORMAL)
-			lib$stop(stat);
-		emit_buff_used = 2 * SIZEOF(short);
-		emit_last_immed = NO_IMMED;
-	}
-	assert (SIZEOF(emit_buff) >= (emit_buff_used + size));
-	memcpy(emit_buff + emit_buff_used, buff, size);
-	emit_buff_used += size;
-}
-
-
-/*
- *	emit_lp_rel		Emit Linkage Pair Relocation (via instruction-related store conditional command for linkage)
- *
- *	Args:  TIR store conditional command, linkage index,
- *		psect, offset at which to replace instruction,
- *		replacement instruction,
- *		psect, offset from which to calculate displacement in determining whether to replace instruction,
- *		length of global symbol name, global symbol name
- *
- *	Description:  Issues specified TIR store conditional command.
- *		      These TIR commands instruct the linker to replace the instruction at (psect1 + offset1)
- *			with the specified replacement instruction if the displacement from (psect2 + offset2) to
- *			the procedure descriptor or procedure entry associated with the specified global name
- *			is less than some threshhold value (i.e. will fit into some appropriately-sized bit field).
- *		      These commands are typically used to allow the linker to optimize procedure calls, not by
- *			reducing the number of instructions, but by substituting either faster instructions (e.g.,
- *			NOP in place of LDQ) or by eliminating stalls caused by one instruction needing to wait for
- *			the previous instruction to finish.
- */
-
-void	emit_lp_rel(
-int 	reltype,		/* TIR store conditional command for linkage */
-int	lpx,			/* linkage index of global symbol */
-int	psect1,			/* psect (program section) in which to place replacement instruction */
-int	off1,			/* byte offset in psect1 at which to place replacement instruction */
-int	repl_ins,		/* replacement instruction */
-int	psect2,			/* psect containing base address from which displacement is to be calculated */
-int	off2,			/* byte offset in psect2 from which displacement is to be calculated */
-int	namelen,		/* length of global symbol name */
-char	*name)			/* global symbol name */
-{
-	int		len;
-	register char	*fast;
-	char		buf[MAX_REC_SIZE];
-
-	fast = buf;
-
-	*((short *) fast)++ = reltype;
-	*((short *) fast)++ = 0;	/* record length */
-	*((int4 *) fast)++ = lpx;
-	*((int4 *) fast)++ = psect1;
-	*((int4 *) fast)++ = off1;
-	*((int4 *) fast)++ = 0;
-	*((int4 *) fast)++ = repl_ins;
-	*((int4 *) fast)++ = psect2;
-	*((int4 *) fast)++ = off2;
-	*((int4 *) fast)++ = 0;
-	*fast++ = namelen;
-	memcpy(fast, name, namelen);
-	fast += namelen;
-	len = ROUND_UP(fast - buf, 8);	/* round up to next quadword boundary */
-	*((short *) (buf + 2)) = len;
-
-	buff_emit(buf, len);
-	/* No increment of psect_use_tab, because these commands must refer to previously written image locations.  */
-	emit_last_immed = NO_IMMED;
-}
-
-
-/*
- *	emit_pidr
- *
- *	Args:  offset from a psect base, that psect index
- *
- *	Description:  Issues TIR records to create an image activation-time adjusted reference.
- *		That is, at activation time, the value in the current image location will be
- *		incremented by the runtime image base address.  Assumes the value is the offset
- *		from the base of the given psect of something to which one wants to refer.
- *
- *		(Originally named after the VAX linker object language command TIR$C_STO_PIDR, for
- *		Position Independent Data Reference; the Alpha implements this with two TIR commands.)
- */
-
-void	emit_pidr(int4 offset, unsigned char psect)
-{
-	emit_sta_pq(psect, offset);
-	emit_sto_lw();
-}
-
-
-/*
- *	emit_psc
- *
- *	Args:	buffer to contain program section (PSECT) definition global symbol directory subrecord,
- *		virtual address boundary at which to align program section,
- *		bit flags indicating attributes of PSECT,
- *		number of bytes in PSECT,
- *		length in bytes of the name of this PSECT, and
- *		the name of this PSECT.
- *
- *	Description:	Puts global symbol directory PSECT definition subrecord into buffer.
- *			Returns pointer to next available byte in buffer.
- */
-
-char	*emit_psc(
-char 	*buf,
-int	align,
-int	flags,
-int	alloc,
-int	length,
-char	*name)
-{
-	char	*fast;
-
-	fast = buf;
-	*((short *) fast)++ = EGSD$C_PSC;
-	*((short *) fast)++ = 0;
-	*((short *) fast)++ = align;
-	*((short *) fast)++ = flags;
-	*((int4 *) fast)++ = alloc;
-	*((char *) fast)++ = length;
-	memcpy(fast, name, length);
-	fast += length;
-	length = ROUND_UP(fast - buf, 8);
-	fast = buf + length;
-	((short *) buf)[1] = length;
-	return fast;
-}
-
-
-/*
- *	emit_sta_pq		Stack Psect Base Plus Byte Offset
- *
- *	Args:  psect index, byte offset
- *
- *	Description:  Issues TIR command to add program section base and byte offset then push result onto stack.
- */
-
-void	emit_sta_pq (
-int	psect,				/* psect (program section) index */
-int	offset)				/* byte offset into psect */
-{
-	char		buf[MAX_REC_SIZE];
-	register char	*fast;
-
-	fast = buf;
-
-	*((short *) fast)++ = ETIR$C_STA_PQ;
-	*((short *) fast)++ = 2 * SIZEOF(short) + SIZEOF(int4) + 2 * SIZEOF(int4);
-	*((int4 *) fast)++ = psect;
-	*((int4 *) fast)++ = offset;
-	*((int4 *) fast)++ = 0;		/* upper half of offset qw */
-	linker_stack_depth++;
-
-	buff_emit(buf, fast - buf);
-	emit_last_immed = NO_IMMED;
-}
-
-
-/*
- *	emit_stc_lp_psb		Store Conditional Linkage Pair plus Signature
- *
- *	Args:  linkage index, length of procedure name, procedure name
- *
- *	Description:  Issues TIR command to declare conditional linkage and signature information for the named procedure.
- *		      N.B. this TIR command reserves two indices, lpx and (lpx+1).
- */
-
-void	emit_stc_lp_psb(
-int	lpx,				/* linkage pair index */
-int	len,				/* length of name */
-char	*name)				/* procedure name */
-{
-	register char	*fast;
-	char		buf[MAX_REC_SIZE];
-
-	fast = buf;
-
-	*((short *) fast)++ = ETIR$C_STC_LP_PSB;
-	*((short *) fast)++ = 0;	/* record length */
-	*((int4 *) fast)++ = lpx;
-	*fast++ = len;
-	memcpy(fast, name, len);
-	fast += len;
-	*((char *) fast)++ = 1;		/* signature length */
-	*((char *) fast)++ = 0;		/* signature information */
-	len = ROUND_UP(fast - buf, 8);	/* round up to next quadword boundary */
-	*((short *) (buf + 2)) = len;
-
-	buff_emit(buf, len);
-	psect_use_tab[current_psect] += 4 * SIZEOF(int4);	/* two quadwords */
-	emit_last_immed = NO_IMMED;
-}
-
-
-/*
- *	emit_sto_gbl		Store Global
- *
- *	Args:  length of global symbol name, global symbol name
- *
- *	Description:  Issues TIR command to store a global symbol reference.
- */
-
-void	emit_sto_gbl(
-int	len,			/* length of global symbol name */
-char	*name)			/* global symbol name */
-{
-	register char	*fast;
-	char		buf[MAX_REC_SIZE];
-
-	fast = buf;
-
-	*((short *) fast)++ = ETIR$C_STO_GBL;
-	*((short *) fast)++ = 0;	/* record length */
-	*fast++ = len;
-	memcpy(fast, name, len);
-	fast += len;
-	len = ROUND_UP(fast - buf, 8);	/* round up to next quadword boundary */
-	*((short *) (buf + 2)) = len;
-
-	buff_emit(buf, len);
-	psect_use_tab[current_psect] += 2 * SIZEOF(int4);
-	emit_last_immed = NO_IMMED;
-}
-
-
-/*
- *	emit_sto_lw		Store Longword
- *
- *	Args:  (none)
- *
- *	Description:  Issues TIR command to pop quadword from stack and write low longword to image; value is always treated
- *			as an address and relocated if image is relocatable or fixed up if psect contributed by shareable image.
- */
-
-void	emit_sto_lw(void)
-{
-	char		buf[MAX_REC_SIZE];
-	register char	*fast;
-
-	fast = buf;
-
-	*((short *) fast)++ = ETIR$C_STO_LW;
-	*((short *) fast)++ = 2 * SIZEOF(short);
-	linker_stack_depth--;
-
-	buff_emit(buf, fast - buf);
-	psect_use_tab[current_psect] += SIZEOF(int4);
-	emit_last_immed = NO_IMMED;
-}
-
-
-/*
- *	emit_sto_off		Store Offset to Psect
- *
- *	Args:  (none)
- *
- *	Description:  Issues TIR command to pop quadword from stack and write to image; value is always treated as an address
- *			and relocated if image is relocatable or fixed up if psect contributed by shareable image.
- */
-
-void	emit_sto_off(void)
-{
-	char		buf[MAX_REC_SIZE];
-	register char	*fast;
-
-	fast = buf;
-
-	*((short *) fast)++ = ETIR$C_STO_OFF;
-	*((short *) fast)++ = 2 * SIZEOF(short);
-	linker_stack_depth--;
-
-	buff_emit(buf, fast - buf);
-	psect_use_tab[current_psect] += 2 * SIZEOF(int4);
-	emit_last_immed = NO_IMMED;
-}
-
-
-/*
- *	output_symbol
- *
- *	Description:	Generate and write global symbol directory (GSD) symbol records for every
- *				global symbol defined or referenced in this module.
- */
-
-#define GSD_DATA_TYPE 0
-#define GSD_PROC_TYPE 0
-
-void	output_symbol(void)
-{
-	int			stat, len, reclen;
-	register char		*fast;
-	struct sym_table	*sym;
-
-	sym = symbols;
-	while (sym)
-	{
-		len = sym->name_len;
-
-		/* Compute length of record exclusive of symbol name field.  */
-		reclen = 2 * SIZEOF(short) + 2 * SIZEOF(char);	/* common record header definition information */
-		switch (sym->psect)
-		{
-		case GTM_ANOTHER_MODULE:	/* reference to psect from some other module */
-			reclen += SIZEOF(short);
-			break;
-
-		case GTM_CODE:			/* symbol definition */
-		case GTM_LINKAGE:		/* symbol definition */
-			reclen += SIZEOF(short) + 6 * SIZEOF(int4);
-			break;
-
-		default:			/* presumably a reference to symbol defined in this module */
-			reclen += SIZEOF(short);
-		}
-		reclen += 1;			/* space for length of name following */
-
-		/* Determine whether buffer has enough room; if not, flush it first. */
-		if (OBJ_SYM_BUF_SIZE < ROUND_UP(sym_buff_used + reclen + len,8))
-		{
-			((short *) sym_buff)[0] = EOBJ$C_EGSD;
-			((short *) sym_buff)[1] = sym_buff_used;
-			obj_rab.rab$l_rbf = sym_buff;
-			obj_rab.rab$w_rsz = sym_buff_used;
-			stat = sys$put(&obj_rab);
-			if (stat != RMS$_NORMAL)
-				rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat,
-					obj_fab.fab$l_stv);
-			sym_buff_used = 8;
-			emit_last_immed = NO_IMMED;
-		}
-
-		/* Add next symbol to buffer.  */
-		fast = sym_buff + sym_buff_used;
-		*((short *) fast)++ = EGSD$C_SYM;
-
-		*((short *) fast)++ = 0;	/* EGSY$W_SIZE (record length, after padding) */
-
-		/* Global symbol data type -- currently ignored by linker.
-		   WARNING: these values need to be defined properly when the linker starts processing them.  [lidral] */
-		if (sym->psect == GTM_ANOTHER_MODULE)		/* code for "not defined in this module" */
-			*((char *) fast)++ = GSD_PROC_TYPE;
-		else
-			*((char *) fast)++ = GSD_DATA_TYPE;
-
-		*((char *) fast)++ = '\0';	/* alignment byte (must be zero) */
-
-		switch (sym->psect)
-		{
-		case GTM_ANOTHER_MODULE:	/* psect from some other module */
-			*((short *) fast)++ = 0;			/* ESRF$W_FLAGS = not defined here, not a weak reference */
-			break;	/* no more fields in a reference */
-
-		case GTM_CODE:
-			*((short *) fast)++ = EGSY$M_DEF | EGSY$M_REL;	/* ESDF$W_FLAGS */
-			*((int4 *) fast)++ = sym->value;		/* ESDF$L_VALUE */
-			*((int4 *) fast)++ = 0;
-			*((int4 *) fast)++ = 0;				/* ESDF$L_CODE_ADDRESS */
-			*((int4 *) fast)++ = 0;
-			*((int4 *) fast)++ = 0;				/* ESDF$L_CA_PSINDX */
-			*((int4 *) fast)++ = sym->psect;		/* ESDF$L_PSINDX */
-			break;
-
-		case GTM_LINKAGE:
-			*((short *) fast)++ = EGSY$M_DEF | EGSY$M_REL | EGSY$M_NORM;	/* ESDF$W_FLAGS */
-			*((int4 *) fast)++ = sym->value;		/* ESDF$L_VALUE */
-			*((int4 *) fast)++ = 0;
-			*((int4 *) fast)++ = 0;				/* ESDF$L_CODE_ADDRESS = offset in GTM_CODE */
-			*((int4 *) fast)++ = 0;
-			*((int4 *) fast)++ = GTM_CODE;			/* ESDF$L_CA_PSINDX = psect containing code address */
-			*((int4 *) fast)++ = sym->psect;		/* ESDF$L_PSINDX = psect containing procedure descriptor */
-			break;
-
-		default:	/* presumably a reference to a symbol defined in this module */
-			*((short *) fast)++ = EGSY$M_REL;		/* ESRF$W_FLAGS */
-			break; /* no more fields in a reference */
-		}
-
-		*((char *) fast)++ = len;				/* ESDF$B_NAMLNG/ESRF$B_NAMLNG */
-
-		memcpy(fast, &sym->name[0], len);
-
-		fast += len;
-		len = fast - (sym_buff + sym_buff_used);
-		len = ROUND_UP(len, 8);					/* round up to quadword boundary */
-		*((short *) (sym_buff + sym_buff_used + 2)) = len;	/* fill in EGSD$C_SYM record length (EGSY$W_SIZE) field */
-
-		sym_buff_used += len;
-		sym = sym->next;
-	}
-	/* flush symbol buffer */
-	if (sym_buff_used > 8)
-	{
-		((short *) sym_buff)[0] = EOBJ$C_EGSD;
-		((short *) sym_buff)[1] = sym_buff_used;
-		obj_rab.rab$l_rbf = sym_buff;
-		obj_rab.rab$w_rsz = sym_buff_used;
-		stat = sys$put(&obj_rab);
-		if (stat != RMS$_NORMAL)
-			rts_error (VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, stat, obj_fab.fab$l_stv);
-		sym_buff_used = 8;
-		emit_last_immed = NO_IMMED;
-	}
-}
-
-
-/*
- *	set_psect
- *
- *	Args:  psect index, byte offset
- *
- *	Description:  Issues TIR commands to set image location to the specified psect's base plus the given byte offset.
- *		      Resets current_psect.
- */
-
-void	set_psect(
-int	psect,			/* psect (program section) index */
-int	offset)			/* byte offset into psect */
-{
-	register char	*fast;
-	char		set_psect_rec[MAX_REC_SIZE]; 		/* TIR records to set the psect */
-
-	assert (offset >= psect_use_tab[psect]);	/* not really necessary, but our code works this way */
-
-	if (current_psect != psect  ||  psect_use_tab[current_psect] != offset)
-	{
-		emit_sta_pq(psect, offset);
-
-		fast = set_psect_rec;
-		*((short *) fast)++ = ETIR$C_CTL_SETRB;	/* pop stack to set relocation base */
-		*((short *) fast)++ = 2 * SIZEOF(short);
-		linker_stack_depth--;
-
-		buff_emit(set_psect_rec, fast - set_psect_rec);
-
-		current_psect = psect;
-		psect_use_tab[psect] = offset;
-		emit_last_immed = NO_IMMED;
-	}
-}
diff --git a/sr_avms/obj_filesp.h b/sr_avms/obj_filesp.h
deleted file mode 100644
index f8c9164..0000000
--- a/sr_avms/obj_filesp.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef OBJ_FILESP_INCLUDED
-#define OBJ_FILESP_INCLUDED
-
-void emit_pidr(int4 offset, unsigned char psect);
-void emit_reference(uint4 refaddr, mstr *name, uint4 *result);
-struct sym_table *define_symbol(int4 psect, mstr *name, int4 value);
-
-/* Prefix of the psect name generated for every routine table entry (used in obj_file.c */
-#define RNAMB_PREF		"GTM$R"
-#define RNAMB_PREF_LEN		STR_LIT_LEN(RNAMB_PREF)
-
-/* First significant characters of the routine name on which the table is already sorted by the VMS linker */
-#define RNAME_SORTED_LEN	(EGPS$S_NAME - RNAMB_PREF_LEN)	/* EGPS$S_NAME defined in objlangdefs.h */
-
-#define RNAME_ALL_Z		"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"
-
-#endif /* OBJ_FILESP_INCLUDED */
diff --git a/sr_avms/op_bkpt.m64 b/sr_avms/op_bkpt.m64
deleted file mode 100644
index ad06c27..0000000
--- a/sr_avms/op_bkpt.m64
+++ /dev/null
@@ -1,427 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;                                                               ;
-;       Copyright 2001, 2010 Fidelity Information Services, Inc  ;
-;                                                               ;
-;       This source code contains the intellectual property     ;
-;       of its copyright holder(s), and is made available       ;
-;       under a license.  If you do not know the terms of       ;
-;       the license, please stop and do not read further.       ;
-;                                                               ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.title	OP_BKPT
-
-	G_MSF
-
-	$linkage_section
-
-a_opp_ret:
-	.linkage_pair opp_ret
-
-a_op_retarg:
-	.linkage_pair op_retarg
-
-a_frame_pointer:
-	.address frame_pointer
-
-a_zstep_level:
-	.address zstep_level
-
-
-	$code_section
-
-
-;*1*********************************************************************
-	$routine OPP_ZSTEPRET, entry=OPP_ZSTEPRET_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldl	r28, msf$typ_off(r12)
-	blbc	r28, 10$
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	subq	r28, r12, r28
-	bgt	r28, 10$
-
-	$call	op_zstepret, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r26, a_opp_ret
-	ldq	r27, a_opp_ret+8
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	jmp	r26
-
-	$end_routine
-
-	.page
-;*2*********************************************************************
-	$routine OPP_ZSTEPRETARG, entry=OPP_ZSTEPRETARG_CA, kind=null
-	lda	sp, -24(sp)
-	stq	r3, (sp)
-	stq	r0, 8(sp)
-	stq	r1, 16(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldl	r28, msf$typ_off(r12)
-	blbc	r28, 10$
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	subq	r28, r12, r28
-	bgt	r28, 10$
-
-	$call	op_zstepret, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r26, a_op_retarg
-	ldq	r27, a_op_retarg+8
-	ldq	r3, (sp)
-	ldq	r0, 8(sp)
-	ldq	r1, 16(sp)
-	lda	sp, 24(sp)
-	jmp	r26
-
-	$end_routine
-
-
-;*3*********************************************************************
-	$routine OP_ZBFETCH, entry=OP_ZBFETCH_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r3, (sp)
-	stq	r2, 8(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	fetch_args r2, stack_offset
-	$call	op_zbreak, args=<r12>, set_arg_info=false, nonstandard=true
-
-	getframe
-	bne	r0, 10$
-
-	imb
-
-10$:	ldq	r3, (sp)
-	ldq	r2, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*4*********************************************************************
-	$routine OP_ZBSTART, entry=OP_ZBSTART_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	$call	op_zbreak, args=<r12>, set_arg_info=false, nonstandard=true
-
-	getframe
-	bne	r0, 10$
-
-	imb
-
-10$:	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-
-;*5*********************************************************************
-	$routine OP_ZSTEPFETCH, entry=OP_ZSTEPFETCH_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r3, (sp)
-	stq	r2, 8(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	fetch_args r2, stack_offset
-	$call	op_zst_break, set_arg_info=false, nonstandard=true
-
-	getframe
-	imb
-
-	ldq	r3, (sp)
-	ldq	r2, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*6*********************************************************************
-	$routine OP_ZSTEPSTART, entry=OP_ZSTEPSTART_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	$call	op_zst_break, set_arg_info=false, nonstandard=true
-
-	getframe
-	imb
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-
-;*7*********************************************************************
-	$routine OP_ZSTZBFETCH, entry=OP_ZSTZBFETCH_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r3, (sp)
-	stq	r2, 8(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	fetch_args r2, stack_offset
-	$call	op_zbreak, args=<r12>, set_arg_info=false, nonstandard=true
-	$call	op_zst_break, set_arg_info=false, nonstandard=true
-
-	getframe
-	imb
-
-	ldq	r3, (sp)
-	ldq	r2, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*8*********************************************************************
-	$routine OP_ZSTZBSTART, entry=OP_ZSTZBSTART_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	$call	op_zbreak, args=<r12>, set_arg_info=false, nonstandard=true
-	$call	op_zst_break, set_arg_info=false, nonstandard=true
-
-	getframe
-	imb
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*9*********************************************************************
-	$routine OP_ZSTZB_FET_OVER, entry=OP_ZSTZB_FET_OVER_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r3, (sp)
-	stq	r2, 8(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	fetch_args r2, stack_offset
-	$call	op_zbreak, args=<r12>, set_arg_info=false, nonstandard=true
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	subq	r28, r12, r28
-	ble	r28, 10$
-	beq	r0, 20$
-
-	$call	op_zst_over, set_arg_info=false, nonstandard=true
-
-	ldl	r26, msf$mpc_off(r12)
-	br	lbl30a
-
-10$:	$call	op_zst_break, set_arg_info=false, nonstandard=true
-20$:	getframe
-	imb
-
-lbl30a: ldq	r3, (sp)
-	ldq	r2, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*10********************************************************************
-	$routine OP_ZSTZB_ST_OVER, entry=OP_ZSTZB_ST_OVER_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	$call	op_zbreak, args=<r12>, set_arg_info=false, nonstandard=true
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	subq	r28, r12, r28
-	ble	r28, 10$
-	beq	r0, 20$
-
-	$call	op_zst_over, set_arg_info=false, nonstandard=true
-
-	ldl	r26, msf$mpc_off(r12)
-	br	lbl30b
-
-10$:	$call	op_zst_break, set_arg_info=false, nonstandard=true
-20$:	getframe
-	imb
-
-lbl30b:	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*11********************************************************************
-	$routine OP_ZST_FET_OVER, entry=OP_ZST_FET_OVER_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r3, (sp)
-	stq	r2, 8(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	fetch_args r2, stack_offset
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	subq	r28, r12, r28
-	bgt	r28, lbl10a
-
-	$call	op_zst_break, set_arg_info=false, nonstandard=true
-
-	getframe
-	imb
-	br	lbl20a
-
-lbl10a:	$call	op_zst_over, set_arg_info=false, nonstandard=true
-
-	ldl	r26, msf$mpc_off(r12)
-
-lbl20a:	ldq	r3, (sp)
-	ldq	r2, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*12********************************************************************
-	$routine OP_ZST_ST_OVER, entry=OP_ZST_ST_OVER_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	subq	r28, r12, r28
-	bgt	r28, lbl10b
-
-	$call	op_zst_break, set_arg_info=false, nonstandard=true
-
-	getframe
-	imb
-	br	lbl20b
-
-lbl10b:	$call	op_zst_over, set_arg_info=false, nonstandard=true
-
-	ldl	r26, msf$mpc_off(r12)
-
-lbl20b:	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.page
-;*13********************************************************************
-	$routine OPP_ZST_OVER_RET, entry=OPP_ZST_OVER_RET_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldl	r28, msf$typ_off(r12)
-	blbc	r28, 10$
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	ldl	r24, msf$old_frame_off(r12)
-	subq	r28, r24, r28
-	bgt	r28, 10$
-
-	$call	op_zstepret, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r26, a_opp_ret
-	ldq	r27, a_opp_ret+8
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	jmp	r26
-
-	$end_routine
-
-
-;*14********************************************************************
-	$routine OPP_ZST_OVER_RETARG, entry=OPP_ZST_OVER_RETARG_CA, kind=null
-	lda	sp, -24(sp)
-	stq	r3, (sp)
-	stq	r0, 8(sp)
-	stq	r1, 16(sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldl	r28, msf$typ_off(r12)
-	blbc	r28, 10$
-
-	ldq	r28, a_zstep_level
-	ldl	r28, (r28)
-	ldl	r24, msf$old_frame_off(r12)
-	subq	r28, r24, r28
-	bgt	r28, 10$
-
-	$call	op_zstepret, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r26, a_op_retarg
-	ldq	r27, a_op_retarg+8
-	ldq	r3, (sp)
-	ldq	r0, 8(sp)
-	ldq	r1, 16(sp)
-	lda	sp, 24(sp)
-	jmp	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_call.m64 b/sr_avms/op_call.m64
deleted file mode 100644
index bf33e21..0000000
--- a/sr_avms/op_call.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	OP_CALL
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_CALLB, entry=OP_CALL_CA, aliases=<OP_CALLW, OP_CALLL>, kind=null
-
-	lda	sp, -16(sp)
-	stq	r3, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	COPY_STACK_FRAME, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-
-	ldq	r28, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, 16(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_callsp.m64 b/sr_avms/op_callsp.m64
deleted file mode 100644
index ebe27ce..0000000
--- a/sr_avms/op_callsp.m64
+++ /dev/null
@@ -1,54 +0,0 @@
-	.title	OP_CALLSP
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2007 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_CALLSPB, entry=OP_CALLSP_CA, aliases=<OP_CALLSPW, OP_CALLSPL>, kind=null
-
-	lda	sp, -16(sp)
-	stq	r3, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	EXFUN_FRAME, set_arg_info=false, nonstandard=true
-	ldl	r16, 0(r10)		; Value of $TEST
-	$call	PUSH_TVAL, args=<r16>, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-	ldl	r9, msf$temps_ptr_off(r12)
-
-	ldq	r28, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, 16(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_contain.m64 b/sr_avms/op_contain.m64
deleted file mode 100644
index 1763445..0000000
--- a/sr_avms/op_contain.m64
+++ /dev/null
@@ -1,243 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2008 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	op_contain "'[' ('contains') operator"
-
-;	OP_CONTAIN implements the MUMPS string relational operator "[" ("contains"):
-;
-;		lhs [ rhs
-;
-;	lhs ("left-hand-side") and rhs ("right-hand-side") are expressions interpreted
-;	as strings.  If rhs is contained exactly somewhere in lhs, the resulting
-;	relation is true, otherwise, false.
-;
-;	On entry to this routine:
-;		r0 -> mval for lhs
-;		r1 -> mval for rhs
-;
-;	This version of OP_CONTAIN is not a simple, straightforward translation of the
-;	VAX version.  The VAX has a rich set of instructions that can be used for string
-;	manipulation, and the VAX version of this routine takes advantage of that, using
-;	locc and cmpb instructions, as well as auto-increment addressing mode.  None of
-;	these features exist in the Alpha architecture.  Alpha does have a set of byte
-;	manipulation instructions, however, but they work only on data in registers.
-;	Thus, it makes sense to load as much of the strings in question into registers
-;	as is feasible, rather than working with just one byte at a time.
-
-	mval$def
-
-	$routine OP_CONTAIN, entry=OP_CONTAIN_CA, kind=null
-
-; Routine prologue:
-	lda	sp, -48(sp)
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	stq	r2, 16(sp)
-	stq	r3, 24(sp)
-	stq	r4, 32(sp)
-	stq	r5, 40(sp)
-
-	mov	r27, r13		; Set up a base register
-	.base	r13, $ls		;  for the linkage section
-; End of prologue
-
-	.page
-; **************************************************************************************
-; Validate the input parameters and handle the trivial cases.
-
-;	Make sure that both lhs and rhs are strings:
-	mov	r0, r2			; r2 -> lhs mval
-	mov	r1, r3			; r3 -> rhs mval
-	mv_force_defined r2
-	mv_force_str (r2)
-	mv_force_defined r3
-	mv_force_str (r3)
-
-;	If rhs is a null string, we have a match (by definition):
-	ldl	r1, mval$l_strlen(r3)	; r1 = length of rhs string
-	beq	r1, match
-
-;	If lhs is a null string, we don't have a match:
-	ldl	r0, mval$l_strlen(r2)	; r0 = length of lhs string
-	beq	r0, nomatch
-
-;	If lhs is shorter than rhs, there can't possibly be a match:
-	cmplt	r0, r1, r24
-	blbs	r24, nomatch
-
-
-; **************************************************************************************
-; OK, neither string is null, and their lengths check out;  load as much
-; of rhs as possible into r5 (i.e. min (8, length of rhs) characters),
-; then load the same number of characters from lhs into r4.
-
-;	Load the first 8 characters of rhs into r5:
-	ldl	r3, mval$a_straddr(r3)	; r3 -> rhs string
-	ldq_u	r5, (r3)
-	ldq_u	r28, 7(r3)
-	extql	r5, r3, r5
-	extqh	r28, r3, r28
-	or	r28, r5, r5
-
-;	Load the first 8 characters of lhs into r4:
-	ldl	r2, mval$a_straddr(r2)	; r2 -> lhs string
-	ldq_u	r4, (r2)
-	ldq_u	r28, 7(r2)
-	extql	r4, r2, r4
-	extqh	r28, r2, r28
-	or	r28, r4, r4
-
-;	Compute the number of characters to retain in r5 and r4:
-	mov	8, r22
-	cmplt	r1, r22, r24
-	cmovlbs	r24, r1, r22		; r22 = min (8, r1)
-
-;	Clear any excess characters that may have been loaded above:
-	mov	^xff, r28
-	sll	r28, r22, r28
-	zap	r5, r28, r5
-	zap	r4, r28, r4
-
-;	Update the string counters and pointers:
-	subq	r1, r22, r1
-	subq	r0, r22, r0
-	addq	r3, r22, r3
-	addq	r2, r22, r2
-
-;	Compute a shift count for later use in loading new characters from lhs into r4:
-	subq	r22, 1, r22
-	sll	r22, 3, r22
-
-
-; **************************************************************************************
-; At this point,
-;	r5 contains either all of rhs, or the first 8 characters of rhs
-;	r4 contains the corresponding number of characters from lhs
-;	r22 = a shift count to use for loading new characters from lhs into r4
-;	r1 = the number of characters remaining in rhs (exclusive of what's in r5)
-;	r0 = the number of characters remaining in lhs (exclusive of what's in r4)
-;	r3 -> the remainder of rhs (meaningful only if r1 > 0)
-;	r2 -> the remainder of lhs
-
-main_loop:
-	cmpeq	r4, r5, r24
-
-;	If there's a match here, go check the remainder of rhs:
-	blbs	r24, check_remainder
-
-;	There's no match this iteration;  if nothing's left in lhs, return false:
-	beq	r0, nomatch
-
-;	Return here from check_remainder if no match was found there, either:
-restart:
-
-;	Load the next character from lhs into r4:
-	srl	r4, 8, r4		; shift everything down by a byte, losing the low order character
-	ldq_u	r28, (r2)		; load the quadword containing the next character in lhs
-	extbl	r28, r2, r28		; extract the character
-	sll	r28, r22, r28		; shift it up into the correct position
-	or	r28, r4, r4		; and stick it into r4
-
-;	Update the lhs context:
-	subq	r0, 1, r0
-	lda	r2, 1(r2)
-
-;	And try again:
-	br	main_loop
-
-	.page
-; **************************************************************************************
-; The main loop found a match somewhere in lhs with the first portion of rhs.  We now
-; have to check to see if the remainder of rhs (if any) matches the same number of characters
-; in the remainder of lhs.
-
-check_remainder:
-
-;	If there's nothing left in rhs, we have a match:
-	beq	r1, match
-
-;	If there are fewer characters remaining in lhs than there are in rhs,
-;	then there can't possibly be a match:
-	cmplt	r0, r1, r28
-	blbs	r28, nomatch
-
-;	Save context:
-	mov	r1, r17			; r17 = remaining length of rhs
-	mov	r3, r19			; r19 -> remainder of rhs
-	mov	r2, r18			; r18 -> remainder of lhs
-
-; Now loop, comparing the remainders of the two strings.
-
-remainder_loop:
-
-;	Load the first 8 characters of the remainder of rhs into r21:
-	ldq_u	r21, (r19)
-	ldq_u	r28, 7(r19)
-	extql	r21, r19, r21
-	extqh	r28, r19, r28
-	or	r28, r21, r21
-
-;	Load the first 8 characters of the remainder of lhs into r20:
-	ldq_u	r20, (r18)
-	ldq_u	r28, 7(r18)
-	extql	r20, r18, r20
-	extqh	r28, r18, r28
-	or	r28, r20, r20
-
-;	Should we compare all 8 characters?
-	cmplt	r17, 8, r24
-	blbc	r24, compare			; yes;  skip
-
-;	We need to compare fewer than 8 characters, so
-;	clear the excess characters that were loaded above:
-	mov	^xff, r28
-	sll	r28, r17, r28
-	zap	r21, r28, r21
-	zap	r20, r28, r20
-
-compare:
-	cmpeq	r20, r21, r24
-
-;	If no match, go back to the main loop and try again:
-	blbc	r24, restart
-
-;	Update for the next iteration:
-	subq	r17, 8, r17
-	ble	r17, match
-	lda	r19, 8(r19)
-	lda	r18, 8(r18)
-
-	br	remainder_loop
-
-
-; **************************************************************************************
-
-nomatch:
-	clr	r0
-	br	return
-
-match:
-	mov	1, r0
-
-return:
-	mov	r0, r24		; set condition code (emulator) according to function result
-; Routine epilogue:
-	ldq	r28, (sp)
-	ldq	r13, 8(sp)
-	ldq	r2, 16(sp)
-	ldq	r3, 24(sp)
-	ldq	r4, 32(sp)
-	ldq	r5, 40(sp)
-	lda	sp, 48(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_currtn.m64 b/sr_avms/op_currtn.m64
deleted file mode 100644
index 3671c57..0000000
--- a/sr_avms/op_currtn.m64
+++ /dev/null
@@ -1,39 +0,0 @@
-;#################################################################
-;#								 #
-;#	Copyright 2006, 2008 Fidelity Information Services, Inc	 #
-;#								 #
-;#	This source code contains the intellectual property	 #
-;#	of its copyright holder(s), and is made available	 #
-;#	under a license.  If you do not know the terms of	 #
-;# 	the license, please stop and do not read further.	 #
-;#								 #
-;#################################################################
-	.title	OP_CURRTN
-
-	g_msf
-	mval$def
-
-	$routine OP_CURRTN, entry=OP_CURRTN_CA, kind=null
-	lda	sp, -16(sp)
-	stq	r26, (sp)
-	.base	r27, $ls
-
-;	Set r1->mval$b_mvtype to mval$m_str (r1->mvtype = MV_STR):
-	ldl	r28, mval$w_mvtype(r1)
-	mskwl	r28, mval$w_mvtype, r28
-	or	r28, mval$m_str, r28
-	stl	r28, mval$w_mvtype(r1)
-
-	ldl	r0, msf$rvector_off(r12)
-	ldl	r16, mrt$rtn_len(r0)
-	stl	r16, mval$l_strlen(r1) 	; r1->str.len = frame_pointer->rvector->routine_name.len
-	ldl	r16, mrt$rtn_addr(r0)
-	stl	r16, mval$a_straddr(r1)	; r1->str.addr = frame_pointer->rvector->routine_name.addr
-
-	ldq	r26, (sp)
-	lda	sp, 16(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_equ.m64 b/sr_avms/op_equ.m64
deleted file mode 100644
index 4c71901..0000000
--- a/sr_avms/op_equ.m64
+++ /dev/null
@@ -1,32 +0,0 @@
-	.title	op_equ	determine whether two mvals are equal
-
-;	op_equ
-;
-;	op_equ calls is_equ to compare two mval operands to determine
-;	whether they are equal.  The actual comparison is performed by
-;	the C-callable routine is_equ; op_equ is needed as an interlude
-;	between generated GT.M code that passes the arguments in r0
-;	and r0 instead of in the argument registers.
-;
-;	entry
-;		r0, r1	contain addresses of mval's to be compared
-;
-;	return
-;		r0	1, if the two mval's are equal
-;			0, if they're not equal
-
-	$routine	name=op_equ,entry=op_equ_ca,kind=stack, -
-			base_reg_is_fp=true,rsa_offset=24,saved_regs=<fp>
-
-	.base	r27, $ls
-
-	mov	r0, r16
-	mov	r1, r17
-	$call	is_equ, args=<r16,r17>, set_arg_info=false
-	mov	r0, r24			; copy is_equ's return value to GT.M's condition code register
-
-	$return
-
-	$end_routine	name=op_equ
-
-	.end
diff --git a/sr_avms/op_exfun.m64 b/sr_avms/op_exfun.m64
deleted file mode 100644
index 496cfde..0000000
--- a/sr_avms/op_exfun.m64
+++ /dev/null
@@ -1,85 +0,0 @@
-	.title	op_exfun - invoke (internal) extrinsic function
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2012 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-;	op_exfun - invoke (internal) extrinsic function
-;
-;	arguments:
-;		ret_value	address for function to place return value
-;		offset		to this frame's continue (return) point past branch to subroutine
-;		mask
-;		actualcnt	actual argument count
-;		actual1		address of actual first argument
-;		actual2		address of actual second argument
-;		. . .
-
-	$routine	name=op_exfun, entry=op_exfun_ca, kind=stack, saved_regs=<r2, r13, r16, r17, r18, r19, r20, r21, fp>, -
-			data_section_pointer=true, -
-			data_section=<$DATA$, QUAD, NOPIC, CON, REL, LCL, NOSHR, MIX, NOEXE, RD, WRT>
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-	$code_section
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r1,  A_frame_pointer
-	ldl	r1,  (r1)
-	addl	r26, r17, r28	; add size of jump sequence to get return addr for frame.
-	stl	r28, msf$mpc_off(r1)
-	$call	exfun_frame, set_arg_info=false
-	ldl	r16, 0(r10)		; $TRUTH aka $TEST value
-        bic     r16, #^Xfe, r16         ; clear all but low order bit
-	ldq	r17, $RSA_OFFSET+24(fp)	; old r16 (ret_value)
-	ldq	r18, $RSA_OFFSET+40(fp) ; old r18 (mask)
-	ldq	r19, $RSA_OFFSET+48(fp) ; old r19 (actualcnt)
-	ldq	r20, $RSA_OFFSET+56(fp) ; old r20 (actual1)
-	ldq	r21, $RSA_OFFSET+64(fp)	; old r21 (actual2)
-	lda	r25, 4(r19)
-
-;	If more than 2 actual arguments, push rest onto stack.
-	subq	r19, 2, r28		; number of arguments originally passed on stack (actual3 . . . actualn)
-	ble	r28, zero_in_stack	; all original arguments in registers
-	lda	r0,  $SIZE(fp)
-	subq	r28, 1, r28		; offset = number - 1
-	s8addq	r28, r0, r0		; address of actualn
-loop:	ldq	r1,  (r0)
-	lda	sp,  -8(sp)
-	lda	r0,  -8(r0)
-	stq	r1,  (sp)
-	subq	r28, 1, r28
-	bge	r28, loop
-zero_in_stack:
-	$call	push_parm, set_arg_info=false	; push_parm ($T, ret_value, mask, actualcnt [, actual1[, actual2 . . .]])
-
-done:	ldq	r28, A_frame_pointer
-	ldl	r2,  (r28)
-	mov	r2,  r12
-	ldl	r9,  msf$temps_ptr_off(r12)
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldq	r26, $RSA_OFFSET(sp)
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	r13, $RSA_OFFSET+16(sp)
-	ldq     fp,  $RSA_OFFSET+72(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_exfun
-
-	.end
diff --git a/sr_avms/op_extcall.m64 b/sr_avms/op_extcall.m64
deleted file mode 100644
index 1d0a021..0000000
--- a/sr_avms/op_extcall.m64
+++ /dev/null
@@ -1,111 +0,0 @@
-	.title	op_extcall - call external (MUMPS) routine
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005, 2012 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-	G_MSF
-	PROCDESC
-
-;	op_extcall calls and external GT.M MUMPS routine.  If the routine has not yet
-;	been linked into the current image, op_extcall will first link it by invoking
-;	the auto-ZLINK function.
-;
-;	Args:
-;		procdsc - address of procedure descriptor of routine to call
-;		labaddr - address of offset into routine to which to transfer control
-
-	$routine	name=op_extcall, entry=op_extcall_ca, kind=stack, saved_regs=<fp>, -
-			data_section_pointer=true
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-L_ERR_GTMCHECK:		.long		ERR_GTMCHECK
-L_ERR_LABELUNKNOWN:	.long		ERR_LABELUNKNOWN
-
-	$data_section
-
-PDSC_FLAGS:
-	.long	GTM_PD_FLAGS
-
-
-	$code_section
-
-	.base	r27, $ls
-	ldq	r22, $dp
-	.base	r22, $ds
-
-	putframe	r12
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	beq	r16, L20		; if procdsc == 0, this routine has not yet been linked into current image
-	beq	r17, L40		; if labaddr == 0 (and procdsc != 0), there is some interal error
-
-;	Check whether first argument is procedure descriptor or routine header.
-	ldl	r28, PDSC_FLAGS
-	ldl	r0,  (r16)
-	xor	r28, r0, r28
-	bne	r28, L10		; if not procedure descriptor, it must be a routine header
-
-	ldq	r16, 8(r16)		; rhdaddr = procdsc->entry_point	; entry point address is address of routine header
-L10:	ldl	r17, (r17)		; *lab_ln_ptr
-	beq	r17, L40
-	ldl	r28, mrt$curr_ptr(r16)
-	addl	r17, r28, r17
-	addl	r17, r16, r17		; rhdaddr + *lab_ln_ptr
-	ldl	r17, (r17)		; *labaddr
-	ldl	r28, mrt$curr_ptr(r16)	; rhdaddr->current_rhead_ptr
-	addl	r16, r28, r18		; rhdaddr + rhdaddr->current_rhead_ptr
-	addl	r17, r18, r18		; rhdaddr + rhdaddr->current_rhead_ptr + *labaddr
-	$call	new_stack_frame, args=<r16, mrt$lnk_ptr(r16)/L, r18>, set_arg_info=false
-
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+8(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L20:	bne	r17, L40		; if labaddr != 0 (and procdsc == 0), there is some internal error
-	lda	sp,  -8(sp)		; auto_zlink will put value here
-	stq	r31, (sp)
-	$call	auto_zlink, args=<msf$mpc_off(r12)/L, sp>, set_arg_info=false
-	beq	r0,  L30
-	mov	r0,  r16		; rhdaddr of newly-ZLINK'ed routine
-	ldq	r17, (sp)		; new labaddr
-	lda	sp,  8(sp)
-	beq	r17, L30
-	br	L10			; auto_zlink returns pointer to a routine header, not a procedure descriptor
-
-L30:	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+8(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L40:	$call	lib$signal, args=<L_ERR_LABELUNKNOWN/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+8(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_extcall
-
-	.end
diff --git a/sr_avms/op_extexfun.m64 b/sr_avms/op_extexfun.m64
deleted file mode 100644
index 9fba9cd..0000000
--- a/sr_avms/op_extexfun.m64
+++ /dev/null
@@ -1,161 +0,0 @@
-	.title	op_extexfun - invoke external extrinsic function
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005, 2012 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-	G_MSF
-	PROCDESC
-
-;	op_extexfun - invoke external extrinsic function
-;
-;	arguments:
-;		routine		address of procedure descriptor of procedure containing extrinsic function
-;		label		address of offset into routine to which to transfer control
-;		ret_value	address for function to place return value
-;		mask
-;		actualcnt	actual argument count
-;		actual1		address of actual first argument
-;		actual2		address of actual second argument
-;		. . .
-
-	$routine	name=op_extexfun, entry=op_extexfun_ca, kind=stack, saved_regs=<r2, r13, r18, r19, r20, r21, fp>, -
-			data_section_pointer=true, -
-			data_section=<$DATA$, QUAD, NOPIC, CON, REL, LCL, NOSHR, MIX, NOEXE, RD, WRT>
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-L_ERR_FMLLSTMISSING:	.long		ERR_FMLLSTMISSING
-L_ERR_GTMCHECK:		.long		ERR_GTMCHECK
-L_ERR_LABELUNKNOWN:	.long		ERR_LABELUNKNOWN
-
-
-	$data_section
-
-PDSC_FLAGS:
-	.long	GTM_PD_FLAGS
-
-
-	$code_section
-
-	.base	r27, $ls
-	ldq	r2,  $dp
-	.base	r2,  $ds
-
-	putframe
-
-	mov	r27, r13
-	.base	r13, $ls
-
-L9:	beq	r16, L20		; if procdsc == 0, this routine has not yet been linked into current image
-	beq	r17, L40		; if labaddr == 0 (and procdsc != 0), it's an unknown label
-
-;	Check whether first argument is procedure descriptor or routine header.
-	ldl	r28, PDSC_FLAGS
-	ldl	r0,  (r16)
-	xor	r28, r0, r28
-	bne	r28, L10		; if not procedure descriptor, it must be a routine header
-
-	ldq	r16, 8(r16)		; rhdaddr = procdsc->entry_point	; entry point address is address of routine header
-L10:	mov	r17, r22		; temporarily save labaddr, so it is not overriden
-	ldl	r17, (r17)		; *lab_ln_ptr
-	beq	r17, L40
-	ldl	r28, mrt$curr_ptr(r16)
-	addl	r17, r28, r17
-	addl	r17, r16, r17		; rhdaddr + *lab_ln_ptr
-	ldl	r17, (r17)		; *labaddr
-	ldl	r28, mrt$curr_ptr(r16)	; rhdaddr->current_rhead_ptr
-	addl	r16, r28, r18		; rhdaddr + rhdaddr->current_rhead_ptr
-	addl	r17, r18, r18		; rhdaddr + rhdaddr->current_rhead_ptr + *labaddr
-	mov	r22, r17		; restore the original labaddr
-
-	addq	r17, 4, r17		; labaddr += 4, to point to has_parms
-	ldl	r17, (r17)		; *has_parms
-	beq	r17, L50		; if has_parms == 0, then issue an error
-
-L12:	$call	new_stack_frame, args=<r16, mrt$lnk_ptr(r16)/L, r18>, set_arg_info=false
-	ldl	r16, 0(r10)		; push $TRUTH aka $TEST
-        bic     r16, #^Xfe, r16         ; clear all but low order bit
-L15:	ldq	r17, $RSA_OFFSET+24(fp)	; old r18 (ret_value)
-	ldq	r18, $RSA_OFFSET+32(fp)	; old r19 (mask)
-	ldq	r19, $RSA_OFFSET+40(fp)	; old r20 (actualcnt)
-	ldq	r20, $RSA_OFFSET+48(fp)	; old r21 (actual1)
-	ldq	r21, $SIZE(fp)		; actual2, if any
-	lda	r25, 4(r19)
-
-;	If more than 1 argument, push rest onto stack.
-	subq	r19, 2, r28		; number of arguments to put onto stack (actual3 . . . actualn)
-	ble	r28, zero_in_stack	; all original arguments in registers
-	lda	r0,  $SIZE(fp)
-	s8addq	r28, r0, r0		; address of actualn
-loop:	ldq	r1,  (r0)
-	lda	sp,  -8(sp)
-	lda	r0,  -8(r0)
-	stq	r1,  (sp)
-	subq	r28, 1, r28
-	bgt	r28, loop
-zero_in_stack:
-	$call	push_parm, set_arg_info=false	; push_parm ($T, ret_value, mask, argc[, actual1[, actual2 . . .]])
-
-L16:	getframe
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L20:	bne	r17, L30		; procdsc == 0, but label != 0 => internal error
-	lda	sp,  -8(sp)		; auto_zlink will put value here
-	stq	r31, (sp)
-	$call	auto_zlink, args=<msf$mpc_off(r12)/L, sp>, set_arg_info=false
-	beq	r0,  L30
-	mov	r0,  r16		; rhdaddr of newly-ZLINK'ed routine
-	ldq	r17, (sp)		; new labaddr
-	lda	sp,  8(sp)
-	beq	r17, L40		; found routine, but labaddr still 0 => unknown label
-	br	L10
-
-L30:	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L40:	$call	lib$signal, args=<L_ERR_LABELUNKNOWN/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L50:	$call	lib$signal, args=<L_ERR_FMLLSTMISSING/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_extexfun
-
-	.end
diff --git a/sr_avms/op_extjmp.m64 b/sr_avms/op_extjmp.m64
deleted file mode 100644
index 9ef8689..0000000
--- a/sr_avms/op_extjmp.m64
+++ /dev/null
@@ -1,115 +0,0 @@
-	.title	op_extjmp - jump to a label in an external (MUMPS) routine
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005, 2014 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-	G_MSF
-	PROCDESC
-
-;	op_extjmp transfers control to a label in an external MUMPS module.  If the routine
-;	has not yet been linked into the current image, op_extjmp will first link it by
-;	invoking the auto-ZLINK function.
-;
-;	Args:
-;		procdsc - address of procedure descriptor of routine containing the label
-;		labaddr - address of offset into routine to which to transfer control
-
-	$routine	name=op_extjmp, entry=op_extjmp_ca, kind=stack, saved_regs=<r13, fp>, -
-			data_section_pointer=true
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-L_ERR_GTMCHECK:		.long		ERR_GTMCHECK
-L_ERR_LABELNOTFND:	.long		ERR_LABELNOTFND
-
-
-	$data_section
-
-PDSC_FLAGS:
-	.long	GTM_PD_FLAGS
-
-
-	$code_section
-
-	.base	r27, $ls
-	ldq	r22, $dp
-	.base	r22, $ds
-
-	putframe	r12
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	beq	r16, L20		; if procdsc == 0, this routine has not yet been linked into current image
-	beq	r17, L40		; if labaddr == 0 (and procdsc != 0), there is some interal error
-
-;	Check whether first argument is a procedure descriptor or routine header.
-	ldl	r28, PDSC_FLAGS
-	ldl	r0,  (r16)
-	xor	r28, r0, r28
-	bne	r28, L10		; if not procedure descriptor, it must be a routine header
-
-	ldq	r16, 8(r16)		; rhdaddr = procdsc->entry_point	; entry point address is address of routine header
-L10:	ldl	r17, (r17)		; *lab_ln_ptr
-	beq	r17, L40
-	ldl	r28, mrt$curr_ptr(r16)
-	addl	r17, r28, r17
-	addl	r17, r16, r17		; rhdaddr + *lab_ln_ptr
-	ldl	r17, (r17)		; *labaddr
-	ldl	r28, mrt$curr_ptr(r16)	; rhdaddr->current_rhead_ptr
-	addl	r16, r28, r18		; rhdaddr + rhdaddr->current_rhead_ptr
-	addl	r17, r18, r18		; rhdaddr + rhdaddr->current_rhead_ptr + *labaddr
-	$call	flush_jmp, args=<r16, mrt$lnk_ptr(r16)/L, r18>, set_arg_info=false
-
-	$begin_epilogue
-	getframe
-	imb
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+16(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L20:	bne	r17, L40		; if labaddr != 0 (and procdsc == 0), there is some internal error
-	lda	sp,  -8(sp)		; auto_zlink will put value here
-	stq	r31, (sp)
-	$call	auto_zlink, args=<msf$mpc_off(r12)/L, sp>, set_arg_info=false
-	beq	r0,  L30
-	mov	r0,  r16		; rhdaddr of newly-ZLINK'ed routine
-	ldq	r17, (sp)		; new labaddr
-	lda	sp,  8(sp)
-	beq	r17, L40
-	br	L10			; auto_zlink returns pointer to a routine header, not a procedure descriptor
-
-L30:	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-	$begin_epilogue
-	getframe
-	imb
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+16(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L40:	$call	lib$signal, args=<L_ERR_LABELNOTFND/L>
-	$begin_epilogue
-	getframe
-	imb
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+16(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_extjmp
-
-	.end
diff --git a/sr_avms/op_fetchintrrpt.m64 b/sr_avms/op_fetchintrrpt.m64
deleted file mode 100644
index 43b7d43..0000000
--- a/sr_avms/op_fetchintrrpt.m64
+++ /dev/null
@@ -1,53 +0,0 @@
-	.title	OP_FETCHINTRRPT
-
-	G_MSF
-
-	$linkage_section
-
-a_neterr_pending:
-	.address neterr_pending
-
-a_iott_write_error:
-	.address iott_write_error
-
-	$code_section
-
-	$routine OP_FETCHINTRRPT, entry=OP_FETCHINTRRPT_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r13, (sp)
-	stq	r2, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	fetch_args r2, stack_offset
-
-	ldq	r0, a_neterr_pending
-	ldq_u	r24, (r0)
-	extbl	r24, r0, r24
-	beq	r24, 10$
-
-	$call	outofband_clear, set_arg_info=false, nonstandard=true
-	$call	gvcmz_neterr, args=<0/a>, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r0, a_iott_write_error
-	ldl	r24, (r0)
-	beq	r24, 15$
-
-	$call	outofband_clear, set_arg_info=false, nonstandard=true
-	$call	iott_wrterr, set_arg_info=false, nonstandard=true
-
-15$:	$call 	async_action, args=<1/a>, set_arg_info=false, nonstandard=true
-
-20$:	ldl	r28, msf$mpc_off(r12)
-
-	ldq	r13, (sp)
-	ldq	r2, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_fnget.m64 b/sr_avms/op_fnget.m64
deleted file mode 100644
index 5061533..0000000
--- a/sr_avms/op_fnget.m64
+++ /dev/null
@@ -1,52 +0,0 @@
-;#################################################################
-;#								 #
-;#	Copyright 2006, 2009 Fidelity Information Services, Inc	 #
-;#								 #
-;#	This source code contains the intellectual property	 #
-;#	of its copyright holder(s), and is made available	 #
-;#	under a license.  If you do not know the terms of	 #
-;# 	the license, please stop and do not read further.	 #
-;#								 #
-;#################################################################
-	.title	op_fnget "$Get() function"
-
-;	OP_FNGET implements the $Get() function.
-;	Upon entry, r1 -> source mval, r0 -> target mval.
-;	If the source mval is defined, it is copied to the target,
-;	otherwise, the target mval is set to be a null string.
-
-	mval$def
-
-	$routine OP_FNGET, entry=OP_FNGET_CA, kind=null
-
-	beq	r1, undefined		; a nonexistent source is undefined
-	mv_if_notdefined (r1), undefined
-
-; Copy the source mval to the target:
-	mov	mval$m_aliascont, r24
-	ldl	r22, mval$w_mvtype(r1)	; includes mval$b_exp and the unreferenced fnpcid
-	ldl	r23, mval$l_strlen(r1)
-	bic	r22, r24, r22		; don't allow propagation of alias container flag
-	ldl	r24, mval$a_straddr(r1)
-	stl	r22, mval$w_mvtype(r0)
-	stl	r23, mval$l_strlen(r0)
-	stl	r24, mval$a_straddr(r0)
-	ldl	r22, mval$l_m0(r1)
-	ldl	r23, mval$l_m1(r1)
-	stl	r22, mval$l_m0(r0)
-	stl	r23, mval$l_m1(r0)
-
-	ret	r26
-
-undefined:
-; Set the target mval to a null string:
-	mov	mval$m_str, r22
-	clr	r23
-	stl	r22, mval$w_mvtype(r0)	; also clears mval$b_exp
-	stl	r23, mval$l_strlen(r0)
-
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_fnzextract.m64 b/sr_avms/op_fnzextract.m64
deleted file mode 100644
index a4b9924..0000000
--- a/sr_avms/op_fnzextract.m64
+++ /dev/null
@@ -1,71 +0,0 @@
-;#################################################################
-;#								 #
-;#	Copyright 2006, 2008 Fidelity Information Services, Inc	 #
-;#								 #
-;#	This source code contains the intellectual property	 #
-;#	of its copyright holder(s), and is made available	 #
-;#	under a license.  If you do not know the terms of	 #
-;# 	the license, please stop and do not read further.	 #
-;#								 #
-;#################################################################
-	.title	OP_FNZEXTRACT
-
-	mval$def
-
-	$routine OP_FNZEXTRACT, entry=OP_FNZEXTRACT_CA, kind=null
-	lda	sp, -48(sp)
-	stq	r26, (sp)
-	stq	r2, 8(sp)
-	stq	r3, 16(sp)
-	stq	r4, 24(sp)
-	stq	r5, 32(sp)
-	stq	r13, 40(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mov	r16, r5			; r5 = second index
-	mov	r17, r4			; r4 = first index
-	mov	r18, r2			; r2 -> source mval
-	mov	r19, r3			; r3 -> result mval
-
-	mv_force_defined r2
-	mv_force_str (r2)
-
-	cmovle	r4, 1, r4		; r4 = start = max(1, first index)
-	ldl	r1, mval$l_strlen(r2)	; r1 = length of source string
-	subq	r4, r1, r24		; if start > source length,
-	bgt	r24, 20$		; then result is a null string
-
-	subq	r5, r1, r24
-	cmovgt	r24, r1, r5		; r5 = end = min(source length, second index)
-	subq	r5, r4, r0
-	addq	r0, 1, r0		; r0 = result length = end - start + 1
-	beq	r0, 10$
-	blt	r0, 20$
-
-	ldl	r28, mval$a_straddr(r2)	; r28 = address of source string
-	addq	r4, r28, r4
-	subq	r4, 1, r4		; r4 = result address = source address + start - 1
-	stl	r4, mval$a_straddr(r3)
-
-10$:	mov	mval$m_str, r28
-	stl	r0, mval$l_strlen(r3)	; set result length
-	stl	r28, mval$w_mvtype(r3)	; set result type (always a string)
-
-	ldq	r28, (sp)
-	ldq	r2, 8(sp)
-	ldq	r3, 16(sp)
-	ldq	r4, 24(sp)
-	ldq	r5, 32(sp)
-	ldq	r13, 40(sp)
-	lda	sp, 48(sp)
-
-	ret	r28
-
-; Result is a null string:
-20$:	clr	r0
-	br	10$
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_follow.m64 b/sr_avms/op_follow.m64
deleted file mode 100644
index 39ed628..0000000
--- a/sr_avms/op_follow.m64
+++ /dev/null
@@ -1,69 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2008 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	op_follow
-
-;	op_follow implements the MUMPS string relational operator "]" ("follows"):
-;
-;		lhs ] rhs
-;
-;	lhs ("left-hand-side") and rhs ("right-hand-side") are expressions interpreted
-;	as strings.  If lhs follows rhs in the ASCII collaring sequence, the resulting
-;	relation is true, otherwise, false (actually, this function differs slightly --
-;	see description of exit conditions below).
-;
-;	According to the ANSI standard, ANSI/MDC X11.1-1990, the relation is true iff
-;	any of the following is true:
-;
-;		a.  rhs is empty and lhs is not.
-;		b.  neither lhs nor rhs is empty and the leftmost character of lhs
-;		    follows (has numeric code greater than) the leftmost character of rhs.
-;		c.  There exists a positive integer n such that lhs and rhs have
-;		    identical heads of length n (i.e., $E(lhs,1,n)=$E(rhs,1,n)) and the
-;		    remainder of lhs follows the remainder of rhs.
-;
-;	Entry:
-;		r0 -> lhs mval
-;		r1 -> rhs mval
-;
-;	Exit:
-;		r0 =	>0, if lhs follows rhs
-;			 0, if lhs equals rhs
-;			<0, if rhs follows lhs (allows reversal of operands and subsequent test)
-
-
-	MVAL$DEF
-
-
-	$routine	name=op_follow, entry=op_follow_ca, kind=stack, saved_regs=<r2, r3, r13, fp>
-
-	mov	r27, r13
-	.base	r13, $ls
-
-;	Make sure both lhs and rhs are strings.
-	mov	r0, r2		; r2 <- address of lhs mval
-	mov	r1, r3		; r3 <- address of rhs mval
-	mv_force_defined r2
-	mv_force_str (r2)
-	mv_force_defined r3
-	mv_force_str (r3)
-
-;	Obtain string lengths.
-	ldl	r17, mval$l_strlen(r2)
-	ldl	r19, mval$l_strlen(r3)
-
-	$call	memvcmp, args=<mval$a_straddr(r2)/L, r17, mval$a_straddr(r3)/L, r19>, set_arg_info=false
-
-	mov	r0, r24		; set condition code (emulator) according to function result
-	$return
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_forcenum.m64 b/sr_avms/op_forcenum.m64
deleted file mode 100644
index 92d82c6..0000000
--- a/sr_avms/op_forcenum.m64
+++ /dev/null
@@ -1,96 +0,0 @@
-;#################################################################
-;#								 #
-;#	Copyright 2006, 2008 Fidelity Information Services, Inc	 #
-;#								 #
-;#	This source code contains the intellectual property	 #
-;#	of its copyright holder(s), and is made available	 #
-;#	under a license.  If you do not know the terms of	 #
-;# 	the license, please stop and do not read further.	 #
-;#								 #
-;#################################################################
-	.title	OP_FORCENUM
-
-	mval$def
-
-
-	$routine OP_FORCENUM, entry=OP_FORCENUM_CA, kind=null
-	lda	sp, -32(sp)
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-
-	stq	r0, 16(sp)
-	mv_force_defined r1
-	stq	r1, 24(sp)
-	mv_force_num (r1)
-	ldq	r0, 16(sp)
-	ldq	r1, 24(sp)
-
-	mv_if_notstring (r1), 10$
-
-	ldl	r28, (r1)
-	and	r28, mval$m_num_approx, r28
-	beq	r28, 30$
-
-10$:	mv_if_notint (r1), 20$
-
-;	Set mvtype to int:
-	ldl	r28, mval$w_mvtype(r0)
-	mskwl	r28, mval$w_mvtype, r28
-	or	r28, mval$m_int, r28
-	stl	r28, mval$w_mvtype(r0)
-
-;	Copy r1->m1 to r0->m1
-	ldl	r24, mval$l_m1(r1)
-	stl	r24, mval$l_m1(r0)
-
-;	Return:
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 32(sp)
-	ret	r26
-
-
-;	Copy r1->exp to r0->exp, and set r0->mvtype = nm:
-20$:	ldl	r28, mval$w_mvtype(r1)		; r28 = longword containing r1->exp
-	zapnot	r28, ^X1 at mval$b_exp, r28	; clear all but the exp field
-	or	r28, mval$m_nm, r28		; set the mvtype field to nm
-	stl	r28, mval$w_mvtype(r0)
-
-;	Copy r1->(m0,m1) to r0->(m0,m1)
-	ldl	r24, mval$l_m0(r1)
-	ldl	r28, mval$l_m1(r1)
-	stl	r24, mval$l_m0(r0)
-	stl	r28, mval$l_m1(r0)
-
-;	Return:
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 32(sp)
-	ret	r26
-
-
-;	Copy r1->mval to r0->mval
-;	(mval's are longword-aligned, and are 5 longwords long [mval$size = 20]):
-30$:	ldl	r16, (r1)
-	ldl	r17, 4(r1)
-	ldl	r18, 8(r1)
-	ldl	r19, 12(r1)
-	ldl	r20, 16(r1)
-	stl	r16, (r0)
-	stl	r17, 4(r0)
-	stl	r18, 8(r0)
-	stl	r19, 12(r0)
-	stl	r20, 16(r0)
-
-;	Return:
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, 32(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_forchk1.m64 b/sr_avms/op_forchk1.m64
deleted file mode 100644
index dd42852..0000000
--- a/sr_avms/op_forchk1.m64
+++ /dev/null
@@ -1,24 +0,0 @@
-; ################################################################
-; #                                                              #
-; #      Copyright 2008 Fidelity Information Services, Inc #
-; #                                                              #
-; #      This source code contains the intellectual property     #
-; #      of its copyright holder(s), and is made available       #
-; #      under a license.  If you do not know the terms of       #
-; #      the license, please stop and do not read further.       #
-; #                                                              #
-; ################################################################
-
-	.title	op_forchk1
-
-;	op_forchk1 - dummy routine called at start of FOR-statement
-;
-;	During normal execution, this routine would be called at the beginning of a For-statement.
-;	However, when it is desired to set a break at that location, the entry in the xfer table
-;	pointing to op_forchk1 would be altered to point to the desired alternative routine.
-
-	$routine	name=op_forchk1,entry=op_forchk1_ca,kind=null
-
-	ret	r26
-
-	$end_routine	name=op_forchk1
diff --git a/sr_avms/op_forinit.m64 b/sr_avms/op_forinit.m64
deleted file mode 100644
index 6c1dd6a..0000000
--- a/sr_avms/op_forinit.m64
+++ /dev/null
@@ -1,74 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2008 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	OP_FORINIT
-
-	G_MSF
-	mval$def
-
-	$routine OP_FORINIT, entry=OP_FORINIT_CA, kind=null
-stack_offset = 32
-	lda	sp, -stack_offset(sp)
-	stq	r13, (sp)
-	stq	r2, 8(sp)
-	stq	r3, 16(sp)
-	stq	r4, 24(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	stl	r26, msf$mpc_off(r12)
-
-	mov	r16, r2
-	mov	r17, r3
-	mov	r18, r4
-
-	mv_force_defined r2
-	mv_force_num (r2)
-	mv_force_defined r3
-	mv_force_num (r3)
-	mv_force_defined r4
-	mv_force_num (r4)
-
-	ldl	r28, mval$l_m1(r3)
-	blt	r28, 40$
-
-	mv_if_int (r3), 30$
-
-; The following sequence emulates the Vax instruction:
-;	tstb	mval$b_exp(r3)
-
-	ldq_u	r28, mval$b_exp(r3)
-	lda	r0, mval$b_exp+1(r3)
-	extqh	r28, r0, r28
-
-	blt	r28, 40$
-
-30$:	mov	r2, r0
-	mov	r4, r1
-	br	50$
-
-40$:	mov	r4, r0
-	mov	r2, r1
-
-50$:	$call	OP_NUMCMP, set_arg_info=false, nonstandard=true
-
-	ldl	r28, msf$mpc_off(r12)
-
-	ldq	r13, (sp)
-	ldq	r2, 8(sp)
-	ldq	r3, 16(sp)
-	ldq	r4, 24(sp)
-	lda	sp, stack_offset(sp)
-
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_forintrrpt.m64 b/sr_avms/op_forintrrpt.m64
deleted file mode 100644
index 1508d12..0000000
--- a/sr_avms/op_forintrrpt.m64
+++ /dev/null
@@ -1,49 +0,0 @@
-	.title	OP_FORINTRRPT
-
-	G_MSF
-
-call_inst_size = 12
-
-        $linkage_section
-
-a_neterr_pending:
-	.address neterr_pending
-
-a_iott_write_error:
-	.address iott_write_error
-
-	$code_section
-
-	$routine OP_FORINTRRPT, entry=OP_FORINTRRPT_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r26, (sp)
-	stq	r13, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r0, a_neterr_pending
-	ldq_u	r24, (r0)
-	extbl	r24, r0, r24
-	beq	r24, 10$
-
-	$call	outofband_clear, set_arg_info=false, nonstandard=true
-	$call	gvcmz_neterr, args=<0/a>, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r0, a_iott_write_error
-	ldl	r24, (r0)
-	beq	r24, 15$
-
-	$call	outofband_clear, set_arg_info=false, nonstandard=true
-	$call	iott_wrterr, set_arg_info=false, nonstandard=true
-
-15$:	$call 	async_action, args=<0/a>, set_arg_info=false, nonstandard=true
-
-20$:	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_forlcldo.m64 b/sr_avms/op_forlcldo.m64
deleted file mode 100644
index fce281b..0000000
--- a/sr_avms/op_forlcldo.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	OP_FORLCLDO
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_FORLCLDOB, entry=OP_FORLCLDO_CA, aliases=<OP_FORLCLDOW,OP_FORLCLDOL>, kind=null
-	lda	sp, -16(sp)
-	stq	r3, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	EXFUN_FRAME, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-	ldl	r9, msf$temps_ptr_off(r12)
-
-	ldq	r28, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, 16(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_forloop.m64 b/sr_avms/op_forloop.m64
deleted file mode 100644
index dab7d5e..0000000
--- a/sr_avms/op_forloop.m64
+++ /dev/null
@@ -1,260 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2012 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	OP_FORLOOP "FOR loop iteration logic"
-
-; On entry:
-;
-;	r16 -> index variable
-;	r17 -> step mval (guaranteed to be temp or lit and therefore defined as numeric)
-;	r18 -> terminator mval
-;	r19 -> return address to continue looping
-;
-; The usual return address in R26 is for loop termination.
-
-
-	G_MSF
-	mval$def
-
-
-	$linkage_section
-
-; These are read-only constants;  it's convenient to stash them in the linkage section:
-
-mant_lo_val:
-	.quad	MANT_LO
-
-mant_hi_val:
-	.quad	MANT_HI
-
-
-	$code_section
-
-	$routine OP_FORLOOP, entry=OP_FORLOOP_CA, kind=null
-	lda	sp, -40(sp)
-	stq	r2, (sp)
-	stq	r3, 8(sp)
-	stq	r4, 16(sp)
-	stq	r13, 24(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-; Save the first three arguments in non-volatile registers:
-	mov	r16, r2			; r2 -> index variable mval
-	mov	r17, r3			; r3 -> step mval
-	mov	r18, r4			; r4 -> terminator mval
-
-; Save the loop termination return address in the Mumps stack frame:
-	stl	r26, msf$mpc_off(r12)
-
-; Save the loop continuation return address on the stack:
-	stq	r19, 32(sp)
-
-	mv_force_defined_strict r2	; disregard NOUNDEF
-	mv_force_num (r2)		; make sure the index variable is numeric
-
-	mv_if_notint (r2), add_non_int	; branch if index is not int
-	mv_if_notint (r3), add_non_int	; branch if step is not int
-
-
-; Index and step are both int;  that makes it easy to compute the new index value:
-	ldl	r22, mval$l_m1(r2)	; r22 = index value
-	ldl	r23, mval$l_m1(r3)	; r23 = step value
-	addq	r22, r23, r22		; r22 = new index value [= old index + step]
-
-	mv_if_notint (r4), add		; branch if terminator is not int
-
-
-; At this point, index, step, and terminator are all int;  that makes it easy to
-; do the appropriate comparison between the new index value and the terminator:
-	ldl	r24, mval$l_m1(r4)	; r24 = terminator value
-	cmple	r31, r23, r26		; r26 = (step >= 0)
-	cmple	r22, r24, r27		; r27 = (index <= terminator)
-	and	r26, r27, r28		; r28 = (step >= 0 and index <= terminator)
-	xor	r26,   1, r26		; r26 = (step < 0)
-	cmple	r24, r22, r27		; r27 = (index >= terminator)
-	and	r26, r27, r26		; r26 = (step < 0 and index >= terminator)
-	or	r28, r26, r26		; r26 = ((step >= 0 and index <= terminator) or (step < 0 and index >= terminator))
-	beq	r26, terminate_loop	; branch if false;  loop has terminated
-
-	stl	r22, mval$l_m1(r2)	; store new index value [= old index + step]
-
-; Since index's value has changed, set its mvtype to int only
-; (i.e. clear all bits except mval$m_int):
-	ldl	r26, mval$w_mvtype(r2)
-	mskwl	r26, mval$w_mvtype, r26
-	or	r26, mval$m_int, r26
-	stl	r26, mval$w_mvtype(r2)
-
-	br	continue_loop
-
-
-; One or both of index and step are not int;  add step to index:
-add_non_int:
-	$call	ADD_MVALS, args=<r2, r3, 0/a, r2>, set_arg_info=false, nonstandard=true
-
-	br	compare
-
-; At this point, index and step are int, but terminator is not;
-; check the new index value (it's in r22):
-
-add:
-	$call	CHECK_INDEX, set_arg_info=false, nonstandard=true, local=true
-
-
-; Do the appropriate comparison between the updated index value and the terminator:
-
-compare:
-	mov	r2, r0			; r0 -> index
-	mov	r4, r1			; r1 -> terminator
-
-	mv_if_notint (r3), 15$		; branch if step is not int
-
-	ldl	r28, mval$l_m1(r3)
-	blt	r28, 20$		; branch if step's value is negative
-
-; Branch if either index or terminator is not int:
-5$:	mv_if_notint (r0), compare_non_int
-	mv_if_notint (r1), compare_non_int
-
-; Index and terminator are both int;  that makes the comparison easy:
-10$:	ldl	r0, mval$l_m1(r0)
-	ldl	r1, mval$l_m1(r1)
-	cmple	r0, r1, r0
-	blbs	r0, continue_loop
-	br	undo			; loop has terminated
-
-; Step is not int;  check the sign of its exp field:
-15$:	ldq_u	r28, mval$b_exp(r3)
-	lda	r27, mval$b_exp+1(r3)
-	extqh	r28, r27, r28
-	bge	r28, 5$			; branch if step's exp is positive
-
-; Either step's value or its exp field is negative;  swap r0 with r1:
-20$:	mov	r4, r0			; r0 -> terminator
-	mov	r2, r1			; r1 -> index
-	mv_if_notint (r0), compare_non_int
-	mv_if_int (r1), 10$
-
-
-; Neither index nor terminator is int;  use OP_NUMCMP to do the comparison:
-compare_non_int:
-	$call	OP_NUMCMP, set_arg_info=false, nonstandard=true		; args are r0 and r1
-	ble	r0, continue_loop
-
-; The FOR loop has terminated;  before returning we must subtract step from index:
-
-undo:
-	mv_if_notint (r2), sub_non_int	; branch if index is not int
-	mv_if_notint (r3), sub_non_int	; branch if step is not int
-
-	ldl	r22, mval$l_m1(r2)	; r22 = new index value
-	ldl	r23, mval$l_m1(r3)	; r23 = step value
-	subq	r22, r23, r22		; r22 = old index value [= new index - step]
-
-; Check the new (old) index value:
-	$call	CHECK_INDEX, set_arg_info=false, nonstandard=true, local=true
-
-	br	terminate_loop
-
-
-; One or both of index and step are not int;  subtract step from index:
-sub_non_int:
-	$call	ADD_MVALS, args=<r2, r3, 1/a, r2>, set_arg_info=false, nonstandard=true
-
-
-
-; The FOR loop has terminated;  return via the address saved in the Mumps stack frame:
-terminate_loop:
-	ldl	r26, msf$mpc_off(r12)
-	br	epilogue
-
-
-; The FOR loop has not yet terminated;  return via the address saved on the stack:
-continue_loop:
-	ldq	r26, 32(sp)
-
-
-epilogue:
-	ldq	r2, (sp)
-	ldq	r3, 8(sp)
-	ldq	r4, 16(sp)
-	ldq	r13, 24(sp)
-	lda	sp, 40(sp)
-
-	ret	r26
-
-	$end_routine
-
-; This is a local routine to check and update the value of the index variable.
-;
-; On entry, R22 contains the value to check, and r2 -> the mval for the index variable.
-
-
-	$routine CHECK_INDEX, entry=CHECK_INDEX_CA, local=true, kind=null
-	.base	r27, $ls
-
-	ldq	r25, mant_hi_val
-	cmplt	r22, r25, r28
-	beq	r28, 20$		; branch if index >= MANT_HI
-
-	negq	r25, r25
-	cmple	r22, r25, r28
-	bne	r28, 10$		; branch if index <= -MANT_HI
-
-; Abs(index value) < MANT_HI;  simply store it:
-	stl	r22, mval$l_m1(r2)
-
-; Since the value has changed, set mvtype to int (i.e. clear all bits except mval$m_int):
-	ldl	r24, mval$w_mvtype(r2)
-	mskwl	r24, mval$w_mvtype, r24
-	or	r24, mval$m_int, r24
-	stl	r24, mval$w_mvtype(r2)
-
-	ret	r26
-
-
-; index <= -MANT_HI:
-10$:	negq	r22, r22		; make the value positive
-	mov	^x80, r28		; set the sign bit for exp
-
-; index >= MANT_HI:
-20$:	or	r28, ^x45, r28		; exp will be ^x45 (decimal 69)
-
-; Set mvtype (to mval$m_nm) and exp:
-      	mov  	mval$m_nm, r24		; set mvtype field
-	insbl	r28, mval$b_exp, r28	; move the exp value into position in r28
-	or	r24, r28, r24		; set the new field values into r24
-	stl	r24, mval$w_mvtype(r2)	; and store them
-
-; Divide the index value (r22) by 10:
-	ldah	r24, -13107
-	negq	r22, r25
-	lda	r24, -13107(r24)
-	cmovge	r22, r22, r25
-	sll	r24, 32, r24
-	umulh	r25, r24, r25
-	srl	r25, 3, r25
-	negq	r25, r28
-	cmovge	r22, r25, r28		; r28 = index / 10
-
-	mulq	r28, 10, r24		; r24 = (index / 10) * 10
-	ldq	r25, mant_lo_val
-	subq	r22, r24, r22		; r22 = index - ((index / 10) * 10)
-	mulq	r22, r25, r22		; r22 = (index - ((index / 10) * 10)) * MANT_LO
-
-	stl	r22, mval$l_m0(r2)	; (index - ((index / 10) * 10)) * MANT_LO
-	stl	r28, mval$l_m1(r2)	; index / 10
-
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_gettruth.m64 b/sr_avms/op_gettruth.m64
deleted file mode 100644
index 5ca6170..0000000
--- a/sr_avms/op_gettruth.m64
+++ /dev/null
@@ -1,42 +0,0 @@
-	.title	OP_GETTRUTH
-
-	mval$def
-
-
-	$linkage_section
-
-a_literal_zero:
-	.address literal_zero
-
-a_literal_one:
-	.address literal_one
-
-
-	$code_section
-
-	$routine OP_GETTRUTH, entry=OP_GETTRUTH_CA, kind=null
-	.base	r27, $ls
-
-	ldl	r20, 0(r10)		; $TEST value
-	ldq	r24, a_literal_one
-	ldq	r28, a_literal_zero
-	cmovne	r20, r24, r28
-
-; mval's are longword-aligned, and are 5 longwords long [mval$size = 20]:
-	ldl	r16, (r28)
-	ldl	r17, 4(r28)
-	ldl	r18, 8(r28)
-	ldl	r19, 12(r28)
-	ldl	r20, 16(r28)
-
-	stl	r16, (r1)
-	stl	r17, 4(r1)
-	stl	r18, 8(r1)
-	stl	r19, 12(r1)
-	stl	r20, 16(r1)
-
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_iretmvad.m64 b/sr_avms/op_iretmvad.m64
deleted file mode 100644
index 57df112..0000000
--- a/sr_avms/op_iretmvad.m64
+++ /dev/null
@@ -1,29 +0,0 @@
-	.title	OP_IRETMVAD
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OP_IRETMVAD, entry=OP_IRETMVAD_CA, kind=null
-	lda	sp, -16(sp)
-	stq	r3, (sp)
-	stq	r1, 8(sp)	; save r1, restore into r0 later
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_UNWIND, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r0, 8(sp)	; set r0 from saved r1
-	ldq	r3, (sp)
-	lda	sp, 16(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_linefetch.m64 b/sr_avms/op_linefetch.m64
deleted file mode 100644
index fe053ee..0000000
--- a/sr_avms/op_linefetch.m64
+++ /dev/null
@@ -1,31 +0,0 @@
-	.title	op_linefetch
-
-	G_MSF
-
-;	entry:
-;		r16		argument count
-;		r17 . . .	arguments to pass to fetch
-
-	$routine	name=op_linefetch, entry=op_linefetch_ca, kind=stack, saved_regs=<r2, r13, fp>
-
-	stl	r26, msf$mpc_off(r12)
-	stl	r13, msf$ctxt_off(r12)
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	fetch_args	r2, $SIZE	
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldl	r26, msf$mpc_off(r12)	; use the return address from the MUMPS stack frame
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	r13, $RSA_OFFSET+16(sp)
-	ldq	fp,  $RSA_OFFSET+24(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_linefetch
-
-	.end
diff --git a/sr_avms/op_mprofcall.m64 b/sr_avms/op_mprofcall.m64
deleted file mode 100644
index 9555d21..0000000
--- a/sr_avms/op_mprofcall.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	OP_MPROFCALL
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_MPROFCALLB, entry=OP_MPROFCALL_CA, aliases=<OP_MPROFCALLW, OP_MPROFCALLL>, kind=null
-
-	lda	sp, -16(sp)
-	stq	r3, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	COPY_STACK_FRAME_SP, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-
-	ldq	r28, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, 16(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_mprofcallsp.m64 b/sr_avms/op_mprofcallsp.m64
deleted file mode 100644
index bf12e0f..0000000
--- a/sr_avms/op_mprofcallsp.m64
+++ /dev/null
@@ -1,54 +0,0 @@
-	.title	OP_MPROFCALLSP
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2007 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_MPROFCALLSPB, entry=OP_MPROFCALLSP_CA, aliases=<OP_MPROFCALLSPW, OP_MPROFCALLSPL>, kind=null
-
-	lda	sp, -16(sp)
-	stq	r3, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	EXFUN_FRAME_PUSH_DUMMY_FRAME, set_arg_info=false, nonstandard=true
-	ldl	r16, 0(r10)		; Fetch $TEST value
-	$call	PUSH_TVAL, args=<r16>, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-	ldl	r9, msf$temps_ptr_off(r12)
-
-	ldq	r28, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, 16(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_mprofexfun.m64 b/sr_avms/op_mprofexfun.m64
deleted file mode 100644
index 08ee1dc..0000000
--- a/sr_avms/op_mprofexfun.m64
+++ /dev/null
@@ -1,85 +0,0 @@
-	.title	op_mprofexfun - invoke (internal) extrinsic function mprofiling flavor
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2012 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-;	op_mprofexfun - invoke (internal) extrinsic function m-profiling flavor
-;
-;	arguments:
-;		ret_value	address for function to place return value
-;		offset		to this frame's continue (return) point past branch to subroutine
-;		mask
-;		actualcnt	actual argument count
-;		actual1		address of actual first argument
-;		actual2		address of actual second argument
-;		. . .
-
-	$routine	name=op_mprofexfun, entry=op_mprofexfun_ca, kind=stack, saved_regs=<r2, r13, r16, r17, r18, r19, r20, r21, fp>, - ; BYPASSOK
-			data_section_pointer=true, -
-			data_section=<$DATA$, QUAD, NOPIC, CON, REL, LCL, NOSHR, MIX, NOEXE, RD, WRT>
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-	$code_section
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	ldq	r1,  A_frame_pointer
-	ldl	r1,  (r1)
-	addl	r26, r17, r28	; add size of jump sequence to get return addr for frame.
-	stl	r28, msf$mpc_off(r1)
-	$call	exfun_frame_sp, set_arg_info=false
-	ldl	r16, 0(r10)		; $TRUTH aka $TEST value
-        bic     r16, #^Xfe, r16         ; clear all but low order bit
-	ldq	r17, $RSA_OFFSET+24(fp)	; old r16 (ret_value)
-	ldq	r18, $RSA_OFFSET+40(fp) ; old r18 (mask)
-	ldq	r19, $RSA_OFFSET+48(fp) ; old r19 (actualcnt)
-	ldq	r20, $RSA_OFFSET+56(fp) ; old r20 (actual1)
-	ldq	r21, $RSA_OFFSET+64(fp)	; old r21 (actual2)
-	lda	r25, 4(r19)
-
-;	If more than 2 actual arguments, push rest onto stack.
-	subq	r19, 2, r28		; number of arguments originally passed on stack (actual3 . . . actualn)
-	ble	r28, zero_in_stack	; all original arguments in registers
-	lda	r0,  $SIZE(fp)
-	subq	r28, 1, r28		; offset = number - 1
-	s8addq	r28, r0, r0		; address of actualn
-loop:	ldq	r1,  (r0)
-	lda	sp,  -8(sp)
-	lda	r0,  -8(r0)
-	stq	r1,  (sp)
-	subq	r28, 1, r28
-	bge	r28, loop
-zero_in_stack:
-	$call	push_parm, set_arg_info=false	; push_parm ($T, ret_value, mask, actualcnt [, actual1[, actual2 . . .]])
-
-done:	ldq	r28, A_frame_pointer
-	ldl	r2,  (r28)		; saved value of frame_pointer
-	mov	r2,  r12
-	ldl	r9,  msf$temps_ptr_off(r12)
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldq	r26, $RSA_OFFSET(sp)
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	r13, $RSA_OFFSET+16(sp)
-	ldq     fp,  $RSA_OFFSET+72(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_mprofexfun
-
-	.end
diff --git a/sr_avms/op_mprofextcall.m64 b/sr_avms/op_mprofextcall.m64
deleted file mode 100644
index 99eddf0..0000000
--- a/sr_avms/op_mprofextcall.m64
+++ /dev/null
@@ -1,111 +0,0 @@
-	.title	op_mprofextcall - call external (MUMPS) routine
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005, 2012 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-	G_MSF
-	PROCDESC
-
-;	op_mprofextcall calls and external GT.M MUMPS routine.  If the routine has not yet
-;	been linked into the current image, op_mprofextcall will first link it by invoking
-;	the auto-ZLINK function.
-;
-;	Args:
-;		procdsc - address of procedure descriptor of routine to call
-;		labaddr - address of offset into routine to which to transfer control
-
-	$routine	name=op_mprofextcall, entry=op_mprofextcall_ca, kind=stack, saved_regs=<fp>, -
-			data_section_pointer=true
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-L_ERR_GTMCHECK:		.long		ERR_GTMCHECK
-L_ERR_LABELUNKNOWN:	.long		ERR_LABELUNKNOWN
-
-	$data_section
-
-PDSC_FLAGS:
-	.long	GTM_PD_FLAGS
-
-
-	$code_section
-
-	.base	r27, $ls
-	ldq	r22, $dp
-	.base	r22, $ds
-
-	putframe	r12
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	beq	r16, L20		; if procdsc == 0, this routine has not yet been linked into current image
-	beq	r17, L40		; if labaddr == 0 (and procdsc != 0), there is some interal error
-
-;	Check whether first argument is procedure descriptor or routine header.
-	ldl	r28, PDSC_FLAGS
-	ldl	r0,  (r16)
-	xor	r28, r0, r28
-	bne	r28, L10		; if not procedure descriptor, it must be a routine header
-
-	ldq	r16, 8(r16)		; rhdaddr = procdsc->entry_point	; entry point address is address of routine header
-L10:	ldl	r17, (r17)		; *lab_ln_ptr
-	beq	r17, L40
-	ldl	r28, mrt$curr_ptr(r16)
-	addl	r17, r28, r17
-	addl	r17, r16, r17		; rhdaddr + *lab_ln_ptr
-	ldl	r17, (r17)		; *labaddr
-	ldl	r28, mrt$curr_ptr(r16)	; rhdaddr->current_rhead_ptr
-	addl	r16, r28, r18		; rhdaddr + rhdaddr->current_rhead_ptr
-	addl	r17, r18, r18		; rhdaddr + rhdaddr->current_rhead_ptr + *labaddr
-	$call	new_stack_frame_sp, args=<r16, mrt$lnk_ptr(r16)/L, r18>, set_arg_info=false
-
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+8(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L20:	bne	r17, L40		; if labaddr != 0 (and procdsc == 0), there is some internal error
-	lda	sp,  -8(sp)		; auto_zlink will put value here
-	stq	r31, (sp)
-	$call	auto_zlink, args=<msf$mpc_off(r12)/L, sp>, set_arg_info=false
-	beq	r0,  L30
-	mov	r0,  r16		; rhdaddr of newly-ZLINK'ed routine
-	ldq	r17, (sp)		; new labaddr
-	lda	sp,  8(sp)
-	beq	r17, L30
-	br	L10			; auto_zlink returns pointer to a routine header, not a procedure descriptor
-
-L30:	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+8(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L40:	$call	lib$signal, args=<L_ERR_LABELUNKNOWN/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	fp,  $RSA_OFFSET+8(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_mprofextcall
-
-	.end
diff --git a/sr_avms/op_mprofextexfun.m64 b/sr_avms/op_mprofextexfun.m64
deleted file mode 100644
index 00171b1..0000000
--- a/sr_avms/op_mprofextexfun.m64
+++ /dev/null
@@ -1,161 +0,0 @@
-	.title	op_mprofextexfun - invoke external extrinsic function
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2005, 2012 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-	G_MSF
-	PROCDESC
-
-;	op_mprofextexfun - invoke external extrinsic function
-;
-;	arguments:
-;		routine		address of procedure descriptor of procedure containing extrinsic function
-;		label		address of offset into routine to which to transfer control
-;		ret_value	address for function to place return value
-;		mask
-;		actualcnt	actual argument count
-;		actual1		address of actual first argument
-;		actual2		address of actual second argument
-;		. . .
-
-	$routine	name=op_mprofextexfun, entry=op_mprofextexfun_ca, kind=stack, saved_regs=<r2, r13, r18, r19, r20, r21, fp>, - ; BYPASSOK
-			data_section_pointer=true, -
-			data_section=<$DATA$, QUAD, NOPIC, CON, REL, LCL, NOSHR, MIX, NOEXE, RD, WRT>
-
-	$linkage_section
-
-A_frame_pointer:	.address	frame_pointer
-
-L_ERR_FMLLSTMISSING:	.long		ERR_FMLLSTMISSING
-L_ERR_GTMCHECK:		.long		ERR_GTMCHECK
-L_ERR_LABELUNKNOWN:	.long		ERR_LABELUNKNOWN
-
-
-	$data_section
-
-PDSC_FLAGS:
-	.long	GTM_PD_FLAGS
-
-
-	$code_section
-
-	.base	r27, $ls
-	ldq	r2,  $dp
-	.base	r2,  $ds
-
-	putframe
-
-	mov	r27, r13
-	.base	r13, $ls
-
-L9:	beq	r16, L20		; if procdsc == 0, this routine has not yet been linked into current image
-	beq	r17, L40		; if labaddr == 0 (and procdsc != 0), it's an unknown label
-
-;	Check whether first argument is procedure descriptor or routine header.
-	ldl	r28, PDSC_FLAGS
-	ldl	r0,  (r16)
-	xor	r28, r0, r28
-	bne	r28, L10		; if not procedure descriptor, it must be a routine header
-
-	ldq	r16, 8(r16)		; rhdaddr = procdsc->entry_point	; entry point address is address of routine header
-L10:	mov	r17, r22		; temporarily save labaddr, so it is not overriden
-	ldl	r17, (r17)		; *lab_ln_ptr
-	beq	r17, L40
-	ldl	r28, mrt$curr_ptr(r16)
-	addl	r17, r28, r17
-	addl	r17, r16, r17		; rhdaddr + *lab_ln_ptr
-	ldl	r17, (r17)		; *labaddr
-	ldl	r28, mrt$curr_ptr(r16)	; rhdaddr->current_rhead_ptr
-	addl	r16, r28, r18
-	addl	r17, r18, r18
-	mov	r22, r17		; restore the original labaddr
-
-	addq	r17, 4, r17		; labaddr += 4, to point to has_parms
-	ldl	r17, (r17)		; *has_parms
-	beq	r17, L50		; if has_parms == 0, then issue an error
-
-L12:	$call	new_stack_frame_sp, args=<r16, mrt$lnk_ptr(r16)/L, r18>, set_arg_info=false
-	ldl	r16, 0(r10)		; push $TRUTH aka $TEST
-        bic     r16, #^Xfe, r16         ; clear all but low order bit
-L15:	ldq	r17, $RSA_OFFSET+24(fp)	; old r18 (ret_value)
-	ldq	r18, $RSA_OFFSET+32(fp)	; old r19 (mask)
-	ldq	r19, $RSA_OFFSET+40(fp)	; old r20 (actualcnt)
-	ldq	r20, $RSA_OFFSET+48(fp)	; old r21 (actual1)
-	ldq	r21, $SIZE(fp)		; actual2, if any
-	lda	r25, 4(r19)
-
-;	If more than 1 argument, push rest onto stack.
-	subq	r19, 2, r28		; number of arguments to put onto stack (actual3 . . . actualn)
-	ble	r28, zero_in_stack	; all original arguments in registers
-	lda	r0,  $SIZE(fp)
-	s8addq	r28, r0, r0		; address of actualn
-loop:	ldq	r1,  (r0)
-	lda	sp,  -8(sp)
-	lda	r0,  -8(r0)
-	stq	r1,  (sp)
-	subq	r28, 1, r28
-	bgt	r28, loop
-zero_in_stack:
-	$call	push_parm, set_arg_info=false	; push_parm ($T, ret_value, mask, argc[, actual1[, actual2 . . .]])
-
-L16:	getframe
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L20:	bne	r17, L30		; procdsc == 0, but label != 0 => internal error
-	lda	sp,  -8(sp)		; auto_zlink will put value here
-	stq	r31, (sp)
-	$call	auto_zlink, args=<msf$mpc_off(r12)/L, sp>, set_arg_info=false
-	beq	r0,  L30
-	mov	r0,  r16		; rhdaddr of newly-ZLINK'ed routine
-	ldq	r17, (sp)		; new labaddr
-	lda	sp,  8(sp)
-	beq	r17, L40		; found routine, but labaddr still 0 => unknown label
-	br	L10
-
-L30:	$call	lib$signal, args=<L_ERR_GTMCHECK/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L40:	$call	lib$signal, args=<L_ERR_LABELUNKNOWN/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-L50:	$call	lib$signal, args=<L_ERR_FMLLSTMISSING/L>
-	$begin_epilogue
-	getframe
-	mov	fp,  sp
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	fp,  $RSA_OFFSET+56(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_mprofextexfun
-
-	.end
diff --git a/sr_avms/op_mprofforchk1.m64 b/sr_avms/op_mprofforchk1.m64
deleted file mode 100644
index 608afd1..0000000
--- a/sr_avms/op_mprofforchk1.m64
+++ /dev/null
@@ -1,31 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2011 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	op_mprofforloop "FOR loop iteration logic"
-
-	$routine OP_MPROFFORCHK1, entry=OP_MPROFFORCHK1_CA, kind=null
-
-	subq	sp, 16, sp
-	stq	r26, 0(sp)
-	stq	r13, 8(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mov	r26, r16	; send the return address to forchkhandler
-	$call	forchkhandler, args=<r16>, set_arg_info=false, nonstandard=true
-
-	ldq	r26, (sp)
-	ldq	r13, 8(sp)
-	addq	sp, 16, sp
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_mprofforlcldo.m64 b/sr_avms/op_mprofforlcldo.m64
deleted file mode 100644
index 40ca997..0000000
--- a/sr_avms/op_mprofforlcldo.m64
+++ /dev/null
@@ -1,51 +0,0 @@
-	.title	OP_MPROFFORLCLDO
-; ###############################################################
-; #								#
-; #	Copyright 2001, 2012 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; # 	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_MPROFFORLCLDOB, entry=OP_MPROFFORLCLDO_CA, aliases=<OP_MPROFFORLCLDOW,OP_MPROFFORLCLDOL>, kind=null
-	lda	sp, -16(sp)
-	stq	r3, 8(sp)
-	stq	r26, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	ldq	r1, a_frame_pointer
-	ldl	r1, (r1)
-
-;	Bump the return PC past the branch instruction following the jsr that got us here:
-	addl	r26, r16, r26		; length of branch sequence
-	stl	r26, msf$mpc_off(r1)	; and store it in the Mumps stack frame
-
-	$call	EXFUN_FRAME_SP, set_arg_info=false, nonstandard=true
-
-	ldq	r12, a_frame_pointer
-	ldl	r12, (r12)
-	ldl	r9, msf$temps_ptr_off(r12)
-
-	ldq	r28, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, 16(sp)
-	ret	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_mproflinefetch.m64 b/sr_avms/op_mproflinefetch.m64
deleted file mode 100644
index 9add6f5..0000000
--- a/sr_avms/op_mproflinefetch.m64
+++ /dev/null
@@ -1,34 +0,0 @@
-	.title	op_mproflinefetch
-	G_MSF
-
-;	entry:
-;		r16		argument count
-;		r17 . . .	arguments to pass to fetch
-
-	$routine	name=op_mproflinefetch, entry=op_mproflinefetch_ca, kind=stack, saved_regs=<r2, r13, fp>
-
-	stl	r26, msf$mpc_off(r12)
-	stl	r13, msf$ctxt_off(r12)
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	fetch_args	r2, $SIZE
-
-	$call	PCURRPOS, args=<>, set_arg_info=false, nonstandard=true
-
-	$call	STACK_LEAK_CHECK, args=<>, set_arg_info=false, nonstandard=true
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldl	r26, msf$mpc_off(r12)	; use the return address from the MUMPS stack frame
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	r13, $RSA_OFFSET+16(sp)
-	ldq	fp,  $RSA_OFFSET+24(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_epilogue
-
-	$end_routine	name=op_mproflinefetch
-
-	.end
diff --git a/sr_avms/op_mproflinestart.m64 b/sr_avms/op_mproflinestart.m64
deleted file mode 100644
index 303abfe..0000000
--- a/sr_avms/op_mproflinestart.m64
+++ /dev/null
@@ -1,24 +0,0 @@
-	.title	op_mproflinestart
-	G_MSF
-
-;	op_mproflinestart - establish start of line in GT.M MUMPS stack frame
-
-	$routine        name=op_mproflinestart, entry=op_mproflinestart_ca, kind=stack, saved_regs=<r2, r13, fp>
-
-	stl	r26, msf$mpc_off(r12)
-	stl	r13, msf$ctxt_off(r12)
-
-	mov	r27, r13
-	.base	r13, $ls
-
-	$call	PCURRPOS, args=<>, set_arg_info=false, nonstandard=true
-
-	$begin_epilogue
-	mov	fp,  sp
-	ldl	r26, msf$mpc_off(r12)	; use the return address from the MUMPS stack frame
-	ldq	r2,  $RSA_OFFSET+8(sp)
-	ldq	r13, $RSA_OFFSET+16(sp)
-	ldq	fp,  $RSA_OFFSET+24(sp)
-	lda	sp,  $SIZE(sp)
-	ret	r26
-	$end_routine	name=op_mproflinestart
diff --git a/sr_avms/op_neg.m64 b/sr_avms/op_neg.m64
deleted file mode 100644
index 8445122..0000000
--- a/sr_avms/op_neg.m64
+++ /dev/null
@@ -1,98 +0,0 @@
-;#################################################################
-;#                                                               #
-;#      Copyright 2006, 2008 Fidelity Information Services, Inc  #
-;#                                                               #
-;#      This source code contains the intellectual property      #
-;#      of its copyright holder(s), and is made available        #
-;#      under a license.  If you do not know the terms of        #
-;#      the license, please stop and do not read further.        #
-;#                                                               #
-;#################################################################
-	.title	OP_NEG
-
-	mval$def
-
-
-	$routine OP_NEG, entry=OP_NEG_CA, kind=null
-	lda	sp, -32(sp)
-	stq	r26, (sp)
-	stq	r2, 8(sp)
-	stq	r3, 16(sp)
-	stq	r13, 24(sp)
-	mov	r27, r13
-	.base	r13, $ls
-
-	mov	r0, r2		; r2 -> output mval
-	mov	r1, r3		; r3 -> input mval
-
-	mv_force_defined r3
-	mv_force_num (r3)
-
-;	Move the mvtype from the input mval to the output mval,
-;	except for the str bit:
-	ldq_u	r23, mval$w_mvtype(r3)
-	ldq_u	r22, mval$w_mvtype(r2)
-	extwl	r23, r3, r23
-	mskwl	r22, r2, r22
-	and	r23, #mval$m_int, r23	; clear everything except mval$v_nm and mval$v_int
-	inswl	r23, r2, r23
-	or	r22, r23, r22
-	stq_u	r22, mval$w_mvtype(r2)
-
-;	Is the input zero?
-	ldl	r24, mval$l_m1(r3)
-	beq	r24, 10$
-
-;	No;  is it int?
-	mv_if_notint (r3), 15$
-
-;	Yes;  output m1 = - input m1
-	ldl	r24, mval$l_m1(r3)
-	negl	r24, r24
-	stl	r24, mval$l_m1(r2)
-
-;	Return:
-5$:	ldq	r28, (sp)
-	ldq	r2, 8(sp)
-	ldq	r3, 16(sp)
-	ldq	r13, 24(sp)
-	lda	sp, 32(sp)
-
-	ret	r28
-
-
-;	Input mval is zero;  clear output exp, sign, m0, and m1:
-10$:	ldq_u	r22, mval$b_exp(r2)
-	lda	r23, mval$b_exp(r2)
-	mskbl	r22, r23, r22
-	stq_u	r22, mval$b_exp(r2)
-	stl	r31, mval$l_m0(r2)
-	stl	r31, mval$l_m1(r2)
-
-	br	5$
-
-
-;	Input is not int;  move input m0 and m1 to output
-15$:	ldl	r22, mval$l_m0(r3)
-	ldl	r23, mval$l_m1(r3)
-	stl	r22, mval$l_m0(r2)
-	stl	r23, mval$l_m1(r2)
-
-;	Move exp from input to output, but flip the sign:
-	ldq_u	r22, mval$b_exp(r2)
-	ldq_u	r23, mval$b_exp(r3)
-	lda	r24, mval$b_exp(r2)
-	lda	r25, mval$b_exp(r3)
-	mskbl	r22, r24, r22
-	extbl	r23, r25, r23		; low order byte of r23 = input exp and sign
-	xor	r23, ^x80, r23		; flip the sign bit
-	insbl	r23, r24, r23
-	or	r22, r23, r22
-	stq_u	r22, mval$b_exp(r2)
-
-	br	5$
-
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_numcmp.m64 b/sr_avms/op_numcmp.m64
deleted file mode 100644
index 682686a..0000000
--- a/sr_avms/op_numcmp.m64
+++ /dev/null
@@ -1,22 +0,0 @@
-	.title OP_NUMCMP "Compare mval's, set condition code"
-
-; On entry, r0 and r1 point to mval's.
-; On exit, r24 contains the appropriate condition.
-
-	$routine OP_NUMCMP, entry=OP_NUMCMP_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r26, (sp)
-	.base	r27, $ls
-
-	mov	r0, r16
-	mov	r1, r17
-	$call	NUMCMP, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	mov	r0, r24
-
-	ldq	r26, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_restartpc.m64 b/sr_avms/op_restartpc.m64
deleted file mode 100644
index 0d471ed..0000000
--- a/sr_avms/op_restartpc.m64
+++ /dev/null
@@ -1,31 +0,0 @@
-	.title	OP_RESTARTPC  "Save PC"
-
-	G_MSF
-
-call_inst_size = 12
-
-	$linkage_section
-
-A_restart_ctxt:
-	.address restart_ctxt
-A_restart_pc:
-	.address restart_pc
-
-
-	$code_section
-
-	$routine OP_RESTARTPC, entry=OP_RESTARTPC_CA, kind=null
-	.base	r27, $ls
-
-	ldq	r25, A_restart_pc
-	subq	r26, call_inst_size, r28
-	stl	r28, (r25)
-	ldq	r25, A_restart_ctxt
-	ldl	r28, msf$ctxt_off(r12)
-	stl	r28, (r25)
-
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_retarg.m64 b/sr_avms/op_retarg.m64
deleted file mode 100644
index 89e7d71..0000000
--- a/sr_avms/op_retarg.m64
+++ /dev/null
@@ -1,41 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2009, 2010 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-; 	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.title	OP_RETARG
-
-	G_MSF
-
-	$linkage_section
-
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$code_section
-
-	$routine OP_RETARG, entry=OP_RETARG_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	mov	r0, r16
-	mov	r1, r17
-	$call	UNW_RETARG, args=<r16,r17>, set_arg_info=false, nonstandard=true
-
-	getframe
-
-	ldq	r3, (sp)
-	addq	sp, 8, sp
-	jmp	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_startintrrpt.m64 b/sr_avms/op_startintrrpt.m64
deleted file mode 100644
index 7f4258f..0000000
--- a/sr_avms/op_startintrrpt.m64
+++ /dev/null
@@ -1,52 +0,0 @@
-	.title	OP_STARTINTRRPT
-
-	G_MSF
-
-	$linkage_section
-
-a_neterr_pending:
-	.address neterr_pending
-
-a_iott_write_error:
-	.address iott_write_error
-
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OP_STARTINTRRPT, entry=OP_STARTINTRRPT_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r2, (sp)
-	mov	r27, r2
-	.base	r2, $ls
-
-	putframe
-
-	ldq	r0, a_neterr_pending
-	ldq_u	r24, (r0)
-	extbl	r24, r0, r24
-	beq	r24, 10$
-
-	$call	outofband_clear, set_arg_info=false, nonstandard=true
-	$call	gvcmz_neterr, args=<0/a>, set_arg_info=false, nonstandard=true
-
-10$:	ldq	r0, a_iott_write_error
-	ldl	r24, (r0)
-	beq	r24, 15$
-
-	$call	outofband_clear, set_arg_info=false, nonstandard=true
-	$call	iott_wrterr, set_arg_info=false, nonstandard=true
-
-15$:	$call 	async_action, args=<1/a>, set_arg_info=false, nonstandard=true
-
-20$:	getframe
-
-	ldq	r2, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/op_sto.m64 b/sr_avms/op_sto.m64
deleted file mode 100644
index 7491e82..0000000
--- a/sr_avms/op_sto.m64
+++ /dev/null
@@ -1,67 +0,0 @@
-;#################################################################
-;#								 #
-;#	Copyright 2006, 2012 Fidelity Information Services, Inc	 #
-;#								 #
-;#	This source code contains the intellectual property	 #
-;#	of its copyright holder(s), and is made available	 #
-;#	under a license.  If you do not know the terms of	 #
-;# 	the license, please stop and do not read further.	 #
-;#								 #
-;#################################################################
-	.title	OP_STO
-
-	mval$def
-
-
-	$linkage_section
-
-a_literal_null:
-	.address literal_null
-
-a_undef_inhibit:
-	.address undef_inhibit
-
-l_underr:
-	.linkage_pair underr
-
-
-	$code_section
-
-	$routine OP_STO, entry=OP_STO_CA, kind=null
-	.base	r27, $ls
-
-	mv_if_notdefined (r1), 10$
-
-; Copy the mval pointed to by r1 to the mval pointed to by r0
-; (mval's are longword-aligned, and are 5 longwords long [mval$size = 20]):
-5$:	mov	mval$m_aliascont, r24
-	ldl	r16, (r1)
-	ldl	r17, 4(r1)
-	bic	r16, r24, r16		; don't allow propagation of alias container flag
-	ldl	r18, 8(r1)
-	ldl	r19, 12(r1)
-	ldl	r20, 16(r1)
-	stl	r16, (r0)
-	stl	r17, 4(r0)
-	stl	r18, 8(r0)
-	stl	r19, 12(r0)
-	stl	r20, 16(r0)
-	ret	r26
-
-10$:	ldq	r28, a_undef_inhibit
-	ldq_u	r24, (r28)
-	extbl	r24, r28, r24
-	beq	r24, 20$
-	ldq	r1, a_literal_null
-	br	5$
-
-; "Call" UNDERR;  it will return to our caller, since we haven't changed r26:
-20$:	mov	r1, r16
-	mov	^x1, r25	; UNDEF here is never subscripted - use arg cnt 1
-	ldq	r28, l_underr
-	ldq	r27, l_underr+8
-	jmp	r28
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_break.m64 b/sr_avms/opp_break.m64
deleted file mode 100644
index 14486ae..0000000
--- a/sr_avms/opp_break.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_BREAK
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_BREAK, entry=OPP_BREAK_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_BREAK, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_commarg.m64 b/sr_avms/opp_commarg.m64
deleted file mode 100644
index 0990486..0000000
--- a/sr_avms/opp_commarg.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_COMMARG
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_COMMARG, entry=OPP_COMMARG_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_COMMARG, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_dmode.m64 b/sr_avms/opp_dmode.m64
deleted file mode 100644
index 97c1775..0000000
--- a/sr_avms/opp_dmode.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_DMODE
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_DMODE, entry=OPP_DMODE_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_DMODE, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_hardret.m64 b/sr_avms/opp_hardret.m64
deleted file mode 100644
index fb2825f..0000000
--- a/sr_avms/opp_hardret.m64
+++ /dev/null
@@ -1,26 +0,0 @@
-	.title	OPP_HARDRET
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-	$routine OPP_HARDRET, entry=OPP_HARDRET_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_HARDRET, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_inddevparms.m64 b/sr_avms/opp_inddevparms.m64
deleted file mode 100644
index b698707..0000000
--- a/sr_avms/opp_inddevparms.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDDEVPARMS
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDDEVPARMS, entry=OPP_INDDEVPARMS_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDDEVPARMS, args=<r16, r17, r18>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indfnname.m64 b/sr_avms/opp_indfnname.m64
deleted file mode 100644
index 396fe3c..0000000
--- a/sr_avms/opp_indfnname.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDFNNAME
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDFNNAME, entry=OPP_INDFNNAME_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDFNNAME, args=<r16, r17, r18>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indfun.m64 b/sr_avms/opp_indfun.m64
deleted file mode 100644
index 0d496ac..0000000
--- a/sr_avms/opp_indfun.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDFUN
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDFUN, entry=OPP_INDFUN_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDFUN, args=<r16, r17, r18>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indglvn.m64 b/sr_avms/opp_indglvn.m64
deleted file mode 100644
index f499a6c..0000000
--- a/sr_avms/opp_indglvn.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDGLVN
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDGLVN, entry=OPP_INDGLVN_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDGLVN, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indincr.m64 b/sr_avms/opp_indincr.m64
deleted file mode 100644
index e57c0cd..0000000
--- a/sr_avms/opp_indincr.m64
+++ /dev/null
@@ -1,37 +0,0 @@
-	.title	OPP_INDINCR
-; ###############################################################
-; #                                                             #
-; #     Copyright 2004 Sanchez Computer Associates, Inc.        #
-; #                                                             #
-; #     This source code contains the intellectual property     #
-; #     of its copyright holder(s), and is made available       #
-; #     under a license.  If you do not know the terms of       #
-; #     the license, please stop and do not read further.       #
-; #                                                             #
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDINCR, entry=OPP_INDINCR_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDINCR, args=<r16, r17, r18>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indlvadr.m64 b/sr_avms/opp_indlvadr.m64
deleted file mode 100644
index 2e7c27e..0000000
--- a/sr_avms/opp_indlvadr.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDLVADR
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDLVADR, entry=OPP_INDLVADR_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDLVADR, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indlvarg.m64 b/sr_avms/opp_indlvarg.m64
deleted file mode 100644
index ffa32bf..0000000
--- a/sr_avms/opp_indlvarg.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDLVARG
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDLVARG, entry=OPP_INDLVARG_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDLVARG, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indlvnamadr.m64 b/sr_avms/opp_indlvnamadr.m64
deleted file mode 100644
index 6000814..0000000
--- a/sr_avms/opp_indlvnamadr.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDLVNAMADR
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDLVNAMADR, entry=OPP_INDLVNAMADR_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDLVNAMADR, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indmerge.m64 b/sr_avms/opp_indmerge.m64
deleted file mode 100644
index 81decde..0000000
--- a/sr_avms/opp_indmerge.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDMERGE
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDMERGE, entry=OPP_INDMERGE_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDMERGE, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indpat.m64 b/sr_avms/opp_indpat.m64
deleted file mode 100644
index cb21da5..0000000
--- a/sr_avms/opp_indpat.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDPAT
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDPAT, entry=OPP_INDPAT_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDPAT, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indrzshow.m64 b/sr_avms/opp_indrzshow.m64
deleted file mode 100644
index bc91896..0000000
--- a/sr_avms/opp_indrzshow.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDRZSHOW
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDRZSHOW, entry=OPP_INDRZSHOW_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDRZSHOW, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indsavglvn.m64 b/sr_avms/opp_indsavglvn.m64
deleted file mode 100644
index bf509d9..0000000
--- a/sr_avms/opp_indsavglvn.m64
+++ /dev/null
@@ -1,37 +0,0 @@
-	.title	OPP_INDSAVGLVN
-; ###############################################################
-; #								#
-; #	Copyright 2012 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; #	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDSAVGLVN, entry=OPP_INDSAVGLVN_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDSAVGLVN, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indsavlvn.m64 b/sr_avms/opp_indsavlvn.m64
deleted file mode 100644
index 2f63042..0000000
--- a/sr_avms/opp_indsavlvn.m64
+++ /dev/null
@@ -1,37 +0,0 @@
-	.title	OPP_INDSAVLVN
-; ###############################################################
-; #								#
-; #	Copyright 2012 Fidelity Information Services, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; #	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDSAVLVN, entry=OPP_INDSAVLVN_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDSAVLVN, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indset.m64 b/sr_avms/opp_indset.m64
deleted file mode 100644
index ef60935..0000000
--- a/sr_avms/opp_indset.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDSET
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDSET, entry=OPP_INDSET_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDSET, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_indtext.m64 b/sr_avms/opp_indtext.m64
deleted file mode 100644
index 6e26701..0000000
--- a/sr_avms/opp_indtext.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_INDTEXT
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_INDTEXT, entry=OPP_INDTEXT_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_INDTEXT, args=<r16, r17, r18, r19>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_iretmval.m64 b/sr_avms/opp_iretmval.m64
deleted file mode 100644
index 70cf603..0000000
--- a/sr_avms/opp_iretmval.m64
+++ /dev/null
@@ -1,26 +0,0 @@
-	.title	OPP_IRETMVAL
-
-	g_msf
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_IRETMVAL, entry=OPP_IRETMVAL_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_IRETMVAL, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_newintrinsic.m64 b/sr_avms/opp_newintrinsic.m64
deleted file mode 100644
index 0a0a994..0000000
--- a/sr_avms/opp_newintrinsic.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_NEWINTRINSIC
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_NEWINTRINSIC, entry=OPP_NEWINTRINSIC_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_NEWINTRINSIC, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_newvar.m64 b/sr_avms/opp_newvar.m64
deleted file mode 100644
index 061674a..0000000
--- a/sr_avms/opp_newvar.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_NEWVAR
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_NEWVAR, entry=OPP_NEWVAR_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_NEWVAR, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_ret.m64 b/sr_avms/opp_ret.m64
deleted file mode 100644
index 8727cac..0000000
--- a/sr_avms/opp_ret.m64
+++ /dev/null
@@ -1,112 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2008 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-	.title	OPP_RET
-
-	G_MSF
-
-	$linkage_section
-
-a_frame_pointer:
-	.address  frame_pointer
-
-a_skip_error_ret:
-	.address  skip_error_ret
-
-a_error_frame:
-	.address  error_frame
-
-a_is_tracing_on:
-	.address  is_tracing_on
-
-a_msp:
-	.address  msp
-
-a_mv_chain:
-	.address  mv_chain
-
-a_tp_pointer:
-	.address  tp_pointer
-
-L_ERR_STACKUNDERFLO:
-	.long	ERR_STACKUNDERFLO
-
-
-	$code_section
-
-	$routine OPP_RET, entry=OPP_RET_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-;	Since most QUITs will be simple, check to see if there's anything to unwind:
-	ldq	r28, a_mv_chain
-	ldl	r28, (r28)
-	cmpule	r12, r28, r24
-	blbc	r24, lbl20		; branch if frame_pointer > mv_chain
-
-	ldq	r28, a_tp_pointer
-	ldl	r26, (r28)
-	bne	r26, lbl20		; if there's a transaction on, go do unwind
-
-	ldq	r28, a_skip_error_ret
-	ldl	r26, (r28)
-	bne	r26, lbl20		; if skip_error_ret is TRUE, go do unwind (at least to reset it to FALSE)
-
-	ldq	r28, a_error_frame
-	ldl	r26, (r28)
-	bne	r26, lbl20		; if error_frame is non-NULL, go do unwind
-
-;	Check the frame pointer type if it requires special handling by op_unwind
-	ldl	r28, msf$typ_off(r12)	; contains msf$flags
-	srl	r28, 16, r28		; shift flags byte to low order
-	and	r28, sff_indce, r28	; isolate indirect bit
-	bne	r28, lbl20		; go do the long version
-
-	ldq	r28, a_is_tracing_on
-	ldl	r26, (r28)
-	bne	r26, lbl20		; if m-profiling is on, go do unwind
-
-;	The frame_pointer is <= the mv_chain, so there's nothing to do but set up
-;	the new frame pointer and stack pointer:
-
-	addl	r12, msf$frame_size, r26
-	ldq	r28, a_msp
-	stl	r26, (r28)
-
-	ldl	r12, msf$old_frame_off(r12)
-	beq	r12, lbl90
-
-	ldq	r28, a_frame_pointer
-	stl	r12, (r28)
-	getframe
-	mov	r13, r27
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	jmp	r26
-
-
-lbl20:	$call	OP_UNWIND, set_arg_info=false, nonstandard=true
-
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-
-;	Note that LIB$SIGNAL does not return:
-lbl90:	$call	LIB$SIGNAL, args=<L_ERR_STACKUNDERFLO/L>, nonstandard=true
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_rterror.m64 b/sr_avms/opp_rterror.m64
deleted file mode 100644
index f34b602..0000000
--- a/sr_avms/opp_rterror.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_RTERROR
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_RTERROR, entry=OPP_RTERROR_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_RTERROR, args=<r16, r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_svput.m64 b/sr_avms/opp_svput.m64
deleted file mode 100644
index fbeb586..0000000
--- a/sr_avms/opp_svput.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_SVPUT
-
-	G_MSF
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_SVPUT, entry=OPP_SVPUT_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_SVPUT, args=<r16,r17>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_tcommit.m64 b/sr_avms/opp_tcommit.m64
deleted file mode 100644
index a9aaa96..0000000
--- a/sr_avms/opp_tcommit.m64
+++ /dev/null
@@ -1,27 +0,0 @@
-	.title	OPP_TCOMMIT  "Commit a transaction - may result in restart (transfer of control)"
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-
-	$routine OPP_TCOMMIT, entry=OPP_TCOMMIT_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_TCOMMIT, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_trestart.m64 b/sr_avms/opp_trestart.m64
deleted file mode 100644
index b1d6589..0000000
--- a/sr_avms/opp_trestart.m64
+++ /dev/null
@@ -1,26 +0,0 @@
-	.title	OPP_TRESTART  "Restart a specified transaction"
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-	$routine OPP_TRESTART, entry=OPP_TRESTART_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_TRESTART, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_trollback.m64 b/sr_avms/opp_trollback.m64
deleted file mode 100644
index 96d0627..0000000
--- a/sr_avms/opp_trollback.m64
+++ /dev/null
@@ -1,24 +0,0 @@
-	.title	OPP_TROLLBACK  "Rollback a specified transaction"
-
-	g_msf
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-	$routine OPP_TROLLBACK, entry=OPP_TROLLBACK_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_TROLLBACK, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-	.end
diff --git a/sr_avms/opp_tstart.m64 b/sr_avms/opp_tstart.m64
deleted file mode 100644
index 651319e..0000000
--- a/sr_avms/opp_tstart.m64
+++ /dev/null
@@ -1,97 +0,0 @@
-	.title	OPP_TSTART "Initiate a transaction processing frame"
-
-	G_MSF
-
-	$linkage_section
-a_frame_pointer:
-	.address frame_pointer
-
-
-	$code_section
-
-	$routine OPP_TSTART, entry=OPP_TSTART_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r2, (sp)
-	stq	r3, 8(sp)
-
-; Note: we use r3 as a base for the linkage section instead of the usual r13,
-;	since r13 is saved by putframe and restored by getframe:
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-
-; On entry to this routine, the value in arg3 (i.e. r18) has the following meaning:
-;	= -2	: preserve all variables
-;	= -1	: not restartable
-;	>= 0	: = the number of variables to preserve
-;
-; IFF (arg3 >= 0), the total number of arguments to this routine is (arg3 + 3);
-; otherwise, there are just 3 arguments.  (Note that r25 DOES NOT contain any
-; argument information;  calls to this routine emulate the VAX JSB instruction,
-; and do not set up such information.)
-;
-; On the other hand, OP_TSTART, called below, expects $Test as its first argument,
-; followed by all of the arguments passed to this routine.
-;
-; Therefore, we have to create a new argument list with all of our arguments moved
-; UP one slot in the list in order to make room for $Test.  The fact that the first
-; six arguments are passed in registers, while any arguments in excess of six are
-; passed on the stack, complicates this task.  So...
-;
-; First, move any arguments passed on the stack from their current positions
-; just above our register save area to new positions just below it:
-
-	mov	sp, r2			; save the current stack pointer
-
-	subq	r18, 4, r28		; r28 = the number of arguments on the stack, less 1
-	blt	r28, 10$		; skip if there weren't any on the stack
-
-	sll	r28, 3, r0
-	addq	r0, stack_offset, r0	; account for the saved registers
-	addq	r0, sp, r0		; r0 -> the last argument
-loop:
-	ldq	r1, (r0)
-	lda	sp, -8(sp)
-	lda	r0, -8(r0)
-	subq	r28, 1, r28
-	stq	r1, (sp)
-	bgt	r28, loop
-
-; Next, put the original arg6 onto the stack:
-
-10$:	lda	sp, -8(sp)
-	stq	r21, (sp)
-
-; Now, shift the first five arguments up into the next higher registers:
-
-	mov	r20, r21
-	mov	r19, r20
-	mov	r18, r19
-	mov	r17, r18
-	mov	r16, r17
-
-; Finally, put "tstart-is-implicit" flag into the first argument register, and call OP_TSTART:
-
-	lda	r16, 0
-
-; Note that what was in r18 is now in r19:
-	clr	r25
-	cmovgt	r19, r19, r25		; iff r19 > 0, number of arguments is r19, ...
-	addq	r25, 4, r25		; ... plus the original 3 arguments, plus $Test
-
-	$call	OP_TSTART, set_arg_info=false, nonstandard=true
-
-	getframe
-
-	mov	r2, sp			; restore the stack
-
-	ldq	r2, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_xnew.m64 b/sr_avms/opp_xnew.m64
deleted file mode 100644
index 19f212a..0000000
--- a/sr_avms/opp_xnew.m64
+++ /dev/null
@@ -1,66 +0,0 @@
-	.title	OPP_XNEW
-
-	G_MSF
-
-	$linkage_section
-A_frame_pointer:
-	.address frame_pointer
-
-	$routine OPP_XNEW, entry=OPP_XNEW_CA, kind=null
-stack_offset = 16
-	lda	sp, -stack_offset(sp)
-	stq	r2, (sp)
-	stq	r3, 8(sp)
-
-	mov	sp, r2			; save the current stack pointer
-
-; Note: we use r3 as a base for the linkage section instead of the usual r13,
-;	since r13 is saved by putframe and restored by getframe:
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-
-; The variable length argument list that was passed to us must be passed on to OP_XNEW.
-; However, since our first argument is actually the argument count, it has to be moved
-; into the Argument Information register (r25), and the remaining arguments must all be
-; moved down one slot in the list:
-
-	mov	r16, r25		; argument count
-	mov	r17, r16		; arg1
-	mov	r18, r17		; arg2
-	mov	r19, r18		; arg3
-	mov	r20, r19		; arg4
-	mov	r21, r20		; arg5
-	ldq	r21, stack_offset(sp)	; arg6 was on the stack
-
-; Any additional arguments that were on the stack must be re-stacked below our register save area:
-
-	subq	r25, 6, r28		; r28 = the number of arguments left on the stack
-	ble	r28, 5$			; skip if none
-
-	sll	r28, 3, r0
-	addq	r0, stack_offset, r0	; account for the saved registers
-	addq	r0, sp, r0		; r0 -> argN
-loop:
-	ldq	r1, (r0)
-	lda	sp, -8(sp)
-	lda	r0, -8(r0)
-	subq	r28, 1, r28
-	stq	r1, (sp)
-	bgt	r28, loop
-
-5$:	$call	OP_XNEW, set_arg_info=false, nonstandard=true
-
-	mov	r2, sp			; restore the stack
-
-	getframe
-
-	ldq	r2, (sp)
-	ldq	r3, 8(sp)
-	lda	sp, stack_offset(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_zcont.m64 b/sr_avms/opp_zcont.m64
deleted file mode 100644
index 17b5c77..0000000
--- a/sr_avms/opp_zcont.m64
+++ /dev/null
@@ -1,26 +0,0 @@
-	.title	OPP_ZCONT
-
-	g_msf
-
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-	$routine OPP_ZCONT, entry=OPP_ZCONT_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_ZCONT, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/opp_zg1.m64 b/sr_avms/opp_zg1.m64
deleted file mode 100644
index 233132a..0000000
--- a/sr_avms/opp_zg1.m64
+++ /dev/null
@@ -1,34 +0,0 @@
-	.title	OPP_ZG1  "Wrapper for ZGOTO level no entryref"
-; ###############################################################
-; #								#
-; #	Copyright 2011 Fidelity Information Service, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; #	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	g_msf
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-	$routine OPP_ZG1, entry=OPP_ZG1_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_ZG1, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-	.end
diff --git a/sr_avms/opp_zgoto.m64 b/sr_avms/opp_zgoto.m64
deleted file mode 100644
index a6508d3..0000000
--- a/sr_avms/opp_zgoto.m64
+++ /dev/null
@@ -1,34 +0,0 @@
-	.title	OPP_ZGOTO  "Wrapper for ZGOTO level with entryref"
-; ###############################################################
-; #								#
-; #	Copyright 2011 Fidelity Information Service, Inc	#
-; #								#
-; #	This source code contains the intellectual property	#
-; #	of its copyright holder(s), and is made available	#
-; #	under a license.  If you do not know the terms of	#
-; #	the license, please stop and do not read further.	#
-; #								#
-; ###############################################################
-
-	g_msf
-
-	$linkage_section
-a_frame_pointer:
-	.address  frame_pointer
-
-	$routine OPP_ZGOTO, entry=OPP_ZGOTO_CA, kind=null
-	lda	sp, -8(sp)
-	stq	r3, (sp)
-	mov	r27, r3
-	.base	r3, $ls
-
-	putframe
-	$call	OP_ZGOTO, args=<r16>, set_arg_info=false, nonstandard=true
-	getframe
-
-	ldq	r3, (sp)
-	lda	sp, 8(sp)
-	ret	r26
-
-	$end_routine
-	.end
diff --git a/sr_avms/pdscdef.h b/sr_avms/pdscdef.h
deleted file mode 100644
index df105c3..0000000
--- a/sr_avms/pdscdef.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*	Alpha OpenVMS procedure descriptor values.  */
-
-/*	FLAGS field.  */
-#define	PDSC$K_KIND_BOUND		0
-#define	PDSC$K_KIND_NULL		8
-#define	PDSC$K_KIND_FP_STACK		9
-#define	PDSC$K_KIND_FP_REGISTER		10
-#define	PDSC$M_HANDLER_VALID		0x10
-#define	PDSC$M_HANDLER_REINVOKABLE	0x20
-#define	PDSC$M_HANDLER_DATA_VALID	0x40
-#define	PDSC$M_BASE_REG_IS_FP		0x80
-#define	PDSC$M_REI_RETURN		0x100
-#define	PDSC$M_STACK_RETURN_VALUE	0x200
-#define	PDSC$M_BASE_FRAME		0x400
-#define	PDSC$M_NATIVE			0x1000
-#define	PDSC$M_NO_JACKET		0x2000
-#define	PDSC$M_TIE_FRAME		0x4000
-
-#define	PDSC$M_FUNC_RETURN		0xF
-#define	PDSC$K_NULL_SIZE		16
-#define	PDSC$K_BOUND_SIZE		24
-#define	PDSC$K_MIN_BOUND_SIZE		24
-#define	PDSC$K_MIN_LENGTH_SF		32
-#define	PDSC$K_MIN_STACK_SIZE		32
-#define	PDSC$K_MAX_STACK_SIZE		48
-#define	PDSC$K_MIN_LENGTH_RF		24
-#define	PDSC$K_MIN_REGISTER_SIZE	24
-#define	PDSC$K_MAX_REGISTER_SIZE	40
-#define	PDSC$K_BOUND_ENVIRONMENT_SIZE	32
-#define	PDSC$W_FLAGS			0
-#define	PDSC$S_KIND			4
-
-/*	FLAGS field.  */
-#define	PDSC$V_KIND			0
-#define	PDSC$V_HANDLER_VALID		4
-#define	PDSC$V_HANDLER_REINVOKABLE	5
-#define	PDSC$V_HANDLER_DATA_VALID	6
-#define	PDSC$V_BASE_REG_IS_FP		7
-#define	PDSC$V_REI_RETURN		8
-#define	PDSC$V_STACK_RETURN_VALUE	9
-#define	PDSC$V_BASE_FRAME		10
-#define	PDSC$V_NATIVE			12
-#define	PDSC$V_NO_JACKET		13
-#define	PDSC$V_TIE_FRAME		14
-
-#define	PDSC$W_RSA_OFFSET		2
-#define	PDSC$B_SAVE_FP			2
-#define	PDSC$B_SAVE_RA			3
-#define	PDSC$B_ENTRY_RA			4
-#define	PDSC$S_FUNC_RETURN		4
-#define	PDSC$V_FUNC_RETURN		0
-#define	PDSC$W_SIGNATURE_OFFSET		6
-#define	PDSC$S_ENTRY			8
-#define	PDSC$Q_ENTRY			8
-#define	PDSC$L_ENTRY			8
-#define	PDSC$L_SIZE			16
-#define	PDSC$S_PROC_VALUE		8
-#define	PDSC$Q_PROC_VALUE		16
-#define	PDSC$L_PROC_VALUE		16
-#define	PDSC$S_KIND_SPECIFIC		24
-#define	PDSC$R_KIND_SPECIFIC		24
-#define	PDSC$L_IREG_MASK		24
-#define	PDSC$L_FREG_MASK		28
-#define	PDSC$S_STACK_HANDLER		8
-#define	PDSC$Q_STACK_HANDLER		32
-#define	PDSC$S_STACK_HANDLER_DATA	8
-#define	PDSC$Q_STACK_HANDLER_DATA	40
-#define	PDSC$S_REG_HANDLER		8
-#define	PDSC$Q_REG_HANDLER		24
-#define	PDSC$S_REG_HANDLER_DATA		8
-#define	PDSC$Q_REG_HANDLER_DATA		32
-#define	PDSC$L_ENVIRONMENT		24
-#define	PDSC$S_ENVIRONMENT		8
-#define	PDSC$Q_ENVIRONMENT		24
-#define	PDSC$K_LKP_LENGTH		16
-#define	PDSC$S_LKP_ENTRY		8
-#define	PDSC$Q_LKP_ENTRY		0
-#define	PDSC$PS_LKP_ENTRY		0
-#define	PDSC$S_LKP_PROC_VALUE		8
-#define	PDSC$Q_LKP_PROC_VALUE		8
-#define	PDSC$PS_LKP_PROC_VALUE		8
-#define	LKP$K_SIZE			16
-#define	LKP$S_ENTRY			8
-#define	LKP$Q_ENTRY			0
-#define	LKP$PS_ENTRY			0
-#define	LKP$S_PROC_VALUE		8
-#define	LKP$Q_PROC_VALUE		8
-#define	LKP$PS_PROC_VALUE		8
diff --git a/sr_avms/prober.mar b/sr_avms/prober.mar
deleted file mode 100644
index c4dfd4f..0000000
--- a/sr_avms/prober.mar
+++ /dev/null
@@ -1,18 +0,0 @@
-	.title prober
-	; returns 1 if address is accessible
-
-VAX	=	1
-	code_psect
-
-	.entry prober,^m<>
-;	movq 	4(ap),r0
-	movl	4(ap),r0
-	movl	8(ap),r1
-	prober	#0,r0,(r1)
-	beql	10$
-	movl	#1,r0
-	ret
-
-10$:	clrl	r0
-	ret
-	.end
diff --git a/sr_avms/probew.mar b/sr_avms/probew.mar
deleted file mode 100644
index 62bf4c8..0000000
--- a/sr_avms/probew.mar
+++ /dev/null
@@ -1,19 +0,0 @@
-	.title probew
-	; returns 1 if address is accessible
-
-VAX	=	1
-
-	code_psect
-
-	.entry probew,^m<>
-;	movq 	4(ap),r0
-	movl 	4(ap),r0
-	movl 	8(ap),r1
-	probew	#0,r0,(r1)
-	beql	10$
-	movl	#1,r0
-	ret
-
-10$:	clrl	r0
-	ret
-	.end
diff --git a/sr_avms/proc_desc.h b/sr_avms/proc_desc.h
deleted file mode 100644
index e4b5b0c..0000000
--- a/sr_avms/proc_desc.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* proc_desc - Alpha OpenVMS procedure descriptor information.  */
-
-typedef	struct
-{
-	short	flags;
-	short	rsa_offset;
-	short	reserved_1;
-	short	signature_offset;
-	int4	*code_address;
-	int4	must_be_zero_1;		/* actually, rest of code_address, but DEC C only implements 32-bit pointers */
-	int4	size;
-} proc_desc;
-
-#define PDSC_FLAGS	((PDSC$K_KIND_FP_STACK << PDSC$V_KIND) \
-				| PDSC$M_BASE_REG_IS_FP | PDSC$M_NATIVE | PDSC$M_NO_JACKET | PDSC$M_HANDLER_VALID)
diff --git a/sr_avms/procdesc.max b/sr_avms/procdesc.max
deleted file mode 100644
index e30c2f9..0000000
--- a/sr_avms/procdesc.max
+++ /dev/null
@@ -1,6 +0,0 @@
-	.macro	PROCDESC
-
-GTM_PD_FLAGS	=	^X00183099	; these bits are set in create_object_file (in obj_file.c) in the beginning
-					; of the procedure descriptor for all GT.M MUMPS object modules
-
-	.endm
diff --git a/sr_avms/putframe.max b/sr_avms/putframe.max
deleted file mode 100644
index 41bce4f..0000000
--- a/sr_avms/putframe.max
+++ /dev/null
@@ -1,15 +0,0 @@
-;	Save registers into current GT.M MUMPS stack frame
-;	Note: this macro requires a scratch register; you may specify one or it will default to r0.
-
-	.macro	putframe	reg=r0
-
-	; A_frame_pointer must be address of quadword containing the address of frame_pointer
-	ldq	reg, A_frame_pointer
-	ldl	reg, (reg)
-	stl	r8,  msf$l_symtab_off(reg)
-	stl	r9,  msf$temps_ptr_off(reg)
-	stl	r13, msf$ctxt_off(reg)
-	stl	r14, msf$literal_ptr_off(reg)
-	stl	r26, msf$mpc_off(reg)
-
-	.endm
diff --git a/sr_avms/release_name.h b/sr_avms/release_name.h
deleted file mode 100644
index 293a521..0000000
--- a/sr_avms/release_name.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define GTM_RELEASE_NAME	"GT.M V6.2-001 VMS AXP"
-#define GTM_PRODUCT		"GT.M"
-#define GTM_VERSION		"V6.2"
diff --git a/sr_avms/rundown_dispatch.m64 b/sr_avms/rundown_dispatch.m64
deleted file mode 100644
index 174a790..0000000
--- a/sr_avms/rundown_dispatch.m64
+++ /dev/null
@@ -1,12 +0,0 @@
-	.title	RUNDOWN_DISPATCH
-
-	$routine RUNDOWN_DISPATCH, kind=stack
-	.base	r27, $ls
-
-	$call	USER_RUNDOWN
-
-	$return
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/secshrlink.axp b/sr_avms/secshrlink.axp
deleted file mode 100644
index 307b4b8..0000000
--- a/sr_avms/secshrlink.axp
+++ /dev/null
@@ -1,32 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001, 2010 Fidelity Information Services, Inc	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-protect=yes
-obd/inc=(gtmsecplv,crit_wake,del_sec,init_sec,gtm_enq,gtm_enqw,gtm_deq,gtm_blkast)
-obd/inc=(get_proc_info,init_secshr_addrs,gtm_getlkiw,secshr_db_clnup)
-obd/inc=(adawi,bci,gtm_memmove,mutex_stoprel,probe,prober,probew,relqueop,rundown_dispatch)
-obd/inc=(sec_shr_blk_build,sec_shr_map_build,aswp_secshr,compswap_secshr,is_proc_alive)
-urd
-gsmatch=lequal,13,0
-symbol_vector=( -
-	crit_wake	= PROCEDURE, -
-	del_sec		= PROCEDURE, -
-	init_sec	= PROCEDURE, -
-	gtm_enq		= PROCEDURE, -
-	gtm_enqw	= PROCEDURE, -
-	gtm_deq		= PROCEDURE, -
-	gtm_blkast	= PROCEDURE, -
-	get_proc_info	= PROCEDURE, -
-	init_secshr_addrs	= PROCEDURE, -
-	gtm_getlkiw	= PROCEDURE, -
-	secshr_db_clnup	= PROCEDURE, -
-	probe		= PROCEDURE -
-	)
diff --git a/sr_avms/zc_call.m64 b/sr_avms/zc_call.m64
deleted file mode 100644
index cac7c06..0000000
--- a/sr_avms/zc_call.m64
+++ /dev/null
@@ -1,363 +0,0 @@
-; ****************************************************************
-; *								 *
-; *      Copyright 2001, 2012 Fidelity Information Services, Inc *
-; *      This source code contains the intellectual property     *
-; *      of its copyright holder(s), and is made available       *
-; *      under a license.  If you do not know the terms of       *
-; *      the license, please stop and do not read further.       *
-; *                                                              *
-; ****************************************************************
-
-	.title	ZC_CALL
-
-; Call interface:
-;
-;	int zc_call (zcrtn, zcret, lcllist, lcllistend, save_ret);
-;	zctabrtn	*zcrtn;
-;	zctabret	*zcret;
-;	lclarg		*lcllist, *lcllistend;
-;	int		*save_ret;
-;
-; On entry, lcllist points to a list of local arguments, and lcllistend
-; points to the byte just after the last argument in the list.  ZC_CALL
-; passes these arguments to the routine pointed to by zcrtn, and processes
-; the return value as specified by zcret and save_ret.
-
-; The following definitions must reflect the structure layouts in ZCALL.H:
-
-; ZCALL Table routine offsets (correspond to type zctabrtn):
-	rtn_entrypoint	= 4
-
-; ZCALL Table return offsets (correspond to type zctabret):
-	ret_class	= 0
-	ret_type	= 1
-
-; ZCALL Table argument offsets (correspond to types zctabinput and zctaboutput):
-	arg_mechanism	= 0
-	arg_type	= 1
-	arg_qualifier	= 3
-
-
-; Local argument offsets;  these definitions reflect the structure layout of
-; type lclarg, which is defined in DO_ZCALL.C:
-	lcl_skip	= 0
-	lcl_zctab	= 4
-	lcl_dsc		= 8
-
-	lcl_size	= 48
-
-
-	zcdef
-	macro64$callstd_defs
-
-
-	$linkage_section
-
-a_zcch:
-	.address ZCCH
-
-L_ERR_ZCSTATUS:
-	.long	ERR_ZCSTATUS
-
-L_ERR_GTMCHECK:
-	.long	ERR_GTMCHECK
-
-
-	$code_section
-
-	$routine ZC_CALL, entry=ZC_CALL_CA, kind=stack, saved_regs=<r2,r3,r13,fp>, -
-		handler=GTM$DYN_CH, rsa_offset=16
-	stq	r31, 8(fp)
-	mov	r27, r13
-	.base	r13, $ls
-
-
-; Process the local arguments in reverse order;
-;	r18 = lcllist
-;	r19 = lcllistend
-
-	clr	r0			; r0 will count the arguments
-	clr	r25			; r25 will accumulate argument information
-
-loop:
-	subq	r19, lcl_size, r19
-	cmple	r18, r19, r24
-	blbc	r24, setup_call
-
-	ldl	r1, lcl_zctab(r19)	; lclarg.zctab, ZCALL Table argument
-
-;	Skip this argument?
-	ldl	r26, lcl_skip(r19)	; lclarg.skip
-	blbc	r26, 10$
-
-;	Yes;  is this argument optional?
-	ldq_u	r24, arg_qualifier(r1)
-	lda	r23, arg_qualifier(r1)
-	extbl	r24, r23, r24
-	cmpeq	r24, zc$iqual_optional, r24
-	blbs	r24, loop		; yes; skip it
-
-10$:	addq	r0, 1, r0		; bump the argument count
-	lda	sp, -8(sp)		; allocate space for the argument
-
-;	Shift any previous argument information up one slot:
-	sll	r25, macro64$ai_reg_info1_length, r25
-
-	ldq_u	r24, arg_mechanism(r1)
-	lda	r23, arg_mechanism(r1)
-	extbl	r24, r23, r24
-
-	lda	r22, lcl_dsc(r19)	; lclarg.dsc
-
-	cmpeq	r24, zc$mech_descriptor, r23
-	blbs	r23, by_descriptor
-
-	cmpeq	r24, zc$mech_descriptor64, r23
-	blbs	r23, by_descriptor
-
-	ldl	r22, dsc$a_pointer(r22)
-
-	cmpeq	r24, zc$mech_reference, r23
-	blbs	r23, by_reference
-
-	cmpeq	r24, zc$mech_value, r23
-	blbc	r23, assertfail
-
-; Argument is to be passed by value:
-	ldq_u	r24, arg_type(r1)
-	lda	r23, arg_type(r1)
-	extbl	r24, r23, r24		; r24 = data type
-
-	cmpeq	r24, zc$dtype_long, r23
-	blbs	r23, long
-
-	cmpeq	r24, zc$dtype_word, r23
-	blbs	r23, word
-
-	cmpeq	r24, zc$dtype_byte, r23
-	blbs	r23, byte
-
-	cmpeq	r24, zc$dtype_longu, r23
-	blbs	r23, longu
-
-	cmpeq	r24, zc$dtype_wordu, r23
-	blbs	r23, wordu
-
-	cmpeq	r24, zc$dtype_byteu, r23
-	blbs	r23, byteu
-
-	cmpeq	r24, zc$dtype_quad, r23
-	blbs	r23, quad
-
-	cmpeq	r24, zc$dtype_floating, r23
-	blbs	r23, float
-
-	cmpeq	r24, zc$dtype_double, r23
-	blbs	r23, double
-
-	cmpeq	r24, zc$dtype_g_floating, r23
-	blbc	r23, assertfail
-
-double:
-	mov	macro64$ar_fg, r28
-	ldg	f0, (r22)		; D_ or G_floating - fall into float_common
-
-float_common:
-	stg	f0, (sp)
-	sll	r28, macro64$ai_reg_info1_start, r28
-	or	r25, r28, r25
-	br	loop
-
-float:	ldf	f0, (r22)
-	mov	macro64$ar_ff, r28
-	br	float_common
-
-byte:	ldq_u	r28, (r22)
-	lda	r23, 1(r22)
-	extqh	r28, r23, r28
-	sra	r28, 56, r28
-	stq	r28, (sp)
-	br	loop
-
-byteu:	ldq_u	r28, (r22)
-	extbl	r28, r22, r28
-	stq	r28, (sp)
-	br	loop
-
-word:	ldq_u	r28, (r22)
-	ldq_u	r27, 1(r22)
-	extwl	r28, r22, r28
-	extwh	r27, r22, r27
-	or	r27, r28, r28
-	sll	r28, 48, r28
-	sra	r28, 48, r28
-	stq	r28, (sp)
-	br	loop
-
-wordu:	ldq_u	r28, (r22)
-	ldq_u	r27, 1(r22)
-	extwl	r28, r22, r28
-	extwh	r27, r22, r27
-	or	r27, r28, r28
-	stq	r28, (sp)
-	br	loop
-
-long:	ldq_u	r28, (r22)
-	ldq_u	r27, 3(r22)
-	extll	r28, r22, r28
-	extlh	r27, r22, r27
-	or	r27, r28, r28
-	sll	r28, 32, r28
-	sra	r28, 32, r28
-	stq	r28, (sp)
-	br	loop
-
-longu:	ldq_u	r28, (r22)
-	ldq_u	r27, 3(r22)
-	extll	r28, r22, r28
-	extlh	r27, r22, r27
-	or	r27, r28, r28
-	stq	r28, (sp)
-	br	loop
-
-quad:	ldq_u	r28, (r22)
-	ldq_u	r27, 7(r22)
-	extql	r28, r22, r28
-	extqh	r27, r22, r27
-	or	r27, r28, r28
-	stq	r28, (sp)
-	br	loop
-
-
-; Argument is to be passed by descriptor or by reference:
-by_descriptor:
-	cmovlbs	r26, 0, r22		; if this arg is to be skipped, zero out r22
-
-by_reference:
-	stq	r22, (sp)		; stack address of argument
-	br	loop
-
-
-; All of the arguments have been processed;  set up the ZCALL:
-
-setup_call:
-	addq	r19, lcl_size, r19	; assert (r19 + lcl_size == lcllist);
-	cmpeq	r19, r18, r24
-	blbc	r24, assertfail
-
-	mov	r17, r2			; save zcret
-	mov	r20, r3			; save save_ret
-
-	ldl	r27, rtn_entrypoint(r16); r27 = zcrtn->entrypoint = address of procedure descriptor
-	ldq	r26, 8(r27)		; r26 = address of entry point
-
-;	Set up the Argument Information register, r25;
-;	bits <63:26> must be zero, and the argument count goes in the low order byte:
-	sll	r25, 38, r25
-	srl	r25, 38, r25
-	or	r25, r0, r25
-
-; At this point, all of the arguments are on the stack.  Even though there
-; may be fewer than six of them, it's a lot faster and easier to load all six
-; integer argument registers and all six floating point argument registers
-; than it would be to figure out how many to load, and into which registers.
-; If there are actually fewer than six arguments, then the values loaded into
-; some of these registers will be irrelevant.  This is not a big deal.
-
-	ldq	r16,   (sp)
-	ldq	r17,  8(sp)
-	ldq	r18, 16(sp)
-	ldq	r19, 24(sp)
-	ldq	r20, 32(sp)
-	ldq	r21, 40(sp)
-
-	ldg	f16,   (sp)
-	ldg	f17,  8(sp)
-	ldg	f18, 16(sp)
-	ldg	f19, 24(sp)
-	ldg	f20, 32(sp)
-	ldg	f21, 40(sp)
-
-; The stack pointer must also be adjusted to reflect that these arguments have
-; been "popped" off the stack.  Only the actual number of arguments (up to six)
-; will be popped.  This leaves the seventh and successive arguments on the stack
-; (if any).
-
-	mov	6, r22
-	cmplt	r0, r22, r24
-	cmovlbs	r24, r0, r22		; r22 = min(6,r0) = number of arguments popped
-	s8addq	r22, sp, sp
-
-
-	ldq	r28, a_zcch
-	stq	r28, 8(fp)		; establish ZCALL condition handler
-
-	jsr	r26, r26		; ZCALL
-
-	stq	r31, 8(fp)		; remove ZCALL condition handler
-
-;	Check the return class:
-	ldq_u	r28, ret_class(r2)
-	lda	r27, ret_class(r2)
-	extbl	r28, r27, r28		; r28 = zcret->class
-
-	cmpeq	r28, zc$retc_status, r23
-	blbs	r23, check_status
-
-	cmpeq	r28, zc$retc_value, r23
-	blbc	r23, return
-
-;	Return class = value;  check the data type:
-	ldq_u	r24, ret_type(r2)
-	lda	r27, ret_type(r2)
-	extbl	r24, r27, r24		; r24 = zcret->type
-
-	cmpeq	r24, zc$dtype_long, r23
-	blbs	r23, quad_ret
-
-	cmpeq	r24, zc$dtype_longu, r23
-	blbs	r23, quad_ret
-
-	cmpeq	r24, zc$dtype_quad, r23
-	blbs	r23, quad_ret
-
-	cmpeq	r24, zc$dtype_floating, r23
-	blbs	r23, float_ret
-
-	cmpeq	r24, zc$dtype_double, r23
-	blbs	r23, double_ret
-
-	cmpeq	r24, zc$dtype_g_floating, r23
-	blbc	r23, assertfail
-
-double_ret:
-	stg	f0, (r3)
-	br	return
-
-float_ret:
-	stf	f0, (r3)
-	br	return
-
-quad_ret:
-	stq	r0, (r3)
-
-
-return:
-	$return
-
-
-check_status:
-	stl	r0, (r3)
-	blbs	r0, return
-	mov	r0, r18
-	$call	LIB$SIGNAL, args=<L_ERR_ZCSTATUS/L, 0/a, r18, 0/a>, nonstandard=true
-	br	return
-
-
-assertfail:
-	$call	LIB$SIGNAL, args=L_ERR_GTMCHECK/L, nonstandard=true
-	br	return
-
-	$end_routine
-
-	.end
diff --git a/sr_avms/zc_makespace.m64 b/sr_avms/zc_makespace.m64
deleted file mode 100644
index 672753a..0000000
--- a/sr_avms/zc_makespace.m64
+++ /dev/null
@@ -1,55 +0,0 @@
-; ****************************************************************
-; *								 *
-; *      Copyright 2001, 2004 Sanchez Computer Associates, Inc.   *
-; *      This source code contains the intellectual property     *
-; *      of its copyright holder(s), and is made available       *
-; *      under a license.  If you do not know the terms of       *
-; *      the license, please stop and do not read further.       *
-; *                                                              *
-; ****************************************************************
-
-	.title	ZC_MAKESPACE
-
-;
-; Call interface:
-;
-;	void zc_makespace (dst, mask, mvallist, mvallistend, zcrtn, n_tabargs)
-;	mval		*dst, **mvallist, **mvallistend;
-;	long		mask;
-;	zctabrtn	*zcrtn;
-;	unsigned	n_tabargs;
-;
-; ZC_MAKESPACE calls DO_ZCALL as follows:
-;
-;	do_zcall (dst, mask, mvallist, mvallistend, zcrtn, lcllist, lcllistend);
-;
-; where:
-;
-;	dst ... zcrtn	are simply passed on unchanged;
-;	lcllist		is the address of the first element of an array of
-;			struct lclarg_type [see DO_ZCALL.C for definition]; and
-;	lcllistend	is the address of the next byte after the last element
-;			in the array pointed to by lcllist.
-;
-; Since lcllistend is the seventh argument, it must be passed on the stack.
-; The array is also allocated on the stack;  the number of elements is specified
-; by the input parameter n_tabargs, and the size of each element is 48 bytes.
-; See DO_ZCALL.C for details.
-;
-
-	$routine ZC_MAKESPACE, entry=ZC_MAKESPACE_CA, kind=stack
-	.base	r27, $ls
-
-;	On entry, r21 = n_tabargs
-	mulq	r21, 48, r21	; r21 = n_tabargs * 48
-	subq	sp, r21, sp
-	mov	sp, r21		; r21 = lcllist
-
-;	lcllistend = fp [= original sp]
-	$call	DO_ZCALL, args=<r16,r17,r18,r19,r20,r21,fp>
-
-	$return
-
-	$end_routine
-
-	.end
diff --git a/sr_cmi/cmi_close.c b/sr_cmi/cmi_close.c
deleted file mode 100644
index 64381c2..0000000
--- a/sr_cmi/cmi_close.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <iodef.h>
-#include <efndef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-#include "efn.h"
-
-#define TIMER_FLAGS 0
-
-GBLREF struct NTD *ntd_root;
-
-uint4 cmi_close(struct CLB *lnk)
-{
-	uint4  efn_mask, status;
-	static readonly int4	delta_1_sec[2] = { -10000000, -1 };
-	struct CLB *previous;
-        qio_iosb iosb;
-
-	lnk->sta = CM_CLB_DISCONNECT;
-	previous = RELQUE2PTR(lnk->cqe.fl);
-	remqti(previous);
-        efn_mask = (0x1 << efn_cmi_immed_wait | 0x1 << efn_2timer);
-
-	/* DECnet OSI does not currently time out if the channel is gone, so protect it with our own timer */
-        status = sys$setimr(efn_2timer, &delta_1_sec, 0, lnk, TIMER_FLAGS);
-	if (status & 1)
-	{
-		/* If we can't get the timer (which we believe should be exceedingly rare), just blow it away to prevent a hang */
-
-		/* First, request a disconnect (also transmits all pending messages before disconnecting).  */
-                status = SYS$QIO(efn_cmi_immed_wait, lnk->dch, IO$_DEACCESS | IO$M_SYNCH, &iosb, 0, 0, 0, 0, 0, 0, 0, 0);
-		/* Ignore previous status return because we're going to deassign the link regardless.  */
-
-                status = sys$wflor(efn_2timer, efn_mask);
-		/* Unless in test, ignore previous status return because we're going to deassign the link regardless.  */
-                assert(status & 1);
-	}else
-		assert(0);	/* In testing trap the timer failure */
-
-        sys$cantim(lnk, 0);     /* in case still running */
-	/* abort the link in case the timer went off */
-        status = SYS$QIOW(EFN$C_ENF, lnk->dch, IO$_DEACCESS | IO$M_ABORT, &iosb, 0, 0, 0, 0, 0, 0, 0, 0);
-	/* Ignore previous status return because we're going to deassign the link regardless.  */
-	status = SYS$CANCEL(lnk->dch);
-	/* Ignore previous status for same reason.  */
-
-	status = SYS$DASSGN(lnk->dch);
-	if ((status & 1) == 0)
-		return status;
-
-	lib$free_vm(&SIZEOF(*lnk), &lnk, 0);
-	return status;
-}
diff --git a/sr_cmi/cmi_init.c b/sr_cmi/cmi_init.c
deleted file mode 100644
index 274cdff..0000000
--- a/sr_cmi/cmi_init.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <descrip.h>
-#include <iodef.h>
-#include <efndef.h>
-#ifdef __Alpha_AXP
-#include nfbdef
-#else
-#include <nfbdef.h>
-#endif
-#include "cmihdr.h"
-#include "cmidef.h"
-
-GBLREF struct NTD *ntd_root;
-
-uint4 cmi_init(cmi_descriptor *tnd, unsigned char tnr, void (*err)(), void (*crq)(), bool (*acc)())
-{
-	uint4 status;
-
-#ifdef __Alpha_AXP
-# pragma member_alignment save
-# pragma nomember_alignment
-#endif
-
-	struct
-	{
-		unsigned char operation;
-		int4 object_number;
-	} nfb;
-
-#ifdef __Alpha_AXP
-# pragma member_alignment restore
-#endif
-
-	struct dsc$descriptor_s nfb_desc;
-	qio_iosb iosb;
-	error_def(CMI_CMICHECK);
-
-	status = cmj_netinit();
-	if ((status & 1) == 0)
-		return status;
-	nfb_desc.dsc$w_length = SIZEOF(nfb);
-	nfb_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	nfb_desc.dsc$b_class = DSC$K_CLASS_S;
-	nfb_desc.dsc$a_pointer = &nfb;
-	if (tnr != 0)
-	{
-		nfb.operation = NFB$C_DECLOBJ;
-		nfb.object_number = tnr;
-		if (0 != tnd)
-			return CMI_CMICHECK;
-	} else
-	{
-		if (0 == tnd)
-			return CMI_CMICHECK;
-		nfb.operation = NFB$C_DECLNAME;
-		nfb.object_number = 0;
-	}
-        status = sys$qiow(EFN$C_ENF, ntd_root->dch, IO$_ACPCONTROL, &iosb, 0, 0, &nfb_desc, tnd, 0, 0, 0, 0);
-	if (status & 1)
-		status = iosb.status;
-	if ((status & 1) == 0)
-		return status;
-	ntd_root->err = err;
-	ntd_root->crq = crq;
-	ntd_root->acc = acc;
-	status = cmj_mbx_read_start(ntd_root);
-	return status;
-}
diff --git a/sr_cmi/cmi_open.c b/sr_cmi/cmi_open.c
deleted file mode 100644
index b1f19c4..0000000
--- a/sr_cmi/cmi_open.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <descrip.h>
-#include <iodef.h>
-#include <efndef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-
-GBLREF struct NTD *ntd_root;
-GBLREF struct dsc$descriptor_s cm_netname;
-
-#define TASK_PREFIX "::\"0="
-#define TASK_SUFFIX "\""
-#define MAX_NCB_LENGTH 128
-
-uint4 cmi_open(struct CLB *lnk)
-{
-	uint4 status;
-	struct dsc$descriptor_s ncb;
-	qio_iosb iosb;
-	unsigned char *cp;
-	unsigned char ncb_buffer[MAX_NCB_LENGTH];
-
-	if (ntd_root == 0)
-	{
-		status = cmj_netinit();
-		if ((status & 1) == 0)
-			return status;
-	}
-	ncb.dsc$w_length = lnk->nod.dsc$w_length + lnk->tnd.dsc$w_length + SIZEOF(TASK_PREFIX) - 1 + SIZEOF(TASK_SUFFIX) - 1;
-	ncb.dsc$b_dtype = DSC$K_DTYPE_T;
-	ncb.dsc$b_class = DSC$K_CLASS_S;
-	ncb.dsc$a_pointer = cp = ncb_buffer;
-	assert(ncb.dsc$w_length < SIZEOF(ncb_buffer));
-	memcpy(cp, lnk->nod.dsc$a_pointer, lnk->nod.dsc$w_length);
-	cp += lnk->nod.dsc$w_length;
-	memcpy(cp, TASK_PREFIX, SIZEOF(TASK_PREFIX) - 1);
-	cp += SIZEOF(TASK_PREFIX) - 1;
-	memcpy(cp, lnk->tnd.dsc$a_pointer, lnk->tnd.dsc$w_length);
-	cp += lnk->tnd.dsc$w_length;
-	memcpy(cp, TASK_SUFFIX, SIZEOF(TASK_SUFFIX) - 1);
-	status = sys$assign(&cm_netname, &lnk->dch, 0, 0);
-	if (status & 1)
-	{
-                status = sys$qiow(EFN$C_ENF, lnk->dch, IO$_ACCESS, &iosb, 0, 0, 0, &ncb, 0, 0, 0, 0);
-		if (status & 1)
-			status = iosb.status;
-		if (status & 1)
-		{	insqhi(lnk, ntd_root);
-		}else
-		{	sys$dassgn(lnk->dch);
-		}
-	}
-	return status;
-}
diff --git a/sr_cmi/cmi_read.c b/sr_cmi/cmi_read.c
deleted file mode 100644
index fd63927..0000000
--- a/sr_cmi/cmi_read.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <iodef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-
-uint4 cmi_read(lnk)
-struct CLB *lnk;
-{
-	lnk->cbl = lnk->mbl;
-	return cmj_iostart(lnk,IO$_READVBLK, CM_CLB_READ);
-}
diff --git a/sr_cmi/cmi_write.c b/sr_cmi/cmi_write.c
deleted file mode 100644
index 0210a17..0000000
--- a/sr_cmi/cmi_write.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <iodef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-
-uint4 cmi_write(lnk)
-struct CLB *lnk;
-{
-	return cmj_iostart(lnk, IO$_WRITEVBLK, CM_CLB_WRITE);
-}
diff --git a/sr_cmi/cmi_write_int.c b/sr_cmi/cmi_write_int.c
deleted file mode 100644
index 6262446..0000000
--- a/sr_cmi/cmi_write_int.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <iodef.h>
-#include <efndef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-
-uint4 cmi_write_int(struct CLB *lnk)
-{
-	int4 status;
-        qio_iosb  iosb;
-
-        /* Note:  there is an outstanding read so use unique efn and iosb */
-        status = sys$qiow(EFN$C_ENF, lnk->dch, IO$_WRITEVBLK | IO$M_INTERRUPT,
-                &iosb, 0, 0, lnk->mbf, lnk->cbl, 0, 0, 0, 0);
-	if (status & 1)
-                status = iosb.status;
-	return status;
-}
diff --git a/sr_cmi/cmierrors.msg b/sr_cmi/cmierrors.msg
deleted file mode 100644
index f4cd78d..0000000
--- a/sr_cmi/cmierrors.msg
+++ /dev/null
@@ -1,20 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001, 2009 Fidelity Information Services, Inc	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-	.FACILITY	CMI,250/PREFIX=CMI_
-	.TITLE	CMIERRORS Error Messages for CMI..GT.CM
-
-DCNINPROG	<Attempt to initiate operation while disconnect was in progress>/fatal/fao=0
-LNKNOTIDLE	<Attempt to initiate operation before previous operation completed>/fatal/fao=0
-ASSERT		<Assert failed !AD line !UL>/error/fao=3
-CMICHECK	<Internal CMI error. Report to your GT.M Support Channel.>/fatal/fao=0
-NETFAIL		<Failure of Net operation>/error/fao=0
-
-	.end
diff --git a/sr_cmi/cmihdr.h b/sr_cmi/cmihdr.h
deleted file mode 100644
index 2b05134..0000000
--- a/sr_cmi/cmihdr.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "gtm_sizeof.h"
-
-#define rts_error lib$signal
-#define error_def(x) globalvalue x
-#ifdef DEBUG
-error_def(CMI_ASSERT);
-#define assert(x) ((x) ? 1 : rts_error(CMI_ASSERT, 3, SIZEOF(__FILE__) - 1, __FILE__, __LINE__))
-#else
-#define assert(x)
-#endif
-#define GBLDEF globaldef
-#define GBLREF globalref
-#define LITDEF readonly globaldef
-#define LITREF readonly globalref
-typedef char bool;
-#define ALIGN_QUAD _align(quadword)
-#define TRUE 1
-#define FALSE 0
-
diff --git a/sr_cmi/cmivector.mar b/sr_cmi/cmivector.mar
deleted file mode 100644
index 596f9f1..0000000
--- a/sr_cmi/cmivector.mar
+++ /dev/null
@@ -1,23 +0,0 @@
-	.title	cmivector - transfer vectors for shared images
-	.psect	cmivector,page,con,exe,pic,nowrt,shr,gbl
-
-cmivector_size = 16	;total of 16 transfer vectors
-
-	.macro	xfer	a
-	.transfer	a
-	.mask	a
-	jmp	l^a+2
-	.endm
-
-cmivector::
-	xfer	cmi_close
-	xfer	cmi_init
-	xfer	cmi_open
-	xfer	cmi_read
-	xfer	cmi_write
-	xfer	cmi_write_int
-	xfer	cmu_makclb
-	xfer	cmu_getclb
-	xfer	cmu_ntdroot
-	.blkq	cmivector_size - <<. - cmivector> / 8>
-	.end
diff --git a/sr_cmi/cmj_ast.c b/sr_cmi/cmj_ast.c
deleted file mode 100644
index 10623cb..0000000
--- a/sr_cmi/cmj_ast.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-void cmj_ast(lnk)
-struct CLB *lnk;
-{
-	uint4 status;
-	error_def(CMI_DCNINPROG);
-	error_def(CMI_LNKNOTIDLE);
-
-	cmj_fini(lnk);
-	if (lnk->ast != 0)
-		(*lnk->ast)(lnk);
-	return;
-}
diff --git a/sr_cmi/cmj_disconn2.c b/sr_cmi/cmj_disconn2.c
deleted file mode 100644
index 50843ad..0000000
--- a/sr_cmi/cmj_disconn2.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-void cmj_disconn2(lnk)
-struct CLB *lnk;
-{
-	int status;
-	error_def(CMI_NETFAIL);
-
-/* Ignore iosb of previous qio because we're going to deassign the link regardless.  */
-
-	status = SYS$DASSGN(lnk->dch);
-	lib$free_vm(&SIZEOF(*lnk), &lnk, 0);
-	if ((status & 1) == 0)
-		rts_error(CMI_NETFAIL,0,status);
-	return;
-}
diff --git a/sr_cmi/cmj_fini.c b/sr_cmi/cmj_fini.c
deleted file mode 100644
index 074d357..0000000
--- a/sr_cmi/cmj_fini.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-void cmj_fini(lnk)
-struct CLB *lnk;
-{
-	switch (lnk->sta)
-	{
-	case CM_CLB_READ:
-		lnk->cbl = lnk->ios.xfer_count;
-		break;
-	case CM_CLB_WRITE:
-		break;
-	case CM_CLB_IDLE:
-		assert(FALSE);
-		break;
-	case CM_CLB_DISCONNECT:
-		return;
-	}
-	lnk->sta = CM_CLB_IDLE;
-	return;
-}
diff --git a/sr_cmi/cmj_iostart.c b/sr_cmi/cmj_iostart.c
deleted file mode 100644
index 65ab55a..0000000
--- a/sr_cmi/cmj_iostart.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <iodef.h>
-#include <efndef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-#include "efn.h"
-
-uint4 cmj_iostart(struct CLB *lnk, uint4 operation, unsigned int state)
-{
-	uint4 status;
-	error_def(CMI_DCNINPROG);
-	error_def(CMI_LNKNOTIDLE);
-	void cmj_ast();
-
-	if (lnk->sta != CM_CLB_IDLE)
-		return (lnk->sta == CM_CLB_DISCONNECT) ? CMI_DCNINPROG : CMI_LNKNOTIDLE;
-        lnk->sta = (unsigned char)state;
-	if (lnk->ast)
-	{
-                status = sys$qio(EFN$C_ENF, lnk->dch, operation,
-			&lnk->ios, cmj_ast, lnk,
-			lnk->mbf, lnk->cbl, 0, 0, 0, 0);
-	} else
-	{
-                status = sys$qio(EFN$C_ENF, lnk->dch, operation,
-			&lnk->ios, 0, 0, lnk->mbf, lnk->cbl, 0, 0, 0, 0);
-		if (1 & status)
-		{
-			status = sys$synch(EFN$C_ENF, &lnk->ios);
-			cmj_fini(lnk);
-			if (1 & status)
-				status = lnk->ios.status;
-		}
-	}
-	return status;
-}
diff --git a/sr_cmi/cmj_mbx_ast.c b/sr_cmi/cmj_mbx_ast.c
deleted file mode 100644
index 160470e..0000000
--- a/sr_cmi/cmj_mbx_ast.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <descrip.h>
-#include <dvidef.h>
-#include <iodef.h>
-#include <msgdef.h>
-#include <ssdef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-#include "efn.h"
-
-GBLREF struct dsc$descriptor_s cm_netname;
-error_def(CMI_NETFAIL);
-static void cmj_accept_ast(), cmj_reject_ast(), cmj_mbx_err();
-
-void cmj_mbx_ast(struct NTD *tsk)
-{
-	struct CLB *cmu_makclb();
-	struct dsc$descriptor_s ncb_desc;
-	uint4 status, unit;
-	cm_mbx *mp;
-	struct CLB *lnk;
-	bool newclb;
-	void cmj_ast();
-
-	status = 0;
-	mp = tsk->mbx.dsc$a_pointer;
-	assert(mp->netnum == 3 && mp->netnam[0] == 'N' && mp->netnam[1] == 'E' && mp->netnam[2] == 'T');
-	switch(mp->msg)
-	{
-	case MSG$_CONNECT:
-		lnk = cmj_unit2clb(tsk, mp->unit);
-		if (lnk == 0)
-		{
-			newclb = TRUE;
-			lnk = cmu_makclb();
-			lnk->dch = tsk->dch;
-			lnk->ntd = tsk;
-		}else
-		{
-			newclb = FALSE;
-			assert(lnk->sta == CM_CLB_IDLE);
-		}
-		ncb_desc.dsc$w_length = mp->len;
-		ncb_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-		ncb_desc.dsc$b_class = DSC$K_CLASS_S;
-		ncb_desc.dsc$a_pointer = mp->text;
-		lnk->mbf = 0;
-	/* the statement below and the 3 qio's emulate cmj_iostart which could be used if lnk->clb were a int4 */
-		lnk->sta = CM_CLB_WRITE;
-		if (tsk->crq == 0)
-		{
-			lnk->ast = cmj_reject_ast;
-                        status = sys$qio(efn_ignore, lnk->dch, IO$_ACCESS | IO$M_ABORT,
-				&lnk->ios, cmj_ast, lnk,
-				lnk->mbf, &ncb_desc, 0, 0, 0, 0);
-		} else
-		{	if (tsk->acc && !(*tsk->acc)(lnk))
-			{
-				lnk->ast = cmj_reject_ast;
-                                status = sys$qio(efn_ignore, lnk->dch, IO$_ACCESS | IO$M_ABORT,
-					&lnk->ios, cmj_ast, lnk,
-					lnk->mbf, &ncb_desc, 0, 0, 0, 0);
-			}else
-			{
-				status = sys$assign(&cm_netname, &lnk->dch, 0, &tsk->mnm);
-				if (status & 1)
-				{
-					status = lib$getdvi(&DVI$_UNIT, &lnk->dch, 0, &unit, 0, 0);
-					if (status & 1)
-					{
-						lnk->mun = (unsigned short)unit;
-						lnk->ast = cmj_accept_ast;
-                                                status = sys$qio(efn_ignore, lnk->dch, IO$_ACCESS,
-							&lnk->ios, cmj_ast, lnk,
-							lnk->mbf, &ncb_desc, 0, 0, 0, 0);
-					}
-				}
-			}
-		}
-		if ((status & 1) == 0)
-		{
-			if (newclb)
-			{
-				lib$free_vm(&SIZEOF(*lnk), &lnk, 0);
-				lnk = 0;
-			}
-			cmj_mbx_err(status, tsk, lnk);
-			break;
-		}
-		return;
-
-	case MSG$_INTMSG:
-		if (tsk->mbx_ast != 0)
-		{	(*tsk->mbx_ast)(tsk);
-			break;
-		}
-	/* CAUTION:  FALLTHROUGH */
-	case MSG$_DISCON:
-	case MSG$_ABORT:
-	case MSG$_EXIT:
-	case MSG$_PATHLOST:
-	case MSG$_PROTOCOL:
-	case MSG$_THIRDPARTY:
-	case MSG$_TIMEOUT:
-	case MSG$_NETSHUT:
-	case MSG$_REJECT:
-	case MSG$_CONFIRM:
-		if (tsk->err)
-		{
-			lnk = cmj_unit2clb(tsk, mp->unit);
-			(*tsk->err)(tsk, lnk, mp->msg);
-		}else
-			rts_error(CMI_NETFAIL,0,status);	/* condition handler would need to close the connection */
-	/* CAUTION:  FALLTHROUGH */
-	default:
-		break;
-	}
-
-	status = cmj_mbx_read_start(tsk);
-	if ((status & 1) == 0)
-	{
-		lnk = cmj_unit2clb(tsk, mp->unit);
-		cmj_mbx_err(status, tsk, lnk);
-	}
-}
-
-static void cmj_reject_ast(struct CLB *lnk)
-{
-	struct NTD	*tsk;
-	uint4	status;
-
-	tsk = lnk->ntd;
-	status = lnk->ios.status;
-	if ((status & 1) == 0)
-	{
-		if (cmj_unit2clb(tsk, lnk->mun) == 0)
-		{
-			lib$free_vm(&SIZEOF(*lnk), &lnk, 0);
-			lnk = 0;
-		}
-		cmj_mbx_err(status, tsk, lnk);
-	}
-
-	status = cmj_mbx_read_start(tsk);
-	if ((status & 1) == 0)
-		cmj_mbx_err(status, tsk, lnk);
-}
-
-static void cmj_accept_ast(struct CLB *lnk)
-{
-	struct NTD	*tsk;
-	uint4	status;
-
-	tsk = lnk->ntd;
-	status = lnk->ios.status;
-	if ((status & 1) == 0)
-	{
-		if (cmj_unit2clb(tsk, lnk->mun) == 0)
-		{
-			lib$free_vm(&SIZEOF(*lnk), &lnk, 0);
-			lnk = 0;
-		}
-		cmj_mbx_err(status, tsk, lnk);
-	}else
-	{
-		insqhi(lnk, tsk);
-		(*tsk->crq)(lnk);
-	}
-
-	status = cmj_mbx_read_start(tsk);
-	if ((status & 1) == 0)
-		cmj_mbx_err(status, tsk, lnk);
-}
-
-static void cmj_mbx_err(uint4 status, struct NTD *tsk, struct CLB *lnk)
-{
-        unsigned int  msg;
-
-	if (tsk->err)
-	{
-		switch (status)
-		{
-		case SS$_LINKABORT:
-			msg = MSG$_ABORT;
-			break;
-		case SS$_LINKDISCON:
-			msg = MSG$_DISCON;
-			break;
-		case SS$_LINKEXIT:
-			msg = MSG$_EXIT;
-			break;
-		case SS$_PATHLOST:
-			msg = MSG$_PATHLOST;
-			break;
-		case SS$_PROTOCOL:
-			msg = MSG$_PROTOCOL;
-			break;
-		case SS$_THIRDPARTY:
-			msg = MSG$_THIRDPARTY;
-			break;
-		case SS$_CONNECFAIL:
-		case SS$_TIMEOUT:
-			msg= MSG$_TIMEOUT;
-			break;
-		case SS$_REJECT:
-			msg = MSG$_REJECT;
-			break;
-		default:
-		case SS$_DEVALLOC:
-		case SS$_IVDEVNAM:
-			assert(FALSE);
-		/* CAUTION:  FALLTHROUGH */
-		case SS$_NOSUCHNODE:
-		case SS$_UNREACHABLE:
-			msg = MSG$_NODEINACC;
-			break;
-		}
-		(*tsk->err)(tsk, lnk, msg);
-	}else
-		rts_error(CMI_NETFAIL,0,status);	/* condition handler would need to close the connection */
-}
diff --git a/sr_cmi/cmj_mbx_read_start.c b/sr_cmi/cmj_mbx_read_start.c
deleted file mode 100644
index 1c50049..0000000
--- a/sr_cmi/cmj_mbx_read_start.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <iodef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-#include "efn.h"
-
-int cmj_mbx_read_start(struct NTD *tsk)
-{
-        void cmj_mbx_ast();
-	int status;
-
-        status = sys$qio(efn_ignore, tsk->mch, IO$_READVBLK, &(tsk->mst),
-		&cmj_mbx_ast, tsk, tsk->mbx.dsc$a_pointer, tsk->mbx.dsc$w_length, 0, 0, 0, 0);
-	return status;
-}
diff --git a/sr_cmi/cmj_netinit.c b/sr_cmi/cmj_netinit.c
deleted file mode 100644
index fb28e83..0000000
--- a/sr_cmi/cmj_netinit.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <descrip.h>
-#include <dvidef.h>
-#include "cmihdr.h"
-#include "cmidef.h"
-
-GBLDEF $DESCRIPTOR(cm_netname,"_NET:");
-GBLDEF struct NTD *ntd_root;
-
-/* CLEAN-UP: 1. replace CMI_CMICHECK with new message
-	2. find correct size and location of MBX_SIZE
-*/
-
-#define MBX_SIZE 256
-
-uint4 cmj_netinit()
-{
-	error_def(CMI_CMICHECK);
-	uint4 status;
-	int4 maxmsg,bufquo;	/* lib$asn_wth_mbx uses longwords by reference for these items */
-	struct NTD *tsk;
-	unsigned char mailbox_name_buffer[128];
-	short unsigned mbx_name_length;
-	uint4 long_mnl;
-
-	if (ntd_root)
-		return CMI_CMICHECK;
-	lib$get_vm(&SIZEOF(*ntd_root), &ntd_root, 0);
-	tsk = ntd_root;
-	memset(tsk, 0, SIZEOF(*tsk));
-	tsk->mbx.dsc$w_length = MBX_SIZE;
-	tsk->mbx.dsc$b_dtype = DSC$K_DTYPE_T;
-	tsk->mbx.dsc$b_class = DSC$K_CLASS_S;
-	lib$get_vm(&MBX_SIZE, &tsk->mbx.dsc$a_pointer, 0);
-	maxmsg = tsk->mbx.dsc$w_length;
-	bufquo = maxmsg;
-	status = lib$asn_wth_mbx(&cm_netname, &maxmsg, &bufquo, &(tsk->dch), &(tsk->mch));
-	if ((status & 1) == 0)
-		return status;
-	tsk->mnm.dsc$w_length = SIZEOF(mailbox_name_buffer);
-	tsk->mnm.dsc$b_dtype = DSC$K_DTYPE_T;
-	tsk->mnm.dsc$b_class = DSC$K_CLASS_S;
-	tsk->mnm.dsc$a_pointer = mailbox_name_buffer;
-	status = lib$getdvi(&DVI$_FULLDEVNAM, &tsk->mch,0,0,&tsk->mnm,&mbx_name_length);
-	if ((status & 1) == 0)
-		return status;
-	long_mnl = mbx_name_length;
-	lib$get_vm(&long_mnl, &tsk->mnm.dsc$a_pointer, 0);
-	tsk->mnm.dsc$w_length = mbx_name_length;
-	memcpy(tsk->mnm.dsc$a_pointer, mailbox_name_buffer, mbx_name_length);
-	return status;
-}
diff --git a/sr_cmi/cmj_unit2clb.c b/sr_cmi/cmj_unit2clb.c
deleted file mode 100644
index f4dc1a3..0000000
--- a/sr_cmi/cmj_unit2clb.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-struct CLB *cmj_unit2clb(tsk,unit)
-struct NTD *tsk;
-unsigned short unit;
-{
-	struct CLB *p;
-
-	for (p = RELQUE2PTR(tsk->cqh.fl) ; p != tsk ; p = RELQUE2PTR(p->cqe.fl))
-	{
-		if (p->mun == unit)
-			return p;
-	}
-	return 0;
-}
diff --git a/sr_cmi/cmj_util.mar b/sr_cmi/cmj_util.mar
deleted file mode 100644
index d59c51d..0000000
--- a/sr_cmi/cmj_util.mar
+++ /dev/null
@@ -1,70 +0,0 @@
-	.title	cmj_util utility routines
-
-;	remqti	- remove self-relative queue entry from tail interlocked
-;
-;	calling sequence:
-;
-;	typedef struct
-;	{
-;		long flink,blink;
-;	} self_rel_que;
-;	
-;	self_rel_que *remqti(queheader)
-;	self_rel_que *queheader;
-;	
-;	return:
-;		if successful, then a pointer to the queue entry which was removed
-;		if zero, then the queue was empty
-;		if -1, then the secondary interlock failed, the instruction may
-;			be retried, but should declare a GTMCHECK if the secondary
-;			interlock fails repeatedly
-;	
-QI_STARVATION = 6
-
-	.entry	insqhi,^m<>
-	clrl	r0
-	movl	#QI_STARVATION,r1
-5$:	insqhi	@4(ap), at 8(ap)
-	bcs	20$
-	bneq	10$
-	incl	r0
-10$:	ret
-20$:	sobgtr	r1,5$
-	decl	r0
-	ret
-
-	.entry	insqti,^m<>
-	clrl	r0
-	movl	#QI_STARVATION,r1
-5$:	insqti	@4(ap), at 8(ap)
-	bcs	20$
-	bneq	10$
-	incl	r0
-10$:	ret
-20$:	sobgtr	r1,5$
-	decl	r0
-	ret
-
-	.entry	remqhi,^m<>
-	movl	#QI_STARVATION,r1
-5$:	remqhi	@4(ap),r0
-	bcs	20$
-	bvc	10$
-	clrl	r0
-10$:	ret
-20$:	sobgtr	r1,5$
-	mnegl	#1,r0
-	ret
-
-
-	.entry	remqti,^m<>
-	movl	#QI_STARVATION,r1
-5$:	remqti	@4(ap),r0
-	bcs	20$
-	bvc	10$
-	clrl	r0
-10$:	ret
-20$:	sobgtr	r1,5$
-	mnegl	#1,r0
-	ret
-	.end
diff --git a/sr_cmi/cmu_getclb.c b/sr_cmi/cmu_getclb.c
deleted file mode 100644
index 8ef11ba..0000000
--- a/sr_cmi/cmu_getclb.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-GBLREF struct NTD *ntd_root;
-
-struct CLB *cmu_getclb(node, task)
-cmi_descriptor *node, *task;
-{
-	struct CLB *p;
-	if (ntd_root)
-	{
-		for (p = RELQUE2PTR(ntd_root->cqh.fl) ; p != ntd_root ; p = RELQUE2PTR(p->cqe.fl))
-		{
-			if (p->nod.dsc$w_length == node->dsc$w_length
-				&& memcmp(p->nod.dsc$a_pointer, node->dsc$a_pointer, p->nod.dsc$w_length) == 0)
-			{
-				if (p->tnd.dsc$w_length == task->dsc$w_length
-					&& memcmp(p->tnd.dsc$a_pointer, task->dsc$a_pointer, p->tnd.dsc$w_length) == 0)
-					return p;
-			}
-		}
-	}
-	return 0;
-}
diff --git a/sr_cmi/cmu_makclb.c b/sr_cmi/cmu_makclb.c
deleted file mode 100644
index b2e025d..0000000
--- a/sr_cmi/cmu_makclb.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-struct CLB *cmu_makclb()
-{
-	struct CLB *lnk;
-
-	lib$get_vm(&SIZEOF(*lnk), &lnk, 0);
-	memset(lnk, 0, SIZEOF(*lnk));
-	return lnk;
-}
diff --git a/sr_cmi/cmu_ntdroot.c b/sr_cmi/cmu_ntdroot.c
deleted file mode 100644
index 9f081fa..0000000
--- a/sr_cmi/cmu_ntdroot.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "cmihdr.h"
-#include "cmidef.h"
-
-GBLREF struct NTD *ntd_root;
-
-struct NTD *cmu_ntdroot()
-{
-	return ntd_root;
-}
diff --git a/sr_i386/cmerrors_ctl.c b/sr_i386/cmerrors_ctl.c
index 02581fe..a06b948 100644
--- a/sr_i386/cmerrors_ctl.c
+++ b/sr_i386/cmerrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
diff --git a/sr_i386/cmierrors_ctl.c b/sr_i386/cmierrors_ctl.c
index 3656c97..d83e1d5 100644
--- a/sr_i386/cmierrors_ctl.c
+++ b/sr_i386/cmierrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
diff --git a/sr_i386/gdeerrors_ctl.c b/sr_i386/gdeerrors_ctl.c
index d43120c..a2b0e4f 100644
--- a/sr_i386/gdeerrors_ctl.c
+++ b/sr_i386/gdeerrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
diff --git a/sr_x86_64/op_forchk1.s b/sr_i386/gtm_threadgbl_asm_access.txt
similarity index 59%
copy from sr_x86_64/op_forchk1.s
copy to sr_i386/gtm_threadgbl_asm_access.txt
index 16e25f4..10e499a 100644
--- a/sr_x86_64/op_forchk1.s
+++ b/sr_i386/gtm_threadgbl_asm_access.txt
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+#  Copyright (c) 2014, 2015 Fidelity National Information	#
+#  Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,21 +9,6 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
-
-#	PAGE	,132
-	.title	op_forchk1.s
-	.sbttl	op_forchk1
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-	.text
-# PUBLIC	op_forchk1
-ENTRY op_forchk1
-	ret
-# op_forchk1 ENDP
-
-# END
+#
+# This is an override file for the version in sr_unix. This platform does not (at this time) use this feature so has no entries.
+#
diff --git a/sr_i386/gtm_threadgbl_deftypes.h b/sr_i386/gtm_threadgbl_deftypes.h
new file mode 100644
index 0000000..e2b4a28
--- /dev/null
+++ b/sr_i386/gtm_threadgbl_deftypes.h
@@ -0,0 +1,886 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+/* Generated by /usr/library/V62002/tools/gen_gtm_threadgbl_deftypes.csh */
+
+#ifndef GTM_THREADGBL_DEFTYPES_INCLUDED
+#define GTM_THREADGBL_DEFTYPES_INCLUDED
+/* Output selection criteria for PRO build */
+#if !defined(DEBUG) || defined(PRO_BUILD)
+# define ggo_grabbing_crit 0
+# define ggt_grabbing_crit gd_region *
+# define ggo_boolchain 4
+# define ggt_boolchain triple
+# define ggo_boolchain_ptr 76
+# define ggt_boolchain_ptr triple *
+# define ggo_bool_targ_anchor 80
+# define ggt_bool_targ_anchor tbp
+# define ggo_bool_targ_ptr 92
+# define ggt_bool_targ_ptr tbp *
+# define ggo_code_generated 96
+# define ggt_code_generated boolean_t
+# define ggo_codegen_padlen 100
+# define ggt_codegen_padlen int4
+# define ggo_compile_time 104
+# define ggt_compile_time boolean_t
+# define ggo_curtchain 108
+# define ggt_curtchain triple *
+# define ggo_director_ident 112
+# define ggt_director_ident mstr
+# define ggo_director_mval 124
+# define ggt_director_mval mval
+# define ggo_director_token 148
+# define ggt_director_token char
+# define ggo_dollar_zcstatus 152
+# define ggt_dollar_zcstatus int4
+# define ggo_expr_depth 156
+# define ggt_expr_depth unsigned int
+# define ggo_expr_start 160
+# define ggt_expr_start triple *
+# define ggo_expr_start_orig 164
+# define ggt_expr_start_orig triple *
+# define ggo_defined_symbols 168
+# define ggt_defined_symbols struct sym_table *
+# define ggo_for_stack_ptr 172
+# define ggt_for_stack_ptr oprtype **
+# define ggo_gtm_fullbool 176
+# define ggt_gtm_fullbool unsigned int
+# define ggo_ind_result 180
+# define ggt_ind_result mval *
+# define ggo_ind_source 184
+# define ggt_ind_source mval *
+# define ggo_indirection_mval 188
+# define ggt_indirection_mval mval
+# define ggo_last_source_column 212
+# define ggt_last_source_column int
+# define ggo_max_advancewindow_line 216
+# define ggt_max_advancewindow_line int4
+# define ggo_linkage_first 220
+# define ggt_linkage_first struct linkage_entry *
+# define ggo_linkage_last 224
+# define ggt_linkage_last struct linkage_entry *
+# define ggo_pos_in_chain 228
+# define ggt_pos_in_chain triple
+# define ggo_s2n_intlit 300
+# define ggt_s2n_intlit boolean_t
+# define ggo_routine_source_offset 304
+# define ggt_routine_source_offset uint4
+# define ggo_saw_side_effect 308
+# define ggt_saw_side_effect boolean_t
+# define ggo_shift_side_effects 312
+# define ggt_shift_side_effects int
+# define ggo_side_effect_base 316
+# define ggt_side_effect_base boolean_t *
+# define ggo_side_effect_depth 320
+# define ggt_side_effect_depth uint4
+# define ggo_side_effect_handling 324
+# define ggt_side_effect_handling int
+# define ggo_source_error_found 328
+# define ggt_source_error_found int4
+# define ggo_temp_subs 332
+# define ggt_temp_subs boolean_t
+# define ggo_trigger_compile_and_link 336
+# define ggt_trigger_compile_and_link boolean_t
+# define ggo_window_ident 340
+# define ggt_window_ident mstr
+# define ggo_window_mval 352
+# define ggt_window_mval mval
+# define ggo_window_token 376
+# define ggt_window_token char
+# define ggo_dbinit_max_hrtbt_delta 380
+# define ggt_dbinit_max_hrtbt_delta uint4
+# define ggo_dollar_zmaxtptime 384
+# define ggt_dollar_zmaxtptime int4
+# define ggo_donot_commit 388
+# define ggt_donot_commit boolean_t
+# define ggo_donot_write_inctn_in_wcs_recover 392
+# define ggt_donot_write_inctn_in_wcs_recover boolean_t
+# define ggo_gbuff_limit 396
+# define ggt_gbuff_limit mval
+# define ggo_gd_targ_tn 420
+# define ggt_gd_targ_tn trans_num
+# define ggo_gd_targ_reg_array 428
+# define ggt_gd_targ_reg_array trans_num *
+# define ggo_gd_targ_reg_array_size 432
+# define ggt_gd_targ_reg_array_size uint4
+# define ggo_gd_targ_addr 436
+# define ggt_gd_targ_addr gd_addr *
+# define ggo_gd_targ_gvnh_reg 440
+# define ggt_gd_targ_gvnh_reg gvnh_reg_t *
+# define ggo_gd_targ_map 444
+# define ggt_gd_targ_map gd_binding *
+# define ggo_gtm_custom_errors 448
+# define ggt_gtm_custom_errors mstr
+# define ggo_gv_extname_size 460
+# define ggt_gv_extname_size int4
+# define ggo_gv_last_subsc_null 464
+# define ggt_gv_last_subsc_null boolean_t
+# define ggo_gv_mergekey2 468
+# define ggt_gv_mergekey2 gv_key *
+# define ggo_gv_reorgkey 472
+# define ggt_gv_reorgkey gv_key *
+# define ggo_gv_some_subsc_null 476
+# define ggt_gv_some_subsc_null boolean_t
+# define ggo_gv_sparekey 480
+# define ggt_gv_sparekey gv_key *
+# define ggo_gv_sparekey_mval 484
+# define ggt_gv_sparekey_mval mval
+# define ggo_gv_sparekey_size 508
+# define ggt_gv_sparekey_size int4
+# define ggo_gv_tporigkey_ptr 512
+# define ggt_gv_tporigkey_ptr gv_orig_key_array *
+# define ggo_gv_tporig_extnam_str 516
+# define ggt_gv_tporig_extnam_str mstr
+# define ggo_in_gvcst_redo_root_search 528
+# define ggt_in_gvcst_redo_root_search boolean_t
+# define ggo_in_op_gvget 532
+# define ggt_in_op_gvget boolean_t
+# define ggo_issue_DBROLLEDBACK_anyways 536
+# define ggt_issue_DBROLLEDBACK_anyways boolean_t
+# define ggo_last_fnquery_return_subcnt 540
+# define ggt_last_fnquery_return_subcnt int
+# define ggo_last_fnquery_return_varname 544
+# define ggt_last_fnquery_return_varname mval
+# define ggo_ok_to_call_wcs_recover 568
+# define ggt_ok_to_call_wcs_recover boolean_t
+# define ggo_in_gvcst_bmp_mark_free 572
+# define ggt_in_gvcst_bmp_mark_free boolean_t
+# define ggo_prev_gv_target 576
+# define ggt_prev_gv_target gv_namehead *
+# define ggo_ready2signal_gvundef 580
+# define ggt_ready2signal_gvundef boolean_t
+# define ggo_redo_rootsrch_ctxt 584
+# define ggt_redo_rootsrch_ctxt redo_root_search_context
+# define ggo_semwait2long 1692
+# define ggt_semwait2long volatile boolean_t
+# define ggo_skip_file_corrupt_check 1696
+# define ggt_skip_file_corrupt_check boolean_t
+# define ggo_tpnotacidtime 1700
+# define ggt_tpnotacidtime int4
+# define ggo_tp_restart_count 1704
+# define ggt_tp_restart_count uint4
+# define ggo_tp_restart_dont_counts 1708
+# define ggt_tp_restart_dont_counts int4
+# define ggo_tp_restart_entryref 1712
+# define ggt_tp_restart_entryref mval
+# define ggo_tp_restart_failhist_indx 1736
+# define ggt_tp_restart_failhist_indx int4
+# define ggo_tprestart_syslog_delta 1740
+# define ggt_tprestart_syslog_delta int4
+# define ggo_tprestart_syslog_limit 1744
+# define ggt_tprestart_syslog_limit int4
+# define ggo_transform 1748
+# define ggt_transform boolean_t
+# define ggo_wcs_recover_done 1752
+# define ggt_wcs_recover_done boolean_t
+# define ggo_in_op_fnnext 1756
+# define ggt_in_op_fnnext boolean_t
+# define ggo_local_collseq 1760
+# define ggt_local_collseq collseq *
+# define ggo_local_collseq_stdnull 1764
+# define ggt_local_collseq_stdnull boolean_t
+# define ggo_local_coll_nums_as_strings 1768
+# define ggt_local_coll_nums_as_strings boolean_t
+# define ggo_lv_null_subs 1772
+# define ggt_lv_null_subs int
+# define ggo_max_lcl_coll_xform_bufsiz 1776
+# define ggt_max_lcl_coll_xform_bufsiz int
+# define ggo_replgbl 1780
+# define ggt_replgbl replgbl_t
+# define ggo_tqread_nowait 1796
+# define ggt_tqread_nowait boolean_t
+# define ggo_arlink_enabled 1800
+# define ggt_arlink_enabled boolean_t
+# define ggo_arlink_loaded 1804
+# define ggt_arlink_loaded uint4
+# define ggo_collseq_list 1808
+# define ggt_collseq_list collseq *
+# define ggo_create_fatal_error_zshow_dmp_fptr 1812
+# define ggt_create_fatal_error_zshow_dmp_fptr void
+# define gga_create_fatal_error_zshow_dmp_fptr (void)
+typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
+# define ggo_disable_sigcont 1816
+# define ggt_disable_sigcont boolean_t
+# define ggo_dollar_zcompile 1820
+# define ggt_dollar_zcompile mstr
+# define ggo_dollar_zmode 1832
+# define ggt_dollar_zmode mval
+# define ggo_dollar_zonlnrlbk 1856
+# define ggt_dollar_zonlnrlbk int
+# define ggo_dollar_zclose 1860
+# define ggt_dollar_zclose int
+# define ggo_dollar_zroutines 1864
+# define ggt_dollar_zroutines mstr
+# define ggo_error_on_jnl_file_lost 1876
+# define ggt_error_on_jnl_file_lost unsigned int
+# define ggo_fnzsearch_lv_vars 1880
+# define ggt_fnzsearch_lv_vars lv_val *
+# define ggo_fnzsearch_sub_mval 1884
+# define ggt_fnzsearch_sub_mval mval
+# define ggo_fnzsearch_nullsubs_sav 1908
+# define ggt_fnzsearch_nullsubs_sav int
+# define ggo_fnzsearch_globbuf_ptr 1912
+# define ggt_fnzsearch_globbuf_ptr glob_t *
+# define ggo_glvn_pool_ptr 1916
+# define ggt_glvn_pool_ptr glvn_pool *
+# define ggo_gtm_env_init_started 1920
+# define ggt_gtm_env_init_started boolean_t
+# define ggo_gtm_env_xlate_entry 1924
+# define ggt_gtm_env_xlate_entry int
+# define gga_gtm_env_xlate_entry ()
+typedef int (*ggf_gtm_env_xlate_entry)();
+# define ggo_gtm_environment_init 1928
+# define ggt_gtm_environment_init boolean_t
+# define ggo_gtm_sigusr1_handler 1932
+# define ggt_gtm_sigusr1_handler void
+# define gga_gtm_sigusr1_handler (void)
+typedef void (*ggf_gtm_sigusr1_handler)(void);
+# define ggo_gtm_linktmpdir 1936
+# define ggt_gtm_linktmpdir mstr
+# define ggo_gtm_trctbl_cur 1948
+# define ggt_gtm_trctbl_cur trctbl_entry *
+# define ggo_gtm_trctbl_end 1952
+# define ggt_gtm_trctbl_end trctbl_entry *
+# define ggo_gtm_trctbl_groups 1956
+# define ggt_gtm_trctbl_groups unsigned int
+# define ggo_gtm_trctbl_start 1960
+# define ggt_gtm_trctbl_start trctbl_entry *
+# define ggo_gtm_waitstuck_script 1964
+# define ggt_gtm_waitstuck_script mstr
+# define ggo_gtmprompt 1976
+# define ggt_gtmprompt mstr
+# define ggo_gtmsecshr_comkey 1988
+# define ggt_gtmsecshr_comkey unsigned int
+# define ggo_in_zwrite 1992
+# define ggt_in_zwrite boolean_t
+# define ggo_lab_lnr 1996
+# define ggt_lab_lnr lnr_tabent **
+# define ggo_jobexam_counter 2000
+# define ggt_jobexam_counter unsigned int
+# define ggo_lab_proxy 2004
+# define ggt_lab_proxy lab_tabent_proxy
+# define ggo_mprof_alloc_reclaim 2012
+# define ggt_mprof_alloc_reclaim boolean_t
+# define ggo_mprof_chunk_avail_size 2016
+# define ggt_mprof_chunk_avail_size int
+# define ggo_mprof_env_gbl_name 2020
+# define ggt_mprof_env_gbl_name mval
+# define ggo_mprof_ptr 2044
+# define ggt_mprof_ptr mprof_wrapper *
+# define ggo_mprof_reclaim_addr 2048
+# define ggt_mprof_reclaim_addr char *
+# define ggo_mprof_reclaim_cnt 2052
+# define ggt_mprof_reclaim_cnt int
+# define ggo_mprof_stack_curr_frame 2056
+# define ggt_mprof_stack_curr_frame mprof_stack_frame *
+# define ggo_mprof_stack_next_frame 2060
+# define ggt_mprof_stack_next_frame mprof_stack_frame *
+# define ggo_open_shlib_root 2064
+# define ggt_open_shlib_root open_shlib *
+# define ggo_parm_pool_ptr 2068
+# define ggt_parm_pool_ptr parm_pool *
+# define ggo_parms_cnt 2072
+# define ggt_parms_cnt unsigned int
+# define ggo_zpeek_regname 2076
+# define ggt_zpeek_regname char
+# define ggl_zpeek_regname 31
+# define ggo_zpeek_regname_len 2108
+# define ggt_zpeek_regname_len int
+# define ggo_zpeek_reg_ptr 2112
+# define ggt_zpeek_reg_ptr gd_region *
+# define ggo_pipefifo_interrupt 2116
+# define ggt_pipefifo_interrupt int
+# define ggo_prof_fp 2120
+# define ggt_prof_fp mprof_stack_frame *
+# define ggo_relink_allowed 2124
+# define ggt_relink_allowed int
+# define ggo_set_zroutines_cycle 2128
+# define ggt_set_zroutines_cycle uint4
+# define ggo_trans_code_pop 2132
+# define ggt_trans_code_pop mval *
+# define ggo_view_ydirt_str 2136
+# define ggt_view_ydirt_str char *
+# define ggo_view_ydirt_str_len 2140
+# define ggt_view_ydirt_str_len int4
+# define ggo_zdate_form 2144
+# define ggt_zdate_form int4
+# define ggo_zintcmd_active 2148
+# define ggt_zintcmd_active zintcmd_active_info
+# define ggl_zintcmd_active 36
+# define ggo_zro_root 2184
+# define ggt_zro_root zro_ent *
+# define ggo_zsearch_var 2188
+# define ggt_zsearch_var lv_val *
+# define ggo_poll_fds_buffer 2192
+# define ggt_poll_fds_buffer char *
+# define ggo_poll_fds_buffer_size 2196
+# define ggt_poll_fds_buffer_size size_t
+# define ggo_socket_handle_counter 2200
+# define ggt_socket_handle_counter int
+# define ggo_director_string 2204
+# define ggt_director_string char
+# define ggl_director_string 32
+# define ggo_fnpca 2236
+# define ggt_fnpca fnpc_area
+# define ggo_for_stack 20044
+# define ggt_for_stack oprtype *
+# define ggl_for_stack 128
+# define ggo_for_temps 20172
+# define ggt_for_temps boolean_t
+# define ggl_for_temps 128
+# define ggo_last_fnquery_return_sub 20300
+# define ggt_last_fnquery_return_sub mval
+# define ggl_last_fnquery_return_sub 768
+# define ggo_lcl_coll_xform_buff 21068
+# define ggt_lcl_coll_xform_buff char *
+# define ggo_protmem_ba 21072
+# define ggt_protmem_ba mstr
+# define ggo_parm_ary 21084
+# define ggt_parm_ary char *
+# define ggl_parm_ary 4096
+# define ggo_parm_ary_len 25180
+# define ggt_parm_ary_len int
+# define ggl_parm_ary_len 4096
+# define ggo_parm_str_len 29276
+# define ggt_parm_str_len int
+# define ggl_parm_str_len 4096
+# define ggo_prombuf 33372
+# define ggt_prombuf char
+# define ggl_prombuf 32
+# define ggo_tp_restart_failhist_arry 33404
+# define ggt_tp_restart_failhist_arry char
+# define ggl_tp_restart_failhist_arry 32
+# define ggo_window_string 33436
+# define ggt_window_string char
+# define ggl_window_string 32
+# define ggo_tmp_object_file_name 33468
+# define ggt_tmp_object_file_name char
+# define ggl_tmp_object_file_name 4097
+# define ggo_last_va_list_ptr 37568
+# define ggt_last_va_list_ptr va_list
+# define ggo_util_outbuff 37572
+# define ggt_util_outbuff char
+# define ggl_util_outbuff 6144
+# define ggo_util_outbuff_ptr 43716
+# define ggt_util_outbuff_ptr char *
+# define ggo_util_outptr 43720
+# define ggt_util_outptr char *
+# define ggo_callin_hashtab 43724
+# define ggt_callin_hashtab hash_table_str *
+# define ggo_ci_table 43728
+# define ggt_ci_table callin_entry_list *
+# define ggo_extcall_package_root 43732
+# define ggt_extcall_package_root struct extcall_package_list *
+# define ggo_gtmci_nested_level 43736
+# define ggt_gtmci_nested_level unsigned int
+# define ggo_temp_fgncal_stack 43740
+# define ggt_temp_fgncal_stack unsigned char *
+# define ggo_midchild_send_locals 43744
+# define ggt_midchild_send_locals boolean_t
+# define ggo_want_empty_gvts 43748
+# define ggt_want_empty_gvts boolean_t
+# define ggo_in_mu_swap_root_state 43752
+# define ggt_in_mu_swap_root_state unsigned int
+# define ggo_prev_t_tries 43756
+# define ggt_prev_t_tries unsigned int
+# define ggo_rlbk_during_redo_root 43760
+# define ggt_rlbk_during_redo_root boolean_t
+# define ggo_mlk_yield_pid 43764
+# define ggt_mlk_yield_pid uint4
+# define ggo_jnl_extract_nocol 43768
+# define ggt_jnl_extract_nocol uint4
+# define ggo_skip_gtm_putmsg 43772
+# define ggt_skip_gtm_putmsg boolean_t
+# define ggo_spangbl_seen 43776
+# define ggt_spangbl_seen boolean_t
+# define ggo_no_spangbls 43780
+# define ggt_no_spangbls boolean_t
+# define ggo_max_fid_index 43784
+# define ggt_max_fid_index int
+# define ggo_is_mu_rndwn_rlnkctl 43788
+# define ggt_is_mu_rndwn_rlnkctl int
+# define ggo_expand_prev_key 43792
+# define ggt_expand_prev_key boolean_t
+# define ggo_gtm_autorelink_ctlmax 43796
+# define ggt_gtm_autorelink_ctlmax uint4
+# define ggo_gvt_triggers_read_this_tn 43800
+# define ggt_gvt_triggers_read_this_tn boolean_t
+# define ggo_op_fntext_tlevel 43804
+# define ggt_op_fntext_tlevel uint4
+# define ggo_in_op_fntext 43808
+# define ggt_in_op_fntext boolean_t
+# define ggo_ztrigbuff 43812
+# define ggt_ztrigbuff char *
+# define ggo_ztrigbuffAllocLen 43816
+# define ggt_ztrigbuffAllocLen int
+# define ggo_ztrigbuffLen 43820
+# define ggt_ztrigbuffLen int
+# define ggo_ztrig_use_io_curr_device 43824
+# define ggt_ztrig_use_io_curr_device boolean_t
+# define size_gtm_threadgbl_struct 43828
+#else
+# define ggo_grabbing_crit 0
+# define ggt_grabbing_crit gd_region *
+# define ggo_boolchain 4
+# define ggt_boolchain triple
+# define ggo_boolchain_ptr 76
+# define ggt_boolchain_ptr triple *
+# define ggo_bool_targ_anchor 80
+# define ggt_bool_targ_anchor tbp
+# define ggo_bool_targ_ptr 92
+# define ggt_bool_targ_ptr tbp *
+# define ggo_code_generated 96
+# define ggt_code_generated boolean_t
+# define ggo_codegen_padlen 100
+# define ggt_codegen_padlen int4
+# define ggo_compile_time 104
+# define ggt_compile_time boolean_t
+# define ggo_curtchain 108
+# define ggt_curtchain triple *
+# define ggo_director_ident 112
+# define ggt_director_ident mstr
+# define ggo_director_mval 124
+# define ggt_director_mval mval
+# define ggo_director_token 148
+# define ggt_director_token char
+# define ggo_dollar_zcstatus 152
+# define ggt_dollar_zcstatus int4
+# define ggo_expr_depth 156
+# define ggt_expr_depth unsigned int
+# define ggo_expr_start 160
+# define ggt_expr_start triple *
+# define ggo_expr_start_orig 164
+# define ggt_expr_start_orig triple *
+# define ggo_defined_symbols 168
+# define ggt_defined_symbols struct sym_table *
+# define ggo_for_stack_ptr 172
+# define ggt_for_stack_ptr oprtype **
+# define ggo_gtm_fullbool 176
+# define ggt_gtm_fullbool unsigned int
+# define ggo_ind_result 180
+# define ggt_ind_result mval *
+# define ggo_ind_source 184
+# define ggt_ind_source mval *
+# define ggo_indirection_mval 188
+# define ggt_indirection_mval mval
+# define ggo_last_source_column 212
+# define ggt_last_source_column int
+# define ggo_max_advancewindow_line 216
+# define ggt_max_advancewindow_line int4
+# define ggo_linkage_first 220
+# define ggt_linkage_first struct linkage_entry *
+# define ggo_linkage_last 224
+# define ggt_linkage_last struct linkage_entry *
+# define ggo_pos_in_chain 228
+# define ggt_pos_in_chain triple
+# define ggo_s2n_intlit 300
+# define ggt_s2n_intlit boolean_t
+# define ggo_routine_source_offset 304
+# define ggt_routine_source_offset uint4
+# define ggo_saw_side_effect 308
+# define ggt_saw_side_effect boolean_t
+# define ggo_shift_side_effects 312
+# define ggt_shift_side_effects int
+# define ggo_side_effect_base 316
+# define ggt_side_effect_base boolean_t *
+# define ggo_side_effect_depth 320
+# define ggt_side_effect_depth uint4
+# define ggo_side_effect_handling 324
+# define ggt_side_effect_handling int
+# define ggo_source_error_found 328
+# define ggt_source_error_found int4
+# define ggo_temp_subs 332
+# define ggt_temp_subs boolean_t
+# define ggo_trigger_compile_and_link 336
+# define ggt_trigger_compile_and_link boolean_t
+# define ggo_window_ident 340
+# define ggt_window_ident mstr
+# define ggo_window_mval 352
+# define ggt_window_mval mval
+# define ggo_window_token 376
+# define ggt_window_token char
+# define ggo_dbinit_max_hrtbt_delta 380
+# define ggt_dbinit_max_hrtbt_delta uint4
+# define ggo_dollar_zmaxtptime 384
+# define ggt_dollar_zmaxtptime int4
+# define ggo_donot_commit 388
+# define ggt_donot_commit boolean_t
+# define ggo_donot_write_inctn_in_wcs_recover 392
+# define ggt_donot_write_inctn_in_wcs_recover boolean_t
+# define ggo_gbuff_limit 396
+# define ggt_gbuff_limit mval
+# define ggo_gd_targ_tn 420
+# define ggt_gd_targ_tn trans_num
+# define ggo_gd_targ_reg_array 428
+# define ggt_gd_targ_reg_array trans_num *
+# define ggo_gd_targ_reg_array_size 432
+# define ggt_gd_targ_reg_array_size uint4
+# define ggo_gd_targ_addr 436
+# define ggt_gd_targ_addr gd_addr *
+# define ggo_gd_targ_gvnh_reg 440
+# define ggt_gd_targ_gvnh_reg gvnh_reg_t *
+# define ggo_gd_targ_map 444
+# define ggt_gd_targ_map gd_binding *
+# define ggo_gtm_custom_errors 448
+# define ggt_gtm_custom_errors mstr
+# define ggo_gv_extname_size 460
+# define ggt_gv_extname_size int4
+# define ggo_gv_last_subsc_null 464
+# define ggt_gv_last_subsc_null boolean_t
+# define ggo_gv_mergekey2 468
+# define ggt_gv_mergekey2 gv_key *
+# define ggo_gv_reorgkey 472
+# define ggt_gv_reorgkey gv_key *
+# define ggo_gv_some_subsc_null 476
+# define ggt_gv_some_subsc_null boolean_t
+# define ggo_gv_sparekey 480
+# define ggt_gv_sparekey gv_key *
+# define ggo_gv_sparekey_mval 484
+# define ggt_gv_sparekey_mval mval
+# define ggo_gv_sparekey_size 508
+# define ggt_gv_sparekey_size int4
+# define ggo_gv_tporigkey_ptr 512
+# define ggt_gv_tporigkey_ptr gv_orig_key_array *
+# define ggo_gv_tporig_extnam_str 516
+# define ggt_gv_tporig_extnam_str mstr
+# define ggo_in_gvcst_redo_root_search 528
+# define ggt_in_gvcst_redo_root_search boolean_t
+# define ggo_in_op_gvget 532
+# define ggt_in_op_gvget boolean_t
+# define ggo_issue_DBROLLEDBACK_anyways 536
+# define ggt_issue_DBROLLEDBACK_anyways boolean_t
+# define ggo_last_fnquery_return_subcnt 540
+# define ggt_last_fnquery_return_subcnt int
+# define ggo_last_fnquery_return_varname 544
+# define ggt_last_fnquery_return_varname mval
+# define ggo_ok_to_call_wcs_recover 568
+# define ggt_ok_to_call_wcs_recover boolean_t
+# define ggo_in_gvcst_bmp_mark_free 572
+# define ggt_in_gvcst_bmp_mark_free boolean_t
+# define ggo_prev_gv_target 576
+# define ggt_prev_gv_target gv_namehead *
+# define ggo_ready2signal_gvundef 580
+# define ggt_ready2signal_gvundef boolean_t
+# define ggo_redo_rootsrch_ctxt 584
+# define ggt_redo_rootsrch_ctxt redo_root_search_context
+# define ggo_semwait2long 1728
+# define ggt_semwait2long volatile boolean_t
+# define ggo_skip_file_corrupt_check 1732
+# define ggt_skip_file_corrupt_check boolean_t
+# define ggo_tpnotacidtime 1736
+# define ggt_tpnotacidtime int4
+# define ggo_tp_restart_count 1740
+# define ggt_tp_restart_count uint4
+# define ggo_tp_restart_dont_counts 1744
+# define ggt_tp_restart_dont_counts int4
+# define ggo_tp_restart_entryref 1748
+# define ggt_tp_restart_entryref mval
+# define ggo_tp_restart_failhist_indx 1772
+# define ggt_tp_restart_failhist_indx int4
+# define ggo_tprestart_syslog_delta 1776
+# define ggt_tprestart_syslog_delta int4
+# define ggo_tprestart_syslog_limit 1780
+# define ggt_tprestart_syslog_limit int4
+# define ggo_transform 1784
+# define ggt_transform boolean_t
+# define ggo_wcs_recover_done 1788
+# define ggt_wcs_recover_done boolean_t
+# define ggo_in_op_fnnext 1792
+# define ggt_in_op_fnnext boolean_t
+# define ggo_local_collseq 1796
+# define ggt_local_collseq collseq *
+# define ggo_local_collseq_stdnull 1800
+# define ggt_local_collseq_stdnull boolean_t
+# define ggo_local_coll_nums_as_strings 1804
+# define ggt_local_coll_nums_as_strings boolean_t
+# define ggo_lv_null_subs 1808
+# define ggt_lv_null_subs int
+# define ggo_max_lcl_coll_xform_bufsiz 1812
+# define ggt_max_lcl_coll_xform_bufsiz int
+# define ggo_replgbl 1816
+# define ggt_replgbl replgbl_t
+# define ggo_tqread_nowait 1832
+# define ggt_tqread_nowait boolean_t
+# define ggo_arlink_enabled 1836
+# define ggt_arlink_enabled boolean_t
+# define ggo_arlink_loaded 1840
+# define ggt_arlink_loaded uint4
+# define ggo_collseq_list 1844
+# define ggt_collseq_list collseq *
+# define ggo_create_fatal_error_zshow_dmp_fptr 1848
+# define ggt_create_fatal_error_zshow_dmp_fptr void
+# define gga_create_fatal_error_zshow_dmp_fptr (void)
+typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
+# define ggo_disable_sigcont 1852
+# define ggt_disable_sigcont boolean_t
+# define ggo_dollar_zcompile 1856
+# define ggt_dollar_zcompile mstr
+# define ggo_dollar_zmode 1868
+# define ggt_dollar_zmode mval
+# define ggo_dollar_zonlnrlbk 1892
+# define ggt_dollar_zonlnrlbk int
+# define ggo_dollar_zclose 1896
+# define ggt_dollar_zclose int
+# define ggo_dollar_zroutines 1900
+# define ggt_dollar_zroutines mstr
+# define ggo_error_on_jnl_file_lost 1912
+# define ggt_error_on_jnl_file_lost unsigned int
+# define ggo_fnzsearch_lv_vars 1916
+# define ggt_fnzsearch_lv_vars lv_val *
+# define ggo_fnzsearch_sub_mval 1920
+# define ggt_fnzsearch_sub_mval mval
+# define ggo_fnzsearch_nullsubs_sav 1944
+# define ggt_fnzsearch_nullsubs_sav int
+# define ggo_fnzsearch_globbuf_ptr 1948
+# define ggt_fnzsearch_globbuf_ptr glob_t *
+# define ggo_glvn_pool_ptr 1952
+# define ggt_glvn_pool_ptr glvn_pool *
+# define ggo_gtmdbgflags 1956
+# define ggt_gtmdbgflags int
+# define ggo_gtmdbgflags_freq 1960
+# define ggt_gtmdbgflags_freq int
+# define ggo_gtmdbgflags_freq_cntr 1964
+# define ggt_gtmdbgflags_freq_cntr int
+# define ggo_gtm_env_init_started 1968
+# define ggt_gtm_env_init_started boolean_t
+# define ggo_gtm_env_xlate_entry 1972
+# define ggt_gtm_env_xlate_entry int
+# define gga_gtm_env_xlate_entry ()
+typedef int (*ggf_gtm_env_xlate_entry)();
+# define ggo_gtm_environment_init 1976
+# define ggt_gtm_environment_init boolean_t
+# define ggo_gtm_sigusr1_handler 1980
+# define ggt_gtm_sigusr1_handler void
+# define gga_gtm_sigusr1_handler (void)
+typedef void (*ggf_gtm_sigusr1_handler)(void);
+# define ggo_gtm_linktmpdir 1984
+# define ggt_gtm_linktmpdir mstr
+# define ggo_gtm_trctbl_cur 1996
+# define ggt_gtm_trctbl_cur trctbl_entry *
+# define ggo_gtm_trctbl_end 2000
+# define ggt_gtm_trctbl_end trctbl_entry *
+# define ggo_gtm_trctbl_groups 2004
+# define ggt_gtm_trctbl_groups unsigned int
+# define ggo_gtm_trctbl_start 2008
+# define ggt_gtm_trctbl_start trctbl_entry *
+# define ggo_gtm_waitstuck_script 2012
+# define ggt_gtm_waitstuck_script mstr
+# define ggo_gtmprompt 2024
+# define ggt_gtmprompt mstr
+# define ggo_gtmsecshr_comkey 2036
+# define ggt_gtmsecshr_comkey unsigned int
+# define ggo_in_zwrite 2040
+# define ggt_in_zwrite boolean_t
+# define ggo_lab_lnr 2044
+# define ggt_lab_lnr lnr_tabent **
+# define ggo_jobexam_counter 2048
+# define ggt_jobexam_counter unsigned int
+# define ggo_lab_proxy 2052
+# define ggt_lab_proxy lab_tabent_proxy
+# define ggo_mprof_alloc_reclaim 2060
+# define ggt_mprof_alloc_reclaim boolean_t
+# define ggo_mprof_chunk_avail_size 2064
+# define ggt_mprof_chunk_avail_size int
+# define ggo_mprof_env_gbl_name 2068
+# define ggt_mprof_env_gbl_name mval
+# define ggo_mprof_ptr 2092
+# define ggt_mprof_ptr mprof_wrapper *
+# define ggo_mprof_reclaim_addr 2096
+# define ggt_mprof_reclaim_addr char *
+# define ggo_mprof_reclaim_cnt 2100
+# define ggt_mprof_reclaim_cnt int
+# define ggo_mprof_stack_curr_frame 2104
+# define ggt_mprof_stack_curr_frame mprof_stack_frame *
+# define ggo_mprof_stack_next_frame 2108
+# define ggt_mprof_stack_next_frame mprof_stack_frame *
+# define ggo_open_shlib_root 2112
+# define ggt_open_shlib_root open_shlib *
+# define ggo_parm_pool_ptr 2116
+# define ggt_parm_pool_ptr parm_pool *
+# define ggo_parms_cnt 2120
+# define ggt_parms_cnt unsigned int
+# define ggo_zpeek_regname 2124
+# define ggt_zpeek_regname char
+# define ggl_zpeek_regname 31
+# define ggo_zpeek_regname_len 2156
+# define ggt_zpeek_regname_len int
+# define ggo_zpeek_reg_ptr 2160
+# define ggt_zpeek_reg_ptr gd_region *
+# define ggo_pipefifo_interrupt 2164
+# define ggt_pipefifo_interrupt int
+# define ggo_prof_fp 2168
+# define ggt_prof_fp mprof_stack_frame *
+# define ggo_relink_allowed 2172
+# define ggt_relink_allowed int
+# define ggo_set_zroutines_cycle 2176
+# define ggt_set_zroutines_cycle uint4
+# define ggo_trans_code_pop 2180
+# define ggt_trans_code_pop mval *
+# define ggo_view_ydirt_str 2184
+# define ggt_view_ydirt_str char *
+# define ggo_view_ydirt_str_len 2188
+# define ggt_view_ydirt_str_len int4
+# define ggo_zdate_form 2192
+# define ggt_zdate_form int4
+# define ggo_zintcmd_active 2196
+# define ggt_zintcmd_active zintcmd_active_info
+# define ggl_zintcmd_active 36
+# define ggo_zro_root 2232
+# define ggt_zro_root zro_ent *
+# define ggo_zsearch_var 2236
+# define ggt_zsearch_var lv_val *
+# define ggo_poll_fds_buffer 2240
+# define ggt_poll_fds_buffer char *
+# define ggo_poll_fds_buffer_size 2244
+# define ggt_poll_fds_buffer_size size_t
+# define ggo_socket_handle_counter 2248
+# define ggt_socket_handle_counter int
+# define ggo_director_string 2252
+# define ggt_director_string char
+# define ggl_director_string 32
+# define ggo_fnpca 2284
+# define ggt_fnpca fnpc_area
+# define ggo_for_stack 20092
+# define ggt_for_stack oprtype *
+# define ggl_for_stack 128
+# define ggo_for_temps 20220
+# define ggt_for_temps boolean_t
+# define ggl_for_temps 128
+# define ggo_last_fnquery_return_sub 20348
+# define ggt_last_fnquery_return_sub mval
+# define ggl_last_fnquery_return_sub 768
+# define ggo_lcl_coll_xform_buff 21116
+# define ggt_lcl_coll_xform_buff char *
+# define ggo_protmem_ba 21120
+# define ggt_protmem_ba mstr
+# define ggo_parm_ary 21132
+# define ggt_parm_ary char *
+# define ggl_parm_ary 4096
+# define ggo_parm_ary_len 25228
+# define ggt_parm_ary_len int
+# define ggl_parm_ary_len 4096
+# define ggo_parm_str_len 29324
+# define ggt_parm_str_len int
+# define ggl_parm_str_len 4096
+# define ggo_prombuf 33420
+# define ggt_prombuf char
+# define ggl_prombuf 32
+# define ggo_tp_restart_failhist_arry 33452
+# define ggt_tp_restart_failhist_arry char
+# define ggl_tp_restart_failhist_arry 32
+# define ggo_window_string 33484
+# define ggt_window_string char
+# define ggl_window_string 32
+# define ggo_tmp_object_file_name 33516
+# define ggt_tmp_object_file_name char
+# define ggl_tmp_object_file_name 4097
+# define ggo_last_va_list_ptr 37616
+# define ggt_last_va_list_ptr va_list
+# define ggo_util_outbuff 37620
+# define ggt_util_outbuff char
+# define ggl_util_outbuff 6144
+# define ggo_util_outbuff_ptr 43764
+# define ggt_util_outbuff_ptr char *
+# define ggo_util_outptr 43768
+# define ggt_util_outptr char *
+# define ggo_callin_hashtab 43772
+# define ggt_callin_hashtab hash_table_str *
+# define ggo_ci_table 43776
+# define ggt_ci_table callin_entry_list *
+# define ggo_extcall_package_root 43780
+# define ggt_extcall_package_root struct extcall_package_list *
+# define ggo_gtmci_nested_level 43784
+# define ggt_gtmci_nested_level unsigned int
+# define ggo_temp_fgncal_stack 43788
+# define ggt_temp_fgncal_stack unsigned char *
+# define ggo_midchild_send_locals 43792
+# define ggt_midchild_send_locals boolean_t
+# define ggo_want_empty_gvts 43796
+# define ggt_want_empty_gvts boolean_t
+# define ggo_in_mu_swap_root_state 43800
+# define ggt_in_mu_swap_root_state unsigned int
+# define ggo_prev_t_tries 43804
+# define ggt_prev_t_tries unsigned int
+# define ggo_rlbk_during_redo_root 43808
+# define ggt_rlbk_during_redo_root boolean_t
+# define ggo_mlk_yield_pid 43812
+# define ggt_mlk_yield_pid uint4
+# define ggo_jnl_extract_nocol 43816
+# define ggt_jnl_extract_nocol uint4
+# define ggo_skip_gtm_putmsg 43820
+# define ggt_skip_gtm_putmsg boolean_t
+# define ggo_spangbl_seen 43824
+# define ggt_spangbl_seen boolean_t
+# define ggo_no_spangbls 43828
+# define ggt_no_spangbls boolean_t
+# define ggo_max_fid_index 43832
+# define ggt_max_fid_index int
+# define ggo_is_mu_rndwn_rlnkctl 43836
+# define ggt_is_mu_rndwn_rlnkctl int
+# define ggo_expand_prev_key 43840
+# define ggt_expand_prev_key boolean_t
+# define ggo_gtm_autorelink_ctlmax 43844
+# define ggt_gtm_autorelink_ctlmax uint4
+# define ggo_gvt_triggers_read_this_tn 43848
+# define ggt_gvt_triggers_read_this_tn boolean_t
+# define ggo_op_fntext_tlevel 43852
+# define ggt_op_fntext_tlevel uint4
+# define ggo_in_op_fntext 43856
+# define ggt_in_op_fntext boolean_t
+# define ggo_ztrigbuff 43860
+# define ggt_ztrigbuff char *
+# define ggo_ztrigbuffAllocLen 43864
+# define ggt_ztrigbuffAllocLen int
+# define ggo_ztrigbuffLen 43868
+# define ggt_ztrigbuffLen int
+# define ggo_ztrig_use_io_curr_device 43872
+# define ggt_ztrig_use_io_curr_device boolean_t
+# define ggo_continue_proc_cnt 43876
+# define ggt_continue_proc_cnt int
+# define ggo_gtm_test_fake_enospc 43880
+# define ggt_gtm_test_fake_enospc boolean_t
+# define ggo_gtm_usesecshr 43884
+# define ggt_gtm_usesecshr boolean_t
+# define ggo_rts_error_unusable 43888
+# define ggt_rts_error_unusable boolean_t
+# define ggo_rts_error_unusable_seen 43892
+# define ggt_rts_error_unusable_seen boolean_t
+# define ggo_trans_restart_hist_array 43896
+# define ggt_trans_restart_hist_array trans_restart_hist_t
+# define ggl_trans_restart_hist_array 14336
+# define ggo_trans_restart_hist_index 58232
+# define ggt_trans_restart_hist_index uint4
+# define ggo_skip_mv_num_approx_assert 58236
+# define ggt_skip_mv_num_approx_assert boolean_t
+# define ggo_gtm_gvundef_fatal 58240
+# define ggt_gtm_gvundef_fatal boolean_t
+# define ggo_gtm_dirtree_collhdr_always 58244
+# define ggt_gtm_dirtree_collhdr_always boolean_t
+# define ggo_activelv_cycle 58248
+# define ggt_activelv_cycle int
+# define ggo_activelv_index 58252
+# define ggt_activelv_index int
+# define ggo_activelv_dbg_array 58256
+# define ggt_activelv_dbg_array activelv_dbg_t *
+# define ggo_cli_get_str_max_len 58260
+# define ggt_cli_get_str_max_len uint4
+# define ggo_gtmio_skip_tlevel_assert 58264
+# define ggt_gtmio_skip_tlevel_assert boolean_t
+# define ggo_in_trigger_upgrade 58268
+# define ggt_in_trigger_upgrade boolean_t
+# define ggo_gtm_test_autorelink_always 58272
+# define ggt_gtm_test_autorelink_always boolean_t
+# define ggo_fork_without_child_wait 58276
+# define ggt_fork_without_child_wait boolean_t
+# define size_gtm_threadgbl_struct 58280
+#endif
+#endif
diff --git a/sr_i386/gtm_threadgbl_deftypes_asm_dbg.si b/sr_i386/gtm_threadgbl_deftypes_asm_dbg.si
new file mode 100644
index 0000000..3ab66f6
--- /dev/null
+++ b/sr_i386/gtm_threadgbl_deftypes_asm_dbg.si
@@ -0,0 +1,3 @@
+#
+# Created by gtmthreadgblasm for version V6.0-003 on Linux x86 (gtm_threadgbl_deftypes_asm_dbg.si)
+#
diff --git a/sr_i386/gtm_threadgbl_deftypes_asm_pro.si b/sr_i386/gtm_threadgbl_deftypes_asm_pro.si
new file mode 100644
index 0000000..b7f5f08
--- /dev/null
+++ b/sr_i386/gtm_threadgbl_deftypes_asm_pro.si
@@ -0,0 +1,3 @@
+#
+# Created by gtmthreadgblasm for version V6.0-003 on Linux x86 (gtm_threadgbl_deftypes_asm_pro.si)
+#
diff --git a/sr_i386/incr_link.c b/sr_i386/incr_link.c
index 10b9738..3918d28 100644
--- a/sr_i386/incr_link.c
+++ b/sr_i386/incr_link.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -49,9 +50,9 @@ typedef struct res_list_struct
 
 void res_free(res_list *root);
 bool addr_fix(int file, struct exec *fhead, urx_rtnref *urx_lcl, rhdtyp *code);
-void zl_error(int4 file, int4 err, int4 len, char *addr, int4 err2, int4 len2, char *addr2);
+void zl_error(int4 *file, int4 err, int4 len, char *addr, int4 err2, int4 len2, char *addr2);
 
-boolean_t incr_link(int file_desc, zro_ent *dummy, uint4 fname_len, char *fname)
+boolean_t incr_link(int *file_desc, zro_ent *dummy, uint4 fname_len, char *fname)
 {
 	rhdtyp		*hdr, *old_rhead;
 	int 		code_size, save_errno, cnt;
@@ -64,20 +65,20 @@ boolean_t incr_link(int file_desc, zro_ent *dummy, uint4 fname_len, char *fname)
 	int		order;
 	struct exec 	file_hdr;
 
-	assert(file_desc);
+	assert(file_desc && (FD_INVALID != *file_desc));
 	urx_lcl_anchor.len = 0;
 	urx_lcl_anchor.addr = 0;
 	urx_lcl_anchor.lab = 0;
 	urx_lcl_anchor.next = 0;
 	code = NULL;
-	DOREADRL(file_desc, &file_hdr, SIZEOF(file_hdr), read_size);
+	DOREADRL(*file_desc, &file_hdr, SIZEOF(file_hdr), read_size);
 	if (read_size != SIZEOF(file_hdr))
 	{
 		if (-1 == read_size)
 		{
 			save_errno = errno;
 			zl_error(file_desc, ERR_INVOBJFILE, fname_len, fname, ERR_TEXT, strlen(STRERROR(save_errno)),
-					STRERROR(save_errno));
+				 STRERROR(save_errno));
 		} else
 			zl_error(file_desc, ERR_INVOBJFILE, fname_len, fname, ERR_TEXT, RTS_ERROR_TEXT("reading file header"));
 	} else if (OMAGIC != file_hdr.a_magic)
@@ -87,7 +88,7 @@ boolean_t incr_link(int file_desc, zro_ent *dummy, uint4 fname_len, char *fname)
 	assert(0 == file_hdr.a_bss);
 	code_size = file_hdr.a_text + file_hdr.a_data;
 	code = GTM_TEXT_ALLOC(code_size);
-	DOREADRL(file_desc, code, code_size, read_size);
+	DOREADRL(*file_desc, code, code_size, read_size);
 	if (read_size != code_size)
 	{
 		if (-1 == read_size)
@@ -117,7 +118,7 @@ boolean_t incr_link(int file_desc, zro_ent *dummy, uint4 fname_len, char *fname)
 	for (cnt = hdr->labtab_len, curlab = LABTAB_ADR(hdr); cnt; --cnt, ++curlab)
 		/* relocate the label table */
 		curlab->lab_name.addr += (uint4)literal_ptr;
-	if (!addr_fix(file_desc, &file_hdr, &urx_lcl_anchor, hdr))
+	if (!addr_fix(*file_desc, &file_hdr, &urx_lcl_anchor, hdr))
 	{
 		urx_free(&urx_lcl_anchor);
 		zl_error(file_desc, ERR_INVOBJFILE, fname_len, fname, ERR_TEXT, RTS_ERROR_TEXT("address fixup failure"));
@@ -409,7 +410,7 @@ void res_free(res_list *root)
  * err - an error code that accepts no arguments and
  * err2 - an error code that accepts two arguments (!AD)
  */
-void zl_error(int4 file, int4 err, int4 len, char *addr, int4 err2, int4 len2, char *addr2)
+void zl_error(int4 *file, int4 err, int4 len, char *addr, int4 err2, int4 len2, char *addr2)
 {
 	int rc;
 
@@ -418,7 +419,11 @@ void zl_error(int4 file, int4 err, int4 len, char *addr, int4 err2, int4 len2, c
 		GTM_TEXT_FREE(code);
 		code = NULL;
 	}
-	CLOSEFILE_RESET(file, rc);	/* resets "file" to FD_INVALID */
+	if (0 < *file)
+	{
+		CLOSEFILE_RESET(*file, rc);	/* resets "*file" to FD_INVALID */
+	} else
+		*file = FD_INVALID;
 	if (0 != err2)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) err, 2, len, addr, err2, 2, len2, addr2);
 	else
diff --git a/sr_i386/merrors_ansi.h b/sr_i386/merrors_ansi.h
index f00646a..558ea24 100644
--- a/sr_i386/merrors_ansi.h
+++ b/sr_i386/merrors_ansi.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,7 +10,6 @@
  *								*
  ****************************************************************/
 
-
 const static readonly int error_ansi[] = {
 	   0,	/* ACK */
 	   0,	/* BREAKZST */
@@ -510,8 +510,8 @@ const static readonly int error_ansi[] = {
 	   0,	/* NOPRINCIO */
 	   0,	/* INVPORTSPEC */
 	   0,	/* INVADDRSPEC */
-	  78,	/* UNUSEDMSG677 */
-	   0,	/* UNUSEDMSG678 */
+	  78,	/* UNUSEDMSG678 */
+	   0,	/* UNUSEDMSG679 */
 	  80,	/* SOCKWAIT */
 	  81,	/* SOCKACPT */
 	  80,	/* SOCKINIT */
@@ -609,7 +609,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* FREEZEID */
 	   0,	/* BLKWRITERR */
 	   0,	/* STOPTIMEOUT */
-	   0,	/* UNUSEDMSG776 */
+	   0,	/* UNUSEDMSG777 */
 	   0,	/* BCKUPBUFLUSH */
 	   0,	/* NOFORKCORE */
 	   0,	/* JNLREAD */
@@ -732,7 +732,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* MUINFOUINT4 */
 	   0,	/* NLMISMATCHCALC */
 	   0,	/* RELINKCTLFULL */
-	   0,	/* UNUSEDMSG899 */
+	   0,	/* UNUSEDMSG900 */
 	   0,	/* DBBADNSUB */
 	   0,	/* DBBADKYNM */
 	   0,	/* DBBADPNTR */
@@ -783,7 +783,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* DBMBPFRINT */
 	   0,	/* DBMAXKEYEXC */
 	   0,	/* DBMXRSEXCMIN */
-	   0,	/* UNUSEDMSG950 */
+	   0,	/* UNUSEDMSG951 */
 	   0,	/* DBREADBM */
 	   0,	/* DBCOMPTOOLRG */
 	   0,	/* DBVERPERFWARN2 */
@@ -1152,7 +1152,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* CRYPTKEYFETCHFAILED */
 	   0,	/* CRYPTKEYFETCHFAILEDNF */
 	   0,	/* CRYPTHASHGENFAILED */
-	   0,	/* UNUSEDMSG1319 */
+	   0,	/* UNUSEDMSG1320 */
 	   0,	/* BADTAG */
 	   0,	/* ICUVERLT36 */
 	   0,	/* ICUSYMNOTFOUND */
@@ -1206,7 +1206,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* MUUSERLBK */
 	   0,	/* SETINSETTRIGONLY */
 	   0,	/* DZTRIGINTRIG */
-	   0,	/* UNUSEDMSG1373 */
+	   0,	/* UNUSEDMSG1374 */
 	   0,	/* BOOLSIDEFFECT */
 	   0,	/* DBBADUPGRDSTATE */
 	   0,	/* WRITEWAITPID */
@@ -1218,7 +1218,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* JNLORDBFLU */
 	   0,	/* ZCCLNUPRTNMISNG */
 	   0,	/* ZCINVALIDKEYWORD */
-	   0,	/* UNUSEDMSG1385 */
+	   0,	/* UNUSEDMSG1386 */
 	   0,	/* DBSHMNAMEDIFF */
 	   0,	/* SHMREMOVED */
 	   0,	/* DEVICEWRITEONLY */
@@ -1370,7 +1370,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* ISSPANGBL */
 	   0,	/* TPNOSUPPORT */
 	   0,	/* GVSUBSERR */
-	   0,	/* UNUSEDMSG1539 */
+	   0,	/* UNUSEDMSG1540 */
 	   0,	/* FILTERTIMEDOUT */
 	   0,	/* TLSDLLNOOPEN */
 	   0,	/* TLSINIT */
@@ -1422,4 +1422,15 @@ const static readonly int error_ansi[] = {
 	   0,	/* RLNKRECLATCH */
 	   0,	/* RLNKSHMLATCH */
 	   0,	/* JOBLVN2LONG */
+	   0,	/* JOBLVNDETAIL */
+	   0,	/* PREALLOCATEFAIL */
+	   0,	/* NODFRALLOCSUPP */
+	   0,	/* LASTWRITERBYPAS */
+	   0,	/* TRIGUPBADLABEL */
+	   0,	/* WEIRDSYSTIME */
+	   0,	/* REPLSRCEXITERR */
+	   0,	/* INVZBREAK */
+	   0,	/* INVTMPDIR */
+	   0,	/* ARCTLMAXHIGH */
+	   0,	/* ARCTLMAXLOW */
 	};
diff --git a/sr_i386/merrors_ctl.c b/sr_i386/merrors_ctl.c
index fc01b83..9482212 100644
--- a/sr_i386/merrors_ctl.c
+++ b/sr_i386/merrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
@@ -512,8 +512,8 @@ LITDEF	err_msg merrors[] = {
 	"NOPRINCIO", "Unable to write to principal device", 0,
 	"INVPORTSPEC", "Invalid port specification", 0,
 	"INVADDRSPEC", "Invalid IP address specification", 0,
-	"UNUSEDMSG677", "SOCKPARMREQ last used in V6.0-002", 0,
-	"UNUSEDMSG678", "IPADDRREQ last used in V6.0-002", 0,
+	"UNUSEDMSG678", "SOCKPARMREQ last used in V6.0-002", 0,
+	"UNUSEDMSG679", "IPADDRREQ last used in V6.0-002", 0,
 	"SOCKWAIT", "Error waiting for socket connection", 0,
 	"SOCKACPT", "Error accepting socket connection", 0,
 	"SOCKINIT", "Error initializing socket: (errno == !UL) !AD", 3,
@@ -542,7 +542,7 @@ LITDEF	err_msg merrors[] = {
 	"MUSTANDALONE", "Could not get exclusive access to !AD", 2,
 	"MUNOACTION", "MUPIP unable to perform requested action", 0,
 	"RMBIGSHARE", "File with BIGRECORD specified may only be shared if READONLY", 0,
-	"TPRESTART", "Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16 at XQ", 14,
+	"TPRESTART", "Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16 at XQ, zpos: !AD", 16,
 	"SOCKWRITE", "Write to a socket failed", 0,
 	"DBCNTRLERR", "Database file !AD: control error suspected but not found", 2,
 	"NOTERMENV", "Environment variable TERM not set.  Assuming \"unknown.\"", 0,
@@ -611,7 +611,7 @@ LITDEF	err_msg merrors[] = {
 	"FREEZEID", "Cache !AD on !AD by freeze id 0x!XL with match 0x!XL from 0x!XJ", 7,
 	"BLKWRITERR", "Unable to queue disk write for block 0x!XL.  Will keep trying.", 1,
 	"STOPTIMEOUT", "Waited too long for stopped process to release.  Region: !AD.", 2,
-	"UNUSEDMSG776", "TRIGMODINTP last used in V6.2-000", 0,
+	"UNUSEDMSG777", "TRIGMODINTP last used in V6.2-000", 0,
 	"BCKUPBUFLUSH", "Unable to flush buffer for online backup", 0,
 	"NOFORKCORE", "Unable to fork off process to create core.  Core creation postponed.", 0,
 	"JNLREAD", "Error reading from journal file !AD at offset [0x!XL]", 3,
@@ -734,7 +734,7 @@ LITDEF	err_msg merrors[] = {
 	"MUINFOUINT4", "!AD : !UL [0x!XL]", 4,
 	"NLMISMATCHCALC", "Location of !AD expected at 0x!XL, but found at 0x!XL", 4,
 	"RELINKCTLFULL", "Relinkctl file for directory !AD is full (maximum entries !UL)", 3,
-	"UNUSEDMSG899", "GTMSECSHRDEFLOG last used in V5.5-000", 0,
+	"UNUSEDMSG900", "GTMSECSHRDEFLOG last used in V5.5-000", 0,
 	"DBBADNSUB", "!AD Bad numeric subscript", 2,
 	"DBBADKYNM", "!AD Bad key name", 2,
 	"DBBADPNTR", "!AD Bad pointer value in directory", 2,
@@ -785,7 +785,7 @@ LITDEF	err_msg merrors[] = {
 	"DBMBPFRINT", "!AD Master bit map shows this map has space, agreeing with MUPIP INTEG", 2,
 	"DBMAXKEYEXC", "!AD Maximum key size for database exceeds design maximum", 2,
 	"DBMXRSEXCMIN", "!AD Maximum record size for database is less than the design minimum", 2,
-	"UNUSEDMSG950", "DBMAXRSEXBL : Last used in V5.5-000", 0,
+	"UNUSEDMSG951", "DBMAXRSEXBL : Last used in V5.5-000", 0,
 	"DBREADBM", "!AD Read error on bitmap", 2,
 	"DBCOMPTOOLRG", "!AD Record has too large compression count", 2,
 	"DBVERPERFWARN2", "Peformance warning: Database !AD is not fully upgraded. Run MUPIP REORG UPGRADE for best overall performance", 2,
@@ -1154,7 +1154,7 @@ LITDEF	err_msg merrors[] = {
 	"CRYPTKEYFETCHFAILED", "Could not retrieve encryption key corresponding to file !AD. !AD", 4,
 	"CRYPTKEYFETCHFAILEDNF", "Could not retrieve encryption key during !AD operation key. !AD", 4,
 	"CRYPTHASHGENFAILED", "Could not generate cryptographic hash for symmetric key corresponding to file !AD. !AD", 4,
-	"UNUSEDMSG1319", "CRYPTNOPSWDINTP : Last used in V6.0-003", 0,
+	"UNUSEDMSG1320", "CRYPTNOPSWDINTP : Last used in V6.0-003", 0,
 	"BADTAG", "Unable to use file !AD (CCSID !UL) with CCSID !UL", 4,
 	"ICUVERLT36", "!AD !UL.!UL. ICU version greater than or equal to 3.6 should be used", 4,
 	"ICUSYMNOTFOUND", "Symbol !AD not found in the ICU libraries. ICU needs to be built with symbol-renaming disabled or gtm_icu_version environment variable needs to be properly specified", 2,
@@ -1208,7 +1208,7 @@ LITDEF	err_msg merrors[] = {
 	"MUUSERLBK", "Abnormal shutdown of replication-enabled database !AD detected", 2,
 	"SETINSETTRIGONLY", "ISV !AD can only be modified in a 'SET' type trigger", 2,
 	"DZTRIGINTRIG", "$ZTRIGGER() is not allowed inside trigger context. Trigger name: !AD", 2,
-	"UNUSEDMSG1373", "SECNODZTRIGINTP : Last used in V6.2-000", 0,
+	"UNUSEDMSG1374", "SECNODZTRIGINTP : Last used in V6.2-000", 0,
 	"BOOLSIDEFFECT", "Extrinsic ($$), External call ($&) or $INCREMENT() with potential side effects in Boolean expression", 0,
 	"DBBADUPGRDSTATE", "Correcting conflicting values for fields describing database version upgrade state in the file header for region !AD (!AD) - make fresh backups with new journal files immediately.", 4,
 	"WRITEWAITPID", "PID !UL waited !UL minute(s) for PID !UL to finish writing block 0x!XL in database file !AD", 6,
@@ -1220,7 +1220,7 @@ LITDEF	err_msg merrors[] = {
 	"JNLORDBFLU", "Error flushing database blocks to !AD. See related messages in the operator log", 2,
 	"ZCCLNUPRTNMISNG", "External call: Cleanup routine name missing. Cannot continue", 0,
 	"ZCINVALIDKEYWORD", "External call: Invalid keyword found. Cannot continue", 0,
-	"UNUSEDMSG1385", "REPLNOMULTILINETRG : Last used in V6.2-000", 0,
+	"UNUSEDMSG1386", "REPLNOMULTILINETRG : Last used in V6.2-000", 0,
 	"DBSHMNAMEDIFF", "Database file !AD points to shared memory (id = !UL) which points to a different database file !AZ", 4,
 	"SHMREMOVED", "Removed Shared Memory id !UL corresponding to file !AD", 3,
 	"DEVICEWRITEONLY", "Cannot read from a write-only device", 0,
@@ -1372,7 +1372,7 @@ LITDEF	err_msg merrors[] = {
 	"ISSPANGBL", "Operation cannot be performed on global ^!AD as it spans multiple regions in current global directory", 2,
 	"TPNOSUPPORT", "Operation cannot be performed while inside of a TP transaction", 0,
 	"GVSUBSERR", "Invalid subscripted global name specification in $VIEW() function", 0,
-	"UNUSEDMSG1539", "TRIGNOSPANBL : Last used in V6.2-000", 0,
+	"UNUSEDMSG1540", "TRIGNOSPANBL : Last used in V6.2-000", 0,
 	"FILTERTIMEDOUT", "Replication server timed out attempting to read seqno !16 at XQ from external filter", 1,
 	"TLSDLLNOOPEN", "Failed to load GT.M TLS/SSL library for secure communication", 0,
 	"TLSINIT", "Failed to initialize GT.M TLS/SSL library for secure communication", 0,
@@ -1408,7 +1408,7 @@ LITDEF	err_msg merrors[] = {
 	"CRYPTBADWRTPOS", "Encrypted WRITE disallowed from a position different than where the last WRITE completed", 0,
 	"LABELNOTFND", "GOTO referenced a label that does not exist", 0,
 	"RELINKCTLERR", "Error with relink control structure for $ZROUTINES directory !AD", 2,
-	"INVLINKTMPDIR", "Value for $gtm_linktmpdir is either not found or not a directory: !AD", 2,
+	"INVLINKTMPDIR", "Value for $gtm_linktmpdir is either not found or not a directory(!AD) - Reverting to default value", 2,
 	"NOEDITOR", "Can't find an executable editor: !AD", 2,
 	"UPDPROC", "Update Process error", 0,
 	"HLPPROC", "Helper Process error", 0,
@@ -1423,7 +1423,18 @@ LITDEF	err_msg merrors[] = {
 	"TLSPARAM", "TLS parameter !AD !AD", 4,
 	"RLNKRECLATCH", "Failed to get latch on relinkctl record for routine name !AZ in $ZROUTINES directory !AD", 3,
 	"RLNKSHMLATCH", "Failed to get latch on relinkctl shared memory for $ZROUTINES directory !AD", 2,
-	"JOBLVN2LONG", "The zwrite representation of a local variable transferred to a JOB'd process can not exceed !UL. Encountered size: !UL", 2,
+	"JOBLVN2LONG", "The zwrite representation of a local variable transferred to a JOB'd process is too long. Please check the output of the JOB'd process for more details", 0,
+	"JOBLVNDETAIL", "The zwrite representation of a local variable transferred to a JOB'd process is too long. The zwrite representation cannot exceed !UL. Encountered size: !UL", 2,
+	"PREALLOCATEFAIL", "Disk space reservation for !AD segment has failed", 2,
+	"NODFRALLOCSUPP", "The NODEFER_ALLOCATE qualifier is not allowed on this operating system. Not changing the defer allocation flag", 0,
+	"LASTWRITERBYPAS", "The last writer for database file !AD bypassed the rundown", 2,
+	"TRIGUPBADLABEL", "Trigger upgrade cannot upgrade label !UL to !UL on ^!AD in region !AD", 6,
+	"WEIRDSYSTIME", "Time reported by the system clock is outside the acceptable range.  Please check and correct the system clock", 0,
+	"REPLSRCEXITERR", "Source server for secondary instance !AZ exited abnormally. See log file !AZ for details.", 2,
+	"INVZBREAK", "Cannot set ZBREAK in direct mode routine (GTM$DMOD)", 0,
+	"INVTMPDIR", "Value or default for $gtm_tmp is either not found or not a directory (!AD) - Reverting to default value", 2,
+	"ARCTLMAXHIGH", "The environment variable !AD = !UL is too high. Assuming the maximum acceptable value of !UL", 4,
+	"ARCTLMAXLOW", "The environment variable !AD = !UL is too low. Assuming the minimum acceptable value of !UL", 4,
 };
 
 LITDEF	int ERR_ACK = 150372361;
@@ -1925,8 +1936,8 @@ LITDEF	int ERR_CCPSIGDMP = 150376323;
 LITDEF	int ERR_NOPRINCIO = 150376332;
 LITDEF	int ERR_INVPORTSPEC = 150376338;
 LITDEF	int ERR_INVADDRSPEC = 150376346;
-LITDEF	int ERR_UNUSEDMSG677 = 150376354;
-LITDEF	int ERR_UNUSEDMSG678 = 150376362;
+LITDEF	int ERR_UNUSEDMSG678 = 150376354;
+LITDEF	int ERR_UNUSEDMSG679 = 150376362;
 LITDEF	int ERR_SOCKWAIT = 150376370;
 LITDEF	int ERR_SOCKACPT = 150376378;
 LITDEF	int ERR_SOCKINIT = 150376386;
@@ -2024,7 +2035,7 @@ LITDEF	int ERR_MEMORYRECURSIVE = 150377116;
 LITDEF	int ERR_FREEZEID = 150377123;
 LITDEF	int ERR_BLKWRITERR = 150377131;
 LITDEF	int ERR_STOPTIMEOUT = 150377138;
-LITDEF	int ERR_UNUSEDMSG776 = 150377146;
+LITDEF	int ERR_UNUSEDMSG777 = 150377146;
 LITDEF	int ERR_BCKUPBUFLUSH = 150377154;
 LITDEF	int ERR_NOFORKCORE = 150377160;
 LITDEF	int ERR_JNLREAD = 150377170;
@@ -2147,7 +2158,7 @@ LITDEF	int ERR_SCNDDBNOUPD = 150378098;
 LITDEF	int ERR_MUINFOUINT4 = 150378107;
 LITDEF	int ERR_NLMISMATCHCALC = 150378114;
 LITDEF	int ERR_RELINKCTLFULL = 150378122;
-LITDEF	int ERR_UNUSEDMSG899 = 150378131;
+LITDEF	int ERR_UNUSEDMSG900 = 150378131;
 LITDEF	int ERR_DBBADNSUB = 150378138;
 LITDEF	int ERR_DBBADKYNM = 150378146;
 LITDEF	int ERR_DBBADPNTR = 150378154;
@@ -2198,7 +2209,7 @@ LITDEF	int ERR_DBMBPFRDLBM = 150378504;
 LITDEF	int ERR_DBMBPFRINT = 150378512;
 LITDEF	int ERR_DBMAXKEYEXC = 150378522;
 LITDEF	int ERR_DBMXRSEXCMIN = 150378530;
-LITDEF	int ERR_UNUSEDMSG950 = 150378538;
+LITDEF	int ERR_UNUSEDMSG951 = 150378538;
 LITDEF	int ERR_DBREADBM = 150378546;
 LITDEF	int ERR_DBCOMPTOOLRG = 150378554;
 LITDEF	int ERR_DBVERPERFWARN2 = 150378560;
@@ -2567,7 +2578,7 @@ LITDEF	int ERR_CRYPTJNLWRONGHASH = 150381458;
 LITDEF	int ERR_CRYPTKEYFETCHFAILED = 150381466;
 LITDEF	int ERR_CRYPTKEYFETCHFAILEDNF = 150381474;
 LITDEF	int ERR_CRYPTHASHGENFAILED = 150381482;
-LITDEF	int ERR_UNUSEDMSG1319 = 150381490;
+LITDEF	int ERR_UNUSEDMSG1320 = 150381490;
 LITDEF	int ERR_BADTAG = 150381498;
 LITDEF	int ERR_ICUVERLT36 = 150381506;
 LITDEF	int ERR_ICUSYMNOTFOUND = 150381514;
@@ -2621,7 +2632,7 @@ LITDEF	int ERR_GVZTRIGFAIL = 150381890;
 LITDEF	int ERR_MUUSERLBK = 150381898;
 LITDEF	int ERR_SETINSETTRIGONLY = 150381906;
 LITDEF	int ERR_DZTRIGINTRIG = 150381914;
-LITDEF	int ERR_UNUSEDMSG1373 = 150381922;
+LITDEF	int ERR_UNUSEDMSG1374 = 150381922;
 LITDEF	int ERR_BOOLSIDEFFECT = 150381928;
 LITDEF	int ERR_DBBADUPGRDSTATE = 150381936;
 LITDEF	int ERR_WRITEWAITPID = 150381946;
@@ -2633,7 +2644,7 @@ LITDEF	int ERR_GTMSECSHRCHDIRF = 150381986;
 LITDEF	int ERR_JNLORDBFLU = 150381994;
 LITDEF	int ERR_ZCCLNUPRTNMISNG = 150382002;
 LITDEF	int ERR_ZCINVALIDKEYWORD = 150382010;
-LITDEF	int ERR_UNUSEDMSG1385 = 150382018;
+LITDEF	int ERR_UNUSEDMSG1386 = 150382018;
 LITDEF	int ERR_DBSHMNAMEDIFF = 150382026;
 LITDEF	int ERR_SHMREMOVED = 150382035;
 LITDEF	int ERR_DEVICEWRITEONLY = 150382042;
@@ -2785,7 +2796,7 @@ LITDEF	int ERR_GBLNOMAPTOREG = 150383202;
 LITDEF	int ERR_ISSPANGBL = 150383210;
 LITDEF	int ERR_TPNOSUPPORT = 150383218;
 LITDEF	int ERR_GVSUBSERR = 150383226;
-LITDEF	int ERR_UNUSEDMSG1539 = 150383234;
+LITDEF	int ERR_UNUSEDMSG1540 = 150383234;
 LITDEF	int ERR_FILTERTIMEDOUT = 150383242;
 LITDEF	int ERR_TLSDLLNOOPEN = 150383250;
 LITDEF	int ERR_TLSINIT = 150383258;
@@ -2837,9 +2848,20 @@ LITDEF	int ERR_TLSPARAM = 150383618;
 LITDEF	int ERR_RLNKRECLATCH = 150383626;
 LITDEF	int ERR_RLNKSHMLATCH = 150383634;
 LITDEF	int ERR_JOBLVN2LONG = 150383642;
+LITDEF	int ERR_JOBLVNDETAIL = 150383650;
+LITDEF	int ERR_PREALLOCATEFAIL = 150383658;
+LITDEF	int ERR_NODFRALLOCSUPP = 150383664;
+LITDEF	int ERR_LASTWRITERBYPAS = 150383672;
+LITDEF	int ERR_TRIGUPBADLABEL = 150383682;
+LITDEF	int ERR_WEIRDSYSTIME = 150383690;
+LITDEF	int ERR_REPLSRCEXITERR = 150383696;
+LITDEF	int ERR_INVZBREAK = 150383706;
+LITDEF	int ERR_INVTMPDIR = 150383714;
+LITDEF	int ERR_ARCTLMAXHIGH = 150383720;
+LITDEF	int ERR_ARCTLMAXLOW = 150383728;
 
 GBLDEF	err_ctl merrors_ctl = {
 	246,
 	"GTM",
 	&merrors[0],
-	1411};
+	1422};
diff --git a/sr_i386/op_callsp.s b/sr_i386/op_callsp.s
index 8701596..186f45a 100644
--- a/sr_i386/op_callsp.s
+++ b/sr_i386/op_callsp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2001 Sanchez Computer Associates, Inc.	#
+# Copyright (c) 2001-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,27 +10,22 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_callsp.s
+	.include "linkage.si"
+	.include "g_msf.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_callsp
-#	PAGE	+
-	.DATA
-.extern	dollar_truth
-.extern	frame_pointer
+	.data
+	.extern	dollar_truth
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame
-.extern	push_tval
+	.extern	exfun_frame
+	.extern	push_tval
+
+	#
+	# Note this routine calls exfun_frame() instead of copy_stack_frame() because this routine needs to provide a
+	# separate set of compiler temps for use by the new frame. Particularly when it called on same line with FOR.
+	#
 
-	.sbttl	op_callspb
-# PUBLIC	op_callspb
 ENTRY op_callspb
 	movl	frame_pointer,%edx
 	movl	(%esp),%eax
@@ -42,10 +38,7 @@ doit:	call	exfun_frame
 	movl	frame_pointer,%edx
 	movl	msf_temps_ptr_off(%edx),%edi
 	ret
-# op_callspb ENDP
 
-	.sbttl	op_callspw, op_callspl
-# PUBLIC	op_callspw, op_callspl
 ENTRY op_callspw
 ENTRY op_callspl
 	movl	frame_pointer,%edx
@@ -53,6 +46,3 @@ ENTRY op_callspl
 	movl	%eax,msf_mpc_off(%edx)
 	addl	$5,msf_mpc_off(%edx)	# store pc in MUMPS stack frame
 	jmp	doit
-# op_callspw ENDP
-
-# END
diff --git a/sr_i386/ttt.c b/sr_i386/ttt.c
index b22f628..5900dcb 100644
--- a/sr_i386/ttt.c
+++ b/sr_i386/ttt.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
diff --git a/sr_linux/gtm_env_sp.csh b/sr_linux/gtm_env_sp.csh
index fd4bc67..30e1003 100644
--- a/sr_linux/gtm_env_sp.csh
+++ b/sr_linux/gtm_env_sp.csh
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2001, 2014 Fidelity Information Services, Inc	#
+# Copyright (c) 2001-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -110,7 +111,7 @@ if ( $?gtm_version_change == "1" ) then
 
 	# to avoid naming files with .S
 	# smw 1999/12/04 setenv gt_as_options_common	"-c -x assembler-with-cpp"
-	setenv gt_as_option_DDEBUG	""
+	setenv gt_as_option_DDEBUG	"-defsym DEBUG=1"
 
 	# C definitions:
 
diff --git a/sr_linux/release_name.h b/sr_linux/release_name.h
index 051fb77..4f434e0 100644
--- a/sr_linux/release_name.h
+++ b/sr_linux/release_name.h
@@ -10,15 +10,15 @@
  ****************************************************************/
 
 #ifdef __CYGWIN__
-#define GTM_RELEASE_NAME 	"GT.M V6.2-001 CYGWIN x86"
+#define GTM_RELEASE_NAME 	"GT.M V6.2-002 CYGWIN x86"
 #elif defined(__ia64)
-#define GTM_RELEASE_NAME 	"GT.M V6.2-001 Linux IA64"
+#define GTM_RELEASE_NAME 	"GT.M V6.2-002 Linux IA64"
 #elif defined(__x86_64__)
-#define GTM_RELEASE_NAME 	"GT.M V6.2-001 Linux x86_64"
+#define GTM_RELEASE_NAME 	"GT.M V6.2-002 Linux x86_64"
 #elif defined(__s390__)
-#define GTM_RELEASE_NAME 	"GT.M V6.2-001 Linux S390X"
+#define GTM_RELEASE_NAME 	"GT.M V6.2-002 Linux S390X"
 #else
-#define GTM_RELEASE_NAME 	"GT.M V6.2-001 Linux x86"
+#define GTM_RELEASE_NAME 	"GT.M V6.2-002 Linux x86"
 #endif
 #define GTM_PRODUCT 		"GT.M"
 #define GTM_VERSION		"V6.2"
diff --git a/sr_port/adjust_frames.c b/sr_port/adjust_frames.c
index 9124d8c..d9aac1f 100644
--- a/sr_port/adjust_frames.c
+++ b/sr_port/adjust_frames.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2002, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2002-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,24 +14,38 @@
 
 #include <rtnhdr.h>
 #include "stack_frame.h"
+#include "arlinkdbg.h"
 
 GBLREF stack_frame	*frame_pointer;
 
+/* Routine used when creating a private copy of shared code so we can insert breakpoints in it or when releasing such
+ * a private code copy when all breakpoints in a shared routine are removed. This routine modifies the mpc value
+ * in instance of the M stack for this routine to point to the process private code on allocation or back to the
+ * shared copy when the storage is removed.
+ *
+ * Arguments are the start/end addresses of the previous section and the address of the code section to use
+ * instead.
+ */
 void adjust_frames(unsigned char *old_ptext_beg, unsigned char *old_ptext_end, unsigned char *new_ptext_beg)
 {
 	stack_frame	*fp;
 
 	for (fp = frame_pointer; NULL != fp; fp = fp->old_frame_pointer)
 	{
-#ifdef		GTM_TRIGGER
+#		ifdef GTM_TRIGGER
 		if (fp->type & SFT_TRIGR)
 			/* Have a trigger baseframe, pick up stack continuation frame_pointer stored by base_frame() */
 			fp = *(stack_frame **)(fp + 1);
 		assert(fp);
-#endif
+#		endif
 		assert((frame_pointer < frame_pointer->old_frame_pointer) || (NULL == frame_pointer->old_frame_pointer));
-		if (old_ptext_beg <= fp->mpc && fp->mpc <= old_ptext_end)
+		if ((old_ptext_beg <= fp->mpc) && (fp->mpc <= old_ptext_end))
+		{
+			DBGARLNK((stderr, "adjust_frames: M stackframe 0x"lvaddr" resetting mpc from 0x"lvaddr" to 0x"lvaddr
+				  " for private code alloc/release (new seg 0x"lvaddr", old seg 0x"lvaddr")\n", fp, fp->mpc,
+				  fp->mpc + (new_ptext_beg - old_ptext_beg), old_ptext_beg, new_ptext_beg));
 			fp->mpc += (new_ptext_beg - old_ptext_beg);
+		}
 	}
 	return;
 }
diff --git a/sr_port/advancewindow.c b/sr_port/advancewindow.c
index 802a1cc..0582b1a 100644
--- a/sr_port/advancewindow.c
+++ b/sr_port/advancewindow.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -140,6 +141,7 @@ void advancewindow(void)
 		(TREF(director_mval)).mvtype = MV_STR;
 		(TREF(director_mval)).str.addr = (char *)cp3;
 		(TREF(director_mval)).str.len = INTCAST(cp2 - cp3);
+		CLEAR_MVAL_BITS(TADR(director_mval));
 		stringpool.free = cp2;
 		s2n(&(TREF(director_mval)));
 #		ifdef UNICODE_SUPPORTED
@@ -181,6 +183,7 @@ void advancewindow(void)
 		(TREF(director_mval)).str.addr = lexical_ptr;
 		(TREF(director_mval)).str.len = TREF(max_advancewindow_line);
 		(TREF(director_mval)).mvtype = MV_STR;
+		CLEAR_MVAL_BITS(TADR(director_mval));
 		lexical_ptr = (char *)s2n(&(TREF(director_mval)));
 		if (!((TREF(director_mval)).mvtype &= MV_NUM_MASK))
 		{
@@ -301,7 +304,7 @@ void advancewindow(void)
 void advwindw_hash_in_mname_allowed(void)
 {
 	unsigned char	*cp2, *cp3, x;
-	unsigned char	ident_buffer[SIZEOF(mident_fixed)];
+	unsigned char	ident_buffer[(MAX_MIDENT_LEN * 2) + 1];
 	int		ident_len, ch;
 	DCL_THREADGBL_ACCESS;
 
@@ -312,7 +315,9 @@ void advwindw_hash_in_mname_allowed(void)
 	memcpy(ident_buffer, (TREF(window_ident)).addr, (TREF(window_ident)).len);
 	/* Now parse further until we run out of [m]ident */
 	cp2 = ident_buffer + (TREF(window_ident)).len;
-	cp3 = ident_buffer + MAX_MIDENT_LEN;
+	cp3 = ident_buffer + ARRAYSIZE(ident_buffer);
+	if (MAX_MIDENT_LEN == (TREF(window_ident)).len)
+		cp2--;
 	*cp2++ = '#';	/* We are only called if director token is '#' so put that char in buffer now */
 	/* Start processing with the token following the '#'. Allow '#' and/or '/' in addition to usual stuff. */
 	for (x = *lexical_ptr, ch = ctypetab[x];
diff --git a/sr_port/alias_funcs.c b/sr_port/alias_funcs.c
index 13b39b5..c0e6400 100644
--- a/sr_port/alias_funcs.c
+++ b/sr_port/alias_funcs.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -975,9 +976,8 @@ ht_ent_mname *als_lookup_base_lvval(lv_val *lvp)
  *
  * 1)  Run lv_blks which contain all lv_val structures in use for this symbol table.
  * 2)  Record each base lv_val in our version of the array used by stp_gcol. Base lv_vals can be identified
- *     by having a non-zero parent.sym field pointing to a block with type MV_SYM. There are 3 exceptions to
- *     this: In UNIX, the zsearch_var, zsearch_dir1, and zsearch_dir2 fields contain lv_vals that should not be
- *     released. Check for and avoid them.
+ *     by having a non-zero parent.sym field pointing to a block with type MV_SYM. There is one exception to this:
+ *     In UNIX, the zsearch_var fields contains an lv_val that should not be released. Check for and avoid it.
  * 3)  Increment lvtaskcycle with which we will mark lv_vals as having been marked accessible as we discover them.
  * 4)  Go through the hashtable. Set the lvtaskcycle field to mark the lv_val "reachable".
  * 5)  If the lv_val has descendants, run the decendant chain to look for container vars.
@@ -1019,8 +1019,7 @@ int als_lvval_gc(void)
 		{
 			sym = LV_SYMVAL(lvp);
 			assert((NULL == sym) || SYM_IS_SYMVAL(sym));
-			if ((NULL != sym) UNIX_ONLY(&& (TREF(zsearch_var) != lvp))
-				UNIX_ONLY(&& (TREF(zsearch_dir1) != lvp) && (TREF(zsearch_dir2) != lvp)))
+			if ((NULL != sym) UNIX_ONLY(&& (TREF(zsearch_var) != lvp)))
 			{	/* Put it in the list */
 				assert(0 < lvp->stats.trefcnt);
 				ADD_TO_STPARRAY(lvp, lvarray, lvarraycur, lvarraytop, lv_val);
diff --git a/sr_port/azl_geturxrtn.c b/sr_port/azl_geturxrtn.c
index 779d3f8..299da5a 100644
--- a/sr_port/azl_geturxrtn.c
+++ b/sr_port/azl_geturxrtn.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,7 +10,12 @@
  *								*
  ****************************************************************/
 
+/* This routine is no longer used in $sr_unix for autorelink-enabled platforms. If/when the
+ * last use of this routine disappears (list as of 03/2015 is sr_i386 and sr_ia64) this
+ * routine is eligible for nixing.
+ */
 #include "mdef.h"
+
 #include "urx.h"
 
 GBLREF urx_rtnref urx_anchor;
diff --git a/sr_port/bx_boolop.c b/sr_port/bx_boolop.c
index d2bce8e..98170e6 100644
--- a/sr_port/bx_boolop.c
+++ b/sr_port/bx_boolop.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -82,7 +83,7 @@ void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean
 		*p = put_tjmp(t);
 	} else
 		p = addr;
-	if (!TREF(saw_side_effect) || ((OLD_SE == TREF(side_effect_handling)) && (GTM_BOOL == TREF(gtm_fullbool))))
+	if (!TREF(saw_side_effect) || (GTM_BOOL == TREF(gtm_fullbool)))
 	{	/* nice simple short circuit */
 		assert(NULL == TREF(boolchain_ptr));
 		bx_tail(t->operand[0].oprval.tref, jmp_type_one, p);
@@ -107,13 +108,8 @@ void bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean
 		TREF(boolchain_ptr) = &(TREF(boolchain));
 		dqinit(TREF(boolchain_ptr), exorder);
 		t0 = t->exorder.fl;
-		if (NULL == TREF(bool_targ_ptr))
-		{								/* first time - set up anchor */
-			TREF(bool_targ_ptr) = &(TREF(bool_targ_anchor));	/* mcalloc won't persist over multiple complies */
-			dqinit(TREF(bool_targ_ptr), que);
-		} else								/* queue should be empty */
-			assert((TREF(bool_targ_ptr) == (TREF(bool_targ_ptr))->que.fl)
-				&& (TREF(bool_targ_ptr) == (TREF(bool_targ_ptr))->que.bl));
+		TREF(bool_targ_ptr) = &(TREF(bool_targ_anchor));	/* mcalloc won't persist over multiple complies */
+		dqinit(TREF(bool_targ_ptr), que);
 		/* ex_tail wraps bools that produce a value with OC_BOOLINIT (clr) and OC_BOOLFINI (set) */
 		assert((OC_BOOLFINI != t0->opcode)
 			|| ((OC_COMVAL == t0->exorder.fl->opcode) && (TRIP_REF == t0->operand[0].oprclass)));
diff --git a/sr_port/callg.h b/sr_port/callg.h
index 733cd49..07a6c5b 100644
--- a/sr_port/callg.h
+++ b/sr_port/callg.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,7 +15,7 @@
 typedef struct gparam_list_struct
 {
 	intszofptr_t	n;
-	void    	*arg[MAX_ACTUALS];
+	void    	*arg[MAX_ACTUALS + PUSH_PARM_OVERHEAD];
 } gparam_list;
 
 typedef	INTPTR_T (*callgfnptr)(intszofptr_t cnt, ...);
diff --git a/sr_port/cdbg_dump.c b/sr_port/cdbg_dump.c
index e2194d0..21de39e 100644
--- a/sr_port/cdbg_dump.c
+++ b/sr_port/cdbg_dump.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,29 +32,30 @@ LITDEF char *oprtype_names[] =
 	"Operand[1]",
 	"Destination"
 };
+/* This table needs to be synchronized with the operclass enum definition in compiler.h */
 LITDEF char *oprtype_type_names[] =
 {
-	"NIL",
-	"TVAR_REF",
-	"TVAL_REF",
-	"TINT_REF",
-	"TVAD_REF",
-	"TCAD_REF",
-	"VREG_REF",
-	"MLIT_REF",
-	"MVAR_REF",
-	"TRIP_REF",
-	"TNXT_REF",
-	"TJMP_REF",
-	"INDR_REF",
-	"MLAB_REF",
-	"ILIT_REF",
-	"CDLT_REF",
-	"TEMP_REF",
-	"MFUN_REF",
-	"MNXL_REF",
-	"TSIZ_REF",
-	"OCNT_REF"
+	"NIL",		/* 0 */
+	"TVAR_REF",	/* 1 */
+	"TVAL_REF",	/* 2 */
+	"TINT_REF",	/* 3 */
+	"TVAD_REF",	/* 4 */
+	"TCAD_REF",	/* 5 */
+	"MLIT_REF",	/* 6 */
+	"MVAR_REF",	/* 7 */
+	"TRIP_REF",	/* 8 */
+	"TNXT_REF",	/* 9 */
+	"TJMP_REF",	/* 10 */
+	"INDR_REF",	/* 11 */
+	"MLAB_REF",	/* 12 */
+	"ILIT_REF",	/* 13 */
+	"CDLT_REF",	/* 14 */
+	"TEMP_REF",	/* 15 */
+	"MFUN_REF",	/* 16 */
+	"MNXL_REF",	/* 17 */
+	"TSIZ_REF",	/* 18 */
+	"OCNT_REF",	/* 19 */
+	"CDIDX_REF"	/* 20 */
 };
 
 LITDEF char *indents[11] =
@@ -100,19 +102,11 @@ void cdbg_dump_triple(triple *dtrip, int indent)
 {
 	int		len;
 
-	PRINTF("%s Triple %s [0x"lvaddr"]   fwdptr: 0x"lvaddr"   bkwdptr: 0x"lvaddr"  srcline: %d  colmn: %d  rtaddr: %d\n",
-	       cdbg_indent(indent), oc_tab_graphic[dtrip->opcode], (long unsigned int) dtrip,
-	       (long unsigned int) dtrip->exorder.fl, (long unsigned int) dtrip->exorder.bl, dtrip->src.line,
+	PRINTF("%s Triple %s [opc %d at 0x"lvaddr"]   fwdptr: 0x"lvaddr"   bkwdptr: 0x"lvaddr
+	       "  srcline: %d  colmn: %d  rtaddr: %d\n",
+	       cdbg_indent(indent), oc_tab_graphic[dtrip->opcode], dtrip->opcode, (long unsigned int)dtrip,
+	       (long unsigned int)dtrip->exorder.fl, (long unsigned int)dtrip->exorder.bl, dtrip->src.line,
 	       dtrip->src.column, dtrip->rtaddr);
-	/*switch(dtrip->opcode)
-	{
-		case OC_CDLIT:
-			PRINTF("%s  OC_CDLT ptr: 0x"lvaddr"  len: 0x"lvaddr"\n",
-			       cdbg_indent(indent), opr->oprval.cdlt->addr, opr->oprval.cdlt->len);
-			if (opr->oprval.cdlt->len)
-				cdbg_dump_mstr(cdbg_indent(indent), opr->oprval.cdlt);
-			break;
-	} */
 	cdbg_dump_operand(indent + 1, &dtrip->operand[0], OP_0);
 	cdbg_dump_operand(indent + 1, &dtrip->operand[1], OP_1);
 	if (dtrip->destination.oprclass)
@@ -120,12 +114,12 @@ void cdbg_dump_triple(triple *dtrip, int indent)
 	FFLUSH(stdout);
 }
 
-/* Routine to dump a triple that's been shrunken(?) by shrink_trips() */
+/* Routine to dump a triple that's been shrunk by shrink_trips() */
 void cdbg_dump_shrunk_triple(triple *dtrip, int old_size, int new_size)
 {
 	PRINTF("Shrunken triple %s [0x"lvaddr"]   fwdptr: 0x"lvaddr"   bkwdptr: 0x"lvaddr"  srcline: %d  colmn: %d  rtaddr: %d\n",
-	       oc_tab_graphic[dtrip->opcode], (long unsigned int) dtrip, (long unsigned int) dtrip->exorder.fl,
-	       (long unsigned int) dtrip->exorder.bl, dtrip->src.line, dtrip->src.column, dtrip->rtaddr);
+	       oc_tab_graphic[dtrip->opcode], (long unsigned int)dtrip, (long unsigned int)dtrip->exorder.fl,
+	       (long unsigned int)dtrip->exorder.bl, dtrip->src.line, dtrip->src.column, dtrip->rtaddr);
 	PRINTF("    old size: %d  new size: %d  shrinkage: %d\n", old_size, new_size, (old_size - new_size));
 	FFLUSH(stdout);
 }
@@ -140,7 +134,7 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 	char 	mid[(SIZEOF(mident_fixed) * 2) + 1];	/* Sized to hold an labels name rtn.lbl */
 
 	if (opr)
-		PRINTF("%s %s  [0x"lvaddr"]  Type: %s\n", cdbg_indent(indent), oprtype_names[opnum], (long unsigned int) opr,
+		PRINTF("%s %s  [0x"lvaddr"]  Type: %s\n", cdbg_indent(indent), oprtype_names[opnum], (long unsigned int)opr,
 		       oprtype_type_names[opr->oprclass]);
 	else
 		PRINTF("%s ** Warning ** Null opr passed as operand\n", cdbg_indent(indent));
@@ -165,10 +159,10 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 			{
 				PRINTF("%s   LS vref: 0x"lvaddr"  RS vref: 0x"lvaddr"  index: %d  varname: %s  last triple: "
 				       "0x"lvaddr"\n",
-				       cdbg_indent(indent),(long unsigned int) opr->oprval.vref->lson,
-				       (long unsigned int) opr->oprval.vref->rson, opr->oprval.vref->mvidx,
+				       cdbg_indent(indent),(long unsigned int)opr->oprval.vref->lson,
+				       (long unsigned int)opr->oprval.vref->rson, opr->oprval.vref->mvidx,
 				       cdbg_makstr(opr->oprval.vref->mvname.addr, &buff, opr->oprval.vref->mvname.len),
-				       (long unsigned int) opr->oprval.vref->last_fetch);
+				       (long unsigned int)opr->oprval.vref->last_fetch);
 				free(buff);	/* allocated by cdbg_makstr */
 			}
 			else
@@ -186,8 +180,8 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 		case MLIT_REF:
 			if (opr->oprval.mlit)
 				PRINTF("%s   lit-ref fwdptr: 0x"lvaddr"  bkwdptr: 0x"lvaddr"  rtaddr: 0x"lvaddr"\n",
-				       cdbg_indent(indent), (long unsigned int) opr->oprval.mlit->que.fl,
-				       (long unsigned int) opr->oprval.mlit->que.bl, opr->oprval.mlit->rt_addr);
+				       cdbg_indent(indent), (long unsigned int)opr->oprval.mlit->que.fl,
+				       (long unsigned int)opr->oprval.mlit->que.bl, opr->oprval.mlit->rt_addr);
 			else
 				PRINTF("%s   ** Warning ** oprval.mlit is NULL\n", cdbg_indent(indent));
 			cdbg_dump_mval(indent, &opr->oprval.mlit->v);
@@ -195,7 +189,7 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 		case TJMP_REF:
 			if (opr->oprval.tref)
 				PRINTF("%s   tjmp-ref jump list ptr: 0x"lvaddr"\n", cdbg_indent(indent),
-						(long unsigned int) &opr->oprval.tref->jmplist);
+						(long unsigned int)&opr->oprval.tref->jmplist);
 			else
 				PRINTF("%s   ** Warning ** oprval.tref is NULL\n", cdbg_indent(indent));
 			break;
@@ -210,7 +204,7 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 		case TSIZ_REF:
 			if (opr->oprval.tsize)
 				PRINTF("%s   triple at 0x"lvaddr" has size %d\n", cdbg_indent(indent),
-						(long unsigned int) opr->oprval.tsize->ct, opr->oprval.tsize->size);
+						(long unsigned int)opr->oprval.tsize->ct, opr->oprval.tsize->size);
 			else
 				PRINTF("%s   ** Warning ** oprval.tsize is NULL\n", cdbg_indent(indent));
 			break;
@@ -223,7 +217,7 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 			{
 				len = opr->oprval.lab->mvname.len;
 				memcpy(mid, opr->oprval.lab->mvname.addr, len);
-				mid[len] = 0;
+				mid[len] = '\0';
 				PRINTF("%s   ref type: %s  mlabel name: %s\n", cdbg_indent(indent),
 				       oprtype_type_names[opr->oprclass], mid);
 			} else
@@ -235,12 +229,23 @@ void cdbg_dump_operand(int indent, oprtype *opr, int opnum)
 			{
 				len = opr->oprval.cdlt->len;
 				memcpy(mid, opr->oprval.cdlt->addr, len);
-				mid[len] = 0;
+				mid[len] = '\0';
 				PRINTF("%s   cdlt-ref mstr->%s", cdbg_indent(indent), mid);
 			} else
 				PRINTF("%s   ref type: %s  ** Warning ** oprval.cdlt is NULL\n", cdbg_indent(indent),
 				       oprtype_type_names[opr->oprclass]);
 			break;
+		case CDIDX_REF:
+			if (opr->oprval.cdidx)
+			{
+				len = opr->oprval.cdidx->len;
+				memcpy(mid, opr->oprval.cdidx->addr, len);
+				mid[len] = '\0';
+				PRINTF("%s   cdidx-ref mstr->%s", cdbg_indent(indent), mid);
+			} else
+				PRINTF("%s   ref type: %s  ** Warning ** oprval.cdidx is NULL\n", cdbg_indent(indent),
+				       oprtype_type_names[opr->oprclass]);
+			break;
 		default:
 			PRINTF("%s   %s bogus reference\n", cdbg_indent(indent), oprtype_type_names[opr->oprclass]);
 	}
@@ -327,7 +332,7 @@ void cdbg_dump_mstr(int indent, mstr *ms)
 #	endif
 	buffer = malloc(len + 1);
 	memcpy(buffer, strp, len);
-	buffer[len] = 0;
+	buffer[len] = '\0';
 	PRINTF("%s   String value: %s\n", cdbg_indent(indent), buffer);
 	FFLUSH(stdout);
 	free(buffer);
@@ -357,6 +362,6 @@ char *cdbg_makstr(char *str, char **buf, int len)
 {
 	*buf = malloc(len + 1);
 	memcpy(*buf, str, len);
-	(*buf)[len] = 0;
+	(*buf)[len] = '\0';
 	return *buf;
 }
diff --git a/sr_port/cgp.h b/sr_port/cgp.h
index 1fba200..67d9ceb 100644
--- a/sr_port/cgp.h
+++ b/sr_port/cgp.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,11 +10,16 @@
  *								*
  ****************************************************************/
 
-#define CGP_NOSTATE	(0)
-#define CGP_PARSE	(1)
-#define CGP_RESOLVE	(2)
-#define CGP_APPROX_ADDR	(3)
-#define CGP_ADDR_OPT	(4)
-#define CGP_ASSEMBLY	(5)
-#define CGP_MACHINE	(6)
-#define CGP_FINI	(7)
+/* Phases the GT.M compiler can be in */
+enum CGP_PHASE
+{
+	CGP_NOSTATE = 0,	/* 0 - compiler not running */
+	CGP_PARSE,		/* 1 - compiler initialized - parsing into triples */
+	CGP_RESOLVE,		/* 2 - resolve triple references to each other */
+	CGP_APPROX_ADDR,	/* 3 - approximate addresses with pseudo-code-gen */
+	CGP_ADDR_OPT,		/* 4 - address optimization and triple reduction */
+	CGP_ASSEMBLY,		/* 5 - generate assembler listing */
+	CGP_MACHINE,		/* 6 - generate machine code */
+	CGP_FINI,		/* 7 - compile complete - cleanup */
+	CGP_MAXSTATE
+};
diff --git a/sr_port/comp_init.c b/sr_port/comp_init.c
index c9788e5..ca0d96a 100644
--- a/sr_port/comp_init.c
+++ b/sr_port/comp_init.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -57,8 +58,7 @@ void comp_init(mstr *src, oprtype *dst)
 		indr_stringpool = stringpool;
 	} else
 		stringpool = indr_stringpool;
-	mcfree();
-	tripinit();
+	tripinit();		/* Also does what mcfree() would do */
 	lb_init();
 	assert(TREF(for_stack_ptr) == TADR(for_stack));
 	*TREF(for_stack_ptr) = NULL;
diff --git a/sr_port/compiler.h b/sr_port/compiler.h
index 30b87ff..052630a 100644
--- a/sr_port/compiler.h
+++ b/sr_port/compiler.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -11,7 +12,7 @@
 #ifndef COMPILER_H_INCLUDED
 #define COMPILER_H_INCLUDED
 
-/* Values for oprclass */
+/* Values for oprclass - Changes made here need to be reflected in cdbg_dump opr_type_names table */
 typedef enum
 {
 	NO_REF,		/* 0 */
@@ -33,7 +34,8 @@ typedef enum
 	MFUN_REF,	/* 16 */
 	MNXL_REF,	/* 17 refer to internalentry of child line */
 	TSIZ_REF,	/* 18 ilit refering to size of given triple codegen */
-	OCNT_REF	/* 19 Offset from Call to Next Triple */
+	OCNT_REF,	/* 19 Offset from Call to Next Triple */
+	CDIDX_REF	/* 20 Denotes index into a table containing a code address */
 } operclass;
 #define VALUED_REF_TYPES 6	/* Types 0-6 are specific types used by alloc_reg() in array references
 				 * **** WARNING **** Do NOT reorder
@@ -107,6 +109,7 @@ typedef struct	oprtypestruct
 		mline			*mlin;
 		mliteral		*mlit;
 		mstr			*cdlt;
+		mstr			*cdidx;
 		mvar			*vref;
 		int4			temp;
 		int4			ilit;
@@ -263,11 +266,11 @@ error_def(ERR_SVNOSET);
 #ifdef GTM_TRIGGER
 #	define	STX_ERROR_WARN(errcode)					\
 {									\
-	if (!TREF(trigger_compile))					\
+	if (!TREF(trigger_compile_and_link))				\
 		parse_warn = TRUE;					\
 	assert(IS_STX_WARN(errcode));					\
 	stx_error(errcode);						\
-	if (TREF(trigger_compile))					\
+	if (TREF(trigger_compile_and_link))				\
 		return FALSE;						\
 }
 #else
@@ -350,8 +353,9 @@ typedef struct
 	newtriple(OC_GVRECTARG)->operand[0] = put_tref(TREF(expr_start));	\
 }
 
-/* note assignment below */
-#define SHIFT_SIDE_EFFECTS	((TREF(saw_side_effect) = TREF(shift_side_effects)) && (GTM_BOOL == TREF(gtm_fullbool)))
+/* note assignment below and that it always occurs */
+#define SHIFT_SIDE_EFFECTS	((TREF(saw_side_effect) = TREF(shift_side_effects)) \
+	&& (NULL != TREF(expr_start)) && (GTM_BOOL == TREF(gtm_fullbool)))
 
 #define INITIAL_SIDE_EFFECT_DEPTH 33	/* initial allocation for expression nesting to track side effects */
 
@@ -514,6 +518,30 @@ typedef struct
 		C = '\0';		\
 }
 
+/* Macro to clear parts of given compiler mval which could end up in an object file (if they are literals). These bits may not
+ * be (re)set by the s2n/n2s calls we do. If not, the mval could have random bits in it which, as far as the mval is concerned
+ * is not a problem but interferes with getting a consistent object hash value when the same source is (re)compiled.
+ */
+#define CLEAR_MVAL_BITS(mvalptr) 		\
+{						\
+	((mval_b *)(mvalptr))->sgne = 0;	\
+	(mvalptr)->fnpc_indx = 0xff;		\
+}
+
+/* Autorelink enabled platforms pass a different argument to glue code when calling a non-local M
+ * routine. Use put_cdlt() to pass addresses of the items and use put_cdidx() when passing an ofset
+ * into the linkage table where the items reside. Also macroize the opcode to use.
+ */
+#ifdef AUTORELINK_SUPPORTED
+# define PUT_CDREF put_cdidx
+# define OC_CDREF OC_CDIDX
+# define CDREF_REF CDIDX_REF
+#else
+# define PUT_CDREF put_cdlt
+# define OC_CDREF OC_CDLIT
+# define CDREF_REF CDLT_REF
+#endif
+
 int		actuallist(oprtype *opr);
 int		bool_expr(boolean_t op, oprtype *addr);
 void		bx_boolop(triple *t, boolean_t jmp_type_one, boolean_t jmp_to_next, boolean_t sense, oprtype *addr);
@@ -620,6 +648,7 @@ int		parse_until_rparen_or_space(void);
 oprtype		put_ocnt(void);
 oprtype		put_tsiz(void);
 oprtype		put_cdlt(mstr *x);
+oprtype		put_cdidx(mstr *x);
 oprtype		put_ilit(mint x);
 oprtype		put_indr(oprtype *x);
 oprtype		put_lit(mval *x);
diff --git a/sr_port/copyright.txt b/sr_port/copyright.txt
new file mode 100644
index 0000000..ca9593a
--- /dev/null
+++ b/sr_port/copyright.txt
@@ -0,0 +1,9 @@
+								
+ Copyright (c) XXXX-YYYY Fidelity National Information 	
+ Services, Inc. and/or its subsidiaries. All rights reserved.	
+								
+	This source code contains the intellectual property	
+	of its copyright holder(s), and is made available	
+	under a license.  If you do not know the terms of	
+	the license, please stop and do not read further.	
+								
diff --git a/sr_port/cre_jnl_file.c b/sr_port/cre_jnl_file.c
index 12df5fb..c10de30 100644
--- a/sr_port/cre_jnl_file.c
+++ b/sr_port/cre_jnl_file.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2003, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2003-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -192,14 +193,15 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 	int			group_id;
 	struct stat		sb;
 	int			perm;
-	struct perm_diag_data	pdd;
 #	endif
 	int			idx;
 	trans_num		db_tn;
 	uint4			temp_offset, temp_checksum, pfin_offset, eof_offset;
 	uint4			jnl_fs_block_size;
+	sgmnt_addrs		*csa;
 
 	jrecbuf = NULL;
+	csa = info->csa;
 	if (info->no_rename)
 	{	/* The only cases where no-renaming is possible are as follows
     		 * (i) MUPIP SET JOURNAL where the new journal file name is different from the current journal file name
@@ -214,8 +216,8 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 		assert(0 == create_fn[create_fn_len]);
 	} else
 	{
-		if (NULL != info->csa)
-			cre_jnl_file_intrpt_rename(info->csa);	/* deal with *_new.mjl files */
+		if (NULL != csa)
+			cre_jnl_file_intrpt_rename(csa);	/* deal with *_new.mjl files */
 		create_fn = &fn_buff[0];
 		if (SS_NORMAL != (info->status = prepare_unique_name((char *)info->jnl, (int)info->jnl_len, "", EXT_NEW,
 								     (char *)create_fn, &create_fn_len, 0, &info->status2)))
@@ -253,26 +255,11 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 		F_CLOSE(channel, status);
 		return EXIT_ERR;
 	}
-	/* setup new group and permissions if indicated by the security rules.
-	 */
-	if (gtm_permissions(&sb, &user_id, &group_id, &perm, PERM_FILE, &pdd) < 0)
-	{
-		send_msg_csa(CSA_ARG(info->csa) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-			ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("journal file"), RTS_ERROR_STRING(info->fn),
-			PERMGENDIAG_ARGS(pdd));
-		if (IS_GTM_IMAGE)
-			rts_error_csa(CSA_ARG(info->csa) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-				ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("journal file"), RTS_ERROR_STRING(info->fn),
-				PERMGENDIAG_ARGS(pdd));
-		else
-			gtm_putmsg_csa(CSA_ARG(info->csa) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-				ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("journal file"), RTS_ERROR_STRING(info->fn),
-				PERMGENDIAG_ARGS(pdd));
-		F_CLOSE(channel, status);
-		return EXIT_ERR;
-	}
+	/* Setup new group and permissions if indicated by the security rules */
+	gtm_permissions(&sb, &user_id, &group_id, &perm, PERM_FILE);
 	/* if group not the same then change group of temporary file */
-	if ((((-1 != user_id) && (user_id != stat_buf.st_uid)) || ((-1 != group_id) && (group_id != stat_buf.st_gid)))
+	if ((((INVALID_UID != user_id) && (user_id != stat_buf.st_uid))
+			|| ((INVALID_GID != group_id) && (group_id != stat_buf.st_gid)))
 		&& (-1 == fchown(channel, user_id, group_id)))
 	{
 		info->status = errno;
@@ -362,7 +349,7 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 	 * write is not so much since it is only once per journal file at creation time. All future writes of the
 	 * file header write only the real file header and not the 0-padding.
 	 */
-	JNL_DO_FILE_WRITE(info->csa, create_fn, channel, 0, header, JNL_HDR_LEN, info->status, info->status2);
+	JNL_DO_FILE_WRITE(csa, create_fn, channel, 0, header, JNL_HDR_LEN, info->status, info->status2);
 	STATUS_MSG(info);
 	RETURN_ON_ERROR(info);
 	assert(DISK_BLOCK_SIZE >= EPOCH_RECLEN + EOF_RECLEN + PFIN_RECLEN + PINI_RECLEN);
@@ -469,11 +456,20 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 	 */
 	assert(ROUND_UP2(header->virtual_size, jnl_fs_block_size/DISK_BLOCK_SIZE)
 			> DIVIDE_ROUND_UP(JNL_HDR_LEN + write_size, DISK_BLOCK_SIZE));
-	JNL_DO_FILE_WRITE(info->csa, create_fn, channel, JNL_HDR_LEN, jrecbuf, write_size, info->status, info->status2);
+	JNL_DO_FILE_WRITE(csa, create_fn, channel, JNL_HDR_LEN, jrecbuf, write_size, info->status, info->status2);
 	STATUS_MSG(info);
 	RETURN_ON_ERROR(info);
-	UNIX_ONLY(GTM_JNL_FSYNC(info->csa, channel, status);)
+	UNIX_ONLY(GTM_JNL_FSYNC(csa, channel, status);)
 	F_CLOSE(channel, status);	/* resets "channel" to FD_INVALID */
+	/* Now that EOF record has been written, keep csa->jnl->jnl_buff->prev_jrec_time up to date.
+	 * One exception is if journaling is not yet turned on but is being turned on by the current caller.
+	 * In that case, dont worry about maintaining jb->prev_jrec_time. It will be maintained when this newly
+	 * created journal file is first opened.
+	 */
+	if ((NULL != csa) && (NULL != csa->nl))	/* this means database shared memory is accessible (i.e. region is open) */
+	{	/* Keep jb->prev_jrec_time up to date */
+		SET_JNLBUFF_PREV_JREC_TIME(csa->jnl->jnl_buff, eof_record->prefix.time, DO_GBL_JREC_TIME_CHECK_TRUE);
+	}
 	free(jrecbuf_base);
 	jrecbuf_base = NULL;
 #	ifdef DEBUG
@@ -487,15 +483,15 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 	 * Following does rename of a.mjl to a.mjl_timestamp.
 	 * So system will have a.mjl_timestamp and a.mjl_new for a crash after this call
 	 */
-	WAIT_FOR_REPL_INST_UNFREEZE_SAFE(info->csa);	/* wait for instance freeze before journal file renames */
+	WAIT_FOR_REPL_INST_UNFREEZE_SAFE(csa);	/* wait for instance freeze before journal file renames */
 	if (SS_NORMAL != (info->status = gtm_rename((char *)info->jnl, (int)info->jnl_len,
 						    (char *)rename_fn, rename_fn_len, &info->status2)))
 	{
 		if (IS_GTM_IMAGE)
-			send_msg_csa(CSA_ARG(info->csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
+			send_msg_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
 					rename_fn);
 		else
-			gtm_putmsg_csa(CSA_ARG(info->csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
+			gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
 					rename_fn);
 		STATUS_MSG(info);
 		return EXIT_ERR;
@@ -503,24 +499,24 @@ uint4 cre_jnl_file_common(jnl_create_info *info, char *rename_fn, int rename_fn_
 	/* Following does rename of a.mjl_new to a.mjl.
 	 * So system will have a.mjl_timestamp as previous generation and a.mjl as new/current journal file
 	 */
-	WAIT_FOR_REPL_INST_UNFREEZE_SAFE(info->csa);	/* wait for instance freeze before journal file renames */
+	WAIT_FOR_REPL_INST_UNFREEZE_SAFE(csa);	/* wait for instance freeze before journal file renames */
 	if (SS_NORMAL !=  (info->status = gtm_rename((char *)create_fn, create_fn_len,
 						     (char *)info->jnl, (int)info->jnl_len, &info->status2)))
 	{
 		if (IS_GTM_IMAGE)
-			send_msg_csa(CSA_ARG(info->csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
+			send_msg_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
 					rename_fn);
 		else
-			gtm_putmsg_csa(CSA_ARG(info->csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
+			gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_RENAMEFAIL, 4, info->jnl_len, info->jnl, rename_fn_len,
 					rename_fn);
 		STATUS_MSG(info);
 		return EXIT_ERR;
 	}
 	if (IS_GTM_IMAGE)
-		send_msg_csa(CSA_ARG(info->csa) VARLSTCNT (6) ERR_FILERENAME, 4, info->jnl_len, info->jnl, rename_fn_len,
+		send_msg_csa(CSA_ARG(csa) VARLSTCNT (6) ERR_FILERENAME, 4, info->jnl_len, info->jnl, rename_fn_len,
 				rename_fn);
 	else
-		gtm_putmsg_csa(CSA_ARG(info->csa) VARLSTCNT (6) ERR_FILERENAME, 4, info->jnl_len, info->jnl, rename_fn_len,
+		gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT (6) ERR_FILERENAME, 4, info->jnl_len, info->jnl, rename_fn_len,
 				rename_fn);
 #		ifdef DEBUG
 		if (gtm_white_box_test_case_enabled && (WBTEST_JNL_CREATE_INTERRUPT == gtm_white_box_test_case_number))
diff --git a/sr_port/cre_private_code_copy.c b/sr_port/cre_private_code_copy.c
index 40fb748..46f6240 100644
--- a/sr_port/cre_private_code_copy.c
+++ b/sr_port/cre_private_code_copy.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2002, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2002-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,6 +20,7 @@
 #include "stack_frame.h"
 #include "gtm_text_alloc.h"
 #include "gtm_string.h"
+#include "arlinkdbg.h"
 
 error_def(UNIX_ONLY(ERR_MEMORY) VMS_ONLY(ERR_VMSMEMORY);)
 
@@ -38,23 +40,35 @@ uint4 cre_private_code_copy(rhdtyp *rtn)
 	unsigned char	*new_ptext;
 	int		code_size;
 
-#ifdef USHBIN_SUPPORTED
-		assert(NULL != rtn->shared_ptext_adr); /* don't need private copy if not shared */
-		assert(rtn->shared_ptext_adr == rtn->ptext_adr); /* if already private, we shouldn't be calling this routine */
-
-		code_size = (int)(rtn->ptext_end_adr - rtn->ptext_adr) ;
-		ESTABLISH_RET(cre_priv_ch, UNIX_ONLY(ERR_MEMORY) VMS_ONLY(ERR_VMSMEMORY));
-		new_ptext = GTM_TEXT_ALLOC(code_size);
-		REVERT;
-		memcpy(new_ptext, rtn->ptext_adr, code_size);
-		adjust_frames(rtn->ptext_adr, rtn->ptext_end_adr, new_ptext);
-		do
-		{
-			rtn->ptext_adr = new_ptext;
-			rtn->ptext_end_adr = new_ptext + code_size;
-			rtn = (rhdtyp *)rtn->old_rhead_adr;
-		} while (NULL != rtn);
-		inst_flush(new_ptext, code_size);
-#endif
+#	ifdef USHBIN_SUPPORTED
+	assert(NULL != rtn->shared_ptext_adr); 			/* Don't need private copy if not shared */
+	assert(rtn->shared_ptext_adr == rtn->ptext_adr); 	/* If already private, we shouldn't be calling this routine */
+	code_size = (int)(rtn->ptext_end_adr - rtn->ptext_adr) ;
+	ESTABLISH_RET(cre_priv_ch, UNIX_ONLY(ERR_MEMORY) VMS_ONLY(ERR_VMSMEMORY));
+	new_ptext = GTM_TEXT_ALLOC(code_size);
+	REVERT;
+	DBGARLNK((stderr, "cre_private_code_copy: Creating private code copy for rtnhdr 0x"lvaddr" at 0x"lvaddr"\n",
+		  rtn, rtn->ptext_adr));
+	memcpy(new_ptext, rtn->ptext_adr, code_size);
+	adjust_frames(rtn->ptext_adr, rtn->ptext_end_adr, new_ptext);
+	do
+	{
+		DBGARLNK((stderr, "cre_private_code_copy: rtnhdr 0x"lvaddr"  Previous values - ptext_adr: 0x"lvaddr
+			  "  ptext_end_adr: 0x"lvaddr"\n", rtn, rtn->ptext_adr, rtn->ptext_end_adr));
+		rtn->ptext_adr = new_ptext;
+		rtn->ptext_end_adr = new_ptext + code_size;
+		DBGARLNK((stderr, "cre_private_code_copy: rtnhdr 0x"lvaddr"  New values      - ptext_adr: 0x"lvaddr
+			  "  ptext_end_adr: 0x"lvaddr"\n", rtn, rtn->ptext_adr, rtn->ptext_end_adr));
+		/* Check for special case loop terminator. If this was a routine copy created when a routine in use was
+		 * recursively relinked, we do not want to follow its backchain and change those modules because this
+		 * routine copy is not part of that chain. The backpointer is only to find the original routine header
+		 * when this routine terminates. So if this routine is a recursive copy, stop the loop now.
+		 */
+		rtn = ((NULL != rtn->old_rhead_adr) && (rtn != rtn->old_rhead_adr->active_rhead_adr))
+			? (rhdtyp *)rtn->old_rhead_adr : NULL;
+	} while (NULL != rtn);
+	inst_flush(new_ptext, code_size);
+	DBGARLNK((stderr, "cre_private_code_copy: Complete\n"));
+#	endif
 	return SS_NORMAL;
 }
diff --git a/sr_port/create_fatal_error_zshow_dmp.c b/sr_port/create_fatal_error_zshow_dmp.c
index 24a3a15..99ea1e0 100644
--- a/sr_port/create_fatal_error_zshow_dmp.c
+++ b/sr_port/create_fatal_error_zshow_dmp.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -11,40 +12,55 @@
 
 #include "mdef.h"
 
-#ifdef VMS
-#include <ssdef.h>
-#endif
-#ifdef UNIX
 #include <signal.h>
-#endif
+#include "gtm_string.h"
 
+#include "gtm_limits.h"
 #include "error.h"
 #include "jobexam_process.h"
 #include "gtmdbglvl.h"
 #include "create_fatal_error_zshow_dmp.h"
 
-LITDEF mval gtmfatal_error_filename = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, SIZEOF(GTMFATAL_ERROR_DUMP_FILENAME) - 1,
-							  GTMFATAL_ERROR_DUMP_FILENAME, 0, 0);
-
 GBLREF	int4		exi_condition;
 GBLREF	uint4		gtmDebugLevel;
 GBLREF	volatile int4	gtmMallocDepth;
+GBLREF	uint4		process_id;
+GBLREF	int		process_exiting;
 
-/* On VMS, SIGNAL is sig->chf$l_sig_name (a parameter to mdb_condition_handler) so needs to be passed in */
-void create_fatal_error_zshow_dmp(int4 signal, boolean_t repeat_error)
+/* Create GTM_FATAL_ERROR* ZSHOW dump file for given fatal condition */
+void create_fatal_error_zshow_dmp(int4 signal)
 {
-	mval	dummy_mval;
-	int4	save_SIGNAL;	/* On UNIX this is exi_condition */
+	unsigned char	dump_fn[GTM_PATH_MAX], *dump_fn_ptr;
+	mval		dump_fn_mval, dummy_mval;
+	int4		save_SIGNAL;	/* On UNIX this is exi_condition */
+	DCL_THREADGBL_ACCESS;
 
-	UNIX_ONLY(PRN_ERROR);
-	if (UNIX_ONLY(0 == gtmMallocDepth && ((SIGBUS != exi_condition && SIGSEGV != exi_condition) ||
-					      (GDL_ZSHOWDumpOnSignal & gtmDebugLevel)))
-	    VMS_ONLY((SS$_ACCVIO != signal) || (GDL_ZSHOWDumpOnSignal & gtmDebugLevel)))
-	{	/* If dumpable condition, create traceback file of M stack info and such */
-		/* On Unix, we need to push out our error now before we potentially overlay it in jobexam_process() */
+	SETUP_THREADGBL_ACCESS;
+	/* Push out our error now before we potentially overlay it in jobexam_process() */
+	PRN_ERROR;
+	assert(process_exiting);
+	if (0 == gtmMallocDepth && ((SIGBUS != exi_condition && SIGSEGV != exi_condition)
+				    || (GDL_ZSHOWDumpOnSignal & gtmDebugLevel)))
+	{	/* For this dumpable condition, create a ZSHOW "*" dump for review. First, build the name we
+		 * want the report to have.
+		 */
+		MEMCPY_LIT(dump_fn, GTMFATAL_ERROR_DUMP_FILENAME);
+		dump_fn_ptr = dump_fn + (SIZEOF(GTMFATAL_ERROR_DUMP_FILENAME) - 1);
+		dump_fn_ptr = i2asc(dump_fn_ptr, process_id);
+		*dump_fn_ptr++ = '_';
+		/* Use bumped value of jobexam_counter but don't actually increment the counter. The actual increment
+		 * is done in jobexam_dump() as part of the default file name (not used here).
+		 */
+		dump_fn_ptr = i2asc(dump_fn_ptr, (TREF(jobexam_counter) + 1));
+		MEMCPY_LIT(dump_fn_ptr, GTMFATAL_ERROR_DUMP_FILETYPE);
+		dump_fn_ptr += (SIZEOF(GTMFATAL_ERROR_DUMP_FILETYPE) - 1);
+		dump_fn_mval.mvtype = MV_STR;
+		dump_fn_mval.str.addr = (char *)dump_fn;
+		dump_fn_mval.str.len = INTCAST(dump_fn_ptr - dump_fn);
+		assert(GTM_PATH_MAX >= dump_fn_mval.str.len);
 		/* Create dump file */
-		UNIX_ONLY(save_SIGNAL = SIGNAL); 		/* Signal might be modified by jobexam_process() */
-		jobexam_process((mval *)&gtmfatal_error_filename, &dummy_mval);
-		UNIX_ONLY(SIGNAL = save_SIGNAL);
+		save_SIGNAL = SIGNAL; 		/* Signal might be modified by jobexam_process() */
+		jobexam_process(&dump_fn_mval, &dummy_mval);
+		SIGNAL = save_SIGNAL;
 	}
 }
diff --git a/sr_port/create_fatal_error_zshow_dmp.h b/sr_port/create_fatal_error_zshow_dmp.h
index 4572267..d01c4d0 100644
--- a/sr_port/create_fatal_error_zshow_dmp.h
+++ b/sr_port/create_fatal_error_zshow_dmp.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,11 +10,12 @@
  *								*
  ****************************************************************/
 
-#ifndef   	CREATE_FATAL_ERROR_ZSHOW_DMP_H_
-# define   	CREATE_FATAL_ERROR_ZSHOW_DMP_H_
+#ifndef CREATE_FATAL_ERROR_ZSHOW_DMP_H_
+#define	CREATE_FATAL_ERROR_ZSHOW_DMP_H_
 
-#define GTMFATAL_ERROR_DUMP_FILENAME	"GTM_FATAL_ERROR"
+#define GTMFATAL_ERROR_DUMP_FILENAME	"GTM_FATAL_ERROR.ZSHOW_DMP_"
+#define GTMFATAL_ERROR_DUMP_FILETYPE 	".txt"
 
-void create_fatal_error_zshow_dmp(int4 signal, boolean_t repeat_error);
+void create_fatal_error_zshow_dmp(int4 signal);
 
 #endif
diff --git a/sr_port/db_auto_upgrade.c b/sr_port/db_auto_upgrade.c
index d088d12..785c3ef 100644
--- a/sr_port/db_auto_upgrade.c
+++ b/sr_port/db_auto_upgrade.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -107,10 +108,36 @@ void db_auto_upgrade(gd_region *reg)
 		{	/* Note that handling for any fields introduced in a version will not go in the "switch-case" block
 			 * of code introduced for the new version but will go in the PREVIOUS "switch-case" block.
 			 */
+			case GDSMV50000:
+			case GDSMV51000ALT:
 			case GDSMV51000:		/* Multi-site replication available */
 			case GDSMV52000:		/* Unicode */
 			case GDSMV53000:		/* M-Itanium release */
 				gvstats_rec_upgrade(csa); /* Move GVSTATS information to new place in file header */
+			case GDSMV53003:		/* ZSHOW "G" release */
+				/* The following two operations are commented out because they cause issues with backup-and-restore
+				 * operations between versions that do not support encryption and encrypted databases created with
+				 * versions that do. Consider the following example.
+				 *
+				 * Say, we first create a database using an old version that does not support encryption and write a
+				 * few updates to it. Then we back up that database and create a new, encrypted database using the
+				 * current version. Next, we restore the backup onto the new database. Because the file header of
+				 * the new database indicates that it is encrypted, MUPIP RESTORE encrypts all blocks that it pulls
+				 * from the backup and ensures that the is_encrypted field remains TRUE even after overwriting it
+				 * with the backup's file header. So, now we have an encrypted database with encrypted data in it,
+				 * which is how it should be.
+				 *
+				 * However, if we now attempt to write some updates, we would come here and, having noticed that the
+				 * minor version predates encryption, unset the is_encrypted field. As a result, we would produce an
+				 * unencrypted database (according to the file header) with encrypted data in it. That is the reason
+				 * the following two lines are commented out.
+				 *
+				 *   csd->is_encrypted = FALSE;
+				 *   memset(csd->encryption_hash, 0, GTMCRYPT_RESERVED_HASH_LEN);
+				 */
+			case GDSMV53004:		/* New encryption fields */
+				csd->db_trigger_cycle = 0;
+			case GDSMV54000:		/* First trigger version */
 			case GDSMV54002:
 				/* GT.M V54002B introduced jnl_eov_tn for backward recovery */
 				csd->jnl_eovtn = csd->trans_hist.curr_tn;
@@ -135,11 +162,23 @@ void db_auto_upgrade(gd_region *reg)
 			case GDSMV60002:
 				/* GT.M V62001 introduced ^#t upgrade. Record this pending event in filehdr. */
 				UNIX_ONLY(csd->hasht_upgrade_needed = TRUE;)
-				break;
 			case GDSMV62001:
+				/* GT.M V62002 introduced database file preallocation. */
+				csd->defer_allocate = TRUE;
+				/* GT.M V62002 incremented ^#t label. Record this pending event in filehdr. */
+				UNIX_ONLY(csd->hasht_upgrade_needed = TRUE;)
+				/* GT.M V62002 introduced epoch taper */
+				csd->epoch_taper = TRUE;
+		        	csd->epoch_taper_time_pct = EPOCH_TAPER_TIME_PCT_DEFAULT;
+		        	csd->epoch_taper_jnl_pct = EPOCH_TAPER_JNL_PCT_DEFAULT;
+				break;
+			case GDSMV62002:
 				/* Nothing to do for this version since it is GDSMVCURR for now. */
 				assert(FALSE);		/* When this assert fails, it means a new GDSMV* was created, */
 				break;			/* 	so a new "case" needs to be added BEFORE the assert. */
+			default:
+				/* Unrecognized version in the header */
+				assertpro(FALSE && csd->minor_dbver);
 		}
 		csd->minor_dbver = GDSMVCURR;
 		if (0 == csd->wcs_phase2_commit_wait_spincnt)
diff --git a/sr_port/dbcertify.h b/sr_port/dbcertify.h
index e26a60b..09ed5b1 100644
--- a/sr_port/dbcertify.h
+++ b/sr_port/dbcertify.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -338,8 +339,7 @@ void dbc_init_key(phase_static_area *psa, dbc_gv_key **key);
 void dbc_find_key(phase_static_area *psa, dbc_gv_key *key, uchar_ptr_t rec_p, int blk_levl);
 boolean_t dbc_match_key(dbc_gv_key *key1, int blk_levl1, dbc_gv_key *key2, unsigned int *matchc);
 int dbc_find_dtblk(phase_static_area *psa, dbc_gv_key *key, int min_levl);
-int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int min_levl, enum gdsblk_type newblk_type,
-		    boolean_t fail_ok);
+int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int min_levl, enum gdsblk_type newblk_type);
 void dbc_init_blk(phase_static_area *psa, block_info *blk_set_p, int blk_num, enum gdsblk_usage blk_usage, int blk_len,
 		  int blk_levl);
 void dbc_init_db(phase_static_area *psa);
diff --git a/sr_port/dbcertify_certify_phase.c b/sr_port/dbcertify_certify_phase.c
index dbe0c9b..30dfbd8 100644
--- a/sr_port/dbcertify_certify_phase.c
+++ b/sr_port/dbcertify_certify_phase.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,20 +11,20 @@
  ****************************************************************/
 
 /****************************************************************
-        dbcertify_certify_phase2.c - Database certification phase 2
-
-        - Verify phase 1 input file.
-        - Locate and open database after getting standalong access.
-        - Read the identified blocks in and if they are still too
-          large, split them.
-        - Certify the database as "clean" if no errors encountered.
-
-        Note: Most routines in this utility are self-contained
-              meaning they do not reference GT.M library routines
-              (with some notable exceptions). This is because
-              phase-2 is going to run against V4 format databases
-              but any linked routines would be compiled for V5
-              databases.
+ *      dbcertify_certify_phase2.c - Database certification phase 2
+ *
+ *      - Verify phase 1 input file.
+ *      - Locate and open database after getting standalong access.
+ *      - Read the identified blocks in and if they are still too
+ *        large, split them.
+ *      - Certify the database as "clean" if no errors encountered.
+ *
+ *      Note: Most routines in this utility are self-contained
+ *            meaning they do not reference GT.M library routines
+ *            (with some notable exceptions). This is because
+ *            phase-2 is going to run against V4 format databases
+ *            but any linked routines would be compiled for V5
+ *            databases.
 ****************************************************************/
 
 #include "mdef.h"
@@ -229,19 +230,20 @@ void dbcertify_certify_phase(void)
 	update_array_size = psa->dbc_cs_data->max_update_array_size;
 
 	/* Now to the real work -- Read and split each block the phase 1 file recorded that still needs
-	   to be split (concurrent updates may have "fixed" some blocks).
-	*/
+	 * to be split (concurrent updates may have "fixed" some blocks).
+	 */
 	psa->hint_blk = psa->hint_lcl = 1;
 	restart_transaction = p1rec_read = FALSE;
 	restart_cnt = 0;
 	for (rec_num = 0; rec_num < psa->ofhdr.blk_count || 0 < psa->gvtroot_rchildren_cnt;)
 	{	/* There is the possibility that we are restarting the processing of a given record. In
-		   that case we will not read the next record in but process what is already in the buffer.
-		   This can occur if we have extended the database. */
+		 * that case we will not read the next record in but process what is already in the buffer.
+		 * This can occur if we have extended the database.
+		 */
 		if (!restart_transaction)
-		{	/* First to check is if we have any queued gvtroot_rchildren to process (described elsewhere). If we have
-			   these, we process them now without bumping the record count.
-			*/
+		{	/* First to check is if we have any queued gvtroot_rchildren to process (described elsewhere).
+			 * If we have these, we process them now without bumping the record count.
+			 */
 			p1rec_read = FALSE;	/* Assume we did NOT read from the file */
 			if (0 < psa->gvtroot_rchildren_cnt)
 			{
@@ -293,8 +295,8 @@ void dbcertify_certify_phase(void)
 	} /* for each record in phase-1 output file or each restart or each queued rh child */
 
 	/* Reaching this point, the database has been updated, with no errors. We can now certify
-	   this database as ready for the current version of GT.M
-	*/
+	 * this database as ready for the current version of GT.M
+	 */
 	util_out_print("", FLUSH);	/* New line for below message in case MUPIP extension leaves prompt */
 	if (0 == psa->blk_process_errors)
 	{
@@ -356,70 +358,69 @@ void dbcertify_certify_phase(void)
 }
 
 /* Routine to handle the processing (splitting) of a given database block. If the current block process needs
-   to be restarted, this function returns TRUE. else if processing completed normally, returns FALSE.
-
-   Routine notes:
-
-   This routine implements a "simplistic" mini database engine. It is "simplistic" in the regards to fact that it
-   doesn't need to worry about concurrency issues. It also has one design assumption that we will NEVER add a
-   record to a level 0 block (either DT or GVT). Because of this assumption, many complications from gvcst_put(), on
-   which it is largely based, were non-issues and were removed (e.g. no TP). This routine has its own concepts of
-   "cache", cw_set elements, update arrays, etc. Following is a brief description of how these things are implemented
-   in this routine:
-
-   The primary control block in this scheme is the block_info block which serves as a cache record, change array anchor,
-   gv_target, and so on. In short, everything that is known about a given database block is contained in this one
-   structure. There is an array of these structures with the name "blk_set" which is a global variable array dimensioned
-   at a thoroughly outrageous amount for the worst case scenario.
-
-   There are areas within the blk_set array that are worth describing:
-
-   - The block_depth global variable always holds the top in use index into blk_set.
-   - blk_set[0] describes the block that was fed to us from the phase 1 scan. It is the primary block that needs to
-     be split. If nothing needs to happen to it, we go to the next record and blk_set[0] get a new block in it.
-   - Starting with blk_set[1] through blk_set[bottom_tree_index] are first the directory tree (DT) blocks and then
-     (if primary was a GVT block) the global variable tree (GVT) blocks.
-   - Starting with blk_set[bottom_tree_index + 1] through blk_set[bottom_created_index] are newly created blocks during
-     split processing.
-   - Starting with blk_set[bottom_created_index + 1] through blk_set[block_depth] are local bit map blocks that are being
-     modified for the "transaction".
-
-   This engine has a very simple cache mechanism. If a block we need is somewhere in the blk_set array (a global variable
-   block_depth_hwm maintains a high water mark), the cache version is used rather than forcing a re-read from disk. It is
-   fairly simple but seems to save a lot of reads, especially of the directory tree and the local bit_maps.
-
-   Like gvcst_put(), once we have the blocks from the tree loaded, they are processed in reverse order as a split in one
-   block requires a record to be inserted into the parent block. We start with the primary block (blk_set[0]) and then
-   move to blk_set[bottom_tree_index] and work backwards from there until either we get to a block for which there are
-   no updates or we hit a root block (GVT or DT depending) at which time we are done with the primary update loop.
-
-   After performing the block splits and creating new blocks, we double check that we have room to hold them all. If not,
-   we make a call to MUPIP EXTEND to extend the database for us. Since this means we have to close the file and give up
-   our locks on it, we also restart the transaction and force all blocks to be re-read from disk.
-
-   Once assured we have sufficient free blocks, we start at blk_set[bottom_created_index] and work down to
-   blk_set[bottom_tree_index + 1] allocating and assigning block numbers to the created blocks. Part of this process also
-   puts the block numbers into places where the update arrays will pick them up when the referencing blocks are built.
-
-   Once all the new blocks have been assigned, we loop through blk_set[bottom_tree_index] to blk_set[0] and create the
-   new versions of the blocks (for those blocks marked as being updated). A note here is that this engine does not build
-   update array entries for bitmap blocks, preferring instead to just update the local bitmap block buffers directly.
-
-   The last major loop is to write to disk all the new and changed blocks to disk. There is no processing but simple IO
-   in this loop to minimize the potential of something going wrong. There is no recovery at this point. If this loop fails
-   in mid-stream, the database is toast.
-
-*/
+ * to be restarted, this function returns TRUE. else if processing completed normally, returns FALSE.
+ *
+ * Routine notes:
+ *
+ * This routine implements a "simplistic" mini database engine. It is "simplistic" in the regards to fact that it
+ * doesn't need to worry about concurrency issues. It also has one design assumption that we will NEVER add a
+ * record to a level 0 block (either DT or GVT). Because of this assumption, many complications from gvcst_put(), on
+ * which it is largely based, were non-issues and were removed (e.g. no TP). This routine has its own concepts of
+ * "cache", cw_set elements, update arrays, etc. Following is a brief description of how these things are implemented
+ * in this routine:
+ *
+ * The primary control block in this scheme is the block_info block which serves as a cache record, change array anchor,
+ * gv_target, and so on. In short, everything that is known about a given database block is contained in this one
+ * structure. There is an array of these structures with the name "blk_set" which is a global variable array dimensioned
+ * at a thoroughly outrageous amount for the worst case scenario.
+ *
+ * There are areas within the blk_set array that are worth describing:
+ *
+ * - The block_depth global variable always holds the top in use index into blk_set.
+ * - blk_set[0] describes the block that was fed to us from the phase 1 scan. It is the primary block that needs to
+ *   be split. If nothing needs to happen to it, we go to the next record and blk_set[0] get a new block in it.
+ * - Starting with blk_set[1] through blk_set[bottom_tree_index] are first the directory tree (DT) blocks and then
+ *   (if primary was a GVT block) the global variable tree (GVT) blocks.
+ * - Starting with blk_set[bottom_tree_index + 1] through blk_set[bottom_created_index] are newly created blocks during
+ *   split processing.
+ * - Starting with blk_set[bottom_created_index + 1] through blk_set[block_depth] are local bit map blocks that are being
+ *   modified for the "transaction".
+ *
+ * This engine has a very simple cache mechanism. If a block we need is somewhere in the blk_set array (a global variable
+ * block_depth_hwm maintains a high water mark), the cache version is used rather than forcing a re-read from disk. It is
+ * fairly simple but seems to save a lot of reads, especially of the directory tree and the local bit_maps.
+ *
+ * Like gvcst_put(), once we have the blocks from the tree loaded, they are processed in reverse order as a split in one
+ * block requires a record to be inserted into the parent block. We start with the primary block (blk_set[0]) and then
+ * move to blk_set[bottom_tree_index] and work backwards from there until either we get to a block for which there are
+ * no updates or we hit a root block (GVT or DT depending) at which time we are done with the primary update loop.
+ *
+ * After performing the block splits and creating new blocks, we double check that we have room to hold them all. If not,
+ * we make a call to MUPIP EXTEND to extend the database for us. Since this means we have to close the file and give up
+ * our locks on it, we also restart the transaction and force all blocks to be re-read from disk.
+ *
+ * Once assured we have sufficient free blocks, we start at blk_set[bottom_created_index] and work down to
+ * blk_set[bottom_tree_index + 1] allocating and assigning block numbers to the created blocks. Part of this process also
+ * puts the block numbers into places where the update arrays will pick them up when the referencing blocks are built.
+ *
+ * Once all the new blocks have been assigned, we loop through blk_set[bottom_tree_index] to blk_set[0] and create the
+ * new versions of the blocks (for those blocks marked as being updated). A note here is that this engine does not build
+ * update array entries for bitmap blocks, preferring instead to just update the local bitmap block buffers directly.
+ *
+ * The last major loop is to write to disk all the new and changed blocks to disk. There is no processing but simple IO
+ * in this loop to minimize the potential of something going wrong. There is no recovery at this point. If this loop fails
+ * in mid-stream, the database is toast.
+ */
 boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_type blk_type, v15_trans_num tn, int blk_levl)
 {
-	int		blk_len, blk_size, restart_cnt, save_block_depth;
+	int		blk_len, blk_size, restart_cnt, save_block_depth, tmp_blk_levl;
 	int		gvtblk_index, dtblk_index, blk_index, bottom_tree_index, bottom_created_index;
 	int		curr_blk_len, curr_blk_levl, curr_rec_len, ins_key_len, ins_rec_len;
 	int		curr_rec_shrink, curr_rec_offset, blks_this_lmap;
 	int		prev_rec_offset, new_blk_len, new_rec_len, remain_offset, remain_len, blk_seg_cnt;
 	int		new_lh_blk_len, new_rh_blk_len, created_blocks, extent_size;
-	int		local_map_max, lbm_blk_index, lcl_blk, curr_rec_cmpc, cmpc;
-	int		tmp_cmpc;
+	int		local_map_max, lbm_blk_index, lcl_blk, curr_rec_cmpc;
+	int		bplmap;
 	int4		lclmap_not_full;
 	uint4		total_blks;
 	boolean_t	dummy_bool;
@@ -427,94 +428,108 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 	blk_segment	*bs_ptr, *bs1, *blk_sega_p, *blk_array_top;
 	rec_hdr_ptr_t	ins_rec_hdr, next_rec_hdr, new_star_hdr;
 	dbc_gv_key	*last_rec_key;
-	uchar_ptr_t	rec_p, next_rec_p, mid_point, cp1, lcl_map_p, new_blk_p, blk_p, blk_endp, chr_p;
+	uchar_ptr_t	blk_endp, blk_p, bmp_ptr, chr_p, cp1, lcl_map_p, mid_point, new_blk_p, next_rec_p, rec_p;
 	unsigned short	us_rec_len;
 	v15_trans_num	curr_tn;
 	block_id	blk_ptr;
-	block_id	bitmap_blk_num, *lhs_block_id_p, *rhs_block_id_p, allocated_blk_num;
+	block_id	allocated_blk_num, bitmap_blk_num, bitnum, *lhs_block_id_p, *rhs_block_id_p;
 	block_info	*blk_set_p, *blk_set_new_p, *blk_set_prnt_p, *blk_set_bm_p, *blk_set_rhs_p;
 	block_info	restart_blk_set;
-
+	enum gdsblk_type	tmp_blk_type;
 	DEBUG_ONLY(
 		boolean_t	first_time = FALSE;
 	)
 
-	/* First order of business is to read the required block in */
+	/* First order of business is to read the required block in. Reset block_depth so this read happens in psa->blk_set[0].
+	 * Needed because following code relies on the block-to-be-split being psa->blk_set[0].
+	 */
 	psa->block_depth = -1;
-	blk_size = psa->dbc_cs_data->blk_size;	/* BLK_FINI macro needs a local copy */
 	dbc_read_dbblk(psa, blk_num, blk_type);
-
-	/* Now that we have read the block in, let us see if it is still a "problem" block. If its
-	   TN has changed, that is an indicator that is should NOT be a problem block any longer
-	   with the sole exception of a TN RESET having been done on the DB since phase 1. In that
-	   case, we will still insist on a phase 1 rerun as some of our sanity checks have disappeared.
-	*/
+	blk_size = psa->dbc_cs_data->blk_size;	/* BLK_FINI macro needs a local copy */
 	assert(0 == psa->block_depth);
+	/* Now that we have read the block, is it still "too-full"? If so and it is a data block and the tn has changed since the
+	 * scan, force the user to rerun the scan for the 3 possible reasons explained in the below comment. Defer index blocks
+	 * because, when we insert a record before the first record in the block, we may put the new record into the new (LH)
+	 * sibling and leave the entire existing block unmodified, except for a new transaction number, as the RH side. The net
+	 * result is a too full unsplit index block. This never happens with a created block, Also, gvtroot blocks (a special case
+	 * of an index block) require special processing before we can decide if they are still "too-full" and in need of a split.
+	 */
 	blk_p = psa->blk_set[0].old_buff;
 	assert(blk_p);
 	blk_len = psa->blk_set[0].blk_len;
-
-	/* If the block is still too large, sanity check on TN at phase 1 and now. Note that it is
-	   possible in an index block for the TN to have changed yet the block is otherwise unmodified
-	   if (1) this is an index block and (2) a record is being inserted before the first record in
-	   the block. In this case, the new record is put into the new (LH) sibling and the entire existing
-	   block is put unmodified into the RH side in the existing block. The net result is that only
-	   the TN changes in this block and if the block is too full it is not split. This will never
-	   happen for a created block though. It can only hapen for existing index blocks. Note if the
-	   block is not (still) too full that we cannot yet say this block has nothing to happen to it
-	   because if it is a gvtroot block, we need to record its right side children further down.
-	*/
 	GET_ULONG(curr_tn, &((v15_blk_hdr_ptr_t)blk_p)->tn);
 	if ((UNIX_ONLY(8) VMS_ONLY(9) > blk_size - blk_len) && (curr_tn != tn) && (gdsblk_gvtleaf == blk_type))
 	{
-		/* Block has been modified: Three possible reasons it is not fixed:
-		   1) The user was playing with reserved bytes and set it too low allowing some
-		   large blocks to be created we did not know about (but thankfully just caught).
-		   2) User ran a recover after running phase 1 that re-introduced some too-large
-		   blocks. This is a documented no-no but we have no way to enforce it on V4.
-		   3) There was a TN reset done.
-		   All three of these causes require a rerun of the scan phase.
-		*/
+		/* Leaf block has been modified since the scan: Three possible reasons it is still too-full (i.e. needs split).
+		 * 1) The user was playing with reserved bytes and set it too low allowing some
+		 *		large blocks to be created we did not know about (but thankfully just caught).
+		 * 2) User ran a mupip journal recover -backward after running phase 1 that re-introduced some too-large
+		 *		blocks. This is a documented no-no but we have no way to enforce it on V4.
+		 * 3) There was a TN reset done.
+		 *
+		 * All three of these causes require a rerun of the scan phase.
+		 */
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_DBCMODBLK2BIG, 1, blk_num);
 	}
-	/* Isolate the full key in the first record of the block */
+	/* Isolate the full key in the first record of the block. If needed, descend down blocks with only *-key */
 	dbc_init_key(psa, &psa->first_rec_key);
-	dbc_find_key(psa, psa->first_rec_key, blk_p + SIZEOF(v15_blk_hdr), psa->blk_set[0].blk_levl);
-	if ((0 < psa->blk_set[0].blk_levl) && (0 == psa->first_rec_key->end))
-	{	/* dbc_find_key found just a star-key in this index block. dbc_find_record/dbc_match_key (invoked later)
-		 * does not know to handle this scenario so we finish this case off right away. No need to do any splits
-		 * anyways since the block is obviously not too full.
+	tmp_blk_levl = psa->blk_set[0].blk_levl;
+	tmp_blk_type = blk_type;
+	new_blk_p = blk_p;
+	do
+	{
+		rec_p = new_blk_p + SIZEOF(v15_blk_hdr);
+		dbc_find_key(psa, psa->first_rec_key, rec_p, tmp_blk_levl);
+		if (!tmp_blk_levl && psa->first_rec_key->end)
+		{	/* Read key and is a leaf level block. Can stop search. If non-leaf block, we cannot stop search
+			 * since it is possible this is a DT index block. Global names stored in DT index blocks are likely
+			 * to not be found when searched for later in "dbc_find_dtblk".
+			 */
+			if (new_blk_p != blk_p)
+			{	/* We read additional blocks in this do/while loop. Since that confuses
+				 * "dbc_find_dtblk" (and maybe others), undo effects of the read by resetting the cache.
+				 */
+				psa->block_depth = 0;
+				psa->block_depth_hwm = 0;
+			}
+			break;	/* Found a non-* key. Proceed with search */
+		}
+		/* Descend down until we find non-* key */
+		assert(tmp_blk_levl);
+		GET_ULONG(blk_ptr, rec_p + ((rec_hdr_ptr_t)rec_p)->rsiz - SIZEOF(block_id));
+		blk_index = dbc_read_dbblk(psa, blk_ptr, tmp_blk_type);
+		/* Note that we cannot do a "tmp_blk_levl--" here but instead should get the child block level from the block
+		 * header. This is because it is possible the block we started out with is no longer marked BUSY in the bitmap
+		 * (because of updates after the "dbcertify scan" but before the "dbcertify certify"). Since we dont check
+		 * a block's bitmap status first (to avoid performance overhead of reading bitmap for every block that is
+		 * processed by certify), we need to add robustness within dbcertify to handle that.
 		 */
-		DBC_DEBUG(("DBC_DEBUG: Block not processed as it now has sufficient room (index block with only *-key)\n"));
-		psa->blks_bypassed++;
-		psa->blks_read++;
-		if (psa->blk_set[0].found_in_cache)
-			psa->blks_cached++;
-		return FALSE;	/* No restart needed */
-	}
+		tmp_blk_levl = psa->blk_set[blk_index].blk_levl;
+		new_blk_p = psa->blk_set[blk_index].old_buff;
+		switch(tmp_blk_type)
+		{
+			case gdsblk_dtindex:
+			case gdsblk_dtleaf:
+			case gdsblk_dtroot:
+				tmp_blk_type = (tmp_blk_levl ? gdsblk_dtindex : gdsblk_dtleaf);
+				break;
+			case gdsblk_gvtindex:
+			case gdsblk_gvtleaf:
+				tmp_blk_type = (tmp_blk_levl ? gdsblk_gvtindex : gdsblk_gvtleaf);
+				break;
+		}
+	} while (TRUE);
+	assert(psa->first_rec_key->end);
 	psa->first_rec_key->gvn_len = USTRLEN((char_ptr_t)psa->first_rec_key->base);	/* The GVN we need to lookup in the DT */
-	if (UNIX_ONLY(8) VMS_ONLY(9) <= blk_size - blk_len)
-	{	/* This block has room now - no longer need to split it */
-		DBC_DEBUG(("DBC_DEBUG: Block not processed as it now has sufficient room\n"));
-		psa->blks_bypassed++;
-		psa->blks_read++;
-		if (psa->blk_set[0].found_in_cache)
-			psa->blks_cached++;
-		return FALSE;	/* No restart needed */
-	}
 	/* Possibilities at this point:
-	   1) We are looking for a DT (directory tree) block.
-	   2) We are looking for a GVT (global variable tree) block.
-
-	   We lookup first_rec_key in the directory tree. If (1) we pass the block level we are searching for
-	   as a parameter. If (2), we pass -1 as the block level we are searching for as we need a complete
-	   search of the leaf level DT in order to find the GVN.
-
-	   If (1) then the lookup is complete and verification and (later) block splitting can begin. If (2), we need to
-	   take the pointer from the found DT record which points to the GVT root block and start our search again
-	   from there using the level from the original block as a stopping point. One special case here is if our
-	   target block was a gvtroot block, we don't need to traverse the GVT tree to find it. We get it from the
-	   directory tree and stop our search there.
+	 * 1) We are looking for a DT (directory tree) block, and pass the block level we are searching for as a parameter
+	 * 2) We are looking for a GVT (global variable tree) block and -1 as the block level as we need a complete search
+	 *     of the leaf level DT in order to find the GVN.
+	 *
+	 * If (1), once we arrive at the block, validation is complete and verification and (later) block splitting can begin
+	 * If (2), we need to take the pointer from the found DT record which points to the GVT root block and start our
+	 * search again from there using the level from the original block as a stopping point. If our target block was a
+	 * gvtroot block, we don't need to traverse the GVT tree to find it, as the directory tree already identified it
 	 */
 	switch(blk_type)
 	{
@@ -542,21 +557,36 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					ERR_DBCINTEGERR, 2, RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn),
 					ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to locate DT leaf (root) block"));
 			}
+			if (0 == dtblk_index)
+			{	/* Located the to-be-split gvtindex/gvtleaf block in the directory tree.
+				 * This is possible only if the gvt block became FREE (due to a KILL and then
+				 * got reused as part of a directory tree update done either by M updates since
+				 * the scan or by this dbcertify certify itself). In either case, this block
+				 * does not need processing anymore as it would not be too-full when it became
+				 * BUSY again.
+				 */
+				DBC_DEBUG(("DBC_DEBUG: Block not processed as it was in GVT but is now in DT\n"));
+				psa->blks_bypassed++;
+				psa->blks_read++;
+				if (psa->blk_set[0].found_in_cache)
+					psa->blks_cached++;
+				return FALSE;	/* No restart needed */
+			}
 			assert(0 == ((v15_blk_hdr_ptr_t)psa->blk_set[dtblk_index].old_buff)->levl);
 			/* Note level 0 directory blocks can have collation data in them but it would be AFTER
-			   the block pointer which is the first thing in the record after the key.
-			*/
+			 * the block pointer which is the first thing in the record after the key.
+			 */
 			GET_ULONG(blk_ptr, (psa->blk_set[dtblk_index].curr_rec + SIZEOF(rec_hdr)
 					    + psa->blk_set[dtblk_index].curr_blk_key->end + 1
 					    - EVAL_CMPC((rec_hdr *)psa->blk_set[dtblk_index].curr_rec)));
 			gvtblk_index = dbc_read_dbblk(psa, blk_ptr, gdsblk_gvtroot);
 			assert(-1 != gvtblk_index);
 			/* If our target block was not the gvtroot block we just read in then we keep scanning for our
-			   target record. Otherwise, the scan stops here.
-			*/
+			 * target record. Otherwise, the scan stops here.
+			 */
 			if (0 != gvtblk_index)
 			{
-				blk_index = dbc_find_record(psa, psa->first_rec_key, gvtblk_index, blk_levl, gdsblk_gvtroot, FALSE);
+				blk_index = dbc_find_record(psa, psa->first_rec_key, gvtblk_index, blk_levl, gdsblk_gvtroot);
 				if (0 > blk_index)
 				{
 					if (-1 == blk_index)
@@ -568,16 +598,15 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 							  RTS_ERROR_LITERAL("Unable to find index record for an existing global"));
 					} else if (-2 == blk_index)
 					{	/* Record was not found. Record has been deleted since we last
-						   found it. Elicits a warning message in DEBUG mode but is otherwise ignored.
-						*/
-						assert(FALSE);
+						 * found it. Elicits a warning message in DEBUG mode but is otherwise ignored.
+						 */
 						DBC_DEBUG(("DBC_DEBUG: Block split of blk 0x%x bypassed because its "
 							   "key could not be located in the GVT\n", blk_num));
 						psa->blks_bypassed++;
 						psa->blks_read += psa->block_depth;
 						/* Only way to properly update the count of cached records is to run the list
-						   and check them.
-						*/
+						 * and check them.
+						 */
 						for (blk_index = psa->block_depth, blk_set_p = &psa->blk_set[blk_index];
 						     0 <= blk_index;
 						     --blk_index, --blk_set_p)
@@ -598,48 +627,60 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 		default:
 			assertpro(FALSE);
 	}
-	/* The most recently accessed block (that terminated the search) should be the block
-	   we are looking for (which should have been found in the cache as block 0. If not,
-	   there is an integrity error and we should not continue.
-	*/
+	/* The most recently accessed block (that terminated the search) should be the block we are looking for
+	 * (which should have been found in the cache as block 0. If not, there is an integrity error and we should
+	 * not continue. The only exception though is if this block has been modified since the scan. If so, it is
+	 * more likely the block's status (part-of-GVT OR part-of-DT OR marked-free-in-bitmap) changed since the scan
+	 * than that there is an integrity error. If the block tn has changed and is no longer "too-full", assume db
+	 * is clean in this case and bypass processing this block.
+	 */
 	if (0 != blk_index)
-	{	/* Integrity error encountered. We cannot proceed */
+	{
+		if ((curr_tn != tn) && (8 <= (blk_size - blk_len)))
+		{
+			DBC_DEBUG(("DBC_DEBUG: Block not processed as its GVT/DT/Bitmap status changed since scan\n"));
+			psa->blks_bypassed++;
+			psa->blks_read++;
+			if (psa->blk_set[0].found_in_cache)
+				psa->blks_cached++;
+			return FALSE;	/* No restart needed */
+		}
+		/* Integrity error encountered. We cannot proceed */
 		assert(FALSE);
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DBCINTEGERR, 2, RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn),
 			  ERR_TEXT, 2,
 			  RTS_ERROR_LITERAL("Did not locate record in same block as we started searching for"));
 	}
-
 	/* If this is a gvtroot type block, we have some extra processing to do. Following is a description of
-	   the issue we are addressing here. If a gvtroot block is "too large" and was too large at the time
-	   the scan was run, it will of course be identified by the scan as too large. Prior to running the scan,
-	   the reserved bytes field was set so no more too-full blocks can be created. But if a gvtroot block is
-	   identified by the scan and subsequently has to be split by normal GTM processing before the certify
-	   can be done, the too-full part of the block can (in totality) end up in the right hand child of the
-	   gvtroot block (not obeying the reserved bytes rule). But the gvtroot block is the only one that was
-	   identified by the scan and certify may now miss the too-full block in the right child. Theoretically,
-	   the entire right child chain of the gvtroot block can be too full. Our purpose here is that when we
-	   have identified a gvtblock as being too full, we pause here to read the right child chain coming off
-	   of that block all the way down to (but not including) block level 0. Each of these blocks will be
-	   processed to check for being too full. The way we do this is to run the chain and build p1rec entries
-	   in the gvtroot_rchildren[] array. When we are at the top of the processing loop, we will take these
-	   array entries over records from the phase one input file. We only load up the array if it is empty.
-	   Otherwise, the assumption is that we are re-processing and the issue has already been handled.
-	*/
+	 * the issue we are addressing here. If a gvtroot block is "too large" and was too large at the time
+	 * the scan was run, it will of course be identified by the scan as too large. Prior to running the scan,
+	 * the reserved bytes field was set so no more too-full blocks can be created. But if a gvtroot block is
+	 * identified by the scan and subsequently has to be split by normal GTM processing before the certify
+	 * can be done, the too-full part of the block can (in totality) end up in the right hand child of the
+	 * gvtroot block (not obeying the reserved bytes rule). But the gvtroot block is the only one that was
+	 * identified by the scan and certify may now miss the too-full block in the right child. Theoretically,
+	 * the entire right child chain of the gvtroot block can be too full. Our purpose here is that when we
+	 * have identified a gvtblock as being too full, we pause here to read the right child chain coming off
+	 * of that block all the way down to (but not including) block level 0. Each of these blocks will be
+	 * processed to check for being too full. The way we do this is to run the chain and build p1rec entries
+	 * in the gvtroot_rchildren[] array. When we are at the top of the processing loop, we will take these
+	 * array entries over records from the phase one input file. We only load up the array if it is empty.
+	 * Otherwise, the assumption is that we are re-processing and the issue has already been handled.
+	 */
 	blk_set_p = &psa->blk_set[0];
-	if (gdsblk_gvtroot == blk_set_p->blk_type && 0 == psa->gvtroot_rchildren_cnt)
+	if ((gdsblk_gvtroot == blk_set_p->blk_type) && (0 == psa->gvtroot_rchildren_cnt))
 	{
 		DBC_DEBUG(("DBC_DEBUG: Encountered gvtroot block (block %d [0x%08x]), finding/queueing children\n",
 			   blk_set_p->blk_num, blk_set_p->blk_num));
 		save_block_depth = psa->block_depth;	/* These reads are temporary and should not remain in cache so
-							   we will restore block_depth after we are done.
-							*/
+							 * we will restore block_depth after we are done.
+							 */
 		/* Attempting to locate the maximum possible key for this database should read the list of right
-		   children into the cache. Pretty much any returncode from dbc_find_record is possible. We usually
-		   aren't going to find the global which may come up as not found or an integrity error or it could
-		   possibly even be found. Just go with what it gives us. Not much verification we can do on it.
-		*/
-		blk_index = dbc_find_record(psa, psa->max_key, 0, 0, gdsblk_gvtroot, TRUE);
+		 * children into the cache. Pretty much any returncode from dbc_find_record is possible. We usually
+		 * aren't going to find the global which may come up as not found or an integrity error or it could
+		 * possibly even be found. Just go with what it gives us. Not much verification we can do on it.
+		 */
+		blk_index = dbc_find_record(psa, psa->max_key, 0, 0, gdsblk_gvtroot);
 		/* Pull children (if any) out of cache and put into queue for later processing */
 		for (blk_index = save_block_depth + 1;
 		     blk_index <= psa->block_depth && gdsblk_gvtleaf != psa->blk_set[blk_index].blk_type;
@@ -671,17 +712,17 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 	}
 
 	/* Beginning of block update/split logic. We need to process the blocks in the reverse order from the
-	   tree path. This means blk_set[0] which is actually the block we want to split must be the first
-	   in our path. We then need to process the block array backwards in case the changes made to those
-	   records cause subsequent splits.
-
-	   First order of business is to find a suitable place to split this block .. Run through
-	   the records in the block until we are "halfway" through the block. Split so that the first record
-	   (after the first) whose end point is in the "second half" of the block will be the first record of
-	   the second half or right hand side block after the split. This makes sure that the left side has at
-	   least one record in it. We already know that this block has at least 2 records in it or it would not
-	   need splitting.
-	*/
+	 * tree path. This means blk_set[0] which is actually the block we want to split must be the first
+	 * in our path. We then need to process the block array backwards in case the changes made to those
+	 * records cause subsequent splits.
+	 *
+	 * First order of business is to find a suitable place to split this block .. Run through
+	 * the records in the block until we are "halfway" through the block. Split so that the first record
+	 * (after the first) whose end point is in the "second half" of the block will be the first record of
+	 * the second half or right hand side block after the split. This makes sure that the left side has at
+	 * least one record in it. We already know that this block has at least 2 records in it or it would not
+	 * need splitting.
+	 */
 	rec_p = blk_p + SIZEOF(v15_blk_hdr);
 	blk_set_p->curr_rec = rec_p;
 	dbc_find_key(psa, blk_set_p->curr_blk_key, rec_p, blk_set_p->blk_levl);
@@ -759,10 +800,10 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			ins_key_len = ins_rec_len = 0;
 		blk_p = blk_set_p->old_buff;
 		/* If ins_rec_len has a non-zero value, then we need to reset the values for prev_match and
-		   key_match. These values were computed using the original scan key as their basis. Now we
-		   are using these fields to insert a new key. The positioning is still correct but the
-		   number of matching characters is potentially different.
-		*/
+		 * key_match. These values were computed using the original scan key as their basis. Now we
+		 * are using these fields to insert a new key. The positioning is still correct but the
+		 * number of matching characters is potentially different.
+		 */
 		if (ins_rec_len)
 		{
 			if (0 != blk_set_p->prev_blk_key->end)
@@ -784,29 +825,30 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 		prev_rec_offset = (int)(blk_set_p->prev_rec - blk_set_p->old_buff);
 		got_root = (gdsblk_dtroot == blk_set_p->blk_type) || (gdsblk_gvtroot == blk_set_p->blk_type);
 		/* Decide if this record insert (if an insert exists) will cause a block split or not. If this
-		   is the first block in the tree (the one we got from the phase 1 file), there will be no insert.
-		   If we find a block that does not need to change, we are done and can exit the loop.
-		   This differs from the regular GT.M runtime which must keep checking even the split blocks
-		   but since we never add data to a level 0 block being split, we will never create split-off
-		   blocks that themselves are (still) too full.
-		*/
+		 * is the first block in the tree (the one we got from the phase 1 file), there will be no insert.
+		 * If we find a block that does not need to change, we are done and can exit the loop.
+		 * This differs from the regular GT.M runtime which must keep checking even the split blocks
+		 * but since we never add data to a level 0 block being split, we will never create split-off
+		 * blocks that themselves are (still) too full.
+		 */
 		assert(gdsblk_read == blk_set_p->usage);
 		new_blk_len = (int)(ins_rec_len ? (curr_blk_len + curr_rec_cmpc + SIZEOF(rec_hdr) + ins_rec_len
 					      - blk_set_p->prev_match - blk_set_p->curr_match)
 			       : curr_blk_len);		/* No inserted rec, size does not change */
 		if (new_blk_len <= psa->max_blk_len)
 		{	/* "Simple" case .. we do not need a block split - only (possibly) a record added. Note
-			   that this is the only path where there may not be a "previous" record so we
-			   have to watch for that possibility.
-			*/
+			 * that this is the only path where there may not be a "previous" record so we
+			 * have to watch for that possibility.
+			 */
 			assert(0 != blk_index);		/* Never insert a record into target blk so should never be here */
 			/* In this path we should always have an inserted record length. We should have detected we
-			   were done in an earlier loop iteration.
-			*/
+			 * were done in an earlier loop iteration.
+			 */
 			assert(ins_rec_len);
 			DBC_DEBUG(("DBC_DEBUG: Block index %d is a simple update\n", blk_index));
 			/* We must have an insert at this point and since we only ever insert records into
-			   index blocks, we must be in that situation */
+			 * index blocks, we must be in that situation.
+			 */
 			assert(0 != curr_blk_levl);
 			blk_set_p->usage = gdsblk_update;	/* It's official .. blk is being modified */
 			/* We have a record to insert into this block but no split is needed */
@@ -832,18 +874,17 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			       blk_set_p->ins_rec.ins_key->end + 1 - blk_set_p->prev_match);
 			BLK_SEG(bs_ptr, cp1, blk_set_p->ins_rec.ins_key->end + 1 - blk_set_p->prev_match);
 			/* Setup value (all index records have value of size "block_id". The proper value is
-			   either there already or will be when we go to commit these changes. */
+			 * either there already or will be when we go to commit these changes.
+			 */
 			BLK_SEG(bs_ptr, (sm_uc_ptr_t)&blk_set_p->ins_rec.blk_id, SIZEOF(block_id));
-			/* For index blocks, we know that since a star key is the last record in the block
-			   (which is the last record that can be curr_rec) that there is a trailing portion
-			   of the block we need to output.
-			*/
+			/* For index blocks, we know that since a star key is the last record in the block (which is the
+			 * last record that can be curr_rec) that there is a trailing portion of the block we need to output.
+			 */
 			BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr);	/* Replacement rec header */
 			next_rec_hdr->rsiz = curr_rec_len - curr_rec_shrink;
 			SET_CMPC(next_rec_hdr, blk_set_p->curr_match);
 			BLK_SEG(bs_ptr, (sm_uc_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
-			remain_offset = curr_rec_shrink + SIZEOF(rec_hdr);	/* Where rest of record plus any
-										   further records begin */
+			remain_offset = curr_rec_shrink + SIZEOF(rec_hdr); /* Where rest of record + any further records begin */
 			remain_len = curr_blk_len - curr_rec_offset;
 			BLK_SEG(bs_ptr,
 				blk_set_p->curr_rec + remain_offset,
@@ -856,49 +897,49 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			break;
 		} else
 		{	/* The block is either already too large or would be too large when the record is inserted
-			   and so it must be split.
-
-			   There are two different ways a block can be split. It can either be split so that:
-
-			   (1) the inserted record is at the end of the left block or,
-
-			   (2) the record is the first record in the right half.
-
-			   Compute the left/right block sizes for these two options and see which one does not
-			   force a secondary block split (one of them must be true here unlike in GT.M code because
-			   here we are NEVER adding a record to a level 0 block, we only split lvl 0 blocks as
-			   needed). Note that the case where we are splitting a level 0 block with no record insert
-			   is treated as an unremarkable variant of option (1) as described above.
-
-			   Follow the conventions of gvcst_put (LHS to new block, RHS to old block):
-
-			   (1) If we are inserting the record into the lefthand side then a new split-off block will
-			   receive the first part of the block including the record. The remainder of the block is
-			   placed into the current (existing) block.
-
-			   (2) If we are putting the record into the righthand side, then a new split-off block will
-			   receive the first part of the block. The new record plus the remainder of the block is
-			   placed into the current block.
-
-			   The sole exception to the above is if a root block (either DT or GVT) is being split. In
-			   that case, BOTH the LHS and RHS become NEW blocks and the root block is (a) increased in
-			   level and (b) contains only entries for the two created blocks.
-
-			   Note that gvcst_put has several additional checks and balances here that we are forgoing
-			   such as making sure the blocks are as balanced as possible, concurrency concerns, etc. They
-			   add un-needed complications to this one-time code. Any inefficiencies here can be undone
-			   with a pass of MUPIP REORG.
-			*/
+			 * and so it must be split.
+			 *
+			 * There are two different ways a block can be split. It can either be split so that:
+			 *
+			 * (1) the inserted record is at the end of the left block or,
+			 *
+			 * (2) the record is the first record in the right half.
+			 *
+			 * Compute the left/right block sizes for these two options and see which one does not
+			 * force a secondary block split (one of them must be true here unlike in GT.M code because
+			 * here we are NEVER adding a record to a level 0 block, we only split lvl 0 blocks as
+			 * needed). Note that the case where we are splitting a level 0 block with no record insert
+			 * is treated as an unremarkable variant of option (1) as described above.
+			 *
+			 * Follow the conventions of gvcst_put (LHS to new block, RHS to old block):
+			 *
+			 * (1) If we are inserting the record into the lefthand side then a new split-off block will
+			 * receive the first part of the block including the record. The remainder of the block is
+			 * placed into the current (existing) block.
+			 *
+			 * (2) If we are putting the record into the righthand side, then a new split-off block will
+			 * receive the first part of the block. The new record plus the remainder of the block is
+			 * placed into the current block.
+			 *
+			 * The sole exception to the above is if a root block (either DT or GVT) is being split. In
+			 * that case, BOTH the LHS and RHS become NEW blocks and the root block is (a) increased in
+			 * level and (b) contains only entries for the two created blocks.
+			 *
+			 * Note that gvcst_put has several additional checks and balances here that we are forgoing
+			 * such as making sure the blocks are as balanced as possible, concurrency concerns, etc. They
+			 * add un-needed complications to this one-time code. Any inefficiencies here can be undone
+			 * with a pass of MUPIP REORG.
+			 */
 			DBC_DEBUG(("DBC_DEBUG: Block index %d needs to be split\n", blk_index));
 			/*  First up is split so that the inserted record (if any) is the last record in the left
-			    hand block. Note if this is an index block, the last record must be a star key rec as per
-			    option (1) above.
-			*/
+			 *  hand block. Note if this is an index block, the last record must be a star key rec as per
+			 *  option (1) above.
+			 */
 			if (curr_blk_levl)
 				/* Index block. Two cases: (a) We are adding a key to the end in which case it is just
-				   a simple star key rec or (b) No record is being added so the previous record is
-				   changed into a star key rec.
-				*/
+				 * a simple star key rec or (b) No record is being added so the previous record is
+				 * changed into a star key rec.
+				 */
 				new_lh_blk_len = (int)(curr_rec_offset + BSTAR_REC_SIZE
 					- (ins_rec_len ? 0 : (blk_set_p->curr_rec - blk_set_p->prev_rec)));
 			else
@@ -955,9 +996,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					}
 				} else
 				{	/* Index block -- may or may not be adding a record.
-					   If adding a record, the inserted record becomes a star key record.
-					   If not adding a record the last record is morphed into a star key record.
-					*/
+					 * If adding a record, the inserted record becomes a star key record.
+					 * If not adding a record the last record is morphed into a star key record.
+					 */
 					BLK_SEG(bs_ptr, blk_set_p->old_buff + SIZEOF(v15_blk_hdr),
 						(ins_rec_len ? curr_rec_offset : prev_rec_offset)
 						- SIZEOF(v15_blk_hdr));
@@ -982,9 +1023,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					last_rec_key = blk_set_p->ins_rec.ins_key;
 				if (!got_root)
 				{	/* New block created, insert record to it in parent block. To do this we create
-					   a record with the last key in this LH block to be inserted between curr_rec
-					   and prev_rec of the parent block.
-					*/
+					 * a record with the last key in this LH block to be inserted between curr_rec
+					 * and prev_rec of the parent block.
+					 */
 					if (0 == blk_index)
 						blk_set_prnt_p = &psa->blk_set[bottom_tree_index]; /* Cycle back up to parent */
 					else
@@ -992,15 +1033,15 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					assert(blk_set_prnt_p != &psa->blk_set[0]);
 					assert(NULL != last_rec_key);
 					/* Note: We do not need the "+ 1" on the key length since SIZEOF(dbc_gv_key) contains
-					   the first character of the key so the "+ 1" to get the last byte of the key is
-					   already integrated into the length
-					*/
+					 * the first character of the key so the "+ 1" to get the last byte of the key is
+					 * already integrated into the length
+					 */
 					memcpy(blk_set_prnt_p->ins_rec.ins_key, last_rec_key,
 					       SIZEOF(dbc_gv_key) + last_rec_key->end);
 					/* Setup so that creation of the blk_set_new_p block can then set its block id into
-					   our parent block's insert rec buffer which will be made part of the inserted
-					   record at block build time
-					*/
+					 * our parent block's insert rec buffer which will be made part of the inserted
+					 * record at block build time
+					 */
 					blk_set_new_p->ins_blk_id_p = &blk_set_prnt_p->ins_rec.blk_id;
 					blk_set_rhs_p = blk_set_p;	/* Use original block for rhs */
 					blk_set_rhs_p->usage = gdsblk_update;
@@ -1013,12 +1054,12 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					blk_set_rhs_p = &psa->blk_set[psa->block_depth];
 					dbc_init_blk(psa, blk_set_rhs_p, -1, gdsblk_create, new_rh_blk_len, curr_blk_levl);
 					/* We will put the pointers to both this block and the RHS we build next
-					   into the original root block -- done later when RHS is complete */
-					/* If root, the RHS sub-block is a different type */
+					 * into the original root block -- done later when RHS is complete.
+					 * If root, the RHS sub-block is a different type.
+					 */
 					blk_set_rhs_p->blk_type = (gdsblk_gvtroot == blk_set_p->blk_type)
 						? gdsblk_gvtindex : gdsblk_dtindex;
 				}
-
 				/**** Now build RHS into either current or new block ****/
 				BLK_INIT(bs_ptr, bs1);
 				blk_set_rhs_p->upd_addr = bs1;		/* Block building roadmap.. */
@@ -1026,8 +1067,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				next_rec_hdr->rsiz = curr_rec_len + curr_rec_cmpc;
 				SET_CMPC(next_rec_hdr, 0);
 				BLK_SEG(bs_ptr, (uchar_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
-				/* Copy the previously compressed part of the key out of curr_rec. Note, if this
-				   key is a star rec key, nothing is written because cmpc is zero */
+				/* Copy the previously compressed part of the key out of curr_rec.
+				 * Note, if this key is a star rec key, nothing is written because cmpc is zero.
+				 */
 				if (curr_rec_cmpc)
 				{
 					BLK_ADDR(cp1, curr_rec_cmpc, unsigned char);
@@ -1051,8 +1093,8 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				/* By definition we *must* have an inserted record in this path */
 				assert(0 != ins_rec_len);
 				/* New block sizes - note because we *must* be inserting a record in this method,
-				   the only case considered here is when we are operating on an index block.
-				*/
+				 * the only case considered here is when we are operating on an index block.
+				 */
 				assert(!level_0);
 				/* Last record turns into star key record */
 				new_lh_blk_len = (int)(curr_rec_offset + BSTAR_REC_SIZE -
@@ -1063,24 +1105,24 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				assert(0 < new_rh_blk_len);
 				if (new_lh_blk_len > psa->max_blk_len || new_rh_blk_len > psa->max_blk_len)
 				{	/* This is possible if we are inserting a record into a block (and thus we are
-					   not picking the insertion point) and the insertion point is either the first or
-					   next-to-last record in the block such that neither method 1 nor 2 can create blocks
-					   of acceptable size. In this case, although this problem block is likely on the
-					   list of blocks to process, we cannot wait and thus must perform the split now.
-					   To do that, we call this same routine recursively with the necessary parms to
-					   process *THIS* block. Since this will destroy all the structures we had built
-					   up, signal a transaction restart which will re-read everything and should allow
-					   the transaction we were processing to proceed.
-					*/
+					 * not picking the insertion point) and the insertion point is either the first or
+					 * next-to-last record in the block such that neither method 1 nor 2 can create blocks
+					 * of acceptable size. In this case, although this problem block is likely on the
+					 * list of blocks to process, we cannot wait and thus must perform the split now.
+					 * To do that, we call this same routine recursively with the necessary parms to
+					 * process *THIS* block. Since this will destroy all the structures we had built
+					 * up, signal a transaction restart which will re-read everything and should allow
+					 * the transaction we were processing to proceed.
+					 */
 					if (curr_blk_len <= psa->max_blk_len)
 						/* Well, that wasn't the problem, something else is wrong */
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DBCINTEGERR, 2,
 							  RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn),
 							  ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to split block appropriately"));
 					/* If we do have to restart, we won't be able to reinvoke dbc_split_blk() with the
-					   parms taken from the current blk_set_p as that array will be overwritten by the
-					   recursion. Save the current blk_set_p so we can use it in a restartable context.
-					*/
+					 * parms taken from the current blk_set_p as that array will be overwritten by the
+					 * recursion. Save the current blk_set_p so we can use it in a restartable context.
+					 */
 					restart_blk_set = *blk_set_p;
 					for (restart_cnt = 0, restart_transaction = TRUE;
 					     restart_transaction;
@@ -1099,17 +1141,13 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				}
 				DBC_DEBUG(("DBC_DEBUG: Method 2 block lengths: lh: %d  rh: %d  max_blk_len: %d\n",
 					   new_lh_blk_len, new_rh_blk_len, psa->max_blk_len));
-
 				/* Start building (new) LHS block - for this index record, the record before the split
-				   becomes a new *-key.
-
-				   Note:  If the block split was caused by our appending the new record
-				   to the end of the block, this code causes the record PRIOR to the
-				   current *-key to become the new *-key.
-				*/
-				BLK_SEG(bs_ptr,
-					blk_set_p->old_buff + SIZEOF(v15_blk_hdr),
-					prev_rec_offset - SIZEOF(v15_blk_hdr));
+				 * becomes a new *-key.
+				 * Note:  If the block split was caused by our appending the new record
+				 * to the end of the block, this code causes the record PRIOR to the
+				 * current *-key to become the new *-key.
+				 */
+				BLK_SEG(bs_ptr, blk_set_p->old_buff + SIZEOF(v15_blk_hdr), prev_rec_offset - SIZEOF(v15_blk_hdr));
 				/* Replace last record with star key rec */
 				BLK_ADDR(new_star_hdr, SIZEOF(rec_hdr), rec_hdr);
 				new_star_hdr->rsiz = BSTAR_REC_SIZE;
@@ -1124,9 +1162,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				if (!got_root)
 				{
 					/* New block created, insert record to it in parent block. To do this we create
-					   a record with the last key in this LH block to be inserted between curr_rec
-					   and prev_rec of the parent block.
-					*/
+					 * a record with the last key in this LH block to be inserted between curr_rec
+					 * and prev_rec of the parent block.
+					 */
 					if (0 == blk_index)
 						blk_set_prnt_p = &psa->blk_set[bottom_tree_index]; /* Cycle back up to parent */
 					else
@@ -1134,15 +1172,15 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					assert(blk_set_prnt_p != &psa->blk_set[0]);
 					assert(NULL != blk_set_p->prev_blk_key);
 					/* Note: We do not need the "+ 1" on the key length since SIZEOF(dbc_gv_key) contains
-					   the first character of the key so the "+ 1" to get the last byte of the key is
-					   already integrated into the length
-					*/
+					 * the first character of the key so the "+ 1" to get the last byte of the key is
+					 * already integrated into the length
+					 */
 					memcpy(blk_set_prnt_p->ins_rec.ins_key, blk_set_p->prev_blk_key,
 					       SIZEOF(dbc_gv_key) + blk_set_p->prev_blk_key->end);
 					/* Setup so that creation of the blk_set_new_p block can then set its block id into
-					   our parent block's insert rec buffer which will be made part of the inserted
-					   record at block build time
-					*/
+					 * our parent block's insert rec buffer which will be made part of the inserted
+					 * record at block build time
+					 */
 					blk_set_new_p->ins_blk_id_p = &blk_set_prnt_p->ins_rec.blk_id;
 					blk_set_rhs_p = blk_set_p;	/* Use original block for rhs */
 					blk_set_rhs_p->usage = gdsblk_update;
@@ -1157,18 +1195,16 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					last_rec_key = blk_set_p->curr_blk_key;
 					dbc_init_blk(psa, blk_set_rhs_p, -1, gdsblk_create, new_rh_blk_len, curr_blk_levl);
 					/* We will put the pointers to both this block and the RHS we build next
-					   into the original root block -- done later when RHS is complete */
-					/* If root, the RHS sub-block is a different type */
+					 * into the original root block -- done later when RHS is complete.
+					 * If root, the RHS sub-block is a different type.
+					 */
 					blk_set_rhs_p->blk_type = (gdsblk_gvtroot == blk_set_p->blk_type)
 						? gdsblk_gvtindex : gdsblk_dtindex;
 				}
-
 				/**** Now build RHS into current block ****/
 				BLK_INIT(bs_ptr, bs1);
 				blk_set_rhs_p->upd_addr = bs1;		/* Block building roadmap.. */
-				/* Build record header for inserted record. Inserted record is always for index
-				   type blocks
-				*/
+				/* Build record header for inserted record. Inserted record is always for index type blocks */
 				BLK_ADDR(ins_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
 				ins_rec_hdr->rsiz = SIZEOF(rec_hdr) + blk_set_p->ins_rec.ins_key->end + 1
 					+ SIZEOF(block_id);
@@ -1178,17 +1214,18 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				BLK_SEG(bs_ptr,
 					blk_set_p->ins_rec.ins_key->base,
 					blk_set_p->ins_rec.ins_key->end + 1);
-				/* Finally the inserted record value always comes from the block_id field. It is
-				   not filled in now but will be when the block it refers to is created. */
+				/* Finally the inserted record value always comes from the block_id field.
+				 * It is not filled in now but will be when the block it refers to is created.
+				 */
 				BLK_SEG(bs_ptr,	(uchar_ptr_t)&blk_set_p->ins_rec.blk_id, SIZEOF(block_id));
 				/* Record that was first in RH side now needs its cmpc (and length) reset since
-				   it is now the second record in the new block. */
+				 * it is now the second record in the new block.
+				 */
 				BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
 				next_rec_hdr->rsiz = curr_rec_len - curr_rec_shrink;
 				SET_CMPC(next_rec_hdr, blk_set_p->curr_match);
 				BLK_SEG(bs_ptr, (uchar_ptr_t)next_rec_hdr, SIZEOF(rec_hdr));
-				remain_offset = curr_rec_shrink + SIZEOF(rec_hdr);	/* Where rest of record plus any
-											   further records begin */
+				remain_offset = curr_rec_shrink + SIZEOF(rec_hdr);/* Where rest of record + anymore records begin */
 				remain_len = curr_blk_len - curr_rec_offset;
 				BLK_SEG(bs_ptr,
 					blk_set_p->curr_rec + remain_offset,
@@ -1199,18 +1236,17 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			} /* else method (2) */
 			if (got_root)
 			{	/* If we have split a root block, we need to now set the pointers to the new LHS
-				   and RHS blocks into the root block as the only records. Note this requires a
-				   level increase of the tree. Hopefully we will not come across a database that is
-				   already at maximum level. If so, the only way to reduce the level is to run
-				   MUPIP REORG with a fairly recent vintage of GT.M
-				*/
+				 * and RHS blocks into the root block as the only records. Note this requires a
+				 * level increase of the tree. Hopefully we will not come across a database that is
+				 * already at maximum level. If so, the only way to reduce the level is to run
+				 * MUPIP REORG with a fairly recent vintage of GT.M
+				 */
 				BLK_INIT(bs_ptr, bs1);
 				blk_set_p->usage = gdsblk_update;	/* It's official .. blk is being modified */
 				blk_set_p->upd_addr = bs1;		/* Block building roadmap.. */
 				blk_set_p->blk_levl++;			/* Needs to be at a new level */
 				if (MAX_BT_DEPTH <= blk_set_p->blk_levl)
-					/* Tree is too high */
-					assertpro(FALSE);
+					assertpro(FALSE);	/* Tree is too high */
 				/* First record will have last key in LHS block */
 				BLK_ADDR(next_rec_hdr, SIZEOF(rec_hdr), rec_hdr);
 				next_rec_hdr->rsiz = SIZEOF(rec_hdr) + last_rec_key->end + 1 + SIZEOF(block_id);
@@ -1248,10 +1284,10 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 	created_blocks = psa->block_depth - bottom_tree_index;
 	if (created_blocks > psa->dbc_cs_data->trans_hist.free_blocks)
 	{	/* We have a slight problem in that this transaction requires more free blocks than are
-		   available. Our recourse is to flush the current file-header preserving any changes we
-		   have already made, close the file and execute a mupip command to perform an extension before
-		   re-opening the db for further processing.
-		*/
+		 * available. Our recourse is to flush the current file-header preserving any changes we
+		 * have already made, close the file and execute a mupip command to perform an extension before
+		 * re-opening the db for further processing.
+		 */
 		DBC_DEBUG(("DBC_DEBUG: Insufficient free blocks for this transaction - calling MUPIP EXTEND\n"));
 		dbc_flush_fhead(psa);
 		dbc_close_db(psa);
@@ -1270,30 +1306,30 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 		dbc_close_command_file(psa);
 		dbc_run_command_file(psa, "MUPIP", (char_ptr_t)psa->util_cmd_buff, FALSE);
 		/* Seeing as how it is very difficult to (in portable code) get a coherent error code back from
-		   an executed command, we will just assume it worked, open the database back in and see if in
-		   fact it did actually extend sufficiently. If not, this is a perm error and we stop here.
-		*/
+		 * an executed command, we will just assume it worked, open the database back in and see if in
+		 * fact it did actually extend sufficiently. If not, this is a perm error and we stop here.
+		 */
 		dbc_init_db(psa);
 		if (created_blocks > psa->dbc_cs_data->trans_hist.free_blocks)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBCNOEXTND, 2, RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn));
 		/* Database is now extended -- safest bet is to restart this particular update so that it is certain
-		   nothing else got in besides the extention.
-		*/
+		 * nothing else got in besides the extention.
+		 */
 		DBC_DEBUG(("DBC_DEBUG: Restarting processing of this p1rec due to DB extension\n"));
 		return TRUE;
-
 	}
 	/* The update arrarys are complete, we know there are sufficient free blocks in the database to accomodate
-	   the splitting we have to do.
-	*/
+	 * the splitting we have to do.
+	 */
 	bottom_created_index = psa->block_depth;	/* From here on out are bit map blocks */
+	bplmap = psa->dbc_cs_data->bplmap;
 	if (0 != created_blocks)
 	{	/* Run through the created blocks assigning block numbers and filling the numbers into the buffers
-		   that need them. If we didn't create any blocks, we know we didn't split any and there is nothing
-		   to do for this p1 record.
-		*/
+		 * that need them. If we didn't create any blocks, we know we didn't split any and there is nothing
+		 * to do for this p1 record.
+		 */
 		total_blks = psa->dbc_cs_data->trans_hist.total_blks;
-		local_map_max = DIVIDE_ROUND_UP(total_blks, psa->dbc_cs_data->bplmap);
+		local_map_max = DIVIDE_ROUND_UP(total_blks, bplmap);
 		DBC_DEBUG(("DBC_DEBUG: Assigning block numbers to created DB blocks\n"));
 		for (blk_index = psa->block_depth, blk_set_p = &psa->blk_set[blk_index];
 		     bottom_tree_index < blk_index; --blk_index, --blk_set_p)
@@ -1303,7 +1339,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			/* Find and allocate a database block for this created block */
 			assert(NULL != blk_set_p->ins_blk_id_p);	/* Must be a place to put the block id */
 			/* First find local bit map with some room in it */
-			lclmap_not_full = bmm_find_free(psa->hint_blk / psa->dbc_cs_data->bplmap,
+			lclmap_not_full = bmm_find_free(psa->hint_blk / bplmap,
 							(sm_uc_ptr_t)psa->dbc_cs_data->master_map,
 							local_map_max);
 			if (NO_FREE_SPACE == lclmap_not_full)
@@ -1312,20 +1348,20 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
 					ERR_DBCINTEGERR, 2, RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn), ERR_BITMAPSBAD);
 			}
-			if (ROUND_DOWN2(psa->hint_blk, psa->dbc_cs_data->bplmap) != lclmap_not_full)
+			if (ROUND_DOWN2(psa->hint_blk, bplmap) != lclmap_not_full)
 				psa->hint_lcl = 1;
-			bitmap_blk_num = lclmap_not_full * psa->dbc_cs_data->bplmap;
+			bitmap_blk_num = lclmap_not_full * bplmap;
 			/* Read this bitmap in. Note it may already exist in the cache (likely for multiple creates) */
 			lbm_blk_index = dbc_read_dbblk(psa, bitmap_blk_num, gdsblk_bitmap);
 			blk_set_bm_p = &psa->blk_set[lbm_blk_index];
 			assert(IS_BML(blk_set_bm_p->old_buff));	/* Verify we have a bit map block */
-			assert(ROUND_DOWN2(blk_set_bm_p->blk_num, psa->dbc_cs_data->bplmap) == blk_set_bm_p->blk_num);
-			if (ROUND_DOWN2(psa->dbc_cs_data->trans_hist.total_blks, psa->dbc_cs_data->bplmap) == bitmap_blk_num)
+			assert(ROUND_DOWN2(blk_set_bm_p->blk_num, bplmap) == blk_set_bm_p->blk_num);
+			if (ROUND_DOWN2(psa->dbc_cs_data->trans_hist.total_blks, bplmap) == bitmap_blk_num)
 				/* This bitmap is the last one .. compute total blks in partial this bitmap */
 				blks_this_lmap = (psa->dbc_cs_data->trans_hist.total_blks - bitmap_blk_num);
 			else
 				/* Regular bitmap (not last one) */
-				blks_this_lmap = psa->dbc_cs_data->bplmap;
+				blks_this_lmap = bplmap;
 			lcl_map_p = blk_set_bm_p->old_buff + SIZEOF(v15_blk_hdr);
 			lcl_blk = psa->hint_lcl = bm_find_blk(psa->hint_lcl, lcl_map_p, blks_this_lmap, &dummy_bool);
 			if (NO_FREE_SPACE == lcl_blk)
@@ -1335,9 +1371,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 					ERR_DBCINTEGERR, 2, RTS_ERROR_STRING((char_ptr_t)psa->ofhdr.dbfn), ERR_BITMAPSBAD);
 			}
 			/* Found a free block, mark it busy. Note that bitmap blocks are treated somewhat differently
-			   than other blocks. We do not create an update array for them but just change the copy in
-			   old_buff as appropriate.
-			*/
+			 * than other blocks. We do not create an update array for them but just change the copy in
+			 * old_buff as appropriate.
+			 */
 			bml_busy(lcl_blk, lcl_map_p);
 			blk_set_bm_p->usage = gdsblk_update;
 			/* See if entire block is full - if yes, we need to mark master map too */
@@ -1345,7 +1381,7 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			if (NO_FREE_SPACE == psa->hint_lcl)
 			{	/* Local map was filled .. clear appropriate master map bit */
 				DBC_DEBUG(("DBC_DEBUG: -- Local map now full - marking master map\n"));
-				bit_clear(bitmap_blk_num / psa->dbc_cs_data->bplmap, psa->dbc_cs_data->master_map);
+				bit_clear(bitmap_blk_num / bplmap, psa->dbc_cs_data->master_map);
 			}
 			assert(lcl_blk);	/* Shouldn't be zero as that is for the lcl bitmap itself */
 			allocated_blk_num = psa->hint_blk = bitmap_blk_num + lcl_blk;
@@ -1360,8 +1396,8 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			psa->dbc_fhdr_dirty = TRUE;
 		}
 		/* Now that all the block insertions have been filled in, run the entire chain looking for
-		   both created and updated blocks. Build the new versions of their blocks in new_buff.
-		*/
+		 * both created and updated blocks. Build the new versions of their blocks in new_buff.
+		 */
 		DBC_DEBUG(("DBC_DEBUG: Create new and changed blocks via their update arrays\n"));
 		for (blk_index = psa->block_depth, blk_set_p = &psa->blk_set[blk_index]; 0 <= blk_index; --blk_index, --blk_set_p)
 		{	/* Run through the update array for this block */
@@ -1411,9 +1447,9 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			}
 			if (gdsblk_bitmap == blk_set_p->blk_type)
 			{	/* Bitmap blocks are built in old_buff, swap with new_buff. This also lets the
-				   buffer be reused correctly (by dbc_read_dbblk) if we read this block into
-				   the same place later.
-				*/
+				 * buffer be reused correctly (by dbc_read_dbblk) if we read this block into
+				 * the same place later.
+				 */
 				blk_p = blk_set_p->new_buff;
 				blk_set_p->new_buff = blk_set_p->old_buff;
 				blk_set_p->old_buff = blk_p;
@@ -1435,7 +1471,6 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 			UNIX_ONLY(dbcertify_deferred_signal_handler());
 			VMS_ONLY(sys$exit(exi_condition));
 		}
-
 		/* Update the transaction number in the fileheader for the next transaction */
 		psa->dbc_cs_data->trans_hist.curr_tn++;
 		psa->dbc_fhdr_dirty = TRUE;
@@ -1443,7 +1478,6 @@ boolean_t dbc_split_blk(phase_static_area *psa, block_id blk_num, enum gdsblk_ty
 		assertpro(FALSE);	/* If we got this far we should have split a block which would create a block */
 	DBC_DEBUG(("DBC_DEBUG: Block processing completed\n"));
 	psa->blks_processed++;
-
 	return FALSE;	/* No transaction restart necessary */
 }
 
diff --git a/sr_port/dbcertify_funcs.c b/sr_port/dbcertify_funcs.c
index c4f67f5..b2bd685 100644
--- a/sr_port/dbcertify_funcs.c
+++ b/sr_port/dbcertify_funcs.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -378,11 +379,6 @@ int dbc_syscmd(char_ptr_t cmdparm)
 	int4		wait_stat;
 #endif
 
-#ifdef VMS
-	/* Verify system() is supported */ /* BYPASSOK: system() used insode the comment, no SYSTEM() needed */
-	if (0 == SYSTEM(NULL))
-		GTMASSERT;
-#endif
 	rc = SYSTEM(cmdparm);
 	if (-1 == rc)
 		rc = errno;
@@ -444,16 +440,14 @@ void dbc_find_database_filename(phase_static_area *psa, uchar_ptr_t regname, uch
 	while(1)
 	{
 		rptr = dbc_read_result_file(psa, ERR_NOREGION, regname);	/* Should have filename */
-		if (0 != MEMCMP_LIT(rptr, FILETAB))
-			GTMASSERT;
+		assertpro(0 == MEMCMP_LIT(rptr, FILETAB));
 		len = STRLEN(((char_ptr_t)rptr + SIZEOF(FILETAB) - 1)) - 1;
 		assert(MAX_FN_LEN >= len);
 		assert(len);
 		memcpy(dbfn, (rptr + SIZEOF(FILETAB) - 1), len);
 		dbfn[len] = 0;
 		rptr = dbc_read_result_file(psa, ERR_NOREGION, regname);
-		if (0 != MEMCMP_LIT(rptr, REGIONTAB))
-			GTMASSERT;
+		assertpro(0 == MEMCMP_LIT(rptr, REGIONTAB));
 		len = STRLEN((char_ptr_t)rptr + SIZEOF(REGIONTAB) - 1) - 1;
 		assert(len);
 		*(rptr + SIZEOF(REGIONTAB) - 1 + len) = 0;	/* Get rid of trailing \n */
@@ -464,8 +458,7 @@ void dbc_find_database_filename(phase_static_area *psa, uchar_ptr_t regname, uch
 		if ('\n' == rptr[len - 1]) --len;	/* Note last record of output file does not have '\n' so test
 							   before adjusting 'len' */
 		if ('\r' == rptr[len - 1]) --len;	/* Same for carriage return (mostly for VMS) */
-		if (0 != len && ((SIZEOF("DSE> ") - 1) != len || 0 != memcmp(rptr, "DSE> ", len)))
-			GTMASSERT;
+		assertpro((0 == len) || (((SIZEOF("DSE> ") - 1) == len) && (0 == memcmp(rptr, "DSE> ", len))));
 	}
 	dbc_close_result_file(psa);
 	return;
@@ -513,8 +506,7 @@ int dbc_read_dbblk(phase_static_area *psa, int blk_num, enum gdsblk_type blk_typ
 	}
 
 	++psa->block_depth;			/* Going to another level of block usage */
-	if (MAX_BLOCK_INFO_DEPTH <= psa->block_depth)
-		GTMASSERT;
+	assertpro(MAX_BLOCK_INFO_DEPTH > psa->block_depth);
 	blk_set_new_p = &psa->blk_set[psa->block_depth];
 
 	/* See if this block already occupies this or another slot in the "inactive cache" which is any block
@@ -573,7 +565,7 @@ int dbc_read_dbblk(phase_static_area *psa, int blk_num, enum gdsblk_type blk_typ
 							   " %d\n", psa->block_depth));
 						break;
 					default:
-						GTMASSERT;
+						assertpro(FALSE);
 				}
 			}
 			VMS_ONLY(GET_ULONG(blk_set_new_p->tn, &((v15_blk_hdr_ptr_t)blk_set_new_p->old_buff)->tn));
@@ -624,7 +616,7 @@ int dbc_read_dbblk(phase_static_area *psa, int blk_num, enum gdsblk_type blk_typ
 				blk_set_new_p->blk_type = gdsblk_dtindex;
 			break;
 		default:
-			GTMASSERT;
+			assertpro(FALSE);
 	}
 	return psa->block_depth;
 }
@@ -679,7 +671,7 @@ int dbc_find_dtblk(phase_static_area *psa, dbc_gv_key *key, int min_levl)
 	memcpy(psa->gvn_key, key, SIZEOF(dbc_gv_key) + key->gvn_len);	/* Make key with GVN only (including trailing null) */
 	psa->gvn_key->end = key->gvn_len;
 	/* Look up GVN in directory tree */
-	blk_index = dbc_find_record(psa, psa->gvn_key, (psa->phase_one ? 0 : 1), min_levl, gdsblk_dtroot, FALSE);
+	blk_index = dbc_find_record(psa, psa->gvn_key, (psa->phase_one ? 0 : 1), min_levl, gdsblk_dtroot);
 	return blk_index;
 }
 
@@ -690,8 +682,7 @@ int dbc_find_dtblk(phase_static_area *psa, dbc_gv_key *key, int min_levl)
    Note since this routine is used in certify phase to lookup all the right hand siblings of a gvtroot block given a
    maximum key, this flag tells us that failure is ok .. we just wanted to populate the cache with siblings.
 */
-int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int min_levl, enum gdsblk_type newblk_type,
-		    boolean_t fail_ok)
+int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int min_levl, enum gdsblk_type newblk_type)
 {
 	uchar_ptr_t	rec_p, blk_p, blk_top, key1, key2;
 	unsigned short	us_rec_len;
@@ -752,7 +743,7 @@ int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int
 			GET_ULONG(blk_ptr, rec_p + VMS_ONLY(3) UNIX_ONLY(4));
 			blk_index = dbc_read_dbblk(psa, blk_ptr, blk_type);
 			/* Keep looking next level down */
-			return dbc_find_record(psa, key, blk_index, min_levl, blk_type, fail_ok);
+			return dbc_find_record(psa, key, blk_index, min_levl, blk_type);
 		}
 		/* Determine key for this record */
 		dbc_find_key(psa, blk_set_p->curr_blk_key, rec_p, blk_set_p->blk_levl);
@@ -775,7 +766,7 @@ int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int
 			GET_ULONG(blk_ptr, (rec_p + SIZEOF(rec_hdr) + blk_set_p->curr_blk_key->end
 					   - EVAL_CMPC((rec_hdr *)rec_p) + 1));
 			blk_index = dbc_read_dbblk(psa, blk_ptr, blk_type);
-			return dbc_find_record(psa, key, blk_index, min_levl, blk_type, fail_ok);
+			return dbc_find_record(psa, key, blk_index, min_levl, blk_type);
 		}
 		/* We want to be able to find the previous record */
 		blk_set_p->prev_rec = rec_p;
@@ -784,25 +775,9 @@ int dbc_find_record(phase_static_area *psa, dbc_gv_key *key, int blk_index, int
 		rec_p += rec_len;					/* Point to next record in block */
 		blk_set_p->curr_rec = rec_p;
 	}
-	/* If we don't find the record (or one greater), the block with the key we are looking for is no
-	   longer existing in the GVT (assert that the search is for a level 0 GVT block).
-	*/
-	if (gdsblk_gvtleaf == psa->blk_set[0].blk_type)
-	{	/* Key not found */
-		DBC_DEBUG(("DBC_DEBUG: dbc_find_record: Searched for key was not found\n"));
-		return -2;
-	}
-	/* Else we should have found the record or a star key. Globals are NOT removed once created so we
-	   should always be able to find an appropriate record if this is not a GVT leaf block. Exception to this
-	   is when we are just wanting to populate the right siblings of a gvtroot block in the cache.
-	*/
-	if (!fail_ok)
-	{
-		assert(FALSE);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DBCINTEGERR, 2, RTS_ERROR_TEXT((char_ptr_t)psa->ofhdr.dbfn),
-			  ERR_TEXT, 2, RTS_ERROR_TEXT("Unable to find index record for an existing global"));
-	}
-	return -1;
+	/* Key not found */
+	DBC_DEBUG(("DBC_DEBUG: dbc_find_record: Searched for key was not found\n"));
+	return -2;
 }
 
 /* Compare two keys. If key1 is logically greater than or equal to key2, return TRUE, else FALSE.
diff --git a/sr_port/do_indir_do.c b/sr_port/do_indir_do.c
index 6073475..45bb399 100644
--- a/sr_port/do_indir_do.c
+++ b/sr_port/do_indir_do.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -11,7 +12,9 @@
 
 #include "mdef.h"
 
+#include "gtm_stdio.h"
 #include "gtm_string.h"
+
 #include "toktyp.h"
 #include <rtnhdr.h>
 #include "stack_frame.h"
@@ -21,6 +24,7 @@
 #include "op.h"
 #include "do_indir_do.h"
 #include "valid_mname.h"
+#include "linktrc.h"
 
 GBLREF	stack_frame		*frame_pointer;
 GBLREF	command_qualifier	cmd_qlf;
@@ -32,7 +36,9 @@ int do_indir_do(mval *v, unsigned char argcode)
 	lnr_tabent	USHBIN_ONLY(*)*addr;
 	mident_fixed	ident;
 	rhdtyp		*current_rhead;
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
 	if (valid_labname(&v->str))
 	{
 		memcpy(ident.c, v->str.addr, v->str.len);
@@ -41,7 +47,14 @@ int do_indir_do(mval *v, unsigned char argcode)
 		label.mvtype = MV_STR;
 		label.str.len = v->str.len;
 		label.str.addr = &ident.c[0];
+#		ifdef AUTORELINK_SUPPORTED
+		DBGINDCOMP((stderr, "do_indir_do: routine resolved to 0x"lvaddr"\n", frame_pointer->rvector));
+		TADR(lnk_proxy)->rtnhdr_adr = frame_pointer->rvector;	/* So op_labaddr has access to it */
+		op_labaddr(0, &label, 0);
+		addr = &TADR(lnk_proxy)->lnr_adr;
+#		else
 		addr = op_labaddr(frame_pointer->rvector, &label, 0);
+#		endif
 		current_rhead = CURRENT_RHEAD_ADR(frame_pointer->rvector);
 		if (argcode == indir_do)
 		{	/* If we aren't in an indirect, exfun_frame() is the best way to copy the stack frame as it does not
diff --git a/sr_port/do_pattern.c b/sr_port/do_pattern.c
index 8065b11..4bb5e67 100644
--- a/sr_port/do_pattern.c
+++ b/sr_port/do_pattern.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -53,6 +54,8 @@ GBLREF	boolean_t	gtm_utf8_mode;
  * 	optimizations to prune the combinatorial search tree) and tries to see for each permutation if a match occurs.
  */
 
+error_def(ERR_PATNOTFOUND);
+
 int do_pattern(mval *str, mval *pat)
 {
 	int4		count, total_min, total_max;
@@ -79,15 +82,13 @@ int do_pattern(mval *str, mval *pat)
 	wint_t		utf8_codepoint;
 	)
 
-	error_def(ERR_PATNOTFOUND);
-
 	/* set up information */
 	MV_FORCE_STR(str);
 	patptr = (uint4 *) pat->str.addr;
 	GET_ULONG(tempuint, patptr);
 	if (tempuint)
 	{	/* tempuint non-zero implies fixed length pattern string. this in turn implies we are not called from op_pattern.s
-		 * but instead called from op_fnzsearch(), gvzwr_fini(), gvzwr_var(), lvzwr_fini(), lvzwr_var() etc.
+		 * but instead called from gvzwr_fini(), gvzwr_var(), lvzwr_fini(), lvzwr_var() etc.
 		 * in this case, call do_patfixed() as the code below and code in do_patsplit() assumes we are dealing with a
 		 * variable length pattern string. changing all the callers to call do_patfixed() directly instead of this extra
 		 * redirection was considered, but not felt worth it since the call to do_pattern() is not easily macroizable
@@ -217,7 +218,7 @@ int do_pattern(mval *str, mval *pat)
 							if ((mbit & code & PATM_LONGFLAGS) && !(mbit & pat_allmaskbits))
 								buf[bytelen++] = codelist[patmaskseq(mbit)];
 						}
-						rts_error(VARLSTCNT(4) ERR_PATNOTFOUND, 2, bytelen, buf);
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_PATNOTFOUND, 2, bytelen, buf);
 					}
 					if (!gtm_utf8_mode)
 					{
diff --git a/sr_port/dse.hlp b/sr_port/dse.hlp
index c586487..7ab7778 100644
--- a/sr_port/dse.hlp
+++ b/sr_port/dse.hlp
@@ -243,7 +243,7 @@
    applicable to level 0 blocks only. The interpreted output as a result of
    the above command looks like the following:
 
-   Block 3   Size 4B   Level 0   TN 6 V5
+   Block 3   Size 4B   Level 0   TN 4 V6
    Rec:1  Blk 3  Off 10  Size 14  Cmpc 0  Key ^Fruits(1)
          10 : | 14  0  0  0 46 72 75 69 74 73  0 BF 11  0  0 41 70 70 6C 65|
               |  .  .  .  .  F  r  u  i  t  s  .  .  .  .  .  A  p  p  l  e|
@@ -254,7 +254,7 @@
          31 : |  D  0  8  0 31  0  0 43 68 65 72 72 79                     |
               |  .  .  .  .  1  .  .  C  h  e  r  r  y                     |
    Rec:4  Blk 3  Off 3E  Size D  Cmpc 8  Key ^Fruits(4)
-         3E : |  D  0  8  8 41  0  0 47 72 61 70 65 73                     |
+         3E : |  D  0  8  0 41  0  0 47 72 61 70 65 73                     |
               |  .  .  .  .  A  .  .  G  r  a  p  e  s                     |
 
    Example:
@@ -559,7 +559,6 @@
    -REG[_SEQNO]=sequence-number
    -RESERVED_BYTES=reserved-bytes
    -SLEEP_SPIN_COUNT=mutex-sleep-spin-count
-   -SPIN_SLEEP_TIME=mutex-sleep-time
    -STRM_NUM=stream-number STRM_REG_SEQNO=hexa
    -TIM[ERS_PENDING]=integer
    -TO[TAL_BLKS]=total-blocks
@@ -820,6 +819,11 @@
 
    Use only with: -FILEHEADER
 
+   -[NO]EPOCHTAPER
+
+   Sets a flag that indicates whether or not epoch tapering should be done.
+   The default value is -EPOCHTAPER.
+
    -FL[USH_TIME][=delta_time]
 
    Changes the flush_time default interval (in delta_time).
@@ -1261,7 +1265,8 @@
    Displays and/or modifies the status and contents of the critical section
    for the current region. The format of the CRITICAL command is:
 
-   CR[ITICAL] -I[NIT]
+   CR[ITICAL] -A[LL]
+   -I[NIT]
    -O[WNER]
    -REL[EASE]
    -REM[OVE]
@@ -1280,6 +1285,12 @@
 3 Qualifiers
    Qualifiers
 
+   -A[LL]
+
+   Display all ids of processes owning critical section from all regions. If
+   there are no processes owning critical section in a region, ALL displays
+   "the CRIT is currently unowned" message for each region.
+
    -I[NIT]
 
    Reinitializes the critical section.
@@ -1400,7 +1411,7 @@
 
    Specifies the starting block of the dump. For commands without an object
    qualifier, DSE uses the last block handled by a DSE operation. When no
-   block has been accessed, (thatis, on the first block-oriented command),
+   block has been accessed, (that is, on the first block-oriented command),
    DSE uses block one (1).
 
    Incompatible with: -ALL, -FILEHEADER and -UPDPROC.
@@ -1424,7 +1435,8 @@
    Dumps the specified record or blocks into the current output file in
    Global Output (GO) format. FIS strongly suggests using -ZWR rather than
    -GLO as the ZWR format handles all possible content values, including some
-   that are problematic with -GLO.
+   that are problematic with -GLO.[The GLO format is not supported for UTF-8
+   mode - use the ZWR format with UTF-8 mode.
 
    Incompatible with: -ALL, -FILEHEADER, -UPDPROC and -ZWR.
 
@@ -1710,6 +1722,7 @@
        may well be, the same; however, remind yourself to search for,
        understand and take into account all information describing any
        current database integrity issues.
+     o DSE accepts ^#t as a valid global name when specifying a key.
 
    Compatible only with [NO]CRIT.
 
@@ -2227,9 +2240,10 @@
 
    -V[ERSION]=version_number
 
-   Specifies the version number, in decimal, of the save buffer to remove.
-   -VERSION is required to REMOVE a SAVE buffer. -VERSION is incompatible
-   with all qualifiers except -BLOCK.
+   Specifies the version number, in decimal, of the save buffer to remove. If
+   there are more than one version of a block, -VERSION is required;
+   otherwise REMOVE works on that sole version. -VERSION is incompatible with
+   all qualifiers except -BLOCK.
 
    If there is only one version of the specified -BLOCK= block in the current
    region, DSE REMOVE defaults to that version.
@@ -2291,8 +2305,8 @@
    SAve
 
    The SAVE command preserves versions of blocks, or displays a listing of
-   saved versions for the current DSE session. Saved information is lost when
-   DSE EXITs.
+   saved versions for the current DSE session. SAVE can preserve 128
+   versions. Saved information is lost when DSE EXITs.
 
    Use with the RESTORE command to move SAVEd blocks to a permanent location,
    and as a safety feature use SAVE to retain copies of database blocks
@@ -2330,7 +2344,7 @@
 
    By default, SAVE -LIST provides a directory of all SAVEd blocks.
 
-   LIST displays blocks higher than the current database size because it
+   LIST may display blocks higher than the current database size because it
    deals with set of saved block copies rather than the database and there
    are situations where a saved block may be outside the current database
    size (for example, due to a concurrent MUPIP REORG -TRUNCATE);
@@ -2506,6 +2520,15 @@
    | B[UFFER     | -                                 | -                    |
    | _FLUSH]     |                                   |                      |
    |-------------+-----------------------------------+----------------------|
+   | CA[CHE]     | -ALL                              | Used with -RECOVER,  |
+   |             |                                   | -SHOW, and -VERIFY   |
+   |-------------+-----------------------------------+----------------------|
+   | -           | -RE[COVER]                        | Use only with -ALL.  |
+   |-------------+-----------------------------------+----------------------|
+   | -           | -SH[OW]                           | Use only with -ALL.  |
+   |-------------+-----------------------------------+----------------------|
+   | -           | -VE[RIFY]                         | Use only with -ALL.  |
+   |-------------+-----------------------------------+----------------------|
    |             |                                   | Incompatible with    |
    | CH[ANGE]    | -BL[OCK]=block number             | -FILEHEADER and      |
    |             |                                   | qualifiers used with |
@@ -2824,7 +2847,7 @@
 1 Copyright
    Copyright
 
-   Copyright 2014
+   Copyright 2015
 
    Fidelity National Information Services, Inc. and/or its subsidiaries. All
    rights reserved.
@@ -2846,7 +2869,7 @@
 
    **Note**
 
-   This help file is a concise representation of revision V6.2-001 of the
+   This help file is a concise representation of revision V6.2-002 of the
    UNIX Administration and Operations Guide. To obtain a copy of the current
    revision, go to www.fis-gtm.com and then click on the User Documentation
    tab.
diff --git a/sr_port/dse_chng_fhead.c b/sr_port/dse_chng_fhead.c
index 69c146a..d7ca535 100644
--- a/sr_port/dse_chng_fhead.c
+++ b/sr_port/dse_chng_fhead.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -486,6 +487,7 @@ void dse_chng_fhead(void)
 		else
 			util_out_print("Error: SLEEP SPIN COUNT should be a non zero positive number", TRUE);
 	}
+#	ifdef MUTEX_REAL_SLEEP
 	if (((CLI_PRESENT == cli_present("SPIN_SLEEP_TIME")) && cli_get_int("SPIN_SLEEP_TIME", &x))
 	      UNIX_ONLY( || ((CLI_PRESENT == cli_present("MUTEX_SPIN_SLEEP_TIME")) && cli_get_int("MUTEX_SPIN_SLEEP_TIME", &x)))
 	   ) /* Unix should be backward compatible, accept MUTEX_ prefix qualifiers as well */
@@ -508,6 +510,7 @@ void dse_chng_fhead(void)
 				cs_data->mutex_spin_parms.mutex_spin_sleep_mask = x;
 		}
 	}
+#	endif
 	UNIX_ONLY(
 		if ((CLI_PRESENT == cli_present("COMMITWAIT_SPIN_COUNT")) && cli_get_int("COMMITWAIT_SPIN_COUNT", &x))
 		{
@@ -713,6 +716,18 @@ void dse_chng_fhead(void)
 		util_out_print("Database file !AD now has quick database rundown flag set to FALSE", TRUE,
 					DB_LEN_STR(gv_cur_region));
 	}
+	if (CLI_PRESENT == cli_present("EPOCHTAPER"))
+	{
+		cs_data->epoch_taper = TRUE;
+		util_out_print("Database file !AD now has epoch taper flag set to TRUE", TRUE,
+					DB_LEN_STR(gv_cur_region));
+	}
+	else if (CLI_NEGATED == cli_present("EPOCHTAPER"))
+	{
+		cs_data->epoch_taper = FALSE;
+		util_out_print("Database file !AD now has epoch taper flag set to FALSE", TRUE,
+					DB_LEN_STR(gv_cur_region));
+	}
 #	endif
 	if (CLI_PRESENT == cli_present(UNIX_ONLY("JNL_SYNCIO") VMS_ONLY("JNL_CACHE")))
 	{
diff --git a/sr_port/dse_dmp_fhead.c b/sr_port/dse_dmp_fhead.c
index 095c8a0..58c24e0 100644
--- a/sr_port/dse_dmp_fhead.c
+++ b/sr_port/dse_dmp_fhead.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -259,6 +260,7 @@ void dse_dmp_fhead (void)
 		UNIX_ONLY(
 		util_out_print("  Maximum Key Size Assured     !AD", TRUE, 5, csd->maxkeysz_assured ? " TRUE" : "FALSE");
 		)
+		util_out_print("  Defer allocation                    !AD", TRUE, 5, csd->defer_allocate ? " TRUE" : "FALSE");
 	}
 	if (CLI_PRESENT == cli_present("ALL"))
 	{	/* Only dump if -/ALL as if part of above display */
@@ -286,6 +288,7 @@ void dse_dmp_fhead (void)
 		util_out_print("  Quick database rundown is active    !AD", TRUE, 5, (csd->mumps_can_bypass ? " TRUE" : "FALSE"));
 		util_out_print("  Access control rundown bypasses !9UL", FALSE, cnl->dbrndwn_access_skip);
 		util_out_print("  FTOK rundown bypasses   !10UL", TRUE, cnl->dbrndwn_ftok_skip);
+		util_out_print("  Epoch taper    !AD", TRUE, 5, (csd->epoch_taper ? " TRUE" : "FALSE"));
 #		endif
 		new_line = FALSE;
 		for (index = 0; MAX_WTSTART_PID_SLOTS > index; index++)
diff --git a/sr_port/eintr_wrappers.h b/sr_port/eintr_wrappers.h
index 2e4869f..33b461c 100644
--- a/sr_port/eintr_wrappers.h
+++ b/sr_port/eintr_wrappers.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -36,7 +37,7 @@
 	do						\
 	{						\
 		RC = ACCEPT(SOCKET, ADDR, LEN);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define CHG_OWNER(PATH, OWNER, GRP, RC)			\
@@ -44,7 +45,7 @@
 	do						\
 	{						\
 		RC = CHOWN(PATH, OWNER, GRP);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define CLOSE(FD, RC)					\
@@ -52,7 +53,7 @@
 	do						\
 	{						\
 		RC = close(FD);				\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define CLOSEDIR(DIR, RC)				\
@@ -60,7 +61,7 @@
 	do						\
 	{						\
 		RC = closedir(DIR);			\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define CONNECT_SOCKET(SOCKET, ADDR, LEN, RC)		\
@@ -71,7 +72,7 @@
 	do						\
 	{						\
 		RC = CREAT(PATHNAME, MODE);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define DOREAD_A_NOINT(FD, BUF, SIZE, RC)		\
@@ -79,7 +80,7 @@
 	do						\
 	{						\
 		RC = DOREAD_A(FD, BUF, SIZE);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define DUP2(FDESC1, FDESC2, RC)			\
@@ -87,7 +88,7 @@
 	do						\
 	{						\
 		RC = dup2(FDESC1, FDESC2);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define FCLOSE(STREAM, RC)				\
@@ -95,7 +96,7 @@
 	do						\
 	{						\
 		RC = fclose(STREAM);			\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define FCNTL2(FDESC, ACTION, RC)			\
@@ -103,7 +104,7 @@
 	do						\
 	{						\
 		RC = fcntl(FDESC, ACTION);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define FCNTL3(FDESC, ACTION, ARG, RC)			\
@@ -111,7 +112,7 @@
 	do						\
 	{						\
 		RC = fcntl(FDESC, ACTION, ARG);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define FGETS_FILE(BUF, LEN, FP, RC)			\
@@ -119,7 +120,7 @@
 	do						\
 	{						\
 		FGETS(BUF, LEN, FP, RC);		\
-	} while(NULL == RC && !feof(FP) && ferror(FP) && EINTR == errno);	\
+	} while (NULL == RC && !feof(FP) && ferror(FP) && EINTR == errno);	\
 }
 
 #define FSTAT_FILE(FDESC, INFO, RC)			\
@@ -129,7 +130,7 @@
 		DEFER_INTERRUPTS(INTRPT_IN_FSTAT);	\
 		RC = fstat(FDESC, INFO);		\
 		ENABLE_INTERRUPTS(INTRPT_IN_FSTAT);	\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define FSTATVFS_FILE(FDESC, FSINFO, RC)		\
@@ -137,7 +138,7 @@
 	do						\
 	{						\
 		FSTATVFS(FDESC, FSINFO, RC);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define FTRUNCATE(FDESC, LENGTH, RC)			\
@@ -145,7 +146,7 @@
 	do						\
 	{						\
 		RC = ftruncate(FDESC, LENGTH);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define MSGSND(MSGID, MSGP, MSGSZ, FLG, RC)		\
@@ -153,7 +154,7 @@
 	do						\
 	{						\
 		RC = msgsnd(MSGID, MSGP, MSGSZ, FLG);	\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define OPEN_PIPE(FDESC, RC)				\
@@ -161,7 +162,7 @@
 	do						\
 	{						\
 		RC = pipe(FDESC);			\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define READ_FILE(FD, BUF, SIZE, RC)			\
@@ -169,7 +170,7 @@
 	do						\
 	{						\
 		RC = read(FD, BUF, SIZE);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define RECV(SOCKET, BUF, LEN, FLAGS, RC)		\
@@ -178,7 +179,7 @@
 	{						\
 		RC = (int)recv(SOCKET, BUF, (int)(LEN),	\
 			 FLAGS);			\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define RECVFROM_SOCK(SOCKET, BUF, LEN, FLAGS,		\
@@ -188,7 +189,7 @@
 	{						\
 		RC = RECVFROM(SOCKET, BUF, LEN,		\
 			 FLAGS, ADDR, ADDR_LEN);	\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define SELECT(FDS, INLIST, OUTLIST, XLIST,		\
@@ -200,7 +201,7 @@
 		eintr_select_timeval = *(TIMEOUT);	\
 		RC = select(FDS, INLIST, OUTLIST,	\
 			XLIST, &eintr_select_timeval);	\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 
@@ -209,7 +210,7 @@
 	do						\
 	{						\
 		RC = send(SOCKET, BUF, LEN, FLAGS);	\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define SENDTO_SOCK(SOCKET, BUF, LEN, FLAGS,		\
@@ -227,7 +228,15 @@
 	do						\
 	{						\
 		RC = Stat(PATH, INFO);			\
-	} while((uint4)-1 == RC && EINTR == errno);	\
+	} while ((uint4)-1 == RC && EINTR == errno);	\
+}
+
+#define LSTAT_FILE(PATH, INFO, RC)			\
+{							\
+	do						\
+	{						\
+		RC = LSTAT(PATH, INFO);			\
+	} while ((uint4)-1 == RC && EINTR == errno);	\
 }
 
 #define TCFLUSH(FDESC, REQUEST, RC)			\
@@ -235,7 +244,7 @@
 	do						\
 	{						\
 		RC = tcflush(FDESC, REQUEST);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #if defined(UNIX)
@@ -248,7 +257,7 @@
 	do							\
 	{							\
 		RC = tcsetattr(FDESC, WHEN, TERMPTR);		\
-	} while(-1 == RC && EINTR == errno);			\
+	} while (-1 == RC && EINTR == errno);			\
 	ERRNO = errno;						\
 	SIGPROCMASK(SIG_SETMASK, &oldset, NULL, rc);		\
 }
@@ -259,7 +268,7 @@
 	do						\
 	{						\
 		RC = TRUNCATE(PATH, LENGTH);		\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define WAIT(STATUS, RC)				\
@@ -267,7 +276,7 @@
 	do						\
 	{						\
 		RC = wait(STATUS);			\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define WAITPID(PID, STATUS, OPTS, RC)											\
@@ -281,7 +290,7 @@
 	do														\
 	{														\
 		RC = waitpid(PID, STATUS, OPTS);									\
-	} while(-1 == RC && EINTR == errno);										\
+	} while (-1 == RC && EINTR == errno);										\
 }
 
 #define GTM_FSYNC(FD, RC)				\
@@ -289,7 +298,7 @@
 	do						\
 	{						\
 		RC = fsync(FD);				\
-	} while(-1 == RC && EINTR == errno);		\
+	} while (-1 == RC && EINTR == errno);		\
 }
 
 #define SIGPROCMASK(FUNC, NEWSET, OLDSET, RC)		\
diff --git a/sr_port/emit_code.c b/sr_port/emit_code.c
index 11c756f..ee31299 100644
--- a/sr_port/emit_code.c
+++ b/sr_port/emit_code.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -91,26 +92,24 @@ GBLDEF int4 generated_count, calculated_count;
 GBLDEF int		calculated_code_size, generated_code_size;
 GBLDEF int		jmp_offset;	/* Offset to jump target */
 GBLDEF int		code_reference;	/* Offset from pgm start to current loc */
-
-DEBUG_ONLY(static boolean_t	opcode_emitted;)
-
-static int		stack_depth = 0;
-
 /* On x86_64, the smaller offsets are encoded in 1 byte (4 bytes otherwise). But for some cases,
-  the offsets may be different during APPROX_ADDR and MACHINE phases, hence generating different size instruction.
-  to solve this  even the smaller offsets need to be encoded in 4 bytes so that same size instructions are generated
-  in both APPROX_ADDR and MACHINE phase. the variable  force_32 is used for this purpose*/
+ * the offsets may be different during APPROX_ADDR and MACHINE phases, hence generating different size instruction.
+ * to solve this  even the smaller offsets need to be encoded in 4 bytes so that same size instructions are generated
+ * in both APPROX_ADDR and MACHINE phase. the variable  force_32 is used for this purpose.
+ */
 X86_64_ONLY(GBLDEF boolean_t force_32 = FALSE;)
 
 GBLREF int		curr_addr;
 GBLREF char		cg_phase;	/* code generation phase */
 GBLREF char		cg_phase_last;	/* the previous code generation phase */
 
+DEBUG_ONLY(static boolean_t	opcode_emitted;)
+static int		stack_depth = 0;
 
-/*variables for counting the arguments*/
+/* Variables for counting the arguments */
 static int	vax_pushes_seen, vax_number_of_arguments;
 
-static struct	push_list
+static struct push_list
 {
 	struct push_list	*next;
 	unsigned char		value[PUSH_LIST_SIZE];
@@ -125,7 +124,7 @@ error_def(ERR_MAXARGCNT);
 error_def(ERR_SRCNAM);
 error_def(ERR_UNIMPLOP);
 
-void trip_gen (triple *ct)
+void trip_gen(triple *ct)
 {
 	oprtype		**sopr, *opr;	/* triple operand */
 	oprtype		*saved_opr[MAX_ARGS];
@@ -147,6 +146,7 @@ void trip_gen (triple *ct)
 	tp = ttt[ct->opcode];
 	if (tp <= 0)
 	{
+		assert(FALSE);
 		stx_error(ERR_UNIMPLOP);
 		return;
 	}
@@ -338,7 +338,7 @@ void emit_asmlist(triple *ct)
 	format_machine_inst();
 }
 
-void	emit_eoi (void)
+void emit_eoi (void)
 {
 	IA64_ONLY(if (asm_mode == 0) {)
 		*obpt++ = '\0';
@@ -349,8 +349,7 @@ void	emit_eoi (void)
 }
 #endif
 
-
-short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
+short *emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 {
 	static short	last_vax_inst = 0;
 	short		sav_in, save_inst;
@@ -413,14 +412,16 @@ short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 					GTM64_ONLY(  GEN_LOAD_WORD_4(reg, gtm_reg(*inst++), 0);)
 #					else
 					/* For platforms, where the $TRUTH value is not carried in a register and
-						must be fetched from a global variable by subroutine call. */
+					 * must be fetched from a global variable by subroutine call.
+					 */
 					assert(*inst == 0x5a);		/* VAX r10 or $TEST register */
 					inst++;
 					emit_call_xfer(SIZEOF(intszofptr_t) * xf_dt_get);
 					reg = GTM_REG_R0;	/* function return value */
 #					endif
 					/* Generate a cmp instruction using the return value of the previous call,
-						which will be in EAX */
+					 * which will be in EAX.
+					 */
 					X86_64_ONLY(GEN_CMP_EAX_IMM32(0);)
 
 					if (sav_in == VXI_BLBC)
@@ -480,8 +481,8 @@ short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 							opr = &ct->destination;
 #						ifdef __vms
 						/* This is a case where VMS puts the argument count in a special register so
-							handle that differently here.
-						*/
+						 * handle that differently here.
+						 */
 						if (opr->oprclass == TRIP_REF)
 						{
 							assert(ct->opcode == OC_ILIT);
@@ -502,8 +503,8 @@ short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 						}
 #						else
 						/* All other platforms put argument counts in normal parameter
-							registers and go through this path instead.
-						*/
+						 * registers and go through this path instead.
+						 */
 						if (opr->oprclass == TRIP_REF)
 						{
 							assert(ct->opcode == OC_ILIT);
@@ -533,10 +534,10 @@ short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 							emit_pop(cnt);
 					} else
 					{	/* During the commonization of emit_code.c I discovered that TINT_REF is
-							not currently used in the compiler so this may be dead code but I'm
-							leaving this path in here anyway because I don't want to put it back
-							in if we find we need it. (4/2003 SE)
-						*/
+						 * not currently used in the compiler so this may be dead code but I'm
+						 * leaving this path in here anyway because I don't want to put it back
+						 * in if we find we need it. (4/2003 SE)
+						 */
 						emit_trip(opr, TRUE, GENERIC_OPCODE_LOAD, CALLS_TINT_TEMP_REG);
 						emit_pop(1);
 					}
@@ -608,14 +609,14 @@ short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 					break;
 				case VXI_MOVC3:
 					/* The MOVC3 instruction is only used to copy an mval from one place to another
-						so that is the expansion we will generate. The most efficient expansion is to
-						generate a series of load and store instructions. Do the loads first then the
-						stores to keep the pipelines flowing and not stall waiting for any given load
-						or store to complete. Because some platforms (notably HPPA) do not have enough
-						argument registers to contain an entire MVAL and because an mval may grow from
-						its present size and affect other platforms some day, We put the whole code gen
-						thing in a loop so we can do this regardless of how big it gets.
-					*/
+					 * so that is the expansion we will generate. The most efficient expansion is to
+					 * generate a series of load and store instructions. Do the loads first then the
+					 * stores to keep the pipelines flowing and not stall waiting for any given load
+					 * or store to complete. Because some platforms (notably HPPA) do not have enough
+					 * argument registers to contain an entire MVAL and because an mval may grow from
+					 * its present size and affect other platforms some day, We put the whole code gen
+					 * thing in a loop so we can do this regardless of how big it gets.
+					 */
 					assert(*inst == VXT_LIT);
 					inst += 2;
 					assert(*inst == VXT_VAL);
@@ -837,7 +838,7 @@ short	*emit_vax_inst (short *inst, oprtype **fst_opr, oprtype **lst_opr)
 }
 
 #ifndef __x86_64__ /* For x86_64, this is defined in emit_code_sp.c */
-void	emit_jmp (uint4 branchop, short **instp, int reg)
+void emit_jmp(uint4 branchop, short **instp, int reg)
 {
 	uint4 	branchop_opposite;
 	int	src_reg;
@@ -880,7 +881,8 @@ void	emit_jmp (uint4 branchop, short **instp, int reg)
 			(*instp)++;
 			if (0 == branch_offset)
 			{	/* This is a jump to the immediately following instruction. Nullify the jump
-					and don't generate any instruction (not even a NOP) */
+				 * and don't generate any instruction (not even a NOP)
+				 */
 				/* code_buf[code_idx++] = GENERIC_OPCODE_NOP; */
 			} else if (EMIT_JMP_SHORT_CODE_CHECK)
 			{	/* Short jump immediate operand - some platforms also do a compare */
@@ -890,9 +892,9 @@ void	emit_jmp (uint4 branchop, short **instp, int reg)
 				skip_idx = -1;
 				if (EMIT_JMP_OPPOSITE_BR_CHECK)
 				{	/* This jump sequence is longer and is not conditional so if we need a conditional
-						jump, create the opposite conditional jump to jump around the longer jump to
-						the target thereby preserving the original semantics.
-					*/
+					 * jump, create the opposite conditional jump to jump around the longer jump to
+					 * the target thereby preserving the original semantics.
+					 */
 					EMIT_JMP_GEN_COMPARE;
 					switch (branchop)
 					{
@@ -942,10 +944,11 @@ void	emit_jmp (uint4 branchop, short **instp, int reg)
 #					endif
 				}
 				if (EMIT_JMP_LONG_CODE_CHECK)
-				{ /* This is more common unconditional branch generation and should be mutually
-					exclusive to EMIT_JMP_OPPOSITE_BR_CHECK. Some platforms will have the "short"
-					branch generation up top be more common but that form does not cover unconditional
-					jumps (Examples: AIX and HP-UX) */
+				{	/* This is more common unconditional branch generation and should be mutually
+					 * exclusive to EMIT_JMP_OPPOSITE_BR_CHECK. Some platforms will have the "short"
+					 * branch generation up top be more common but that form does not cover unconditional
+					 * jumps (Examples: AIX and HP-UX)
+					 */
 					assert(!(EMIT_JMP_OPPOSITE_BR_CHECK));
 					NON_RISC_ONLY(IGEN_UCOND_BRANCH_REG_OFFSET(branchop, branch_offset))
 					RISC_ONLY(
@@ -957,9 +960,10 @@ void	emit_jmp (uint4 branchop, short **instp, int reg)
 				} else
 				{
 					if (EMIT_JMP_OPPOSITE_BR_CHECK)
-					{  /* VAX conditional long jump generates two native branch instructions -
-						one conditional branch (above) and one PC relative branch (below).
-						The second branch instruction also needs adjustment of the origin. */
+					{	/* VAX conditional long jump generates two native branch instructions -
+						 * one conditional branch (above) and one PC relative branch (below).
+						 * The second branch instruction also needs adjustment of the origin.
+						 */
 						EMIT_JMP_ADJUST_BRANCH_OFFSET;
 					}
 					GEN_PCREL;
@@ -970,8 +974,8 @@ void	emit_jmp (uint4 branchop, short **instp, int reg)
 				}
 				if (skip_idx != -1)
 				{	/* Fill in the offset from our opposite jump instruction to here .. the
-						place to bypass the jump.
-					*/
+					 * place to bypass the jump.
+					 */
 					branch_offset = BRANCH_OFFSET_FROM_IDX(skip_idx, code_idx);
 					RISC_ONLY(code_buf[skip_idx] |= IGEN_COND_BRANCH_OFFSET(branch_offset);)
 
@@ -989,13 +993,12 @@ void	emit_jmp (uint4 branchop, short **instp, int reg)
 			break;
 	}
 }
-
 #endif /* !__x86_64__ */
 
 /* Emit code that generates a relative pc based jump target. The last instruction is not
-	complete so the caller may finish it with whatever instruction is necessary.
-*/
-void	emit_pcrel(void)
+ * complete so the caller may finish it with whatever instruction is necessary.
+ */
+void emit_pcrel(void)
 {
 	int branch_offset;
 
@@ -1027,9 +1030,8 @@ void	emit_pcrel(void)
 	}
 }
 
-
 /* Emit the code for a given triple */
-void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_reg)
+void emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_reg)
 {
 	boolean_t	inst_emitted;
 	unsigned char	reg, op_mod, op_reg;
@@ -1063,14 +1065,12 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 								reg = GTM_REG_PV;
 							else
 								reg = GTM_REG_LITERAL_BASE;
-
 							if (CGP_ADDR_OPT == cg_phase)
-							{
-							/* We want the expansion to be proper sized this time. Note
-								that this won't be true so much on the initial CGP_ADDR_OPT
-								pass but will be true on the shrink_trips() pass after the
-								literals are compiled.
-							*/
+							{	/* We want the expansion to be proper sized this time. Note
+								 * that this won't be true so much on the initial CGP_ADDR_OPT
+								 * pass but will be true on the shrink_trips() pass after the
+								 * literals are compiled.
+								 */
 								offset = literal_offset(ct->operand[0].oprval.mlit->rt_addr);
 								/* Need non-zero base reg for AIX */
 								X86_64_ONLY(force_32 = TRUE;)
@@ -1108,6 +1108,13 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 								emit_base_offset(GTM_REG_CODEGEN_TEMP, 0);
 							}
 							break;
+						case OC_CDIDX:
+							assert(GENERIC_OPCODE_LOAD == generic_inst);
+							/* Fetch linkage table offset for symbol and convert to index */
+							immediate = find_linkage(ct->operand[0].oprval.cdidx) / SIZEOF(lnk_tabent);
+							EMIT_TRIP_ILIT_GEN;
+							inst_emitted = TRUE;
+							break;
 						case OC_ILIT:
 							assert(GENERIC_OPCODE_LOAD == generic_inst);
 							immediate = ct->operand[0].oprval.ilit;
@@ -1116,14 +1123,14 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 							break;
 						case OC_TRIPSIZE:
 							/* This tiples value is calculated in the shrink_jmp/shrink_trips
-								phase. It is a parameter to (currently only) op_exfun and is the
-								length of the generated jump instruction. op_exfun needs this
-								length to adjust the return address in the created stackframe
-								so it does not have to parse instructions at the return address
-								to see what return signature was created. We will add asserts to
-								this generation in later phases after the true value has been
-								calculated. At this point, it is zero.
-							*/
+							 * phase. It is a parameter to (currently only) op_exfun and is the
+							 * length of the generated jump instruction. op_exfun needs this
+							 * length to adjust the return address in the created stackframe
+							 * so it does not have to parse instructions at the return address
+							 * to see what return signature was created. We will add asserts to
+							 * this generation in later phases after the true value has been
+							 * calculated. At this point, it is zero.
+							 */
 							immediate = ct->operand[0].oprval.tsize->size;
 							EMIT_TRIP_ILIT_GEN;
 							inst_emitted = TRUE;
@@ -1191,22 +1198,22 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 					break;
 				case OCNT_REF:
 					/* This ref's value is calculated in emit_call_xfer(). This value is related to TSIZ_REF
-					   in that it is used for the same reason to different calls (op_call, op_callsp,
-					   op_forlcldo, and their mprof counterparts). It is the offset needed to be
-					   added to the return address from the calls to these routines to bypass a
-					   generated jump sequence. In this case however, the jump sequence is being
-					   generated as part of the OC_CALL, OC_CALLSP or OC_FORLCLDO triple itself.
-					   There is no separate jump triple so the TSIZ_REF triple cannot be used.
-					   So this operand is the OFFSET from the CALL to the NEXT TRIPLE. The operation
-					   is that when this routine sees this type of reference, it will set a flag
-					   and record the operand address and go ahead and generate the value that it has. The
-					   next transfer table generation that occurs will see the set flag and will compute
-					   the address from the return address of that transfer table call to the next triple
-					   and update this triple's value. Since our originating triple has a JUMP type,
-					   it will be updated in shrink_jmp/shirnk_trips() until all necessary shrinkage
-					   is done so the final phase will have the correct value and we only have to
-					   generate an immediate value.
-					*/
+					 * in that it is used for the same reason to different calls (op_call, op_callsp,
+					 * op_forlcldo, and their mprof counterparts). It is the offset needed to be
+					 * added to the return address from the calls to these routines to bypass a
+					 * generated jump sequence. In this case however, the jump sequence is being
+					 * generated as part of the OC_CALL, OC_CALLSP or OC_FORLCLDO triple itself.
+					 * There is no separate jump triple so the TSIZ_REF triple cannot be used.
+					 * So this operand is the OFFSET from the CALL to the NEXT TRIPLE. The operation
+					 * is that when this routine sees this type of reference, it will set a flag
+					 * and record the operand address and go ahead and generate the value that it has. The
+					 * next transfer table generation that occurs will see the set flag and will compute
+					 * the address from the return address of that transfer table call to the next triple
+					 * and update this triple's value. Since our originating triple has a JUMP type,
+					 * it will be updated in shrink_jmp/shirnk_trips() until all necessary shrinkage
+					 * is done so the final phase will have the correct value and we only have to
+					 * generate an immediate value.
+					 */
 					immediate = opr->oprval.offset;
 					EMIT_TRIP_ILIT_GEN;
 					inst_emitted = TRUE;
@@ -1258,7 +1265,7 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 								obpt += VDAT_GR_SIZE;
 							}
 							memcpy(obpt, ct->operand[0].oprval.cdlt->addr,
-								ct->operand[0].oprval.cdlt->len);
+							       ct->operand[0].oprval.cdlt->len);
 							obpt += ct->operand[0].oprval.cdlt->len;
 							emit_base_offset(GTM_REG_PV, find_linkage(ct->operand[0].oprval.cdlt));
 							if (GENERIC_OPCODE_LDA == generic_inst)
@@ -1274,12 +1281,22 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 								emit_base_offset(GTM_REG_CODEGEN_TEMP, 0);
 							}
 							break;
+						case OC_CDIDX:
+							assert(GENERIC_OPCODE_LOAD == generic_inst);
+							/* Fetch linkage table offset for symbol and convert to index */
+							immediate = find_linkage(ct->operand[0].oprval.cdidx) / SIZEOF(lnk_tabent);
+							memcpy(obpt, &vdat_immed[0], VDAT_IMMED_SIZE);
+							obpt += VDAT_IMMED_SIZE;
+							obpt = i2asc((uchar_ptr_t)obpt, immediate);
+							EMIT_TRIP_ILIT_GEN;
+							inst_emitted = TRUE;
+							break;
 						case OC_ILIT:
 							assert(GENERIC_OPCODE_LOAD == generic_inst);
 							immediate = ct->operand[0].oprval.ilit;
 							memcpy(obpt, &vdat_immed[0], VDAT_IMMED_SIZE);
 							obpt += VDAT_IMMED_SIZE;
-							obpt = i2asc((uchar_ptr_t)obpt, ct->operand[0].oprval.ilit);
+							obpt = i2asc((uchar_ptr_t)obpt, immediate);
 							EMIT_TRIP_ILIT_GEN;
 							inst_emitted = TRUE;
 							break;
@@ -1452,6 +1469,13 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 								emit_base_offset(GTM_REG_CODEGEN_TEMP, 0);
 							}
 							break;
+						case OC_CDIDX:
+							assert(GENERIC_OPCODE_LOAD == generic_inst);
+							/* Fetch linkage table offset for symbol and convert to index */
+							immediate = find_linkage(ct->operand[0].oprval.cdidx) / SIZEOF(lnk_tabent);
+							EMIT_TRIP_ILIT_GEN;
+							inst_emitted = TRUE;
+							break;
 						case OC_ILIT:
 							assert(GENERIC_OPCODE_LOAD == generic_inst);
 							immediate = ct->operand[0].oprval.ilit;
@@ -1556,7 +1580,6 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
 	}
 }
 
-
 /*	get_arg_reg
  *
  *	Determines the argument position of the current argument and returns the number of the register to use for the
@@ -1589,8 +1612,7 @@ void	emit_trip(oprtype *opr, boolean_t val_output, uint4 generic_inst, int trg_r
  *	data on this platform, this difference should be benign (the subsequent xfer table call should be synchronized
  *	with respect to code_reference address across all phases).
  */
-
-int	get_arg_reg(void)
+int get_arg_reg(void)
 {
 	int	arg_reg_i;
 
@@ -1619,9 +1641,8 @@ int	get_arg_reg(void)
 	return arg_reg_i;
 }
 
-
 /* VAX reg to local machine reg */
-int	gtm_reg(int vax_reg)
+int gtm_reg(int vax_reg)
 {
 	int	reg;
 
@@ -1663,8 +1684,7 @@ int	gtm_reg(int vax_reg)
 	return reg;
 }
 
-
-void	emit_push(int reg)
+void emit_push(int reg)
 {
 	int	arg_reg_i;
 	int	stack_offset;
@@ -1708,8 +1728,7 @@ void	emit_push(int reg)
 	return;
 }
 
-
-void	emit_pop(int count)
+void emit_pop(int count)
 {
 	int	stack_adjust;
 
@@ -1721,8 +1740,7 @@ void	emit_pop(int count)
 	return;
 }
 
-
-void	add_to_vax_push_list(int pushes_seen)
+void add_to_vax_push_list(int pushes_seen)
 {	/* Make sure there's enough room */
 	if (pushes_seen > MAX_ARGS)	/* user-visible max args is MAX_ARGS - 3 */
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_MAXARGCNT, 1, MAX_ARGS - 3);
@@ -1740,8 +1758,7 @@ void	add_to_vax_push_list(int pushes_seen)
 	current_push_list_ptr->value[push_list_index] = pushes_seen;
 }
 
-
-int	next_vax_push_list(void)
+int next_vax_push_list(void)
 {
 	push_list_index++;
 	if (push_list_index >= PUSH_LIST_SIZE)
@@ -1753,8 +1770,7 @@ int	next_vax_push_list(void)
 	return (current_push_list_ptr->value[push_list_index]);
 }
 
-
-void	push_list_init(void)
+void push_list_init(void)
 {
 	push_list_index = -1;
 	if (push_list_start_ptr == 0)
@@ -1765,15 +1781,13 @@ void	push_list_init(void)
 	current_push_list_ptr = push_list_start_ptr;
 }
 
-
 void reset_push_list_ptr(void)
 {
 	push_list_index = -1;
 	current_push_list_ptr = push_list_start_ptr;
 }
 
-
-void	emit_call_xfer(int xfer)
+void emit_call_xfer(int xfer)
 {
 	int		offset;
 	unsigned char	*c;
@@ -1829,27 +1843,27 @@ void	emit_call_xfer(int xfer)
 	if (!ocnt_ref_seen)
 		return;		/* fast test for return .. we hope */
 	/* If ocnt_ref_seen is set, then we need to compute the value to be used by a recent
-		OCNT_REF parameter. This parameter is (currently as of 6/2003) used by op_call, op_callsp,
-		op_forlcldo, and their mprof counterparts and is the number of bytes those entry points
-		should add to the return address that they will store as the return point in the new stack
-		frame that they create. This parameter is basically the size of the generated code for the
-		jump that follows the call to the above routines that is generates by the associated
-		triples OC_CALL, OC_CALLSP, and OC_FORLCLDO respectively. Since this jump can be variable in
-		size and the only other way for these routines to know what form the jump takes is to parse
-		the instructions at run time, this routine in the compiler will calculate that information and
-		allow it to be passed in as a parameter. The OCNT_REF handler in emit_trip() has set the
-		ocnt_ref_seen flag to bring us here. We now calculate the current PC address and subtract it
-		from the PC address of the next triple.
-	*/
+	 * OCNT_REF parameter. This parameter is (currently as of 6/2003) used by op_call, op_callsp,
+	 * op_forlcldo, and their mprof counterparts and is the number of bytes those entry points
+	 * should add to the return address that they will store as the return point in the new stack
+	 * frame that they create. This parameter is basically the size of the generated code for the
+	 * jump that follows the call to the above routines that is generates by the associated
+	 * triples OC_CALL, OC_CALLSP, and OC_FORLCLDO respectively. Since this jump can be variable in
+	 * size and the only other way for these routines to know what form the jump takes is to parse
+	 * the instructions at run time, this routine in the compiler will calculate that information and
+	 * allow it to be passed in as a parameter. The OCNT_REF handler in emit_trip() has set the
+	 * ocnt_ref_seen flag to bring us here. We now calculate the current PC address and subtract it
+	 * from the PC address of the next triple.
+	 */
 	assert(OC_CALL == current_triple->opcode || OC_CALLSP == current_triple->opcode ||
 		OC_FORLCLDO == current_triple->opcode);
 	offset = current_triple->exorder.fl->rtaddr - (code_reference + (code_idx * INST_SIZE));
 	/* If in assembly or machine (final) phases, make sure have reasonable offset. The offset may be
-		negative in the early phases so don't check during them. For other phases, put a govenor on
-		the values so we don't affect the codegen sizes which can mess up shrink_trips. During the
-		triple shrink phase, the triple distances can vary widely and cause the codegen to change
-		sizes. Note this still allows an assert fail for 0 if a negative number was being produced.
-	*/
+	 * negative in the early phases so don't check during them. For other phases, put a govenor on
+	 * the values so we don't affect the codegen sizes which can mess up shrink_trips. During the
+	 * triple shrink phase, the triple distances can vary widely and cause the codegen to change
+	 * sizes. Note this still allows an assert fail for 0 if a negative number was being produced.
+	 */
 	if (CGP_MACHINE == cg_phase || CGP_ASSEMBLY == cg_phase)
 	{
 		assert(0 <= offset && MAX_BRANCH_CODEGEN_SIZE > offset);
diff --git a/sr_port/entryref.c b/sr_port/entryref.c
index cd1d8cd..a15971d 100644
--- a/sr_port/entryref.c
+++ b/sr_port/entryref.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -40,7 +41,7 @@ STATICFNDCL triple *insert_extref_fast(opctype op1, opctype op2, mident *rtnname
 								\
 	rte1 = put_str((RTNNAME)->addr, (RTNNAME)->len);	\
 	CONVERT_MUTIL_NAME_PERCENT_TO_UNDERSCORE((RTNNAME));	\
-	routine = put_cdlt((RTNNAME));				\
+	routine = PUT_CDREF((RTNNAME));				\
 	ref = newtriple(OC_RHDADDR);				\
 	ref->operand[0] = rte1;					\
 	ref->operand[1] = routine;				\
@@ -66,7 +67,7 @@ error_def(ERR_RTNNAME);
  *   commargcode - What type of command this is for (code from indir_* enum in indir.h)
  *   can_commarg - Indicates whether or not routine is allowed to call commarg to deal with indirects. Currently the only
  *		   routine to set this to false is m_zgoto.c since it already deals with indirects its own way.
- *   labref	 - Only TRUE for calls frome exfunc. When TRUE, label offsets are not allowed.
+ *   labref	 - Only TRUE for calls from exfunc(). When TRUE, label offsets are not allowed.
  *   textname	 - Only TRUE for ZGOTO related calls where the routine/label names are passed as text instead of resolved to
  *		   linkage table entries.
  */
@@ -239,16 +240,15 @@ triple *entryref(opctype op1, opctype op2, mint commargcode, boolean_t can_comma
 }
 
 #ifdef AUTORELINK_SUPPORTED
-/* Routine used in a USHBIN build (UNIX Shared BInary) to generate the triples to reference (call, extrinsic or goto)
- * an external routine. This version calls additional opcodes to dynamically autorelink routines if the routine has been
- * changed since it was last linked if autorelinking is enabled. This requires that all such M-calls with a routine specified
- * as part of the call (i.e. DO label^routine instead of just DO label) be invoked as external routines so this routine
- * creates an external reference to the given routine/label. Note indirects do not come through here.
+/* Routine used in an autorelink-enabled USHBIN build (UNIX Shared BInary) to generate the triples to reference (call, extrinsic
+ * or goto) an external routine. This version of this routine generates calls slightly different than its counterpart below for
+ * non-USHBIN or platforms not supported for autorelink in that any call where the routine name is specified, even if the
+ * routine name is for the current routine, are treated as external calls with an autorelink-needed check. Note indirects do not
+ * come through here.
  *
  * Parameters:
  *
- *   op1     - Opcode to use for local routine (only passed into this flavor for compatibility with the NON-USHBIN version
- *             that follows below. This routine does not use it.
+ *   op1     - Opcode to use for local routine (used by this routine only for local-only [colon-suffixed] labels).
  *   op2     - Opcode to use for external call.
  *   rtnname - Text name of routine being referenced.
  *   labname - Text label being referenced in given routine (may be NULL string)
@@ -258,36 +258,29 @@ triple *entryref(opctype op1, opctype op2, mint commargcode, boolean_t can_comma
  */
 STATICFNDEF triple *insert_extref_fast(opctype op1, opctype op2, mident *rtnname, mident *labname)
 {
-	triple 		*intermed1, *intermed2, *rettrip, *next, *ref;
+	triple 		*rettrip;
 	mstr		lbl_str;
+	mlabel		*mlab;
 
-	intermed1 = maketriple(OC_RHD_EXT);
-	ref = intermed1;
-	ref->operand[0] = put_str(rtnname->addr, rtnname->len);	/* arg 1 */
-	next = newtriple(OC_PARAMETER);
-	ref->operand[1] = put_tref(next);
-	ref = next;
-	ref->operand[0] = put_str(labname->addr, labname->len);	/* arg 2 */
-	next = newtriple(OC_PARAMETER);
-	ref->operand[1] = put_tref(next);
-	ref = next;
-	ref->operand[0] = put_cdlt(rtnname);			/* arg 3 */
-	next = newtriple(OC_PARAMETER);
-	ref->operand[1] = put_tref(next);
-	ref = next;
+	/* Do LABEL^RTN comes here (LABEL is *not* indirect) */
+	if (IS_SAME_RTN(rtnname, &routine_name))
+	{       /* If same routine as current routine, see if this label is a local-only label (colon-suffixed). If so,
+		 * treat this as a local call.
+		 */
+		mlab = get_mladdr(labname);
+		if (!mlab->gbl)
+		{	/* Is a local label - generate local call */
+			rettrip = newtriple(op1);
+			rettrip->operand[0] = put_mlab(labname);
+			return rettrip;
+		}
+	} /* Else create external call reference so routine can be checked for auto-relink at call */
+	rettrip = maketriple(op2);
 	CONVERT_MUTIL_NAME_PERCENT_TO_UNDERSCORE(rtnname);
+	rettrip->operand[0] = PUT_CDREF(rtnname);
 	mlabel2xtern(&lbl_str, rtnname, labname);
-	ref->operand[0] = put_cdlt(&lbl_str);			/* arg 4 */
-	ins_triple(intermed1);
-	/* op_rhd_ext needs to return two pointers: one to a rtn hdr, and one to
-	 * a line number entry (label). op_rhd_ext directly returns the rtn hdr
-	 * and sets lab_proxy, which op_lab_ext fetches and feeds into the opcode
-	 * doing the reference (DO, extrinsics, and ZBREAK).
-	 */
-	intermed2 = newtriple(OC_LAB_EXT); /* extracts, returns global variable */
-	rettrip = newtriple(op2);
-	rettrip->operand[0] = put_tref(intermed1);
-	rettrip->operand[1] = put_tref(intermed2);
+	rettrip->operand[1] = PUT_CDREF(&lbl_str);
+	ins_triple(rettrip);
 	return rettrip;
 }
 
@@ -303,6 +296,7 @@ STATICFNDEF oprtype insert_extref(mident *rtnname)
 }
 
 #else
+
 /* Routine used in a NON_USHBIN build to generate triples for a label reference (call, function invocation or goto) a routine.
  * At this point, it could be an internal or external routine. Note indirects do not come here.
  *
@@ -326,9 +320,9 @@ STATICFNDEF triple *insert_extref_fast(opctype op1, opctype op2, mident *rtnname
 	{       /* Create an external reference to LABEL^RTN */
 		rettrip = maketriple(op2);
 		CONVERT_MUTIL_NAME_PERCENT_TO_UNDERSCORE(rtnname);
-		rettrip->operand[0] = put_cdlt(rtnname);
+		rettrip->operand[0] = PUT_CDREF(rtnname);
 		mlabel2xtern(&lbl_str, rtnname, labname);
-		rettrip->operand[1] = put_cdlt(&lbl_str);
+		rettrip->operand[1] = PUT_CDREF(&lbl_str);
 		ins_triple(rettrip);
 	}
 	return rettrip;
diff --git a/sr_port/error.h b/sr_port/error.h
index 8559143..b3c42fa 100644
--- a/sr_port/error.h
+++ b/sr_port/error.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -84,11 +85,15 @@ CONDITION_HANDLER(dse_f_blk_ch);
 CONDITION_HANDLER(exi_ch);
 CONDITION_HANDLER(fgncal_ch);
 CONDITION_HANDLER(fntext_ch);
+#ifdef UNIX
+CONDITION_HANDLER(fnzsrch_ch);
+#endif
 CONDITION_HANDLER(gds_rundown_ch);
 CONDITION_HANDLER(gtcm_ch);
 CONDITION_HANDLER(gtcm_exi_ch);
 CONDITION_HANDLER(gtm_env_xlate_ch);
 CONDITION_HANDLER(gtm_maxstr_ch);
+CONDITION_HANDLER(gtmio_ch);
 CONDITION_HANDLER(gtmrecv_ch);
 CONDITION_HANDLER(gtmrecv_fetchresync_ch);
 CONDITION_HANDLER(gtmsource_ch);
@@ -127,6 +132,9 @@ CONDITION_HANDLER(trans_code_ch);
 CONDITION_HANDLER(updproc_ch);
 CONDITION_HANDLER(util_base_ch);
 CONDITION_HANDLER(util_ch);
+#ifdef UNIX
+CONDITION_HANDLER(zro_ins_rec_fail_ch);
+#endif
 CONDITION_HANDLER(zshow_ch);
 CONDITION_HANDLER(zyerr_ch);
 
diff --git a/sr_port/exfun_frame.c b/sr_port/exfun_frame.c
index 62eb4a9..a98d9e0 100644
--- a/sr_port/exfun_frame.c
+++ b/sr_port/exfun_frame.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -63,13 +64,15 @@ void exfun_frame (void)
 	sf->ret_value = NULL;
 	sf->dollar_test = -1;
 	sf->old_frame_pointer = frame_pointer;
+	sf->flags = 0;			/* Don't propagate special flags */
 	sf->type &= SFT_ZINTR_OFF;	/* Don't propagate special type - normally can't propagate but if $ZINTERRUPT frame is
 					 * rewritten by ZGOTO to a "regular" frame, this frame type *can* propagate.
 					 */
 	frame_pointer = sf;
 	assert((frame_pointer < frame_pointer->old_frame_pointer) || (NULL == frame_pointer->old_frame_pointer));
-	DBGEHND((stderr, "exfun_frame: Added stackframe at addr 0x"lvaddr"  old-msp: 0x"lvaddr"  new-msp: 0x"lvaddr"\n",
-		 sf, msp_save, msp));
+	DBGEHND((stderr, "exfun_frame: Added stackframe at addr 0x"lvaddr"  old-msp: 0x"lvaddr"  new-msp: 0x"lvaddr" for routine "
+		 "%.*s (rtnhdr 0x"lvaddr")\n", sf, msp_save, msp, sf->rvector->routine_name.len, sf->rvector->routine_name.addr,
+		 sf->rvector));
 	return;
 }
 
diff --git a/sr_port/exfunc.c b/sr_port/exfunc.c
index 8ea8fc9..bf0d0b5 100644
--- a/sr_port/exfunc.c
+++ b/sr_port/exfunc.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,6 +11,7 @@
  ****************************************************************/
 
 #include "mdef.h"
+
 #include "compiler.h"
 #include "opcode.h"
 #include "toktyp.h"
@@ -56,9 +58,9 @@ int exfunc(oprtype *a, boolean_t alias_target)
 		calltrip_opr1_tref = calltrip->operand[1].oprval.tref;
 		if (OC_EXTEXFUN == calltrip->opcode)
 		{
-			if (OC_CDLIT == calltrip_opr1_tref->opcode)
-				assert(CDLT_REF == calltrip_opr1_tref->operand[0].oprclass);
-			else ARLINK_ONLY(if (OC_LAB_EXT != calltrip_opr1_tref->opcode))
+			if (OC_CDREF == calltrip_opr1_tref->opcode)
+				assert(CDREF_REF == calltrip_opr1_tref->operand[0].oprclass);
+			else
 			{
 				assert(OC_LABADDR == calltrip_opr1_tref->opcode);
 				assert(TRIP_REF == calltrip_opr1_tref->operand[1].oprclass);
diff --git a/sr_port/expritem.c b/sr_port/expritem.c
index b39c0df..fddee39 100644
--- a/sr_port/expritem.c
+++ b/sr_port/expritem.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -84,6 +85,7 @@ LITDEF nametabent svn_names[] =
 	,{ 3, "ZEO*" }
 	,{ 3, "ZER*" }
 	,{ 2, "ZG*" }
+	,{ 2, "ZH" }, { 8 , "ZHOROLOG" }
 	,{ 4, "ZINI*"}
 	,{ 4, "ZINT*"}
 	,{ 3, "ZIO" }
@@ -94,7 +96,9 @@ LITDEF nametabent svn_names[] =
 	,{ 3, "ZMO*" }
 	,{ 5, "ZONLN*"}
 	,{ 5, "ZPATN" }, {8, "ZPATNUME*" }
+	,{ 4, "ZPIN" }
 	,{ 4, "ZPOS*" }
+	,{ 5, "ZPOUT" }
 	,{ 5, "ZPROC*" }
 	,{ 5, "ZPROM*" }
 	,{ 2, "ZQ*" }
@@ -118,6 +122,7 @@ LITDEF nametabent svn_names[] =
 	,{ 4, "ZTWO*"}
 	,{ 2, "ZT*" }
 	,{ 3, "ZUS*" }
+	,{ 3, "ZUT" }
 	,{ 2, "ZV*" }
 	,{ 4, "ZYER*" }
 };
@@ -126,7 +131,7 @@ LITDEF nametabent svn_names[] =
 LITDEF unsigned char svn_index[27] = {
 	 0,  0,  0,  0,  2,  8,  8,  8, 10,	/* a b c d e f g h i */
 	12, 14 ,16, 16, 16, 16, 16, 18, 20,	/* j k l m n o p q r */
-	22, 28, 34 ,34, 34, 34, 35, 36, 93	/* s t u v w x y z ~ */
+	22, 28, 34 ,34, 34, 34, 35, 36, 98	/* s t u v w x y z ~ */
 };
 
 /* These entries correspond to the entries in the svn_names array */
@@ -167,6 +172,7 @@ LITDEF svn_data_type svn_data[] =
 	,{ SV_ZEOF, FALSE, ALL_SYS }
 	,{ SV_ZERROR, TRUE, ALL_SYS }
 	,{ SV_ZGBLDIR, TRUE, ALL_SYS }
+	,{ SV_ZHOROLOG, FALSE, ALL_SYS }, { SV_ZHOROLOG, FALSE, ALL_SYS }
 	,{ SV_ZININTERRUPT, FALSE, ALL_SYS}
 	,{ SV_ZINTERRUPT, TRUE, ALL_SYS}
 	,{ SV_ZIO, FALSE, ALL_SYS }
@@ -177,7 +183,9 @@ LITDEF svn_data_type svn_data[] =
 	,{ SV_ZMODE, FALSE, ALL_SYS }
 	,{ SV_ZONLNRLBK, FALSE, UNIX_OS }
 	,{ SV_ZPATNUMERIC, FALSE, ALL_SYS }, { SV_ZPATNUMERIC, FALSE, ALL_SYS }
+	,{ SV_ZPIN, FALSE, ALL_SYS }
 	,{ SV_ZPOS, FALSE, ALL_SYS }
+	,{ SV_ZPOUT, FALSE, ALL_SYS }
 	,{ SV_ZPROC, FALSE, ALL_SYS }
 	,{ SV_PROMPT, TRUE, ALL_SYS }
 	,{ SV_ZQUIT, TRUE, ALL_SYS }
@@ -201,6 +209,7 @@ LITDEF svn_data_type svn_data[] =
 	,{ SV_ZTWORMHOLE, TRUE, TRIGGER_OS }
 	,{ SV_ZTRAP, TRUE, ALL_SYS }
 	,{ SV_ZUSEDSTOR, FALSE, ALL_SYS }
+	,{ SV_ZUT, FALSE, ALL_SYS }
 	,{ SV_ZVERSION, FALSE, ALL_SYS }
 	,{ SV_ZYERROR, TRUE, ALL_SYS }
 };
diff --git a/sr_port/ext2jnl.c b/sr_port/ext2jnl.c
index e937dab..ed96af7 100644
--- a/sr_port/ext2jnl.c
+++ b/sr_port/ext2jnl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -43,6 +44,7 @@ GBLREF	gv_key		*gv_currkey;
 GBLREF	boolean_t	is_src_server;
 GBLREF	repl_msg_ptr_t	gtmsource_msgp;
 GBLREF	int		gtmsource_msgbufsiz;
+GBLREF	volatile boolean_t	timer_in_handler;
 
 static	boolean_t	in_tp;
 static	int4		num_records;
@@ -115,7 +117,7 @@ unsigned char *ext2jnlcvt(char *ext_buff, int4 ext_len, unsigned char **tr, int
 char	*ext2jnl(char *ptr, jnl_record *rec, seq_num saved_jnl_seqno, seq_num saved_strm_seqno)
 {
 	unsigned char	*pool_save, ch, chtmp;
-	char 		*val_off;
+	char 		*val_off, *strtokptr;
 	int		keylength, keystate, len, i, reclen, temp_reclen, val_len;
 	bool		keepgoing;
 	mstr		src, des;
@@ -237,23 +239,23 @@ char	*ext2jnl(char *ptr, jnl_record *rec, seq_num saved_jnl_seqno, seq_num saved
 		break;
 	}
 	rectype = (enum jnl_record_type)rec->prefix.jrec_type;
-	ptr = strtok(ptr, "\\");		/* get the rec-type field */
+	ptr = STRTOK_R(ptr, "\\", &strtokptr);		/* get the rec-type field */
 	assert(NULL != ptr);
-	ptr = strtok(NULL, "\\");		/* get the time field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the time field */
 	assert(NULL != ptr);
-	ptr = strtok(NULL, "\\");		/* get the tn field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the tn field */
 	assert(NULL != ptr);
 	rec->prefix.tn = asc2i((uchar_ptr_t)ptr, STRLEN(ptr));
-	ptr = strtok(NULL, "\\");		/* get the pid field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the pid field */
 	assert(NULL != ptr);
-	ptr = strtok(NULL, "\\");		/* get the client pid field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the client pid field */
 	assert(NULL != ptr);
-	ptr = strtok(NULL, "\\");		/* get the token/jnl_seqno field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the token/jnl_seqno field */
 	assert(NULL != ptr);
 	rec->jrec_null.jnl_seqno = saved_jnl_seqno;
-	ptr = strtok(NULL, "\\");		/* get the strm_num field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the strm_num field */
 	assert(NULL != ptr);
-	ptr = strtok(NULL, "\\");		/* get the strm_seqno field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the strm_seqno field */
 	assert(NULL != ptr);
 	rec->jrec_null.strm_seqno = saved_strm_seqno;
 	switch(exttype)
@@ -263,8 +265,8 @@ char	*ext2jnl(char *ptr, jnl_record *rec, seq_num saved_jnl_seqno, seq_num saved
 			rec->jrec_null.suffix.suffix_code = JNL_REC_SUFFIX_CODE;
 			return ((char_ptr_t)rec) + NULL_RECLEN;
 		case MUEXT_TCOMMIT:
-			ptr = strtok(NULL, "\\");		/* get the participants */
-			ptr = strtok(NULL, "\\");		/* get the jnl_tid */
+			ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the participants */
+			ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the jnl_tid */
 			rec->jrec_tcom.jnl_tid[0] = 0;
 			if (NULL != ptr)
 				strcpy(rec->jrec_tcom.jnl_tid, ptr);
@@ -274,13 +276,13 @@ char	*ext2jnl(char *ptr, jnl_record *rec, seq_num saved_jnl_seqno, seq_num saved
 			return ((char_ptr_t)rec) + TCOM_RECLEN;
 	}
 	assert(IS_SET_KILL_ZKILL_ZTWORM_LGTRIG_ZTRIG(rectype));
-	ptr = strtok(NULL, "\\");	/* get the update_num field */
+	ptr = STRTOK_R(NULL, "\\", &strtokptr);	/* get the update_num field */
 	assert(NULL != ptr);
 	assert(OFFSETOF(struct_jrec_upd, update_num) == OFFSETOF(struct_jrec_ztworm, update_num));
 	rec->jrec_set_kill.update_num = num_records;
 	if ((MUEXT_ZTWORM != exttype) && (MUEXT_LGTRIG != exttype))
 	{
-		ptr = strtok(NULL, "\\");		/* get the nodeflags field */
+		ptr = STRTOK_R(NULL, "\\", &strtokptr);		/* get the nodeflags field */
 		assert(NULL != ptr);
 		rec->jrec_set_kill.mumps_node.nodeflags = asc2i((uchar_ptr_t)ptr, STRLEN(ptr));
 	}
diff --git a/sr_port/f_order.c b/sr_port/f_order.c
index ad96e09..47b6c9d 100644
--- a/sr_port/f_order.c
+++ b/sr_port/f_order.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -57,7 +58,6 @@ int f_order(oprtype *a, opctype op)
 	SETUP_THREADGBL_ACCESS;
 	oldchain = sav_dirref = NULL;			/* default to no direction and no shifting indirection */
 	used_glvn_slot = FALSE;
-	sav_gv1 = TREF(curtchain);
 	r = maketriple(OC_NOOP);			/* We'll fill in the opcode later, when we figure out what it is */
 	switch (TREF(window_token))
 	{
@@ -77,8 +77,16 @@ int f_order(oprtype *a, opctype op)
 		break;
 	case TK_CIRCUMFLEX:
 		object = GLOBAL;
+		sav_gv1 = TREF(curtchain);
 		ok = gvn();
 		sav_gvn = (TREF(curtchain))->exorder.bl;
+		if (OC_GVRECTARG == sav_gvn->opcode)
+		{	/* because of shifting if we need to find it, look in the expr_start chain */
+			assert(TREF(shift_side_effects));
+			assert(((sav_gvn->operand[0].oprval.tref) == TREF(expr_start)) && (NULL != TREF(expr_start_orig)));
+			sav_gv1 = TREF(expr_start_orig);
+			sav_gvn = TREF(expr_start);
+		}
 		next_oprptr = &r->operand[0];
 		break;
 	case TK_ATSIGN:
diff --git a/sr_port/f_select.c b/sr_port/f_select.c
index 9eff1eb..3da7b1e 100644
--- a/sr_port/f_select.c
+++ b/sr_port/f_select.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -34,7 +35,7 @@ LITREF octabstruct oc_tab[];
 
 int f_select(oprtype *a, opctype op)
 {
-	boolean_t	first_time, save_saw_side, *save_se_base, save_shift, shifting;
+	boolean_t	first_time, save_saw_side, *save_se_base, save_shift, shifting, we_saw_side_effect = FALSE;
 	opctype		old_op;
 	oprtype		*cnd, endtrip, target, tmparg;
 	triple		*oldchain, *r, *ref, *save_start, *save_start_orig, tmpchain, *triptr;
@@ -52,7 +53,6 @@ int f_select(oprtype *a, opctype op)
 	TREF(expr_depth) = 0;
 	TREF(expr_start) = TREF(expr_start_orig) = NULL;
 	TREF(saw_side_effect) = FALSE;
-	TREF(shift_side_effects) = FALSE;
 	TREF(side_effect_depth) = INITIAL_SIDE_EFFECT_DEPTH;
 	TREF(side_effect_base) = malloc(SIZEOF(boolean_t) * TREF(side_effect_depth));
 	memset((char *)(TREF(side_effect_base)), 0, SIZEOF(boolean_t) * TREF(side_effect_depth));
@@ -60,7 +60,10 @@ int f_select(oprtype *a, opctype op)
 	{
 		dqinit(&tmpchain, exorder);
 		oldchain = setcurtchain(&tmpchain);
-	}
+		INCREMENT_EXPR_DEPTH;	/* Don't want to hit botton with each expression, so start at 1 rather than 0 */
+		TREF(shift_side_effects) = TRUE;
+	} else
+		TREF(shift_side_effects) = FALSE;
 	r = maketriple(op);
 	first_time = TRUE;
 	endtrip = put_tjmp(r);
@@ -107,7 +110,7 @@ int f_select(oprtype *a, opctype op)
 			ref = newtriple(OC_STO);
 			ref->operand[0] = target;
 			ref->operand[1] = tmparg;
-			if (OC_PASSTHRU == tmparg.oprval.tref->opcode)
+			if (OC_PASSTHRU == old_op)
 			{
 				assert(TRIP_REF == tmparg.oprval.tref->operand[0].oprclass);
 				ref = newtriple(OC_STO);
@@ -127,6 +130,13 @@ int f_select(oprtype *a, opctype op)
 	ref->operand[0] = tmparg;
 	ref->operand[1] = put_ilit(FALSE);	/* Not a subroutine reference */
 	ins_triple(r);
+	if (shifting)
+	{
+		assert(1 == TREF(expr_depth));
+		we_saw_side_effect = TREF(saw_side_effect);
+		save_se_base[save_expr_depth] |= (TREF(side_effect_base))[1];
+		DECREMENT_EXPR_DEPTH;		/* Clean up */
+	}
 	assert(!TREF(expr_depth));
 	TREF(expr_start) = save_start;
 	TREF(expr_start_orig) = save_start_orig;
@@ -135,17 +145,29 @@ int f_select(oprtype *a, opctype op)
 	SELECT_CLEANUP;
 	TREF(expr_depth) = save_expr_depth;
 	if (shifting)
-	{
-		shifting = ((TREF(expr_start) != TREF(expr_start_orig)) && (OC_NOOP != (TREF(expr_start))->opcode));
-		newtriple(shifting ? OC_GVSAVTARG : OC_NOOP);	/* must have one of these two at expr_start */
-		setcurtchain(oldchain);
-		dqadd(TREF(expr_start), &tmpchain, exorder);
-		TREF(expr_start) = tmpchain.exorder.bl;
-		if (shifting)
-		{	/* only play this game if something else started it */
-			assert(OC_GVSAVTARG == (TREF(expr_start))->opcode);
+	{	/* We have built a separate chain so decide what to do with it */
+		if (we_saw_side_effect || (GTM_BOOL != TREF(gtm_fullbool))
+			|| ((save_start != save_start_orig) && (OC_NOOP != save_start->opcode)))
+		{	/* Only play this game if a side effect requires it */
+			newtriple(OC_GVSAVTARG);	/* Need 1 of these at expr_start */
+			setcurtchain(oldchain);
+			TREF(saw_side_effect) |= we_saw_side_effect;
+			if (NULL == save_start)
+			{	/* If this chain is new, look back for a pre-boolean place to put it */
+				for (ref = (TREF(curtchain))->exorder.bl;
+				     (ref != TREF(curtchain)) && oc_tab[ref->opcode].octype & OCT_BOOL; ref = ref->exorder.bl)
+						;
+				TREF(expr_start) = TREF(expr_start_orig) = ref;
+			}
+			dqadd(TREF(expr_start), &tmpchain, exorder);
+			TREF(expr_start) = tmpchain.exorder.bl;
 			triptr = newtriple(OC_GVRECTARG);
 			triptr->operand[0] = put_tref(TREF(expr_start));
+		} else
+		{	/* Just put it where it would "naturally" go */
+			setcurtchain(oldchain);
+			triptr = (TREF(curtchain))->exorder.bl;
+			dqadd(triptr, &tmpchain, exorder);
 		}
 	}
 	*a = put_tref(r);
diff --git a/sr_port/f_zchar.c b/sr_port/f_zchar.c
index 4c64de7..cb88677 100644
--- a/sr_port/f_zchar.c
+++ b/sr_port/f_zchar.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -79,6 +80,7 @@ int f_zchar(oprtype *a, opctype op)
 		*c = '\0';
 		v.str.len = INTCAST(c - v.str.addr);
 		stringpool.free = (unsigned char *)c;
+		CLEAR_MVAL_BITS(&v);
 		s2n(&v);
 		*a = put_lit(&v);
 		return TRUE;
diff --git a/sr_port/find_line_addr.c b/sr_port/find_line_addr.c
index 3c49b08..e23abe2 100644
--- a/sr_port/find_line_addr.c
+++ b/sr_port/find_line_addr.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -41,7 +42,7 @@ int4* find_line_addr(rhdtyp *routine, mstr *label, int4 offset, mident **lent_na
 	{	/* No label specified. Return the first line */
 		base = LABTAB_ADR(real_routine);
 		/* Get the null label entry and note whether it has a formallist. */
-		(TREF(lab_proxy)).has_parms = base->has_parms;
+		(TABENT_PROXY).has_parms = base->has_parms;
 		assert(0 == base->lab_name.len);
 		if (lent_name)
 			*lent_name = &base->lab_name;
@@ -65,7 +66,7 @@ int4* find_line_addr(rhdtyp *routine, mstr *label, int4 offset, mident **lent_na
 			MIDENT_CMP(&lname, &ptr->lab_name, stat);
 			if (0 == stat)
 			{	/* Note whether the label has a formallist. */
-				(TREF(lab_proxy)).has_parms = ptr->has_parms;
+				(TABENT_PROXY).has_parms = ptr->has_parms;
 				if (lent_name)
 					*lent_name = &ptr->lab_name;
 				line_table = LABENT_LNR_ENTRY(real_routine, ptr);
diff --git a/sr_port/flush_jmp.c b/sr_port/flush_jmp.c
index 335512b..53497b9 100644
--- a/sr_port/flush_jmp.c
+++ b/sr_port/flush_jmp.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -45,11 +46,11 @@ error_def(ERR_STACKOFLOW);
 
 void flush_jmp (rhdtyp *rtn_base, unsigned char *context, unsigned char *transfer_addr)
 {
-	mv_stent	*mv_st_ent, *mv_st_prev;
-	char		*top;
-	unsigned char	*msp_save;
-	int4		shift, size, mv_st_type;
-	rhdtyp		*old_rtnhdr;
+	mv_stent		*mv_st_ent, *mv_st_prev;
+	char			*top;
+	unsigned char		*msp_save;
+	int4			shift, size, mv_st_type;
+	USHBIN_ONLY(rhdtyp	*old_rtnhdr;)
 
 	unwind_nocounts();
 	/* We are going to mutate the current frame from the program it was running to the program we want it to run.
@@ -69,7 +70,7 @@ void flush_jmp (rhdtyp *rtn_base, unsigned char *context, unsigned char *transfe
 	frame_pointer->flags &= SFF_ETRAP_ERR_OFF;	  /* clear SFF_ETRAP_ERR bit */
 	frame_pointer->flags &= SFF_IMPLTSTART_CALLD_OFF; /* clear SFF_IMPLTSTART_CALLD bit since this frame is being rewritten */
 	GTMTRIG_ONLY(DBGTRIGR((stderr, "flush_jmp: Turrning off SFF_IMPLTSTART_CALLD_OFF in frame 0x"lvaddr"\n", frame_pointer)));
-	old_rtnhdr = frame_pointer->rvector;
+	USHBIN_ONLY(old_rtnhdr = frame_pointer->rvector);
 	frame_pointer->rvector = rtn_base;
 	/* Now that fp->rvector has been overwritten to new routine, check if the older routine had a "rtn_relinked" flag set
 	 * and if so that cleanup can be performed now.
diff --git a/sr_port/flush_pio.c b/sr_port/flush_pio.c
index 1a6dd6b..dd4e499 100644
--- a/sr_port/flush_pio.c
+++ b/sr_port/flush_pio.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,22 +11,161 @@
  ****************************************************************/
 
 #include "mdef.h"
+
 #include "io.h"
 #include "io_params.h"
+#include "gtmio.h"
+#include "iottdef.h"
+#include "iormdef.h"
+#include "iosocketdef.h"
+#include "send_msg.h"
+#include "error.h"
+
+GBLDEF boolean_t	exiting_on_dev_out_error = FALSE;
+
+GBLREF io_pair		io_std_device;
+GBLREF io_pair		io_curr_device;
+GBLREF bool		prin_out_dev_failure;
+GBLREF boolean_t	in_prin_gtmio;
+
+STATICDEF int		writing_to_pio = 0;
+
+#define SET_MUPINTR(MUPINTR, TYPE)	\
+	MUPINTR = ((TYPE *)io_std_device.out->dev_sp)->mupintr;
 
-GBLREF io_pair io_std_device;
-GBLREF bool	prin_out_dev_failure;
+/* Functions for optionally writing to and flushing the principal device. We do not flush if an error has already occurred, to give
+ * user's $ZT or EXCEPTION a chance to execute. Keep in mind that some utility programs do not have devices to flush.
+ */
+
+error_def(ERR_NOPRINCIO);
 
 void flush_pio(void)
 {
-	/* there is no eol character in the flush prototype */
-	/*unsigned char	p;*/
-
-	if (io_std_device.out && !prin_out_dev_failure)	/* Some utility pgms don't have devices to flush */
-	{ /* do not flush if we've encountered an error with io_std_device already so that we give user $ZT, or EXCEPTION
-	   * a chance to execute */
-		/*p = (unsigned char)iop_eol;
-		(io_std_device.out->disp_ptr->flush)(io_std_device.out, &p);*/
+	if (io_std_device.out && !prin_out_dev_failure)
 		(io_std_device.out->disp_ptr->flush)(io_std_device.out);
+}
+
+void write_text_newline_and_flush_pio(mstr *text)
+{
+	io_pair		save_io_curr_device;
+	int		i, status, msg_length;
+	char		*msg_start, c;
+	boolean_t	mupintr, encrypted;
+
+	/* We have already tried to stop the image, so returning here should not be allowed. */
+	if (exiting_on_dev_out_error)
+		return;
+	/* If we are not yet stopping the image, make sure we are not nesting on this function. */
+	if (3 > writing_to_pio)
+	{
+		writing_to_pio++;
+		if ((!prin_out_dev_failure) && (!in_prin_gtmio))
+		{	/* It is unsafe to continue using the principal device if we are in the middle of some I/O on it or have
+			 * already encountered an error.
+			 */
+			assert(NULL != io_std_device.out);
+			switch (io_std_device.out->type)
+			{
+				case tt:
+					SET_MUPINTR(mupintr, d_tt_struct);
+					encrypted = FALSE;
+					break;
+				case rm:
+					SET_MUPINTR(mupintr, d_rm_struct);
+					/* Encryption only supported for files, pipes, and FIFOs. */
+					encrypted = IS_GTM_IMAGE
+						? ((d_rm_struct *)io_std_device.out->dev_sp)->output_encrypted : FALSE;
+					break;
+				case gtmsocket:
+					SET_MUPINTR(mupintr, d_socket_struct);
+					encrypted = FALSE;
+					break;
+				default:
+					assert(FALSE);
+					mupintr = encrypted = FALSE;
+			}
+			/* Do not use GT.M I/O if got MUPIP-interrupted. */
+			if (!mupintr)
+			{	/* The wteol() call may invoke write() under the covers, so the current device needs to be correct
+				 * for all calls below.
+				 */
+				save_io_curr_device = io_curr_device;
+				io_curr_device = io_std_device;
+				if ((NULL != text) && (0 != text->len))
+				{
+					if (0 < io_std_device.out->dollar.x)
+					{	/* If we are going to write something before the newline and $X is currently
+						 * non-zero, then we need to insert one newline first.
+						 */
+						(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
+					}
+					msg_start = text->addr;
+					msg_length = text->len;
+					/* Find all newlines and form feeds and convert them into appropriate GT.M I/O functions. */
+					for (i = 0; i < msg_length; i++)
+					{
+						c = *(msg_start + i);
+						if ('\n' == c)
+						{
+							text->len = i - (text->addr - msg_start);
+							(io_std_device.out->disp_ptr->write)(text);
+							(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
+							text->addr += text->len + 1;
+						} else if ('\f' == c)
+						{
+							text->len = i - (text->addr - msg_start);
+							(io_std_device.out->disp_ptr->write)(text);
+							(io_std_device.out->disp_ptr->wtff)();
+							text->addr += text->len + 1;
+						}
+					}
+					text->len = i - (text->addr - msg_start);
+					if (0 != text->len)
+					{	/* If we still have something to write, potentially after a form feed or newline, do
+						 * write it and follow up with a newline.
+						 */
+						(io_std_device.out->disp_ptr->write)(text);
+						(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
+					} else if ('\f' != c)
+						(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
+				} else
+					(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
+				(io_std_device.out->disp_ptr->flush)(io_std_device.out);
+				io_curr_device = save_io_curr_device;
+				writing_to_pio--;
+				return;
+			}
+		} else
+			encrypted = FALSE;
+		/* Encrypted messages can only be printed using GT.M I/O, and since mixing encrypted and plain-text messages results
+		 * in unencryptable content.
+		 */
+		if (!encrypted)
+		{
+			if ((NULL != text) && (0 != text->len))
+			{
+				status = FPRINTF(stderr, "%.*s", text->len, text->addr);
+				if (0 <= status)
+				{
+					c = *(text->addr + text->len - 1);
+					if ('\f' != c)
+						status = FPRINTF(stderr, "\n");
+				}
+			} else
+				status = FPRINTF(stderr, "\n");
+			if (0 <= status)
+			{
+				FFLUSH(stderr);
+				writing_to_pio--;
+				return;
+			}
+		}
+		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOPRINCIO);
 	}
+	exiting_on_dev_out_error = TRUE;
+	stop_image_no_core();
+	writing_to_pio--;
+	/* No assert for writing_to_pio being non-negative because if we made it past the stop_image_no_core() call above, something
+	 * is seriously wrong, and there is no point counting on an assert.
+	 */
 }
diff --git a/sr_port/gbldefs.c b/sr_port/gbldefs.c
index 14d4e39..258ebd9 100644
--- a/sr_port/gbldefs.c
+++ b/sr_port/gbldefs.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -27,6 +28,7 @@
 #include "gtm_unistd.h"
 #include "gtm_limits.h"
 #include "gtm_un.h"
+#include "gtm_pwd.h"
 
 #include <signal.h>
 #include <sys/time.h>
@@ -509,6 +511,9 @@ GBLDEF	boolean_t	utf8_patnumeric;	/* Should patcode N match non-ASCII numbers in
 GBLDEF	boolean_t	badchar_inhibit;	/* Suppress malformed UTF-8 characters by default */
 GBLDEF  MSTR_DEF(dollar_zchset, 1, "M");
 GBLDEF  MSTR_DEF(dollar_zpatnumeric, 1, "M");
+GBLDEF  MSTR_DEF(dollar_zpin, 3, "< /");
+GBLDEF  MSTR_DEF(dollar_zpout, 3, "> /");
+GBLDEF  MSTR_DEF(dollar_prin_log, 1, "0");
 /* Standard MUMPS pattern-match table.
  * This table holds the current pattern-matching attributes of each ASCII character.
  * Bits 0..23 of each entry correspond with the pattern-match characters, A..X.
@@ -851,6 +856,10 @@ GBLDEF	boolean_t		dse_all_dump;		/* TRUE if DSE ALL -DUMP is specified */
 GBLDEF	int			socketus_interruptus;	/* How many times socket reads have been interrutped */
 GBLDEF	int4			pending_errtriplecode;	/* if non-zero contains the error code to invoke ins_errtriple with */
 GBLDEF	uint4	process_id;
+GBLDEF	uid_t	user_id = INVALID_UID, effective_user_id = INVALID_UID;
+GBLDEF	gid_t	group_id = INVALID_GID, effective_group_id = INVALID_GID;
+GBLDEF	struct	passwd getpwuid_struct = {NULL, NULL, INVALID_UID, INVALID_GID, NULL, NULL, NULL};
+						/* cached copy of "getpwuid" to try avoid future system calls for the same "uid" */
 GBLDEF	uint4	image_count;	/* not used in UNIX but defined to preserve VMS compatibility */
 GBLDEF  size_t  totalRmalloc;                           /* Total storage currently (real) malloc'd (includes extent blocks) */
 GBLDEF  size_t  totalAlloc;                             /* Total allocated (includes allocation overhead but not free space */
@@ -1113,3 +1122,4 @@ GBLDEF	gtm_tls_ctx_t	*tls_ctx;			/* Process private pointer to SSL/TLS context.
 							 */
 #endif
 GBLDEF lv_val		*active_lv;
+GBLDEF boolean_t	in_prin_gtmio = FALSE;		/* Flag to indicate whether we are processing a GT.M I/O function. */
diff --git a/sr_port/gde.hlp b/sr_port/gde.hlp
index 46847df..edd98e6 100644
--- a/sr_port/gde.hlp
+++ b/sr_port/gde.hlp
@@ -134,10 +134,10 @@
 
                          *** TEMPLATES ***
                                                                              Std      Inst
-                                                Def     Rec   Key Null       Null     Freeze   Qdb
-    Region                                     Coll    Size  Size Subs       Coll Jnl on Error Rndwn
-    ----------------------------------------------------------------------------------------------------
-    <default>                                     0    4080   255 NEVER      Y    Y   DISABLED DISABLED
+                                                Def     Rec   Key Null       Null     Freeze   Qdb      Epoch
+    Region                                     Coll    Size  Size Subs       Coll Jnl on Error Rndwn    Taper
+    -----------------------------------------------------------------------------------------------------------
+    <default>                                     0    4080   255 NEVER      Y    Y   DISABLED DISABLED ENABLED
                      Jnl File (def ext: .mjl)  Before  Buff      Alloc      Exten   AutoSwitch
     ------------------------------------------------------------------------------------------
     <default>        <based on DB file-spec>   Y       2308       2048       2048      8386560
@@ -157,10 +157,10 @@
     *                                  DEFAULT
                                    *** REGIONS ***
                                                                                                    Std      Inst
-                                    Dynamic                          Def      Rec   Key Null       Null     Freeze   Qdb
-    Region                          Segment                         Coll     Size  Size Subs       Coll Jnl on Error Rndwn
-    --------------------------------------------------------------------------------------------------------------------------
-    DEFAULT                         DEFAULT                            0     4080   255 NEVER      Y    Y   DISABLED DISABLED
+                                    Dynamic                          Def      Rec   Key Null       Null     Freeze   Qdb      Epoch
+    Region                          Segment                         Coll     Size  Size Subs       Coll Jnl on Error Rndwn    Taper
+    ---------------------------------------------------------------------------------------------------------------------------------
+    DEFAULT                         DEFAULT                            0     4080   255 NEVER      Y    Y   DISABLED DISABLED ENABLED
                              *** JOURNALING INFORMATION ***
     Region                          Jnl File (def ext: .mjl)  Before Buff      Alloc      Exten   AutoSwitch
     --------------------------------------------------------------------------------------------------------
@@ -334,6 +334,11 @@
    If this does not work, contact your system manager to investigate setup
    and file access issues.
 
+   **Note**
+
+   Even when invoked from within GT.M, GDE always uses the gtmgbldir
+   environment variable to identify its target
+
    To leave GDE:
 
     1. Use the GDE EXIT command to save all changes and return to the caller.
@@ -1053,98 +1058,6 @@
    command file with the SHOW -COMMAND -FILE=gde-command-file and run it in
    the target environment.
 
-   Example:
-
-   GDE>show -template
-                                  *** TEMPLATES ***
-                                                                             Std      Inst
-                                                Def     Rec   Key Null       Null     Freeze   Qdb
-    Region                                     Coll    Size  Size Subs       Coll Jnl on Error Rndwn
-    ----------------------------------------------------------------------------------------------------
-    <default>                                     0    4080   255 NEVER      Y    Y   DISABLED DISABLED
-                     Jnl File (def ext: .mjl)  Before  Buff      Alloc      Exten   AutoSwitch
-    ------------------------------------------------------------------------------------------
-    <default>        <based on DB file-spec>   Y       2308       2048       2048      8386560
-    Segment          Active              Acc Typ Block      Alloc Exten Options
-    ------------------------------------------------------------------------------
-    <default>          *                 BG  DYN  4096       5000 10000 GLOB =1000
-                                                                        LOCK = 40
-                                                                        RES  =   0
-                                                                        ENCR = OFF
-                                                                        MSLT =1024
-    <default>                            MM  DYN  4096       5000 10000 DEFER
-                                                                        LOCK = 40
-                                                                        MSLT =1024
-
-   This displays only the TEMPLATES section of the Global Directory.
-
-   GDE>SHOW -command
-   TEMPLATE -REGION -COLLATION_DEFAULT=0
-   TEMPLATE -REGION -NOINST_FREEZE_ON_ERROR
-   TEMPLATE -REGION -JOURNAL=(ALLOCATION=2048,AUTOSWITCHLIMIT=8386560,BEFORE_IMAGE,BUFFER_SIZE=2308,EXTENSION=2048)
-   TEMPLATE -REGION -KEY_SIZE=64
-   TEMPLATE -REGION -NULL_SUBSCRIPTS=NEVER
-   TEMPLATE -REGION -NOQDBRUNDOWN
-   TEMPLATE -REGION -RECORD_SIZE=256
-   TEMPLATE -REGION -STDNULLCOLL
-   !
-   TEMPLATE -REGION -NOJOURNAL
-   !
-   TEMPLATE -SEGMENT -ACCESS_METHOD=BG
-   TEMPLATE -SEGMENT -ALLOCATION=100
-   TEMPLATE -SEGMENT -BLOCK_SIZE=1024
-   TEMPLATE -SEGMENT -NOENCRYPTION_FLAG
-   TEMPLATE -SEGMENT -EXTENSION_COUNT=100
-   TEMPLATE -SEGMENT -GLOBAL_BUFFER_COUNT=1024
-   TEMPLATE -SEGMENT -LOCK_SPACE=40
-   TEMPLATE -SEGMENT -MUTEX_SLOTS=1024
-   TEMPLATE -SEGMENT -RESERVED_BYTES=0
-   !
-   TEMPLATE -SEGMENT -ACCESS_METHOD=MM
-   TEMPLATE -SEGMENT -ALLOCATION=100
-   TEMPLATE -SEGMENT -BLOCK_SIZE=1024
-   TEMPLATE -SEGMENT -DEFER
-   TEMPLATE -SEGMENT -NOENCRYPTION_FLAG
-   TEMPLATE -SEGMENT -EXTENSION_COUNT=100
-   TEMPLATE -SEGMENT -GLOBAL_BUFFER_COUNT=1024
-   TEMPLATE -SEGMENT -LOCK_SPACE=40
-   TEMPLATE -SEGMENT -MUTEX_SLOTS=1024
-   TEMPLATE -SEGMENT -RESERVED_BYTES=0
-   !
-   TEMPLATE -SEGMENT -ACCESS_METHOD=BG
-   !
-   DELETE -REGION DEFAULT
-   DELETE -SEGMENT DEFAULT
-   ADD -REGION AUSREG -DYNAMIC_SEGMENT=AUSSEG
-   ADD -REGION DEFAULT -DYNAMIC_SEGMENT=DEFAULT
-   ADD -REGION FRREG -DYNAMIC_SEGMENT=FRSEG
-   ADD -REGION POREG -DYNAMIC_SEGMENT=POSEG
-   ADD -REGION UKREG -DYNAMIC_SEGMENT=UKSEG
-   ADD -REGION USSALREG -DYNAMIC_SEGMENT=USSALSEG
-   ADD -REGION USSMZREG -DYNAMIC_SEGMENT=USSMZSEG
-   !
-   ADD -SEGMENT AUSSEG -FILE_NAME="AUS.dat"
-   ADD -SEGMENT DEFAULT -FILE_NAME="gtm.dat"
-   ADD -SEGMENT FRSEG -FILE_NAME="France.dat"
-   ADD -SEGMENT POSEG -FILE_NAME="Poland.dat"
-   ADD -SEGMENT UKSEG -FILE_NAME="UK.dat"
-   ADD -SEGMENT USSALSEG -FILE_NAME="USSAL.dat"
-   ADD -SEGMENT USSMZSEG -FILE_NAME="USSMZ.dat"
-   !
-   ADD -GBLNAME EURCentral -COLLATION=1
-   !
-   LOCKS -REGION=DEFAULT
-   ADD -NAME Australia -REGION=AUSREG
-   ADD -NAME EURCentral("Poland") -REGION=POREG
-   ADD -NAME EURWest("France") -REGION=FRREG
-   ADD -NAME EURWest("UK") -REGION=UKREG
-   ADD -NAME US("South","a":"m") -REGION=USSALREG
-   ADD -NAME US("South","m":"{") -REGION=USSMZREG
-   !
-
-   This command displays the GDE commands to recreate the spanning region
-   example described in the Introduction section.
-
 2 Template
    Template
 
@@ -1291,6 +1204,13 @@
 
    The maximum length is 31 alphanumeric characters.
 
+   -[NO]EPOCHTAPER
+
+   Tries to minimize epoch duration by reducing the number of buffers to
+   flush by GT.M and the file system (via an fsync()) as the epoch
+   (time-based or due to a journal file auto-switch) approaches. By default,
+   EPOCHTAPER is enabled.
+
    -K[EY_SIZE]=size in bytes
 
    Specifies the maximum size of keys, in bytes, which can be stored in the
@@ -1529,11 +1449,9 @@
 
           * MM supports NOBEFORE_IMAGE journaling only. GT.M issues an error
             if you use MM with BEFORE_IMAGE Journaling. MM also supports
-            MUPIP FORWARD -RECOVER and MUPIP JOURNAL -ROLLBACK with the
-            -RESYNC or -FETCHRESYNC qualifiers to generate lost and broken
-            transaction files. For more information, see the Journaling and
-            Replication chapters.
-          * MM does not support backward recovery/rollback.
+            MUPIP FORWARD RECOVER. MM does not support MUPIP JOURNAL RECOVER
+            -BACKWARD and only supports MUPIP JOURNAL ROLLBACK to generate
+            lost and broken transaction files.
           * Depending on your file system, MM may be an option when you need
             performance advantage in situations where the above restrictions
             are acceptable.
@@ -1561,9 +1479,6 @@
      * The maximum ALLOCATION is 1,040,187,392 blocks.
      * By default, GDE uses an ALLOCATION of 100 blocks.
      * The maximum size of a database file is 1,040,187,392(992Mi) blocks.
-     * Out of the requested allocation, GT.M always reserves 32 global
-       buffers for BG access method for read-only use to ensure that
-       non-dirty global buffers are always available.
      * The default ALLOCATION was chosen for initial development and
        experimentation with GT.M. Because file fragmentation impairs
        performance, make the initial allocation for production files and
@@ -1575,8 +1490,8 @@
 
    Specifies the size, in bytes, of each database block in the file system.
    The BLOCK_SIZE must be a multiple of 512. If the BLOCK_SIZE is not a
-   multiple of 512, GDE rounds off the BLOCK_SIZE to the next highest
-   multiple of 512 and issues a warning message.
+   multiple of 512, GDE rounds up the BLOCK_SIZE to the next highest multiple
+   of 512 and issues a warning message.
 
    If the specified BLOCK_SIZE is less than the minimum, GDE uses the minimum
    BLOCK_SIZE. If the specified BLOCK_SIZE is greater than the maximum, GDE
@@ -1618,6 +1533,20 @@
 
    By default, GDE uses a BLOCK_SIZE of 1024 bytes.
 
+   --[NO]DEFER_ALLOCATE
+
+   Determines whether MUPIP CREATE preallocates blocks on database creation,
+   and determines whether subsequent extensions also preallocate. The default
+   is DEFER_ALLOCATE. This provides an option to preallocate blocks from the
+   file system when creating or extending a database file; by default UNIX
+   file systems, and GT.M, use sparse (or lazy) allocation, which defers
+   actual allocation until blocks are first written. Failures to preallocate
+   space produce a PREALLOCATEFAIL error. On platforms where GT.M does not
+   support preallocation (HP-UX and Solaris), although GDE accepts
+   -NODEFER_ALLOCATE, MUPIP CREATE ignores it and sets the database file to
+   DEFER_ALLOCATE. On those platforms, any attempt to change this flag with
+   MUPIP SET produces a NODFRALLOCSUPP error.
+
    -[NO]ENcryption
 
    Specifies whether or not the database file for a segment is flagged for
@@ -1697,8 +1626,8 @@
 
    Because transaction processing can be involved in an update and a
    transaction is limited to half the GLOBAL_BUFFER_COUNT, the value for
-   GLOBAL_BUFFER_COUNT should therefore be at least twenty-six plus twice the
-   number of the blocks required by the largest global variable node in your
+   GLOBAL_BUFFER_COUNT should therefore be at least 32 plus twice the number
+   of the blocks required by the largest global variable node in your
    application.
 
    Generally, you should increase the number of GLOBAL_BUFFERs for production
@@ -1720,6 +1649,10 @@
    resulting from more global buffers will be more than offset by the
    dramatic slowdown that results from globals buffers that are "paged out."
 
+   Out of the requested allocation, GT.M always reserves 32 global buffers
+   for BG access method for read-only use to ensure that non-dirty global
+   buffers are always available.
+
    -L[OCK_SPACE]=integer
 
    Specifies the number of pages of space to use for the lock database stored
@@ -1760,8 +1693,7 @@
    slots to cover the maximum number of processes you expect to concurrently
    access the database file, as an insufficient number of slots can lead to
    much steeper and more severe degradation of performance under heavy loads.
-   The minimum is 1Ki and the maximum is 32Ki. The default of 1Ki should be
-   appropriate for most situations.
+   The minimum is 1Ki and the maximum is 32Ki.
 
    -R[ESERVED_BYTES]=size
 
@@ -2037,7 +1969,7 @@
 1 Copyright
    Copyright
 
-   Copyright 2014
+   Copyright 2015
 
    Fidelity National Information Services, Inc. and/or its subsidiaries. All
    rights reserved.
@@ -2059,7 +1991,7 @@
 
    **Note**
 
-   This help file is a concise representation of revision V6.2-001 of the
+   This help file is a concise representation of revision V6.2-002 of the
    UNIX Administration and Operations Guide. To obtain a copy of the current
    revision, go to www.fis-gtm.com and then click on the User Documentation
    tab.
diff --git a/sr_port/gdeinit.m b/sr_port/gdeinit.m
index 363c915..0e33df1 100644
--- a/sr_port/gdeinit.m
+++ b/sr_port/gdeinit.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2001, 2013 Fidelity Information Services, Inc	;
+; Copyright (c) 2001-2015 Fidelity National Information 	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -91,7 +92,7 @@ GDEINIT
 	;	SIZEOF("gd_segment")		; --> size of the "gd_segment" structure (defined in gdsfhead.h)
 	;
 	i (gtm64=FALSE) d
-	. s SIZEOF("am_offset")=328		; --> offset of "acc_meth" field in the "gd_segment" structure
+	. s SIZEOF("am_offset")=332		; --> offset of "acc_meth" field in the "gd_segment" structure
 	. s SIZEOF("file_spec")=256		; --> maximum size (in bytes) of a file name specified in gde command line
 	. s SIZEOF("gd_header")=16		; --> 16-byte header structure at offset 0 of .gld (12 byte label, 4-byte filesize)
 	. s SIZEOF("gd_contents")=76		; --> size of the "gd_addr" structure (defined in gdsfhead.h)
@@ -99,13 +100,13 @@ GDEINIT
 	. if ver'="VMS" d
 	. . s SIZEOF("gd_region")=372		; --> size of the "gd_region"  structure (defined in gdsfhead.h)
 	. . s SIZEOF("gd_region_padding")=0	; --> padding at end of "gd_region" structure (4-bytes for 64-bit platforms)
-	. . s SIZEOF("gd_segment")=360		; --> size of the "gd_segment" structure (defined in gdsfhead.h)
+	. . s SIZEOF("gd_segment")=364		; --> size of the "gd_segment" structure (defined in gdsfhead.h)
 	. e  d
 	. . s SIZEOF("gd_region")=348		; --> size of the "gd_region"  structure (defined in gdsfhead.h)
 	. . ; SIZEOF("gd_region_padding")	 is not used in VMS
 	. . s SIZEOF("gd_segment")=356		; --> size of the "gd_segment" structure (defined in gdsfhead.h)
 	e  d
-	. s SIZEOF("am_offset")=336		; --> offset of "acc_meth" field in the "gd_segment" structure
+	. s SIZEOF("am_offset")=340		; --> offset of "acc_meth" field in the "gd_segment" structure
 	. s SIZEOF("file_spec")=256		; --> maximum size (in bytes) of a file name specified in gde command line
 	. s SIZEOF("gd_header")=16		; --> 16-byte header structure at offset 0 of .gld (12 byte label, 4-byte filesize)
 	. s SIZEOF("gd_contents")=112		; --> size of the "gd_addr" structure (defined in gdsfhead.h)
@@ -172,6 +173,7 @@ GDEINIT
 	. s minreg("INST_FREEZE_ON_ERROR")=0
 	. s minreg("BUFFER_SIZE")=2307
 	. s minreg("QDBRUNDOWN")=0
+	. s minreg("EPOCHTAPER")=0
 	. s minreg("RECORD_SIZE")=0
 	e  d
 	. s minreg("RECORD_SIZE")=SIZEOF("rec_hdr")+4
@@ -192,6 +194,7 @@ GDEINIT
 	. s maxreg("INST_FREEZE_ON_ERROR")=1
 	. s maxreg("BUFFER_SIZE")=32768
 	. s maxreg("QDBRUNDOWN")=1
+	. s maxreg("EPOCHTAPER")=1
 	. s maxreg("KEY_SIZE")=1019	; = max value of KEY->end that returns TRUE for CAN_APPEND_HIDDEN_SUBS(KEY) in gdsfhead.h
 	s maxreg("JOURNAL")=1,maxreg("NULL_SUBSCRIPTS")=2
 	s maxreg("RECORD_SIZE")=SIZEOF("max_str")
@@ -231,6 +234,7 @@ GDEINIT
 	s defseg("ALLOCATION")=100
 	s defseg("BLOCK_SIZE")=1024
 	s defseg("BUCKET_SIZE")=""
+	s defseg("DEFER_ALLOCATE")=1
 	s defseg("EXTENSION_COUNT")=100
 	s defseg("FILE_TYPE")="DYNAMIC"
 	s defseg("MUTEX_SLOTS")=1024 ; keep this in sync with DEFAULT_NUM_CRIT_ENTRY in gdsbt.h
@@ -256,6 +260,7 @@ syntabi:
 	s syntab("ADD","REGION","STDNULLCOLL")="NEGATABLE"
 	s syntab("ADD","REGION","DYNAMIC_SEGMENT")="REQUIRED"
 	s syntab("ADD","REGION","DYNAMIC_SEGMENT","TYPE")="TSEGMENT"
+	i ver'="VMS" s syntab("ADD","REGION","EPOCHTAPER")="NEGATABLE"
 	i ver'="VMS" s syntab("ADD","REGION","INST_FREEZE_ON_ERROR")="NEGATABLE"
 	s syntab("ADD","REGION","JOURNAL")="NEGATABLE,REQUIRED,LIST"
 	s syntab("ADD","REGION","JOURNAL","ALLOCATION")="REQUIRED"
@@ -286,6 +291,7 @@ syntabi:
 	s syntab("ADD","SEGMENT","BUCKET_SIZE")="REQUIRED"
 	s syntab("ADD","SEGMENT","BUCKET_SIZE","TYPE")="TNUMBER"
 	s syntab("ADD","SEGMENT","DEFER")="NEGATABLE"
+	s syntab("ADD","SEGMENT","DEFER_ALLOCATE")="NEGATABLE"
  	i ver'="VMS" s syntab("ADD","SEGMENT","ENCRYPTION_FLAG")="NEGATABLE"
 	s syntab("ADD","SEGMENT","EXTENSION_COUNT")="REQUIRED"
 	s syntab("ADD","SEGMENT","EXTENSION_COUNT","TYPE")="TNUMBER"
@@ -313,6 +319,7 @@ syntabi:
 	s syntab("CHANGE","REGION","STDNULLCOLL")="NEGATABLE"
 	s syntab("CHANGE","REGION","DYNAMIC_SEGMENT")="REQUIRED"
 	s syntab("CHANGE","REGION","DYNAMIC_SEGMENT","TYPE")="TSEGMENT"
+	i ver'="VMS" s syntab("CHANGE","REGION","EPOCHTAPER")="NEGATABLE"
 	i ver'="VMS" s syntab("CHANGE","REGION","INST_FREEZE_ON_ERROR")="NEGATABLE"
 	s syntab("CHANGE","REGION","JOURNAL")="NEGATABLE,REQUIRED,LIST"
 	s syntab("CHANGE","REGION","JOURNAL","ALLOCATION")="REQUIRED"
@@ -343,6 +350,7 @@ syntabi:
 	s syntab("CHANGE","SEGMENT","BUCKET_SIZE")="REQUIRED"
 	s syntab("CHANGE","SEGMENT","BUCKET_SIZE","TYPE")="TNUMBER"
 	s syntab("CHANGE","SEGMENT","DEFER")="NEGATABLE"
+	s syntab("CHANGE","SEGMENT","DEFER_ALLOCATE")="NEGATABLE"
 	i ver'="VMS" s syntab("CHANGE","SEGMENT","ENCRYPTION_FLAG")="NEGATABLE"
 	s syntab("CHANGE","SEGMENT","EXTENSION_COUNT")="REQUIRED"
 	s syntab("CHANGE","SEGMENT","EXTENSION_COUNT","TYPE")="TNUMBER"
@@ -374,6 +382,7 @@ syntabi:
 	s syntab("TEMPLATE","REGION","JOURNAL","BUFFER_SIZE")="REQUIRED"
 	s syntab("TEMPLATE","REGION","JOURNAL","BUFFER_SIZE","TYPE")="TNUMBER"
 	s syntab("TEMPLATE","REGION","JOURNAL","BEFORE_IMAGE")="NEGATABLE"
+	i ver'="VMS" s syntab("TEMPLATE","REGION","EPOCHTAPER")="NEGATABLE"
 	s syntab("TEMPLATE","REGION","JOURNAL","EXTENSION")="REQUIRED"
 	s syntab("TEMPLATE","REGION","JOURNAL","EXTENSION","TYPE")="TNUMBER"
 	s syntab("TEMPLATE","REGION","JOURNAL","FILE_NAME")="REQUIRED"
@@ -395,6 +404,7 @@ syntabi:
 	s syntab("TEMPLATE","SEGMENT","BUCKET_SIZE")="REQUIRED"
 	s syntab("TEMPLATE","SEGMENT","BUCKET_SIZE","TYPE")="TNUMBER"
 	s syntab("TEMPLATE","SEGMENT","DEFER")="NEGATABLE"
+	s syntab("TEMPLATE","SEGMENT","DEFER_ALLOCATE")="NEGATABLE"
 	i ver'="VMS" s syntab("TEMPLATE","SEGMENT","ENCRYPTION_FLAG")="NEGATABLE"
 	s syntab("TEMPLATE","SEGMENT","EXTENSION_COUNT")="REQUIRED"
 	s syntab("TEMPLATE","SEGMENT","EXTENSION_COUNT","TYPE")="TNUMBER"
@@ -468,8 +478,8 @@ VMS
 	q
 
 UNIX:
-	s hdrlab="GTCGBDUNX009"         ; must be concurrently maintained in gbldirnam.h!!!
-	i (gtm64=TRUE) s hdrlab="GTCGBDUNX109" ; the high order digit is a 64-bit flag
+	s hdrlab="GTCGBDUNX010"         ; must be concurrently maintained in gbldirnam.h!!!
+	i (gtm64=TRUE) s hdrlab="GTCGBDUNX110" ; the high order digit is a 64-bit flag
 	s tfile="$gtmgbldir"
 	s accmeth="\BG\MM"
 	s helpfile="$gtm_dist/gdehelp.gld"
diff --git a/sr_port/gdeshow.m b/sr_port/gdeshow.m
index 28e3b86..f8afdff 100644
--- a/sr_port/gdeshow.m
+++ b/sr_port/gdeshow.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2001, 2014 Fidelity Information Services, Inc	;
+; Copyright (c) 2001-2015 Fidelity National Information 	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -126,6 +127,7 @@ onereg:
 	w ?x(8),$s(regs(s,"JOURNAL"):"Y",1:"N")
 	i ver'="VMS" w ?x(9),$s(regs(s,"INST_FREEZE_ON_ERROR"):"ENABLED",1:"DISABLED")
 	i ver'="VMS" w ?x(10),$s(regs(s,"QDBRUNDOWN"):"ENABLED",1:"DISABLED")
+	i ver'="VMS" w ?x(11),$s(regs(s,"EPOCHTAPER"):"ENABLED",1:"DISABLED")
 	q
 onejnl:
 	w !,BOL,?x(1),s,?x(2),$s($zl(regs(s,"FILE_NAME")):$$namedisp(regs(s,"FILE_NAME"),1),1:"<based on DB file-spec>")
@@ -215,12 +217,14 @@ BG	w ?x(8),"GLOB=",$j(segs(s,"GLOBAL_BUFFER_COUNT"),4)
 	; For non-encryption platforms, always show FLAG as OFF. For VMS dont even display this line
 	i $ZVersion'["VMS" w !,BOL,?x(8),"ENCR=",$S((encsupportedplat=TRUE&segs(s,"ENCRYPTION_FLAG")):"ON",1:"OFF")
 	w !,BOL,?x(8),"MSLT=",$j(segs(s,"MUTEX_SLOTS"),4)
+	w !,BOL,?x(8),"DALL=",$s(segs(s,"DEFER_ALLOCATE"):"YES",1:"NO")
 	q
 MM	w ?x(8),$s(segs(s,"DEFER"):"DEFER",1:"NODEFER")
 	w !,BOL,?x(8),"LOCK=",$j(segs(s,"LOCK_SPACE"),4)
 	w !,BOL,?x(8),"RES =",$j(segs(s,"RESERVED_BYTES"),4)
 	i $ZVersion'["VMS" w !,BOL,?x(8),"ENCR=OFF"
 	w !,BOL,?x(8),"MSLT=",$j(segs(s,"MUTEX_SLOTS"),4)
+	w !,BOL,?x(8),"DALL=",$s(segs(s,"DEFER_ALLOCATE"):"YES",1:"NO")
 	q
 segmentc:
 	n s,q,val,synval,tmpval,type,am
@@ -286,6 +290,7 @@ t1:	d tmpreghd
 	w ?x(8),$s(tmpreg("JOURNAL"):"Y",1:"N")
 	i ver'="VMS" w ?x(9),$s(tmpreg("INST_FREEZE_ON_ERROR"):"ENABLED",1:"DISABLED")
 	i ver'="VMS" w ?x(10),$s(tmpreg("QDBRUNDOWN"):"ENABLED",1:"DISABLED")
+	i ver'="VMS" w ?x(11),$s(tmpreg("EPOCHTAPER"):"ENABLED",1:"DISABLED")
 	i tmpreg("JOURNAL") d tmpjnlhd,tmpjnlbd
 	d tmpseghd
 	w !,BOL,?x(1),"<default>",?x(2),$s(tmpacc="BG":"  *",1:""),?x(3),"BG"
@@ -296,12 +301,14 @@ t1:	d tmpreghd
 	w !,BOL,?x(8),"RES  =",$j(tmpseg("BG","RESERVED_BYTES"),4)
 	i $ZVersion'["VMS" w !,BOL,?x(8),"ENCR = ",$s((encsupportedplat=TRUE&tmpseg("BG","ENCRYPTION_FLAG")):"ON",1:"OFF")
 	w !,BOL,?x(8),"MSLT =",$j(tmpseg("BG","MUTEX_SLOTS"),4)
+	w !,BOL,?x(8),"DALL=",$s(tmpseg("BG","DEFER_ALLOCATE"):"YES",1:"NO")
 	w !,BOL,?x(1),"<default>",?x(2),$s(tmpacc="MM":"   *",1:""),?x(3),"MM"
 	w ?x(4),$s(tmpseg("MM","FILE_TYPE")="DYNAMIC":"DYN",1:"STA"),?x(5),$j(tmpseg("MM","BLOCK_SIZE"),5)
 	w ?x(6),$j(tmpseg("MM","ALLOCATION"),10),?x(7),$j(tmpseg("MM","EXTENSION_COUNT"),5)
 	w ?x(8),$s(tmpseg("MM","DEFER"):"DEFER",1:"NODEFER")
 	w !,BOL,?x(8),"LOCK =",$j(tmpseg("MM","LOCK_SPACE"),3)
 	w !,BOL,?x(8),"MSLT =",$j(tmpseg("MM","MUTEX_SLOTS"),3)
+	w !,BOL,?x(8),"DALL=",$s(tmpseg("MM","DEFER_ALLOCATE"):"YES",1:"NO")
 	q
 tmpjnlbd:
 	w !,BOL,?x(1),"<default>",?x(2),$s($zl(tmpreg("FILE_NAME")):$$namedisp(tmpreg("FILE_NAME"),1),1:"<based on DB file-spec>")
@@ -416,7 +423,7 @@ gblnamehd:
 	q
 regionhd:
 	s x(0)=32,x(1)=1,x(2)=33,x(3)=65,x(4)=71
-	i ver'="VMS" s x(5)=79,x(6)=85,x(7)=96,x(8)=101,x(9)=105,x(10)=114
+	i ver'="VMS" s x(5)=79,x(6)=85,x(7)=96,x(8)=101,x(9)=105,x(10)=114,x(11)=123
 	e  s x(5)=77,x(6)=83,x(7)=94,x(8)=104
 	w !,BOL,!,BOL,?x(0),"*** REGIONS ***"
 	w !,BOL,?x(7),"Std"
@@ -427,6 +434,7 @@ regionhd:
 	w ?x(5),$j("Key",5),?x(6),"Null",?x(7),"Null"
 	i ver'="VMS" w ?x(9),"Freeze"
 	i ver'="VMS" w ?x(10),"Qdb"
+	i ver'="VMS" w ?x(11),"Epoch"
 	w !,BOL,?x(1),"Region",?x(2),"Segment",?x(3),$j("Coll",4)
 	if ver'="VMS" w ?x(4),$j("Size",7)
 	e  w ?x(4),$j("Size",5)
@@ -434,7 +442,8 @@ regionhd:
 	w ?x(6),"Subs",?x(7),"Coll",?x(8),"Jnl"
 	i ver'="VMS" w ?x(9),"on Error"
 	i ver'="VMS" w ?x(10),"Rndwn"
-	i ver'="VMS" w !,BOL,?x(1),$tr($j("",122)," ","-")
+	i ver'="VMS" w ?x(11),"Taper"
+	i ver'="VMS" w !,BOL,?x(1),$tr($j("",130)," ","-")
 	e  w !,BOL,?x(1),$tr($j("",107)," ","-")
 	q
 jnlhd:
@@ -464,7 +473,7 @@ maphd:
 	q
 tmpreghd:
 	s x(0)=31,x(1)=1,x(2)=19,x(3)=44,x(4)=49
-	i ver'="VMS" s x(5)=57,x(6)=63,x(7)=74,x(8)=79,x(9)=83,x(10)=92
+	i ver'="VMS" s x(5)=57,x(6)=63,x(7)=74,x(8)=79,x(9)=83,x(10)=92,x(11)=101
 	e  s x(5)=55,x(6)=61,x(7)=72,x(8)=82
 	w !,BOL,!,BOL,?x(0),"*** TEMPLATES ***"
 	w !,BOL,?x(7),"Std"
@@ -475,6 +484,7 @@ tmpreghd:
 	w ?x(5),$j("Key",5),?x(6),"Null",?x(7),"Null"
 	i ver'="VMS" w ?x(9),"Freeze"
 	i ver'="VMS" w ?x(10),"Qdb"
+	i ver'="VMS" w ?x(11),"Epoch"
 	w !,BOL,?x(1),"Region",?x(3),$j("Coll",4)
 	i ver'="VMS" w ?x(4),$j("Size",7)
 	e  w ?x(4),$j("Size",5)
@@ -482,7 +492,8 @@ tmpreghd:
 	w ?x(6),"Subs",?x(7),"Coll",?x(8),"Jnl"
 	i ver'="VMS" w ?x(9),"on Error"
 	i ver'="VMS" w ?x(10),"Rndwn"
-	i ver'="VMS" w !,BOL,?x(1),$tr($j("",100)," ","-")
+	i ver'="VMS" w ?x(11),"Taper"
+	i ver'="VMS" w !,BOL,?x(1),$tr($j("",107)," ","-")
 	e  w !,BOL,?x(1),$tr($j("",85)," ","-")
 	q
 tmpjnlhd:
diff --git a/sr_port/gdsbt.h b/sr_port/gdsbt.h
index 7d22808..495a4f9 100644
--- a/sr_port/gdsbt.h
+++ b/sr_port/gdsbt.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -426,7 +427,10 @@ typedef struct node_local_struct
 	boolean_t	fake_db_enospc;		/* used only by dbg versions to simulate ENOSPC scenarios in the database file */
 	boolean_t	fake_jnl_enospc;	/* used only by dbg versions to simulate ENOSPC scenarios in the journal  file */
 	boolean_t	doing_epoch;		/* set when performing an epoch */
-	NON_GTM64_ONLY(int4 filler_8byte_align1;) /* 8-byte align the stucture on 32-bit platforms; 64s do it implicitly */
+	uint4		epoch_taper_start_dbuffs; /* wcs_active_lvl at start of taper */
+	boolean_t	epoch_taper_need_fsync;
+	/* when needed (un)comment the line below to 8-byte align the structure on 32-bit platforms; 64s do it implicitly */
+	NON_GTM64_ONLY(int4 filler_8byte_align1;)
 #	endif
 } node_local;
 
@@ -617,6 +621,77 @@ typedef struct node_local_struct
 		NUM_CRIT_ENTRY(CSD) = DEFAULT_NUM_CRIT_ENTRY;									\
 }
 
+#define ETGENTLE  2
+#define ETSLOW    8
+#define ETQUICK   16
+#define ETFAST    64
+#define EPOCH_TAPER_TIME_PCT_DEFAULT 32
+#define EPOCH_TAPER_JNL_PCT_DEFAULT 13
+
+#define EPOCH_TAPER_IF_NEEDED(CSA, CSD, CNL, REG, DO_FSYNC, BUFFS_PER_FLUSH, FLUSH_TARGET)					\
+{																\
+	jnl_tm_t		now;												\
+	uint4			epoch_vector, jnl_autoswitchlimit, jnl_space_remaining, jnl_space_taper_interval;		\
+	uint4			next_epoch_time, relative_overall_taper, relative_space_taper, relative_time_taper;		\
+	uint4			time_taper_interval, tmp_epoch_taper_start_dbuffs;						\
+	int4			time_remaining;											\
+	jnl_buffer_ptr_t 	etjb; 												\
+	etjb = CSA->jnl->jnl_buff;												\
+	/* Determine if we are in the time-based epoch taper */									\
+	relative_time_taper = 0;												\
+	JNL_SHORT_TIME(now);													\
+	next_epoch_time = etjb->next_epoch_time;										\
+	if (next_epoch_time > now) /* if no db updates next_epoch_time can be in the past */					\
+	{															\
+		time_remaining = next_epoch_time - now;										\
+		/* taper during last epoch_taper_time_pct of interval */							\
+		time_taper_interval = etjb->epoch_interval * CSD->epoch_taper_time_pct / 128;					\
+		if (time_remaining < time_taper_interval)									\
+			relative_time_taper = MAX(MIN(129 - ((time_remaining * 128) / time_taper_interval), 128), 0);		\
+	}															\
+	/* Determine if we are in the journal autoswitch (space-based) epoch taper) */						\
+	relative_space_taper = 0;												\
+	jnl_autoswitchlimit = CSD->autoswitchlimit;										\
+	jnl_space_remaining = MAX(1,jnl_autoswitchlimit - (etjb->dskaddr / DISK_BLOCK_SIZE));					\
+	jnl_space_taper_interval = (jnl_autoswitchlimit * CSD->epoch_taper_jnl_pct) / 128;					\
+	if (jnl_space_remaining < jnl_space_taper_interval)									\
+		relative_space_taper = MAX(MIN(129 - ((jnl_space_remaining * 128) / jnl_space_taper_interval), 128), 0);	\
+	relative_overall_taper =  MAX(relative_time_taper, relative_space_taper);						\
+	if (relative_overall_taper)												\
+	{															\
+		/* This starting point only needs to be approximate so no locking is needed */					\
+		if (0 == CNL->epoch_taper_start_dbuffs)										\
+			CNL->epoch_taper_start_dbuffs = CNL->wcs_active_lvl;							\
+		tmp_epoch_taper_start_dbuffs = CNL->epoch_taper_start_dbuffs; /* get same value for all calculations */		\
+		if ((relative_overall_taper > 64) && (relative_overall_taper < 96)) 						\
+			CNL->epoch_taper_need_fsync = TRUE;									\
+		if (DO_FSYNC && (relative_overall_taper > 75) && CNL->epoch_taper_need_fsync)					\
+		{														\
+			CNL->epoch_taper_need_fsync = FALSE;									\
+			fsync(FILE_INFO(REG)->fd);										\
+		}														\
+		FLUSH_TARGET = MIN(tmp_epoch_taper_start_dbuffs, MAX(1,(tmp_epoch_taper_start_dbuffs *				\
+				(129 - relative_overall_taper)) / 128));							\
+		if (CNL->wcs_active_lvl > flush_target)										\
+		{														\
+			if (relative_overall_taper > 96)									\
+				epoch_vector =											\
+					(((CNL->wcs_active_lvl - flush_target) * 128 / flush_target) > 64) ? ETFAST : ETQUICK;	\
+			else if (relative_overall_taper > 64)									\
+				epoch_vector =											\
+					(((CNL->wcs_active_lvl - flush_target) * 128 / flush_target) > 64) ? ETQUICK : ETSLOW;	\
+			else													\
+				epoch_vector = (relative_overall_taper > 32) ? ETSLOW : ETGENTLE;				\
+			BUFFS_PER_FLUSH = CSD->n_wrt_per_flu * epoch_vector;							\
+		}														\
+	}															\
+	else															\
+	{															\
+		CNL->epoch_taper_start_dbuffs = 0;										\
+		CNL->epoch_taper_need_fsync = FALSE;										\
+	}															\
+}
+
 /* Define pointer types for above structures that may be in shared memory and need 64
    bit pointers. */
 #ifdef DB64
diff --git a/sr_port/gdscc.h b/sr_port/gdscc.h
index 1878ad2..7d1cb25 100644
--- a/sr_port/gdscc.h
+++ b/sr_port/gdscc.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -36,7 +37,7 @@
 
 /* The following defines the write_type for a block that is going to be updated.
  * GDS_WRITE_PLAIN is the default type for most updates.
- * GDS_WRITE_BLOCK_SPLIT is set in case of a block update due to a block split. It is currently not used anywhere in the code.
+ * GDS_WRITE_BLOCK_SPLIT is set in case of a block update due to a block split.
  * GDS_WRITE_KILLTN requires a little more explanation.
  *
  * The TP commit logic ("tp_tend") makes use of an optimization referred to as the "indexmod" optimization.
diff --git a/sr_port/gdsdbver.h b/sr_port/gdsdbver.h
index beb0301..b1fba13 100644
--- a/sr_port/gdsdbver.h
+++ b/sr_port/gdsdbver.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -70,6 +71,7 @@ enum mdb_ver
 	GDSMV60001,
 	GDSMV60002,	/* New field mutex_spin_parms.mutex_que_entry_space_size for configurable mutex queue size */
 	GDSMV62001,	/* New field hasht_upgrade_needed for ^#t upgrade */
+	GDSMV62002,	/* New field defer_allocate needed for database file preallocation and ^#t upgrade */
 	GDSMVLAST
 };
 #define GDSMVCURR ((enum mdb_ver)(GDSMVLAST - 1))
diff --git a/sr_port/gdsfhead.h b/sr_port/gdsfhead.h
index 99fe5fa..b433c64 100644
--- a/sr_port/gdsfhead.h
+++ b/sr_port/gdsfhead.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -273,9 +274,10 @@ gtm_uint64_t verify_queue(que_head_ptr_t qhdr);
 }
 #endif
 
-/* If reallocating gv_currkey/gv_altkey, preserve pre-existing values */
 #define	GVKEY_INIT(GVKEY, KEYSIZE)						\
 {										\
+	GBLREF gv_key	*gv_altkey;						\
+	GBLREF gv_key	*gv_currkey;						\
 	gv_key		*new_KEY, *old_KEY;					\
 	int4		keySZ;							\
 										\
@@ -286,7 +288,8 @@ gtm_uint64_t verify_queue(que_head_ptr_t qhdr);
 	 */									\
 	assert(ROUND_UP2(keySZ, 4) == keySZ);					\
 	new_KEY = (gv_key *)malloc(SIZEOF(gv_key) - 1 + keySZ);			\
-	assert(DBKEYSIZE(MAX_KEY_SZ) == KEYSIZE);				\
+	assert((DBKEYSIZE(MAX_KEY_SZ) == KEYSIZE)				\
+		|| ((GVKEY != gv_currkey) && (GVKEY != gv_altkey)));		\
 	if (NULL != old_KEY)							\
 	{									\
 		assert(FALSE);	/* dont call GVKEY_INIT twice for same key */	\
@@ -1736,11 +1739,14 @@ typedef struct sgmnt_data_struct
 						 *	>0 => defer_time * flush_time[0] is actual defer time
 						 * default value = 1 => a write-timer every csd->flush_time[0] seconds
 						 */
-        volatile boolean_t filler_wc_blocked;	/* Now moved to node_local */
+	volatile boolean_t filler_wc_blocked;	/* Now moved to node_local */
 	boolean_t	mumps_can_bypass;	/* Allow mumps processes to bypass flushing, access control, and ftok semaphore
 						 * in gds_rundown(). This was done to improve shutdown performance.
 						 */
-	char		filler_512[16];
+	boolean_t	epoch_taper;		/* Should GT.M try to reduce dirty buffers as epoch approach */
+	uint4		epoch_taper_time_pct;	/* in the last pct we start tapering for time */
+	uint4		epoch_taper_jnl_pct;	/* in the last pct we start tapering for jnl */
+	char		filler_512[4];
 	/************* FIELDS Used for update process performance improvement. Some may go away in later releases ********/
 	uint4		reserved_for_upd;	/* Percentage (%) of blocks reserved for update process disk read */
 	uint4		avg_blks_per_100gbl;	/* Number of blocks read on average for 100 global key read */
@@ -1903,7 +1909,8 @@ typedef struct sgmnt_data_struct
 	boolean_t	span_node_absent;	/* Database does not contain the spanning node */
 	boolean_t	maxkeysz_assured;	/* All the keys in the database are less than MAX_KEY_SIZE */
 	boolean_t	hasht_upgrade_needed;	/* ^#t global needs to be upgraded from V62000 to post-V62000 format */
-	char		filler_7k[720];
+	boolean_t	defer_allocate;		/* If FALSE: Use fallocate() preallocate space from the disk */
+	char		filler_7k[716];
 	char		filler_8k[1024];
 	/********************************************************/
 	/* Master bitmap immediately follows. Tells whether the local bitmaps have any free blocks or not. */
@@ -2078,6 +2085,7 @@ typedef struct	gd_segment_struct
 	uint4			global_buffers;	/* Was passed in FAB */
 	uint4			reserved_bytes;	/* number of bytes to be left in every database block */
 	uint4			mutex_slots;	/* copied over to NUM_CRIT_ENTRY(CSD) */
+	boolean_t		defer_allocate; /* If FALSE: Use fallocate() preallocate space from the disk */
 	enum db_acc_method	acc_meth;
 	file_control		*file_cntl;
 	struct gd_region_struct	*repl_list;
@@ -2143,7 +2151,8 @@ typedef struct	gd_region_struct
 	int4			node;
 	int4			sec_size;
 	uint4			is_spanned;	/* this is one of the regions that some spanning global maps to */
-	char			filler[12];	/* filler to store runtime structures without changing gdeget/gdeput.m */
+	bool			epoch_taper;
+	char			filler[11];	/* filler to store runtime structures without changing gdeget/gdeput.m */
 } gd_region;
 
 typedef struct	sgmnt_addrs_struct
@@ -2556,10 +2565,12 @@ typedef struct	gv_namehead_struct
 	trans_num	read_local_tn;			/* local_tn of last reference for this global */
 	GTMTRIG_ONLY(trans_num trig_local_tn;)		/* local_tn of last trigger driven for this global */
 	GTMTRIG_ONLY(trans_num trig_read_tn;)		/* local_tn when triggers for this global (^#t records) were read from db */
+	gv_key		*prev_key;			/* Points to fully expanded previous key. Used by $zprevious.
+							 * Valid only if clue->end is non-zero.
+							 */
 	boolean_t	noisolation;     		/* whether isolation is turned on or off for this global */
 	block_id	root;				/* Root of global variable tree */
 	mname_entry	gvname;				/* the name of the global */
-	NON_GTM64_ONLY(uint4	filler_8byte_align1;)	/* for 8-byte alignment of "hist" member */
 	srch_hist	hist;				/* block history array */
 	int4		regcnt;				/* number of global directories whose hash-tables point to this gv_target.
 							 * 1 by default. > 1 if the same name in TWO DIFFERENT global directories
@@ -2577,7 +2588,7 @@ typedef struct	gv_namehead_struct
 							 */
 	boolean_t	split_cleanup_needed;
 	char		last_split_direction[MAX_BT_DEPTH - 1];	/* maintain last split direction for each level in the GVT */
-	char		filler_8byte_align2[6];
+	char		filler_8byte_align1[6];
 	block_id	last_split_blk_num[MAX_BT_DEPTH - 1];
 #	ifdef GTM_TRIGGER
 	struct gvt_trigger_struct *gvt_trigger;		/* pointer to trigger info for this global
@@ -2588,7 +2599,7 @@ typedef struct	gv_namehead_struct
 							 * last read/initialized from ^#t global (in gvtr_init) */
 	boolean_t	trig_mismatch_test_done;	/* whether update process has checked once if there is a mismatch
 							 * in trigger definitions between originating and replicating instance */
-	GTM64_ONLY(uint4 filler_8byte_align3;)		/* for 8-byte alignment of "clue" member. (targ_alloc relies on this) */
+	GTM64_ONLY(uint4 filler_8byte_align2;)		/* for 8-byte alignment of "clue" member. (targ_alloc relies on this) */
 #	endif
 	gv_key		clue;				/* Clue key, must be last in namehead struct because of hung buffer. */
 } gv_namehead;
@@ -2956,11 +2967,33 @@ GBLREF	gv_namehead	*gvt_tp_list;
 	assert(GVT->clue.top == GVT->first_rec->top);										\
 	assert(GVT->clue.top == GVT->last_rec->top);										\
 }
+
+/* Do checks on the integrity of GVKEY */
+#	define	DBG_CHECK_GVKEY_VALID(GVKEY)					\
+{										\
+	unsigned char	ch, prevch, *ptr, *pend;				\
+										\
+	assert(GVKEY->end < GVKEY->top);					\
+	ptr = &GVKEY->base[0];							\
+	pend = ptr + GVKEY->end;						\
+	assert(KEY_DELIMITER == *pend);						\
+	assert((ptr == pend) || (KEY_DELIMITER == *(pend - 1)));		\
+	prevch = KEY_DELIMITER;							\
+	while (ptr < pend)							\
+	{									\
+		ch = *ptr++;							\
+		assert((KEY_DELIMITER != prevch) || (KEY_DELIMITER != ch));	\
+		prevch = ch;							\
+	}									\
+	/* Do not check GVKEY->prev as it is usually not set. */		\
+}
+
 #else
 #	define	DBG_CHECK_IN_GVT_TP_LIST(gvt, present)
 #	define	DBG_CHECK_GVT_IN_GVTARGETLIST(gvt)
 #	define	DBG_CHECK_GVTARGET_GVCURRKEY_IN_SYNC(CHECK_CSADDRS)
 #	define	DBG_CHECK_GVTARGET_INTEGRITY(GVT)
+#	define	DBG_CHECK_GVKEY_VALID(GVKEY)
 #endif
 
 /* The below GBLREFs are for the following macro */
@@ -3056,38 +3089,69 @@ GBLREF	sgmnt_addrs	*cs_addrs;
 	}													\
 }
 
+#define	EXPAND_PREV_KEY_FALSE	FALSE
+#define	EXPAND_PREV_KEY_TRUE	TRUE
+
+/* Need a special value to indicate the prev_key was not computed in the last gvcst_search in a clue.
+ * Store an impossible keysize value as the key->end there. The below macro computes such a value.
+ */
+#define	PREV_KEY_NOT_COMPUTED	DBKEYSIZE(MAX_KEY_SZ)
+
+#define	COPY_PREV_KEY_TO_GVT_CLUE(GVT, EXPAND_PREV_KEY)							\
+{													\
+	GBLREF gv_key	*gv_altkey;									\
+													\
+	if (EXPAND_PREV_KEY)										\
+	{	/* gv_altkey has the previous key. Store it in clue for future clue-based searches */	\
+		if (NULL == GVT->prev_key)								\
+			GVKEY_INIT(GVT->prev_key, GVT->clue.top);					\
+		if (gv_altkey->end >= GVT->prev_key->top)						\
+		{											\
+			assert(FALSE);	/* this means we have GVSUBOFLOW integ error */			\
+			GVKEY_INIT(GVT->prev_key, DBKEYSIZE(gv_altkey->end));				\
+		}											\
+		COPY_KEY(GVT->prev_key, gv_altkey);							\
+	} else if (NULL != GVT->prev_key)								\
+	{												\
+		assert(PREV_KEY_NOT_COMPUTED < (1 << (SIZEOF(gv_altkey->end) * 8)));			\
+		GVT->prev_key->end = PREV_KEY_NOT_COMPUTED;						\
+	}												\
+}
+
 /* Copy GVKEY to GVT->CLUE. Take care NOT to copy cluekey->top to GVKEY->top as they correspond
  * to the allocation sizes of two different memory locations and should stay untouched.
  */
-#define	COPY_CURRKEY_TO_GVTARGET_CLUE(GVT, GVKEY)					\
-{											\
-	int	keyend;									\
-	DCL_THREADGBL_ACCESS;								\
-											\
-	SETUP_THREADGBL_ACCESS;								\
-	keyend = GVKEY->end;								\
-	if (GVT->clue.top <= keyend)							\
-	{	/* Possible only if GVT corresponds to a global that spans multiple	\
-		 * regions. For example, a gvcst_spr_* function could construct a	\
-		 * gv_currkey starting at one spanned region and might have to do a	\
-		 * gvcst_* operation on another spanned region with a max-key-size	\
-		 * that is smaller than gv_currkey->end. In that case, copy only the	\
-		 * portion of gv_currkey that will fit in the gvt of the target region.	\
-		 */									\
-		assert(TREF(spangbl_seen));						\
-		keyend = GVT->clue.top - 1;						\
-		memcpy(GVT->clue.base, GVKEY->base, keyend - 1);			\
-		GVT->clue.base[keyend - 1] = KEY_DELIMITER;				\
-		GVT->clue.base[keyend] = KEY_DELIMITER;					\
-	} else										\
-	{										\
-		assert(KEY_DELIMITER == GVKEY->base[keyend]);				\
-		assert(KEY_DELIMITER == GVKEY->base[keyend - 1]);			\
-		memcpy(GVT->clue.base, GVKEY->base, keyend + 1);			\
-	}										\
-	GVT->clue.end = keyend;								\
-	/* No need to maintain unused GVT->clue.prev */					\
-	DBG_CHECK_GVTARGET_INTEGRITY(GVT);						\
+#define	COPY_CURR_AND_PREV_KEY_TO_GVTARGET_CLUE(GVT, GVKEY, EXPAND_PREV_KEY)				\
+{													\
+	GBLREF gv_key	*gv_altkey;									\
+	int		keyend;										\
+	DCL_THREADGBL_ACCESS;										\
+													\
+	SETUP_THREADGBL_ACCESS;										\
+	keyend = GVKEY->end;										\
+	if (GVT->clue.top <= keyend)									\
+	{	/* Possible only if GVT corresponds to a global that spans multiple			\
+		 * regions. For example, a gvcst_spr_* function could construct a			\
+		 * gv_currkey starting at one spanned region and might have to do a			\
+		 * gvcst_* operation on another spanned region with a max-key-size			\
+		 * that is smaller than gv_currkey->end. In that case, copy only the			\
+		 * portion of gv_currkey that will fit in the gvt of the target region.			\
+		 */											\
+		assert(TREF(spangbl_seen));								\
+		keyend = GVT->clue.top - 1;								\
+		memcpy(GVT->clue.base, GVKEY->base, keyend - 1);					\
+		GVT->clue.base[keyend - 1] = KEY_DELIMITER;						\
+		GVT->clue.base[keyend] = KEY_DELIMITER;							\
+	} else												\
+	{												\
+		assert(KEY_DELIMITER == GVKEY->base[keyend]);						\
+		assert(KEY_DELIMITER == GVKEY->base[keyend - 1]);					\
+		memcpy(GVT->clue.base, GVKEY->base, keyend + 1);					\
+	}												\
+	GVT->clue.end = keyend;										\
+	/* No need to maintain unused GVT->clue.prev */							\
+	COPY_PREV_KEY_TO_GVT_CLUE(GVT, EXPAND_PREV_KEY);						\
+	DBG_CHECK_GVTARGET_INTEGRITY(GVT);								\
 }
 
 /* If SRC_KEY->end == 0, make sure to copy the first byte of SRC_KEY->base */
diff --git a/sr_port/genout.m b/sr_port/genout.m
index 4b4f589..5b303bf 100644
--- a/sr_port/genout.m
+++ b/sr_port/genout.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2001, 2007 Fidelity Information Services, Inc	;
+; Copyright (c) 2001, 2015 Fidelity National Information	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -9,18 +10,25 @@
 ;								;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 genout	;output the results
-	o outfile:newv u outfile
+	o outfile:newv
 	n knt
 	s knt=0
-	w "/****************************************************************",!
-	w " *",$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),"*",!
-	w " *",$c(9),"Copyright 2001, ",$Zdate($H,"YEAR")," Fidelity Information Services, Inc",$c(9),"*",!
-	w " *",$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),"*",!
-	w " *",$c(9),"This source code contains the intellectual property",$c(9),"*",!
-	w " *",$c(9),"of its copyright holder(s), and is made available",$c(9),"*",!
-	w " *",$c(9),"under a license.  If you do not know the terms of",$c(9),"*",!
-	w " *",$c(9),"the license, please stop and do not read further.",$c(9),"*",!
-	w " *",$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),$c(9),"*",!
+	s vms=$zversion["VMS"
+	i vms s cfile=$ztrnlnm("gtm$src")_"copyright.txt"
+	i 'vms s cfile=$ztrnlnm("gtm_tools")_"/copyright.txt"
+	s xxxx="2001"
+	s yyyy=$zdate($H,"YYYY")
+	o cfile:read
+	u outfile w "/****************************************************************",!
+	f i=1:1 u cfile r line q:$zeof  d
+	. i (1<$zl(line,"XXXX")) d
+	. . s str=$zpiece(line,"XXXX",1)_xxxx_$zpiece(line,"XXXX",2)
+	. . s str=$zpiece(str,"YYYY",1)_yyyy_$zpiece(str,"YYYY",2)
+	. e  d
+	. . s str=line
+	. u outfile w " *"_str_"*",!
+	c cfile
+	u outfile
 	w " ****************************************************************/",!!
 	f i="mdef.h","vxi.h","vxt.h","xfer_enum.h" w "#include """,i,"""",!
 	w "LITDEF short ttt[",ttt,"] = {",!
diff --git a/sr_port/glvn.c b/sr_port/glvn.c
index 0f1dd35..defe7eb 100644
--- a/sr_port/glvn.c
+++ b/sr_port/glvn.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,9 +21,9 @@ error_def(ERR_VAREXPECTED);
 
 int glvn(oprtype *a)
 {
-	triple		*oldchain, *ref;
 	oprtype		x1;
 	save_se		save_state;
+	triple		*oldchain, *ref;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
diff --git a/sr_port/gtm_fetch.c b/sr_port/gtm_fetch.c
index 35b69a2..703ad34 100644
--- a/sr_port/gtm_fetch.c
+++ b/sr_port/gtm_fetch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -58,6 +59,7 @@ void gtm_fetch(unsigned int indxarg, ...)
 
 	SETUP_THREADGBL_ACCESS;
 	assert(!process_exiting);	/* Verify that no process unwound the exit frame and continued */
+	assert(!TREF(expand_prev_key));	/* Verify that this global variable never stays TRUE outside of a $zprevious action */
 	DEBUG_ONLY(DBG_CHECK_GVTARGET_GVCURRKEY_IN_SYNC(CHECK_CSA_TRUE);) /* surrounding DEBUG_ONLY needed because gdsfhead.h is
 									   * not included for pro builds and so the macro and its
 									   * parameters would be undefined in that case causing a
diff --git a/sr_port/gtm_malloc_src.h b/sr_port/gtm_malloc_src.h
index 0236f0f..d245a5d 100644
--- a/sr_port/gtm_malloc_src.h
+++ b/sr_port/gtm_malloc_src.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -178,7 +179,8 @@
 #  define GMR_ONLY(statement)
 #  define NON_GMR_ONLY(statement) statement
 #endif
-#define MAXTWO 2048
+#define MAXBACKFILL (16 * 1024)			/* Maximum backfill of large structures */
+#define MAXTWO 2048				/* Maximum size we allocate from queues */
 /* How many "MAXTWO" elements to allocate at one time. This minimizes the waste since our subblocks must
  * be aligned on a suitable power of two boundary for the buddy-system to work properly.
  */
@@ -1257,6 +1259,7 @@ void backfill(unsigned char *ptr, gtm_msize_t len)
 
 	if (0 != len)
 	{
+		len = MIN(len, MAXBACKFILL);			/* Restrict backfill for performance */
 		/* Process unaligned portion first */
 		unalgnLen = (gtm_msize_t)ptr & AddrMask;	/* Past an alignment point */
 		if (unalgnLen)
@@ -1308,6 +1311,7 @@ boolean_t backfillChk(unsigned char *ptr, gtm_msize_t len)
 
 	if (0 != len)
 	{
+		len = MIN(len, MAXBACKFILL);			/* Restrict backfill check for performance */
 		/* Process unaligned portion first */
 		unalgnLen = (gtm_msize_t)ptr & AddrMask;	/* Past an alignment point */
 		if (unalgnLen)
diff --git a/sr_port/gtm_socket.h b/sr_port/gtm_socket.h
index b1c5839..107fd44 100644
--- a/sr_port/gtm_socket.h
+++ b/sr_port/gtm_socket.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -34,6 +35,17 @@ typedef struct sockaddr	*sockaddr_ptr;
 #define GTM_SOCKLEN_TYPE socklen_t
 #endif
 
+/* define macro on platforms to determine if it is an AF_UNIX domain socket problem with getsockname() */
+#if defined(__linux__) || defined(VMS)
+#  define IS_SOCKNAME_UNIXERROR(ERR)	(FALSE)
+#elif defined(AIX)
+#  define IS_SOCKNAME_UNIXERROR(ERR) 	((EOPNOTSUPP == ERR) || (ENOTCONN == ERR))
+#elif defined(__sun) || defined(__hpux)
+#  define IS_SOCKNAME_UNIXERROR(ERR) 	((EOPNOTSUPP == ERR) || (EINVAL == ERR))
+#else
+#  define IS_SOCKNAME_UNIXERROR(ERR) 	(EOPNOTSUPP == ERR)
+#endif
+
 #ifdef GTM_FD_TRACE
 /* Just like open and close were noted down in gtm_fcntl.h, note down all macros which we are redefining here and could
  * potentially have been conflictingly defined by the system header file "socket.h". The system define will be used
@@ -45,7 +57,7 @@ typedef struct sockaddr	*sockaddr_ptr;
 #endif
 
 int gtm_socket(int domain, int type, int protocol);
-int gtm_connect(int socket, struct sockaddr *address, size_t address_len);
+int gtm_connect(int socket, struct sockaddr *address, size_t address_len); /* BYPASSOK(connect) */
 
 #if defined(VMS) && !defined(_SS_PAD2SIZE)
 /* No sockaddr_storage on OpenVMS 7.2-1, but we only support AF_INET on VMS, so use sockaddr_in. */
diff --git a/sr_port/gtm_string.h b/sr_port/gtm_string.h
index c542726..9561a14 100644
--- a/sr_port/gtm_string.h
+++ b/sr_port/gtm_string.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -26,6 +27,8 @@
 /* Make sure that SIZEOF(SOURCE) > 0 or SOURCE != NULL before running. */
 #define	STRNCMP_LIT_FULL(SOURCE, LITERAL)	strncmp(SOURCE, LITERAL, SIZEOF(LITERAL))	/* BYPASSOK */
 #define	STRNCMP_STR(SOURCE, STRING, LEN) strncmp(SOURCE, STRING, LEN)
+/* Ensure that our uses of STRTOK and STRTOK_R are not called inside a timer handler */
+#define STRTOK_R(STR, DELIM, SAVE)	(DBG_ASSERT(FALSE == timer_in_handler) strtok_r(STR, DELIM, SAVE))
 /* We need to catch any memcpy() that is used when the source and target strings overlap in any fashion so we can change
  * them to a memmove. So in debug builds, assert fail if this is the case.
  */
diff --git a/sr_port/gtm_threadgbl.h b/sr_port/gtm_threadgbl.h
index 6e6ebe8..c6cdec6 100644
--- a/sr_port/gtm_threadgbl.h
+++ b/sr_port/gtm_threadgbl.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -42,6 +43,10 @@
  * IVFPTR		    - Used to invoke a function pointer.
  */
 
+/* Note - access can also be made from assembler code though the mechanism differs. See $gtm_tools/gtmthreadgblasm.m.txt for
+ * details.
+ */
+
 /* Declare local thread global anchor */
 #define DCL_THREADGBL_ACCESS	void 	*lcl_gtm_threadgbl
 
diff --git a/sr_port/gtm_threadgbl_defs.h b/sr_port/gtm_threadgbl_defs.h
index 231e386..a038a22 100644
--- a/sr_port/gtm_threadgbl_defs.h
+++ b/sr_port/gtm_threadgbl_defs.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -77,7 +78,7 @@ THREADGBLDEF(side_effect_handling,		int)				/* side effect handling in actuallis
 THREADGBLDEF(source_error_found,		int4)				/* flag to partially defer compiler error */
 THREADGBLDEF(temp_subs,				boolean_t)			/* flag temp storing of subscripts to preserve
 										 * current evaluation */
-THREADGBLDEF(trigger_compile,			boolean_t)			/* A trigger compilation is active */
+THREADGBLDEF(trigger_compile_and_link,		boolean_t)			/* A trigger compilation/link is active */
 THREADGBLDEF(window_ident,			mstr)				/* current scanner mident from advancewindow */
 THREADGBLDEF(window_mval,			mval)				/* current scanner mval from advancewindow */
 THREADGBLDEF(window_token,			char)				/* current scanner token from advancewindow */
@@ -201,6 +202,7 @@ THREADGBLDEF(tqread_nowait,			boolean_t)			/* avoid sleeping in t_qread if TRUE
 /* Miscellaneous */
 THREADGBLDEF(arlink_enabled,			boolean_t)			/* TRUE if any zroutines segment is autorelink
 										 * enabled. */
+THREADGBLDEF(arlink_loaded,			uint4)				/* Count of auto-relink enabled routines linked */
 THREADGBLDEF(collseq_list,			collseq *)			/* list of pointers to currently mapped collation
 										 * algorithms - since this seems only used in
 										 * collseq.c -seems more like a STATICDEF */
@@ -218,9 +220,10 @@ THREADGBLDEF(error_on_jnl_file_lost,		unsigned int)			/* controls error handling
 										 * VMS does not supports this and requires it to
 										 * be 0. */
 #ifdef UNIX
-THREADGBLDEF(fnzsearch_lv_vars,			lv_val *)			/* UNIX op_fnzsearch lv tree anchor */
-THREADGBLDEF(fnzsearch_sub_mval,		mval)				/* UNIX op_fnzsearch subscript constuctor */
-THREADGBLDEF(fnzsearch_nullsubs_sav,		int)				/* UNIX op_fnzsearch temp for null subs control */
+THREADGBLDEF(fnzsearch_lv_vars,			lv_val *)			/* op_fnzsearch lv tree anchor */
+THREADGBLDEF(fnzsearch_sub_mval,		mval)				/* op_fnzsearch subscript constuctor */
+THREADGBLDEF(fnzsearch_nullsubs_sav,		int)				/* op_fnzsearch temp for null subs control */
+THREADGBLDEF(fnzsearch_globbuf_ptr,		glob_t *)			/* op_fnzsearch temp for pointing to glob results */
 #endif
 THREADGBLDEF(glvn_pool_ptr,			glvn_pool *)			/* Pointer to the glvn pool */
 #if defined(UNIX) && defined(GTMDBGFLAGS_ENABLED)
@@ -247,9 +250,15 @@ THREADGBLDEF(in_zwrite,				boolean_t)			/* ZWrite is active */
 THREADGBLDEF(lab_lnr,				lnr_tabent **)			/* Passes address from op_rhd_ext to op_extcall etc.
 										 * Points into either lab_proxy or linkage table
 										 */
+THREADGBLDEF(jobexam_counter,			unsigned int)			/* How many times invoked $ZJOBEXAM() this proc */
+#ifdef AUTORELINK_SUPPORTED
+THREADGBLDEF(lnk_proxy,				lnk_tabent_proxy)		/* Proxy linkage table for rtnhdr/labtab args for
+										 * indirect calls */
+#else
 THREADGBLDEF(lab_proxy,				lab_tabent_proxy)		/* Placeholder storing lab_ln_ptr offset / lnr_adr
 										 * pointer and has_parms value, so they are
 										 * contiguous in memory */
+#endif
 #ifdef VMS
 THREADGBLDEF(lbl_tbl_entry_index,		int)				/* Index of currently compiled label table entry */
 THREADGBLAR1DEF(login_time,			int4,		2)		/* */
@@ -292,6 +301,10 @@ THREADGBLDEF(pipefifo_interrupt,		int)				/* count of number of times a pipe or
 #endif
 THREADGBLDEF(prof_fp,				mprof_stack_frame *)		/* Stack frame that mprof currently operates on */
 THREADGBLDEF(relink_allowed,			int)				/* Non-zero if recursive relink permitted */
+#ifdef AUTORELINK_SUPPORTED
+THREADGBLDEF(save_zhist,			zro_hist *)			/* Temp storage for zro_hist blk so condition hndler
+										 * can get a hold of it if necessary to free it */
+#endif
 THREADGBLDEF(set_zroutines_cycle,		uint4)				/* Informs us if we changed $ZROUTINES between
 										 * linking a routine and invoking it
 										 */
@@ -303,8 +316,6 @@ THREADGBLAR1DEF(zintcmd_active,			zintcmd_active_info,	ZINTCMD_LAST)	/* Interrup
 THREADGBLDEF(zro_root,				zro_ent *)			/* Anchor for zroutines structure entry array */
 #ifdef UNIX
 THREADGBLDEF(zsearch_var,			lv_val *)			/* UNIX $zsearch() lookup variable */
-THREADGBLDEF(zsearch_dir1,			lv_val *)			/* UNIX $zsearch() directory 1 */
-THREADGBLDEF(zsearch_dir2,			lv_val *)			/* UNIX $zsearch() directory 2 */
 #endif
 THREADGBLDEF(poll_fds_buffer,			char *)				/* Buffer for poll() argument */
 THREADGBLDEF(poll_fds_buffer_size,		size_t)				/* Current allocated size of poll_fds_buffer */
@@ -336,9 +347,6 @@ THREADGBLAR1DEF(prombuf,			char,	(MAX_MIDENT_LEN + 1))	/* The prompt buffer size
 THREADGBLDEF(rt_name_tbl,			hash_table_mname)		/* Routine hash table for finding $TEXT() info */
 #endif
 THREADGBLAR1DEF(tp_restart_failhist_arry,	char,	FAIL_HIST_ARRAY_SIZE)	/* tp_restart dbg storage of restart history */
-#ifdef UNIX
-THREADGBLDEF(user_id,				uint4)				/* USERID number */
-#endif
 THREADGBLAR1DEF(window_string,			char,	SIZEOF(mident_fixed))	/* Buffer for window_ident */
 THREADGBLAR1DEF(tmp_object_file_name,		char,	GTM_PATH_MAX)		/* Hold temporary object name across routines */
 
@@ -407,6 +415,11 @@ THREADGBLDEF(no_spangbls,			boolean_t)	/* This process does not need to worry ab
 								 */
 THREADGBLDEF(max_fid_index,			int)		/* maximum value of csa->fid_index across all open csa's */
 THREADGBLDEF(is_mu_rndwn_rlnkctl,		int)		/* this process is MUPIP RUNDOWN -RELINKCTL */
+THREADGBLDEF(expand_prev_key,			boolean_t)	/* Want gvcst_search_blk/gvcst_search_tail to expand prev_key
+								 * as they do the search. This avoids a later call to
+								 * "gvcst_expand_key" to determine prev_key after the search.
+								 */
+THREADGBLDEF(gtm_autorelink_ctlmax,		uint4)		/* Maximum number of routines allowed for auterelink */
 #ifdef GTM_TRIGGER
 THREADGBLDEF(gvt_triggers_read_this_tn,		boolean_t)			/* if non-zero, indicates triggers were read for
 										 * at least one gv_target in this transaction.
diff --git a/sr_port/gtm_threadgbl_deftypes.c b/sr_port/gtm_threadgbl_deftypes.c
index 61aa998..279f2dd 100644
--- a/sr_port/gtm_threadgbl_deftypes.c
+++ b/sr_port/gtm_threadgbl_deftypes.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,6 +32,9 @@
 # include <fab.h>
 # include "desblk.h"
 #endif
+#ifdef UNIX
+# include <glob.h>
+#endif
 #include "cache.h"
 #include "hashtab_addr.h"
 #include "hashtab_int4.h"
diff --git a/sr_port/gtm_threadgbl_init.c b/sr_port/gtm_threadgbl_init.c
index b41d38a..ca68f31 100644
--- a/sr_port/gtm_threadgbl_init.c
+++ b/sr_port/gtm_threadgbl_init.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -39,6 +40,9 @@
 # include <fab.h>
 # include "desblk.h"
 #endif
+#ifdef UNIX
+# include <glob.h>
+#endif
 #include "cache.h"
 #include "hashtab_addr.h"
 #include "hashtab_int4.h"
diff --git a/sr_port/gtm_unistd.h b/sr_port/gtm_unistd.h
index 7cae350..6240cf1 100644
--- a/sr_port/gtm_unistd.h
+++ b/sr_port/gtm_unistd.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,11 +20,20 @@
 
 #define CHOWN		chown
 
-#define GETUID	getuid
-#define GETEUID	geteuid
+#define	INVALID_UID	(uid_t)-1
+#define	INVALID_GID	(gid_t)-1
 
-#define GETGID	getgid
-#define GETEGID	getegid
+GBLREF	uid_t	user_id, effective_user_id;
+GBLREF	gid_t	group_id, effective_group_id;
+
+#define GETUID()	user_id
+#define GETEUID()	((INVALID_UID == effective_user_id)							\
+				? (effective_user_id = geteuid()) : effective_user_id)
+
+#define GETGID()	((INVALID_GID == group_id) ? (group_id = getgid()) : group_id)
+
+#define GETEGID()	((INVALID_GID == effective_group_id)							\
+				? (effective_group_id = getegid()) : effective_group_id)
 
 #if defined(VMS)
 
diff --git a/sr_port/gtmsource_ch.c b/sr_port/gtmsource_ch.c
index af37dbd..ff98906 100644
--- a/sr_port/gtmsource_ch.c
+++ b/sr_port/gtmsource_ch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -43,7 +44,9 @@
 #include "ftok_sems.h"
 #endif
 
-GBLREF	jnlpool_addrs	jnlpool;
+GBLREF	jnlpool_addrs		jnlpool;
+GBLREF	boolean_t		is_src_server;
+GBLREF	gtmsource_options_t	gtmsource_options;
 
 error_def(ERR_ASSERT);
 error_def(ERR_CTRLC);
@@ -52,6 +55,7 @@ error_def(ERR_GTMASSERT);
 error_def(ERR_GTMASSERT2);
 error_def(ERR_GTMCHECK);
 error_def(ERR_OUTOFSPACE);
+error_def(ERR_REPLSRCEXITERR);
 error_def(ERR_STACKOFLOW);
 error_def(ERR_MEMORY);
 error_def(ERR_VMSMEMORY);
@@ -84,6 +88,9 @@ CONDITION_HANDLER(gtmsource_ch)
 			if (csa && csa->now_crit)
 				rel_lock(jnlpool.jnlpool_dummy_reg);
 		}
+		if (is_src_server)
+			send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_REPLSRCEXITERR, 2, gtmsource_options.secondary_instname,
+					gtmsource_options.log_file);
        		NEXTCH;
 	}
 	VMS_ONLY (
diff --git a/sr_port/gtmsource_exit.c b/sr_port/gtmsource_exit.c
index 18857da..bebb281 100644
--- a/sr_port/gtmsource_exit.c
+++ b/sr_port/gtmsource_exit.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,12 +32,22 @@
 #include "gtmsource.h"
 #include "repl_comm.h"
 
+GBLREF	boolean_t		is_src_server;
+GBLREF	gtmsource_options_t	gtmsource_options;
+
+#ifdef VMS
+error_def(ERR_REPLEXITERR);
+#endif
+error_def(ERR_REPLSRCEXITERR);
+
 void gtmsource_exit(int exit_status)
 {
-	error_def(ERR_REPLEXITERR);
-#ifdef VMS
+	if ((0 != exit_status) && is_src_server)
+		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_REPLSRCEXITERR, 2, gtmsource_options.secondary_instname,
+				gtmsource_options.log_file);
+#	ifdef VMS
 	sys$exit((0 == exit_status) ? SS$_NORMAL : ERR_REPLEXITERR);
-#else
+#	else
 	exit(exit_status);
-#endif
+#	endif
 }
diff --git a/sr_port/gtmsource_poll_actions.c b/sr_port/gtmsource_poll_actions.c
index e30dd43..22055bf 100644
--- a/sr_port/gtmsource_poll_actions.c
+++ b/sr_port/gtmsource_poll_actions.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc.*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -53,6 +54,7 @@ GBLREF	int			gtmsource_log_fd;
 GBLREF 	FILE			*gtmsource_log_fp;
 GBLREF	int			gtmsource_filter;
 GBLREF	volatile time_t		gtmsource_now;
+GBLREF	gtmsource_options_t	gtmsource_options;
 GBLREF	uint4			log_interval;
 #ifdef UNIX
 GBLREF	boolean_t		last_seen_freeze_flag;
@@ -175,6 +177,7 @@ int gtmsource_poll_actions(boolean_t poll_secondary)
 #else
 #error unsupported platform
 #endif
+			STRCPY(gtmsource_options.log_file, jnlpool.gtmsource_local->log_file);
 		}
 	        if ( log_switched == TRUE )
         	        repl_log(gtmsource_log_fp, TRUE, TRUE, "Change log to %s successful\n", gtmsource_local->log_file);
diff --git a/sr_port/gv_select.c b/sr_port/gv_select.c
index 9630afc..829600a 100644
--- a/sr_port/gv_select.c
+++ b/sr_port/gv_select.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -330,10 +331,6 @@ void gv_select(char *cli_buff, int n_len, boolean_t freeze, char opname[], glist
 	}
 	if (gmap_ptr_base != &gmap[0])
 		free(gmap_ptr_base);
-#	ifdef EXTRACT_HASHT_GLOBAL
-	if (NULL != hashgbl_gvnh_reg)
-		free(hashgbl_gvnh_reg);
-#	endif
 }
 
 /* Assumes "gv_target" and "gv_cur_region" are properly setup at function entry */
diff --git a/sr_port/gv_trigger_common.h b/sr_port/gv_trigger_common.h
index 49ee3cc..0d54eba 100644
--- a/sr_port/gv_trigger_common.h
+++ b/sr_port/gv_trigger_common.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -39,18 +40,27 @@
 							&& (HASHT_GBL_CHAR1 == ADDR[1])			\
 							&& (HASHT_GBL_CHAR2 == ADDR[2]))
 
-#define	HASHT_GBL_CURLABEL	"3"	/* Currently supported ^#t global format */
+/* Currently supported ^#t global format */
+#define	HASHT_GBL_CURLABEL	"4"	/* V6.2-002 onwards, keep up to date for test/com_u/trigupgrd_test.csh */
+#define	HASHT_GBL_CURLABEL_INT	 4
+#define HASHT_GBL_CURLABEL_LEN	STR_LIT_LEN(HASHT_GBL_CURLABEL)
 
 /* HASHT_GBL_CURLABEL values of prior trigger versions */
-#define V19_HASHT_GBL_LABEL	"1"	/* V5.4-000 to V5.4-001 */
+#define V25_HASHT_GBL_LABEL	"3"	/* V6.2-001 */
+#define V25_HASHT_GBL_LABEL_INT	 3
 #define V21_HASHT_GBL_LABEL	"2"	/* V5.4-002 to V6.2-000 */
+#define V21_HASHT_GBL_LABEL_INT	 2
+#define V19_HASHT_GBL_LABEL	"1"	/* V5.4-000 to V5.4-001 */
+#define V19_HASHT_GBL_LABEL_INT	 1
 
 #define	LITERAL_HASHLABEL	"#LABEL"
 #define	LITERAL_HASHCYCLE	"#CYCLE"
 #define	LITERAL_HASHCOUNT	"#COUNT"
+#define	LITERAL_HASHTRHASH	"#TRHASH"
 
 #define	LITERAL_HASHLABEL_LEN	STR_LIT_LEN(LITERAL_HASHLABEL)
 #define	LITERAL_HASHCYCLE_LEN	STR_LIT_LEN(LITERAL_HASHCYCLE)
 #define	LITERAL_HASHCOUNT_LEN	STR_LIT_LEN(LITERAL_HASHCOUNT)
+#define	LITERAL_HASHTRHASH_LEN	STR_LIT_LEN(LITERAL_HASHTRHASH)
 
 #endif
diff --git a/sr_port/gvcst_blk_search.c b/sr_port/gvcst_blk_search.c
index c74d332..deb04d5 100644
--- a/sr_port/gvcst_blk_search.c
+++ b/sr_port/gvcst_blk_search.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,9 +10,25 @@
  *								*
  ****************************************************************/
 
+#include "mdef.h"
+
+#include "gtm_stdio.h"
+#include "gtm_string.h"
+
+#include "gdsroot.h"
+#include "gtm_facility.h"
+#include "fileinfo.h"
+#include "gdsbt.h"
+#include "gdsfhead.h"
+#include "gdsblk.h"
+#include "copy.h"
+#include "cdb_sc.h"
+#include "gvcst_protos.h"	/* for gvcst_search_tail,gvcst_search_blk prototype */
+#include "min_max.h"
+#include "gvcst_expand_key.h"
+#include "send_msg.h"
+
 /*
- * NOTE:  See also GVCST_BLK_SEARCH.MAR for the VAX platform.
- *
  * -------------------------------------------------------------------
  * Search a single gvcst block
  *
@@ -79,22 +96,6 @@
  * -------------------------------------------------------------------
  */
 
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdsblk.h"
-#include "copy.h"
-#include "cdb_sc.h"
-#include "gvcst_protos.h"	/* for gvcst_search_tail,gvcst_search_blk prototype */
-#include "send_msg.h"
-
 GBLREF unsigned int	t_tries;
 GBLREF sgmnt_addrs	*cs_addrs;
 GBLREF gd_region	*gv_cur_region;
@@ -146,294 +147,22 @@ static	void	gvcst_search_fail(srch_blk_status *pStat)
 				"csa = 0x%lX : csalock = 0x%lX", regbuff, pStat->blk_num, (long unsigned int) pStat->buffaddr,
 				(long unsigned int) pStat->cr, crbuff, (long unsigned int) cs_addrs,
 				(long unsigned int) cs_addrs->lock_addrs[0]);
-		send_msg(VARLSTCNT(4) ERR_TEXT, 2, LEN_AND_STR(buff));
+		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_TEXT, 2, LEN_AND_STR(buff));
 	}
 }
 
-/*
- * --------------------------------------------------
- * Search for a key in the block
- *
- * Return:
- *	cdb_sc_normal	 - success
- *	cdb_sc_badoffset - record with 0 length encountered,
- *			   possibly a corrupt block
- *	cdb_sc_blklenerr - end of block reached without match
- * --------------------------------------------------
- */
-
-enum cdb_sc 	gvcst_search_blk (gv_key *pKey, srch_blk_status *pStat)
-{
-	/* register variables named in perceived order of declining impact */
-	register int		nFlg, nTargLen, nMatchCnt, nTmp;
-	sm_uc_ptr_t		pBlkBase, pRecBase, pTop, pRec, pPrevRec;
-	unsigned char		*pCurrTarg, *pTargKeyBase;
-	unsigned short		nRecLen;
-	int			tmp_cmpc;
-
-	/* the following load code (and code in a few other places) is coded in a "assember" style
-	 * in an attempt to encourage the compiler to get it efficient;
-	 * if instance, memory and non-memory instructions are interlaced to encourge pipelining.
-	 * of course a great compiler doesn't need help, but this is portable code and ...
-	 */
-	DBG_CHECK_SRCH_HIST_AND_CSE_BUFFER_MATCH(pStat);
-	pBlkBase = pStat->buffaddr;
-	pRecBase = pBlkBase;
-	pTop = pBlkBase + ((blk_hdr_ptr_t)pBlkBase)->bsiz;
-	nRecLen = SIZEOF(blk_hdr);
-	pCurrTarg = pKey->base;
-	nMatchCnt = 0;
-	nTargLen = (int)pKey->end;
-	pTargKeyBase = pCurrTarg;
-	nTargLen++;					/* for the terminating NUL on the key */
-
-	for (;;)
-	{
-		pRec = pRecBase + nRecLen;
-
-		if (pRec >= pTop)
-		{	/* Terminated at end of block */
-			if (pRec > pTop)		/* If record goes off the end, then block must be bad */
-			{
-				INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
-				assert(CDB_STAGNATE > t_tries);
-				return cdb_sc_blklenerr;
-			}
-			nTargLen = 0;
-			if (((blk_hdr_ptr_t)pBlkBase)->levl == 0)
-			{	/* data block */
-				pPrevRec = pRecBase;
-				pRecBase = pRec;
-			}
-			else
-				nMatchCnt = 0;	/* star key */
-			break;
-		}
-		GET_USHORT(nRecLen, &((rec_hdr_ptr_t)pRec)->rsiz);
-		if (nRecLen == 0)			/* If record length is 0, then block must be bad */
-		{
-			INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
-			assert(CDB_STAGNATE > t_tries);
-			return cdb_sc_badoffset;
-		}
-		pPrevRec = pRecBase;
-		pRecBase = pRec;
-
-		/* If current compression count > last match, then this record
-		   also matches on 'last match' characters; keep looping */
-		EVAL_CMPC2((rec_hdr_ptr_t)pRec, nTmp)
-		if (nTmp > nMatchCnt)
-			continue;
-
-		if (nTmp < nMatchCnt)
-		{	/* Terminate on compression count < previous match,
-			   this key is after the target */
-			if (nRecLen == BSTAR_REC_SIZE  &&  ((blk_hdr_ptr_t)pBlkBase)->levl != 0)
-				/* Star key has size of SIZEOF(rec_hdr) + SIZEOF(block_id), make match = 0 */
-				nTargLen = 0;
-			else
-				/* Data block, make match = current compression count */
-				nTargLen = nTmp;
-			break;
-		}
-
-		/* Compression count == match count;  Compare current target with current record */
-		pRec += SIZEOF(rec_hdr);
-
-		do
-		{
-			if ((nFlg = *pCurrTarg - *pRec++) != 0)
-				break;
-			pCurrTarg++;
-		} while ( --nTargLen);
-
-		if (nFlg > 0)
-			nMatchCnt =(int)(pCurrTarg - pTargKeyBase);
-		else
-		{	/* Key is after target*/
-			if (nRecLen == BSTAR_REC_SIZE  &&  (((blk_hdr_ptr_t)pBlkBase)->levl != 0))
-				/* Star key has size of SIZEOF(rec_hdr) + SIZEOF(block_id), make match = 0 */
-				nTargLen = 0;
-			else
-				nTargLen = (int)(pCurrTarg - pTargKeyBase);
-			break;
-		}
-	}
-
-	pStat->prev_rec.offset = (short)(pPrevRec - pBlkBase);
-	pStat->prev_rec.match = (short)nMatchCnt;
-	pStat->curr_rec.offset = (short)(pRecBase - pBlkBase);
-	pStat->curr_rec.match = (short)nTargLen;
-
-	return cdb_sc_normal;
-}
-
-
-/* search_tail is the "start anywhere" version of search_blk
-   getting started is a bit awkward, so excuse the gotos */
-enum cdb_sc	gvcst_search_tail (gv_key *pKey, srch_blk_status *pStat, gv_key *pOldKey)
-{
-	/* register variables named in perceived order of declining impact */
-	register int		nFlg, nTargLen, nMatchCnt, nTmp;
-	sm_uc_ptr_t		pBlkBase, pRecBase, pRec, pTop, pPrevRec;
-	unsigned char		*pCurrTarg, *pTargKeyBase, *pOldKeyBase, *pCurrTargPos;
-	unsigned short		nRecLen;
-	int			tmp_cmpc;
-
-	/* see comment in gvcst_search_blk above on coding style */
-
-	if (pStat->prev_rec.offset == 0)
-		return gvcst_search_blk(pKey, pStat);	/* nice clean start at the begining of a block */
-	DBG_CHECK_SRCH_HIST_AND_CSE_BUFFER_MATCH(pStat);
-	pBlkBase = pStat->buffaddr;
-	pRecBase = pBlkBase + pStat->curr_rec.offset;
-	pRec = pRecBase;
-	pTop = pBlkBase + ((blk_hdr_ptr_t)pBlkBase)->bsiz;
-	nMatchCnt = pStat->prev_rec.match;
-	pCurrTarg = pKey->base;
-	pTargKeyBase = pCurrTarg;
-	pOldKeyBase = pOldKey->base;
-	pPrevRec = pBlkBase + pStat->prev_rec.offset;
-	nTargLen = pKey->end;
-	nTargLen++;		/* for the NUL that terminates the key */
-	if (pRec >= pTop)
-	{	/* Terminated at end of block */
-/* eob_tail: */	if (pRec > pTop)
-		{
-			INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
-			assert(CDB_STAGNATE > t_tries);
-			return cdb_sc_blklenerr;
-		}
-		if ((nTargLen = nMatchCnt) != 0)
-		{
-			do
-			{
-				if (*pCurrTarg++ != *pOldKeyBase++)
-					break;
-			} while (--nTargLen);
-		}
-		if (((blk_hdr_ptr_t)pBlkBase)->levl != 0)
-			nMatchCnt = 0;	/* star key */
-		else
-			nMatchCnt -= nTargLen;
-		nTargLen = 0;
-	} else
-	{
-		GET_USHORT(nRecLen, &((rec_hdr_ptr_t)pRec)->rsiz);
-		EVAL_CMPC2((rec_hdr_ptr_t)pRec, nTmp);
-		nFlg = nTmp;
-		if (nFlg != 0)
-		{
-			do
-			{
-				if ((nFlg = *pCurrTarg - *pOldKeyBase++) != 0)
-					break;
-				pCurrTarg++;
-			} while (--nTmp);
-			if (nFlg > 0)
-			{
-				nMatchCnt = (int)(pCurrTarg - pTargKeyBase);
-				nTargLen -= nMatchCnt;
-			}
-			if (nFlg < 0)
-			{
-				nTargLen += (int)(pTargKeyBase - pCurrTarg);
-				goto match_term;
-			}
-		}
-		if (nFlg == 0)
-		{
-			nTmp = nMatchCnt;
-			nMatchCnt = (int)(pCurrTarg - pTargKeyBase);
-			nTargLen -= nMatchCnt;
-			nTmp -= nMatchCnt;
-
-			if (nTmp > 0)
-			{
-				pCurrTargPos = pCurrTarg;
-
-				do
-				{
-					if (*pCurrTargPos++ != *pOldKeyBase++)
-						break;
-					nMatchCnt++;
-				} while (--nTmp);
-			}
-			goto alt_loop_entry;
-		}
-		for (;;)
-		{
-			pRec = pRecBase + nRecLen;
-
-			if (pRec >= pTop)
-			{	/* Terminated at end of block */
-				if (pRec > pTop)		/* If record goes off the end, then block must be bad */
-				{
-					INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
-					assert(CDB_STAGNATE > t_tries);
-					return cdb_sc_blklenerr;
-				}
-				nTargLen = 0;
-
-				if (((blk_hdr_ptr_t)pBlkBase)->levl == 0)
-				{	/* data block */
-					pPrevRec = pRecBase;
-					pRecBase = pRec;
-				}
-				else
-					nMatchCnt = 0;	/* star key */
-				break;
-			}
-			GET_USHORT(nRecLen, &((rec_hdr_ptr_t)pRec)->rsiz);
-			if (nRecLen == 0)		/* If record length is 0, then block must be bad */
-			{
-				INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
-				assert(CDB_STAGNATE > t_tries);
-				return cdb_sc_badoffset;
-			}
-			pPrevRec = pRecBase;
-			pRecBase = pRec;
-			/* If current compression count > last match, then this record
-			   also matches on 'last match' characters; keep looping */
-			EVAL_CMPC2((rec_hdr_ptr_t)pRec, nTmp);
-			if (nTmp > nMatchCnt)
-				continue;
-			if (nTmp < nMatchCnt)
-/* cc_term: */		{	/* Terminated on compression count < previous match,
-				   this key is after the target */
-				if (nRecLen == BSTAR_REC_SIZE  &&  ((blk_hdr_ptr_t)pBlkBase)->levl != 0)
-					/* Star key has size of SIZEOF(rec_hdr) + SIZEOF(block_id), make match = 0 */
-					nTargLen = 0;
-				else
-					/* Data block, make match = current compression count */
-					nTargLen = nTmp;
-				break;
-			}
-alt_loop_entry:		/* Compression count == match count;  Compare current target with current record */
-			pRec += SIZEOF(rec_hdr);
-			do
-			{
-				if ((nFlg = *pCurrTarg - *pRec++) != 0)
-					break;
-				pCurrTarg++;
-			} while (--nTargLen);
-			if (nFlg > 0)
-				nMatchCnt = (int)(pCurrTarg - pTargKeyBase);
-			else
-match_term:		{	/* Key is after target*/
-				if (nRecLen == BSTAR_REC_SIZE  &&  (((blk_hdr_ptr_t)pBlkBase)->levl != 0))
-					/* Star key has size of SIZEOF(rec_hdr) + SIZEOF(block_id), make match = 0 */
-					nTargLen = 0;
-				else
-					nTargLen = (int)(pCurrTarg - pTargKeyBase);
-				break;
-			}
-		}
-	}
-/* clean_up: */
-	pStat->prev_rec.offset = (short)(pPrevRec - pBlkBase);
-	pStat->prev_rec.match = (short)nMatchCnt;
-	pStat->curr_rec.offset = (short)(pRecBase - pBlkBase);
-	pStat->curr_rec.match = (short)nTargLen;
-	return cdb_sc_normal;
-}
+#define GVCST_SEARCH_EXPAND_PREVKEY
+#define GVCST_SEARCH_BLK
+#include "gvcst_blk_search.h" /* for function gvcst_search_blk_expand_prevkey() */ /* BYPASSOK : intentional duplicate include. */
+#undef GVCST_SEARCH_BLK
+#define GVCST_SEARCH_TAIL
+#include "gvcst_blk_search.h" /* for function gvcst_search_tail_expand_prevkey() */ /* BYPASSOK : intentional duplicate include. */
+#undef GVCST_SEARCH_TAIL
+
+#undef GVCST_SEARCH_EXPAND_PREVKEY
+#define GVCST_SEARCH_BLK
+#include "gvcst_blk_search.h" /* for function gvcst_search_blk() */	/* BYPASSOK : intentional duplicate include. */
+#undef GVCST_SEARCH_BLK
+#define GVCST_SEARCH_TAIL
+#include "gvcst_blk_search.h" /* for function gvcst_search_tail() */	/* BYPASSOK : intentional duplicate include. */
+#undef GVCST_SEARCH_TAIL
diff --git a/sr_port/gvcst_blk_search.h b/sr_port/gvcst_blk_search.h
new file mode 100644
index 0000000..e8fae96
--- /dev/null
+++ b/sr_port/gvcst_blk_search.h
@@ -0,0 +1,350 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2015 Fidelity National Information 		*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+/*
+ * --------------------------------------------------
+ * Search for a key in the block
+ *
+ * Return:
+ *	cdb_sc_normal	 - success
+ *	cdb_sc_badoffset - record with 0 length encountered,
+ *			   possibly a corrupt block
+ *	cdb_sc_blklenerr - end of block reached without match
+ * --------------------------------------------------
+ */
+
+GBLREF	sgmnt_data_ptr_t	cs_data;
+
+#ifndef GVCST_SEARCH_EXPAND_PREVKEY
+#	ifdef GVCST_SEARCH_BLK
+	enum cdb_sc 	gvcst_search_blk(gv_key *pKey, srch_blk_status *pStat)
+#	endif
+#	ifdef GVCST_SEARCH_TAIL
+	/* gvcst_search_tail is the "start anywhere" version of gvcst_search_blk.
+	 * Currently this is called only for level-0 blocks. The below logic is coded with this assumption.
+	 * Getting started is a bit awkward, so excuse the gotos.
+	 */
+	enum cdb_sc	gvcst_search_tail(gv_key *pKey, srch_blk_status *pStat, gv_key *pOldKey)
+#	endif
+#else
+#	ifdef GVCST_SEARCH_BLK
+	GBLREF	gv_key	*gv_altkey;
+	/* "gvcst_search_blk_expand_prevkey" is the same as "gvcst_search_blk" except this search happens on a level0 block
+	 * and sets gv_altkey to fully expanded key corresponding to pStat->prev_rec. This avoids a later call to gvcst_expand_key,
+	 * which would imply TWO searches of the block, and instead does the job with ONE search.
+	 */
+	enum cdb_sc 	gvcst_search_blk_expand_prevkey(gv_key *pKey, srch_blk_status *pStat)
+#	endif
+#	ifdef GVCST_SEARCH_TAIL
+	/* "gvcst_search_tail_expand_prevkey" is the same as "gvcst_search_tail" except this search sets gv_altkey to the fully
+	 * expanded key corresponding to pStat->prev_rec. This avoids a later call to gvcst_expand_key, which would imply
+	 * TWO searches of the block, and instead does the job with ONE search.
+	 */
+	enum cdb_sc	gvcst_search_tail_expand_prevkey(gv_key *pKey, srch_blk_status *pStat, gv_key *pOldKey)
+#	endif
+#endif
+{
+	/* register variables named in perceived order of declining impact */
+	register int		nFlg, nTargLen, nMatchCnt, nTmp;
+	sm_uc_ptr_t		pBlkBase, pRecBase, pTop, pRec, pPrevRec;
+	unsigned char		*pCurrTarg, *pTargKeyBase;
+#	ifdef GVCST_SEARCH_TAIL
+	unsigned char		*pOldKeyBase, *pCurrTargPos;
+	int			tmp_cmpc;
+#		ifdef GVCST_SEARCH_EXPAND_PREVKEY
+		gv_key		*prevKey;
+		enum cdb_sc	status;
+#		endif
+#	endif
+	unsigned short		nRecLen;
+#	ifdef GVCST_SEARCH_BLK
+	boolean_t		level0;
+#	endif
+#	ifdef GVCST_SEARCH_EXPAND_PREVKEY
+	int			prevKeyCmpLen;	/* length of compressed portion of prevKey stored in gv_altkey->base */
+	int			prevKeyUnCmpLen;/* Length of uncompressed portion of prevKey */
+	sm_uc_ptr_t		prevKeyUnCmp;	/* pointer to beginning of uncompressed portion of prevKey */
+	unsigned char		*prevKeyStart;	/* pointer to &gv_altkey->base[0] */
+	unsigned char		*prevKeyTop;	/* pointer to allocated end of gv_altkey */
+	unsigned char		*tmpPtr;
+#	else
+	DCL_THREADGBL_ACCESS;
+
+	SETUP_THREADGBL_ACCESS;
+#	endif
+#	if defined(GVCST_SEARCH_TAIL) && !defined(GVCST_SEARCH_EXPAND_PREVKEY)
+	assert(0 < memcmp(pKey->base, pOldKey->base, pKey->end + 1));	/* below code assumes this is ensured by caller */
+	if (0 == pStat->prev_rec.offset)
+		return gvcst_search_blk(pKey, pStat);	/* nice clean start at the begining of a block */
+#	endif
+	/* The following load code (and code in a few other places) is coded in a "assember" style
+	 * in an attempt to encourage the compiler to get it efficient.
+	 * For instance, memory and non-memory instructions are interlaced to encourge pipelining.
+	 * Of course a great compiler doesn't need help, but this is portable code and ...
+	 */
+	DBG_CHECK_SRCH_HIST_AND_CSE_BUFFER_MATCH(pStat);
+	pBlkBase = pStat->buffaddr;
+#	ifndef GVCST_SEARCH_EXPAND_PREVKEY
+#		ifdef GVCST_SEARCH_BLK
+		level0 = (0 == ((blk_hdr_ptr_t)pBlkBase)->levl);
+		if (level0 && TREF(expand_prev_key))
+			return gvcst_search_blk_expand_prevkey(pKey, pStat);
+#		endif
+#		ifdef GVCST_SEARCH_TAIL
+		if (TREF(expand_prev_key))
+			return gvcst_search_tail_expand_prevkey(pKey, pStat, pOldKey);
+#		endif
+#	else
+		prevKeyStart = &gv_altkey->base[0];
+		prevKeyTop = &gv_altkey->base[gv_altkey->top];
+#		ifdef GVCST_SEARCH_BLK
+		level0 = TRUE; /* We are in "gvcst_search_blk_expand_prevkey" so we should have been called for a level0 block */
+		prevKeyCmpLen = 0;
+		prevKeyUnCmp = NULL;
+#		endif
+#		ifdef GVCST_SEARCH_TAIL
+		/* Note: "level0" variable is guaranteed to be TRUE since gvcst_search_tail is currently invoked only for
+		 * leaf blocks. We therefore do not compute it like we do in gvcst_search_blk. Assert this assumption.
+		 */
+		assert(0 == pStat->level);
+#		endif
+#	endif
+	pTop = pBlkBase + MIN(((blk_hdr_ptr_t)pBlkBase)->bsiz, cs_data->blk_size);
+	pCurrTarg = pKey->base;
+	pTargKeyBase = pCurrTarg;
+#	ifdef GVCST_SEARCH_BLK
+	pRecBase = pBlkBase;
+	nRecLen = SIZEOF(blk_hdr);
+	nMatchCnt = 0;
+	nTargLen = (int)pKey->end;
+	nTargLen++;	/* for the terminating NUL on the key */
+#	endif
+#	ifdef GVCST_SEARCH_TAIL
+	pRecBase = pBlkBase + pStat->curr_rec.offset;
+	pRec = pRecBase;
+	nMatchCnt = pStat->prev_rec.match;
+	pOldKeyBase = pOldKey->base;
+	pPrevRec = pBlkBase + pStat->prev_rec.offset;
+#		ifdef GVCST_SEARCH_EXPAND_PREVKEY
+		prevKey = pStat->blk_target->prev_key;
+		if ((NULL == prevKey) || (PREV_KEY_NOT_COMPUTED == prevKey->end))
+		{
+			status = gvcst_expand_prev_key(pStat, pOldKey, gv_altkey);
+			if (cdb_sc_normal != status)
+				return status;
+			prevKey = gv_altkey;
+		} else
+		{	/* Since gv_altkey is used elsewhere, ensure that it is in sync with prevKey before performing the search
+			 * and returning to the caller.
+			 */
+			memcpy(gv_altkey->base, prevKey->base, prevKey->end - 1);
+		}
+		assert(prevKey->end);
+		prevKeyCmpLen = prevKey->end - 1;
+		prevKeyUnCmp = &prevKey->base[prevKeyCmpLen];
+		assert(KEY_DELIMITER == prevKeyUnCmp[0]);
+		assert(KEY_DELIMITER == prevKeyUnCmp[1]);
+#		endif
+	if (pRec >= pTop)
+	{	/* Terminated at end of block */
+		if (pRec > pTop)
+		{
+			INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
+			assert(CDB_STAGNATE > t_tries);
+			return cdb_sc_blklenerr;
+		}
+		if (0 != (nTargLen = nMatchCnt))
+		{
+			do
+			{
+				if (*pCurrTarg++ != *pOldKeyBase++)
+					break;
+			} while (--nTargLen);
+		}
+		nMatchCnt -= nTargLen;
+		nTargLen = 0;
+#		ifdef GVCST_SEARCH_EXPAND_PREVKEY
+		/* Normally pTop points to an offset in the GDS block. But in this case, we are terminating the
+		 * search without a search of the actual block and so we need to point pTop to the same location
+		 * where prevKeyUnCmp points and that is prevKey.
+		 */
+		pTop = &prevKey->base[prevKey->end + 1];	/* + 1 needed to balance pTop-- done at function end */
+#		endif
+	} else
+	{
+		nTargLen = pKey->end;
+		nTargLen++;		/* for the NUL that terminates the key */
+		GET_USHORT(nRecLen, &((rec_hdr_ptr_t)pRec)->rsiz);
+		EVAL_CMPC2((rec_hdr_ptr_t)pRec, nTmp);
+		tmp_cmpc = nTmp;
+		nFlg = tmp_cmpc;
+		if (0 != nFlg)
+		{
+			do
+			{
+				if (0 != (nFlg = *pCurrTarg - *pOldKeyBase++))
+					break;
+				pCurrTarg++;
+			} while (--tmp_cmpc);
+			assert(0 <= nFlg); /* because gvcst_search_tail is called ONLY if pTarg->clue.key < pKey */
+			if (0 < nFlg)
+			{
+				nMatchCnt = (int)(pCurrTarg - pTargKeyBase);
+				nTargLen -= nMatchCnt;
+			}
+		}
+		if (0 == nFlg)
+		{
+			tmp_cmpc = nMatchCnt;
+			nMatchCnt = (int)(pCurrTarg - pTargKeyBase);
+			nTargLen -= nMatchCnt;
+			tmp_cmpc -= nMatchCnt;
+			if (0 < tmp_cmpc)
+			{
+				pCurrTargPos = pCurrTarg;
+				do
+				{
+					if (*pCurrTargPos++ != *pOldKeyBase++)
+						break;
+					nMatchCnt++;
+				} while (--tmp_cmpc);
+			}
+			goto alt_loop_entry;
+		}
+#	endif
+		for (;;)
+		{
+			pRec = pRecBase + nRecLen;
+#			ifdef GVCST_SEARCH_EXPAND_PREVKEY
+			if (pRecBase != pBlkBase)
+			{	/* nTmp points to the compression count corresponding to pPrevRec */
+				if (nTmp > prevKeyCmpLen)
+				{
+					if (((prevKeyStart + nTmp) >= prevKeyTop) || (NULL == prevKeyUnCmp))
+						return cdb_sc_blkmod;
+#					ifdef GVCST_SEARCH_TAIL
+					assert((prevKeyUnCmp > pBlkBase)
+						|| ((prevKeyUnCmp == &prevKey->base[prevKeyCmpLen])
+							&& (prevKeyCmpLen == (prevKey->end - 1))));
+#					else
+					assert(prevKeyUnCmp > pBlkBase);
+#					endif
+					memcpy(prevKeyStart + prevKeyCmpLen, prevKeyUnCmp, nTmp - prevKeyCmpLen);
+				}
+				prevKeyCmpLen = nTmp;
+				prevKeyUnCmp = pRecBase + SIZEOF(rec_hdr);
+			}
+#			endif
+			if (pRec >= pTop)
+			{	/* Terminated at end of block */
+				if (pRec > pTop)	/* If record goes off the end, then block must be bad */
+				{
+					INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
+					assert(CDB_STAGNATE > t_tries);
+					return cdb_sc_blklenerr;
+				}
+				nTargLen = 0;
+#				ifdef GVCST_SEARCH_BLK
+				if (!level0)
+					nMatchCnt = 0;	/* star key */
+				else
+#				endif
+				{	/* data block */
+					pPrevRec = pRecBase;
+					pRecBase = pRec;
+				}
+				break;
+			}
+			GET_USHORT(nRecLen, &((rec_hdr_ptr_t)pRec)->rsiz);
+			if (0 == nRecLen)	/* If record length is 0, then block must be bad */
+			{
+				INVOKE_GVCST_SEARCH_FAIL_IF_NEEDED(pStat);
+				assert(CDB_STAGNATE > t_tries);
+				return cdb_sc_badoffset;
+			}
+			pPrevRec = pRecBase;
+			pRecBase = pRec;
+			/* If current compression count > last match, then this record also matches on 'last match' characters.
+			 * Keep looping.
+			 */
+			EVAL_CMPC2((rec_hdr_ptr_t)pRec, nTmp)
+			if (nTmp > nMatchCnt)
+				continue;
+			if (nTmp < nMatchCnt)
+			{	/* Terminate on compression count < previous match, this key is after the target */
+#				ifdef GVCST_SEARCH_BLK
+				if ((BSTAR_REC_SIZE == nRecLen) && !level0)
+					/* Star key has size of SIZEOF(rec_hdr) + SIZEOF(block_id), make match = 0 */
+					nTargLen = 0;
+				else
+#				endif
+					/* Data block, make match = current compression count */
+					nTargLen = nTmp;
+				break;
+			}
+#			ifdef GVCST_SEARCH_TAIL
+			alt_loop_entry:
+#			endif
+			/* Compression count == match count;  Compare current target with current record */
+			pRec += SIZEOF(rec_hdr);
+			do
+			{
+				if ((nFlg = *pCurrTarg - *pRec++) != 0)
+					break;
+				pCurrTarg++;
+			} while (--nTargLen);
+			if (0 < nFlg)
+				nMatchCnt = (int)(pCurrTarg - pTargKeyBase);
+			else
+			{	/* Key is after target*/
+#				ifdef GVCST_SEARCH_BLK
+				if ((BSTAR_REC_SIZE == nRecLen) && !level0)
+					/* Star key has size of SIZEOF(rec_hdr) + SIZEOF(block_id), make match = 0 */
+					nTargLen = 0;
+				else
+#				endif
+					nTargLen = (int)(pCurrTarg - pTargKeyBase);
+				break;
+			}
+		}
+#	ifdef GVCST_SEARCH_TAIL
+	}
+#	endif
+	pStat->prev_rec.offset = (short)(pPrevRec - pBlkBase);
+	pStat->prev_rec.match = (short)nMatchCnt;
+	pStat->curr_rec.offset = (short)(pRecBase - pBlkBase);
+	pStat->curr_rec.match = (short)nTargLen;
+#	ifdef GVCST_SEARCH_EXPAND_PREVKEY
+	if (NULL != (tmpPtr = prevKeyUnCmp))	/* Note: Assignment */
+	{	/* gv_altkey->base[0] thru gv_altkey->base[prevKeyCmpLen] already holds the compressed portion of prevKey.
+		 * Copy over uncompressed portion of prevKey into gv_altkey->base and update gv_altkey->end before returning.
+		 */
+		pTop--;	/* to check for double KEY_DELIMITER byte sequence without exceeding buffer allocation bounds */
+		do
+		{
+			if (tmpPtr >= pTop)
+				return cdb_sc_blkmod;
+			/* It is now safe to do *tmpPtr and *++tmpPtr without worry about exceeding array bounds */
+			if ((KEY_DELIMITER == *tmpPtr++) && (KEY_DELIMITER == *tmpPtr))
+				break;
+		} while (TRUE);
+		tmpPtr++;	/* go past second KEY_DELIMITER so that gets copied over to gv_altkey too */
+		prevKeyUnCmpLen = tmpPtr - prevKeyUnCmp;
+		prevKeyStart += prevKeyCmpLen;
+		if (prevKeyStart + prevKeyUnCmpLen > prevKeyTop)
+			return cdb_sc_blkmod;
+		memcpy(prevKeyStart, prevKeyUnCmp, prevKeyUnCmpLen);
+		gv_altkey->end = prevKeyCmpLen + prevKeyUnCmpLen - 1;	/* remove 2nd KEY_DELIMITER from "end" calculation */
+	} else
+		gv_altkey->end = 0;
+#	endif
+	return cdb_sc_normal;
+}
diff --git a/sr_port/gvcst_expand_key.c b/sr_port/gvcst_expand_key.c
index 46346da..471adec 100644
--- a/sr_port/gvcst_expand_key.c
+++ b/sr_port/gvcst_expand_key.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,6 +11,7 @@
  ****************************************************************/
 
 #include "mdef.h"
+
 #include "gdsroot.h"
 #include "gdsblk.h"
 #include "gtm_facility.h"
@@ -18,25 +20,36 @@
 #include "gdsfhead.h"
 #include "cdb_sc.h"
 #include "copy.h"
+#include "min_max.h"
 #include "gvcst_expand_key.h"
 
 GBLREF unsigned int	t_tries;
 
+/* Note: A lot of the code below is similar to that in gvcst_blk_search.h.
+ * Any changes there need to be incorporated here and vice-versa.
+ */
 enum cdb_sc	gvcst_expand_key(blk_hdr_ptr_t bp, int4 rec_top, gv_key *key)
 {
-	unsigned short	temp_ushort;
-	int		tmp_cmpc;
-	int4		r_offset;
+	int		expKeyCmpLen;	/* length of compressed portion of expKey stored in key->base */
+	int		expKeyUnCmpLen;/* Length of uncompressed portion of expKey */
+	int		nTmp;
+	int		r_offset;
 	rec_hdr_ptr_t	rp, rtop;
-	sm_uc_ptr_t	p;
-	unsigned char	*kbase, *kend, *kprv, *ktop, last, current;
+	sm_uc_ptr_t	expKeyUnCmp;	/* pointer to beginning of uncompressed portion of expKey */
+	sm_uc_ptr_t	pTop;
+	unsigned char	*expKeyStart;	/* pointer to &key->base[0] */
+	unsigned char	*expKeyTop;	/* pointer to allocated end of input "key" */
+	unsigned char	*tmpPtr;
+	unsigned short	temp_ushort;
 
 	assert(SIZEOF(rec_hdr) <= SIZEOF(blk_hdr));
-	kbase = kend = key->base;
-	ktop = &key->base[key->top];
 	rp = (rec_hdr_ptr_t)bp;
 	rtop = (rec_hdr_ptr_t)((sm_uc_ptr_t)bp + rec_top);
-	for (r_offset = SIZEOF(blk_hdr);  ;  GET_USHORT(temp_ushort, &rp->rsiz), r_offset = temp_ushort)
+	expKeyCmpLen = 0;
+	expKeyUnCmp = NULL;
+	expKeyStart = &key->base[0];
+	expKeyTop = &key->base[key->top];
+	for (r_offset = SIZEOF(blk_hdr);  ; GET_USHORT(temp_ushort, &rp->rsiz), r_offset = temp_ushort)
 	{
 		/* WARNING:  Assumes that SIZEOF(rec_hdr) <= SIZEOF(blk_hdr)	*/
 		if (r_offset < SIZEOF(rec_hdr))
@@ -50,37 +63,75 @@ enum cdb_sc	gvcst_expand_key(blk_hdr_ptr_t bp, int4 rec_top, gv_key *key)
 			assert(CDB_STAGNATE > t_tries);
 			return cdb_sc_rmisalign;
 		}
-		current = 1;
-		kend = kbase + EVAL_CMPC(rp);
-		p = (sm_uc_ptr_t)(rp + 1);
-		for (;;)
+		nTmp = EVAL_CMPC(rp);
+		if (nTmp > expKeyCmpLen)
 		{
-			if (kend >= ktop)
-			{
-				assert(CDB_STAGNATE > t_tries);
-				return cdb_sc_keyoflow;
-			}
-			last = current;
-			*kend++ = current = *p++;
-			if (last == 0)
-			{
-				if (current == 0)
-					break;
-				else
-					kprv = kend - 1;	/* start of last key */
-			}
+			if (((expKeyStart + nTmp) >= expKeyTop) || (NULL == expKeyUnCmp))
+				return cdb_sc_blkmod;
+			assert(NULL != expKeyUnCmp);
+			memcpy(expKeyStart + expKeyCmpLen, expKeyUnCmp, nTmp - expKeyCmpLen);
 		}
+		expKeyCmpLen = nTmp;
+		expKeyUnCmp = (sm_uc_ptr_t)rp + SIZEOF(rec_hdr);
 		if (rp == rtop)
-		{
-			key->end = kend - kbase - 1;
-			key->prev = kprv - kbase;
-			if (KEY_DELIMITER == *kbase)
-				/* A valid key wouldn't start with a '\0' character. So the block must have been
-				 * concurrently modified.
-				 */
-				return cdb_sc_mkblk;
-			return cdb_sc_normal;
-		}
-		kprv = kend - 1;	/* start of last key */
+			break;
+	}
+	assert(NULL != expKeyUnCmp);
+	tmpPtr = expKeyUnCmp;
+	/* gv_altkey->base[0] thru gv_altkey->base[expKeyCmpLen] already holds the compressed portion of expKey.
+	 * Copy over uncompressed portion of expKey into gv_altkey->base and update gv_altkey->end before returning.
+	 */
+	pTop = (sm_uc_ptr_t)bp + MIN(bp->bsiz, cs_data->blk_size) - 1;	/* -1 to check for double KEY_DELIMITER byte sequence
+									 * without exceeding buffer allocation bounds.
+									 */
+	do
+	{
+		if (tmpPtr >= pTop)
+			return cdb_sc_blkmod;
+		/* It is now safe to do *tmpPtr and *++tmpPtr without worry about exceeding block bounds */
+		if ((KEY_DELIMITER == *tmpPtr++) && (KEY_DELIMITER == *tmpPtr))
+			break;
+	} while (TRUE);
+	tmpPtr++;	/* go past second KEY_DELIMITER so that gets copied over to gv_altkey too */
+	expKeyUnCmpLen = tmpPtr - expKeyUnCmp;
+	tmpPtr = expKeyStart + expKeyCmpLen;
+	if (tmpPtr + expKeyUnCmpLen > expKeyTop)
+		return cdb_sc_blkmod;
+	memcpy(tmpPtr, expKeyUnCmp, expKeyUnCmpLen);
+	if (KEY_DELIMITER == *expKeyStart)
+	{	/* A valid key wouldn't start with a '\0' character. So the block must have been concurrently modified. */
+		return cdb_sc_mkblk;
+	}
+	expKeyUnCmpLen--;	/* remove 2nd KEY_DELIMITER from "end" calculation */
+	key->end = expKeyCmpLen + expKeyUnCmpLen;
+	/* key->prev is not initialized. Caller should not rely on this. */
+	/* Due to concurrency issues, it is possible "key" is not a well-formed key (e.g. it might have two successive
+	 * KEY_DELIMITER bytes in the middle of the key). So we cannot add a DBG_CHECK_GVKEY_VALID(key) here.
+	 * But we expect later validation to catch this and restart the transaction (without affecting db integrity).
+	 * So we dont worry about such keys here.
+	 */
+	assert(2 <= key->end);
+	/* Ensure the key is double-null-byte terminated even if this is a restartable situation.
+	 * Callers like gvcst_put rely on this (in asserts).
+	 */
+	tmpPtr += expKeyUnCmpLen;
+	*tmpPtr-- = KEY_DELIMITER;
+	*tmpPtr-- = KEY_DELIMITER;
+	if (KEY_DELIMITER == *tmpPtr)
+	{	/* A valid key should have a non-null byte before the terminating 2-null-bytes.
+		 * If not, the block must have been concurrently modified. So restart.
+		 */
+		return cdb_sc_mkblk;
 	}
+	return cdb_sc_normal;
 }
+
+#define GVCST_EXPAND_CURR_KEY
+#include "gvcst_expand_key.h"	/* Defines the function "gvcst_expand_curr_key" */ /* BYPASSOK : intentional duplicate include. */
+
+#undef GVCST_EXPAND_CURR_KEY
+
+#define GVCST_EXPAND_PREV_KEY
+#include "gvcst_expand_key.h"	/* Defines the function "gvcst_expand_prev_key" */ /* BYPASSOK : intentional duplicate include. */
+#undef GVCST_EXPAND_PREV_KEY
+
diff --git a/sr_port/gvcst_expand_key.h b/sr_port/gvcst_expand_key.h
index 1cc696c..e476e9f 100644
--- a/sr_port/gvcst_expand_key.h
+++ b/sr_port/gvcst_expand_key.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,5 +14,163 @@
 #define GVCST_EXPAND_KEY_INCLUDED
 
 enum cdb_sc gvcst_expand_key(blk_hdr_ptr_t bp, int4 rec_top, gv_key *key);
+enum cdb_sc gvcst_expand_curr_key(srch_blk_status *pStat, gv_key *srch_key, gv_key *exp_key);
+enum cdb_sc gvcst_expand_prev_key(srch_blk_status *pStat, gv_key *srch_key, gv_key *exp_key);
+
+GBLREF	sgmnt_data_ptr_t	cs_data;
 
 #endif /* GVCST_EXPAND_KEY_INCLUDED */
+
+#if (defined(GVCST_EXPAND_CURR_KEY) || defined(GVCST_EXPAND_PREV_KEY))
+#	ifdef GVCST_EXPAND_CURR_KEY
+	/* Determine the uncompressed key at pStat->curr_rec.offset after a block search using srch_key has filled in
+	 * pStat->curr_rec. The uncompressed key is stored in "exp_key".
+	 */
+	enum cdb_sc	gvcst_expand_curr_key(srch_blk_status *pStat, gv_key *srch_key, gv_key *exp_key)
+#	endif
+#	ifdef GVCST_EXPAND_PREV_KEY
+	/* Determine the uncompressed key at pStat->prev_rec.offset after a block search using srch_key has filled in
+	 * pStat->prev_rec. The uncompressed key is stored in "exp_key".
+	 */
+	enum cdb_sc	gvcst_expand_prev_key(srch_blk_status *pStat, gv_key *srch_key, gv_key *exp_key)
+#	endif
+{
+	int		tmpCmpc, match, offset, keyend;
+	rec_hdr_ptr_t	rp;
+	sm_uc_ptr_t	buffaddr;
+	unsigned char	*dstBase, *dstEnd, *dstTop;	/* exp_key  related variables */
+	unsigned char	*src;				/* srch_key related variables */
+	unsigned char	ch;
+#	ifdef GVCST_EXPAND_CURR_KEY
+	boolean_t	fullmatch;
+#	endif
+#	ifdef DEBUG
+	boolean_t	match_adjusted = FALSE;
+#	endif
+
+	/* Since searching for "srch_key" landed us in between pStat->prev_rec and pStat->curr_rec, we are guaranteed that
+	 * pStat->curr_rec.match >= record-compression-count-at-pStat->curr_rec.offset (or else the search would not have
+	 * terminated in between prev_rec and curr_rec). This means we can get all the compressed bytes of the key at
+	 * curr_rec from srch_key and get the uncompressed bytes from the actual record.
+	 */
+	buffaddr = pStat->buffaddr;
+#	ifdef GVCST_EXPAND_PREV_KEY
+	offset = pStat->prev_rec.offset;
+	if (SIZEOF(blk_hdr) > offset)
+	{
+		assert(0 == offset);
+		return cdb_sc_badoffset; /* prev_key not in current block but in left sibling block. Return */
+	}
+	match = pStat->prev_rec.match;
+#	endif
+#	ifdef GVCST_EXPAND_CURR_KEY
+	offset = pStat->curr_rec.offset;
+	match = pStat->curr_rec.match;
+#	endif
+	assert(SIZEOF(blk_hdr) <= offset);
+	rp = (rec_hdr_ptr_t)(buffaddr + offset);
+	EVAL_CMPC2(rp, tmpCmpc);
+	if (tmpCmpc > match)
+	{
+#		ifdef GVCST_EXPAND_PREV_KEY
+		/* We cannot determine the uncompressed prev_key based only on prev_rec.match and srch_key.
+		 * Need to go the full-blown route.
+		 */
+		return gvcst_expand_key((blk_hdr_ptr_t)buffaddr, offset, exp_key);
+#		endif
+#		ifdef GVCST_EXPAND_CURR_KEY
+		/* This means the block changed since we did the search. Return abnormal status so retry occurs. */
+		return cdb_sc_blkmod;
+#		endif
+	}
+	/* Get all compressed bytes of exp_key from srch_key and get the uncompressed bytes from actual record */
+	dstBase = dstEnd = exp_key->base;
+	dstTop = &dstBase[exp_key->top];
+	keyend = srch_key->end;
+	assert(2 <= keyend);	/* Need at least one non-zero byte to start and a zero byte to end key */
+#	ifdef GVCST_EXPAND_PREV_KEY
+	assert(match != (keyend + 1));	/* Can have a full-match only on curr_key, not on prev_key */
+#	endif
+	src = srch_key->base;
+#	ifdef GVCST_EXPAND_CURR_KEY
+	if (match == (keyend + 1))
+	{	/* Full match. Return srch_key */
+		fullmatch = TRUE;
+		match = keyend + 1;
+	} else
+	{
+		fullmatch = FALSE;
+#	endif
+		assert(match <= keyend);
+		/* If last matching byte in key is \0, back off one byte while copying from srch_key. Otherwise, the
+		 * logic to check for double KEY_DELIMITER sequence below will get confused.
+		 */
+		if ((match > tmpCmpc) && (KEY_DELIMITER == src[match - 1]))
+		{
+			match--;
+			DEBUG_ONLY(match_adjusted = TRUE;)
+		}
+#	ifdef GVCST_EXPAND_CURR_KEY
+	}
+#	endif
+	if (dstEnd + match >= dstTop)
+	{
+		assert(CDB_STAGNATE > t_tries);
+		return cdb_sc_keyoflow;
+	}
+	memcpy(dstEnd, src, match);
+#	ifdef GVCST_EXPAND_CURR_KEY
+	if (fullmatch)
+		match--;
+#	endif
+	dstEnd += match;
+#	ifdef GVCST_EXPAND_CURR_KEY
+	if (!fullmatch)
+	{
+#	endif
+		src = ((sm_uc_ptr_t)(rp + 1)) + (match - tmpCmpc);
+		dstTop--;	/* to check for double KEY_DELIMITER byte sequence without exceeding buffer allocation bounds */
+		assert((dstEnd == dstBase) || (KEY_DELIMITER != *(dstEnd - 1)) || ((match == tmpCmpc) && !match_adjusted));
+		for ( ; ; )
+		{
+			if (dstEnd >= dstTop)
+			{
+				assert(CDB_STAGNATE > t_tries);
+				return cdb_sc_keyoflow;
+			}
+			*dstEnd++ = ch = *src++;
+			if ((KEY_DELIMITER == ch) && (KEY_DELIMITER == (ch = *src)))
+			{
+				*dstEnd = ch;
+				break;
+			}
+		}
+#	ifdef GVCST_EXPAND_CURR_KEY
+	}
+#	endif
+	if (KEY_DELIMITER == *dstBase)
+	{	/* A valid key wouldn't start with a '\0' character. So the block must have been concurrently modified. */
+		return cdb_sc_mkblk;
+	}
+	exp_key->end = dstEnd - dstBase;
+	assert(2 <= exp_key->end);
+	/* Ensure the key is double-null-byte terminated even if this is a restartable situation.
+	 * Callers like gvcst_put rely on this (in asserts).
+	 */
+	*dstEnd-- = KEY_DELIMITER;
+	*dstEnd-- = KEY_DELIMITER;
+	if (KEY_DELIMITER == *dstEnd)
+	{	/* A valid key should have a non-null byte before the terminating 2-null-bytes.
+		 * If not, the block must have been concurrently modified. So restart.
+		 */
+		return cdb_sc_mkblk;
+	}
+	/* exp_key->prev is not initialized. Caller should not rely on this. */
+	/* Due to concurrency issues, it is possible "exp_key" is not a well-formed key (e.g. it might have two successive
+	 * KEY_DELIMITER bytes in the middle of the key). So we cannot add a DBG_CHECK_GVKEY_VALID(exp_key) here.
+	 * But we expect later validation to catch this and restart the transaction (without affecting db integrity).
+	 * So we dont worry about such keys here.
+	 */
+	return cdb_sc_normal;
+}
+#endif /* (defined(GVCST_EXPAND_CURR_KEY) || defined(GVCST_EXPAND_PREV_KEY)) */
diff --git a/sr_port/gvcst_init.c b/sr_port/gvcst_init.c
index a27882e..5d723e9 100644
--- a/sr_port/gvcst_init.c
+++ b/sr_port/gvcst_init.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -655,30 +656,6 @@ void gvcst_init(gd_region *greg)
 			(TREF(gbuff_limit)).str.addr = malloc(SIZEOF(REORG_GBUFF_LIMIT));
 			memcpy((TREF(gbuff_limit)).str.addr, REORG_GBUFF_LIMIT, SIZEOF(REORG_GBUFF_LIMIT));
 		}
-		if ((0 != (TREF(gbuff_limit)).str.len) PRO_ONLY(&& mu_reorg_process))	/* if reorg or dbg apply env var */
-		{
-			reg_nam_mval.str.len = greg->rname_len;
-			reg_nam_mval.str.addr = (char *)&greg->rname;
-			op_view(VARLSTCNT(3) &literal_poollimit, &reg_nam_mval, &(TREF(gbuff_limit)));
-#			ifdef DEBUG
-			if (!mu_reorg_process)		/* in dbg, randomize sizes to get test coverage */
-			{
-				if ((process_id & 1) ^ csa->regnum)
-				{
-					csa->gbuff_limit ^= process_id;
-					csa->gbuff_limit &= ((csd->n_bts / 2) - 1);
-				} else
-					csa->gbuff_limit = 0;
-			}
-			if (process_id & 2)		/* also randomize our_midnite */
-			{
-				csa->our_midnite = csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets;
-				csa->our_midnite += (process_id & (csd->n_bts - 1));
-				assert((csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets + csd->n_bts)
-					> csa->our_midnite);
-			}
-#			endif
-		}
 	}
 	if ((dba_bg == greg_acc_meth) || (dba_mm == greg_acc_meth))
 	{
@@ -736,6 +713,30 @@ void gvcst_init(gd_region *greg)
 		DBG_CHECK_TP_REG_LIST_SORTING(tp_reg_list);
 		TREF(max_fid_index) = max_fid_index;
 	}
+	if ((mu_reorg_process DEBUG_ONLY(|| IS_GTM_IMAGE)) && (0 != (TREF(gbuff_limit)).str.len) )
+	{	/* if reorg or dbg apply env var */
+		reg_nam_mval.str.len = greg->rname_len;
+		reg_nam_mval.str.addr = (char *)&greg->rname;
+		op_view(VARLSTCNT(3) &literal_poollimit, &reg_nam_mval, &(TREF(gbuff_limit)));
+#		ifdef DEBUG
+		if (!mu_reorg_process)		/* in dbg, randomize sizes to get test coverage */
+		{
+			if ((process_id & 1) ^ csa->regnum)
+			{
+				csa->gbuff_limit ^= process_id;
+				csa->gbuff_limit &= ((csd->n_bts / 2) - 1);
+			} else
+				csa->gbuff_limit = 0;
+		}
+		if (process_id & 2)		/* also randomize our_midnite */
+		{
+			csa->our_midnite = csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets;
+			csa->our_midnite += (process_id & (csd->n_bts - 1));
+			assert((csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets + csd->n_bts)
+				> csa->our_midnite);
+		}
+#		endif
+	}
 #	ifdef UNIX
 	if (pool_init && REPL_ALLOWED(csd) && jnlpool_init_needed)
 	{
diff --git a/sr_port/gvcst_kill.c b/sr_port/gvcst_kill.c
index 963f3d3..f5d295f 100644
--- a/sr_port/gvcst_kill.c
+++ b/sr_port/gvcst_kill.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -287,10 +288,20 @@ void	gvcst_kill2(boolean_t do_subtree, boolean_t *span_status, boolean_t killing
 		/* No trigger ^#t reads needed if skip_dbtriggers is TRUE (e.g. mupip load etc.) */
 		if (!skip_dbtriggers)
 		{
+			gvt_root = gv_target->root;	/* store root before macro call to later compare */
 			GVTR_INIT_AND_TPWRAP_IF_NEEDED(csa, csd, gv_target, gvt_trigger, lcl_implicit_tstart, is_tpwrap,
 							ERR_GVKILLFAIL);
 			assert(gvt_trigger == gv_target->gvt_trigger);
+			if (gvt_root && (0 == gv_target->root))
+			{	/* gv_target->root was non-zero BEFORE call to "gvtr_init" (as part of GVTR_INIT_... macro above)
+				 * but zero AFTER the call. This is possible only if it restarted internally due to a concurrent
+				 * online rollback or reorg truncate that moved GVT root blocks. Refetch gv_target->root.
+				 */
+				assert(dollar_tlevel && t_tries && lcl_implicit_tstart);
+				want_root_search = TRUE;
+			}
 		}
+		assert((0 != gv_target->root) || want_root_search || gv_play_duplicate_kills);
 		/* finish off any pending root search from previous retry */
 		REDO_ROOT_SEARCH_IF_NEEDED(want_root_search, cdb_status);
 		if (cdb_sc_normal != cdb_status)
@@ -797,7 +808,8 @@ research:
 			 * the "left hand" key, and therefore, the original curr.offset should be left untouched.
 			 */
 			gvt_hist->h[0].curr_rec.match = alt_hist->h[0].curr_rec.match;
-			COPY_CURRKEY_TO_GVTARGET_CLUE(gv_target, gv_altkey);
+			assert(!TREF(expand_prev_key));	/* this ensures it is safe to use EXPAND_PREV_KEY_FALSE below */
+			COPY_CURR_AND_PREV_KEY_TO_GVTARGET_CLUE(gv_target, gv_altkey, EXPAND_PREV_KEY_FALSE);
 		}
 		NON_GTMTRIG_ONLY(assert(lcl_dollar_tlevel == dollar_tlevel));
 		if (!lcl_dollar_tlevel)
diff --git a/sr_port/gvcst_kill_blk.c b/sr_port/gvcst_kill_blk.c
index 01a4735..291243a 100644
--- a/sr_port/gvcst_kill_blk.c
+++ b/sr_port/gvcst_kill_blk.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -81,6 +82,7 @@ enum cdb_sc	gvcst_kill_blk(srch_blk_status	*blkhist,
 	off_chain			chain1, curr_chain, prev_chain;
 	block_id			blk;
 	sm_uc_ptr_t			buffer;
+	srch_blk_status			*t1;
 
 	*cseptr = NULL;
 	if (low.offset == high.offset)
@@ -133,7 +135,20 @@ enum cdb_sc	gvcst_kill_blk(srch_blk_status	*blkhist,
 			if (!gv_target->hist.h[level + 1].blk_num)
 				kill_root = TRUE;
 			else
+			{	/* We are about to free up the contents of this entire block. If this block corresponded to
+				 * a global that has NOISOLATION turned on and has a non-zero recompute list (i.e. some SETs
+				 * already happened in this same TP transaction), make sure we disable the NOISOLATION
+				 * optimization in this case as that is applicable only if one or more SETs happened in this
+				 * data block and NOT if a KILL happens. Usually this is done by a t_write(GDS_WRITE_KILLTN)
+				 * call but since in this case the entire block is being freed, "t_write" wont be invoked
+				 * so we need to explicitly set GDS_WRITE_KILLTN like t_write would have (GTM-8269).
+				 */
+				t1 = blkhist->first_tp_srch_status ? blkhist->first_tp_srch_status : blkhist;
+				cse = t1->cse;
+				if ((NULL != cse) && cse->recompute_list_head)
+					cse->write_type |= GDS_WRITE_KILLTN;
 				return cdb_sc_delete_parent;
+			}
 		}
 		del_ptr = first_in_blk;
 	} else
diff --git a/sr_port/gvcst_protos.h b/sr_port/gvcst_protos.h
index 1f6133f..dc3f312 100644
--- a/sr_port/gvcst_protos.h
+++ b/sr_port/gvcst_protos.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2004, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2004-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -47,8 +48,10 @@ boolean_t	gvcst_queryget2(mval *val, unsigned char *sn_ptr);
 enum cdb_sc	gvcst_root_search(boolean_t donot_restart);
 enum cdb_sc	gvcst_rtsib(srch_hist *full_hist, int level);
 enum cdb_sc	gvcst_search(gv_key *pKey, srch_hist *pHist);
-enum cdb_sc	gvcst_search_blk(gv_key *pKey, srch_blk_status *pStat);
+enum cdb_sc 	gvcst_search_blk(gv_key *pKey, srch_blk_status *pStat);
+enum cdb_sc	gvcst_search_blk_expand_prevkey(gv_key *pKey, srch_blk_status *pStat);
 enum cdb_sc	gvcst_search_tail(gv_key *pKey, srch_blk_status *pStat, gv_key *pOldKey);
+enum cdb_sc	gvcst_search_tail_expand_prevkey(gv_key *pKey, srch_blk_status *pStat, gv_key *pOldKey);
 
 #ifdef UNIX
 mint		gvcst_spr_data(void);
diff --git a/sr_port/gvcst_put.c b/sr_port/gvcst_put.c
index 4a42f8a..1b99f4f 100644
--- a/sr_port/gvcst_put.c
+++ b/sr_port/gvcst_put.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -436,7 +437,8 @@ void	gvcst_put2(mval *val, span_parms *parms)
 	cw_set_element		*cse, *cse_new, *old_cse;
 	gv_namehead		*save_targ, *split_targ, *dir_tree;
 	enum cdb_sc		status;
-	gv_key			*temp_key;
+	gv_key			*temp_key, *src_key;
+	static gv_key		*gv_altkey2;
 	uchar_ptr_t		subrec_ptr;
 	mstr			value;
 	off_chain		chain1, curr_chain, prev_chain, chain2;
@@ -1111,6 +1113,7 @@ tn_restart:
 						PUSH_MV_STENT(MVST_MVAL);       /* protect "value" mstr from stp gcol */
 						pval = &mv_chain->mv_st_cont.mvs_mval;
 						pval->str = value;
+						pval->mvtype = MV_STR;
 						ENSURE_STP_FREE_SPACE(data_len);
 						value = pval->str;
 						POP_MV_STENT();                 /* pval */
@@ -1564,9 +1567,19 @@ tn_restart:
 				assert(bs1[0].len <= blk_reserved_size); /* Assert that right block has space for reserved bytes */
 				assert(gv_altkey->top == gv_currkey->top);
 				assert(gv_altkey->end < gv_altkey->top);
-				temp_key = gv_altkey;
-				if (cdb_sc_normal != (status = gvcst_expand_key((blk_hdr_ptr_t)buffaddr, prev_rec_offset,
-						temp_key)))
+				if (temp_key != gv_altkey)
+				{
+					assert(temp_key == gv_currkey);
+					src_key = gv_currkey;
+					temp_key = gv_altkey;
+				} else
+				{
+					if (NULL == gv_altkey2)
+						GVKEY_INIT(gv_altkey2, gv_keysize);
+					COPY_KEY(gv_altkey2, temp_key);
+					src_key = gv_altkey2;
+				}
+				if (cdb_sc_normal != (status = gvcst_expand_prev_key(bh, src_key, temp_key)))
 					GOTO_RETRY;
 			} else
 			{	/* Insert in left hand (new) block */
@@ -1714,9 +1727,19 @@ tn_restart:
 				{
 					assert(gv_altkey->top == gv_currkey->top);
 					assert(gv_altkey->end < gv_altkey->top);
-					temp_key = gv_altkey;
-					if (cdb_sc_normal !=
-						(status = gvcst_expand_key((blk_hdr_ptr_t)buffaddr, curr_rec_offset, temp_key)))
+					if (temp_key != gv_altkey)
+					{
+						assert(temp_key == gv_currkey);
+						src_key = gv_currkey;
+						temp_key = gv_altkey;
+					} else
+					{
+						if (NULL == gv_altkey2)
+							GVKEY_INIT(gv_altkey2, gv_keysize);
+						COPY_KEY(gv_altkey2, temp_key);
+						src_key = gv_altkey2;
+					}
+					if (cdb_sc_normal != (status = gvcst_expand_curr_key(bh, src_key, temp_key)))
 						GOTO_RETRY;
 				} else if (temp_key != gv_altkey)
 				{
@@ -2243,7 +2266,12 @@ tn_restart:
 			assert(1 <= temp_key->end);
 			assert(KEY_DELIMITER == temp_key->base[temp_key->end]);
 			assert(KEY_DELIMITER == temp_key->base[temp_key->end - 1]);
-			assert((2 > temp_key->end) || (KEY_DELIMITER != temp_key->base[temp_key->end - 2]));
+			if ((2 <= temp_key->end) && (KEY_DELIMITER == temp_key->base[temp_key->end - 2]))
+			{
+				assert(CDB_STAGNATE > t_tries);
+				status = cdb_sc_mkblk;
+				GOTO_RETRY;
+			}
 			bq = bh + 1;
 			if (HIST_TERMINATOR != bq->blk_num)
 			{	/* Not root;  write blocks and continue */
diff --git a/sr_port/gvcst_query.c b/sr_port/gvcst_query.c
index 27378fb..bc353f5 100644
--- a/sr_port/gvcst_query.c
+++ b/sr_port/gvcst_query.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -132,13 +133,13 @@ boolean_t	gvcst_query2(void)
 	for (;;)
 	{
 		two_histories = FALSE;
-#if defined(DEBUG) && defined(UNIX)
+#		if defined(DEBUG) && defined(UNIX)
 		if (gtm_white_box_test_case_enabled && (WBTEST_ANTIFREEZE_GVQUERYFAIL == gtm_white_box_test_case_number))
 		{
 			t_retry(cdb_sc_blknumerr);
 			continue;
 		}
-#endif
+#		endif
 		if (cdb_sc_normal == (status = gvcst_search(gv_currkey, 0)))
 		{
 			found = TRUE;
@@ -174,8 +175,7 @@ boolean_t	gvcst_query2(void)
 			{	/* !found indicates that the end of tree has been reached (see call to
 				 *  gvcst_rtsib).  If there is no more tree, don't bother doing expansion.
 				 */
-				status = gvcst_expand_key((blk_hdr_ptr_t)bh->buffaddr, (int4)((sm_uc_ptr_t)rp - bh->buffaddr),
-						gv_altkey);
+				status = gvcst_expand_curr_key(bh, gv_currkey, gv_altkey);
 				if (cdb_sc_normal != status)
 				{
 					t_retry(status);
@@ -201,15 +201,13 @@ boolean_t	gvcst_query2(void)
 			{
 				c1 = &gv_altkey->base[0];
 				c2 = &gv_currkey->base[0];
-				for (;  *c2;)
+				for ( ; *c2; )
 				{
 					if (*c2++ != *c1++)
 						break;
 				}
 				if (!*c2 && !*c1)
-				{
 					return TRUE;
-				}
 			}
 			return FALSE;
 		}
diff --git a/sr_port/gvcst_queryget.c b/sr_port/gvcst_queryget.c
index 4aca04c..e2b4f48 100644
--- a/sr_port/gvcst_queryget.c
+++ b/sr_port/gvcst_queryget.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -38,8 +39,8 @@
 #endif
 
 #include "gvcst_protos.h"	/* for gvcst_queryget,gvcst_search,gvcst_rtsib,gvcst_search_blk prototype */
-#include "gvcst_expand_key.h"
 #include "t_begin.h"
+#include "gvcst_expand_key.h"
 #include "t_retry.h"
 #include "t_end.h"
 
@@ -94,9 +95,12 @@ boolean_t gvcst_queryget(mval *val)
 	} else
 		sn_tpwrapped = FALSE;
 	found = gvcst_query();
-	COPY_KEY(gv_currkey, gv_altkey); /* set gv_currkey to gv_altkey */
-	found = gvcst_get(val);
-	INCR_GVSTATS_COUNTER(cs_addrs, cs_addrs->nl, n_get, (gtm_uint64_t) -1); /* only counted externally as one get */
+	if (found)
+	{
+		COPY_KEY(gv_currkey, gv_altkey); /* set gv_currkey to gv_altkey */
+		found = gvcst_get(val);
+		INCR_GVSTATS_COUNTER(cs_addrs, cs_addrs->nl, n_get, (gtm_uint64_t) -1); /* only counted externally as one get */
+	}
 	INCR_GVSTATS_COUNTER(cs_addrs, cs_addrs->nl, n_query, (gtm_uint64_t) -1);
 	if (sn_tpwrapped)
 	{
@@ -127,14 +131,14 @@ boolean_t gvcst_queryget2(mval *val, unsigned char *sn_ptr)
 	for (;;)
 	{
 		two_histories = FALSE;
-#if defined(DEBUG) && defined(UNIX)
-			if (gtm_white_box_test_case_enabled && (WBTEST_ANTIFREEZE_GVQUERYGETFAIL == gtm_white_box_test_case_number))
-			{
-				status = cdb_sc_blknumerr;
-				t_retry(status);
-				continue;
-			}
-#endif
+#		if defined(DEBUG) && defined(UNIX)
+		if (gtm_white_box_test_case_enabled && (WBTEST_ANTIFREEZE_GVQUERYGETFAIL == gtm_white_box_test_case_number))
+		{
+			status = cdb_sc_blknumerr;
+			t_retry(status);
+			continue;
+		}
+#		endif
 		if (cdb_sc_normal == (status = gvcst_search(gv_currkey, 0)))
 		{
 			found = TRUE;
@@ -171,8 +175,7 @@ boolean_t gvcst_queryget2(mval *val, unsigned char *sn_ptr)
 			 */
 			if (found)
 			{
-				status = gvcst_expand_key((blk_hdr_ptr_t)bh->buffaddr, (int4)((sm_uc_ptr_t)rp - bh->buffaddr),
-						gv_altkey);
+				status = gvcst_expand_curr_key(bh, gv_currkey, gv_altkey);
 				if (cdb_sc_normal != status)
 				{
 					t_retry(status);
diff --git a/sr_port/gvcst_search.c b/sr_port/gvcst_search.c
index 2c6a0cb..d651e2c 100644
--- a/sr_port/gvcst_search.c
+++ b/sr_port/gvcst_search.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -35,20 +36,22 @@
 #include "cws_insert.h"
 #include "gvcst_protos.h"	/* for gvcst_search_blk,gvcst_search_tail,gvcst_search prototype */
 #include "min_max.h"
+#include "gvcst_expand_key.h"
 
+GBLREF	boolean_t		mu_reorg_process;
+GBLREF	boolean_t		tp_restart_syslog;	/* for the TP_TRACE_HIST_MOD macro */
+GBLREF	char			gvcst_search_clue;
 GBLREF	gd_region		*gv_cur_region;
-GBLREF	sgmnt_addrs		*cs_addrs;
+GBLREF	gv_key			*gv_altkey;
 GBLREF	gv_namehead		*gv_target;
-GBLREF	uint4			dollar_tlevel;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF	unsigned char		rdfail_detail;
 GBLREF	sgm_info		*sgm_info_ptr;
-GBLREF	unsigned int		t_tries;
+GBLREF	sgmnt_addrs		*cs_addrs;
+GBLREF	sgmnt_data_ptr_t	cs_data;
 GBLREF	srch_blk_status		*first_tp_srch_status;	/* overriding value of srch_blk_status given by t_qread in case of TP */
 GBLREF	trans_num		local_tn;		/* transaction number for THIS PROCESS */
-GBLREF	boolean_t		tp_restart_syslog;	/* for the TP_TRACE_HIST_MOD macro */
-GBLREF	boolean_t		mu_reorg_process;
-GBLREF	char			gvcst_search_clue;
+GBLREF	uint4			dollar_tlevel;
+GBLREF	unsigned char		rdfail_detail;
+GBLREF	unsigned int		t_tries;
 
 #define	SET_GVCST_SEARCH_CLUE(X)	gvcst_search_clue = X;
 
@@ -93,7 +96,7 @@ enum cdb_sc 	gvcst_search(gv_key *pKey,		/* Key to search for */
 	assert(!dollar_tlevel || ((NULL != sgm_info_ptr) && (cs_addrs->sgm_info_ptr == sgm_info_ptr)));
 	SET_GVCST_SEARCH_CLUE(0);
 	INCR_DB_CSH_COUNTER(cs_addrs, n_gvcst_srches, 1);
-	pTargHist = (NULL == pHist ? &pTarg->hist : pHist);
+	pTargHist = ((NULL == pHist) ? &pTarg->hist : pHist);
 	/* If FINAL RETRY and TP then we can safely use clues of gv_targets that have been referenced in this
 	 * TP transaction (read_local_tn == local_tn). While that is guaranteed to be true for all updates, it
 	 * does not hold good for READs since we allow a lot more reads to be done inside a transaction compared
@@ -330,16 +333,20 @@ enum cdb_sc 	gvcst_search(gv_key *pKey,		/* Key to search for */
 				{
 					SET_GVCST_SEARCH_CLUE(1);
 					status = gvcst_search_tail(pKey, pTargHist->h, &pTarg->clue);
-					if (NULL == pHist)
-					{	/* Implies the search history is being filled in pTarg->hist so we can
-						 * safely update pTarg->clue to reflect the new search key. It is important
-						 * that this clue update be done AFTER the gvcst_search_tail invocation
-						 * (as that needs to pass the previous clue key).
-						 */
-						COPY_CURRKEY_TO_GVTARGET_CLUE(pTarg, pKey);
+					if (cdb_sc_normal == status)
+					{
+						if (NULL == pHist)
+						{	/* Implies the search history is being filled in pTarg->hist so we can
+							 * safely update pTarg->clue to reflect the new search key. It is important
+							 * that this clue update be done AFTER the gvcst_search_tail invocation
+							 * (as that needs to pass the previous clue key).
+							 */
+							COPY_CURR_AND_PREV_KEY_TO_GVTARGET_CLUE(pTarg, pKey, TREF(expand_prev_key));
+						}
+						INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_tail, 1);
+						return cdb_sc_normal;
 					}
-					INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_tail, 1);
-					return status;
+					/* Else clue is not usable. Fall through to do full traversal. */
 				}
 			} else if (0 > n1)
 			{
@@ -347,23 +354,52 @@ enum cdb_sc 	gvcst_search(gv_key *pKey,		/* Key to search for */
 				{
 					SET_GVCST_SEARCH_CLUE(3);
 					status = gvcst_search_blk(pKey, pTargHist->h);
-					if (NULL == pHist)
-					{	/* Implies the search history is being filled in pTarg->hist so we can
-						 * safely update pTarg->clue to reflect the new search key. It does not
-						 * matter if we update the clue BEFORE or AFTER the gvcst_search_blk
-						 * invocation but for consistency with the gvcst_search_tail invocation
-						 * we keep it AFTER.
-						 */
-						COPY_CURRKEY_TO_GVTARGET_CLUE(pTarg, pKey);
+					if (cdb_sc_normal == status)
+					{
+						if (NULL == pHist)
+						{	/* Implies the search history is being filled in pTarg->hist so we can
+							 * safely update pTarg->clue to reflect the new search key. It does not
+							 * matter if we update the clue BEFORE or AFTER the gvcst_search_blk
+							 * invocation but for consistency with the gvcst_search_tail invocation
+							 * we keep it AFTER.
+							 */
+							COPY_CURR_AND_PREV_KEY_TO_GVTARGET_CLUE(pTarg, pKey, TREF(expand_prev_key));
+						}
+						INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_head, 1);
+						return cdb_sc_normal;
 					}
-					INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_head, 1);
-					return status;
+					/* Else clue is not usable. Fall through to do full traversal. */
 				}
 			} else
 			{
 				SET_GVCST_SEARCH_CLUE(2);
-				INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_same, 1);
-				return cdb_sc_normal;
+				/* If $zprevious is the current operation, and we have a clue based on a prior search but
+				 * dont have a prev_key computed as part of that search (because it was not a $zprevious
+				 * operation as well), we cannot use the clue. Instead we need to fall through.
+				 */
+				if (!TREF(expand_prev_key))
+				{
+					INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_same, 1);
+					return cdb_sc_normal;
+				}
+				if ((NULL != pTarg->prev_key) && (PREV_KEY_NOT_COMPUTED != pTarg->prev_key->end))
+				{
+					COPY_KEY(gv_altkey, pTarg->prev_key);
+					INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_same, 1);
+					return cdb_sc_normal;
+				}
+				leaf_blk_hist = &pTarg->hist.h[0];
+				status = gvcst_expand_prev_key(leaf_blk_hist, &pTarg->clue, gv_altkey);
+				if (cdb_sc_normal == status)
+				{
+					COPY_PREV_KEY_TO_GVT_CLUE(pTarg, TRUE);
+					/* gv_altkey already contains the prev_key so no need to do the following.
+					 *	COPY_KEY(gv_altkey, pTarg->prev_key);
+					 */
+					INCR_DB_CSH_COUNTER(cs_addrs, n_clue_used_same, 1);
+					return cdb_sc_normal;
+				}
+				/* Else clue is not usable. Fall through to do full traversal. */
 			}
 		}
 #		ifdef DEBUG
@@ -537,7 +573,7 @@ enum cdb_sc 	gvcst_search(gv_key *pKey,		/* Key to search for */
 			*c2 = *c1;
 			DEBUG_ONLY(pTarg->last_rec->end = c2 - pTarg->last_rec->base;)
 		}
-		COPY_CURRKEY_TO_GVTARGET_CLUE(pTarg, pKey);
+		COPY_CURR_AND_PREV_KEY_TO_GVTARGET_CLUE(pTarg, pKey, TREF(expand_prev_key));
 	}
 	return cdb_sc_normal;
 }
diff --git a/sr_port/gvcst_zprevious.c b/sr_port/gvcst_zprevious.c
index d483b64..76c20cd 100644
--- a/sr_port/gvcst_zprevious.c
+++ b/sr_port/gvcst_zprevious.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -37,7 +38,6 @@
 #include "t_end.h"		/* prototypes */
 #include "t_retry.h"
 #include "t_begin.h"
-#include "gvcst_expand_key.h"
 #include "gvcst_protos.h"	/* for gvcst_lftsib,gvcst_search,gvcst_search_blk,gvcst_zprevious prototype */
 
 /* needed for spanning nodes */
@@ -115,17 +115,19 @@ boolean_t	gvcst_zprevious(void)
 
 boolean_t	gvcst_zprevious2(void)
 {
-	static gv_key	*zprev_temp_key;
-	static int4	zprev_temp_keysize = 0;
-	blk_hdr_ptr_t	bp;
 	boolean_t	found, two_histories;
 	enum cdb_sc	status;
-	rec_hdr_ptr_t	rp;
-	unsigned char	*c1, *c2, *ctop;
 	srch_blk_status	*bh;
 	srch_hist	*lft_history;
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
 	T_BEGIN_READ_NONTP_OR_TP(ERR_GVORDERFAIL);
+	TREF(expand_prev_key) = TRUE;
+	/* Note that "t_retry" usage below could transfer control out of this function if dollar_tlevel > 0. If so,
+	 * we need to remember to reset TREF(expand_prev_key) to FALSE since this zprevious action has terminated.
+	 * We do that reset in tp_restart.
+	 */
 	for (;;)
 	{
 		assert(t_tries < CDB_STAGNATE || cs_addrs->now_crit);	/* we better hold crit in the final retry (TP & non-TP) */
@@ -157,54 +159,12 @@ boolean_t	gvcst_zprevious2(void)
 					continue;
 				}
 			}
-			if (found)
-			{	/* store new subscipt */
-				assert(gv_altkey->top == gv_currkey->top);
-				assert(gv_altkey->top == gv_keysize);
-				assert(gv_currkey->end < gv_currkey->top);
-				rp = (rec_hdr_ptr_t)(bh->buffaddr + bh->prev_rec.offset);
-				bp = (blk_hdr_ptr_t)bh->buffaddr;
-				c1 = gv_altkey->base;
-				memcpy(c1, gv_currkey->base, bh->prev_rec.match);
-				c1 += bh->prev_rec.match;
-				assert(zprev_temp_keysize <= gv_keysize);
-				if (zprev_temp_keysize < gv_keysize)
-				{
-					assert(DBKEYSIZE(MAX_KEY_SZ) == gv_keysize);
-					zprev_temp_keysize = gv_keysize;
-					GVKEY_INIT(zprev_temp_key, zprev_temp_keysize);
-				}
-				assert(zprev_temp_key->top >= gv_currkey->top);
-				if (cdb_sc_normal != (status = gvcst_expand_key((blk_hdr_ptr_t)bh->buffaddr, bh->prev_rec.offset,
-									zprev_temp_key)))
-				{
-					t_retry(status);
-					continue;
-				}
-				if ((zprev_temp_key->end < gv_currkey->end) && (zprev_temp_key->end <= gv_currkey->prev))
-					found = FALSE;
-				else
-				{
-					c2 = zprev_temp_key->base + bh->prev_rec.match;
-					ctop = zprev_temp_key->base + zprev_temp_key->end;
-					for (;;)
-					{
-						if (c2 >= ctop)
-						{
-							assert(CDB_STAGNATE > t_tries);
-							status = cdb_sc_rmisalign;
-							goto restart;	/* goto needed because of nested FOR loop */
-						}
-	 					if (0 == (*c1++ = *c2++))
-						{
-							*c1 = 0;
-							break;
-						}
-					}
-				}
-				gv_altkey->end = c1 - gv_altkey->base;
-				assert(gv_altkey->end < gv_altkey->top);
-			}
+			assert(gv_altkey->top == gv_currkey->top);
+			assert(gv_altkey->top == gv_keysize);
+			assert(gv_currkey->end < gv_currkey->top);
+			assert(gv_altkey->end < gv_altkey->top);
+			if ((gv_altkey->end < gv_currkey->end) && (gv_altkey->end <= gv_currkey->prev))
+				found = FALSE;
 			if (!dollar_tlevel)
 			{
 				if ((trans_num)0 == t_end(&gv_target->hist, two_histories ? lft_history : NULL, TN_NOT_SPECIFIED))
@@ -220,8 +180,9 @@ boolean_t	gvcst_zprevious2(void)
 			}
 			assert(cs_data == cs_addrs->hdr);
 			INCR_GVSTATS_COUNTER(cs_addrs, cs_addrs->nl, n_zprev, 1);
+			TREF(expand_prev_key) = FALSE;
 			return (found && (bh->prev_rec.match >= gv_currkey->prev));
 		}
-restart:	t_retry(status);
+		t_retry(status);
 	}
 }
diff --git a/sr_port/gvn.c b/sr_port/gvn.c
index 4bfcd02..db7e6c3 100644
--- a/sr_port/gvn.c
+++ b/sr_port/gvn.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,7 +32,7 @@ error_def(ERR_SIDEEFFECTEVAL);
 
 int gvn(void)
 {
-	boolean_t	parse_status, shifting, vbar;
+	boolean_t	in_select = FALSE, parse_status, shifting, vbar;
 	char		x;
 	int		hash_code;
 	opctype		ox;
@@ -44,7 +45,7 @@ int gvn(void)
 	advancewindow();
 	sb1 = sb2 = subscripts;
 	ox = 0;
-	if (shifting = (TREF(shift_side_effects) && (!TREF(saw_side_effect) || (GTM_BOOL == TREF(gtm_fullbool)
+	if (shifting = (TREF(shift_side_effects) && (!TREF(saw_side_effect) || ((GTM_BOOL == TREF(gtm_fullbool))
 		&& (OLD_SE == TREF(side_effect_handling))))))
 	{	/* NOTE assignment above */
 		dqinit(&tmpchain, exorder);
@@ -53,7 +54,7 @@ int gvn(void)
 	if ((TK_LBRACKET == TREF(window_token)) || (TK_VBAR == TREF(window_token)))
 	{
 		assert(sb2 == sb1);
-		/* set "hash_code" as the first operand so OC_GVEXTNAM has it passed in at same spot as op_gvname */
+		/* Set "hash_code" as the first operand so OC_GVEXTNAM has it passed in at same spot as op_gvname */
 		sb1++;
 		vbar = (TK_VBAR == TREF(window_token));
 		advancewindow();
@@ -101,7 +102,7 @@ int gvn(void)
 			ox = OC_GVNAME;
 			*sb1++ = put_ilit((mint)hash_code);
 		} else
-			*sb2 = put_ilit((mint)hash_code);	/* fill in hash_code in the space previously set aside */
+			*sb2 = put_ilit((mint)hash_code);	/* Fill in hash_code in the space previously set aside */
 		*sb1++ = put_str((TREF(window_ident)).addr, (TREF(window_ident)).len);
 		advancewindow();
 	} else
@@ -120,7 +121,7 @@ int gvn(void)
 			return FALSE;
 		}
 		ox = OC_GVNAKED;
-		/* pass in a dummy hash_code in case of OC_GVNAKED. We need this so op_gvname_fast, op_gvextnam_fast and
+		/* Pass in a dummy hash_code in case of OC_GVNAKED. We need this so op_gvname_fast, op_gvextnam_fast and
 		 * op_gvnaked_fast have the same call interface. op_savgvn.c relies on this to replace OC_GVNAME, OC_GVEXTNAM
 		 * or OC_GVNAKED opcodes with a OC_SAVGVN opcode.
 		 */
@@ -168,8 +169,11 @@ int gvn(void)
 	SUBS_ARRAY_2_TRIPLES(ref, sb1, sb2, subscripts, 0);
 	if (shifting)
 	{
-		if (TREF(saw_side_effect) && ((GTM_BOOL != TREF(gtm_fullbool)) || (OLD_SE != TREF(side_effect_handling))))
-		{	/* saw a side effect in a subscript - time to stop shifting */
+		if (NULL == TREF(expr_start))
+			TREF(saw_side_effect) = in_select = TRUE;	/* Special case relied on by f_select */
+		if (in_select
+			|| (TREF(saw_side_effect) && ((GTM_BOOL != TREF(gtm_fullbool)) || (OLD_SE != TREF(side_effect_handling)))))
+		{	/* Saw a side effect in a subscript - time to stop shifting */
 			setcurtchain(oldchain);
 			triptr = (TREF(curtchain))->exorder.bl;
 			dqadd(triptr, &tmpchain, exorder);
diff --git a/sr_port/hashtab.h b/sr_port/hashtab.h
index 8c7029c..36104de 100644
--- a/sr_port/hashtab.h
+++ b/sr_port/hashtab.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -67,13 +68,12 @@
 
 /* For string hashing, ELF hash was found to be the best during the V5.0-000 longnames project.
  * During V6.2-001, Murmur3 hash was found to be much better than ELF in terms of # of collisions.
- * So we are going with MMR hash for now in Unix. In VMS, we dont yet have mmrhash.c so we continue
- * to use ELF hash there (no point spending time to move mmrhash.c from sr_unix to sr_port).
- * In addition, the 32-bit murmur3 hash gives different values for the same input on different endian
- * machines which would not work at least for triggers since we expect the trigger definition M code to
- * hash to the same value on different endian machines (this is needed so mupip endiancvt does not need
- * to worry about changing ^#t(.*TRHASH.*) nodes. Therefore we came up with a modified 32-bit murmur3 hash
- * implementation that is endian independent (gtmmrhash_32).
+ * So we are going with MMR hash for now. In addition, the 32-bit murmur3 hash reference implementation
+ * we used gives different values for the same input on different endian machines which would not work
+ * at least for triggers since we expect the trigger definition M code to hash to the same value on
+ * different endian machines (this is needed so mupip endiancvt does not need to worry about changing
+ * ^#t(.*TRHASH.*) nodes. Therefore we came up with a modified 32-bit murmur3 hash
+ * implementation that is endian independent (gtmmrhash_32). See mmrhash.c for details.
  */
 #ifdef UNIX
 #include "mmrhash.h"
diff --git a/sr_port/have_crit.h b/sr_port/have_crit.h
index 83baf05..82a1a08 100644
--- a/sr_port/have_crit.h
+++ b/sr_port/have_crit.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -62,6 +63,7 @@ typedef enum
 	INTRPT_IN_FORK_OR_SYSTEM,	/* Deferring interrupts in fork or system. */
 	INTRPT_IN_FSTAT,		/* Deferring interrupts in fstat. */
 	INTRPT_IN_TLS_FUNCTION,		/* Deferring interrupts in TLS functions. */
+	INTRPT_IN_CONDSTK,		/* Deferring interrupts during condition handler stack manipulations */
 	INTRPT_NUM_STATES		/* Should be the *last* one in the enum */
 } intrpt_state_t;
 
diff --git a/sr_port/indirection.c b/sr_port/indirection.c
index 75ccac1..0403639 100644
--- a/sr_port/indirection.c
+++ b/sr_port/indirection.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -62,7 +63,9 @@ int indirection(oprtype *a)
 	{
 		(TREF(indirection_mval)).mvtype = 0;
 		(TREF(indirection_mval)).str.len = 0;
-		do {
+		CLEAR_MVAL_BITS(TADR(indirection_mval));
+		do
+		{
 			start = lexical_ptr;
 			advancewindow();
 			if (TK_LPAREN != TREF(window_token))
diff --git a/sr_port/ins_errtriple.c b/sr_port/ins_errtriple.c
index 6b0ab18..057ff52 100644
--- a/sr_port/ins_errtriple.c
+++ b/sr_port/ins_errtriple.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,7 +26,7 @@ void ins_errtriple(int4 in_error)
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
-	if (!IS_STX_WARN(in_error) GTMTRIG_ONLY( || TREF(trigger_compile)))
+	if (!IS_STX_WARN(in_error) GTMTRIG_ONLY( || TREF(trigger_compile_and_link)))
 	{	/* Not a warning and not a trigger, we have a real error (warnings become errors in triggers) */
 		if (TREF(curtchain) != &t_orig)
 		{	/* If working with more than 1 chain defer until back to 1 because dqdelchain cannot delete across
@@ -40,7 +41,7 @@ void ins_errtriple(int4 in_error)
 		add_rterror_triple = (OC_RTERROR != x->exorder.fl->opcode);
 		if (!add_rterror_triple)
 		{	/* This is the second error in this line/cmd. Check for triples added after OC_RTERROR and remove them
-			 * as there could be dangling references amongst them which could later cause GTMASSERT in emit_code.
+			 * as there could be dangling references amongst them which could later cause assertpro() in emit_code.
 			 */
 			x = x->exorder.fl;
 			assert(OC_RTERROR == x->opcode);/* corresponds to newtriple(OC_RTERROR) in previous ins_errtriple */
diff --git a/sr_port/io.h b/sr_port/io.h
index c1e0e22..cc472e7 100644
--- a/sr_port/io.h
+++ b/sr_port/io.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -345,6 +346,7 @@ void get_dlr_zkey(mval *v);
 
 
 void flush_pio(void);
+void write_text_newline_and_flush_pio(mstr *text);
 
 void remove_rms(io_desc *ciod);
 void iosocket_destroy(io_desc *ciod);
@@ -422,4 +424,51 @@ LITREF unsigned char ebcdic_spaces_block[];
 }
 #define SET_ENCODING(CHSET, CHSET_MSTR)	SET_ENCODING_VALIDATE(CHSET, CHSET_MSTR,)
 
+/* Establish a GT.M I/O condition handler if one is not already active and the principal device is the current one. */
+#define ESTABLISH_GTMIO_CH(IOD, SET_CH)												\
+{																\
+	GBLREF io_pair		io_std_device;											\
+	GBLREF boolean_t	in_prin_gtmio;											\
+																\
+	if ((&gtmio_ch != active_ch->ch) && (NULL != (IOD)->out)								\
+			&& (NULL != io_std_device.out) && ((IOD)->out == io_std_device.out))					\
+	{															\
+		ESTABLISH(gtmio_ch);												\
+		SET_CH = TRUE;													\
+		in_prin_gtmio = TRUE;												\
+	} else															\
+		SET_CH = FALSE;													\
+}
+
+/* Establish a GT.M I/O condition handler with return if one is not already active and the principal device is the current one. */
+#define ESTABLISH_RET_GTMIO_CH(IOD, VALUE, SET_CH)										\
+{																\
+	GBLREF io_pair		io_std_device;											\
+	GBLREF boolean_t	in_prin_gtmio;											\
+																\
+	if ((&gtmio_ch != active_ch->ch) && (NULL != (IOD)->out)								\
+			&& (NULL != io_std_device.out) && ((IOD)->out == io_std_device.out))					\
+	{															\
+		ESTABLISH_RET(gtmio_ch, VALUE);											\
+		SET_CH = TRUE;													\
+		in_prin_gtmio = TRUE;												\
+	} else															\
+		SET_CH = FALSE;													\
+}
+
+/* Revert a GT.M I/O condition handler if one was set (based on the passed argument). */
+#define REVERT_GTMIO_CH(IOD, SET_CH)												\
+{																\
+	GBLREF boolean_t		in_prin_gtmio;										\
+	DEBUG_ONLY(GBLREF io_pair	io_std_device;)										\
+																\
+	if (SET_CH)														\
+	{															\
+		assert((&gtmio_ch == active_ch->ch) && (NULL != (IOD)->out)							\
+			&& (NULL != io_std_device.out) && ((IOD)->out == io_std_device.out));					\
+		in_prin_gtmio = FALSE;												\
+		REVERT;														\
+	}															\
+}
+
 #endif /* IO_H */
diff --git a/sr_port/iorm_wtff.c b/sr_port/iorm_wtff.c
index 7eef14a..f643ca1 100644
--- a/sr_port/iorm_wtff.c
+++ b/sr_port/iorm_wtff.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -11,21 +12,27 @@
 
 #include "mdef.h"
 #include "io.h"
+#include "iormdef.h"
+#include "error.h"
 
-#define FORM_FEED "\014"
-GBLREF io_pair		io_curr_device;
+#define	FORM_FEED	"\014"
+
+GBLREF	io_pair		io_curr_device;
 
 void iorm_wtff(void)
 {
 	mstr		temp;
 	io_desc		*iod;
+	boolean_t	ch_set;
 
 	iod = io_curr_device.out;
-	iorm_flush(iod);
+	ESTABLISH_GTMIO_CH(&io_curr_device, ch_set);
+	iorm_cond_wteol(iod);
 	temp.len = SIZEOF(FORM_FEED) - 1;
 	temp.addr = FORM_FEED;
 	iorm_write(&temp);
-	iorm_wteol(1,iod);
+	iorm_wteol(1, iod);
 	iod->dollar.x = 0;
 	iod->dollar.y = 0;
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 }
diff --git a/sr_port/iosocket_close.c b/sr_port/iosocket_close.c
index 2629caa..594add9 100644
--- a/sr_port/iosocket_close.c
+++ b/sr_port/iosocket_close.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -40,6 +41,7 @@
 #ifdef GTM_TLS
 #include "gtm_tls.h"
 #endif
+#include "error.h"
 
 GBLREF	io_desc		*active_device;
 GBLREF	int		process_exiting;
@@ -68,9 +70,11 @@ void iosocket_close(io_desc *iod, mval *pp)
 	int		p_offset = 0;
 	boolean_t	socket_destroy = FALSE;
 	boolean_t	socket_delete = FALSE;
+	boolean_t	ch_set;
 
 	assert(iod->type == gtmsocket);
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 
 	while (iop_eol != (ch = *(pp->str.addr + p_offset++)))
 	{
@@ -150,6 +154,7 @@ void iosocket_close(io_desc *iod, mval *pp)
 			iosocket_destroy(iod);
 		}
 	}
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 }
 
 void iosocket_close_range(d_socket_struct *dsocketptr, int start, int end, boolean_t socket_delete, boolean_t socket_specified)
diff --git a/sr_port/iosocket_create.c b/sr_port/iosocket_create.c
index 708f2e1..eb8657e 100644
--- a/sr_port/iosocket_create.c
+++ b/sr_port/iosocket_create.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -280,21 +281,13 @@ socket_struct *iosocket_create(char *sockaddr, uint4 bfsize, int file_des, boole
 		if (-1 == getsockname(socketptr->sd, SOCKET_LOCAL_ADDR(socketptr), &tmp_addrlen))
 		{
 			save_errno = errno;
-#			if !defined(__linux__) && !defined(VMS)
-			if ((EOPNOTSUPP == save_errno)
-#				if defined(_AIX)
-				|| (ENOTCONN == save_errno)
-#				endif
-#				if defined(__sun) || defined(__hpux)
-				|| (EINVAL == save_errno)
-#				endif
-				)
+#			if !defined(VMS)
+			if (IS_SOCKNAME_UNIXERROR(save_errno))
 			{
 				SOCKET_LOCAL_ADDR(socketptr)->sa_family = AF_UNIX;
 				((struct sockaddr_un *)SOCKET_LOCAL_ADDR(socketptr))->sun_path[0] = '\0';
 				tmp_addrlen = SIZEOF(struct sockaddr_un);
-			}
-			else
+			} else
 #			endif
 			{
 				errptr = (char *)STRERROR(save_errno);
diff --git a/sr_port/iosocket_flush.c b/sr_port/iosocket_flush.c
index d4cace2..9c2927a 100644
--- a/sr_port/iosocket_flush.c
+++ b/sr_port/iosocket_flush.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -22,6 +23,7 @@
 #include "io.h"
 #include "gt_timer.h"
 #include "iosocketdef.h"
+#include "error.h"
 
 error_def(ERR_CURRSOCKOFR);
 error_def(ERR_NOSOCKETINDEV);
@@ -33,18 +35,19 @@ GBLREF	io_pair	io_std_device;
 
 void iosocket_flush(io_desc *iod)
 {
-
 	d_socket_struct	*dsocketptr;
 	socket_struct	*socketptr;
 	ssize_t		status;
 	int             on = 1, off = 0;
         char            *errptr;
         int4            errlen;
+	boolean_t	ch_set;
 
 	assert(gtmsocket == iod->type);
 
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
 	socketptr = dsocketptr->socket[dsocketptr->current_socket];
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 
 	if (0 >= dsocketptr->n_socket)
 	{
@@ -54,6 +57,7 @@ void iosocket_flush(io_desc *iod)
 		else
 #		endif
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOSOCKETINDEV);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
 	}
 	if (dsocketptr->current_socket >= dsocketptr->n_socket)
@@ -92,9 +96,11 @@ void iosocket_flush(io_desc *iod)
                 memcpy(&iod->dollar.device[SIZEOF("1,") - 1], errptr, errlen + 1);	/* we want the null */
 		if (socketptr->ioerror)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_SOCKWRITE, 0, ERR_TEXT, 2, errlen, errptr);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
         }
 
 #endif
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iosocket_iocontrol.c b/sr_port/iosocket_iocontrol.c
index 3dcb108..ca96779 100644
--- a/sr_port/iosocket_iocontrol.c
+++ b/sr_port/iosocket_iocontrol.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -26,6 +27,7 @@
 #include "gtm_caseconv.h"
 #include "stringpool.h"
 #include "min_max.h"
+#include "error.h"
 
 GBLREF spdesc		stringpool;
 GBLREF io_pair		io_curr_device;
@@ -179,10 +181,10 @@ void	iosocket_iocontrol(mstr *mn, int4 argcnt, va_list args)
 				tlsid = NULL;
 		} else
 			tlsid = NULL;
-		if ((4 <= argcnt) && (NULL != tlsid))
+		if (4 <= argcnt)
 		{	/* password only valid if tlsid provided */
-			password = va_arg(args, mval *);
-			if ((NULL != password) && !M_ARG_SKIPPED(password) && MV_DEFINED(password))
+			password = va_arg(args, mval *);	/* need to do va_arg in case 5th arg */
+			if ((NULL != tlsid) && (NULL != password) && !M_ARG_SKIPPED(password) && MV_DEFINED(password))
 				MV_FORCE_STRD(password);
 			else
 				password = NULL;
@@ -210,13 +212,16 @@ void	iosocket_dlr_device(mstr *d)
 {
 	io_desc		*iod;
 	int		len;
+	boolean_t	ch_set;
 
 	iod = io_curr_device.in;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
  	len = STRLEN(iod->dollar.device);
 	/* verify internal buffer has enough space for $DEVICE string value */
 	assert((int)d->len > len);
 	memcpy(d->addr, iod->dollar.device, len);
 	d->len = len;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
 
@@ -224,14 +229,17 @@ void	iosocket_dlr_key(mstr *d)
 {
 	io_desc		*iod;
 	int		len;
+	boolean_t	ch_set;
 
 	iod = io_curr_device.in;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	len = STRLEN(iod->dollar.key);
 	/* verify internal buffer has enough space for $DEVICE string value */
 	assert((int)d->len > len);
 	if (len > 0)
 		memcpy(d->addr, iod->dollar.key, len);
 	d->len = len;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
 
@@ -243,8 +251,10 @@ void iosocket_dlr_zkey(mstr *d)
 	io_desc		*iod;
 	d_socket_struct	*dsocketptr;
 	socket_struct	*socketptr;
+	boolean_t	ch_set;
 
 	iod = io_curr_device.in;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	assertpro(gtmsocket == iod->type);
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
 	zkeyptr = (char *)stringpool.free;
@@ -342,5 +352,6 @@ void iosocket_dlr_zkey(mstr *d)
 	d->addr = (char *)stringpool.free;
 	d->len = totlen;
 	stringpool.free += totlen;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iosocket_listen.c b/sr_port/iosocket_listen.c
index f0aa18e..28babef 100644
--- a/sr_port/iosocket_listen.c
+++ b/sr_port/iosocket_listen.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -26,6 +27,7 @@
 #include "io.h"
 #include "gt_timer.h"
 #include "iosocketdef.h"
+#include "error.h"
 
 error_def(ERR_CURRSOCKOFR);
 error_def(ERR_LISTENPASSBND);
@@ -41,6 +43,7 @@ boolean_t iosocket_listen(io_desc *iod, unsigned short len)
 {
 	d_socket_struct	*dsocketptr;
 	socket_struct	*socketptr;
+	boolean_t	result, ch_set;
 
 	assert(gtmsocket == iod->type);
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
@@ -57,7 +60,10 @@ boolean_t iosocket_listen(io_desc *iod, unsigned short len)
 	socketptr = dsocketptr->socket[dsocketptr->current_socket];
 	assert(socketptr && (socketptr->dev == dsocketptr));
 
-	return iosocket_listen_sock(socketptr, len);
+	ESTABLISH_RET_GTMIO_CH(&iod->pair, FALSE, ch_set);
+	result = iosocket_listen_sock(socketptr, len);
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
+	return result;
 }
 
 boolean_t iosocket_listen_sock(socket_struct *socketptr, unsigned short len)
diff --git a/sr_port/iosocket_open.c b/sr_port/iosocket_open.c
index 350e5a3..6fa92d2 100644
--- a/sr_port/iosocket_open.c
+++ b/sr_port/iosocket_open.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -21,6 +22,12 @@
 #include "gtm_socket.h"
 #include "gtm_inet.h"
 #include "gtm_time.h"
+#include "gtm_caseconv.h"
+#include "gtm_conv.h"
+#include "gtm_utf8.h"
+#include "gtm_netdb.h"
+#include "gtm_unistd.h"
+
 #include "copy.h"
 #include "gt_timer.h"
 #include "io.h"
@@ -30,12 +37,8 @@
 #ifndef VMS
 #include "iormdef.h"
 #endif
-#include "gtm_caseconv.h"
 #include "stringpool.h"
-#include "gtm_conv.h"
-#include "gtm_utf8.h"
-#include "gtm_netdb.h"
-#include "gtm_unistd.h"
+#include "error.h"
 
 GBLREF	d_socket_struct		*socket_pool, *newdsocket;
 GBLREF	io_pair			io_std_device;	/* standard device */
@@ -120,8 +123,10 @@ short	iosocket_open(io_log_name *dev, mval *pp, int file_des, mval *mspace, int4
 	uint			filemode_mask;
 	unsigned long		uicvalue;
 #endif
+	boolean_t		ch_set;
 
 	ioptr = dev->iod;
+	ESTABLISH_RET_GTMIO_CH(&ioptr->pair, -1, ch_set);
 	assert((params) *(pp->str.addr + p_offset) < (unsigned char)n_iops);
 	assert(ioptr != 0);
 	assert(ioptr->state >= 0 && ioptr->state < n_io_dev_states);
@@ -425,7 +430,7 @@ short	iosocket_open(io_log_name *dev, mval *pp, int file_des, mval *mspace, int4
 		{
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ABNCOMPTINC, 6, LEN_AND_LIT("CONNECT"),
 					LEN_AND_LIT("ZLISTEN"), LEN_AND_LIT("OPEN"));
-		return FALSE;
+			return FALSE;
 		}
 		if (delay_specified && nodelay_specified)
 		{
@@ -436,7 +441,10 @@ short	iosocket_open(io_log_name *dev, mval *pp, int file_des, mval *mspace, int4
 		if (listen_specified || connect_specified || is_principal)
 		{
 			if (NULL == (socketptr = iosocket_create(sockaddr, bfsize, is_principal ? file_des : -1, listen_specified)))
+			{
+				REVERT_GTMIO_CH(&ioptr->pair, ch_set);
 				return FALSE;
+			}
 			assert(listen_specified == socketptr->passive);
 			if (ioerror_specified)
 				socketptr->ioerror = ('T' == ioerror || 't' == ioerror);
@@ -526,6 +534,7 @@ short	iosocket_open(io_log_name *dev, mval *pp, int file_des, mval *mspace, int4
 		if (socketptr->sd > 0)
 			(void)close(socketptr->sd);
 		SOCKET_FREE(socketptr);
+		REVERT_GTMIO_CH(&ioptr->pair, ch_set);
 		return FALSE;
 	} else if (is_principal)
 	{
@@ -582,5 +591,6 @@ short	iosocket_open(io_log_name *dev, mval *pp, int file_des, mval *mspace, int4
 	}
 	ioptr->newly_created = FALSE;
 	ioptr->state = dev_open;
+	REVERT_GTMIO_CH(&ioptr->pair, ch_set);
 	return TRUE;
 }
diff --git a/sr_port/iosocket_readfl.c b/sr_port/iosocket_readfl.c
index eaa9fc2..17ec59d 100644
--- a/sr_port/iosocket_readfl.c
+++ b/sr_port/iosocket_readfl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -144,12 +145,15 @@ int	iosocket_readfl(mval *v, int4 width, int4 timeout)
 	gtm_chset_t	ichset;
 	mv_stent	*mv_zintdev;
 	socket_interrupt *sockintr;
+	boolean_t	result;
+	boolean_t	ch_set;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
 	assert(stringpool.free >= stringpool.base);
 	assert(stringpool.free <= stringpool.top);
 	iod = io_curr_device.in;
+	ESTABLISH_RET_GTMIO_CH(&iod->pair, -1, ch_set);
 	TRCTBL_ENTRY(SOCKRFL_ENTRY, width, iod, (INTPTR_T)socketus_interruptus, NULL);
 	ichset = iod->ichset;
 	assert(dev_open == iod->state);
@@ -159,8 +163,11 @@ int	iosocket_readfl(mval *v, int4 width, int4 timeout)
 	{
 #		ifndef VMS
 		if (iod == io_std_device.in)
-			return ionl_readfl(v, width, timeout);
-		else
+		{
+			result = ionl_readfl(v, width, timeout);
+			REVERT_GTMIO_CH(&iod->pair, ch_set);
+			return result;
+		} else
 		{
 #		endif
 			iod->dollar.za = 9;
@@ -386,7 +393,8 @@ int	iosocket_readfl(mval *v, int4 width, int4 timeout)
 					msec_timeout = -1;
 					out_of_time = TRUE;
 				} else
-					msec_timeout = (int4)(cur_time.at_sec * 1000 + cur_time.at_usec / 1000);
+					msec_timeout = (int4)(cur_time.at_sec * MILLISECS_IN_SEC +
+							      DIVIDE_ROUND_UP(cur_time.at_usec, MICROSECS_IN_MSEC));
 				DBGSOCK((stdout, "socrfl: Taking timeout end time from read restart data - "
 					 "computed msec_timeout: %d\n", msec_timeout));
 			}
@@ -844,6 +852,7 @@ int	iosocket_readfl(mval *v, int4 width, int4 timeout)
 								    "msec_timeout: %d\n", end_time.at_sec, end_time.at_usec,
 								    timeout, msec_timeout)));
 		TRCTBL_ENTRY(SOCKRFL_OUTOFBAND, bytes_read, (INTPTR_T)chars_read, stringpool.free, NULL);	/* BYPASSOK */
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		outofband_action(FALSE);
 		assertpro(FALSE);	/* Should *never* return from outofband_action */
 		return FALSE;	/* For the compiler.. */
@@ -932,5 +941,6 @@ int	iosocket_readfl(mval *v, int4 width, int4 timeout)
 			DBGSOCK((stdout, "socrfl: Returning from read with success indicator set to %d\n", ret));
 		}
 	);
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return (ret);
 }
diff --git a/sr_port/iosocket_snr.c b/sr_port/iosocket_snr.c
index 579db52..4f755cb 100644
--- a/sr_port/iosocket_snr.c
+++ b/sr_port/iosocket_snr.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -206,7 +207,7 @@ ssize_t iosocket_snr_io(socket_struct *socketptr, void *buffer, size_t maxlength
 			poll_fdlist[0].fd = socketptr->sd;
 			poll_fdlist[0].events = pollread ? POLLIN : POLLOUT;
 			poll_nfds = 1;
-			poll_timeout = time_for_read->at_usec / 1000;	/* convert to millisecs */
+			poll_timeout = DIVIDE_ROUND_UP(time_for_read->at_usec, MICROSECS_IN_MSEC);	/* convert to millisecs */
 			status = poll(&poll_fdlist[0], poll_nfds, poll_timeout);
 #			endif
 			real_errno = errno;
diff --git a/sr_port/iosocket_use.c b/sr_port/iosocket_use.c
index 2753ea1..62138e3 100644
--- a/sr_port/iosocket_use.c
+++ b/sr_port/iosocket_use.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,6 +31,7 @@
 #include "namelook.h"
 #include "stringpool.h"
 #include "gtm_conv.h"
+#include "error.h"
 
 GBLREF 	io_pair          	io_curr_device;
 GBLREF  io_pair			io_std_device;
@@ -98,6 +100,7 @@ void	iosocket_use(io_desc *iod, mval *pp)
 	char		*tab;
 	int		save_errno;
 	size_t		d_socket_struct_len;
+	boolean_t	ch_set;
 
         assert(iod->state == dev_open);
         assert(iod->type == gtmsocket);
@@ -106,10 +109,11 @@ void	iosocket_use(io_desc *iod, mval *pp)
 	n_specified = 0;
 	zff_len = -1; /* indicates neither ZFF nor ZNOFF specified */
 	delimiter_len = -1; /* indicates neither DELIM nor NODELIM specified */
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 
 	/* A read or wait was interrupted for this device. Allow only parmless use in $zinterrupt code for
-	   and interrupted device.
-	*/
+	 * and interrupted device.
+	 */
 	if (iop_eol != *(pp->str.addr + p_offset))
 	{	/* Parameters were specified */
 		if (dsocketptr->mupintr)
@@ -320,7 +324,10 @@ void	iosocket_use(io_desc *iod, mval *pp)
 	}
 	/* ------ return immediately if no flag, worth a check because it is mostly true ------------ */
 	if (1 == p_offset)
+	{
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
+	}
 	/* ------------------------------ compatibility verification -------------------------------- */
 	if ((socket_specified) && ((n_specified > 2) || ((2 == n_specified) && (0 >= delimiter_len))))
 	{
@@ -363,6 +370,7 @@ void	iosocket_use(io_desc *iod, mval *pp)
 			io_curr_device.in = io_std_device.in;
 			io_curr_device.out = io_std_device.out;
 		}
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return; /* detach can only be specified by itself */
 	}
 	if (attach_specified)
@@ -383,6 +391,7 @@ void	iosocket_use(io_desc *iod, mval *pp)
 		}
 		iosocket_switch(handlea, handlea_len, socket_pool, newdsocket);
 		memcpy(dsocketptr, newdsocket, d_socket_struct_len);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return; /* attach can only be specified by itself */
 	}
 	/* ------------ create/identify the socket to work on and make a local copy ----------------- */
@@ -390,7 +399,10 @@ void	iosocket_use(io_desc *iod, mval *pp)
 	{
 		/* allocate the structure for a new socket */
                 if (NULL == (socketptr = iosocket_create(sockaddr, bfsize, -1, listen_specified)))
+		{
+			REVERT_GTMIO_CH(&iod->pair, ch_set);
                         return;
+		}
 		if (gtm_max_sockets <= newdsocket->n_socket)
 		{
 			if (FD_INVALID != socketptr->temp_sd)
@@ -426,6 +438,7 @@ void	iosocket_use(io_desc *iod, mval *pp)
 				socketptr->pendingevent = FALSE;
 				iod->dollar.key[0] = '\0';
 				save_errno = iosocket_accept(dsocketptr, socketptr, TRUE);
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return;
 			}
 		} else
@@ -438,6 +451,7 @@ void	iosocket_use(io_desc *iod, mval *pp)
 				else
 #				endif
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOSOCKETINDEV);
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return;
 			}
      			if (newdsocket->n_socket <= newdsocket->current_socket)
@@ -551,6 +565,7 @@ void	iosocket_use(io_desc *iod, mval *pp)
                 if (socketptr->sd > 0)
                         (void)close(socketptr->sd);
 		SOCKET_FREE(socketptr);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
                 return;
         }
 	/* ------------------------------------ commit changes -------------------------------------- */
@@ -570,5 +585,6 @@ void	iosocket_use(io_desc *iod, mval *pp)
 	}
 	*socketptr = newsocket;
 	memcpy(dsocketptr, newdsocket, d_socket_struct_len);
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iosocket_wait.c b/sr_port/iosocket_wait.c
index 9774e3a..82d26e9 100644
--- a/sr_port/iosocket_wait.c
+++ b/sr_port/iosocket_wait.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -44,6 +45,7 @@
 #include "gtm_netdb.h"
 #include "gtm_stdlib.h"
 #include "eintr_wrappers.h"
+#include "error.h"
 
 #define	CONNECTED	"CONNECT"
 #define READ	"READ"
@@ -95,6 +97,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 	boolean_t		zint_restart, retry_accept = FALSE;
 	mv_stent		*mv_zintdev;
 	int			errcode;
+	boolean_t		ch_set;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -102,6 +105,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 	assert(gtmsocket == iod->type);
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
 	sockintr = &dsocketptr->sock_save_state;
+	ESTABLISH_RET_GTMIO_CH(&iod->pair, FALSE, ch_set);
 
 	/* Check for restart */
 	if (!dsocketptr->mupintr)
@@ -229,7 +233,8 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 						utimeout.tv_usec = 0;
 					} else
 					{
-						msec_timeout = (int4)(cur_time.at_sec * 1000 + cur_time.at_usec / 1000);
+						msec_timeout = (int4)(cur_time.at_sec * MILLISECS_IN_SEC +
+								      DIVIDE_ROUND_UP(cur_time.at_usec, MICROSECS_IN_MSEC));
 						utimeout.tv_sec = cur_time.at_sec;
 						utimeout.tv_usec = (gtm_tv_usec_t)cur_time.at_usec;
 					}
@@ -244,7 +249,8 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 				else if (NO_M_TIMEOUT == timepar)
 					poll_timeout = -1;
 				else
-					poll_timeout = (utimeout.tv_sec * 1000) + (utimeout.tv_usec / 1000);
+					poll_timeout = (utimeout.tv_sec * MILLISECS_IN_SEC) +
+						DIVIDE_ROUND_UP(utimeout.tv_usec, MICROSECS_IN_MSEC);
 				poll_fd = -1;
 				rv = poll(poll_fds, poll_nfds, poll_timeout);
 #endif
@@ -280,6 +286,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 								"  interrupts: %d\n", end_time.at_sec, end_time.at_usec,
 								socketus_interruptus));
 						}
+						REVERT_GTMIO_CH(&iod->pair, ch_set);
 						outofband_action(FALSE);
 						assertpro(FALSE);      /* Should *never* return from outofband_action */
 						return FALSE;   /* For the compiler.. */
@@ -305,6 +312,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 				if (NO_M_TIMEOUT != timepar)
 				{
 					dollar_truth = FALSE;
+					REVERT_GTMIO_CH(&iod->pair, ch_set);
 					return FALSE;
 				} else
 					continue;
@@ -321,6 +329,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 			if (NO_M_TIMEOUT != timepar)
 			{
 				dollar_truth = FALSE;
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return FALSE;
 			} else
 				continue;
@@ -396,6 +405,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 			if (NO_M_TIMEOUT != timepar)
 			{
 				dollar_truth = FALSE;
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return FALSE;
 			} else
 				continue;
@@ -410,7 +420,10 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 				retry_accept = TRUE;
 				continue;	/* pending connection gone so redo */
 			} else if (-1 == rv)
+			{
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return FALSE;	/* error handled in iosocket_accept */
+			}
 		} else
 		{
 			assert(socket_connected == socketptr->state);
@@ -443,6 +456,7 @@ boolean_t iosocket_wait(io_desc *iod, int4 timepar)
 	}
 	if (NO_M_TIMEOUT != timepar)
 		dollar_truth = TRUE;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return TRUE;
 }
 
diff --git a/sr_port/iosocket_write.c b/sr_port/iosocket_write.c
index 4c53402..6a44bfd 100644
--- a/sr_port/iosocket_write.c
+++ b/sr_port/iosocket_write.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -378,9 +379,11 @@ void	iosocket_write_real(mstr *v, boolean_t convert_output)
 	int		flags;
 	d_socket_struct *dsocketptr;
 	socket_struct	*socketptr;
+	boolean_t	ch_set;
 
 	DBGSOCK2((stdout, "socwrite: ************************** Top of iosocket_write\n"));
 	iod = io_curr_device.out;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	assert(gtmsocket == iod->type);
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
 	if (0 >= dsocketptr->n_socket)
@@ -391,6 +394,7 @@ void	iosocket_write_real(mstr *v, boolean_t convert_output)
 		else
 #		endif
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOSOCKETINDEV);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
 	}
 	if (dsocketptr->n_socket <= dsocketptr->current_socket)
@@ -424,6 +428,7 @@ void	iosocket_write_real(mstr *v, boolean_t convert_output)
 			if (0 != status)
 			{
 				SOCKERROR(iod, socketptr, ERR_SOCKWRITE, status);
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return;
 			}
 #ifdef UNIX
@@ -519,6 +524,7 @@ void	iosocket_write_real(mstr *v, boolean_t convert_output)
 						if (0 != status)
 						{
 							SOCKERROR(iod, socketptr, ERR_SOCKWRITE, status);
+							REVERT_GTMIO_CH(&iod->pair, ch_set);
 							return;
 						}
 #ifdef UNIX
@@ -559,6 +565,7 @@ void	iosocket_write_real(mstr *v, boolean_t convert_output)
 			if (0 != status)
 			{
 				SOCKERROR(iod, socketptr, ERR_SOCKWRITE, status);
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return;
 			}
 #ifdef UNIX
@@ -575,5 +582,6 @@ void	iosocket_write_real(mstr *v, boolean_t convert_output)
 		iod->dollar.za = 0;
 	}
 	DBGSOCK2((stdout, "socwrite: <--------- Leaving iosocket_write\n"));
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iosocket_wteol.c b/sr_port/iosocket_wteol.c
index 5a3253f..2712968 100644
--- a/sr_port/iosocket_wteol.c
+++ b/sr_port/iosocket_wteol.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -21,6 +22,7 @@
 #include "io.h"
 #include "iottdef.h"
 #include "iosocketdef.h"
+#include "error.h"
 
 #ifndef VMS
 GBLREF	io_pair		io_std_device;
@@ -36,9 +38,11 @@ void	iosocket_wteol(int4 val, io_desc *io_ptr)
 	socket_struct	*socketptr;
 	char		*ch, *top;
 	int		eol_cnt;
+	boolean_t	ch_set;
 
 	assert(gtmsocket == io_ptr->type);
 	dsocketptr = (d_socket_struct *)io_ptr->dev_sp;
+	ESTABLISH_GTMIO_CH(&io_ptr->pair, ch_set);
 	if (0 >= dsocketptr->n_socket)
 	{
 #		ifndef VMS
@@ -47,6 +51,7 @@ void	iosocket_wteol(int4 val, io_desc *io_ptr)
 		else
 #		endif
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOSOCKETINDEV);
+		REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 		return;
 	}
 	if (dsocketptr->current_socket >= dsocketptr->n_socket)
@@ -79,5 +84,6 @@ void	iosocket_wteol(int4 val, io_desc *io_ptr)
 			io_ptr->dollar.y %= io_ptr->length;
 	}
 	iosocket_flush(io_ptr);
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iosocket_wtff.c b/sr_port/iosocket_wtff.c
index 747f069..d96c27c 100644
--- a/sr_port/iosocket_wtff.c
+++ b/sr_port/iosocket_wtff.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -17,6 +18,7 @@
 #include "io.h"
 #include "gt_timer.h"
 #include "iosocketdef.h"
+#include "error.h"
 
 GBLREF io_pair		io_curr_device;
 #ifndef VMS
@@ -32,8 +34,10 @@ void iosocket_wtff(void)
 	io_desc		*iod;
 	socket_struct	*socketptr;
 	d_socket_struct	*dsocketptr;
+	boolean_t	ch_set;
 
 	iod = io_curr_device.out;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	assert(gtmsocket == iod->type);
 	iod->esc_state = START;
 	dsocketptr = (d_socket_struct *)iod->dev_sp;
@@ -45,6 +49,7 @@ void iosocket_wtff(void)
 		else
 #		endif
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOSOCKETINDEV);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
 	}
 	if (dsocketptr->current_socket >= dsocketptr->n_socket)
@@ -59,5 +64,6 @@ void iosocket_wtff(void)
 	iosocket_flush(iod);
 	iod->dollar.x = 0;
 	iod->dollar.y = 0;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iott_wteol.c b/sr_port/iott_wteol.c
index 66e95d3..8fff818 100644
--- a/sr_port/iott_wteol.c
+++ b/sr_port/iott_wteol.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2007 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -18,22 +19,23 @@
 #include "io.h"
 #include "iottdef.h"
 
+UNIX_ONLY(error_def(ERR_ZINTRECURSEIO);)
+
 /* essentially the same as ionl_wteol */
 void iott_wteol(int4 val, io_desc *io_ptr)
 {
-	mstr	eol;
-	int	eol_cnt;
+	mstr		eol;
+	int		eol_cnt;
+	boolean_t	ch_set;
 	UNIX_ONLY(d_tt_struct	*tt_ptr;)
 
-	UNIX_ONLY(error_def(ERR_ZINTRECURSEIO);)
-
 	assert(val);
-
 #ifdef UNIX
 	tt_ptr = (d_tt_struct *)io_ptr->dev_sp;
 	if (tt_ptr->mupintr)
-		rts_error(VARLSTCNT(1) ERR_ZINTRECURSEIO);
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZINTRECURSEIO);
 #endif
+	ESTABLISH_GTMIO_CH(&io_ptr->pair, ch_set);
 	io_ptr->esc_state = START;
 	eol.len = STRLEN(NATIVE_TTEOL);
 	eol.addr = (char *)NATIVE_TTEOL;
@@ -56,5 +58,6 @@ void iott_wteol(int4 val, io_desc *io_ptr)
 		if (io_ptr->length)
 			io_ptr->dollar.y %= io_ptr->length;
 	}
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return;
 }
diff --git a/sr_port/iott_wtff.c b/sr_port/iott_wtff.c
index 5c3d90e..3e842a6 100644
--- a/sr_port/iott_wtff.c
+++ b/sr_port/iott_wtff.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,6 +15,7 @@
 #include "io.h"
 #include "iottdef.h"
 #include "io_params.h"
+#include "error.h"
 
 GBLREF io_pair io_curr_device;
 
@@ -30,6 +32,10 @@ static readonly mval home_params = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, SIZEOF(home
 
 void iott_wtff(void)
 {
+	boolean_t ch_set;
+
+	ESTABLISH_GTMIO_CH(&io_curr_device, ch_set);
 	io_curr_device.out->esc_state = START;
 	iott_use(io_curr_device.out, &home_params);
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 }
diff --git a/sr_port/is_proc_alive.h b/sr_port/is_proc_alive.h
index 3f0496a..8752f28 100644
--- a/sr_port/is_proc_alive.h
+++ b/sr_port/is_proc_alive.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,6 +13,8 @@
 #ifndef IS_PROC_ALIVE_INCLUDED
 #define IS_PROC_ALIVE_INCLUDED
 
+#define	IMAGECNT(imagecnt)	VMS_ONLY(imagecnt) UNIX_ONLY(0)
+
 #ifdef VMS
 bool is_proc_alive(uint4 pid, uint4 imagecnt);
 #elif defined(UNIX)
diff --git a/sr_port/jnl.h b/sr_port/jnl.h
index 200656e..d970cb8 100644
--- a/sr_port/jnl.h
+++ b/sr_port/jnl.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -263,6 +264,19 @@ error_def(ERR_JNLENDIANLITTLE);
 	JNL_SHORT_TIME(jgbl.gbl_jrec_time);		\
 }
 
+#define	DO_GBL_JREC_TIME_CHECK_FALSE	FALSE
+#define	DO_GBL_JREC_TIME_CHECK_TRUE	TRUE
+
+#define	SET_JNLBUFF_PREV_JREC_TIME(JB, CUR_JREC_TIME, DO_GBL_JREC_TIME_CHECK)					\
+{														\
+	GBLREF	jnl_gbls_t		jgbl;									\
+														\
+	/* In case of journal rollback, time is set back to turnaround point etc. so assert accordingly */	\
+	assert(!DO_GBL_JREC_TIME_CHECK || (jgbl.gbl_jrec_time >= CUR_JREC_TIME));				\
+	assert(jgbl.onlnrlbk || (JB->prev_jrec_time <= CUR_JREC_TIME));						\
+	JB->prev_jrec_time = CUR_JREC_TIME;									\
+}
+
 /* This macro ensures that journal records are written in non-decreasing time order in each journal file.
  * It is passed the time field to adjust and a pointer to the journal buffer of the region.
  * The journal buffer holds the timestamp of the most recently written journal record.
@@ -418,7 +432,7 @@ typedef struct
  	trans_num		eov_tn;		/* curr_tn is saved as eov_tn by jnl_write_epoch. Used by recover/rollback */
 	volatile trans_num	epoch_tn;	/* Transaction number for current epoch */
 	seq_num			end_seqno;		/* reg_seqno saved by jnl_write_epoch. Used by recover/rollback */
-	seq_num			strm_end_seqno[MAX_SUPPL_STRMS]; /* used to keep jfh->strm_end_seqno uptodate with each epoch.
+	seq_num			strm_end_seqno[MAX_SUPPL_STRMS]; /* used to keep jfh->strm_end_seqno up to date with each epoch.
 						 * Unused in VMS but defined so shared memory layout is similar in Unix & VMS.
 						 */
 	int4			min_write_size,	/* if unwritten data gets to this size, write it */
diff --git a/sr_port/jnl_file_open_common.c b/sr_port/jnl_file_open_common.c
index 56e9c05..4b89e9d 100644
--- a/sr_port/jnl_file_open_common.c
+++ b/sr_port/jnl_file_open_common.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2003, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2003-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -102,6 +103,13 @@ uint4 jnl_file_open_common(gd_region *reg, off_jnl_t os_file_size)
 	jnl_fs_block_size = get_fs_block_size(jpc->channel);
 	/* check that the filesystem block size is a power of 2 as we do a lot of calculations below assuming this is the case */
 	assert(!(jnl_fs_block_size & (jnl_fs_block_size - 1)));
+	/* Ensure filesystem-block-size alignment except in case the filesystem-block-size is higher than os-page-size (not
+	 * currently seen on the popular filesystems but seen in NFS filesystems). In that case only ensure os-page-size-alignment
+	 * since processes that attach to database shared memory attach at os-page-size-aligned virtual addresses. So treat
+	 * filesystem-block-size as the os-page-size in that case.
+	 */
+	if (OS_PAGE_SIZE < jnl_fs_block_size)
+		jnl_fs_block_size = OS_PAGE_SIZE;
 	header = (jnl_file_header *)(ROUND_UP2((uintszofptr_t)hdr_buff, jnl_fs_block_size));
 	eof_rec_buffer = (unsigned char *)(ROUND_UP2((uintszofptr_t)eof_rec, jnl_fs_block_size));
 	/* Read the journal file header */
@@ -263,13 +271,8 @@ uint4 jnl_file_open_common(gd_region *reg, off_jnl_t os_file_size)
 		assert(WBTEST_ENABLED(WBTEST_RECOVER_ENOSPC));
 		return ERR_JNLWRERR;
 	}
-	if (!jb->prev_jrec_time || !header->prev_jnl_file_name_length)
-	{	/* This is the first time a journal file for this database is being opened OR the previous link is NULL.
-		 * In both these cases, we dont know or care about the timestamp of the last written journal record.
-		 * Set it to the current time as we know it.
-		 */
-		jb->prev_jrec_time = jgbl.gbl_jrec_time;
-	}
+	SET_JNLBUFF_PREV_JREC_TIME(jb, eof_record.prefix.time, DO_GBL_JREC_TIME_CHECK_FALSE);
+		/* Sets jb->prev_jrec_time to time of to-be-overwritten EOF rec */
 	jb->end_of_data = 0;
 	jb->eov_tn = 0;
 	jb->eov_timestamp = 0;
diff --git a/sr_port/jnl_write.c b/sr_port/jnl_write.c
index 673b1d2..cfa7457 100644
--- a/sr_port/jnl_write.c
+++ b/sr_port/jnl_write.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2003, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2003-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -359,9 +360,8 @@ void	jnl_write(jnl_private_control *jpc, enum jnl_record_type rectype, jnl_recor
 		jpc->new_freeaddr = lcl_freeaddr + align_rec_len;
 		INCR_GVSTATS_COUNTER(csa, cnl, n_jrec_other, 1);
 		INCR_GVSTATS_COUNTER(csa, cnl, n_jbuff_bytes, align_rec_len);
-		assert(jgbl.gbl_jrec_time >= align_rec.prefix.time);
-		assert(align_rec.prefix.time >= jb->prev_jrec_time);
-		jb->prev_jrec_time = align_rec.prefix.time;
+		SET_JNLBUFF_PREV_JREC_TIME(jb, align_rec.prefix.time, DO_GBL_JREC_TIME_CHECK_TRUE);
+			/* Keep jb->prev_jrec_time up to date */
 		jpc->temp_free = lcl_free; /* set jpc->temp_free BEFORE setting free_update_pid (secshr_db_clnup relies on this) */
 		assert(lcl_free == jpc->new_freeaddr % lcl_size);
 		/* Note that freeaddr should be updated ahead of free since jnl_output_sp.c does computation of wrtsize
@@ -570,9 +570,7 @@ void	jnl_write(jnl_private_control *jpc, enum jnl_record_type rectype, jnl_recor
 		if (temp_jnlpool_ctl->write >= jnlpool_size)
 			temp_jnlpool_ctl->write -= jnlpool_size;
 	}
-	assert(jgbl.gbl_jrec_time >= jnl_rec->prefix.time);
-	assert(jnl_rec->prefix.time >= jb->prev_jrec_time);
-	jb->prev_jrec_time = jnl_rec->prefix.time;
+	SET_JNLBUFF_PREV_JREC_TIME(jb, jnl_rec->prefix.time, DO_GBL_JREC_TIME_CHECK_TRUE); /* Keep jb->prev_jrec_time up to date */
 	jpc->temp_free = lcl_free; /* set jpc->temp_free BEFORE setting free_update_pid (secshr_db_clnup relies on this) */
 	/* Note that freeaddr should be updated ahead of free since jnl_output_sp.c does computation of wrtsize
 	 * based on free and asserts follow later there which use freeaddr.
diff --git a/sr_port/job_addr.c b/sr_port/job_addr.c
index 4e2c1b4..64d2902 100644
--- a/sr_port/job_addr.c
+++ b/sr_port/job_addr.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -52,13 +53,17 @@ boolean_t job_addr(mstr *rtn, mstr *label, int4 offset, char **hdr, char **labad
 		lp = find_line_addr(rt_hdr, label, offset, NULL);
 	if (!lp)
 		return (FALSE);
-	/* Set the pointer to address / offset for line number entry storage in lab_proxy. */
-	USHBIN_ONLY((TREF(lab_proxy)).lnr_adr = lp);
+	/* Set the pointer to address / offset for line number entry storage in TABENT_PROXY. */
+#	ifdef USHBIN_SUPPORTED
+	ARLINK_ONLY((TABENT_PROXY).rtnhdr_adr = rt_hdr);
+	(TABENT_PROXY).lnr_adr = lp;
+#	else
 	/* On non-shared-binary, calculcate the offset to the corresponding lnr_tabent record by subtracting
 	 * the base address (routine header) from line number entry's address, and save the result in
-	 * lab_ln_ptr field of lab_tabent structure.
+	 * lab_ln_ptr field of TABENT_PROXY structure.
 	 */
-	NON_USHBIN_ONLY((TREF(lab_proxy)).lab_ln_ptr = ((int4)lp - (int4)rt_hdr));
+	(TABENT_PROXY).lab_ln_ptr = ((int4)lp - (int4)rt_hdr);
+#	endif
 	if (NULL != labaddr)
 		*labaddr = (char *)LINE_NUMBER_ADDR(rt_hdr, lp);
 	*hdr = (char *)rt_hdr;
diff --git a/sr_port/jobexam_process.c b/sr_port/jobexam_process.c
index 9c38463..5d53258 100644
--- a/sr_port/jobexam_process.c
+++ b/sr_port/jobexam_process.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,6 +17,7 @@
 #include "gtm_unistd.h"
 #include "gtm_string.h"
 #include "gtm_stdio.h"
+#include "gtm_limits.h"
 
 #include "error.h"
 #include "io_params.h"
@@ -34,6 +36,8 @@
 #include "mv_stent.h"
 
 #define DEFAULT_DUMP_FILENAME "GTM_JOBEXAM.ZSHOW_DMP"
+/* + 3 below is for for 2 intervening '_' chars and 1 extra */
+#define DEFAULT_DUMP_FILE_TOTSIZE (SIZEOF(DEFAULT_DUMP_FILENAME) + (MAX_DIGITS_IN_INT * 2) + 3)
 #define NOCONCEAL_OPTION "NO_CONCEAL"
 
 static readonly mval empty_str_mval = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, 0, 0, 0, 0);
@@ -41,8 +45,8 @@ static readonly mval no_conceal_op  = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, SIZEOF(N
 							 NOCONCEAL_OPTION, 0, 0);
 static unsigned char dumpable_error_dump_file_parms[2] = {iop_newversion, iop_eol};
 static unsigned char dumpable_error_dump_file_noparms[1] = {iop_eol};
-static unsigned int  jobexam_counter;
 
+GBLREF int		process_exiting;
 GBLREF uint4		process_id;
 GBLREF io_pair		io_std_device, io_curr_device;
 GBLREF mv_stent		*mv_chain;
@@ -70,6 +74,7 @@ void jobexam_process(mval *dump_file_name, mval *dump_file_spec)
 	boolean_t		saved_mv_stent;
 	char			saved_util_outbuff[OUT_BUFF_SIZE];
 	int			saved_util_outbuff_len;
+	char			save_dump_file_name_buff[GTM_PATH_MAX];
 #	ifdef UNIX
 	struct sigaction	new_action, prev_action;
 	sigset_t		savemask;
@@ -95,14 +100,12 @@ void jobexam_process(mval *dump_file_name, mval *dump_file_spec)
 		input_dump_file_name = dump_file_name;
 		saved_mv_stent = FALSE;
 	}
-
 #	ifdef UNIX
 	/* Block out timer calls that might trigger processing that could fail. We especially want to prevent
 	 * nesting of signal handlers since the longjump() function used by the UNWIND macro is undefined on
 	 * Tru64 when signal handlers are nested.
 	 */
 	sigprocmask(SIG_BLOCK, &blockalrm, &savemask);
-
 	/* Setup new signal handler to just drive condition handler which will do the right thing */
 	memset(&new_action, 0, SIZEOF(new_action));
 	sigemptyset(&new_action.sa_mask);
@@ -141,7 +144,7 @@ void jobexam_process(mval *dump_file_name, mval *dump_file_spec)
 		assert(saved_util_outbuff_len <= SIZEOF(saved_util_outbuff));
 		memcpy(saved_util_outbuff, TREF(util_outbuff_ptr), saved_util_outbuff_len);
 	}
-	jobexam_dump(input_dump_file_name, dump_file_spec);
+	jobexam_dump(input_dump_file_name, dump_file_spec, save_dump_file_name_buff);
 	/* If any errors occur in job_exam_dump, the condition handler will unwind the stack to this point and return.  */
 	if (0 != saved_util_outbuff_len)
 	{	/* Restore util_outbuff values */
@@ -174,30 +177,43 @@ void jobexam_process(mval *dump_file_name, mval *dump_file_spec)
 }
 
 /* This routine is broken out as another ep so we can do cleanup processing in jobexam_process if
-   we trigger the condition handler and unwind.
-*/
-void jobexam_dump(mval *dump_filename_arg, mval *dump_file_spec)
+ * we trigger the condition handler and unwind.
+ */
+void jobexam_dump(mval *dump_filename_arg, mval *dump_file_spec, char *fatal_file_name_buff)
 {
-	unsigned char		dump_file_name[50], *dump_file_name_ptr;
+	unsigned char		dump_file_name[DEFAULT_DUMP_FILE_TOTSIZE], *dump_file_name_ptr;
 	mval			def_file_name, parms, zshowall;
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
 	ESTABLISH(jobexam_dump_ch);
-
-	++jobexam_counter;
+	++(TREF(jobexam_counter));
 	/* Setup default filename/type to use for the parse. Append processid and a counter. */
 	MEMCPY_LIT(dump_file_name, DEFAULT_DUMP_FILENAME);
 	dump_file_name_ptr = dump_file_name + SIZEOF(DEFAULT_DUMP_FILENAME) - 1;
 	*dump_file_name_ptr++ = '_';
 	dump_file_name_ptr = i2asc(dump_file_name_ptr, process_id);
 	*dump_file_name_ptr++ = '_';
-	dump_file_name_ptr = i2asc(dump_file_name_ptr, jobexam_counter);
+	dump_file_name_ptr = i2asc(dump_file_name_ptr, TREF(jobexam_counter));
 	def_file_name.mvtype = MV_STR;
 	def_file_name.str.addr = (char *)dump_file_name;
 	def_file_name.str.len = INTCAST(dump_file_name_ptr - dump_file_name);
+	assert(DEFAULT_DUMP_FILE_TOTSIZE >= def_file_name.str.len);
 	/* Call $ZPARSE processing to fill in any blanks, expand concealed logicals, etc. It is the callers
 	 * responsibility to make sure garbage collection knows about the value in the returned filespec.
 	 */
 	op_fnzparse(dump_filename_arg, &empty_str_mval, &def_file_name, &empty_str_mval, &no_conceal_op, dump_file_spec);
+	/* If this call is for the creation of a fatal error file (which would be the case if process_exiting is set), the
+	 * mval we have for dump_file_spec is not protected from potential stringpool garbage collections. In that case,
+	 * since we won't be returning the filename (as we would for a $ZJOBEXAM() function call), rebuffer the stringpool
+	 * resident dump file name so it is not vulnerable to stringpool garbage collections.
+	 */
+	if (process_exiting)
+	{
+		assert(GTM_PATH_MAX >= dump_file_spec->str.len);
+		memcpy(fatal_file_name_buff, dump_file_spec->str.addr, dump_file_spec->str.len);
+		dump_file_spec->str.addr = fatal_file_name_buff;
+	}
 	/* Parms of file to be created (newversion) */
 	parms.mvtype = MV_STR;
 	parms.str.addr = (char *)dumpable_error_dump_file_parms;
@@ -241,7 +257,6 @@ CONDITION_HANDLER(jobexam_dump_ch)
 	VMS_ONLY(sig->chf$l_sig_args -= 2);
 	VMS_ONLY(callg(send_msg, &sig->chf$l_sig_args));
 	send_msg_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_JOBEXAMFAIL, 1, process_id);
-
 	/* Stop the errors here and return to caller */
 	UNIX_ONLY(util_out_print("", RESET));	/* Prevent rts_error from flushing this error later */
 	DEBUG_ONLY(ok_to_UNWIND_in_exit_handling = TRUE);
diff --git a/sr_port/jobexam_process.h b/sr_port/jobexam_process.h
index cd97707..46f51dd 100644
--- a/sr_port/jobexam_process.h
+++ b/sr_port/jobexam_process.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,7 +14,7 @@
 #define JOBEXAM_PROCESS_INCLUDED
 
 void jobexam_process(mval *dump_file_name, mval *dump_file_spec);
-void jobexam_dump(mval *dump_file_name, mval *dump_file_spec);
+void jobexam_dump(mval *dump_file_name, mval *dump_file_spec, char *fatal_file_name_buff);
 
 #endif
 
diff --git a/sr_port/jobinterrupt_process.c b/sr_port/jobinterrupt_process.c
index 5b8ad3e..ea4b5bf 100644
--- a/sr_port/jobinterrupt_process.c
+++ b/sr_port/jobinterrupt_process.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -52,13 +53,6 @@ GBLREF mstr			extnam_str;
 GBLREF unsigned char		*restart_pc, *restart_ctxt;
 GBLREF dollar_ecode_type	dollar_ecode;
 GBLREF dollar_stack_type	dollar_stack;
-GBLREF int			merge_args;
-GBLREF uint4			zwrtacindx;
-GBLREF merge_glvn_ptr		mglvnp;
-GBLREF gvzwrite_datablk		*gvzwrite_block;
-GBLREF lvzwrite_datablk		*lvzwrite_block;
-GBLREF zshow_out		*zwr_output;
-GBLREF zwr_hash_table		*zwrhtab;
 
 error_def(ERR_STACKOFLOW);
 error_def(ERR_STACKCRIT);
@@ -66,9 +60,7 @@ error_def(ERR_STACKCRIT);
 void jobinterrupt_process(void)
 {
 	mv_stent	*mv_st_ent;
-	DCL_THREADGBL_ACCESS;
 
-	SETUP_THREADGBL_ACCESS;
 	assert(dollar_zininterrupt);
 	/* Compile and push new (counted) frame onto the stack to drive the
 	 * $zinterrupt handler.
@@ -118,7 +110,6 @@ void jobinterrupt_process(void)
 	 * op_restartpc or equivalent). In the future this is likely to change, at least for an interrupted Merge, ZWrite
 	 * or ZShow command, so this save/restore is appropriate both now (to let these nest at all) and especially in the future.
 	 */
-	if (TREF(in_zwrite) || (0 != merge_args))
-		PUSH_MVST_MRGZWRSV;
+	PUSH_MVST_MRGZWRSV_IF_NEEDED;
 	return;
 }
diff --git a/sr_port/linktrc.h b/sr_port/linktrc.h
new file mode 100644
index 0000000..f4ae24d
--- /dev/null
+++ b/sr_port/linktrc.h
@@ -0,0 +1,33 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2015 Fidelity National Information 		*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+#ifndef INDRCOMPTRC_H
+#define INDRCOMPTRC_H
+
+/* Provide some tracing for indirect compiles but due to the multiple rtnhdr.h files, these macros have
+ * been moved out to this supplemental header file so can be included where needed.
+ *
+ * Uncomment below #define or use -DDEBUG_INDRCOMP compilation option to enable debugging macros.
+ */
+/* #define DEBUG_INDRCOMP */
+#if defined(DEBUG_INDRCOMP)
+# define DBGINDCOMP(x) DBGFPF(x)
+# define DBGINDCOMP_ONLY(x) x
+# include "gtm_stdio.h"
+# include "gtmio.h"
+# include "io.h"
+#else
+# define DBGINDCOMP(x)
+# define DBGINDCOMP_ONLY(x)
+#endif
+
+#endif
diff --git a/sr_port/lk_check_own.c b/sr_port/lk_check_own.c
index 28d7841..b5d2db3 100644
--- a/sr_port/lk_check_own.c
+++ b/sr_port/lk_check_own.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -60,7 +61,7 @@ boolean_t	lk_check_own(mlk_pvtblk *x)
 			   we are no longer blocked on it and can pretend that the process
 			   holding the lock went away */
 			ret_val = TRUE;
-		} else if (BLOCKING_PROC_ALIVE(x, time, icount, status))
+		} else if (BLOCKING_PROC_DEAD(x, time, icount, status))
 		{	/* process that owned lock has died, free lock. */
 			x->blocked->owner = 0;
 			csa->hdr->trans_hist.lock_sequence++;
diff --git a/sr_port/lke.hlp b/sr_port/lke.hlp
index bcc0f91..8544d77 100644
--- a/sr_port/lke.hlp
+++ b/sr_port/lke.hlp
@@ -555,7 +555,7 @@
 1 Copyright
    Copyright
 
-   Copyright 2014
+   Copyright 2015
 
    Fidelity National Information Services, Inc. and/or its subsidiaries. All
    rights reserved.
@@ -577,7 +577,7 @@
 
    **Note**
 
-   This help file is a concise representation of revision V6.2-001 of the
+   This help file is a concise representation of revision V6.2-002 of the
    UNIX Administration and Operations Guide. To obtain a copy of the current
    revision, go to www.fis-gtm.com and then click on the User Documentation
    tab.
diff --git a/sr_port/lke_showtree.c b/sr_port/lke_showtree.c
index 3154539..665baa0 100644
--- a/sr_port/lke_showtree.c
+++ b/sr_port/lke_showtree.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,6 +26,7 @@
 
 #include "mlkdef.h"
 #include "cmidef.h"
+#include "gtmio.h"
 #include "lke.h"
 
 #define KDIM	64		/* max number of subscripts */
@@ -46,6 +48,7 @@ void lke_show_memory(mlk_shrblk_ptr_t bhead, char *prefix)
 		memcpy(temp, dsub->data, dsub->length);
 		temp[dsub->length] = '\0';
 		PRINTF("%s%s : [shrblk] %lx : [shrsub] %lx\n", prefix, temp, (long unsigned int) b, (long unsigned int) dsub);
+		FFLUSH(stdout);
 		if (b->children)
 			lke_show_memory((mlk_shrblk_ptr_t)R2A(b->children), new_prefix);
 		bnext = (mlk_shrblk_ptr_t)R2A(b->rsib);
@@ -121,6 +124,6 @@ bool	lke_showtree(struct CLB 	*lnk,
 			subscript_offset[depth] = name.len;
 		}
 		if (util_interrupt)
-			rts_error(VARLSTCNT(1) ERR_CTRLC);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_CTRLC);
 	}
 }
diff --git a/sr_port/locklits.h b/sr_port/locklits.h
index aeb6ca3..e4ba8fb 100644
--- a/sr_port/locklits.h
+++ b/sr_port/locklits.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -24,4 +25,4 @@
 #define NOT_DEAD 0
 #define NOT_THERE -1
 
-#define LOCK_SELF_WAKE 100
+#define LOCK_SELF_WAKE		 100	/* sleep 100 msec before checking if wakeup was sent by lock holder */
diff --git a/sr_port/m_do.c b/sr_port/m_do.c
index 8208956..ffda795 100644
--- a/sr_port/m_do.c
+++ b/sr_port/m_do.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,6 +26,7 @@ error_def(ERR_ACTOFFSET);
 
 int m_do(void)
 {
+	int		opcd;
 	oprtype		*cr;
 	triple		*calltrip, *labelref, *obp, *oldchain, *ref0, *ref1, *routineref, tmpchain, *triptr, *tripsize;
 	DCL_THREADGBL_ACCESS;
@@ -68,21 +70,37 @@ int m_do(void)
 			if (OC_EXTCALL == calltrip->opcode)
 			{
 				assert(TRIP_REF == calltrip->operand[1].oprclass);
-				if (OC_CDLIT == calltrip->operand[1].oprval.tref->opcode)
-					assert(CDLT_REF == calltrip->operand[1].oprval.tref->operand[0].oprclass);
-				else ARLINK_ONLY(if (OC_LAB_EXT != calltrip->operand[1].oprval.tref->opcode))
+				opcd = calltrip->operand[1].oprval.tref->opcode;
+				if ((OC_CDLIT == opcd) || (OC_CDIDX == opcd))
+				{
+					DEBUG_ONLY(opcd = calltrip->operand[1].oprval.tref->operand[0].oprclass);
+					assert((CDLT_REF == opcd) || (CDIDX_REF == opcd));
+				} else
 				{
 					assert(OC_LABADDR == calltrip->operand[1].oprval.tref->opcode);
 					assert(TRIP_REF == calltrip->operand[1].oprval.tref->operand[1].oprclass);
 					assert(OC_PARAMETER == calltrip->operand[1].oprval.tref->operand[1].oprval.tref->opcode);
 					assert(TRIP_REF ==
 						calltrip->operand[1].oprval.tref->operand[1].oprval.tref->operand[0].oprclass);
-					assert(OC_ILIT == calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
-						operand[0].oprval.tref->opcode);
-					assert(ILIT_REF == calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
-						operand[0].oprval.tref->operand[0].oprclass);
-					if (0 != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
-						operand[0].oprval.tref->operand[0].oprval.ilit)
+					DEBUG_ONLY(opcd = calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						   operand[0].oprval.tref->opcode);
+					assert((OC_ILIT == opcd) || (OC_COMINT == opcd));
+					DEBUG_ONLY(opcd = calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						   operand[0].oprval.tref->operand[0].oprclass);
+					assert((ILIT_REF == opcd) || (TRIP_REF == opcd));
+					/* The opcd references above added to allow an invalid syntax using indirect values for
+					 * offsets while specifying a parm list to get through the above asserts (invalid syntax
+					 * should not trip asserts) but it leads to the conclusion that the below test may not be
+					 * robust enough since it is looking at a literal integer value when there is none so have
+					 * added further checks mirroring the first checks done in the two most recent asserts to
+					 * make the check more robust. [Example bad code: Do @lbl+ at n^artn(arg)]
+					 */
+					if ((0 != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+					     operand[0].oprval.tref->operand[0].oprval.ilit)
+					    || (OC_ILIT != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						operand[0].oprval.tref->opcode)
+					    || (ILIT_REF != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						operand[0].oprval.tref->operand[0].oprclass))
 					{
 						stx_error(ERR_ACTOFFSET);
 						return FALSE;
diff --git a/sr_port/m_merge.c b/sr_port/m_merge.c
index eb40a12..72aa8e5 100644
--- a/sr_port/m_merge.c
+++ b/sr_port/m_merge.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,6 +11,9 @@
  ****************************************************************/
 
 #include "mdef.h"
+
+#include "gtm_string.h"
+
 #include "compiler.h"
 #include "mdq.h"
 #include "opcode.h"
@@ -44,70 +48,72 @@ int m_merge(void)
 	/* Left Hand Side of EQUAL sign */
 	switch (TREF(window_token))
 	{
-	case TK_IDENT:
-		if (!lvn(&mopr, OC_PUTINDX, 0))
-			return FALSE;
-		if (OC_PUTINDX == mopr.oprval.tref->opcode)
-		{	/* we insert left hand side argument into tmpchain. */
-			sub = mopr.oprval.tref;
-			put_oc = OC_PUTINDX;
-			dqdel(mopr.oprval.tref, exorder);
-			dqins(tmpchain.exorder.bl, exorder, mopr.oprval.tref);
-		}
-		ref = maketriple(OC_MERGE_LVARG);
-		ref->operand[0] = put_ilit(MARG1_LCL);
-		ref->operand[1] = mopr;
-		dqins(tmpchain.exorder.bl, exorder, ref);
-		break;
-	case TK_CIRCUMFLEX:
-		s1 = (TREF(curtchain))->exorder.bl;
-		if (!gvn())
-			return FALSE;
-		for (sub = (TREF(curtchain))->exorder.bl; sub != s1; sub = sub->exorder.bl)
-		{
-			put_oc = sub->opcode;
-			if (OC_GVNAME == put_oc || OC_GVNAKED == put_oc || OC_GVEXTNAM == put_oc)
-				break;
-		}
-		assert((OC_GVNAME == put_oc) || (OC_GVNAKED == put_oc) || (OC_GVEXTNAM == put_oc));
-		/* we insert left hand side argument into tmpchain. */
-		dqdel(sub, exorder);
-		dqins(tmpchain.exorder.bl ,exorder, sub);
-		ref = maketriple(OC_MERGE_GVARG);
-		ref->operand[0] = put_ilit(MARG1_GBL);
-		dqins(tmpchain.exorder.bl, exorder, ref);
-		break;
-	case TK_ATSIGN:
-		if (!indirection(&mopr))
-			return FALSE;
-		if (TK_EQUAL != TREF(window_token))
-		{
-			ref = newtriple(OC_COMMARG);
-			ref->operand[0] = mopr;
-			ref->operand[1] = put_ilit((mint) indir_merge);
-			return TRUE;
-		}
-		type = MARG1_LCL | MARG1_GBL;
-		MV_FORCE_MVAL(&mv, type);
-		MV_FORCE_STRD(&mv);
-		if (TREF(side_effect_handling))
-		{	/* save and restore the variable lookup for true left-to-right evaluation */
-			used_glvn_slot = TRUE;
-			INSERT_INDSAVGLVN(control_slot, mopr, ANY_SLOT, 0);	/* 0 flag to defer global reference */
-			ref = maketriple(OC_INDMERGE2);
-			ref->operand[0] = control_slot;
-		} else
-		{	/* quick and dirty old way */
-			ref = maketriple(OC_INDMERGE);
-			ref->operand[0] = put_lit(&mv);
+		case TK_IDENT:
+			if (!lvn(&mopr, OC_PUTINDX, 0))
+				return FALSE;
+			if (OC_PUTINDX == mopr.oprval.tref->opcode)
+			{	/* we insert left hand side argument into tmpchain. */
+				sub = mopr.oprval.tref;
+				put_oc = OC_PUTINDX;
+				dqdel(mopr.oprval.tref, exorder);
+				dqins(tmpchain.exorder.bl, exorder, mopr.oprval.tref);
+			}
+			ref = maketriple(OC_MERGE_LVARG);
+			ref->operand[0] = put_ilit(MARG1_LCL);
 			ref->operand[1] = mopr;
-		}
-		/* we insert left hand side argument into tmpchain. */
-		dqins(tmpchain.exorder.bl, exorder, ref);
-		break;
-	default:
-		stx_error(ERR_VAREXPECTED);
-		return FALSE;
+			dqins(tmpchain.exorder.bl, exorder, ref);
+			break;
+		case TK_CIRCUMFLEX:
+			s1 = (TREF(curtchain))->exorder.bl;
+			if (!gvn())
+				return FALSE;
+			assert(OC_GVRECTARG != (TREF(curtchain))->opcode);	/* we count on gvn not having been shifted */
+			for (sub = (TREF(curtchain))->exorder.bl; sub != s1; sub = sub->exorder.bl)
+			{
+				put_oc = sub->opcode;
+				if (OC_GVNAME == put_oc || OC_GVNAKED == put_oc || OC_GVEXTNAM == put_oc)
+					break;
+			}
+			assert((OC_GVNAME == put_oc) || (OC_GVNAKED == put_oc) || (OC_GVEXTNAM == put_oc));
+			/* we insert left hand side argument into tmpchain. */
+			dqdel(sub, exorder);
+			dqins(tmpchain.exorder.bl ,exorder, sub);
+			ref = maketriple(OC_MERGE_GVARG);
+			ref->operand[0] = put_ilit(MARG1_GBL);
+			dqins(tmpchain.exorder.bl, exorder, ref);
+			break;
+		case TK_ATSIGN:
+			if (!indirection(&mopr))
+				return FALSE;
+			if (TK_EQUAL != TREF(window_token))
+			{
+				ref = newtriple(OC_COMMARG);
+				ref->operand[0] = mopr;
+				ref->operand[1] = put_ilit((mint) indir_merge);
+				return TRUE;
+			}
+			type = MARG1_LCL | MARG1_GBL;
+			memset(&mv, 0, SIZEOF(mval));	/* Initialize so unused fields don't cause object hash differences */
+			MV_FORCE_MVAL(&mv, type);
+			MV_FORCE_STRD(&mv);
+			if (TREF(side_effect_handling))
+			{	/* save and restore the variable lookup for true left-to-right evaluation */
+				used_glvn_slot = TRUE;
+				INSERT_INDSAVGLVN(control_slot, mopr, ANY_SLOT, 0);	/* 0 flag to defer global reference */
+				ref = maketriple(OC_INDMERGE2);
+				ref->operand[0] = control_slot;
+			} else
+			{	/* quick and dirty old way */
+				ref = maketriple(OC_INDMERGE);
+				ref->operand[0] = put_lit(&mv);
+				ref->operand[1] = mopr;
+			}
+			/* we insert left hand side argument into tmpchain. */
+			dqins(tmpchain.exorder.bl, exorder, ref);
+			break;
+		default:
+			stx_error(ERR_VAREXPECTED);
+			return FALSE;
 	}
 	if (TREF(window_token) != TK_EQUAL)
 	{
@@ -119,37 +125,38 @@ int m_merge(void)
 	TREF(temp_subs) = FALSE;
 	switch (TREF(window_token))
 	{
-	case TK_IDENT:
-		if (!lvn(&mopr, OC_M_SRCHINDX, 0))
-			return FALSE;
-		ref = newtriple(OC_MERGE_LVARG);
-		ref->operand[0] = put_ilit(MARG2_LCL);
-		ref->operand[1] = mopr;
-		break;
-	case TK_CIRCUMFLEX:
-		if (!gvn())
-			return FALSE;
-		ref = newtriple(OC_MERGE_GVARG);
-		ref->operand[0] = put_ilit(MARG2_GBL);
-		break;
-	case TK_ATSIGN:
-		TREF(temp_subs) = TRUE;
-		if (!indirection(&mopr))
-		{
+		case TK_IDENT:
+			if (!lvn(&mopr, OC_M_SRCHINDX, 0))
+				return FALSE;
+			ref = newtriple(OC_MERGE_LVARG);
+			ref->operand[0] = put_ilit(MARG2_LCL);
+			ref->operand[1] = mopr;
+			break;
+		case TK_CIRCUMFLEX:
+			if (!gvn())
+				return FALSE;
+			ref = newtriple(OC_MERGE_GVARG);
+			ref->operand[0] = put_ilit(MARG2_GBL);
+			break;
+		case TK_ATSIGN:
+			TREF(temp_subs) = TRUE;
+			if (!indirection(&mopr))
+			{
+				stx_error(ERR_VAREXPECTED);
+				return FALSE;
+			}
+			type = MARG2_LCL | MARG2_GBL;
+			memset(&mv, 0, SIZEOF(mval));	/* Initialize so unused fields don't cause object hash differences */
+			MV_FORCE_MVAL(&mv, type);
+			MV_FORCE_STRD(&mv);
+			ref = maketriple(OC_INDMERGE);
+			ref->operand[0] =  put_lit(&mv);
+			ref->operand[1] = mopr;
+			ins_triple(ref);
+			break;
+		default:
 			stx_error(ERR_VAREXPECTED);
 			return FALSE;
-		}
-		type = MARG2_LCL | MARG2_GBL;
-		MV_FORCE_MVAL(&mv, type);
-		MV_FORCE_STRD(&mv);
-		ref = maketriple(OC_INDMERGE);
-		ref->operand[0] =  put_lit(&mv);
-		ref->operand[1] = mopr;
-		ins_triple(ref);
-		break;
-	default:
-		stx_error(ERR_VAREXPECTED);
-		return FALSE;
 	}
 	/*
 	 * Make sure that during runtime right hand side argument is processed first.
diff --git a/sr_port/m_read.c b/sr_port/m_read.c
index c07a8f3..2512389 100644
--- a/sr_port/m_read.c
+++ b/sr_port/m_read.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -60,6 +61,7 @@ int m_read(void)
 			s1 = (TREF(curtchain))->exorder.bl;
 			if (!gvn())
 				return FALSE;
+			assert(OC_GVRECTARG != (TREF(curtchain))->opcode);	/* we count on gvn not having been shifted */
 			for (sub = (TREF(curtchain))->exorder.bl;  sub != s1;  sub = sub->exorder.bl)
 			{
 				put_oc = sub->opcode;
@@ -119,6 +121,7 @@ int m_read(void)
 		s1 = (TREF(curtchain))->exorder.bl;
 		if (!gvn())
 			return FALSE;
+		assert(OC_GVRECTARG != (TREF(curtchain))->opcode);	/* we count on gvn not having been shifted */
 		for (sub = (TREF(curtchain))->exorder.bl;  sub != s1;  sub = sub->exorder.bl)
 		{
 			put_oc = sub->opcode;
diff --git a/sr_port/m_set.c b/sr_port/m_set.c
index 03a9272..c55f98c 100644
--- a/sr_port/m_set.c
+++ b/sr_port/m_set.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -295,6 +296,7 @@ int m_set(void)
 			s1 = (TREF(curtchain))->exorder.bl;
 			if (!gvn())
 				SYNTAX_ERROR_NOREPORT_HERE;
+			assert(OC_GVRECTARG != (TREF(curtchain))->opcode);	/* we count on gvn not having been shifted */
 			for (sub = (TREF(curtchain))->exorder.bl; sub != s1; sub = sub->exorder.bl)
 			{
 				put_oc = sub->opcode;
@@ -482,6 +484,7 @@ int m_set(void)
 					s1 = (TREF(curtchain))->exorder.bl;
 					if (!gvn())
 						SYNTAX_ERROR_NOREPORT_HERE;
+					assert(OC_GVRECTARG != (TREF(curtchain))->opcode);	/* gvn not shifted */
 					for (sub = (TREF(curtchain))->exorder.bl; sub != s1 ; sub = sub->exorder.bl)
 					{
 						put_oc = sub->opcode;
diff --git a/sr_port/m_tstart.c b/sr_port/m_tstart.c
index a83f831..45a2334 100644
--- a/sr_port/m_tstart.c
+++ b/sr_port/m_tstart.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,6 +11,9 @@
  ****************************************************************/
 
 #include "mdef.h"
+
+#include "gtm_string.h"
+
 #include "compiler.h"
 #include "opcode.h"
 #include "toktyp.h"
@@ -181,6 +185,7 @@ int m_tstart(void)
 	}
 	if (!has_tid)
 	{
+		memset(&dummyid, 0, SIZEOF(mval));	/* Initialize so unused fields don't cause object hash differences */
 		dummyid.mvtype = MV_STR;
 		dummyid.str.len = 0;
 		tid->operand[0] = put_lit(&dummyid);
diff --git a/sr_port/m_write.c b/sr_port/m_write.c
index 2e13a61..ace285b 100644
--- a/sr_port/m_write.c
+++ b/sr_port/m_write.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -115,6 +116,7 @@ int m_write(void)
 		{
 			lit.mvtype = MV_STR;
 			lit.str.addr = cp = (char *)stringpool.free;
+			CLEAR_MVAL_BITS(&lit);
 			for (t1 = ref = *ptx++ ; ref ; ref = *ptx++)
 			{
 				if (OC_WRITE == ref->opcode)
diff --git a/sr_port/m_zwrite.c b/sr_port/m_zwrite.c
index cf8def9..8357171 100644
--- a/sr_port/m_zwrite.c
+++ b/sr_port/m_zwrite.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -77,108 +78,111 @@ int m_zwrite(void)
 		op = OC_LVZWRITE;
 	switch (TREF(window_token))
 	{
-	case TK_SPACE:
-	case TK_EOL:
-		if (OC_GVZWRITE == op)
-		{
-			stx_error(ERR_VAREXPECTED);
-			return FALSE;
-		}
-		op = OC_LVPATWRITE;
-		head = maketriple(op);
-		head->operand[0] = put_ilit((mint)3);		/* count */
-		ref1 = newtriple(OC_PARAMETER);
-		head->operand[1] = put_tref(ref1);
-		ref1->operand[0] = put_ilit(0);			/* shows not from zshow */
-		ref = newtriple(OC_PARAMETER);
-		ref1->operand[1] = put_tref(ref);
-		ref->operand[0] = put_str((char *)pat_everything, sizeof_pat_everything);
-		MV_FORCE_MVAL(&mv, ZWRITE_ASTERISK) ;
-		ref->operand[1] = put_lit(&mv);
-		ins_triple(head);
-		return TRUE;
-	case TK_IDENT:
-		name = put_str((TREF(window_ident)).addr, (TREF(window_ident)).len);
-		advancewindow();
-		break;
-	case TK_DOLLAR:
-		advancewindow();
-		if ((TK_IDENT != TREF(window_token)) || (OC_GVZWRITE == op))
-		{
-			stx_error(ERR_SVNEXPECTED);
-			return FALSE;
-		}
-		parse_warn = FALSE;
-		index = namelook(svn_index, svn_names, (TREF(window_ident)).addr, (TREF(window_ident)).len);
-		if (0 > index)
-		{
-			STX_ERROR_WARN(ERR_INVSVN);     /* sets "parse_warn" to TRUE */
-		} else
-		{
-			if (!VALID_SVN(index))
-			{
-				STX_ERROR_WARN(ERR_FNOTONSYS);  /* sets "parse_warn" to TRUE */
-			}
-		}
-		advancewindow();
-		switch (TREF(window_token))
-		{
 		case TK_SPACE:
 		case TK_EOL:
-		case TK_COMMA:
-			if (!parse_warn)
+			if (OC_GVZWRITE == op)
 			{
-				assert(SV_NUM_SV > svn_data[index].opcode);
-				ref = maketriple(OC_ZWRITESVN);
-				ref->operand[0] = put_ilit(svn_data[index].opcode);
-				ins_triple(ref);
-			} else
-			{       /* OC_RTERROR triple would have been inserted in curtchain by ins_errtriple
-				 * (invoked by stx_error). No need to do anything else.
-				 */
-				assert(OC_RTERROR == (TREF(curtchain))->exorder.bl->exorder.bl->exorder.bl->opcode);
+				stx_error(ERR_VAREXPECTED);
+				return FALSE;
 			}
+			op = OC_LVPATWRITE;
+			head = maketriple(op);
+			head->operand[0] = put_ilit((mint)3);		/* count */
+			ref1 = newtriple(OC_PARAMETER);
+			head->operand[1] = put_tref(ref1);
+			ref1->operand[0] = put_ilit(0);			/* shows not from zshow */
+			ref = newtriple(OC_PARAMETER);
+			ref1->operand[1] = put_tref(ref);
+			ref->operand[0] = put_str((char *)pat_everything, sizeof_pat_everything);
+			memset(&mv, 0, SIZEOF(mval));			/* Clear mval so unused fields don't cause objhash
+									 * differences
+									 */
+			MV_FORCE_MVAL(&mv, ZWRITE_ASTERISK) ;
+			ref->operand[1] = put_lit(&mv);
+			ins_triple(head);
 			return TRUE;
+		case TK_IDENT:
+			name = put_str((TREF(window_ident)).addr, (TREF(window_ident)).len);
+			advancewindow();
+			break;
+		case TK_DOLLAR:
+			advancewindow();
+			if ((TK_IDENT != TREF(window_token)) || (OC_GVZWRITE == op))
+			{
+				stx_error(ERR_SVNEXPECTED);
+				return FALSE;
+			}
+			parse_warn = FALSE;
+			index = namelook(svn_index, svn_names, (TREF(window_ident)).addr, (TREF(window_ident)).len);
+			if (0 > index)
+			{
+				STX_ERROR_WARN(ERR_INVSVN);     /* sets "parse_warn" to TRUE */
+			} else
+			{
+				if (!VALID_SVN(index))
+				{
+					STX_ERROR_WARN(ERR_FNOTONSYS);  /* sets "parse_warn" to TRUE */
+				}
+			}
+			advancewindow();
+			switch (TREF(window_token))
+			{
+				case TK_SPACE:
+				case TK_EOL:
+				case TK_COMMA:
+					if (!parse_warn)
+					{
+						assert(SV_NUM_SV > svn_data[index].opcode);
+						ref = maketriple(OC_ZWRITESVN);
+						ref->operand[0] = put_ilit(svn_data[index].opcode);
+						ins_triple(ref);
+					} else
+					{       /* OC_RTERROR triple would have been inserted in curtchain by ins_errtriple
+						 * (invoked by stx_error). No need to do anything else.
+						 */
+						assert(OC_RTERROR == (TREF(curtchain))->exorder.bl->exorder.bl->exorder.bl->opcode);
+					}
+					return TRUE;
+				default:
+					stx_error(ERR_SVNEXPECTED);
+					return FALSE;
+			}
+			break;
+		case TK_LPAREN:
+			if (OC_GVZWRITE != op) /* naked reference */
+			{
+				stx_error(ERR_VAREXPECTED);
+				return FALSE;
+			}
+			name = put_str((TREF(window_ident)).addr, 0);
+			break;
+		case TK_ATSIGN:
+			if (!indirection(&name))
+				return FALSE;
+			if ((OC_LVZWRITE == op) && (TK_LPAREN != TREF(window_token)))
+			{
+				ref = maketriple(OC_COMMARG);
+				ref->operand[0] = name;
+				ref->operand[1] = put_ilit(indir_zwrite);
+				ins_triple(ref);
+				return TRUE;
+			}
+			ref = newtriple(OC_INDPAT);
+			ref->operand[0] = name;
+			name = put_tref(ref);
+			break;
+		case TK_QUESTION:
+			advancewindow();
+			source_column = TREF(last_source_column);
+			if (!compile_pattern(&name, FALSE))
+				return FALSE;
+			if (op == OC_LVZWRITE)
+				op = OC_LVPATWRITE;
+			pat = TRUE;
+			break;
 		default:
-			stx_error(ERR_SVNEXPECTED);
-			return FALSE;
-		}
-		break;
-	case TK_LPAREN:
-		if (OC_GVZWRITE != op) /* naked reference */
-		{
 			stx_error(ERR_VAREXPECTED);
 			return FALSE;
-		}
-		name = put_str((TREF(window_ident)).addr, 0);
-		break;
-	case TK_ATSIGN:
-		if (!indirection(&name))
-			return FALSE;
-		if ((OC_LVZWRITE == op) && (TK_LPAREN != TREF(window_token)))
-		{
-			ref = maketriple(OC_COMMARG);
-			ref->operand[0] = name;
-			ref->operand[1] = put_ilit(indir_zwrite);
-			ins_triple(ref);
-			return TRUE;
-		}
-		ref = newtriple(OC_INDPAT);
-		ref->operand[0] = name;
-		name = put_tref(ref);
-		break;
-	case TK_QUESTION:
-		advancewindow();
-		source_column = TREF(last_source_column);
-		if (!compile_pattern(&name, FALSE))
-			return FALSE;
-		if (op == OC_LVZWRITE)
-			op = OC_LVPATWRITE;
-		pat = TRUE;
-		break;
-	default:
-		stx_error(ERR_VAREXPECTED);
-		return FALSE;
 	}
 	head = maketriple(op);
 	last = newtriple(OC_PARAMETER);
@@ -204,6 +208,7 @@ int m_zwrite(void)
 	if (TK_LPAREN != TREF(window_token))
 	{
 		pcount++;
+		memset(&mv, 0, SIZEOF(mval));			/* Clear mval so unused fields don't cause objhash differences */
 		if (pat)
 		{
 			MV_FORCE_MVAL(&mv, ZWRITE_END);
@@ -224,120 +229,121 @@ int m_zwrite(void)
 	{
 		ref = newtriple(OC_PARAMETER);
 		last->operand[1] = put_tref(ref);
+		memset(&mv, 0, SIZEOF(mval));			/* Clear mval so unused fields don't cause objhash differences */
 		switch (TREF(window_token))
 		{
-		case TK_RPAREN:
-			dqdel(ref,exorder);
-			advancewindow();
-			MV_FORCE_MVAL(&mv, ZWRITE_END);
-			last->operand[1] = put_lit(&mv);
-			pcount++;
-			head->operand[0] = put_ilit((mint)pcount);
-			if (count)
-				count->operand[0] = put_ilit(subscount);
-			ins_triple(head);
-			return TRUE;
-		case TK_ASTERISK:
-			dqdel(ref,exorder);
-			advancewindow();
-			if (TK_RPAREN != TREF(window_token))
-			{
-				stx_error(ERR_RPARENMISSING);
-				return FALSE;
-			}
-			advancewindow();
-			MV_FORCE_MVAL(&mv, ZWRITE_ASTERISK);
-			last->operand[1] = put_lit(&mv);
-			pcount++;
-			subscount++;
-			head->operand[0] = put_ilit((mint)pcount);
-			if (count)
-				count->operand[0] = put_ilit(subscount);
-			ins_triple(head);
-			return TRUE;
-		case TK_QUESTION:
-			advancewindow();
-			source_column = TREF(last_source_column);
-			if (!compile_pattern(&limit, FALSE))
-				return FALSE;
-			if ((TK_COMMA != TREF(window_token)) && (TK_RPAREN != TREF(window_token)))
-			{
-				stx_error(ERR_ZWRSPONE);
-				return FALSE;
-			}
-			if (TK_COMMA == TREF(window_token))
+			case TK_RPAREN:
+				dqdel(ref,exorder);
 				advancewindow();
-			subscount++;
-			MV_FORCE_MVAL(&mv, ZWRITE_PATTERN);
-			ref->operand[0] = put_lit(&mv);
-			pcount++;
-			ref1 = newtriple(OC_PARAMETER);
-			ref->operand[1] = put_tref(ref1);
-			ref1->operand[0] = limit;
-			last = ref1;
-			pcount++;
-			continue;
-		case TK_COLON:
-			if (TK_RPAREN != (c = TREF(director_token)))	/* NOTE assignment */
-			{
-				if (TK_COMMA != c)
+				MV_FORCE_MVAL(&mv, ZWRITE_END);
+				last->operand[1] = put_lit(&mv);
+				pcount++;
+				head->operand[0] = put_ilit((mint)pcount);
+				if (count)
+					count->operand[0] = put_ilit(subscount);
+				ins_triple(head);
+				return TRUE;
+			case TK_ASTERISK:
+				dqdel(ref,exorder);
+				advancewindow();
+				if (TK_RPAREN != TREF(window_token))
 				{
-					advancewindow();
-					MV_FORCE_MVAL(&mv, ZWRITE_UPPER);
-					ref->operand[0] = put_lit(&mv);
-					pcount++;
-					subscount++;
-					break;
+					stx_error(ERR_RPARENMISSING);
+					return FALSE;
 				}
 				advancewindow();
-			}
-			/* caution: fall through */
-		case TK_COMMA:
-			advancewindow();
-			MV_FORCE_MVAL(&mv, ZWRITE_ALL);
-			ref->operand[0] = put_lit(&mv);
-			pcount++;
-			subscount++;
-			last = ref;
-			continue;
-		default:
-			if (EXPR_FAIL == expr(&limit, MUMPS_EXPR))
-				return FALSE;
-			subscount++;
-			last = newtriple(OC_PARAMETER);
-			ref->operand[1] = put_tref(last);
-			last->operand[0] = limit;
-			pcount++;
-			if (TK_COLON == (c = TREF(window_token)))	/* NOTE assignment */
-			{
-				code = ZWRITE_LOWER;
+				MV_FORCE_MVAL(&mv, ZWRITE_ASTERISK);
+				last->operand[1] = put_lit(&mv);
+				pcount++;
+				subscount++;
+				head->operand[0] = put_ilit((mint)pcount);
+				if (count)
+					count->operand[0] = put_ilit(subscount);
+				ins_triple(head);
+				return TRUE;
+			case TK_QUESTION:
 				advancewindow();
-				c = TREF(window_token);
-			} else
-				code = ZWRITE_VAL;
-			switch (c)
-			{
+				source_column = TREF(last_source_column);
+				if (!compile_pattern(&limit, FALSE))
+					return FALSE;
+				if ((TK_COMMA != TREF(window_token)) && (TK_RPAREN != TREF(window_token)))
+				{
+					stx_error(ERR_ZWRSPONE);
+					return FALSE;
+				}
+				if (TK_COMMA == TREF(window_token))
+					advancewindow();
+				subscount++;
+				MV_FORCE_MVAL(&mv, ZWRITE_PATTERN);
+				ref->operand[0] = put_lit(&mv);
+				pcount++;
+				ref1 = newtriple(OC_PARAMETER);
+				ref->operand[1] = put_tref(ref1);
+				ref1->operand[0] = limit;
+				last = ref1;
+				pcount++;
+				continue;
+			case TK_COLON:
+				if (TK_RPAREN != (c = TREF(director_token)))	/* NOTE assignment */
+				{
+					if (TK_COMMA != c)
+					{
+						advancewindow();
+						MV_FORCE_MVAL(&mv, ZWRITE_UPPER);
+						ref->operand[0] = put_lit(&mv);
+						pcount++;
+						subscount++;
+						break;
+					}
+					advancewindow();
+				}
+				/* caution: fall through */
 			case TK_COMMA:
 				advancewindow();
-				/* caution: fall through */
-			case TK_RPAREN:
-				MV_FORCE_MVAL(&mv, code) ;
+				MV_FORCE_MVAL(&mv, ZWRITE_ALL);
 				ref->operand[0] = put_lit(&mv);
 				pcount++;
+				subscount++;
+				last = ref;
 				continue;
 			default:
-				if (code == ZWRITE_VAL)
-				{
-					stx_error(ERR_COMMA);
+				if (EXPR_FAIL == expr(&limit, MUMPS_EXPR))
 					return FALSE;
-				}
-				MV_FORCE_MVAL(&mv, ZWRITE_BOTH) ;
-				ref->operand[0] = put_lit(&mv);
+				subscount++;
+				last = newtriple(OC_PARAMETER);
+				ref->operand[1] = put_tref(last);
+				last->operand[0] = limit;
 				pcount++;
-				ref = last;
+				if (TK_COLON == (c = TREF(window_token)))	/* NOTE assignment */
+				{
+					code = ZWRITE_LOWER;
+					advancewindow();
+					c = TREF(window_token);
+				} else
+					code = ZWRITE_VAL;
+				switch (c)
+				{
+					case TK_COMMA:
+						advancewindow();
+						/* caution: fall through */
+					case TK_RPAREN:
+						MV_FORCE_MVAL(&mv, code) ;
+						ref->operand[0] = put_lit(&mv);
+						pcount++;
+						continue;
+					default:
+						if (code == ZWRITE_VAL)
+						{
+							stx_error(ERR_COMMA);
+							return FALSE;
+						}
+						MV_FORCE_MVAL(&mv, ZWRITE_BOTH) ;
+						ref->operand[0] = put_lit(&mv);
+						pcount++;
+						ref = last;
+						break;
+				}
 				break;
-			}
-			break;
 		}
 		if (EXPR_FAIL == expr(&limit, MUMPS_EXPR))
 			return FALSE;
diff --git a/sr_port/make_gvsubsc.c b/sr_port/make_gvsubsc.c
index 5a88fa4..344f58a 100644
--- a/sr_port/make_gvsubsc.c
+++ b/sr_port/make_gvsubsc.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -36,6 +37,7 @@ oprtype make_gvsubsc(mval *v)
 	gp->top = MAX_SRCLINE;
 	gp->end = gp->prev = 0;
 	mval2subsc(v, gp, STD_NULL_COLL_FALSE);
+	memset(&w, 0, SIZEOF(mval));	/* Clear mval so ununsed fields don't cause objhash differences */
 	w.mvtype = MV_STR | MV_SUBLIT;
 	w.str.addr = (char *) gp->base;
 	w.str.len = gp->end + 1;
diff --git a/sr_port/mdb_condition_handler.c b/sr_port/mdb_condition_handler.c
index 30f8d6e..3c3abe0 100644
--- a/sr_port/mdb_condition_handler.c
+++ b/sr_port/mdb_condition_handler.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -100,12 +101,11 @@ GBLREF	gd_region		*gv_cur_region;
 GBLREF	gv_key			*gv_currkey;
 GBLREF	gv_namehead		*gv_target;
 GBLREF	inctn_opcode_t		inctn_opcode;
-GBLREF	int			mumps_status, merge_args;
+GBLREF	int			mumps_status;
 GBLREF	int4			exi_condition;
 GBLREF	io_desc			*active_device, *gtm_err_dev;
 GBLREF	io_pair			io_std_device, io_curr_device;
 GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	lvzwrite_datablk	*lvzwrite_block;
 GBLREF	mstr			*err_act;
 GBLREF	mval			*alias_retarg, dollar_etrap, dollar_zstatus, dollar_zerror, dollar_ztrap;
 GBLREF	mv_stent		*mv_chain;
@@ -318,18 +318,14 @@ CONDITION_HANDLER(mdb_condition_handler)
 	MDB_START;
 	assert(FALSE == in_gvcst_incr);	/* currently there is no known case where this can be TRUE at this point */
 	in_gvcst_incr = FALSE;	/* reset this just in case gvcst_incr/gvcst_put failed to do a good job of resetting */
-	/* Ideally merge should have a condition handler to reset followings, but generated code can call other routines
-	 * during MERGE command (MERGE command invokes multiple op-codes depending on source vs target). So it is not
-	 * easy to establish a condition handler there. Easy solution is following one line code.
-	 */
-	merge_args = 0;
-	TREF(in_zwrite) = FALSE;
-	inctn_opcode = inctn_invalid_op;
 	if ((SUCCESS != SEVERITY) && (INFO != SEVERITY))
 	{
-		if (lvzwrite_block)
-			/* If lvzwrite_block does not (yet) exist, no harm, no foul */
-			lvzwrite_block->curr_subsc = lvzwrite_block->subsc_count = 0;
+		inctn_opcode = inctn_invalid_op;
+		/* Ideally merge should have a condition handler to reset followings, but generated code can call other routines
+		 * during MERGE command (MERGE command invokes multiple op-codes depending on source vs target). So it is not
+		 * easy to establish a condition handler there. Easy solution is following one line code.
+		 */
+		NULLIFY_MERGE_ZWRITE_CONTEXT;
 	}
 	if ((int)ERR_TPRETRY == SIGNAL)
 	{
@@ -509,7 +505,7 @@ CONDITION_HANDLER(mdb_condition_handler)
 			SET_ZSTATUS(NULL);
 		}
 		/* Create the ZSHOW dump file if it can be created */
-		create_fatal_error_zshow_dmp(SIGNAL, repeat_error);
+		create_fatal_error_zshow_dmp(SIGNAL);
 
 		/* If we are about to core/exit on a stack over flow, only do the core part if a debug
 		 * flag requests this behaviour. Otherwise, supress the core and just exit.
diff --git a/sr_port/mdef.h b/sr_port/mdef.h
index 7526145..711ab70 100644
--- a/sr_port/mdef.h
+++ b/sr_port/mdef.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -119,7 +120,9 @@ error_def(ERR_ASSERT);
 /* Need to set a flag to 0 or 1 depending on whether AUTORELINK_SUPPORTED is set or not. This is needed by gtmpcat so it can
  * tell if autorelink is supported on the platform or not. While this could be done by always setting AUTORELINK_SUPPORTED
  * which a value of 0 or 1, that's not how the code that uses it is structured so create this new variable with a value
- * depending on whether AUTORELINK_SUPPORTED is defined or not.
+ * depending on whether AUTORELINK_SUPPORTED is defined or not. Specifically, this variable is used with a $DEFINE stmt in
+ * gtmpcat_field_defs.txt which gtmpcatfldbld.m uses to create the gtmpcat initialization file. This allows us to capture the
+ * values of #define constants and put them into gtmpcat initialization files for use by gtmpcat.
  */
 #ifdef AUTORELINK_SUPPORTED
 # define ARLINK_ENABLED 1
@@ -1396,6 +1399,10 @@ qw_num	gtm_byteswap_64(qw_num num64);
 #define ONEDAY			86400	/* seconds in a day */
 #define MILLISECS_IN_SEC	1000	/* millseconds in a second */
 #define MICROSEC_IN_SEC		1000000 /* microseconds in a second */
+#define MICROSECS_IN_MSEC	1000	/* microseconds in a millisecond */
+#define E_6			1000000
+#define E_9			1000000000
+#define E_18			1000000000000000000LL
 
 #define ASSERT_IN_RANGE(low, x, high)	assert((low <= x) && (x <= high))
 
@@ -1797,9 +1804,14 @@ enum
 #define MAX_INDSUBSCRIPTS 32
 #define MAX_FOR_STACK 32
 
-#define	MAX_ACTUALS	32	/* Maximum number of arguments allowed in an actuallist. This value also determines
-				 * how many parameters are allowed to be passed between M and C.
-				 */
+#define PUSH_PARM_OVERHEAD	4	/* This extra space in the array is needed because push_parm() is capable of handling 32
+					 * arguments, but callg needs to accomidate space for 4 items, namely argument count
+					 * (repeated twice), return value, and the truth value. As of this writing ojchildparms.c is
+					 * the only module that relies on the extra space.
+					 */
+#define	MAX_ACTUALS		32	/* Maximum number of arguments allowed in an actuallist. This value also determines
+					 * how many parameters are allowed to be passed between M and C.
+					 */
 #if defined(DEBUG) && defined(UNIX)
 #define OPERATOR_LOG_MSG												\
 {															\
diff --git a/sr_port/merrors.msg b/sr_port/merrors.msg
index 0679bda..cbeb3cc 100644
--- a/sr_port/merrors.msg
+++ b/sr_port/merrors.msg
@@ -1,6 +1,7 @@
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !								!
-!	Copyright 2001, 2014 Fidelity Information Services, Inc	!
+! Copyright (c) 2001-2015 Fidelity National Information 	!
+! Services, Inc. and/or its subsidiaries. All rights reserved.	!
 !								!
 !	This source code contains the intellectual property	!
 !	of its copyright holder(s), and is made available	!
@@ -674,8 +675,8 @@ CCPSIGDMP	<CCP non fatal dump, continuing operation. Report to your GT.M Support
 NOPRINCIO	<Unable to write to principal device>/fatal/fao=0!/ansi=0
 INVPORTSPEC	<Invalid port specification>/error/fao=0!/ansi=0
 INVADDRSPEC	<Invalid IP address specification>/error/fao=0!/ansi=0
-UNUSEDMSG677	<SOCKPARMREQ last used in V6.0-002>/error/fao=0!/ansi=78
-UNUSEDMSG678	<IPADDRREQ last used in V6.0-002>/error/fao=0!/ansi=0
+UNUSEDMSG678	<SOCKPARMREQ last used in V6.0-002>/error/fao=0!/ansi=78
+UNUSEDMSG679	<IPADDRREQ last used in V6.0-002>/error/fao=0!/ansi=0
 SOCKWAIT	<Error waiting for socket connection>/error/fao=0!/ansi=80
 SOCKACPT	<Error accepting socket connection>/error/fao=0!/ansi=81
 SOCKINIT	<Error initializing socket: (errno == !UL) !AD>/error/fao=3!/ansi=80
@@ -704,7 +705,7 @@ DBCRERR		<Database file !AD, cr location 0x!XJ blk = 0x!XL error: !AD was 0x!XL,
 MUSTANDALONE	<Could not get exclusive access to !AD> /info /fao=2!/ansi=0
 MUNOACTION	<MUPIP unable to perform requested action> /error /fao=0!/ansi=0
 RMBIGSHARE	<File with BIGRECORD specified may only be shared if READONLY>/error/fao=0!/ansi=0
-TPRESTART	<Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16 at XQ> /info /fao=14!/ansi=0
+TPRESTART	<Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16 at XQ, zpos: !AD> /info /fao=16!/ansi=0
 SOCKWRITE	<Write to a socket failed> /error /fao=0!/ansi=0
 DBCNTRLERR	<Database file !AD: control error suspected but not found> /info /fao=2!/ansi=0
 NOTERMENV	<Environment variable TERM not set.  Assuming "unknown."> /info /fao=0!/ansi=0
@@ -773,7 +774,7 @@ MEMORYRECURSIVE	<Memory Subsystem called recursively>/fatal/fao=0!/ansi=0
 FREEZEID	<Cache !AD on !AD by freeze id 0x!XL with match 0x!XL from 0x!XJ>/info/fao=7!/ansi=0
 BLKWRITERR	<Unable to queue disk write for block 0x!XL.  Will keep trying.>/info/fao=1!/ansi=0
 STOPTIMEOUT	<Waited too long for stopped process to release.  Region: !AD.>/error/fao=2!/ansi=0
-UNUSEDMSG776	<TRIGMODINTP last used in V6.2-000>/error/fao=0!/ansi=0
+UNUSEDMSG777	<TRIGMODINTP last used in V6.2-000>/error/fao=0!/ansi=0
 BCKUPBUFLUSH	<Unable to flush buffer for online backup>/error/fao=0!/ansi=0
 NOFORKCORE	<Unable to fork off process to create core.  Core creation postponed.>/warning/fao=0!/ansi=0
 JNLREAD		<Error reading from journal file !AD at offset [0x!XL]>/error/fao=3!/ansi=0
@@ -896,7 +897,7 @@ SCNDDBNOUPD	<Database Updates not allowed on the secondary>/error/fao=0!/ansi=0
 MUINFOUINT4	<!AD : !UL [0x!XL]>/info/fao=4!/ansi=0
 NLMISMATCHCALC	<Location of !AD expected at 0x!XL, but found at 0x!XL>/error/fao=4!/ansi=0
 RELINKCTLFULL	<Relinkctl file for directory !AD is full (maximum entries !UL)>/error/fao=3!/ansi=0
-UNUSEDMSG899	<GTMSECSHRDEFLOG last used in V5.5-000>/info/fao=0!/ansi=0
+UNUSEDMSG900	<GTMSECSHRDEFLOG last used in V5.5-000>/info/fao=0!/ansi=0
 DBBADNSUB	<!AD Bad numeric subscript>/error/fao=2!/ansi=0
 DBBADKYNM	<!AD Bad key name>/error/fao=2!/ansi=0
 DBBADPNTR	<!AD Bad pointer value in directory>/error/fao=2!/ansi=0
@@ -947,7 +948,7 @@ DBMBPFRDLBM	<!AD Master bit map shows this map has space, agreeing with disk loc
 DBMBPFRINT	<!AD Master bit map shows this map has space, agreeing with MUPIP INTEG>/warning/fao=2!/ansi=0
 DBMAXKEYEXC	<!AD Maximum key size for database exceeds design maximum>/error/fao=2!/ansi=0
 DBMXRSEXCMIN	<!AD Maximum record size for database is less than the design minimum>/error/fao=2!/ansi=0
-UNUSEDMSG950	<DBMAXRSEXBL : Last used in V5.5-000>/error/fao=0!/ansi=0
+UNUSEDMSG951	<DBMAXRSEXBL : Last used in V5.5-000>/error/fao=0!/ansi=0
 DBREADBM	<!AD Read error on bitmap>/error/fao=2!/ansi=0
 DBCOMPTOOLRG	<!AD Record has too large compression count>/error/fao=2!/ansi=0
 DBVERPERFWARN2	<Peformance warning: Database !AD is not fully upgraded. Run MUPIP REORG UPGRADE for best overall performance>/warning/fao=2!/ansi=0
@@ -1316,7 +1317,7 @@ CRYPTJNLWRONGHASH	<Encryption key hash mismatch between journal file !AD and cor
 CRYPTKEYFETCHFAILED	<Could not retrieve encryption key corresponding to file !AD. !AD>/error/fao=4!/ansi=0
 CRYPTKEYFETCHFAILEDNF	<Could not retrieve encryption key during !AD operation key. !AD>/error/fao=4!/ansi=0
 CRYPTHASHGENFAILED	<Could not generate cryptographic hash for symmetric key corresponding to file !AD. !AD>/error/fao=4!/ansi=0
-UNUSEDMSG1319	<CRYPTNOPSWDINTP : Last used in V6.0-003>/error/fao=0!/ansi=0
+UNUSEDMSG1320	<CRYPTNOPSWDINTP : Last used in V6.0-003>/error/fao=0!/ansi=0
 BADTAG		<Unable to use file !AD (CCSID !UL) with CCSID !UL>/error/fao=4!/ansi=0
 ICUVERLT36	<!AD !UL.!UL. ICU version greater than or equal to 3.6 should be used>/error/fao=4!/ansi=0
 ICUSYMNOTFOUND	<Symbol !AD not found in the ICU libraries. ICU needs to be built with symbol-renaming disabled or gtm_icu_version environment variable needs to be properly specified>/error/fao=2!/ansi=0
@@ -1370,7 +1371,7 @@ GVZTRIGFAIL	<ZTRIGGER of a global variable failed.  Failure code: !AD.>/error/fa
 MUUSERLBK	<Abnormal shutdown of replication-enabled database !AD detected>/error/fao=2!/ansi=0
 SETINSETTRIGONLY	<ISV !AD can only be modified in a 'SET' type trigger>/error/fao=2!/ansi=0
 DZTRIGINTRIG	<$ZTRIGGER() is not allowed inside trigger context. Trigger name: !AD>/error/fao=2!/ansi=0
-UNUSEDMSG1373	<SECNODZTRIGINTP : Last used in V6.2-000>/error/fao=0!/ansi=0
+UNUSEDMSG1374	<SECNODZTRIGINTP : Last used in V6.2-000>/error/fao=0!/ansi=0
 BOOLSIDEFFECT	<Extrinsic ($$), External call ($&) or $INCREMENT() with potential side effects in Boolean expression>/warning/fao=0!/ansi=0
 DBBADUPGRDSTATE	<Correcting conflicting values for fields describing database version upgrade state in the file header for region !AD (!AD) - make fresh backups with new journal files immediately.>/warning/fao=4!/ansi=0
 WRITEWAITPID	<PID !UL waited !UL minute(s) for PID !UL to finish writing block 0x!XL in database file !AD>/error/fao=6!/ansi=0
@@ -1382,7 +1383,7 @@ GTMSECSHRCHDIRF	<gtmsecshr unable to chdir to its temporary directory (!AD)>/err
 JNLORDBFLU	<Error flushing database blocks to !AD. See related messages in the operator log>/error/fao=2!/ansi=0
 ZCCLNUPRTNMISNG	<External call: Cleanup routine name missing. Cannot continue>/error/fao=0!/ansi=0
 ZCINVALIDKEYWORD	<External call: Invalid keyword found. Cannot continue>/error/fao=0!/ansi=0
-UNUSEDMSG1385	<REPLNOMULTILINETRG : Last used in V6.2-000>/error/fao=0!/ansi=0
+UNUSEDMSG1386	<REPLNOMULTILINETRG : Last used in V6.2-000>/error/fao=0!/ansi=0
 DBSHMNAMEDIFF	<Database file !AD points to shared memory (id = !UL) which points to a different database file !AZ>/error/fao=4!/ansi=0
 SHMREMOVED	<Removed Shared Memory id !UL corresponding to file !AD>/info/fao=3!/ansi=0
 DEVICEWRITEONLY	<Cannot read from a write-only device>/error/fao=0!/ansi=0
@@ -1536,7 +1537,7 @@ GBLNOMAPTOREG	<Global !AD does not map to region !AD in current global directory
 ISSPANGBL	<Operation cannot be performed on global ^!AD as it spans multiple regions in current global directory>/error/fao=2!/ansi=0
 TPNOSUPPORT	<Operation cannot be performed while inside of a TP transaction>/error/fao=0!/ansi=0
 GVSUBSERR	<Invalid subscripted global name specification in $VIEW() function>/error/fao=0!/ansi=0
-UNUSEDMSG1539	<TRIGNOSPANBL : Last used in V6.2-000>/error/fao=0!/ansi=0
+UNUSEDMSG1540	<TRIGNOSPANBL : Last used in V6.2-000>/error/fao=0!/ansi=0
 FILTERTIMEDOUT	<Replication server timed out attempting to read seqno !16 at XQ from external filter>/error/fao=1!/ansi=0
 TLSDLLNOOPEN	<Failed to load GT.M TLS/SSL library for secure communication>/error/fao=0!/ansi=0
 TLSINIT		<Failed to initialize GT.M TLS/SSL library for secure communication>/error/fao=0!/ansi=0
@@ -1572,7 +1573,7 @@ CRYPTKEYTOOBIG	<Specified key has length !UL, which is greater than the maximum
 CRYPTBADWRTPOS	<Encrypted WRITE disallowed from a position different than where the last WRITE completed>/error/fao=0!/ansi=0
 LABELNOTFND	<GOTO referenced a label that does not exist>/error/fao=0!/ansi=13
 RELINKCTLERR	<Error with relink control structure for $ZROUTINES directory !AD>/error/fao=2!/ansi=0
-INVLINKTMPDIR	<Value for $gtm_linktmpdir is either not found or not a directory: !AD>/error/fao=2!/ansi=0
+INVLINKTMPDIR	<Value for $gtm_linktmpdir is either not found or not a directory(!AD) - Reverting to default value>/error/fao=2!/ansi=0
 NOEDITOR	<Can't find an executable editor: !AD>/error/fao=2!/ansi=0
 UPDPROC		<Update Process error>/error/fao=0!/ansi=0
 HLPPROC		<Helper Process error>/error/fao=0!/ansi=0
@@ -1587,7 +1588,18 @@ ZPEEKNOJNLINFO	<$ZPEEK() unable to access requested journal structure - region !
 TLSPARAM	<TLS parameter !AD !AD>/error/fao=4!/ansi=0
 RLNKRECLATCH	<Failed to get latch on relinkctl record for routine name !AZ in $ZROUTINES directory !AD>/error/fao=3!/ansi=0
 RLNKSHMLATCH	<Failed to get latch on relinkctl shared memory for $ZROUTINES directory !AD>/error/fao=2!/ansi=0
-JOBLVN2LONG	<The zwrite representation of a local variable transferred to a JOB'd process can not exceed !UL. Encountered size: !UL>/error/fao=2!/ansi=0
+JOBLVN2LONG	<The zwrite representation of a local variable transferred to a JOB'd process is too long. Please check the output of the JOB'd process for more details>/error/fao=0!/ansi=0
+JOBLVNDETAIL	<The zwrite representation of a local variable transferred to a JOB'd process is too long. The zwrite representation cannot exceed !UL. Encountered size: !UL>/error/fao=2!/ansi=0
+PREALLOCATEFAIL	<Disk space reservation for !AD segment has failed>/error/fao=2!/ansi=0
+NODFRALLOCSUPP	<The NODEFER_ALLOCATE qualifier is not allowed on this operating system. Not changing the defer allocation flag>/warning/fao=0!/ansi=0
+LASTWRITERBYPAS	<The last writer for database file !AD bypassed the rundown>/warning/fao=2!/ansi=0
+TRIGUPBADLABEL	<Trigger upgrade cannot upgrade label !UL to !UL on ^!AD in region !AD>/error/fao=6!/ansi=0
+WEIRDSYSTIME	<Time reported by the system clock is outside the acceptable range.  Please check and correct the system clock>/error/fao=0!/ansi=0
+REPLSRCEXITERR	<Source server for secondary instance !AZ exited abnormally. See log file !AZ for details.>/warning/fao=2!/ansi=0
+INVZBREAK	<Cannot set ZBREAK in direct mode routine (GTM$DMOD)>/error/fao=0!/ansi=0
+INVTMPDIR	<Value or default for $gtm_tmp is either not found or not a directory (!AD) - Reverting to default value>/error/fao=2!/ansi=0
+ARCTLMAXHIGH	<The environment variable !AD = !UL is too high. Assuming the maximum acceptable value of !UL>/warning/fao=4!/ansi=0
+ARCTLMAXLOW	<The environment variable !AD = !UL is too low. Assuming the minimum acceptable value of !UL>/warning/fao=4!/ansi=0
 !
 ! If there are UNUSEDMSG* lines unused for more than one year and at least two non-patch releases, use them before adding new lines.
 !
diff --git a/sr_port/mlk_lock.c b/sr_port/mlk_lock.c
index adba18f..6846363 100644
--- a/sr_port/mlk_lock.c
+++ b/sr_port/mlk_lock.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -115,12 +116,13 @@ uint4 mlk_lock(mlk_pvtblk *p,
 		{
 			if (d->owner)
 			{	/* The lock already exists */
-				if (d->owner == process_id && d->auxowner == auxown)
+				if ((d->owner == process_id) && (d->auxowner == auxown))
 				{	/* We are already the owner */
 					p->nodptr = d;
 					retval = 0;
 				} else
 				{	/* Someone else has it. Block on it */
+					assert(blocked);
 					if (new)
 						mlk_prcblk_add(p->region, ctl, d, process_id);
 					p->nodptr = d;
@@ -163,15 +165,15 @@ uint4 mlk_lock(mlk_pvtblk *p,
 			 * LOCK_SPACE_FULL_SYSLOG_THRESHOLD.
 			 */
 			csa->nl->lockspacefull_logged = TRUE;
-			send_msg(VARLSTCNT(4) ERR_LOCKSPACEFULL, 2, DB_LEN_STR(p->region));
+			send_msg_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_LOCKSPACEFULL, 2, DB_LEN_STR(p->region));
 			if (ctl->subtop - ctl->subfree >= siz)
 			{
-				send_msg(VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(p->region),
+				send_msg_csa(CSA_ARG(csa) VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(p->region),
 					 (ctl->max_prccnt - ctl->prccnt), ctl->max_prccnt,
 					 (ctl->max_blkcnt - ctl->blkcnt), ctl->max_blkcnt, LEN_AND_LIT(" not "));
 			} else
 			{
-				send_msg(VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(p->region),
+				send_msg_csa(CSA_ARG(csa) VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(p->region),
 					 (ctl->max_prccnt - ctl->prccnt), ctl->max_prccnt,
 					 (ctl->max_blkcnt - ctl->blkcnt), ctl->max_blkcnt, LEN_AND_LIT(" "));
 			}
diff --git a/sr_port/mlk_nocrit_unlock.c b/sr_port/mlk_nocrit_unlock.c
new file mode 100644
index 0000000..7a5c319
--- /dev/null
+++ b/sr_port/mlk_nocrit_unlock.c
@@ -0,0 +1,55 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+#include "mdef.h"
+
+#include "gdsroot.h"
+#include "gtm_facility.h"
+#include "fileinfo.h"
+#include "gdsbt.h"
+#include "gdsfhead.h"
+#include "filestruct.h"
+#include "mlkdef.h"
+#include "mlk_unlock.h"
+
+GBLREF	int4 		process_id;
+
+/* This function is similar to "mlk_unlock" except that it does not get crit. So does what can be safely done
+ * and leaves the rest to be done by the next guy who has crit and wants this lock. Note that this means processes
+ * that are waiting on this lock might not be woken up right away but will eventually wake up in their sleep-poll wait loop.
+ * But that is considered okay given the merits of this quick nocrit unlock (speedy process exit, no crit contention).
+ */
+void mlk_nocrit_unlock(mlk_pvtblk *p)
+{
+	mlk_shrblk_ptr_t	d;
+	sgmnt_addrs		*csa;
+#	ifdef DEBUG
+	mlk_ctldata_ptr_t	ctl;
+#	endif
+
+	assert(p->region->dyn.addr->acc_meth != dba_usr);
+	DEBUG_ONLY(ctl = p->ctlptr;)
+	assert((ctl->max_blkcnt > 0) && (ctl->max_prccnt > 0) && ((ctl->subtop - ctl->subbase) > 0));
+	csa = &FILE_INFO(p->region)->s_addrs;
+	d = p->nodptr;
+	if ((d->owner == process_id) && (p->sequence == d->sequence))
+	{
+		d->sequence = csa->hdr->trans_hist.lock_sequence++;	/* bump sequence so waiters realize this lock is released */
+		d->owner = 0;	/* Setting this marks the lock as available */
+		/* Note: The key unlock operation is setting d->owner to 0. The shared sequence increment can happen
+		 * before or after that. It is only a fast way to signal lock waiters of this unlock. Even if the sequence
+		 * increment actually happens way after the d->owner=0 (due to out-of-order executions), the worst is the
+		 * lock waiter might have waited a little more than necessary. No correctness issues.
+		 */
+	}
+	return;
+}
diff --git a/sr_port/mlk_prcblk_add.c b/sr_port/mlk_prcblk_add.c
index e903ee8..9b43557 100644
--- a/sr_port/mlk_prcblk_add.c
+++ b/sr_port/mlk_prcblk_add.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -24,14 +25,12 @@
 error_def(ERR_LOCKSPACEFULL);
 error_def(ERR_LOCKSPACEINFO);
 
-void mlk_prcblk_add(gd_region *reg,
-		    mlk_ctldata_ptr_t ctl,
-		    mlk_shrblk_ptr_t d,
-		    uint4 pid)
+void	mlk_prcblk_add(gd_region *reg, mlk_ctldata_ptr_t ctl, mlk_shrblk_ptr_t d, uint4 pid)
 {
 	mlk_prcblk_ptr_t	pr;
         ptroff_t		*prpt;
 	int			lcnt;
+	sgmnt_addrs		*csa;
 
 	for (prpt = (ptroff_t *)&d->pending, lcnt = ctl->max_prccnt; *prpt && lcnt; prpt = (ptroff_t *) &pr->next, lcnt--)
 	{
@@ -47,13 +46,14 @@ void mlk_prcblk_add(gd_region *reg,
 		mlk_shrclean(reg, ctl, (mlk_shrblk_ptr_t)R2A(ctl->blkroot));
 		if (1 > ctl->prccnt)
 		{	/* Process cleanup did not help. Issue error to syslog. */
-			send_msg(VARLSTCNT(4) ERR_LOCKSPACEFULL, 2, DB_LEN_STR(reg));
+			csa = &FILE_INFO(reg)->s_addrs;
+			send_msg_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_LOCKSPACEFULL, 2, DB_LEN_STR(reg));
 			if (ctl->subtop > ctl->subfree)
-				send_msg(VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(reg),
+				send_msg_csa(CSA_ARG(csa) VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(reg),
 					 (ctl->max_prccnt - ctl->prccnt), ctl->max_prccnt,
 					 (ctl->max_blkcnt - ctl->blkcnt), ctl->max_blkcnt, LEN_AND_LIT(" not "));
 			else
-				send_msg(VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(reg),
+				send_msg_csa(CSA_ARG(csa) VARLSTCNT(10) ERR_LOCKSPACEINFO, 8, REG_LEN_STR(reg),
 					 (ctl->max_prccnt - ctl->prccnt), ctl->max_prccnt,
 					 (ctl->max_blkcnt - ctl->blkcnt), ctl->max_blkcnt, LEN_AND_LIT(" "));
 			return;
@@ -71,6 +71,6 @@ void mlk_prcblk_add(gd_region *reg,
 	A2R(*prpt, pr);
 	pr->process_id = pid;
 	pr->ref_cnt = 1;
-	pr->next = pr->unlock = 0;
+	pr->next = 0;
 	return;
 }
diff --git a/sr_port/mlk_prcblk_add.h b/sr_port/mlk_prcblk_add.h
index 0ffc87b..b4abef9 100644
--- a/sr_port/mlk_prcblk_add.h
+++ b/sr_port/mlk_prcblk_add.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,11 +14,7 @@
 
 /* Declare parms for mlk_prcblk_add.c */
 
-void mlk_prcblk_add(gd_region *region,
-		    mlk_ctldata_ptr_t ctl,
-		    mlk_shrblk_ptr_t d,
-		    uint4 pid);
-
+void	mlk_prcblk_add(gd_region *region, mlk_ctldata_ptr_t ctl, mlk_shrblk_ptr_t d, uint4 pid);
 
 #define MLK_PRCBLK_ADD_DEFINED
 
diff --git a/sr_port/mlk_shrblk_delete_if_empty.c b/sr_port/mlk_shrblk_delete_if_empty.c
index d0dea91..95a8dbf 100644
--- a/sr_port/mlk_shrblk_delete_if_empty.c
+++ b/sr_port/mlk_shrblk_delete_if_empty.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -17,52 +18,38 @@
 #include "copy.h"
 #include "mlk_shrblk_delete_if_empty.h"
 
-
-bool	mlk_shrblk_delete_if_empty(mlk_ctldata_ptr_t ctl,
-				   mlk_shrblk_ptr_t d)
+boolean_t mlk_shrblk_delete_if_empty(mlk_ctldata_ptr_t ctl, mlk_shrblk_ptr_t d)
 {
 	mlk_shrblk_ptr_t	r, l, p;
 	mlk_shrsub_ptr_t	sub;
 
-
 	if (d->children != 0  ||  d->owner != 0  ||  d->pending != 0)
 		return FALSE;
-
-	if (d->parent == 0)
-		p = NULL;
-	else
-		p = (mlk_shrblk_ptr_t)R2A(d->parent);
-
+	p = (d->parent == 0) ? NULL : (mlk_shrblk_ptr_t)R2A(d->parent);
 	l = (mlk_shrblk_ptr_t)R2A(d->lsib);
 	r = (mlk_shrblk_ptr_t)R2A(d->rsib);
 	if (d == r)
+	{
 		if (p == NULL)
 			ctl->blkroot = 0;
 		else
 			p->children = 0;
-	else
+	} else
 	{
 		assert(d != l);
 		A2R(r->lsib, l);
 		A2R(l->rsib, r);
 		if (p != NULL  &&  (mlk_shrblk_ptr_t)R2A(p->children) == d)
 			A2R(p->children, r);
-		else
-			if ((mlk_shrblk_ptr_t)R2A(ctl->blkroot) == d)
-				A2R(ctl->blkroot, r);
+		else if ((mlk_shrblk_ptr_t)R2A(ctl->blkroot) == d)
+			A2R(ctl->blkroot, r);
 	}
-
 	sub = (mlk_shrsub_ptr_t)R2A(d->value);
-	PUT_ZERO(sub->backpointer);
-
+	sub->backpointer = 0;
 	p = (mlk_shrblk_ptr_t)R2A(ctl->blkfree);
 	memset(d, 0, SIZEOF(mlk_shrblk));
 	A2R(d->rsib, p);
-
 	A2R(ctl->blkfree, d);
 	++ctl->blkcnt;
-
 	return TRUE;
-
 }
-
diff --git a/sr_port/mlk_shrblk_delete_if_empty.h b/sr_port/mlk_shrblk_delete_if_empty.h
index e428047..799f3fa 100644
--- a/sr_port/mlk_shrblk_delete_if_empty.h
+++ b/sr_port/mlk_shrblk_delete_if_empty.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,6 +13,6 @@
 #ifndef MLK_SHRBLK_DELETE_IF_EMPTY_INCLUDED
 #define MLK_SHRBLK_DELETE_IF_EMPTY_INCLUDED
 
-bool mlk_shrblk_delete_if_empty(mlk_ctldata_ptr_t ctl, mlk_shrblk_ptr_t d);
+boolean_t mlk_shrblk_delete_if_empty(mlk_ctldata_ptr_t ctl, mlk_shrblk_ptr_t d);
 
 #endif /* MLK_SHRBLK_DELETE_IF_EMPTY_INCLUDED */
diff --git a/sr_port/mlk_shrblk_find.c b/sr_port/mlk_shrblk_find.c
index 85e1953..c8f603d 100644
--- a/sr_port/mlk_shrblk_find.c
+++ b/sr_port/mlk_shrblk_find.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -40,7 +41,7 @@ boolean_t	mlk_find_blocking_child_lock(mlk_pvtblk *p, mlk_shrblk_ptr_t child, UI
 		 */
 		if (d->owner && (d->owner != process_id || d->auxowner != auxown))
 		{	/* If owned and not owned by us check if owner is alive */
-			if (is_proc_alive(d->owner, d->image_count))
+			if (is_proc_alive(d->owner, IMAGECNT(d->image_count)))
 			{	/* Signal that this lock request is blocked by this node */
 				p->blocked = d;
 				p->blk_sequence = d->sequence;
@@ -98,7 +99,7 @@ boolean_t	mlk_shrblk_find(mlk_pvtblk *p, mlk_shrblk_ptr_t *ret, UINTPTR_T auxown
 					{
 						if (d->owner != process_id || d->auxowner != auxown)
 						{	/* If owned and not owned by us check if owner is alive */
-							if (is_proc_alive(d->owner, d->image_count))
+							if (is_proc_alive(d->owner, IMAGECNT(d->image_count)))
 							{	/* Signal that this lock request is blocked by this node */
 								p->blocked = d;
 								p->blk_sequence = d->sequence;
diff --git a/sr_port/mlk_shrclean.c b/sr_port/mlk_shrclean.c
index 50aec3c..8466fd5 100644
--- a/sr_port/mlk_shrclean.c
+++ b/sr_port/mlk_shrclean.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,15 +31,13 @@
 
 GBLREF uint4	process_id;
 
-void mlk_shrclean(gd_region *region,
-		  mlk_ctldata_ptr_t ctl,
-		  mlk_shrblk_ptr_t d)
+void mlk_shrclean(gd_region *region, mlk_ctldata_ptr_t ctl, mlk_shrblk_ptr_t d)
 {
 	mlk_shrblk_ptr_t	d0, d1;
 	mlk_prcblk_ptr_t 	p;
 	int4			status, lcnt = 0, max_loop_tries;
-	unsigned int		time[2],icount;
-	bool			delete_status;
+	unsigned int		time[2], icount;
+	boolean_t		delete_status;
 	sgmnt_addrs		*csa;
 
 	max_loop_tries = (int4)(((sm_uc_ptr_t)R2A(ctl->subtop) - (sm_uc_ptr_t)ctl) / SIZEOF(mlk_shrblk));
@@ -54,7 +53,7 @@ void mlk_shrclean(gd_region *region,
 		{
 			for (p = (mlk_prcblk_ptr_t)R2A(d0->pending); ; p = (mlk_prcblk_ptr_t)R2A(p->next))
 			{
-				if (PENDING_PROC_ALIVE(p,time,icount,status))
+				if (PENDING_PROC_DEAD(p, time, icount, status))
 				{	/* process pending does not exist, free prcblk */
 					p->process_id = 0;
 					p->ref_cnt = 0;
@@ -66,22 +65,21 @@ void mlk_shrclean(gd_region *region,
 		mlk_prcblk_delete(ctl, d0, 0);
 		if (d0->owner)
 		{
-			if (PROC_ALIVE(d0,time,icount,status))
+			if (PROC_DEAD(d0, time, icount, status))
 			{	/* process that owned lock has left image, free lock */
 				csa = &FILE_INFO(region)->s_addrs;
 				d0->owner = 0;
 				d0->sequence = csa->hdr->trans_hist.lock_sequence++;
-				delete_status = mlk_shrblk_delete_if_empty(ctl,d0);
+				delete_status = mlk_shrblk_delete_if_empty(ctl, d0);
 			}
-		}else
-			delete_status = mlk_shrblk_delete_if_empty(ctl,d0);
+		} else
+			delete_status = mlk_shrblk_delete_if_empty(ctl, d0);
 
 		if (delete_status && d0 == d)
 		{
 			d = d0 = (d0 == d1) ? NULL : d1;
 			d1 = NULL;
-		}
-		else
+		} else
 			d0 = d1;
 	}
 	return;
diff --git a/sr_port/mlk_unlock.h b/sr_port/mlk_unlock.h
index 5b44587..6ba9f46 100644
--- a/sr_port/mlk_unlock.h
+++ b/sr_port/mlk_unlock.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,5 +20,6 @@
 							 */
 
 void mlk_unlock(mlk_pvtblk *p);
+void mlk_nocrit_unlock(mlk_pvtblk *p);
 
 #endif /* MLK_UNLOCK_INCLUDED */
diff --git a/sr_port/mlkdef.h b/sr_port/mlkdef.h
index 32e042b..96a0050 100644
--- a/sr_port/mlkdef.h
+++ b/sr_port/mlkdef.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,7 +32,7 @@ typedef struct				/* One of these nodes is required for each process which is bl
 					 * list, then this is a relative pointer to the next free entry. */
 	uint4		process_id;	/* the pid of the blocked process */
 	short		ref_cnt;	/* number of times process references prcblk */
-	unsigned short	unlock;		/* boolean to indicate activity on lock */
+	short		filler_4byte;
 } mlk_prcblk;
 
 typedef struct				/* lock node.  The member descriptions below are correct if the entry
@@ -54,10 +55,12 @@ typedef struct				/* lock node.  The member descriptions below are correct if th
 					 * sequence numbers do not match, then we must assume that the
 					 * lock was stolen from us by LKE or some other abnormal event. */
 	UINTPTR_T	auxowner;	/* For gt.cm, this contains information on the remote owner of the lock.*/
+#	ifdef VMS
 	int4		image_count;	/* the number of image activiations since login */
 	int4		login_time;	/* the low-order 32 bits of the time that the process logged in.  login_time
 					 * and image_count can be used together to determine whether the process has
 					 * abnormally terminated. */
+#	endif
 	int4		auxpid;		/* If non-zero auxowner, this is the pid of the client that is holding the lock */
 	unsigned char	auxnode[16];	/* If non-zero auxowner, this is the nodename of the client that is holding the lock */
 } mlk_shrblk;
diff --git a/sr_port/msg.m b/sr_port/msg.m
index 4a30ec2..5577b40 100644
--- a/sr_port/msg.m
+++ b/sr_port/msg.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2001, 2006 Fidelity Information Services, Inc	;
+; Copyright (c) 2001, 2015 Fidelity National Information	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -158,18 +159,23 @@
  Write $Char(9),cnt_"};",!
  If ansiopen Use outansi Write $Char(9),"};",! Close outansi
  Quit
-hdr New year
- Set year=$ZDATE($Horolog,"YEAR")
- Write "/****************************************************************",!
- Write " *",$Char(9,9,9,9,9,9,9,9),"*",!
- Write " *",$Char(9),"Copyright 2001"
- Write:year'=2001 ",",year Write " Fidelity Information Services, Inc",$Char(9),"*",!
- Write " *",$Char(9,9,9,9,9,9,9,9),"*",!
- Write " *",$Char(9),"This source code contains the intellectual property",$Char(9),"*",!
- Write " *",$Char(9),"of its copyright holder(s), and is made available",$Char(9),"*",!
- Write " *",$Char(9),"under a license.  If you do not know the terms of",$Char(9),"*",!
- Write " *",$Char(9),"the license, please stop and do not read further.",$Char(9),"*",!
- Write " *",$Char(9,9,9,9,9,9,9,9),"*",!
- Write " ****************************************************************/",!!
+hdr
+ Set prevout=$IO
+ If vms Set cfile=$ztrnlnm("gtm$src")_"copyright.txt"
+ If 'vms Set cfile=$ztrnlnm("gtm_tools")_"/copyright.txt"
+ Set xxxx="2001"
+ Set yyyy=$zdate($H,"YYYY")
+ Open cfile:read
+ Use prevout w "/****************************************************************",!
+ For i=1:1 Use cfile Read line Quit:$zeof  Do
+ . If (1<$zl(line,"XXXX")) Do
+ . . Set str=$zpiece(line,"XXXX",1)_xxxx_$zpiece(line,"XXXX",2)
+ . . Set str=$zpiece(str,"YYYY",1)_yyyy_$zpiece(str,"YYYY",2)
+ . Else  Do
+ . . Set str=line
+ . Use prevout Write " *"_str_"*",!
+ Close cfile
+ Use prevout
+ Write " ****************************************************************/",!
  Quit
  ;
diff --git a/sr_port/mtables.c b/sr_port/mtables.c
index 2e3de5c..53afcff 100644
--- a/sr_port/mtables.c
+++ b/sr_port/mtables.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -220,9 +221,11 @@ LITDEF mval literal_null	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT | MV_NUM_
 LITDEF mval literal_batch       = DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, TP_BATCH_SHRT, (char *)TP_BATCH_ID, 0, 0);
 
 #ifdef GTM_TRIGGER
-LITDEF mval literal_hashlabel	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, LITERAL_HASHLABEL_LEN, (char *)LITERAL_HASHLABEL, 0, 0);	/* BYPASSOK */
-LITDEF mval literal_hashcycle	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, LITERAL_HASHCYCLE_LEN, (char *)LITERAL_HASHCYCLE, 0, 0);	/* BYPASSOK */
-LITDEF mval literal_hashcount	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, LITERAL_HASHCOUNT_LEN, (char *)LITERAL_HASHCOUNT, 0, 0);	/* BYPASSOK */
+LITDEF mval literal_curlabel	= DEFINE_MVAL_LITERAL(MV_STR | MV_NM | MV_INT, 0, 0, HASHT_GBL_CURLABEL_LEN, (char *)HASHT_GBL_CURLABEL, 0, HASHT_GBL_CURLABEL_INT * MV_BIAS);	/* BYPASSOK */
+LITDEF mval literal_hashlabel	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX,  0, 0, LITERAL_HASHLABEL_LEN,  (char *)LITERAL_HASHLABEL, 0, 0);	/* BYPASSOK */
+LITDEF mval literal_hashcycle	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX,  0, 0, LITERAL_HASHCYCLE_LEN,  (char *)LITERAL_HASHCYCLE, 0, 0);	/* BYPASSOK */
+LITDEF mval literal_hashcount	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX,  0, 0, LITERAL_HASHCOUNT_LEN,  (char *)LITERAL_HASHCOUNT, 0, 0);	/* BYPASSOK */
+LITDEF mval literal_hashtrhash	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX,  0, 0, LITERAL_HASHTRHASH_LEN, (char *)LITERAL_HASHTRHASH, 0, 0);/* BYPASSOK */
 
 #define TRIGGER_SUBSDEF(SUBSTYPE, SUBSNAME, LITMVALNAME, TRIGFILEQUAL, PARTOFHASH)	\
 	LITDEF mval LITMVALNAME = DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, STR_LIT_LEN(SUBSNAME), (char *)SUBSNAME, 0, 0);
diff --git a/sr_port/mu_extr_gblout.c b/sr_port/mu_extr_gblout.c
index 756db1a..bc3b57c 100644
--- a/sr_port/mu_extr_gblout.c
+++ b/sr_port/mu_extr_gblout.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -49,8 +50,8 @@
 	return FALSE;												\
 }
 
-#define WRITE_4MORE_BYTES_TRUE		TRUE
-#define WRITE_4MORE_BYTES_FALSE		FALSE
+#define WRITE_ENCR_HANDLE_INDEX_TRUE	TRUE
+#define WRITE_ENCR_HANDLE_INDEX_FALSE	FALSE
 
 GBLREF	bool			mu_ctrlc_occurred;
 GBLREF	bool			mu_ctrly_occurred;
@@ -71,13 +72,11 @@ error_def(ERR_RECORDSTAT);
 boolean_t mu_extr_gblout(glist *gl_ptr, mu_extr_stats *st, int format, boolean_t is_any_file_encrypted)
 #elif defined(UNIX)
 boolean_t mu_extr_gblout(glist *gl_ptr, mu_extr_stats *st, int format)
-#elif defined(VMS)
-boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, int format)
 #endif
 {
 	static gv_key			*beg_gv_currkey; 	/* this is used to check key out of order condition */
 	static int			max_zwr_len = 0, index;
-	static unsigned			char	*private_blk = NULL, *zwr_buffer = NULL, *key_buffer = NULL;
+	static unsigned char		*private_blk = NULL, *zwr_buffer = NULL, *key_buffer = NULL;
 	static uint4			private_blksz = 0;
 	unsigned char			*cp2, current, *keytop, last;
 	unsigned short			out_size, rec_size;
@@ -121,21 +120,29 @@ boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, i
 	keytop = &gv_currkey->base[gv_currkey->top];
 	st->recknt = st->reclen = st->keylen = st->datalen = 0;
 #	ifdef GTM_CRYPT
-	if (is_any_file_encrypted && (cs_data->is_encrypted) && (format == MU_FMT_BINARY))
+	if (is_any_file_encrypted && (format == MU_FMT_BINARY))
 	{
-		ASSERT_ENCRYPTION_INITIALIZED;	/* due to op_gvname_fast done from gv_select in mu_extract */
-		if (prev_csd != cs_data)
+		if (cs_data->is_encrypted)
 		{
-			prev_csd = cs_data;
-			index = find_reg_hash_idx(gv_cur_region);
+			ASSERT_ENCRYPTION_INITIALIZED;	/* due to op_gvname_fast done from gv_select in mu_extract */
+			if (prev_csd != cs_data)
+			{
+				prev_csd = cs_data;
+				index = find_reg_hash_idx(gv_cur_region);
+			}
+			/* We have to write the encrypted version of the block. Instead of encrypting the plain-text version of the
+			 * block, we just reference the encrypted version of the block that is already maintained in sync with the
+			 * plain-text version by wcs_wtstart and dsk_read (called eventually by mu_extr_getblk below). All we need
+			 * to make sure is that we have a private buffer allocated (of appropriate size) in which mu_extr_getblk can
+			 * return the encrypted version of the block. Do the allocation here.
+			 */
+			REALLOC_CRYPTBUF_IF_NEEDED(cs_data->blk_size);
+		} else
+		{	/* Encryption handle index of -1 indicates in an extract that the block is unencrypted. It is useful when
+			 * the extract contains a mix of encrypted and unencrypted data.
+			 */
+			index = -1;
 		}
-		/* We have to write the encrypted version of the block. Instead of encrypting the plain-text version of the
-		 * block, we just reference the encrypted version of the block that is already maintained in sync with the
-		 * plain-text version by wcs_wtstart and dsk_read (called eventually by mu_extr_getblk below). All we need to
-		 * make sure is that we have a private buffer allocated (of appropriate size) in which mu_extr_getblk can return
-		 * the encrypted version of the block. Do the allocation here.
-		 */
-		REALLOC_CRYPTBUF_IF_NEEDED(cs_data->blk_size);
 	}
 #	endif
 	for ( ; ; )
@@ -163,8 +170,7 @@ boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, i
 			INTEG_ERROR_RETURN
 		blktop = (sm_uc_ptr_t)bp + bp->bsiz;
 		if (format == MU_FMT_BINARY)
-		{
-			/* At this point, gv_target->hist.h[0].curr_rec.offset points to the offset within the block at which
+		{	/* At this point, gv_target->hist.h[0].curr_rec.offset points to the offset within the block at which
 			 * the desired record exists. If this record is *not* the first record in the block (possible due to
 			 * concurrent updates), the compression count for that record would be non-zero which means we cannot
 			 * initiate a write to the extract file starting from this offset as the 'mupip load' command would
@@ -178,9 +184,7 @@ boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, i
 			out_size = blktop - (sm_uc_ptr_t)rp;
 			out = (sm_uc_ptr_t)rp;
 #			ifdef GTM_CRYPT
-			if (!is_any_file_encrypted || !cs_data->is_encrypted)
-				index = -1;	/* tells MUPIP LOAD that this block is NOT encrypted */
-			else
+			if (cs_data->is_encrypted)
 			{
 				assert(NULL != encrypted_bp);
 				assert(encrypted_bp->bsiz == bp->bsiz);
@@ -190,10 +194,12 @@ boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, i
 				out = (sm_uc_ptr_t)encrypted_bp + SIZEOF(blk_hdr);
 				assert(-1 != index);
 			}
+			WRITE_BIN_EXTR_BLK(out, out_size,
+				is_any_file_encrypted ? WRITE_ENCR_HANDLE_INDEX_TRUE : WRITE_ENCR_HANDLE_INDEX_FALSE, index);
 #			else
 			index = -1;
+			WRITE_BIN_EXTR_BLK(out, out_size, WRITE_ENCR_HANDLE_INDEX_FALSE, index);
 #			endif
-			WRITE_BIN_EXTR_BLK(out, out_size, (-1 != index) ? WRITE_4MORE_BYTES_TRUE : WRITE_4MORE_BYTES_FALSE, index);
 		} else
 		{	/* Note that rp may not be the beginning of a block */
 			rp = (rec_hdr_ptr_t)(gv_target->hist.h[0].curr_rec.offset + (sm_uc_ptr_t)bp);
diff --git a/sr_port/mucregini.c b/sr_port/mucregini.c
index 5d3e825..d00c4d3 100644
--- a/sr_port/mucregini.c
+++ b/sr_port/mucregini.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -88,6 +89,9 @@ void mucregini(int4 blk_init_size)
 #ifdef UNIX
 	cs_data->freeze_on_fail = gv_cur_region->freeze_on_fail;
 	cs_data->mumps_can_bypass = gv_cur_region->mumps_can_bypass;
+	cs_data->epoch_taper = gv_cur_region->epoch_taper;
+	cs_data->epoch_taper_time_pct = EPOCH_TAPER_TIME_PCT_DEFAULT;
+	cs_data->epoch_taper_jnl_pct = EPOCH_TAPER_JNL_PCT_DEFAULT;
 #endif
 	cs_data->reserved_bytes = gv_cur_region->dyn.addr->reserved_bytes;
 	cs_data->clustered = FALSE;
@@ -246,6 +250,12 @@ void mucregini(int4 blk_init_size)
 	cs_data->mutex_spin_parms.mutex_spin_sleep_mask = MUTEX_SPIN_SLEEP_MASK;
 	NUM_CRIT_ENTRY(cs_data) = gv_cur_region->dyn.addr->mutex_slots;
 	cs_data->wcs_phase2_commit_wait_spincnt = WCS_PHASE2_COMMIT_DEFAULT_SPINCNT;
+#	if defined(__sun) || defined(__hpux)
+	/* There is no falloc on those platforms so we silently ignore the gld setting */
+	cs_data->defer_allocate = gv_cur_region->dyn.addr->defer_allocate = TRUE;
+#	else
+	cs_data->defer_allocate = gv_cur_region->dyn.addr->defer_allocate;
+#	endif
 	time(&ctime);
 	assert(SIZEOF(ctime) >= SIZEOF(int4));
 	cs_data->creation_time4 = (int4)ctime;	/* Need only lower order 4-bytes of current time (in case system time is 8-bytes) */
diff --git a/sr_port/muextr.h b/sr_port/muextr.h
index 5aed941..6d35511 100644
--- a/sr_port/muextr.h
+++ b/sr_port/muextr.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -34,7 +35,7 @@ typedef	struct glist_struct
 					 * SPANREG_REGION_LITLEN for " (region " and 1 for ")" */	\
 	int	gbl_buff_index;										\
 													\
-	gbl_name_buff[0]='^';										\
+	gbl_name_buff[0] = '^';										\
 	memcpy(&gbl_name_buff[1], GNAME(GL_PTR).addr, GNAME(GL_PTR).len);				\
 	gbl_buff_index = 1 + GNAME(GL_PTR).len;								\
 	if (PRINT_REG && (NULL != GL_PTR->gvnh_reg->gvspan))						\
@@ -96,51 +97,48 @@ typedef struct coll_hdr_struct
 	unsigned char	pad;
 } coll_hdr;
 
-#define MU_FMT_UNRECOG		-1
-#define MU_FMT_GO		0
-#define MU_FMT_BINARY		1
-#define MU_FMT_GOQ		2
-#define MU_FMT_ZWR		3
-#define GOQ_BLK_SIZE		2048
-#define FORMAT_STR_MAX_SIZE 50
-#define LABEL_STR_MAX_SIZE 128
-#define EXTR_DEFAULT_LABEL	"GT.M MUPIP EXTRACT"
-/* In unix, the binary extract label was bumped to 5 as part of the db encryption changes. Since db encryption is not supported in
- * VMS, we keep the label at 4 for VMS. Whenever the extract label needs to be bumped up next, if possible, try to get both Unix
- * and VMS back to common label (might need to add a field in the extract header to indicate whether encryption is supported
- * or not as part of this change). */
-#ifdef UNIX
-#define V4_BIN_HEADER_VERSION	"4"
-#define V4_BIN_HEADER_LABEL	"GDS BINARY EXTRACT LEVEL "V4_BIN_HEADER_VERSION
-#define V5_BIN_HEADER_VERSION  	"5"
+#define MU_FMT_UNRECOG			-1
+#define MU_FMT_GO			0
+#define MU_FMT_BINARY			1
+#define MU_FMT_GOQ			2
+#define MU_FMT_ZWR			3
+#define GOQ_BLK_SIZE			2048
+#define FORMAT_STR_MAX_SIZE		50
+#define LABEL_STR_MAX_SIZE 		128
+#define EXTR_DEFAULT_LABEL		"GT.M MUPIP EXTRACT"
+
+#define V4_BIN_HEADER_VERSION		"4"
+#define V4_BIN_HEADER_LABEL		"GDS BINARY EXTRACT LEVEL "V4_BIN_HEADER_VERSION
+
+#define V5_BIN_HEADER_VERSION  		"5"
 #define V5_BIN_HEADER_SZ		92 /* V4 (GTM V5.0) binary header stores null collation information [5 bytes numeric] */
-#define V5_BIN_HEADER_NUMSZ	5
-#define V5_BIN_HEADER_LABEL	"GDS BINARY EXTRACT LEVEL "V5_BIN_HEADER_VERSION
-#define V5_BIN_HEADER_RECOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + V5_BIN_HEADER_NUMSZ)
-#define V5_BIN_HEADER_KEYOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + 2 * V5_BIN_HEADER_NUMSZ)
+#define V5_BIN_HEADER_NUMSZ		5 /* Same as 4 but encrypted. */
+#define V5_BIN_HEADER_LABEL		"GDS BINARY EXTRACT LEVEL "V5_BIN_HEADER_VERSION
+#define V5_BIN_HEADER_RECOFFSET		(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + V5_BIN_HEADER_NUMSZ)
+#define V5_BIN_HEADER_KEYOFFSET		(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + 2 * V5_BIN_HEADER_NUMSZ)
 #define V5_BIN_HEADER_NULLCOLLOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + 3 * V5_BIN_HEADER_NUMSZ)
-#define BIN_HEADER_VERSION  	"6" /* spanning nodes allow max_rec_len to 7 digits*/
-#define BIN_HEADER_LABEL        "GDS BINARY EXTRACT LEVEL "BIN_HEADER_VERSION
-#define BIN_HEADER_VERSION_ENCR	"7" /* follow convention of low bit of version indicating encryption */
-#define BIN_HEADER_LABEL_ENCR   "GDS BINARY EXTRACT LEVEL "BIN_HEADER_VERSION_ENCR
-#define BIN_HEADER_SZ		100
-#define BIN_HEADER_NUMSZ	7
-#else
-#define BIN_HEADER_VERSION  	"4"
-#define BIN_HEADER_NUMSZ	5
-#define BIN_HEADER_SZ		92 /* V4 (GTM V5.0) binary header stores null collation information [5 bytes numeric] */
-#endif
-#define BIN_HEADER_LABEL        "GDS BINARY EXTRACT LEVEL "BIN_HEADER_VERSION
-#define BIN_HEADER_DATEFMT	"YEARMMDD2460SS"
-#define BIN_HEADER_LABELSZ	32
-#define BIN_HEADER_BLKOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT))
-#define BIN_HEADER_RECOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + BIN_HEADER_NUMSZ)
-#define BIN_HEADER_KEYOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + 2 * BIN_HEADER_NUMSZ)
+
+#define BIN_HEADER_VERSION  		"6" /* Spanning nodes allow max_rec_len to 7 digits. */
+#define BIN_HEADER_LABEL        	"GDS BINARY EXTRACT LEVEL "BIN_HEADER_VERSION
+
+#define BIN_HEADER_VERSION_ENCR		"7" /* Same as 6 but encrypted. */
+#define BIN_HEADER_LABEL_ENCR   	"GDS BINARY EXTRACT LEVEL "BIN_HEADER_VERSION_ENCR
+
+#define BIN_HEADER_VERSION_ENCR_INDEX	"8" /* Same as 6 but encrypted and with unconditional encryption handle index. */
+#define BIN_HEADER_LABEL_ENCR_INDEX   	"GDS BINARY EXTRACT LEVEL "BIN_HEADER_VERSION_ENCR_INDEX
+
+#define BIN_HEADER_SZ			100
+#define BIN_HEADER_NUMSZ		7
+#define BIN_HEADER_DATEFMT		"YEARMMDD2460SS"
+#define BIN_HEADER_LABELSZ		32
+#define BIN_HEADER_BLKOFFSET		(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT))
+#define BIN_HEADER_RECOFFSET		(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + BIN_HEADER_NUMSZ)
+#define BIN_HEADER_KEYOFFSET		(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + 2 * BIN_HEADER_NUMSZ)
 #define BIN_HEADER_NULLCOLLOFFSET	(STR_LIT_LEN(BIN_HEADER_LABEL) + STR_LIT_LEN(BIN_HEADER_DATEFMT) + 3 * BIN_HEADER_NUMSZ)
-#define V3_BIN_HEADER_SZ	87
+#define V3_BIN_HEADER_SZ		87
 #define EXTR_HEADER_LEVEL(extr_lbl)	*(extr_lbl + SIZEOF(BIN_HEADER_LABEL) - 2)
 					/* the assumption here is - level wont go beyond a single char representation */
-#define MAX_BIN_WRT		ROUND_DOWN(MAX_RMS_RECORDSIZE, SIZEOF(int))
+#define MAX_BIN_WRT			ROUND_DOWN(MAX_RMS_RECORDSIZE, SIZEOF(int))
 
 char *mu_extr_ident(mstr *a);
 void  mu_extract(void);
@@ -154,7 +152,6 @@ boolean_t mu_extr_gblout(glist *gl_ptr, mu_extr_stats *st, int format);
 boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, int format);
 #endif
 
-#ifdef UNIX
 #define WRITE_BIN_EXTR_BLK(BUFF, BSIZE, WRITE_4MORE_BYTES, CRYPT_INDEX)		\
 {										\
 	GBLREF	io_pair		io_curr_device;					\
@@ -182,49 +179,14 @@ boolean_t mu_extr_gblout(glist *gl_ptr, struct RAB *outrab, mu_extr_stats *st, i
 	io_curr_device.out->dollar.x = 0;					\
 	io_curr_device.out->dollar.y = 0;					\
 }
+
 #define WRITE_EXTR_LINE(BUFF, BSIZE)						\
 {										\
-	mval	val;								\
+	mval val;								\
+										\
 	val.mvtype = MV_STR;							\
 	val.str.addr = (char *)(BUFF);						\
 	val.str.len = BSIZE;							\
 	op_write(&val);								\
 	op_wteol(1);								\
 }
-#elif defined(VMS)
-#define WRITE_BIN_EXTR_BLK(PTR, SIZE, DUMMY1, DUMMY2) 				\
-{										\
-	unsigned short size;							\
-	int status;								\
-										\
-	if (MAX_BIN_WRT < (SIZE))						\
-		size = MAX_BIN_WRT;						\
-	else									\
-		size = (SIZE);							\
-	(outrab)->rab$w_rsz = size;						\
-	(outrab)->rab$l_rbf = (unsigned char *)(PTR);				\
-	status = sys$put((outrab));						\
-	if ((MAX_BIN_WRT < (SIZE)) && (RMS$_NORMAL == status))			\
-	{									\
-		assert(MAX_BIN_WRT == size);					\
-		(outrab)->rab$w_rsz = (SIZE) - MAX_BIN_WRT;			\
-		(outrab)->rab$l_rbf = (unsigned char *)(PTR);			\
-		(outrab)->rab$l_rbf += MAX_BIN_WRT;				\
-		status = sys$put((outrab));					\
-	}									\
-	if (!(status & 1)) 							\
-	{									\
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);		\
-		mupip_exit(status);						\
-	}									\
-}
-#define WRITE_EXTR_LINE(PTR, SIZE)					\
-{									\
-	int status;							\
-	(outrab)->rab$l_rbf = (unsigned char *)(PTR);			\
-	(outrab)->rab$w_rsz = (SIZE);					\
-	status = sys$put((outrab));					\
-	if (status != RMS$_NORMAL)					\
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);	\
-}
-#endif
diff --git a/sr_port/mumps.hlp b/sr_port/mumps.hlp
index be6319d..84510ba 100644
--- a/sr_port/mumps.hlp
+++ b/sr_port/mumps.hlp
@@ -31,9 +31,9 @@
 
    The scope of M data is either process local or global.
 
-     * Local variables last only for the duration of the current session;
+     o Local variables last only for the duration of the current session;
        GT.M deletes them when the M process terminates.
-     * Global variables contain data that persists beyond the process. GT.M
+     o Global variables contain data that persists beyond the process. GT.M
        stores global variables on disk. A Global Directory organizes global
        variables and describes the organization of a database. The GT.M
        administrator uses the Global Directory Editor (GDE) to create and
@@ -89,9 +89,6 @@
    M command immediately, as if it had been in-line at the point where GT.M
    initiated Direct Mode.
 
-   The following is a list of additional enhancements available from the
-   Direct Mode:
-
 5 GT.M_Compiler
    GT.M Compiler
 
@@ -117,7 +114,7 @@
 2 Copyright
    Copyright
 
-   Copyright 1987 - 2003, 2013 - 2014
+   Copyright 1987 - 2003, 2013 - 2015
 
    Fidelity Information Services, Inc. All rights reserved.
 
@@ -338,11 +335,13 @@
 
    Journaling records redundant copies of database update information to
    increase protection against loss of information due to hardware and
-   software failure. GT.M provides the M commands ZTSTART and ZTCOMMIT, to
-   mark the beginning and end of a logical transaction. When ZTSTART and
-   ZTCOMMIT fence a logical transaction, which may consist of multiple global
-   variable updates, journal records can assure recovery of incomplete
-   application transactions.
+   software failure. In GT.M, TSTART and TCOMMIT mark the beginning and end
+   of an application (logical) transaction, which may consist of multiple
+   global variable updates. When a TCOMMIT takes $TLEVEL from one (1) to zero
+   (0), it transfer all of the transaction updates to the journal file, and,
+   except if TRANSACTIONID="BATCH", returns control to the application only
+   after the associated records reach the secondary storage holding the
+   journal file.
 
    The following table summarizes the GT.M language extensions for
    journaling.
@@ -355,10 +354,6 @@
    | View      | Extended to ensure that GT.M has transferred all updates   |
    |           | to the journal file.                                       |
    |-----------+------------------------------------------------------------|
-   | ZTCommit  | Marks the completion of a logical transaction.             |
-   |-----------+------------------------------------------------------------|
-   | ZTStart   | Marks the beginning of a logical transaction.              |
-   |-----------+------------------------------------------------------------|
    | $View()   | Extended for examining journaling status.                  |
    +------------------------------------------------------------------------+
 
@@ -369,8 +364,8 @@
    variable and an array analogous to that provided by M pass by reference in
    routines and function calls. Multiple local variables can be aliased to
    the same array, and a SET or KILL to one acts as a SET or KILL to all.
-   Alias container variables provide a way of associating a reference to an
-   entire local variable array with a data-cell, which protects the
+   Alias container variables provide a way using a subscripted local to store
+   a reference to an entire local variable array, which protects the
    associated array even when it's not accessible through any current local
    variable name.
 
@@ -404,7 +399,7 @@
    | Set *                | Explicitly creates an alias.                    |
    |----------------------+-------------------------------------------------|
    | Kill *               | Removes the association between its arguments,  |
-   |                      | and any associated arrays.                      |
+   |                      | and any associated data cells.                  |
    |----------------------+-------------------------------------------------|
    |                      | When QUIT * terminates an extrinsic function or |
    |                      | an extrinsic special variable, it always        |
@@ -417,18 +412,18 @@
    | New                  | For the scope of the NEW, a NEW of a name       |
    |                      | suspends its alias association.                 |
    |----------------------+-------------------------------------------------|
-   |                      | Create a scope in which only one association    |
+   |                      | Create a scope in which some associations       |
    | Exclusive New        | between an lname or an lvn and an array may be  |
-   |                      | visible.                                        |
+   |                      | invisible.                                      |
    |----------------------+-------------------------------------------------|
    |                      | returns a unique identifier (handle) for the    |
    | $ZAHandle()          | array associated with an lname or an alias      |
-   |                      | container; for an subscripted lvn, it returns   |
-   |                      | an empty string.                                |
+   |                      | container; for an subscripted lvn that is not   |
+   |                      | an alias container, it returns an empty string. |
    |----------------------+-------------------------------------------------|
-   |                      | Extends $DATA() to reflects the current alias   |
-   | $ZDATA()             | state of the lvn or lname argument to identify  |
-   |                      | alias and alias container variables.            |
+   |                      | Extends $DATA() to reflect the current alias    |
+   | $ZDATA()             | state of the lvn or lname argument in order to  |
+   |                      | identify alias and alias container variables.   |
    |----------------------+-------------------------------------------------|
    | View and $View()     |                                                 |
    |----------------------+-------------------------------------------------|
@@ -1356,6 +1351,12 @@
    prompt. When the current image does not contain the routine, GT.M does the
    following:
 
+     o Locates the source and object
+     o Determines whether the source has been edited since it was last
+       compiled
+     o Compiles the routine, if appropriate
+     o Adds the object to the image
+
    By using the DO command, you implicitly instruct GT.M to compile, link,
    and execute the program. With this method, you can test your routine
    interactively.
@@ -1469,6 +1470,7 @@
    the object code. The dynamic loading and unloading of these data
    structures:
 
+     o Supersedes any specification of -NOINLINE_LITERALS.
      o Reduces the amount of private memory required by each process which in
        turn allows more processes to execute with the same memory.
      o In some circumstances, increases application performance by making
@@ -1480,8 +1482,8 @@
    process. As the use of -DYNAMIC_LITERALS increases object code size, and
    as the dynamic loading and unloading only saves memory when the object
    code is in shared libraries, FIS recommends restricting the use of
-   -DYNAMIC_LITERALS only when compiling object code to be loaded into shared
-   libraries.
+   -DYNAMIC_LITERALS to only when compiling object code to be loaded into
+   shared libraries or executed from an auto relink enabled directory.
 
 4 [no]embed_source
    [no]embed_source
@@ -1652,8 +1654,6 @@
      * ZPRINT
      * $TEXT()
 
-   GT.M auto-ZLINKs the routine only under these conditions:
-
    $ZROUTINES is a read-write special variable that contains a directory
    search path used by ZLINK and auto-ZLINK to locate source and object
    files.
@@ -1805,7 +1805,7 @@
 
        gtm(){ $gtm_dist/mumps -direct}
 
-    3. save the file.
+    3. Save the file.
 
    Now, when you want to enter Direct Mode for an editing or debugging
    session, simply type gtm at the shell prompt.
@@ -1842,6 +1842,14 @@
 
    REC[ALL] [intlit|strlit]
 
+     o The optional integer literal specifies a previously entered command by
+       the counting back from the present.
+     o The optional string literal specifies the most recently entered
+       command line that starts with characters matching the (case-sensitive)
+       literal.
+     o When the RECALL command has no argument, it displays up to a maximum
+       of 99 available past Direct Mode entries.
+
    If the Direct Mode session has just started, you may not have entered 99
    lines for GT.M to save and therefore you will not have 99 lines to look
    at. The most recently entered GT.M command line has the number one (1),
@@ -1944,18 +1952,15 @@
    in your current terminfo entry (by convention, the Delete key). If the
    current terminfo entry is missing the kdch1 capability, GT.M uses a
    default value derived from members of the DEC VT terminal family, as it
-   does for selected other missing terminfo capabilities. In prior version,
-   in response to the escape sequence defined by kdch1, GT.M deleted the
-   character immediately on the left, akin to the Backspace key and assumed
-   an inappropriate value if a definition for kdch1 was missing. If you wish
-   to retain the prior behavior, the simplest way is to configure your
-   terminal emulator to send the same character sequences for the Delete key
-   that it does for the Backspace key. You can alternatively modify your
-   terminfo setting: for example, create an editable version of your terminfo
-   entry in a temporary file with a command such as: infocmp > /tmp/$$_$TERM
-   and edit the temporary file to replace the entry for the kbs capability
-   with the one in the kdch1 capability. Save your changes, and compile the
-   edited file into a usable terminfo entry, for example:
+   does for selected other missing terminfo capabilities. If you wish the
+   Backspace and Delete keys to behave the same, the simplest way is to
+   configure your terminal emulator to send the same character sequences for
+   the Delete key that it does for the Backspace key. You can alternatively
+   modify your terminfo setting: for example, create an editable version of
+   your terminfo entry in a temporary file with a command such as: infocmp >
+   /tmp/$$_$TERM and edit the temporary file to replace the entry for the kbs
+   capability with the one in the kdch1 capability. Save your changes, and
+   compile the edited file into a usable terminfo entry, for example:
 
    export TERMINFO=$HOME/.terminfo # You may need to add this to your login profile
    profilemkdir -p $TERMINFO
@@ -2892,6 +2897,12 @@
    before successful completion, M sets $TEST to FALSE (0). When a command
    argument does not specify a timeout, M does not maintain $TEST.
 
+     o LOCK
+     o JOB
+     o OPEN
+     o READ
+     o ZALLOCATE
+
    When a READ times out, M returns any characters that have arrived between
    the start of the command and the timeout. M does not produce any partial
    results for any of the other timed commands.
@@ -2990,8 +3001,17 @@
    In GT.M, a colon (:) delimiter may be appended to the label, which causes
    the label to be treated as "local." Within the routine in which they
    appear, they perform exactly as they would without the trailing colon but
-   they are inaccessible to other routines. Using local labels reduces object
-   size and linking overhead, for both ZLINK and host linking.
+   they are available only during compilation and inaccessible to other
+   routines and to indirection or XECUTE. Because references to local labels
+   preceding their position in a routine produce a LABELUNKNOWN error at
+   run-time, FIS recommends omitting the routinename from labelrefs to a
+   local label. Using local labels reduces object size and linking overhead
+   for both all types for dynamic linking except indirection and XECUTE. Use
+   of local labels may either improve or impair performance; typically any
+   difference is modest. The more likely they are to all be used within the
+   code block at run-time, the more likely an improvement. In other words,
+   conditional code paths which prevent all references to local variables
+   appearing in the block may actually impair performance.
 
 4 Comments
    Comments
@@ -3188,6 +3208,10 @@
 
    GTM>DO MULT(3,X,.RESULT)
 
+     o 3 - a numeric literal
+     o X - a local variable
+     o .RESULT - an actualname
+
 3 Actualnames
    Actualnames
 
@@ -3205,12 +3229,26 @@
    formallist contains a list of zero or more parameters enclosed in
    parentheses, immediately following a label.
 
+     o Is made up of items separated by commas.
+     o Contains unsubscripted local variable names.
+     o Must be used and only used with a label invoked with an actuallist or
+       an extrinsic.
+     o May contain undefined variables.
+     o May have more items than an actuallist with which it is used.
+     o Must not contain the same item in more than one position.
+     o Must contain at least as many items as the actuallist with which it is
+       used.
+
    Example:
 
    MULT(MP,MC,RES)
    SET RES=MP*MC
    QUIT RES
 
+     o MP
+     o MC
+     o RES
+
 3 Formallabel
    Formallabel
 
@@ -3480,22 +3518,20 @@
    Transaction Processing (TP) provides a way for M programs to organize
    database updates into logical groups that occur as a single event (i.e.,
    either all the database updates in a transaction occur, or none of them
-   occur). No other process may behave as if it observed any intermediate
-   state.
-
-   Transaction processing has been designed to improve output and eliminate
-   "live lock" conditions. The number of attempts to complete the transaction
-   is limited to four. The fourth attempt is made inside a "critical section"
-   with all other processes temporarily locked out of the database. Between
-   the second and third tries, GT.M waits for a random interval between 0 and
-   500 milliseconds.
+   occur). With a properly constructed transaction, no other actor or process
+   behaves as if it observed any intermediate state. Transaction processing
+   has been designed to improve throughput and minimize the possibility and
+   impact of "live lock" conditions.
 
 3 TP_Definitions
    TP Definitions
 
    In M, a transaction is a sequence of commands that begins with a TSTART
    command, ends with a TCOMMIT command, and is not within the scope of
-   another transaction.
+   another transaction. Applications can nest TSTART/TCOMMIT commands to
+   create sub-transactions, but sub-transactions only commit at the
+   outer-most TCOMMIT. $TLEVEL greater than 1 indicates sub-transaction
+   nesting.
 
    A successful transaction ends with a COMMIT that is triggered by the
    TCOMMIT command at the end of the transaction. A COMMIT causes all the
@@ -3537,21 +3573,21 @@
 
    Example:
 
-   TSTART ():SERIAL
-   SET (ACCT,^M(0))=^M(0)+1
-   SET ^M(ACCT)=PREC,^PN(NAM)=ACCT
-   TCOMMIT
+    TSTART ():SERIAL
+    SET (ACCT,^M(0))=^M(0)+1
+    SET ^M(ACCT)=PREC,^PN(NAM)=ACCT
+    TCOMMIT
 
    Example:
 
-   TSTART ():SERIAL
-   IF $TRESTART>3 DO QUIT
-   .TROLLBACK
-   .WRITE !,"Too many RESTARTs"
-   .QUIT
-   SET (NEXT,^ID(0))=^ID(0)+1
-   SET ^ID(NEXT)=RECORD,^XID(ZIP,NEXT)=""
-   TCOMMIT
+    TSTART ():SERIAL
+    IF $TRESTART>3 DO QUIT
+    .TROLLBACK
+    .WRITE !,"Too many RESTARTs"
+    .QUIT
+    SET (NEXT,^ID(0))=^ID(0)+1
+    SET ^ID(NEXT)=RECORD,^XID(ZIP,NEXT)=""
+    TCOMMIT
 
 1 Commands
    Commands
@@ -3577,6 +3613,11 @@
 
    ZCONTINUE resumes execution of the interrupted program.
 
+     o The body of a program
+     o A ZBREAK action
+     o A device EXCEPTION
+     o A ZSTEP action
+
    The VIEW "BREAKMSG" mask selectively enables or disables these messages.
    By default, a process executing a GT.M image displays all BREAK messages.
 
@@ -4025,8 +4066,8 @@
    file or a DETACHed socket (that is, a socket from the socket pool). To
    pass a DETACHed socket as the stdin of the JOBbed process, specify strlit
    in the form of "SOCKET:<handle>" where <handle> is the socket handle. On
-   successful completion of the JOBbed process, the passed socket is closed
-   and is no longer available to the parent process.
+   successful completion of the JOB command, the passed socket is closed and
+   is no longer available to the parent process.
 
    **Note**
 
@@ -4046,8 +4087,8 @@
    file or a DETACHed socket (that is, a socket from the socket pool). To
    pass a DETACHed socket as the stdout of the job, specify strlit in the
    form of "SOCKET:<handle>" where <handle> is the socket handle. On
-   successful completion of the JOBbed process, the passed socket is closed
-   and is no longer available to the parent process.
+   successful completion of the JOB command, the passed socket is closed and
+   is no longer available to the parent process.
 
    **Note**
 
@@ -4060,23 +4101,24 @@
    using a file extension of .mjo and the current default directory of the
    process created by the JOB command.
 
-4 PASSCURLVN
-   PASSCURLVN
+4 PASS[CURLVN]
+   PASS[CURLVN]
 
    When a JOB command specifies the PASSCURLVN jobparameter, the new process
    inherits the current collation, all locals, aliases, and alias containers
    from the JOB'ng process' current stack level. As a result of this, a
    ZWRITE issued in the JOB'd process has the same output, except for any out
    of scope aliases, as a ZWRITE in the context of the JOB command. If the
-   JOB command finds a ZWRITE representation of any lvn, consisting of a its
-   full name, its subscripts, corresponding value, quotes and the "=" sign,
-   exceeding 1MiB, it produces an JOBLVN2LONG error both in the JOB'ng
-   process and in the JOB'd processes error output stream. If a JOB command
-   does not specify PASSCURLVN, the JOB'd process(es) inherits no local
-   variables from the parent. While not an inexpensive command, you can use
-   the "exclusive" NEW command to control the context passed to the JOB'd
-   process; for example, adding "NEW (LOCALA, LOCALB)" before the JOB command
-   would pass only LOCALA and LOCALB.
+   JOB command finds a ZWRITE representation of any lvn, consisting of its
+   full name, its subscripts, corresponding value, quotes and the equal-sign
+   (=), exceeding 1MiB, it produces a JOBLVN2LONG error in the JOB'ng
+   process, and a JOBLVNDETAIL error in the JOB'd process's error output
+   stream. If a JOB command does not specify PASSCURLVN, the JOB'd
+   process(es) inherits no local variables from the parent, although it can
+   receive values passed as parameters to an actuallist entryref. While not
+   an inexpensive command, you can use the "exclusive" NEW command to control
+   the context passed to the JOB'd process; for example, adding "NEW (LOCALA,
+   LOCALB)" before the JOB command would pass only LOCALA and LOCALB.
 
 4 STA[RTUP]="/path/to/shell/script"
    STA[RTUP]="/path/to/shell/script"
@@ -4111,8 +4153,8 @@
 
    Example:
 
-   Refer to the sockexamplemulti3.m program in "Socket Device
-   Examples" for more examples on the JOB command.
+   Refer to the sockexamplemulti31.m program in Using Socket Devices section
+   for more examples on the JOB command.
 
 2 Kill
    Kill
@@ -4845,10 +4887,10 @@
    TERMINATOR deviceparameter changes for $PRINCIPAL. With VIEW "NODMTERM",
    TERMINATOR deviceparameter apply to both READs from $PRINCIPAL and direct
    mode interactions. A case-insensitive value of the environment variable
-   gtm_dmterm is "1", "yes", or "true" establishes a NODMTERM state at
-   process initiation; all other values, including no value, result in the
-   default VIEW "NODMTERM" behavior. $VIEW("DMTERM") returns 1 for DMTERM
-   mode or 0 for NODMTERM mode.
+   gtm_dmterm is "1", "yes", or "true" establishes a DMTERM state at process
+   initiation; all other values, including no value, result in the default
+   VIEW "NODMTERM" behavior. $VIEW("DMTERM") returns 1 for DMTERM mode or 0
+   for NODMTERM mode.
 
 4 EPOCH
    EPOCH
@@ -4893,6 +4935,9 @@
    evaluates to an integer one (1), the initial setting is "FULL_BOOLEAN" and
    if it evaluates to integer two (2) the initial setting is "FULL_BOOLWARN".
 
+   VIEW "[NO]FULL_BOOL[EAN][WARN]" takes effect immediately for indirection
+   and XECUTE.
+
    VIEW "NOFULLBOOLEAN" produces an error when gtm_side_effects is on. For
    more information on the gtm_side_effects environment variable, refer to
    the Environment Variables section in the Basic Operations chapter of the
@@ -5071,15 +5116,15 @@
 4 NOISOLATION
    NOISOLATION
 
-   where expr must evaluate to one of the following forms
+   where expr must evaluate to one of the following forms:
 
-     * "", that is, the empty string : turn off the feature for all globals
+     o "", that is, the empty string : turn off the feature for all globals
        for which it has previously been turned on
-     * "^gvn1,^gvn2,..." : turn on the feature for the globals in the list,
+     o "^gvn1,^gvn2,..." : turn on the feature for the globals in the list,
        turning it off for globals for which it has previously been turned on
-     * "+^gvn1,^gvn2,..." : add these globals to the list of globals that
+     o "+^gvn1,^gvn2,..." : add these globals to the list of globals that
        have this feature turned on
-     * "-^gvn1,^gvn2,..." : turn off the feature for these globals leaving
+     o "-^gvn1,^gvn2,..." : turn off the feature for these globals leaving
        the status for other globals unchanged
 
 4 PATCODE
@@ -5135,6 +5180,11 @@
    the new feature, FIS may remove or modify this VIEW option in subsequent
    releases.
 
+   **Note**
+
+   GT.M no longer supports VIEW "RCTLDUMP" as it has been supplanted by ZSHOW
+   "A" and MUPIP RCTLDUMP.
+
 4 RESETGVSTATS
    RESETGVSTATS
 
@@ -6191,14 +6241,10 @@
    (in $ZROUTINES) with a *-suffix (i.e. auto-relink-enabled) into a shared
    memory segment (referred to henceforth as a Rtnobj shared memory segment).
    At the invocation of DO, GOTO, or ZGOTO, extrinsic functions, ZBREAK,
-   ZPRINT or
-
-   $TEXT()
-
-   that specify an entryref which includes a routine name (in contrast to a
-   label without a routine name), mumps processes (and mupip processes
-   executing trigger logic) automatically relink ("auto-relink") and execute
-   published new versions of routines.
+   ZPRINT or $TEXT() that specify an entryref which includes a routine name
+   (in contrast to a label without a routine name), GT.M processes (and MUPIP
+   processes executing trigger logic) automatically relink ("auto-relink")
+   and execute published new versions of routines.
 
    The ZRUPDATE command publishes of new versions of routines to subscribers.
    To remove routines, delete the object files and publish the names of the
@@ -6241,24 +6287,33 @@
    values are case-independent. When gtm_autorelink_keeprtn is defined and
    TRUE:
 
+     o Process exit is simplified, with the performance gain - faster process
+       termination - likely to be observable only when a large number of
+       processes exit concurrently.
+     o Where routines are likely to be repeatedly used by other processes,
+       such as in a production environment, leaving a routine in shared
+       memory even when no longer used by existing processes, results in
+       slightly faster linking of that routine by future processes, although
+       the effect may not be observable except when an application frequently
+       uses short-lived processes, such as GT.M routines invoked by web
+       servers using a CGI interface.
+
    FIS recommends that a directory in the $zroutines of a process be either
    auto-relink-enabled or auto-relink-disabled for the life of the process.
    Changing the auto-relink mode of the directory within a process is likely
-   to result in counter-intuitive results.
+   to result in counter-intuitive results..
 
    As arguments, ZRUPDATE takes object file names, including wild-cards of
    the form accepted by $ZSEARCH(). If ZRUPDATE fails to find at least one
    file to match an argument with a wild card, it issues an INFO message
-   (seen only if $PRINCIPAL has CENABLE). When an explicit name without a
-   wild card is specified, but there is no file in the directory or a
-   corresponding entry in the Relinkctl, ZRUPDATE produces an error. ZRUPDATE
-   issues most errors as FILEPARSE errors with a secondary error describing
-   the actual issue although some errors, depending on the reason and path by
-   which ZRUPDATE detects them, can be rather cryptic.
+   (seen only if $PRINCIPAL has CENABLE). When the argument specifies an
+   explicit name without a wild card, but there is no file in the directory
+   or a corresponding entry in the Relinkctl, ZRUPDATE produces an error.
+   ZRUPDATE issues most errors as FILEPARSE errors with a secondary error
+   describing the actual issue although some errors, depending on the reason
+   and path by which ZRUPDATE detects them, can be rather cryptic.
 
-   An explicit ZLINK or an auto-relink check the hash of an object and its
-   replacement. If they are identical, GT.M takes no action to replace the
-   current object, saving both memory and time.
+   In other cases GT.M always performs the dynamic link.
 
    An explicit ZLINK from an auto-relink directory acts as an implicit
    ZRUPDATE.
@@ -6266,6 +6321,10 @@
    Any ZBREAK in a routine disables that routine from auto-relinking by a
    process until all ZBREAKs are removed.
 
+   If recursive relink is not enabled, routines currently active in the M
+   virtual machine stack are disabled from auto-relinking until they complete
+   (or are removed from the stack by a ZGOTO).
+
 3 ZLINK,_auto-ZLINK_and_Routine_Names
    ZLINK, auto-ZLINK and Routine Names
 
@@ -6342,8 +6401,9 @@
    handles failure conditions by storing the error information in $ZSTATUS
    and XECUTEing $ETRAP or $ZTRAP In Direct Mode, GT.M only reports failure
    conditions to the principal device and does not XECUTE $ETRAP or $ZTRAP or
-   set $ZSTATUS. System service errors do not follow the GT.M odd/even
-   pattern.
+   set $ZSTATUS; if $PRINCIPAL is in CENABLE mode, GT.M sends it
+   Informational messages which are not errors but a form of success. System
+   service errors do not follow the GT.M odd/even pattern.
 
 2 ZPrint
    ZPrint
@@ -6415,12 +6475,12 @@
      o To remove routines, delete the object files and publish the names of
        the deleted object files. Removal requires file names to be explicitly
        specified, because patterns with wildcards cannot match deleted files.
+     o ZRUPDATE rejects file-name arguments that are symbolic links or start
+       with a percent-sign (%)
+     o ZRUPDATE recognizes question-mark (?) as a single character wild-card
      o If the path to a file is non-existent, the request is ignored except
        in the case where one desires a currently shared object file (one that
-       was accessed before it was deleted) to no longer be shared. In
-       V6.2-000, if the process executing the ZRUPDATE does not have read
-       permission to any directory in the path to a file, ZRUPDATE ignores
-       the request; FIS expect to correct this in the production release.
+       was accessed before it was deleted) to no longer be shared.
      o To effect auto-relink, GT.M creates small temporary files in the
        directory referred to by $gtm_linktmpdir (defaulting to $gtm_tmp,
        which in turn defaults to /tmp, if unspecified). The names of these
@@ -6437,6 +6497,8 @@
        different values of $gtm_linktmpdir, a ZRUPDATE by a process with one
        value of $gtm_linktmpdir would not be observed by a process with a
        different value of that environment variable.
+     o ZRUPDATE always updates the existing shared memory relinkctl
+       information for a file with an existing entry.
 
 2 ZSHow
    ZSHow
@@ -6463,6 +6525,10 @@
 
    B: displays active ZBREAK breakpoints
 
+   C: provides the list of loaded external call packages and their routines.
+   ZSHOW "C" does not report packages that are accessible but have not been
+   accessed by the process.
+
    D: displays device information
 
    G: displays the access statistics for global variables and access to
@@ -6560,6 +6626,13 @@
    JEX : # of times a process extends the journal file
    DEX : # of times a process extends the database file
    [NT]B[WR] mnemonics are satisfied by either disk access or, for databases that use the BG (buffered global) access method, global buffers in shared memory.
+   ZTR : # of ZTRIGGER command operations
+
+   When $PRINCIPAL input and output are different devices, ZSHOW "D" shows
+   them as separate items identified as 0 for input and 0-out for output.
+   ZSHOW "D" includes "TLS" in the second line of the output for an encrypted
+   socket. ZSHOW "D" reports available information on both the local and
+   remote sides of a TCP socket.
 
 3 Examples
    Examples
@@ -6835,7 +6908,7 @@
 
    Example:
 
-   GTM>Set curx=$get(x),zact="ZSTEP:curx=$get(x) INTO:zact Break:curx'=$get(x)"
+   GTM>Set curx=$get(x),zact="ZSTEP:$get(curx)=$get(x) INTO:zact Break:$get(curx)'=$get(x)"
    GTM>ZSTEP INTO:zact
 
    This sequence uses ZSTEP to invoke Direct Mode at the beginning of the
@@ -8443,10 +8516,10 @@
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
    |                 |              |can return the following values:                                                                                   |
    |                 |              |                                                                                                                   |
-   |"JNLACTIVE"      |region        |  * -1 (internal error)                                                                                            |
-   |                 |              |  * 0 journaling is disabled                                                                                       |
-   |                 |              |  * 1 journaling is enabled but closed (OFF)                                                                       |
-   |                 |              |  * 2 journaling is enabled and open (ON)                                                                          |
+   |"JNLACTIVE"      |region        |  o -1 (internal error)                                                                                            |
+   |                 |              |  o 0 journaling is disabled                                                                                       |
+   |                 |              |  o 1 journaling is enabled but closed (OFF)                                                                       |
+   |                 |              |  o 2 journaling is enabled and open (ON)                                                                          |
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
    |"JNLFILE"        |region        |Journal file name associated with the region.                                                                      |
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
@@ -8478,6 +8551,10 @@
    |                 |              |By default, GT.M ensures Isolation, that is, a $VIEW command will return 0. The isolation-status of a global       |
    |                 |              |variable can be turned on and off by the VIEW "NOISOLATION" command.                                               |
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
+   |"PATCODE"        |none          |Name of the active patcode table; GT.M defaults this to "M".                                                       |
+   |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
+   |"POOLLIMIT"      |region        |The current limit on global buffers for the region .                                                               |
+   |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
    |"PROBECRIT"      |region        |Acquires and releases a critical section for the region (the "probe"), returning a string with the following       |
    |                 |              |fields:                                                                                                            |
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
@@ -8491,10 +8568,8 @@
    |                 |              |use $NAME() inside $VIEW() to ensure that subscripts are in a correct form, for example,                           |
    |                 |              |$VIEW("REGION",$NAME(^abcd(1,2E4))) instead of $VIEW("REGION","^abcd(1,20000)").                                   |
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
-   |"PATCODE"        |none          |Name of the active patcode table; GT.M defaults this to "M".                                                       |
-   |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
-   |"RTNCHECKSUM"    |routine name  |Use a 128 bit hash based on the MurmurHash3 algorithm to returns the source check-sum for the most recently ZLINK'd|
-   |                 |              |version of the specified routine name.                                                                             |
+   |"RTNCHECKSUM"    |routine name  |Source code check-sum for the most recently ZLINK'd version of the specified routine name (these check-sums use a  |
+   |                 |              |128 bit hash based on the MurmurHash3 algorithm).                                                                  |
    |-----------------+--------------+-------------------------------------------------------------------------------------------------------------------|
    |"RTNNEXT"        |routine name  |Name of the next routine in the image after the given one; "" (empty string) for routinename starts with the first |
    |                 |              |routine in ASCII collating sequence and a return value of the empty string indicates the end of the list.          |
@@ -8585,29 +8660,26 @@
    2,TBR:80,TR0:0,TR1:0,TR2:0,TR3:0,TR4:0,TC0:0,TC1:0,TC2:0,TC3:0,TC4:0,ZTR:7
    GTM>
 
-   These are statistics associated with the DEFAULT region. Refer to
-   "ZSHOW Information Codes" for information on the parameters.
-
    Example:
 
    Given the following global directory configuration:
 
-   GDE>add    -name a(1:10)                         -region=a1
-   GDE>add    -name a(10,1)                         -region=a2
-   GDE>add    -name a(10,2)                       -region=a3
-   GDE>add    -name a(120:300)                      -region=a4
-   GDE>add    -name a(60:325)                       -region=a5
-   GDE> show   -name
-            *** NAMES ***
-    Global                             Region
+   GDE>add -name a(1:10)      -region=a1
+   GDE>add -name a(10,1)      -region=a2
+   GDE>add -name a(10,2)      -region=a3
+   GDE>add -name a(120:300)   -region=a4
+   GDE>add -name a(60:325)    -region=a5
+   GDE> show -name
+     *** NAMES ***
+    Global        Region
     ------------------------------------------------------------------------------
-    *                                  DEFAULT
-    a(1:10)                            A1
-    a(10,1)                            A2
-    a(10,2)                            A3
-    a(60:120)                          A5
-    a(120:300)                         A4
-    a(300:325)                         A5
+    *             DEFAULT
+    a(1:10)       A1
+    a(10,1)       A2
+    a(10,2)       A3
+    a(60:120)     A5
+    a(120:300)    A4
+    a(300:325)    A5
 
    Here are some $VIEW("REGION",gvn) outputs:
 
@@ -9565,12 +9637,12 @@
 
    Example:
 
-   GTM>write $zmessage(36)
-   Interrupted system call
+   GTM>write $zmessage(150373210)
+   %GTM-E-DIVZERO, Attempt to divide by zero
    GTM>
 
    This uses $ZMESSAGE() to display the message string corresponding to code
-   36.
+   150373210.
 
 2 $ZPARSE()
    $ZPARSE()
@@ -9751,13 +9823,10 @@
 2 $ZPEEK()
    $ZPEEK()
 
-   Provides a way to examine memory in the current process address space. It
-   is intended as a tool to make it more convenient for FIS to access
-   information in the address space of processes more efficiently than by
-   calling out to external functions. It is documented here for completeness.
-   While FIS normally maintains stability of GT.M functionality from release
-   to release, this function is not designed for non-FIS usage, and FIS may
-   change or eliminate this function at any time.
+   Provides a way to examine memory in the current process address space. Use
+   of this function requires information about GT.M internals, which may
+   change from release to release. Contact FIS support for information on
+   techniques for using $ZPEEK() in largely release independent ways.
 
    The $ZPEEK() function returns the contents of the memory requested as a
    string depending on the requested (or defaulted) formatting.
@@ -9766,116 +9835,85 @@
 
    $ZPEEK("mnemonic[:argument]",offset,length[,format])
 
-     * mnemonic specifies the memory area $ZPEEK() is to access. Some
+     o mnemonic specifies the memory area $ZPEEK() is to access. Some
        mnemonics have arguments separated from the mnemonic by a colon (":").
        The mnemonics are case independent. Possible mnemonics, their possible
        abbreviations and their arguments are:
 
-          * CSA[REG] - returns a value from the sgmnt_addrs (process private)
+          o CSA[REG] - returns a value from the sgmnt_addrs (process private)
             control block. Takes a case independent region name as an
             argument.
-          * FH[REG] - returns a value from the sgmnt_data (shared file
+          o FH[REG] - returns a value from the sgmnt_data (shared file
             header) control block. Takes a case independent region name as an
-            argument.
-          * GDR[REG] - returns a value from the gd_region (process private)
+            argument..
+          o GDR[REG] - returns a value from the gd_region (process private)
             control block. Takes a case independent region name as an
             argument.
-          * GLF[REPL] - returns a value from the jnlpool.gtmsrc_lcl_array[n]
+          o GLF[REPL] - returns a value from the jnlpool.gtmsrc_lcl_array[n]
             control block. Takes a numeric index (n) as an argument.
-          * GRL[REPL] - returns a value from the recvpool.gtmrecv_local
+          o GRL[REPL] - returns a value from the recvpool.gtmrecv_local
             control block. No argument allowed. Only available when run on a
             non-primary instance.
-          * GSL[REPL] - returns a value from the
+          o GSL[REPL] - returns a value from the
             jnlpool.gtmsource_local_array[n] control block. Takes a numeric
             index (n) as an argument.
-          * JBF[REG]:region[ -obtains fields in shared jnl_buffer structure.
-          * JNL[REG]:region[ - obtains fields in the jnl_private_control
+          o JBF[REG]:region[ -obtains fields in shared jnl_buffer structure.
+          o JNL[REG]:region[ - obtains fields in the jnl_private_control
             structure.
-          * JPC[REPL] - returns a value from the jnlpool.jnlpool_ctl control
+          o JPC[REPL] - returns a value from the jnlpool.jnlpool_ctl control
             block. No argument allowed.
-          * NL[REG] - returns a value from the node_local (shared) control
+          o NL[REG] - returns a value from the node_local (shared) control
             block. Takes a case independent region name as an argument.
-          * NLREPL - returns a value from the node_local (shared) control
+          o NLREPL - returns a value from the node_local (shared) control
             block associated with replication. No argument allowed.
-          * PEEK - returns a value based on the supplied argument. Argument
-            is the base address of whatever is being fetched in 0xhhhhhhh
-            format where the h's are hex digits.
-          * RIH[REPL] - returns a value from the jnlpool.repl_inst_filehdr
+          o PEEK - returns a value based on the supplied argument. Argument
+            is the base address of the value to obtain in 0xhhhhhhh format
+            where the h's are hex digits.
+          o RIH[REPL] - returns a value from the jnlpool.repl_inst_filehdr
             control block. No argument allowed.
-          * RPC[REPL] - returns a value from the recvpool.recvpool_ctl
+          o RPC[REPL] - returns a value from the recvpool.recvpool_ctl
             control block. No argument allowed. Only available when run on a
             non-primary instance.
-          * UHC[REPL] - returns a value from the recvpool.upd_helper_ctl
+          o UHC[REPL] - returns a value from the recvpool.upd_helper_ctl
             control block. No argument allowed. Only available when run on a
             non-primary instance.
-          * UPL[REPL] - returns a value from the recvpool.upd_proc_local
+          o UPL[REPL] - returns a value from the recvpool.upd_proc_local
             control block. No argument allowed. Only available when run on a
             non-primary instance.
 
-     * offset (first integer expression) is a numeric value that specifies
+     o offset (first integer expression) is a numeric value that specifies
        the offset from the address supplied or implied by the the mnemonic
        and argument. Specifying a negative offset results in a BADZPEEKARG
        error. Specifying too large an offset such that unavailable memory is
        specified results in a BADZPEEKRANGE error.
-     * length (second integer expression) is a numeric value that specifies
-       the length of the field to be fetched. Specifying a negative legnth
+     o length (second integer expression) is a numeric value that specifies
+       the length of the field to obtain. Specifying a negative legnth
        results in a BADZPEEKARG error. Specifying a length that exceeds the
        maximum string length results in a MAXSTRLEN error. Specifying too
        large a length such that unavailable memory is specified results in a
        BADZPEEKRANGE error.
-     * format is an optional single case independent character formatting
+     o format is an optional single case independent character formatting
        code for the retrieved data. The formatting codes are:
 
-          * C : returns a character representations of the memory locations;
+          o C : returns a character representations of the memory locations;
             this is the DEFAULT if the fourth argument is not specified.
-          * I : returns a signed integer value - negative values have a
+          o I : returns a signed integer value - negative values have a
             preceding minus sign (-); the length can be 1, 2, 4, or 8 bytes.
-          * U : returns an unsigned integer value - all bits are part of the
+          o U : returns an unsigned integer value - all bits are part of the
             numeric value; the length can be 1, 2, 4, or 8 bytes.
-          * S : returns a character representation of the memory locations
+          o S : returns a character representation of the memory locations
             and the first NULL character found terminates the returned
             string; that is: the specified length is a maximum.
-          * T: Selects a $HOROLOG format for a field of 4 or 8 bytes which is
+          o T: Selects a $HOROLOG format for a field of 4 or 8 bytes which is
             intended for use on fields in UNIX time format (seconds since
             01/01/1970)
-
-            X : returns a hexadecimal value as 0xXXXXXX where XXXXXX is twice
+          o X : returns a hexadecimal value as 0xXXXXXX where XXXXXX is twice
             the specified length in bytes, so requested length 1 returns 0xXX
             and length 4 returns 0xXXXXXXXX; the length can be 1, 2, 4, or 8
             bytes.
-
-          * Z : returns a hexadecimal representation of the memory locations
+          o Z : returns a hexadecimal representation of the memory locations
             as 'X' does, without regard to endianness, and with no length
             restriction other than max string length.
-          * $ZPEEK() function generates an UNDEF error when VIEW UNDEF is not
-            set and format parameter is specified but is undefined.
-
-   **Note**s
-
-     * $ZPEEK() has no UTF-8 checking. It is possible for values returned by
-       the 'C' and 'S' codes to have invalid UTF-8 values in them. Take care
-       when processing values obtained by these codes to either use "VIEW
-       NOBADCHAR" when dealing with such values and/or use the $Zxxx()
-       flavors of functions like $ZPIECE(), $ZEXTRACT(),etc which also do not
-       raise BADCHAR errors when encountering invalid UTF-8 encoded strings.
-     * Note that $ZPEEK() with 8 byte numeric formatting can return numeric
-       string values that exceed GT.M's current limit of 18 digits of
-       precision. If the values are used as strings, the extra digits are
-       preserved, but if used arithmetically, the lower precision digits can
-       be lost.
-     * When values from replication structures are requested and the
-       structures are not available due to replication not running or, in the
-       case of the gtmrecv.* control block base options, if not running on a
-       non-primary instance where the gtmrecv.* control are available, a
-       ZPEEKNOREPLINFO error is raised.
-     * The JNL[REG] and JBL[REG] mnemonics and characteristics are defined by
-       the running the GTMDefinedTypesInit.m utility, which produces a
-       cross-index in the form:
-
-       gtmtypfldindx(<structure-name>.<field-mnemonic>)=<n>
-
-       where gtmtypes(<structure-name>,<n>,*) nodes contain the field
-       characteristics
 
 2 $ZPrevious()
    $ZPrevious()
@@ -9907,10 +9945,7 @@
    $ZSOCKET(expr1,expr2[,[expr3][,expr4]])
 
      o The first expression specifies the SOCKET device name; an empty string
-       returns the same result as the current device ($IO). If the first
-       expression is not specified, $ZSOCKET() returns information about
-       sockets in the socketpool. Specifying a device other than a SOCKET
-       device for the $ZSOCKET() function produces a ZSOCKETNOTSOCK error.
+       returns the same result as the current device ($IO).
      o The second expression specifies a keyword identifying the type of
        information returned and the optional third expression usually
        specifies the index (starting at zero) of a socket attached to the
@@ -9955,7 +9990,7 @@
    |---------------+------------+-------------------------------------------|
    |               |            | The address of the local side of the      |
    | LOCALADDRESS  | index      | socket. For TCP sockets: the IPv4 or IPv6 |
-   |               |            | numeric address. For LOCAL socket: the    |
+   |               |            | numeric address. For LOCAL sockets: the   |
    |               |            | path.                                     |
    |---------------+------------+-------------------------------------------|
    | LOCALPORT     | index      | The numeric port of the local side of a   |
@@ -9976,7 +10011,7 @@
    |---------------+------------+-------------------------------------------|
    |               |            | The address of the remote side of the     |
    | REMOTEADDRESS | index      | socket. For TCP sockets: the IPv4 or IPv6 |
-   |               |            | numeric address. For LOCAL socket: the    |
+   |               |            | numeric address. For LOCAL sockets: the   |
    |               |            | path.                                     |
    |---------------+------------+-------------------------------------------|
    | REMOTEPORT    | index      | The numeric port of the remote side of a  |
@@ -9987,6 +10022,13 @@
    | STATE         | index      | One of LISTENING, CONNECTED, BOUND, or    |
    |               |            | CONNECTINPROGRESS                         |
    |---------------+------------+-------------------------------------------|
+   |               |            | If the selected socket is using TLS, a    |
+   |               |            | string of the form:                       |
+   | TLS           | index      | 1,{SERVER|CLIENT}[,tlsid], where the      |
+   |               |            | optional tlsid comes from the WRITE /TLS  |
+   |               |            | which enabled TLS on the socket;          |
+   |               |            | otherwise an empty string.                |
+   |---------------+------------+-------------------------------------------|
    | ZBFSIZE       | index      | Size of the GT.M buffer in bytes.         |
    |---------------+------------+-------------------------------------------|
    | ZFF           | index      | The value of the ZFF device parameter.    |
@@ -10015,7 +10057,8 @@
    The $ZQGBLMOD function enables an application to determine whether it can
    safely apply a lost transaction to the database. A lost transaction is a
    transaction that must be rolled off a database to maintain logical
-   multisite consistency.
+   multisite consistency. $ZQGBLMOD() always applies to data-level (level-0)
+   nodes.
 
    The format for the $ZQGBLMOD function is:
 
@@ -10025,12 +10068,12 @@
    a global variable name.
 
    Internally, $ZQGBLMOD (gvn) compares the GT.M transaction number in the
-   database block in which the global variable name is stored with the value
-   in the Zqgblmod_Trans (and Zqgblmod_Seqno) fields stored in the database
-   file header.
+   database block in which the global variable name is (or would be) stored
+   with the value in the Zqgblmod_Trans field stored in the database file
+   header.
 
    For example, if x is the transaction number of the level-0 database block
-   in which gvn resides, and y is the value of Zqgblmod_Seqno of region reg
+   in which gvn resides, and y is the value of Zqgblmod_Trans of region reg
    containing gvn, then the following is true:
 
    If a transaction is a lost transaction that has been rolled back and it is
@@ -10261,8 +10304,8 @@
    $ztrigger("ITEM",<multi-line-trigger-definition>> where <<denotes the
    definition of a multi-line -XECUTE string and $c(10) to denote the newline
    separator. Unlike the $ztrigger("FILE") form,
-   $ztrigger("ITEM",<multi-line-trigger-definition>> does not require trigger
-   definition to terminate with >>.
+   $ztrigger("ITEM",<multi-line-trigger-definition>> does not require the
+   trigger definition to terminate with >>.
 
    Example:
 
@@ -10338,8 +10381,9 @@
 
    **Note**
 
-   The ZWIDTH() function triggers a run-time error if it encounters a
-   malformed byte sequence irrespective of the setting of "BADCHAR".
+   When in "NOBADCHAR" mode, $ZWIDTH() returns give any bad characters a
+   length of zero (0), which may or may not match the behavior of any device
+   used to display the string.
 
    With character set UTF-8 specified, the $ZWIDTH() function uses the ICU's
    glyph-related conventions to calculate the number of columns required to
@@ -10492,11 +10536,13 @@
    $ETrap
 
    $ET[RAP] contains a string value that GT.M invokes when an error occurs
-   during routine execution. When a process is initiated, but before any
-   commands are processed, the value of $ETRAP is empty string.
+   during routine execution. When a process is initiated, GT.M assigns $ETRAP
+   the value of the gtm_etrap environment variable, if gtm_etrap is defined,
+   and otherwise the empty string, in which case $ZTRAP="B" controls initial
+   error handling.
 
-   The value of this variable is the M[UMPS] code that gets executed when an
-   error occurs.
+   The value of this variable is the M[UMPS] code that GT.M executes when it
+   encounters an error.
 
    SET $ETRAP="QUIT:$ESTACK GOTO LABEL^ROUTINE"
 
@@ -10505,11 +10551,10 @@
    trap.
 
    $ETRAP may also appear as an argument to an inclusive NEW command. NEW
-   $ETRAP causes GT.M to stack the active condition handler's ($ETRAP or
-   $ZTRAP) old value. If $ZTRAP is the active condition handler, the NEW
-   implicitly sets the current $ZTRAP value to null. NEW leaves the $ETRAP
-   unchanged regardless of the previously active condition handler. The NEW
-   command puts the target ISV in control for error handling.
+   $ETRAP causes GT.M to stack the active condition handler's ($ETRAP) old
+   value. NEW leaves the $ETRAP unchanged regardless of the previously active
+   condition handler. NEW $ETRAP command puts $ETRAP in control for error
+   handling.
 
    For more examples of the use of special variable $ETRAP, see the function
    $STACK().
@@ -10518,12 +10563,13 @@
    $Horolog
 
    $H[OROLOG] contains a string value specifying the number of days since "31
-   December, 1840," and the number of seconds since midnight of the current
-   day, separated by a comma (,).
-
-   At midnight, the piece of the string following the comma resets to zero
-   (0) and the piece preceding the comma increments by one (1). GT.M does not
-   permit the SET command to modify $HOROLOG.
+   December, 1840," and the number of seconds since midnight of date in the
+   time zone of the process, separated by a comma (,). At midnight, the piece
+   of the string following the comma resets to zero (0), and the piece
+   preceding the comma increments by one (1). GT.M does not permit the SET
+   command to modify $HOROLOG. A process takes the system time from the
+   system clock, but can adjust the time zone by appropriately setting the TZ
+   environment variable before invoking GT.M.
 
    Example:
 
@@ -10642,8 +10688,9 @@
    GT.M ignores a CLOSE specifying the principal device. GT.M does not permit
    the SET command to modify $PRINCIPAL.
 
-   GT.M discards reads and writes against an empty socket device (that is,
-   one with all sockets detached) if it is the $PRINCIPAL device.
+   GT.M fulfills READ to $PRINCIPAL when it is an empty socket device (that
+   is, one with all sockets detached) with an empty string, and discards
+   WRITE output to such a device.
 
    GT.M opens /dev/null as a placeholder for a socket which used to be
    associated with $PRINCIPAL via stdin when it is closed.
@@ -10656,6 +10703,13 @@
    INREWIND device parameters perform a REWIND of the input and OUTREWIND
    performs a REWIND of the output.
 
+   When $PRINCIPAL has different input/output devices, the USE command
+   recognizes intrinsic special variables $ZPIN or $ZPOUT and applies
+   appropriate deviceparameters to the input or output side of $PRINCIPAL,
+   respectively. A USE with $ZPIN or $ZPOUT sets $IO to $PRINCIPAL for READs
+   and WRITEs from the input and output side of $PRINCIPAL. For more
+   information refer to "$ZPIN" or "$ZPOUT" .
+
 2 $Quit
    $Quit
 
@@ -11212,7 +11266,7 @@
    error is encountered by the attempt to execute the code specified in
    $ZYERROR, GT.M sets $ZERROR to the error status encountered. If $ZYERROR
    is null, GT.M does not change the value of $ZERROR. In all cases, GT.M
-   proceeds to return control to the code specified by $ZTRAP/$ETRAP or
+   proceeds to return control to the code specified by $ETRAP/$ZTRAP or
    device EXCEPTION whichever is applicable.
 
 2 $ZGbldir
@@ -11297,6 +11351,63 @@
    Attempting to restore an inaccessible initial Global Directory that has
    been NEW'd, can cause an error.
 
+2 ZHorolog
+   ZHorolog
+
+   ZH[OROLOG] returns 4 comma-separated pieces (for example,
+   "63638,39194,258602,14400"). The first two pieces are identical to the two
+   pieces of $HOROLOG. $ZHOROLOG is a drop-in replacement for $HOROLOG in all
+   application code of the form $PIECE($HOROLOG,",",...). For example,
+   $ZHOROLOG can be used as the first argument of $ZDATE(). The third piece
+   is the number of microseconds in the current second. The accuracy of the
+   third piece is subject to the precision of the system clock. The fourth
+   piece is an offset in seconds to UTC. For any valid UTC time offset, the
+   fourth piece is a number between -43200 (for UTC-12:00) and +50400 (for
+   UTC+14:00). The value of the fourth piece remains constant all through the
+   year expect for those places that observe daylight saving time. To obtain
+   the $HOROLOG representation of UTC, add the fourth piece to the second
+   piece of $ZHOROLOG and proceed as follows:
+
+     o If the result is a negative number, subtract one from the first piece
+       and add 86400 (number of seconds in a day) to the second piece.
+     o If the result is a positive number greater than 86400, add one to the
+       first piece and subtract 86400 from the second piece.
+
+   Example:
+
+   GTM>zprint ^zhoro
+   zhoro(zone)
+    set:'$data(zone) zone="Europe/London"
+    new zutzh
+    set zutzh=$$getzutzh(zone)
+    do displaytzdetails(zutzh,zone)
+    quit
+   getzutzh(zone)
+     set shcommand="TZ="_zone_" $gtm_dist/mumps -run %XCMD 'write $zut,"" "",$zhorolog,"" "",$zdate($horolog,""MON DD,YYYY 12:60:SS AM""),!'"
+     set descname="tzpipe"
+     open descname:(shell="/bin/sh":command=shcommand:readonly)::"pipe"
+     use descname read dateline use $principal close descname
+     quit dateline
+   displaytzdetails(zutzh,zone)
+    set zut=$piece(zutzh," ",1)   ; $ZUT
+    set zh=$piece(zutzh," ",2)    ; $ZHOROLOG
+    set zhfp=$piece(zh,",",1)     ; first piece of $ZH of zone
+    set zhsp=$piece(zh,",",2)
+    set zhtp=$piece(zh,",",3)
+    set zhfop=$piece(zh,",",4)
+    set tz=zhfop/3600,hours=$select(tz*tz=1:" Hour ",1:" Hours ")
+    write "Time in ",zone," ",$piece(zutzh," ",3,6)," $ZUT=",zut,!,$select(tz<0:-tz_hours_"Ahead of",1:tz_hours_"Behind")," UTC",!
+    set zhsp=zhsp+zhfop
+    if zhsp>86400 set zhfp=zhfp+1,zhsp=zhsp-86400     ; 86400 seconds in a day
+    else  if zhsp<1 set zhfp=zhfp-1,zhsp=zhsp+86400
+    write "Time in UTC ",$zdate(zhfp_","_zhsp,"MON DD,YYYY 12:60:SS AM")
+    quit
+   GTM>do ^zhoro
+   Time in Europe/London APR 10,2015 05:20:29 PM $ZUT=1428682829213711
+   1 Hour Ahead of UTC
+   Time in UTC APR 10,2015 04:20:29 PM
+   GTM>
+
 2 $ZINTerrupt
    $ZINTerrupt
 
@@ -11506,6 +11617,12 @@
    were partially read and there is data left in their buffer. Each entry is
    delimited by a ";".
 
+   If $ZKEY contains one or more
+   "LISTENING|<listening_socket_handle>|{<portnumber|/path/to/LOCAL_socket>}"
+   entries, it means that there are pending connections and a USE
+   s:socket=listening_socket_handle will accept a pending connection and
+   remove the LISTENING|<listening_socket_handle> entry from $ZKEY.
+
    $ZKEY is empty if no sockets have data in the buffer and there are no
    unaccepted incoming sockets from previous WRITE /WAITs.
 
@@ -11592,7 +11709,7 @@
      set $ZMAXTPTIME=6,^X=0,^Y=0,^Z=0
      write "Start with $ZMAXTPTIME=",$ZMAXTPTIME,":",!
      for sleep=3:2:9 do
-     . set retlvl=$zl
+     . set retlvl=$zlevel
      . do longtran;ztrap on longtran
      ;continues execution
      ;on next line
@@ -11600,9 +11717,8 @@
      write !,"Done TP Timeout test.",!
     quit
    longtran ;I/O in TP doesn't get rolled back
-     set newzt="set $ZT="""" ";avoid recursive ZTRAP
-     set $ZT=newzt_" goto err"
-     tstart ():serial ;plain tstart works as well
+     set $etrap=" goto err"
+     tstart ():serial
      set ^X=1+^X
      write !,"^X=",^X,",will set ^Y to ",sleep
      write " in ",sleep," seconds..."
@@ -11613,13 +11729,13 @@
      write "...committed.",!
      quit
    err;
-     set $ZT=""
-     write !,"In $ZTRAP handler. Error was: "
+     write !,"In $ETRAP handler. Error was: "
      write !," ",$zstatus
      if $TLEVEL do ;test allows handler use outside of TP
      . trollback
      . write "Rolled back transaction."
      write !
+     set $ecode=""
      zgoto retlvl
 
    Results:
@@ -11628,10 +11744,10 @@
    ^X=1,will set ^Y to 3 in 3 seconds...^Y=3...committed.
    ^X=2,will set ^Y to 5 in 5 seconds...^Y=5...committed.
    ^X=3,will set ^Y to 7 in 7 seconds...
-   In $ZTRAP handler. Error was:
+   In $ETRAP handler. Error was:
    150377322,longtran+7^tptime,%GTM-E-TPTIMEOUT, Transaction timeoutRolled back transaction.
    ^X=3,will set ^Y to 9 in 9 seconds...
-   In $ZTRAP handler. Error was:
+   In $ETRAP handler. Error was:
    150377322,longtran+7^tptime,%GTM-E-TPTIMEOUT, Transaction timeoutRolled back transaction.
    Done TP Timeout test.
 
@@ -11739,6 +11855,81 @@
    GTM>Write 1+$Char($$FUNC^%HD("31")) ; This is the ASCII digit 1
    2
 
+2 $ZPIN
+   $ZPIN
+
+   When $PRINCIPAL has different input/output devices, the USE command
+   recognizes intrinsic special variable $ZPIN to apply appropriate
+   deviceparameters to the input side of $PRINCIPAL. A USE with $ZPIN sets
+   $IO to $PRINCIPAL for READs and WRITEs from the input and output side of
+   $PRINCIPAL. $ZSOCKET() also accepts $ZPIN as its first argument and, if
+   the device is a split SOCKET device, supplies information on the input
+   SOCKET device. In any context other than USE or $ZSOCKET(), or if
+   $PRINCIPAL is not a split device, $PRINCIPAL, $ZPIN and $ZPOUT are
+   synonyms. In the case of a split $PRINCIPAL, $ZPIN returns the value of
+   $PRINCIPAL followed by the string "< /" Any attempt to OPEN $ZPIN results
+   in a DEVOPENFAIL error.
+
+   For more information refer to "$Principal", "$ZPOUT", and
+   "$ZSOCKET()".
+
+2 $ZPOUT
+   $ZPOUT
+
+   When $PRINCIPAL has different input/output devices, the USE command
+   recognizes intrinsic special variables $ZPOUT to apply appropriate
+   deviceparameters to the output side of $PRINCIPAL. A USE with $ZPOUT sets
+   $IO to $PRINCIPAL for READs and WRITEs from the input and output side of
+   $PRINCIPAL. $ZSOCKET() also accepts $ZPOUT as its first argument and, if
+   the device is a split SOCKET device, supplies information on the output
+   SOCKET device. In any context other than USE or $ZSOCKET(), or if
+   $PRINCIPAL is not a split device, $PRINCIPAL, $ZPIN and $ZPOUT are
+   synonyms. In the case of a split $PRINCIPAL, $ZPOUT returns the value of
+   $PRINCIPAL followed by the string "> /" Any attempt to OPEN $ZPOUT results
+   in a DEVOPENFAIL error.
+
+   For more information refer to "$Principal", "$ZPIN", and
+   "$ZSOCKET()".
+
+   Example:
+
+   ;zpioin
+   ;123456789012345678901234567890123456789012345678901234567890
+   ;A12345678901234567890123456789012345678901234567890123456789
+   zpio
+     ; mumps -r zpio < zpioin
+     write "$PRINCIPAL = ",$P,!
+     write "$ZPIN = ",$ZPIN,!
+     write "$ZPOUT = ",$ZPOUT,!
+     write "Read first line from zpioin with default settings",!
+     read x
+     write x,!
+     zshow "d"
+     use $ZPIN:(wrap:width=50)
+     write "After $ZPIN set to wrap and width set to 50",!
+     zshow "d"
+     write "Read next 50 characters from zpioin",!
+     read y
+     write y,!
+     use $ZPOUT:wrap
+     use $ZPIN:nowrap
+     write "After $ZPOUT set to wrap and $ZPIN set to nowrap",!
+     zshow "d"
+     use $ZPOUT:nowrap
+     write "After $ZPOUT set to nowrap",!
+     zshow "d"
+     use $P:wrap
+     write "After $P set to wrap",!
+     zshow "d"
+     use $ZPOUT:width=40
+     write "After $ZPOUT width set to 40",!
+     zshow "d"
+     use $ZPOUT:nowrap
+     write "After $ZPOUT set to nowrap",!
+     zshow "d"
+     write x,!
+     quit
+
 2 $ZPOSition
    $ZPOSition
 
@@ -12268,10 +12459,10 @@
 2 $ZTExit
    $ZTExit
 
-   $ZTE[XIT] contains a string value that controls the GT.M interrupt
-   facility at the transaction commit or rollback. At each outermost TCOMMIT
-   or TROLLBACK, If +$ZTEXIT evaluates to non-zero (TRUE), then $ZINTERRUPT
-   is XECUTEd after completing the commit or rollback.
+   $ZTE[XIT] contains an expression that controls the GT.M interrupt facility
+   at the transaction commit or rollback. At each outermost TCOMMIT or
+   TROLLBACK, If +$ZTEXIT evaluates to non-zero (TRUE), then $ZINTERRUPT is
+   XECUTEd after completing the commit or rollback.
 
    $ZTEXIT is a read-write ISV, that is, it can appear on the left side of
    the equal sign (=) in the argument to the SET command. M routines cannot
@@ -12351,7 +12542,7 @@
    output in each GTM_ZJOBEXAM_ZSHOW_DMP for the initial interrupt, and at
    tcommit when the interrupt is rethrown.
 
-2 $ZTrap
+3 $ZTrap
    $ZTrap
 
    $ZT[RAP] contains a string value that GT.M XECUTEs when an error occurs
@@ -12375,18 +12566,18 @@
    command).
 
    $ZTRAP may also appear as an argument to an inclusive NEW command. NEW
-   $ZTRAP causes GT.M to set $ETRAP or $ZTRAP, whichever is active, to null
-   ($ETRAP="" or $ZTRAP="") and stack its old value. The NEW command puts the
-   target ISV in control for error handling. When the program QUITs from the
-   invocation level where the NEW occurred, GT.M restores the value
-   previously stacked by the NEW. NEW $ZTRAP provides nesting of $ZTRAP.
-   Because $ZTRAP="" terminates the image when an error occurs, SET $ZTRAP=
-   generally follows immediately after NEW $ZTRAP. You may use this technique
-   to construct error handling strategies corresponding to the nesting of
-   your programs. If the environment variable gtm_ztrap_new evaluates to
-   boolean TRUE (case insensitive string "TRUE", or case insensitive string
-   "YES", or a non-zero number), $ZTRAP is NEWed when $ZTRAP is SET;
-   otherwise $ZTRAP is not stacked when it is SET.
+   $ZTRAP causes GT.M to stack the current $ZTRAP value, and set its value to
+   the empty string ($ZTRAP=""). The NEW command puts the $ZTRAP in control
+   for error handling. When the program QUITs from the invocation level where
+   the NEW occurred, GT.M restores the value previously stacked by the NEW.
+   NEW $ZTRAP provides nesting of $ZTRAP. Because $ZTRAP="" terminates the
+   image when an error occurs, SET $ZTRAP= generally follows immediately
+   after NEW $ZTRAP. You may use this technique to construct error handling
+   strategies corresponding to the nesting of your programs. If the
+   environment variable gtm_ztrap_new evaluates to boolean TRUE (case
+   insensitive string "TRUE", or case insensitive string "YES", or a non-zero
+   number), $ZTRAP is NEWed when $ZTRAP is SET; otherwise $ZTRAP is not
+   stacked when it is SET.
 
    **Note**
 
@@ -12396,8 +12587,7 @@
    action specified by $ZTRAP results in another run-time error before
    changing the value of $ZTRAP, GT.M invokes $ZTRAP until it exhausts the
    process stack space, terminating the image. Carefully debug exception
-   handling. For more information on error handling, refer "Error
-   Processing".
+   handling.
 
    Example:
 
@@ -12411,12 +12601,12 @@
 
    The four settings of gtm_ztrap_form are:
 
-     * code - If gtm_ztrap_form evaluates to "code" (or a value that is not
+     o code - If gtm_ztrap_form evaluates to "code" (or a value that is not
        one of the subsequently described values), then GT.M treats $ZTRAP as
        code and handles it as previously described in the documentation.
-     * entryref - If gtm_ztrap_form evaluates to "entryref" then GT.M treats
+     o entryref - If gtm_ztrap_form evaluates to "entryref" then GT.M treats
        it as an entryref argument to an implicit GOTO command.
-     * adaptive - If gtm_ztrap_form evaluates to "adaptive" then if $ZTRAP
+     o adaptive - If gtm_ztrap_form evaluates to "adaptive" then if $ZTRAP
        does not compile to valid M code, then $ZTRAP is treated as just
        described for "entryref." Since there is little ambiguity, code and
        entryref forms of $ZTRAP can be intermixed in the same application.
@@ -12428,7 +12618,7 @@
        ZGOTO, or HANG as valid labels, be careful not to use such keywords as
        labels for error handling code in "adaptive" mode.
 
-     * pope[ntryref] / popa[daptive] - If gtm_ztrap_form evaluates to
+     o pope[ntryref] / popa[daptive] - If gtm_ztrap_form evaluates to
        "POPE[NTRYREF]" or "POPA[DAPTIVE]" (case insensitive) and $ZTRAP value
        is in the form of entryref, GT.M unwinds the M stack from the level at
        which an error occurred to (but not including) the level at which
@@ -12442,7 +12632,8 @@
    **Note**
 
    Like $ZTRAP values, invocation of device EXCEPTION values follow the
-   pattern specified by the current gtm_ztrap_form setting.
+   pattern specified by the current gtm_ztrap_form setting except that there
+   is never any implicit popping with EXCEPTION action.
 
 2 $ZUSedstor
    $ZUSedstor
@@ -12453,6 +12644,15 @@
    the process memory utilization and can help identify storage related
    problems. GT.M does not permit $ZUSEDSTOR to be SET or NEWed.
 
+2 $ZUT
+   $ZUT
+
+   $ZUT (UNIX time or universal time) returns the number of microseconds
+   since January 1, 1970 00:00:00 UTC, which provides a time stamp for
+   directly comparing different timezones. $ZUT accuracy is subject to the
+   precision of the system clock. $ZH[OROLOG] returns 4 comma-separated
+   numbers (for example, "63638,39194,258602,14400").
+
 2 $ZVersion
    $ZVersion
 
@@ -12464,22 +12664,6 @@
      o <product> is always "GT.M".
      o <release> always begins with "V", and has the structure
        V<DB_Format>.<major_release>-<minor_release>[<bug_fix_level>] where:
-
-          o <DB_Format> identifies the block format of GT.M database files
-            compatible with the release. For example, V4, V5, and V6. The
-            <DB_Format> piece in $ZVERSION does not change even when a MUPIP
-            UPRGRADE or MUPIP DOWNGRADE changes the DB Format element in the
-            database fileheader.
-          o <major_release> identifies a release with major enhancements.
-          o <minor_release> identifies minor enhancements to a major release.
-            The classification of major and minor enhancements is at the
-            discretion of FIS.
-          o An optional <bug_fix_level> is an upper-case letter indicating
-            bug fixes but no new enhancements. Note that GT.M is built
-            monolithically and never patched. Even though a bug fix release
-            has only bug fixes, it should be treated as a new GT.M release
-            and installed in a separate directory.
-
      o <OS> is the host operating system name.
      o <architecture> is the hardware architecture for which the release of
        GT.M is compiled. Note that GT.M retains it original names for
@@ -12534,6 +12718,15 @@
    node. For a KILL it shows whether the node had descendants and whether it
    had data.
 
+3 $ZTDElim
+   $ZTDElim
+
+   Within a SET trigger context, $ZTDE[LIM] returns the piece separator, as
+   specified by -delim in the trigger definition. This allows triggers to
+   extract updated pieces defined in $ZTUPDATE without having the piece
+   separator hard coded into the routine. Outside of a SET trigger context,
+   $ZTDELIM is null.
+
 3 $ZTLevel
    $ZTLevel
 
@@ -12998,95 +13191,82 @@
    termination enabled (WRAP) or disabled (NOWRAP).
 
    +------------------------------------------------------------------------+
-   |  Command  | WRAP or | STREAM or VARIABLE format file  |  FIXED format  |
-   |           | NOWRAP  |            behavior             | file behavior  |
-   |-----------+---------+---------------------------------+----------------|
-   | READ      |         | Write the entire argument, but  | Similar to     |
-   | format or | WRAP    | anytime $X is about to exceed   | VARIABLE but   |
-   | WRITE or  |         | WIDTH: insert a <LF> character, | no <LF>        |
-   | WRITE *   |         | set $X to 0, increment $Y       |                |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         | Write up to WIDTH-$X (original  |                |
-   |           |         | $X) characters of the argument, |                |
-   |           |         | update $X;                      |                |
-   |           |         |---------------------------------|                |
-   |           |         |               | VARIABLE        |                |
-   |           |         |               | ($X=WIDTH) :    |                |
-   |           |         |               | Write up to     |                |
-   |           |         | STREAM        | WIDTH-$X        |                |
-   | READ      |         | ($X=WIDTH) :  | characters      |                |
-   | format or |         | Write up to   | unless WIDTH-$X | Same as        |
-   | WRITE or  | NOWRAP  | WIDTH         | equals 65535,   | VARIABLE       |
-   | WRITE *   |         | characters    | in which case   |                |
-   |           |         | unless WIDTH  | write all of    |                |
-   |           |         | equals 65535, | the argument.   |                |
-   |           |         | in which case | Write no more   |                |
-   |           |         | write all of  | output to the   |                |
-   |           |         | the argument. | device until a  |                |
-   |           |         |               | WRITE ! or a    |                |
-   |           |         |               | SET $X makes $X |                |
-   |           |         |               | less than       |                |
-   |           |         |               | WIDTH.          |                |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         |                                 | Write PAD      |
-   | READ or   |         | Write <LF>, set $X to 0,        | bytes to bring |
-   | WRITE !   | either  | increment $Y                    | the current    |
-   |           |         |                                 | record to      |
-   |           |         |                                 | WIDTH          |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         |                                 | Write PAD      |
-   |           |         |                                 | bytes to bring |
-   |           |         |                                 | the current    |
-   | WRITE #   | either  | Write <FF>,<LF>, set $X to 0,   | record to      |
-   |           |         | increment $Y                    | WIDTH, then a  |
-   |           |         |                                 | <FF> followed  |
-   |           |         |                                 | by WIDTH-1 PAD |
-   |           |         |                                 | bytes          |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         |                                 | After a WRITE, |
-   |           |         |                                 | if $X >0,      |
-   |           |         |                                 | perform an     |
-   |           |         |                                 | implicit       |
-   |           |         |                                 | "WRITE !"      |
-   |           |         |                                 | adding PAD     |
-   |           |         |                                 | bytes to       |
-   | CLOSE     | either  | After a WRITE, if $X > 0, Write | create a full  |
-   |           |         | <LF>                            | record. If you |
-   |           |         |                                 | need to avoid  |
-   |           |         |                                 | trailing PAD   |
-   |           |         |                                 | bytes set $X   |
-   |           |         |                                 | to 0 before    |
-   |           |         |                                 | closing a      |
-   |           |         |                                 | FIXED format   |
-   |           |         |                                 | file.          |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         |                                 | Return WIDTH   |
-   |           |         | Return characters up to         | characters; no |
-   |           |         | $X=WIDTH, or until encountering | maintenance of |
-   | READ X    | either  | an <LF> or EOF. If <LF>         | $X and $Y,     |
-   |           |         | encountered, set $X to 0,       | except that    |
-   |           |         | increment $Y                    | EOF increments |
-   |           |         |                                 | $Y             |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         |                                 | Return         |
-   |           |         | Return characters up to the     | MIN(WIDTH,     |
-   |           |         | first of $X=WIDTH or len        | len)           |
-   | READ      |         | characters, or encountering a   | characters; no |
-   | X#len     | either  | <LF> or EOF; if up to len       | maintenance of |
-   |           |         | characters or EOF update $X,    | $X and $Y,     |
-   |           |         | otherwise set $X to 0 and       | except that    |
-   |           |         | increment $Y                    | EOF increments |
-   |           |         |                                 | $Y             |
-   |-----------+---------+---------------------------------+----------------|
-   |           |         |                                 | Return the     |
-   |           |         |                                 | code for one   |
-   |           |         | Return the code for one         | character, if  |
-   |           |         | character and increment $X, if  | EOF return -1; |
-   | READ *X   | either  | WIDTH=$X or <LF> encountered,   | no maintenance |
-   |           |         | set $X=0, increment $Y; if EOF  | of $X and $Y,  |
-   |           |         | return -1                       | except that    |
-   |           |         |                                 | EOF increments |
-   |           |         |                                 | $Y             |
+   |  Command  | WRAP or | STREAM or VARIABLE format file |  FIXED format   |
+   |           | NOWRAP  |            behavior            |  file behavior  |
+   |-----------+---------+--------------------------------+-----------------|
+   | READ      |         | Write the entire argument, but |                 |
+   | format or |         | anytime $X is about to exceed  | Similar to      |
+   | WRITE or  | WRAP    | WIDTH: insert a <LF>           | VARIABLE but no |
+   | WRITE *   |         | character, set $X to 0,        | <LF>            |
+   |           |         | increment $Y                   |                 |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         | Update $X based on STREAM or   |                 |
+   |           |         | VARIABLE format as described   |                 |
+   |           |         | below                          |                 |
+   |           |         |--------------------------------|                 |
+   |           |         | STREAM: Write | VARIABLE       |                 |
+   |           |         | all of the    | ($X=WIDTH):    |                 |
+   | READ      |         | argument with | Write up to    |                 |
+   | format or | NOWRAP  | no truncation | WIDTH-$X       | Same as         |
+   | WRITE or  |         | nor with a    | characters.    | VARIABLE        |
+   | WRITE *   |         | line          | Write no more  |                 |
+   |           |         | terminator    | output to the  |                 |
+   |           |         | being         | device until a |                 |
+   |           |         | inserted. Add | WRITE ! or a   |                 |
+   |           |         | length of     | SET $X makes   |                 |
+   |           |         | argument to   | $X less than   |                 |
+   |           |         | $X.           | WIDTH.         |                 |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         |                                | Write PAD bytes |
+   | READ or   | either  | Write <LF>, set $X to 0,       | to bring the    |
+   | WRITE !   |         | increment $Y                   | current record  |
+   |           |         |                                | to WIDTH        |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         |                                | Write PAD bytes |
+   |           |         |                                | to bring the    |
+   |           |         | Write <FF>,<LF>, set $X to 0,  | current record  |
+   | WRITE #   | either  | increment $Y                   | to WIDTH, then  |
+   |           |         |                                | a <FF> followed |
+   |           |         |                                | by WIDTH-1 PAD  |
+   |           |         |                                | bytes           |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         |                                | After a WRITE,  |
+   |           |         |                                | if $X >0,       |
+   |           |         |                                | perform an      |
+   |           |         |                                | implicit "WRITE |
+   |           |         |                                | !" adding PAD   |
+   |           |         | After a WRITE, if $X > 0,      | bytes to create |
+   | CLOSE     | either  | Write <LF>                     | a full record.  |
+   |           |         |                                | If you need to  |
+   |           |         |                                | avoid trailing  |
+   |           |         |                                | PAD bytes set   |
+   |           |         |                                | $X to 0 before  |
+   |           |         |                                | closing a FIXED |
+   |           |         |                                | format file.    |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         | Return characters up to        | Return WIDTH    |
+   |           |         | $X=WIDTH, or until             | characters; no  |
+   | READ X    | either  | encountering an <LF> or EOF.   | maintenance of  |
+   |           |         | If <LF> encountered, set $X to | $X and $Y,      |
+   |           |         | 0, increment $Y                | except that EOF |
+   |           |         |                                | increments $Y   |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         | Return characters up to the    | Return          |
+   |           |         | first of $X=WIDTH or len       | MIN(WIDTH, len) |
+   | READ      |         | characters, or encountering a  | characters; no  |
+   | X#len     | either  | <LF> or EOF; if up to len      | maintenance of  |
+   |           |         | characters or EOF update $X,   | $X and $Y,      |
+   |           |         | otherwise set $X to 0 and      | except that EOF |
+   |           |         | increment $Y                   | increments $Y   |
+   |-----------+---------+--------------------------------+-----------------|
+   |           |         |                                | Return the code |
+   |           |         | Return the code for one        | for one         |
+   |           |         | character and increment $X, if | character, if   |
+   | READ *X   | either  | WIDTH=$X or <LF> encountered,  | EOF return -1;  |
+   |           |         | set $X=0, increment $Y; if EOF | no maintenance  |
+   |           |         | return -1                      | of $X and $Y,   |
+   |           |         |                                | except that EOF |
+   |           |         |                                | increments $Y   |
    +------------------------------------------------------------------------+
 
    **Note**
@@ -13861,7 +14041,7 @@
    can have unlimited associated sockets. The default limit is 64. Set the
    environment variable gtm_max_sockets to the number of maximum associated
    sockets sockets that you wish to set for a GT.M process.
-   $VIEW("MAX_SOCKETS") returns the current value of the maximum number of
+   $VIEW("MAX_SOCKETS")returns the current value of the maximum number of
    associated sockets.
 
    At any time, only one socket from the collection can be the current
@@ -13880,9 +14060,10 @@
 
    **Note**
 
-   The GT.M socket device interface does not have the ability to pass sockets
-   between related or unrelated processes. Currently error trapping operates
-   on a device, rather than on a socket.
+   Exception handler (EXCEPTION) operates at the SOCKET device level and
+   error trapping (IOERROR) operates the socket-level. So, one EXCEPTION
+   operates on all sockets of a SOCKET device and IOEROR can be individually
+   turned on or off for each socket.
 
 3 Message_Management
    Message Management
@@ -13890,7 +14071,7 @@
    From an application perspective, the transport layers used by a socket
    device are stream-oriented, with no provisions for implicit application
    messages. Therefore, the following are two common protocols used to
-   segment application messages.
+   segment application messages..
 
     1. One method is to use a, typically small, fixed length message
        containing the length of the next, variable length, message. In GT.M a
@@ -13911,8 +14092,8 @@
        application message. The protocol breaks if a message ever includes a
        delimiter as part of its content.
 
-   The SOCKET device provides a facility for recognizing delimiters because
-   parsing messages for delimiters is cumbersome.
+   The SOCKET device provides a facility for recognizing delimiters to simply
+   parsing messages.
 
 3 Socket_Read_Operation
    Socket Read Operation
@@ -14063,6 +14244,14 @@
 
    The WRITE command sends data to a socket.
 
+   WRITE ! inserts the character(s) of the first I/O delimiter (if any) to
+   the sending buffer. If "ZFF=expr" has been specified, WRITE # inserts the
+   characters of expr . Otherwise WRITE # has no effect. WRITE ! and WRITE #
+   always maintain $X and $Y in a fashion that emulates a terminal cursor
+   position except when the device is OPENed with a UTF CHSET because the
+   units for $X and $Y for terminals are in display columns while for sockets
+   they are in codepoints.
+
    The WRITE command for SOCKET devices accepts the following
    controlmnemonics:
 
@@ -14074,40 +14263,33 @@
 
    /W[AIT][(timeout)]
 
-   where timeout is a "numexpr" that specifies how long in seconds a server
-   waits for a connection or data to become available on one of the sockets
-   in the current Socket Device.
+   where timeout is anumeric expression that specifies how long in seconds a
+   server waits for a connection or data to become available on one of the
+   sockets in the current Socket Device.
+
+   **Note**
 
-   "WRITE !" inserts the character(s) of the first I/O delimiter (if any) to
-   the sending buffer. If "ZFF=expr" has been specified, "WRITE #" inserts
-   the characters of expr . Otherwise WRITE # has no effect. WRITE ! and
-   WRITE # always maintain $X and $Y in a fashion that emulates a terminal
-   cursor position except when the device is OPENed with a UTF CHSET because
-   the units for $X and $Y for terminals are in display columns while for
-   sockets they are in codepoints.
+   If the current Socket Device is $PRINCIPAL and input and output are
+   different SOCKETs, WRITE /WAIT applies to the input side of the device.
 
    WRITE /PASS([targetpid],[timeout],handle[,handle]...)
 
-   WRIE /PASS allows a GT.M process to send DETACHed TCP or LOCAL sockets
+   WRITE /PASS allows a GT.M process to send DETACHed TCP or LOCAL sockets
    (that is, sockets in the socket pool) to another GT.M process. The
    receiving process should execute WRITE /ACCEPT to receive the socket.
-   WRITE /PASS and WRITE /ACCEPT require a current $IO that is a CONNECTed
-   (notLISTENing), LOCAL domain (not TCP), SOCKET device. GT.M issues
-   CONNSOCKREQ or LOCALSOCKREQ errors, respectively, when those conditions
-   are not met.
 
-     * If a numeric targetpid is specified, GT.M matches the value against
+     o If a numeric targetpid is specified, GT.M matches the value against
        the process id ($JOB) of the process receiving the sockets. GT.M uses
        a system service to perform this check on platforms that support it -
        currently: Linux, AIX, and Solaris. On platforms which do not
        implement the service (HP-UX), GT.M ignores the targetpid. If the pids
        do not match, GT.M issues a PEERPIDMISMATCH error and does not
        transfer the sockets.
-     * If a numeric timeout is specified, GT.M sets $TEST to 1 if the
+     o If a numeric timeout is specified, GT.M sets $TEST to 1 if the
        transfer completes within the specified time, and otherwise sets $TEST
        to 0 and does not transfer any of the sockets.
-     * Each handle specifies the name of a socket in the socket pool.
-     * On a successful transfer, GT.M closes the connection of the sending
+     o Each handle specifies a socket in the socket pool.
+     o On a successful transfer, GT.M eliminates access by the sending
        process to the specified and sent sockets. In any case where the
        transfer does not complete, GT.M retains all the sockets in the socket
        pool of the sender.
@@ -14116,42 +14298,38 @@
 
    WRITE /ACCEPT allows a GT.M process to receive a DETACHed TCP or LOCAL
    sockets (that is, sockets in the socket pool) from another GT.M process .
-   The sending process should execute WRITE /PASS to send the socket. WRITE
-   /PASS and WRITE /ACCEPT require a current $IO that is a CONNECTed
-   (notLISTENing), LOCAL domain (not TCP), SOCKET device. GT.M issues
-   CONNSOCKREQ or LOCALSOCKREQ errors, respectively, when those conditions
-   are not met.
+   The sending process should execute WRITE /PASS to send the socket.
 
-     * lvar is an unsubscripted local variable name (lvn) which must be
+     o lvar is an unsubscripted local variable name (lvn) which must be
        passed by reference indicated with a period (".") prefix. On
        successful completion, the specified unsubscripted lvn contains the
        handles of the received socket, in the order they were sent, delimited
        with a vertical bar ("|"). GT.M places the sockets in the socket pool,
        so the process can ATTACH them to an appropriate SOCKET device for
        subsequent use.
-     * If a numeric sourcepid is specified, GT.M matches the value against
+     o If a numeric sourcepid is specified, GT.M matches the value against
        the process id ($JOB) of the process sending the sockets. On platforms
        which do not implement the service (HP-UX), GT.M ignores the
        targetpid. If the pids do not match, GT.M issues a PEERPIDMISMATCH
        error and does not transfer the sockets.
-     * If a numeric timeout is specified, GT.M sets $TEST to 1 if the
+     o If a numeric timeout is specified, GT.M sets $TEST to 1 if the
        transfer completes within the specified time, and otherwise sets $TEST
        to 0 and does not transfer the sockets.
-     * If any handles are specified, GT.M assigns the provided handle names
-       to the received sockets in the order in which they appear in the WRITE
-       /PASS of the sending process; empty items in the comma delimited
-       handle list act to preserve ordering. Where the list provides no
-       handle, the socket retains the handle provided by the sender. In
-       either case, if there is already a socket with the transfer handle
-       name in the socket pool, GT.M generates a new handle name for the
-       transfer socket. GT.M ignores excess handles specified beyond the
-       number of incoming sockets.
-
-   For both WRITE /PASS and WRITE /ACCEPT, $IO must be a SOCKET device, and
-   the current socket of the device must be CONNECTED(not LISTENING) and
-   LOCAL domain (not TCP).
-
-   SOCKET devices so not support mixing other READs and WRITEs with socket
+     o If any handles are specified, GT.M assigns the provided handles to the
+       received sockets in the order in which they appear in the WRITE /PASS
+       of the sending process; empty items in the comma delimited handle list
+       act to preserve ordering. Where the list provides no handle, the
+       socket retains the handle provided by the sender. In either case, if
+       there is already a socket with the transfer handle in the socket pool,
+       GT.M generates a new handle for the transfer socket. GT.M ignores
+       excess handles specified beyond the number of incoming sockets.
+
+   Both WRITE /PASS and WRITE /ACCEPT require the current $IO to be a SOCKET
+   device with a CONNECTed (not LISTENing) and LOCAL domain (not TCP) current
+   socket. GT.M issues CONNSOCKREQ or LOCALSOCKREQ errors, respectively, when
+   those conditions are not met.
+
+   SOCKET devices do not support mixing other READs and WRITEs with socket
    passing on the same CONNECTED LOCAL socket and produce SOCKPASSDATAMIX
    errors. The application may perform multiple WRITE /PASS and WRITE /ACCEPT
    operations in either direction on the socket before issuing a CLOSE.
@@ -14167,66 +14345,22 @@
 
    SOCKET devices support encrypt connections with TLS using an encryption
    plugin. GT.M ships with a reference implementation of the plugin which
-   uses OpenSSL and also supports TLS of replication stream. OpenSSL options
-   are controlled by a configuration file. The WRITE /TLS command activates
-   this feature for connected sockets. Because this functionality has a wide
-   variety of user stories (use cases) and has substantial complexity,
-   although the code appears robust, we are not confident that we have
-   exercised a sufficient breadth of use cases in testing. Also we may make
-   changes in future releases that are not entirely backwards compatible. We
-   encourage you to use with this facility in development and testing, and to
-   provide us with feedback. If you are an FIS customer and wish to use this
-   in production, please contact us beforehand to discuss your use case(s).
-
-     * option is "server" or "client" indicating which TLS role to assume or
-       "renegotiate" which is used by a server to request a new handshake to
-       reevaluate the client credentials. The server role requires a
-       certificate specified in the configuration file section with the label
-       matching tlsid. The client role may require a certificate depending on
-       the OpenSSL options. If the argument specifies a timeout, GT.M sets
-       $TEST to 1 if the command successfully completed or to 0 if it timed
-       out. $DEVICE provides status information in case of an error. ZSHOW
-       "D" includes "TLS" in the second line of the output for an encrypted
-       socket.
-     * Note that SOCKET device actions may produce the following errors:
+   uses OpenSSL; the reference implementation also supports TLS for GT.M
+   replication streams. OpenSSL options are controlled by a configuration
+   file. The WRITE /TLS command activates this feature for connected sockets.
+
+     o option is "server" or "client" indicating which TLS role to assume.
+       The server role requires a certificate specified in the configuration
+       file section with the label matching tlsid. The client role may
+       require a certificate depending on the OpenSSL options. If the
+       argument specifies a timeout, GT.M sets $TEST to 1 if the command
+       successfully completed or to 0 if it timed out. $DEVICE provides
+       status information in case of an error. ZSHOW "D" includes "TLS" in
+       the second line of the output for an encrypted socket.
+     o Note that SOCKET device actions may produce the following errors:
        TLSDLLOPEN, TLSINIT, TLSCONVSOCK, TLSHANDSHAKE, TLSCONNINFO,
        TLSIOERROR, and TLSRENEGOTIATE.
 
-   The TLS plugin uses OpenSSL options in the configuration file specified
-   under the tls: label as the default for all TLS connections and under the
-   specific labels to override the defaults for corresponding connections.
-   GT.M recognizes the following for both sockets:
-
-     * The cipher-list option specifies which cryptographic algorithms to
-       use. The format of this option is described by the OpenSSL ciphers man
-       page. An empty string uses a default value of
-       "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH" for replication connections and
-       the OpenSSL default cipher list for socket connections.
-     * The ssl_options, documented in the man page for SSL_set_options,
-       modify the default behavior of OpenSSL. When specifying multiple
-       options, separate them with acolons (:) delimiter. The ssl-options
-       specified in a labeled section add to, or override, those specified at
-       the "tls" level. An exclamation mark ("!") preceding an option in a
-       labeled section disables any default for that option specified at the
-       tls: level; for example:
-
-       tls: {
-        ssl-options: "SSL_OP_CIPHER_SERVER_PREFERENCE";
-        mylabel: {
-        ssl-options: "!SSL_OP_CIPHER_SERVER_PREFERENCE";
-        };
-        }
-
-     * The verify-mode option specifies how OpenSSL verifies certificates. If
-       no verify-mode is specified, a socket connection defaults to
-       SSL_VERIFY_NONE. We have tested with SSL_VERIFY_PEER and
-       SSL_VERIFY_NONE See the man page for SSL_set_verify for details.
-       SSL_VERIFY_PEER has two additional flags which modify verification
-       only for the server role; when adding them to the option string, use
-       the colon (:) delimiter.
-     * A verify-depth option specified in a labeled section applies to
-       connections associated with that section.
-
    When placing the private key for a certificate at the beginning of the
    certificate file, you may omit the "key" item from the configuration file.
    The format of the combined file is:
@@ -14249,13 +14383,6 @@
    Each socket may be in one of the following states (observable through
    $KEY):
 
-     * CREATEindicates that the socket exists.
-     * ESTABLISHEDAfter a successful OPEN or USE with the CONNECT device
-       parameter or when GT.M was started with a socket as the $PRINCIPAL
-       device.
-     * LISTENINGindicates that the OPEN or USE with the LISTEN
-       deviceparameter was successful and a listen queue was established.
-
    A listening socket used for accepting new connections goes through these
    three states in one step with a single OPEN or USE. When a server does a
    WRITE /WAIT, a client can establish a connection which creates a new
@@ -14280,68 +14407,82 @@
    |-----------------+---------+--------------------------------------------|
    | EXCEPTION=expr  | O/U/C   | Controls device-specific error handling.   |
    |-----------------+---------+--------------------------------------------|
-   |                 |         | If $LENGTH(expr) and ("Tt"[$EXTRACT(expr)) |
-   | IOERROR=expr    | O/U     | then Error Trapping is enabled; otherwise  |
-   |                 |         | the application must check $DEVICE for     |
-   |                 |         | errors.                                    |
+   |                 |         | use [NO]TRAP as strexpr                    |
+   |                 |         |                                            |
+   | IOERROR=strexpr | O/U     | If $LENGTH(strexpr) and                    |
+   |                 |         | ("Tt"[$EXTRACT(strexpr)) then Error        |
+   |                 |         | Trapping is enabled; otherwise the         |
+   |                 |         | application must check $DEVICE for errors. |
    +------------------------------------------------------------------------+
 
    +------------------------------------------------------------------------+
    |                        Format Deviceparameters                         |
    |------------------------------------------------------------------------|
-   |  DEVICEPARAMETER   | COMMAND |                 COMMENT                 |
-   |--------------------+---------+-----------------------------------------|
-   | [NO]DELIMITER=expr | O/U     | Specifies socket delimiter(s).          |
-   |--------------------+---------+-----------------------------------------|
-   | [NO]FILTER=expr    | U       | Specifies character filtering for       |
-   |                    |         | socket output.                          |
-   |--------------------+---------+-----------------------------------------|
-   | LENGTH=expr, or    |         | Sets virtual page length for socket     |
-   |                    | U       | device.                                 |
-   | ZLENGTH=expr       |         |                                         |
-   |--------------------+---------+-----------------------------------------|
-   | ICHSET=expr        | O/U/C   | Specifies input character set           |
-   |--------------------+---------+-----------------------------------------|
-   | OCHSET=expr        | O/U/C   | Specifies output character set          |
-   |--------------------+---------+-----------------------------------------|
-   | [Z][NO]WRAP        | O/U     | Controls handling of records longer     |
-   |                    |         | than the device width.                  |
-   |--------------------+---------+-----------------------------------------|
-   | [Z]WIDTH=expr      | U       | Controls the maximum length of an       |
-   |                    |         | output message.                         |
-   |--------------------+---------+-----------------------------------------|
-   | Z[NO]FF=expr       | O/U     | Controls whether and what characters to |
-   |                    |         | send in response to a WRITE #.          |
+   |     DEVICEPARAMETER     | COMMAND |              COMMENT               |
+   |-------------------------+---------+------------------------------------|
+   |                         |         | strexpr specifies socket           |
+   | [NO]DELIMITER[=strexpr] | O/U     | delimiter(s); use a colon (:) to   |
+   |                         |         | separate a list.                   |
+   |-------------------------+---------+------------------------------------|
+   | [NO]FILTER[=strexpr]    | U       | strexpr specifies character        |
+   |                         |         | filtering for socket output.       |
+   |-------------------------+---------+------------------------------------|
+   | LENGTH=intexpr or       |         | Sets virtual page length for       |
+   |                         | U       | socket device.                     |
+   | ZLENGTH=intexpr         |         |                                    |
+   |-------------------------+---------+------------------------------------|
+   | ICHSET=strexpr          | O/U/C   | strexpr specifies input character  |
+   |                         |         | set                                |
+   |-------------------------+---------+------------------------------------|
+   | OCHSET=strexpr          | O/U/C   | strexpr specifies output character |
+   |                         |         | set                                |
+   |-------------------------+---------+------------------------------------|
+   | [NO]WRAP                | O/U     | Controls handling of records       |
+   |                         |         | longer than the device width.      |
+   |-------------------------+---------+------------------------------------|
+   | WIDTH=intexpr           | U       | Controls the maximum length of an  |
+   |                         |         | output message.                    |
+   |-------------------------+---------+------------------------------------|
+   |                         |         | Controls whether and what          |
+   | Z[NO]FF[=strexpr]       | O/U     | characters to send in response to  |
+   |                         |         | a WRITE #.                         |
    +------------------------------------------------------------------------+
 
    +------------------------------------------------------------------------+
    |            Socket Establishment/Disconnect Deviceparameters            |
    |------------------------------------------------------------------------|
-   | DEVICEPARAMETER | COMMAND |                  COMMENT                   |
-   |-----------------+---------+--------------------------------------------|
-   | CONNECT=expr    | O/U     | expr specifies protocol, and protocol      |
-   |                 |         | specific information                       |
-   |-----------------+---------+--------------------------------------------|
-   | LISTEN=expr     | O/U     | Similar to CONNECT but binds the socket    |
-   |                 |         | for subsequent /LISTEN and /WAIT           |
+   |  DEVICEPARAMETER  | COMMAND |                 COMMENT                  |
+   |-------------------+---------+------------------------------------------|
+   | CONNECT=strexpr   | O/U     | strexpr specifies protocol, and protocol |
+   |                   |         | specific information                     |
+   |-------------------+---------+------------------------------------------|
+   | LISTEN=strexpr    | O/U     | Similar to CONNECT but binds the socket  |
+   |                   |         | for subsequent /LISTEN and /WAIT         |
+   |-------------------+---------+------------------------------------------|
+   | ZBUFSIZE=intexpr  | O/U     | Allocates a buffer used by GT.M when     |
+   |                   |         | reading from a socket.                   |
+   |-------------------+---------+------------------------------------------|
+   | ZIBUFSIZE=intexpr | O/U     | Sets the buffer size used by the network |
+   |                   |         | software (setsockopt SO_RCVBUF).         |
    +------------------------------------------------------------------------+
 
 3 Socket_Device_Examples
    Socket Device Examples
 
-   sockexamplemulti3.m demonstrates a use of $KEY and $ZKEY in a basic socket
-   I/O setup. It launches two jobs: a server process which opens a listening
-   socket and a client process which makes five connections to the server.
-   The server sends a message to each connection socket. Even-numbered client
-   sockets read the message partially but do not send a response back to the
-   server. Odd-numbered client sockets receive the full message and respond
-   to the server with the message "Ok.". The server reads two characters (but
-   the client sends three) and $ZKEY shows sockets with unread
-   characters.Please click Download sockexamplemulti3.m to download the
-   sockexamplemulti3.m program and follow instructions in the comments near
-   the top of the program file. You can also download sockexamplemulti3.m
-   from
-   http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/sockexamplemulti3.m.
+   The sockexamplemulti31.m routine shows the use of $KEY and $ZKEY in a
+   basic socket I/O setup. It's functionality is atypical in order to
+   demonstrate a number of features. It launches two jobs: a server process
+   which opens a listening socket and a client process which makes five
+   connections to the server. The server sends a message to each connection
+   socket. Even-numbered client sockets read the message partially but do not
+   send a response back to the server. Odd-numbered client sockets receive
+   the full message and respond to the server with the message "Ok.". The
+   server reads two characters (but the client sends three) and $ZKEY shows
+   sockets with unread characters.Please click Download sockexamplemulti31.m
+   to download the sockexamplemulti31.m program and follow instructions in
+   the comments near the top of the program file. You can also download
+   sockexamplemulti31.m from
+   http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/sockexamplemulti31.m.
 
    You can start a GT.M process in response to a connection request made
    using inetd/xinetd. The following example uses inetd/xinetd to implement a
@@ -14349,7 +14490,7 @@
    example.
 
    In the configuration file for xinetd, define a new service called
-   gtmserver. Set socket_type to "stream" and wait should be "no" as in the
+   gtmserver. Set socket_type to "stream" and wait to "no" as in the
    following snippet:
 
    service gtmserver
@@ -14367,21 +14508,21 @@
    not needed. For more information, the xinetd.conf man page for more
    details.
 
-   If you are using inetd, a line should be added to /etc/inetd.conf with the
-   sockettype "stream", protocol "tcp", and the "nowait" flag should be
-   specified as in the example below, which assumes a gtmserver service is
-   defined in /etc/services:
+   If you are using inetd, add a line to /etc/inetd.conf with the sockettype
+   "stream", protocol "tcp", and specify the "nowait" flag as in the example
+   below, which assumes a gtmserver service is defined in /etc/services:
 
    gtmserver stream tcp nowait gtmuser /path/to/startgtm
 
-   In both of the above examples, "gtmuser" is the name of the user the
-   service gtmserver should be run as, and "/path/to/startgtm" is the name of
-   a script which defines some environment variables needed by GT.M before
-   starting it. Please check the man page for inetd.conf on your system since
-   the details may be slightly different.
+   In both of the above examples, "gtmuser" is the name of the user to own
+   and run the gtmserver service, and "/path/to/startgtm" is the name of a
+   script which defines some environment variables needed before invoking
+   GT.M. Please check the man page for inetd.conf on your system as the
+   details may be slightly different.
 
-   The minimum variables are $gtm_dist which should specify the directory
-   containing the GT.M distribution and $gtmroutines. As an example:
+   The minimum variables are: $gtm_dist, which specifies the directory
+   containing the GT.M distribution, and $gtmroutines, which specifies the
+   paths used to locate the GT.M routines. As an example:
 
    #!/bin/bash
    cd /path/to/workarea
@@ -14390,10 +14531,11 @@
    export gtmgbldir=/var/myApp/g/mumps.dat
    $gtm_dist/mumps -r start^server
 
-   When start^server begins, the $PRINCIPAL device will already be connected
-   and $KEY will contain "ESTABLISHED|socket_handle|remote_ip_address". In
-   most cases, a USE should be executed to set various device parameters such
-   as delimiters.
+   When start^server begins, the $PRINCIPAL device is the current device
+   connected a socket and $KEY contains
+   "ESTABLISHED|socket_handle|remote_ip_address". In most cases, a USE
+   command near the beginning of the routine sets various device parameters
+   such as delimiters.
 
    The ZSHOW "D" command reports available information on both the local and
    remote sides of a TCP socket including local and remove addresses and
@@ -14445,14 +14587,25 @@
    supplied on the OPEN take their default values. When reOPENing a device
    that it previously closed, a GT.M process restores all characteristics not
    specified on the OPEN to the values the device had when it was last
-   CLOSEd, except with SD, FIFO, and PIPE. If you have a menu-driven
-   application that OPENs and CLOSEs devices based on user selections, take
-   care that every OPEN explicitly includes all deviceparameters important to
-   the application.
-
-   GT.M treats sequential disk files differently and uses defaults for
-   unspecified sequential disk file characteristics on every OPEN (i.e., GT.M
-   does not retain sequential disk file characteristics on a CLOSE).
+   CLOSEd, except with SD, FIFO, and PIPE. GT.M treats sequential disk files
+   differently and uses defaults for unspecified sequential disk file
+   characteristics on every OPEN; in other words, by default CLOSE of a
+   sequential disk file acts as if DESTROY were specified and it requires an
+   explicit NODESTROY to retain sequential disk file characteristics on a
+   CLOSE.
+
+   For a sequential disk device CLOSEd with the NODESTROY deviceparameter, a
+   subsequent OPEN of the device with no deviceparameters restores the device
+   state including its file position; or to the file position specified by a
+   SEEK deviceparameter. Note that when $ZCHSET specifies a UTF character set
+   in FIXED format, the device must have done at least one READ prior to its
+   close. An OPEN with additional deviceparameters positions the device to
+   the beginning of the file or to the end of file if APPEND is specified.
+   Any SEEK specified as a deviceparameter is then applied.
+
+   If you have a menu-driven application that OPENs and CLOSEs devices based
+   on user selections, take care that every OPEN explicitly includes all
+   deviceparameters important to the application.
 
    If a process OPENs an already OPEN device, GT.M modifies any
    characteristics that accept changes when a device is OPEN to reflect any
@@ -14623,23 +14776,54 @@
    Defines an error handler for an I/O device. The expression must contain a
    fragment of GT.M code (for example, GOTO ERRFILE) that GT.M XECUTEs when
    GT.M detects an error, or an entryref to which GT.M transfers control, as
-   appropriate for the current gtm_ztrap_form.
+   appropriate for the current gtm_ztrap_form, setting except that there is
+   never any implicit popping with EXCEPTION action.
 
    A device EXCEPTION gets control after a non-fatal device error and
    $ETRAP/$ZTRAP get control after other non-fatal errors.
 
-   For more information on error handling, refer to Chapter 13: "Err
-   Processing".
-
    Example:
 
-   open file:(EXCEPTION="s err=""open"" do error")
+   GTM>do ^FREAD
+   FREAD;
+    zprint ^FREAD
+    read "File > ",sd
+    set retry=0
+    set $ztrap="BADAGAIN"
+    open sd:(readonly:exception="do BADOPEN")
+    use sd:exception="goto EOF"
+    for  use sd read x use $principal write x,!
+   EOF;
+    if '$zeof zmessage +$zstatus
+    close sd
+    quit
+   BADOPEN;
+    set retry=retry+1
+    if retry=2 open sd
+    if retry=4 halt
+    if $piece($zstatus,",",1)=2 do
+    . write !,"The file ",sd," does not exist. Retrying in about 2 seconds ..."
+    . hang 2.1
+    . quit
+    if $piece($zstatus,",",1)=13 do
+    . write !,"The file ",sd," is not accessible. Retrying in about 3 seconds ..."
+    . hang 3.1
+    . quit
+    quit
+   BADAGAIN;
+    w !,"BADAGAIN",!
 
-   This example sets the following code to XECUTE when there is an error
-   while opening the file.
+   File >
 
-   set err="open"
-   do error
+   This example asks for the name of the file and displays its contents. It
+   OPENs that file as READONLY and specifies an EXCEPTION. The exception
+   handler for the OPEN deals with file-not-found and file-access errors and
+   retries the OPEN command on error. The first USE sets the EXCEPTION to
+   handle end-of-file. The FOR loop reads the file one record at a time and
+   transfers each record to the principal device. The GOTO in the EXCEPTION
+   terminates the FOR loop. At label EOF, if $ZEOF is false, the code
+   reissues the error that triggered the exception. Otherwise, the CLOSE
+   releases the file.
 
 5 EMPTERM
    EMPTERM
@@ -14755,19 +14939,19 @@
 
    GTM>zprint ^gtmcp
    gtmcp ; Copy a binary file using GT.M
-    new dest,line,max,src
-    if 2>$length($zcmdline," ") write "$gtm_dist/mumps -r source target",!
-    set dest=$piece($zcmdline," ",2)
-    set src=$piece($zcmdline," ",1)
-    set max=1024*1024 ; the maximum GT.M string size
-    open src:(readonly:FIXED:WRAP:CHSET="M") ;
-    open dest:(newversion:FIXED:WRAP:CHSET="M") ; use FIXED format because it does not insert carriage control characters after $X reaches its maximum value.
-    for  use src read line#max quit:$zeof  use dest write line
-    close src
-    use dest
-    set $x=0
-    close dest
-    quit
+     new dest,line,max,src
+     if 2>$length($zcmdline," ") write "$gtm_dist/mumps -r source target",!
+     set dest=$piece($zcmdline," ",2)
+     set src=$piece($zcmdline," ",1)
+     set max=1024*1024 ; the maximum GT.M string size
+     open src:(readonly:FIXED:WRAP:CHSET="M") ;
+     open dest:(newversion:FIXED:WRAP:CHSET="M") ; use FIXED format because it does not insert carriage control characters after $X reaches its maximum value.
+     for  use src read line#max quit:$zeof  use dest write line
+     close src
+     use dest
+     set $x=0
+     close dest
+     quit
 
    This example copies a binary file using GT.M.
 
@@ -14890,6 +15074,129 @@
    This example opens a socket connection and specifies that I/O errors on
    the device raises error conditions.
 
+5 KEY
+   KEY
+
+   Applies to: SD, PIPE, and FIFO
+
+   Specifies information about the key file to use for reading and writing
+   encrypted data. The syntax of the KEY deviceparameter is as follows:
+
+   KEY="key_name [IV]"
+
+   key_name is case-sensitive and must match a key name in the "files"
+   section of the gtmcrypt_config file. The optional IV specifies an
+   initialization vector to use for encryption and decryption.
+
+   To perform encryption and description, GT.M calls an encryption plugin
+   using the GT.M encryption API and can use any library that conforms to the
+   API. The encryption plugin in turn can call user-selected cryptographic
+   libraries for cryptographic functionality. The key name and IV are passed
+   as binary sequences of bytes to the reference implementation plugin.
+   Because GT.M only uses the first space in the deviceparameter to delimit
+   the end of the key, the IV can include any content, including spaces. The
+   GT.M runtime system uses the plugin to pass the IV to the cryptographic
+   libraries used, which use the length of the IV, to determine whether an IV
+   less than the required size it is zero padded, and whether an IV that is
+   longer than the required length generates an error. FIS suggests using
+   $ZCHAR() in preference to $CHAR() when building IV byte sequences, and to
+   make sure that IV sequences are not unintentionally subjected to numeric
+   conversion.
+
+   A USE command with a KEY/IKEY/OKEY deviceparameter that attempts to change
+   the cipher key or IV, including disabling encryption (by specifying an
+   empty key), only succeeds prior to the first WRITE or READ, or after the
+   encryption or decryption state has been reset, such as after a REWIND
+   (only for READ) or a TRUNCATE at the start of a file (for both READ and
+   WRITE).
+
+   Separate IKEY and OKEY deviceparameters allow different keys for READ from
+   and WRITE to a device; for example, when a GT.M process is an element of a
+   UNIX pipe. Because encryption ciphers use state machines (which are
+   initialized with the IV at the beginning of the file), GT.M permits READ
+   and WRITE operations only either starting at the beginning of a file, or
+   at the position at which the last READ or WRITE operation completed. In
+   particular, non-empty files cannot be opened in APPEND mode; the SEEK
+   deviceparameter is prohibited; and the TRUNCATE is only permitted at the
+   beginning of a file or at the end, the former deleting the contents, and
+   the latter effectively a no-op.
+
+   **Note**
+
+   Encrypted files must be written and read sequentially from the beginning
+   (including the Byte Order Marker for UTF files); GT.M supports READ and
+   WRITE operations at arbitrary locations in a file only for unencrypted
+   files.
+
+   Example:
+
+   The basic steps to use a key and IV to create an encrypted file and
+   decrypt its data in a testing environment are as follows. These steps are
+   solely for demonstration purposes. You must understand and appropriately
+   adjust the steps before using them in a production environment. For
+   example, in a production environment you should keep the key files in a
+   secure location, protected with appropriate permissions from unauthorized
+   access (such as 0500 for directories and 0400 for individual files). File
+   encryption is just one of many components of a comprehensive security
+   plan.
+
+   export LD_LIBRARY_PATH=/usr/local/lib
+   export GNUPGHOME=$PWD/mygnupg
+   $gtm_dist/plugin/gtmcrypt/gen_keypair.sh mykeypair at gtm Keymaster
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Sunday.key
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Monday.key
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Tuesday.key
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Wednesday.key
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Thursday.key
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Friday.key
+   $gtm_dist/plugin/gtmcrypt/gen_sym_key.sh 0 Saturday.key
+   echo -n "Enter password for gtm_passwd";export gtm_passwd="`$gtm_dist/plugin/gtmcrypt/maskpass|cut -f 3 -d " "`"
+   export gtmcrypt_config=mygtmcryptfile
+   cat mygtmcryptfile
+    files: {
+    CustomerReportKey1: "Sunday.key";
+    CustomerReportKey2: "Monday.key";
+    CustomerReportKey3: "Tuesday.key";
+    CustomerReportKey4: "Wednesday.key";
+    CustomerReportKey5: "Thursday.key";
+    CustomerReportKey6: "Friday.key";
+    CustomerReportKey7: "Saturday.key";
+   };
+   $gtm_dist/mumps -dir
+   GTM>zprint ^encrfile
+   encrfile
+    set now=$horolog
+    set timestamp=$zdate(now,"YYYYMMDDAM1260SS")
+    set dayofweek=$zdate(now,"DAY","","1,2,3,4,5,6,7")
+    set file="Customers"_timestamp_".log"
+    open file:(newversion:key="CustomerReportKey"_dayofweek_" "_timestamp)
+    use file
+    write "Customer Report - Page 1",!
+    close file
+    write "IV : ",timestamp,!,"Key : CustomerReportKey"_dayofweek
+   GTM>do ^encrfile
+   IV : 20140911AM042419
+   Key : CustomerReportKey5
+   GTM>zprint ^readencrfile
+   readencrfile(key,iv)
+    set file="Customers"_iv_".log"
+    open file:(key=key_" "_iv)
+    use file
+    for read data use $principal write data,! use file quit:$zeof
+    close file
+   GTM>do ^readencrfile("CustomerReportKey5","20140911AM042419")
+   Customer Report - Page 1
+   GTM>
+
+   In this example, the key name is CustomerReportKey followed by the number
+   representing the day of the week, and IV is a timestamp, which is also a
+   part of the file name. Although all reports start with the same string
+   "Customer Report - Page 1", using a different IV for each file ensures
+   that encrypted data begins with a different sequence of bytes, and making
+   that IV a part of the file name ensures that the recipient of a report
+   (who would have access to the key) can easily deduce the IV needed to
+   decrypt the contents.
+
 5 LISTEN
    LISTEN
 
@@ -15004,22 +15311,34 @@
    Example:
 
    GTM>SET file1="mydata.out"
-
    GTM>SET expr="UTF-16LE"
-
    GTM>OPEN file1:(ochset=expr)
-
    GTM>SET DS=$CHAR($$FUNC^%HD("0905"))_$CHAR($$FUNC^%HD("091A"))
-
    GTM>SET DS=DS_$CHAR($$FUNC^%HD("094D"))_$CHAR($$FUNC^%HD("091B"))_$CHAR($$FUNC^%HD("0940"))
-
    GTM>USE file1 WRITE DS,!
-
    GTM>CLOSE file1
 
    This example opens a new file called mydata.out and writes Devanagari
    characters in the UTF-16LE encoding.
 
+5 OKEY
+   OKEY
+
+   Applies to: SD, PIPE, and FIFO
+
+   OKEY allows the use of a seperate key for WRITE to a device; for example,
+   when a GT.M process is an element of a UNIX pipe. The format of the IKEY
+   deviceparameter is:
+
+   OKEY="key_name [IV]"
+
+   key_name is case-sensitive and must match a key name in the "files"
+   section of the gtmcrypt_config file. The optional IV specifies an
+   initialization vector to use for encryption and decryption.
+
+   For more information, refer to the description of KEY deviceparameter of
+   OPEN or USE.
+
 5 OWNER
    OWNER
 
@@ -15083,15 +15402,15 @@
 
    GTM>do ^padexample
    padexample
-       zprint ^padexample
-       set a="************"
-       set encoding="UTF-8"
-       set filename="bom"_encoding_".txt"
-       open filename:(newversion:fixed:record=8:pad=66:chset=encoding)
-       use filename
-       write a
-       close filename
-       halt
+    zprint ^padexample
+    set a="************"
+    set encoding="UTF-8"
+    set filename="bom"_encoding_".txt"
+    open filename:(newversion:fixed:record=8:pad=66:chset=encoding)
+    use filename
+    write a
+    close filename
+    halt
    $ cat bomUTF-8.txt
    **BB**BB**BB**BB**BB**
    $ od -tcd1 bomUTF-8.txt
@@ -15101,7 +15420,6 @@
             -24  -91  -65  -25 -113  -83   66   66  -25 -119 -103  -27 -127 -100   66   66
    0000040  347  225  231  345  234  250    B    B  345  271  263  345  216  237
             -25 -107 -103  -27 -100  -88   66   66  -27  -71  -77  -27 -114  -97   32   32
-   0000060
 
    In this example, the local variable a is set to a string of three-byte
    characters. PAD=66 sets padding byte value to $CHAR(66)
@@ -15196,82 +15514,82 @@
 
    GTM>zprint ^seekdemo
    seekdemo
-       new x,p
-       set p="seekfixed"
-       open p:(newversion:fixed:recordsize=60)
-       use p
-       ; create file with 9 records of length 60 bytes each
-       ; number from 0 to correspond to record offset
-
-       for i=0:1:8 write $justify(i_" - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-|",60)
-       use p:rewind
-       for i=0:1:8 read x set zk=$zkey use $p write "x= ",x," $zkey= ",zk,! use p
-       close p
-       write !!,"** OPEN with FIXED:RECORDSIZE=60:seek=""5""",!
-       open p:(fixed:recordsize=60:seek="5")
-       use p
-       read x set ZKEY=$zkey
-       ;expect: $ZKEY= 6,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** use with SEEK=""-3""",!
-       use p:seek="-3"
-       read x set ZKEY=$zkey
-       ;expect: $ZKEY= 4,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** use with SEEK=""-1"" to read from the same record.  read x#20 to read a partial record",!
-      use p:seek="-1"
-       read x#20 set ZKEY=$zkey
-       ;expect: $ZKEY= 3,20
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** read x#40 to finish reading the record",!
-       use p
-       read x#40 set ZKEY=$zkey
-       ;expect: $ZKEY= 4,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** CLOSE NODESTROY and reOPEN with no deviceparameters",!
-       close p:nodestroy
-       open p
-       use p
-       read x set ZKEY=$zkey
-       ;expect: $ZKEY= 5,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** CLOSE NODESTROY and reOPEN with SEEK=""+2""",!
-       close p:nodestroy
-       open p:seek="+2"
-       use p
-       read x set ZKEY=$zkey
-       ;expect: $ZKEY= 8,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** CLOSE NODESTROY and reOPEN with M:SEEK=""+3""",!
-       close p:nodestroy
-       open p:(M:seek="+3")
-       use p
-       read x set ZKEY=$zkey
-       ;expect: $ZKEY= 4,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** CLOSE NODESTROY and reOPEN with APPEND:SEEK=""-1""",!
-       close p:nodestroy
-       open p:(append:seek="-1")
-       use p
-       read x set ZKEY=$zkey
-       ;expect: $ZKEY= 9,0
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       close p
-       write !,"** CLOSE DESTROY and OPEN non-fixed with SEEK=""120""  and read 60 bytes",!
-       open p:seek="120"
-       use p
-       read x#60 set ZKEY=$zkey
-       ;expect: $ZKEY= 180
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       write !,"** CLOSE NODESTROY and reOPEN with append:SEEK=""-60""  and read last 60 bytes",!
-       close p:nodestroy
-       open p:(append:seek="-60")
-       use p
-       read x#60 set ZKEY=$zkey
-       ;expect: $ZKEY= 540
-       use $p write "x= ",x," $zkey= ",ZKEY,!
-       close p
-       quit
+     new x,p
+     set p="seekfixed"
+     open p:(newversion:fixed:recordsize=60)
+     use p
+     ; create file with 9 records of length 60 bytes each
+     ; number from 0 to correspond to record offset
+
+     for i=0:1:8 write $justify(i_" - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-|",60)
+     use p:rewind
+     for i=0:1:8 read x set zk=$zkey use $p write "x= ",x," $zkey= ",zk,! use p
+     close p
+     write !!,"** OPEN with FIXED:RECORDSIZE=60:seek=""5""",!
+     open p:(fixed:recordsize=60:seek="5")
+     use p
+     read x set ZKEY=$zkey
+     ;expect: $ZKEY= 6,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** use with SEEK=""-3""",!
+     use p:seek="-3"
+     read x set ZKEY=$zkey
+     ;expect: $ZKEY= 4,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** use with SEEK=""-1"" to read from the same record. read x#20 to read a partial record",!
+     use p:seek="-1"
+     read x#20 set ZKEY=$zkey
+     ;expect: $ZKEY= 3,20
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** read x#40 to finish reading the record",!
+     use p
+     read x#40 set ZKEY=$zkey
+     ;expect: $ZKEY= 4,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** CLOSE NODESTROY and reOPEN with no deviceparameters",!
+     close p:nodestroy
+     open p
+     use p
+     read x set ZKEY=$zkey
+     ;expect: $ZKEY= 5,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** CLOSE NODESTROY and reOPEN with SEEK=""+2""",!
+     close p:nodestroy
+     open p:seek="+2"
+     use p
+     read x set ZKEY=$zkey
+     ;expect: $ZKEY= 8,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** CLOSE NODESTROY and reOPEN with M:SEEK=""+3""",!
+     close p:nodestroy
+     open p:(M:seek="+3")
+     use p
+     read x set ZKEY=$zkey
+     ;expect: $ZKEY= 4,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** CLOSE NODESTROY and reOPEN with APPEND:SEEK=""-1""",!
+     close p:nodestroy
+     open p:(append:seek="-1")
+     use p
+     read x set ZKEY=$zkey
+     ;expect: $ZKEY= 9,0
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     close p
+     write !,"** CLOSE DESTROY and OPEN non-fixed with SEEK=""120"" and read 60 bytes",!
+     open p:seek="120"
+     use p
+     read x#60 set ZKEY=$zkey
+     ;expect: $ZKEY= 180
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     write !,"** CLOSE NODESTROY and reOPEN with append:SEEK=""-60"" and read last 60 bytes",!
+     close p:nodestroy
+     open p:(append:seek="-60")
+     use p
+     read x#60 set ZKEY=$zkey
+     ;expect: $ZKEY= 540
+     use $p write "x= ",x," $zkey= ",ZKEY,!
+     close p
+     quit
 
 
 
@@ -15285,36 +15603,25 @@
    x= 6 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 7,0
    x= 7 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 8,0
    x= 8 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 9,0
-
-
    ** OPEN with FIXED:RECORDSIZE=60:seek="5"
    x= 5 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 6,0
-
    ** use with SEEK="-3"
    x= 3 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 4,0
-
-   ** use with SEEK="-1" to read from the same record.  read x#20 to read a partial record
+   ** use with SEEK="-1" to read from the same record. read x#20 to read a partial record
    x= 3 - [-05-|-10-|-15-| $zkey= 3,20
-
    ** read x#40 to finish reading the record
    x= -20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 4,0
-
    ** CLOSE NODESTROY and reOPEN with no deviceparameters
    x= 4 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 5,0
-
    ** CLOSE NODESTROY and reOPEN with SEEK="+2"
    x= 7 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 8,0
-
    ** CLOSE NODESTROY and reOPEN with M:SEEK="+3"
    x= 3 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 4,0
-
    ** CLOSE NODESTROY and reOPEN with APPEND:SEEK="-1"
    x= 8 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 9,0
-
-   ** CLOSE DESTROY and OPEN non-fixed with SEEK="120"  and read 60 bytes
+   ** CLOSE DESTROY and OPEN non-fixed with SEEK="120" and read 60 bytes
    x= 2 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 180
-
-   ** CLOSE NODESTROY and reOPEN with append:SEEK="-60"  and read last 60 bytes
+   ** CLOSE NODESTROY and reOPEN with append:SEEK="-60" and read last 60 bytes
    x= 8 - [-05-|-10-|-15-|-20-|-25-|-30-|-35-|-40-|-45-|-50-|-55-| $zkey= 540
 
    GTM>
@@ -15398,16 +15705,10 @@
    STREAM and VARIABLE are semantically equivalent unless WRAP is disabled.
    As long as records do not exceed the WIDTH, they are also equivalent.
 
-   When WRAP is disabled and a WRITE exceeds the WIDTH, both truncate the
-   line at the WIDTH, however in STREAM format, each WRITE argument truncates
-   after WIDTH characters regardless of whether the cursor exceeds the WIDTH,
-   while in VARIABLE format, no output ever exceeds the WIDTH.
-
-   While each WRITE argument is truncated if it exceeds the WIDTH, the total
-   record can be of arbitrary length. Note that, for efficiency, the compiler
-   combines sequential literal arguments of a single WRITE into a single
-   string so that the run-time system considers the combined length of the
-   sequence.
+   When WRAP is disabled and a WRITE exceeds the WIDTH, VARIABLE format
+   truncates the line at the WIDTH, however in STREAM format, each WRITE
+   argument is output without truncation or line terminator and the total
+   record can be of arbitrary length.
 
    For STREAM or VARIABLE record format files, a READ returns when it
    encounters an EOL, or has read #length characters for a READ #(fixed
@@ -15423,22 +15724,22 @@
    use sd:(width=20:nowrap)
    for i=1:1:10 write " the quick brown fox jumped over the lazy dog ",$x,!
    use sd:(rewind:width=100)
-   for i=1:1 use sd read x quit:$zeof  use $principal write !,i,?5,x
+   for i=1:1 use sd read x quit:$zeof use $principal write !,i,?5,x
    close sd
    quit
 
    The output of this example is as follows:
 
-   1     the quick brown fox20
-   2     the quick brown fox20
-   3     the quick brown fox20
-   4     the quick brown fox20
-   5     the quick brown fox20
-   6     the quick brown fox20
-   7     the quick brown fox20
-   8     the quick brown fox20
-   9     the quick brown fox20
-   10    the quick brown fox20
+   1     the quick brown fox jumped over the lazy dog 46
+   2     the quick brown fox jumped over the lazy dog 46
+   3     the quick brown fox jumped over the lazy dog 46
+   4     the quick brown fox jumped over the lazy dog 46
+   5     the quick brown fox jumped over the lazy dog 46
+   6     the quick brown fox jumped over the lazy dog 46
+   7     the quick brown fox jumped over the lazy dog 46
+   8     the quick brown fox jumped over the lazy dog 46
+   9     the quick brown fox jumped over the lazy dog 46
+   10    the quick brown fox jumped over the lazy dog 46
 
    If you change the FORMAT to VARIABLE, the same example produces the
    following output.
@@ -15461,23 +15762,11 @@
 
    With STREAM, the same example produces the following output:
 
-   1     the quick brown fox20 the quick brown fox42 the quick brown fox64 the quick brown fox86 the quick b
-   2    rown fox108 the quick brown fox131 the quick brown fox154 the quick brown fox177 the quick brown fox
-   3    200 the quick brown fox223
-
-   With STREAM, changing the $X to "abc", the same example produces the
-   following output:
-
-   1     the quick brown fox the quick brown fox the quick brown fox the quick brown fox the quick brown fox
-   2     the quick brown fox the quick brown fox the quick brown fox the quick brown fox the quick brown fox
-   3
-
-   With STREAM, turning the comma between ".. lazy dog" and "abc" into a
-   separate WRITE statement produces:
-
-   1     the quick brown foxabc the quick brown foxabc the quick brown foxabc the quick brown foxabc the qui
-   2    ck brown foxabc the quick brown foxabc the quick brown foxabc the quick brown foxabc the quick brown
-   3     foxabc the quick brown foxabc
+   1     the quick brown fox jumped over the lazy dog 46 the quick brown fox jumped over the lazy dog 94 the
+   2     quick brown fox jumped over the lazy dog 142 the quick brown fox jumped over the lazy dog 191 the q
+   3    uick brown fox jumped over the lazy dog 240 the quick brown fox jumped over the lazy dog 289 the qui
+   4    ck brown fox jumped over the lazy dog 338 the quick brown fox jumped over the lazy dog 387 the quick
+   5     brown fox jumped over the lazy dog 436 the quick brown fox jumped over the lazy dog 485
 
 5 SYSTEM
    SYSTEM
@@ -15708,7 +15997,7 @@
    |----------------------+-----+----+------+------+------+-----|
    | STDERR=expr          |     |    |      | X    |      |     |
    |----------------------+-----+----+------+------+------+-----|
-   | [NO]STREAM           |     | X  |      |      |      |     |
+   | [NO]STREAM           |     | X  | X    | X    |      |     |
    |----------------------+-----+----+------+------+------+-----|
    | SYSTEM=expr          |     | X  | X    |      |      |     |
    |----------------------+-----+----+------+------+------+-----|
@@ -15722,7 +16011,7 @@
    |----------------------+-----+----+------+------+------+-----|
    | [NO]WRITEONLY        |     |    |      | X    |      |     |
    |----------------------+-----+----+------+------+------+-----|
-   | [Z][NO]WRAP          | X   | X  | X    | X    | X    | X   |
+   | [NO]WRAP             | X   | X  | X    | X    | X    | X   |
    |----------------------+-----+----+------+------+------+-----|
    | ZBFSIZE              |     |    |      |      |      | X   |
    |----------------------+-----+----+------+------+------+-----|
@@ -15954,16 +16243,16 @@
    GTM>zshow "D"
    /dev/pts/9 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=80 LENG=24
    seerv OPEN SOCKET TOTAL=1 CURRENT=0
-           SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
-                     ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
+            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
    GTM>set tcp="seerv" o tcp:(listen="6322:TCP":attach="serv2")::"SOCKET"
    GTM>zshow "D"
    /dev/pts/9 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=80 LENG=24
    seerv OPEN SOCKET TOTAL=2 CURRENT=1
-           SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
-                    ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
-           SOCKET[1]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
-                    ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
+            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[1]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
+            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
 
    At this point, the socket device "seerv" has two sockets associated with
    it.
@@ -15974,11 +16263,11 @@
    GTM>use 0 zshow "D"
    /dev/pts/9 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=80 LENG=24
    seerv OPEN SOCKET TOTAL=1 CURRENT=0
-           SOCKET[0]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
-                    ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[0]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
+            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
    socketpool OPEN SOCKET TOTAL=1 CURRENT=0
-           SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
-                    ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
+            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
 
    Notice how socket "serv" is now associated with the pseudo socket device
    "socketpool". Its only purpose is to hold detached sockets.
@@ -15989,13 +16278,13 @@
 
    GTM>zshow "D"
    /dev/pts/9 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=80 LENG=24
-     s2 OPEN SOCKET TOTAL=0 CURRENT=0
+    s2 OPEN SOCKET TOTAL=0 CURRENT=0
    seerv OPEN SOCKET TOTAL=1 CURRENT=0
-          SOCKET[0]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
-                   ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[0]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
+           ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
    socketpool OPEN SOCKET TOTAL=1 CURRENT=0
-          SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
-                   ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+       SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
+           ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
 
    The following command moves the serv socket from the socketpool to the
    tcp2 device.
@@ -16004,11 +16293,11 @@
    GTM>use 0 zshow "D"
    /dev/pts/9 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=80 LENG=24
    s2 OPEN SOCKET TOTAL=1 CURRENT=0
-        SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
-                 ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+      SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
+          ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
    seerv OPEN SOCKET TOTAL=1 CURRENT=0
-        SOCKET[0]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
-                 ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+      SOCKET[0]=serv2 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
+          ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
    socketpool OPEN SOCKET TOTAL=0 CURRENT=-1
 
 5 DOWNSCROLL
@@ -16220,23 +16509,6 @@
 
    By default, HOSTSYNC is disabled.
 
-5 KEY
-   KEY
-
-   Applies to: SD, PIPE, and FIFO
-
-   Specifies information about the key file to use for reading and writing
-   encrypted data. The syntax of the KEY deviceparameter is as follows:
-
-   KEY="key_name [IV]"
-
-   key_name is case-sensitive and must match a key name in the "files"
-   section of the gtmcrypt_config file. The optional IV specifies an
-   initialization vector to use for encryption and decryption.
-
-   For more information and an example, refer to the description of KEY
-   deviceparameter of OPEN.
-
 5 IKEY
    IKEY
 
@@ -16298,6 +16570,23 @@
    This example enables exception handling in socket device sock and
    specifies that all I/O errors on sock raise the error condition.
 
+5 KEY
+   KEY
+
+   Applies to: SD, PIPE, and FIFO
+
+   Specifies information about the key file to use for reading and writing
+   encrypted data. The syntax of the KEY deviceparameter is as follows:
+
+   KEY="key_name [IV]"
+
+   key_name is case-sensitive and must match a key name in the "files"
+   section of the gtmcrypt_config file. The optional IV specifies an
+   initialization vector to use for encryption and decryption.
+
+   For more information and an example, refer to the description of KEY
+   deviceparameter of OPEN.
+
 5 LENGTH
    LENGTH
 
@@ -16320,7 +16609,7 @@
 
    Example:
 
-   use sock:(zwidth=80:znoff:zlength=24)
+   use sock:(width=80:znoff:zlength=24)
 
    This example sets the virtual page length to 24 for socket device sock.
 
@@ -16344,9 +16633,9 @@
    /dev/pts/9 OPEN TERMINAL NOPAST NOESCA NOREADS TYPE WIDTH=80 LENG=24
    seerv OPEN SOCKET TOTAL=2 CURRENT=1
    SOCKET[0]=serv DESC=3 LISTENING PASSIVE NOTRAP PORT=6321
-            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+        ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
    SOCKET[1]=h12185825450 DESC=4 LISTENING PASSIVE NOTRAP PORT=6322
-            ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
+        ZDELAY ZBFSIZE=1024 ZIBFSIZE=87380 NODELIMITER
 
 5 OKEY
    OKEY
@@ -16585,9 +16874,6 @@
    For SD and SOC which support 1MB strings, you can specify WIDTH up to
    1,048,576.
 
-   For non fixed format, always include the line terminator in WIDTH
-   otherwise you get NULL reads after records which are WIDTH wide.
-
    In UTF-8 mode and TRM, SD, and FIFO output, the WIDTH deviceparameter is
    in units of display-columns and is used with $X to control truncation and
    WRAPing for output and maintenance of $X and $Y for input.
@@ -16610,22 +16896,30 @@
 5 WRAP
    WRAP
 
-   [Z][NO]WRAP Applies to: TRM SOC NULL SD FIFO
+   [NO]WRAP Applies to: TRM SOC NULL SD FIFO PIPE
 
-   [Z][NO]WRAP Applies to: Terminals and Printers, FIFO, Socket Device, NULL
+   [NO]WRAP Applies to: Terminals and Printers, FIFO, Socket Device, NULL
    Device, and Sequential Files
 
    Enables or disables automatic record termination. When the current record
    size ($X) reaches the maximum WIDTH and the device has WRAP enabled, GT.M
-   starts a new record, as if the routine had issued a WRITE ! command.
+   starts a new record, as if the routine had issued a WRITE ! command. When
+   reading, WRAP only determines whether $X remains within the range of zero
+   to WIDTH.
 
-   NOWRAP causes GT.M to require a WRITE ! to terminate the record. NOWRAP
-   allows $X to become greater than the device WIDTH for terminals.
+   Note that WRAP is enabled by default for SD, NULL, FIFO, PIPE and SOCKET.
+   For TRM, WRAP is enabled by default if the terminfo variable
+   auto_right_margin (capname "am") is set.
 
-   By default, WIDTH sets WRAP. When WIDTH and NOWRAP appear together on the
-   same USE command, the last one controls the device behavior.
+   NOWRAP causes GT.M to require a WRITE ! to terminate the record. NOWRAP
+   allows $X to become greater than the device WIDTH for terminals and null
+   devices.
 
-   By default, records WRAP.
+   The combination of STREAM and NOWRAP on disk files allows you to write
+   data of arbitrary length without truncation. Without the STREAM option,
+   the WRAP option determines the action taken when the record length exceeds
+   the device WIDTH. NOWRAP causes GT.M to truncate the record, while WRAP
+   causes GT.M to insert a format control character except for FIXED format.
 
    Example:
 
@@ -16831,8 +17125,6 @@
    |---------------------+-----+----+------+------+------+-----|
    | SPACE=intexpr       |     |    |      |      |      |     |
    |---------------------+-----+----+------+------+------+-----|
-   | [NO]STREAM          |     | X  |      |      |      |     |
-   |---------------------+-----+----+------+------+------+-----|
    | TERMINATOR[=expr]   | X   |    |      |      |      |     |
    |---------------------+-----+----+------+------+------+-----|
    | [NO]TRUNCATE        |     | X  |      |      |      |     |
@@ -16845,7 +17137,7 @@
    |---------------------+-----+----+------+------+------+-----|
    | [Z]WIDTH=intexpr    | X   | X  | X    | X    | X    | X   |
    |---------------------+-----+----+------+------+------+-----|
-   | [Z][NO]WRAP         | X   | X  | X    |      | X    | X   |
+   | [NO]WRAP            | X   | X  | X    | X    | X    | X   |
    |---------------------+-----+----+------+------+------+-----|
    | WRITELB=expr        |     |    |      |      |      |     |
    |---------------------+-----+----+------+------+------+-----|
@@ -16982,6 +17274,8 @@
    |--------------------+------+-----+-------|
    | [NO]DELIMITER      | X    | X   |       |
    |--------------------+------+-----+-------|
+   | [NO]DESTROY        |      |     | X     |
+   |--------------------+------+-----+-------|
    | DETACH             |      | X   |       |
    |--------------------+------+-----+-------|
    | DOWNSCROLL         |      | X   |       |
@@ -18443,26 +18737,18 @@
    | gtm_string_t * | N/A       | ["", 1MiB]    | N/A       | ["", 1MiB]    |
    +------------------------------------------------------------------------+
 
-   **Note**s
-
-     o gtm_char_t ** is not supported for call-ins but they are included for
-       IO and O direction usage with call-outs.
-     o For call-out use of gtm_char_t * and gtm_string_t *, the specification
-       in the interface definition for preallocation sets the range for IO
-       and O, with a maximum of 1MiB.
-
 1 Internationalization
    Internationalization
 
    This chapter describes GT.M facilities for applications using characters
-   encoded in other than eight-bit bytes (octets). The underlying software
-   libraries necessary to implement the GT.M internationalization facilities
-   may not be available on your system. Before continuing with the
-   implementation provided in this chapter refer to the product release notes
-   that accompanied your GT.M shipment. These facilities address the specific
-   issues of defining alternative collation sequences, and defining unique
-   patterns for use with the pattern match operator. The details of each
-   facility are described in separate sections of this chapter.
+   encoded in other than eight-bit bytes (octets). Before continuing with use
+   of UTF-8 features, you will need to ensure that your system has installed
+   and configured the needed infrastructure for languages you wish to
+   support, including International Components for Unicode (ICU / libicu),
+   UTF-8 locale(s), and terminal emulators with appropriate fonts. This
+   chapter addresses the specific issues of defining alternative collation
+   sequences, and defining unique patterns for use with the pattern match
+   operator.
 
    Alternative collation sequences (or an alternative ordering of strings)
    can be defined for global and local variable subscripts. They can be
@@ -18540,6 +18826,9 @@
    string length) and does not provide gtm_xc_xform_1 and gtm_xc_xback_1,
    GT.M issues the run-time error GTM-E-COLLARGLONG.
 
+   Note that database key sizes are much more restricted by GT.M than local
+   key sizes, and may be restricted further by user configuration.
+
 3 Environment_Variable
    Environment Variable
 
@@ -18561,8 +18850,10 @@
    stored in the global. This ensures the future integrity of the global's
    collation. If it becomes necessary to change the collation sequence of a
    global containing data, you must copy the data to a temporary repository,
-   modify the variable's collation sequence, and restore the data from the
-   temporary repository.
+   delete the global, modify the variable's collation sequence by
+   reinitializing the global either in a region that has the desired
+   collation or with %GBLDEF, and restore the data from the temporary
+   repository.
 
    Be careful when creating the transformation and inverse transformation
    routines. The transformation routine must unambiguously and reliably
@@ -18579,7 +18870,7 @@
    new global is created.
 
    This default collation sequence is set as a GDE qualifier for the ADD,
-   CHANGE, and TEMPLATE commands using the following syntax:
+   CHANGE, and TEMPLATE commands using the following example with CHANGE:
 
    GDE>CHANGE -REGION DEFAULT -COLLATION_DEFAULT=<0-255>
 
@@ -18664,10 +18955,10 @@
 
      * A value less than 0
      * A value greater than 255
-     * A legal collation sequence that is inaccessible to the shared library
+     * A legal collation sequence that is inaccessible to the process
 
    Inaccessibility could be caused by a missing environment variable, a
-   missing image, or by security denial of access.
+   missing image, or security denial of access.
 
 2 Alternate_Collation
    Alternate Collation
@@ -18689,9 +18980,9 @@
 
    **Note**
 
-   On 64-bit UNIX platforms, gtm_descriptor may grow by up to 8 bytes as a
-   result of compiler padding to meet platform alignment requirements.
-   gtm_descriptor is 4 bytes on 32-bit UNIX platforms.
+   On 64-bit UNIX platforms, gtm_descriptor may grow by up to eight (8)
+   additional bytes as a result of compiler padding to meet platform
+   alignment requirements.
 
    gtm_descript.h defines gtm32_descriptor (used with gtm_xc_xform_1 and
    gtm_xc_xback_2) as:
@@ -18715,10 +19006,10 @@
    gtm_ac_xform_1 or gtm_ac_xform routines transforms subscripts to the
    alternative collation sequence.>
 
-   If the application uses strings use strings longer than 32,767 (but less
-   than 1,048,576) bytes, the alternative collation library must contain the
-   gtm_ac_xform_1 and gtm_ac_xback_1 routines. Otherwise, the alternative
-   collation library should contain gtm_ac_xform and gtm_ac_xback.
+   If the application uses subscripted lvns longer than 32,767 bytes (but
+   less than 1,048,576 bytes), the alternative collation library must contain
+   the gtm_ac_xform_1 and gtm_ac_xback_1 routines. Otherwise, the alternative
+   collation library can contain gtm_ac_xform and gtm_ac_xback.
 
    The syntax of this routine is:
 
@@ -18823,6 +19114,22 @@
      return 0;
    }
 
+4 Transformation_Routine_Characteristics
+   Transformation Routine Characteristics
+
+   The input and output values may contain <NUL> (hex code 00) characters.
+
+   The collation transformation routine may concatenate a sentinel, such as
+   <NUL>, followed by the original subscript on the end of the transformed
+   key. If key length is not an issue, this permits the inverse
+   transformation routine to simply retrieve the original subscript rather
+   than calculating its value based on the transformed key.
+
+   If there are reasons not to append the entire original subscript, GT.M
+   allows you to concatenate a sentinel plus a predefined code so the
+   original subscript can be easily retrieved by the inverse transformation
+   routine, but still assures a reformatted key that is unique.
+
 3 Inverse_Transformation
    Inverse Transformation
 
@@ -18957,12 +19264,12 @@
    %GBLDEF
 
    Use the %GBLDEF utility to get, set, or kill the collation sequence of a
-   global variable mapped by the current global directory. %GBLDEF modifies
-   the collation sequence for neither a global containing data nor a global
-   whose subscripts span multiple regions. To change the collation sequence
-   for a global variable that contains data, extract the data, KILL the
-   variable, change the collation sequence, and reload the data. Use GDE to
-   modify the collation sequence of a global variable that spans regions.
+   global variable mapped by the current global directory. %GBLDEF cannot
+   modify the collation sequence for either a global containing data or a
+   global whose subscripts span multiple regions. To change the collation
+   sequence for a global variable that contains data, extract the data, KILL
+   the variable, change the collation sequence, and reload the data. Use GDE
+   to modify the collation sequence of a global variable that spans regions.
 
 4 Assigning
    Assigning
@@ -18985,26 +19292,14 @@
        example, where 10 collates before 9).
      * The third argument, act, is an integer specifying the active collation
        sequence from 0, standard M collation, to 255.
-
-   **Note**
-
-   set^%GBLDEF(gname) returns global specific characteristics, which can
-   differ from collation characteristics defined for the database file at
-   MUPIP CREATE time from settings in the global directory. Region collation
-   may be seen by using the DSE DUMP -FILEHEADER command, implicitly in the
-   case of M standard collation, as in that case no collation information is
-   displayed.
-
-   If the global contains data, this function returns a FALSE (0) and does
-   not modify the existing collation sequence definition.
-
-   If the global's subscripts span multiple regions, the function returns a
-   false (0). Use the global directory (GBLNAME object in GDE) to set
-   collation characteristics for a global whose subscripts span multiple
-   regions.
-
-   Always execute this function outside of a TSTART/TCOMMIT fence. If $TLEVEL
-   is non-zero, the function returns a false(0).
+     * If the global contains data, this function returns a FALSE (0) and
+       does not modify the existing collation sequence definition.
+     * If the global's subscripts span multiple regions, the function returns
+       a false (0). Use the global directory (GBLNAME object in GDE) to set
+       collation characteristics for a global whose subscripts span multiple
+       regions.
+     * Always execute this function outside of a TSTART/TCOMMIT fence. If
+       $TLEVEL is non-zero, the function returns a false(0).
 
    Example:
 
@@ -19043,11 +19338,18 @@
 
    **Note**
 
+   get^%GBLDEF(gname) returns global specific characteristics, which can
+   differ from collation characteristics defined for the database file at
+   MUPIP CREATE time from settings in the global directory.
+
    A "0" return from $$get^%gbldef(gname[,reg]) indicates that the global has
    no special characteristics and uses the region default collation, while a
    "0,0,0" return indicates that the global is explicitly defined to M
    collation.
 
+   DSE DUMP -FILEHEADER command displays region collation whenever the
+   collation is other than M standard collation.
+
    Example:
 
    GTM>Write $$get^%GBLDEF("^G")
@@ -19073,6 +19375,321 @@
      o Always execute this function outside of a TSTART/TCOMMIT fence. If
        $TLEVEL is non-zero, the function returns a false (0).
 
+3 Example_of_Upper_and_Lower_Case_Alphabetic_Collation_Sequence
+   Example of Upper and Lower Case Alphabetic Collation Sequence
+
+   This example is create an alternate collation sequence that collates upper
+   and lower case alphabetic characters in such a way that the set of keys
+   "du Pont," "Friendly," "le Blanc," and "Madrid" collates as:
+
+     * du Pont
+     * Friendly
+     * le Blanc
+     * Madrid
+
+   This is in contrast to the standard M collation that orders them as:
+
+     * Friendly
+     * Madrid
+     * du Pont
+     * le Blanc
+
+   **Important**
+
+   No claim of copyright is made with respect to the code used in this
+   example. Please do not use the code as-is in a production environment.
+
+   Please ensure that you have a correctly configured GT.M installation,
+   correctly configured environment variables, with appropriate directories
+   and files.
+
+   Seasoned GT.M users may want download polish.c used in this example and
+   proceed directly to Step 5 for compiling and linking instructions. First
+   time users may want to start from Step 1.
+
+    1. Create a new file called polish.c and put the following code:
+
+       #include <stdio.h>
+       #include "gtm_descript.h"
+       #define COLLATION_TABLE_SIZE     256
+       #define MYAPPS_SUBSC2LONG        12345678
+       #define SUCCESS     0
+       #define FAILURE     1
+       #define VERSION     0
+       static unsigned char xform_table[COLLATION_TABLE_SIZE] =
+                 {
+                 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+                 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+                 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+                 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+                 64, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93,
+                 95, 97, 99,101,103,105,107,109,111,113,115,117,118,119,120,121,
+                 122, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94,
+                 96, 98,100,102,104,106,108,110,112,114,116,123,124,125,126,127,
+                 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+                 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+                 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+                 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+                 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+                 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+                 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+                 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+                 };
+       static unsigned char inverse_table[COLLATION_TABLE_SIZE] =
+                 {
+                 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+                 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+                 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+                 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+                 64, 65, 97, 66, 98, 67, 99, 68,100, 69,101, 70,102, 71,103, 72,
+                 104, 73,105, 74,106, 75,107, 76,108, 77,109, 78,110, 79,111, 80,
+                 112, 81,113, 82,114, 83,115, 84,116, 85,117, 86,118, 87,119, 88,
+                 120, 89,121, 90,122, 91, 92, 93, 94, 95, 96,123,124,125,126,127,
+                 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+                 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,
+                 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,
+                 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,
+                 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
+                 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
+                 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
+                 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+                 };
+
+       Elements in xform_table represent input order for transform. Elements
+       in inverse_table represent reverse transform for x_form_table.
+
+    2. Add the following code for the gtm_ac_xform transformation routine:
+
+       long gtm_ac_xform ( gtm_descriptor *src, int level, gtm_descriptor *dst, int *dstlen)
+             {
+                 int n;
+                 unsigned char  *cp, *cpout;
+             #ifdef DEBUG
+                 char input[COLLATION_TABLE_SIZE], output[COLLATION_TABLE_SIZE];
+             #endif
+                 n = src->len;
+                 if ( n > dst->len)
+                    return MYAPPS_SUBSC2LONG;
+                 cp  = (unsigned char *)src->val;
+             #ifdef DEBUG
+                 memcpy(input, cp, src->len);
+                 input[src->len] = '\0';
+             #endif
+                 cpout = (unsigned char *)dst->val;
+                 while ( n-- > 0 )
+                    *cpout++ = xform_table[*cp++];
+                 *cpout = '\0';
+                 *dstlen = src->len;
+             #ifdef DEBUG
+                 memcpy(output, dst->val, dst->len);
+                 output[dst->len] = '\0';
+                 fprintf(stderr, "\nInput = \n");
+                 for (n = 0; n < *dstlen; n++ ) fprintf(stderr," %d ",(int )input[n]);
+                 fprintf(stderr, "\nOutput = \n");
+                 for (n = 0; n < *dstlen; n++ ) fprintf(stderr," %d ",(int )output[n]);
+             #endif
+                 return SUCCESS;
+             }
+          3. Add the following code for the gtm_ac_xback reverse transformation routine:
+             long gtm_ac_xback ( gtm_descriptor *src, int level, gtm_descriptor *dst, int *dstlen)
+             {
+                 int n;
+                 unsigned char  *cp, *cpout;
+             #ifdef DEBUG
+                 char input[256], output[256];
+             #endif
+                 n = src->len;
+                 if ( n > dst->len)
+                 return MYAPPS_SUBSC2LONG;
+                 cp  = (unsigned char *)src->val;
+                 cpout = (unsigned char *)dst->val;
+                 while ( n-- > 0 )
+                    *cpout++ = inverse_table[*cp++];
+                 *cpout = '\0';
+                 *dstlen = src->len;
+             #ifdef DEBUG
+                 memcpy(input, src->val, src->len);
+                 input[src->len] = '\';
+                 memcpy(output, dst->val, dst->len);
+                 output[dst->len] = '\0';
+                 fprintf(stderr, "Input = %s, Output = %s\n",input, output);
+             #endif
+                 return SUCCESS;
+             }
+
+    3. Add code for the version identifier routine (gtm_ac_version) or the
+       verification routine (gtm_ac_verify):
+
+       int gtm_ac_version ()
+             {
+                 return VERSION;
+             }
+             int gtm_ac_verify (unsigned char type, unsigned char ver)
+             {
+                     return !(ver == VERSION);
+             }
+
+    4. Save and compile polish.c. On x86 GNU/Linux (64-bit Ubuntu 10.10),
+       execute a command like the following:
+
+       gcc -c polish.c -I$gtm_dist
+
+   **Note**
+
+       The -I$gtm_dist option includes gtmxc_types.h.
+
+    5. Create a new shared library or add the above routines to an existing
+       one. The following command adds these alternative sequence routines to
+       a shared library called altcoll.so on x86 GNU/Linux (64-bit Ubuntu
+       10.10).
+
+       gcc -o altcoll.so -shared polish.o
+
+    6. Set $gtm_collate_1 to point to the location of altcoll.so.
+    7. At the GTM> prompt execute the following command:
+
+       GTM>Write $SELECT($$set^%GBLDEF("^G",0,1):"OK",1:"FAILED")
+             OK
+
+       This deletes the global variable ^G, then sets ^G to the collation
+       sequence number 1 with numeric subscripts collating before strings.
+
+    8. Assign the following value to ^G.
+
+       GTM>Set ^G("du Pont")=1
+       GTM>Set ^G("Friendly")=1
+       GTM>Set ^G("le Blanc")=1
+       GTM>Set ^G("Madrid")=1
+
+    9. See how the subscript of ^G order according to the alternative
+       collation sequence:
+
+       GTM>ZWRite ^G
+       ^G("du Pont")=1
+       ^G("Friendly")=1
+       ^G("le Blanc")=1
+       ^G("Madrid")=1
+
+3 Example_of_Collating_Alphabets_in_Reverse_Order_using
+   Example of Collating Alphabets in Reverse Order using
+  gtm_ac_xform_1 and gtm_ac_xback_1
+
+   This example creates an alternate collation sequence that collates
+   alphabets in reverse order. This is in contrast to the standard M
+   collation that collates alphabets in ascending order.
+
+   **Important**
+
+   No claim of copyright is made with respect to the code used in this
+   example. Please do not use the code as-is in a production environment.
+
+   Please ensure that you have a correctly configured GT.M installation,
+   correctly configured environment variables, with appropriate directories
+   and files.
+
+    1. Download col_reverse_32.c from
+       http://tinco.pair.com/bhaskar/gtm/doc/books/pg/UNIX_manual/col_reverse_32.c.
+       It contain code for transformation routine (gtm_ac_xform_1), reverse
+       transformation routine (gtm_ac_xback_1) and version control routines
+       (gtm_ac_version and gtm_ac_verify).
+    2. Save and compile col_reverse_32.c. On x86 GNU/Linux (64-bit Ubuntu
+       10.10), execute a command like the following:
+
+       gcc -c col_reverse_32.c -I$gtm_dist
+
+   **Note**
+
+       The -I$gtm_dist option includes gtmxc_types.h.
+
+    3. Create a new shared library or add the routines to an existing one.
+       The following command adds these alternative sequence routines to a
+       shared library called altcoll.so on x86 GNU/Linux (64-bit Ubuntu
+       10.10).
+
+       gcc -o revcol.so -shared col_reverse_32.o
+
+    4. Set the environment variable gtm_collate_2 to point to the location of
+       revcol.so. To set the local variable collation to this alternative
+       collation sequence, set the environment variable gtm_local_collate to
+       2.
+    5. At the GTM prompt, execute the following command:
+
+       GTM>Write $SELECT($$set^%GBLDEF("^E",0,2):"OK",1:"FAILED")
+       OK
+
+    6. Assign the following value to ^E.
+
+       GTM>Set ^E("du Pont")=1
+       GTM>Set ^E("Friendly")=1
+       GTM>Set ^E("le Blanc")=1
+       GTM>Set ^E("Madrid")=1
+
+    7. Notice how the subscript of ^E sort in reverse order:
+
+       GTM>zwrite ^E
+       ^G("le Blanc")=1
+       ^G("du Pont")=1
+       ^G("Madrid")=1
+       ^G("Friendly")=1
+
+2 Implementing_an_Alternative_Collation_Sequence_for_Unicode
+   Implementing an Alternative Collation Sequence for Unicode
+
+   By default, GT.M sorts string subscripts in the default order of the
+   Unicode numeric code-point ($ASCII()) values. Since this implied ordering
+   may or may not be linguistically or culturally correct for a specific
+   application, an implementation of an algorithm such as the Unicode
+   Collation Algorithm (UCA) may be required. Note that implementation of
+   collation in GT.M requires the implementation of two functions, f(x) and
+   g(y). f(x) transforms each input sequence of bytes into an alternative
+   sequence of bytes for storage. Within the GT.M database engine, M nodes
+   are retrieved according to the byte order in which they are stored. For
+   each y that can be generated by f(x), g(y) is an inverse function that
+   provides the original sequence of bytes; in other words, g(f(x)) must be
+   equal to x for all x that the application processes. For example, for the
+   People's Republic of China, it may be appropriate to convert from UTF-8 to
+   Guojia Biaozhun (****), the GB18030 standard, for example, using the
+   libiconv library. The following requirements are important:
+
+     * Unambiguous transformation routines: The transform and its inverse
+       must convert each input string to a unique sequence of bytes for
+       storage, and convert each sequence of bytes stored back to the
+       original string.
+     * Collation sequence for all expected character sequences in subscripts:
+       GT.M does not validate the subscript strings passed to/from the
+       collation routines. If the application design allows illegal UTF-8
+       character sequences to be stored in the database, the collation
+       functions must appropriately transform, and inverse transform, these
+       as well.
+     * Handle different string lengths for before and after transformation:
+       If the lengths of the input string and transformed string differ, and,
+       for local variables, if the output buffer passed by GT.M is not
+       sufficient, follow the procedure described below:
+
+          * Global Collation Routines: The transformed key must not exceed
+            the lesser of the maximum key size configuration or 1019 bytes,
+            the maximum GDS key size. GT.M allocates a temporary buffer of
+            size 1019 bytes in the output string descriptor (of type
+            DSC_K_DTYPE_T) and passes it to the collation routine to return
+            the transformed key.
+          * Local Collation Routines: GT.M allocates a temporary buffer in
+            the output string descriptor based on the size of the input
+            string. Both transformation and inverse transformation must check
+            the buffer size, and if it is not sufficient, the transformation
+            must allocate sufficient memory, set the output descriptor value
+            (val field of the descriptor) to point to the new memory , and
+            return the transformed key successfully. Since GT.M copies the
+            key from the output descriptor into its internal structures, it
+            is important that the memory allocated remain available even
+            after the collation routines return. Collation routines are
+            typically called throughout the process lifetime, therefore, GT.M
+            expects the collation libraries to define a large static buffer
+            sufficient to hold all key sizes in the application.
+            Alternatively, the collation transform can use a large heap
+            buffer (allocated by the system malloc() or GT.M gtm_malloc()).
+            Application developers must choose the method best suited to
+            their needs.
+
 2 Matching_Alternative_Patterns
    Matching Alternative Patterns
 
@@ -19135,17 +19752,17 @@
 
    Be mindful of the following items as you define your patcode table.
 
-     * A table name can only be loaded once during an invocation of GT.M. It
-       cannot be edited and reloaded, while the M process is running.
+     * GT.M loads a table name can only be loaded once during an invocation
+       of a process. Changes a loaded table do not apply to running processes
+       that have already reference that table.
      * The table name "M" is a reserved designation for standard M, which is
        included in the GT.M run-time library.
-     * Standard patcodes A and E cannot be explicitly redefined.
-
-       A is always the union of codes U and L; E always designates the set of
-       all characters.
-
+     * Standard patcodes A and E cannot be explicitly redefined. A is always
+       the union of codes U and L; E always designates the set of all
+       characters.
      * The C pattern code you define is used by GT.M to determine those
-       characters which are to be treated as unprintable.
+       characters which are to be treated as unprintable. All characters not
+       defined as C are treated as printable.
      * In UTF-8 mode, M standard patcodes (A,C,L,U,N,P,E) work with Unicode
        characters. Application developers can neither change their default
        classification nor define the non-standard patcodes
@@ -19153,8 +19770,6 @@
        pattern tables cannot contain characters with codes greater than the
        maximum ASCII code 127.
 
-   All characters not defined as C are treated as printable.
-
 3 Code_Selection
    Code Selection
 
@@ -19251,12 +19866,13 @@
    To understand the compile-time error message format, consider this
    incorrect source line:
 
-   S =B+C
+   S=B+C
 
    If this were line 7 of a source file ADD2.m, the compiler reports the
    compile-time error with the message:
 
-   S =B+C ^-----
+   S=B+C
+       ^-----
    At column 4, line 7, source module ADD2
     Variable expected in this context
 
@@ -19268,8 +19884,8 @@
    .
    .
    6 .  .  .
-   7 S =B+C
-   ^-----
+   7 S=B+C
+       ^-----
     Variable expected in this context
    8 . . .
    .
@@ -19280,7 +19896,7 @@
 
    At compile-time, the compiler stops processing a routine line as soon as
    it detects the first error on that line. By default, the compiler displays
-   the line in error on stderr , and also in a listing file when the compiler
+   the line in error on stderr, and also in a listing file when the compiler
    options include -list. By default, the compiler processes the remaining
    source lines until it exceeds the maximum error count of 127.
 
@@ -19309,9 +19925,9 @@
    To understand the run-time error message format, consider this short
    program printsum.m:
 
-   SET A=17
-   GO SET B=21
-   WRITE A+C
+        SET A=17
+   GO   SET B=21
+        WRITE A+C
 
    When you try to execute this program, the last statement causes an error
    since the variable C is undefined. If $ETRAP="B", GT.M displays the
@@ -19325,8 +19941,8 @@
    GT.M informs you of the error (Undefined local variable) and where in the
    routine the error occurred (GO+1). Note that the run-time system displays
    the GTM> prompt, indicating that the process has entered Direct Mode. GT.M
-   places run time error information in the intrinsic Special Variable $ECODE
-   and $ZSTATUS.
+   places run time error information in the intrinsic special variables
+   $ECODE and $ZSTATUS.
 
    Compile-time error messages may appear at run time. This is because errors
    in indirection and the compile-as-written feature leave errors that are
@@ -19394,7 +20010,7 @@
    GTM>
 
    In Direct Mode, GT.M provides access to the RECALL command. RECALL allows
-   you to retrieve a Direct Mode command line with a minimum of typing. A
+   you to retrieve a Direct Mode command line with a minimum of typing. The
    GT.M line editor allows you to make quick changes or corrections to the
    command line.
 
@@ -19438,7 +20054,7 @@
    |                          | exception condition.                        |
    |--------------------------+---------------------------------------------|
    |                          | Creates a listing file of all the errors    |
-   | MUMPS -list ZLINK        | detected by the compiler. Detects syntax    |
+   | MUMPS -list ZLINK        | detected by the compiler and detects syntax |
    | :"-list"                 | errors. Useful in the process of re-editing |
    |                          | program to correct errors.                  |
    |--------------------------+---------------------------------------------|
@@ -19579,9 +20195,10 @@
 
    After an error occurs, if $ZYERROR is set to a valid entryref that exists
    in the current environment, GT.M invokes the routine at that entryref with
-   an implicit DO before returning control to M code specified by $ZTRAP or
-   device EXCEPTION. It is intended that the code invoked by $ZYERROR use the
-   value of $ZSTATUS to select or construct a value to which it SETs $ZERROR.
+   an implicit DO before returning control to M code specified by a device
+   EXCEPTION, $ETRAP or $ZTRAP. It is intended that the code invoked by
+   $ZYERROR use the value of $ZSTATUS to select or construct a value to which
+   it SETs $ZERROR.
 
    If $ZYERROR is empty, $ZYERROR="unprocessed $ZERROR, see $ZSTATUS".
 
@@ -19601,9 +20218,9 @@
 
    QUIT:$QUIT "" QUIT
 
-   When a value is assigned to $ETRAP, the new value replaces the previous
-   value. The value of $ZTRAP becomes equal to the empty string without being
-   stacked.
+   When SET assigns a value to $ETRAP, the new value replaces the previous
+   value, and if $ZTRAP was not empty (in control), the value of $ZTRAP
+   becomes equal to the empty string without being stacked.
 
 3 Nesting_$ETRAP_and_using_$ESTACK
    Nesting $ETRAP and using $ESTACK
@@ -19619,26 +20236,28 @@
    values to be unstacked, including the one for $ETRAP.
 
    If an error occurs while executing at the current execution level (or at
-   an execution level farther from the initial base stack frame), the code
-   from the current $ETRAP gets executed. Unless there is a GOTO or ZGOTO,
-   when the execution of that code is complete, control reverts to the
-   implicit QUIT command that returns to the calling routine. At this time,
-   any prior value of $ETRAP is reinstated.
-
-   While at the more nested execution level(s), if an error occurs, the code
-   from the current $ETRAP is executed. After the QUIT to a less nested
-   level, the code from the current $ETRAP gets executed. The current $ETRAP
-   may be different from the $ETRAP at the time of the error due to
+   an execution level farther from the initial base stack frame), GT.M
+   executes the code from the current $ETRAP. Unless a GOTO or ZGOTO in
+   $ETRAP or any code it invokes redirects the flow of execution, when the
+   execution of the $ETRAP code completes, control reverts to the implicit
+   QUIT command, which returns to the routine that invoked the code that
+   encountered the error. At this time, the QUIT reinstates any prior value
+   of $ETRAP.
+
+   While at the more nested execution level(s), if an error occurs, GT.M
+   executes the code from the current $ETRAP. After the QUIT to a less nested
+   level, GT.M invokes the code from the now current $ETRAP. The current
+   $ETRAP may be different from the $ETRAP at the time of the error due to
    unstacking. This behavior continues until one of the following possible
    situations occur:
 
      * $ECODE is empty. When the value of $ECODE is equal to the empty
        string, error processing is no longer active, and normal processing
        resumes.
-     * An execution level is reached where the value of $ETRAP is empty
+     * A QUIT reaches an execution level where the value of $ETRAP is empty
        ($ZTRAP might be non-empty at that level). When the values of both
        $ZTRAP and $ETRAP are equal to the empty string, no error trapping is
-       active and the process repeats.
+       active and the QUIT repeats until it unstacks a $ETRAP or $ZTRAP.
      * The stack is reduced to an empty state. When there is no previous
        level left to QUIT into, GT.M returns to the operating system level
        shell. A frame that is in direct mode stops the process by putting the
@@ -19661,16 +20280,17 @@
 
    By default, execution proceeds as if the next instruction to be executed
    were the first one on "the next line", and the code on that next line
-   would be the same as the text in the value of $ZTRAP. Unless there is a
-   GOTO or ZGOTO, after the code in $ZTRAP has been executed, GT.M attempts
-   to execute the line with the error again. When a value is assigned to
-   $ZTRAP, the new value replaces the previous value. If the value of $ETRAP
-   is a non-empty one, $ETRAP is implicitly NEWed, and the value of $ETRAP
-   becomes equal to the empty string; this ensures that at most one of $ETRAP
-   and $ZTRAP is not the empty string. If the environment variable
-   gtm_ztrap_new evaluates to boolean TRUE (case insensitive string "TRUE",
-   or case insensitive string "YES", or a non-zero number), $ZTRAP is NEWed
-   when $ZTRAP is SET; otherwise $ZTRAP is not stacked when it is SET.
+   would be the same as the text in the value of $ZTRAP. Unless $ZTRAP or any
+   code it invokes issues a GOTO or ZGOTO, after GT.M has executed the code
+   in $ZTRAP, GT.M attempts to execute the line with the error again. When a
+   value is assigned to $ZTRAP, the new value replaces the previous value. If
+   the value of $ETRAP is a non-empty one, $ETRAP is implicitly NEWed, and
+   the value of $ETRAP becomes equal to the empty string; this ensures that
+   at most one of $ETRAP and $ZTRAP is not the empty string. If the
+   environment variable gtm_ztrap_new evaluates to Boolean TRUE (case
+   insensitive string "TRUE", or case insensitive string "YES", or a non-zero
+   number), $ZTRAP is NEWed when $ZTRAP is SET; otherwise $ZTRAP is not
+   stacked when it is SET.
 
    Other than the default behavior, $ZTRAP settings are controlled by the
    environment variable gtm_ztrap_form as described in the following table.
@@ -19679,9 +20299,10 @@
    | gtm_ztrap_form |             $ZTRAP and EXCEPTION Behavior             |
    |----------------+-------------------------------------------------------|
    |                | Content is code executed after the error; in the      |
-   | code           | absence of GOTO, ZGOTO, or QUIT, execution resumes at |
-   |                | the beginnig of the line containing the error -       |
-   |                | default behavior                                      |
+   |                | absence of GOTO, ZGOTO, or QUIT, execution resumes at |
+   | code           | the beginning of the line containing the error - note |
+   |                | that the default behavior tends to create an          |
+   |                | indefinite loop.                                      |
    |----------------+-------------------------------------------------------|
    | entryref       | Content is an entryref to which control is            |
    |                | transferred by an implicit GOTO                       |
@@ -19706,8 +20327,9 @@
 
   Note
 
-   Like $ZTRAP values, invocation of device EXCEPTION values follow the
-   pattern specified by the current gtm_ztrap_form setting.
+   Like $ZTRAP values, invocation of device EXCEPTION values, with the
+   exception noted, follow the pattern specified by the current
+   gtm_ztrap_form setting.
 
 3 $ETRAP_and_$ZTRAP
    $ETRAP and $ZTRAP
@@ -19742,24 +20364,24 @@
    avoid unintended interactions, and aware of which conditions may cause a
    switch-over from one mode of error handling to the other.
 
-   Whenever a SET command is executed that assigns a value to either $ZTRAP
-   or $ETRAP, the value of the other error handling variable is examined. If
-   the other value is non-empty, an implicit NEW command is executed that
-   saves the current value of that variable, and then the value of that
-   variable is set to the empty string. After this, the requested assignment
-   is made effective.
+   When a SET command assigns a value to either $ZTRAP or $ETRAP, GT.M
+   examines the value of the other error handling variable. If the other
+   value is non-empty, GT.M executes an implicit NEW command that saves the
+   current value of that variable, and then assigns that variable to the
+   empty string, then makes the requested assignment effective.
 
    For example, re-setting $ETRAP is internally processed as:
 
-   NEW:$LENGTH($ZTRAP) $ZTRAP SET $ETRAP=code
+   NEW:$LENGTH($ZTRAP) $ZTRAP $ETRAP SET $ETRAP=code
 
    Whereas, SET $ZTRAP=value is internally processed as:
 
-   NEW:$LENGTH($ETRAP) $ETRAP SET $ZTRAP=value
+   NEW:$LENGTH($ETRAP) $ETRAP SET:$LENGTH($ETRAP)="" SET $ZTRAP=value
 
-   Note that NEW of $ETRAP or $ZTRAP implicitly sets the value of the empty
-   string after saving the prior value. As a result, at most one of the two
-   error handling machanisms can be effective at any given point in time.
+   Note that, after saving the prior value, GT.M ensures the superseded
+   $ETRAP or $ZTRAP implicitly gets the value of the empty string. As a
+   result, at most one of the two error handling mechanisms can be effective
+   at any given point in time.
 
    If an error handling procedure was invoked through the $ETRAP method, and
    the value of $ECODE is non-empty when QUITing from the level of which the
@@ -19881,6 +20503,66 @@
 1 Triggers
    Triggers
 
+2 Triggers
+   Triggers
+
+   GT.M allows you to set up a trigger mechanism that automatically executes
+   a defined action in response to a database update operation on a matching
+   global node.The trigger mechanism executes a fragment of M code (trigger
+   code) "before" or "as part of" a database update. You can define the
+   specifications of this mechanism in a Trigger Definition File. For a
+   trigger on KILL (and ZKILL), GT.M executes trigger code "before" the KILL
+   operation. For example, a trigger on KILL ^CIF(:,1) might clear old cross
+   references. For a trigger on SET, GT.M executes trigger code "as part of"
+   the SET operation. Within trigger logic, the ISV $ZTOLDVAL provides read
+   access to the value of global node prior to the update and $ZTVALUE
+   provides read/write access to the tentative SET value. This allows you to
+   modify the tentative SET value before GT.M commits it to the database. The
+   term "as part of" means that SET triggers execute intertwined with the SET
+   operation. Although it is not yet committed the database, the tentative
+   new value appears to the process as assigned but the process must SET
+   $ZTVALUE to make any revision to the tentative value, because a SET of the
+   global node would nest the trigger recursively - a pathological condition.
+   GT.M executes SET triggers during a MERGE update where GT.M internally
+   performs a series of SET operations and while performing a $INCREMENT()
+   operation where GT.M internally performs a SET operation.For all triggers,
+   GT.M handles the database update event and the triggered actions as an
+   Atomic (all or nothing) transaction. Because triggers use application code
+   and are always part of an implicit or explicit TP transaction, trigger
+   code must conform to ACID conventions discussed in the TP documentation.
+
+   Triggers meet many application needs including (but not limited to) the
+   following:
+
+    1. Enforce schema-level consistency: Since database schema created in a
+       normal M application are implicit, M applications implement logic to
+       maintain and enforce conformance with an application schema. Using
+       triggers to enforce schema-level consistency ensures all processes
+       invoke the code uniformly, and increases code modularity and
+       maintainability.
+    2. Allow an application to maintain one or more non-primary key indexes.
+       For example, a trigger on updates to global nodes containing a
+       customer id can maintain an index on the last name.
+    3. Implement business logic: For example, an update to an account could
+       automatically trigger updates to related accounts.
+    4. Reducing replication traffic: Since the GT.M replication stream
+       carries only the triggering updates, not the triggered updates,
+       triggers reduce network traffic.
+    5. Automate application defined logging or journaling of updates or
+       maintaining historical records. Triggers can be used to control these.
+    6. Implement referential integrity: For example, a trigger can prevent
+       the posting of a bank transaction for an inactive account and display
+       a rule violation message.
+    7. Debugging: Debugging an application with multiple concurrent accesses
+       is hard. You can use triggers to establish "watch points" on global
+       variable updates to trap incorrect accesses. For example, if an
+       application is failing because certain global variable nodes either
+       have incorrect values or when previously set values disappear. A
+       trigger can be used to trap all such accesses.
+    8. Implement a dataflow based programming paradigm. Although not a
+       primary goal of the implementation of triggers, you can use them to
+       implement applications that use a dataflow programming paradigm.
+
 2 Trigger_Definition
    Trigger Definition
 
@@ -19949,15 +20631,15 @@
        and configuration management of triggers - for example, a ZSHOW "S"
        reports the name of each trigger on the stack. If you do not specify a
        trigger name, GT.M automatically generates one using the global name
-       as a base. Both user-specified trigger name and automatically
-       generated trigger names occupy different name space and last for the
-       life of the definition. A user-specified trigger name is an
-       alphanumeric string of up to 28 characters. It must start with an
-       alphabetic character or a percent sign (%). For a trigger name, GT.M
-       uses the same naming convention as an M name. In other contexts, GT.M
-       truncates M names at 31 characters. However, GT.M treats a trigger
-       name of over 28 characters as an error. This is because a trigger name
-       uniquely identifies a trigger and truncation may cause duplication.
+       as a base. User-specified trigger names and automatically generated
+       trigger names occupy different name space; both last for the life of
+       the definition. A user-specified trigger name is an alphanumeric
+       string of up to 28 characters. It must start with an alphabetic
+       character or a percent sign (%). For a trigger name, GT.M uses the
+       same naming convention as an M name. In other contexts, GT.M truncates
+       M names at 31 characters. However, GT.M treats a trigger name of over
+       28 characters as an error. This is because a trigger name uniquely
+       identifies a trigger and truncation may cause duplication.
 
    An automatically generated trigger name is a string comprised of two
    parts. Using the global name as a base, GT.M takes the first part as an
@@ -19976,8 +20658,8 @@
    hash-sign (#) followed by up to two characters to ensure that every
    trigger has a unique designation, even when the environment is complex.
    The run-time suffix applies to both user-specified and automatically
-   generated trigger names. It helps in differentiating triggers in different
-   database files with the same name.
+   generated trigger names. It helps in differentiating triggers with the
+   same name in different database files.
 
    To apply this trigger definition file to GT.M, all you do is to load it
    using MUPIP TRIGGER -TRIGGERFILE or $ZTRIGGER(). GT.M would invoke trigger
@@ -20027,10 +20709,9 @@
    Accessing Xecute Source Code
 
    ZPRINT/$TEXT()/ZBREAK recognize both a runtime-disambiguator, delimited
-   with a hash-sign (#), and a region-disambiguator, delimited by a slash(/);
-   previously they supported only the runtime-disambiguator. ZPRINT and
-   ZBREAK treat a trigger-not-found case as a TRIGNAMENF error, while $TEXT()
-   returns the empty string. When their argument contains a
+   with a hash-sign (#), and a region-disambiguator, delimited by a slash(/).
+   ZPRINT and ZBREAK treat a trigger-not-found case as a TRIGNAMENF error,
+   while $TEXT() returns the empty string. When their argument contains a
    region-disambiguator, these features ignore a null runtime-disambiguator.
    When their argument does not contain a region-disambiguator, these
    features act as if runtime-disambiguator is specified, even if it has an
diff --git a/sr_port/mupip.hlp b/sr_port/mupip.hlp
index 2516519..44a5b99 100644
--- a/sr_port/mupip.hlp
+++ b/sr_port/mupip.hlp
@@ -861,10 +861,8 @@
        character encoding. Ensure that MUPIP EXTRACT commands and
        corresponding MUPIP LOAD commands execute with the same setting for
        the environment variable gtm_chset.
-
-   **Note**
-
-   Magnetic tapes may have a smaller maximum file size than disks.
+     o The GO format is not supported for UTF-8 mode. Use BINARY or ZWR
+       formats with UTF-8 mode.
 
    The following sections describe the qualifiers of MUPIP EXTRACT command.
 
@@ -893,25 +891,36 @@
        |--------------------------------------------------------------------|
        | CHARACTERS | EXPLANATION                                           |
        |------------+-------------------------------------------------------|
-       | 1-26       | Fixed-length ASCII text: "GDS BINARY EXTRACT LEVEL    |
-       |            | 4".                                                   |
+       | 1-2        | Hexadecimal representation of the length of the label |
+       |            | (by default 64 - decimal 100).                        |
+       |------------+-------------------------------------------------------|
+       | 3-28       | Fixed-length ASCII text: "GDS BINARY EXTRACT LEVEL    |
+       |            | 6".                                                   |
        |------------+-------------------------------------------------------|
-       | 27-40      | Date and time of extract in the $ZDATE() format:      |
-       |            | "YEARMMDD2460SS".                                     |
+       | 29-41      | Fixed-length ASCII text: Date and time of extract in  |
+       |            | the $ZDATE() format: "YEARMMDD2460SS".                |
        |------------+-------------------------------------------------------|
-       | 41-45      | Decimal maximum block size of the union of each       |
-       |            | region from which data was extracted.                 |
+       |            | Fixed-length ASCII text: Decimal maximum block size   |
+       | 42-48      | of the union of each region from which data was       |
+       |            | extracted.                                            |
        |------------+-------------------------------------------------------|
-       | 46-50      | Decimal maximum record size of the union of each      |
-       |            | region from which data was extracted.                 |
+       |            | Fixed-length ASCII text: Decimal maximum record size  |
+       | 49-55      | of the union of each region from which data was       |
+       |            | extracted.                                            |
        |------------+-------------------------------------------------------|
-       | 51-55      | Decimal maximum key size of the union of each region  |
-       |            | from which data was extracted.                        |
+       |            | Fixed-length ASCII text:Decimal maximum key size of   |
+       | 56-62      | the union of each region from which data was          |
+       |            | extracted.                                            |
        |------------+-------------------------------------------------------|
-       |            | Space-padded label specified by the -LABEL qualifier. |
-       | 56-87      | For extracts in UTF-8 mode, GT.M prefixes UTF-8 and a |
-       |            | space to -LABEL. The default LABEL is "GT.M MUPIP     |
-       |            | EXTRACT"                                              |
+       | 63-69      | Fixed-length ASCII text:Boolean indicator of Standard |
+       |            | NULL collation (1) or GT.M legacy collation (0).      |
+       |------------+-------------------------------------------------------|
+       |            | Fixed-length ASCII text: Space-padded label specified |
+       |            | by the -LABEL qualifier; the default LABEL is "GT.M   |
+       | 70-100     | MUPIP EXTRACT"                                        |
+       |            |                                                       |
+       |            | For extracts in UTF-8 mode, GT.M prefixes UTF-8 and a |
+       |            | space to -LABEL.                                      |
        +--------------------------------------------------------------------+
 
     2. GO - Global Output format, used for files to transport or archive.
@@ -1279,13 +1288,13 @@
 
    Always use MUPIP INTEG in the following conditions:
 
-     * Periodically - to ensure ongoing integrity of the database(s); regular
+     o Periodically - to ensure ongoing integrity of the database(s); regular
        INTEGs help detect any integrity problems before they spread and
        extensively damage the database file.
-     * After a crash - to ensure the database was not corrupted. (Note: When
+     o After a crash - to ensure the database was not corrupted. (Note: When
        using before-image journaling, when the database is recovered from the
        journal file after a crash, an integ is not required).
-     * When database errors are reported - to troubleshoot the problem.
+     o When database errors are reported - to troubleshoot the problem.
 
    Improving the logical and physical adjacency of global nodes may result in
    faster disk I/O. A global node is logically adjacent when it is stored
@@ -1320,17 +1329,17 @@
     -[NO]K[EYRANGES]
     -[NO]MAP[=integer]
     -[NO]MAXK[EYSIZE][=integer]
+    -[NO]O[NLINE]
     -S[UBSCRIPT]=subscript]
     -TN[_RESET]
     -[NO]TR[ANSACTION][=integer]
-    -[NO]O[NLINE]
    ]
    {[-FILE] file-name|-REG[ION] region-list}
 
      o MUPIP INTEG requires specification of either file(s) or region(s).
      o Press <CTRL-C> to stop MUPIP INTEG before the process completes.
      o The file-name identifies the database file for a MUPIP INTEG
-       operation.The region-list identifies one or more regions that, in
+       operation. The region-list identifies one or more regions that, in
        turn, identify database files through the current Global Directory.
      o MUPIP INTEG operation keeps track of the number of blocks that do not
        have the current block version during a non-fast integ (default or
@@ -1346,18 +1355,18 @@
    database integrity. If operations continue without fixes to serious
    errors, the following problems may occur:
 
-     * Invalid application operation due to missing or incorrect data.
-     * Process errors, including inappropriate indefinite looping, when a
+     o Invalid application operation due to missing or incorrect data.
+     o Process errors, including inappropriate indefinite looping, when a
        database access encounters an error.
-     * Degrading application level consistency as a result of incomplete
-       update sequences caused by the prior symptoms.
+     o Degrading application level consistency as a result of incomplete
+       update sequences caused by the preexisting database integrity issues.
 
    FIS strongly recommends fixing the following errors as soon as they are
    discovered:
 
-     * Blocks incorrectly marked free - these may cause accelerating damage
+     o Blocks incorrectly marked free - these may cause accelerating damage
        when processes make updates to any part of the database region.
-     * Integrity errors in an index block - these may cause accelerating
+     o Integrity errors in an index block - these may cause accelerating
        damage when processes make updates to that area of the database region
        using the faulty index.
 
@@ -1394,12 +1403,15 @@
 
    Specifies the block for MUPIP INTEG command to start checking a sub-tree
    of the database. MUPIP INTEG -BLOCK cannot detect "incorrectly marked busy
-   errors"
+   errors".
 
    The format of the BLOCK qualifier is:
 
    -BL[OCK]=block-number
 
+     o Block numbers are displayed in an INTEG error report or by using DSE.
+     o Incompatible with: -SUBSCRIPT and -TN_RESET
+
 3 BRief
    BRief
 
@@ -1424,10 +1436,10 @@
        the majority of blocks in a typical database are data blocks.
      o While INTEG -FAST is not a replacement for a full INTEG, it very
        quickly detects those errors that must be repaired immediately to
-       prevent accelerated database damage.
+       prevent accelerating database damage.
      o By default, INTEG checks all active index and data blocks in the
        database.
-     o -FAST reports adjacency information.
+     o -FAST reports include adjacency information.
      o Incompatible with: -TN_RESET.
 
 3 FIle
@@ -1488,8 +1500,8 @@
 
    **Note**
 
-   MUPIP INTEG reports "incorrectly marked free" errors as they require
-   prompt action. MAP does not restrict them.
+   MUPIP INTEG reports all "incorrectly marked free" errors as they require
+   prompt action. MAP does not restrict their reports.
 
    An error in an index block prevents INTEG from processing potentially
    large areas of the database. A single "primary" error may cause large
@@ -1553,22 +1565,21 @@
        when it completes. Note: a command such as ls -l command shows sparse
        files at their full size, but does not show actual disk usage. Use a
        command such as du -sh to see actual disk usage.
-     o The environment variable GTM_BAKTMPDIR (unlike most GT.M environment
-       variables, this is upper case; it is the same directory used for MUPIP
-       BACKUP -ONLINE) can be used to indicate a directory where MUPIP should
-       place the snapshot files (used by MUPIP INTEG -ONLINE). If
-       GTM_BAKTMPDIR does not exist, MUPIP places the snapshot files in the
-       current directory at the time you issue the INTEG command. MUPIP and
-       GT.M processes automatically cleans up these temporary snapshot files
-       under a wider variety of conditions.
+     o The environment variable gtm_snaptmpdir can be used to indicate a
+       directory where MUPIP should place the snapshot files (used by MUPIP
+       INTEG -ONLINE). If gtm_snaptmpdir does not exist, INTEG uses the
+       location specified by gtm_baktmpdir and if neither of those
+       environment variables is defined, INTEG places the snapshot files in
+       the current directory at the time you issue the INTEG command. MUPIP
+       and GT.M processes automatically cleans up these temporary snapshot
+       files under a wide variety of conditions.
      o Temporary directory security settings must allow write access by the
-       MUPIP process and read access by all processes updating the database.
-       MUPIP creates the temporary file with the same access as the database
-       file so processes updating the database can write to the temporary
-       file. If the database is encrypted, the updating processes write
-       encrypted blocks to the snapshot file and the MUPIP INTEG process must
-       start with access to appropriate key information as it does even
-       -NOONLINE.
+       MUPIP process and by all processes updating the database. MUPIP
+       creates the temporary file with the same access as the database file
+       so processes updating the database can write to the temporary file. If
+       the database is encrypted, the updating processes write encrypted
+       blocks to the snapshot file and the MUPIP INTEG process must start
+       with access to appropriate key information as it does even -NOONLINE.
      o MUPIP INTEG -NOONLINE [-FAST] {-REGION|-FILE} clears the KILLs in
        progress and Abandoned Kills flags if the run includes the entire
        database and there are no incorrectly marked busy blocks.
@@ -1604,16 +1615,13 @@
        specify more than one region of the current global directory in a
        list. Regions are case-insensitive, separated by a comma, and
        wildcards can be used to specify them. Any region-name may include the
-       wildcard characters * and % (remember to escape them to protect them
+       wildcard characters * and ? (remember to escape them to protect them
        from inappropriate expansion by the shell). Any region name expansion
        occurs in M (ASCII) collation order.
-     o MUPIP INTEG -REGION does not require stand alone access to databases.
-       Instead, it freezes updates (but not reads) to the database during the
-       check. The region-list argument may specify more than one region of
-       the current Global Directory in a list separated with commas. INTEG
+     o The region-list argument may specify more than one region of the
+       current Global Directory in a list separated with commas. INTEG
        -REGION requires the environment variable gtmgbldir to specify a valid
-       Global Directory. For more information on defining gtmgbldir, refer to
-       the "Global Directory Editor" chapter.
+       Global Directory.
      o Because a KILL may briefly defer marking the blocks it releases "free"
        in the bit maps, INTEG -REGION may report spurious block incorrectly
        marked busy errors. These errors are benign. If these errors occur in
@@ -1642,7 +1650,7 @@
    TN_reset
 
    Resets block transaction numbers and backup event recorded transaction
-   numbers to (one) 1, and the current transaction number to two (2) which
+   numbers to one (1), and the current transaction number to two (2) which
    makes the backup event recorded transaction numbers more meaningful and
    useful. It also issues an advisory message to perform a backup.
 
@@ -1715,17 +1723,18 @@
    A sample output from the above command follows:
 
    Type           Blocks         Records          % Used      Adjacent
-   Directory           2               5           4.150            NA
-   Index              18            1151          77.018             1
-   Data             1137           94189          97.894          1030
-   Free               43              NA              NA            NA
-   Total            1200           95345              NA          1031
+   Directory           2             110          25.732            NA
+   Index            1170          341639          88.298             6
+   Data           340578          519489          99.268        337888
+   Free             6809              NA              NA            NA
+   Total          348559          861238              NA        337894
+   [Spanning Nodes:3329 ; Blocks:341403]
 
    This example performs a MUPIP INTEG operation assuming that logically
    related data occupies 20 data blocks in the current database. The sample
    output shows that out of 1137 data blocks, 1030 data blocks are adjacent
-   to each other. One can improve the performance of a database if the all
-   blocks are as adjacent as possible.
+   to each other. One may be able to improve the performance of a database if
+   the all blocks are as adjacent as possible.
 
    Example:
 
@@ -1736,11 +1745,12 @@
 
    No errors detected by integ.
    Type           Blocks         Records          % Used      Adjacent
-   Directory           2               2           2.490            NA
-   Index               1               1           2.343             1
-   Data                1               3           6.738             1
-   Free               96              NA              NA            NA
-   Total             100               6              NA             2
+   Directory           2             110          25.732            NA
+   Index            1170          341639          88.298             4
+   Data           340578          519489          99.268        337617
+   Free             6809              NA              NA            NA
+   Total          348559          861238              NA        337621
+   [Spanning Nodes:3329 ; Blocks:341403]
 
    Example:
 
@@ -1753,14 +1763,14 @@
    No errors detected by fast integ.
 
    Type           Blocks         Records          % Used      Adjacent
-   Directory           2               2           2.490            NA
-   Index               1               1           2.343             1
-   Data                1              NA              NA            NA
-   Free               96              NA              NA            NA
-   Total             100              NA              NA             1
+   Directory           2             110          25.732            NA
+   Index            1170          341639          88.298             4
+   Data           340578              NA              NA        337617
+   Free             6809              NA              NA            NA
+   Total          348559              NA              NA        337621
 
-   Note the NA entries (highlighted in bold) for Data type. It means that the
-   MUPIP INTEG -FAST operation checked only index blocks.
+   Note the NA entries for Data type. It means that the MUPIP INTEG -FAST
+   operation checked only index blocks.
 
    $ mupip integ -full mumps.dat
 
@@ -1768,19 +1778,20 @@
 
    Directory tree
    Level          Blocks         Records          % Used      Adjacent
-       1               1               1           2.343           NA
-       0               1               1           2.636           NA
-   Global variable ^Dinosaur
+       1               1               1           0.585           NA
+       0               1             109          50.878           NA
+   Global variable ^#t
    Level          Blocks         Records          % Used      Adjacent
-       1               1               6           8.398             1
-       0               6             500          83.902             6
-   No errors detected by integ.
-   Type           Blocks         Records          % Used      Adjacent
-   Directory           2               2           2.490            NA
-   Index               1               6           8.398             1
-   Data                6             500          83.902             6
-   Free               91              NA              NA            NA
-   Total             100             508              NA             7
+       1               1               1           0.585             0
+       0               1              80          49.609             1
+   Global variable ^versionContent
+   Level          Blocks         Records          % Used      Adjacent
+       1               1               1           0.585             0
+       0               1               1          94.018             0
+   Global variable ^x
+   Level          Blocks         Records          % Used      Adjacent
+       1               1               2           1.464             0
+       0               2             109          52.551             1
 
    Example:
 
@@ -1862,21 +1873,20 @@
    an application is running may result in an inconsistent application state
    for the database.
 
-     * MUPIP LOAD uses the Global Directory to determine which database files
+     o MUPIP LOAD uses the Global Directory to determine which database files
        to use.
-     * LOAD supports user collation routines.
-     * LOAD takes its input from the file defined by the file-name
-     * LOAD may take its input from a UNIX file on any device that supports
-       such files.
-     * MUPIP LOAD command considers a sequential file as encoded in UTF-8 if
+     o LOAD supports user collation routines.
+     o LOAD takes its input from the file defined by the file-name, which may
+       be a UNIX file on any device that supports such files.
+     o MUPIP LOAD command considers a sequential file as encoded in UTF-8 if
        the environment variable gtm_chset is set to UTF-8. Ensure that MUPIP
        EXTRACT commands and corresponding MUPIP LOAD commands execute with
        the same setting for the environment variable gtm_chset.
-     * For information on loading with an M "percent utility," refer to the
+     o For information on loading with an M "percent utility," refer to the
        %GI section of the "M Utility Routines" chapter in GT.M Programmer's
        Guide. LOAD is typically faster, but the %GI utility can be
        customized.
-     * Press <CTRL-C> to produce a status message from LOAD. Entering
+     o Press <CTRL-C> to produce a status message from LOAD. Entering
        <CTRL-C> twice in quick succession stops LOAD. A LOAD that is manually
        stopped or stops because of an internal error is incomplete and may
        lack application level integrity, but will not adversely affect the
@@ -1906,25 +1916,24 @@
    not specified, MUPIP LOAD automatically detects file format
    (BINARY/ZWR/GO) based on the file header of the input file. If format is
    specified, it must match the actual format of the input file for LOAD to
-   operate.
+   proceed.
 
    The format codes are:
 
-   GO - Global Output format
    B[INARY] - Binary format
+   GO - Global Output format
    Z[WR] - ZWRITE format
 
-     * By default, LOAD uses FORMAT=ZWR.
-     * -FORMAT=GO expects the data in record pairs. Each global node requires
-       one record for the key and one for the data.
-     * -FORMAT=ZWR expects the data for each global node in a single record.
-     * -FORMAT=BINARY only applies to Greystone Database Structure (GDS)
+     o MUPIP LOAD detects file format (BINARY/ZWR/GO) based on the file
+       header of extract files from MUPIP EXTRACT, ^%GO and DSE.
+     o -FORMAT=BINARY only applies to Greystone Database Structure (GDS)
        files. A BINARY format file loads significantly faster than a GO or
        ZWR format file. -FORMAT=BINARY works with data in a proprietary
        format. -FORMAT=BINARY has one header record, therefore LOAD
        -FORMAT=BINARY starts active work with record number two (2).
-     * MUPIP LOAD detects file format (BINARY/ZWR/GO) based on the file
-       header of extract files from MUPIP EXTRACT, ^%GO and DSE.
+     o -FORMAT=GO expects the data in record pairs. Each global node requires
+       one record for the key and one for the data.
+     o -FORMAT=ZWR expects the data for each global node in a single record.
 
 3 BEgin
    BEgin
@@ -1940,14 +1949,14 @@
    Always consider the number of header records for choosing a -BEGIN point.
    See FORMAT qualifier for more information.
 
-     * For -FORMAT=GO input, the value is usually an odd number. As
+     o For -FORMAT=GO input, the value is usually an odd number. As
        -FORMAT=BINARY requires important information from the header, this
        type of load requires an intact file header regardless of the -BEGIN
        value.
-     * For -FORMAT = ZWR input, each record contains a complete set of
+     o For -FORMAT = ZWR input, each record contains a complete set of
        reference and data information. The beginning values are not
        restricted, except to allow two records for the header.
-     * By default, LOAD starts at the beginning of the input file.
+     o By default, LOAD starts at the beginning of the input file.
 
 3 End
    End
@@ -1973,14 +1982,14 @@
 
    -FI[LL_FACTOR]=integer
 
-     * Reserves room and avoid unnecessary block split to accommodate the
+     o Reserves room and avoid unnecessary block split to accommodate the
        forecasted growth in a global variable that may experience significant
        rate of additions over a period.
-     * Users having database performance issues or a high rate of database
+     o Users having database performance issues or a high rate of database
        updates must examine the defined FILL_FACTORs. Unless the application
        only uses uniform records, which is not typical for most applications,
        FILL_FACTORs do not work precisely.
-     * By default, LOAD uses -FILL_FACTOR=100 for maximum data density.
+     o By default, LOAD uses -FILL_FACTOR=100 for maximum data density.
 
    **Note**
 
@@ -1997,9 +2006,9 @@
 
    -[O]NERROR={STOP|PROCEED|INTERACTIVE}
 
-     * STOP causes MUPIP LOAD to exit immediately.
-     * PROCEED proceeds to the next record.
-     * PROMPTS prompts to continue or stop.
+     o STOP causes MUPIP LOAD to exit immediately.
+     o PROCEED proceeds to the next record.
+     o PROMPTS prompts to continue or stop.
 
    By default MUPIP LOAD exits on encountering an error.
 
@@ -2085,19 +2094,19 @@
        allocates blocks of memory with sizes rounded-up to an integer power
        of two bytes, shmused is always greater than objlen; for example with
        an objlen of 0x1c0, the shmused is 0x200.
-     o Lines of the form rec#... indicate the record # in the relinkctl file.
-       Each relinkctl file can store a maximum of 1,000,000 records, i.e.,
-       the maximum number of routines in a directory with auto-relink enabled
-       is one million. Each record stores a routine name (rtnname:), the
-       current cycle # for this object file record entry (cycle:) which gets
-       bumped on every ZLINK or ZRUPDATE command, the hash of the object file
-       last loaded for this routine name (objhash:), the # of different
-       versions of object files loaded in the Rtnobj shared memory segments
-       with this routine name (numvers:), the total byte-length of the one or
-       more versions of object files currently loaded with this routine name
-       (objlen:), the total length used up in shared memory for these object
-       files where GT.M allocates each object file a rounded-up perfect
-       2-power block of memory (shmlen:).
+     o Lines of the form rec#... indicate the record number in the relinkctl
+       file. Each relinkctl file can store a maximum of 1,000,000 records,
+       i.e., the maximum number of routines in a directory with auto-relink
+       enabled is one million. Each record stores a routine name (rtnname:),
+       the current cycle for this object file record entry (cycle:) which
+       gets bumped on every ZLINK or ZRUPDATE command, the hash of the object
+       file last loaded for this routine name (objhash:), the number of
+       different versions of object files loaded in the Rtnobj shared memory
+       segments with this routine name (numvers:), the total byte-length of
+       the one or more versions of object files currently loaded with this
+       routine name (objlen:), the total length used up in shared memory for
+       these object files where GT.M allocates each object file a rounded-up
+       perfect 2-power block of memory (shmlen:).
 
    Given a relinkctl file name, one can find the corresponding directory path
    using the Unix "strings" command on the Relinkctl file. For example,
@@ -2108,13 +2117,13 @@
    Example:
 
    $ mupip rctldump .
-   Object Directory         : /obj
-   Relinkctl filename       : /tmp/gtm-relinkctl-f0938d18ab001a7ef09c2bfba946f002
+   Object Directory         : /tmp
+   Relinkctl filename       : /tmp/fis-gtm/V6.2-001_x86_64/gtm-relinkctl-61f9eb418212a24a75327f53106c1656
    # of routines            : 1
    # of attached processes  : 2
-   Relinkctl shared memory  : shmid: 11534344  shmlen: 0x57c6000
-   Rtnobj shared memory # 1 : shmid: 11567113  shmlen: 0x100000  shmused: 0x200  shmfree: 0xffe00  objlen: 0x1c0
-       rec#1: rtnname: abcd  cycle: 1  objhash: 0xedbfac8c7f7ca357  numvers: 1  objlen: 0x1c0  shmlen: 0x200
+   Relinkctl shared memory  : shmid: 11534344 shmlen: 0x57c6000
+   Rtnobj shared memory # 1 : shmid: 11567113 shmlen: 0x100000 shmused: 0x200 shmfree: 0xffe00 objlen: 0x1c0
+    rec#1: rtnname: abcd cycle: 1 objhash: 0xedbfac8c7f7ca357 numvers: 1 objlen: 0x1c0 shmlen: 0x200
 
 2 REORG
    REORG
@@ -2530,7 +2539,7 @@
 
    The format of the MUPIP RUNDOWN command is:
 
-   RU[NDOWN] {-FILE file-name|-REGION region-list]}
+   RU[NDOWN] {-FILE file-name|-REGION region-list|-RELINKCTL [dir]|-OVERRIDE}
 
    MUPIP RUNDOWN clears certain fields in a file that is already closed. This
    facilitates recovery from a system crash or other operational anomaly.
@@ -2541,6 +2550,9 @@
    database that is actively being accessed at the time the RUNDOWN is
    issued.
 
+   A successful MUPIP RUNDOWN of a database region removes any current MUPIP
+   FREEZE.
+
    To ensure database integrity, all system shutdown algorithms should
    include scripts that stop at GT.M processes and perform RUNDOWN on all
    database files.
@@ -2550,6 +2562,7 @@
    -F[ile]
    -R[egion]=region-list
    -RELinkctl [dir1]
+   -Override
 
    If the RUNDOWN command does not specify either -File or -Region, it checks
    all the IPC resources (shared memory) on the system and if they are
@@ -2565,23 +2578,17 @@
 
    Incompatible with: -REGION
 
-3 Relinkctl
-   Relinkctl
-
-   Cleans up orphaned Relinkctl files. FIS strongly recommends avoiding
-   actions that tend to make such cleanup necessary - for example, kill -9 of
-   GT.M processes or ipcrm -m of active Relinkctl and/or Rtnobj shared memory
-   segments.
+3 Override
+   Override
 
-   If the optional dir1 is not specified, MUPIP RUNDOWN -RELINKCTL examines
-   the environment variable $gtmroutines, attempts to verify and correct
-   their attach counts and runs down all its inactive auto-relink-enabled
-   directories (those with with a *-suffix). Alternatively, one can specify a
-   directory path for the parameter dir1 and MUPIP RUNDOWN -RELINKCTL treats
-   it as an auto-relink-enabled directory and runs down the resources
-   associated with this one directory. It prints a RLNKCTLRNDWNSUC message on
-   a successful rundown and a RLNKCTLRNDWNFL message on a failure (usually
-   because live processes are still accessing the Relinkctl file).
+   Overrides the protection that prevents MUPIP RUNDOWN from performing a
+   rundown of a replication-enabled (with BEFORE_IMAGE) database or a
+   non-replicated NOBEFORE-journaled database that was abnormally shutdown.
+   The protection involves issuing the MUUSERLBK error for a previously
+   crashed replication-enabled (with BEFORE IMAGE journaling) database and
+   the MUUSERECOV error for a non-replicated or NOBEFORE-journaled database.
+   Both these errors prevent complications related to data recovery from a
+   journal file or a replication-enabled database.
 
 3 Region
    Region
@@ -2604,17 +2611,23 @@
    list of databases, it does not perform any clean up on regions that have
    no abandoned memory segments but may not have been shutdown in a crash.
 
-3 Override
-   Override
+3 Relinkctl
+   Relinkctl
 
-   Overrides the protection that prevents MUPIP RUNDOWN from performing a
-   rundown of a replication-enabled (with BEFORE_IMAGE) database or a
-   non-replicated NOBEFORE-journaled database that was abnormally shutdown.
-   The protection involves issuing the MUUSERLBK error for a previously
-   crashed replication-enabled (with BEFORE IMAGE journaling) database and
-   the MUUSERECOV error for a non-replicated or NOBEFORE-journaled database.
-   Both these errors prevent complications related to data recovery from a
-   journal file or a replication-enabled database.
+   Cleans up orphaned Relinkctl files. FIS strongly recommends avoiding
+   actions that tend to make such cleanup necessary - for example, kill -9 of
+   GT.M processes or ipcrm -m of active Relinkctl and/or Rtnobj shared memory
+   segments.
+
+   If the optional dir1 is not specified, MUPIP RUNDOWN -RELINKCTL examines
+   the environment variable $gtmroutines, attempts to verify and correct
+   their attach counts and runs down all its inactive auto-relink-enabled
+   directories (those with with a *-suffix). Alternatively, one can specify a
+   directory path for the parameter dir1 and MUPIP RUNDOWN -RELINKCTL treats
+   it as an auto-relink-enabled directory and runs down the resources
+   associated with this one directory. It prints a RLNKCTLRNDWNSUC message on
+   a successful rundown and a RLNKCTLRNDWNFL message on a failure (usually
+   because live processes are still accessing the Relinkctl file).
 
 2 SET
    SET
@@ -2622,58 +2635,39 @@
    Modifies certain database characteristics. MUPIP SET operates on either
    regions or files.
 
-   **Note**
-
-   In regions that have journaling enabled and on, users can switch journal
-   files without either requiring standalone access or freezing updates.
-
    The format of the SET command is:
 
-   SE[T] {-FI[LE] file-name|-REG[ION] region-list}
+   SE[T] {-FI[LE] file-name|-JN[LFILE] journal-file-name|-REG[ION] region-list|-REP[LICATION]={ON|OFF}}
     -A[CCESS_METHOD]={BG|MM}
-    -B[YPASS]
-    -DE[FER_TIME]=seconds
+    -[NO]DE[FER_TIME][=seconds]
+    -[NO]DEFER_ALLOCATE
     -E[XTENSION_COUNT]=integer(no of blocks)
     -F[LUSH_TIME]=integer
-    -G[LOBAL_BUFFERS]=<integer>
-    -JN[LFILE]
-    -JO[URNAL]=journal-option-list
+    -G[LOBAL_BUFFERS]=integer
+    -[NO]INST[_FREEZE_ON_ERROR]
+    -JN[LFILE]journal-file-name
+    -K[EY_SIZE]=bytes
     -L[OCK_SPACE]=integer
     -M[UTEX_SLOTS]=integer
-    -[NO]INST[_FREEZE_ON_ERROR]
     -PA[RTIAL_RECOV_BYPASS]
+    -[NO]Q[DBRUNDOWN]
+    -REC[ORD_SIZE]=bytes
+    -REG[ION] region-list
     -REP[LICATION]={ON|OFF}
     -RES[ERVED_BYTES]=integer]
     -S[TANDALONENOT]
     -V[ERSION]={V4|V6}
     -W[AIT_DISK]=integer
 
-     o The file-name (or region-list) identifies the target of the SET.
-     o The SET command must include one of the following qualifiers which
-       determine whether the argument to the SET is a file-name or a
-       region-list.
      o Exclusive access to the database is required if the MUPIP SET command
        specifies -ACCESS_METHOD, -GLOBAL_BUFFERS, -LOCK_SPACE or -NOJOURNAL,
        or if any of the -JOURNAL options ENABLE, DISABLE, or BUFFER_SIZE are
        specified.
-
-   The following section describe the qualifiers of the MUPIP SET command.
-
-3 Access_method
-   Access_method
-
-   Specifies the access method (GT.M buffering strategy) for storing and
-   retrieving data from the global database file. The format of the
-   ACCESS_METHOD qualifier is:
-
-   -A[CCESS_METHOD]=code
-
-3 PArtial_recov_bypass
-   PArtial_recov_bypass
-
-   Sets the CORRUPT_FILE flag in the database fileheader to FALSE. The
-   CORRUPT_FILE flag indicates whether a region completed a successful
-   recovery.
+     o The file-name, journal_file_name, region-list or -REPLICATION
+       qualifier identify the target of the SET.
+     o The SET command must include one of the following target qualifiers
+       which determine whether the argument to the SET is a file-name or a
+       region-list.
 
 3 File
    File
@@ -2683,7 +2677,17 @@
 
    -F[ILE]
 
-   Incompatible with: -REGION
+   Incompatible with: -JNLFILE, -REGION and -REPLICATION
+
+3 Jnlfile
+   Jnlfile
+
+   Specifies that the argument is a journal-file-name. The format of the
+   JNLFILE qualifier is:
+
+   -JNLF[ILE] journal-file-name
+
+   Incompatible with: -FILE, -REGION and -REPLICATION
 
 3 Region
    Region
@@ -2692,25 +2696,84 @@
    file(s) mapped by the current Global Directory. The format of the REGION
    qualifier is:
 
-   -R[EGION]=region-list
+   -R[EGION] region-list
 
    The region-list identifies the target of SET. region-list may specify more
    than one region of the current global directory in a list. Regions are
-   case-insensitive, separated by a comma, and wildcards can be used to
-   specify them. Any region-name may include the wildcard characters * and %
+   case-insensitive, separated by a comma, and wild-cards can be used to
+   specify them. Any region-name may include the wild-card characters * and %
    (remember to escape them to protect them from inappropriate expansion by
    the shell). Any region name expansion occurs in M (ASCII) collation order.
 
-   Incompatible with: -FILE
+   Incompatible with: -FILE, -JNLFILE and -REPLICATION
+
+3 REPlication
+   REPlication
+
+   Specifies whether replication is on or off. The format of the REPLICATION
+   qualifier is:
+
+   -REP[LICATION]={ON|OFF}
+
+   Incompatible with: -FILE, -JNLFILE and -REGION
+
+3 Access_method
+   Access_method
+
+   Specifies the access method (GT.M buffering strategy) for storing and
+   retrieving data from the global database file. The format of the
+   ACCESS_METHOD qualifier is:
+
+   -A[CCESS_METHOD]=code
+
+3 Defer_time
+   Defer_time
+
+   Specifies, in MM access mode, the multiplying factor applied to the flush
+   time to produce a wait after an update before ensuring a journal buffer
+   write to disk; the default is 1. A value of 2 produces a wait of double
+   the flush time. -NODEFER_TIME or a value of -1 turns off timed journal
+   writing, leaving the journal, under light update conditions, to
+   potentially get as stale as the epoch time. Note that, in MM mode without
+   the sync_io option set, absent a VIEW("JNLFLUSH") from the application,
+   GT.M only fsyncs the journal at the epoch. The format of the DEFER_TIME
+   qualifier is:
+
+   -[NO]D[efer_time][=seconds]
+
+3 DEFER_Allocate
+   DEFER_Allocate
+
+   Provides a mechanism to control GT.M behavior when subsequently extending
+   existing database files, whether using MUPIP EXTEND or auto-extend. To
+   switch an existing database file so it immediately preallocates all
+   blocks, first use MUPIP SET -NODEFER_ALLOCATE to set the switch in the
+   database file header, followed by MUPIP EXTEND -BLOCKS=n, where n >= 0.
+   Failures to preallocate space produce a PREALLOCATEFAIL error. On
+   platforms where GT.M does not support preallocation (HP-UX and Solaris),
+   although GDE accepts -NODEFER_ALLOCATE, MUPIP CREATE ignores it and sets
+   the database file to DEFER_ALLOCATE. On those platforms, any attempt to
+   change this flag with MUPIP SET produces a NODFRALLOCSUPP error. The
+   format of the DEFER_ALLOCATE qualifier is:
+
+   -[NO]DEFER_Allocate
+
+3 Epochtaper
+   Epochtaper
+
+   Tries to minimize epoch duration by reducing the number of buffers to
+   flush by GT.M and the file system (via an fsync()) as the epoch
+   (time-based or due to journal file auto-switch) approaches. The format of
+   the QDBRUNDOWN qualifier is:
+
+   -[NO]EPOCHTAPER
 
 3 Extension_count
    Extension_count
 
    Specifies the number of GDS blocks by which an existing database file
    extends. A file or region name is required. This qualifier requires
-   standalone access.
-
-   The format of the EXTENSION_COUNT qualifier is:
+   standalone access. The format of the EXTENSION_COUNT qualifier is:
 
    -E[XTENSION_COUNT]=integer
 
@@ -2735,13 +2798,14 @@
    In general, increasing the number of global buffers improves performance
    by smoothing the peaks of I/O load on the system. However, increasing the
    number of global buffers also increases the memory requirements of the
-   system, and a larger number of global buffers can increase the probability
-   of the buffers getting swapped out. If global buffers are swapped out, any
-   performance gain from increasing the number of global buffers will be more
-   than offset by the performance impact of swapping global buffers. Most
-   applications use from 1,000 to 4,000 global buffers for database regions
-   that are heavily used. FIS does not recommend using fewer than 256 buffers
-   except under special circumstances.
+   system, and a larger number of global buffers on memory constrained
+   systems can increase the probability of the buffers getting swapped out.
+   If global buffers are swapped out, any performance gain from increasing
+   the number of global buffers will be more than offset by the performance
+   impact of swapping global buffers. Most applications use from 1,000 to
+   4,000 global buffers for database regions that are heavily used. FIS does
+   not recommend using fewer than 256 buffers except under special
+   circumstances.
 
    The minimum is 64 buffers and the maximum is 65536 buffers. By default,
    MUPIP CREATE establishes GLOBAL_BUFFERS using information entered in the
@@ -2750,30 +2814,59 @@
    On many UNIX systems, default kernel parameters may be inadequate for GT.M
    global buffers, and may need to be adjusted by a system administrator.
 
+3 INST_freeze_on_error
+   INST_freeze_on_error
+
+   Enables or disables custom errors in a region to automatically cause an
+   Instance Freeze. This flag modifies the "Inst Freeze on Error" file header
+   flag. The format of the INST_FREEZE_ON_ERROR qualifier is:
+
+   -[NO]INST[_FREEZE_ON_ERROR]
+
+3 Journal
+   Journal
+
+   Specifies whether the database allows journaling and, if it does,
+   characteristics for the journal file.:
+
+   **Note**
+
+   In regions that have journaling enabled and on, users can switch journal
+   files without either requiring standalone access or freezing updates.
+
+   The format of the JOURNAL qualifier is:
+
+   -[NO]J[OURNAL][=journal-option-list]
+
+     o -NOJOURNAL specifies that the database does not allow journaling. And
+       also it does not accept an argument assignment.
+     o -JOURNAL specifies journaling is allowed. It takes one or more
+       arguments in a journal-option-list.
+
+3 Key_size
+   Key_size
+
+   Specifies the maximum key size in bytes for storing and retrieving data
+   from the global database file. The maximum supported size is 1019 bytes.
+   The format of the KEY_SIZE qualifier is:
+
+   -K[EY_SIZE=bytes
+
 3 Lock_space
    Lock_space
 
    Specifies the number of pages allocated to the management of M locks
-   associated with the database. The size of a page is always 512 bytes.
-
-   The format of the LOCK_SPACE qualifier is:
+   associated with the database. The size of a page is always 512 bytes. The
+   format of the LOCK_SPACE qualifier is:
 
    -L[OCK]_SPACE=integer
 
      o The maximum LOCK_SPACE is 65,536 pages.
      o The minimum LOCK_SPACE is 10 pages.
      o The default LOCK_SPACE is 40 pages.
-     o A file or region name is required to assign lock space.
      o
      o This qualifier requires standalone access.
 
-3 INST_freeze_on_error
-   INST_freeze_on_error
-
-   Enables or disables custom errors in a region to automatically cause an
-   Instance Freeze. This flag modifies the "Inst Freeze on Error" file header
-   flag.
-
 3 Mutex_slots
    Mutex_slots
 
@@ -2785,41 +2878,52 @@
    maximum number of concurrent processes you expect to access the database.
 
    The minimum value is 64 and the maximum value is 32768. The default value
-   is 1024.
-
-3 Journal
-   Journal
-
-   Specifies whether the database allows journaling and, if it does,
-   characteristics for the journal file. The format of the JOURNAL qualifier
-   is:
+   is 1024. The format of the MUTEX_SLOTS qualifier is:
 
-   -[NO]J[OURNAL][=journal-option-list]
-
-     o -NOJOURNAL specifies that the database does not allow journaling. And
-       also it does not accept an argument assignment.
-     o -JOURNAL specifies journaling is allowed. It takes one or more
-       arguments in a journal-option-list.
+   -M[UTEX_SLOTS]=integer
 
 3 Qdbrundown
    Qdbrundown
 
    Quickens normal process shutdown where a large number of processes
    accessing a database file are required to shutdown almost simultaneously,
-   for example, in benchmarking scenarios. When a terminating GT.M process
-   observes that a large number of processes are attached to a database file
-   and QDBRUNDOWN is enabled, it bypasses checking whether it is the last
-   process accessing the database. Such a check occurs in a critical section
-   and bypassing it also bypasses the usual RUNDOWN actions which accelerates
-   process shutdown removing a possible impediment to process startup. By
-   default, QDBRUNDOWN is disabled.
+   for example, in benchmarking scenarios. The format of the QDBRUNDOWN
+   qualifier is:
+
+   -[NO]Q[DBRUNDOWN]
+
+   When a terminating GT.M process observes that a large number of processes
+   are attached to a database file and QDBRUNDOWN is enabled, it bypasses
+   checking whether it is the last process accessing the database. Such a
+   check occurs in a critical section and bypassing it also bypasses the
+   usual RUNDOWN actions which accelerates process shutdown removing a
+   possible impediment to process startup. By default, QDBRUNDOWN is
+   disabled.
 
    Note that with QDBRUNDOWN there is a possibility of race condition that
-   might leave the database fileheader and IPC resources in need of cleanup.
+   might leave the database file header and IPC resources in need of cleanup.
    Although QDBRUNDOWN minimizes the probability of such a race condition, it
    cannot eliminate it. When using QDBRUNDOWN, FIS recommends an explicit
    MUPIP RUNDOWN of the database file after the last process exits, to ensure
-   the cleanup of database fileheader and IPC resources.
+   the cleanup of database file header and IPC resources.
+
+3 PArtial_recov_bypass
+   PArtial_recov_bypass
+
+   Sets the CORRUPT_FILE flag in the database file header to FALSE. The
+   CORRUPT_FILE flag indicates whether a region completed a successful
+   recovery. The format of the PARTIAL_RECOV_BYPASS qualifier is:
+
+   -PA[RTIAL_RECOV_BYPASS]
+
+3 RECord_size
+   RECord_size
+
+   Specifies the maximum record size in bytes for storing and retrieving data
+   from the global database file. The maximum supported size is 1MiB bytes.
+   The format of the RECORD_SIZE qualifier is:
+
+   -REC[ORD_SIZE=bytes
 
 3 REServed_bytes
    REServed_bytes
@@ -2854,7 +2958,16 @@
        and longer records (spanning nodes) features of V6 format are
        automatically disabled when used with GT.M V5.* versions.
      o For more information on the upgrading or downgrading your database,
-       refer to the release notes document of your current GT.M version.
+       refer to the release notes document of your current GT.M version(s).
+
+3 Wait_disk
+   Wait_disk
+
+   Specifies the seconds to wait for disk space before giving up on a
+   database block write, where zero (0) means to give an error immediately
+   without waiting. The format of the WAIT_DISK qualifier is:
+
+   -W[AIT_DISK]=seconds
 
 3 Examples
    Examples
@@ -2924,7 +3037,7 @@
 
    estimation-technique is one of the following:
 
-     * scan,level=<lvl>
+     o scan,level=<lvl>
 
        Traverses the global variable tree and counts the actual number of
        records and blocks at levels from the root down to the level specified
@@ -2938,19 +3051,19 @@
        The technique reports the results for levels other than 0 show
        adjacency for the next lower (one less) level.
 
-     * arsample,samples=<smpls>
+     o arsample,samples=<smpls>
 
        Uses acceptance/rejection sampling of random tree traversals to
        estimate the number of blocks at each level. It continues until the
        specified number of samples (default is 1,000) is accepted.
 
-     * impsample,samples=<smpls>
+     o impsample,samples=<smpls>
 
        Uses importance sampling of random tree traversals to weight each
        sample of the specified number of samples (default is 1,000) in order
        to estimate size of the tree at each level.
 
-     * If -HEURISTIC is not specified, MUPIP SIZE uses the
+     o If -HEURISTIC is not specified, MUPIP SIZE uses the
        ARSAMPLE,SAMPLE=1000 estimation technique.
 
    **Important**
@@ -2968,7 +3081,8 @@
    reports the logical adjacency in the "Adjacent" column of the MUPIP SIZE
    report. Note that adjacency is only a proxy for database organization and
    its usefulness may be limited by the technology and configuration of your
-   secondary storage.
+   secondary storage. See the INTEG section of this chapter for additional
+   comments on adjacency.
 
    -Select
 
@@ -2981,12 +3095,12 @@
 
    global-name-list can be:
 
-     * A comma separated list of global variables.
-     * A range of global variables denoted by start:end syntax. For example,
+     o A comma separated list of global variables.
+     o A range of global variables denoted by start:end syntax. For example,
        -select="g1:g4".
-     * A global variable with wildcards, for example, "g*" (the name must be
+     o A global variable with wildcards, for example, "g*" (the name must be
        escaped to avoid shell filename expansion)
-     * "*" to select all global variables.
+     o "*" to select all global variables.
 
    -Region
 
@@ -3073,9 +3187,9 @@
     1. Set the value of the environment variable gtmgbldir: to specify the
        value of a current global directory.
     2. Ensure that the key size, record size, block size of your database is
-       sufficient for storing trigger definition. You may have to set the key
-       and record sizes larger than the database content would otherwise
-       require.
+       sufficient for storing all planned trigger definitions. You may have
+       to set the key and record sizes larger than the database content would
+       otherwise require.
 
    The qualifiers of the MUPIP TRIGGER command are as follows:
 
@@ -3086,19 +3200,20 @@
 
    -TRIG[GERFILE]=<trigger_definitions_file> [-NOPR[OMPT]]
 
-     *
-     * A MUPIP TRIGGER -TRIGGERFILE operation occurs within a transaction
+     o A MUPIP TRIGGER -TRIGGERFILE operation occurs within a transaction
        boundary, therefore, if even one trigger from the trigger definition
        file fails to parse correctly, MUPIP TRIGGER rolls back the entire
-       trigger definition file load. MUPIP TRIGGER operations have an
-       implicit timeout of zero (0), meaning the read must succeed on the
+       trigger definition file load. Trigger maintenance operations reserve
+       their output until the transaction commits at which time they deliver
+       the entire output in a consistent way. MUPIP TRIGGER operations have
+       an implicit timeout of zero (0), meaning the read must succeed on the
        first try or the command will act as if it received no input.
-     * MUPIP TRIGGER -TRIGGERFILE ignores blank lines and extra whitespace
+     o MUPIP TRIGGER -TRIGGERFILE ignores blank lines and extra whitespace
        within lines. It treats lines with a semi-colon in the first position
        as comments and ignores their content.
-     * MUPIP TRIGGER compiles the XECUTE action string and rejects the load
+     o MUPIP TRIGGER compiles the XECUTE action string and rejects the load
        if the compilation has errors.
-     * Always specify the same value for the environment variable gtm_chset
+     o Always specify the same value for the environment variable gtm_chset
        during loading and executing triggers. If you specify different values
        of gtm_chset during loading and executing triggers, MUPIP TRIGGER
        generates a run-time error (TRIGINVCHSET). GT.M does not prevent a
@@ -3108,17 +3223,21 @@
        for all database updates, should be to ensure that you provide the
        same value for gtm_chset during load compilation and run-time
        compilation.
-     * MUPIP TRIGGER replicate trigger definitions as logical actions from an
+     o MUPIP TRIGGER replicate trigger definitions as logical actions from an
        originating/primary instance to a replicating/secondary instance based
        on LGTRIG journal records. This permits the instances to have
        different sets of triggers and differing database layouts (for
        example, different # of regions, different block sizes, different
        maximum-record-size, and so on).
-     * MUPIP TRIGGER limits trigger expression source lines to 80 characters
-       including a trailing ellipsis to indicate there was more text, and
-       they also replace any non-graphic characters with a dot (.)
+     o MUPIP TRIGGER error messages associated with loading triggers limit
+       trigger expression source lines to 80 characters including a trailing
+       ellipsis to indicate there was more text, and they also replace any
+       non-graphic characters with a dot (.)
 
-     * Incompatible with: -SELECT
+     o GT.M triggers apply to spanning regions. When $ZTRIGGER() or MUPIP
+       TRIGGER define triggers that apply to globals spanning multiple
+       regions, each of the spanned regions install a definition.
+     o Incompatible with: -SELECT
 
    **Note**
 
@@ -3135,19 +3254,20 @@
 
    -SELE[CT][=name-list*][ <select-output-file>]
 
-     * Name-list can include global names, delimited with a leading caret
+     o Name-list can include global names, delimited with a leading caret
        (^), and/or trigger names (user-defined or auto-generated) with no
        leading caret. You can specify a trailing asterisk(*) with either.
-     * With no arguments specified, GT.M treats -SELECT as -SELECT="*" and
+     o With no arguments specified, GT.M treats -SELECT as -SELECT="*" and
        extracts a list of all current triggers.
-     * Optionally, you can specify a file name to redirect the output of the
+     o Optionally, you can specify a file name to redirect the output of the
        command. If you do not specify a file name, MUPIP TRIGGER prompts for
        a file name. If you respond with an empty string (RETURN), MUPIP
        TRIGGER directs the output to STDOUT.
-     * MUPIP TRIGGER -SELECT displays all output including errors on STDOUT.
-     * For Trigger definition reporting operations, $ZTRIGGER("SELECT") and
+     o MUPIP TRIGGER -SELECT displays all output including errors on STDOUT.
+     o For Trigger definition reporting operations, $ZTRIGGER("SELECT") and
        MUPIP TRIGGER -SELECT, return a non-zero exit status when their
-       selection criteria encounter an error in the middle of the select.
+       selection criteria encounter an error in the select.
+     o in the Programmers Guide.
 
    **Note**
 
@@ -3157,13 +3277,13 @@
    -SELECT output may not be identical to the -TRIGGERFILE input, it has the
    same meaning. Additionally, MUPIP TRIGGER -SELECT displays a field called
    "Cycle" as part of a comment. Cycle is the number of trigger definition
-   updates (addition, modification, or deletion) performed on a global.
+   updates (addition, modification, or deletion) performed on a global node.
 
    **Important**
 
    MUPIP TRIGGER treats the deletion of a non-existent trigger as a success;
    if that is the only operation, or one of a set of successful operations,
-   it return success 0 to the shell Also, MUPIP TRIGGER returns failure in
+   it returns success 0 to the shell. Also, MUPIP TRIGGER returns failure in
    case of trigger selection using trigger names where the number after the
    pound-sign (#) starts with a 0 (which is an impossible auto-generated
    trigger name).
@@ -3249,8 +3369,7 @@
 
     1. Begin by executing the following command:
 
-       $ mupip trigger -select="^Acct*"
-       Output file:
+       $ mupip trigger -select="^Acct*"Output file:
 
     2. Specify trigger_mod.trg as the output file. This file contains entries
        like the following:
@@ -3292,8 +3411,7 @@
 
     1. Begin by executing the following command:
 
-       $ mupip trigger -select="^Acct*"
-       Output file:
+       $ mupip trigger -select="^Acct*"Output file:
 
     2. Specify trigger_delete.trg as the output file. This file contains
        entries like the following:
@@ -3332,8 +3450,7 @@
     2. Verify that the ValidateAccount trigger exists by executing the
        following command:
 
-       $ mupip trigger -select="^Acct*"
-       Output file:
+       $ mupip trigger -select="^Acct*"Output file:
 
     3. Respond with an empty string (Press Enter). Confirm that the trigger
        summary report contains an entry like the following:
@@ -3405,10 +3522,10 @@
    **Important**
 
    GT.M applies journaling information in the Global Directory to a database
-   file only when it is created. Thereafter use MUPIP, or possibly DSE, to
-   change journaling characteristics in database files. Be sure to use GDE to
-   reflect current journaling needs so that the next time you use MUPIP
-   CREATE you get the desired journaling characteristics.
+   file only when it is created. Thereafter use MUPIP, or under unusual
+   circumstances DSE, to change journaling characteristics in database files.
+   Be sure to use GDE to reflect current journaling needs so that the next
+   time you use MUPIP CREATE you get the desired journaling characteristics.
 
    DSE DUMP -FILEHEADER displays the current values for all established
    journaling characteristics.
@@ -3420,23 +3537,27 @@
    journaling is active for a specific file or region(s). The first run of
    MUPIP SET -JOURNAL on an older database automatically changes the
    maximum/minimum journal settings to match those required by the current
-   GT.M version. MUPIP SET operates on either regions or files.
+   GT.M version. MUPIP SET operates on database files, journal files, regions
+   or replication state.
 
    The format for the MUPIP SET command is:
 
-   MUPIP SE[T] -qualifier... {-F[ILE] file-name|-REG[ION] region-list}
+   MUPIP SE[T] -qualifier... {-F[ILE] file-name|-JN[LFILE journal-file|-REG[ION] region-list}
 
-   The file-specification or region-list identifies the target of the SET.
-   Region-names separated by commas (,) make up a region-list.
+   The file-specification, journal file specification or region-list
+   identifies the target of the SET. Region-names separated by commas (,)
+   make up a region-list.
 
    To establish journaling characteristics, use the MUPIP SET command with
    the -[NO]JOURNAL[=journal-option-list] qualifier and one of the following
    SET object identifying qualifiers:
 
    -F[ILE]
+   -JN[LFILE]
    -R[EGION]
 
-   Together with one or more of the SET action qualifiers:
+   -FILE and -REGION act together with one or more of the SET action
+   qualifiers:
 
    -[NO]JOURNAL[=journal-option-list] -REPLICATION=<replication-option>'
 
@@ -3447,8 +3568,8 @@
 
    -F[ILE]
 
-   Specify that the argument to the SET is a file-specification for a single
-   database file. A Journal file's name can now include characters in
+   Specifies that the argument to the SET is a file-specification for a
+   single database file. A Journal file's name cannclude characters in
    Unicode.
 
    Old journal files stay open for about 10 seconds after a switch to a new
@@ -3456,24 +3577,41 @@
 
    -R[EGION]
 
-   Specify that the argument to the SET is a list of one or more
+   Specifies that the argument to the SET is a list of one or more
    region-names, possibly including wildcards, which, through the mapping of
    the current Global Directory, identifies a set of database files. SET
    -REGION modifies multiple files when the parameter contains more than one
    name.
 
-   The -REGION qualifier is incompatible with the -FILE qualifier.
+   The -REGION qualifier is incompatible with the -FILE and -JNLFILE
+   qualifiers.
 
-   -J[NLFILE]
+   -JN[LFILE]
 
    Specifies that the target for SET is a journal file. The format of the
    JNLFILE qualifier is:
 
-   -jnlfile jnl_file [-[no]prevjnlfile=jnlfilename] [-bypass]
+   -jnlfile jnl_file [-[no]prevjnlfile[=jnlfilename]] [-bypass]
    [-repl_state={on|off}] [-dbfilename=file_name]
 
    jnl_file specifies the name of the target journal file.
 
+   -bypass
+
+   Override the requirement that database files (or their corresponding
+   journal files) affected by the set command be available standalone.
+
+   **Caution**
+
+   Changing the previous generation file link when a rollback operation is in
+   progress or when the Source Server is actively replicating, can damage the
+   journal file and hamper recoverability.
+
+   -dbfilename=file_name
+
+   Associates a journal file with a different database file; this command may
+   be useful in arranging unusual RECOVER or ROLLBACK scenarios.
+
    -prevjnlfile=jnlfilename
 
    Changes the name of the previous generation of the journal file in the
@@ -3489,27 +3627,11 @@
    Such an operation is appropriate when it is assured that there will never
    be a reason for a rollback to the previous generation journal file.
 
-   -bypass
-
-   Override the requirement that database files (or their corresponding
-   journal files) affected by the set command be available standalone.
-
-   **Caution**
-
-   Changing the previous generation file link when a rollback operation is in
-   progress or when the Source Server is actively replicating, can damage the
-   journal file and hamper recoverability.
-
    -repl_state={on|off}
 
    Change the replication state of a journal file; this command is intended
    for use only under instructions from your GT.M support provider.
 
-   -dbfilename=file_name
-
-   Associates a journal file with a different database file; this command may
-   be useful in arranging unusual RECOVER or ROLLBACK scenarios.
-
 3 Action_Qualifiers
    Action Qualifiers
 
@@ -3529,49 +3651,6 @@
    list contains only one keyword. This option list is a super set of the
    journal-option-list available through GDE.
 
-     o -NOJOURNAL specifies that the database does not allow journaling, or
-       disables journaling for a database that currently has it enabled. It
-       is equivalent to -JOURNAL=DISABLE.
-     o -NOJOURNAL does not accept an argument assignment. It does not create
-       new journal files. When a database has been SET -NOJOURNAL, it appears
-       to have no journaling file name or other characteristics.
-     o -JOURNAL= enables journaling for a database file. -JOURNAL= takes one
-       or more arguments in a journal-option-list. As long as journaling is
-       ENABLED and turned ON at the end of the command, SET -JOURNAL= always
-       creates a new version of the specified journal file(s).
-     o -NOJOURNAL specifies that the database does not allow journaling, or
-       disable journaling for a database where journaling is active.
-     o Enable BEFORE_IMAGE or NOBEFORE_IMAGE journaling for a database file.
-     o As long as journaling is ENABLED and turned ON at the end of the
-       command, SET -JOURNAL= always creates a new version of the specified
-       journal file(s).
-     o Every MUPIP SET -JOURNAL command on a database file that specifies an
-       ON or OFF journal-activation option causes the values of all
-       explicitly specified journal-file-options to be stored in the database
-       overriding any previously established characteristics for those
-       options.
-     o If you specify both -JOURNAL and -NOJOURNAL in the same command line,
-       the latter takes effect.
-     o Whenever MUPIP SET creates a new journal file, it uses all values for
-       journal-file-options that the user explicitly specifies in the command
-       line for the new journal file. If you do not specify a
-       journal-file-option, MUPIP SET takes the characteristics of the
-       existing journal file.
-     o MUPIP SET supports qualifiers (like -ACCESS_METHOD, and so on) to
-       change non-journaling characteristics of database file(s). If you
-       specify these qualifiers -JOURNAL , MUPIP SET modifies the
-       non-journaling characteristics first and then moves on to modify the
-       journaling characteristics. Command execution stops when it encounters
-       an error. If MUPIP SET encounters an error in processing the command
-       line or the non-journaling characteristics, it makes no changes to any
-       characteristics. However, if MUPIP SET encounters an error in
-       processing the journaling characteristics, the non-journaling
-       characteristics have already been successfully changed.
-     o -NOJOURNAL is equivalent to -JOURNAL=DISABLE.
-     o -NOJOURNAL does not accept an argument assignment. It does not create
-       new journal files. When a database has been SET -NOJOURNAL, it appears
-       to have no journaling file name or other characteristics.
-
    -REPLI[CATION]=replication-option
 
    -REPLICATION sets journal characteristics and changes the replication
@@ -3796,11 +3875,11 @@
        the existing file extension where the string denotes the time of
        creation of the existing journal file in the following format:
 
-       YYYY           4-digit-year                                    such as 2011
-       JJ             3-digit-Julian-day (between 1 and 366)          such as 199
-       HH             2-digit-hour in 24 hr format                    such as 14
-       MM             2-digit minute                                  such as 40
-       SS             2-digit seconds                                 such as 30
+       YYYY      4-digit-year                              such as 2011
+       JJ       3-digit-Julian-day (between 1 and 366)     such as 199
+       HH       2-digit-hour in 24 hr format               such as 14
+       MM       2-digit minute                             such as 40
+       SS       2-digit seconds                            such as 30
 
        Assuming the above example for the string value, GT.M renames a
        journal file mumps.mjl to mumps.mjl_2010199144030 when it switches to
@@ -5198,7 +5277,7 @@
    Extract Formats
 
    Journal EXTRACT files always start with a label. For the current release
-   of GT.M, the label is GDSJEX06 for a simple journal extract file. This
+   of GT.M, the label is GDSJEX07 for a simple journal extract file. This
    label is necessary to identify the format of the file.
 
    If the environment variable gtm_chset is set of UTF-8, then file format
@@ -5221,10 +5300,10 @@
    token_seq as part of the output. It is the sixth field in the output of
    the journal record extract. When replication is in use, token_seq is a
    journal sequence number (jsnum) that uniquely identifies each transaction.
-   When replication is not in use and the transaction is a TP or ZTP
-   transaction, token_seq is an 8-byte token that uniquely identifies the
-   entire TP or ZTP transaction. For non-replicated, non-TP, and non-ZTP
-   journal records, token_seq has a zero (0) value.
+   When replication is not in use and the transaction is a TP transaction,
+   token_seq is an 8-byte token that uniquely identifies the entire TP
+   transaction. For non-replicated, non-TP journal records, token_seq has a
+   zero (0) value.
 
    The format of the plain journal extract is as follows:
 
@@ -5296,43 +5375,43 @@
 
    The format of the detail journal extract is as follows:
 
-   PINI(U) time\tnum\chksum\pid\nnam\unam\term\clntpid\clntnnam\clntunam\clntterm
-   PINI(V) time\tnum\chksum\pid\nnam\unam\term\mode\logintime\image_count\pname\clntpid\clntnnam\clntunam\clntterm\clntmode\clntlogintime\clntimage_count\clntpname
-   PFIN    time\tnum\chksum\pid\clntpid
-   EOF     time\tnum\chksum\pid\clntpid\jsnum
-   SET     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
-   KILL    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   ZKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   ZTWORM  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\ztwormhole
-   ZTRIG   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   TSTART  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq
-   TSET    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
-   TKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   TZKILL  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   TZTWORM time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\ztwormhole
-   TZTRIG  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   TLGTRIG time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\trigdefinition
-   USET    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
-   UKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   UZKILL  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   UZTWORM time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\ztwormhole
-   UZTRIG  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   ULGTRIG time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\trigdefinition
-   TCOM    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\partners\tid
-   INCTN   time\tnum\chksum\pid\clntpid\opcode\incdetail
-   EPOCH   time\tnum\chksum\pid\clntpid\jsnum\blks_to_upgrd\free_blocks\total_blks\fully_upgraded[\strm_num\strm_seq]...
-   PBLK    time\tnum\chksum\pid\clntpid\blknum\bsiz\blkhdrtn\ondskbver
-   AIMG    time\tnum\chksum\pid\clntpid\blknum\bsiz\blkhdrtn\ondskbver
-   NULL    time\tnum\chksum\pid\clntpid\jsnum\strm_num\strm_seq
-   ZTSTART time\tnum\chksum\pid\clntpid\token
-   FSET    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
-   FKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   FZKILL  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   GSET    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
-   GKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   GZKILL  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
-   ZTCOM   time\tnum\chksum\pid\clntpid\token\partners
-   ALIGN   time\tnum\chksum\pid\clntpid
+   PINI(U)  time\tnum\chksum\pid\nnam\unam\term\clntpid\clntnnam\clntunam\clntterm
+   PINI(V)  time\tnum\chksum\pid\nnam\unam\term\mode\logintime\image_count\pname\clntpid\clntnnam\clntunam\clntterm\clntmode\clntlogintime\clntimage_count\clntpname
+   PFIN     time\tnum\chksum\pid\clntpid
+   EOF      time\tnum\chksum\pid\clntpid\jsnum
+   SET      time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
+   KILL     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   ZKILL    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   ZTWORM   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\ztwormhole
+   ZTRIG    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   TSTART   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq
+   TSET     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
+   TKILL    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   TZKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   TZTWORM  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\ztwormhole
+   TZTRIG   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   TLGTRIG  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\trigdefinition
+   USET     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
+   UKILL    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   UZKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   UZTWORM  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\ztwormhole
+   UZTRIG   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   ULGTRIG  time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\trigdefinition
+   TCOM     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\partners\tid
+   INCTN    time\tnum\chksum\pid\clntpid\opcode\incdetail
+   EPOCH    time\tnum\chksum\pid\clntpid\jsnum\blks_to_upgrd\free_blocks\total_blks\fully_upgraded[\strm_num\strm_seq]...
+   PBLK     time\tnum\chksum\pid\clntpid\blknum\bsiz\blkhdrtn\ondskbver
+   AIMG     time\tnum\chksum\pid\clntpid\blknum\bsiz\blkhdrtn\ondskbver
+   NULL     time\tnum\chksum\pid\clntpid\jsnum\strm_num\strm_seq
+   ZTSTART  time\tnum\chksum\pid\clntpid\token
+   FSET     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
+   FKILL    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   FZKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   GSET     time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node=sarg
+   GKILL    time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   GZKILL   time\tnum\chksum\pid\clntpid\token_seq\strm_num\strm_seq\updnum\nodeflags\node
+   ZTCOM    time\tnum\chksum\pid\clntpid\token\partners
+   ALIGN    time\tnum\chksum\pid\clntpid
 
    where:
 
@@ -5416,7 +5495,7 @@
    | trigdefinition | Trigger definition string corresponding to an LGTRIG  |
    |                | journal record.                                       |
    |----------------+-------------------------------------------------------|
-   |                | =n where this is the nth update in the TP or ZTP      |
+   |                | =n where this is the nth update in the TP             |
    | updnum         | transaction. n=1 for the 1st update etc. 0 for        |
    |                | non-TP.                                               |
    |----------------+-------------------------------------------------------|
@@ -5445,20 +5524,18 @@
    |                | Combinations of the above bits would mean each of the |
    |                | individual bit characteristics. For example, 00011 => |
    |                | update within a trigger context, and to a global with |
-   |                | at least one trigger defined. For example, 00011 =>   |
-   |                | update inside a trigger and to a global with at least |
-   |                | one trigger defined. Certain bit combinations are     |
-   |                | impossible. For example, 01001 since GT.M replicates  |
-   |                | any update that does not invoke triggers.             |
+   |                | at least one trigger defined. Certain bit             |
+   |                | combinations are impossible. For example, 01001 since |
+   |                | GT.M replicates any update that does not invoke       |
+   |                | triggers.                                             |
    |----------------+-------------------------------------------------------|
    | node           | Key that is being updated in a SET or KILL.           |
    |----------------+-------------------------------------------------------|
    | sarg           | Right-hand side argument to the SET (that is, the     |
    |                | value that the key is being SET to).                  |
    |----------------+-------------------------------------------------------|
-   |                | Number of journaled regions participating in this TP  |
-   | partners       | or ZTP transaction (TCOM/ZTCOM record written in this |
-   |                | TP or ZTP) .                                          |
+   | partners       | Number of journaled regions participating in this TP  |
+   |                | (TCOM/ZTCOM record written in this TP) .              |
    |----------------+-------------------------------------------------------|
    | opcode         | Inctn opcode. See gdsfhead.h inctn_opcode_t for all   |
    |                | possible values.                                      |
@@ -5748,21 +5825,21 @@
    Command syntax:
 
    mupip replicate -source -start
-    {-secondary=<hostname:port>|-passive}
-    [-buffsize=<Journal Pool size in bytes>]
-    [-filter=<filter command>]
-    [-freeze[=on|off] -[no]comment[='"<string>"']
-    [-connectparams=<hard tries>,<hard tries period>,
+   {-secondary=<hostname:port>|-passive}
+   [-buffsize=<Journal Pool size in bytes>]
+   [-filter=<filter command>]
+   [-freeze[=on|off] -[no]comment[='"<string>"']
+   [-connectparams=<hard tries>,<hard tries period>,
     <soft tries period>, <alert time>, <heartbeat period>,
     <max heartbeat wait>]
-    -instsecondary=<replicating instance name>
-    [-[no]jnlf[ileonly]]
-    -log=<log file name> [-log_interval=<integer>]
-    {-rootprimary|-propagateprimary} [{-updok|-updnotok}]
-    [-cmplvl=<compression level>]
-    [-tlsid=<label>]
-    [-[no]plaintextfallback]
-    [-renegotiate_interval=<minutes>]
+   -instsecondary=<replicating instance name>
+   [-[no]jnlf[ileonly]]
+   -log=<log file name> [-log_interval=<integer>]
+   {-rootprimary|-propagateprimary} [{-updok|-updnotok}]
+   [-cmplvl=<compression level>]
+   [-tlsid=<label>]
+   [-[no]plaintextfallback]
+   [-renegotiate_interval=<minutes>]
 
    Qualifiers:
 
@@ -5852,8 +5929,7 @@
      set TSTART="08"
      set TCOMMIT="09"
      set EOT="99"
-     set log=$ztrnlnm("filterlog")
-   ; use the environment variable filterlog" (if defined)
+     set log=$ztrnlnm("filterlog")        ; use the environment variable filterlog" (if defined)
      ;to specify which logfile to use
      if logersion="" set log="logcharout"  char
      if $zv["VMS" sechar EOL=$C(13)_$C(10)
@@ -6250,6 +6326,7 @@
    mupip replicate -source -activate
     -secondary=<hostname:port>
     -log=<log file name>
+    [-log_interval=<integer>]
     -connectparams=<hard tries>,<hard tries period>,
     <soft tries period>,<alert time>,<heartbeat period>,
     <max heartbeat wait>]
@@ -6291,6 +6368,14 @@
    If neither -rootprimary nor -propagateprimary are specified, this command
    assumes -propagateprimary.
 
+   -log_interval
+
+   Specifies the number of transactions for which the Source Server should
+   wait before writing to the log file. The default logging interval is 1000
+   transactions.
+
+   -log_interval=0 reverts the logging interval to the default value.
+
    Example:
 
    $ mupip replicate -source -activate -secondary=localhost:8998 -log=A2B.log -instsecondary=America
@@ -6425,7 +6510,7 @@
    wait before writing to the log file. The default logging interval is 1000
    transactions.
 
-   -log_interval=0 reverts the logging interval to the prior value.
+   -log_interval=0 reverts the logging interval to the default value.
 
 2 Source_Logging
    Source Logging
@@ -6451,7 +6536,7 @@
    wait before writing to the log file. The default logging interval is 1000
    transactions.
 
-   -log_interval=0 reverts the logging interval to the prior value.
+   -log_interval=0 reverts the logging interval to the default value.
 
 2 Stop_Source_Server
    Stop Source Server
@@ -6902,8 +6987,8 @@
    gtmuser1 11951 11943 0 06:42 ? 00:00:00 /usr/library/GTM/mupip replicate -updhelper -writer
    gtmuser1 11952 11943 0 06:42 ? 00:00:00 /usr/library/GTM/mupip replicate -updhelper -writer
 
-2 Stop_Update_Process
-   Stop Update Process
+2 Stop_Update_Process_and/or_the_Receiver_Server
+   Stop Update Process and/or the Receiver Server
 
    Command syntax:
 
@@ -6925,8 +7010,9 @@
 
    -timeout
 
-   Specifies the period of time (in seconds) the Receiver Server should wait
-   before shutting down. If you do not specify -timeout, the default timeout
+   Specifies the period of time (in seconds) the shutdown command should wait
+   before signaling the Receiver Server, Update Process, and/or helper
+   processes to shut down.If you do not specify -timeout, the default timeout
    period is 30 seconds. If you specify -timeout=0, shutdown occurs
    immediately.
 
@@ -7151,10 +7237,10 @@
    |             |                |-FO[RMAT]=GO|B[INARY]|Z[WR]                    |
    |             |                |-FR[EEZE]                                      |
    |             |                |-LA[BEL]=text                                  |
-   |EXTR[ACT]    |-               |                                               |
-   |             |                |-[NO]L[OG]                                     |
+   |EXTR[ACT]    |-               |-[NO]L[OG]                                     |
    |             |                |-S[ELECT]=global-name-list                     |
    |             |                |-O[CHSET]=character-set                        |
+   |             |                |-R[EGION=region-list                           |
    |-------------+----------------+-----------------------------------------------|
    |             |                |-DBG                                           |
    |             |                |-OF[F]                                         |
@@ -7192,10 +7278,10 @@
    |             |                |-BE[GIN]=integer                               |
    |             |                |-BLOCK_DENSITY                                 |
    |             |                |-E[ND]=integer                                 |
-   |L[OAD]       |file-name       |                                               |
-   |             |                |-FI[LLFACTOR]=integer                          |
+   |L[OAD]       |file-name       |-FI[LLFACTOR]=integer                          |
    |             |                |-FO[RMAT]=GO|B[INARY]|Z[WR]                    |
    |             |                |-S[TDIN]                                       |
+   |             |                |-O[NERROR]                                     |
    |-------------+----------------+-----------------------------------------------|
    |             |                |-DOWNGRADE                                     |
    |             |                |-E[XCLUDE]=global-name-list                    |
@@ -7222,9 +7308,11 @@
    |RE[STORE]    |file-name or    |-[NO]E[XTEND]                                  |
    |             |file-list       |                                               |
    |-------------+----------------+-----------------------------------------------|
-   |             |file-name or    |-F[ILE]                                        |
+   |             |                |-F[ILE]                                        |
+   |             |file-name or    |-R[EGION]                                      |
    |RU[NDOWN]    |region-name     |                                               |
-   |             |                |-R[EGION]                                      |
+   |             |                |-RELINKCTL [dir]                               |
+   |             |                |-OVERRIDE                                      |
    |-------------+----------------+-----------------------------------------------|
    |             |                |-A[CCESS_METHOD=BG|MM]                         |
    |             |                |-B[YPASS]                                      |
@@ -7248,6 +7336,12 @@
    |             |                |-V[ERSION]=V4|V5                               |
    |             |                |-W[AIT_DISK]=integer                           |
    |-------------+----------------+-----------------------------------------------|
+   |             |                |-TRIG[GERFILE]=<trigger_definitions_file>      |
+   |             |                |-NOPR[OMPT]                                    |
+   |TRIGGER      |-               |                                               |
+   |             |                |-SELE[CT][=name-list|*][<select-output-file>]  |
+   |             |                |-UPGRADE                                       |
+   |-------------+----------------+-----------------------------------------------|
    |ST[OP]       |process-id      |process-id                                     |
    |-------------+----------------+-----------------------------------------------|
    |UP[GRADE]    |-               |-                                              |
@@ -7336,12 +7430,12 @@
    |                                      |                          |-[NO]ER[ROR_LIMIT]=integer]               |
    |                                      |                          |-FENCES=fence-option-list                 |
    |                                      |                          |-FULL                                     |
-   |-EXTRACT                              |JOURNAL                   |                                          |
-   |                                      |                          |-GLOBAL=<global_list>                     |
+   |-EXTRACT                              |JOURNAL                   |-GLOBAL=<global_list>                     |
    |                                      |                          |-ID=<pid_list>                            |
    |                                      |                          |-INTERACTIVE                              |
    |                                      |                          |-LOOKBACK_LIMIT=<lookback_limit_options>  |
    |                                      |                          |-LOSTTRANS[=file]                         |
+   |                                      |                          |-REGION                                   |
    |                                      |                          |-SINCE=time                               |
    |                                      |                          |-VERBOSE                                  |
    |                                      |                          |-VERIFY                                   |
@@ -7410,7 +7504,7 @@
 1 Copyright
    Copyright
 
-   Copyright 2014
+   Copyright 2015
 
    Fidelity National Information Services, Inc. and/or its subsidiaries. All
    rights reserved.
@@ -7432,7 +7526,7 @@
 
    **Note**
 
-   This help file is a concise representation of revision V6.2-001 of the
+   This help file is a concise representation of revision V6.2-002 of the
    UNIX Administration and Operations Guide. To obtain a copy of the current
    revision, go to www.fis-gtm.com and then click on the User Documentation
    tab.
diff --git a/sr_port/mupip_backup.c b/sr_port/mupip_backup.c
index 46c377a..86b8c4d 100644
--- a/sr_port/mupip_backup.c
+++ b/sr_port/mupip_backup.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -225,9 +226,7 @@ void mupip_backup_call_on_signal(void)
  */
 #define UPDATE_GBL_JREC_TIME												\
 {															\
-	if (JNL_ENABLED(cs_data)											\
-		UNIX_ONLY( && (0 != cs_addrs->nl->jnl_file.u.inode))							\
-		VMS_ONLY( && (0 != memcmp(cs_addrs->nl->jnl_file.jnl_file_id.fid, zero_fid, SIZEOF(zero_fid)))))	\
+	if (JNL_ENABLED(cs_data))											\
 	{														\
 		jpc = cs_addrs->jnl;											\
 		jbp = jpc->jnl_buff;											\
@@ -285,7 +284,6 @@ void mupip_backup(void)
 	int			user_id;
 	int			group_id;
 	int			perm;
-	struct perm_diag_data	pdd;
 	pid_t			*kip_pids_arr_ptr;
 #	elif defined(VMS)
 	struct FAB		temp_fab;
@@ -700,26 +698,13 @@ void mupip_backup(void)
 			/* give temporary files the group and permissions as other shared resources - like journal files */
 			FSTAT_FILE(((unix_db_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fd, &stat_buf, fstat_res);
 			if (-1 != fstat_res)
-				if (gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_FILE, &pdd) < 0)
-				{
-					send_msg_csa(CSA_ARG(cs_addrs) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-						ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("backup file"),
-						RTS_ERROR_STRING(
-							((unix_db_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fn),
-						PERMGENDIAG_ARGS(pdd));
-					gtm_putmsg_csa(CSA_ARG(cs_addrs) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-						ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("backup file"),
-						RTS_ERROR_STRING(
-							((unix_db_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fn),
-						PERMGENDIAG_ARGS(pdd));
-					mubclnup(rptr, need_to_del_tempfile);
-					mupip_exit(EPERM);
-				}
-			/* setup new group and permissions if indicated by the security rules.  Use
+				gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_FILE);
+			/* Setup new group and permissions if indicated by the security rules.  Use
 			 * 0770 anded with current mode for the new mode if masked permission selected.
 			 */
 			if ((-1 == fstat_res) || (-1 == FCHMOD(rptr->backup_fd, perm))
-				|| (((-1 != user_id) || (-1 != group_id)) && (-1 == fchown(rptr->backup_fd, user_id, group_id))))
+				|| (((INVALID_UID != user_id) || (INVALID_GID != group_id))
+					&& (-1 == fchown(rptr->backup_fd, user_id, group_id))))
 			{
 				status = errno;
 				gtm_putmsg_csa(CSA_ARG(cs_addrs) VARLSTCNT(1) status);
@@ -1322,10 +1307,7 @@ repl_inst_bkup_done2:
 							assert(jnl_info.fn_len == gds_info->fab->fab$b_fns);
 							assert(0 == memcmp(jnl_info.fn, gds_info->fab->fab$l_fna, jnl_info.fn_len));
 						)
-						if (JNL_ENABLED(cs_data) &&
-							UNIX_ONLY((0 != cs_addrs->nl->jnl_file.u.inode))
-							VMS_ONLY((0 != memcmp(cs_addrs->nl->jnl_file.jnl_file_id.fid,
-									zero_fid, SIZEOF(zero_fid)))))
+						if (JNL_ENABLED(cs_data) && (0 != cs_addrs->nl->jnl_file.u.inode))
 						{	/* Note: following will again call wcs_flu() */
 							if (SS_NORMAL != (status = set_jnl_file_close(SET_JNL_FILE_CLOSE_BACKUP)))
 							{
diff --git a/sr_port/mupip_extend.c b/sr_port/mupip_extend.c
index 0be62ed..55f1073 100644
--- a/sr_port/mupip_extend.c
+++ b/sr_port/mupip_extend.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -75,21 +76,12 @@ void mupip_extend(void)
 	uint4		bplmap, bit_maps, blocks, i, old_total, total, status;
 	int4		tblocks;
 	int		fd;
+	boolean_t	defer_alloc;
 
 	r_len = SIZEOF(regionname);
 	UNIX_ONLY(jnlpool_init_needed = TRUE);
 	if (cli_get_str("REG_NAME", regionname, &r_len) == FALSE)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MUNODBNAME);
-	if (cli_get_int("BLOCKS",&tblocks))
-	{
-		if (tblocks < 1)
-		{
-			util_out_print("!/BLOCKS too small, no extension done",TRUE);
-			mupip_exit(ERR_MUNOACTION);
-		}
-		blocks = tblocks;
-	} else
-		blocks = (uint4)-1;
 	gvinit();
 	for (i = 0, gv_cur_region = gd_header->regions; i < gd_header->n_regions; i++, gv_cur_region++)
 	{
@@ -133,8 +125,21 @@ void mupip_extend(void)
 	}
 	cs_addrs = &FILE_INFO(gv_cur_region)->s_addrs;
 	cs_data = cs_addrs->hdr;
-	if ((uint4)-1 == blocks)
+#	if defined(__sun) || defined(__hpux)
+	cs_data->defer_allocate = TRUE;
+#	endif
+	defer_alloc = cs_data->defer_allocate;
+	if (cli_get_int("BLOCKS",&tblocks))
+	{	/* tblocks can be 0 if defer_alloc is FALSE because the goal is to fully allocate an existing database */
+		if ((tblocks < 0) || (defer_alloc && (tblocks == 0)))
+		{
+			util_out_print("!/BLOCKS too small, no extension done",TRUE);
+			mupip_exit(ERR_MUNOACTION);
+		}
+		blocks = tblocks;
+	} else
 	{
+		blocks = (uint4)-1;
 		if (cs_addrs->hdr->extension_size == 0)
 		{
 			util_out_print("The extension size on file !AD is zero, no extension done.",TRUE,
@@ -173,7 +178,7 @@ void mupip_extend(void)
 			rel_crit(gv_cur_region);
 			break;
 		default:
-			GTMASSERT;
+			assertpro(dba_bg == gv_cur_region->dyn.addr->acc_meth || dba_mm == gv_cur_region->dyn.addr->acc_meth);
 	}
 	util_out_print("Extension successful, file !AD extended by !UL blocks.  Total blocks = !UL.",TRUE,
 		DB_LEN_STR(gv_cur_region), total - old_total - bit_maps, total - DIVIDE_ROUND_UP(total, bplmap));
diff --git a/sr_port/mupip_reorg.c b/sr_port/mupip_reorg.c
index 9a71307..fe178ed 100644
--- a/sr_port/mupip_reorg.c
+++ b/sr_port/mupip_reorg.c
@@ -1,6 +1,7 @@
 /***************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -244,7 +245,6 @@ void mupip_reorg(void)
 	}
 	TREF(want_empty_gvts) = FALSE;
 
-	root_swap_statistic = 0;
 	mu_reorg_process = TRUE;
 	assert(NULL == gv_currkey_next_reorg);
 	GVKEYSIZE_INIT_IF_NEEDED;	/* sets "gv_keysize", "gv_currkey" and "gv_altkey" (if not already done) */
@@ -273,7 +273,6 @@ void mupip_reorg(void)
 #		ifdef GTM_TRUNCATE
 		if (truncate)
 		{	/* No need to move root blocks unless truncating */
-			cur_success &= mu_swap_root(gl_ptr, &root_swap_statistic);
 			assert(gv_cur_region == gl_ptr->reg);	/* should have been set inside "mu_reorg" call done above */
 			if (cur_success)
 			{	/* add region corresponding to this global to the set (list) of regions to truncate */
@@ -311,13 +310,6 @@ void mupip_reorg(void)
 							cur_success = mu_reorg(&hasht_gl, &exclude_gl_head, &resume,
 										index_fill_factor, data_fill_factor, reorg_op);
 							reorg_success &= cur_success;
-							SET_GV_CURRKEY_FROM_GVT(reorg_gv_target);
-							/* Recompute gv_target->root in case mu_reorg changed things around */
-							gv_target->root = 0;
-							inctn_opcode = inctn_invalid_op;	/* needed for GVCST_ROOT_SEARCH */
-							GVCST_ROOT_SEARCH;	/* set gv_target->root */
-							if (gv_target->root)
-								reorg_success &= mu_swap_root(&hasht_gl, &root_swap_statistic);
 						}
 					}
 #					endif
@@ -339,6 +331,28 @@ void mupip_reorg(void)
 	else if (truncate)
 	{
 #		ifdef GTM_TRUNCATE
+		/* Move GVT ROOT blocks of all global names AFTER doing regular reorg on ALL global names.
+		 * This way we ensure one pass of reorg -truncate is enough to produce an optimally truncated file.
+		 */
+		root_swap_statistic = 0;
+		for (gl_ptr = gl_head.next; gl_ptr; gl_ptr = gl_ptr->next)
+			mu_swap_root(gl_ptr, &root_swap_statistic);
+		hasht_gl.next = NULL;
+		for (reg_iter = reg_list; reg_iter; reg_iter = reg_iter->next)
+		{
+			gv_cur_region = reg_iter->reg;
+			tp_change_reg();
+			SET_GVTARGET_TO_HASHT_GBL(cs_addrs);	/* sets gv_target */
+			SET_GV_CURRKEY_FROM_GVT(gv_target);
+			gv_target->root = 0; /* Recompute gv_target->root in case mu_reorg changed things around */
+			inctn_opcode = inctn_invalid_op;	/* needed for GVCST_ROOT_SEARCH */
+			GVCST_ROOT_SEARCH;			/* set gv_target->root */
+			if (0 == gv_target->root)
+				continue;
+			hasht_gl.reg = gv_cur_region;
+			hasht_gl.gvt = gv_target;
+			mu_swap_root(&hasht_gl, &root_swap_statistic);
+		}
 		util_out_print("Total root blocks moved: !UL", FLUSH, root_swap_statistic);
 		mu_reorg_process = FALSE;
 		/* Default threshold is 0 i.e. we attempt to truncate no matter what free_blocks is. */
diff --git a/sr_port/mupip_reorg.h b/sr_port/mupip_reorg.h
index 3ece520..973cd38 100644
--- a/sr_port/mupip_reorg.h
+++ b/sr_port/mupip_reorg.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,7 +17,7 @@
 boolean_t mu_reorg(glist *gl_ptr, glist *exclude_glist_ptr, boolean_t *resume,
 			int index_fill_factor, int data_fill_factor, int reorg_op);
 # ifdef UNIX
-boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr);
+void	 mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr);
 block_id swap_root_or_directory_block(int parent_blk_lvl, int level, srch_hist *dir_hist_ptr, block_id child_blk_id,
 		sm_uc_ptr_t child_blk_ptr, kill_set *kill_set_list, trans_num curr_tn);
 # endif
diff --git a/sr_port/mupip_set.c b/sr_port/mupip_set.c
index 8b0b19e..11b7ddf 100644
--- a/sr_port/mupip_set.c
+++ b/sr_port/mupip_set.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -91,12 +92,16 @@ void mupip_set(void)
 	    cli_present("LOCK_SPACE")      	== CLI_PRESENT  ||
 	    cli_present("MUTEX_SLOTS")      	== CLI_PRESENT  ||
 	    cli_present("DEFER_TIME")      	== CLI_PRESENT  ||
+	    cli_present("DEFER_ALLOCATE")	== CLI_PRESENT  ||
+	    cli_present("DEFER_ALLOCATE")	== CLI_NEGATED  ||
 	    cli_present("WAIT_DISK")		== CLI_PRESENT  ||
 	    cli_present("PARTIAL_RECOV_BYPASS")	== CLI_PRESENT  ||
 #	    ifdef UNIX
 	    cli_present("KEY_SIZE")		== CLI_PRESENT  ||
 	    cli_present("QDBRUNDOWN")		== CLI_PRESENT  ||
 	    cli_present("QDBRUNDOWN")		== CLI_NEGATED  ||
+	    cli_present("EPOCHTAPER")		== CLI_PRESENT  ||
+	    cli_present("EPOCHTAPER")		== CLI_NEGATED  ||
 	    cli_present("RECORD_SIZE")		== CLI_PRESENT  ||
 #	    endif
 	    cli_present("VERSION")		== CLI_PRESENT)
diff --git a/sr_port/mupip_set_journal.c b/sr_port/mupip_set_journal.c
index 4f44173..8af52f3 100644
--- a/sr_port/mupip_set_journal.c
+++ b/sr_port/mupip_set_journal.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -316,9 +317,7 @@ uint4	mupip_set_journal(unsigned short db_fn_len, char *db_fn)
 			 * jgbl.gbl_jrec_time at the end of this loop will be used to write journal records for ALL
 			 * regions so all regions will have same eov/bov timestamps.
 			 */
-			if (JNL_ENABLED(cs_data)
-				UNIX_ONLY( && (0 != cs_addrs->nl->jnl_file.u.inode))
-				VMS_ONLY( && (0 != memcmp(cs_addrs->nl->jnl_file.jnl_file_id.fid, zero_fid, SIZEOF(zero_fid)))))
+			if (JNL_ENABLED(cs_data))
 			{
 				jpc = cs_addrs->jnl;
 				jbp = jpc->jnl_buff;
@@ -458,14 +457,14 @@ uint4	mupip_set_journal(unsigned short db_fn_len, char *db_fn)
 							jnl_info.jnl_len, jnl_info.jnl);
 				exit_status |= EXIT_ERR;
 				break;
-#ifdef UNIX
+#			ifdef UNIX
 			} else if (jnl_info.alloc + jnl_info.extend > jnl_info.autoswitchlimit
 					&& jnl_info.alloc != jnl_info.autoswitchlimit)
 			{
 				gtm_putmsg_csa(CSA_ARG(cs_addrs) VARLSTCNT(8) ERR_JNLALLOCGROW, 6, jnl_info.alloc,
 						jnl_info.autoswitchlimit, "database file", DB_LEN_STR(gv_cur_region));
 				jnl_info.alloc = jnl_info.autoswitchlimit;
-#endif
+#			endif
 			} else
 			{
 				align_autoswitch = ALIGNED_ROUND_DOWN(jnl_info.autoswitchlimit, jnl_info.alloc, jnl_info.extend);
diff --git a/sr_port/mur_back_process.c b/sr_port/mur_back_process.c
index 0061e6e..f6f65e4 100644
--- a/sr_port/mur_back_process.c
+++ b/sr_port/mur_back_process.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -564,8 +565,15 @@ uint4	mur_back_processing_one_region(mur_back_opt_t *mur_back_options)
 		 */
 		if (JRT_EPOCH == rectype)
 		{
-			if (!mur_options.forward && first_epoch && !rctl->recov_interrupted &&
-				(NULL != rctl->csd) && (rec_tn > rctl->csd->trans_hist.curr_tn))
+			/* If this is the first EPOCH in backward processing, check that the epoch-tn is <= db curr_tn.
+			 * One exception though is if a rollback/recover takes the db back in time (using say -resync_seqno)
+			 * in backward processing and applies a few transactions in the forward phase but gets killed
+			 * abruptly leaving the db curr_tn potentially < earliest_epoch_tn from before the interrupted recovery.
+			 * In this case we would have applied PBLKs from the interrupted recovery first before coming here
+			 * hence the check for a NULL rctl->jctl_apply_pblk in which case we skip the tn check.
+			 */
+			if (!mur_options.forward && first_epoch && !rctl->recov_interrupted && (NULL == rctl->jctl_apply_pblk)
+				&& (NULL != rctl->csd) && (rec_tn > rctl->csd->trans_hist.curr_tn))
 			{
 				assert(FALSE);
 				gtm_putmsg_csa(CSA_ARG(rctl->csa) VARLSTCNT(7) ERR_EPOCHTNHI, 5, jctl->rec_offset,
diff --git a/sr_port/mur_close_files.c b/sr_port/mur_close_files.c
index cf9041a..e359e91 100644
--- a/sr_port/mur_close_files.c
+++ b/sr_port/mur_close_files.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2003, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2003-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,17 +15,10 @@
 #include "gtmio.h"
 #include "gtm_string.h"
 #include "gtm_time.h"
-#if defined(UNIX)
-#include <sys/shm.h>
 #include "gtm_unistd.h"
-#elif defined(VMS)
-#include <rms.h>
-#include <iodef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include <efndef.h>
-#include "iosb_disk.h"
-#endif
+
+#include <sys/shm.h>
+
 #include "gdsroot.h"
 #include "gtm_rename.h"
 #include "gdsblk.h"
@@ -46,7 +40,6 @@
 #include "file_head_read.h"
 #include "file_head_write.h"
 #include "have_crit.h"
-#if defined(UNIX)
 #include "repl_msg.h"
 #include "gtmsource.h"
 #include "gtmrecv.h"
@@ -59,7 +52,6 @@
 #include <signal.h>
 #include "anticipatory_freeze.h"
 #include "ipcrmid.h"
-#endif
 #include "util.h"
 #ifdef DEBUG
 #include "wbox_test_init.h"
@@ -90,12 +82,13 @@ GBLREF	char			*jnl_state_lit[];
 GBLREF	char			*repl_state_lit[];
 GBLREF	boolean_t		mupip_exit_status_displayed;
 GBLREF	boolean_t		mur_close_files_done;
-#ifdef UNIX
 GBLREF	jnlpool_addrs		jnlpool;
 GBLREF	uint4			process_id;
 GBLREF	boolean_t		holds_sem[NUM_SEM_SETS][NUM_SRC_SEMS];
 GBLREF	jnlpool_ctl_ptr_t	jnlpool_ctl;
 GBLREF	sgmnt_data		*cs_data;
+#ifdef DEBUG
+GBLREF	boolean_t		exiting_on_dev_out_error;
 #endif
 
 error_def(ERR_FILERENAME);
@@ -115,9 +108,8 @@ error_def(ERR_RENAMEFAIL);
 error_def(ERR_REPLPOOLINST);
 error_def(ERR_REPLSTATE);
 error_def(ERR_NOTALLDBRNDWN);
-UNIX_ONLY(error_def(ERR_REPLFTOKSEM);)
-UNIX_ONLY(error_def(ERR_RLBKSTRMSEQ);)
-VMS_ONLY(error_def(ERR_SETREG2RESYNC);)
+error_def(ERR_REPLFTOKSEM);
+error_def(ERR_RLBKSTRMSEQ);
 
 boolean_t mur_close_files(void)
 {
@@ -131,9 +123,6 @@ boolean_t mur_close_files(void)
 	uint4			ustatus;
 	int4			status;
 	int4			rundown_status = EXIT_NRM;		/* if gds_rundown went smoothly */
-#	if defined(VMS)
-	boolean_t		set_resync_to_region = FALSE;
-#	elif defined(UNIX)
 	int			idx, finish_err_code, save_errno;
 	const char		*fini_str = NULL;
 	const char		*termntd_str;
@@ -149,8 +138,10 @@ boolean_t mur_close_files(void)
 	gtmsource_local_ptr_t	gtmsourcelocal_ptr;
 	global_latch_t		*latch;
 	seq_num			max_zqgblmod_seqno = 0, last_histinfo_seqno;
+	jnl_private_control	*jpc;
+	jnl_buffer_ptr_t	jb;
+	uint4			jnl_status;
 	DEBUG_ONLY(int		semval;)
-#	endif
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -170,7 +161,6 @@ boolean_t mur_close_files(void)
 	 * instead of simulating GT.M activity. Reset jgbl.dont_reset_gbl_jrec_time to allow for adjustments to gbl_jrec_time.
 	 */
 	jgbl.dont_reset_gbl_jrec_time = FALSE;
-#	ifdef UNIX
 	if (mur_options.rollback)
 		memset(&max_strm_seqno[0], 0, SIZEOF(max_strm_seqno));
 	anticipatory_freeze_available = INST_FREEZE_ON_ERROR_POLICY;
@@ -185,10 +175,10 @@ boolean_t mur_close_files(void)
 	}
 	assert(!murgbl.incr_db_rlbkd_cycle || murgbl.incr_onln_rlbk_cycle);
 	assert(jnlpool.jnlpool_ctl == jnlpool_ctl);
-#if 0
+#	if 0
 	/* disable assertion until we make jnlpool_init conditional on anticipatory freeze available */
 	assert(jgbl.onlnrlbk || (NULL == jnlpool_ctl));
-#endif
+#	endif
 	assert((NULL == jnlpool_ctl) || (TRUE == inst_hdr->crash));
 	assert((NULL == jnlpool_ctl) || jgbl.onlnrlbk || anticipatory_freeze_available);
 	if (NULL != jnlpool_ctl)
@@ -196,13 +186,12 @@ boolean_t mur_close_files(void)
 		csa = &FILE_INFO(jnlpool.jnlpool_dummy_reg)->s_addrs;
 		ASSERT_VALID_JNLPOOL(csa);
 	}
-#	endif
 	for (rctl = mur_ctl, rctl_top = mur_ctl + murgbl.reg_full_total; rctl < rctl_top; rctl++)
 	{
 		/* If online rollback, external signals are blocked the first time we touch the database with a PBLK. So, if ever
 		 * we come here with online rollback and the database was updated, then we better have a clean exit state.
 		 */
-		UNIX_ONLY(assert(!rctl->db_updated || murgbl.clean_exit || !jgbl.onlnrlbk));
+		assert(!rctl->db_updated || murgbl.clean_exit || !jgbl.onlnrlbk);
 		reg = rctl->gd;
 		/* reg could be NULL at this point in some rare cases (e.g. if we come to mur_close_files through
 		 * deferred_signal_handler as part of call_on_signal invocation and run down this region but encounter
@@ -228,34 +217,27 @@ boolean_t mur_close_files(void)
 			 */
 			assert((NULL != rctl->csa) && (rctl->csa == cs_addrs) || (NULL == rctl->csa) && !murgbl.clean_exit);
 			csa = cs_addrs;
-			csd = VMS_ONLY(TRUE || ) mur_options.forward ? &csd_temp : csa->hdr;
+			csd = mur_options.forward ? &csd_temp : csa->hdr;
 			assert(NULL != csa);
 			if (mur_options.update && JNL_ENABLED(rctl))
 				csa->jnl->pini_addr = 0; /* Stop simulation of GTM process journal record writing */
 			if (NULL != rctl->jctl && murgbl.clean_exit && mur_options.rollback && !mur_options.rollback_losttnonly)
 			{	/* to write proper jnl_seqno in epoch record */
 				assert(murgbl.losttn_seqno >= murgbl.consist_jnl_seqno);
-				UNIX_ONLY(assert(murgbl.consist_jnl_seqno);)
-				if (murgbl.consist_jnl_seqno) /* can be zero if this command is a no-operation in VMS */
-					jgbl.mur_jrec_seqno = csa->hdr->reg_seqno = murgbl.consist_jnl_seqno;
-				VMS_ONLY(
-					if (rctl->jctl->jfh->crash && rctl->jctl->jfh->update_disabled)
-						/* Set resync_to_region seqno for a crash and update_disable case */
-						set_resync_to_region = TRUE;
-				)
+				assert(murgbl.consist_jnl_seqno);
+				jgbl.mur_jrec_seqno = csa->hdr->reg_seqno = murgbl.consist_jnl_seqno;
 			}
 			assert(NULL != csa->nl);
 			assert((!(mur_options.update ^ csa->nl->donotflush_dbjnl)) || !murgbl.clean_exit);
 			if (mur_options.update && (murgbl.clean_exit || !rctl->db_updated) && (NULL != csa->nl))
 				csa->nl->donotflush_dbjnl = FALSE;	/* shared memory is now clean for dbjnl flushing */
-			if (UNIX_ONLY(mur_options.forward) VMS_ONLY(TRUE))
-				UNIX_ONLY(rundown_status =) gds_rundown();
+			if (mur_options.forward)
+				rundown_status = gds_rundown();
 			if (EXIT_NRM != rundown_status)
 			{
 				wrn_count++;
 				continue;
 			}
-#			ifdef UNIX
 			assert(!jgbl.onlnrlbk || (csa->now_crit && csa->hold_onto_crit)
 					|| (!murgbl.clean_exit && !rctl->db_updated));
 			if (jgbl.onlnrlbk)
@@ -279,16 +261,15 @@ boolean_t mur_close_files(void)
 					incr_jnlpool_rlbk_cycle = FALSE;
 				}
 			}
-#			endif
 			if (rctl->standalone && (murgbl.clean_exit || !rctl->db_updated) && !reg->read_only)
 			{
 				status = FALSE;
-				if (UNIX_ONLY(mur_options.forward) VMS_ONLY(TRUE))
+				if (mur_options.forward)
 					status = file_head_read((char *)reg->dyn.addr->fname, csd, SIZEOF(csd_temp));
-				if (VMS_ONLY(status) UNIX_ONLY(!mur_options.forward || status))
+				if (!mur_options.forward || status)
 				{
 					assert(mur_options.update);
-					/* For VMS and RECOVER -FORWARD, we are done with gds_rundown at this point and so have
+					/* For MUPIP JOURNAL RECOVER -FORWARD, we are done "gds_rundown" at this point and so have
 					 * a clean database state at this point. For RECOVER/ROLLBACK -BACKWARD, even though we
 					 * haven't done the gds_rundown yet, we still hold the standalone access and so no new
 					 * process can attach to the database. For the -ONLINE version of RECOVER/ROLLBACK
@@ -314,7 +295,6 @@ boolean_t mur_close_files(void)
 							gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_JNLSTATE, 6,
 								LEN_AND_LIT(FILE_STR), DB_LEN_STR(reg),
 								LEN_AND_STR(jnl_state_lit[csd->jnl_state]));
-#						ifdef UNIX
 						if ((NULL != rctl->jctl) && !mur_options.rollback_losttnonly)
 						{
 							if (mur_options.rollback)
@@ -323,7 +303,10 @@ boolean_t mur_close_files(void)
 								csd->reg_seqno = murgbl.consist_jnl_seqno;
 								/* Ensure zqgblmod_seqno never goes above the current reg_seqno.
 								 * Also ensure it gets set to non-zero value if instance was former
-								 * root primary and this is a fetchresync rollback.
+								 * root primary and this is a fetchresync rollback (needed not
+								 * for $zqgblmod processing but instead to store the fact that a
+								 * losttn_complete is pending in this instance and until that is
+								 * done, this instance cannot become a tertiary).
 								 */
 								if ((csd->zqgblmod_seqno > murgbl.consist_jnl_seqno)
 									|| (!csd->zqgblmod_seqno
@@ -355,25 +338,6 @@ boolean_t mur_close_files(void)
 							csd->save_strm_reg_seqno[idx] = 0;
 							csd->intrpt_recov_resync_strm_seqno[idx] = 0;
 						}
-#						else
-						if ((NULL != rctl->jctl)
-							&& mur_options.rollback
-							&& !mur_options.rollback_losttnonly
-							&& murgbl.consist_jnl_seqno)
-						{
-							if (set_resync_to_region)
-							{
-								csd->resync_seqno = csd->reg_seqno;
-								if (mur_options.verbose)
-									gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_SETREG2RESYNC,
-										4, &csd->resync_seqno, &csd->reg_seqno,
-										DB_LEN_STR(reg));
-							}
-							csd->reg_seqno = murgbl.consist_jnl_seqno;
-							if (csd->resync_seqno > murgbl.consist_jnl_seqno)
-								csd->resync_seqno = murgbl.consist_jnl_seqno;
-						}
-#						endif
 						csd->intrpt_recov_resync_seqno = 0;
 						csd->intrpt_recov_tp_resolve_time = 0;
 						csd->intrpt_recov_jnl_state = jnl_notallowed;
@@ -420,7 +384,30 @@ boolean_t mur_close_files(void)
 			} /* else do not restore state */
 			if (rctl->standalone && !mur_options.forward && !mur_options.rollback_losttnonly
 				&& murgbl.clean_exit && (NULL != rctl->jctl_turn_around))
-			{	/* some backward processing and possibly forward processing was done. do some cleanup */
+			{	/* Some backward processing and possibly forward processing was done. do some cleanup */
+				/* It is possible forward processing did updates and wrote to newly created journal files.
+				 * If so, make sure those are hardened to disk BEFORE destroying information maintained in
+				 * the journal files to help with interrupted-recovery/rollback (next_jnl_file_name field etc.)
+				 * just in case this rollback/recover gets killed before it completes.
+				 */
+				was_crit = csa->now_crit;
+				if (!was_crit)
+					grab_crit(reg);
+				assert(JNL_ENABLED(csd));
+				jnl_status = jnl_ensure_open();
+				assert(0 == jnl_status);
+				if (0 == jnl_status)
+				{
+					jpc = csa->jnl;
+					assert(NOJNL != jpc->channel);
+					jb = jpc->jnl_buff;
+					jnl_flush(reg);
+					assert(jb->freeaddr == jb->dskaddr);
+					jnl_fsync(reg, jb->dskaddr);
+					assert(jb->fsync_dskaddr == jb->dskaddr);
+				}
+				if (!was_crit)
+					rel_crit(reg);
 				assert(NULL == rctl->jctl_turn_around || NULL != rctl->jctl_head);
 				jctl = rctl->jctl_turn_around;
 				head_jnl_fn_len = jctl->jnl_fn_len;
@@ -522,7 +509,7 @@ boolean_t mur_close_files(void)
 					rename_fn = fn;
 					prepare_unique_name((char *)end_jctl->jnl_fn, end_jctl->jnl_fn_len,
 						PREFIX_ROLLED_BAK, "", rename_fn, &rename_fn_len, 0, &ustatus);
-					UNIX_ONLY(WAIT_FOR_REPL_INST_UNFREEZE_SAFE(csa));
+					WAIT_FOR_REPL_INST_UNFREEZE_SAFE(csa);
 						/* wait for instance freeze before journal file renames */
 					if (SS_NORMAL == gtm_rename((char *)end_jctl->jnl_fn, end_jctl->jnl_fn_len,
 									rename_fn, rename_fn_len, &ustatus))
@@ -538,7 +525,6 @@ boolean_t mur_close_files(void)
 				} /* end for */
 			}
 		} /* end if (reg->open) */
-		VMS_ONLY(rctl->csa = NULL;)
 		for (jctl = rctl->jctl_head; NULL != jctl; )
 		{	/* NULL value of jctl_head possible if we errored out in mur_open_files() before constructing jctl list.
 			 * Similarly jctl->reg_ctl could be NULL in such cases. We use murgbl.clean_exit to check for that.
@@ -550,15 +536,7 @@ boolean_t mur_close_files(void)
 				wrn_count++;	/* mur_fclose() would have done the appropriate gtm_putmsg() */
 		}
 		rctl->jctl_head = NULL;	/* So that we do not come to above loop again */
-#		ifdef VMS
-		rctl->gd = NULL;
-		if (NULL != rctl->mur_desc)	  /* mur_desc buffers were allocated at mur_open_files time for this region */
-			mur_rctl_desc_free(rctl); /* free them up now */
-		assert(NULL == rctl->mur_desc);
-#		endif
 	}
-
-#	ifdef UNIX
 	/* If rollback, we better have the standalone lock. The only exception is if we could not get standalone access
 	 * (due to some other process still accessing the instance file and/or db/jnl). In that case "clean_exit" should be FALSE.
 	 */
@@ -710,7 +688,7 @@ boolean_t mur_close_files(void)
 			TP_CHANGE_REG(reg);
 			assert(!jgbl.onlnrlbk || (cs_addrs->now_crit && cs_addrs->hold_onto_crit) || !murgbl.clean_exit);
 			assert(!rctl->standalone || (1 == (semval = semctl(udi->semid, 0, GETVAL))));
-			UNIX_ONLY(rundown_status =) gds_rundown(); /* does the final rel_crit */
+			rundown_status = gds_rundown(); /* does the final rel_crit */
 			if (EXIT_NRM != rundown_status)
 				wrn_count++;
 			assert((EXIT_NRM != rundown_status) || !rctl->standalone
@@ -721,7 +699,7 @@ boolean_t mur_close_files(void)
 		 * successfully for this region. Increment wrn_count in this case
 		 */
 		assert(!mur_options.update || rctl->standalone || !murgbl.clean_exit);
-		if (rctl->standalone UNIX_ONLY(&& EXIT_NRM == rundown_status))
+		if (rctl->standalone && (EXIT_NRM == rundown_status))
 			/* Avoid db_ipcs_reset if gds_rundown did not remove shared memory */
 			if ((NULL != udi) && !udi->new_shm && !db_ipcs_reset(reg))
 				wrn_count++;
@@ -732,7 +710,6 @@ boolean_t mur_close_files(void)
 			mur_rctl_desc_free(rctl); /* free them up now */
 		assert(NULL == rctl->mur_desc);
 	}
-
 	if (mur_options.rollback && murgbl.repl_standalone)
 	{
 		udi = FILE_INFO(jnlpool.jnlpool_dummy_reg);
@@ -863,7 +840,6 @@ boolean_t mur_close_files(void)
 					LEN_AND_STR(inst_hdr->inst_info.this_instname), LEN_AND_STR(udi->fn));
 		}
 	}
-#	endif
 	mur_close_file_extfmt();
 	mur_free();	/* free up whatever was allocated by "mur_init" */
 	if (wrn_count)
@@ -873,7 +849,8 @@ boolean_t mur_close_files(void)
 		 * The || in the assert below is to take care of a white-box test that primarily tests the
 		 * WBTEST_TP_HIST_CDB_SC_BLKMOD scenario but also induces a secondary WBTEST_MUR_ABNORMAL_EXIT_EXPECTED scenario.
 		 * WBTEST_JNL_FILE_OPEN_FAIL and WBTEST_JNL_CREATE_FAIL are also accepted since the impossibility to create a
-		 * journal file will induce a recovery failure.
+		 * journal file will induce a recovery failure. Another possibility is that we failed to write something (for
+		 * instance, due to a broken pipe) and ended up coming here.
 		 */
 		assert(gtm_white_box_test_case_enabled
 			&& ((WBTEST_MUR_ABNORMAL_EXIT_EXPECTED == gtm_white_box_test_case_number)
@@ -882,7 +859,8 @@ boolean_t mur_close_files(void)
 				|| (WBTEST_JNL_CREATE_FAIL == gtm_white_box_test_case_number)
 				|| (WBTEST_RECOVER_ENOSPC == gtm_white_box_test_case_number)
 				|| (WBTEST_FAIL_ON_SHMGET == gtm_white_box_test_case_number)
-				|| (WBTEST_WCS_FLU_FAIL == gtm_white_box_test_case_number)));
+				|| (WBTEST_WCS_FLU_FAIL == gtm_white_box_test_case_number))
+				|| exiting_on_dev_out_error);
 		assert(!murgbl.clean_exit);
 		if (murgbl.wrn_count)
 			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT (1) ERR_JNLACTINCMPLT);
@@ -893,7 +871,7 @@ boolean_t mur_close_files(void)
  	JNL_PUT_MSG_PROGRESS("End processing");
 	mupip_exit_status_displayed = TRUE;
 	mur_close_files_done = TRUE;
-#	if defined(UNIX) && defined(DEBUG)
+#	if defined(DEBUG)
 	if (WBTEST_ENABLED(WBTEST_RECOVER_ENOSPC) && (0 == gtm_white_box_test_case_count))
 		util_out_print("Total number of writes !UL",TRUE, gtm_wbox_input_test_case_count);
 #	endif
diff --git a/sr_port/mur_process_intrpt_recov.c b/sr_port/mur_process_intrpt_recov.c
index 6f3112f..510ac11 100644
--- a/sr_port/mur_process_intrpt_recov.c
+++ b/sr_port/mur_process_intrpt_recov.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2003, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2003-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -236,7 +237,7 @@ uint4 mur_process_intrpt_recov()
 			 * we are guaranteed that all the updates done in the forward processing will have a timestamp that is
 			 * greater than the turn around timestamp
 			 */
-			jbp->prev_jrec_time = jctl->turn_around_time;
+			SET_JNLBUFF_PREV_JREC_TIME(jbp, jctl->turn_around_time, DO_GBL_JREC_TIME_CHECK_FALSE);
 		} else if (dba_bg == csd->acc_meth)
 		{	/* set earliest bt TN to be the turn-around TN (taken from bt_refresh()) */
 			SET_OLDEST_HIST_TN(cs_addrs, cs_addrs->ti->curr_tn - 1);
@@ -321,7 +322,7 @@ uint4 mur_process_intrpt_recov()
 				 * recoveries got interrupted in this loop) that need to be reset.
 				 */
 				assert(!jctl->turn_around_offset);
-				assert(rctl->recov_interrupted);	/* rctl->jfh_recov_interrupted can fail */
+				assert(rctl->recov_interrupted || rctl->jctl_apply_pblk); /* rctl->jfh_recov_interrupted can fail */
 				jfh->turn_around_offset = 0;
 				jfh->turn_around_time = 0;
 				jfh_changed = TRUE;
diff --git a/sr_port/mv_stent.h b/sr_port/mv_stent.h
index adb3e5b..a9bc7e6 100644
--- a/sr_port/mv_stent.h
+++ b/sr_port/mv_stent.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -271,28 +272,6 @@ void push_stck(void* val, int val_size, void** addr, int mvst_stck_type);
 
 #define	IS_PTR_INSIDE_M_STACK(PTR)	(((unsigned char *)PTR < (sm_uc_ptr_t)stackbase) && ((unsigned char *)PTR > stacktop))
 
-#define PUSH_MVST_MRGZWRSV								\
-{											\
-	PUSH_MV_STENT(MVST_MRGZWRSV);							\
-	mv_st_ent = mv_chain;								\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_merge_args = merge_args;		\
-	merge_args = 0;									\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_zwrtacindx = zwrtacindx;		\
-	zwrtacindx = 0;									\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_in_zwrite = TREF(in_zwrite);		\
-	TREF(in_zwrite) = 0;								\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_mglvnp = mglvnp;			\
-	mglvnp = NULL;									\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_lvzwrite_block = lvzwrite_block;	\
-	lvzwrite_block = NULL;								\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_gvzwrite_block = gvzwrite_block;	\
-	gvzwrite_block = NULL;								\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_zwr_output = zwr_output;		\
-	zwr_output = NULL;								\
-	mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_zwrhtab = zwrhtab;			\
-	zwrhtab = NULL;									\
-}
-
 /* Declare those global variables and error messages that are used by the PUSH_MV_STENT and POP_MV_STENT macros */
 LITREF	unsigned char	mvs_size[];
 GBLREF	unsigned char	*stackbase, *stacktop, *stackwarn, *msp;
diff --git a/sr_port/new_stack_frame.c b/sr_port/new_stack_frame.c
index 1d471ab..e486324 100644
--- a/sr_port/new_stack_frame.c
+++ b/sr_port/new_stack_frame.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -32,6 +33,8 @@ void new_stack_frame(rhdtyp *rtn_base, unsigned char *context, unsigned char *tr
 	unsigned char		*msp_save;
 	unsigned int		x1, x2;
 
+	assert(NULL != rtn_base);
+	assert(NULL != transfer_addr);
 	assert((frame_pointer < frame_pointer->old_frame_pointer) || (NULL == frame_pointer->old_frame_pointer));
 	msp_save = msp;
 	sf = (stack_frame *)(msp -= SIZEOF(stack_frame));
@@ -40,9 +43,9 @@ void new_stack_frame(rhdtyp *rtn_base, unsigned char *context, unsigned char *tr
 		if (msp <= stacktop)
 		{
 			msp = msp_save;
-			rts_error(VARLSTCNT(1) ERR_STACKOFLOW);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_STACKOFLOW);
 		} else
-			rts_error(VARLSTCNT(1) ERR_STACKCRIT);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_STACKCRIT);
 	}
 	assert((unsigned char *)msp < stackbase);
 	sf->old_frame_pointer = frame_pointer;
@@ -55,9 +58,9 @@ void new_stack_frame(rhdtyp *rtn_base, unsigned char *context, unsigned char *tr
 	SET_GLVN_INDX(sf, GLVN_POOL_UNTOUCHED);
 	sf->ret_value = NULL;
 	sf->dollar_test = -1;
-#ifdef HAS_LITERAL_SECT
+#	ifdef HAS_LITERAL_SECT
 	sf->literal_ptr = (int4 *)LITERAL_ADR(rtn_base);
-#endif
+#	endif
 	sf->temp_mvals = sf->rvector->temp_mvals;
 	msp -= x1 = rtn_base->temp_size;
 	sf->temps_ptr = msp;
@@ -69,16 +72,17 @@ void new_stack_frame(rhdtyp *rtn_base, unsigned char *context, unsigned char *tr
 		if (msp <= stacktop)
 		{
 			msp = msp_save;
-			rts_error(VARLSTCNT(1) ERR_STACKOFLOW);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_STACKOFLOW);
 		} else
-			rts_error(VARLSTCNT(1) ERR_STACKCRIT);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_STACKCRIT);
 	}
 	assert(msp < stackbase);
 	memset(msp, 0, x1 + x2);
 	frame_pointer = sf;
 	assert((frame_pointer < frame_pointer->old_frame_pointer) || (NULL == frame_pointer->old_frame_pointer));
-	DBGEHND((stderr, "new_stack_frame: Added stackframe at addr 0x"lvaddr"  old-msp: 0x"lvaddr"  new-msp: 0x"lvaddr"\n",
-		 sf, msp_save, msp));
+	DBGEHND((stderr, "new_stack_frame: Added stackframe at addr 0x"lvaddr"  old-msp: 0x"lvaddr"  new-msp: 0x"lvaddr
+		 " for routine %.*s (rtnhdr 0x"lvaddr")\n", sf, msp_save, msp, rtn_base->routine_name.len,
+		 rtn_base->routine_name.addr, rtn_base));
 	return;
 }
 
diff --git a/sr_port/objlabel.h b/sr_port/objlabel.h
index 84abe5f..c43bae4 100644
--- a/sr_port/objlabel.h
+++ b/sr_port/objlabel.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -33,7 +34,7 @@
  * Note that OBJ_UNIX_LABEL and OBJ_PLATFORM_LABEL should not exceed 255.
  */
 
-#define OBJ_UNIX_LABEL	29	/* When changed, be sure to zero the platform specific numbers below (if any non-0) */
+#define OBJ_UNIX_LABEL	30	/* When changed, be sure to zero the platform specific numbers below (if any non-0) */
 
 #if defined(__osf__)
 #	define	OBJ_PLATFORM_LABEL	0		/* Alpha/Tru64 */
diff --git a/sr_port/op.h b/sr_port/op.h
index aad8bed..20db46e 100644
--- a/sr_port/op.h
+++ b/sr_port/op.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -28,6 +29,7 @@ void	op_break(void);
 void	op_cat(UNIX_ONLY_COMMA(int srcargs) mval *dst, ...);
 void	op_close(mval *v, mval *p);
 void	op_commarg(mval *v, unsigned char argcode);
+int	op_currhd(void);
 void	op_cvtparm(int iocode, mval *src, mval *dst);
 int	op_decrlock(int timeout);
 void	op_div(mval *u, mval *v, mval *q);
@@ -305,6 +307,7 @@ void	op_ztrigger(void);
 #	endif
 void	op_zhalt(mval *returncode);
 void	op_zhelp_xfr(mval *subject, mval *lib);
+void	op_zhorolog(mval *s);
 void	op_zlink(mval *v, mval *quals);
 void	op_zmess(UNIX_ONLY(unsigned int cnt) VMS_ONLY(int4 errnum), ...);
 void	op_zprevious(mval *v);
@@ -329,5 +332,6 @@ int	opp_zst_over_ret();
 int	opp_zst_over_retarg();
 int	opp_zstepret();
 int	opp_zstepretarg();
+void	op_zut(mval *s);
 void	op_zwritesvn(int svn);
 #endif
diff --git a/sr_port/op_fnzsearch.h b/sr_port/op_fnzsearch.h
index 4e14e02..a7dd828 100644
--- a/sr_port/op_fnzsearch.h
+++ b/sr_port/op_fnzsearch.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,4 +20,8 @@
 #define STRM_ZRUPDATE   -1	/* Stream used by ZRUPDATE command when processing wildcards */
 #define STRM_COMP_SRC	-2	/* Stream used by compile_source_file() */
 
+#ifdef UNIX
+void zsrch_clr(int indx);
+#endif
+
 #endif
diff --git a/sr_port/op_fnzsocket.c b/sr_port/op_fnzsocket.c
index dd922e4..aa6939f 100644
--- a/sr_port/op_fnzsocket.c
+++ b/sr_port/op_fnzsocket.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -27,14 +28,25 @@
 #include "gtm_ipv6.h"
 #include "iosocketdef.h"
 #include "op.h"
+#include "mmemory.h"
 #include "mvalconv.h"
 #include "trans_log_name.h"
 #include "zsocket.h"
+#ifdef GTM_TLS
+#include "gtm_caseconv.h"
+#include "min_max.h"
+#include "gtm_tls.h"
+#endif
 
 GBLREF spdesc		stringpool;
 GBLREF io_pair		io_curr_device;
 GBLREF io_log_name	*io_root_log_name;
 GBLREF d_socket_struct	*socket_pool;
+GBLREF io_pair		*io_std_device;
+GBLREF io_log_name	*dollar_principal;
+GBLREF mstr		dollar_prin_log;
+GBLREF mstr		dollar_zpin;			/* contains "< /" */
+GBLREF mstr		dollar_zpout;			/* contains "> /" */
 
 error_def(ERR_ZSOCKETATTR);
 error_def(ERR_ZSOCKETNOTSOCK);
@@ -45,6 +57,17 @@ LITREF	mval		literal_one;
 LITREF	mval		literal_null;
 LITREF	mval		skiparg;
 
+#ifdef	GTM_TLS
+#define	TLSCLIENTSTR	"CLIENT"
+#define	TLSSERVERSTR	"SERVER"
+#define TLSOPTIONLIT	"TLS option: "		/* for error message */
+LITDEF char *zsocket_tls_options[] = {"CIPHER", "OPTIONS", NULL};
+#define	OPTIONEND		','
+#define	OPTIONENDSTR		","
+#define	TLS_OPTIONS_CIPHER	1
+#define	TLS_OPTIONS_OPTIONS	2
+#endif
+
 #define ZSOCKETITEM(A,B,C,D) {(SIZEOF(A) - 1), A}
 const nametabent zsocket_names[] =
 {
@@ -55,7 +78,7 @@ const unsigned char zsocket_indextab[] =
 { /*	A  B  C  D  E  F  G  H  I  J  K  L  M  N */
 	0, 0, 0, 1, 3, 3, 3, 3, 4, 6, 6, 6, 8, 9,
   /*	O   P   Q   R   S   T   U   V   W   X   Y   Z  end */
-	10, 10, 12, 12, 14, 16, 16, 16, 16, 16, 16, 16, 20
+	10, 10, 12, 12, 14, 16, 17, 17, 17, 17, 17, 17, 21
 };
 #define ZSOCKETITEM(A,B,C,D) C
 static const int zsocket_types[] =
@@ -88,7 +111,7 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 {
 	VMS_ONLY(int	numarg;)
 	int		zsocket_item, zsocket_type, tmpnum, numret, index, index2;
-	int4		stat;
+	int4		stat, len, len2;
 	mval		*arg1, *arg2, tmpmval;
 	mval		*keyword;
 	mval		*devicename;
@@ -96,8 +119,18 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 	io_desc		*iod;
 	io_log_name	*nl, *tl;
 	char		buf1[MAX_TRANS_NAME_LEN];	/* buffer to hold translated name */
-	d_socket_struct	*dsocketptr;
-	socket_struct	*socketptr;
+	char		*c1;		/* used to compare $P name */
+	int		nlen;		/* len of $P name */
+	io_log_name	*tlp;		/* logical record for translated name for $principal */
+	int		nldone;		/* 0 if not $ZPIN or $ZPOUT, 1 if $ZPIN and 2 if $ZPOUT */
+	d_socket_struct		*dsocketptr;
+	socket_struct		*socketptr;
+#ifdef	GTM_TLS
+	int			tls_options_mask, optionoffset, optionlen;
+	gtm_tls_socket_t	*tls_sock;
+	gtm_tls_conn_info	conn_info;
+	char			*charptr, *optionend;
+#endif
 	va_list		var;
 	DCL_THREADGBL_ACCESS;
 
@@ -130,6 +163,7 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 	}
 	assert(!numarg);
 	va_end(var);
+	nldone = 0;
 	if (NULL == devicename)
 	{
 		if ((NULL == socket_pool) || (NULL == socket_pool->iod))
@@ -142,8 +176,32 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 	else if (0 == devicename->str.len)
 		iod = io_curr_device.in;
 	else
-	{	/* get information from provided device name */
-		nl = get_log_name(&devicename->str, NO_INSERT);
+	{
+		if ((io_std_device->in != io_std_device->out))
+		{
+			tlp = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;
+			nlen = tlp->len;
+			assert(dollar_zpout.len == dollar_zpin.len);
+			if ((nlen + dollar_zpout.len) == devicename->str.len)
+			{	/* passed the length test now compare the 2 pieces, the first one the length of
+				   $P and the second $ZPIN or $ZPOUT
+				*/
+				c1 = (char *)tlp->dollar_io;
+				if (!memvcmp(c1, nlen, &(devicename->str.addr[0]), nlen))
+				{
+					if (!memvcmp(dollar_zpin.addr, dollar_zpin.len,
+						     &(devicename->str.addr[nlen]), dollar_zpin.len))
+						nldone = 1;
+					else if (!memvcmp(dollar_zpout.addr, dollar_zpout.len,
+							  &(devicename->str.addr[nlen]), dollar_zpout.len))
+						nldone = 2;
+				}
+			}
+		}
+		if (0 == nldone)
+			nl = get_log_name(&devicename->str, NO_INSERT);
+		else
+			nl = get_log_name(&dollar_prin_log, NO_INSERT);
 		if (NULL == nl)
 		{
 			stat = TRANS_LOG_NAME(&devicename->str, &tn, buf1, SIZEOF(buf1), dont_sendmsg_on_log2long);
@@ -160,6 +218,9 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_IONOTOPEN);
 		iod = nl->iod;
 	}
+	/* if iod is standard in device and it is a split device and it is $ZPOUT set iod to output device */
+	if ((2 == nldone) && (io_std_device->in == iod))
+		iod = io_std_device->out;
 	if (gtmsocket != iod->type)
 	{
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZSOCKETNOTSOCK);
@@ -371,6 +432,113 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 			UNICODE_ONLY(dst->str.char_len = 0);
 			s2pool(&dst->str);
 			break;
+		case zsocket_tls:
+#			ifdef	GTM_TLS
+			if (socketptr->tlsenabled)
+			{
+				tls_sock = (gtm_tls_socket_t *)socketptr->tlssocket;
+				if (NULL == tls_sock)
+				{
+					*dst = literal_null;	/* something is wrong */
+					break;
+				}
+				len = SIZEOF(ONE_COMMA) - 1 + SIZEOF(TLSCLIENTSTR) - 1 + 1; /* remove nulls, add trailing comma */
+				len += STRLEN(tls_sock->tlsid);		/* trailing comma above not needed if no tlsid but OK */
+				if ((NULL != arg2) && (0 < arg2->str.len))
+				{
+					len2 = MIN((MAX_TRANS_NAME_LEN - 1), arg2->str.len);
+					lower_to_upper((uchar_ptr_t)buf1, (uchar_ptr_t)arg2->str.addr, len2);
+					buf1[len2] = '\0';
+					tls_options_mask = 0;
+					for (charptr = buf1; (&buf1[len2] > charptr); charptr = optionend)
+					{
+						if (buf1 < charptr)
+							if ('\0' == *++charptr)
+								break;
+						optionend = strstr((const char *)charptr, OPTIONENDSTR);
+						if (NULL == optionend)
+							optionend = charptr + STRLEN(charptr);
+						*optionend = '\0';
+						for (index2 = 0; NULL != zsocket_tls_options[index2]; index2++)
+							if (0 == STRCMP(charptr, zsocket_tls_options[index2]))
+							{
+								tls_options_mask |= 1 << index2;
+								break;
+							}
+						if (NULL == zsocket_tls_options[index2])
+						{	/* not found */
+							len2 = SIZEOF(TLSOPTIONLIT) - 1;
+							optionoffset = charptr - buf1;
+							optionlen = MIN((MAX_TRANS_NAME_LEN - 1 - len2), (optionend - charptr));
+							charptr = arg2->str.addr;
+							memcpy(buf1, TLSOPTIONLIT, len2);
+							memcpy(&buf1[len2], &charptr[optionoffset], optionlen);
+							buf1[len2 + optionlen] = '\0';
+							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_ZSOCKETATTR, 2,
+								(len2 + optionlen), buf1);
+							return;		/* make compiler happy */
+						}
+					}
+					if (0 == gtm_tls_get_conn_info(tls_sock, &conn_info))
+					{
+						if (TLS_OPTIONS_CIPHER & tls_options_mask)
+						{
+							len += STRLEN(conn_info.protocol) + 3;		/* |P: */
+							len += STRLEN(conn_info.session_algo) + 3;	/* |C: */
+						}
+						if (TLS_OPTIONS_OPTIONS & tls_options_mask)
+							len += (3 + 16);	/* |O: hex digits in long */
+					}
+				} else
+					len2 = 0;	/* flag no extras */
+				ENSURE_STP_FREE_SPACE(len);
+				charptr = (char *)stringpool.free;
+				len = SIZEOF(ONE_COMMA) - 1;
+				memcpy(charptr, ONE_COMMA, len);
+				charptr += len;
+				len = SIZEOF(TLSCLIENTSTR) - 1;
+				STRNCPY_STR(charptr, (GTMTLS_OP_CLIENT_MODE & tls_sock->flags) ? TLSCLIENTSTR : TLSSERVERSTR, len);
+				charptr += len;
+				len = STRLEN(tls_sock->tlsid);
+				if (0 < len)
+				{
+					*charptr++ = ',';
+					STRNCPY_STR(charptr, tls_sock->tlsid, len);
+					charptr += len;
+				}
+				if (0 < len2)
+				{
+					if (TLS_OPTIONS_CIPHER & tls_options_mask)
+					{
+						STRCPY(charptr, "|P:");
+						charptr += 3;
+						len2 = STRLEN(conn_info.protocol);
+						STRNCPY_STR(charptr, conn_info.protocol, len2);
+						charptr += len2;
+						STRCPY(charptr, "|C:");
+						charptr += 3;
+						len2 = STRLEN(conn_info.session_algo);
+						STRNCPY_STR(charptr, conn_info.session_algo, len2);
+						charptr += len2;
+					}
+					if (TLS_OPTIONS_OPTIONS & tls_options_mask)
+					{
+						STRCPY(charptr, "|O:");
+						charptr += 3;
+						len2 = STRLEN(conn_info.protocol);
+						i2hexl((qw_num)conn_info.options, (uchar_ptr_t)charptr, 16);
+						len2 = 16;
+						charptr += len2;
+					}
+				}
+				len = charptr - (char *)stringpool.free;
+				dst->str.addr = (char *)stringpool.free;
+				dst->str.len = len;
+				stringpool.free += len;
+			} else
+#			endif
+				*dst = literal_null;
+			break;
 		case zsocket_zbfsize:
 			numret = socketptr->buffer_size;
 			break;
@@ -397,4 +565,5 @@ void	op_fnzsocket(UNIX_ONLY_COMMA(int numarg) mval *dst, ...)
 	dst->mvtype = zsocket_type;
 	if (MV_NM == dst->mvtype)
 		MV_FORCE_MVAL(dst, numret);
+	return;
 }
diff --git a/sr_port/op_fnzwidth.c b/sr_port/op_fnzwidth.c
index ed0ec1d..dd295b0 100644
--- a/sr_port/op_fnzwidth.c
+++ b/sr_port/op_fnzwidth.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -45,7 +46,7 @@ void op_fnzwidth(mval* src, mval* dst)
 		}
 #ifdef	UNICODE_SUPPORTED
 	} else
-		width = gtm_wcswidth(srcptr, src->str.len, TRUE, 0);	/* TRUE => strict checking of BADCHARs */
+		width = gtm_wcswidth(srcptr, src->str.len, !badchar_inhibit, 0);
 #endif
 	MV_FORCE_MVAL(dst, width);
 }
diff --git a/sr_port/op_hang.c b/sr_port/op_hang.c
index 8304def..299feeb 100644
--- a/sr_port/op_hang.c
+++ b/sr_port/op_hang.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -160,7 +161,9 @@ void op_hang(mval* num)
 			end_time = mv_zintcmd->mv_st_cont.mvs_zintcmd.end_or_remain;
 			cur_time = sub_abs_time(&end_time, &cur_time);	/* get remaing time to sleep */
 			if (0 <= cur_time.at_sec)
-				ms = (int4)(cur_time.at_sec * 1000 + cur_time.at_usec / 1000);
+				ms = (int4)(cur_time.at_sec * MILLISECS_IN_SEC +
+					    /* Round up in order to prevent premautre timeouts */
+					    DIVIDE_ROUND_UP(cur_time.at_usec, MICROSECS_IN_MSEC));
 			else
 				ms = 0;		/* all done */
 			/* restore/pop previous zintcmd_active[ZINTCMD_HANG] hints */
diff --git a/sr_port/op_labaddr.c b/sr_port/op_labaddr.c
index ab16ed2..890723a 100644
--- a/sr_port/op_labaddr.c
+++ b/sr_port/op_labaddr.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,12 +20,32 @@
 #include "cmd_qlf.h"
 #include <rtnhdr.h>
 #include "zbreak.h"
+#include "linktrc.h"
 
 error_def(ERR_LABELMISSING);
 error_def(ERR_LABELONLY);
 error_def(ERR_OFFSETINV);
 
-USHBIN_ONLY(lnr_tabent **) NON_USHBIN_ONLY(lnr_tabent *)op_labaddr(rhdtyp *routine, mval *label, int4 offset)
+/* Routine to return:
+ *
+ *    autorelink-enabled platform:	index into TABENT_PROXY containing label offset value (in bytes of generated code).
+ *    non-autorelink-enabled platform:  address of label offset value (in bytes of generated code).
+ *
+ * Arguments:
+ *
+ *    routine - rtnhdr address
+ *    label   - mval containing mval address
+ *    offset  - integer value of offset as # of lines from label
+ */
+#ifdef USHBIN_SUPPORTED
+#  ifdef AUTORELINK_SUPPORTED
+int op_labaddr(int rtnidx, mval *label, int4 offset)
+#  else
+lnr_tabent **op_labaddr(rhdtyp *routine, mval *label, int4 offset)
+#  endif
+#else
+lnr_tabent *op_labaddr(rhdtyp *routine, mval *label, int4 offset)
+#endif
 {
 	rhdtyp		*real_routine, *routine_hdr;
 	lnr_tabent	*answer, *first_line;
@@ -32,6 +53,7 @@ USHBIN_ONLY(lnr_tabent **) NON_USHBIN_ONLY(lnr_tabent *)op_labaddr(rhdtyp *routi
 
 	SETUP_THREADGBL_ACCESS;
 	MV_FORCE_STR(label);
+	ARLINK_ONLY(assert(0 == rtnidx));		/* Should be 0 index for routine */
 #	if defined (__alpha) && defined (__vms)
 	if (PDSC_FLAGS == ((proc_desc *)routine)->flags) /* it's a procedure descriptor, not a routine header */
 	{
@@ -40,28 +62,38 @@ USHBIN_ONLY(lnr_tabent **) NON_USHBIN_ONLY(lnr_tabent *)op_labaddr(rhdtyp *routi
 		assert(PDSC_FLAGS != ((proc_desc *)routine_hdr)->flags);
 	} else
 #	endif
-		routine_hdr = routine;
+		routine_hdr = ARLINK_ONLY(TADR(lnk_proxy)->rtnhdr_adr) NON_ARLINK_ONLY(routine);
+	assert(NULL != routine_hdr);
+	ARLINK_ONLY(DBGINDCOMP((stderr, "op_labaddr: Args: name: %.*s  rtnidx: %d  offset: %d\n",
+				label->str.len, label->str.addr, rtnidx, offset)));
+	NON_ARLINK_ONLY(DBGINDCOMP((stderr, "op_labaddr: Args: name: %.*s  rtnhdr: 0x"lvaddr"  offset: %d\n",
+				    label->str.len, label->str.addr, routine_hdr, offset)));
+	DBGINDCOMP((stderr, "op_labaddr: Routine containing label resolved to 0x"lvaddr"\n", routine_hdr));
 	if (!(routine_hdr->compiler_qlf & CQ_LINE_ENTRY) && (0 != offset))
-		rts_error(VARLSTCNT(4) ERR_LABELONLY, 2, routine_hdr->routine_name.len, routine_hdr->routine_name.addr);
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_LABELONLY, 2, routine_hdr->routine_name.len,
+			      routine_hdr->routine_name.addr);
 	answer = find_line_addr(routine_hdr, &label->str, 0, NULL);
 	if (NULL == answer)
-		rts_error(VARLSTCNT(4) ERR_LABELMISSING, 2, label->str.len, label->str.addr);
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_LABELMISSING, 2, label->str.len, label->str.addr);
 	real_routine = CURRENT_RHEAD_ADR(routine_hdr);
 	first_line = LNRTAB_ADR(real_routine);
 	answer += offset;
+	DBGINDCOMP((stderr, "op_labaddr: label offset addr resolved to 0x"lvaddr"\n", answer));
 	if ((answer < first_line) || (answer >= (first_line + real_routine->lnrtab_len)))
-		rts_error(VARLSTCNT(5) ERR_OFFSETINV, 3, label->str.len, label->str.addr, offset);
-	/* Return the address for line number entry pointer/offset, so that the adjacent location in memory holds has_parms. */
-	USHBIN_ONLY(
-		(TREF(lab_proxy)).lnr_adr = answer;
-		return &((TREF(lab_proxy)).lnr_adr);
-	);
-	NON_USHBIN_ONLY(
-		/* On non-shared-binary, calculate the offset to the corresponding lnr_tabent record by subtracting
-		 * the base address (routine header) from line number entry's address, and save the result in
-		 * lab_ln_ptr field of lab_tabent structure.
-		 */
-		(TREF(lab_proxy)).lab_ln_ptr = (int4)answer - (int4)real_routine;
-		return &((TREF(lab_proxy)).lab_ln_ptr);
-	);
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_OFFSETINV, 3, label->str.len, label->str.addr, offset);
+	/* Return the index or address for line number entry pointer/offset, so that the adjacent location in memory holds
+	 * has_parms. Note that if returning index for autorelink-enabled platform, the index is negative to indicate use
+	 * of TABENT_PROXY.
+	 */
+#	ifdef USHBIN_SUPPORTED
+	(TABENT_PROXY).lnr_adr = answer;
+	return ARLINK_ONLY(-1) NON_ARLINK_ONLY(&((TREF(lab_proxy)).lnr_adr));
+#	else
+	/* On non-shared-binary, calculate the offset to the corresponding lnr_tabent record by subtracting
+	 * the base address (routine header) from line number entry's address, and save the result in
+	 * lab_ln_ptr field of TABENT_PROXY structure.
+	 */
+	(TABENT_PROXY).lab_ln_ptr = (int4)answer - (int4)real_routine;
+	return &((TABENT_PROXY).lab_ln_ptr);
+#	endif
 }
diff --git a/sr_port/op_lock2.c b/sr_port/op_lock2.c
index 815cafb..8e1ba75 100644
--- a/sr_port/op_lock2.c
+++ b/sr_port/op_lock2.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -56,6 +57,8 @@
 #include "change_reg.h"
 #include "setterm.h"
 #include "getzposition.h"
+#include "lockdefs.h"
+#include "is_proc_alive.h"
 #ifdef DEBUG
 #include "have_crit.h"		/* for the TPNOTACID_CHECK macro */
 #endif
@@ -92,7 +95,7 @@ STATICFNDCL void level_err(mlk_pvtblk *pvt_ptr)
 	MAXSTR_BUFF_DECL(buff);
 	MAXSTR_BUFF_INIT;
 	lock_str_to_buff(pvt_ptr, buff, MAX_STRBUFF_INIT);
-	rts_error(VARLSTCNT(7) ERR_LOCKINCR2HIGH, 1, pvt_ptr->level, ERR_LOCKIS, 2, LEN_AND_STR(buff));
+	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_LOCKINCR2HIGH, 1, pvt_ptr->level, ERR_LOCKIS, 2, LEN_AND_STR(buff));
 }
 
 /*
@@ -116,14 +119,18 @@ STATICFNDCL void level_err(mlk_pvtblk *pvt_ptr)
  */
 int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 {
-	boolean_t	blocked, timer_on;
-	signed char	gotit;
-	unsigned short	locks_bckout, locks_done;
-	int4		msec_timeout;	/* timeout in milliseconds */
-	mlk_pvtblk	*pvt_ptr1, *pvt_ptr2, **prior, *already_locked;
-	unsigned char	action;
-	ABS_TIME	cur_time, end_time, remain_time;
-	mv_stent	*mv_zintcmd;
+	boolean_t		blocked, timer_on;
+	signed char		gotit;
+	unsigned short		locks_bckout, locks_done;
+	int4			msec_timeout;	/* timeout in milliseconds */
+	mlk_pvtblk		*pvt_ptr1, *pvt_ptr2, **prior, *already_locked;
+	unsigned char		action;
+	ABS_TIME		cur_time, end_time, remain_time;
+	mv_stent		*mv_zintcmd;
+#	ifdef VMS
+	int4			status;			/* needed for BLOCKING_PROC_DEAD macro in VMS */
+	int4			icount, time[2];	/* needed for BLOCKING_PROC_DEAD macro in VMS */
+#	endif
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -150,12 +157,16 @@ int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 			timer_on = FALSE;
 		} else
 		{
+			sys_get_curr_time(&cur_time);
 			mv_zintcmd = find_mvstent_cmd(ZINTCMD_LOCK, restart_pc, restart_ctxt, FALSE);
 			if (mv_zintcmd)
 			{
-				remain_time = mv_zintcmd->mv_st_cont.mvs_zintcmd.end_or_remain;
+				end_time = mv_zintcmd->mv_st_cont.mvs_zintcmd.end_or_remain;
+				remain_time = sub_abs_time(&end_time, &cur_time);	/* get remaing time to sleep */
 				if (0 <= remain_time.at_sec)
-					msec_timeout = (int4)(remain_time.at_sec * 1000 + remain_time.at_usec / 1000);
+					msec_timeout = (int4)(remain_time.at_sec * MILLISECS_IN_SEC +
+							      /* Round up in order to prevent premautre timeouts */
+							      DIVIDE_ROUND_UP(remain_time.at_usec, MICROSECS_IN_MSEC));
 				else
 					msec_timeout = 0;
 				TAREF1(zintcmd_active, ZINTCMD_LOCK).restart_pc_last
@@ -171,13 +182,11 @@ int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 					mv_zintcmd->mv_st_cont.mvs_zintcmd.command = ZINTCMD_NOOP;
 					mv_zintcmd->mv_st_cont.mvs_zintcmd.restart_pc_check = NULL;
 				}
-			}
-			if (0 < msec_timeout)
-			{
-				sys_get_curr_time(&cur_time);
+			} else
 				add_int_to_abs_time(&cur_time, msec_timeout, &end_time);
+			if (0 < msec_timeout)
 				start_timer((TID)&timer_on, msec_timeout, wake_alarm, 0, NULL);
-			} else
+			else
 			{
 				out_of_time = TRUE;
 				timer_on = FALSE;
@@ -227,7 +236,7 @@ int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 					pvt_ptr1->zalloc = TRUE;
 					break;
 				default:
-					GTMASSERT;
+					assertpro(FALSE && laflag);
 					break;
 				}
 			} else
@@ -252,7 +261,7 @@ int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 			action = cm_action;
 			break;
 		default:
-			GTMASSERT;
+			assertpro(FALSE && cm_action);
 			break;
 		}
 		for (pvt_ptr2 = mlk_pvt_root, locks_bckout = 0;  locks_bckout < locks_done;
@@ -309,7 +318,7 @@ int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 							if ((tptimeout != outofband) && (ctrlc != outofband))
 							{
 								PUSH_MV_STENT(MVST_ZINTCMD);
-								mv_chain->mv_st_cont.mvs_zintcmd.end_or_remain = remain_time;
+								mv_chain->mv_st_cont.mvs_zintcmd.end_or_remain = end_time;
 								mv_chain->mv_st_cont.mvs_zintcmd.restart_ctxt_check = restart_ctxt;
 								mv_chain->mv_st_cont.mvs_zintcmd.restart_pc_check = restart_pc;
 								/* save current information from zintcmd_active */
@@ -335,6 +344,20 @@ int	op_lock2(int4 timeout, unsigned char laflag)	/* timeout is in seconds */
 			 * same lock resource, "mlk_shrblk_find" assumes a sleep has happened in between two locking attempts.
 			 */
 			hiber_start_wait_any(LOCK_SELF_WAKE);
+			/* Every reattempt at a blocking lock needs crit which could be a bottleneck. So minimize reattempts.
+			 * The "blk_sequence" check below serves that purpose. If the sequence number is different between
+			 * the shared and private copies, it means the lock state in shared memory has changed since last we
+			 * did our blocking mlk_lock and so it is time to reattempt. But if the sequence numbers are the same,
+			 * we dont need to reattempt. That said, we still need to check if the blocking pid is still alive
+			 * and if so we continue to sleep. If not, we reattempt the lock in case the holder pid was kill -9ed.
+			 * If pvt_ptr1->blocked is NULL, it implies there is not enough space in lock shm so mlk_shrblk_find
+			 * returned blocked = TRUE. In this case, there is no "pvt_ptr1->blocked" to do the sequence number
+			 * check so keep reattempting the lock.
+			 */
+			if ((NULL != pvt_ptr1->blocked)
+					&& (pvt_ptr1->blk_sequence == pvt_ptr1->blocked->sequence)
+					&& (!BLOCKING_PROC_DEAD(pvt_ptr1, time, icount, status)))
+				continue;
 			/* Note that "TREF(mlk_yield_pid)" is not initialized here as we want to use any value inherited
 			 * from previous calls to mlk_lock for this lock.
 			 */
diff --git a/sr_port/op_merge.c b/sr_port/op_merge.c
index 048e421..e58af73 100644
--- a/sr_port/op_merge.c
+++ b/sr_port/op_merge.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -374,6 +375,7 @@ void op_merge(void)
 			/* Need to protect subsc created from global variable subscripts from stpgcol */
 			PUSH_MV_STENT(MVST_MVAL);
 			subsc = &mv_chain->mv_st_cont.mvs_mval;
+			subsc->mvtype = 0; /* initialize mval in the M-stack in case stp_gcol gets called before it is set below */
 			/* At this time gv_currkey already points to gblp2 */
 			if (1 == dollardata_src || 11 == dollardata_src)
 			{	/* SET lvn1=^gvn2 */
diff --git a/sr_port/op_open.c b/sr_port/op_open.c
index 88569c7..c389475 100644
--- a/sr_port/op_open.c
+++ b/sr_port/op_open.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -35,6 +36,7 @@
 #include "change_reg.h"
 #include "setterm.h"
 #include "getzposition.h"
+#include "mmemory.h"
 #ifdef DEBUG
 #include "have_crit.h"		/* for the TPNOTACID_CHECK macro */
 #endif
@@ -43,11 +45,17 @@ GBLREF uint4		dollar_trestart;
 GBLREF io_log_name	*io_root_log_name;
 GBLREF bool		licensed;
 GBLREF int4		lkid, lid;
+GBLREF io_pair		*io_std_device;
+GBLREF io_log_name	*dollar_principal;
+GBLREF mstr		dollar_zpin;			/* contains "< /" */
+GBLREF mstr		dollar_zpout;			/* contains "> /" */
 
 LITREF unsigned char io_params_size[];
 
 error_def(ERR_LOGTOOLONG);
 error_def(LP_NOTACQ);				/* bad license */
+error_def(ERR_DEVOPENFAIL);
+error_def(ERR_TEXT);
 
 #define OPENTIMESTR "OPEN time too long"
 
@@ -57,8 +65,11 @@ int op_open(mval *device, mval *devparms, int timeout, mval *mspace)
 	io_log_name	*naml;				/* logical record for passed name */
 	io_log_name	*tl;				/* logical record for translated name */
 	io_log_name	*prev;				/* logical record for removal search */
+	io_log_name	*tlp;				/* logical record for translated name for $principal */
 	int4		stat;				/* status */
 	mstr		tn;				/* translated name */
+	char		*c1;				/* used to compare $P name */
+	int		nlen;				/* len of $P name */
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -71,6 +82,40 @@ int op_open(mval *device, mval *devparms, int timeout, mval *mspace)
 	else if (TREF(tpnotacidtime) < timeout)
 		TPNOTACID_CHECK(OPENTIMESTR);
 	assert((unsigned char)*devparms->str.addr < n_iops);
+
+
+	if (dollar_principal || io_root_log_name->iod)
+	{
+		/* make sure that dollar_principal is defined or iod has been defined for the root */
+		/* log name before attempting to use it.  This is necessary as an attempt to open "0" done */
+		/* during initialization occurs prior to io_root_log_name->iod being initialized. */
+
+		/* if the device name is the value of $P followed by "< /" or "> /" issue an error */
+		/* we have no way of knowing if this is a $P variant without checking this name */
+		/* the device length has to be the length of $P + 3 for the special chars at the end */
+
+		tlp = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;
+		nlen = tlp->len;
+		assert(dollar_zpout.len == dollar_zpin.len);
+		if ((nlen + dollar_zpin.len) == device->str.len)
+		{
+			/* passed the length test now compare the 2 pieces, the first one the length of $P and the second $ZPIN*/
+			c1 = (char *)tlp->dollar_io;
+			if (!memvcmp(c1, nlen, &(device->str.addr[0]), nlen))
+			{
+				if (!memvcmp(dollar_zpin.addr, dollar_zpin.len, &(device->str.addr[nlen]), dollar_zpin.len))
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DEVOPENFAIL, 2, device->str.len,
+						      device->str.addr, ERR_TEXT, 2,
+						      LEN_AND_LIT("The value of $P followed by \"< /\" is an invalid device name"));
+				else if (!memvcmp(dollar_zpout.addr, dollar_zpout.len, &(device->str.addr[nlen]), dollar_zpout.len))
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_DEVOPENFAIL, 2, device->str.len,
+						      device->str.addr, ERR_TEXT, 2,
+						      LEN_AND_LIT("The value of $P followed by \"> /\" is an invalid device name"));
+
+			}
+		}
+	}
+
 	naml = get_log_name(&device->str, INSERT);
 	if (naml->iod != 0)
 		tl = naml;
@@ -103,10 +148,11 @@ int op_open(mval *device, mval *devparms, int timeout, mval *mspace)
 			}
 #			ifdef UNIX
 			if (SS_LOG2LONG == stat)
-				rts_error(VARLSTCNT(5) ERR_LOGTOOLONG, 3, device->str.len, device->str.addr, SIZEOF(buf1) - 1);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_LOGTOOLONG, 3, device->str.len,
+					      device->str.addr, SIZEOF(buf1) - 1);
 			else
 #			endif
-				rts_error(VARLSTCNT(1) stat);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) stat);
 		}
 	}
 	stat = io_open_try(naml, tl, devparms, timeout, mspace);
diff --git a/sr_port/op_rhdaddr.c b/sr_port/op_rhdaddr.c
index 9199162..7341681 100644
--- a/sr_port/op_rhdaddr.c
+++ b/sr_port/op_rhdaddr.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,63 +15,140 @@
 #include "gtm_string.h"
 
 #include <rtnhdr.h>
+#include "stack_frame.h"
 #include "op.h"
+#include "min_max.h"
+#include "linktrc.h"
+
+/* Rebuffering macro for routine and label name for use when needed. Note we don't even do the
+ * MV_FORCE_STR() on the given mval until we know we are going to use it. Primary purpose here is
+ * to rebuffer a routine name coming from user space truncating it as necessary.
+ */
+#define REBUFFER_MIDENT(MVAL, NEWMVAL, BUFFER)					\
+{										\
+	MV_FORCE_STR(MVAL);							\
+	*(NEWMVAL) = *(MVAL);							\
+	(NEWMVAL)->str.len = MIN(MAX_MIDENT_LEN, (NEWMVAL)->str.len);		\
+	memcpy((void *)&BUFFER, (NEWMVAL)->str.addr, (NEWMVAL)->str.len);	\
+	(NEWMVAL)->str.addr = (char *)&(BUFFER);				\
+}
+/* Macro to do extra VMS checks in INITZLINK below*/
+#if defined (__alpha) && defined (__vms)
+# define VMSCHECK 												\
+{														\
+	RHD = RHD->linkage_ptr;											\
+	if (NULL == RHD)											\
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, NAME->str.len, NAME->str.addr,	\
+			      ERR_ZLMODULE, 2, strlen(&zlink_mname.c[0]), zlink_mname.c);			\
+}
+#else
+# define VMSCHECK
+#endif
+/* Macro to provide initial link to a given routine */
+#define INITZLINK(NAME, RHD, RTNNAME, RTNNAME_BUFF)								\
+{														\
+	REBUFFER_MIDENT(NAME, &RTNNAME, RTNNAME_BUFF);								\
+	op_zlink(&RTNNAME, NULL);										\
+	RHD = find_rtn_hdr(&RTNNAME.str);									\
+	if (NULL == RHD)											\
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, NAME->str.len, NAME->str.addr,	\
+			      ERR_ZLMODULE, 2, strlen(&zlink_mname.c[0]), &zlink_mname);			\
+	VMSCHECK;												\
+	ARLINK_ONLY(DBGINDCOMP((stderr, "op_rhdaddr: routine linked (initial) to 0x"lvaddr"\n", RHD)));		\
+	ARLINK_ONLY(TADR(lnk_proxy)->rtnhdr_adr = RHD);								\
+}
 
 GBLREF mident_fixed	zlink_mname;
 GBLREF rtn_tabent	*rtn_names;
-
-#ifdef AUTORELINK_SUPPORTED
-LITDEF mval		literal_null;
-#endif
+GBLREF stack_frame	*frame_pointer;
 
 error_def(ERR_ZLINKFILE);
 error_def(ERR_ZLMODULE);
 
-/* For routine name given, return routine header address if rhd not already set */
-rhdtyp	*op_rhdaddr(mval *name, rhdtyp *rhd)
+/* Locate and return the routine header for a given routine. If routine is already linked in, and this platform
+ * is auto-relink enabled, also verify this is the most current version of this routine. Since this routine is
+ * only called from indirects or from call-ins, for an autorelink-enabled build, set the address into the proxy
+ * linkage table and return its index. Else return the routine header address itself.
+ *
+ * Arguments:
+ *
+ *    name   - An mval containing the name of the routine.
+ *    rhd    - (Non-autorelink-enabled build only) routine header address if available.
+ *    rhdidx - (Autorelink-enabled build only) index into linkage table or -1 if not available.
+ *
+ * Return value:
+ *
+ *    autorelink-enabled build - returns 0 (index into lnk_proxy where routine address is saved).
+ *    non-autorelink-enabled build - returns rtnhdr address.
+ *
+ * Note OC_RHDADDR1 comes here also but with an always NULL rhd parm. The rhd parm is provided for those times
+ * where M code like 'SET X=@LBL^FIXEDRTN' is used where the routine is fixed and the label is indirect. In this
+ * one case, we can pass the routine header address to op_rhdaddr so it doesn't have to be looked up on each
+ * execution like it does in a true indirect that lives in the indirect cache.
+ */
+ARLINK_ONLY(int op_rhdaddr(mval *name, int rhdidx))
+NON_ARLINK_ONLY(rhdtyp *op_rhdaddr(mval *name, rhdtyp *rhd))
 {
+	mident_fixed	rtnname_buff;
+	mval		rtnname;
 #	ifdef AUTORELINK_SUPPORTED
-	return op_rhd_ext(name, (mval *)&literal_null, rhd, NULL);
-#	else
-	return (NULL != rhd) ? rhd : op_rhdaddr1(name);
-#	endif
-}
+	rhdtyp		*rhd;
+	DCL_THREADGBL_ACCESS;
 
-/* Find the newest linked version of a routine */
-rhdtyp	*op_rhdaddr1(mval *name)
-{
-	mval		routine;
-	mident_fixed	routname;
-	rhdtyp		*answer;
-
-	MV_FORCE_STR(name);
-	routine = *name;
-	routine.str.len = (MAX_MIDENT_LEN < routine.str.len ? MAX_MIDENT_LEN : routine.str.len);
-	memcpy(&routname.c[0], routine.str.addr, routine.str.len);
-	routine.str.addr = (char *)&routname.c[0];
-	if ((NULL == rtn_names) || (NULL == (answer = find_rtn_hdr(&routine.str))))	/* Note assignment */
+	SETUP_THREADGBL_ACCESS;
+	DBGINDCOMP((stderr, "op_rhdaddr: Args: name: %.*s  rhdidx: %d\n", name->str.len, name->str.addr, rhdidx));
+	/* If rhd is not defined (NULL), the routine is not yet linked in so do that so set it into PROXY_TABENT
+	 * and return 0 (index into lnk_proxy for the routine header address.
+	 */
+	assert((-1 == rhdidx) || ((0 <= rhdidx) && (rhdidx <= frame_pointer->rvector->linkage_len)));
+	rhd = (-1 == rhdidx) ? NULL : (rhdtyp *)frame_pointer->rvector->linkage_adr[rhdidx].ext_ref;
+	/* If below block is changed, check if need to update bock not related to autorelink at bottom of routine */
+	if ((NULL == rtn_names) || ((NULL == rhd) && (NULL == (rhd = find_rtn_hdr(&name->str)))))	/* Note assignment */
 	{	/* Initial check for rtn_names is so we avoid the call to find_rtn_hdr() if we have just
 		 * unlinked all modules as find_rtn_hdr() does not deal well with an empty rtn table.
 		 */
-		op_zlink(&routine, NULL);
-		answer = find_rtn_hdr(&routine.str);
-		if (NULL == answer)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, name->str.len, name->str.addr,
-				ERR_ZLMODULE, 2, strlen(&zlink_mname.c[0]), &zlink_mname);
-#		if defined (__alpha) && defined (__vms)
-		answer = answer->linkage_ptr;
-		if (NULL == answer)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, name->str.len, name->str.addr,
-				ERR_ZLMODULE, 2, strlen(&zlink_mname.c[0]), zlink_mname.c);
-#		endif
+		INITZLINK(name, rhd, rtnname, rtnname_buff);
+		return 0;
 	}
-#	ifdef AUTORELINK_SUPPORTED
-	/* In this (autorelink) context, no need to pass 4th arg (*lnr) since other opcodes used in conjunction with
-	 * op_rhdaddr1 will handle label offset if necessary.
+	/* Routine is already linked, but we need to check if a new version is available. This involves traversing the
+	 * "validation linked list", looking for changes in different $ZROUTINES entries. But we also need to base our
+	 * checks on the most recent version of the routine loaded. Note autorelink is only possible when no ZBREAKs are
+	 * defined in the given routine.
+	 *
+	 * Note the following section is very similar to code in explicit_relink_check() in auto_zlink.c. Any changes made
+	 * here need to be echoed there.
 	 */
-	return op_rhd_ext(&routine, (mval *)&literal_null, answer, NULL);
-#	else
-	/* Non-autorelink context just returns the routine header address */
-	return answer;
+	if (!rhd->has_ZBREAK)
+	{
+		rhd = rhd->current_rhead_adr;		/* Update rhd to most currently linked version */
+		if ((NULL != rhd->zhist) && need_relink(rhd, (zro_hist *)rhd->zhist))
+		{	/* Relink appears to be needed */
+			REBUFFER_MIDENT(name, &rtnname, rtnname_buff);
+			op_zlink(&rtnname, NULL);
+			rhd = rhd->current_rhead_adr;		/* Pickup routine header of new version to avoid lookup */
+			assert(NULL != rhd);
+			TADR(lnk_proxy)->rtnhdr_adr = rhd;
+			DBGINDCOMP((stderr, "op_rhdaddr: routine relinked resolved to 0x"lvaddr"\n", rhd));
+			assert((NULL == rhd->zhist) || (((zro_hist *)(rhd->zhist))->zroutines_cycle == TREF(set_zroutines_cycle)));
+		} else
+		{
+			TADR(lnk_proxy)->rtnhdr_adr = rhd;
+			DBGINDCOMP((stderr, "op_rhdaddr: routine (no relink) resolved to 0x"lvaddr"\n", rhd));
+		}
+	} else
+	{
+		DBGINDCOMP((stderr, "op_rhdaddr: routine has ZBREAK - resolved to 0x"lvaddr"\n", rhd));
+		TADR(lnk_proxy)->rtnhdr_adr = rhd;
+	}
+	return 0;
+#	else	/* Not AUTORELINK_SUPPORTED - old-style */
+	/* If below block is changed, check if need to update bock related to autorelink at near top of this routine */
+	if ((NULL == rtn_names) || ((NULL == rhd) && (NULL == (rhd = find_rtn_hdr(&name->str)))))	/* Note assignment */
+	{	/* Initial check for rtn_names is so we avoid the call to find_rtn_hdr() if we have just
+		 * unlinked all modules as find_rtn_hdr() does not deal well with an empty rtn table.
+		 */
+		INITZLINK(name, rhd, rtnname, rtnname_buff);
+	}
+	return rhd;
 #	endif
 }
diff --git a/sr_port/op_setzbrk.c b/sr_port/op_setzbrk.c
index aa6cf1f..c1cde86 100644
--- a/sr_port/op_setzbrk.c
+++ b/sr_port/op_setzbrk.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,6 +32,7 @@
 #include "srcline.h"
 #include "compiler.h"
 #include "min_max.h"
+#include "dm_setup.h"
 #ifdef GTM_TRIGGER
 # include "trigger_source_read_andor_verify.h"
 # include "gtm_trigger_trc.h"
@@ -46,6 +48,7 @@ GBLREF stack_frame		*frame_pointer;
 GBLREF unsigned short		proc_act_type;
 
 error_def(ERR_COMMENT);
+error_def(ERR_INVZBREAK);
 error_def(ERR_MEMORY);
 error_def(ERR_NOPLACE);
 error_def(ERR_NOZBRK);
@@ -126,7 +129,7 @@ void	op_setzbrk(mval *rtn, mval *lab, int offset, mval *act, int cnt)
 		{
 			addr = (zb_code *)LINE_NUMBER_ADDR(CURRENT_RHEAD_ADR(routine), line_offset_addr);
 			addr = find_line_call(addr);
-			if (NULL != (z_ptr = zr_find(&zbrk_recs, addr)))
+			if (NULL != (z_ptr = zr_find(&zbrk_recs, addr, RETURN_CLOSEST_MATCH_FALSE)))
 				zr_remove_zbreak(&zbrk_recs, z_ptr);
 			else
 				dec_err(VARLSTCNT(1) ERR_NOZBRK);
@@ -141,6 +144,9 @@ void	op_setzbrk(mval *rtn, mval *lab, int offset, mval *act, int cnt)
 				assert(lab_name == dummy);
 			}
 #			endif
+			MEMVCMP(GTM_DMOD, (SIZEOF(GTM_DMOD) - 1), routine->routine_name.addr, routine->routine_name.len, sstatus);
+			if (!sstatus)				/* sstatus == 0 meaning this is the GTM$DMOD routine - error out */
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_INVZBREAK);
 			op_commarg(act, indir_linetail); 	/* This puts entry in stack and also increments refcnt field */
 			indir_src.str = act->str;
 			indir_src.code = indir_linetail;
@@ -156,7 +162,7 @@ void	op_setzbrk(mval *rtn, mval *lab, int offset, mval *act, int cnt)
 			 * itself (in our case bundle as we are using a bundle for every instruction in the generated code.
 			 */
 			addr = find_line_call(addr);
-			if (NULL == (z_ptr = zr_find(&zbrk_recs, addr)))
+			if (NULL == (z_ptr = zr_find(&zbrk_recs, addr, RETURN_CLOSEST_MATCH_FALSE)))
 			{
 #				ifdef USHBIN_SUPPORTED
 				if ((NULL != routine->shared_ptext_adr) && (routine->shared_ptext_adr == routine->ptext_adr))
diff --git a/sr_port/op_svget.c b/sr_port/op_svget.c
index b2b022a..4449002 100644
--- a/sr_port/op_svget.c
+++ b/sr_port/op_svget.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -96,6 +97,10 @@ GBLREF size_t		totalUsedGta;
 GBLREF mstr		dollar_zchset;
 GBLREF mstr		dollar_zpatnumeric;
 GBLREF boolean_t	dollar_zquit_anyway;
+GBLREF io_pair		*io_std_device;
+GBLREF mstr		dollar_zpin;
+GBLREF mstr		dollar_zpout;
+GBLREF int		process_exiting;
 #ifdef GTM_TRIGGER
 GBLREF	mstr		*dollar_ztname;
 GBLREF	mval		*dollar_ztdata;
@@ -110,6 +115,7 @@ GBLREF	int4		gtm_trigger_depth;
 GBLREF	boolean_t	ztwormhole_used;		/* TRUE if $ztwormhole was used by trigger code */
 #endif
 
+error_def(ERR_INVSVN);
 error_def(ERR_TEXT);
 error_def(ERR_UNIMPLOP);
 error_def(ERR_ZDIROUTOFSYNC);
@@ -157,10 +163,52 @@ void op_svget(int varnum, mval *v)
 		case SV_HOROLOG:
 			op_horolog(v);
 			break;
+		case SV_ZHOROLOG:
+			op_zhorolog(v);
+			break;
+		case SV_ZUT:
+			op_zut(v);
+			break;
 		case SV_ZGBLDIR:
 			v->mvtype = MV_STR;
 			v->str = dollar_zgbldir.str;
 			break;
+		case SV_ZPIN:
+			/* if not a split device then ZPIN and ZPOUT will fall through to ZPRINCIPAL */
+			if (io_std_device->in != io_std_device->out)
+			{
+				tl = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;
+				/* will define zpin as $p contents followed by "< /", for instance: /dev/tty4< / */
+				ENSURE_STP_FREE_SPACE(tl->len + dollar_zpin.len);
+				v->mvtype = MV_STR;
+				v->str.addr = (char *)stringpool.free;
+				/* first transfer $p */
+				memcpy(stringpool.free, (char *)tl->dollar_io, tl->len);
+				stringpool.free += tl->len;
+				/* then transfer "< /" */
+				memcpy(stringpool.free, dollar_zpin.addr, dollar_zpin.len);
+				stringpool.free += dollar_zpin.len;
+				v->str.len = INTCAST((char *)stringpool.free - v->str.addr);
+				break;
+			}
+		case SV_ZPOUT:
+			/* if not a split device then ZPOUT will fall through to ZPRINCIPAL */
+			if (io_std_device->in != io_std_device->out)
+			{
+				tl = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;
+				/* will define zpout as $p contents followed by "> /", for instance: /dev/tty4> / */
+				ENSURE_STP_FREE_SPACE(tl->len + dollar_zpout.len);
+				v->mvtype = MV_STR;
+				v->str.addr = (char *)stringpool.free;
+				/* first transfer $p */
+				memcpy(stringpool.free, (char *)tl->dollar_io, tl->len);
+				stringpool.free += tl->len;
+				/* then transfer "< /" */
+				memcpy(stringpool.free, dollar_zpout.addr, dollar_zpout.len);
+				stringpool.free += dollar_zpout.len;
+				v->str.len = INTCAST((char *)stringpool.free - v->str.addr);
+				break;
+			}
 		case SV_PRINCIPAL:
 			tl = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;
 			v->str.addr = tl->dollar_io;
@@ -240,9 +288,6 @@ void op_svget(int varnum, mval *v)
 				*stringpool.free++ = *c1++;
 			v->str.len = INTCAST((char *)stringpool.free - v->str.addr);
 			break;
-		case SV_ZC:	/****THESE ARE DUMMY VALUES ONLY!!!!!!!!!!!!!!!!!****/
-			MV_FORCE_MVAL(v, 0);
-			break;
 		case SV_ZCMDLINE:
 			get_command_line(v, TRUE);	/* TRUE to indicate we want $ZCMDLINE
 							   (i.e. processed not actual command line) */
@@ -321,7 +366,12 @@ void op_svget(int varnum, mval *v)
 			MV_FORCE_MVAL(v, count);
 			break;
 		case SV_ZROUTINES:
-			if (!TREF(zro_root))
+			/* If we are in the process of exiting and come here (e.g. to do ZSHOW dump as part of creating
+			 * the fatal zshow dump file due to a fatal GTM-F-MEMORY error), do not invoke zro_init() as that
+			 * might in turn require more memory (e.g. attach to relinkctl shared memory etc.) and we dont
+			 * want to get a nested GTM-F-MEMORY error.
+			 */
+			if (!TREF(zro_root) && !process_exiting)
 				zro_init();
 			v->mvtype = MV_STR;
 			v->str = TREF(dollar_zroutines);
@@ -355,6 +405,7 @@ void op_svget(int varnum, mval *v)
 		case SV_ZSYSTEM:
 			MV_FORCE_MVAL(v, dollar_zsystem);
 			break;
+		case SV_ZC:
 		case SV_ZCSTATUS:
 			/* Maintain the external $ZCSTATUS == 1 for SUCCESS on UNIX while internal good is 0 */
 			MV_FORCE_MVAL(v, UNIX_ONLY((0 == TREF(dollar_zcstatus)) ? 1 : ) TREF(dollar_zcstatus));
@@ -561,6 +612,6 @@ void op_svget(int varnum, mval *v)
 			get_dlr_zkey(v);
 			break;
 		default:
-			assertpro(FALSE);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_INVSVN);
 	}
 }
diff --git a/sr_port/op_unlock.c b/sr_port/op_unlock.c
index aa03f2c..ba21a2c 100644
--- a/sr_port/op_unlock.c
+++ b/sr_port/op_unlock.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -23,40 +24,43 @@
 #include "mlk_unlock.h"
 #include "gvcmx.h"
 
-GBLREF boolean_t	gtcm_connection;
-GBLREF unsigned char	cm_action;
-GBLREF mlk_pvtblk	*mlk_pvt_root;
-GBLREF tp_frame		*tp_pointer;
+GBLREF	boolean_t	gtcm_connection;
+GBLREF	unsigned char	cm_action;
+GBLREF	mlk_pvtblk	*mlk_pvt_root;
+GBLREF	tp_frame	*tp_pointer;
+GBLREF	int		process_exiting;
+
+error_def(ERR_TPLOCK);
 
 void op_unlock(void)
 {
-	mlk_pvtblk **prior;
-	error_def(ERR_TPLOCK);
+	mlk_pvtblk 	**prior;
+	boolean_t	is_proc_exiting;
 
 	/* if there were any old locks before TSTART, they can't be  unlocked */
 	if (mlk_pvt_root && tp_pointer && tp_pointer->old_locks)
-		rts_error(VARLSTCNT(1) ERR_TPLOCK);
-
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_TPLOCK);
 	/* must deal with cm */
 	if (gtcm_connection)
 	{
 		cm_action = 0;
 		gvcmx_unlock(cm_action, FALSE, FALSE);
 	}
-
+	is_proc_exiting = process_exiting;	/* copy global variable into local to speed up access in loop below */
 	for (prior = &mlk_pvt_root ; *prior ; )
 	{
 		if (!(*prior)->granted)
-		{
 			mlk_pvtblk_delete(prior);
-		}
 		else if ((*prior)->zalloc)
 		{
 			(*prior)->level = 0;
 			prior = &((*prior)->next);
 		} else
-		{
-			mlk_unlock(*prior);
+		{	/* If process is dying, try not to get crit to do the unlock. This speeds up process exit. */
+			if (!is_proc_exiting)
+				mlk_unlock(*prior);
+			else
+				mlk_nocrit_unlock(*prior);
 			mlk_pvtblk_delete(prior);
 		}
 	}
diff --git a/sr_port/op_unwind.c b/sr_port/op_unwind.c
index 09d7b8c..81a7b49 100644
--- a/sr_port/op_unwind.c
+++ b/sr_port/op_unwind.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -62,7 +63,6 @@ void op_unwind(void)
 {
 	rhdtyp			*rtnhdr;
 	mv_stent 		*mvc;
-	stack_frame		*fp;
 	DBGEHND_ONLY(stack_frame *prevfp;)
 	DCL_THREADGBL_ACCESS;
 
diff --git a/sr_port/op_use.c b/sr_port/op_use.c
index 3f78190..47373f6 100644
--- a/sr_port/op_use.c
+++ b/sr_port/op_use.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,11 +15,18 @@
 #include "iosp.h"
 #include "op.h"
 #include "trans_log_name.h"
+#include "mmemory.h"
 
 GBLREF io_pair		io_curr_device;
 GBLREF io_desc		*active_device;
 GBLREF io_log_name	*dollar_principal;
 GBLREF io_log_name	*io_root_log_name;	/* root of linked list	*/
+GBLREF io_pair		*io_std_device;
+GBLREF mstr		dollar_prin_log;
+GBLREF mstr	dollar_zpin;			/* contains "< /" */
+GBLREF mstr	dollar_zpout;			/* contains "> /" */
+
+error_def(ERR_IONOTOPEN);
 
 void op_use(mval *v, mval *p)
 {
@@ -27,28 +35,61 @@ void op_use(mval *v, mval *p)
 	io_log_name	*tl;		/* logical record for translated name */
 	int4		stat;		/* status */
 	mstr		tn;		/* translated name */
-	error_def(ERR_IONOTOPEN);
+	int		dollar_zpselect;	/* 0 - both, 1 - input only, 2 - output only */
+	char		*c1;		/* used to compare $P name */
+	int		nlen;		/* len of $P name */
+	io_log_name	*tlp;		/* logical record for translated name for $principal */
 
 	MV_FORCE_STR(v);
 	MV_FORCE_STR(p);
-	nl = get_log_name(&v->str, NO_INSERT);
+
+	dollar_zpselect = 0;
+	if (io_std_device->in != io_std_device->out)
+	{
+		/* if there is a split $P then determine from the name if it is the value of "$P< /" or "$P> /"
+		   if the first then it is $ZPIN so set dollar_zpselect to 1
+		   if the second then it is $ZPOUT so set dollar_zpselect to 2
+		   else set dollar_zpselect to 0
+		   if it is $ZPIN or $ZPOUT get the log_name for $P into nl else use the mval v passed in
+		*/
+		tlp = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;
+		nlen = tlp->len;
+		assert(dollar_zpout.len == dollar_zpin.len);
+		if ((nlen + dollar_zpin.len) == v->str.len)
+		{
+			/* passed the length test now compare the 2 pieces, the first one the length of $P and the
+			   second $ZPIN or $ZPOUT */
+			c1 = (char *)tlp->dollar_io;
+			if (!memvcmp(c1, nlen, &(v->str.addr[0]), nlen))
+			{
+				if (!memvcmp(dollar_zpin.addr, dollar_zpin.len, &(v->str.addr[nlen]), dollar_zpin.len))
+					dollar_zpselect = 1;
+				else if (!memvcmp(dollar_zpout.addr, dollar_zpout.len, &(v->str.addr[nlen]), dollar_zpout.len))
+					dollar_zpselect = 2;
+			}
+		}
+	}
+	if (0 == dollar_zpselect)
+		nl = get_log_name(&v->str, NO_INSERT);
+	else
+		nl = get_log_name(&dollar_prin_log, NO_INSERT);
 	if (!nl)
 	{
 		stat = TRANS_LOG_NAME(&v->str, &tn, buf1, SIZEOF(buf1), do_sendmsg_on_log2long);
 		if (stat != SS_NORMAL)
-			rts_error(VARLSTCNT(1) ERR_IONOTOPEN);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_IONOTOPEN);
 		else
 		{
 			if ((tl = get_log_name(&tn, NO_INSERT)) == 0)
-				rts_error(VARLSTCNT(1) ERR_IONOTOPEN);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_IONOTOPEN);
 			if (!tl->iod)
-				rts_error(VARLSTCNT(1) ERR_IONOTOPEN);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_IONOTOPEN);
 			nl = get_log_name(&v->str, INSERT);
 			nl->iod = tl->iod;
 		}
 	}
 	if (nl->iod->state != dev_open)
-		rts_error(VARLSTCNT(1) ERR_IONOTOPEN);
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_IONOTOPEN);
 
 	if (dollar_principal && nl->iod == dollar_principal->iod)
 	{	/* if device is a GTM_PRINCIPAL synonym */
@@ -56,18 +97,24 @@ void op_use(mval *v, mval *p)
 	}
 	else
 	{
-		/* special case U "" and U 0 to be equivalent to U $P */
+		/* special case U "" , U 0, U $ZPIN, U $ZPOUT to be equivalent to U $P */
+		/* $ZPIN or $ZPOUT force nl to "0" */
 		/* note: "" is always the root */
-		if (nl == io_root_log_name || (nl->len == 1 && nl->dollar_io[0] == '0'))
+		if (nl == io_root_log_name || ((1 == nl->len) && ('0' == nl->dollar_io[0])))
 			nl = nl->iod->trans_name;
 	}
-
 	active_device = nl->iod;
 	io_curr_device = nl->iod->pair;
 	io_curr_device.in->name = nl;
-	(nl->iod->disp_ptr->use)(nl->iod, p);
-	if (nl->iod->pair.in != nl->iod->pair.out)
-		(nl->iod->pair.out->disp_ptr->use)(nl->iod->pair.out, p);
+	if (nl->iod->pair.in == nl->iod->pair.out)
+		(nl->iod->disp_ptr->use)(nl->iod, p);
+	else
+	{
+		if (2 != dollar_zpselect)
+			(nl->iod->disp_ptr->use)(nl->iod, p);
+		if (1 != dollar_zpselect)
+			(nl->iod->pair.out->disp_ptr->use)(nl->iod->pair.out, p);
+	}
 	active_device = 0;
 	return;
 }
diff --git a/sr_port/op_view.c b/sr_port/op_view.c
index 78a5f33..03aab31 100644
--- a/sr_port/op_view.c
+++ b/sr_port/op_view.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -44,7 +45,7 @@
 #include "gvcmz.h"
 #include "testpt.h"
 #include "mvalconv.h"
-#include "dpgbldir.h"	/* for get_next_gdr() prototype */
+#include "dpgbldir.h"		/* For get_next_gdr() prototype */
 #include "ast.h"
 #include "wcs_flu.h"
 #include "stringpool.h"
@@ -57,7 +58,7 @@
 #include "targ_alloc.h"
 #include "gvcst_protos.h"
 #ifdef GTM_TRIGGER
-# include "rtnhdr.h"		/* for rtn_tabent in gv_trigger.h */
+# include "rtnhdr.h"		/* For rtn_tabent in gv_trigger.h */
 # include "gv_trigger.h"
 # include "gtm_trigger.h"
 #endif
@@ -73,6 +74,7 @@
 # include "relinkctl.h"
 #endif
 #include "gtmimagename.h"
+#include "cache.h"
 
 STATICFNDCL void view_dbop(unsigned char keycode, viewparm *parmblkptr, mval *thirdarg);
 
@@ -91,9 +93,9 @@ GBLREF	gv_namehead		*reset_gv_target;
 GBLREF	sgmnt_addrs		*cs_addrs;
 GBLREF	sgmnt_data_ptr_t	cs_data;
 GBLREF	symval			*curr_symval;
-GBLREF	trans_num		local_tn;	/* transaction number for THIS PROCESS */
+GBLREF	trans_num		local_tn;	/* Transaction number for THIS PROCESS */
 GBLREF	int4			zdir_form;
-GBLREF	boolean_t		gvdupsetnoop; /* if TRUE, duplicate SETs update journal but not database (except for curr_tn++) */
+GBLREF	boolean_t		gvdupsetnoop;	/* If TRUE, duplicate SETs update journal but not database (except for curr_tn++) */
 GBLREF	boolean_t		badchar_inhibit;
 GBLREF	int			gv_fillfactor;
 GBLREF	symval			*curr_symval;
@@ -130,7 +132,7 @@ error_def(ERR_ZDEFACTIVE);
 
 #define WRITE_LITERAL(x) (outval.str.len = SIZEOF(x) - 1, outval.str.addr = (x), op_write(&outval))
 
-/* if changing noisolation status within TP and already referenced the global, then error */
+/* If changing noisolation status within TP and already referenced the global, then error */
 #define SET_GVNH_NOISOLATION_STATUS(gvnh, status)								\
 {														\
 	GBLREF	uint4			dollar_tlevel;								\
@@ -144,7 +146,7 @@ error_def(ERR_ZDEFACTIVE);
 
 void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 {
-	boolean_t		dbgdmpenabled, was_crit, was_skip_gtm_putmsg;
+	boolean_t		dbgdmpenabled, old_bool, was_crit, was_skip_gtm_putmsg;
 	char			*chptr;
 	collseq			*new_lcl_collseq;
 	gd_addr			*addr_ptr;
@@ -172,7 +174,6 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 #	ifdef AUTORELINK_SUPPORTED
 	open_relinkctl_sgm	*linkctl;
 	relinkrec_t		*linkrec;
-	int			recnum;
 #	endif
 	VMS_ONLY(int		numarg;)
 	static readonly char msg1[] = "Caution: Database Block Certification Has Been ";
@@ -190,7 +191,7 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 	jnl_status = 0;
 	assertpro(1 <= numarg);
 	MV_FORCE_STR(keyword);
-	numarg--;	/* remove keyword from count */
+	numarg--;	/* Remove keyword from count */
 	if (0 < numarg)
 	{
 		arg = va_arg(var, mval *);
@@ -235,8 +236,7 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 		case VTK_GVSRESET:
 		case VTK_JNLFLUSH:
 		case VTK_POOLLIMIT:
-			arg = (numarg > 1) ? va_arg(var, mval *) : NULL;
-			view_dbop(vtp->keycode, &parmblk, arg);
+			view_dbop(vtp->keycode, &parmblk, (numarg > 1) ? va_arg(var, mval *) : (mval *)NULL);
 			break;
 #		ifdef UNIX
 		case VTK_DMTERM:
@@ -247,16 +247,16 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 			break;
 #		endif
 		case VTK_FULLBOOL:
-			TREF(gtm_fullbool) = FULL_BOOL;
-			break;
 		case VTK_FULLBOOLWARN:
-			TREF(gtm_fullbool) = FULL_BOOL_WARN;
-			break;
 		case VTK_NOFULLBOOL:
-			if (OLD_SE == TREF(side_effect_handling))
-				TREF(gtm_fullbool) = GTM_BOOL;
-			else
+
+			if ((VTK_NOFULLBOOL == vtp->keycode) && (OLD_SE != TREF(side_effect_handling)))
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_SEFCTNEEDSFULLB);
+			old_bool = TREF(gtm_fullbool);
+			TREF(gtm_fullbool) = (VTK_FULLBOOL == vtp->keycode) ? FULL_BOOL
+				: (VTK_FULLBOOLWARN == vtp->keycode) ? FULL_BOOL_WARN : GTM_BOOL;
+			if (old_bool != TREF(gtm_fullbool))
+				cache_table_rebuild();
 			break;
 		case VTK_GDSCERT0:
 			outval.mvtype = MV_STR;
@@ -315,39 +315,13 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 				TREF(error_on_jnl_file_lost) = MV_FORCE_INT(parmblk.value);
 				if (MAX_JNL_FILE_LOST_OPT < TREF(error_on_jnl_file_lost))
 					TREF(error_on_jnl_file_lost) = JNL_FILE_LOST_TURN_OFF;
-				if (NULL == gd_header)		/* open gbldir */
-					gvinit();
-				save_reg = gv_cur_region;
-				/* change all regions */
-				reg = gd_header->regions;
-				r_top = reg + gd_header->n_regions - 1;
-				for (;  reg <= r_top;  reg++)
-				{
-					if (!reg->open)
-						gv_init_reg(reg);
-					if (!reg->read_only)
-					{
-						gv_cur_region = reg;
-						change_reg();
-						csa = cs_addrs;
-						csd = csa->hdr;
-						if (JNL_ENABLED(csd))
-						{
-							was_crit = csa->now_crit;
-							if (!was_crit)
-								grab_crit(reg);
-							if (JNL_ENABLED(csd))
-								csa->jnl->error_reported = FALSE;
-							if (!was_crit)
-								rel_crit(reg);
-						}
-					}
-				}
+				parmblk.gv_ptr = NULL;
+				view_dbop(vtp->keycode, &parmblk, (mval *)NULL);
 			}
 			break;
 #		endif
 		case VTK_JNLWAIT:
-			/* go through all regions that could have possibly been open across all global directories */
+			/* Go through all regions that could have possibly been open across all global directories */
 			if (!dollar_tlevel)
 			{	/* Only if we're not in a TP transaction */
 				for (addr_ptr = get_next_gdr(NULL); addr_ptr; addr_ptr = get_next_gdr(addr_ptr))
@@ -440,7 +414,7 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ACTRANGE, 1, lct);
 			}
 			was_skip_gtm_putmsg = TREF(skip_gtm_putmsg);
-			TREF(skip_gtm_putmsg) = TRUE;	/* to avoid ready_collseq from doing gtm_putmsg in case of errors.
+			TREF(skip_gtm_putmsg) = TRUE;	/* To avoid ready_collseq from doing gtm_putmsg in case of errors.
 							 * not doing so will cause GDECHECK errors in caller (GDE).
 							 */
 			new_lcl_collseq = ready_collseq(lct);
@@ -486,7 +460,7 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 				view_arg_convert(vtp, VTP_DBREGION, arg, &parmblk2, IS_DOLLAR_VIEW_FALSE);
 				reg = parmblk2.gv_ptr;
 				/* Determine if "reg" is mapped to by global name. If not issue error */
-				gvnh_reg = TREF(gd_targ_gvnh_reg);	/* set up by op_gvname */
+				gvnh_reg = TREF(gd_targ_gvnh_reg);	/* Set up by op_gvname */
 				gvspan = (NULL == gvnh_reg) ? NULL : gvnh_reg->gvspan;
 				if (((NULL != gvspan) && !gvnh_spanreg_ismapped(gvnh_reg, gd_header, reg))
 					|| ((NULL == gvspan) && (reg != gv_cur_region)))
@@ -545,7 +519,7 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ACTRANGE, 1, lct);
 				}
 			}
-			/* at this point, verify that there is no local data with subscripts */
+			/* At this point, verify that there is no local data with subscripts */
 			for (cstab = curr_symval; cstab; cstab = cstab->last_tab)
 			{
 				assert(cstab->h_symtab.top == cstab->h_symtab.base + cstab->h_symtab.size);
@@ -674,7 +648,7 @@ void	op_view(UNIX_ONLY_COMMA(int numarg) mval *keyword, ...)
 			gv_fillfactor = testvalue;
 			break;
 		case VTK_STPGCOL:
-			INVOKE_STP_GCOL(INTCAST(stringpool.top - stringpool.free) + 1);/* computation to avoid assert in stp_gcol */
+			INVOKE_STP_GCOL(INTCAST(stringpool.top - stringpool.free) + 1);/* Computation to avoid assert in stp_gcol */
 			break;
 		case VTK_LVGCOL:
 			als_lvval_gc();
@@ -825,26 +799,25 @@ void view_dbop(unsigned char keycode, viewparm *parmblkptr, mval *thirdarg)
 	uint4			jnl_status, dummy_errno;
 	UNIX_ONLY(unix_db_info	*udi;)
 
-	if (NULL == gd_header)		/* open gbldir */
+	if (NULL == gd_header)		/* Open gbldir */
 		gvinit();
 	save_reg = gv_cur_region;
 	if (NULL == parmblkptr->gv_ptr)
-	{	/* operate on all regions */
+	{	/* Operate on all regions */
 		reg = gd_header->regions;
 		r_top = reg + gd_header->n_regions - 1;
-	} else	/* operate on selected region */
+	} else	/* Operate on selected region */
 		r_top = reg = parmblkptr->gv_ptr;
 	for (; reg <= r_top; reg++)
 	{
 		if (!reg->open)
 			gv_init_reg(reg);
-		gv_cur_region = reg;
+		TP_CHANGE_REG(reg);
 		switch(keycode)
 		{
 			case VTK_DBFLUSH:
 				if (!reg->read_only)
 				{
-					change_reg(); /* for jnl_ensure_open */
 					nbuffs = (NULL != thirdarg) ? MV_FORCE_INT(thirdarg) : cs_addrs->nl->wcs_active_lvl;
 					JNL_ENSURE_OPEN_WCS_WTSTART(cs_addrs, reg, nbuffs, dummy_errno);
 				}
@@ -853,7 +826,6 @@ void view_dbop(unsigned char keycode, viewparm *parmblkptr, mval *thirdarg)
 #				ifdef UNIX
 				if (!reg->read_only)
 				{
-					change_reg();
 					csa = cs_addrs;
 					udi = FILE_INFO(reg);
 					DB_FSYNC(reg, udi, csa, db_fsync_in_prog, save_errno);
@@ -870,7 +842,6 @@ void view_dbop(unsigned char keycode, viewparm *parmblkptr, mval *thirdarg)
 			case VTK_FLUSH:
 				if (!reg->read_only)
 				{
-					change_reg(); /* for jnl_ensure_open */
 					ENSURE_JNL_OPEN(cs_addrs, gv_cur_region);
 					/* We should NOT invoke wcs_recover here because it's possible we are in the final retry
 					 * of a TP transaction. In this case, we likely have pointers to non-dirty global buffers
@@ -886,10 +857,28 @@ void view_dbop(unsigned char keycode, viewparm *parmblkptr, mval *thirdarg)
 				change_reg();
 				if (!reg->read_only)
 					CLRGVSTATS(cs_addrs);
-				memset((char *)&cs_addrs->gvstats_rec, 0, SIZEOF(gvstats_rec_t));	/* always process-private */
+				memset((char *)&cs_addrs->gvstats_rec, 0, SIZEOF(gvstats_rec_t));	/* Always process-private */
 				break;
+#			ifndef VMS
+			case VTK_JNLERROR:
+				if (!reg->read_only)
+				{
+					csa = cs_addrs;
+					csd = csa->hdr;
+					if (JNL_ENABLED(csd))
+					{
+						was_crit = csa->now_crit;
+						if (!was_crit)
+							grab_crit(reg);
+						if (JNL_ENABLED(csd))
+							csa->jnl->error_reported = FALSE;
+						if (!was_crit)
+							rel_crit(reg);
+					}
+				}
+				break;
+#				endif
 			case VTK_JNLFLUSH:
-				change_reg();
 				csa = cs_addrs;
 				csd = csa->hdr;
 				if (JNL_ENABLED(csd))
@@ -925,14 +914,13 @@ void view_dbop(unsigned char keycode, viewparm *parmblkptr, mval *thirdarg)
 				}
 				break;
 			case VTK_POOLLIMIT:
-				change_reg();
 				csa = cs_addrs;
 				csd = csa->hdr;
-				nbuffs = MV_FORCE_INT(thirdarg);
-				if ((MV_STR & thirdarg->mvtype) && ('%' == thirdarg->str.addr[thirdarg->str.len - 1]))
-					nbuffs = (100 == nbuffs) ? 0 : (csd->n_bts * nbuffs) / 100;		/* percentage */
+				nbuffs = ((dba_bg == csd->acc_meth) && (NULL != thirdarg)) ? MV_FORCE_INT(thirdarg) : 0;
+				if (nbuffs && (MV_STR & thirdarg->mvtype) && ('%' == thirdarg->str.addr[thirdarg->str.len - 1]))
+					nbuffs = (100 == nbuffs) ? 0 : (csd->n_bts * nbuffs) / 100;		/* Percentage */
 				csa->gbuff_limit = (0 == nbuffs) ? 0 : MAX(MIN(nbuffs, csd->n_bts * .5), MIN_GBUFF_LIMIT);
-				/* to pick the current "hand" as a pseudo-random spot for our area see dbg code in gvcst_init
+				/* To pick the current "hand" as a pseudo-random spot for our area see dbg code in gvcst_init
 				 * but for the first release of this always pick the end of the buffer
 				 */
 				csa->our_midnite = csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets + csd->n_bts;
diff --git a/sr_port/op_zbreak.c b/sr_port/op_zbreak.c
index ffeecb6..d3a28f5 100644
--- a/sr_port/op_zbreak.c
+++ b/sr_port/op_zbreak.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -28,7 +29,7 @@ int op_zbreak(stack_frame *fp)
 	line_addr = find_line_start(fp->mpc, fp->rvector);
 	assert(NULL != line_addr);
 	line_addr = (unsigned char *)find_line_call(line_addr) - SIZEOF_LA;
-	z_ptr = zr_find(&zbrk_recs, (zb_code *)line_addr);
+	z_ptr = zr_find(&zbrk_recs, (zb_code *)line_addr, RETURN_CLOSEST_MATCH_FALSE);
 	assert(NULL != z_ptr);
 
 	if (0 < z_ptr->count && 0 < --z_ptr->count)
diff --git a/sr_port/op_zgoto.c b/sr_port/op_zgoto.c
index 1af75c1..983c0d2 100644
--- a/sr_port/op_zgoto.c
+++ b/sr_port/op_zgoto.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2011, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2011-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -23,6 +24,7 @@
 #include <auto_zlink.h>
 #include "error.h"
 #include "gtmimagename.h"
+#include "linktrc.h"
 #ifdef UNIX
 #include "gtm_unlink_all.h"
 #endif
@@ -59,7 +61,9 @@ void op_zgoto(mval *rtn_name, mval *lbl_name, int offset, int level)
 	void		(*frame_func)();
 	char		rtnname_buff[SIZEOF(mident_fixed)], lblname_buff[SIZEOF(mident_fixed)];
 	DEBUG_ONLY(int4	dlevel;)
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
 	/* Validate level parm */
 	curlvl = dollar_zlevel();
         if (0 > level)
@@ -82,7 +86,7 @@ void op_zgoto(mval *rtn_name, mval *lbl_name, int offset, int level)
 	rtnname.str.addr = rtnname_buff;
 	memcpy(lblname_buff, lblname.str.addr, lblname.str.len);
 	lblname.str.addr = lblname_buff;
-	DBGEHND((stdout, "op_zgoto: rtnname: %.*s  lblname: %.*s  offset: %d  level: %d\n",
+	DBGEHND((stderr, "op_zgoto: rtnname: %.*s  lblname: %.*s  offset: %d  level: %d\n",
 		 rtnname.str.len, rtnname.str.addr, lblname.str.len, lblname.str.addr, offset, level));
 	/* Validate entryref before do any unwinding */
 	if (0 == rtnname.str.len)
@@ -93,6 +97,8 @@ void op_zgoto(mval *rtn_name, mval *lbl_name, int offset, int level)
 		if (0 == lblname.str.len)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_RTNNAME);
 		rtnhdr = frame_pointer->rvector;
+		ARLINK_ONLY(TADR(lnk_proxy)->rtnhdr_adr = rtnhdr);
+		DBGINDCOMP((stderr, "op_zgoto: routine resolved to 0x"lvaddr" (1)\n", rtnhdr));
 		if (0 == level)
 		{	/* If doing unlink, recall name of routine as well as will need it later */
 			memcpy(rtnname_buff, rtnhdr->routine_name.addr, rtnhdr->routine_name.len);
@@ -101,7 +107,13 @@ void op_zgoto(mval *rtn_name, mval *lbl_name, int offset, int level)
 		}
 	} else
 	{
+#		ifdef AUTORELINK_SUPPORTED
+		op_rhdaddr(&rtnname, -1);		/* Does an autozlink if necessary */
+		rtnhdr = TADR(lnk_proxy)->rtnhdr_adr;
+		DBGINDCOMP((stderr, "op_zgoto: routine resolved to 0x"lvaddr" (2)\n", rtnhdr));
+#		else
 		rtnhdr = op_rhdaddr(&rtnname, NULL);	/* Does an autozlink if necessary */
+#		endif
 #		ifdef VMS
 		if (PDSC_FLAGS == ((proc_desc *)rtnhdr)->flags) /* it's a procedure descriptor, not a routine header */
 		{
@@ -112,7 +124,12 @@ void op_zgoto(mval *rtn_name, mval *lbl_name, int offset, int level)
 #		endif
 	}
 	assert(NULL != rtnhdr);
+#	ifdef AUTORELINK_SUPPORTED
+	op_labaddr(0, &lblname, offset);
+	lnrptr = &TADR(lnk_proxy)->lnr_adr;
+#	else
 	lnrptr = op_labaddr(rtnhdr, &lblname, offset);
+#	endif
 	assert(NULL != lnrptr);
 #	ifdef VMS
 	/* VMS does not support unlink so any level 0 request that passes earlier checks just generates an error
@@ -162,10 +179,20 @@ void op_zgoto(mval *rtn_name, mval *lbl_name, int offset, int level)
 		 * that the level 1 stack frame routine has so it needs to also be rewritten once we link our new "1st routine".
 		 */
 		assert((NULL != frame_pointer) && (NULL == frame_pointer->old_frame_pointer));
+#		ifdef AUTORELINK_SUPPORTED
+		op_rhdaddr(&rtnname, -1);
+		rtnhdr = TADR(lnk_proxy)->rtnhdr_adr;
+#		else
 		rtnhdr = op_rhdaddr(&rtnname, NULL);
+#		endif
 		assert(NULL != rtnhdr);
 		frame_pointer->rvector = rtnhdr;
+#		ifdef AUTORELINK_SUPPORTED
+		op_labaddr(0, &lblname, offset);
+		lnrptr = &TADR(lnk_proxy)->lnr_adr;
+#		else
 		lnrptr = op_labaddr(rtnhdr, &lblname, offset);
+#		endif
 		assert(NULL != lnrptr);
 	} else
 #	endif	/* UNIX */
diff --git a/sr_port/op_zprint.c b/sr_port/op_zprint.c
index 044ca77..300b6cd 100644
--- a/sr_port/op_zprint.c
+++ b/sr_port/op_zprint.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -54,19 +55,20 @@ void op_zprint(mval *rtn, mval *start_label, int start_int_exp, mval *end_label,
 	mstr			*src1, *src2;
 	uint4			stat1, stat2;
 	rhdtyp			*rtn_vector, *rtn_vector2;
-	GTMTRIG_ONLY(boolean_t	is_trigger;)
+	DBGTRIGR_ONLY(boolean_t	is_trigger;)
 
 	MV_FORCE_STR(start_label);
 	MV_FORCE_STR(end_label);
 	MV_FORCE_STR(rtn);
-	GTMTRIG_ONLY(IS_TRIGGER_RTN(&rtn->str, is_trigger));
+	DBGTRIGR_ONLY(IS_TRIGGER_RTN(&rtn->str, is_trigger));
 	DBGIFTRIGR((stderr, "op_zprint: Performing zprint of a trigger $tlevel=%d $trestart=%d\n", dollar_tlevel, t_tries));
 	stat1 = get_src_line(rtn, start_label, start_int_exp, &src1, &rtn_vector);
-	DBGIFTRIGR((stderr, "op_zprint: get_src_line returned %d\n", stat1));
+	DBGTRIGR_ONLY(is_trigger=((NULL != rtn_vector) && (NULL != rtn_vector->trigr_handle)));
+	DBGIFTRIGR((stderr, "op_zprint: get_src_line returned %d for %lx\n", stat1, rtn_vector));
 	if (OBJMODMISS == stat1)
 	{
 #		ifdef GTM_TRIGGER
-		if (is_trigger)
+		if ((NULL != rtn_vector) && (NULL != rtn_vector->trigr_handle))
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_TRIGNAMENF, 2, rtn->str.len, rtn->str.addr);
 #		endif
 		/* get_src_line did not find the object file to load */
diff --git a/sr_port/op_zshow.c b/sr_port/op_zshow.c
index 1e3f3af..7c515d2 100644
--- a/sr_port/op_zshow.c
+++ b/sr_port/op_zshow.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -202,6 +203,6 @@ void op_zshow(mval *func, int type, lv_val *lvn)
 	/* If ZSHOW was done onto a subscripted lvn but no zshow records got dumped in that lvn, it might have $data = 0.
 	 * Kill it in that case as otherwise it will create an out-of-design situation for $query(lvn).
 	 */
-	if ((type == ZSHOW_LOCAL) && (active_lv == lvn))
+	if ((type == ZSHOW_LOCAL) && (NULL != active_lv) && lcl_arg1_is_desc_of_arg2(active_lv, lvn))
 		UNDO_ACTIVE_LV(actlv_op_zshow);
 }
diff --git a/sr_port/opcode_def.h b/sr_port/opcode_def.h
index 0ac2a6a..478b834 100644
--- a/sr_port/opcode_def.h
+++ b/sr_port/opcode_def.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -138,9 +139,9 @@ OPCODE_DEF(OC_CALL, (OCT_JUMP))
 OPCODE_DEF(OC_EXTCALL, (OCT_NULL))
 OPCODE_DEF(OC_JMP, (OCT_JUMP))
 OPCODE_DEF(OC_EXTJMP, (OCT_NULL))
-OPCODE_DEF(OC_LABADDR, (OCT_CDADDR))
-OPCODE_DEF(OC_RHDADDR, (OCT_CDADDR))
-OPCODE_DEF(OC_CURRHD, (OCT_CDADDR))
+OPCODE_DEF(OC_LABADDR, (ARLINK_ONLY(OCT_MINT) NON_ARLINK_ONLY(OCT_CDADDR)))
+OPCODE_DEF(OC_RHDADDR, (ARLINK_ONLY(OCT_MINT) NON_ARLINK_ONLY(OCT_CDADDR)))
+OPCODE_DEF(OC_CURRHD, (ARLINK_ONLY(OCT_MINT) NON_ARLINK_ONLY(OCT_CDADDR)))
 OPCODE_DEF(OC_CURRTN, (OCT_MVAL))
 OPCODE_DEF(OC_LDADDR, (OCT_NULL))
 OPCODE_DEF(OC_INDGLVN, (OCT_MVAL | OCT_EXPRLEAF))
@@ -237,7 +238,7 @@ OPCODE_DEF(OC_TIMTRU, (OCT_NULL))
 OPCODE_DEF(OC_IOCONTROL, (OCT_NULL))
 OPCODE_DEF(OC_FGNCAL, (OCT_NULL))
 OPCODE_DEF(OC_FNFGNCAL, (OCT_MVAL | OCT_EXPRLEAF))
-OPCODE_DEF(OC_RHDADDR1, (OCT_CDADDR))
+OPCODE_DEF(OC_RHDADDR1, (ARLINK_ONLY(OCT_MINT) NON_ARLINK_ONLY(OCT_CDADDR)))
 OPCODE_DEF(OC_ZCOMPILE, (OCT_NULL))
 OPCODE_DEF(OC_TSTART, (OCT_NULL))
 OPCODE_DEF(OC_TROLLBACK, (OCT_NULL))
@@ -344,8 +345,5 @@ OPCODE_DEF(OC_STOLITC, (OCT_NULL))
 OPCODE_DEF(OC_FNZPEEK, (OCT_MVAL | OCT_EXPRLEAF))
 OPCODE_DEF(OC_FNZSOCKET, (OCT_MVAL | OCT_EXPRLEAF))
 OPCODE_DEF(OC_FNZSYSLOG, (OCT_MVAL | OCT_EXPRLEAF))
-#ifdef AUTORELINK_SUPPORTED
-OPCODE_DEF(OC_RHD_EXT, (OCT_CDADDR))
-OPCODE_DEF(OC_LAB_EXT, (OCT_CDADDR))
 OPCODE_DEF(OC_ZRUPDATE, (OCT_NULL))
-#endif
+OPCODE_DEF(OC_CDIDX, (OCT_MINT | OCT_CGSKIP | OCT_EXPRLEAF))
diff --git a/sr_port/parm_pool.c b/sr_port/parm_pool.c
index ca73079..608eaec 100644
--- a/sr_port/parm_pool.c
+++ b/sr_port/parm_pool.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -131,11 +132,11 @@ void push_parm(UNIX_ONLY_COMMA(unsigned int totalcnt) int truth_value, ...)
 	SETUP_THREADGBL_ACCESS;
 	VAR_START(var, truth_value);
 	VMS_ONLY(va_count(totalcnt));
-	assert(4 <= totalcnt);
+	assert(PUSH_PARM_OVERHEAD <= totalcnt);
 	ret_value = va_arg(var, mval *);
 	mask = va_arg(var, int);
 	actualcnt = va_arg(var, unsigned int);
-	assert(4 + actualcnt == totalcnt);
+	assert(PUSH_PARM_OVERHEAD + actualcnt == totalcnt);
 	assert(MAX_ACTUALS >= actualcnt);
 	if (!TREF(parm_pool_ptr))
 	{
diff --git a/sr_port/preemptive_db_clnup.c b/sr_port/preemptive_db_clnup.c
index a8197ad..7ce4971 100644
--- a/sr_port/preemptive_db_clnup.c
+++ b/sr_port/preemptive_db_clnup.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -66,7 +67,9 @@ void preemptive_db_clnup(int preemptive_severe)
 	sgm_info	*si;
 	gd_region	*r_top, *reg;
 	gd_addr		*addr_ptr;
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
 	if (!dollar_tlevel && update_trans)
 	{	/* It's possible we hit an error in the middle of an update, at which point we have
 		 * a valid clue and non-NULL cse. However, this causes problems for subsequent
@@ -106,6 +109,7 @@ void preemptive_db_clnup(int preemptive_severe)
 	need_kip_incr = FALSE;	/* in case we got an error in t_end (e.g. GBLOFLOW), dont want this global variable to get
 				 * carried over to the next non-TP transaction that this process does (e.g. inside an error trap).
 				 */
+	TREF(expand_prev_key) = FALSE;	/* reset global (in case it is TRUE) so it does not get carried over to future operations */
 	if (dollar_tlevel)
 	{
 		for (si = first_sgm_info;  si != NULL; si = si->next_sgm_info)
diff --git a/sr_port/put_cdlt.c b/sr_port/put_cdlt.c
index cf6da46..473a019 100644
--- a/sr_port/put_cdlt.c
+++ b/sr_port/put_cdlt.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -17,14 +18,17 @@
 #include "compiler.h"
 #include "mmemory.h"
 
+/* Return an operator type containing a filled in CDLT_REF - i.e. a literal address reference to a routine or label table
+ * component - typically resolved to a linkage table entry in SHBIN builds and to an absolute address in non SHBIN builds.
+ */
 oprtype put_cdlt(mstr *x)
 {
-	triple *ref;
-	mstr *str;
+	triple	*ref;
+	mstr	*str;
 
 	ref = newtriple(OC_CDLIT);
 	ref->operand[0].oprclass = CDLT_REF;
-	ref->operand[0].oprval.cdlt = str = (mstr *) mcalloc(SIZEOF(mstr));
+	ref->operand[0].oprval.cdlt = str = (mstr *)mcalloc(SIZEOF(mstr));
 	str->addr = mcalloc(x->len);
 	str->len = x->len;
 	memcpy(str->addr, x->addr, x->len);
diff --git a/sr_port/put_mlab.c b/sr_port/put_mlab.c
index 9397a6a..e419d97 100644
--- a/sr_port/put_mlab.c
+++ b/sr_port/put_mlab.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,12 +11,17 @@
  ****************************************************************/
 
 #include "mdef.h"
+
 #include "compiler.h"
 
-oprtype put_mlab(mident *l)
+/* Routine to add the given label mident to the local label table and return an
+ * oprtype structure that defines the label.
+ */
+oprtype put_mlab(mident *lbl)
 {
-oprtype a;
-a.oprclass = MLAB_REF;
-a.oprval.lab = get_mladdr(l);
-return a;
+	oprtype a;
+
+	a.oprclass = MLAB_REF;
+	a.oprval.lab = get_mladdr(lbl);
+	return a;
 }
diff --git a/sr_port/put_tref.c b/sr_port/put_tref.c
index 09022e6..739d479 100644
--- a/sr_port/put_tref.c
+++ b/sr_port/put_tref.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,11 +13,11 @@
 #include "mdef.h"
 #include "compiler.h"
 
-oprtype put_tref(x)
-triple *x;
+/* Create reference to given triple and return constructed reference operator type */
+oprtype put_tref(triple *x)
 {
-oprtype a;
-a.oprclass = TRIP_REF;
-a.oprval.tref = x;
-return a;
+	oprtype a;
+	a.oprclass = TRIP_REF;
+	a.oprval.tref = x;
+	return a;
 }
diff --git a/sr_port/region_freeze.c b/sr_port/region_freeze.c
index 7cb5547..dc7e18c 100644
--- a/sr_port/region_freeze.c
+++ b/sr_port/region_freeze.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -52,7 +53,7 @@ GBLREF	bool		in_mupip_freeze;
 GBLREF	uint4		process_id;
 GBLREF	boolean_t	debug_mupip;
 #ifdef UNIX
-# define FREEZE_ID	(0 == TREF(user_id) ? FROZEN_BY_ROOT : TREF(user_id))
+# define FREEZE_ID	((0 == user_id) ? FROZEN_BY_ROOT : user_id)
 # define FREEZE_MATCH	process_id
 # define OWNERSHIP	(in_mupip_freeze ? (csd->freeze == freeze_id) : (csd->image_count == FREEZE_MATCH))
 #elif defined VMS
@@ -64,13 +65,13 @@ GBLREF	uint4		image_count;
 # error Unsupported Platform
 #endif
 
-#define SEND_FREEZEID(state)							\
-{										\
-	caller_id_flag = FALSE;							\
-	send_msg(VARLSTCNT(9) ERR_FREEZEID, 7, LEN_AND_STR(state),		\
-			DB_LEN_STR(region),					\
-			freeze_id, FREEZE_MATCH, caller_id());			\
-	caller_id_flag = TRUE;							\
+#define SEND_FREEZEID(STATE, CSA)							\
+{											\
+	caller_id_flag = FALSE;								\
+	send_msg_csa(CSA_ARG(CSA) VARLSTCNT(9) ERR_FREEZEID, 7, LEN_AND_STR(STATE),	\
+			DB_LEN_STR(region),						\
+			freeze_id, FREEZE_MATCH, caller_id());				\
+	caller_id_flag = TRUE;								\
 }
 
 error_def(ERR_FREEZEID);
@@ -163,7 +164,7 @@ freeze_status	region_freeze(gd_region *region, boolean_t freeze, boolean_t overr
 		}
 #		endif
 #		ifdef DEBUG_FREEZE
-		SEND_FREEZEID("FREEZE");
+		SEND_FREEZEID("FREEZE", csa);
 #		endif
 		return REG_FREEZE_SUCCESS;
 	}
@@ -192,7 +193,7 @@ freeze_status	region_freeze(gd_region *region, boolean_t freeze, boolean_t overr
 		}
 #		endif
 #		ifdef DEBUG_FREEZE
-		SEND_FREEZEID("UNFREEZE");
+		SEND_FREEZEID("UNFREEZE", csa);
 #		endif
 		return REG_FREEZE_SUCCESS;
 	}
diff --git a/sr_port/release_private_code_copy.c b/sr_port/release_private_code_copy.c
index 7893e6f..d24aff7 100644
--- a/sr_port/release_private_code_copy.c
+++ b/sr_port/release_private_code_copy.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2002, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2002-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,25 +15,37 @@
 #include <rtnhdr.h>
 #include "private_code_copy.h"
 #include "gtm_text_alloc.h"
-
-void adjust_frames(unsigned char *old_ptext_beg, unsigned char *old_ptext_end, unsigned char *new_ptext_beg);
+#include "arlinkdbg.h"
+#include "stack_frame.h"
 
 void release_private_code_copy(rhdtyp *rtn)
 {
 #	ifdef USHBIN_SUPPORTED
 	assert(NULL != rtn->shared_ptext_adr);
 	assert(rtn->shared_ptext_adr != rtn->ptext_adr);
-
+	DBGARLNK((stderr, "release_private_code_copy: Releasing private code copy at 0x"lvaddr" for rtnhdr 0x"lvaddr"\n",
+		  rtn->ptext_adr, rtn));
 	adjust_frames(rtn->ptext_adr, rtn->ptext_end_adr, rtn->shared_ptext_adr);
 	GTM_TEXT_FREE(rtn->ptext_adr);
 	do
 	{	/* Since more than one version of a module may exist at a given time, run the routine
 		 * header chain and check all versions - releasing the private copy if it exists.
 		 */
+		DBGARLNK((stderr, "release_private_code_copy: rtnhdr 0x"lvaddr"  Previous values - ptext_adr: 0x"lvaddr
+			  "  ptext_end_adr: 0x"lvaddr"\n", rtn, rtn->ptext_adr, rtn->ptext_end_adr));
 		rtn->ptext_end_adr = rtn->shared_ptext_adr + (rtn->ptext_end_adr - rtn->ptext_adr);
 		rtn->ptext_adr = rtn->shared_ptext_adr;
-		rtn = (rhdtyp *)rtn->old_rhead_adr;
+		DBGARLNK((stderr, "release_private_code_copy: rtnhdr 0x"lvaddr"  New values      - ptext_adr: 0x"lvaddr
+			  "  ptext_end_adr: 0x"lvaddr"\n", rtn, rtn->ptext_adr, rtn->ptext_end_adr));
+		/* Check for special case loop terminator. If this was a routine copy created when a routine in use was
+		 * recursively relinked, we do not want to follow its backchain and change those modules because this
+		 * routine copy is not part of that chain. The backpointer is only to find the original routine header
+		 * when this routine terminates. So if this routine is a recursive copy, stop the loop now.
+		 */
+		rtn = ((NULL != rtn->old_rhead_adr) && (rtn != rtn->old_rhead_adr->active_rhead_adr))
+			? (rhdtyp *)rtn->old_rhead_adr : NULL;
 	} while (NULL != rtn);
+	DBGARLNK((stderr, "release_private_code_copy: Complete\n"));
 #	endif
 	return;
 }
diff --git a/sr_port/relqueopi.c b/sr_port/relqueopi.c
index 27834d0..361fa75 100644
--- a/sr_port/relqueopi.c
+++ b/sr_port/relqueopi.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -86,9 +87,8 @@ int insqhi2(que_ent_ptr_t new, que_head_ptr_t base)
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			assert(0 == (LOCK_TRIES % 4)); /* assures there are 3 rel_quants prior to first wcs_sleep() */
-			/* If near end of loop, see if target is dead and/or wake it up */
-			if (RETRY_CASLATCH_CUTOFF == retries)
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(&base->latch, TRUE);
 		}
 	}
@@ -133,9 +133,8 @@ int insqti2(que_ent_ptr_t new, que_head_ptr_t base)
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			/* If near end of loop, see if target is dead and/or wake it up */
-			assert(0 == (LOCK_TRIES % 4)); /* assures there are 3 rel_quants prior to first wcs_sleep() */
-			if (RETRY_CASLATCH_CUTOFF == retries)
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(&base->latch, TRUE);
 		}
 	}
@@ -188,9 +187,8 @@ void_ptr_t remqhi1(que_head_ptr_t base)
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			/* If near end of loop, see if target is dead and/or wake it up */
-			assert(0 == (LOCK_TRIES % 4)); /* assures there are 3 rel_quants prior to first wcs_sleep() */
-			if (RETRY_CASLATCH_CUTOFF == retries)
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(&base->latch, TRUE);
 		}
 	}
@@ -243,9 +241,8 @@ void_ptr_t remqti1(que_head_ptr_t base)
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			assert(0 == (LOCK_TRIES % 4)); /* assures there are 3 rel_quants prior to first wcs_sleep() */
-			/* If near end of loop, see if target is dead and/or wake it up */
-			if (RETRY_CASLATCH_CUTOFF == retries)
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(&base->latch, TRUE);
 		}
 	}
diff --git a/sr_port/repl_filter.c b/sr_port/repl_filter.c
index 11743c8..f76d9e5 100644
--- a/sr_port/repl_filter.c
+++ b/sr_port/repl_filter.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -452,6 +453,8 @@ GBLREF boolean_t		heartbeat_started;
 #endif
 #endif
 GBLREF	uint4			process_id;
+GBLREF	boolean_t		err_same_as_out;
+GBLREF	volatile boolean_t	timer_in_handler;
 
 LITREF	char			*trigger_subs[];
 
@@ -511,7 +514,7 @@ static void repl_filter_close_all_pipes(void)
 int repl_filter_init(char *filter_cmd)
 {
 	int		fcntl_res, status, argc, delim_count, close_res;
-	char		cmd[4096], *delim_p;
+	char		cmd[4096], *delim_p, *strtokptr;
 	char_ptr_t	arg_ptr, argv[MAX_FILTER_ARGS];
 
 	REPL_DPRINT1("Initializing FILTER\n");
@@ -527,6 +530,10 @@ int repl_filter_init(char *filter_cmd)
 		repl_errno = EREPL_FILTERSTART_PIPE;
 		return(FILTERSTART_ERR);
 	}
+	/* Our stdout is to the filter now, so if stderr and stdout were previously conjoined, they no longer are;
+	 * note that the child will inherit this variable until exec is done.
+	 */
+	err_same_as_out = FALSE;
 	/* For Filter -> Server */
 	OPEN_PIPE(repl_filter_srv_fd, status);
 	if (0 > status)
@@ -540,7 +547,7 @@ int repl_filter_init(char *filter_cmd)
 	/* Parse the filter_cmd */
 	repl_log(stdout, FALSE, TRUE, "Filter command is %s\n", filter_cmd);
 	strcpy(cmd, filter_cmd);
-	if (NULL == (arg_ptr = strtok(cmd, FILTER_CMD_ARG_DELIM_TOKENS)))
+	if (NULL == (arg_ptr = STRTOK_R(cmd, FILTER_CMD_ARG_DELIM_TOKENS, &strtokptr)))
 	{
 		repl_filter_close_all_pipes();
 		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLFILTER, 0, ERR_TEXT, 2,
@@ -549,7 +556,7 @@ int repl_filter_init(char *filter_cmd)
 		return(FILTERSTART_ERR);
 	}
 	argv[0] = arg_ptr;
-	for (argc = 1; NULL != (arg_ptr = strtok(NULL, FILTER_CMD_ARG_DELIM_TOKENS)); argc++)
+	for (argc = 1; NULL != (arg_ptr = STRTOK_R(NULL, FILTER_CMD_ARG_DELIM_TOKENS, &strtokptr)); argc++)
 		argv[argc] = arg_ptr;
 	argv[argc] = NULL;
 	REPL_DPRINT2("Arg %d is NULL\n", argc);
diff --git a/sr_port/resolve_ref.c b/sr_port/resolve_ref.c
index b7b69d9..c4c6cdb 100644
--- a/sr_port/resolve_ref.c
+++ b/sr_port/resolve_ref.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -118,7 +119,7 @@ int resolve_ref(int errknt)
 				}
 			}
 		}
-		COMPDBG(PRINTF(" ************************************* Begin resolve_ref scan ******************************\n"););
+		COMPDBG(PRINTF("\n\n\n********************* New Compilation -- Begin resolve_ref scan **********************\n"););
 		dqloop(&t_orig, exorder, curtrip)
 		{
 			COMPDBG(PRINTF(" ************************ Triple Start **********************\n"););
diff --git a/sr_port/rsel.mpt b/sr_port/rsel.mpt
index 68949b7..0740860 100644
--- a/sr_port/rsel.mpt
+++ b/sr_port/rsel.mpt
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 1987, 2006 Fidelity Information Services, Inc	;
+; Copyright (c) 1987, 2015 Fidelity National Information	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -72,7 +73,7 @@ init
 	i '$l($zro) s d=1,d(1)="" q
         s d=0
 	f k=1:1:$l($zro,delim) d  i $l(r) s d=d+1,d(d)=$p(r,"*")
-	. s r=$p($zro,delim,k)
+	. s r=$tr($p($zro,delim,k),"*")
 	. i delim=" " d  s:$l(r) r=$zparse(r_"/","","*") q                        ; UNIX conventions
 	. . i r'["(" q                                                            ; no source info - it does both
 	. . i %ZE[".o" d  q                                                       ; only want objects
diff --git a/sr_port/rwformat.c b/sr_port/rwformat.c
index 3c1a062..38fc65e 100644
--- a/sr_port/rwformat.c
+++ b/sr_port/rwformat.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -69,6 +70,7 @@ int rwformat(void)
 			key.mvtype = MV_STR;
 			key.str.len = (TREF(window_ident)).len;
 			key.str.addr = (TREF(window_ident)).addr;
+			CLEAR_MVAL_BITS(&key);
 			s2n(&key);
 			s2pool(&(key.str));
 			argcnt = parm = newtriple(OC_PARAMETER);
diff --git a/sr_port/s2n.c b/sr_port/s2n.c
index ece8cda..a9d46ef 100644
--- a/sr_port/s2n.c
+++ b/sr_port/s2n.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -32,7 +33,6 @@ char *s2n (mval *u)
 	SETUP_THREADGBL_ACCESS;
 	i = 0;
 	assertpro(MV_DEFINED(u));
-	((mval_b *)u)->sgne = 0;				/* Clear current sign/exponent to contant start value */
 	c = u->str.addr;
 	if (0 == u->str.len)
 	{	/* Substitute pre-converted NULL/0 value */
diff --git a/sr_port/setcurtchain.c b/sr_port/setcurtchain.c
index 45630c0..f6cfdb0 100644
--- a/sr_port/setcurtchain.c
+++ b/sr_port/setcurtchain.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -29,7 +30,7 @@ triple *setcurtchain(triple *x)
 		 * insert a OC_RTERROR triple then. Now that curtchain is back in the same chain as pos_in_chain, reissue
 		 * the ins_errtriple call.
 		 */
-		 assert(!IS_STX_WARN(pending_errtriplecode) GTMTRIG_ONLY( || TREF(trigger_compile)));
+		 assert(!IS_STX_WARN(pending_errtriplecode) GTMTRIG_ONLY( || TREF(trigger_compile_and_link)));
 		 ins_errtriple(pending_errtriplecode);
 		 pending_errtriplecode = 0;
 	}
diff --git a/sr_port/shmpool.c b/sr_port/shmpool.c
index 52dedcb..803e9f3 100644
--- a/sr_port/shmpool.c
+++ b/sr_port/shmpool.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -121,7 +122,6 @@ shmpool_blk_hdr_ptr_t shmpool_blk_alloc(gd_region *reg, enum shmblk_type blktype
 
 	csa = &FILE_INFO(reg)->s_addrs;
 	sbufh_p = csa->shmpool_buffer;
-
 	for (attempts = 1; ; ++attempts)	/* Start at 1 so we don't wcs_sleep() at bottom of loop on 1st iteration */
 	{
 		/* Try a bunch of times but release lock each time to give access to queues to processes that
@@ -130,7 +130,7 @@ shmpool_blk_hdr_ptr_t shmpool_blk_alloc(gd_region *reg, enum shmblk_type blktype
 		if (FALSE == shmpool_lock_hdr(reg))
 		{
 			assert(FALSE);
-			rts_error(VARLSTCNT(9) ERR_DBCCERR, 2, REG_LEN_STR(reg), ERR_ERRCALL, 3, CALLFROM);
+			rts_error_csa(CSA_ARG(csa) VARLSTCNT(9) ERR_DBCCERR, 2, REG_LEN_STR(reg), ERR_ERRCALL, 3, CALLFROM);
 		}
 		/* Can only verify queue *AFTER* get the lock */
 		VERIFY_QUEUE((que_head_ptr_t)&sbufh_p->que_free);
@@ -178,7 +178,7 @@ shmpool_blk_hdr_ptr_t shmpool_blk_alloc(gd_region *reg, enum shmblk_type blktype
 			} else
 				limit_hit = FALSE;
 		} else
-			GTMASSERT;
+			assertpro(FALSE);
 		if (!limit_hit)
 #elif defined UNIX
 		assert(SHMBLK_BACKUP == blktype);
@@ -187,10 +187,10 @@ shmpool_blk_hdr_ptr_t shmpool_blk_alloc(gd_region *reg, enum shmblk_type blktype
 			shmpool_unlock_hdr(reg);
 			return (shmpool_blk_hdr_ptr_t)-1L;
 		}
-DEBUG_ONLY (
+#		ifdef DEBUG
 		if ((MAX_BACKUP_FLUSH_TRY / 2) == attempts)
 			GET_C_STACK_FROM_SCRIPT("BCKUPBUFLUSH", process_id, sbufh_p->shmpool_crit_latch.u.parts.latch_pid, ONCE);
-	   )
+#		endif
 		if (MAX_BACKUP_FLUSH_TRY < attempts)
 		{	/* We have tried too long .. backup errors out */
 #ifdef DEBUG
@@ -237,7 +237,6 @@ DEBUG_ONLY (
 				return sblkh_p;
 			}
 		}
-
 		/* Block buffer is not available -- call requisite reclaimation routine depending on blk type needed.
 		  The availability of backup blocks is largely under our control (we can flush to get some) so sleeping
 		  at this level won't free these up. However for reformat buffers, a short sleep to allow IO to (1) be
@@ -318,7 +317,7 @@ void shmpool_blk_free(gd_region *reg, shmpool_blk_hdr_ptr_t sblkh_p)
 	}
 #endif
 	else
-		GTMASSERT;
+		assertpro(FALSE);
 	sblkh_p->blktype = SHMBLK_FREE;
 	++sbufh_p->free_cnt;
 	insqt(&sblkh_p->sm_que, &sbufh_p->que_free);
@@ -342,7 +341,7 @@ void shmpool_harvest_reformatq(gd_region *reg)
 	if (FALSE == shmpool_lock_hdr(reg))
 	{
 		assert(FALSE);
-		rts_error(VARLSTCNT(9) ERR_DBCCERR, 2, REG_LEN_STR(reg), ERR_ERRCALL, 3, CALLFROM);
+		rts_error_csa(CSA_ARG(csa) VARLSTCNT(9) ERR_DBCCERR, 2, REG_LEN_STR(reg), ERR_ERRCALL, 3, CALLFROM);
 	}
 	if (0 < sbufh_p->reformat_cnt)
 	{	/* Only if there are some entries */
@@ -400,7 +399,6 @@ void shmpool_harvest_reformatq(gd_region *reg)
 					BG_TRACE_ANY(csa, refmt_hvst_blk_kept);
 				}
 			}
-
 		}
 	} else
 		/* Shouldn't be any queue elements either */
@@ -482,16 +480,15 @@ void shmpool_abandoned_blk_chk(gd_region *reg, boolean_t force)
 				++sbufh_p->reformat_cnt;
 			} else
 #endif
-				GTMASSERT;
+				assertpro(FALSE);
 		}
 	}
 	VERIFY_QUEUE((que_head_ptr_t)&sbufh_p->que_free);
 	VERIFY_QUEUE((que_head_ptr_t)&sbufh_p->que_backup);
 	VMS_ONLY(VERIFY_QUEUE((que_head_ptr_t)&sbufh_p->que_reformat));
 	assert((sbufh_p->free_cnt + sbufh_p->backup_cnt VMS_ONLY(+ sbufh_p->reformat_cnt)) == sbufh_p->total_blks);
-
 	sbufh_p->shmpool_blocked = FALSE;
-	send_msg(VARLSTCNT(4) ERR_SHMPLRECOV, 2, REG_LEN_STR(reg));
+	send_msg_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_SHMPLRECOV, 2, REG_LEN_STR(reg));
 }
 
 
@@ -537,11 +534,8 @@ boolean_t shmpool_lock_hdr(gd_region *reg)
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			/* assert(0 == (LOCK_TRIES % 4));  assures there are 3 rel_quants prior to first wcs_sleep()
-			   but not needed as LOCK_TRIES is multiplied by 4 above.
-			*/
-			/* If near end of loop segment (LOCK_TRIES iters), see if target is dead and/or wake it up */
-			if (RETRY_CASLATCH_CUTOFF == (retries % LOCK_TRIES))
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(latch, TRUE);
 		}
 	}
@@ -596,7 +590,6 @@ void shmpool_unlock_hdr(gd_region *reg)
 	sbufh_p = csa->shmpool_buffer;
 	latch = &sbufh_p->shmpool_crit_latch;
 	assert(process_id == latch->u.parts.latch_pid VMS_ONLY(&& image_count == latch->u.parts.latch_image_count));
-
 	/* Quickly check if our counters are as we expect them to be. If not see if we need to run
 	   our recovery procedure (shmpool_blk_abandoned_chk()).
 	*/
diff --git a/sr_port/sleep_cnt.h b/sr_port/sleep_cnt.h
index 9f996e9..11e10ab 100644
--- a/sr_port/sleep_cnt.h
+++ b/sr_port/sleep_cnt.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -15,10 +16,10 @@
 #include "min_max.h"
 
 /* Note: GT.M code *MUST*NOT* make use of the sleep() function because use of the sleep() function	(BYPASSOK - sleep())
-   causes problems with GT.M's timers on some platforms. Specifically, the sleep() function
-   causes the SIGARLM handler to be silently deleted on Solaris systems (through Solaris 9 at least).
-   This leads to lost timer pops and has the potential for system hangs. The proper long sleep mechanism
-   is hiber_start which can be accessed through the LONG_SLEEP macro defined in mdef.h.
+ * causes problems with GT.M's timers on some platforms. Specifically, the sleep() function
+ * causes the SIGARLM handler to be silently deleted on Solaris systems (through Solaris 9 at least).
+ * This leads to lost timer pops and has the potential for system hangs. The proper long sleep mechanism
+ * is hiber_start which can be accessed through the LONG_SLEEP macro defined in mdef.h.
  */
 
 /* It has been found that on some platforms wcs_sleep(1msec) takes a lot longer than 1 msec to return. We think
@@ -58,21 +59,26 @@
 #define	SLEEP_WRTLATCHWAIT	1		/* 1-msec wait */
 #define	MAXWRTLATCHWAIT		1000		/* 1sec = 1000 * 1-msec time waits to see if write-latch value of a
 						 * 	cache-record becomes free (i.e. LATCH_CLEAR) in db_csh_getn() */
-#define RETRY_CASLATCH_CUTOFF	16		/* retry loop index cutoff to try performCASLatchCheck() */
 #define MAXWAIT2KILL		(2 * SLEEP_ONE_MIN) /* KILLs wait for MAXWAIT2KILL minute(s) for inhibit_kills
 						     * to become zero */
 
 /*  For use by spin locks, SLEEP is ms, total should be under a minute */
-#define LOCK_TRIES		(50 * 4 * 1000) /* outer loop: 50 secs, 1 loop in 4 is sleep of 1 ms */
-#define LOCK_SPINS		1024		/* inner spin loop base */
+#define LOCK_TRIES_PER_SEC	(4 * 1000)	/* In outer loop: 1 loop in 4 is sleep of 1ms */
+#define LOCK_TRIES		(50 * LOCK_TRIES_PER_SEC)	/* Approximately 50 seconds for non-IO locks */
+#define LOCK_SPINS		1024		/* Inner spin loop base */
 #define LOCK_SPINS_PER_4PROC	256		/* Additional lock spins for every 4 processors past first 8 */
-#define LOCK_SLEEP		1		/* very short sleep before repoll lock */
+#define LOCK_SLEEP		1		/* Very short sleep before repoll lock */
+#define LOCK_CASLATCH_CHKINTVL	16384		/* Check CASLatch for abandonment/wakeup interval. This interval
+						 * is currently ~4 seconds but checking for 16384 (power of 2) rather
+						 * than (4 * LOCK_TRIES_PER_SEC) allows a faster remainder using AND
+						 * so use that instead.
+						 */
 
 /* To compute the maximum duration of an inner spinloop, the following macro can be
-   used. The theory behind this macro is that the basic definition of LOCK_SPINS is
-   good for approximately 8 processors but needs to be appropriately increased for
-   each additional 4 processors.
-*/
+ * used. The theory behind this macro is that the basic definition of LOCK_SPINS is
+ * good for approximately 8 processors but needs to be appropriately increased for
+ * each additional 4 processors.
+ */
 #define MAX_LOCK_SPINS(base, proc) (base + MAX(0, ((((proc - 7) * LOCK_SPINS_PER_4PROC) / 4))))
 
 /* Maximum duration (in minutes) that a process waits for the completion of read-in-progress after which
diff --git a/sr_port/stp_gcol_src.h b/sr_port/stp_gcol_src.h
index 45764c7..e39905e 100644
--- a/sr_port/stp_gcol_src.h
+++ b/sr_port/stp_gcol_src.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -837,31 +838,35 @@ void stp_gcol(int space_asked)	/* BYPASSOK */
 		 * op_unwind() is going to unlink that version of the routine. We will eventually come here (as stp_move)
 		 * with a zeroed frame pointer so the test below needs to deal with a NULL frame_pointer value.
 		 */
-		for (sf = frame_pointer; (NULL != sf) && (sf < (stack_frame *)stackbase); sf = sf->old_frame_pointer)
-		{	/* Cover temp mvals in use */
-			if (NULL == sf->old_frame_pointer)
-			{	/* If trigger enabled, may need to jump over a base frame */
-				/* TODO - fix this to jump over call-ins base frames as well */
-#				ifdef GTM_TRIGGER
-				if (SFT_TRIGR & sf->type)
-				{	/* We have a trigger base frame, back up over it */
-					sf = *(stack_frame **)(sf + 1);
-					assert(sf);
-					assert(sf->old_frame_pointer);
-				} else
-#				endif
-					break;
-			}
-			assert(sf->temps_ptr);
-			if (sf->temps_ptr >= (unsigned char *)sf)
-				continue;
-			m = (mval *)sf->temps_ptr;
-			for (mtop = m + sf->temp_mvals; m < mtop; m++)
-			{	/* DM frames should not normally have temps. If they do then it better have mvtype 0
-				 * thereby guaranteeing it will not need stp_gcol protection by the MVAL_STPG_ADD macro below.
-				 */
-				assert(!(sf->type & SFT_DM) || !MV_DEFINED(m));
-				MVAL_STPG_ADD(m);
+		if (NULL != frame_pointer)
+		{
+			for (sf = frame_pointer; sf < (stack_frame *)stackbase; sf = sf->old_frame_pointer)
+			{	/* Cover temp mvals in use */
+				if (NULL == sf->old_frame_pointer)
+				{	/* If trigger enabled, may need to jump over a base frame */
+					/* TODO - fix this to jump over call-ins base frames as well */
+#					ifdef GTM_TRIGGER
+					if (SFT_TRIGR & sf->type)
+					{	/* We have a trigger base frame, back up over it */
+						sf = *(stack_frame **)(sf + 1);
+						assert(sf);
+						assert(sf->old_frame_pointer);
+					} else
+#					endif
+						break;
+				}
+				assert(sf->temps_ptr);
+				if (sf->temps_ptr >= (unsigned char *)sf)
+					continue;
+				m = (mval *)sf->temps_ptr;
+				for (mtop = m + sf->temp_mvals; m < mtop; m++)
+				{	/* DM frames should not normally have temps. If they do then it better have mvtype 0
+					 * thereby guaranteeing it will not need stp_gcol protection by the MVAL_STPG_ADD macro
+					 * below.
+					 */
+					assert(!(sf->type & SFT_DM) || !MV_DEFINED(m));
+					MVAL_STPG_ADD(m);
+				}
 			}
 		}
 		if (NULL != TREF(glvn_pool_ptr))
diff --git a/sr_port/stx_error.c b/sr_port/stx_error.c
index d452430..04a6ebc 100644
--- a/sr_port/stx_error.c
+++ b/sr_port/stx_error.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -72,7 +73,7 @@ void stx_error(int in_error, ...)
 	 *	b) shift_side_effects
 	 *	c) source_error_found
 	 */
-	is_stx_warn = (CGP_PARSE == cg_phase) && IS_STX_WARN(in_error) GTMTRIG_ONLY( && !TREF(trigger_compile));
+	is_stx_warn = (CGP_PARSE == cg_phase) && IS_STX_WARN(in_error) GTMTRIG_ONLY( && !TREF(trigger_compile_and_link));
 	if (!is_stx_warn)
 		TREF(saw_side_effect) = TREF(shift_side_effects) = FALSE;
 	if (run_time)
diff --git a/sr_port/svnames.h b/sr_port/svnames.h
index f8495c5..7ef5a13 100644
--- a/sr_port/svnames.h
+++ b/sr_port/svnames.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -82,6 +83,10 @@ enum
 	SV_ZCLOSE,		/* 68 */
 	SV_ZKEY,		/* 69 */
 	SV_ZTDELIM,		/* 70 */
+	SV_ZPIN,		/* 71 */
+	SV_ZPOUT,		/* 72 */
+	SV_ZHOROLOG,		/* 73 */
+	SV_ZUT,			/* 74 */
 	SV_NUM_SV,		/* count - should be next to last SV entry just prior to dummy entry below */
 	SV_DUMMY_TO_FORCE_INT = 0x0FFFFFFF	/* to ensure an int on S390 */
 };
diff --git a/sr_port/t_end.c b/sr_port/t_end.c
index 5df1c0d..6905a54 100644
--- a/sr_port/t_end.c
+++ b/sr_port/t_end.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -561,7 +562,11 @@ trans_num t_end(srch_hist *hist1, srch_hist *hist2, trans_num ctn)
 		 */
 		assert(!jgbl.forw_phase_recovery || jgbl.dont_reset_gbl_jrec_time);
 		if (!jgbl.dont_reset_gbl_jrec_time)
+		{
 			SET_GBL_JREC_TIME;	/* initializes jgbl.gbl_jrec_time */
+			if (WBTEST_ENABLED(WBTEST_TEND_GBLJRECTIME_SLEEP))
+				LONG_SLEEP(2);	/* needed by white-box test case v62002/gtm8332 */
+		}
 		assert(jgbl.gbl_jrec_time);
 	}
 	block_saved = FALSE;
@@ -903,7 +908,7 @@ trans_num t_end(srch_hist *hist1, srch_hist *hist2, trans_num ctn)
 #	ifdef DEBUG
 	/* If clue is non-zero, validate it (BEFORE this could be used in a future transaction). The only exception is reorg
 	 * where we could have an invalid clue (e.g. last_rec < first_rec etc.). This is because reorg shuffles records around
-	 * heavily and therefore it is hard to maintain an uptodate clue. reorg therefore handles this situation by actually
+	 * heavily and therefore it is hard to maintain an up to date clue. reorg therefore handles this situation by actually
 	 * resetting the clue just before doing the next gvcst_search. The mu_reorg* routines already take care of this reset
 	 * (in fact, this is asserted in gvcst_search too). So we can allow invalid clues here in that special case.
 	 */
diff --git a/sr_port/t_end_sysops.c b/sr_port/t_end_sysops.c
index fdf3400..5f136d0 100644
--- a/sr_port/t_end_sysops.c
+++ b/sr_port/t_end_sysops.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2007, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2007-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -1374,6 +1375,8 @@ void	wcs_timer_start(gd_region *reg, boolean_t io_ok)
 	jnl_private_control	*jpc;
 #	endif
 
+	uint4		buffs_per_flush, flush_target;
+
 	assert(reg->open); /* there is no reason we know of why a region should be closed at this point */
 	if (!reg->open)    /* in pro, be safe though and dont touch an already closed region */
 		return;
@@ -1453,10 +1456,19 @@ void	wcs_timer_start(gd_region *reg, boolean_t io_ok)
 	/* If we are getting too full, do some i/o to clear some out.
 	 * This should happen only as we are getting near the saturation point.
 	 */
-	if (csd->flush_trigger <= cnl->wcs_active_lvl)
+	/* assume defaults for flush_target and buffs_per_flush */
+	flush_target = csd->flush_trigger;
+	buffs_per_flush = 0;
+	if ((0 != csd->epoch_taper) && (0 != cnl->wcs_active_lvl) &&
+			JNL_ENABLED(csd) && (0 != cnl->jnl_file.u.inode) && csd->jnl_before_image)
+	{
+		EPOCH_TAPER_IF_NEEDED(csa, csd, cnl, reg, TRUE, buffs_per_flush, flush_target);
+	}
+	if (flush_target  <= cnl->wcs_active_lvl)
 	{	/* Already in need of a good flush */
 		BG_TRACE_PRO_ANY(csa, active_lvl_trigger);
-		DCLAST_WCS_WTSTART(reg, 0, wtstart_errno); /* a macro that dclast's wcs_wtstart and checks for errors etc. */
+		DCLAST_WCS_WTSTART(reg, buffs_per_flush, wtstart_errno);
+		/* a macro that dclast's wcs_wtstart and checks for errors etc. */
 		/* DCLAST_WCS_WTSTART macro does not set the wtstart_errno variable in VMS. But in any case, we do not
 		 * support database file extensions with MM on VMS. So we could never get a ERR_GBLOFLOW error there.
 		 * Therefore the file extension check below is done only in Unix.
@@ -1506,6 +1518,11 @@ void	wcs_stale(gd_region *reg)
 		UNIX_ONLY(|| ((dba_mm == acc_meth) && (csa->total_blks != csa->ti->total_blks))) /* csd == NULL <=> csa == NULL */
 		)
 	{	/* don't write if region has been closed, or in UNIX if acc meth is MM and file extended */
+		/* We aren't creating a new timer so decrement the count for this one that is now done */
+		DECR_CNT(&csa->nl->wcs_timers, &csa->nl->wc_var_lock);
+		VMS_ONLY(++astq_dyn_avail;)
+		csa->timer = FALSE;		/* No timer set for this region by this process anymore */
+		/* Restore region */
 		if (save_region != gv_cur_region)
 		{
 			gv_cur_region = save_region;
diff --git a/sr_port/t_qread.c b/sr_port/t_qread.c
index 734b5c2..4003797 100644
--- a/sr_port/t_qread.c
+++ b/sr_port/t_qread.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -57,6 +58,7 @@
 #endif
 #include "wcs_phase2_commit_wait.h"
 #include "gtm_c_stack_trace.h"
+#include "gtm_time.h"
 
 GBLDEF srch_blk_status	*first_tp_srch_status;	/* the first srch_blk_status for this block in this transaction */
 GBLDEF unsigned char	rdfail_detail;	/* t_qread uses a 0 return to indicate a failure (no buffer filled) and the real
@@ -134,6 +136,8 @@ sm_uc_ptr_t t_qread(block_id blk, sm_int_ptr_t cycle, cache_rec_ptr_ptr_t cr_out
 #	ifdef GTM_CRYPT
 	gd_segment		*seg;
 #	endif
+	uint4		buffs_per_flush, flush_target;
+
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -335,8 +339,17 @@ sm_uc_ptr_t t_qread(block_id blk, sm_int_ptr_t cycle, cache_rec_ptr_ptr_t cr_out
 					assert(clustered);
 					wait_for_block_flush(bt, blk);	/* try for no other node currently writing the block */
 				}
-				if ((csd->flush_trigger <= cnl->wcs_active_lvl) && (FALSE == gv_cur_region->read_only))
-					JNL_ENSURE_OPEN_WCS_WTSTART(csa, gv_cur_region, 0, dummy_errno);
+				/* assume defaults for flush_target and buffs_per_flush */
+				flush_target = csd->flush_trigger;
+				buffs_per_flush = 0;
+				if ((0 != csd->epoch_taper) && (FALSE == gv_cur_region->read_only) && JNL_ENABLED(csd) &&
+						(0 != cnl->wcs_active_lvl) && (NOJNL != csa->jnl->channel) &&
+						(0 != cnl->jnl_file.u.inode) && csd->jnl_before_image)
+				{
+					EPOCH_TAPER_IF_NEEDED(csa, csd, cnl, (gd_region *) 0, FALSE, buffs_per_flush, flush_target);
+				}
+				if ((flush_target <= cnl->wcs_active_lvl) && (FALSE == gv_cur_region->read_only))
+					JNL_ENSURE_OPEN_WCS_WTSTART(csa, gv_cur_region, buffs_per_flush, dummy_errno);
 						/* a macro that dclast's "wcs_wtstart" and checks for errors etc. */
 				grab_crit(gv_cur_region);
 				cr = db_csh_get(blk);			/* in case blk arrived before crit */
diff --git a/sr_port/targ_alloc.c b/sr_port/targ_alloc.c
index 72cd6f9..5b83b16 100644
--- a/sr_port/targ_alloc.c
+++ b/sr_port/targ_alloc.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -67,12 +68,12 @@ gv_namehead *targ_alloc(int keysize, mname_entry *gvent, gd_region *reg)
 	 * gv_namehead structure are defined using MAX_BT_DEPTH macros and we want to guard against changes to this macro
 	 * that cause unintended changes to the layout/size of the gv_namehead structure.
 	 */
-	assert(OFFSETOF(gv_namehead, filler_8byte_align2[0]) + SIZEOF(gvt->filler_8byte_align2)
+	assert(OFFSETOF(gv_namehead, filler_8byte_align1[0]) + SIZEOF(gvt->filler_8byte_align1)
 			== OFFSETOF(gv_namehead, last_split_blk_num[0]));
 #	ifdef GTM_TRIGGER
 	assert(OFFSETOF(gv_namehead, last_split_blk_num[0]) + SIZEOF(gvt->last_split_blk_num)
 			== OFFSETOF(gv_namehead, gvt_trigger));
-	GTM64_ONLY(assert(OFFSETOF(gv_namehead, filler_8byte_align3) + SIZEOF(gvt->filler_8byte_align3)
+	GTM64_ONLY(assert(OFFSETOF(gv_namehead, filler_8byte_align2) + SIZEOF(gvt->filler_8byte_align2)
 			== OFFSETOF(gv_namehead, clue));)
 	NON_GTM64_ONLY(assert(OFFSETOF(gv_namehead, trig_mismatch_test_done) + SIZEOF(gvt->trig_mismatch_test_done)
 			== OFFSETOF(gv_namehead, clue));)
@@ -117,6 +118,7 @@ gv_namehead *targ_alloc(int keysize, mname_entry *gvent, gd_region *reg)
 	assert(0 == (OFFSETOF(gv_namehead, clue) % SIZEOF(gvt->clue)));
 	gvt->first_rec = (gv_key *)((char *)&gvt->clue + SIZEOF(gv_key) + keysize);
 	gvt->last_rec = (gv_key *)((char *)gvt->first_rec + SIZEOF(gv_key) + keysize);
+	gvt->prev_key = NULL;
 	assert((UINTPTR_T)gvt->first_rec % SIZEOF(gvt->first_rec->top) == 0);
 	assert((UINTPTR_T)gvt->last_rec % SIZEOF(gvt->last_rec->top) == 0);
 	assert((UINTPTR_T)gvt->first_rec % SIZEOF(gvt->first_rec->end) == 0);
@@ -236,5 +238,7 @@ void	targ_free(gv_namehead *gvt)
 		next_gvnh->prev_gvnh = prev_gvnh;
 	if (NULL != gvt->alt_hist)	/* can be NULL for GT.CM GNP or DDP client */
 		free(gvt->alt_hist);
+	if (NULL != gvt->prev_key)
+		free(gvt->prev_key);
 	free(gvt);
 }
diff --git a/sr_port/tp_restart.c b/sr_port/tp_restart.c
index 99992fc..1434180 100644
--- a/sr_port/tp_restart.c
+++ b/sr_port/tp_restart.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -280,20 +281,30 @@ int tp_restart(int newlevel, boolean_t handle_errors_internally)
 				reg_mstr.len = 0;
 				reg_mstr.addr = NULL;
 			}
+			if (IS_GTM_IMAGE)
+				getzposition(TADR(tp_restart_entryref));
+			else
+			{
+				(TREF(tp_restart_entryref)).mvtype = MV_STR;
+				(TREF(tp_restart_entryref)).str.addr = NULL;
+				(TREF(tp_restart_entryref)).str.len = 0;
+			}
 			if (cdb_sc_blkmod != status)
 			{
-				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(16) ERR_TPRESTART, 14, reg_mstr.len, reg_mstr.addr,
-					 t_tries + 1, t_fail_hist, t_fail_hist_blk[t_tries], gvname_mstr.len, gvname_mstr.addr,
-					 0, 0, 0, tp_blkmod_nomod,
-					 (NULL != sgm_info_ptr) ? sgm_info_ptr->num_of_blks : 0,
-					 (NULL != sgm_info_ptr) ? sgm_info_ptr->cw_set_depth : 0, &local_tn);
+				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(18) ERR_TPRESTART, 16, reg_mstr.len, reg_mstr.addr,
+					t_tries + 1, t_fail_hist, t_fail_hist_blk[t_tries], gvname_mstr.len, gvname_mstr.addr,
+					0, 0, 0, tp_blkmod_nomod,
+					(NULL != sgm_info_ptr) ? sgm_info_ptr->num_of_blks : 0,
+					(NULL != sgm_info_ptr) ? sgm_info_ptr->cw_set_depth : 0, &local_tn,
+					(TREF(tp_restart_entryref)).str.len, (TREF(tp_restart_entryref)).str.addr);
 			} else
 			{
-				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(16) ERR_TPRESTART, 14, reg_mstr.len, reg_mstr.addr,
-					 t_tries + 1, t_fail_hist, t_fail_hist_blk[t_tries], gvname_mstr.len, gvname_mstr.addr,
-					 n_pvtmods, n_blkmods, tp_fail_level, tp_fail_n,
-					 sgm_info_ptr->num_of_blks,
-					 sgm_info_ptr->cw_set_depth, &local_tn);
+				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(18) ERR_TPRESTART, 16, reg_mstr.len, reg_mstr.addr,
+					t_tries + 1, t_fail_hist, t_fail_hist_blk[t_tries], gvname_mstr.len, gvname_mstr.addr,
+					n_pvtmods, n_blkmods, tp_fail_level, tp_fail_n,
+					sgm_info_ptr->num_of_blks,
+					sgm_info_ptr->cw_set_depth, &local_tn,
+					(TREF(tp_restart_entryref)).str.len, (TREF(tp_restart_entryref)).str.addr);
 			}
 			tp_fail_hist_reg[t_tries] = NULL;
 			tp_fail_hist[t_tries] = NULL;
@@ -765,6 +776,7 @@ int tp_restart(int newlevel, boolean_t handle_errors_internally)
 	)
 	if (handle_errors_internally)
 		REVERT;
+	TREF(expand_prev_key) = FALSE;	/* in case we did a "t_retry" in the middle of "gvcst_zprevious2" */
 	GTMTRIG_ONLY(DBGTRIGR((stderr, "tp_restart: completed\n")));
 	return 0;
 }
diff --git a/sr_port/tp_tend.c b/sr_port/tp_tend.c
index 95ba835..11f15f0 100644
--- a/sr_port/tp_tend.c
+++ b/sr_port/tp_tend.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -2020,7 +2021,11 @@ enum cdb_sc	recompute_upd_array(srch_blk_status *bh, cw_set_element *cse)
 	blk_hdr_ptr_t		old_block;
 	gv_namehead		*gvt;
 	srch_blk_status		*t1;
+#	ifdef DEBUG
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
+#	endif
 	csa = cs_addrs;
 	BG_TRACE_PRO_ANY(csa, recompute_upd_array_calls);
 	assert(csa->now_crit && dollar_tlevel && sgm_info_ptr);
@@ -2193,7 +2198,8 @@ enum cdb_sc	recompute_upd_array(srch_blk_status *bh, cw_set_element *cse)
 		 * anyways and the clue would be reset to 0).
 		 */
 		assert(NULL != pKey);
-		COPY_CURRKEY_TO_GVTARGET_CLUE(gvt, pKey);
+		assert(!TREF(expand_prev_key));	/* this ensures it is safe to use EXPAND_PREV_KEY_FALSE below */
+		COPY_CURR_AND_PREV_KEY_TO_GVTARGET_CLUE(gvt, pKey, EXPAND_PREV_KEY_FALSE);
 		if (new_rec)
 			t1->curr_rec.match = gvt->clue.end + 1;	/* Keep srch_hist and clue in sync for NEXT gvcst_search */
 		/* Now that the clue is known to be non-zero, we have the potential for the first_rec part of it to be
diff --git a/sr_port/tttscan.m b/sr_port/tttscan.m
index 7ea02b9..301c797 100644
--- a/sr_port/tttscan.m
+++ b/sr_port/tttscan.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2001, 2007 Fidelity Information Services, Inc	;
+; Copyright (c) 2001-2015 Fidelity National Information 	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -86,6 +87,7 @@ argval	d scan i tok'="." s em="period (.) expected" d err s z=1 q
 	s z=0
 	q
 arglit	s ttt(ttt)="VXT_LIT",ttt=ttt+1 d scan s ttt(ttt)=tok,ttt=ttt+1
+	if tok="-" d scan set ttt(ttt-1)=ttt(ttt-1)_tok
 	d scan
 	s z=0
 	q
diff --git a/sr_port/unw_mv_ent.c b/sr_port/unw_mv_ent.c
index 86f898f..bac5550 100644
--- a/sr_port/unw_mv_ent.c
+++ b/sr_port/unw_mv_ent.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -45,6 +46,7 @@
 #include "op.h"
 #include "gt_timer.h"
 #include "iosocketdef.h"
+#include "have_crit.h"
 #ifdef UNIX
 #include "iormdef.h"
 #include "iottdef.h"
@@ -462,6 +464,7 @@ void unw_mv_ent(mv_stent *mv_st_ent)
 				dollar_ztrap = mv_st_ent->mv_st_cont.mvs_trigr.dollar_ztrap_save;
 				ztrap_explicit_null = mv_st_ent->mv_st_cont.mvs_trigr.ztrap_explicit_null_save;
 			}
+			DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);
 			CHECKHIGHBOUND(mv_st_ent->mv_st_cont.mvs_trigr.ctxt_save);
 			CHECKLOWBOUND(mv_st_ent->mv_st_cont.mvs_trigr.ctxt_save);
 			ctxt = mv_st_ent->mv_st_cont.mvs_trigr.ctxt_save;
@@ -478,6 +481,7 @@ void unw_mv_ent(mv_stent *mv_st_ent)
 								|| (&gvcst_spr_kill_ch == ctxt->ch)))))));
 			active_ch = ctxt;
 			ctxt->ch_active = FALSE;
+			ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);
 			if (tp_timeout_deferred && !((0 < dollar_ecode.index) && (ETRAP_IN_EFFECT))
 			    && !dollar_zininterrupt)
 			{	/* A tp timeout was deferred. Now that $ETRAP is no longer in effect and/or we are no
diff --git a/sr_port/unw_retarg.c b/sr_port/unw_retarg.c
index 86afd61..bd43b9c 100644
--- a/sr_port/unw_retarg.c
+++ b/sr_port/unw_retarg.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -67,7 +68,7 @@ int unw_retarg(mval *src, boolean_t alias_return)
 	rhdtyp		*rtnhdr;
 	mval		ret_value, *trg;
 	boolean_t	got_ret_target;
-	stack_frame	*prevfp, *fp;
+	stack_frame	*prevfp;
 	lv_val		*srclv, *srclvc, *base_lv;
 	symval		*symlv, *symlvc;
 	int4		srcsymvlvl;
diff --git a/sr_port/updhelper_reader.c b/sr_port/updhelper_reader.c
index 8fd7017..dadc63c 100644
--- a/sr_port/updhelper_reader.c
+++ b/sr_port/updhelper_reader.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2014 Fidelity Information Services, Inc.	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -170,10 +171,10 @@ boolean_t updproc_preread(void)
 	gtmrecv_local_ptr_t	gtmrecv_local;
 	upd_helper_ctl_ptr_t	upd_helper_ctl;
 	gvnh_reg_t		*gvnh_reg;
-#ifdef REPL_DEBUG
+#	ifdef REPL_DEBUG
 	unsigned char 		buff[MAX_ZWR_KEY_SZ], *end;
 	uint4			write, write_wrap;
-#endif
+#	endif
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -215,7 +216,8 @@ boolean_t updproc_preread(void)
 						return FALSE;
 					/* On every 4th pass, we bide for awhile */
 					wcs_sleep(LOCK_SLEEP);
-					if (RETRY_CASLATCH_CUTOFF == retries)
+					/* Check if we're due to check for lock abandonment check or holder wakeup */
+					if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 						performCASLatchCheck(&upd_helper_ctl->pre_read_lock, TRUE);
 				}
 			}
@@ -228,10 +230,10 @@ boolean_t updproc_preread(void)
 					ERR_ERRCALL, 3, CALLFROM);
 			return FALSE;
 		}
-#ifdef REPL_DEBUG
+#		ifdef REPL_DEBUG
 		write_wrap = recvpool_ctl->write_wrap;
 		write = recvpool_ctl->write;
-#endif
+#		endif
 		if (pre_read_offset >= recvpool_ctl->write_wrap)
 		{
 			REPL_DPRINT4("Wrapped: pre_read_offset = %x write_wrap = %x write = %x\n",
@@ -402,7 +404,7 @@ boolean_t updproc_preread(void)
 							}
 							if (disk_blk_read)
 								csa->nl->n_pre_read--;
-#ifdef REPL_DEBUG
+#							ifdef REPL_DEBUG
 							if (NULL == (end = format_targ_key(buff,
 											   MAX_ZWR_KEY_SZ, gv_currkey, TRUE)))
 								end = &buff[MAX_ZWR_KEY_SZ - 1];
@@ -414,7 +416,7 @@ boolean_t updproc_preread(void)
 								" Seqno = 0x!16 at XQ Rectype = !SL gv_currkey = !AD status = !SL",
 								TRUE, &recvpool.recvpool_ctl->jnl_seqno,
 								rectype, end - buff, buff, status);
-#endif
+#							endif
 						} else
 						{
 							REPL_DPRINT1("Unexpected bad record\n");
@@ -428,12 +430,12 @@ boolean_t updproc_preread(void)
 		}
 		if (!good_record)
 		{
-#ifdef REPL_DEBUG
+#			ifdef REPL_DEBUG
 			REPL_DPRINT5("Skipping record: pre_read_offset = %x read = %x write_wrap = %x write = %x\n",
 				pre_read_offset, upd_proc_local->read, write_wrap, write);
 			REPL_DPRINT3("New values: write_wrap = %x write = %x\n",
 					recvpool_ctl->write_wrap, recvpool_ctl->write);
-#endif
+#			endif
 			return TRUE;
 		}
 	} /* end while */
diff --git a/sr_port/verify_queue.c b/sr_port/verify_queue.c
index 0a0ad96..59be7fe 100644
--- a/sr_port/verify_queue.c
+++ b/sr_port/verify_queue.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,10 +20,7 @@
 
 #include "mdef.h"
 
-
-#ifdef UNIX
-#include "aswp.h"
-#endif
+#include "interlock.h"
 #include "gtm_facility.h"
 #include "gdsroot.h"
 #include "fileinfo.h"
@@ -30,45 +28,30 @@
 #include "gdsbml.h"
 #include "gdsblk.h"
 #include "gdsfhead.h"
-#include "filestruct.h"
-#include "lockconst.h"
-#include "interlock.h"
-#include "wcs_backoff.h"
-
-#ifdef QI_STARVATION
-# undef QI_STARVATION
-# undef QI_RETRY
-#endif
 
-#define QI_STARVATION 1000
-#define QI_RETRY 256
+#define LOCK_TIMEOUT_SECS	(4 * 60)	/* Define timeout as being 4 mins */
 
 GBLREF	volatile int4	fast_lock_count;
-GBLREF	pid_t		process_id;
-VMS_ONLY(GBLREF	uint4	image_count;)	/* Needed for GET/RELEASE_SWAPLOCK */
 
+/* Lock the given queue and verify its elements are well formed before releasing the lock. Returns the count of
+ * queue elements.
+ */
 gtm_uint64_t verify_queue_lock(que_head_ptr_t qhdr)
 {
-	que_ent_ptr_t	qe, last_qe;
-	gtm_uint64_t	i, k;
-	boolean_t	got_lock;
+	gtm_uint64_t	i;
 
-	++fast_lock_count;
-	/* Before running this queue, must lock it to prevent it from being changed during our run */
-	for (got_lock = FALSE, k = 0; k < QI_STARVATION; ++k)
+	++fast_lock_count;	/* grab_latch() doesn't keep fast_lock_count incremented across rel_latch() */
+	if (!grab_latch(&qhdr->latch, LOCK_TIMEOUT_SECS))
 	{
-		for (i = 0; got_lock == FALSE && i < QI_RETRY; ++i)
-			got_lock = GET_SWAPLOCK(&qhdr->latch);
-		if (got_lock)
-			break;
-		if (0 != k)
-			wcs_backoff(k);
+		fast_lock_count--;
+		assert(0 <= fast_lock_count);
+		assertpro(FALSE);
 	}
-	assertpro(got_lock);			/* We gotta have our lock */
 	i = verify_queue(qhdr);
 	/* Release locks */
-	RELEASE_SWAPLOCK(&qhdr->latch);
+	rel_latch(&qhdr->latch);
 	--fast_lock_count;
+	assert(0 <= fast_lock_count);
 	return i;
 }
 
diff --git a/sr_port/view_arg_convert.c b/sr_port/view_arg_convert.c
index 765e28a..3564061 100644
--- a/sr_port/view_arg_convert.c
+++ b/sr_port/view_arg_convert.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,6 +32,7 @@
 #include "gv_trigger_common.h"	/* for *HASHT* macros used inside GVNH_REG_INIT macro */
 #include "filestruct.h"		/* needed for "jnl.h" */
 #include "jnl.h"		/* needed for "jgbl" */
+#include "zshow.h"		/* needed for format2zwr */
 
 LITREF mval 		literal_one;
 
@@ -38,6 +40,7 @@ GBLREF	gd_addr 	*gd_header;
 GBLREF	buddy_list	*gvt_pending_buddy_list;
 GBLREF	symval		*curr_symval;
 GBLREF	buddy_list	*noisolation_buddy_list;	/* a buddy_list for maintaining the globals that are noisolated */
+GBLREF	volatile boolean_t	timer_in_handler;
 
 error_def(ERR_NOREGION);
 error_def(ERR_NOTGBL);
@@ -49,6 +52,7 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 {
 	static	int4		first_time = TRUE;
 	char			*cptr;
+	char			*strtokptr;
 	gd_binding		*gd_map;
 	gd_region		*gd_reg_start, *r_ptr, *r_top;
 	gvnh_reg_t		*gvnh_reg;
@@ -82,7 +86,7 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 			parmblk->value = parm;
 			break;
 		case (VTP_NULL | VTP_DBREGION):
-			if ((NULL == parm) || ((1 == parm->str.len) && ('*' == *parm->str.addr)))
+			if (!is_dollar_view && ((NULL == parm) || ((1 == parm->str.len) && ('*' == *parm->str.addr))))
 			{
 				parmblk->gv_ptr = NULL;
 				break;
@@ -101,21 +105,22 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 			{
 				for (cptr = parm->str.addr, n = 0; n < parm->str.len; cptr++, n++)
 					lcl_buff.c[n] = TOUPPER(*cptr);		/* Region names are upper-case ASCII */
-				cptr = parm->str.addr;				/* remember the original name */
-				parm->str.addr = (char *)&lcl_buff.c;		/* use the upper case name formed above */
+				namestr.len = n;
+				namestr.addr = &lcl_buff.c[0];
 				for (r_top = r_ptr + gd_header->n_regions; ; r_ptr++)
 				{
 					if (r_ptr >= r_top)
-						rts_error_csa(CSA_ARG(NULL)
-							VARLSTCNT(4) ERR_NOREGION,2, parm->str.len, parm->str.addr);
+					{
+						format2zwr((sm_uc_ptr_t)parm->str.addr, parm->str.len, global_names, &n);
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_NOREGION,2, n, global_names);
+					}
 					tmpstr.len = r_ptr->rname_len;
 					tmpstr.addr = (char *)r_ptr->rname;
-					MSTR_CMP(tmpstr, parm->str, n);
+					MSTR_CMP(tmpstr, namestr, n);
 					if (0 == n)
 						break;
 				}
 				parmblk->gv_ptr = r_ptr;
-				parm->str.addr = cptr;				/* be nice and restore the original name */
 			}
 			break;
 		case VTP_DBKEY:
@@ -138,7 +143,10 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 			if (MAX_MIDENT_LEN < parmblk->str.len)
 				parmblk->str.len = MAX_MIDENT_LEN;
 			if (!valid_mname(&parmblk->str))
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWGVN, 2, parmblk->str.len, parmblk->str.addr);
+			{
+				format2zwr((sm_uc_ptr_t)parm->str.addr, parm->str.len, global_names, &n);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWGVN, 2, n, global_names);
+			}
 			break;
 		case VTP_RTNAME:
 			if (NULL == parm)
@@ -192,14 +200,16 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 						parmblk->ni_list.type = NOISOLATION_NULL;
 						break;
 				}
+				if (!tmpstr.len)
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWGVN, 2, tmpstr.len, NULL);
 				memcpy(global_names, tmpstr.addr, tmpstr.len);
 				global_names[tmpstr.len] = '\0';
-				src = (unsigned char *)strtok((char *)global_names, ",");
+				src = (unsigned char *)STRTOK_R((char *)global_names, ",", &strtokptr);
 				REINITIALIZE_LIST(noisolation_buddy_list);	/* reinitialize the noisolation buddy_list */
 				parmblk->ni_list.gvnh_list = NULL;
 				for ( ; src < &global_names[tmpstr.len + 1]; src = nextsrc)
 				{
-					nextsrc = (unsigned char *)strtok(NULL, ",");
+					nextsrc = (unsigned char *)STRTOK_R(NULL, ",", &strtokptr);
 					if (NULL == nextsrc)
 						nextsrc = &global_names[tmpstr.len + 1];
 					if (nextsrc - src >= 2 && '^' == *src)
@@ -213,10 +223,17 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 							memcpy(&lcl_buff.c[0], namestr.addr, namestr.len);
 							gvent.var_name.len = namestr.len;
 						} else
-							rts_error_csa(CSA_ARG(NULL)
-								VARLSTCNT(4) ERR_VIEWGVN, 2, nextsrc - src - 1, src);
+						{
+							memcpy(&lcl_buff.c[0], src, nextsrc - src - 1);
+							format2zwr((sm_uc_ptr_t)&lcl_buff.c, nextsrc - src - 1, global_names, &n);
+							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWGVN, 2, n, global_names);
+						}
 					} else
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWGVN, 2, nextsrc - src - 1, src);
+					{
+						memcpy(&lcl_buff.c[0], src, nextsrc - src - 1);
+						format2zwr((sm_uc_ptr_t)&lcl_buff.c, nextsrc - src - 1, global_names, &n);
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWGVN, 2, n, global_names);
+					}
 					tmp_gvt = NULL;
 					gvent.var_name.addr = &lcl_buff.c[0];
 					COMPUTE_HASH_MNAME(&gvent);
@@ -279,7 +296,10 @@ void view_arg_convert(viewtab_entry *vtp, int vtp_parm, mval *parm, viewparm *pa
 				if (lvent.var_name.len > MAX_MIDENT_LEN)
 					lvent.var_name.len = MAX_MIDENT_LEN;
 				if (!valid_mname(&lvent.var_name))
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWLVN, 2, parm->str.len, parm->str.addr);
+				{
+					format2zwr((sm_uc_ptr_t)parm->str.addr, parm->str.len, global_names, &n);
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWLVN, 2, n, global_names);
+				}
 			} else
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_VIEWLVN, 2, parm->str.len, parm->str.addr);
 			/* Now look up the name.. */
diff --git a/sr_port/wbox_test_init.h b/sr_port/wbox_test_init.h
index 0409c6b..252936a 100644
--- a/sr_port/wbox_test_init.h
+++ b/sr_port/wbox_test_init.h
@@ -1,7 +1,8 @@
 
 /****************************************************************
  *								*
- *	Copyright 2005, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -154,7 +155,8 @@ typedef enum {
 	WBTEST_MAXGTMDIST_HELPER_PROCESS,	/* 115 : Make gtm_dist too big for helper process */
 	WBTEST_MAX_TRIGNAME_SEQ_NUM,		/* 116 : Induce "too many triggers" error sooner (MAX_TRIGNAME_SEQ_NUM) */
 	WBTEST_RELINKCTL_MAX_ENTRIES,		/* 117 : Bring down the maximum number of relink control entries in one file */
-	WBTEST_FAKE_BIG_KEY_COUNT		/* 118 : fake large increase in mupip load key count to show it doesn't overflow */
+	WBTEST_FAKE_BIG_KEY_COUNT,		/* 118 : fake large increase in mupip load key count to show it doesn't overflow */
+	WBTEST_TEND_GBLJRECTIME_SLEEP		/* 119 : sleep in t_end after SET_GBL_JREC_TIME to induce GTM-8332 */
 	/* Note 1: when adding new white box test cases, please make use of WBTEST_ENABLED and WBTEST_ASSIGN_ONLY (defined below)
 	 * whenever applicable
 	 * Note 2: when adding a new white box test case, see if an existing WBTEST_UNUSED* slot can be leveraged.
diff --git a/sr_port/xfer.h b/sr_port/xfer.h
index f392284..4f19362 100644
--- a/sr_port/xfer.h
+++ b/sr_port/xfer.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,7 +15,6 @@
  *  Please add new entries only at the end of this table
  *  (and, please, avoid deleting any lines).
  */
-
 XFER(xf_sto, op_sto),
 XFER(xf_cat, op_cat),
 XFER(xf_linefetch, op_linefetch),
@@ -315,6 +315,5 @@ XFER(xf_zrupdate, op_zrupdate)
 #endif
 #ifdef AUTORELINK_SUPPORTED
 ,
-XFER(xf_rhd_ext, op_rhd_ext),
-XFER(xf_lab_ext, op_lab_ext)
+XFER(xf_currhd, op_currhd)
 #endif
diff --git a/sr_port/zbreak.h b/sr_port/zbreak.h
index d7e00a2..1924392 100644
--- a/sr_port/zbreak.h
+++ b/sr_port/zbreak.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -49,7 +50,10 @@ typedef struct
 
 #define SIZEOF_LA	0
 
-zbrk_struct *zr_find(z_records *zrecs, zb_code *addr);
+#define	RETURN_CLOSEST_MATCH_FALSE	FALSE
+#define	RETURN_CLOSEST_MATCH_TRUE	TRUE
+
+zbrk_struct *zr_find(z_records *zrecs, zb_code *addr, boolean_t return_closest_match);
 zbrk_struct *zr_add_zbreak(z_records *zrecs, zb_code *addr);
 void zr_init(z_records *zrecs, int4 count);
 void zr_remove_zbreak(z_records *zrecs, zbrk_struct *z_ptr);
diff --git a/sr_port/zlput_rname.c b/sr_port/zlput_rname.c
index cca5129..ec664e6 100644
--- a/sr_port/zlput_rname.c
+++ b/sr_port/zlput_rname.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,16 +31,17 @@
 #include "stringpool.h"
 #include "gtm_text_alloc.h"
 #ifdef USHBIN_SUPPORTED
-#include <incr_link_sp.h>
+# include "incr_link_sp.h"
 #endif
 #include "zr_unlink_rtn.h"
 #ifdef UNIX
-#include "srcline.h"
-#include "gtmlink.h"
+# include "srcline.h"
+# include "gtmlink.h"
+# include "arlinkdbg.h"
 #endif
 #include "mmemory.h"
 
-STATICFNDCL boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *old_rhead, rhdtyp *hdr);
+STATICFNDCL boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *old_rhead);
 
 #define S_CUTOFF 		7
 #define FREE_RTNTBL_SPACE 	17
@@ -48,6 +50,7 @@ STATICFNDCL boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *
 
 GBLREF rtn_tabent	*rtn_fst_table, *rtn_names, *rtn_names_end, *rtn_names_top;
 GBLREF stack_frame	*frame_pointer;
+GBLREF z_records	zbrk_recs;
 
 /* Routine to perform routine table maintenance. In addition, if a routine is being replaced instead of just added, performs
  * the necessary maintenance to the replaced routine.
@@ -102,7 +105,7 @@ bool zlput_rname (rhdtyp *hdr)
 	{	/* Entry exists. Update it */
 		old_rhead = (rhdtyp *)mid->rt_adr;
 		/* Verify routine is not currently active. If it is, we must duplicate it and keep it around */
-		if (!handle_active_old_versions(&duplicated, old_rhead, hdr))
+		if (!handle_active_old_versions(&duplicated, old_rhead))
 			return FALSE;
 		if (!duplicated)
 			zr_unlink_rtn(old_rhead, FALSE); /* Free releasable pieces of old routines */
@@ -160,14 +163,36 @@ boolean_t on_stack(rhdtyp *rtnhdr, boolean_t *need_duplicate)
  *   duplicated  - Pointer to boolean return flag indicating we duplicated the input routine header and
  *                 related fields.
  *   old_rhead   - The routine header being replaced/checked.
- *   hdr         - The new routine header doing the replacing.
+ *
+ * How multiple versions of a given routine work:
+ *   a. The original routine header needs to stay as it is. The address of this routine header can be in
+ *      the linkage tables of multiple routines throughout the system. Those routines making a (new) call
+ *	to this routine should get the newest version so the original routine header is modified by
+ *	incr_link() to point to the stuff of the newest version.
+ *   b. Ditto the label table whose entries are updated by incr_link() to point to the lnrtab of the most
+ * 	recent routine.
+ *   c. Due to a & b, in order to preserve the old rtnhdr and label table, we make a copy of both of them
+ *      updating the routine header to point to the copied label table. This works because the copied label
+ *      table still points to the old lnrtab which the copied rtnhdr "inherits" (incr_link() assumes
+ * 	zlput_rname() released it but it didn't so the copied rtnhdr "owns" it now).
+ *   d. As for the linkage table, that too is "inherited" by the copied rtnhdr. Its resolved addresses
+ *      still point to what they used to and its unresolved addresses still have entries on the unresolved
+ *	chain so if a new routine resolves, it would fill in the entries of both the latest version of the
+ *	given routine as well as the copied version.
+ *   e. The copied routine header is set into all M stack frames using the old routine or its predecessors.
+ *	When the last user of the copied routine is popped, the copied routine is cleaned and the copied
+ *      structures released.
  */
-STATICFNDEF boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *old_rhead, rhdtyp *hdr)
+STATICFNDEF boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *old_rhead)
 {
 	stack_frame	*fp;
 	rhdtyp 		*rhead, *copy_rhead;
 	boolean_t	need_duplicate, is_on_stack;
 	ssize_t		sect_rw_nonrel_size;
+	DBGARLNK_ONLY(rhdtyp * fprhd;)
+#	ifdef USHBIN_SUPPORTED
+	zbrk_struct	*z_ptr;
+#	endif
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -193,6 +218,8 @@ STATICFNDEF boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *
 		 * to point to the new version of the routine. Lastly, we'll run back through the stack changing the stack frame's
 		 * "rvector" field to point to the copied routine header so it continues to work as it did.
 		 */
+		DBGARLNK((stderr, "handle_active_old_versions: Routine %.*s (rtnhdr 0x"lvaddr") needs a duplicate created\n",
+			  old_rhead->routine_name.len, old_rhead->routine_name.addr, old_rhead));
 		copy_rhead = (rhdtyp *)malloc(SIZEOF(rhdtyp));
 		*copy_rhead = *old_rhead;
 		copy_rhead->current_rhead_adr = copy_rhead;	/* Grabs of current fhead need to stay with this one for this
@@ -202,11 +229,27 @@ STATICFNDEF boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *
 							 * routine should have its active_rhead_adr field cleared when the copy
 							 * becomes inactive and gets cleaned up.
 							 */
+		/* Since old_rhead comes from the most currently linked routine in the routine table, and that value gets
+		 * replaced when we are done, it should be impossible for this value to be set more than once. Assert that.
+		 */
 		assert(NULL == old_rhead->active_rhead_adr);
 		old_rhead->active_rhead_adr = copy_rhead; /* Reserve previous version on active chain */
 		for (fp = frame_pointer; NULL != fp; fp = SKIP_BASE_FRAME(fp->old_frame_pointer))
+		{
+			DBGARLNK_ONLY(fprhd = CURRENT_RHEAD_ADR(fp->rvector));
 			if (CURRENT_RHEAD_ADR(fp->rvector) == old_rhead)
+			{
+				DBGARLNK((stderr, "handle_active_old_versions: Frame pointer 0x"lvaddr" for routine %.*s ("
+					  "rvector 0x"lvaddr") changed to copy-rtnhdr 0x"lvaddr"\n", fp,
+					  fprhd->routine_name.len, fprhd->routine_name.addr, fprhd, copy_rhead));
 				fp->rvector = copy_rhead; /* Point frame's code vector at reserved copy of old routine version */
+			} else
+			{
+				DBGARLNK((stderr, "handle_active_old_versions: Frame pointer 0x"lvaddr" for routine %.*s ("
+					  "rvector 0x"lvaddr") not modified - does not match old_rhead (0x"lvaddr")\n", fp,
+					  fprhd->routine_name.len, fprhd->routine_name.addr, fprhd, old_rhead));
+			}
+		}
 		/* Need to preserve original copy of label table for as long as this routine is active since it is used by
 		 * routines like get_symb_line (or symb_line() it calls) and find_line_start() and find_line_addr(). Once the
 		 * routine is no longer active, this label table and the copied routine header can go away since no other
@@ -217,7 +260,35 @@ STATICFNDEF boolean_t handle_active_old_versions(boolean_t *duplicated, rhdtyp *
 		copy_rhead->labtab_adr = (lab_tabent *)malloc(sect_rw_nonrel_size);
 		memcpy(copy_rhead->labtab_adr, old_rhead->labtab_adr, sect_rw_nonrel_size);
 		copy_rhead->rtn_relinked = TRUE; /* This flag is checked on unwind to see if routine should be cleaned up */
+		old_rhead->lbltext_ptr = NULL;	 /* We can clean this up when the copy unwinds - ignore it in original rhdr */
+		/* When a routine is relinked, the routine generally goes through zr_unlink_rtn() but since this routine is
+		 * recursively relinked, most of the fields of this routine are now attached to the copy rtnhdr. Those fields
+		 * will be returned when the last instance of the copy leaves the stack. But this routine still needs to have
+		 * its label names saved. We need to do this now as the copy rtnhdr has its own separate copy of the label
+		 * table so if it hasn't already been done, do it now.
+		 */
+		if (NULL == old_rhead->shlib_handle)
+			zlmov_lnames(old_rhead);
+		/* If any breakpoints are active for old_rhead, fix "rtnhdr" in those to point to "copy_rhead" instead */
+		if (old_rhead->has_ZBREAK)
+		{
+			z_ptr = zr_find(&zbrk_recs, (zb_code *)PTEXT_ADR(old_rhead), RETURN_CLOSEST_MATCH_TRUE);
+			assert(NULL != z_ptr);
+			if (NULL != z_ptr)
+			{
+				for ( ; z_ptr >= zbrk_recs.beg; z_ptr--)
+				{
+					if (!ADDR_IN_CODE((unsigned char *)z_ptr->mpc, old_rhead))
+						break;
+					z_ptr->rtnhdr = copy_rhead;
+				}
+			}
+			old_rhead->has_ZBREAK = FALSE;
+		}
 		*duplicated = TRUE;
+		DBGARLNK((stderr, "handle_active_old_versions: Routine %.*s (rtnhdr 0x"lvaddr") recursively relinked - copied "
+			  "rtnhdr: 0x"lvaddr"\n", old_rhead->routine_name.len, old_rhead->routine_name.addr, old_rhead,
+			  copy_rhead));
 	}
 #	endif /* USHBIN_SUPPORTED */
 	return TRUE;
@@ -240,14 +311,24 @@ void zr_cleanup_recursive_rtn(rhdtyp *rtnhdr)
 	}
 	if (NULL == fp)
 	{	/* We reached the end of the stack without finding the routine, seems ripe for cleaning */
+		DBGARLNK((stderr, "zr_cleanup_recursive_rtn: Recursively linked routine copy %.*s (rtnhdr 0x"lvaddr") being "
+			  "cleaned up\n", rtnhdr->routine_name.len, rtnhdr->routine_name.addr, rtnhdr));
 		assert(rtnhdr->old_rhead_adr->active_rhead_adr == rtnhdr);
 		assert(NULL == rtnhdr->active_rhead_adr);
 		zr_unlink_rtn(rtnhdr, FALSE);			/* Cleans up the copy */
 		assert(!rtnhdr->has_ZBREAK);
 		assert(!rtnhdr->old_rhead_adr->has_ZBREAK);	/* These should both be cleared now if ever set */
 		free(rtnhdr->labtab_adr);
+		/* We should have avoided saving label text for this recursively relinked routine. Assert that no cleanup is
+		 * necessary.
+		 */
+		assert(NULL == rtnhdr->lbltext_ptr);
 		rtnhdr->old_rhead_adr->active_rhead_adr = NULL;
 		free(rtnhdr);
+	} else
+	{
+		DBGARLNK((stderr, "zr_cleanup_recursive_rtn: Recursively linked routine copy %.*s (rtnhdr 0x"lvaddr") being "
+			  "left alone - still active\n", rtnhdr->routine_name.len, rtnhdr->routine_name.addr, rtnhdr));
 	}
 }
 #endif /* USHBIN_SUPPORTED */
diff --git a/sr_port/zr_find.c b/sr_port/zr_find.c
index 0347a94..3b501ea 100644
--- a/sr_port/zr_find.c
+++ b/sr_port/zr_find.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,18 +11,41 @@
  ****************************************************************/
 
 #include "mdef.h"
+
 #include <rtnhdr.h>
 #include "zbreak.h"
 
-zbrk_struct *zr_find(z_records *zrecs, zb_code *addr)
+/* Finds a breakpoint record for input "addr" in array of breakpoint records "zrecs".
+ * If "return_closest_match" is FALSE, it returns NULL if matching breakpoint record is not found.
+ * If "return_closest_match" is TRUE , it returns matching breakpoint record if one is found and if
+ *	not, it returns the breakpoint record BEFORE where the matching breakpoint record would have
+ *	been found had it been there in the array.
+ */
+zbrk_struct *zr_find(z_records *zrecs, zb_code *zb_addr, boolean_t return_closest_match)
 {
-	zbrk_struct *z_ptr;
+	zbrk_struct	*bot, *top, *mid;
+	zb_code		*zb_mpc;
 
 	/* NOTE: records are stored by decreasing addresses */
-	for (z_ptr = zrecs->beg; z_ptr < zrecs->free; z_ptr++)
+	for (bot = zrecs->beg, top = zrecs->free; bot < top; )
 	{
-		if (z_ptr->mpc == addr)
-			return(z_ptr);
+		/* At every iteration, [bot,top) is the set of records that can have the desired "zb_addr".
+		 * Note: the interval is closed "[" on the "bot" side and open ")" on the "top" side which
+		 * means bot is included in the set of potentially matching records but top is not.
+		 */
+		mid = bot + (top - bot) / 2;
+		assert(mid >= bot);
+		zb_mpc = mid->mpc;
+		if (zb_mpc == zb_addr)
+			return mid;
+		else if (zb_mpc > zb_addr)
+			bot = mid + 1;
+		else
+		{
+			assert(mid < top);
+			top = mid;
+		}
 	}
-	return NULL;
+	assert(top == bot);	/* only then would we have exited the above for loop */
+	return (return_closest_match ? (top - 1) : NULL);
 }
diff --git a/sr_port/zr_remove_zbreak.c b/sr_port/zr_remove_zbreak.c
index e2018a9..20094d7 100644
--- a/sr_port/zr_remove_zbreak.c
+++ b/sr_port/zr_remove_zbreak.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -23,7 +24,7 @@
 void zr_remove_zbreak(z_records *zrecs, zbrk_struct *z_ptr)
 {
 	mstr		rtn_str;
-	rhdtyp		*routine, *rtncopy;
+	rhdtyp		*routine;
 	boolean_t	deleted;
 
 	assert(zrecs->beg  <= zrecs->free);
@@ -46,7 +47,7 @@ void zr_remove_zbreak(z_records *zrecs, zbrk_struct *z_ptr)
 	inst_flush(z_ptr->mpc, SIZEOF(INST_TYPE));
 #	ifdef USHBIN_SUPPORTED
 	if (((z_ptr == zrecs->beg) || ((z_ptr - 1)->rtnhdr != z_ptr->rtnhdr))
-	    && (((z_ptr + 1) == zrecs->free) || ((z_ptr + 1)->rtnhdr != z_ptr->rtnhdr)))
+		&& (((z_ptr + 1) == zrecs->free) || ((z_ptr + 1)->rtnhdr != z_ptr->rtnhdr)))
 	{	/* No more breakpoints in the routine we just removed a ZBREAK from. Note that since zrecs is sorted based
 		 * on mpc, all breakpoints in a given routine are bunched together. Hence, it is possible to determine
 		 * if all breakpoints are deleted from a routine by checking the preceding and succeeding entries of the
@@ -55,21 +56,13 @@ void zr_remove_zbreak(z_records *zrecs, zbrk_struct *z_ptr)
 		assert(0 != z_ptr->rtn->len);
 		rtn_str.len = z_ptr->rtn->len;
 		rtn_str.addr = z_ptr->rtn->addr;
-		routine = rtncopy = z_ptr->rtnhdr;
+		routine = z_ptr->rtnhdr;
 		assert(NULL != routine);
-		/* We now have the routine header associated with this ZBREAK. But if this routine was recursively relinked
-		 * AND shared, then the address we need to check about releasing is associated with the copy of the routine
-		 * header/code we made for the recursive link (see handle_active_old_versions() for description).
-		 */
-		if (NULL != routine->active_rhead_adr)
-		{
-			rtncopy = routine->active_rhead_adr;
-			rtncopy->has_ZBREAK = FALSE;
-		}
-		if (NULL != rtncopy->shared_ptext_adr) 		/* Revert back to shared copy of routine */
+		assert(NULL == routine->active_rhead_adr);
+		if (NULL != routine->shared_ptext_adr) 		/* Revert back to shared copy of routine */
 		{
-			assert(rtncopy->shared_ptext_adr != rtncopy->ptext_adr);
-			release_private_code_copy(rtncopy);
+			assert(routine->shared_ptext_adr != routine->ptext_adr);
+			release_private_code_copy(routine);
 		}
 		routine->has_ZBREAK = FALSE;	/* Indicate no more ZBREAKs in this routine */
 	}
diff --git a/sr_port/zr_remove_zbrks.c b/sr_port/zr_remove_zbrks.c
index 39a005c..23851b6 100644
--- a/sr_port/zr_remove_zbrks.c
+++ b/sr_port/zr_remove_zbrks.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2002, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2002-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -24,24 +25,16 @@ GTMTRIG_ONLY(error_def(ERR_TRIGZBREAKREM);)
 /* Remove all ZBREAKs in given rtn */
 void zr_remove_zbrks(rhdtyp *rtn, boolean_t notify_is_trigger)
 {
-	rhdtyp			*rtn_look;
 	zbrk_struct		*zb_ptr;
 	GTMTRIG_ONLY(boolean_t	msg_done = FALSE;)
 
-	rtn_look = rtn;		/* Initially routine to look for is same */
-#	ifdef USHBIN_SUPPORTED
-	if ((NULL != rtn) && (rtn->rtn_relinked))
-	{	/* For a recursively linked routine, the saved routine header is actually the original, not the
-		 * copy we were supplied by caller.
-		 */
-		rtn_look = rtn->old_rhead_adr;
-	}
-#	endif /* USHBIN_SUPPORTED */
+	/* This function should never be called for an older version of a recursively relinked routine. Assert that. */
+	USHBIN_ONLY(assert((NULL == rtn) || (NULL == rtn->active_rhead_adr));)
 	for (zb_ptr = zbrk_recs.free - 1; NULL != zbrk_recs.beg && zb_ptr >= zbrk_recs.beg; zb_ptr--)
 	{	/* Go in the reverse order to reduce memory movement in zr_put_free() */
-		if ((NULL == rtn_look) || (zb_ptr->rtnhdr == rtn_look))
+		if ((NULL == rtn) || (zb_ptr->rtnhdr == rtn))
 		{
-			assert((NULL == rtn_look) || (ADDR_IN_CODE(((unsigned char *)zb_ptr->mpc), rtn)));
+			assert((NULL == rtn) || (ADDR_IN_CODE(((unsigned char *)zb_ptr->mpc), rtn)));
 #			ifdef GTM_TRIGGER
 			if ((BREAKMSG == notify_is_trigger) && !msg_done && (break_message_mask & TRIGGER_ZBREAK_REMOVED_MASK))
 			{	/* Message is info level */
diff --git a/sr_port/zr_unlink_rtn.c b/sr_port/zr_unlink_rtn.c
index bc7885e..bf75f7c 100644
--- a/sr_port/zr_unlink_rtn.c
+++ b/sr_port/zr_unlink_rtn.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -27,7 +28,8 @@
 #include "zroutines.h"
 #include "incr_link.h"
 #ifdef UNIX
-#include "rtnobj.h"
+# include "rtnobj.h"
+# include "arlinkdbg.h"
 #endif
 
 /* Routine to unlink given old flavor of routine (as much of it as we are able).
@@ -46,7 +48,13 @@ void zr_unlink_rtn(rhdtyp *old_rhead, boolean_t free_all)
 {
 	textElem        *telem;
 	rhdtyp		*rhdr, *next_rhdr;
+	DCL_THREADGBL_ACCESS;
 
+	SETUP_THREADGBL_ACCESS;
+#	ifdef UNIX
+	DBGARLNK((stderr, "zr_unlink_rtn: Cleaning requested for routine %.*s (rtnhdr 0x"lvaddr")\n",
+		  old_rhead->routine_name.len, old_rhead->routine_name.addr, old_rhead));
+#	endif
 	zr_remove_zbrks(old_rhead, NOBREAKMSG);	/* Remove breakpoints (now inactive) */
 	/* If source has been read in for old routine, free space. On VMS, source is associated with a routine name
 	 * table entry. On UNIX, source is associated with a routine header, and we may have different sources for
@@ -68,7 +76,11 @@ void zr_unlink_rtn(rhdtyp *old_rhead, boolean_t free_all)
 			 (char *)(old_rhead->literal_text_adr + old_rhead->literal_text_len));
 	if (NULL == old_rhead->shlib_handle)
         {	/* Object is not resident in a shared library */
-		if (!free_all)
+		if (!free_all && !old_rhead->rtn_relinked)
+			/* If recursively relinked, then this need not be done as it entirely disappears when it unwinds.
+			 * But the zlmov_lnames() for the original version of this routine was taken care of during the
+			 * recursive-relink in handle_active_old_versions().
+			 */
 			zlmov_lnames(old_rhead); 	/* Copy the label names from literal pool to malloc'd area */
 #		ifdef AUTORELINK_SUPPORTED
 		if (old_rhead->shared_object)
@@ -91,10 +103,17 @@ void zr_unlink_rtn(rhdtyp *old_rhead, boolean_t free_all)
 	free(old_rhead->linkage_adr);		/* Release the old linkage section */
 	old_rhead->linkage_adr = NULL;
 #	ifdef AUTORELINK_SUPPORTED
+	if (old_rhead->shared_object)		/* If this is a shared object (not shared library), release rtn name/path text */
+	{	/* After freeing, these names should be reset by incr_link() but in case not - set them to NULL */
+		free(old_rhead->src_full_name.addr);
+		old_rhead->src_full_name.addr = old_rhead->routine_name.addr = NULL;
+	}
 	if (NULL != old_rhead->zhist)
 	{	/* Free history used for autorelink if present */
 		free(old_rhead->zhist);
 		old_rhead->zhist = NULL;
+		assert(0 < TREF(arlink_loaded));
+		(TREF(arlink_loaded))--;	/* Reduce count when arlinked routine unloaded */
 	}
 #	endif /* AUTORELINK_SUPPORTED */
 #	else  /* (now) !USHBIN_SUPPORTED */
@@ -107,20 +126,18 @@ void zr_unlink_rtn(rhdtyp *old_rhead, boolean_t free_all)
 	if (free_all)
 	{	/* We are not keeping any parts of this routine (generally used for triggers and for gtm_unlink_all()) */
 #		ifdef USHBIN_SUPPORTED
-		free(old_rhead->labtab_adr);	/* Usually non-releasable but not in this case */
+		free(old_rhead->labtab_adr);			/* Usually non-releasable but not in this case */
 		if (old_rhead->lbltext_ptr)
-			free(old_rhead->lbltext_ptr);	/* Get rid of any label text hangers-on */
-		if (old_rhead->shared_object)		/* If this is a shared object (not library), drop rtn name/path text */
-			free(old_rhead->src_full_name.addr);
+			free(old_rhead->lbltext_ptr);		/* Get rid of any label text hangers-on */
+		assert(NULL == old_rhead->active_rhead_adr);	/* Should be no copies of rtnhdrs at this point */
 		/* Run the chain of old (replaced) versions freeing them also if they exist*/
 		for (rhdr = OLD_RHEAD_ADR(old_rhead); NULL != rhdr; rhdr = next_rhdr)
 		{
 			next_rhdr = rhdr->old_rhead_adr;
 			if (rhdr->lbltext_ptr)
 				free(rhdr->lbltext_ptr);	/* Get rid of any label text hangers-on */
-			if (rhdr->shared_object)		/* If this is a shared object, drop rtn name/path text */
-				free(rhdr->src_full_name.addr);
 			free(rhdr->labtab_adr);			/* Free dangling label table */
+			assert(NULL == rhdr->active_rhead_adr);	/* Should be no copies of rtnhdrs at this point */
 			free(rhdr);
 		}
 		free(old_rhead);
diff --git a/sr_port/zshow_output.c b/sr_port/zshow_output.c
index 2f29f3b..5ccac1a 100644
--- a/sr_port/zshow_output.c
+++ b/sr_port/zshow_output.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,6 +13,8 @@
 #include "mdef.h"
 
 #include "gtm_string.h"
+#include "gtm_stdio.h"
+#include "min_max.h"
 
 #include "error.h"
 #include "lv_val.h"
@@ -62,6 +65,9 @@ GBLREF	gd_region	*gv_cur_region;
 GBLREF	mv_stent	*mv_chain;
 GBLREF	unsigned char    *msp, *stackwarn, *stacktop;
 GBLREF	int		process_exiting;
+GBLREF	volatile boolean_t	timer_in_handler;
+
+LITREF mval literal_null;
 
 error_def(ERR_ZSHOWGLOSMALL);
 error_def(ERR_STACKOFLOW);
@@ -70,14 +76,15 @@ error_def(ERR_MAXNRSUBSCRIPTS);
 
 void zshow_output(zshow_out *out, const mstr *str)
 {
-	mval		*mv, lmv;
+	mval		*mv, lmv, *mv_child;
 	lv_val		*lv, *lv_child;
 	char		buff, *strptr, *strnext, *strtop, *strbase, *leadptr;
+	char		*tempstr, *piecestr, *strtokptr;
 	int		key_ovrhd, str_processed, sbs_depth, dbg_sbs_depth;
-	ssize_t        	len, outlen, chcnt, char_len, disp_len ;
+	ssize_t        	len, outlen, chcnt, char_len, disp_len;
 	int		buff_len;
 	int		device_width, inchar_width, cumul_width;
-	boolean_t	is_base_var, lvundef, utf8_active;
+	boolean_t	is_base_var, lvundef, utf8_active, zshow_depth;
 	gd_addr		*gbl_gd_addr;
 	gvnh_reg_t	*gvnh_reg;
 #ifdef UNICODE_SUPPORTED
@@ -100,6 +107,23 @@ void zshow_output(zshow_out *out, const mstr *str)
 	} else
 		mv = &lmv;
 	mv->mvtype = 0; /* initialize mval in M-stack in case stp_gcol gets called before value gets initialized below */
+	/* does this zshow "code" use subscripts for output */
+	if ((('C' == out->code) || ('c' == out->code)) && ((ZSHOW_LOCAL == out->type) || (ZSHOW_GLOBAL == out->type)))
+	{
+		zshow_depth = TRUE;
+		/* get a pointer to a garbage collection protected mval */
+		PUSH_MV_STENT(MVST_MVAL);
+		mv_child = &mv_chain->mv_st_cont.mvs_mval;
+		mv_child->mvtype = MV_STR;
+		ENSURE_STP_FREE_SPACE(1);
+		/* create an mval for the "code" subscript */
+		mv_child->str.addr = (char *)stringpool.free;
+		*mv_child->str.addr = out->code;
+		mv_child->str.len = 1;
+		stringpool.free +=1;
+	}
+	else
+		zshow_depth = FALSE;
 	switch (out->type)
 	{
 	case ZSHOW_DEVICE:
@@ -127,7 +151,7 @@ void zshow_output(zshow_out *out, const mstr *str)
 					strptr += outlen;
 					disp_len -= outlen;
 				}
-#ifdef UNICODE_SUPPORTED
+#				ifdef UNICODE_SUPPORTED
 				else
 				{
 					utf8_active = (CHSET_M != io_curr_device.out->ichset); /* needed by GTM_IO_WCWIDTH macro */
@@ -144,7 +168,7 @@ void zshow_output(zshow_out *out, const mstr *str)
 					}
 					outlen = (ssize_t)(strptr - strbase);
 				}
-#endif
+#				endif
 				memcpy(out->ptr, strbase, outlen);
 				out->ptr += outlen;
 				str_processed += (int)outlen;
@@ -163,8 +187,60 @@ void zshow_output(zshow_out *out, const mstr *str)
 			WRITE_ONE_LINE_FROM_BUFFER
 		break;
 	case ZSHOW_LOCAL:
-		if (out->code)
+		if (out->code) /* For locals, code == 0 indicates there is nothing to add (str) nor to flush */
 		{
+			if (zshow_depth)
+			{
+				/* if the subscript "code" already exists, delete it */
+				lv = out->out_var.lv.lvar;
+				if (out->code != out->curr_code)
+				{
+					lv_child = op_srchindx(VARLSTCNT(2) lv, mv_child);
+					if (NULL != lv_child)
+					{
+						lvundef = FALSE;
+						if (!LV_IS_VAL_DEFINED(lv))
+						{
+							lv->v.mvtype = MV_STR;
+							lv->v.str.len = 0;
+							lvundef = TRUE;
+						}
+						op_kill(lv_child);
+						if (lvundef)
+							lv->v.mvtype = 0;
+					}
+				}
+				/* make sure another subscript will fit */
+				is_base_var = LV_IS_BASE_VAR(lv);
+				LV_SBS_DEPTH(lv, is_base_var, sbs_depth);
+				if (MAX_LVSUBSCRIPTS <= (sbs_depth + 1))
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXNRSUBSCRIPTS);
+				/* add the subscript for the "code" */
+				lv_child = op_putindx(VARLSTCNT(2) lv, mv_child);
+				lv_child->v.mvtype = 0; /* don't want a node so make it undef'd */
+				for (tempstr = str->addr; piecestr = STRTOK_R(tempstr,".", &strtokptr);
+						tempstr = NULL) /* WARNING assignment in test */
+				{
+					len = MIN(strlen(piecestr), MAX_MIDENT_LEN);
+					/* create the mval for the next subscript */
+					ENSURE_STP_FREE_SPACE(len);
+					mv_child->str.addr = (char *)stringpool.free;
+					stringpool.free +=len;
+					strncpy(mv_child->str.addr, piecestr, len);
+					mv_child->str.len = len;
+					/* make sure the subscript will fit */
+					is_base_var = LV_IS_BASE_VAR(lv_child);
+					LV_SBS_DEPTH(lv_child, is_base_var, sbs_depth);
+					if (MAX_LVSUBSCRIPTS <= (sbs_depth + 1))
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXNRSUBSCRIPTS);
+					/* add the subscript */
+					lv_child = op_putindx(VARLSTCNT(2) lv_child, mv_child);
+					lv_child->v.mvtype = 0; /* if it is not the last one, no node */
+				}
+				lv_child->v = literal_null; /* make a node out of the last one with a value of "" */
+				POP_MV_STENT(); /* we are done with our mval */
+				break;
+			}
 			if (out->code != out->curr_code)
 			{
 				ENSURE_STP_FREE_SPACE(1);
@@ -214,13 +290,13 @@ void zshow_output(zshow_out *out, const mstr *str)
 							break;
 						len = MAX_SRCLINE - (ssize_t)(out->ptr - out->buff);
 						strbase = str->addr + str_processed;
-#ifdef UNICODE_SUPPORTED
+#						ifdef UNICODE_SUPPORTED
 						if (gtm_utf8_mode)
 						{ /* terminate at the proper character boundary within MAX_SRCLINE bytes */
 							UTF8_LEADING_BYTE(strbase + len, strbase, leadptr);
 							len = (ssize_t)(leadptr - strbase);
 						}
-#endif
+#						endif
 						memcpy(out->ptr, strbase, len);
 						strptr += len;
 						out->ptr += len;
@@ -272,6 +348,43 @@ void zshow_output(zshow_out *out, const mstr *str)
 		}
 		break;
 	case ZSHOW_GLOBAL:
+		if (zshow_depth)
+		{
+			gbl_gd_addr = TREF(gd_targ_addr);	/* set by op_gvname/op_gvextnam/op_gvnaked at start of ZSHOW cmd */
+			gvnh_reg = TREF(gd_targ_gvnh_reg);	/* set by op_gvname/op_gvextnam/op_gvnaked at start of ZSHOW cmd */
+			gv_currkey->end = out->out_var.gv.end;
+			gv_currkey->prev = out->out_var.gv.prev;
+			gv_currkey->base[gv_currkey->end] = 0;
+			/* add the "code" subscript */
+			mval2subsc(mv_child, gv_currkey, gv_cur_region->std_null_coll);
+			/* ensure this subscript "code" does not exist by deleting it*/
+			if (out->code && out->code != out->curr_code)
+			{
+				GV_BIND_SUBSNAME_FROM_GVNH_REG_IF_GVSPAN(gvnh_reg, gbl_gd_addr, gv_currkey);
+				if (gv_currkey->end >= gv_cur_region->max_key_size)
+					ISSUE_GVSUBOFLOW_ERROR(gv_currkey, KEY_COMPLETE_TRUE);
+				op_gvkill();
+			}
+			tempstr=str->addr;
+			/* build the key by adding the rest of the subscripts */
+			for (tempstr = str->addr; piecestr = STRTOK_R(tempstr,".", &strtokptr); /* WARNING assignment in test */
+					tempstr = NULL)
+			{
+				len = MIN(strlen(piecestr), MAX_MIDENT_LEN);
+				ENSURE_STP_FREE_SPACE(len);
+				mv_child->str.addr = (char *)stringpool.free;
+				stringpool.free +=len;
+				strncpy(mv_child->str.addr, piecestr, len);
+				mv_child->str.len = len;
+				mval2subsc(mv_child, gv_currkey, gv_cur_region->std_null_coll);
+				GV_BIND_SUBSNAME_FROM_GVNH_REG_IF_GVSPAN(gvnh_reg, gbl_gd_addr, gv_currkey);
+				if (gv_currkey->end >= gv_cur_region->max_key_size)
+					ISSUE_GVSUBOFLOW_ERROR(gv_currkey, KEY_COMPLETE_TRUE);
+			}
+			op_gvput((mval *)&literal_null); /* create the global */
+			POP_MV_STENT(); /* we are done with our mval */
+			break;
+		}
 		if (!out->len)
 		{
 			key_ovrhd = gv_currkey->end + 1 + F_SUBSC_LEN + N_SUBSC_LEN;
@@ -315,13 +428,13 @@ void zshow_output(zshow_out *out, const mstr *str)
 					break;
 				len = out->len - (ssize_t)(out->ptr - out->buff);
 				strbase = str->addr + str_processed;
-#ifdef UNICODE_SUPPORTED
+#				ifdef UNICODE_SUPPORTED
 				if (gtm_utf8_mode)
 				{ /* terminate at the proper character boundary within out->len bytes */
 					UTF8_LEADING_BYTE(strbase + len, strbase, leadptr);
 					len = (ssize_t)(leadptr - strbase);
 				}
-#endif
+#				endif
 				memcpy(out->ptr, strbase, len);
 				strptr += len;
 				out->ptr += len;
diff --git a/sr_port/zshow_svn.c b/sr_port/zshow_svn.c
index 01ee873..8ed7827 100644
--- a/sr_port/zshow_svn.c
+++ b/sr_port/zshow_svn.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -28,6 +29,7 @@
 #include "jnl.h"
 #include <rtnhdr.h>
 #include "stack_frame.h"
+#include "stringpool.h"
 #include "svnames.h"
 #include "mlkdef.h"
 #include "zshow.h"
@@ -54,6 +56,9 @@
 #define ZS_ONE_OUT(V,TEXT) 	((V)->len = 1, (V)->addr = (TEXT), zshow_output(output,V))
 #define ZS_VAR_EQU(V,TEXT) 	((V)->len = SIZEOF(TEXT) - 1, (V)->addr = TEXT, \
 				 zshow_output(output,(V)), ZS_ONE_OUT((V),equal_text))
+				/* PATH_MAX + "->" + GTM-W-ZDIROUTOFSYNC, <text of ZDIROUTOFSYNC> */
+#define ZDIR_ERR_LEN		((3 * GTM_MAX_DIR_LEN) + 128)
+
 
 static readonly char equal_text[] = {'='};
 static readonly char device_text[] = "$DEVICE";
@@ -61,10 +66,14 @@ static readonly char ecode_text[] = "$ECODE";
 static readonly char estack_text[] = "$ESTACK";
 static readonly char etrap_text[] = "$ETRAP";
 static readonly char horolog_text[] = "$HOROLOG";
+static readonly char zhorolog_text[] = "$ZHOROLOG";
+static readonly char zut_text[] = "$ZUT";
 static readonly char io_text[] = "$IO";
 static readonly char job_text[] = "$JOB";
 static readonly char key_text[] = "$KEY";
 static readonly char principal_text[] = "$PRINCIPAL";
+static readonly char principalin_text[] = "$ZPIN";
+static readonly char principalout_text[] = "$ZPOUT";
 static readonly char quit_text[] = "$QUIT";
 static readonly char reference_text[] = "$REFERENCE";
 static readonly char stack_text[] = "$STACK";
@@ -136,6 +145,7 @@ GBLREF mval		dollar_zdir;
 GBLREF mval		dollar_zproc;
 GBLREF stack_frame	*frame_pointer;
 GBLREF io_pair		io_curr_device;
+GBLREF io_pair		*io_std_device;
 GBLREF io_log_name	*io_root_log_name;
 GBLREF io_log_name	*dollar_principal;
 GBLREF mval		dollar_ztrap;
@@ -171,22 +181,69 @@ GBLREF mval		*dollar_ztvalue;
 GBLREF mval		dollar_ztwormhole;
 GBLREF int4		gtm_trigger_depth;
 #endif
+GBLREF spdesc		stringpool;
+GBLREF mstr		dollar_zpin;
+GBLREF mstr		dollar_zpout;
 
 LITREF mval		literal_zero, literal_one, literal_null;
 LITREF char		gtm_release_name[];
 LITREF int4		gtm_release_name_len;
 
+#define ZWRITE_DOLLAR_PRINCIPAL(MVAL, X, TEXT, OUTPUT)					\
+{											\
+	io_log_name	*tl;								\
+											\
+	tl = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;	\
+	MVAL.mvtype = MV_STR;								\
+	MVAL.str.addr = tl->dollar_io;							\
+	MVAL.str.len = tl->len;								\
+	/*** The following should be in the I/O code ***/				\
+	if (ESC == *MVAL.str.addr)							\
+	{										\
+		if (5 > MVAL.str.len)							\
+			MVAL.str.len = 0;						\
+		else									\
+		{									\
+			MVAL.str.addr += ESC_OFFSET;					\
+			MVAL.str.len -= ESC_OFFSET;					\
+		}									\
+	}										\
+	ZS_VAR_EQU(&X, TEXT);								\
+	mval_write(OUTPUT, &MVAL, TRUE);						\
+}
+
+#define ZWRITE_SPLIT_DOLLAR_P(MVAL, BUFFER, BUFF_LEN, X, DOLLARZ, TEXT, OUTPUT)		\
+{											\
+	io_log_name	*tl;								\
+	char		*ptr;								\
+											\
+	tl = dollar_principal ? dollar_principal : io_root_log_name->iod->trans_name;	\
+	assert(BUFF_LEN > (tl->len + DOLLARZ.len));					\
+	MVAL.mvtype = MV_STR;								\
+	MVAL.str.addr = BUFFER;								\
+	ptr = MVAL.str.addr;								\
+	/* Transfer $p to mval */							\
+	memcpy(ptr, (char *)tl->dollar_io, tl->len);					\
+	ptr += tl->len;									\
+	MVAL.str.len = tl->len;								\
+	/* then transfer "< /" */							\
+	memcpy(ptr, DOLLARZ.addr, DOLLARZ.len);						\
+	MVAL.str.len += DOLLARZ.len;							\
+	ZS_VAR_EQU(&X, TEXT);								\
+	mval_write(OUTPUT, &MVAL, TRUE);						\
+}
+
 error_def(ERR_ZDIROUTOFSYNC);
+error_def(ERR_INVSVN);
 
 void zshow_svn(zshow_out *output, int one_sv)
 {
 	mstr		x;
 	mval		var, zdir;
-	io_log_name	*tl;
        	stack_frame	*fp;
 	int 		count, save_dollar_zlevel;
 	char		*c1, *c2;
-	char		zdir_error[3 * GTM_MAX_DIR_LEN + 128]; /* PATH_MAX + "->" + GTM-W-ZDIROUTOFSYNC, <text of ZDIROUTOFSYNC> */
+	char		zdir_error[ZDIR_ERR_LEN];
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -265,26 +322,7 @@ void zshow_svn(zshow_out *output, int one_sv)
 				break;
 		/* CAUTION: fall through */
 		case SV_PRINCIPAL:
-			if (dollar_principal)
-				tl = dollar_principal;
-			else
-				tl = io_root_log_name->iod->trans_name;
-			var.str.addr = tl->dollar_io;
-			var.str.len = tl->len;
-			/*** The following should be in the I/O code ***/
-			if (ESC == *var.str.addr)
-			{
-				if (5 > var.str.len)
-					var.str.len = 0;
-				else
-				{
-					var.str.addr += ESC_OFFSET;
-					var.str.len -= ESC_OFFSET;
-				}
-			}
-			var.mvtype = MV_STR;
-			ZS_VAR_EQU(&x, principal_text);
-			mval_write(output, &var, TRUE);
+			ZWRITE_DOLLAR_PRINCIPAL(var, x, principal_text, output);
 			if (SV_ALL != one_sv)
 				break;
 		/* CAUTION: fall through */
@@ -429,6 +467,7 @@ void zshow_svn(zshow_out *output, int one_sv)
 			if (SV_ALL != one_sv)
 				break;
 		/* CAUTION: fall through */
+		case SV_ZC:
 		case SV_ZCSTATUS:
 			MV_FORCE_MVAL(&var, TREF(dollar_zcstatus));
 			ZS_VAR_EQU(&x, zcstatus_text);
@@ -487,6 +526,13 @@ void zshow_svn(zshow_out *output, int one_sv)
 			if (SV_ALL != one_sv)
 				break;
 		/* CAUTION: fall through */
+		case SV_ZHOROLOG:
+			op_zhorolog(&var);
+			ZS_VAR_EQU(&x, zhorolog_text);
+			mval_write(output, &var, TRUE);
+			if (SV_ALL != one_sv)
+				break;
+		/* CAUTION: fall through */
 		case SV_ZININTERRUPT:
 			MV_FORCE_MVAL(&var, dollar_zininterrupt);
 			ZS_VAR_EQU(&x, zininterrupt_text);
@@ -577,6 +623,18 @@ void zshow_svn(zshow_out *output, int one_sv)
 			if (SV_ALL != one_sv)
 				break;
 		/* CAUTION: fall through */
+		case SV_ZPIN:
+			if (io_std_device->in != io_std_device->out)
+			{	/* ZPIN != ZPOUT print it */
+				ZWRITE_SPLIT_DOLLAR_P(var, zdir_error, ZDIR_ERR_LEN, x, dollar_zpin, principalin_text, output);
+			} else if (SV_ALL != one_sv)
+			{	/* Print $principal for a ZWRite request if ZPIN == ZPOUT */
+				ZWRITE_DOLLAR_PRINCIPAL(var, x, principalin_text, output);
+			}	/* Else, ignore this for zshow when ZPIN == ZPOUT */
+			var.mvtype = 0;
+			if (SV_ALL != one_sv)
+				break;
+		/* CAUTION: fall through */
 		case SV_ZPOS:
 			getzposition(&var);
 			ZS_VAR_EQU(&x, zpos_text);
@@ -584,6 +642,18 @@ void zshow_svn(zshow_out *output, int one_sv)
 			if (SV_ALL != one_sv)
 				break;
 		/* CAUTION: fall through */
+		case SV_ZPOUT:
+			if (io_std_device->in != io_std_device->out)
+			{	/* ZPOUT != ZPIN print it */
+				ZWRITE_SPLIT_DOLLAR_P(var, zdir_error, ZDIR_ERR_LEN, x, dollar_zpout, principalout_text, output);
+			} else if (SV_ALL != one_sv)
+			{	/* Print $principal for a ZWRite request if ZPOUT == ZPIN */
+				ZWRITE_DOLLAR_PRINCIPAL(var, x, principalout_text, output);
+			}	/* Else, ignore this for zshow when ZPOUT == ZPIN */
+			var.mvtype = 0;
+			if (SV_ALL != one_sv)
+				break;
+		/* CAUTION: fall through */
 		case SV_ZPROC:
 			ZS_VAR_EQU(&x, zproc_text);
 			mval_write(output, &dollar_zproc, TRUE);
@@ -789,6 +859,13 @@ void zshow_svn(zshow_out *output, int one_sv)
 			if (SV_ALL != one_sv)
 				break;
 		/* CAUTION: fall through */
+		case SV_ZUT:
+			op_zut(&var);
+			ZS_VAR_EQU(&x, zut_text);
+			mval_write(output, &var, TRUE);
+			if (SV_ALL != one_sv)
+				break;
+		/* CAUTION: fall through */
 		case SV_ZVERSION:
 			var.mvtype = MV_STR;
 			var.str.addr = (char *)gtm_release_name;
@@ -797,14 +874,15 @@ void zshow_svn(zshow_out *output, int one_sv)
 			mval_write(output, &var, TRUE);
 			if (SV_ALL != one_sv)
 				break;
+		/* CAUTION: fall through */
 		case SV_ZYERROR:
 			var.mvtype = MV_STR;
 			var.str = dollar_zyerror.str;
 			ZS_VAR_EQU(&x, zyerror_text);
 			mval_write(output, &var, TRUE);
 			break;
+		/* NOTE: fall through ended */
 		default:
-			assertpro(FALSE);
-
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_INVSVN);
 	}
 }
diff --git a/sr_port/zsockettab.h b/sr_port/zsockettab.h
index 61d8067..9de42ba 100644
--- a/sr_port/zsockettab.h
+++ b/sr_port/zsockettab.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,6 +26,7 @@ ZSOCKETITEM("REMOTEADDRESS", zsocket_remoteaddress, MV_STR, level_socket),
 ZSOCKETITEM("REMOTEPORT", zsocket_remoteport, MV_NM, level_socket),
 ZSOCKETITEM("SOCKETHANDLE", zsocket_sockethandle, MV_STR, level_socket),
 ZSOCKETITEM("STATE", zsocket_state, MV_STR, level_socket),
+ZSOCKETITEM("TLS", zsocket_tls, MV_STR, level_socket),
 ZSOCKETITEM("ZBFSIZE", zsocket_zbfsize, MV_NM, level_socket),
 ZSOCKETITEM("ZDELAY", zsocket_zdelay, MV_STR, level_socket),
 ZSOCKETITEM("ZFF", zsocket_zff, MV_STR, level_socket),
diff --git a/sr_port/zwrite.h b/sr_port/zwrite.h
index 167f0c3..e95c2b7 100644
--- a/sr_port/zwrite.h
+++ b/sr_port/zwrite.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -84,6 +85,61 @@ typedef struct lvzwrite_datablk_struct
 	struct lvzwrite_datablk_struct	*prev;
 } lvzwrite_datablk;
 
+/* PUSH active MERGE or ZSHOW/ZWRITE context */
+#define PUSH_MVST_MRGZWRSV_IF_NEEDED								\
+{												\
+	GBLREF	int			merge_args;						\
+	GBLREF	lvzwrite_datablk	*lvzwrite_block;					\
+	GBLREF	uint4			zwrtacindx;						\
+	GBLREF	merge_glvn_ptr		mglvnp;							\
+	GBLREF	gvzwrite_datablk	*gvzwrite_block;					\
+	GBLREF	lvzwrite_datablk	*lvzwrite_block;					\
+	GBLREF	zshow_out		*zwr_output;						\
+	GBLREF zwr_hash_table		*zwrhtab;						\
+												\
+	DCL_THREADGBL_ACCESS;									\
+												\
+	SETUP_THREADGBL_ACCESS;									\
+	if (TREF(in_zwrite) || (0 != merge_args))						\
+	{											\
+		PUSH_MV_STENT(MVST_MRGZWRSV);							\
+		mv_st_ent = mv_chain;								\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_merge_args = merge_args;		\
+		merge_args = 0;									\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_zwrtacindx = zwrtacindx;		\
+		zwrtacindx = 0;									\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_in_zwrite = TREF(in_zwrite);		\
+		TREF(in_zwrite) = 0;								\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_mglvnp = mglvnp;			\
+		mglvnp = NULL;									\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_lvzwrite_block = lvzwrite_block;	\
+		lvzwrite_block = NULL;								\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_gvzwrite_block = gvzwrite_block;	\
+		gvzwrite_block = NULL;								\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_zwr_output = zwr_output;		\
+		zwr_output = NULL;								\
+		mv_st_ent->mv_st_cont.mvs_mrgzwrsv.save_zwrhtab = zwrhtab;			\
+		zwrhtab = NULL;									\
+	}											\
+}
+
+/* Note: Corresponding POP of MERGE or ZSHOW/ZWRITE context is done in unw_mv_ent.c (case MVST_MRGZWRSV) */
+
+/* Nullify active MERGE or ZSHOW/ZWRITE context */
+#define	NULLIFY_MERGE_ZWRITE_CONTEXT							\
+{											\
+	GBLREF	int			merge_args;					\
+	GBLREF	lvzwrite_datablk	*lvzwrite_block;				\
+											\
+	DCL_THREADGBL_ACCESS;								\
+											\
+	SETUP_THREADGBL_ACCESS;								\
+	merge_args = 0;									\
+	TREF(in_zwrite) = 0;								\
+	if (lvzwrite_block)								\
+		lvzwrite_block->curr_subsc = lvzwrite_block->subsc_count = 0;		\
+}
+
 typedef struct gvzwrite_datablk_struct
 {
 	boolean_t			type;
diff --git a/sr_port_cm/gtcml_chklck.c b/sr_port_cm/gtcml_chklck.c
index e5e6025..0ddc78a 100644
--- a/sr_port_cm/gtcml_chklck.c
+++ b/sr_port_cm/gtcml_chklck.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -80,7 +81,7 @@ void gtcml_chklck(cm_lckblkreg *reg, bool timed)
 								lck->sequence = csa->hdr->trans_hist.lock_sequence++;
 							} else if (d->owner)
 							{	/* Blocking struct still has owner. Check if alive */
-								if (PROC_ALIVE(d, time, icount, status))
+								if (PROC_DEAD(d, time, icount, status))
 								{	/* process that owned lock has died, free lock */
 									d->owner = 0;
 									lck->sequence = csa->hdr->trans_hist.lock_sequence++;
diff --git a/sr_unix/CMakeLists.txt b/sr_unix/CMakeLists.txt
index d07f854..8eb73a8 100644
--- a/sr_unix/CMakeLists.txt
+++ b/sr_unix/CMakeLists.txt
@@ -36,6 +36,12 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
 endif()
 
+if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+  set(GTM_BUILD_TYPE "pro")
+elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+  set(GTM_BUILD_TYPE "dbg")
+endif()
+
 # Enable GT.M debug options unless directed not to enable them. Added to build without whitebox tests.
 set(GTM_ENABLE_DEBUG 1 CACHE BOOL "Enable GT.M debug options")
 if(GTM_ENABLE_DEBUG)
@@ -87,6 +93,7 @@ if(GTM_DIST)
 else()
   # Bootstrap using pre-generated bootstrap sources.
   # We generate them again only for comparison.
+  message(STATUS "Bootstraping from pre-generated sources.")
   set(gen_bootstrap 0)
   set(gen_bootstrap_dist "${GTM_BINARY_DIR}")
   set(gen_bootstrap_mumps "$<TARGET_FILE:mumps>")
@@ -120,14 +127,15 @@ list(APPEND gt_src_list
 foreach(d ${gt_src_list})
   set(source_dir_${d} ${GTM_SOURCE_DIR}/${d})
   file(GLOB sources_${d} RELATIVE ${source_dir_${d}}
-	  ${d}/*.c ${d}/*.s ${d}/*.si)
+	  ${d}/*.c ${d}/*.s ${d}/*.si ${d}/*.txt)
 endforeach()
 if(gen_bootstrap)
   # Prefer generated sources over all other locations.
   set(gt_src_list gen ${gt_src_list})
   set(source_dir_gen ${GTM_BINARY_DIR}/gen)
   # Hard-code list since we cannot glob files that do not exist.
-  set(sources_gen cmerrors_ctl.c cmierrors_ctl.c gdeerrors_ctl.c merrors_ctl.c ttt.c)
+  set(sources_gen cmerrors_ctl.c cmierrors_ctl.c gdeerrors_ctl.c merrors_ctl.c ttt.c
+  		  gtmthreadgblasm.m gtm_threadgbl_deftypes.h gtm_threadgbl_deftypes_asm.si)
 endif()
 
 # The C preprocessor include search path consists of every source
@@ -262,6 +270,7 @@ add_custom_command(
   WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen
   COMMAND ${CMAKE_COMMAND}
     -D gtm_dist=${gen_bootstrap_dist}
+    -D gtm_tools=${GTM_SOURCE_DIR}/sr_port
     -D gtmroutines=.
     -D mumps=${gen_bootstrap_mumps}
     -D "args=${mumps_ttt_args}"
@@ -288,6 +297,7 @@ foreach(msg
     WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen
     COMMAND ${CMAKE_COMMAND}
       -D gtm_dist=${gen_bootstrap_dist}
+      -D gtm_tools=${GTM_SOURCE_DIR}/sr_port
       -D gtmroutines=.
       -D mumps=${gen_bootstrap_mumps}
       -D "args=${mumps_msg_args}"
@@ -335,20 +345,56 @@ elseif(gen_bootstrap)
   add_dependencies(gtm_threadgbl_deftypes gen_bootstrap)
 endif()
 
-add_custom_command(
-  OUTPUT gtm_threadgbl_deftypes.h
-  DEPENDS gtm_threadgbl_deftypes
-  COMMAND gtm_threadgbl_deftypes > gtm_threadgbl_deftypes.h.tmp
-  COMMAND ${CMAKE_COMMAND} -E rename gtm_threadgbl_deftypes.h.tmp gtm_threadgbl_deftypes.h
-  )
-add_custom_target(gen_gtm_threadgbl_deftypes DEPENDS gtm_threadgbl_deftypes.h)
+if(gen_bootstrap)
+  add_custom_command(
+    OUTPUT gen/gtm_threadgbl_deftypes.h
+    DEPENDS gtm_threadgbl_deftypes
+    COMMAND gtm_threadgbl_deftypes > gen/gtm_threadgbl_deftypes.h
+    )
+  set(gtmthreadgblasmaccess "${gtmthreadgblasmaccessdir}/gtm_threadgbl_asm_access.txt")
+  select_file(gtmthreadgblasmaccess "gtm_threadgbl_asm_access.txt")
+  add_custom_command(
+    OUTPUT ${GTM_BINARY_DIR}/gen/gtmthreadgblasm.m
+    DEPENDS ${GTM_SOURCE_DIR}/sr_unix/gtmthreadgblasm.m
+    COMMAND ${CMAKE_COMMAND} -E copy ${GTM_SOURCE_DIR}/sr_unix/gtmthreadgblasm.m ${GTM_BINARY_DIR}/gen/gtmthreadgblasm.m
+    )
+  add_custom_command(
+    OUTPUT ${GTM_BINARY_DIR}/gen/gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si
+    DEPENDS ${GTM_BINARY_DIR}/gen/gtmthreadgblasm.m gen/gtm_threadgbl_deftypes.h ${gtmthreadgblasmaccess}
+	    ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake ${gen_bootstrap_depend}
+    WORKING_DIRECTORY ${GTM_BINARY_DIR}/gen
+    COMMAND ${CMAKE_COMMAND}
+      -D gtm_dist=${gen_bootstrap_dist}
+      -D gtm_inc=${GTM_BINARY_DIR}/gen
+      -D gtmroutines=.
+      -D mumps=${gen_bootstrap_mumps}
+      -D "args=-r;gtmthreadgblasm;${gtmthreadgblasmaccess};gtm_threadgbl_deftypes.h;gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si"
+      -P ${GTM_SOURCE_DIR}/sr_unix/mumps.cmake
+    VERBATIM
+    )
+  add_custom_command(
+    OUTPUT gen/gtm_threadgbl_deftypes_asm.si
+    DEPENDS gen/gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si
+    COMMAND ${CMAKE_COMMAND} -E copy gen/gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si gen/gtm_threadgbl_deftypes_asm.si
+    )
+  add_custom_target(gen_gtm_threadgbl_deftypes
+  	DEPENDS ${GTM_BINARY_DIR}/gen/gtm_threadgbl_deftypes.h ${GTM_BINARY_DIR}/gen/gtm_threadgbl_deftypes_asm.si)
+else()
+  select_file(gtm_threadgbl_deftypes_asm "gtm_threadgbl_deftypes_asm_${GTM_BUILD_TYPE}.si")
+  add_custom_command(
+    OUTPUT gtm_threadgbl_deftypes_asm.si
+    DEPENDS ${gtm_threadgbl_deftypes_asm}
+    COMMAND ${CMAKE_COMMAND} -E copy ${gtm_threadgbl_deftypes_asm} gtm_threadgbl_deftypes_asm.si
+    )
+  add_custom_target(gen_gtm_threadgbl_deftypes DEPENDS gtm_threadgbl_deftypes_asm.si)
+endif()
 
 foreach(exp exe shr)
   set(out gtm${exp}_symbols.export)
   set(in ${GTM_SOURCE_DIR}/sr_unix/gtm${exp}_symbols.exp)
   add_custom_command(
     OUTPUT ${out}
-    DEPENDS ${in}
+    DEPENDS ${in} gen_gtm_threadgbl_deftypes
     COMMAND tcsh -f ${GTM_SOURCE_DIR}/sr_linux/genexport.csh ${in} ${out}
     )
 endforeach()
@@ -376,6 +422,7 @@ endforeach()
 # TODO: find_package or find_library for system libs?
 include_directories (/usr/local/include)
 target_link_libraries(libmumps		${libmumpslibs})
+add_dependencies(libmumps		gen_gtm_threadgbl_deftypes)
 
 add_executable(mumps			${mumps_SOURCES})
 target_link_libraries(mumps		libmumps)
@@ -388,6 +435,8 @@ add_executable(dbcertify		${dbcertify_SOURCES})
 target_link_libraries(dbcertify		libdbcertify libmupip libmumps libstub)
 
 add_executable(geteuid			${geteuid_SOURCES})
+target_link_libraries(geteuid		libmumps)
+add_dependencies(geteuid		gen_gtm_threadgbl_deftypes)
 
 add_executable(gtmsecshr		${gtmsecshr_SOURCES})
 add_dependencies(gtmsecshr		gen_gtm_threadgbl_deftypes)
@@ -428,6 +477,7 @@ add_executable(gtcm_shmclean 		${gtcm_shmclean_SOURCES})
 target_link_libraries(gtcm_shmclean	libgtcm libmumps libstub)
 
 add_executable(semstat2		 	${semstat2_SOURCES})
+add_dependencies(semstat2		gen_gtm_threadgbl_deftypes)
 
 add_executable(ftok 			${ftok_SOURCES})
 target_link_libraries(ftok 		libmumps libstub)
@@ -462,12 +512,14 @@ endforeach()
 # manually creating each target is way easier.
 
 # Library=GCRYPT Algorithm=AES256CFB
+include_directories (/usr/local/ssl/include)
 add_library(libgtmcrypt_gcrypt_AES256CFB.so MODULE ${libgtmcrypt_SOURCES})
 set_target_properties(libgtmcrypt_gcrypt_AES256CFB.so PROPERTIES
   OUTPUT_NAME gtmcrypt_gcrypt_AES256CFB
   COMPILE_DEFINITIONS "USE_GCRYPT -DUSE_AES256CFB"
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
+add_dependencies(libgtmcrypt_gcrypt_AES256CFB.so gen_gtm_threadgbl_deftypes)
 target_link_libraries(libgtmcrypt_gcrypt_AES256CFB.so ${GPG_LIBRARIES})
 install(TARGETS libgtmcrypt_gcrypt_AES256CFB.so DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
@@ -491,6 +543,7 @@ set_target_properties(libgtmcrypt_openssl_AES256CFB PROPERTIES
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
 target_link_libraries(libgtmcrypt_openssl_AES256CFB ${GPG_LIBRARIES} ${TLS_LIBRARIES})
+add_dependencies(libgtmcrypt_openssl_AES256CFB gen_gtm_threadgbl_deftypes)
 install(TARGETS libgtmcrypt_openssl_AES256CFB DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
 # Library=OPENSSL Algorithm=BLOWFISHCFB
@@ -501,6 +554,7 @@ set_target_properties(libgtmcrypt_openssl_BLOWFISHCFB PROPERTIES
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
 target_link_libraries(libgtmcrypt_openssl_BLOWFISHCFB ${GPG_LIBRARIES} ${TLS_LIBRARIES})
+add_dependencies(libgtmcrypt_openssl_BLOWFISHCFB gen_gtm_threadgbl_deftypes)
 install(TARGETS libgtmcrypt_openssl_BLOWFISHCFB DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
 add_library(libgtmtls MODULE ${libgtmtls_SOURCES})
@@ -510,6 +564,7 @@ set_target_properties(libgtmtls PROPERTIES
   LIBRARY_OUTPUT_DIRECTORY ${GTM_BINARY_DIR}/plugin
   )
 target_link_libraries(libgtmtls ${TLS_LIBRARIES})
+add_dependencies(libgtmtls gen_gtm_threadgbl_deftypes)
 install(TARGETS libgtmtls DESTINATION ${GTM_INSTALL_DIR}/plugin)
 
 add_executable(maskpass ${maskpass_SOURCES})
diff --git a/sr_unix/Makefile.mk b/sr_unix/Makefile.mk
index c004326..74fb46d 100644
--- a/sr_unix/Makefile.mk
+++ b/sr_unix/Makefile.mk
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2013, 2014 Fidelity Information Services, Inc	#
+# Copyright (c) 2013-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -211,7 +212,7 @@ uninstall:
 
 clean:
 	@echo ; echo "Removing generated files..."
-	rm -f *.so
+	rm -f *.so *.o
 ifeq ($(NOT_IN_GTMCRYPTDIR),1)
 	rm -f maskpass
 endif
diff --git a/sr_unix/anticipatory_freeze.c b/sr_unix/anticipatory_freeze.c
index 98cd4a3..11e1e84 100644
--- a/sr_unix/anticipatory_freeze.c
+++ b/sr_unix/anticipatory_freeze.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -158,12 +159,12 @@ boolean_t	is_anticipatory_freeze_needed(sgmnt_addrs *csa, int msg_id)
 	 * 2. DSKSPCAVAILABLE : To ensure we don't set anticipatory freeze if the disk space becomes available after an initial
 	 *			lack of space.
 	 * These messages have csa == NULL so they are guarranteed to not trigger a freeze.
+	 * However, ENOSPCQIODEFER is returned and later passed to rts_error with a non-NULL csa, so return FALSE in that case.
 	 */
 
-	assert(((ERR_ENOSPCQIODEFER != msg_id) && (ERR_DSKSPCAVAILABLE != msg_id) && (ERR_INSTFRZDEFER != msg_id))
-	       || (NULL == csa));
-	if (!csa || !csa->nl || !csa->hdr || !csa->hdr->freeze_on_fail)
+	if (!csa || !csa->nl || !csa->hdr || !csa->hdr->freeze_on_fail || (ERR_ENOSPCQIODEFER == msg_id))
 		return FALSE;
+	assert((ERR_DSKSPCAVAILABLE != msg_id) && (ERR_INSTFRZDEFER != msg_id));
 	ctl = err_check(msg_id);
 	if (NULL != ctl)
 	{
diff --git a/sr_unix/arlinkdbg.h b/sr_unix/arlinkdbg.h
index e820bd0..714d3a9 100644
--- a/sr_unix/arlinkdbg.h
+++ b/sr_unix/arlinkdbg.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,6 +21,7 @@
 # define DBGARLNK_ONLY(x) x
 # include "gtm_stdio.h"
 # include "gtmio.h"
+# include "io.h"
 #else
 # define DBGARLNK(x)
 # define DBGARLNK_ONLY(x)
diff --git a/sr_unix/auto_zlink.c b/sr_unix/auto_zlink.c
index d444b35..53fb24d 100644
--- a/sr_unix/auto_zlink.c
+++ b/sr_unix/auto_zlink.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2003, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2003-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -18,92 +19,182 @@
 #include "stack_frame.h"
 #include "op.h"
 #include <auto_zlink.h>
+#include "arlinkdbg.h"
+#include "linktrc.h"
 
-GBLREF unsigned char    *obpt;          /* output buffer index */
-GBLREF stack_frame	*frame_pointer;
-
-IA64_ONLY(GBLREF uint8 		imm14;)
-IA64_ONLY(GBLREF char 		asm_mode;)
-
-/* Due to the complex instruction set of x86_64, we require a function to implement the macro VALID_CALLING_SEQUENCE
- * and this function will calculate both the offsets (rtnhdr & labaddr) and store them into these global variables.
- */
-#if defined(__x86_64__) || defined(__MVS__) || defined(Linux390)
-GBLDEF int4		rtnhdr_off;
-GBLDEF int4		labaddr_off;
+#ifndef AUTORELINK_SUPPORTED
+# error "Routine should not be built by non-autorelink-enabled platforms"
 #endif
 
-error_def	(ERR_LABELUNKNOWN);
-error_def	(ERR_ROUTINEUNKNOWN);
+GBLREF stack_frame	*frame_pointer;
 
-rhdtyp	*auto_zlink(mach_inst *pc, lnr_tabent ***line)
+/* Routine to locate the entry being linked from generated code and link it in and return to the glue code
+ * code to drive it.
+ *
+ * Arguments:
+ *
+ *   rtnhdridx  - Index into linkage table for the routine that needs linking.
+ */
+void auto_zlink(int rtnhdridx)
 {
-	lnk_tabent	*A_rtnhdr;
-	lnk_tabent	*A_labaddr;
 	mstr		rname;
 	mident_fixed	rname_buff;
 	mval		rtn;
-	rhdtyp		*rhead;
-	urx_rtnref	*rtnurx;
+	rhdtyp		*rhd;
+
+	assert(0 <= rtnhdridx);			/* rtnhdridx must never be negative */
+	assert(rtnhdridx <= frame_pointer->rvector->linkage_len);
+	assert(NULL == frame_pointer->rvector->linkage_adr[rtnhdridx].ext_ref);
+	rname = frame_pointer->rvector->linkage_names[rtnhdridx];
+	rname.addr += (INTPTR_T)frame_pointer->rvector->literal_text_adr;	/* Perform relocation on name */
+	memcpy(rname_buff.c, rname.addr, rname.len);
+	memset(rname_buff.c + rname.len, 0, SIZEOF(rname_buff) - rname.len);	/* Clear rest of mident_fixed */
+	rname.addr = rname_buff.c;
+	assert(rname.len <= MAX_MIDENT_LEN);
+	assert(NULL == find_rtn_hdr(&rname));
+	rtn.mvtype = MV_STR;
+	rtn.str.len = rname.len;
+	rtn.str.addr = rname.addr;
+	op_zlink(&rtn, NULL);			/* op_zlink() takes care of '%' -> '_' translation of routine name */
+	DEBUG_ONLY(if ('_' == rname_buff.c[0]) rname_buff.c[0] = '%');
+	assert(NULL != (rhd = find_rtn_hdr(&rname)));
+	DBGARLNK((stderr, "auto_zlink: Linked in rtn %.*s to "lvaddr"\n", rname.len, rname.addr, find_rtn_hdr(&rname)));
+	return;
+}
 
-/* (ASSUMPTION)
- * The instructions immediately preceding the current mpc form a transfer table call.
- *	There will be two arguments to this call:
- *		the address of a routine header and
- *		the address of a pointer to a value which is the offset from the beginning of the routine header
- *			to the address of the first instruction to be executed in the routine to be called, as
- *			specified by the [label][+offset] field (or the beginning of the routine if label and
- *			offset are not specified)
- *	We compute the linkage table offsets of both parameters by disassembling the load instructions that were
- *	generated to load arguments. The entire instruction sequence is platform dependent (see auto_zlink_sp.h).
+/* Routine to check routine if autorelink is needed.
  *
- *	N.B., the instruction sequence above occurs in compiled object modules; in direct mode, the argument
- *	registers are loaded via "load" instructions.  However, this routine should never be invoked from direct
- *	mode because the applicable routine should have been ZLINK'ed by prior calls to op_labaddr and op_rhdaddr.
+ * Arguments:
+ *
+ *   rtnhdridx  - Index into linkage table for the routine that may need re-linking.
+ *   lbltblidx  - Index into linkage table for the label table entry needed to get label offset. Main purpose of using this
+ *		  routine is it is the indicator for when indirect code is using the lnk_proxy mechanism to pass in entries
+ *		  because indirects have no linkage table of their own.
  */
-	NON_IA64_ONLY(assertpro(VALID_CALLING_SEQUENCE(pc)));
-	/* Calling sequence O.K.; get address(address(routine header)) and address(address(label offset)).  */
-#	ifdef __ia64 /* __ia64 */
-	{
-		uint8 imm;
-		int8 *buf2, i;
-		ia64_bundle  bundle;
-		uint8 dummy, dummy2, dummy1;
-		int isMovl = 0;
+void auto_relink_check(int rtnhdridx, int lbltblidx)
+{
+	rhdtyp		*rhd, *callerrhd;
+	int		nameoff, clen;
+	unsigned char	*cptr;
+	boolean_t	fnddot, valid_calling_seq;
+	DEBUG_ONLY(int	rtnname_len;)
+	DEBUG_ONLY(char	*rtnname_adr;);
+	DEBUG_ONLY(mident_fixed rtnname;)
+	DCL_THREADGBL_ACCESS;
 
-		RTNHDR_PV_OFF(pc,imm);
-		A_rtnhdr  = (lnk_tabent *)(imm + frame_pointer->ctxt);
-		dummy1 = dummy; /* For silly compiler warning */
-		LABADDR_PV_OFF(pc, imm);
-		A_labaddr = (lnk_tabent *)(imm + frame_pointer->ctxt);
+	SETUP_THREADGBL_ACCESS;
+	assert(0 <= rtnhdridx);
+	if ((frame_pointer->flags & SFF_INDCE) || (0 > lbltblidx))
+		return;		/* Don't deal with indirects - just let them use the vars they received from op_rhd/labaddr */
+	assert(rtnhdridx <= frame_pointer->rvector->linkage_len);
+	assert(lbltblidx <= frame_pointer->rvector->linkage_len);
+	/* If routine hasn't been linked yet, drive auto_zlink() to pull it in and return (no further checking needed since
+	 * it was just linked).
+	 */
+	if (NULL == frame_pointer->rvector->linkage_adr[rtnhdridx].ext_ref)
+	{
+		auto_zlink(rtnhdridx);
+		return;
 	}
-#	endif /* __ia64 */
-        NON_IA64_ONLY(A_rtnhdr  = (lnk_tabent *)(RTNHDR_PV_OFF(pc) + frame_pointer->ctxt);)
-        NON_IA64_ONLY(A_labaddr = (lnk_tabent *)(LABADDR_PV_OFF(pc) + frame_pointer->ctxt);)
-	if (azl_geturxrtn((char *)A_rtnhdr, &rname, &rtnurx))
+	callerrhd = frame_pointer->rvector;				/* rtnhdr of routine doing the calling */
+	rhd = (rhdtyp *)callerrhd->linkage_adr[rtnhdridx].ext_ref;	/* rtnhdr of routine being called */
+#	ifdef DEBUG
+	/* Validate name of routine is as we expect it to be */
+	assert(NULL != rhd);
+	rtnname_adr = (INTPTR_T)callerrhd->linkage_names[rtnhdridx].addr + (char *)callerrhd->literal_text_adr;
+	rtnname_len = callerrhd->linkage_names[rtnhdridx].len;
+	memcpy(rtnname.c, rtnname_adr, rtnname_len);
+	if ('_' == rtnname.c[0])
+		rtnname.c[0] = '%';
+	assert((rtnname_len == rhd->routine_name.len)
+	       && (0 == memcmp(rtnname.c, rhd->routine_name.addr, rtnname_len)));
+#	endif
+	DBGARLNK((stderr, "auto_relink_check: rtn %.*s calling rtn: %.*s - arlink_enabled: %d  arlink_loaded: %d\n",
+		  callerrhd->routine_name.len, callerrhd->routine_name.addr,
+		  rhd->routine_name.len, rhd->routine_name.addr, TREF(arlink_enabled), TREF(arlink_loaded)));
+	explicit_relink_check(rhd, FALSE);
+}
+
+/* Routine called when have routine name and need to do an explicit autorelink check - either from above or from
+ * $TEXT(), ZPRINT or any future users of get_src_line().
+ *
+ * Argument:
+ *
+ *   rhd       - routine header of routine to be checked if needs to be relinked.
+ *   setproxy  - TRUE if need to set old/new routine header into TABENT_PROXY
+ *
+ * Routine is already linked, but we need to check if a new version is available. This involves traversing the
+ * "validation linked list", looking for changes in different $ZROUTINES entries. But we also need to base our
+ * checks on the most recent version of the routine loaded. Note autorelink is only allowed when no ZBREAKs are
+ * defined in the given routine.
+ */
+void explicit_relink_check(rhdtyp *rhd, boolean_t setproxy)
+{
+	mval		rtnname;
+	DCL_THREADGBL_ACCESS;
+
+	SETUP_THREADGBL_ACCESS;
+	assert(NULL != rhd);
+	assert(!rhd->rtn_relinked);	/* Should never be calling recursively linked routine. All such calls should be going
+					 * to the new current routine instead of the recusively linked copy rtnhdr.
+					 */
+	/* Routine is already linked, but we need to check if a new version is available. This involves traversing the
+	 * "validation linked list", looking for changes in different $ZROUTINES entries. But we also need to base our
+	 * checks on the most recent version of the routine loaded. Note autorelink is only possible when no ZBREAKs are
+	 * defined in the given routine.
+	 *
+	 * Note the following section is very similar to code in op_rhdaddr.c. Any changes made here need to be echoed there
+	 */
+ 	if (!CURRENT_RHEAD_ADR(rhd)->has_ZBREAK)
 	{
-		assert(rname.len <= MAX_MIDENT_LEN);
-		assert(NULL != rname.addr);
-		/* Copy rname into local storage because azl_geturxrtn sets rname.addr to an address that is
-		 * free'd during op_zlink and before the call to find_rtn_hdr.
-		 */
-                memcpy(rname_buff.c, rname.addr, rname.len);
-                rname.addr = rname_buff.c;
-		assert(NULL != rtnurx);
-		assert(azl_geturxlab((char *)A_labaddr, rtnurx));
-		assert(NULL == find_rtn_hdr(&rname));
-		rtn.mvtype = MV_STR;
-		rtn.str.len = rname.len;
-		rtn.str.addr = rname.addr;
-		op_zlink(&rtn, NULL);
-		if (NULL != (rhead = find_rtn_hdr(&rname)))
-		{	/* Pull the linkage table reference out and return it to caller */
-			*line = (lnr_tabent **)(A_labaddr->ext_ref);
-			if (NULL == *line)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_LABELUNKNOWN);
-			return rhead;
+		rhd = rhd->current_rhead_adr;		/* Update rhd to most currently linked version */
+#		ifdef DEBUG_ARLINK
+		DBGARLNK((stderr, "explicit_relink_check: rtn: %.*s  rtnhdr: 0x"lvaddr"  zhist: 0x"lvaddr,
+			  rhd->routine_name.len, rhd->routine_name.addr, rhd, rhd->zhist));
+		if (NULL != rhd->zhist)
+		{
+			DBGARLNK((stderr, "  zhist->cycle: %d  zrtns cycle: %d\n", rhd->zhist->zroutines_cycle,
+				  TREF(set_zroutines_cycle)));
+		} else
+		{
+			DBGARLNK((stderr, "\n"));
+		}
+#		endif
+		if ((NULL != rhd->zhist) && need_relink(rhd, (zro_hist *)rhd->zhist))
+		{	/* Relink appears to be needed. Note we have the routine name from the passed in header address so
+			 * only debug builds fetch/compare it against the expected value from the name table.
+			 */
+			rtnname.mvtype = MV_STR;
+			rtnname.str = rhd->routine_name;
+			DBGARLNK((stderr,"explicit_relink_check: Routine needs relinking: %.*s\n",
+				  rtnname.str.len, rtnname.str.addr));
+			op_zlink(&rtnname, NULL);	/* op_zlink() takes care of '%' -> '_' translation of routine name */
+			/* Use the fastest way to pickup the routine header address of the current copy. The linker would have
+			 * updated the current rtnhdr address in our routine header so this provides the easiest way to find
+			 * the newly linked header whether the link was bypassed or not. The only exception to this is when
+			 * the current routine is a recursively linked copy routine whose current rtnhdr address always points
+			 * to itself but those routines cannot end up here so this is the best way.
+			 */
+			rhd = rhd->current_rhead_adr;
+			/* Note it is possible for multiple processes to interfere with each other and cause the below assert
+			 * to fail. Should that happen, the assert can be removed but to date it has not failed so am leaving
+			 * it in.
+			 */
+			assert((NULL == rhd->zhist) || (((zro_hist *)(rhd->zhist))->zroutines_cycle == TREF(set_zroutines_cycle)));
+		} else
+		{
+			DBGARLNK((stderr,"explicit_relink_check: Routine does NOT need relinking: %.*s\n", rhd->routine_name.len,
+				  rhd->routine_name.addr));
 		}
+	} else
+	{
+		DBGARLNK((stderr,"explicit_relink_check: Routine relink bypassed - has ZBREAKs: %.*s\n", rhd->routine_name.len,
+			  rhd->routine_name.addr));
+	}
+	if (setproxy)
+	{
+		DBGINDCOMP((stderr, "explicit_relink_check: Indirect call to routine %.*s resolved to 0x"lvaddr"\n",
+			    rhd->routine_name.len, rhd->routine_name.addr, rhd));
+		(TABENT_PROXY).rtnhdr_adr = rhd;
 	}
-	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ROUTINEUNKNOWN);
-	return NULL;	/* Compiler happiness phase */
 }
diff --git a/sr_unix/auto_zlink.h b/sr_unix/auto_zlink.h
index 6cfd5de..77f978f 100644
--- a/sr_unix/auto_zlink.h
+++ b/sr_unix/auto_zlink.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,8 +13,8 @@
 #ifndef AUTO_ZLINK_INCLUDED
 #define AUTO_ZLINK_INCLUDED
 
-#include <auto_zlink_sp.h>
-
-rhdtyp	*auto_zlink(mach_inst *pc, lnr_tabent ***line);
+void auto_zlink(int rtnhdridx);
+void auto_relink_check(int rtnhdridx, int lbltblidx);
+void explicit_relink_check(rhdtyp *rhd, boolean_t setproxy);
 
 #endif
diff --git a/sr_unix/bin_load.c b/sr_unix/bin_load.c
index 9872d27..3f082c8 100644
--- a/sr_unix/bin_load.c
+++ b/sr_unix/bin_load.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -80,6 +81,7 @@ error_def(ERR_OLDBINEXTRACT);
 error_def(ERR_LOADINVCHSET);
 error_def(ERR_LDSPANGLOINCMP);
 error_def(ERR_RECLOAD);
+error_def(ERR_GVFAILCORE);
 
 #define	BIN_PUT		0
 #define BIN_BIND	1
@@ -228,8 +230,7 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 				cmpc_str[MAX_KEY_SZ + 1], dup_key_str[MAX_KEY_SZ + 1], sn_key_str[MAX_KEY_SZ + 1], *sn_key_str_end;
 	unsigned char		*end_buff;
 	unsigned short		rec_len, next_cmpc, numsubs;
-	int			len;
-	int			current, last, length, max_blk_siz, max_key, status;
+	int			len, current, last, length, max_blk_siz, max_key, status;
 	int			tmp_cmpc, sn_chunk_number, expected_sn_chunk_number = 0, sn_hold_buff_pos, sn_hold_buff_size;
 	uint4			max_data_len, max_subsc_len, gblsize;
 	ssize_t			subsc_len, extr_std_null_coll;
@@ -252,6 +253,8 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 	char			*inbuf, *encrypted_hash_array_ptr, *curr_hash_ptr;
 	int4			index;
 	gtmcrypt_key_t		*encr_key_handles;
+	boolean_t		encrypted_version, mixed_encryption;
+	char			index_err_buf[1024];
 #	endif
 	gvnh_reg_t		*gvnh_reg;
 	gd_region		*dummy_reg;
@@ -274,10 +277,9 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 		mupip_exit(ERR_LDBINFMT);
 	}
 	hdr_lvl = EXTR_HEADER_LEVEL(ptr);
-	if (!(((('4' == hdr_lvl) || ('5' == hdr_lvl)) && (V5_BIN_HEADER_SZ == len)) ||
-			(('6' == hdr_lvl) && (BIN_HEADER_SZ == len)) ||
-			(('7' == hdr_lvl) && (BIN_HEADER_SZ == len)) ||
-			(('4' > hdr_lvl) && (V3_BIN_HEADER_SZ == len))))
+	if (!(	((('4' == hdr_lvl) || ('5' == hdr_lvl)) && (V5_BIN_HEADER_SZ == len)) ||
+		((('6' == hdr_lvl) || ('7' == hdr_lvl) || ('8' == hdr_lvl)) && (BIN_HEADER_SZ == len)) ||
+		(('4' > hdr_lvl) && (V3_BIN_HEADER_SZ == len))))
 	{
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_LDBINFMT);
 		mupip_exit(ERR_LDBINFMT);
@@ -285,7 +287,7 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 	/* expecting the level in a single character */
 	assert(' ' == *(ptr + SIZEOF(BIN_HEADER_LABEL) - 3));
 	if (0 != memcmp(ptr, BIN_HEADER_LABEL, SIZEOF(BIN_HEADER_LABEL) - 2) || ('2' > hdr_lvl) ||
-			*(BIN_HEADER_VERSION_ENCR) < hdr_lvl)
+			*(BIN_HEADER_VERSION_ENCR_INDEX) < hdr_lvl)
 	{	/* ignore the level check */
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_LDBINFMT);
 		mupip_exit(ERR_LDBINFMT);
@@ -334,7 +336,9 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 	} else
 		extr_std_null_coll = 0;
 #	ifdef GTM_CRYPT
-	if ('7' <= hdr_lvl)
+	/* Encrypted versions to date. */
+	encrypted_version = ('8' == hdr_lvl) || ('7' == hdr_lvl) || ('5' == hdr_lvl);
+	if (encrypted_version)
 	{
 		encrypted_hash_array_len = file_input_bin_get((char **)&ptr, &file_offset_base,
 								(char **)&ptr_base, DO_RTS_ERROR_TRUE);
@@ -345,11 +349,15 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 		memset(encr_key_handles, 0, SIZEOF(gtmcrypt_key_t) * n_index);
 		INIT_PROC_ENCRYPTION(NULL, gtmcrypt_errno);
 		GC_BIN_LOAD_ERR(gtmcrypt_errno);
+		mixed_encryption = FALSE;
 		for (index = 0; index < n_index; index++)
 		{
 			curr_hash_ptr = encrypted_hash_array_ptr + index * GTMCRYPT_HASH_LEN;
 			if (0 == memcmp(curr_hash_ptr, EMPTY_GTMCRYPT_HASH, GTMCRYPT_HASH_LEN))
+			{
+				mixed_encryption = TRUE;
 				continue;
+			}
 			GTMCRYPT_INIT_BOTH_CIPHER_CONTEXTS(NULL, curr_hash_ptr, encr_key_handles[index], gtmcrypt_errno);
 			GC_BIN_LOAD_ERR(gtmcrypt_errno);
 		}
@@ -432,27 +440,70 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 			rec_count--;	/* Decrement as this record does not count as a record for loading purposes */
 			continue;
 		}
-		rp = (rec_hdr*)(ptr);
+		rp = (rec_hdr *)(ptr);
 #		ifdef GTM_CRYPT
-		if ('7' <= hdr_lvl)
+		if (encrypted_version)
 		{	/* Getting index value from the extracted file. It indicates which database file this record belongs to */
 			GET_LONG(index, ptr);
-			if (-1 != index) /* Indicates that the record is encrypted. */
+			if ('7' != hdr_lvl)
 			{
-				in_len = len - SIZEOF(int4);
-				inbuf = (char *)(ptr + SIZEOF(int4));
-				GTMCRYPT_DECRYPT(NULL, encr_key_handles[index], inbuf, in_len, NULL, gtmcrypt_errno);
-				GC_BIN_LOAD_ERR(gtmcrypt_errno);
+				if (-1 != index)
+				{	/* Record is encrypted; ensure legitimate encryption handle index. */
+					if ((n_index <= index) || (0 > index))
+					{
+						SNPRINTF(index_err_buf, SIZEOF(index_err_buf),
+								"Encryption handle expected in the range [0; %d) but found %d",
+								n_index, index);
+						send_msg_csa(CSA_ARG(NULL) VARLSTCNT(8) MAKE_MSG_SEVERE(ERR_RECLOAD),
+								1, &rec_count, ERR_TEXT, 2, RTS_ERROR_TEXT(index_err_buf),
+								ERR_GVFAILCORE);
+						gtm_fork_n_core();
+						gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) MAKE_MSG_SEVERE(ERR_RECLOAD),
+								1, &rec_count, ERR_TEXT, 2, RTS_ERROR_TEXT(index_err_buf));
+						return;
+					}
+					in_len = len - SIZEOF(int4);
+					inbuf = (char *)(ptr + SIZEOF(int4));
+					GTMCRYPT_DECRYPT(NULL, encr_key_handles[index], inbuf, in_len, NULL, gtmcrypt_errno);
+					GC_BIN_LOAD_ERR(gtmcrypt_errno);
+				}
+				rp = (rec_hdr *)(ptr + SIZEOF(int4));
+			} else
+			{	/* In version the extract logic did not properly distinguish non-encrypted records from encrypted
+				 * ones in case both kinds were present. Specifically, extracts did not precede unencrypted records
+				 * with a '-1' to signify that no decryption is required. Here we make the best attempt to recognize
+				 * that situation and process the record so long as the index appears legitimate.
+				 */
+				if (-1 != index)
+				{	/* Record is probably encrypted; however, there is a slight chance that the encryption
+					 * handle index is incorrect, although in a legitimate range. In that case we will
+					 * additionally check if the corresponding hash is non-zero---which would only be the case
+					 * if the region was encrypted---but only when dealing with a mix of encrypted and
+					 * unencrypted data.
+					 */
+					if ((n_index > index) && (0 <= index)
+						&& (!mixed_encryption
+							|| (0 != memcmp(encrypted_hash_array_ptr + index * GTMCRYPT_HASH_LEN,
+								EMPTY_GTMCRYPT_HASH, GTMCRYPT_HASH_LEN))))
+					{
+						in_len = len - SIZEOF(int4);
+						inbuf = (char *)(ptr + SIZEOF(int4));
+						GTMCRYPT_DECRYPT(NULL, encr_key_handles[index], inbuf, in_len,
+								NULL, gtmcrypt_errno);
+						GC_BIN_LOAD_ERR(gtmcrypt_errno);
+						rp = (rec_hdr *)(ptr + SIZEOF(int4));
+					}
+				} else
+					rp = (rec_hdr *)(ptr + SIZEOF(int4));
 			}
-			rp = (rec_hdr*)(ptr + SIZEOF(int4));
 		}
 #		endif
 		btop = ptr + len;
 		cp1 = (unsigned char*)(rp + 1);
-		gvname.var_name.addr = (char*)cp1;
+		gvname.var_name.addr = (char *)cp1;
 		while (*cp1++)
 			;
-		gvname.var_name.len =INTCAST((char*)cp1 - gvname.var_name.addr - 1);
+		gvname.var_name.len = INTCAST((char *)cp1 - gvname.var_name.addr - 1);
 		if (('2' >= hdr_lvl) || new_gvn)
 		{
 			if ((HASHT_GBLNAME_LEN == gvname.var_name.len)
@@ -761,10 +812,12 @@ void bin_load(uint4 begin, uint4 end, char *line1_ptr, int line1_len)
 					{
 						DISPLAY_INCMP_SN_MSG;
 						if ((sn_hold_buff_pos + v.str.len) <= gblsize)
-							util_out_print("!_!_Expected chunk number : !UL but found chunk number : !UL", /*BYPASSOK*/
+							util_out_print("!_!_Expected chunk number : "
+								"!UL but found chunk number : !UL",
 								TRUE, expected_sn_chunk_number + 1, sn_chunk_number + 1);
 						else
-							util_out_print("!_!_Global value too large:  expected size : !UL actual size : !UL chunk number : !UL", TRUE, /*BYPASSOK*/
+							util_out_print("!_!_Global value too large:  expected size : "
+								"!UL actual size : !UL chunk number : !UL", TRUE,
 								gblsize, sn_hold_buff_pos + v.str.len, sn_chunk_number + 1);
 						if (sn_hold_buff_pos)
 							DISPLAY_PARTIAL_SN_HOLD_BUFF;
diff --git a/sr_unix/callg.c b/sr_unix/callg.c
index 47d63c2..5a266c4 100644
--- a/sr_unix/callg.c
+++ b/sr_unix/callg.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,28 +17,23 @@
 #include "lv_val.h"	/* needed for "callg.h" */
 #include "callg.h"
 
-#define VAR_ARGS32(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7], ar[8], ar[9], ar[10], ar[11], ar[12],	\
-			ar[13], ar[14], ar[15], ar[16], ar[17], ar[18], ar[19], ar[20], ar[21], ar[22], ar[23], ar[24],	\
-			ar[25], ar[26], ar[27], ar[28], ar[29], ar[30], ar[31]
+#define VAR_ARGS4(ar)	ar[0], ar[1], ar[2], ar[3]
 
-#define VAR_ARGS28(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7], ar[8], ar[9], ar[10], ar[11], ar[12],	\
-			ar[13], ar[14], ar[15], ar[16], ar[17], ar[18], ar[19], ar[20], ar[21], ar[22], ar[23], ar[24],	\
-			ar[25], ar[26], ar[27]
+#define VAR_ARGS8(ar)	VAR_ARGS4(ar), ar[4], ar[5], ar[6], ar[7]
 
-#define VAR_ARGS24(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7], ar[8], ar[9], ar[10], ar[11], ar[12],	\
-			ar[13], ar[14], ar[15], ar[16], ar[17], ar[18], ar[19], ar[20], ar[21], ar[22], ar[23]
+#define VAR_ARGS12(ar)	VAR_ARGS8(ar), ar[8], ar[9], ar[10], ar[11]
 
-#define VAR_ARGS20(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7], ar[8], ar[9], ar[10], ar[11], ar[12],	\
-			ar[13], ar[14], ar[15], ar[16], ar[17], ar[18], ar[19]
+#define VAR_ARGS16(ar)	VAR_ARGS12(ar), ar[12], ar[13], ar[14], ar[15]
 
-#define VAR_ARGS16(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7], ar[8], ar[9], ar[10], ar[11], ar[12],	\
-			ar[13], ar[14], ar[15]
+#define VAR_ARGS20(ar)	VAR_ARGS16(ar), ar[16], ar[17], ar[18], ar[19]
 
-#define VAR_ARGS12(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7], ar[8], ar[9], ar[10], ar[11]
+#define VAR_ARGS24(ar)	VAR_ARGS20(ar), ar[20], ar[21], ar[22], ar[23]
 
-#define VAR_ARGS8(ar)	ar[0], ar[1], ar[2], ar[3], ar[4], ar[5], ar[6], ar[7]
+#define VAR_ARGS28(ar)	VAR_ARGS24(ar), ar[24], ar[25], ar[26], ar[27]
 
-#define VAR_ARGS4(ar)	ar[0], ar[1], ar[2], ar[3]
+#define VAR_ARGS32(ar)	VAR_ARGS28(ar), ar[28], ar[29], ar[30], ar[31]
+
+#define VAR_ARGS36(ar)	VAR_ARGS32(ar), ar[32], ar[33], ar[34], ar[35]
 
 /* Note selection of doing 4 parms per case block is based on the fact that Itanium can do at most 4 parm loads
    at one time due to instruction bundle restrictions and the fact that most calls made are 4 or fewer parms.
@@ -48,7 +44,7 @@
 
 INTPTR_T callg(callgfnptr fnptr, gparam_list *paramlist)
 {
-	assert(32 == (SIZEOF(paramlist->arg) / SIZEOF(void *)));
+	assert(36 == (SIZEOF(paramlist->arg) / SIZEOF(void *)));
 	switch(paramlist->n)
 	{
 		case 0:
@@ -93,8 +89,14 @@ INTPTR_T callg(callgfnptr fnptr, gparam_list *paramlist)
 		case 31:
 		case 32:
 			return (fnptr)(paramlist->n, VAR_ARGS32(paramlist->arg));
+		case 33:
+		case 34:
+		case 35:
+		case 36:
+			assert(fnptr == (callgfnptr)push_parm); /* Only push_parm is aware of this extra space */
+			return (fnptr)(paramlist->n, VAR_ARGS36(paramlist->arg));
 		default:
-			GTMASSERT;
+			assertpro(paramlist->n <= 36);
 	}
 	return 0;
 }
diff --git a/sr_unix/check_encrypt_support.sh b/sr_unix/check_encrypt_support.sh
index 20b833e..6b3da93 100644
--- a/sr_unix/check_encrypt_support.sh
+++ b/sr_unix/check_encrypt_support.sh
@@ -1,7 +1,8 @@
 #!/bin/sh
 #################################################################
 #								#
-#	Copyright 2009, 2013 Fidelity Information Services, Inc #
+# Copyright (c) 2009, 2015 Fidelity National Information	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -102,12 +103,13 @@ fi
 lib_search_path="/usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib /lib64 /lib /usr/local/ssl/lib /usr/lib/x86_64-linux-gnu"
 lib_search_path="$lib_search_path /usr/lib/i386-linux-gnu /lib/x86_64-linux-gnu /lib/i386-linux-gnu /opt/openssl/0.9.8/lib/hpux64"
 include_search_path="/usr/include /usr/local/include /usr/local/include/gpgme /usr/local/ssl/include /opt/openssl/0.9.8/include"
+include_search_path="$include_search_path /usr/include/x86_64-linux-gnu"
 bin_search_path="/usr/bin /usr/local/bin /bin"
 
 mandate_headers="gpgme.h gpg-error.h"
 mandate_libs="libgpg-error libgpgme"
 mandate_bins="gpg"
-gcrypt_headers="gcrypt.h gcrypt-module.h"
+gcrypt_headers="gcrypt.h"
 gcrypt_libs="libgcrypt"
 openssl_headers="openssl/evp.h openssl/sha.h openssl/blowfish.h openssl/ssl.h openssl/err.h"
 openssl_libs="libcrypto libssl"
diff --git a/sr_unix/check_trigger_support.csh b/sr_unix/check_trigger_support.csh
index 3456908..1a74a28 100644
--- a/sr_unix/check_trigger_support.csh
+++ b/sr_unix/check_trigger_support.csh
@@ -1,7 +1,8 @@
-#!/usr/local/bin/tcsh
+#!/usr/local/bin/tcsh -f
 #################################################################
 #								#
-#	Copyright 2009, 2010 Fidelity Information Services, Inc #
+# Copyright (c) 2009-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
diff --git a/sr_unix/check_unicode_support.csh b/sr_unix/check_unicode_support.csh
index 553ac3c..7f47d58 100644
--- a/sr_unix/check_unicode_support.csh
+++ b/sr_unix/check_unicode_support.csh
@@ -1,6 +1,8 @@
+#!/usr/local/bin/tcsh -f
 #################################################################
 #								#
-#	Copyright 2007, 2014 Fidelity Information Services, Inc #
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -19,11 +21,7 @@
 ###########################################################################################
 
 set found_icu = 0
-set utflocale = `locale -a | grep -i en_us | grep -i utf | grep '8$' | head -n 1`
-if ("OS/390" == $HOSTOS) then
-#	z/OS has both en_US.UTF-8 and En_US.UTF-8 with both .xplink and .lp64 suffixes - we need .lp64
-	set utflocale = `locale -a | grep En_US.UTF-8.lp64 | sed 's/.lp64$//' | head -n 1`
-endif
+set utflocale = `locale -a | grep -iE '\.utf.?8$' | head -n1`
 
 # This _could_ not work on new platforms or newly installed supported platforms.
 # It should be manually tested using this command :
@@ -33,7 +31,7 @@ foreach libdir ( {/usr/local,/usr,}/lib{64,/x86_64-linux-gnu,,32,/i386-linux-gnu
 	# 36 is the least version GT.M supports for ICU. We have to get the numeric value from the ICU library.
 	# ICU ships libicuio.so linked to the appropriate versioned library - so using filetype -L works well
 	# The below is the format of the libraries on various platforms:
-	# AIX, z/OS : libicu<alphanum><majorver><minorver>.<ext>   (e.g libicuio42.1.a)
+	# AIX       : libicu<alphanum><majorver><minorver>.<ext>   (e.g libicuio42.1.a)
 	# Others    : libicu<alphanum>.<ext>.<majorver>.<minorver> (e.g libicuio.so.42.1)
 
 	if ( ! -l $libdir ) continue
@@ -42,7 +40,7 @@ foreach libdir ( {/usr/local,/usr,}/lib{64,/x86_64-linux-gnu,,32,/i386-linux-gnu
 	set verinfo = ${icu_versioned_lib:s/libicuio//}
 	set parts = ( ${verinfo:as/./ /} )
 
-	if ($HOSTOS == "AIX" || $HOSTOS == "OS/390") then
+	if ($HOSTOS == "AIX") then
 		# for the above example parts = (42 1 a)
 		set icu_ver = $parts[1]
 	else
diff --git a/sr_unix/comlist.csh b/sr_unix/comlist.csh
index 9b1138a..7918a64 100644
--- a/sr_unix/comlist.csh
+++ b/sr_unix/comlist.csh
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2001, 2014 Fidelity Infromation Services, Inc #
+# Copyright (c) 2001-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -107,6 +108,7 @@ case "gtm_bta":
 	version $p4 b
 	@ comlist_status = $status
 	set p3 = $gtm_bta
+	set asmtgbltype = "pro"
 	breaksw
 
 case "gtm_dbg":
@@ -115,6 +117,7 @@ case "gtm_dbg":
 	version $p4 d
 	@ comlist_status = $status
 	set p3 = $gtm_dbg
+	set asmtgbltype = "dbg"
 	breaksw
 
 case "gtm_pro":
@@ -123,6 +126,7 @@ case "gtm_pro":
 	version $p4 p
 	@ comlist_status = $status
 	set p3 = $gtm_pro
+	set asmtgbltype = "pro"
 	breaksw
 
 default:
@@ -433,6 +437,10 @@ if (0 != $status) then
     echo "Failed to generate gtm_threadgbl_deftypes.h -- aborting build"
     exit 1
 endif
+# Setup link from $gtm_obj to the proper assembler include file
+if (! -e ${gtm_obj}/gtm_threadgbl_deftypes_asm.si) then
+    \ln -s ${gtm_inc}/gtm_threadgbl_deftypes_asm_${asmtgbltype}.si ${gtm_obj}/gtm_threadgbl_deftypes_asm.si
+endif
 
 echo ""
 echo "Start of C Compilation"	# Do not change this string. $gtm_tools/buildwarn.awk relies on this to detect warnings.
diff --git a/sr_unix/condstk_expand.c b/sr_unix/condstk_expand.c
index 1229d4e..2545b71 100644
--- a/sr_unix/condstk_expand.c
+++ b/sr_unix/condstk_expand.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,12 +20,6 @@
 
 GBLREF	unsigned char	*stackbase;
 
-#ifdef DEBUG_CONDSTK
-#  define DBGCSTK(x) DBGFPF(x)
-#else
-#  define DBGCSTK(x)
-#endif
-
 /* Expands the condition handler stack copying old stack to new expanded stack.
  *
  * Note, chnd_end is always set 2 entries from the actual true top of the stack. Consider what can happen
@@ -37,9 +32,18 @@ void condstk_expand(void)
 	int			new_size, old_len, old_size, cnt;
 	UINTPTR_T		delta;
 	mv_stent		*mvs;
+#	ifdef DEBUG_ERRHND
+	static int		nest_count = 0;
 
-	DBGEHND((stderr, "condstk_expand: old: chnd: "lvaddr"  chnd_end: "lvaddr"  ctxt: "lvaddr"  active_ch: "lvaddr
-		 "  chnd_incr: %d\n", chnd, chnd_end, ctxt, active_ch, chnd_incr));
+	nest_count++;
+	assert(1 <= nest_count);
+	/* Prevent reentrance due to condition handler in one of the I/O functions invoked from flush_pio(). */
+	if (1 == nest_count)
+		DBGEHND((stderr, "condstk_expand: old: chnd: "lvaddr"  chnd_end: "lvaddr"  ctxt: "lvaddr"  active_ch: "lvaddr
+			 "  chnd_incr: %d\n", chnd, chnd_end, ctxt, active_ch, chnd_incr));
+	if (ctxt >= (chnd_end + (!process_exiting ? 0 : CONDSTK_RESERVE)))
+	{
+#	endif
 	/* Make sure we are allowed to expand */
 	old_len = INTCAST((char *)chnd_end - (char *)chnd);
 	old_size = old_len / SIZEOF(condition_handler);
@@ -58,11 +62,16 @@ void condstk_expand(void)
 	{
 		assert(ctxt_ent >= new_chnd);
 		assert(ctxt_ent < new_chnd_end);
-		DBGEHND((stderr, "condstk_expand: cnt: %d, chptr: 0x"lvaddr"  save_active_ch from 0x"lvaddr
-			 " to 0x"lvaddr"\n", cnt, ctxt_ent, ctxt_ent->save_active_ch, ((char *)ctxt_ent->save_active_ch + delta)));
+#		ifdef DEBUG_ERRHND
+		/* Prevent reentrance due to condition handler in one of the I/O functions invoked from flush_pio(). */
+		if (1 == nest_count)
+			DBGEHND((stderr, "condstk_expand: cnt: %d, chptr: 0x"lvaddr"  save_active_ch from 0x"lvaddr
+				 " to 0x"lvaddr"\n", cnt, ctxt_ent, ctxt_ent->save_active_ch,
+				 ((char *)ctxt_ent->save_active_ch + delta)));
+#		endif
 		ctxt_ent->save_active_ch = (condition_handler *)((char *)ctxt_ent->save_active_ch + delta);
-		assert((1 == cnt) || (ctxt_ent->save_active_ch >= new_chnd));
-		assert((1 == cnt) || (ctxt_ent->save_active_ch < new_chnd_end));
+		assert(ctxt_ent->save_active_ch >= new_chnd);
+		assert(ctxt_ent->save_active_ch < new_chnd_end);
 	}
 #	ifdef GTM_TRIGGER
 	/* Trigger type mv_stent (MVST_TRIGR) save/restore the value of ctxt so look through the stack to locate those and
@@ -72,8 +81,12 @@ void condstk_expand(void)
 	{
 		if (MVST_TRIGR != mvs->mv_st_type)
 			continue;
-		DBGEHND((stderr, "condstk_expand: Trigger saved ctxt modified from 0x"lvaddr" to 0x"lvaddr"\n",
-			 mvs->mv_st_cont.mvs_trigr.ctxt_save, (char *)mvs->mv_st_cont.mvs_trigr.ctxt_save + delta));
+#		ifdef DEBUG_ERRHND
+		/* Prevent reentrance due to condition handler in one of the I/O functions invoked from flush_pio(). */
+		if (1 == nest_count)
+			DBGEHND((stderr, "condstk_expand: Trigger saved ctxt modified from 0x"lvaddr" to 0x"lvaddr"\n",
+				mvs->mv_st_cont.mvs_trigr.ctxt_save, (char *)mvs->mv_st_cont.mvs_trigr.ctxt_save + delta));
+#		endif
 		/* Have a trigger mv_stent - appropriately modify the saved ctxt value (high water mark for condition handlers */
 		mvs->mv_st_cont.mvs_trigr.ctxt_save = (condition_handler *)((char *)mvs->mv_st_cont.mvs_trigr.ctxt_save + delta);
 	}
@@ -86,10 +99,17 @@ void condstk_expand(void)
 		chnd_incr = chnd_incr * 2;
 	ctxt = (condition_handler *)((char *)ctxt + delta);
 	active_ch = (condition_handler *)((char *)active_ch + delta);
-	assert(ctxt >= chnd);
-	assert(ctxt < chnd_end);
-	assert(active_ch >= chnd);
-	assert(active_ch < chnd_end);
-	DBGEHND((stderr, "condstk_expand: new: chnd: "lvaddr"  chnd_end: "lvaddr"  ctxt: "lvaddr"  active_ch: "lvaddr
-		 "  chnd_incr: %d  delta: "lvaddr"\n", chnd, chnd_end, ctxt, active_ch, chnd_incr, delta));
+	CHECKLOWBOUND(ctxt);
+	CHECKHIGHBOUND(ctxt);
+	CHECKLOWBOUND(active_ch);
+	CHECKHIGHBOUND(active_ch);
+#	ifdef DEBUG_ERRHND
+	}
+	/* Prevent reentrance due to condition handler in one of the I/O functions invoked from flush_pio(). */
+	if (1 == nest_count)
+		DBGEHND((stderr, "condstk_expand: new: chnd: "lvaddr"  chnd_end: "lvaddr"  ctxt: "lvaddr"  active_ch: "lvaddr
+			"  chnd_incr: %d  delta: "lvaddr"\n", chnd, chnd_end, ctxt, active_ch, chnd_incr, delta));
+	nest_count--;
+	assert(0 <= nest_count);
+#	endif
 }
diff --git a/sr_unix/configure.gtc b/sr_unix/configure.gtc
index 415eaa0..e882c8c 100644
--- a/sr_unix/configure.gtc
+++ b/sr_unix/configure.gtc
@@ -1,7 +1,8 @@
 #!/bin/sh
 #################################################################
 #								#
-#	Copyright 2009, 2014 Fidelity Information Services, Inc #
+# Copyright (c) 2009-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -57,19 +58,15 @@ fi
 # Native shared library extension.
 if [ $arch = "hp" -a `uname -m` != "ia64" ]; then
 	ext=".sl"
-elif [ $arch = "zos" ]; then
-	ext=".dll"
 else
 	ext=".so"
 fi
 
 # Flags to build shared libraries of M routines
-if [ "dux" = $arch ] ; then ldflags="-shared -taso -lc" ; ldcmd="ld" # Tru64 UNIX
-elif [ "hp" = $arch ] ; then ldflags="-b" ; ldcmd="ld" # HP-UX - all platforms
+if [ "hp" = $arch ] ; then ldflags="-b" ; ldcmd="ld" # HP-UX - all platforms
 elif [ "ibm" = $arch ] ; then ldflags="-brtl -G -bexpfull -bnoentry -b64" ; ldcmd="ld" # AIX
 elif [ "linux" = $arch ] ; then ldflags="-shared" ; ldcmd="ld" # Linux - all platforms
 elif [ "solaris" = $arch ] ; then ldflags="-G -64" ; ldcmd="ld" # Solaris SPARC
-elif [ "zos" = $arch ] ; then ldflags="-q64 -W c,DLL,XPLINK,EXPORTFULL -W l,DLL,XPLINK" ; ldcmd="xlc" # z/OS
 else echo "Shared libary ldflags not set for this platform"; exit 1
 fi
 
@@ -79,11 +76,6 @@ binaries="mupip mumps libgtmshr$ext lke dse  geteuid ftok semstat2"
 # Normal scripts - executed by anyone
 nscripts="gtmbase lowerc_cp"
 
-# z/OS needs to copy the exports file
-if [ $arch = "zos" ]; then
-	nscripts="$nscripts gtmshr_symbols.x"
-fi
-
 # Root scripts - only executed by root
 rscripts="gtmstart gtmstop"
 if [ $deliver_gtcm = "yes" ]; then
@@ -121,17 +113,9 @@ $echo "software is restricted by the provisions of your license agreement."
 $echo ""
 
 # Native super user and group
-if [ $arch = "zos" ]; then
-	# because z/OS has no predefined notion of root or bin
-	# use uid 0 for super user and group
-	defowner=0
-	rootuser=0
-	bingroup=0
-else
-	rootuser=root
-	bingroup=bin
-	defowner=bin
-fi
+rootuser=root
+bingroup=bin
+defowner=bin
 
 # create temporary file to test for valid user and group names
 touch tmp_owngrp
@@ -166,6 +150,16 @@ fi
 $echo "Should execution of GT.M be restricted to this group? (y or n) \c"
 read resp
 if [ "$resp" = "Y" -o "$resp" = "y" ] ; then
+	# root and bin are invalid groups to be restricted
+	if [ 0 = $bingroup -o "bin" = $bingroup -o "root" = $bingroup ] ; then
+		$echo GTM-E-GROUPNOTVALID - $bingroup not allowed to be a restricted group - exiting!
+		exit 1
+	fi
+	# for all owners other than root or bin do an owner in group membership check
+	if [ 0 != $owner -a "bin" != $owner -a "root" != $owner -a  `groups $owner | grep -w -c $bingroup` -eq 0 ] ; then
+		$echo GTM-E-NOTINGROUP - $owner is not a member of $bingroup - exiting!
+		exit 1
+	fi
 	group=$bingroup
 fi
 
@@ -235,8 +229,6 @@ if [ -d "utf8" ]; then
 	# Setup library path (in prep for looking for libicu and crypto libs)
 	if [ "$arch" = "hp" ] ; then
 		is64bit_gtm=`file mumps | grep "IA64" | wc -l`
-	elif [ "$arch" = "zos" ] ; then
-		is64bit_gtm=1
 	else
 		is64bit_gtm=`file mumps | grep "64-bit" | wc -l`
 	fi
@@ -285,7 +277,7 @@ if [ -d "utf8" ]; then
 				# Find the actual version'ed library to which libicuio.{so,sl,a} points to
 				icu_versioned_lib=`ls -l $libpath/libicuio$icu_ext | awk '{print $NF}'`
 				# Find out vital parameters
-				if [ $arch = "ibm" -o $arch = "zos" ]; then
+				if [ $arch = "ibm" ]; then
 					# From the version'ed library(eg. libicuio36.0.a) extract out
 					# 36.0.a
 					full_icu_ver_string=`$echo $icu_versioned_lib | sed 's/libicuio//g'`
@@ -317,9 +309,6 @@ if [ -d "utf8" ]; then
 				elif [ $arch = "ibm" ] ; then
 					icu_full_ver_lib=`ls -l $libpath/libicuio$majmin$icu_ext 2>/dev/null | awk '{print $NF}'`
 					is64bit_icu=`nm -X64 $libpath/$icu_full_ver_lib 2>/dev/null | head -n 1 | wc -l`
-				elif [ $arch = "zos" ] ; then
-					icu_full_ver_lib=`ls -l $libpath/libicuio$majmin$icu_ext 2>/dev/null | awk '{print $NF}'`
-					is64bit_icu=`file $libpath/$icu_full_ver_lib 2>/dev/null | grep "amode=64" |head -n1 |wc -l`
 				fi
 				# Make sure both GTM and ICU are in sync with object mode compatibility (eg both are 32 bit/64 bit )
 				if [ "$is64bit_gtm" -eq 1 -a "$is64bit_icu" -ne 0 ] ; then
@@ -349,7 +338,7 @@ if [ -d "utf8" ]; then
 			fi
 		fi
 		# Look for locale
-		utflocale=`locale -a | grep -i .utf | sed 's/.lp64$//' | grep '8$' | head -n 1`
+		utflocale=`locale -a | grep -iE '\.utf.?8$' | head -n1`
 		if [ "$utflocale" = "" ] ; then
 			$echo "WARNING: UTF8 locale not found. Not installing UTF-8 support."
 		fi
@@ -365,12 +354,6 @@ else
 	doutf8=0
 fi
 
-# If gdedefaults exists on z/OS then remove it so tagging will occur correctly
-if [ $arch = "zos" -a -f gdedefaults ] ; then
-	rm gdedefaults
-fi
-
-
 # Solaris 10 bourne shell does not support ${var#word} syntax
 install_dest=$gtmdist
 if [ X"$gtm_destdir" != X"" ] ; then
@@ -396,25 +379,12 @@ do
 	fi
 done
 rm sedin$$
-# On z/OS gdedefaults must be tagged ascii to be used by GTM.
-if [ $arch = "zos" ]; then
-	iconv -T -f IBM-1047 -t ISO8859-1 gdedefaults > t.gdedefaults
-	mv t.gdedefaults gdedefaults
-fi
 if [ "$doutf8" -ne 0 ]; then
 	if [ ! -d $gtmdist/utf8 ]; then
 		mkdir -p $gtmdist/utf8 $gtmdist/plugin/o/utf8
 	fi
 fi
 
-# Copy debug files if necessary
-if [ $arch = "zos" ] ; then
-	for i in `ls *.mdbg 2> /dev/null` ; do
-		cp -p $i $gtmdist
-		rm -f $i
-	done
-fi
-
 # Install COPYING if it is applicable
 file=COPYING
 if [ -f $file ]; then
@@ -479,10 +449,6 @@ do
 		/usr/bin/install -f $gtmdist -M 644 -O $owner -G $bingroup $i
 	elif [ -x /usr/sbin/install ]; then
 		/usr/sbin/install -f $gtmdist -m 644 -u $owner -g $bingroup $i $gtmdist
-	elif [ $arch = "zos" ]; then
-		cp -p $i $gtmdist/
-		chmod 644 $gtmdist/$i
-		chown $user:$bingroup $gtmdist/$i
 	else
 		install -f $gtmdist -m 644 -u $owner -g $bingroup $i $gtmdist
 	fi
@@ -562,10 +528,6 @@ if [ -d "$plugin_gtmcrypt" ]; then
 			install -g $bingroup -o $owner -m 755 $plugin_gtmcrypt/$i $gtmdist/$plugin_gtmcrypt
 		elif [ $arch = "ibm" ]; then
 			/usr/bin/install -f $gtmdist/$plugin_gtmcrypt -M 755 -O $owner -G $bingroup $plugin_gtmcrypt/$i
-		elif [ $arch = "zos" ]; then
-			cp -p $plugin_gtmcrypt/$i $gtmdist/$plugin_gtmcrypt
-			chmod 755 $gtmdist/$plugin_gtmcrypt/$i
-			chown $user:$bingroup $gtmdist/$plugin_gtmcrypt/$i
 		elif [ -x /usr/sbin/install ]; then
 			/usr/sbin/install -f $gtmdist/$plugin_gtmcrypt -m 755 -u $owner -g $bingroup \
 				$plugin_gtmcrypt/$i $gtmdist/$plugin_gtmcrypt
@@ -586,10 +548,6 @@ if [ -d "$plugin_gtmcrypt" ]; then
 			install -g $bingroup -o $owner -m 755 $plugin/$i $gtmdist/$plugin
 		elif [ $arch = "ibm" ]; then
 			/usr/bin/install -f $gtmdist/$plugin -M 755 -O $owner -G $bingroup $plugin/$i
-		elif [ $arch = "zos" ]; then
-			cp -p $plugin/$i $gtmdist/$plugin
-			chmod 755 $gtmdist/$plugin/$i
-			chown $user:$bingroup $gtmdist/$plugin/$i
 		elif [ -x /usr/sbin/install ]; then
 			/usr/sbin/install -f $gtmdist/$plugin -m 755 -u $owner -g $bingroup $plugin/$i $gtmdist/$plugin
 		else
@@ -630,7 +588,7 @@ if [ "$doutf8" -ne 0 ]; then
 	for file in *
 	do
 		# Skip directories
-		if [ -d $file ]; then
+		if [ -d "$file" ]; then
 			continue
 		fi
 		# Skip gtmsecshr/dir
@@ -640,14 +598,14 @@ if [ "$doutf8" -ne 0 ]; then
 		# Install .o files
 		base="`basename $file .o`"
 		if [ "$base" != "$file" ]; then
-			cp -p $file $gtmdist/utf8
+			cp -p "$file" $gtmdist/utf8
 		else
 			# Soft link everything else
-			if [ -f $gtmdist/utf8/$file ]; then
-				rm -f $gtmdist/utf8/$file
+			if [ -f $gtmdist/utf8/"$file" ]; then
+				rm -f $gtmdist/utf8/"$file"
 			fi
-			if [ -f $gtmdist/$file ]; then
-				ln -s ../$file $gtmdist/utf8/$file
+			if [ -f $gtmdist/"$file" ]; then
+				ln -s ../"$file" $gtmdist/utf8/"$file"
 			fi
 		fi
 	done
@@ -699,30 +657,18 @@ if [ "$doutf8" -ne 0 ]; then
 	# Enclose UTF-8 operations inside a subshell. This avoids changing the current M mode execution
 	(
 		# Ensure we ARE in UTF-8 mode
-		utflocale=`locale -a | grep -i en_us | grep -i utf | grep '8$' | head -n 1`
-		if [ $arch = "zos" ]; then
-			utflocale=`locale -a | grep -i en_us | grep -i utf | sed 's/.lp64$//' | grep '8$' | head -n 1`
-		fi
-
+		utflocale=`locale -a | grep -iE '\.utf.?8$' | head -n1`
 		if [ $utflocale = "" ]; then
-			utflocale="C"
-		fi
-		if [ $arch != "zos" ]; then
-			# don't set LC_CTYPE to avoid random error messages from EBCDIC utilities
-			LC_CTYPE=$utflocale
-			export LC_CTYPE
-		else
-			gtm_chset_locale=$utflocale
-			export gtm_chset_locale
+			# If no locale defined, try C.UTF-8
+			utflocale="C.UTF-8"
 		fi
+		LC_CTYPE=$utflocale
+		export LC_CTYPE
 		unset LC_ALL
 		gtm_chset="UTF-8"
 		export gtm_chset
 		if [ $arch = "ibm" ]; then
 			export LIBPATH=$save_icu_libpath
-		elif [ $arch = "zos" ]; then
-			# on z/OS LIBPATH is the only library search path so we should preserve it
-			export LIBPATH=${save_icu_libpath}:${LIBPATH}
 		else
 			LD_LIBRARY_PATH=$save_icu_libpath
 			export LD_LIBRARY_PATH
@@ -775,12 +721,9 @@ else
 fi
 export gtmroutines
 
-other_object_files="CHK2LEV.o CHKOP.o GENDASH.o GENOUT.o GETNEAR.o GTMHLPLD.o LOAD.o LOADOP.o"
+other_object_files="CHK2LEV.o CHKOP.o GENDASH.o GENOUT.o GETNEAR.o GTMHLPLD.o GTMTHREADGBLASM.o LOAD.o LOADOP.o"
 other_object_files="$other_object_files LOADVX.o MSG.o TTTGEN.o TTTSCAN.o UNLOAD.o GTMDefinedTypesInit.o"
 csh_script_files=""
-if [ $arch = "zos" ]; then
-	other_object_files="$other_object_files GENEXPORT.o"
-fi
 
 # make database files read only
 chmod 0444 $gtmdist/*.dat
@@ -817,11 +760,7 @@ fi
 # otherwise change to the default as some files were created with root group
 if [ "$group" != "" ] ; then
 	chgrp -R $group $gtmdist
-	if [ "zos" = $arch ]; then
-		chmod -Rh o-rwx $gtmdist
-	else
-		chmod -R o-rwx $gtmdist
-	fi
+	chmod -R o-rwx $gtmdist
 else
 	chgrp -R $bingroup $gtmdist
 fi
@@ -842,12 +781,6 @@ elif [ $arch = "ibm" ]; then
 elif [ -x /usr/sbin/install ]; then
 	/usr/sbin/install -f $gtmdist -m 4555 -u root -g $bingroup gtmsecshr $gtmdist
 	/usr/sbin/install -f $tgtmsecshrdir -m 4500 -u root -g $bingroup gtmsecshrdir/gtmsecshr $tgtmsecshrdir
-elif [ $arch = "zos" ]; then
-	cp -p gtmsecshr $gtmdist/gtmsecshr
-	cp -p gtmsecshrdir/gtmsecshr $tgtmsecshrdir/gtmsecshr
-	chown $rootuser:$bingroup $gtmdist/gtmsecshr $tgtmsecshrdir/gtmsecshr
-	chmod 4555 $gtmdist/gtmsecshr
-	chmod 4500 $tgtmsecshrdir/gtmsecshr
 else
 	install -f $gtmdist -m 4555 -u root -g $bingroup gtmsecshr $gtmdist
 	install -f $tgtmsecshrdir -m 4500 -u root -g $bingroup gtmsecshrdir/gtmsecshr $tgtmsecshrdir
diff --git a/sr_unix/dm_read.c b/sr_unix/dm_read.c
index 9b92b88..b3e011c 100644
--- a/sr_unix/dm_read.c
+++ b/sr_unix/dm_read.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -55,6 +56,7 @@ GBLREF spdesc 		stringpool;
 GBLREF unsigned char	*msp, *stackbase, *stacktop, *stackwarn;
 GBLREF volatile int4	outofband;
 GBLREF	boolean_t	dmterm_default;
+GBLREF	volatile boolean_t	timer_in_handler;
 
 LITREF unsigned char	lower_to_upper_table[];
 #ifdef UNICODE_SUPPORTED
@@ -150,6 +152,7 @@ void	dm_read (mval *v)
 #	endif
 	char		*argv[3];
 	char		temp_str[MAX_RECALL_NUMBER_LENGTH + 1];
+	char		*strtokptr;
 	const char	delimiter_string[] = " \t";
 	d_tt_struct 	*tt_ptr;
 	enum RECALL_ERR_CODE	err_recall = NO_ERROR;
@@ -532,8 +535,8 @@ void	dm_read (mval *v)
 					if (((strlen(REC) == match_length) || (strlen(RECALL) == match_length))
 						&& (0 == strncmp((const char *)buffer_start, RECALL, match_length)))
 					{
-						strtok((char *)buffer_start, delimiter_string);
-						argv[1] = strtok(NULL, "");
+						STRTOK_R((char *)buffer_start, delimiter_string, &strtokptr);
+						argv[1] = STRTOK_R(NULL, "", &strtokptr);
 					} else
 						break;		/* not RECALL so end of line */
 #				ifdef UNICODE_SUPPORTED
diff --git a/sr_unix/do_shmat.c b/sr_unix/do_shmat.c
index a0fbc44..41bacdc 100644
--- a/sr_unix/do_shmat.c
+++ b/sr_unix/do_shmat.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -38,8 +39,8 @@ void *do_shmat(int4 shmid, const void *shm_base, int4 shmflg)
 }
 
 /* This is do_shmat + capability to execute code from shared memory.
- * Currently (Oct 2014), only newer Linuxes supports SHM_EXEC bit. Other platforms dont seem to have this option.
- * So we use mprotect (additional system call) there to implement this requirement.
+ * On platforms that support the SHM_EXEC bit (as of Oct 2014 this is only Linux) we use it.
+ * On those that dont, we use mprotect (additional system call) on top of shmat.
  * Until SHM_EXEC is not available on all POSIX platforms that GT.M is built/supported on, we need the mprotect code.
  */
 void *do_shmat_exec_perm(int4 shmid, size_t shm_size, int *save_errno)
diff --git a/sr_unix/dollarh.c b/sr_unix/dollarh.c
index d406b30..4dcf943 100644
--- a/sr_unix/dollarh.c
+++ b/sr_unix/dollarh.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -15,42 +16,32 @@
 #include <sys/time.h>
 
 #include "dollarh.h"
-#include "gtmimagename.h"
 #include "have_crit.h"
 
-void dollarh(time_t intime, uint4 *days, time_t *seconds)
+error_def(ERR_WEIRDSYSTIME);
+
+long dollarh(time_t intime, uint4 *days, time_t *seconds)
 {
-	int4		tdays;
-	int		isdst;
 	struct tm	*ttime;
-	time_t		mktime_ret;
-#ifdef DEBUG
-	static uint4	old_days = 0, old_seconds = 0;
-	static time_t	old_intime = 0;
-	static int	old_isdst;
-#endif
-	/* The comment below is now obsolete as GTM-6802 took care of protecting time-related functions from nested
-	 * invocations, making the presence of sigprocmasks unnecessary. If several years pass without more incidents
-	 * of time-caused hangs, remove the comment. (SOPINI, 2013/02/20)
-	 *
-	 * When dollarh() is processing and a signal occurs, the signal processing can eventually lead to nested system time
-	 * routine calls.  If a signal arrives during a system time call (__tzset() in linux) we end up in a generic signal
-	 * handler which invokes syslog which in turn tries to call the system time routine (__tz_convert() in linux) which
-	 * seems to get suspended presumably waiting for the same interlock that __tzset() has already obtained.  A work around
-	 * is to block signals (SIGINT, SIGQUIT, SIGTERM, SIGTSTP, SIGCONT, SIGALRM) during the function and then restore them
-	 * at the end. [C9D06-002271] [C9I03-002967].
-	 */
-	GTM_LOCALTIME(ttime, &intime);		/* represent intime as local time in case of offsets from UTC other than hourly */
+	gtm_int8	local_wall_time_in_gmt, seconds_since_m_epoch;
+	long		offset;
+	int		isdst;
+
+	GTM_LOCALTIME(ttime, &intime);
 	*seconds  = (time_t)(ttime->tm_hour * HOUR) + (ttime->tm_min * MINUTE) + ttime->tm_sec;
+#	ifdef  _BSD_SOURCE
+	offset = -1L * ttime->tm_gmtoff;
+#	else
 	isdst = ttime->tm_isdst;
-	GTM_GMTIME(ttime, &intime);		/* represent intime as UTC */
-	ttime->tm_isdst = isdst; 		/* use GTM_LOCALTIME to tell mktime whether daylight savings needs to be applied */
-	GTM_MKTIME(mktime_ret, ttime);
-	assert((time_t)-1 != mktime_ret);
-	/* adjust relative to UTC - have to round the other way if intime is less than or equal to the UTC offset */
-	tdays = (int4)(intime - mktime_ret);
-	tdays = (int4)(((intime + tdays - (((intime + tdays) > 0) ? 0 : (ONEDAY - 1))) / ONEDAY) + DAYS);
-	*days = (uint4)tdays;				/* use temp local in case the caller has overlapped arguments */
-	DEBUG_ONLY(old_seconds = (uint4)*seconds; old_days = *days; old_intime = intime; old_isdst = isdst;)
-	return;
+	GTM_GMTIME(ttime, &intime);
+	ttime->tm_isdst = isdst;
+	GTM_MKTIME(local_wall_time_in_gmt, ttime);
+	assert(local_wall_time_in_gmt != -1);
+	offset = local_wall_time_in_gmt - intime;
+#	endif
+	seconds_since_m_epoch = (intime - offset) + (1LL * DAYS * ONEDAY);
+	if (seconds_since_m_epoch < 0)
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_WEIRDSYSTIME);
+	*days = (uint4)(seconds_since_m_epoch / ONEDAY);
+	return offset;
 }
diff --git a/sr_unix/dollarh.h b/sr_unix/dollarh.h
index f08732a..63c196c 100644
--- a/sr_unix/dollarh.h
+++ b/sr_unix/dollarh.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,6 +13,6 @@
 #ifndef DOLLARH_INCLUDED
 #define DOLLARH_INCLUDED
 
-void dollarh(time_t intime, uint4 *days, time_t *seconds);
+long dollarh(time_t intime, uint4 *days, time_t *seconds);
 
 #endif /* DOLLARH_INCLUDED */
diff --git a/sr_unix/dse_cmd.c b/sr_unix/dse_cmd.c
index 65765e0..4e40164 100644
--- a/sr_unix/dse_cmd.c
+++ b/sr_unix/dse_cmd.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -135,6 +136,7 @@ static readonly CLI_ENTRY dse_cfhead_qual[] = {
 { "DEF_COLLATION",             0, 0, 0,                     0,                   0, 0, VAL_REQ,     0, NON_NEG, VAL_NUM,  VAL_DCM },
 { "DUALSITE_RESYNC_SEQNO",     0, 0, 0, 		    0,                   0, 0, VAL_REQ,     0, NON_NEG, VAL_NUM,  VAL_HEX },
 { "ENCRYPTION_HASH",           0, 0, 0,                     0,                   0, 0, VAL_N_A,	    0, NON_NEG, 0,        0       },
+{ "EPOCHTAPER",                0, 0, 0,			    0,                   0, 0, VAL_N_A,     0, NEG,     0,        0       },
 { "FLUSH_TIME",                0, 0, dse_ftime_parm_values, 0,                   0, 0, VAL_NOT_REQ, 0, NON_NEG, VAL_TIME, 0       },
 { "FREEZE",                    0, 0, 0,                     true_false_nochange, 0, 0, VAL_REQ,     0, NON_NEG, VAL_STR,  0       },
 { "FULLY_UPGRADED",            0, 0, 0,                     0,                   0, 0, VAL_REQ,     0, NON_NEG, VAL_NUM,  VAL_DCM },
diff --git a/sr_unix/errorsp.h b/sr_unix/errorsp.h
index 8cf6f1c..7409f1c 100644
--- a/sr_unix/errorsp.h
+++ b/sr_unix/errorsp.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -45,13 +46,13 @@
  * in addition to the other handlers for each trigger frame, the maximums may need to be re-visited.
  */
 #ifdef DEBUG
-#  define CONDSTK_INITIAL_INCR	2	/* Low initial limit for DEBUG to exercise extensions */
+#  define CONDSTK_INITIAL_INCR	3	/* Low initial limit for DEBUG to exercise extensions */
 #else
 #  define CONDSTK_INITIAL_INCR	8	/* Initial increment value used when expanding condition handler stack */
 #endif
 #define CONDSTK_MAX_INCR	128	/* Increment doubles each time expanded till hits this level */
 #define CONDSTK_MAX_STACK	512	/* Actual max is approx 504 due to arithmetic progression */
-#define CONDSTK_RESERVE		3	/* Reserve 2 frames for when process_exiting */
+#define CONDSTK_RESERVE		4	/* Reserve 4 frames for when process_exiting */
 
 #define CONDITION_HANDLER(name)	ch_ret_type name(int arg)
 
@@ -142,6 +143,11 @@ void ch_trace_point() {return;}
  * With the introduction of call-ins, there could be multiple mdb_condition_handlers stacked up in chnd stack.
  * The active context should be reset to the youngest mdb_condition_handler created by the current gtm/call-in invocation. We have
  * two flavors depending on if triggers are enabled or not.
+ *
+ * Note, like the UNWIND macro below, these MUM_TSTART macros cannot disable interrupts across the longjmp() because the
+ * assembler version ESTABLISH macro does not support re-enabling interrupts at this time. When that support is added, the
+ * ENABLE_INTERRUPTS macro can be removed from these MUM_TSTART macros and handled instead in the longjmp() return of the
+ * setjmp() call there.
  */
 #ifdef GTM_TRIGGER
 /* Note the 3rd assert makes sure we are NOT returning to a trigger-invoking frame which does not have a valid msp to
@@ -155,6 +161,7 @@ void ch_trace_point() {return;}
 																\
 					assert(!process_exiting);								\
 					CHTRACEPOINT;										\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);							\
 					for ( ;(ctxt > &chnd[0]) && (ctxt->ch != &mdb_condition_handler); ctxt--);		\
 					CHECKLOWBOUND(ctxt);									\
 					assert((ctxt->ch == &mdb_condition_handler)						\
@@ -166,6 +173,7 @@ void ch_trace_point() {return;}
 					ctxt->ch_active = FALSE; 								\
 					restart = mum_tstart;									\
 					active_ch = ctxt;									\
+					ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);							\
 					longjmp(ctxt->jmp, 1);									\
 				}
 #else
@@ -174,6 +182,7 @@ void ch_trace_point() {return;}
 																\
 					assert(!process_exiting);								\
 					CHTRACEPOINT;										\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);							\
 					for ( ;ctxt > &chnd[0] && ctxt->ch != &mdb_condition_handler; ctxt--); 			\
 					CHECKLOWBOUND(ctxt);									\
 					assert((ctxt->ch == &mdb_condition_handler)						\
@@ -182,12 +191,17 @@ void ch_trace_point() {return;}
 					ctxt->ch_active = FALSE; 								\
 					restart = mum_tstart;									\
 					active_ch = ctxt;									\
+					ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);							\
 					longjmp(ctxt->jmp, 1);									\
 				}
 #endif
 
+/* Assumed that when this macro is used, interrupts are disabled. One case where that is not done exists which is in
+ * sr_unix/gtm_asm_establish.c (called by assembler routines). Once the assembler ESTABLISH macros support doing the
+ * disable/enable of interrupts this routine can add an assert that interrupts are disabled.
+ */
 #define GTM_ASM_ESTABLISH	{	/* So named because gtm_asm_establish does exactly this */		\
-					GBLREF     uint4           dollar_tlevel;				\
+					GBLREF uint4 dollar_tlevel;						\
 														\
 					CHTRACEPOINT;								\
 					ctxt++;									\
@@ -199,6 +213,9 @@ void ch_trace_point() {return;}
 					DEBUG_ONLY(ctxt->dollar_tlevel = dollar_tlevel;)			\
 					active_ch = ctxt;							\
 				}
+/* Currently the ESTABLISH_NOJMP macro is only used internal to this header file - if ever used outside this header file, it
+ * needs to be protected with DEFER/ENABLE_INTERRUPTS macros.
+ */
 #define ESTABLISH_NOJMP(x)	{										\
 					GTM_ASM_ESTABLISH;							\
 					ctxt->ch = x;								\
@@ -206,48 +223,59 @@ void ch_trace_point() {return;}
 
 #define ESTABLISH_NOUNWIND(x)	ESTABLISH_NOJMP(x)
 #define ESTABLISH_RET(x, ret)	{										\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);					\
 					ESTABLISH_NOJMP(x);							\
-					if (setjmp(ctxt->jmp) == -1)						\
+					if (0 != setjmp(ctxt->jmp))						\
 					{									\
 						REVERT;								\
 						return ret;							\
-					}									\
+					} else									\
+						ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);				\
 				}
 
 #ifdef __cplusplus  /* must specify return value (if any) for C++ */
 # define ESTABLISH(x, ret)	ESTABLISH_RET(x, ret)
 #else
 # define ESTABLISH(x)		{										\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);					\
 					ESTABLISH_NOJMP(x);							\
-					if (setjmp(ctxt->jmp) == -1)						\
+					if (0 != setjmp(ctxt->jmp))						\
 					{									\
 						REVERT;								\
 						return;								\
-					}									\
+					} else									\
+						ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);				\
 				}
 # define ESTABLISH_NORET(x, did_long_jump)									\
 				{										\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);					\
 					did_long_jump = FALSE;							\
 					ESTABLISH_NOJMP(x);							\
-					if (setjmp(ctxt->jmp) == -1)						\
+					if (0 != setjmp(ctxt->jmp))						\
 						did_long_jump = TRUE;						\
+					else									\
+						ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);				\
 				}
 #endif
 
 #define REVERT			{										\
 					CHTRACEPOINT;								\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);					\
 					active_ch = ctxt->save_active_ch;					\
 					CHECKHIGHBOUND(active_ch);						\
 					CHECKLOWBOUND(active_ch);						\
 					ctxt--;									\
 					CHECKLOWBOUND(ctxt);							\
+					ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);					\
 				}
 
 #define CONTINUE		{									\
 					CHTRACEPOINT;							\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);				\
 					active_ch++;							\
 					CHECKHIGHBOUND(active_ch);					\
 					chnd[current_ch].ch_active = FALSE;				\
+					ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);				\
 					return;								\
 				}
 
@@ -258,12 +286,14 @@ void ch_trace_point() {return;}
 						ch_cond_core();						\
 					if (NULL != active_ch)						\
 					{								\
+						DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);			\
 						while (active_ch >= &chnd[0])				\
 						{							\
 							if (!active_ch->ch_active)			\
 							       break;					\
 							active_ch--;					\
 						}							\
+						ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);			\
 						if (active_ch >= &chnd[0] && *active_ch->ch)		\
 							(*active_ch->ch)(x);				\
 						else							\
@@ -298,6 +328,10 @@ void ch_trace_point() {return;}
 
 /* Should never unwind a condition handler established with ESTABLISH_NOUNWIND. Currently t_ch and dbinit_ch are the only ones. */
 #define UNWINDABLE(unw_ch)	((&t_ch != unw_ch->ch) && (&dbinit_ch != unw_ch->ch))
+/* Note, since we are not initially changing the assembler ESTABLISH version to also include deferring/enabling of interrupts,
+ * we cannot leave the interrupt block in effect during the longjmp(). But once that support is in place, we can do away with
+ * re-enabling interrupts and let the longjmp() return from setjmp() take care of it.
+ */
 #define UNWIND(dummy1, dummy2)	{												\
 					GBLREF	int			process_exiting;					\
 					GBLREF	boolean_t		ok_to_UNWIND_in_exit_handling;				\
@@ -310,10 +344,12 @@ void ch_trace_point() {return;}
 					 */											\
 					assert((0 == have_crit(CRIT_IN_COMMIT)) || in_wcs_recover);				\
 					CHTRACEPOINT;										\
+					DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);							\
 					chnd[current_ch].ch_active = FALSE;							\
 					active_ch++;										\
 					CHECKHIGHBOUND(active_ch);								\
 					ctxt = active_ch;									\
+					ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);							\
 					assert(UNWINDABLE(active_ch));								\
 					assert(active_ch->dollar_tlevel == dollar_tlevel);					\
 					longjmp(active_ch->jmp, -1);								\
@@ -336,10 +372,12 @@ void ch_trace_point() {return;}
 													\
 	SETUP_THREADGBL_ACCESS;										\
 	CHTRACEPOINT;											\
+	DEFER_INTERRUPTS(INTRPT_IN_CONDSTK);								\
 	current_ch = (active_ch - chnd);								\
 	active_ch->ch_active = TRUE;									\
 	active_ch--;											\
 	CHECKLOWBOUND(active_ch);									\
+	ENABLE_INTERRUPTS(INTRPT_IN_CONDSTK);								\
 	DBGEHND((stderr, "%s: Condition handler entered at line %d - arg: %d  SIGNAL: %d\n",		\
 		 __FILE__, __LINE__, arg, SIGNAL));							\
 	if ((continue_on_success) && ((SUCCESS == SEVERITY) || (INFO == SEVERITY)			\
diff --git a/sr_unix/exi_ch.c b/sr_unix/exi_ch.c
index 3b9493b..d3ab0b7 100644
--- a/sr_unix/exi_ch.c
+++ b/sr_unix/exi_ch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,6 +20,11 @@ GBLREF	boolean_t	created_core;
 GBLREF	boolean_t	dont_want_core;
 DEBUG_ONLY(GBLREF boolean_t ok_to_UNWIND_in_exit_handling;)
 
+/* This condition handler is currently only established by gtm_exit_handler. The latter does various types of
+ * rundowns (gds_rundown, io_rundown etc.). And wants any error in one particular type of rundown to stop processing
+ * that and move on to the next type of rundown. To effect that, this condition handler basically does an UNWIND to
+ * return to gtm_exit_handler so it can move on to the next type of rundown.
+ */
 CONDITION_HANDLER(exi_ch)
 {
 	START_CH(TRUE);
diff --git a/sr_unix/f_char.c b/sr_unix/f_char.c
index 6c5acf2..e21190a 100644
--- a/sr_unix/f_char.c
+++ b/sr_unix/f_char.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2006, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2006-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -83,6 +84,7 @@ int f_char(oprtype *a, opctype op)
 		MV_INIT_STRING(&v, outptr - base, base);
 		v.str.char_len = char_len;
 		v.mvtype |= MV_UTF_LEN;
+		CLEAR_MVAL_BITS(&v);
 		s2n(&v);
 		*a = put_lit(&v);
 		return TRUE;
diff --git a/sr_unix/ftok.c b/sr_unix/ftok.c
index a17847d..c4ec07c 100644
--- a/sr_unix/ftok.c
+++ b/sr_unix/ftok.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -29,7 +30,7 @@
 #define DEFAULT_ID	43
 #define ID_PREFIX	"-id="
 
-GBLDEF   CLI_ENTRY       *cmd_ary = NULL; /* The GTCM server does not have any command tables so initialize command array to NULL */
+GBLDEF   CLI_ENTRY       *cmd_ary = NULL; /* "ftok" utility does not have any command tables so initialize command array to NULL */
 
 #define PrintUsage \
 	{ \
diff --git a/sr_unix/gbldirnam.h b/sr_unix/gbldirnam.h
index b9af636..7ded664 100644
--- a/sr_unix/gbldirnam.h
+++ b/sr_unix/gbldirnam.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,5 +13,5 @@
 #define GDE_LABEL_SIZE 13
 #define GDE_LABEL_NUM 1
 /* Note, GDE_LABEL_LITERAL must be maintained in gdeinit.m if changes are made here */
-#define GDE_LABEL_LITERAL GTM64_ONLY("GTCGBDUNX109") NON_GTM64_ONLY("GTCGBDUNX009")
+#define GDE_LABEL_LITERAL GTM64_ONLY("GTCGBDUNX110") NON_GTM64_ONLY("GTCGBDUNX010")
 #define DEF_GDR_EXT "*.gld"
diff --git a/sr_unix/gdeget.m b/sr_unix/gdeget.m
index b9887c6..315c221 100644
--- a/sr_unix/gdeget.m
+++ b/sr_unix/gdeget.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2006, 2013 Fidelity Information Services, Inc	;
+; Copyright (c) 2006-2015 Fidelity National Information 	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -15,7 +16,7 @@ LOAD
 	e  s $et="g ABORT^GDE:($p($p($zs,"","",3),""-"")'=""%GDE"") u io w !,$p($zs,"","",3,999),! d GETOUT^GDEEXIT h"
 	; if zchset is UTF-8 open in raw mode to avoid BADCHAR errors
 	; For OS390 aka z/OS, use BINARY mode
-	s abs=1,update=0,chset=$SELECT($ZV["OS390":"BINARY",$ZV["VMS":"",$ZCHSET="UTF-8":"M",1:"")
+	s abs=1,update=0,chset=$SELECT($ZV["OS390":"BINARY",$ZCHSET="UTF-8":"M",1:"")
 	o file:(exc="g badfile":rewind:recordsize=SIZEOF("dsk_blk"):readonly:fixed:blocksize=SIZEOF("dsk_blk"):ichset=chset)
 	u file r rec
 	i debug u @useio
@@ -32,6 +33,9 @@ LOAD
 	i gldfmt>6 s reghasv550fields=TRUE
 	s reghasv600fields=FALSE
 	i gldfmt>7 s reghasv600fields=TRUE
+	s v621=0
+	i (label="GTCGBDUNX009")!(label="GTCGBDUNX109") s label=hdrlab,v621=1,update=1  ;autoconvert
+	i (v621=1) n SIZEOF d v621init
 	s v600=0
 	i (label="GTCGBDUNX008")!(label="GTCGBDUNX108") s label=hdrlab,v600=1,update=1	;autoconvert
 	i (v600=1) n SIZEOF d v600init
@@ -149,6 +153,7 @@ LOAD
 	f s="BEFORE_IMAGE","BUFFER_SIZE" d tmpreg(s)
 	i tmpreg("BUFFER_SIZE")<minreg("BUFFER_SIZE")  s tmpreg("BUFFER_SIZE")=minreg("BUFFER_SIZE"),update=1
 	i 'v30 d tmpreg("COLLATION_DEFAULT")
+	i (gldfmt>9) d tmpreg("EPOCHTAPER")
 	i (reghasv550fields=TRUE) d tmpreg("EPOCH_INTERVAL")
 	f s="EXTENSION","FILE_NAME" d tmpreg(s)
 	i (reghasv600fields=TRUE) d tmpreg("INST_FREEZE_ON_ERROR")
@@ -168,6 +173,7 @@ LOAD
 	f i=2:1:$zl(accmeth,"\") s am=$p(accmeth,"\",i) d
 	. i am="MM" d:$zl(rec)-(rel-1)<3 nextrec i +$ze(rec,rel,rel+2)'=2 n tmpsegcommon d tmpmm q
 	. f s="ACCESS_METHOD","ALLOCATION","BLOCK_SIZE","BUCKET_SIZE","DEFER" d tmpseg(am,s)
+	. i (gldfmt>9) d tmpseg(am,"DEFER_ALLOCATE")
 	. i (seghasencrflag=TRUE) d tmpseg(am,"ENCRYPTION_FLAG")
 	. f s="EXTENSION_COUNT","FILE_TYPE","GLOBAL_BUFFER_COUNT","LOCK_SPACE" d tmpseg(am,s)
 	. i (gldfmt>8) d tmpseg(am,"MUTEX_SLOTS")
@@ -317,7 +323,10 @@ region:
 	s regs(s,"FILE_NAME")=$ze(rec,rel,rel+l-1),rel=rel+SIZEOF("file_spec")
 	i $ze(rec,rel,rel+7)'=$tr($j("",8)," ",ZERO) zm gdeerr("INPINTEG")				; reserved
 	s rel=rel+8											; reserved
-	i (gldfmt>8) s rel=rel+16	; reserved for runtime fillers
+	i (gldfmt>8) s rel=rel+4 ; isSpan not needed by GDE
+	i (gldfmt>9) s regs(s,"EPOCHTAPER")=$$bin2num($ze(rec,rel)),rel=rel+12
+	i (gldfmt'>9) s regs(s,"EPOCHTAPER")=1
+	i (gldfmt=9) s rel=rel+12	; reserved for runtime fillers
 	s rel=rel+SIZEOF("gd_region_padding")								; padding
 	s abs=abs+SIZEOF("gd_region")
 	q
@@ -355,8 +364,10 @@ segment:
 	e  s segs(s,"RESERVED_BYTES")=0
 	i (gldfmt>8) s segs(s,"MUTEX_SLOTS")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
 	e  s segs(s,"MUTEX_SLOTS")=defseg("MUTEX_SLOTS")
+	i (gldfmt>9) s segs(s,"DEFER_ALLOCATE")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
+	e  s segs(s,"DEFER_ALLOCATE")=defseg("DEFER_ALLOCATE")
 	s rel=rel+4										; access method already processed
-	i (gldfmt>8)&(gtm64=TRUE) s rel=rel+4 							; 4-byte filler
+	i (gldfmt=9)&(gtm64=TRUE) s rel=rel+4 							; 4-byte filler
 	i $ze(rec,rel,rel+ptrsize-1)'=$tr($j("",ptrsize)," ",ZERO) zm gdeerr("INPINTEG")	; file_cntl pointer
 	s rel=rel+ptrsize
 	i $ze(rec,rel,rel+ptrsize-1)'=$tr($j("",ptrsize)," ",ZERO) zm gdeerr("INPINTEG")	; repl_list pointer
@@ -434,6 +445,7 @@ cretmps:
 	s tmpreg("BEFORE_IMAGE")=1
 	s tmpreg("BUFFER_SIZE")=2308
 	s tmpreg("COLLATION_DEFAULT")=0
+	s tmpreg("EPOCHTAPER")=1
 	s tmpreg("EPOCH_INTERVAL")=300
 	s tmpreg("EXTENSION")=2048
 	s tmpreg("FILE_NAME")=""
@@ -488,7 +500,7 @@ v44init:
 	s SIZEOF("reg_jnl_deq")=2
 	s SIZEOF("gd_region_padding")=0
 	s MAXNAMLN=SIZEOF("mident"),MAXREGLN=16,MAXSEGLN=16
-	i ver'="VMS" s SIZEOF("blk_hdr")=8
+	s SIZEOF("blk_hdr")=8
 	e  s SIZEOF("blk_hdr")=7
 	q
 v5ft1init:
@@ -505,7 +517,7 @@ v5ft1init:
 	s SIZEOF("max_str")=32767
 	s SIZEOF("reg_jnl_deq")=2
 	s SIZEOF("gd_region_padding")=0
-	i ver'="VMS" s SIZEOF("blk_hdr")=8
+	s SIZEOF("blk_hdr")=8
 	e  s SIZEOF("blk_hdr")=7
 	q
 v532init:
@@ -525,7 +537,7 @@ v532init:
 	e  s SIZEOF("gd_region_padding")=0
 	;s MAXNAMLN=SIZEOF("mident")-1,MAXREGLN=32,MAXSEGLN=32
 	;s PARNAMLN=31,PARREGLN=31,PARSEGLN=31
-	i ver'="VMS" s SIZEOF("blk_hdr")=16
+	s SIZEOF("blk_hdr")=16
 	e  s SIZEOF("blk_hdr")=7
 	q
 v533init:
@@ -545,7 +557,7 @@ v533init:
 	e  s SIZEOF("gd_region_padding")=0
 	s MAXNAMLN=SIZEOF("mident")-1,MAXREGLN=32,MAXSEGLN=32
 	s PARNAMLN=31,PARREGLN=31,PARSEGLN=31
-	i ver'="VMS" s SIZEOF("blk_hdr")=16
+	s SIZEOF("blk_hdr")=16
 	e  s SIZEOF("blk_hdr")=7
 	q
 v534init:
@@ -652,3 +664,32 @@ v600init:
 	s MAXNAMLN=SIZEOF("mident")-1,MAXREGLN=32,MAXSEGLN=32	; maximum name length allowed is 31 characters
 	s PARNAMLN=31,PARREGLN=31,PARSEGLN=31
 	q
+v621init:
+	i (olabel="GTCGBDUNX009") d
+	. s SIZEOF("am_offset")=328
+	. s SIZEOF("file_spec")=256
+	. s SIZEOF("gd_header")=16
+	. s SIZEOF("gd_contents")=76
+	. s SIZEOF("gd_map")=16
+	. s SIZEOF("gd_region")=372
+	. s SIZEOF("gd_region_padding")=0
+	. s SIZEOF("gd_segment")=360
+	e  d
+	. s SIZEOF("am_offset")=336
+	. s SIZEOF("file_spec")=256
+	. s SIZEOF("gd_header")=16
+	. s SIZEOF("gd_contents")=112
+	. s SIZEOF("gd_map")=24
+	. s SIZEOF("gd_region")=384
+	. s SIZEOF("gd_region_padding")=4
+	. s SIZEOF("gd_segment")=384
+	s SIZEOF("gd_gblname")=40
+	s SIZEOF("mident")=32
+	s SIZEOF("blk_hdr")=16
+	s SIZEOF("rec_hdr")=4
+	s SIZEOF("dsk_blk")=512
+	s SIZEOF("max_str")=1048576
+	s SIZEOF("reg_jnl_deq")=4
+	s MAXNAMLN=SIZEOF("mident")-1,MAXREGLN=32,MAXSEGLN=32	; maximum name length allowed is 31 characters
+	s PARNAMLN=31,PARREGLN=31,PARSEGLN=31
+	q
diff --git a/sr_unix/gdeput.m b/sr_unix/gdeput.m
index e63de4e..9c1a7e6 100644
--- a/sr_unix/gdeput.m
+++ b/sr_unix/gdeput.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2006, 2013 Fidelity Information Services, Inc	;
+; Copyright (c) 2006-2015 Fidelity National Information 	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -11,7 +12,7 @@
 gdeput:	;output the result of the session to the global directory file
 GDEPUT()
 	n rec,gds,cregs,csegs,cregcnt,csegcnt,maxrecsize,mapcnt,map,hasSpanGbls,isSpanned,curMapSpanning,prevMapSpanning
-	n varmapslen,vargblnamelen,tmplen,ptrsize,varmapoff,gnamcnt,gblnamelen,filler16byte,filler12byte
+	n varmapslen,vargblnamelen,tmplen,ptrsize,varmapoff,gnamcnt,gblnamelen,filler16byte,filler12byte,filler11byte
 	d CREATEGLDMAP^GDEMAP
 	s ptrsize=$s((gtm64=TRUE):8,1:4)
 	s s="",gdeputzs="",varmapslen=0,mapcnt=0,hasSpanGbls=0
@@ -37,6 +38,7 @@ GDEPUT()
 	s x=x+(csegcnt*SIZEOF("gd_segment"))
 	s gnamcnt=gnams
 	s rec=""
+	s $p(filler11byte,ZERO,11)=ZERO
 	s $p(filler12byte,ZERO,12)=ZERO
 	s $p(filler16byte,ZERO,16)=ZERO
 ; contents
@@ -61,13 +63,12 @@ GDEPUT()
 	s rec=rec_filler12byte					; for runtime filler
 	s rec=hdrlab_$$num2bin(4,$l(hdrlab)+4+filesize)_rec
 	i create zm gdeerr("GDCREATE"):file
-	e  s:$ZVersion["VMS" $p(file,";",2)=$p(file,";",2)+1  zm gdeerr("GDUPDATE"):file
+	e  zm gdeerr("GDUPDATE"):file
 	s gdexcept="s gdeputzs=$zs  zgoto "_$zl_":writeerr^GDEPUT"
-	i $ZVersion["VMS"  s tempfile=$p(file,";",1)_"inprogress"
-	e  s tempfile=file_"inprogress"
+	s tempfile=file_"inprogress"
 	;if zchset is UTF-8 open in raw mode to avoid BADCHAR errors
 	; For OS390 aka z/OS, use BINARY mode
-	s chset=$SELECT($ZV["OS390":"BINARY",$ZV["VMS":"",$ZCHSET="UTF-8":"M",1:"")
+	s chset=$SELECT($ZV["OS390":"BINARY",$ZCHSET="UTF-8":"M",1:"")
 	o tempfile:(rewind:noreadonly:newversion:recordsize=512:fixed:blocksize=512:exception=gdexcept:ochset=chset)
 ; maps
 	s s="",curMapSpanning=0,prevMapSpanning=0
@@ -96,7 +97,7 @@ GDEPUT()
 	u tempfile
 	f  s record=$ze(rec,1,512),rec=$ze(rec,513,MAXSTRLEN) q:'$zl(record)  w record,!
 	u @useio
-	i $ZV'["VMS" o file:chset="M" c file:delete
+	o file:chset="M" c file:delete
 	c tempfile:rename=file
 	q 1
 
@@ -153,13 +154,14 @@ cregion:
 	s rec=rec_$tr($j("",4)," ",ZERO)							;filler
 	s rec=rec_$$num2bin(1,regs(s,"COLLATION_DEFAULT"))
 	s rec=rec_$$num2bin(1,regs(s,"STDNULLCOLL"))
-	i $ZVersion'["VMS" s rec=rec_$$num2bin(1,regs(s,"INST_FREEZE_ON_ERROR"))
-	i $ZVersion'["VMS" s rec=rec_$$num2bin(1,regs(s,"QDBRUNDOWN"))
+	s rec=rec_$$num2bin(1,regs(s,"INST_FREEZE_ON_ERROR"))
+	s rec=rec_$$num2bin(1,regs(s,"QDBRUNDOWN"))
 	s rec=rec_$$num2bin(1,$zl(regs(s,"FILE_NAME")))
 	s rec=rec_regs(s,"FILE_NAME")_$tr($j("",SIZEOF("file_spec")-$zl(regs(s,"FILE_NAME")))," ",ZERO)
 	s rec=rec_$tr($j("",8)," ",ZERO)							; reserved
 	s rec=rec_$$num2bin(4,isSpanned(s))							; is_spanned
-	s rec=rec_filler12byte									; runtime filler
+	s rec=rec_$$num2bin(1,regs(s,"EPOCHTAPER"))						; epoch tapering
+	s rec=rec_filler11byte									; runtime filler
 	s rec=rec_$tr($j("",SIZEOF("gd_region_padding"))," ",ZERO)				; padding
 	q
 csegment:
@@ -184,10 +186,10 @@ csegment:
 	s rec=rec_$$num2bin(4,segs(s,"GLOBAL_BUFFER_COUNT"))
 	s rec=rec_$$num2bin(4,segs(s,"RESERVED_BYTES"))
 	s rec=rec_$$num2bin(4,segs(s,"MUTEX_SLOTS"))
+	s rec=rec_$$num2bin(4,segs(s,"DEFER_ALLOCATE"))
 	s x=$s(am="BG":1,am="MM":2,am="USER":4,1:-1)
 	i x=-1 d error1
 	s rec=rec_$$num2bin(4,x)
-	i (gtm64=TRUE) s rec=rec_$$num2bin(4,0) ; 4-byte filler
 	s rec=rec_$$num2bin(ptrsize,0)		; file_cntl ptr
 	s rec=rec_$$num2bin(ptrsize,0)		; repl_list ptr
 	; Only for platforms that support encryption, we write this value. Others it will
diff --git a/sr_unix/gds_rundown.c b/sr_unix/gds_rundown.c
index ae77957..804db9e 100644
--- a/sr_unix/gds_rundown.c
+++ b/sr_unix/gds_rundown.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -112,6 +113,7 @@ error_def(ERR_GTMASSERT2);
 error_def(ERR_GTMCHECK);
 error_def(ERR_IPCNOTDEL);
 error_def(ERR_JNLFLUSH);
+error_def(ERR_LASTWRITERBYPAS);
 error_def(ERR_MEMORY);
 error_def(ERR_OUTOFSPACE);
 error_def(ERR_RESRCINTRLCKBYPAS);
@@ -125,6 +127,7 @@ int4 gds_rundown(void)
 {
 	boolean_t		cancelled_dbsync_timer, cancelled_timer, have_standalone_access, ipc_deleted, err_caught;
 	boolean_t		is_cur_process_ss_initiator, remove_shm, vermismatch, we_are_last_user, we_are_last_writer, is_mm;
+	boolean_t		unsafe_last_writer;
 	now_t			now;	/* for GET_CUR_TIME macro */
 	char			*time_ptr, time_str[CTIME_BEFORE_NL + 2]; /* for GET_CUR_TIME macro */
 	gd_region		*reg;
@@ -361,7 +364,8 @@ int4 gds_rundown(void)
 			  RTS_ERROR_TEXT("gds_rundown SEMCTL failed to get semval"), CALLFROM, errno);
 	/* There's one writer left and I am it */
 	assert(reg->read_only || semval >= 0);
-	we_are_last_writer = (1 == semval) && (FALSE == reg->read_only) && !vermismatch && !safe_mode;
+	unsafe_last_writer = (1 == semval) && (FALSE == reg->read_only) && !vermismatch;
+	we_are_last_writer = unsafe_last_writer && !safe_mode;
 	assert(!we_are_last_writer || !safe_mode);
 	assert(!we_are_last_user || !safe_mode);
 	/* recover + R/W region => one writer except ONLINE ROLLBACK, or standalone with frozen instance, leading to safe_mode */
@@ -589,6 +593,9 @@ int4 gds_rundown(void)
 						  ERR_TEXT, 2, RTS_ERROR_TEXT("Error during file sync at close"), errno);
 				}
 			}
+		} else if (unsafe_last_writer)
+		{
+			send_msg_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_LASTWRITERBYPAS, 2, DB_LEN_STR(reg));
                 }
 	} /* end if (!reg->read_only && !csa->nl->donotflush_dbjnl) */
 	/* We had cancelled all db timers at start of rundown. In case as part of rundown (wcs_flu above), we had started
diff --git a/sr_unix/gdsfilext.c b/sr_unix/gdsfilext.c
index 59386f3..46cd32b 100644
--- a/sr_unix/gdsfilext.c
+++ b/sr_unix/gdsfilext.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -97,6 +98,7 @@ error_def(ERR_DBFILEXT);
 error_def(ERR_DSKSPACEFLOW);
 error_def(ERR_JNLFLUSH);
 error_def(ERR_NOSPACEEXT);
+error_def(ERR_PREALLOCATEFAIL);
 error_def(ERR_SYSCALL);
 error_def(ERR_TEXT);
 error_def(ERR_TOTALBLKMAX);
@@ -104,6 +106,47 @@ error_def(ERR_WAITDSKSPACE);
 
 OS_PAGE_SIZE_DECLARE
 
+#if !defined(__sun) && !defined(__hpux)
+STATICFNDCL int extend_wait_for_fallocate(unix_db_info *udi, uint4 new_total);
+STATICFNDEF int extend_wait_for_fallocate(unix_db_info *udi, uint4 new_total)
+{
+	int to_wait, to_msg, wait_period, save_errno;
+
+	/* Attempt to fallocate every second, and send message to operator every 1/20 of cs_data->wait_disk_space */
+	wait_period = to_wait = DIVIDE_ROUND_UP(cs_data->wait_disk_space, CDB_STAGNATE + 1);
+	to_msg = (to_wait / 8) ? (to_wait / 8) : 1;		/* send around 8 messages during 1 wait_period */
+	do
+	{
+		if ((to_wait == cs_data->wait_disk_space) || (to_wait % to_msg == 0))
+			ISSUE_WAITDSKSPACE(to_wait, wait_period, send_msg_csa);
+		hiber_start(1000);
+		to_wait--;
+		save_errno = posix_fallocate(udi->fd, 0, BLK_ZERO_OFF(cs_data) + (off_t)new_total * cs_data->blk_size +
+					     DISK_BLOCK_SIZE);
+	} while ((to_wait > 0) && (ENOSPC == save_errno));
+	return save_errno;
+}
+#endif
+
+STATICFNDCL int extend_wait_for_write(unix_db_info *udi, off_t new_eof, char *buff);
+STATICFNDEF int extend_wait_for_write(unix_db_info *udi, off_t new_eof, char *buff)
+{
+	int to_wait, to_msg, wait_period, save_errno;
+
+	/* Attempt to write every second, and send message to operator every 1/20 of cs_data->wait_disk_space */
+	wait_period = to_wait = DIVIDE_ROUND_UP(cs_data->wait_disk_space, CDB_STAGNATE + 1);
+	to_msg = (to_wait / 8) ? (to_wait / 8) : 1;		/* send around 8 messages during 1 wait_period */
+	do
+	{
+		if ((to_wait == cs_data->wait_disk_space) || (to_wait % to_msg == 0))
+			ISSUE_WAITDSKSPACE(to_wait, wait_period, send_msg_csa);
+		hiber_start(1000);
+		to_wait--;
+		LSEEKWRITE(udi->fd, new_eof, buff, DISK_BLOCK_SIZE, save_errno);
+	} while ((to_wait > 0) && (ENOSPC == save_errno));
+	return save_errno;
+}
+
 uint4	 gdsfilext(uint4 blocks, uint4 filesize, boolean_t trans_in_prog)
 {
 	sm_uc_ptr_t		old_base[2], mmap_retaddr;
@@ -111,7 +154,7 @@ uint4	 gdsfilext(uint4 blocks, uint4 filesize, boolean_t trans_in_prog)
 	char			buff[DISK_BLOCK_SIZE];
 	int			result, save_errno, status;
 	uint4			new_bit_maps, bplmap, map, new_blocks, new_total, max_tot_blks, old_total;
-	uint4			jnl_status, to_wait, to_msg, wait_period;
+	uint4			jnl_status;
 	gtm_uint64_t		avail_blocks, mmap_sz;
 	off_t			new_eof;
 	trans_num		curr_tn;
@@ -138,7 +181,10 @@ uint4	 gdsfilext(uint4 blocks, uint4 filesize, boolean_t trans_in_prog)
 	   overflow and end up doing silly things.
 	*/
 	assert((blocks <= (MAXTOTALBLKS(cs_data) - cs_data->trans_hist.total_blks)) || WBTEST_ENABLED(WBTEST_FILE_EXTEND_ERROR));
-	if (!blocks)
+#	if defined(__sun) || defined(__hpux)
+	cs_data->defer_allocate = TRUE;
+#	endif
+	if (!blocks && (cs_data->defer_allocate || (TRANS_IN_PROG_TRUE == trans_in_prog)))
 		return (uint4)(NO_FREE_SPACE); /* should this be changed to show extension not enabled ? */
 	bplmap = cs_data->bplmap;
 	/* New total of non-bitmap blocks will be number of current, non-bitmap blocks, plus new blocks desired
@@ -152,7 +198,7 @@ uint4	 gdsfilext(uint4 blocks, uint4 filesize, boolean_t trans_in_prog)
 			- DIVIDE_ROUND_UP(cs_data->trans_hist.total_blks, bplmap) + blocks, bplmap - 1)
 			- DIVIDE_ROUND_UP(cs_data->trans_hist.total_blks, bplmap);
 	new_blocks = blocks + new_bit_maps;
-	assert(0 < (int)new_blocks);
+	assert((0 < (int)new_blocks) || (!cs_data->defer_allocate && (0 == new_blocks)));
 	if (new_blocks + cs_data->trans_hist.total_blks > MAXTOTALBLKS(cs_data))
 	{
 		assert(FALSE);
@@ -318,22 +364,27 @@ uint4	 gdsfilext(uint4 blocks, uint4 filesize, boolean_t trans_in_prog)
 	}
 	CHECK_TN(cs_addrs, cs_data, cs_data->trans_hist.curr_tn);	/* can issue rts_error TNTOOLARGE */
 	new_total = old_total + new_blocks;
-	new_eof = ((off_t)(cs_data->start_vbn - 1) * DISK_BLOCK_SIZE) + ((off_t)new_total * cs_data->blk_size);
-	DB_LSEEKWRITE(cs_addrs, udi->fn, udi->fd, new_eof, buff, DISK_BLOCK_SIZE, save_errno);
-	if ((ENOSPC == save_errno) && IS_GTM_IMAGE)
+	new_eof = BLK_ZERO_OFF(cs_data) + ((off_t)new_total * cs_data->blk_size);
+#	if !defined(__sun) && !defined(__hpux)
+	if (!cs_data->defer_allocate)
 	{
-		/* Attempt to write every second, and send message to operator every 1/20 of cs_data->wait_disk_space */
-		wait_period = to_wait = DIVIDE_ROUND_UP(cs_data->wait_disk_space, CDB_STAGNATE + 1);
-		to_msg = (to_wait / 8) ? (to_wait / 8) : 1;		/* send around 8 messages during 1 wait_period */
-		while ((to_wait > 0) && (ENOSPC == save_errno))
+		save_errno = posix_fallocate(udi->fd, 0, BLK_ZERO_OFF(cs_data) + (off_t)new_total * cs_data->blk_size +
+					     DISK_BLOCK_SIZE);
+		if ((ENOSPC == save_errno) && IS_GTM_IMAGE)
+			save_errno = extend_wait_for_fallocate(udi, new_total);
+		if (0 != save_errno)
 		{
-			if ((to_wait == cs_data->wait_disk_space) || (to_wait % to_msg == 0))
-				ISSUE_WAITDSKSPACE(to_wait, wait_period, send_msg_csa);
-			hiber_start(1000);
-			to_wait--;
-			LSEEKWRITE(udi->fd, new_eof, buff, DISK_BLOCK_SIZE, save_errno);
+			GDSFILEXT_CLNUP;
+			if (ENOSPC != save_errno)
+				send_msg_csa(CSA_ARG(cs_addrs) VARLSTCNT(5) ERR_PREALLOCATEFAIL, 2, DB_LEN_STR(gv_cur_region),
+					     save_errno);
+			return (uint4)(NO_FREE_SPACE);
 		}
 	}
+#	endif
+	DB_LSEEKWRITE(cs_addrs, udi->fn, udi->fd, new_eof, buff, DISK_BLOCK_SIZE, save_errno);
+	if ((ENOSPC == save_errno) && IS_GTM_IMAGE)
+		save_errno = extend_wait_for_write(udi, new_eof, buff);
 	if (0 != save_errno)
 	{
 		GDSFILEXT_CLNUP;
@@ -429,7 +480,7 @@ uint4	 gdsfilext(uint4 blocks, uint4 filesize, boolean_t trans_in_prog)
 		assert(FALSE); /* Should be killed before that */
 	}
 	assert(cs_data->blks_to_upgrd == (inctn_detail.blks2upgrd_struct.blks_to_upgrd_delta + prev_extend_blks_to_upgrd));
-	assert(0 < (int)blocks);
+	assert(0 < (int)blocks || (!cs_data->defer_allocate && (0 == new_blocks)));
 	assert(0 < (int)(cs_addrs->ti->free_blocks + blocks));
 	cs_addrs->ti->free_blocks += blocks;
 	cs_addrs->total_blks = cs_addrs->ti->total_blks = new_total;
diff --git a/sr_unix/gen_gtm_threadgbl_deftypes.csh b/sr_unix/gen_gtm_threadgbl_deftypes.csh
index 59b5bc9..2b7c0de 100644
--- a/sr_unix/gen_gtm_threadgbl_deftypes.csh
+++ b/sr_unix/gen_gtm_threadgbl_deftypes.csh
@@ -1,6 +1,7 @@
 #################################################################
 #                                                               #
-#       Copyright 2010, 2011 Fidelity Information Services, Inc #
+# Copyright (c) 2010-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #                                                               #
 #       This source code contains the intellectual property     #
 #       of its copyright holder(s), and is made available       #
@@ -40,15 +41,15 @@ if ($#argv > 1) then
 	# aliases are not defined in the TCSH subshell
 	source $gtm_ver/sr_unix/gtm_env.csh
 endif
-echo "Entering gen_gtm_threadgbl_deftypes.csh to build gtm_threadgbl_deftypes.h"
+echo "Entering $0:t to build gtm_threadgbl_deftypes.h"
 pushd $gtm_obj
 \rm gtm_threadgbl_deftypes.h >& /dev/null
 if (-e gtm_threadgbl_deftypes.h) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to delete old $gtm_obj/gtm_threadgbl_deftypes.h - FAIL"
+    echo "$0:t-E-: Unable to delete old $gtm_obj/gtm_threadgbl_deftypes.h - FAIL"
     exit 1
 endif
 if (! -w $gtm_obj) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to write to $gtm_obj/gtm_threadgbl_deftypes.h - FAIL"
+    echo "$0:t-E-: Unable to write to $gtm_obj/gtm_threadgbl_deftypes.h - FAIL"
     exit 1
 endif
 
@@ -58,13 +59,14 @@ endif
 #
 gt_cc_pro -O0 $gtm_src/gtm_threadgbl_deftypes.c $includge >& gtm_threadgbl_deftypes_comp.log
 if (0 != $status) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: pro build of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_comp.log"
+    echo "$0:t-E-: pro build of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_comp.log"
     popd
     exit 1
 endif
-gt_ld -o gtm_threadgbl_deftypes_pro $gt_ld_options_pro -L$gtm_obj $gt_ld_sysrtns $gt_ld_syslibs gtm_threadgbl_deftypes.o >& gtm_threadgbl_deftypes_linkmap.txt
+gt_ld -o gtm_threadgbl_deftypes_pro $gt_ld_options_pro -L$gtm_obj $gt_ld_sysrtns $gt_ld_syslibs \
+	gtm_threadgbl_deftypes.o >& gtm_threadgbl_deftypes_linkmap.txt
 if (0 != $status) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: pro build link of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_linkmap.txt"
+    echo "$0:t-E-: pro build link of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_linkmap.txt"
     popd
     exit 1
 endif
@@ -73,13 +75,14 @@ endif
 #
 gt_cc_dbg $gtm_src/gtm_threadgbl_deftypes.c $includge >& gtm_threadgbl_deftypes_comp_dbg.log
 if (0 != $status) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: dbg build of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_comp_dbg.log"
+    echo "$0:t-E-: dbg build of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_comp_dbg.log"
     popd
     exit 1
 endif
-gt_ld -o gtm_threadgbl_deftypes_dbg $gt_ld_options_dbg -L$gtm_obj $gt_ld_sysrtns $gt_ld_syslibs gtm_threadgbl_deftypes.o >& gtm_threadgbl_deftypes_linkmap_dbg.txt
+gt_ld -o gtm_threadgbl_deftypes_dbg $gt_ld_options_dbg -L$gtm_obj $gt_ld_sysrtns $gt_ld_syslibs \
+	gtm_threadgbl_deftypes.o >& gtm_threadgbl_deftypes_linkmap_dbg.txt
 if (0 != $status) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: dbg build link of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_linkmap_dbg.txt"
+    echo "$0:t-E-: dbg build link of $gtm_obj/gtm_threadgbl_deftypes failed, see $gtm_obj/gtm_threadgbl_deftypes_linkmap_dbg.txt"
     popd
     exit 1
 endif
@@ -89,19 +92,13 @@ endif
 #
 set year = `date +%Y`
 set ofile = "$gtm_obj/gtm_threadgbl_deftypes.h"
-cat > $ofile <<EOF
-/****************************************************************
- *								*
- *	Copyright 2010, $year Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
 
-/* Generated by $gtm_tools/gen_gtm_threadgbl_deftypes.csh */
+echo "/****************************************************************"		>  $ofile
+sed 's/XXXX/2010/;s/YYYY/'$year'/;s/^/ */;s/$/*/' $gtm_tools/copyright.txt	>> $ofile
+echo " ****************************************************************/"		>> $ofile
+cat >> $ofile <<EOF
+
+/* Generated by $gtm_tools/$0:t */
 
 #ifndef GTM_THREADGBL_DEFTYPES_INCLUDED
 #define GTM_THREADGBL_DEFTYPES_INCLUDED
@@ -117,24 +114,18 @@ EOF
 # Make sure it is there
 #
 if (! -e $gtm_obj/gtm_threadgbl_deftypes.h) then
-    echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to generate new $gtm_inc/gtm_threadgbl_deftypes.h"
+    echo "$0:t-E-: Unable to generate new $gtm_inc/gtm_threadgbl_deftypes.h"
     popd
     exit 1
 endif
 #
-# Get rid of program stuff unless requested to keep it
-#
-if (! $?KEEP_THREADGBL) then
-    \rm gtm_threadgbl_deftypes{_pro,_dbg,.o} >& /dev/null
-endif
-#
 # See if it is different from the one in $gtm_inc (or if the $gtm_inc one is not there). Only move it there if
 # needed to prevent unneeded re-compiles of the world.
 #
 set keepold = 0
 if (-e $gtm_inc/gtm_threadgbl_deftypes.h) then
     \rm -f gtm_threadgbl_deftypes.h.diff
-    diff $gtm_inc/gtm_threadgbl_deftypes.h gtm_threadgbl_deftypes.h >& gtm_threadgbl_deftypes.h.diff
+    \diff $gtm_inc/gtm_threadgbl_deftypes.h gtm_threadgbl_deftypes.h >& gtm_threadgbl_deftypes.h.diff
     if (0 == $status) then
 	set keepold = 1  # if no diff, keep the old file
     else
@@ -152,9 +143,9 @@ if (-e $gtm_inc/gtm_threadgbl_deftypes.h) then
 endif
 if (! $keepold) then
     if (-e $gtm_inc/gtm_threadgbl_deftypes.h) then
-	chmod 666 $gtm_inc/gtm_threadgbl_deftypes.h
+	\chmod 666 $gtm_inc/gtm_threadgbl_deftypes.h
 	if (0 != $status) then
-	    echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to reset permissions to allow us to replace $gtm_inc/gtm_threadgbl_deftypes.h"
+	    echo "$0:t-E-: Unable to reset permissions to allow us to replace $gtm_inc/gtm_threadgbl_deftypes.h"
 	    popd
 	    exit 1
 	endif
@@ -162,14 +153,67 @@ if (! $keepold) then
     echo "Replacing $gtm_inc/gtm_threadgbl_deftypes.h"
     \mv -f gtm_threadgbl_deftypes.h $gtm_inc  # replace if needed
     if (0 != $status) then
-	echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to replace $gtm_inc/gtm_threadgbl_deftypes.h"
+	echo "$0:t-E-: Unable to replace $gtm_inc/gtm_threadgbl_deftypes.h"
 	popd
 	exit 1
     endif
 else
     echo "$gtm_inc/gtm_threadgbl_deftypes.h is current - not replaced"
 endif
-
+#
+# Now create the assembler based include files. Create one for each of pro/dbg. Similar to gtm_threadgbl_deftypes.h,
+# only replace them if they have changed.
+#
+set accesstxt = $gtm_tools/gtm_threadgbl_asm_access.txt
+set currprofull = $gtm_root/$gtm_curpro/pro
+\cp $gtm_pct/gtmthreadgblasm.m ./
+set savestatus = "$status"
+if ("0" != "$savestatus") then
+    echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to copy $gtm_tools/gtmthreadgblasm.m to `pwd`/gtmthreadgblasm.m"
+    popd
+    exit 1
+endif
+foreach image (pro dbg)
+	\rm -f gtm_threadgbl_deftypes_asm_${image}.fail
+	./gtm_threadgbl_deftypes_${image} > gtm_threadgbl_deftypes_asm_${image}.in
+	env gtm_dist=$currprofull gtm_chset="M" gtmroutines=". $currprofull" \
+		$currprofull/mumps -run gtmthreadgblasm ${accesstxt} gtm_threadgbl_deftypes_asm_${image}.in \
+			gtm_threadgbl_deftypes_asm_${image}.si || touch gtm_threadgbl_deftypes_asm_${image}.fail
+	if ( -e gtm_threadgbl_deftypes_asm_${image}.fail) then
+	    echo "gen_gtm_threadgbl_deftypes.csh-E-: Failed to create gtm_threadgbl_deftypes_asm_${image}.si"
+	    popd
+	    exit 1
+	endif
+	set keepold = 0
+	if (-e $gtm_inc/gtm_threadgbl_deftypes_asm_${image}.si) then
+	    \rm -f gtm_threadgbl_deftypes_asm_${image}.si.diff
+	    \diff $gtm_inc/gtm_threadgbl_deftypes_asm_${image}.si gtm_threadgbl_deftypes_asm_${image}.si \
+		    >& gtm_threadgbl_deftypes_asm_${image}.si.diff
+	    if (0 == $status) then
+		set keepold = 1  # if no diff, keep the old file
+	    endif
+	endif
+	if (! $keepold) then
+	    \cp -p gtm_threadgbl_deftypes_asm_${image}.si $gtm_inc
+	    set savestatus = $status
+	    if (0 != $savestatus) then
+		echo "gen_gtm_threadgbl_deftypes.csh-E-: Unable to copy gtm_threadgbl_deftypes_asm_${image}.si to $gtm_inc"
+		popd
+		exit 1
+	    else
+	    	echo "$gtm_inc/gtm_threadgbl_deftypes_asm_${image}.si replaced"
+	    endif
+	else
+	    echo "$gtm_inc/gtm_threadgbl_deftypes_asm_${image}.si is current - not replaced"
+	endif
+	\rm -f gtm_threadgbl_deftypes_asm_${image}.in
+end
+#
+# Get rid of program stuff unless requested to keep it
+#
+if (! $?KEEP_THREADGBL) then
+    \rm gtm_threadgbl_deftypes{_pro,_dbg,.o} >& /dev/null
+endif
 popd
-echo "Exiting gen_gtm_threadgbl_deftypes.csh"
+echo "Exiting $0:t"
 exit 0
diff --git a/sr_unix/generic_signal_handler.c b/sr_unix/generic_signal_handler.c
index 82f65d3..035db7a 100644
--- a/sr_unix/generic_signal_handler.c
+++ b/sr_unix/generic_signal_handler.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -326,7 +327,7 @@ void generic_signal_handler(int sig, siginfo_t *info, void *context)
 		if (!dont_want_core && IS_MCODE_RUNNING && (NULL != (signal_routine = RFPTR(create_fatal_error_zshow_dmp_fptr))))
 		{	/* note assignment of signal_routine above */
 			SFPTR(create_fatal_error_zshow_dmp_fptr, NULL);
-			(*signal_routine)(exi_condition, FALSE);
+			(*signal_routine)(exi_condition);
 		}
 		/* Some mupip functions define an entry point to drive on signals. Make sure to do this AFTER we create the
 		 * dump file above as it may detach things (like the recvpool) we need to create the above dump.
diff --git a/sr_unix/get_src_line.c b/sr_unix/get_src_line.c
index c35cafd..f9abb01 100644
--- a/sr_unix/get_src_line.c
+++ b/sr_unix/get_src_line.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,6 +21,7 @@
 #include "gtm_stdio.h"
 
 #include <rtnhdr.h>
+#include <auto_zlink.h>
 #include "zroutines.h"
 #include "compiler.h"
 #include "srcline.h"
@@ -45,6 +47,7 @@
 #include "stack_frame.h"
 #include "rtn_src_chksum.h"
 #include "cmd_qlf.h"
+#include "arlinkdbg.h"
 
 #define RT_TBL_SZ 20
 
@@ -88,8 +91,8 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 	SETUP_THREADGBL_ACCESS;
 	srcstat = 0;
 	*srcret = NULL;
+	rtn_vector = NULL;
 	assert (routine->mvtype & MV_STR);
-
 	/* The source to be loaded can be of two types:
 	 *
 	 *   1. Normal routine source to be looked up on disk
@@ -100,11 +103,15 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 	GTMTRIG_ONLY(IS_TRIGGER_RTN(&routine->str, is_trigger));
 	DBGIFTRIGR((stderr, "get_src_line: entered $tlevel=%d and $t_tries=%d\n", dollar_tlevel, t_tries));
 	if (WANT_CURRENT_RTN(routine))
-	{	/* we want $TEXT for the routine currently executing. */
+	{	/* We want $TEXT for the routine currently executing - may be a recursively relinked routine copy */
 		rtn_vector = CURRENT_RHEAD_ADR(frame_pointer->rvector);
-	} else
+		DBGARLNK((stderr, "get_src_line: Fetching source from current routine (rtnhdr 0x"lvaddr")\n", rtn_vector));
+		assert(rtn_vector);
+		GTMTRIG_ONLY(is_trigger=(NULL != rtn_vector->trigr_handle));
+		DBGIFTRIGR((stderr, "get_src_line: entered $tlevel=%d and $t_tries=%d\n", dollar_tlevel, t_tries));
+	}
 #	ifdef GTM_TRIGGER
-	if (is_trigger)
+	if ((is_trigger) && ((NULL == rtn_vector) || (NULL == rtn_vector->source_code)))
 	{	/* Need source on a trigger. Get trigger source loaded and/or verified which may involve
 		 * creating a TP fence and dealing with TP restarts.
 		 */
@@ -113,8 +120,7 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 		 * avoid modification to routine->str as it affects the caller which relies on this variable being
 		 * untouched.
 		 */
-		tmprtnname = routine->str;
-		DEBUG_ONLY(rtn_vector = NULL;)
+		tmprtnname = (NULL == rtn_vector) ? routine->str : rtn_vector->routine_name;
 		DBGTRIGR((stderr, "get_src_line: fetch source for %s\n", tmprtnname.addr));
 		rc = trigger_source_read_andor_verify(&tmprtnname, TRIGGER_SRC_LOAD, &rtn_vector);
 		if (0 != rc)
@@ -129,10 +135,12 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 				*rtn_vec = NULL;
 			return OBJMODMISS;
 		}
-		DBGTRIGR((stderr, "get_src_line: source found @0x%lx(%d)\n", rtn_vector->trigr_handle,
-					((gv_trigger_t *)rtn_vector->trigr_handle)->xecute_str.str.len));
+		DBGTRIGR((stderr, "get_src_line: source found @0x%lx(%d) for %lx\n", rtn_vector->trigr_handle,
+					((gv_trigger_t *)rtn_vector->trigr_handle)->xecute_str.str.len, rtn_vector));
+		DBGARLNK((stderr, "get_src_line: Fetch trigger source from rtnhdr 0x"lvaddr"\n", rtn_vector));
 	} else
 #	endif
+	if (NULL == rtn_vector)
 	{
 		if (NULL == (rtn_vector = find_rtn_hdr(&routine->str)))		/* Note assignment */
 		{
@@ -145,14 +153,24 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 				return OBJMODMISS;
 			}
 		}
-		ARLINK_ONLY(rtn_vector = op_rhd_ext(routine, (mval *)&literal_null, rtn_vector, NULL));
+#		ifdef AUTORELINK_SUPPORTED
+		/* We have the routine now but double check if we need to load a newer one */
+		explicit_relink_check(rtn_vector, TRUE);
+		rtn_vector = (TABENT_PROXY).rtnhdr_adr;
+		assert(NULL != rtn_vector);
+		DBGARLNK((stderr, "get_src_line: Fetching routine source for rtnhdr 0x"lvaddr"\n", rtn_vector));
+#		endif
 	}
 	if (NULL != rtn_vec)
 		*rtn_vec = rtn_vector;
 	if (!rtn_vector->src_full_name.len)
+	{
+		DBGARLNK((stderr, "get_src_line: Source not available\n"));
 		return SRCNOTAVAIL;
+	}
 	src_tbl = rtn_vector->source_code;
-	DBGIFTRIGR((stderr, "get_src_line: routine has source_code 0x%lx (%d)\n", src_tbl, (src_tbl)? src_tbl->srcrecs : 0));
+	DBGIFTRIGR((stderr, "get_src_line: routine %lx has source_code 0x%lx (%d)\n",
+				rtn_vector, src_tbl, (src_tbl)? src_tbl->srcrecs : 0));
 	if (NULL == src_tbl)
 	{
 #		ifdef GTM_TRIGGER
@@ -160,9 +178,9 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 		{
 			srcstart = (unsigned char *)((gv_trigger_t *)rtn_vector->trigr_handle)->xecute_str.str.addr;
 			srcsize = ((gv_trigger_t *)rtn_vector->trigr_handle)->xecute_str.str.len;
+			DBGTRIGR((stderr, "get_src_line: %lx source is %d bytes\n%s\n", rtn_vector, srcsize, srcstart));
 			assert(0 < srcsize);
 			assert(NULL != srcstart);
-			DBGTRIGR((stderr, "get_src_line: source is %d bytes\n%s\n", srcsize, srcstart));
 			/* Calculate source checksum */
 			if (NULL == memchr(srcstart, '\n', srcsize))
 			{	/* In this case, gtm_trigger_complink() would have written an extra newline character to the
@@ -227,8 +245,10 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 	DBGIFTRIGR((stderr, " get_src_line: $tlevel %d\t", dollar_tlevel));
 	lt_ptr = (int *)find_line_addr(rtn_vector, &label->str, 0, NULL);
 	if (!lt_ptr)
+	{
+		DBGARLNK((stderr, "get_src_line: label not found\n"));
 		srcstat |= LABELNOTFOUND;
-	else if (!(srcstat & (SRCNOTFND | SRCNOTAVAIL)))
+	} else if (!(srcstat & (SRCNOTFND | SRCNOTAVAIL)))
 	{
 		line_indx = (int)(lt_ptr - (int *)LNRTAB_ADR(rtn_vector));
 		line_indx += offset;
@@ -245,7 +265,9 @@ int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp *
 			/* DBGFPF((stderr, "get_src_line: returning string %.*s\n", (*srcret)->len, (*srcret)->addr)); */
 		}
 	}
-	DBGIFTRIGR((stderr, "get_src_line: exiting with srcstat %d\n", srcstat));
+#	if defined(DEBUG_TRIGR) || defined(DEBUG_ARLINK)
+	DBGFPF((stderr, "get_src_line: exiting with srcstat %d\n", srcstat));
+#	endif
 	return srcstat;
 }
 
@@ -309,7 +331,7 @@ STATICFNDEF boolean_t fill_src_tbl_via_litpool(routine_source **src_tbl_result,
 	}
 	/* NOTE: no need to verify source checksum. no chance of mismatch */
 	*src_tbl_result = src_tbl;
-	return 0;
+	return FALSE;
 }
 
 STATICFNDEF boolean_t fill_src_tbl_via_mfile(routine_source **src_tbl_result, rhdtyp *rtn_vector)
diff --git a/sr_unix/geteuid.c b/sr_unix/geteuid.c
index e670cc5..9685ef1 100644
--- a/sr_unix/geteuid.c
+++ b/sr_unix/geteuid.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,8 +10,12 @@
  *								*
  ****************************************************************/
 
+#include "mdef.h"
+
 #include "main_pragma.h"
+
 #include <sys/types.h>
+
 #include "gtm_stdio.h"
 #include "gtm_unistd.h"
 
diff --git a/sr_unix/getjobnum.c b/sr_unix/getjobnum.c
index fba06d1..5744a46 100644
--- a/sr_unix/getjobnum.c
+++ b/sr_unix/getjobnum.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -15,6 +16,7 @@
 #include "getjobnum.h"
 
 GBLREF	uint4	process_id;
+GBLREF	uid_t	user_id;
 
 void getjobnum(void)
 {
@@ -22,5 +24,5 @@ void getjobnum(void)
 
 	SETUP_THREADGBL_ACCESS;
 	process_id = getpid();
-	TREF(user_id) = (uint4)getuid();
+	user_id = (uint4)getuid();
 }
diff --git a/sr_unix/grab_crit.c b/sr_unix/grab_crit.c
index 37c89b3..1801c14 100644
--- a/sr_unix/grab_crit.c
+++ b/sr_unix/grab_crit.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -99,7 +100,7 @@ void	grab_crit(gd_region *reg)
 		TREF(grabbing_crit) = reg;
 		DEBUG_ONLY(locknl = cnl;)	/* for DEBUG_ONLY LOCK_HIST macro */
 		mutex_spin_parms = (mutex_spin_parms_ptr_t)&csd->mutex_spin_parms;
-		status = mutex_lockw(reg, mutex_spin_parms, crash_count);
+		status = gtm_mutex_lock(reg, mutex_spin_parms, crash_count, MUTEX_LOCK_WRITE);
 #		ifdef DEBUG
 		if (gtm_white_box_test_case_enabled
 			&& (WBTEST_SENDTO_EPERM == gtm_white_box_test_case_number)
@@ -120,11 +121,11 @@ void	grab_crit(gd_region *reg)
 			switch(status)
 			{
 				case cdb_sc_critreset:
-					rts_error(VARLSTCNT(4) ERR_CRITRESET, 2, REG_LEN_STR(reg));
+					rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_CRITRESET, 2, REG_LEN_STR(reg));
 				case cdb_sc_dbccerr:
-					rts_error(VARLSTCNT(4) ERR_DBCCERR, 2, REG_LEN_STR(reg));
+					rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_DBCCERR, 2, REG_LEN_STR(reg));
 				default:
-					GTMASSERT;
+					assertpro((cdb_sc_critreset == status) || (cdb_sc_dbccerr == status));
 			}
 			return;
 		}
@@ -143,7 +144,7 @@ void	grab_crit(gd_region *reg)
 	 * NOT issue DBFLCORRP. Use skip_file_corrupt_check global variable for this purpose
 	 */
 	if (csd->file_corrupt && !TREF(skip_file_corrupt_check))
-		rts_error(VARLSTCNT(4) ERR_DBFLCORRP, 2, DB_LEN_STR(reg));
+		rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_DBFLCORRP, 2, DB_LEN_STR(reg));
 	if (cnl->wc_blocked)
 		wcs_recover(reg);
 	return;
diff --git a/sr_unix/grab_crit_immediate.c b/sr_unix/grab_crit_immediate.c
index 70e7ca2..3d4b744 100644
--- a/sr_unix/grab_crit_immediate.c
+++ b/sr_unix/grab_crit_immediate.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -62,7 +63,7 @@ boolean_t grab_crit_immediate(gd_region *reg)
 		crit_count++;	/* prevent interrupts */
 		DEBUG_ONLY(locknl = cnl;)	/* for DEBUG_ONLY LOCK_HIST macro */
 		mutex_spin_parms = (mutex_spin_parms_ptr_t)&csd->mutex_spin_parms;
-		status = mutex_lockwim(reg, mutex_spin_parms, crash_count);
+		status = gtm_mutex_lock(reg, mutex_spin_parms, crash_count, MUTEX_LOCK_WRITE_IMMEDIATE);
 		DEBUG_ONLY(locknl = NULL;)	/* restore "locknl" to default value */
 		if (status != cdb_sc_normal)
 		{
diff --git a/sr_unix/grab_latch.c b/sr_unix/grab_latch.c
index 1f11cbe..04be791 100644
--- a/sr_unix/grab_latch.c
+++ b/sr_unix/grab_latch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,61 +21,55 @@
 #include "rel_quant.h"
 #include "sleep_cnt.h"
 #include "wcs_sleep.h"
+#include "min_max.h"
 
 GBLREF	int		num_additional_processors;
 GBLREF	uint4		process_id;
 GBLREF	volatile int4	fast_lock_count;		/* Stop interrupts while we have our parts exposed */
 
-/* Grab a latch. If cannot get it in "max_retries" attempts, return FALSE, else TRUE.
- * Check for a max of 4 times whether holder pid is dead and if so salvage the lock.
- * Dont do it frequently as it involves is_proc_alive check which is a system call.
+/* Grab a latch. If cannot get it in the approximate time requested, return FALSE, else TRUE.
  */
 boolean_t grab_latch(sm_global_latch_ptr_t latch, int max_timeout_in_secs)
 {
-	int	max_retries, retries, spins, maxspins, quarter_retries, next_cascheck, cursleep;
+	int	max_retries, retries, spins, maxspins;
 
-	assert(process_id == getpid());	/* make sure "process_id" global variable is reliable (used below in an assert) */
+	assert(process_id == getpid());	/* Make sure "process_id" global variable is reliable (used below in an assert) */
 	if (process_id == latch->u.parts.latch_pid)
-	{	/* already have lock */
-		assert(FALSE);	/* dont expect caller to call us if we hold the lock already. in pro be safe and return */
+	{	/* Already have lock */
+		assert(FALSE);	/* Don't expect caller to call us if we hold the lock already. in pro be safe and return */
 		return TRUE;
 	}
 	++fast_lock_count;	/* Disable interrupts (i.e. wcs_stale) for duration to avoid potential deadlocks */
 	/* Compute "max_retries" so total sleep time is "max_timeout_in_secs" seconds */
-	quarter_retries = max_timeout_in_secs * MILLISECS_IN_SEC;
-	DEBUG_ONLY(
-		if (!quarter_retries)
-			quarter_retries = 1;	/* dbg call to do grab_latch_immediate, reset to just 1 iteration */
-	)
-	max_retries = quarter_retries * 4; /* 1 loop in 4 is sleep of 1 msec */
-	maxspins = num_additional_processors ? MAX_LOCK_SPINS(max_retries, num_additional_processors) : 1;
-	next_cascheck = max_retries - quarter_retries;
-	cursleep = MINSLPTIME;
-	for (retries = max_retries - 1; 0 < retries; retries--)	/* - 1 so do rel_quant 3 times first */
+	max_retries = max_timeout_in_secs * LOCK_TRIES_PER_SEC;
+	/* Some DEBUG build calls have 0 timeout so want just one iteration but since we subtract one from the max to
+	 * avoid sleeping the first round, make it 2.
+	 */
+	DEBUG_ONLY(max_retries = MAX(max_retries, 2));
+	/* Define number of hard-spins the inner loop does */
+	maxspins = num_additional_processors ? MAX_LOCK_SPINS(LOCK_SPINS, num_additional_processors) : 1;
+	for (retries = max_retries - 1; 0 < retries; retries--)	/* Subtract 1 so don't do sleep till 3rd pass */
 	{
 		for (spins = maxspins; 0 < spins; spins--)
 		{	/* We better not hold it if trying to get it */
 			assert(latch->u.parts.latch_pid != process_id);
                         if (GET_SWAPLOCK(latch))
-			{	/* Note that fast_lock_count is kept incremented for the duration that we hold the lock
-				 * to prevent our dispatching an interrupt that could deadlock getting this lock
-				 */
+			{
 				--fast_lock_count;
 				assert(0 <= fast_lock_count);
 				return TRUE;
 			}
 		}
-		/* Now that we have done a lot of spin, sleep a little. Do not use rel_quant as benchmarks done seem to
-		 * suggest it is a more costly operation (system call + cpu overhead) in an environment with lots of processes.
-		 */
-		wcs_sleep(cursleep++);
-		if (MAXSLPTIME == cursleep)
-			cursleep = MINSLPTIME;	/* start all over again in sleep loop */
-		/* For a total of 3 times in this function, see if target is dead and/or wake it up */
-		if (retries == next_cascheck)
+		if (retries & 0x3)
+			/* On all but every 4th pass, do a simple rel_quant */
+			rel_quant();	/* Release processor to holder of lock (hopefully) */
+		else
 		{
-			performCASLatchCheck(latch, TRUE);
-			next_cascheck -= quarter_retries;
+			/* On every 4th pass, take a cat-nap */
+			wcs_sleep(LOCK_SLEEP);
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
+				performCASLatchCheck(latch, TRUE);
 		}
 	}
 	--fast_lock_count;
diff --git a/sr_unix/grab_lock.c b/sr_unix/grab_lock.c
index a960881..bc82ef4 100644
--- a/sr_unix/grab_lock.c
+++ b/sr_unix/grab_lock.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -74,9 +75,9 @@ boolean_t grab_lock(gd_region *reg, boolean_t is_blocking_wait, uint4 onln_rlbk_
 		/* This assumes that mutex_spin_parms_t is located immediately after the crit structures */
 		/* As of 10/07/98, crashcnt field in mutex_struct is not changed by any function for the dummy  region */
 		if (is_blocking_wait)
-			status = mutex_lockw(reg, mutex_spin_parms, 0);
+			status = gtm_mutex_lock(reg, mutex_spin_parms, 0, MUTEX_LOCK_WRITE);
 		else
-			status = mutex_lockwim(reg, mutex_spin_parms, 0);
+			status = gtm_mutex_lock(reg, mutex_spin_parms, 0, MUTEX_LOCK_WRITE_IMMEDIATE);
 		DEBUG_ONLY(locknl = NULL);	/* restore "locknl" to default value */
 		if (status != cdb_sc_normal)
 		{
diff --git a/sr_unix/gt_timers.c b/sr_unix/gt_timers.c
index 44bdc3b..57ba686 100644
--- a/sr_unix/gt_timers.c
+++ b/sr_unix/gt_timers.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -127,6 +128,7 @@ STATICDEF boolean_t		in_setitimer_error;
 #endif
 
 #define DUMMY_SIG_NUM		0		/* following can be used to see why timer_handler was called */
+#define SAFE_FOR_ANY_TIMER	((INTRPT_OK_TO_INTERRUPT == intrpt_ok_state) && (FALSE == process_exiting) && !(fast_lock_count))
 
 STATICDEF volatile GT_TIMER *timeroot = NULL;	/* chain of pending timer requests in time order */
 STATICDEF boolean_t first_timeset = TRUE;
@@ -174,6 +176,7 @@ GBLREF	boolean_t	blocksig_initialized;			/* Set to TRUE when blockalrm, block_tt
 GBLREF	sigset_t	blockalrm;
 GBLREF	sigset_t	block_ttinout;
 GBLREF	sigset_t	block_sigsent;
+GBLREF 	volatile int4	fast_lock_count;
 GBLREF	boolean_t	heartbeat_started;
 GBLREF	void		(*heartbeat_timer_ptr)(void);		/* Initialized only in gtm_startup(). */
 GBLREF	int4		error_condition;
@@ -422,7 +425,7 @@ void start_timer(TID tid,
                         }
 		}
 	}
-	if (!safe_to_add && (process_exiting || (INTRPT_OK_TO_INTERRUPT != intrpt_ok_state)))
+	if (!safe_to_add && !(SAFE_FOR_ANY_TIMER))
 	{
 		assert(FALSE);
 		return;
@@ -556,7 +559,7 @@ STATICFNDEF void start_first_timer(ABS_TIME *curr_time)
 		deferred_timers_check_needed = FALSE;
 		return;
 	}
-	if ((INTRPT_OK_TO_INTERRUPT == intrpt_ok_state) && !process_exiting)
+	if (SAFE_FOR_ANY_TIMER)
 	{	/* Check if some timer expired while this function was getting invoked. */
 		while (timeroot)
 		{
@@ -647,7 +650,7 @@ STATICFNDEF void timer_handler(int why)
 		/* A timer might pop while we are in the non-zero intrpt_ok_state zone, which could cause collisions. Instead,
 		 * we will defer timer events and drive them once the deferral is removed, unless the timer is safe.
 		 */
-		if (((INTRPT_OK_TO_INTERRUPT == intrpt_ok_state) && (FALSE == process_exiting)) || (tpop->safe))
+		if (SAFE_FOR_ANY_TIMER || (tpop->safe))
 		{
 			if (NULL != tpop_prev)
 				tpop_prev->next = tpop->next;
@@ -731,7 +734,7 @@ STATICFNDEF void timer_handler(int why)
 		}
 	}
 	RESTORE_UTIL_OUT_BUFFER(save_util_outptr, save_last_va_list_ptr, util_copy_saved);
-	if (((FALSE == process_exiting) && (INTRPT_OK_TO_INTERRUPT == intrpt_ok_state)) || (0 < safe_timer_cnt))
+	if (SAFE_FOR_ANY_TIMER || (0 < safe_timer_cnt))
 		start_first_timer(&at);
 	else if ((NULL != timeroot) || (0 < timer_defer_cnt))
 		deferred_timers_check_needed = TRUE;
diff --git a/sr_unix/gtm_compile.c b/sr_unix/gtm_compile.c
index ebf3230..7fce330 100644
--- a/sr_unix/gtm_compile.c
+++ b/sr_unix/gtm_compile.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -88,11 +89,7 @@ int	gtm_compile (void)
 	symbinit();
 	/* Variables for supporting $ZSEARCH sorting and wildcard expansion */
 	TREF(zsearch_var) = lv_getslot(curr_symval);
-	TREF(zsearch_dir1) = lv_getslot(curr_symval);
-	TREF(zsearch_dir2) = lv_getslot(curr_symval);
 	LVVAL_INIT((TREF(zsearch_var)), curr_symval);
-	LVVAL_INIT((TREF(zsearch_dir1)), curr_symval);
-	LVVAL_INIT((TREF(zsearch_dir2)), curr_symval);
 	/* command qualifier processing stuff */
 	zco_init();
 	assert(cli_lex_in_ptr);
diff --git a/sr_unix/gtm_env_init_sp.c b/sr_unix/gtm_env_init_sp.c
index 0286556..8593a0b 100644
--- a/sr_unix/gtm_env_init_sp.c
+++ b/sr_unix/gtm_env_init_sp.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2004, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2004-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -79,6 +80,13 @@
 #endif
 #define MAX_TRANS_NAME_LEN			GTM_PATH_MAX
 
+/* Remove trailing '/' from path (unless only '/') */
+#define	REMOVE_TRAILING_SLASH_FROM_MSTR(TRANS)				\
+{									\
+	while ((1 < TRANS.len) && ('/' == TRANS.addr[TRANS.len - 1]))	\
+		TRANS.len--;						\
+}
+
 GBLREF	uint4			gtm_principal_editing_defaults;	/* ext_cap flags if tt */
 GBLREF	boolean_t		is_gtm_chset_utf8;
 GBLREF	boolean_t		utf8_patnumeric;
@@ -94,6 +102,7 @@ GBLREF	boolean_t		ipv4_only;		/* If TRUE, only use AF_INET. */
 ZOS_ONLY(GBLREF	char		*gtm_utf8_locale_object;)
 ZOS_ONLY(GBLREF	boolean_t	gtm_tag_utf8_as_ascii;)
 GTMTRIG_ONLY(GBLREF	mval	gtm_trigger_etrap;)
+GBLREF	volatile boolean_t	timer_in_handler;
 
 #ifdef GTM_TRIGGER
 LITDEF mval default_mupip_trigger_etrap = DEFINE_MVAL_LITERAL(MV_STR, 0 , 0 , (SIZEOF(DEFAULT_MUPIP_TRIGGER_ETRAP) - 1),
@@ -119,15 +128,18 @@ static readonly unsigned char editing_index[27] =
 static readonly unsigned char init_break[1] = {'B'};
 
 error_def(ERR_INVLINKTMPDIR);
+error_def(ERR_INVTMPDIR);
+error_def(ERR_ARCTLMAXHIGH);
+error_def(ERR_ARCTLMAXLOW);
 
 void	gtm_env_init_sp(void)
 {	/* Unix only environment initializations */
 	mstr		val, trans;
 	int4		status, index, len, hrtbt_cntr_delta, stat_res;
 	size_t		cwdlen;
-	boolean_t	ret, is_defined;
+	boolean_t	ret, is_defined, novalidate;
 	char		buf[MAX_TRANS_NAME_LEN], *token, cwd[GTM_PATH_MAX];
-	char		*cwdptr, *trigger_etrap, *c, *end;
+	char		*cwdptr, *trigger_etrap, *c, *end, *strtokptr;
 	struct stat	outbuf;
 	int		gtm_autorelink_shm_min;
 	DCL_THREADGBL_ACCESS;
@@ -137,8 +149,9 @@ void	gtm_env_init_sp(void)
 	libhugetlbfs_init();
 #	endif
 #	ifdef __MVS__
-	/* For now OS/390 only. Eventually, this will be added to all UNIX platforms along with the
-	 * capability to specify the desired directory to put a core file in.
+	/* For now OS/390 only. Eventually, this could be added to all UNIX platforms along with the
+	 * capability to specify the desired directory to put a core file in. Needs to be setup before
+	 * much of anything else is.
 	 */
 	if (NULL == gtm_core_file)
 	{
@@ -158,6 +171,25 @@ void	gtm_env_init_sp(void)
 		} /* else gtm_core_file/gtm_core_putenv remain null and we likely cannot generate proper core files */
 	}
 #	endif
+	/* Validate $gtm_tmp if specified, else that default is available */
+	val.addr = GTM_TMP_ENV;
+	val.len = SIZEOF(GTM_TMP_ENV) - 1;
+	if (SS_NORMAL != (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long)))
+	{	/* Nothing for $gtm_tmp either - use DEFAULT_GTM_TMP which is already a string */
+		MEMCPY_LIT(buf, DEFAULT_GTM_TMP);
+		trans.addr = buf;
+		trans.len = SIZEOF(DEFAULT_GTM_TMP) - 1;
+	}
+	assert(GTM_PATH_MAX > trans.len);
+	REMOVE_TRAILING_SLASH_FROM_MSTR(trans); /* Remove trailing '/' from trans.addr */
+	trans.addr[trans.len] = '\0';
+	STAT_FILE(trans.addr, &outbuf, stat_res);
+	if ((-1 == stat_res) || !S_ISDIR(outbuf.st_mode))
+	{
+		/* Either the directory doesn't exist or the specified or defaulted entity is not a directory */
+		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4)	ERR_INVTMPDIR, 2, trans.len, trans.addr);
+	}
+	/* Check for and and setup gtm_quiet_halt if specified */
 	val.addr = GTM_QUIET_HALT;
 	val.len = SIZEOF(GTM_QUIET_HALT) - 1;
 	ret = logical_truth_value(&val, FALSE, &is_defined);
@@ -195,7 +227,7 @@ void	gtm_env_init_sp(void)
 	{
 		assert(trans.len < SIZEOF(buf));
 		trans.addr[trans.len] = '\0';
-		token = strtok(trans.addr, ":");
+		token = STRTOK_R(trans.addr, ":", &strtokptr);
 		while (NULL != token)
 		{
 			if (ISALPHA_ASCII(token[0]))
@@ -206,33 +238,33 @@ void	gtm_env_init_sp(void)
 			{
 				switch (index)
 				{
-				case 0:	/* EDITING */
-					gtm_principal_editing_defaults |= TT_EDITING;
-					break;
-				case 1:	/* EMPTERM */
-					gtm_principal_editing_defaults |= TT_EMPTERM;
-					break;
-				case 2:	/* INSERT */
-					gtm_principal_editing_defaults &= ~TT_NOINSERT;
-					break;
-				case 3:	/* NOEDITING */
-					gtm_principal_editing_defaults &= ~TT_EDITING;
-					break;
-				case 4:	/* NOEMPTERM */
-					gtm_principal_editing_defaults &= ~TT_EMPTERM;
-					break;
-				case 5:	/* NOINSERT */
-					gtm_principal_editing_defaults |= TT_NOINSERT;
-					break;
+					case 0:	/* EDITING */
+						gtm_principal_editing_defaults |= TT_EDITING;
+						break;
+					case 1:	/* EMPTERM */
+						gtm_principal_editing_defaults |= TT_EMPTERM;
+						break;
+					case 2:	/* INSERT */
+						gtm_principal_editing_defaults &= ~TT_NOINSERT;
+						break;
+					case 3:	/* NOEDITING */
+						gtm_principal_editing_defaults &= ~TT_EDITING;
+						break;
+					case 4:	/* NOEMPTERM */
+						gtm_principal_editing_defaults &= ~TT_EMPTERM;
+						break;
+					case 5:	/* NOINSERT */
+						gtm_principal_editing_defaults |= TT_NOINSERT;
+						break;
 				}
 			}
-			token = strtok(NULL, ":");
+			token = STRTOK_R(NULL, ":", &strtokptr);
 		}
 	}
 	val.addr = GTM_CHSET_ENV;
 	val.len = STR_LIT_LEN(GTM_CHSET_ENV);
 	if (SS_NORMAL == (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long))
-		&& STR_LIT_LEN(UTF8_NAME) == trans.len)
+	    && STR_LIT_LEN(UTF8_NAME) == trans.len)
 	{
 		if (!strncasecmp(buf, UTF8_NAME, STR_LIT_LEN(UTF8_NAME)))
 		{
@@ -241,7 +273,7 @@ void	gtm_env_init_sp(void)
 			val.addr = GTM_CHSET_LOCALE_ENV;
 			val.len = STR_LIT_LEN(GTM_CHSET_LOCALE_ENV);
 			if ((SS_NORMAL == (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long))) &&
-				(0 < trans.len))
+			    (0 < trans.len))
 			{	/* full path to 64 bit ASCII UTF-8 locale object */
 				gtm_utf8_locale_object = malloc(trans.len + 1);
 				strcpy(gtm_utf8_locale_object, buf);
@@ -258,8 +290,8 @@ void	gtm_env_init_sp(void)
 			val.addr = GTM_PATNUMERIC_ENV;
 			val.len = STR_LIT_LEN(GTM_PATNUMERIC_ENV);
 			if (SS_NORMAL == (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long))
-				&& STR_LIT_LEN(UTF8_NAME) == trans.len
-				&& !strncasecmp(buf, UTF8_NAME, STR_LIT_LEN(UTF8_NAME)))
+			    && STR_LIT_LEN(UTF8_NAME) == trans.len
+			    && !strncasecmp(buf, UTF8_NAME, STR_LIT_LEN(UTF8_NAME)))
 			{
 				utf8_patnumeric = TRUE;
 			}
@@ -345,37 +377,47 @@ void	gtm_env_init_sp(void)
 		init_relink_allowed(&trans); /* set TREF(relink_allowed) */
 	}
 #	ifdef AUTORELINK_SUPPORTED
-	/* Set default or supplied value for $gtm_linktmpdir */
-	val.addr = GTM_LINKTMPDIR;
-	val.len = SIZEOF(GTM_LINKTMPDIR) - 1;
-	if (SS_NORMAL != (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long)))
-	{	/* Else use default $gtm_tmp value or its default */
-		val.addr = GTM_TMP_ENV;
-		val.len = SIZEOF(GTM_TMP_ENV) - 1;
+	if (!IS_GTMSECSHR_IMAGE)
+	{	/* Set default or supplied value for $gtm_linktmpdir */
+		val.addr = GTM_LINKTMPDIR;
+		val.len = SIZEOF(GTM_LINKTMPDIR) - 1;
 		if (SS_NORMAL != (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long)))
-		{	/* Nothing for $gtm_tmp either - use DEFAULT_GTM_TMP which is already a string */
-			trans.addr = DEFAULT_GTM_TMP;
-			trans.len = SIZEOF(DEFAULT_GTM_TMP) - 1;
+		{	/* Else use default $gtm_tmp value or its default */
+			val.addr = GTM_TMP_ENV;
+			val.len = SIZEOF(GTM_TMP_ENV) - 1;
+			if (SS_NORMAL != (status = TRANS_LOG_NAME(&val, &trans, buf, SIZEOF(buf), do_sendmsg_on_log2long)))
+			{	/* Nothing for $gtm_tmp either - use DEFAULT_GTM_TMP which is already a string */
+				trans.addr = DEFAULT_GTM_TMP;
+				trans.len = SIZEOF(DEFAULT_GTM_TMP) - 1;
+			}
+			novalidate = TRUE;		/* Don't validate gtm_linktmpdir if is defaulting to $gtm_tmp */
+		} else
+			novalidate = FALSE;
+		assert(GTM_PATH_MAX > trans.len);
+		REMOVE_TRAILING_SLASH_FROM_MSTR(trans); /* Remove trailing '/' from trans.addr */
+		(TREF(gtm_linktmpdir)).addr = malloc(trans.len + 1); /* +1 for '\0'; This memory is never freed */
+		(TREF(gtm_linktmpdir)).len = trans.len;
+		/* For now, we assume that if the environment variable is defined to NULL, anticipatory freeze is NOT in effect */
+		if (0 < trans.len)
+			memcpy((TREF(gtm_linktmpdir)).addr, trans.addr, trans.len);
+		((TREF(gtm_linktmpdir)).addr)[trans.len] = '\0';
+		if (!novalidate)
+		{	/* $gtm_linktmpdir was specified - validate it (bypass if using $gtm_tmp or its default as that was
+			 * already checked earlier.
+			 */
+			STAT_FILE((TREF(gtm_linktmpdir)).addr, &outbuf, stat_res);
+			if ((-1 == stat_res) || !S_ISDIR(outbuf.st_mode))
+			{	/* Either the directory doesn't exist or the entity is not a directory */
+				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4)
+					     ERR_INVLINKTMPDIR, 2, (TREF(gtm_linktmpdir)).len, (TREF(gtm_linktmpdir)).addr);
+				free((TREF(gtm_linktmpdir)).addr);
+				trans.len = SIZEOF(DEFAULT_GTM_TMP) - 1;
+				trans.addr = DEFAULT_GTM_TMP;
+				REMOVE_TRAILING_SLASH_FROM_MSTR(trans); /* Remove trailing '/' from trans.addr */
+				(TREF(gtm_linktmpdir)) = trans;
+			}
 		}
 	}
-	assert(GTM_PATH_MAX > trans.len);
-	/* Remove trailing '/' from path */
-	while ((1 < trans.len) && ('/' == trans.addr[trans.len - 1]))
-		trans.len--;
-	(TREF(gtm_linktmpdir)).addr = malloc(trans.len + 1); /* +1 for '\0'; This memory is never freed */
-	(TREF(gtm_linktmpdir)).len = trans.len;
-	/* For now, we assume that if the environment variable is defined to NULL, anticipatory freeze is NOT in effect */
-	if (0 < trans.len)
-		memcpy((TREF(gtm_linktmpdir)).addr, trans.addr, trans.len);
-	((TREF(gtm_linktmpdir)).addr)[trans.len] = '\0';
-	STAT_FILE((TREF(gtm_linktmpdir)).addr, &outbuf, stat_res);
-	if ((-1 == stat_res) || !S_ISDIR(outbuf.st_mode))
-	{	/* Either the directory doesn't exist or the entity is not a directory */
-		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_INVLINKTMPDIR, 2, (TREF(gtm_linktmpdir)).len,
-			     (TREF(gtm_linktmpdir)).addr);
-		(TREF(gtm_linktmpdir)).len = SIZEOF(DEFAULT_GTM_TMP) - 1;
-		(TREF(gtm_linktmpdir)).addr = DEFAULT_GTM_TMP;
-	}
 	/* See if gtm_autorelink_shm is set */
 	val.addr = GTM_AUTORELINK_SHM;
 	val.len = SIZEOF(GTM_AUTORELINK_SHM) - 1;
@@ -393,6 +435,23 @@ void	gtm_env_init_sp(void)
 	TREF(gtm_autorelink_keeprtn) = logical_truth_value(&val, FALSE, &is_defined);
 	if (!is_defined)
 		TREF(gtm_autorelink_keeprtn) = FALSE;
+	/* See if gtm_autorelink_ctlmax is set */
+	val.addr = GTM_AUTORELINK_CTLMAX;
+	val.len = SIZEOF(GTM_AUTORELINK_CTLMAX) - 1;
+	TREF(gtm_autorelink_ctlmax) = trans_numeric(&val, &is_defined, TRUE);
+	if (!is_defined)
+		TREF(gtm_autorelink_ctlmax) = RELINKCTL_DEFAULT_ENTRIES;
+	else if (TREF(gtm_autorelink_ctlmax) > RELINKCTL_MAX_ENTRIES)
+	{
+		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_ARCTLMAXHIGH, 4, LEN_AND_LIT(GTM_AUTORELINK_CTLMAX),
+			     TREF(gtm_autorelink_ctlmax), RELINKCTL_MAX_ENTRIES);
+		TREF(gtm_autorelink_ctlmax) = RELINKCTL_MAX_ENTRIES;
+	} else if (TREF(gtm_autorelink_ctlmax) < RELINKCTL_MIN_ENTRIES)
+	{
+		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_ARCTLMAXLOW, 4, LEN_AND_LIT(GTM_AUTORELINK_CTLMAX),
+			     TREF(gtm_autorelink_ctlmax), RELINKCTL_MIN_ENTRIES);
+		TREF(gtm_autorelink_ctlmax) = RELINKCTL_MIN_ENTRIES;
+	}
 #	endif /* AUTORELINK_SUPPORTED */
 #	ifdef DEBUG
 	/* DEBUG-only option to bypass 'easy' methods of things and always use gtmsecshr for IPC cleanups, wakeups, file removal,
diff --git a/sr_unix/gtm_exit_handler.c b/sr_unix/gtm_exit_handler.c
index 39d1147..385baf9 100644
--- a/sr_unix/gtm_exit_handler.c
+++ b/sr_unix/gtm_exit_handler.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -62,7 +63,11 @@ static	enum rundown_state	attempting;
 GBLREF	int			process_exiting;
 #endif
 
-/* Note: This macro uses local variables "attempting", "error_seen" and "actual_exi_condition" */
+/* This macro is a framework to help perform ONE type of rundown (e.g. db or lock or io rundown etc.).
+ * "gtm_exit_handler" invokes this macro for each type of rundown that is needed and passes appropriate
+ * parameters to indicate the detail needed for each rundown.
+ * Note: This macro uses local variables "attempting", "error_seen" and "actual_exi_condition".
+ */
 #define	RUNDOWN_STEP(THISSTATE, NEXTSTATE, ERRCODE, STMT)			\
 {										\
 	if (THISSTATE == attempting)						\
@@ -141,6 +146,12 @@ enum rundown_state
 	rundown_state_last
 };
 
+/* Function that is invoked at process exit time to do cleanup.
+ * The general flow here is to do various types of rundowns (e.g. db rundown, lock rundown, io rundown etc.).
+ * If one type of rundown encounters an error midway, we want to just move on to the next type of rundown.
+ * This way we do as much cleanup as possible before the process exists. Towards this, we use "exi_ch" as a
+ * condition handler and the RUNDOWN_STEP macro to take care of each type of rundown.
+ */
 void gtm_exit_handler(void)
 {
 	struct sigaction		act;
@@ -155,7 +166,7 @@ void gtm_exit_handler(void)
 	exit_handler_active = TRUE;
 	attempting = rundown_state_mprof;
 	actual_exi_condition = 0;
-	ESTABLISH_NORET(exi_ch, error_seen);
+	ESTABLISH_NORET(exi_ch, error_seen);	/* "error_seen" is initialized inside this macro */
 	RUNDOWN_STEP(rundown_state_mprof, rundown_state_lock, ERR_MPROFRUNDOWN, MPROF_RUNDOWN_MACRO);
 	RUNDOWN_STEP(rundown_state_lock, rundown_state_db, ERR_LKRUNDOWN, LOCK_RUNDOWN_MACRO);
 	RUNDOWN_STEP(rundown_state_db, rundown_state_io, ERR_GVRUNDOWN, gv_rundown());
diff --git a/sr_unix/gtm_getpwuid.c b/sr_unix/gtm_getpwuid.c
index fda65ea..d49abb4 100644
--- a/sr_unix/gtm_getpwuid.c
+++ b/sr_unix/gtm_getpwuid.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2008 Fidelity Information Services, Inc	*
+ * Copyright (c) 2008-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -11,6 +12,7 @@
 
 #include "mdef.h"
 
+#include "gtm_unistd.h"
 #include "gtm_pwd.h"
 
 #undef	getpwuid	/* since we are going to use the system level "getpwuid" function, undef the alias to "gtm_getpwuid" */
@@ -19,6 +21,7 @@
 
 GBLREF	boolean_t	blocksig_initialized;
 GBLREF  sigset_t	block_sigsent;
+GBLREF	struct		passwd getpwuid_struct;	/* cached copy of "getpwuid" to try avoid future system calls for the same "uid" */
 
 /* This is a wrapper for the system "getpwuid" and is needed to prevent signal interrupts from occurring in the middle
  * of getpwuid since that is not signal-safe (i.e. could hold system library related locks that might prevent a signal
@@ -26,14 +29,24 @@ GBLREF  sigset_t	block_sigsent;
  */
 struct passwd	*gtm_getpwuid(uid_t uid)
 {
-	struct passwd	*retval;
-	sigset_t	savemask;
+	struct passwd			*retval;
+	sigset_t			savemask;
+	DEBUG_ONLY(static boolean_t	first_time = TRUE;)
 
-	assert(blocksig_initialized);	/* the set of blocking signals should be initialized at process startup */
-	if (blocksig_initialized)	/* In pro, dont take chances and handle case where it is not initialized */
-		sigprocmask(SIG_BLOCK, &block_sigsent, &savemask);
-	retval = getpwuid(uid);
-	if (blocksig_initialized)
-		sigprocmask(SIG_SETMASK, &savemask, NULL);
-	return retval;
+	assert(!first_time || (INVALID_UID == getpwuid_struct.pw_uid));	/* assert we do the INVALID_UID init in gbldefs.c */
+	if (uid != getpwuid_struct.pw_uid) /* if we did not do a "getpwuid" call for this "uid", do it else return cached value */
+	{
+		assert(blocksig_initialized);	/* the set of blocking signals should be initialized at process startup */
+		if (blocksig_initialized)	/* In pro, dont take chances and handle case where it is not initialized */
+			sigprocmask(SIG_BLOCK, &block_sigsent, &savemask);
+		retval = getpwuid(uid);
+		if (blocksig_initialized)
+			sigprocmask(SIG_SETMASK, &savemask, NULL);
+		if (NULL == retval)
+			return NULL;	/* error or "uid" record not found */
+		/* Cache return from "getpwuid" call and avoid future calls to this function */
+		getpwuid_struct = *retval;
+		DEBUG_ONLY(first_time = FALSE;)
+	}
+	return &getpwuid_struct;
 }
diff --git a/sr_unix/gtm_icu.c b/sr_unix/gtm_icu.c
index dea46d1..aca0bd7 100644
--- a/sr_unix/gtm_icu.c
+++ b/sr_unix/gtm_icu.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2006-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -47,6 +48,7 @@
 #endif
 
 ZOS_ONLY(GBLREF	char	*gtm_utf8_locale_object;)
+GBLREF	volatile boolean_t	timer_in_handler;
 
 typedef void (*icu_func_t)();	/* a generic pointer type to the ICU function */
 
@@ -176,6 +178,7 @@ void gtm_icu_init(void)
 	char		tmp_errstr[SIZEOF(ICU_LIBNAME) + STR_LIT_LEN(ICU_LIBNAME_SUFFIX)]; /* "libicuio.so has version" */
 	char		*major_ver_ptr, *minor_ver_ptr;
 	char		icu_libname[SIZEOF(ICU_LIBNAME) + MAX_ICU_VERSION_STRLEN];
+	char		*strtokptr;
 	const char	*cur_icu_fname;
 	int		icu_final_fname_len, icu_libname_len, len, major_ver_len, minor_ver_len, save_fname_len;
 	void_ptr_t	handle;
@@ -279,13 +282,13 @@ void gtm_icu_init(void)
 		search_path_ptr = dyn_search_paths;
 	}
 	/* At this point we have all the library search paths pointed by search_path_ptr seperated by ":". */
-	each_libpath = strtok(search_path_ptr, DELIM);
+	each_libpath = STRTOK_R(search_path_ptr, DELIM, &strtokptr);
 	while (NULL != each_libpath)
 	{
 		SNPRINTF(temp_path, GTM_PATH_MAX, "%s/%s", each_libpath, libname);
 		if (NULL == realpath(temp_path, real_path) && (0 != Stat(real_path, &real_path_stat)))
 		{
-			each_libpath = strtok(NULL, DELIM);
+			each_libpath = STRTOK_R(NULL, DELIM, &strtokptr);
 			continue;
 		}
 		/* At this point we would have in real_path the fully qualified path to the version'ed libicuio archive.
diff --git a/sr_unix/gtm_logicals.h b/sr_unix/gtm_logicals.h
index 812431d..df17349 100644
--- a/sr_unix/gtm_logicals.h
+++ b/sr_unix/gtm_logicals.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -115,6 +116,7 @@
 #define GTM_LINKTMPDIR			"$gtm_linktmpdir"
 #define	GTM_AUTORELINK_SHM 		"$gtm_autorelink_shm"
 #define	GTM_AUTORELINK_KEEPRTN		"$gtm_autorelink_keeprtn"	/* do not let go of objects in rtnobj shm */
+#define	GTM_AUTORELINK_CTLMAX		"$gtm_autorelink_ctlmax"
 
 /* Miscellaneous */
 #define GTM_ERROR_ON_JNL_FILE_LOST	"$gtm_error_on_jnl_file_lost"
diff --git a/sr_unix/gtm_permissions.c b/sr_unix/gtm_permissions.c
index 9fc30a3..bf2dc60 100644
--- a/sr_unix/gtm_permissions.c
+++ b/sr_unix/gtm_permissions.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,7 +11,7 @@
  ****************************************************************/
 
 #include "mdef.h"
-#include "eintr_wrappers.h"
+
 #include "gtm_string.h"
 #include "gtm_stdio.h"
 #include "gtm_stdlib.h"
@@ -19,9 +20,12 @@
 #include "gtm_fcntl.h"
 #include "gtm_stat.h"
 #include "gtm_pwd.h"
+
 #include <grp.h>
+
 #include "gtm_permissions.h"
 #include "send_msg.h"
+#include "eintr_wrappers.h"
 
 #if defined(__hpux) && defined(__hppa)
 #	define LIBGTMSHR "%s/libgtmshr.sl"
@@ -30,15 +34,24 @@
 #else
 #	define LIBGTMSHR "%s/libgtmshr.so"
 #endif
+
 /* Return the group id of the distribution based on libgtmshr.xx[x]. If there is some
-   problem accessing that file then return -1 which signals no change to group.  Otherwise,
-   the pointer to the stat buffer will contain the result of the call to STAT_FILE */
-int gtm_get_group_id(struct stat *stat_buff)
+ * problem accessing that file then return INVALID_GID which signals no change to group.  Otherwise,
+ * the pointer to the stat buffer will contain the result of the call to STAT_FILE.
+ */
+gid_t	gtm_get_group_id(struct stat *stat_buff)
 {
-	char		*env_var;
-	int		ret_stat;
-	char		temp[PATH_MAX + SIZEOF("libgtmshr.dll")];
+	char			*env_var;
+	int			ret_stat;
+	char			temp[PATH_MAX + SIZEOF("libgtmshr.dll")];
+	static boolean_t	first_time = TRUE;
+	static struct stat	st_buff;
 
+	if (!first_time)
+	{
+		*stat_buff = st_buff;
+		return st_buff.st_gid;
+	}
 	env_var = GETENV("gtm_dist");
 	if (NULL != env_var)
 	{
@@ -46,216 +59,216 @@ int gtm_get_group_id(struct stat *stat_buff)
 		SNPRINTF(temp, SIZEOF(temp), LIBGTMSHR, env_var);
 		STAT_FILE(temp, stat_buff, ret_stat);
 		if (0 == ret_stat)
+		{
+			first_time = FALSE;
+			st_buff = *stat_buff;
 			return(stat_buff->st_gid);
+		}
 	}
-	/* return a -1 if $gtm_dist found or if STAT_FILE returned a -1 */
-	return(-1);
+	/* return INVALID_GID if $gtm_dist found or if STAT_FILE returned a -1 */
+	return (INVALID_GID);
 }
 
-/* Return TRUE is the "uid" parameter is a member of the "gid" group parameter.
-   Return FALSE if it is not. */
-int gtm_member_group_id(int uid, int gid)
+/* Return TRUE if the "uid" parameter is a member of the "gid" group parameter.
+ * Return FALSE if it is not.
+ */
+int gtm_member_group_id(uid_t uid, gid_t gid)
 {
 	struct group	*grp;
-	struct passwd	*pwd, *pwd2;
+	struct passwd	*pwd;
 
-	/* check effective group if current effective uid */
+	/* Check effective group if current effective uid */
 	if ((GETEUID() == uid) && (GETEGID() == gid))
 		return(TRUE);
-	/* get group id for database */
-	grp = getgrgid(gid);
-	if (NULL == grp)
-		return(FALSE); 	/* if group id not found then assume uid not a member */
+	/* Get "uid" details */
 	pwd = getpwuid(uid);
 	if (NULL == pwd)
-		return(FALSE); 	/* if user id not found then assume uid not a member */
-	/* if the gid of the file is the same as the gid for the process uid we are done */
+		return(FALSE); 	/* If user id not found then assume uid not a member */
+	/* If the gid of the file is the same as the gid for the process uid we are done */
 	if (gid == pwd->pw_gid)
 		return(TRUE);
-	else
+	/* Else get "gid" details */
+	grp = getgrgid(gid);
+	if (NULL == grp)
+		return(FALSE); 	/* If group id not found then assume uid not a member */
+	/* Else we have to compare the name stored in pwd struct with the names of the group members in the group struct */
+	while (NULL != *(grp->gr_mem))
 	{
-		/*
-		 * Otherwise we have to compare the name stored in pwd struct
-		 * with the names of the group members in the group struct.
-		 */
-		while (NULL != *(grp->gr_mem))
-		{
-			if (!strcmp(pwd->pw_name, *(grp->gr_mem++)))
-				return(TRUE);
-		}
-
-		return(FALSE);
+		if (!strcmp(pwd->pw_name, *(grp->gr_mem++)))
+			return(TRUE);
 	}
+	return(FALSE);
 }
 
-/* Based on security rules in this routine, set *group_id of the group to be used
- * for shared resources, journals, and temp files.  If a no change then it will be set to -1.
- * Also, set *perm to the permissions to be used.  The precalculated world_write_perm (need to
- * change name to masked_permissions) is to be used in the one case indicated below.
- * If the user is root, the *user_id may be set to a target uid if needed; otherwise, it will
- * be set to -1.
- *
- * Populates pdd struct and returns negative value for error, returns non-negative for success.
+/* Based on security rules in this routine, set
+ *	a) *group_id to the group to be used for shared resources (journals, temp files etc.).
+ *		If no change, will be set to INVALID_GID.
+ *	b) *perm to the permissions to be used.
+ *	c) *user_id to the user id to be used.
+ *		If the user is root, *user_id may be set to a target uid if needed. Otherwise, it will be set to INVALID_UID.
  */
-int gtm_permissions(struct stat *stat_buff, int *user_id, int *group_id, int *perm, enum perm_target_types target_type,
-			   struct perm_diag_data *pdd)
+void	gtm_permissions(struct stat *stat_buff, int *user_id, int *group_id, int *perm, enum perm_target_types target_type)
 {
-	int		lib_gid = -1;
-	int		use_world_writeable;
-	uid_t		process_uid;
-	gid_t		process_gid;
-	uid_t		db_uid;
+	uid_t		this_uid, file_uid;
+	gid_t		this_gid, file_gid;
+	gid_t		gtm_dist_gid = INVALID_GID;
 	struct stat	dist_stat_buff;
-	int		opener_is_file_owner;
-	int		opener_is_root;
-	int		opener_in_file_group;
+	int		this_uid_is_file_owner;
+	int		this_uid_is_root;
+	int		this_uid_in_file_group;
 	int		owner_in_file_group;
 	int		gtm_group_restricted;
+	int		file_owner_perms, file_group_perms, file_other_perms;
+	int		new_owner_perms, new_group_perms, new_other_perms;
+	mode_t		st_mode;
 
-	/* get process_uid/gid */
-	process_uid = GETEUID();
-	process_gid = GETEGID();
-	/* get database uid */
-	db_uid = stat_buff->st_uid;
+	/* get this_uid/gid */
+	this_uid = GETEUID();
+	this_gid = GETEGID();
+	file_uid = stat_buff->st_uid;	/* get owning file uid */
+	file_gid = stat_buff->st_gid;	/* get owning file gid */
 	/* set variables for permission logic */
-	opener_is_file_owner = (process_uid == db_uid);
-	opener_is_root = (process_uid == 0);
-	opener_in_file_group = gtm_member_group_id(process_uid, stat_buff->st_gid);
-	owner_in_file_group = gtm_member_group_id(db_uid, stat_buff->st_gid);
-	/* find restricted group, if any */
-	lib_gid = gtm_get_group_id(&dist_stat_buff);
-	gtm_group_restricted = (lib_gid != -1) && !(dist_stat_buff.st_mode & 01);	/* not world executable */
-
-	/* set default gid */
-#ifdef __osf__
-	*user_id = process_uid;
-	*group_id = process_gid;
-#else
-	*user_id = -1;
-	*group_id = -1;
-#endif
-	/* set no permissions as a default in case none of our conditions match */
-	*perm = 0;
-
-	assertpro((PERM_FILE & target_type) || (PERM_IPC & target_type));
-	if (0006 & stat_buff->st_mode)
-	{
-		/* file is accessible to other */
-		if (opener_is_root)					/* otherwise, use default uid */
-			*user_id = stat_buff->st_uid;
-		if (opener_in_file_group || opener_is_root)		/* otherwise, use default gid */
-			*group_id = stat_buff->st_gid;
-		if (PERM_FILE & target_type)
-			*perm = (!opener_in_file_group && !opener_is_root && (0020 & stat_buff->st_mode))
-					? 0666 : (stat_buff->st_mode & 0666);
-		else if (PERM_IPC & target_type)
-			*perm = 0666;
-	} else if (0600 & stat_buff->st_mode && !(0066 & stat_buff->st_mode))
-	{
-		/* file is only user accessible */
-		/* use default group */
-		assert(opener_is_file_owner || opener_is_root);
-		if (opener_is_root)					/* otherwise, use default uid/gid */
+	this_uid_is_file_owner = (this_uid == file_uid);
+	this_uid_is_root = (0 == this_uid);
+	this_uid_in_file_group = gtm_member_group_id(this_uid, file_gid);
+	owner_in_file_group = gtm_member_group_id(file_uid, file_gid);
+	*user_id = INVALID_UID;		/* set default uid */
+	*group_id = INVALID_GID;	/* set default gid */
+	assert((PERM_FILE & target_type) || (PERM_IPC & target_type));	/* code below relies on this */
+	st_mode = stat_buff->st_mode;
+	/* General rule for permissions below. If target is a FILE (not an IPC, i.e. "(target_type & PERM_FILE) == TRUE",
+	 * and if "this_uid_is_file_owner" is FALSE but "this_uid_in_file_group" is TRUE, copy over group permissions of
+	 * source file into owner permissions of the target file. This ensures that the target file is accessible by the
+	 * new owner (who is governed by the owner permissions) as well as other members of the group owning the source
+	 * file (and in turn the target file).
+	 */
+	file_owner_perms = (0600 & st_mode);
+	file_group_perms = (0060 & st_mode);
+	if (file_owner_perms && !(0066 & st_mode))
+	{	/* File is only user accessible */
+		/* Use default group */
+		assert(this_uid_is_file_owner || this_uid_is_root);
+		if (this_uid_is_root)
 		{
-			*user_id = stat_buff->st_uid;
-			*group_id = stat_buff->st_gid;
+			*user_id = file_uid;
+			*group_id = file_gid;
 		}
-		if (PERM_FILE & target_type)
-			*perm = 0600;			/* read write for user */
-		else if (PERM_IPC & target_type)
-			*perm = 0600;			/* read write for user */
-	} else if (0060 & stat_buff->st_mode && !(0606 & stat_buff->st_mode))
-	{
-		/* file is only group accessible */
-		if (opener_is_root)					/* otherwise, use default uid */
-			*user_id = stat_buff->st_uid;
-		*group_id = stat_buff->st_gid;			/* use file group */
-		assert(opener_in_file_group || opener_is_root);
-		if (PERM_FILE & target_type)
-			*perm = stat_buff->st_mode & 0060;	/* use file permissions, masked for group read/write */
-		if (PERM_IPC & target_type)
-			*perm = 0660;			/* read/write for group - all readers need write for ipc */
-	} else
-	{
-		/* file is accessible to user and group */
-		if (opener_is_file_owner && opener_in_file_group || opener_is_root)
+		/* Else: use default uid/gid */
+		new_owner_perms = ((PERM_FILE & target_type) ? file_owner_perms : 0600);
+		*perm = new_owner_perms;	/* read and/or write for ONLY user and none for group/other */
+	} else if (file_group_perms && !(0606 & st_mode))
+	{	/* File is only group accessible */
+		if (this_uid_is_root)
+		{
+			*user_id = file_uid;
+			new_group_perms = ((PERM_FILE & target_type)) ? file_group_perms : 0060;
+			*perm = new_group_perms;
+		} else
 		{
-			if (opener_is_root)					/* otherwise, use default uid */
-				*user_id = stat_buff->st_uid;
-			*group_id = stat_buff->st_gid;		/* use file group */
+			/* No need to initialize *user_id. Use default uid instead. */
 			if (PERM_FILE & target_type)
-				*perm = stat_buff->st_mode & 0660;	/* use file permissions, masked for user/group read/write */
-			if (PERM_IPC & target_type)
-				*perm = 0660;			/* read/write for user/group - all readers need write for ipc */
+			{
+				new_owner_perms = (file_group_perms << 3);
+				new_group_perms = file_group_perms;
+			} else
+			{
+				new_owner_perms = 0600;
+				new_group_perms = 0060;
+			}
+			*perm = new_owner_perms | new_group_perms;
+		}
+		*group_id = file_gid;			/* use file group */
+		assert(this_uid_in_file_group || this_uid_is_root);
+	} else
+	{	/* File is other accessible OR accessible to user and group but not other */
+		file_other_perms = (0006 & st_mode);
+		if (PERM_IPC & target_type)
+		{
+			new_owner_perms = file_owner_perms ? 0600 : 0000;
+			new_group_perms = file_group_perms ? 0060 : 0000;
+			new_other_perms = file_other_perms ? 0006 : 0000;
 		} else
 		{
-			if (opener_is_file_owner && !opener_in_file_group)
+			new_owner_perms = file_owner_perms;
+			new_group_perms = file_group_perms;
+			new_other_perms = file_other_perms;
+		}
+		/* Find restricted group, if any */
+		gtm_dist_gid = gtm_get_group_id(&dist_stat_buff);
+		gtm_group_restricted = ((INVALID_GID != gtm_dist_gid) && !(dist_stat_buff.st_mode & 01)); /* not other executable */
+		if ((this_uid_is_file_owner && this_uid_in_file_group) || this_uid_is_root)
+		{
+			if (this_uid_is_root)		/* otherwise, use default uid */
+				*user_id = file_uid;
+			*group_id = file_gid;		/* use file group */
+			*perm = new_owner_perms | new_group_perms | new_other_perms;
+		} else if (this_uid_is_file_owner)
+		{	/* This uid has access via file owner membership but is not a member of the file group */
+			assert(!this_uid_in_file_group);
+			/* Since there could be userids that are members of the file group as well as the new group,
+			 * one needs to keep the existing group permissions while setting up the new group permissions.
+			 */
+			new_group_perms = (new_group_perms | (new_other_perms << 3));
+			if (gtm_group_restricted)
 			{
-				if (gtm_group_restricted)
-				{
-					*group_id = lib_gid;			/* use restricted group */
-					assert(gtm_member_group_id(process_uid, *group_id));
-					if (PERM_FILE & target_type)
-						*perm = 0660;			/* user/group read/write */
-					if (PERM_IPC & target_type)
-						*perm = 0660;	/* read/write for user/group - all readers need write for ipc */
-				} else
-				{
-					/* use default group */
-					if (PERM_FILE & target_type)
-						*perm = 0666;			/* read/write for all */
-					else if (PERM_IPC & target_type)
-						*perm = 0666;	/* read/write for all - all readers need write for ipc */
-				}
-			} else if (!opener_is_file_owner && opener_in_file_group)
+				assert(gtm_member_group_id(this_uid, gtm_dist_gid));
+				*group_id = gtm_dist_gid;	/* use restricted group */
+				*perm = new_owner_perms | new_group_perms;
+			} else
 			{
-				/* opener has access either via file group membership */
-				if (owner_in_file_group)
-				{
-					*group_id = stat_buff->st_gid;		/* use file group */
-					if (PERM_FILE & target_type)
-						*perm = stat_buff->st_mode & 0660;	/* use masked file permissions */
-					if (PERM_IPC & target_type)
-						*perm = 0660;	/* read/write for user/group - all readers need write for ipc */
-
-				} else if (gtm_group_restricted)
+				/* No need to set *group_id. Use default group.
+				 * But because file owner is not part of the file group, transfer group permissions of
+				 * file to "other" when creating the new file so members of the file group (that are not
+				 * part of the default group of the file owner) can still access the new file with same
+				 * permissions as the source file. And transfer other permissions of file to "group" when
+				 * creating the new file for similar reasons. Note that it is possible for userids to exist
+				 * that are part of the file group and the default group of the file owner. For those userids,
+				 * we need to ensure the group permissions of the new file stay same as source file. Therefore
+				 * we need the new group and other permissions to be a bitwise OR of the old group and other.
+				 */
+				assert(file_owner_perms);
+				new_other_perms = new_group_perms >> 3;
+				*perm = new_owner_perms | new_group_perms | new_other_perms;
+			}
+		} else
+		{	/* This uid has access via file group OR file other membership */
+			/* Use default uid in all cases below */
+			if (this_uid_in_file_group && owner_in_file_group)
+			{
+				*group_id = file_gid;		/* use file group */
+				assert(file_group_perms);
+				new_owner_perms = new_group_perms << 3;
+				*perm = new_owner_perms | new_group_perms | new_other_perms;
+			} else if (gtm_group_restricted)
+			{
+				assert(gtm_member_group_id(this_uid, gtm_dist_gid));
+				*group_id = gtm_dist_gid;	/* use restricted group */
+				new_group_perms = (new_group_perms | (new_other_perms << 3));
+				new_owner_perms = this_uid_in_file_group ? (new_group_perms << 3) : (new_other_perms << 6);
+				*perm = new_owner_perms | new_group_perms;
+			} else
+			{
+				if (this_uid_in_file_group)
 				{
-					*group_id = lib_gid;			/* use restricted group */
-					assert(gtm_member_group_id(process_uid, *group_id));
-					if (PERM_FILE & target_type)
-						*perm = 0660;			/* user/group read/write */
-					if (PERM_IPC & target_type)
-						*perm = 0660;	/* read/write for user/group - all readers need write for ipc */
+					*group_id = file_gid;		/* use file group */
+					/* Since owner_in_file_group is FALSE, we need to make sure owner permissions
+					 * are transferred to "other" in the new file.
+					 */
+					new_other_perms |= (new_owner_perms >> 6);
+					new_owner_perms = new_group_perms << 3;
 				} else
 				{
-					*group_id = stat_buff->st_gid;		/* use file group */
-					if (PERM_FILE & target_type)
-						*perm = 0666;	/* read/write for all - ensure file owner read/write access */
-					else if (PERM_IPC & target_type)
-						*perm = 0666;	/* read/write for all - all readers need write for ipc */
+					/* Use default group */
+					new_owner_perms = (new_other_perms << 6);
+					new_group_perms = (new_group_perms | (new_other_perms << 3));
+					new_other_perms = new_group_perms >> 3;
 				}
+				*perm = new_owner_perms | new_group_perms | new_other_perms;
 			}
 		}
 	}
-
 	if (target_type & PERM_EXEC)
 		*perm |= ((*perm & 0444) >> 2);	/* Grab the read bits, shift them to the exec bit position, and add them back in. */
-
-	/* if we never set *perm, return error value */
-	if (*perm == 0)
-	{
-		/* populate perm diag data */
-		pdd->process_uid = process_uid;
-		pdd->process_gid = process_gid;
-		pdd->file_uid = stat_buff->st_uid;
-		pdd->file_gid = stat_buff->st_gid;
-		SNPRINTF(pdd->file_perm, SIZEOF(pdd->file_perm), "%04o", stat_buff->st_mode & 07777);
-		pdd->lib_gid = dist_stat_buff.st_gid;
-		SNPRINTF(pdd->lib_perm, SIZEOF(pdd->lib_perm), "%04o", dist_stat_buff.st_mode & 07777);
-		pdd->opener_in_file_group = opener_in_file_group;
-		pdd->owner_in_file_group = owner_in_file_group;
-
-		return -1;
-	} else
-		return 0;
+	assert(*perm);
+	return;
 }
diff --git a/sr_unix/gtm_permissions.h b/sr_unix/gtm_permissions.h
index 91a9e70..8e855cb 100644
--- a/sr_unix/gtm_permissions.h
+++ b/sr_unix/gtm_permissions.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,37 +17,13 @@
 
 enum perm_target_types
 {
-    PERM_FILE = 0x01,			/* request permissions for creating a new file */
-    PERM_IPC  = 0x02,			/* request permissions for initializing IPCs (shm/sem) */
-    PERM_EXEC = 0x80			/* request execute permissions, masked with the above */
+    PERM_FILE = 0x01,			/* Request permissions for creating a new file */
+    PERM_IPC  = 0x02,			/* Request permissions for initializing IPCs (shm/sem) */
+    PERM_EXEC = 0x04			/* Request execute permissions, masked with the above. Currently only used with PERM_IPC */
 };
 
-struct perm_diag_data
-{
-	uid_t	process_uid;
-	gid_t	process_gid;
-	uid_t	file_uid;
-	gid_t	file_gid;
-	char	file_perm[12];
-	gid_t	lib_gid;
-	char	lib_perm[12];
-	int	opener_in_file_group;
-	int	owner_in_file_group;
-};
-
-error_def(ERR_PERMGENDIAG);
-
-#define PERMGENDIAG_ARGS(pdd)									\
-		ERR_PERMGENDIAG, 11,								\
-		(pdd).process_uid, (pdd).process_gid,						\
-		(pdd).file_uid, (pdd).file_gid, RTS_ERROR_STRING((pdd).file_perm),		\
-		(pdd).lib_gid, RTS_ERROR_STRING((pdd).lib_perm),				\
-		(pdd).opener_in_file_group, (pdd).owner_in_file_group
-#define PERMGENDIAG_ARG_COUNT	(13)
-
-int gtm_get_group_id(struct stat *stat_buff);
-int gtm_member_group_id(int uid, int gid);
-int gtm_permissions(struct stat *stat_buff, int *user_id, int *group_id, int *perm, enum perm_target_types target_type,
-			struct perm_diag_data *pdd);
+gid_t	gtm_get_group_id(struct stat *stat_buff);
+int	gtm_member_group_id(uid_t uid, gid_t gid);
+void	gtm_permissions(struct stat *stat_buff, int *user_id, int *group_id, int *perm, enum perm_target_types target_type);
 
 #endif /* GTM_PERMISSIONS */
diff --git a/sr_unix/gtm_putmsg_list.c b/sr_unix/gtm_putmsg_list.c
index f17fab5..47db002 100644
--- a/sr_unix/gtm_putmsg_list.c
+++ b/sr_unix/gtm_putmsg_list.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,8 +31,6 @@
 #include "filestruct.h"
 #include "anticipatory_freeze.h"	/* for SET_ANTICIPATORY_FREEZE_IF_NEEDED */
 
-GBLREF	boolean_t	donot_fflush_NULL;
-
 /*
  * ----------------------------------------------------------------------------------------
  *  WARNING:	For chained error messages, all messages MUST be followed by an fao count;
@@ -50,17 +49,9 @@ void gtm_putmsg_list(void *csa, int arg_count, va_list var)
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
-	/* Before starting to write to stderr, make sure all other buffered streams are flushed.
-	 * This way we avoid out-of-order logging issues with multiple streams mapping to the same file
-	 * e.g. stdout/stderr could both end up in the same file. We do this now only for the utilities
-	 * (and not mumps) since the implications of that change (is it safe or not) are not yet clear.
-	 */
 	if (!IS_GTMSECSHR_IMAGE)
 	{	/* Note gtmsecshr does no stdout/stderr IO - everything goes to operator log so this doesn't apply */
-		if (!IS_GTM_IMAGE && !donot_fflush_NULL)
-			FFLUSH(NULL);
 		util_out_print(NULL, RESET);
-		flush_pio();
 	}
 	assert(0 < arg_count);
 	for (; ; )
diff --git a/sr_unix/gtm_startup.c b/sr_unix/gtm_startup.c
index 5d674b4..6e5cae1 100644
--- a/sr_unix/gtm_startup.c
+++ b/sr_unix/gtm_startup.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -156,6 +157,7 @@ void gtm_startup(struct startup_vector *svec)
 	int		i;
 	static char 	other_mode_buf[] = "OTHER";
 	mstr		log_name;
+	stack_frame 	*frame_pointer_lcl;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -222,22 +224,19 @@ void gtm_startup(struct startup_vector *svec)
 	cmd_qlf.qlf = glb_cmd_qlf.qlf;
 	cache_init();
 	msp -= SIZEOF(stack_frame);
-	frame_pointer = (stack_frame *)msp;
-	memset(frame_pointer,0, SIZEOF(stack_frame));
-	frame_pointer->temps_ptr = (unsigned char *)frame_pointer;
-	frame_pointer->ctxt = GTM_CONTEXT(gtm_ret_code);
-	frame_pointer->mpc = CODE_ADDRESS(gtm_ret_code);
-	frame_pointer->type = SFT_COUNT;
-	frame_pointer->rvector = (rhdtyp*)malloc(SIZEOF(rhdtyp));
-	memset(frame_pointer->rvector, 0, SIZEOF(rhdtyp));
+	frame_pointer_lcl = (stack_frame *)msp;
+	memset(frame_pointer_lcl, 0, SIZEOF(stack_frame));
+	frame_pointer_lcl->temps_ptr = (unsigned char *)frame_pointer_lcl;
+	frame_pointer_lcl->ctxt = GTM_CONTEXT(gtm_ret_code);
+	frame_pointer_lcl->mpc = CODE_ADDRESS(gtm_ret_code);
+	frame_pointer_lcl->type = SFT_COUNT;
+	frame_pointer_lcl->rvector = (rhdtyp *)malloc(SIZEOF(rhdtyp));
+	memset(frame_pointer_lcl->rvector, 0, SIZEOF(rhdtyp));
+	frame_pointer = frame_pointer_lcl;
 	symbinit();
 	/* Variables for supporting $ZSEARCH sorting and wildcard expansion */
 	TREF(zsearch_var) = lv_getslot(curr_symval);
-	TREF(zsearch_dir1) = lv_getslot(curr_symval);
-	TREF(zsearch_dir2) = lv_getslot(curr_symval);
 	LVVAL_INIT((TREF(zsearch_var)), curr_symval);
-	LVVAL_INIT((TREF(zsearch_dir1)), curr_symval);
-	LVVAL_INIT((TREF(zsearch_dir2)), curr_symval);
 	/* Initialize global pointer to control-C handler. Also used in iott_use */
 	ctrlc_handler_ptr = &ctrlc_handler;
 	if (!IS_MUPIP_IMAGE)
diff --git a/sr_unix/gtm_test_install.csh b/sr_unix/gtm_test_install.csh
index 532116e..344127f 100644
--- a/sr_unix/gtm_test_install.csh
+++ b/sr_unix/gtm_test_install.csh
@@ -1,7 +1,8 @@
 #!/usr/local/bin/tcsh
 #################################################################
 #								#
-#	Copyright 2011, 2014 Fidelity Information Services, Inc       #
+# Copyright (c) 2011-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -117,7 +118,7 @@ foreach libpath ($library_path)
 		# Find the actual version'ed library to which libicuio.{so,sl,a} points to
 		set icu_versioned_lib = `ls -l $libpath/libicuio$icu_ext | awk '{print $NF}'`
 		# Find out vital parameters
-		if ( "$arch" == "ibm" || "$arch" == "zos" ) then
+		if ( "$arch" == "ibm" ) then
 			# From the version'ed library(eg. libicuio36.0.a) extract out
 			# 36.0.a
 			set full_icu_ver_string = `echo $icu_versioned_lib | sed 's/libicuio//g'`
@@ -147,9 +148,6 @@ foreach libpath ($library_path)
 		else if ( "ibm" == "$arch" ) then
 			set icu_full_ver_lib = `sh -c "ls -l $libpath/libicuio$majmin$icu_ext 2>/dev/null" | awk '{print $NF}'`
 			set is64bit_icu = `sh -c "nm -X64 $libpath/$icu_full_ver_lib 2>/dev/null | head -n 1 | wc -l"`
-		else if ( "zos" == "$arch" ) then
-			set icu_full_ver_lib = `sh -c "ls -l $libpath/libicuio$majmin$icu_ext 2>/dev/null" | awk '{print $NF}'`
-			set is64bit_icu = `sh -c "file $libpath/$icu_full_ver_lib 2>/dev/null | grep "amode=64" | wc -l"`
 		endif
 		# Make sure both GTM and ICU are in sync with object mode compatibility (eg both are 32 bit/64 bit)
 		if ( ( "$is64bit_gtm" == 1 ) && ( "$is64bit_icu" != 0 ) ) then
@@ -198,12 +196,8 @@ if ( -d utf8) then
 	setenv LD_LIBRARY_PATH $libpath
 	setenv LIBPATH $libpath
 	setenv gtm_chset utf-8
-	set utflocale = `locale -a | grep -i en_us | grep -i utf | sed 's/.lp64$//' | grep '8$' | head -n 1`
-	if ( "OS/390" == `uname` ) then
-		setenv gtm_chset_locale $utflocale
-	else
-		setenv LC_ALL $utflocale
-	endif
+	set utflocale = `locale -a | grep -iE '\.utf.?8$' | head -n1`
+	setenv LC_ALL $utflocale
 
 gtm << EOF						>>&! gtm_test_install.out
 write \$zchset
diff --git a/sr_x86_64/call_dm.s b/sr_unix/gtm_threadgbl_asm_access.txt
similarity index 54%
copy from sr_x86_64/call_dm.s
copy to sr_unix/gtm_threadgbl_asm_access.txt
index 37133f7..d26bb23 100644
--- a/sr_x86_64/call_dm.s
+++ b/sr_unix/gtm_threadgbl_asm_access.txt
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+#  Copyright (c) 2014, 2015 Fidelity National Information	#
+#  Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,23 +9,7 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
-
-#	PAGE	,132
-	.title	call_dm.s
-	.sbttl	call_dm
-.include "g_msf.si"
-.include "linkage.si"
-
-	.DATA
-	.text
-.extern	op_oldvar
-.extern	opp_dmode
-
-# PUBLIC	call_dm
-# call_dm	PROC
-ENTRY call_dm
-l1:	call	opp_dmode
-	call	op_oldvar
-	jmp	l1
-	ret
-# END
+#
+# List of threadgbl variables needing access in assembler routines. One routine per line - no white space prefix.
+#
+lnk_proxy		# pseudo-linkage table used by dynamic code when label index is < 0
diff --git a/sr_unix/gtm_tls.c b/sr_unix/gtm_tls.c
index e07eb87..b738958 100644
--- a/sr_unix/gtm_tls.c
+++ b/sr_unix/gtm_tls.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -157,3 +158,23 @@ void			intrsafe_gtm_tls_fini(gtm_tls_ctx_t **ctx)
 	ENABLE_INTERRUPTS(INTRPT_IN_TLS_FUNCTION);
 }
 
+int			intrsafe_gtm_tls_store_passwd(gtm_tls_ctx_t *tls_ctx, const char *tlsid, const char *obs_passwd)
+{
+	int		rv;
+
+	DEFER_INTERRUPTS(INTRPT_IN_TLS_FUNCTION);
+	rv = (*gtm_tls_store_passwd_fptr)(tls_ctx, tlsid, obs_passwd);
+	ENABLE_INTERRUPTS(INTRPT_IN_TLS_FUNCTION);
+	return rv;
+}
+
+int			intrsafe_gtm_tls_add_config(gtm_tls_ctx_t *tls_ctx, const char *idstr, const char *configstr)
+{
+	int		rv;
+
+	DEFER_INTERRUPTS(INTRPT_IN_TLS_FUNCTION);
+	rv = (*gtm_tls_add_config_fptr)(tls_ctx, idstr, configstr);
+	ENABLE_INTERRUPTS(INTRPT_IN_TLS_FUNCTION);
+	return rv;
+}
+
diff --git a/sr_unix/gtm_tls.h b/sr_unix/gtm_tls.h
index d68e183..cc1c87e 100644
--- a/sr_unix/gtm_tls.h
+++ b/sr_unix/gtm_tls.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -27,6 +28,8 @@
 #define gtm_tls_socket_close		(*gtm_tls_socket_close_fptr)
 #define gtm_tls_session_close		(*gtm_tls_session_close_fptr)
 #define gtm_tls_fini			(*gtm_tls_fini_fptr)
+#define gtm_tls_store_passwd		(*gtm_tls_store_passwd_fptr)
+#define gtm_tls_add_config		(*gtm_tls_add_config_fptr)
 
 /* It's important that the "gtm_tls_interface.h" include should be *after* the above macro definitions. This way, the function
  * prototypes defined in the header file will automatically be expanded to function pointers saving us the trouble of explicitly
@@ -49,6 +52,8 @@
 #undef gtm_tls_socket_close
 #undef gtm_tls_session_close
 #undef gtm_tls_fini
+#undef gtm_tls_store_passwd
+#undef gtm_tls_add_config
 
 /* Now, we need to define prototypes for wrapper functions that will be defined in GT.M to defer interrupts before invoking the
  * corresponding TLS function. But, to avoid redefining the prototypes, include the gtm_tls_interface.h once again to automatically
@@ -69,6 +74,8 @@
 #define gtm_tls_socket_close		intrsafe_gtm_tls_socket_close
 #define gtm_tls_session_close		intrsafe_gtm_tls_session_close
 #define gtm_tls_fini			intrsafe_gtm_tls_fini
+#define gtm_tls_store_passwd		intrsafe_gtm_tls_store_passwd
+#define gtm_tls_add_config		intrsafe_gtm_tls_add_config
 
 #undef GTM_TLS_INTERFACE_H	/* Allows us to include gtm_tls_interface.h twice. */
 #include "gtm_tls_interface.h"	/* BYPASSOK : intentional duplicate include. */
diff --git a/sr_unix/gtm_tls_funclist.h b/sr_unix/gtm_tls_funclist.h
index 70b442a..79762ee 100644
--- a/sr_unix/gtm_tls_funclist.h
+++ b/sr_unix/gtm_tls_funclist.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -28,3 +29,5 @@ TLS_DEF(gtm_tls_cachedbytes)
 TLS_DEF(gtm_tls_socket_close)
 TLS_DEF(gtm_tls_session_close)
 TLS_DEF(gtm_tls_fini)
+TLS_DEF(gtm_tls_store_passwd)
+TLS_DEF(gtm_tls_add_config)
diff --git a/sr_unix/gtm_tls_impl.c b/sr_unix/gtm_tls_impl.c
index 10e53c5..8640dc7 100644
--- a/sr_unix/gtm_tls_impl.c
+++ b/sr_unix/gtm_tls_impl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -36,12 +37,23 @@
 #include "gtm_tls_impl.h"
 
 GBLDEF	int			tls_errno;
-GBLDEF	config_t		gtm_tls_cfg;
 GBLDEF	gtmtls_passwd_list_t	*gtmtls_passwd_listhead;
 
+STATICDEF	config_t	gtm_tls_cfg;
 STATICDEF DH			*dh512, *dh1024;	/* Diffie-Hellman structures for Ephemeral Diffie-Hellman key exchange. */
 
 #define MAX_CONFIG_LOOKUP_PATHLEN	64
+#define GTMTLS_RENEGOTIATE_NO_HANDSHAKE
+
+/* Older, but still commonly used, OpenSSL versions don't have macros for TLSv1.1 and TLSv1.2 versions.
+ * They are hard coded to 0x0302 and 0x0303 respectively. So, define them here for use in gtm_tls_get_conn_info.
+*/
+#ifndef TLS1_1_VERSION
+#define	TLS1_1_VERSION	0x0302
+#endif
+#ifndef TLS1_2_VERSION
+#define	TLS1_2_VERSION	0x0303
+#endif
 
 /* Below template translates to: Arrange ciphers in increasing order of strength after excluding the following:
  * ADH: Anonymous Diffie-Hellman Key Exchange (Since we want both encryption and authentication and ADH provides only former).
@@ -50,6 +62,7 @@ STATICDEF DH			*dh512, *dh1024;	/* Diffie-Hellman structures for Ephemeral Diffi
  * MD5 : MD5 message digest.
  */
 #define REPL_CIPHER_LIST			"ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
+#define GTM_DEFAULT_CIPHER_LIST			"DEFAULT:!SRP"
 
 #define OPTIONEND ':'
 #define OPTIONENDSTR ":"
@@ -178,9 +191,9 @@ STATICDEF struct gtm_ssl_options gtm_ssl_options_list[] =
 	{NULL, 0}
 };
 
-STATICDEF long parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_table_size, const char *options, long current,
+STATICFNDEF char *parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_table_size, const char *options, long *current,
 					long *clear);
-STATICDEF long parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_table_size, const char *options, long current,
+STATICFNDEF char *parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_table_size, const char *options, long *current,
 					long *clear)
 {
 	int		negate;
@@ -191,7 +204,7 @@ STATICDEF long parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_t
 	if (NULL == options)
 		return 0;
 	negate = 0;
-	bitmask = current;
+	bitmask = *current;
 	num_options = opt_table_size/SIZEOF(struct gtm_ssl_options);
 	for (charptr = options; *charptr; charptr = optionend)
 	{
@@ -212,7 +225,8 @@ STATICDEF long parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_t
 		{
 			if (NULL == opt_table[index].opt_str)
 				break;
-			if (0 == strncmp(opt_table[index].opt_str, charptr, optionlen))
+			if ((optionlen == strlen(opt_table[index].opt_str))
+				&& (0 == strncmp(opt_table[index].opt_str, charptr, optionlen)))
 			{
 				if (negate)
 				{
@@ -224,10 +238,11 @@ STATICDEF long parse_SSL_options(struct gtm_ssl_options *opt_table, size_t opt_t
 				break;
 			}
 		}
-		if (num_options <= index)
-			;	/* option not found - ignore */
+		if ((num_options - 1) <= index)		/* last option is NULL */
+			return (char *)charptr;	/* option not known */
 	}
-	return bitmask;
+	*current = bitmask;
+	return NULL;
 }
 
 #ifdef DEBUG_SSL
@@ -427,18 +442,23 @@ const char *gtm_tls_get_error(void)
 gtm_tls_ctx_t *gtm_tls_init(int version, int flags)
 {
 	const char		*CAfile = NULL, *CApath = NULL, *crl, *CAptr, *cipher_list, *options_string, *verify_mode_string;
-	char			*config_env;
-	int			rv, rv1, rv2, fips_requested, fips_enabled, verify_mode;
+	char			*config_env, *parse_ptr, *optionendptr;
+	int			rv, rv1, rv2, fips_requested, fips_enabled, verify_mode, parse_len;
 #	if (((LIBCONFIG_VER_MAJOR == 1) && (LIBCONFIG_VER_MINOR >= 4)) || (LIBCONFIG_VER_MAJOR > 1))
 	int			verify_depth, session_timeout;
 #	else
 	long int		verify_depth, session_timeout;
 #	endif
-	long			options_mask, options_current, options_clear;
+	long			options_mask, options_current, options_clear, verify_long;
 	SSL_CTX			*ctx;
 	X509_STORE		*store;
 	X509_LOOKUP		*lookup;
 	config_t		*cfg;
+#	if OPENSSL_VERSION_NUMBER < 0x009080dfL
+	unsigned int            cfg_line;
+	const char              *cfg_file;
+	config_setting_t        *cfg_setting;
+#	endif
 	gtm_tls_ctx_t		*gtm_tls_ctx;
 
 	assert(GTM_TLS_API_VERSION >= version); /* Make sure the caller is using the right API version */
@@ -469,15 +489,18 @@ gtm_tls_ctx_t *gtm_tls_init(int version, int flags)
 	}
 	SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
 	/* Read the configuration file for more configuration parameters. */
-	if (NULL == (config_env = getenv("gtmcrypt_config")))
-	{
-		UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, "gtmcrypt_config");
-		SSL_CTX_free(ctx);
-		return NULL;
-	}
 	cfg = &gtm_tls_cfg;
 	config_init(cfg);
-	if (!config_read_file(cfg, config_env))
+	if (NULL == (config_env = getenv("gtmcrypt_config")))
+	{
+		if (!(GTMTLS_OP_INTERACTIVE_MODE & flags))
+		{	/* allow no config file if interactive for simple client usage */
+			UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, "gtmcrypt_config");
+			SSL_CTX_free(ctx);
+			return NULL;
+		} else
+			flags |= GTMTLS_OP_ABSENT_CONFIG;
+	} else if (!config_read_file(cfg, config_env))
 	{
 		UPDATE_ERROR_STRING("Failed to read config file: %s. At line: %d, %s.", config_env, config_error_line(cfg),
 						config_error_text(cfg));
@@ -490,8 +513,22 @@ gtm_tls_ctx_t *gtm_tls_init(int version, int flags)
 		SSL_CTX_set_verify_depth(ctx, verify_depth);
 	if (CONFIG_TRUE == config_lookup_string(cfg, "tls.verify-mode", &verify_mode_string))
 	{
-		verify_mode = (int)parse_SSL_options(&gtm_ssl_verify_mode_list[0], SIZEOF(gtm_ssl_verify_mode_list),
-					verify_mode_string, (long)0, NULL);
+		verify_long = 0;
+		parse_ptr = parse_SSL_options(&gtm_ssl_verify_mode_list[0], SIZEOF(gtm_ssl_verify_mode_list),
+					verify_mode_string, &verify_long, NULL);
+		if (NULL != parse_ptr)
+		{
+			optionendptr = strstr((const char *)parse_ptr, OPTIONENDSTR);
+			if (NULL == optionendptr)
+				parse_len = strlen(parse_ptr);
+			else
+				parse_len = optionendptr - parse_ptr;
+			UPDATE_ERROR_STRING("Unknown verify-mode option: %.*s", parse_len, parse_ptr);
+			SSL_CTX_free(ctx);
+			config_destroy(cfg);
+			return NULL;
+		}
+		verify_mode = (int)verify_long;
 		SSL_CTX_set_verify(ctx, verify_mode, NULL);
 	} else
 		flags |= GTMTLS_OP_ABSENT_VERIFYMODE;
@@ -573,14 +610,39 @@ gtm_tls_ctx_t *gtm_tls_init(int version, int flags)
 	}	/* use OpenSSL default */
 	if (CONFIG_TRUE == config_lookup_string(cfg, "tls.ssl-options", &options_string))
 	{
-		options_current = SSL_CTX_get_options(ctx);
+		options_mask = options_current = SSL_CTX_get_options(ctx);
 		options_clear = 0;
-		options_mask = parse_SSL_options(&gtm_ssl_options_list[0], SIZEOF(gtm_ssl_options_list), options_string,
-					options_current, &options_clear);
-		if (0 != options_mask)
+		parse_ptr = parse_SSL_options(&gtm_ssl_options_list[0], SIZEOF(gtm_ssl_options_list), options_string,
+					&options_mask, &options_clear);
+		if (NULL != parse_ptr)
+		{
+			optionendptr = strstr((const char *)parse_ptr, OPTIONENDSTR);
+			if (NULL == optionendptr)
+				parse_len = strlen(parse_ptr);
+			else
+				parse_len = optionendptr - parse_ptr;
+			UPDATE_ERROR_STRING("Unknown ssl-options option: %.*s", parse_len, parse_ptr);
+			SSL_CTX_free(ctx);
+			config_destroy(cfg);
+			return NULL;
+		}
+		if (options_current != options_mask)
 			options_mask = SSL_CTX_set_options(ctx, options_mask);
 		if (0 != options_clear)
+#		if OPENSSL_VERSION_NUMBER >= 0x009080dfL
 			options_mask = SSL_CTX_clear_options(ctx, options_clear);
+#		else
+		{	/* clear_options first in OpenSSL 0.9.8m */
+			cfg_setting = config_lookup(cfg, "tls.ssl-options");
+			cfg_file = config_setting_source_file(cfg_setting);
+			cfg_line = config_setting_source_line(cfg_setting);
+			UPDATE_ERROR_STRING("Unable to negate values in %s - need OpenSSL 0.9.8m or newer in %s line %d",
+				"tls.ssl-options", cfg_file, cfg_line, "tls.ssl-options");
+			SSL_CTX_free(ctx);
+			config_destroy(cfg);
+			return NULL;
+		}
+#		endif
 	}
 	gtm_tls_ctx = MALLOC(SIZEOF(gtm_tls_ctx_t));
 	gtm_tls_ctx->ctx = ctx;
@@ -596,6 +658,71 @@ gtm_tls_ctx_t *gtm_tls_init(int version, int flags)
 	return gtm_tls_ctx;
 }
 
+STATICFNDEF gtmtls_passwd_list_t *gtm_tls_find_pwent(const char *input_env_name)
+{
+	gtmtls_passwd_list_t	*pwent_node;
+	char			*env_name_ptr;
+	int			len, inputlen;
+
+	inputlen = STRLEN(input_env_name);
+	for (pwent_node = gtmtls_passwd_listhead; NULL != pwent_node; pwent_node = pwent_node->next)
+	{	/* Lookup to see if we already have a password for the tlsid. */
+		env_name_ptr = pwent_node->pwent->env_name;
+		len = STRLEN(env_name_ptr);
+		assert(len < PASSPHRASE_ENVNAME_MAX);
+		assert(len > SIZEOF(GTMTLS_PASSWD_ENV_PREFIX) - 1);
+		if ((len == inputlen) && (0 == strcmp(input_env_name, env_name_ptr)))
+			break;	/* We already have a password for the tlsid. */
+	}
+	return pwent_node;
+}
+
+int gtm_tls_store_passwd(gtm_tls_ctx_t *tls_ctx, const char *tlsid, const char *obs_passwd)
+{
+	char			*env_name_ptr, env_name[PASSPHRASE_ENVNAME_MAX];
+	int			env_name_len, obs_len;
+	gtmtls_passwd_list_t	*pwent_node;
+	passwd_entry_t		*pwent;
+
+	assert(tls_ctx);
+	if (!(GTMTLS_OP_INTERACTIVE_MODE & tls_ctx->flags))
+		return 0;	/* Not running in an interactive mode. */
+	assert(NULL != tlsid);
+	env_name_len = STRLEN(tlsid);
+	assert(0 < env_name_len);
+	assert(PASSPHRASE_ENVNAME_MAX >= ((SIZEOF(GTMTLS_PASSWD_ENV_PREFIX) - 1) + env_name_len));
+	assert(PASSPHRASE_ENVNAME_MAX > env_name_len);
+	env_name_ptr = env_name;
+	strcpy(env_name_ptr, GTMTLS_PASSWD_ENV_PREFIX);
+	env_name_ptr += (SIZEOF(GTMTLS_PASSWD_ENV_PREFIX) - 1);
+	strncpy(env_name_ptr, tlsid, (PASSPHRASE_ENVNAME_MAX - (SIZEOF(GTMTLS_PASSWD_ENV_PREFIX) - 1)));
+	env_name[PASSPHRASE_ENVNAME_MAX - 1] = '\0';
+	obs_len = STRLEN(obs_passwd);
+	pwent_node = gtm_tls_find_pwent(env_name);
+	if (NULL != pwent_node)
+	{
+		pwent = pwent_node->pwent;
+		if ((obs_len == (pwent->passwd_len * 2)) && (0 == strncmp(obs_passwd, pwent->passwd, obs_len)))
+			return 1;	/* already on the list */
+	}
+	/* Either no entry for tlsid or need to replace with new value */
+	pwent = MALLOC(SIZEOF(passwd_entry_t));
+	strcpy(pwent->env_name, env_name);
+	pwent->env_value = MALLOC(obs_len + 1);
+	memcpy(pwent->env_value, obs_passwd, obs_len + 1);	/* include null */
+	pwent->passwd = NULL;
+	pwent->passwd_len = 0;
+	if (0 == gc_update_passwd(pwent->env_name, &pwent, NULL, GTMTLS_OP_NOPWDENVVAR))
+	{
+		pwent_node = MALLOC(SIZEOF(gtmtls_passwd_list_t));
+		pwent_node->next = gtmtls_passwd_listhead;
+		pwent_node->pwent = pwent;
+		gtmtls_passwd_listhead = pwent_node;
+	} else
+		return -1;		/* gc_update_passwd freed pwent */
+	return 1;
+}
+
 void gtm_tls_prefetch_passwd(gtm_tls_ctx_t *tls_ctx, char *env_name)
 {
 	char			*env_name_ptr, *env_value, prompt[GTM_PASSPHRASE_MAX_ASCII + 1];
@@ -623,10 +750,110 @@ void gtm_tls_prefetch_passwd(gtm_tls_ctx_t *tls_ctx, char *env_name)
 	 */
 }
 
+static int copy_tlsid_elem(const config_t *tmpcfg, config_t *cfg, config_setting_t *tlsid, const char *idstr, const char *elemname,
+				int type);
+static int copy_tlsid_elem(const config_t *tmpcfg, config_t *cfg, config_setting_t *tlsid, const char *idstr, const char *elemname,
+				int type)
+{
+	config_setting_t	*srcelem, *elem;
+	char			cfg_path[MAX_CONFIG_LOOKUP_PATHLEN];
+
+	SNPRINTF(cfg_path, MAX_CONFIG_LOOKUP_PATHLEN, "tls.%s.%s", idstr, elemname);
+	if (srcelem = config_lookup(tmpcfg, cfg_path))
+	{
+		elem = config_lookup(cfg, cfg_path);
+		if (NULL == elem)
+		{	/* option not currently in tls.idstr so create */
+			elem = config_setting_add(tlsid, elemname, type);
+			if (NULL == elem)
+			{
+				UPDATE_ERROR_STRING("Failed to add TLSID: %s item %s to config file: %s", idstr, elemname,
+					config_error_text(cfg));
+				return -1;
+			}
+		}
+		if (CONFIG_TYPE_STRING == type)
+			config_setting_set_string(elem, config_setting_get_string(srcelem));
+		else if (CONFIG_TYPE_INT == type)
+		{
+			config_setting_set_int(elem, config_setting_get_int(srcelem));
+			config_setting_set_format(elem, config_setting_get_format(srcelem));
+		} else
+		if (NULL == elem)
+		{
+			UPDATE_ERROR_STRING("gtm_tls_impl.c/copy_tlsid_elem:  Unexpected CONFIG_TYPE %d for item %s", type,
+				elemname);
+			return -1;
+		}
+	}
+	return 0;
+}
+
+int gtm_tls_add_config(gtm_tls_ctx_t *tls_ctx, const char *idstr, const char *configstr)
+{
+#	ifndef LIBCONFIG_VER_MAJOR
+	UPDATE_ERROR_STRING("TLSID: %s: libconfig 1.4.x is needed to support adding config information", idstr);
+	return -1;
+#	else
+	config_t		*cfg, tmpcfg;
+	config_setting_t	*tlsid, *tlssect;
+	char			cfg_path[MAX_CONFIG_LOOKUP_PATHLEN];
+
+	config_init(&tmpcfg);
+	if (CONFIG_FALSE == config_read_string(&tmpcfg, configstr))
+	{
+		UPDATE_ERROR_STRING("Failed to add config information: %s in line %d:\n%s", config_error_text(&tmpcfg),
+			config_error_line(&tmpcfg), configstr);
+		return -1;
+	}
+	cfg = &gtm_tls_cfg;
+	strncpy(cfg_path, "tls", SIZEOF("tls"));
+	tlssect = config_lookup(cfg, cfg_path);
+	if (NULL == tlssect)
+	{	/* need to add tls section */
+		tlssect = config_setting_add(config_root_setting(cfg), "tls", CONFIG_TYPE_GROUP);
+		if (NULL == tlssect)
+		{
+			UPDATE_ERROR_STRING("Failed to add tls section to config file: %s", config_error_text(cfg));
+			return -1;
+		}
+	}
+	SNPRINTF(cfg_path, MAX_CONFIG_LOOKUP_PATHLEN, "tls.%s", idstr);
+	tlsid = config_lookup(cfg, cfg_path);
+	if (NULL == tlsid)
+	{	/* add new section named tls.idstr */
+		tlsid = config_setting_add(tlssect, idstr, CONFIG_TYPE_GROUP);
+		if (NULL == tlsid)
+		{
+			UPDATE_ERROR_STRING("Failed to add TLSID: %s section to config file: %s", idstr, config_error_text(cfg));
+			return -1;
+		}
+	}
+	/* add any new gtm_tls_socket level options below */
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "verify-mode", CONFIG_TYPE_STRING))
+		return -1;
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "cipher-list", CONFIG_TYPE_STRING))
+		return -1;
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "cert", CONFIG_TYPE_STRING))
+		return -1;
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "key", CONFIG_TYPE_STRING))
+		return -1;
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "format", CONFIG_TYPE_STRING))
+		return -1;
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "ssl-options", CONFIG_TYPE_STRING))
+		return -1;
+	if (-1 == copy_tlsid_elem(&tmpcfg, cfg, tlsid, idstr, "verify-depth", CONFIG_TYPE_INT))
+		return -1;
+	config_destroy(&tmpcfg);
+	return 0;
+#	endif
+}
+
 gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_socket, int sockfd, char *id, int flags)
 {
-	int			len, verify_mode, verify_mode_set, nocert, nopkey;
-	long			options_mask, options_current, options_clear;
+	int			len, verify_mode, verify_mode_set, nocert, nopkey, parse_len;
+	long			options_mask, options_current, options_clear, verify_long;
+	char			*optionendptr, *parse_ptr;
 #	if (((LIBCONFIG_VER_MAJOR == 1) && (LIBCONFIG_VER_MINOR >= 4)) || (LIBCONFIG_VER_MAJOR > 1))
 	int			verify_depth, session_timeout;
 #	else
@@ -640,6 +867,11 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 	SSL_CTX			*ctx;
 	EVP_PKEY		*evp_pkey = NULL;
 	config_t		*cfg;
+	config_setting_t	*cfg_setting;
+#	if OPENSSL_VERSION_NUMBER < 0x009080dfL
+	unsigned int		cfg_line;
+	const char		*cfg_file;
+#	endif
 	gtmtls_passwd_list_t	*pwent_node;
 	passwd_entry_t		*pwent;
 	gtm_tls_socket_t	*socket;
@@ -660,11 +892,32 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 
 	if ('\0' != id[0])
 	{
+		SNPRINTF(cfg_path, MAX_CONFIG_LOOKUP_PATHLEN, "tls.%s", id);
+		cfg_setting = config_lookup(cfg, cfg_path);
+		if (NULL == cfg_setting)
+		{
+			UPDATE_ERROR_STRING("TLSID %s not found in configuration file.", id);
+			SSL_free(ssl);
+			return NULL;
+		}
 		SNPRINTF(cfg_path, MAX_CONFIG_LOOKUP_PATHLEN, "tls.%s.verify-mode", id);
 		if (CONFIG_TRUE == config_lookup_string(cfg, cfg_path, &verify_mode_string))
 		{
-			verify_mode = (int)parse_SSL_options(&gtm_ssl_verify_mode_list[0], SIZEOF(gtm_ssl_verify_mode_list),
-						verify_mode_string, (long)0, NULL);
+			verify_long = 0;
+			parse_ptr = parse_SSL_options(&gtm_ssl_verify_mode_list[0], SIZEOF(gtm_ssl_verify_mode_list),
+						verify_mode_string, &verify_long, NULL);
+			if (NULL != parse_ptr)
+			{
+				optionendptr = strstr((const char *)parse_ptr, OPTIONENDSTR);
+				if (NULL == optionendptr)
+					parse_len = strlen(parse_ptr);
+				else
+					parse_len = optionendptr - parse_ptr;
+				UPDATE_ERROR_STRING("In TLSID: %s - unknown verify-mode option: %.*s", id, parse_len, parse_ptr);
+				SSL_free(ssl);
+				return NULL;
+			}
+			verify_mode = (int)verify_long;
 			if (SSL_VERIFY_PEER & verify_mode)
 				flags |= GTMTLS_OP_VERIFY_PEER;
 			verify_mode_set = TRUE;
@@ -678,7 +931,7 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 		if (CONFIG_TRUE == config_lookup_string(cfg, cfg_path, &cipher_list))
 		{
 			if ('\0' == cipher_list[0]) /* use default instead of tls.cipher-list if empty string */
-				cipher_list = (GTMTLS_OP_SOCKET_DEV & flags) ? SSL_DEFAULT_CIPHER_LIST : REPL_CIPHER_LIST;
+				cipher_list = (GTMTLS_OP_SOCKET_DEV & flags) ? GTM_DEFAULT_CIPHER_LIST : REPL_CIPHER_LIST;
 		} else
 			cipher_list = NULL;
 	} else if (!CLIENT_MODE(flags))
@@ -703,7 +956,7 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 	{	/* no cipher-list in labelled section or no section */
 		if (0 != ((GTMTLS_OP_ABSENT_CIPHER | GTMTLS_OP_DEFAULT_CIPHER) &tls_ctx->flags))
 		{	/* no or default cipher specified top level */
-			cipher_list = (GTMTLS_OP_SOCKET_DEV & flags) ? SSL_DEFAULT_CIPHER_LIST : REPL_CIPHER_LIST;
+			cipher_list = (GTMTLS_OP_SOCKET_DEV & flags) ? GTM_DEFAULT_CIPHER_LIST : REPL_CIPHER_LIST;
 		}
 	}
 	if ((NULL != cipher_list) && (0 >= SSL_set_cipher_list(ssl, cipher_list)))
@@ -720,7 +973,15 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 		{
 			if (!CLIENT_MODE(flags))
 			{
-				UPDATE_ERROR_STRING("Certificate corresponding to TLSID: %s not found in configuration file.", id);
+				if (NULL == config_root_setting(cfg))
+				{	/* not sure this is possible */
+					UPDATE_ERROR_STRING("Certificate required for TLSID: %s"
+						" but no configuration information available.", id);
+				} else
+				{
+					UPDATE_ERROR_STRING("Certificate corresponding to TLSID: %s"
+						" not found in configuration file.", id);
+				}
 				SSL_free(ssl);
 				return NULL;
 			} else
@@ -769,19 +1030,8 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 			}
 			/* Before setting up the private key, check-up on the password for the private key. */
 			SNPRINTF(input_env_name, PASSPHRASE_ENVNAME_MAX, GTMTLS_PASSWD_ENV_PREFIX "%s", id);
-			if (NULL != (pwent_node = gtmtls_passwd_listhead))
-			{	/* Lookup to see if we have already prefetched the password. */
-				while (NULL != pwent_node)
-				{
-					env_name_ptr = pwent_node->pwent->env_name;
-					len = STRLEN(env_name_ptr);
-					assert(len < PASSPHRASE_ENVNAME_MAX);
-					assert(len > SIZEOF(GTMTLS_PASSWD_ENV_PREFIX) - 1);
-					if ((len == STRLEN(input_env_name)) && (0 == strncmp(input_env_name, env_name_ptr, len)))
-						break;
-					pwent_node = pwent_node->next;
-				}
-			}
+			/* Lookup to see if we have already prefetched the password. */
+			pwent_node = gtm_tls_find_pwent(input_env_name);
 			if (NULL == pwent_node)
 			{	/* Lookup failed. Create a new entry for the given id. */
 				pwent = NULL;
@@ -863,14 +1113,37 @@ gtm_tls_socket_t *gtm_tls_socket(gtm_tls_ctx_t *tls_ctx, gtm_tls_socket_t *prev_
 		SNPRINTF(cfg_path, MAX_CONFIG_LOOKUP_PATHLEN, "tls.%s.ssl-options", id);
 		if (CONFIG_TRUE == config_lookup_string(cfg, cfg_path, &options_string))
 		{
-			options_current = SSL_get_options(ssl);
+			options_mask = options_current = SSL_get_options(ssl);
 			options_clear = 0;
-			options_mask = parse_SSL_options(&gtm_ssl_options_list[0], SIZEOF(gtm_ssl_options_list), options_string,
-					options_current, &options_clear);
-			if (0 != options_mask)
+			parse_ptr = parse_SSL_options(&gtm_ssl_options_list[0], SIZEOF(gtm_ssl_options_list), options_string,
+					&options_mask, &options_clear);
+			if (NULL != parse_ptr)
+			{
+				optionendptr = strstr((const char *)parse_ptr, OPTIONENDSTR);
+				if (NULL == optionendptr)
+					parse_len = strlen(parse_ptr);
+				else
+					parse_len = optionendptr - parse_ptr;
+				UPDATE_ERROR_STRING("In TLSID: %s - unknown ssl-options option: %.*s", id, parse_len, parse_ptr);
+				SSL_free(ssl);
+				return NULL;
+			}
+			if (options_current != options_mask)
 				options_mask = SSL_set_options(ssl, options_mask);
 			if (0 != options_clear)
+#			if OPENSSL_VERSION_NUMBER >= 0x009080dfL
 				options_mask = SSL_clear_options(ssl, options_clear);
+#			else
+			{       /* clear_options first in OpenSSL 0.9.8m */
+				cfg_setting = config_lookup(cfg, cfg_path);
+				cfg_file = config_setting_source_file(cfg_setting);
+				cfg_line = config_setting_source_line(cfg_setting);
+				UPDATE_ERROR_STRING("Unable to negate values in %s - need OpenSSL 0.9.8m or newer in %s line %d",
+					cfg_path, cfg_file, cfg_line);
+				SSL_free(ssl);
+				return NULL;
+			}
+#			endif
 
 		}
 		SNPRINTF(cfg_path, MAX_CONFIG_LOOKUP_PATHLEN, "tls.%s.verify-depth", id);
@@ -971,7 +1244,7 @@ int gtm_tls_renegotiate(gtm_tls_socket_t *socket)
 	DBG_VERIFY_SOCK_IS_BLOCKING(GET_SOCKFD(socket->ssl));
 	if (0 >= (rv = SSL_renegotiate(socket->ssl)))
 		return ssl_error(socket->ssl, rv);
-#	ifdef TLS_RENEGOTIATE_NO_HANDSHAKE
+#	ifdef GTMTLS_RENEGOTIATE_NO_HANDSHAKE
 	tls_ctx = socket->gtm_ctx;
 	assert(tls_ctx);
 	if (GTMTLS_OP_INTERACTIVE_MODE & tls_ctx->flags)
@@ -1002,17 +1275,20 @@ int gtm_tls_get_conn_info(gtm_tls_socket_t *socket, gtm_tls_conn_info *conn_info
 	const SSL_CIPHER	*cipher;
 	const COMP_METHOD	*compression_method;
 	char			*ssl_version_ptr, *session_id_ptr;
+	gtm_tls_ctx_t		*tls_ctx;
 	X509			*peer;
 	SSL			*ssl;
 	EVP_PKEY		*pubkey;
 	SSL_SESSION		*session;
 
 	ssl = socket->ssl;
-	if (NULL != (peer = SSL_get_peer_certificate(ssl)))
-	{
+	tls_ctx = socket->gtm_ctx;
+	peer = SSL_get_peer_certificate(ssl);
+	if ((NULL != peer) || (GTMTLS_OP_SOCKET_DEV & socket->flags))
+	{	/* if socket device and no certificate from peer still provide info */
 		verify_result = SSL_get_verify_result(ssl);
-		if (X509_V_OK == verify_result)
-		{
+		if ((X509_V_OK == verify_result) || (GTMTLS_OP_ABSENT_CONFIG & tls_ctx->flags))
+		{	/* return information for Socket clients even without a config file */
 			/* SSL-Session Protocol */
 			switch (ssl_version = SSL_version(ssl))
 			{
@@ -1027,13 +1303,10 @@ int gtm_tls_get_conn_info(gtm_tls_socket_t *socket, gtm_tls_conn_info *conn_info
 				case TLS1_VERSION:
 					ssl_version_ptr = "TLSv1";
 					break;
-				/* Older, but still commonly used, OpenSSL versions don't have macros for TLSv1.1 and TLSv1.2
-				 * versions. They are hard coded to 0x0302 and 0x0303 respectively. So, use them as-is here.
-				 */
-				case 0x0302:
+				case TLS1_1_VERSION:
 					ssl_version_ptr = "TLSv1.1";
 					break;
-				case 0x0303:
+				case TLS1_2_VERSION:
 					ssl_version_ptr = "TLSv1.2";
 					break;
 				default:
@@ -1045,8 +1318,12 @@ int gtm_tls_get_conn_info(gtm_tls_socket_t *socket, gtm_tls_conn_info *conn_info
 			cipher = SSL_get_current_cipher(ssl);
 			SNPRINTF(conn_info->session_algo, SIZEOF(conn_info->session_algo), "%s", SSL_CIPHER_get_name(cipher));
 			/* Remote Certificate Asymmetric Algorithm */
-			pubkey = X509_get_pubkey(peer);
-			SNPRINTF(conn_info->cert_algo, SIZEOF(conn_info->cert_algo), "%s", OBJ_nid2ln(pubkey->type));
+			if (NULL != peer)
+			{
+				pubkey = X509_get_pubkey(peer);
+				SNPRINTF(conn_info->cert_algo, SIZEOF(conn_info->cert_algo), "%s", OBJ_nid2ln(pubkey->type));
+			} else
+				conn_info->cert_algo[0] = '\0';
 			/* Is Secure Renegotiation Supported? */
 #			if OPENSSL_VERSION_NUMBER >= 0x009080dfL
 			/* SSL_get_secure_renegotiation_support function was introduced in OpenSSL version >= "0.9.8m". */
@@ -1082,24 +1359,32 @@ int gtm_tls_get_conn_info(gtm_tls_socket_t *socket, gtm_tls_conn_info *conn_info
 #			else
 			conn_info->compression = "NONE";
 #			endif
-			/* Remote Certificate Asymmetric Algorithm Strength */
-			conn_info->cert_nbits = EVP_PKEY_bits(pubkey);
-			/* Remote Certificate Subject */
-			X509_NAME_oneline(X509_get_subject_name(peer), conn_info->subject, MAX_X509_LEN);
-			/* Remote Certificate Issuer */
-			X509_NAME_oneline(X509_get_issuer_name(peer), conn_info->issuer, MAX_X509_LEN);
-			/* Certificate Expiry */
-			if (-1 == format_ASN1_TIME(X509_get_notBefore(peer), conn_info->not_before, MAX_TIME_STRLEN))
-				SNPRINTF(conn_info->not_before, MAX_TIME_STRLEN, "Bad certificate date");
-			if (-1 == format_ASN1_TIME(X509_get_notAfter(peer), conn_info->not_after, MAX_TIME_STRLEN))
-				SNPRINTF(conn_info->not_after, MAX_TIME_STRLEN, "Bad certificate date");
-			X509_free(peer);
+			if (NULL != peer)
+			{
+				/* Remote Certificate Asymmetric Algorithm Strength */
+				conn_info->cert_nbits = EVP_PKEY_bits(pubkey);
+				/* Remote Certificate Subject */
+				X509_NAME_oneline(X509_get_subject_name(peer), conn_info->subject, MAX_X509_LEN);
+				/* Remote Certificate Issuer */
+				X509_NAME_oneline(X509_get_issuer_name(peer), conn_info->issuer, MAX_X509_LEN);
+				/* Certificate Expiry */
+				if (-1 == format_ASN1_TIME(X509_get_notBefore(peer), conn_info->not_before, MAX_TIME_STRLEN))
+					SNPRINTF(conn_info->not_before, MAX_TIME_STRLEN, "Bad certificate date");
+				if (-1 == format_ASN1_TIME(X509_get_notAfter(peer), conn_info->not_after, MAX_TIME_STRLEN))
+					SNPRINTF(conn_info->not_after, MAX_TIME_STRLEN, "Bad certificate date");
+				X509_free(peer);
+			} else
+			{
+				conn_info->cert_nbits = 0;
+				conn_info->subject[0] = conn_info->issuer[0] = '\0';
+				conn_info->not_before[0] = conn_info->not_after[0] = '\0';
+			}
 			if (GTM_TLS_API_VERSION_SOCK <= socket->gtm_ctx->version)
 				conn_info->options = SSL_get_options(ssl);
 			return 0;
 		} else
 		{
-			UPDATE_ERROR_STRING("Peer certificate invalid");
+			UPDATE_ERROR_STRING("Peer certificate invalid: %ld", verify_result);
 			X509_free(peer);
 			return -1;
 		}
@@ -1162,7 +1447,8 @@ void gtm_tls_session_close(gtm_tls_socket_t **socket)
 	gtm_tls_socket_t	*sock;
 
 	sock = *socket;
-	assert(sock);
+	if (NULL == sock)
+		return;
 	if (NULL != sock->ssl)
 		gtm_tls_socket_close(sock);
 	if (NULL != (session = sock->session))
diff --git a/sr_unix/gtm_tls_impl.h b/sr_unix/gtm_tls_impl.h
index 39ef2e0..98903d5 100644
--- a/sr_unix/gtm_tls_impl.h
+++ b/sr_unix/gtm_tls_impl.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -27,6 +28,8 @@ typedef struct gtmtls_passwd_list_struct
 	passwd_entry_t			 *pwent;
 } gtmtls_passwd_list_t;
 
+STATICFNDEF gtmtls_passwd_list_t *gtm_tls_find_pwent(const char *input_env_name);
+
 #define GET_SOCKFD(TLS)			SSL_get_fd((SSL *)TLS)
 #define VERIFY_PEER(FLAGS)		(FLAGS & GTMTLS_OP_VERIFY_PEER)
 #define CLIENT_MODE(FLAGS)		(FLAGS & GTMTLS_OP_CLIENT_MODE)
diff --git a/sr_unix/gtm_tls_interface.h b/sr_unix/gtm_tls_interface.h
index 7c60630..7a7a73c 100644
--- a/sr_unix/gtm_tls_interface.h
+++ b/sr_unix/gtm_tls_interface.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -15,7 +16,7 @@
 #ifndef GTM_TLS_INTERFACE_DEFINITIONS_INCLUDED
 #define GTM_TLS_INTERFACE_DEFINITIONS_INCLUDED
 
-#define GTM_TLS_API_VERSION		0x00000002
+#define GTM_TLS_API_VERSION		0x00000003
 #define GTM_TLS_API_VERSION_SOCK	0x00000002	/* when TLS sockets added */
 
 #define MAX_X509_LEN			256
@@ -48,6 +49,7 @@
 
 /* Note these flags may be in either the ctx or ssl structures but not all
  * may have meaning in both. */
+/* GTMTLS_OP_INTERACTIVE_MODE and GTMTLS_OP_NOPWDENVVAR must match definition in gtmcrypt_interface,h */
 /* Whether the library is loaded in an interactive environment so that password prompting can happen if needed. */
 #define GTMTLS_OP_INTERACTIVE_MODE	0x00000001
 /* Turn-on compression for SSL/TLS protocol. */
@@ -68,6 +70,10 @@
 #define GTMTLS_OP_ABSENT_VERIFYMODE	0x00000100
 /* Server requested renegotiation without waiting for handshake */
 #define GTMTLS_OP_RENEGOTIATE_REQUESTED	0x00000200
+/* No gtmcrypt_config needed for client only use */
+#define GTMTLS_OP_ABSENT_CONFIG		0x00000400
+/* No environment variable for password - used by gc_update_passwd so must be same in gtmcrypt_interface.h */
+#define GTMTLS_OP_NOPWDENVVAR		0x00000800
 
 #define GTMTLS_IS_FIPS_MODE(CTX)	(TRUE == CTX->fips_mode)
 #define GTMTLS_RUNTIME_LIB_VERSION(CTX)	(CTX->runtime_version)
@@ -115,8 +121,8 @@ typedef struct gtm_tls_session_struct
 
 #endif	/* GTM_TLS_INTERFACE_DEFINITIONS_INCLUDED */
 
-/* Note: The below function prototypes should be kept in sync with the corresponding declarations/definitions in sr_unix/gtm_tls.h
- * and sr_unix/gtm_tls_funclist.h.
+/* Note: The below function prototypes should be kept in sync with the corresponding declarations/definitions in sr_unix/gtm_tls.h,
+ * sr_unix/gtm_tls.c, and sr_unix/gtm_tls_funclist.h.
  */
 
 /* Returns the most recent error (null-terminated) related to the workings of the SSL/TLS reference implementation. */
@@ -142,6 +148,35 @@ int		gtm_tls_errno(void);
  */
 gtm_tls_ctx_t	*gtm_tls_init(int version, int flags);
 
+/* Stores a M program provided password for later use.
+ *
+ * Arguments:
+ *    `tls_ctx'  : The SSL/TLS context corresponding to this process.
+ *    `tlsid'    : identifier of config file section to select the private key corresponding to this password.
+ *    `obs_passwd' : obfuscated password in the same format as a gtmtls_passwd_
+ environment variable's value.
+ *
+ * Returns:
+ *     1          Success
+ *     0          Not an interactive context
+ *    -1          Failure - use gtm_tls_get_error() to get reason
+ */
+
+int gtm_tls_store_passwd(gtm_tls_ctx_t *tls_ctx, const char *tlsid, const char *obs_passwd);
+
+/* Provides additional information to merge with config file
+ *
+ * Arguments:
+ *    `tls_ctx'  : The SSL/TLS context corresponding to this process.
+ *    `configstr': to be used by config_read_str.
+ *
+ * Returns:
+ * 	0	Success
+ * 	-1	Failure - use gtm_tls_get_error() to get reason
+ */
+
+int gtm_tls_add_config(gtm_tls_ctx_t *tls_ctx, const char *idstr, const char *configstr);
+
 /* Prefetches the password corresponding to a private key.
  *
  * Arguments:
diff --git a/sr_unix/gtm_trigger.c b/sr_unix/gtm_trigger.c
index 2732a05..a0cae67 100644
--- a/sr_unix/gtm_trigger.c
+++ b/sr_unix/gtm_trigger.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -52,7 +53,6 @@
 #include "tp_frame.h"
 #include "gvname_info.h"
 #include "op_merge.h"
-#include <auto_zlink.h>
 #include "golevel.h"
 #include "flush_jmp.h"
 #include "dollar_zlevel.h"
@@ -106,11 +106,6 @@ GBLREF  uint4			dollar_tlevel;
 GBLREF	symval			*trigr_symval_list;
 GBLREF	trans_num		local_tn;
 GBLREF	int			merge_args;
-GBLREF	uint4			zwrtacindx;
-GBLREF	merge_glvn_ptr		mglvnp;
-GBLREF	gvzwrite_datablk	*gvzwrite_block;
-GBLREF	lvzwrite_datablk	*lvzwrite_block;
-GBLREF	zshow_out		*zwr_output;
 GBLREF	zwr_hash_table		*zwrhtab;
 #ifdef DEBUG
 GBLREF	ch_ret_type		(*ch_at_trigger_init)();
@@ -233,10 +228,10 @@ STATICFNDEF int gtm_trigger_invoke(void);
 CONDITION_HANDLER(gtm_trigger_complink_ch)
 {	/* Condition handler for trigger compilation and link - be noisy but don't error out. Note that compilations do
 	 * have their own handler but other errors are still possible. The primary use of this handler is (1) to remove
-	 * the mv_stent we created and (2) most importantly to turn off the trigger_compile flag.
+	 * the mv_stent we created and (2) most importantly to turn off the trigger_compile_and_link flag.
 	 */
 	START_CH(TRUE);
-	TREF(trigger_compile) = FALSE;
+	TREF(trigger_compile_and_link) = FALSE;
 	run_time = gtm_trigger_comp_prev_run_time;
 	if (((unsigned char *)mv_chain == msp) && (MVST_MSAV == mv_chain->mv_st_type)
 	    && (&dollar_zsource == mv_chain->mv_st_cont.mvs_msav.addr))
@@ -450,14 +445,14 @@ int gtm_trigger_complink(gv_trigger_t *trigdsc, boolean_t dolink)
 	PUSH_MV_STENT(MVST_MSAV);
 	mv_chain->mv_st_cont.mvs_msav.v = dollar_zsource;
 	mv_chain->mv_st_cont.mvs_msav.addr = &dollar_zsource;
-	TREF(trigger_compile) = TRUE;	/* Set flag so compiler knows this is a special trigger compile */
-	op_zcompile(&zcompprm, TRUE);	/* Compile but don't use $ZCOMPILE qualifiers */
-	TREF(trigger_compile) = FALSE;	/* compile_source_file() establishes handler so always returns */
+	TREF(trigger_compile_and_link) = TRUE;	/* Set flag so compiler knows this is a special trigger compile */
+	op_zcompile(&zcompprm, TRUE);		/* Compile but don't use $ZCOMPILE qualifiers */
+	TREF(trigger_compile_and_link) = FALSE;	/* compile_source_file() establishes handler so always returns */
 	if (0 != TREF(dollar_zcstatus))
 	{	/* Someone err'd.. */
 		run_time = gtm_trigger_comp_prev_run_time;
 		REVERT;
-		UNLINK(objname);	/* Remove files before return error */
+		UNLINK(objname);		/* Remove files before return error */
 		UNLINK(rtnname);
 		return ERR_TRIGCOMPFAIL;
 	}
@@ -471,11 +466,11 @@ int gtm_trigger_complink(gv_trigger_t *trigdsc, boolean_t dolink)
 		 * recompilation and is non-null in an explicit zlink which we need to emulate.
 		 */
 #		ifdef GEN_TRIGLINKFAIL_ERROR
-		UNLINK(objname);				/* delete object before it can be used */
+		UNLINK(objname);				/* Delete object before it can be used */
 #		endif
-		TREF(trigger_compile) = TRUE;			/* Overload flag so we know it is a trigger link */
-		op_zlink(&zlfile, (mval *)&literal_null);	/* need cast due to "extern const" attributes */
-		TREF(trigger_compile) = FALSE;			/* If doesn't return, condition handler will clear */
+		TREF(trigger_compile_and_link) = TRUE;		/* Overload flag so we know it is a trigger link */
+		op_zlink(&zlfile, (mval *)&literal_null);	/* Need cast due to "extern const" attributes */
+		TREF(trigger_compile_and_link) = FALSE;		/* If doesn't return, condition handler will clear */
 		/* No return here if link fails for some reason */
 		trigdsc->rtn_desc.rt_adr = find_rtn_hdr(&trigdsc->rtn_desc.rt_name);
 		/* Verify can find routine we just put there. Catastrophic if not */
@@ -515,9 +510,7 @@ int gtm_trigger(gv_trigger_t *trigdsc, gtm_trigger_parms *trigprm)
 	symval		*new_symval;
 	uint4		dollar_tlevel_start;
 	stack_frame	*fp;
-	DCL_THREADGBL_ACCESS;
 
-	SETUP_THREADGBL_ACCESS;
 	assert(!skip_dbtriggers);	/* should not come here if triggers are not supposed to be invoked */
 	assert(trigdsc);
 	assert(trigprm);
@@ -652,8 +645,7 @@ int gtm_trigger(gv_trigger_t *trigdsc, gtm_trigger_parms *trigprm)
 		mv_st_ent->mv_st_cont.mvs_trigr.run_time_save = run_time;
 		/* See if a MERGE launched the trigger. If yes, save some state so ZWRITE, ZSHOW and/or MERGE can be
 		 * run in the trigger we dispatch. */
-		if ((0 != merge_args) || TREF(in_zwrite))
-			PUSH_MVST_MRGZWRSV;
+		PUSH_MVST_MRGZWRSV_IF_NEEDED;
 		mumps_status = 0;
 		run_time = TRUE;	/* Previous value saved just above restored when frame pops */
 	} else
@@ -838,6 +830,12 @@ void gtm_trigger_fini(boolean_t forced_unwind, boolean_t fromzgoto)
 		if (tstart_trigger_depth == gtm_trigger_depth) /* Unwinding gvcst_put() so get rid of flag it potentially set */
 			donot_INVOKE_MUMTSTART = FALSE;
 #		endif
+		/* Now that op_unwind has been done, it is possible "lvzwrite_block" got restored to pre-trigger state
+		 * (if it was saved off in PUSH_MVST_MRGZWRSV call done at triggerland entry). If so, given this is a
+		 * forced unwind of triggerland, clear any context corresponding to MERGE/ZSHOW that caused us to enter
+		 * triggerland in the first place.
+		 */
+		NULLIFY_MERGE_ZWRITE_CONTEXT;
 		if (tp_pointer)
 		{	/* This TP transaction can never be allowed to commit if this is the first trigger
 			 * (see comment in tp_frame.h against "cannot_commit" field for details).
@@ -877,9 +875,7 @@ void gtm_trigger_cleanup(gv_trigger_t *trigdsc)
 	rhdtyp		*rtnhdr;
 	int		size;
 	stack_frame	*fp;
-	DCL_THREADGBL_ACCESS;
 
-	SETUP_THREADGBL_ACCESS;
 	/* First thing to do is release trigger source field if it exists */
 	if (0 < trigdsc->xecute_str.str.len)
 	{
diff --git a/sr_unix/gtmci.c b/sr_unix/gtmci.c
index a848d52..457196d 100644
--- a/sr_unix/gtmci.c
+++ b/sr_unix/gtmci.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -283,14 +284,14 @@ int gtm_cij(const char *c_rtn_name, char **arg_blob, int count, int *arg_types,
 	if (!(entry = get_entry(c_rtn_name)))	/* c_rtn_name not found in the table. */
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CINOENTRY, 2, LEN_AND_STR(c_rtn_name));
 	lref_parse((unsigned char*)entry->label_ref.addr, &routine, &label, &i);
-	/* The 3rd argument is NULL because we will get lnr_adr via lab_proxy. */
+	/* The 3rd argument is NULL because we will get lnr_adr via TABENT_PROXY. */
 	/* See comment in ojstartchild.c about "need_rtnobj_shm_free". It is not used here because we will
 	 * decrement rtnobj reference counts at exit time in relinkctl_rundown (called by gtm_exit_handler).
 	 */
 	if (!job_addr(&routine, &label, 0, (char **)&base_addr, NULL, &need_rtnobj_shm_free))
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBLABOFF);
 	memset(&param_blk, 0, SIZEOF(param_blk));
-	param_blk.rtnaddr = (void *)base_addr;
+	param_blk.rtnaddr = (void *)(ARLINK_ONLY(0) NON_ARLINK_ONLY(base_addr));
 	/* lnr_entry below is a pointer to the code offset for this label from the
 	 * beginning of text base(on USHBIN platforms) or from the beginning of routine
 	 * header (on NON_USHBIN platforms).
@@ -298,7 +299,7 @@ int gtm_cij(const char *c_rtn_name, char **arg_blob, int count, int *arg_types,
 	 * On USHBIN -- 2nd argument to EXTCALL is the pointer to this pointer (&lnr_entry)
 	 */
 	/* Assign the address for line number entry storage, so that the adjacent address holds has_parms value. */
-	param_blk.labaddr = &(TREF(lab_proxy)).LABENT_LNR_OFFSET;
+	param_blk.labaddr = (void *)(ARLINK_ONLY(-1) NON_ARLINK_ONLY(&(TABENT_PROXY).LABENT_LNR_OFFSET));
 	if (MAX_ACTUALS < entry->argcnt)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXACTARG);
 	if (entry->argcnt < count)
@@ -600,14 +601,14 @@ int gtm_ci_exec(const char *c_rtn_name, void *callin_handle, int populate_handle
 	} else
 		entry = callin_handle;
 	lref_parse((unsigned char*)entry->label_ref.addr, &routine, &label, &i);
-	/* 3rd argument is NULL because we will get lnr_adr via lab_proxy */
+	/* 3rd argument is NULL because we will get lnr_adr via TABENT_PROXY */
 	/* See comment in ojstartchild.c about "need_rtnobj_shm_free". It is not used here because we will
 	 * decrement rtnobj reference counts at exit time in relinkctl_rundown (called by gtm_exit_handler).
 	 */
 	if (!job_addr(&routine, &label, 0, (char **)&base_addr, NULL, &need_rtnobj_shm_free))
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBLABOFF);
 	memset(&param_blk, 0, SIZEOF(param_blk));
-	param_blk.rtnaddr = (void *)base_addr;
+	param_blk.rtnaddr = (void *)(ARLINK_ONLY(0) NON_ARLINK_ONLY(base_addr));
 	/* lnr_entry below is a pointer to the code offset for this label from the
 	 * beginning of text base(on USHBIN platforms) or from the beginning of routine
 	 * header (on NON_USHBIN platforms).
@@ -616,7 +617,7 @@ int gtm_ci_exec(const char *c_rtn_name, void *callin_handle, int populate_handle
 	 *
 	 * Assign the address for line number entry storage, so that the adjacent address holds has_parms value.
 	 */
-	param_blk.labaddr = &(TREF(lab_proxy)).LABENT_LNR_OFFSET;
+	param_blk.labaddr = (void *)(ARLINK_ONLY(-1) NON_ARLINK_ONLY(&(TABENT_PROXY).LABENT_LNR_OFFSET));
 	param_blk.argcnt = entry->argcnt;
 	if (MAX_ACTUALS < param_blk.argcnt)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXACTARG);
diff --git a/sr_unix/gtmcrypt_dbk_ref.c b/sr_unix/gtmcrypt_dbk_ref.c
index d599860..5903eb3 100644
--- a/sr_unix/gtmcrypt_dbk_ref.c
+++ b/sr_unix/gtmcrypt_dbk_ref.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc *
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -32,6 +33,10 @@
 #include "gtmcrypt_sym_ref.h"
 #include "gtmcrypt_pk_ref.h"
 
+#define	UNRES_KEY_FILE				0	/* Key is for device encryption. */
+#define	UNRES_KEY_UNRES_DB			1	/* Key is for a database that does not yet exist. */
+#define	UNRES_KEY_RES_DB			2	/* Key is for a database that already exists. */
+
 #define CONFIG_FILE_UNREAD			('\0' == gc_config_filename[0])
 #define GPG_MESSAGE				"Verify encrypted key file and your GNUPGHOME settings"
 #define NON_GPG_MESSAGE				"Verify encryption key in configuration file pointed to by $gtmcrypt_config"
@@ -50,18 +55,115 @@
 #  define st_nmtime				st_nmtime
 #endif
 
+/* Allocate a gtm_keystore_t element. */
+#define GC_ALLOCATE_KEYSTORE_ENTRY(X)						\
+{										\
+	X = MALLOC(SIZEOF(gtm_keystore_t));					\
+	(X)->cipher_head = NULL;						\
+	(X)->db_cipher_entry = NULL;						\
+}
+
+/* Allocate a gtm_keystore_xxx_link_t element. */
+#define GC_ALLOCATE_KEYSTORE_LINK(X, TYPE)					\
+{										\
+	X = (TYPE *)MALLOC(SIZEOF(TYPE));					\
+	(X)->left = (X)->right = NULL;						\
+}
+
+/* Insert a new gtm_keystore_xxx_link_t element in a respective tree. It assumes
+ * (and asserts) that there is no existing matching node.
+ */
+#define INSERT_KEY_LINK(ROOT, LINK, TYPE, FIELD, VALUE, LENGTH, FILL_LEN)	\
+{										\
+	int	diff;								\
+	TYPE	*cur_node, **target_node;					\
+										\
+	target_node = &ROOT;							\
+	while (cur_node = *target_node)	/* NOTE: Assignment!!! */		\
+	{									\
+		diff = memcmp(cur_node->FIELD, VALUE, LENGTH);			\
+		assert(0 != diff);						\
+		if (diff < 0)							\
+			target_node = &cur_node->left;				\
+		else								\
+			target_node = &cur_node->right;				\
+	}									\
+	GC_ALLOCATE_KEYSTORE_LINK(*target_node, TYPE);				\
+	(*target_node)->link = LINK;						\
+	memset((*target_node)->FIELD, 0, FILL_LEN);				\
+	memcpy((*target_node)->FIELD, VALUE, LENGTH);				\
+}
+
+/* Find a particular key based on a binary tree with a specific search criterion, such
+ * as the key's name or hash. The macro causes the caller to return the found node.
+ */
+#define LOOKUP_KEY(ROOT, TYPE, FIELD, VALUE, LENGTH, CHECK_NULL)		\
+{										\
+	int	diff;								\
+	TYPE	*cur_node;							\
+										\
+	cur_node = ROOT;							\
+	while (cur_node)							\
+	{									\
+		diff = memcmp(cur_node->FIELD, VALUE, LENGTH);			\
+		if (0 < diff)							\
+			cur_node = cur_node->right;				\
+		else if ((0 == diff) &&						\
+			(CHECK_NULL						\
+			 ? '\0' == *(((char *)cur_node->FIELD) + LENGTH)	\
+			 : TRUE))						\
+			return cur_node->link;					\
+		else								\
+			cur_node = cur_node->left;				\
+	}									\
+	return NULL;								\
+}
+
+/* Insert a new gtm_keystore_unres_key_link_t element in the unresolved keys list. */
+#define INSERT_UNRESOLVED_KEY_LINK(KEYNAME, KEYPATH, INDEX, STATUS)				\
+{												\
+	gtm_keystore_unres_key_link_t *node;							\
+												\
+	node = (gtm_keystore_unres_key_link_t *)MALLOC(	SIZEOF(gtm_keystore_unres_key_link_t));	\
+	memset(node->key_name, 0, GTM_PATH_MAX);						\
+	strncpy(node->key_name, KEYNAME, GTM_PATH_MAX);						\
+	memset(node->key_path, 0, GTM_PATH_MAX);						\
+	strncpy(node->key_path, KEYPATH, GTM_PATH_MAX);						\
+	node->next = keystore_by_unres_key_head;						\
+	node->index = INDEX;									\
+	node->status = STATUS;									\
+	keystore_by_unres_key_head = node;							\
+}
+
+/* Remove all elements from the unresolved keys tree. */
+#define REMOVE_UNRESOLVED_KEY_LINKS						\
+{										\
+	gtm_keystore_unres_key_link_t *curr, *temp;				\
+										\
+	curr = keystore_by_unres_key_head;					\
+	while (curr)								\
+	{									\
+		temp = curr->next;						\
+		FREE(curr);							\
+		curr = temp;							\
+	}									\
+	keystore_by_unres_key_head = NULL;					\
+}
+
 STATICDEF int					n_keys;					/* Count of how many keys were loaded. */
 STATICDEF char					gc_config_filename[GTM_PATH_MAX];	/* Path to the configuration file. */
-STATICDEF gtm_keystore_hash_link_t		*keystore_by_hash_head;			/* Root of the binary search tree to look
+STATICDEF gtm_keystore_hash_link_t		*keystore_by_hash_head = NULL;		/* Root of the binary search tree to look
 											 * keys up by hash. */
-STATICDEF gtm_keystore_keyname_link_t		*keystore_by_keyname_head;		/* Root of the binary search tree to look
+STATICDEF gtm_keystore_keyname_link_t		*keystore_by_keyname_head = NULL;	/* Root of the binary search tree to look
 											 * keys up by name. */
-STATICDEF gtm_keystore_unres_keyname_link_t	*keystore_by_unres_keyname_head;	/* Head of the linked list holding keys of
+STATICDEF gtm_keystore_keypath_link_t		*keystore_by_keypath_head = NULL;	/* Root of the binary search tree to look
+											 * keys up by path. */
+STATICDEF gtm_keystore_unres_key_link_t		*keystore_by_unres_key_head = NULL;	/* Head of the linked list holding keys of
 											 * DBs with presently unresolved paths. */
 STATICDEF config_t				gtmcrypt_cfg;				/* Encryption configuration. */
-STATICDEF char					db_real_path[GTM_PATH_MAX];		/* Array for temporary storage of DBs' real
+STATICDEF char					key_name_array[GTM_PATH_MAX];		/* Array for temporary storage of DBs' real
 											 * path information. */
-STATICDEF unsigned char				key_hash[GTMCRYPT_HASH_LEN];		/* Array for temporary storage of keys'
+STATICDEF unsigned char				key_hash_array[GTMCRYPT_HASH_LEN];	/* Array for temporary storage of keys'
 											 * hashes. */
 
 GBLREF	passwd_entry_t				*gtmcrypt_pwent;
@@ -74,39 +176,26 @@ GBLREF	int					gtmcrypt_init_flags;
  * 		length		Length of the key name.
  * 		entry		Address where to place the pointer to the found key.
  * 		database	Flag indicating whether a database (or device) key is being searched.
- * 		nulled		Flag indicating whether keyname is null-terminated.
  *
  * Returns:	0 if the key with the specified name is found; -1 otherwise.
  */
-int gtmcrypt_getkey_by_keyname(char *keyname, int length, gtm_keystore_t **entry, int database, int nulled)
+int gtmcrypt_getkey_by_keyname(char *keyname, int length, gtm_keystore_t **entry, int database)
 {
-	int new_db_keynames, new_dev_keynames, new_hashes, new_keynames, error;
+	int error;
 
-	if (NULL == (*entry = keystore_lookup_by_keyname(keyname, length, nulled)))
-	{	/* Lookup still failed. Verify if we have right permissions on GNUPGHOME or $HOME/.gnupg (if GNUPGHOME is unset).
-		 * If not, then the below function will store the appropriate error message in err_string and so return -1.
-		 */
-		if (0 != gc_pk_gpghome_has_permissions())
-			return -1;
-		/* Hashes are irrelevant, so using the same variable for number of both device and DB hashes. */
-		if (0 != keystore_refresh(&new_db_keynames, &new_hashes, &new_dev_keynames, &new_hashes))
+	if (NULL == (*entry = keystore_lookup_by_keyname(keyname, length)))
+	{	/* No matches in the binary tree; trying the unresolved key list. */
+		if (0 != keystore_refresh())
 			return -1;
 		error = 0;
-		new_keynames = database ? new_db_keynames : new_dev_keynames;
-		if ((0 >= new_keynames) || ((0 < new_keynames)
-				&& (NULL == (*entry = keystore_lookup_by_keyname(keyname, length, nulled)))))
-		{	/* If either no keynames have been loaded, or the key is not found among those that were loaded, try the
-			 * unresolved keys list.
-			 */
-			if (NULL == (*entry = keystore_lookup_by_unres_keyname(keyname, &error)))
+		if (NULL == (*entry = keystore_lookup_by_unres_key(keyname, length, FALSE, database, &error)))
+		{
+			if (!error)
 			{
-				if (!error)
-				{
-					UPDATE_ERROR_STRING("%s " STR_ARG " missing in configuration file or does not exist",
-						(database ? "Database file" : "Keyname"), ELLIPSIZE(keyname));
-				}
-				return -1;
+				UPDATE_ERROR_STRING("%s " STR_ARG " missing in configuration file or does not exist",
+					(database ? "Database file" : "Keyname"), ELLIPSIZE(keyname));
 			}
+			return -1;
 		}
 	}
 	assert(NULL != *entry);
@@ -123,26 +212,18 @@ int gtmcrypt_getkey_by_keyname(char *keyname, int length, gtm_keystore_t **entry
  */
 int gtmcrypt_getkey_by_hash(unsigned char *hash, gtm_keystore_t **entry)
 {
-	int		err_caused_by_gpg;
+	int		err_caused_by_gpg, error;
 	char		save_err[MAX_GTMCRYPT_ERR_STRLEN], hex_buff[GTMCRYPT_HASH_HEX_LEN + 1];
 	char		*alert_msg;
-	int		new_db_hashes, new_dev_hashes, new_keynames, new_hashes;
 
 	if (NULL == (*entry = keystore_lookup_by_hash(hash)))
-	{	/* Lookup still failed. Verify if we have right permissions on GNUPGHOME or $HOME/.gnupg (if GNUPGHOME is unset).
-		 * If not, then the below function will store the appropriate error message in err_string and so return -1.
-		 */
-		if (0 != gc_pk_gpghome_has_permissions())
-			return -1;
-		/* Keynames are irrelevant, so using the same variable for number of both device and DB keynames. */
-		if (0 != keystore_refresh(&new_keynames, &new_db_hashes, &new_keynames, &new_dev_hashes))
+	{	/* No matches in the binary tree; trying the unresolved key list. */
+		if (0 != keystore_refresh())
 			return -1;
-		new_hashes = new_db_hashes + new_dev_hashes;
-		if ((0 >= new_hashes) || ((0 < new_hashes) && (NULL == (*entry = keystore_lookup_by_hash(hash)))))
-		{	/* If either no hashes have been loaded, or the key is not found among those that were loaded, try the
-			 * unresolved keys list.
-			 */
-			if (NULL == (*entry = keystore_lookup_by_unres_keyname_hash(hash)))
+		error = 0;
+		if (NULL == (*entry = keystore_lookup_by_unres_key((char *)hash, GTMCRYPT_HASH_LEN, TRUE, TRUE, &error)))
+		{
+			if (!error)
 			{	/* Be specific in the error as to what hash we were trying to find. */
 				err_caused_by_gpg = ('\0' != gtmcrypt_err_string[0]);
 				alert_msg = err_caused_by_gpg ? GPG_MESSAGE : NON_GPG_MESSAGE;
@@ -154,8 +235,8 @@ int gtmcrypt_getkey_by_hash(unsigned char *hash, gtm_keystore_t **entry)
 						ELLIPSIZE(hex_buff), save_err, alert_msg);
 				} else
 					UPDATE_ERROR_STRING("Expected hash - " STR_ARG ". %s", ELLIPSIZE(hex_buff), alert_msg);
-				return -1;
 			}
+			return -1;
 		}
 	}
 	assert(NULL != *entry);
@@ -179,159 +260,240 @@ STATICFNDEF gtm_keystore_t *keystore_lookup_by_hash(unsigned char *hash)
  *
  * Arguments:	keyname		Name of the key.
  * 		length		Length of the key.
- * 		nulled		Indicates whether keyname is null-terminated.
  *
  * Returns:	Pointer to the key, if found; NULL otherwise.
  */
-STATICFNDEF gtm_keystore_t *keystore_lookup_by_keyname(char *keyname, int length, int nulled)
+STATICFNDEF gtm_keystore_t *keystore_lookup_by_keyname(char *keyname, int length)
 {
-	LOOKUP_KEY(keystore_by_keyname_head, gtm_keystore_keyname_link_t, key_name, keyname, length, !nulled);
+	LOOKUP_KEY(keystore_by_keyname_head, gtm_keystore_keyname_link_t, key_name, keyname, length, TRUE);
 }
 
 /*
- * Helper function to perform a linear search of the key by its name in the unresolved keys list. It attempts to resolve the real
- * path of every node's keyname, assuming that it corresponds to a previously unresolved database name. If the path is resolved, the
- * node's entry is used to create (as needed) new key node as well as hash- and keyname-based links to it, and the unresolved entry
- * is removed from the list.
+ * Helper function to perform the actual binary search of the key by its path.
  *
- * Arguments:	keyname		Name of the key.
+ * Arguments:	keypath		Path to the key.
+ * 		length		Length of the path.
+ *
+ * Returns:	Pointer to the key, if found; NULL otherwise.
+ */
+STATICFNDEF gtm_keystore_t *keystore_lookup_by_keypath(char *keypath, int length)
+{
+	LOOKUP_KEY(keystore_by_keypath_head, gtm_keystore_keypath_link_t, link->key_path, keypath, length, TRUE);
+}
+
+/*
+ * Helper function to perform a linear search of the key by its name or hash in the unresolved keys list. It attempts to resolve the
+ * real path of a keyname in case it corresponds to a previously unresolved database name. If the path is resolved, the node's entry
+ * is used to create (as needed) new key node as well as hash-, keyname-, and keypath-based links to it, and the unresolved entry is
+ * removed from the list.
+ *
+ * Arguments:	search_field	Either name or hash of the key to find.
+ *		search_len	Length of the search field.
+ *		hash		Flag indicating whether to search by hash or keyname.
+ *		database	Flag indicating whether the search is for a database or device encryption key.
  * 		error		Address where to set the flag indicating whether an error was encountered.
  *
  * Returns:	Pointer to the key, if found; NULL otherwise.
  */
-STATICFNDEF gtm_keystore_t *keystore_lookup_by_unres_keyname(char *keyname, int *error)
+STATICFNDEF gtm_keystore_t *keystore_lookup_by_unres_key(char *search_field, int search_len, int hash, int database, int *error)
 {
-	gtm_keystore_unres_keyname_link_t	*curr, *prev, *next;
-	gtm_keystore_t				*node, *result;
-	int					length;
+	gtm_keystore_unres_key_link_t	*curr, *prev, *next;
+	gtm_keystore_t			*node;
+	int				name_length, path_length;
 
-	result = NULL;
 	prev = NULL;
-	curr = keystore_by_unres_keyname_head;
+	curr = keystore_by_unres_key_head;
 	while (curr)
-	{
-		next = curr->next;
-		if (NULL != realpath(curr->key_name, db_real_path))
+	{	/* Skip entries whose type does not match the one we are searching for. */
+		if ((database && (UNRES_KEY_FILE == curr->status)) || (!database && (UNRES_KEY_FILE != curr->status)))
+		{
+			prev = curr;
+			curr = curr->next;
+			continue;
+		}
+		/* If the database file has not been resolved yet, try resolving it. */
+		if (UNRES_KEY_UNRES_DB == curr->status)
+		{
+			if (NULL == realpath(curr->key_name, key_name_array))
+			{
+				if (ENAMETOOLONG == errno)
+				{
+					*error = TRUE;
+					UPDATE_ERROR_STRING("Real path, or a component of the path, of the database " STR_ARG
+						" is too long", ELLIPSIZE(curr->key_name));
+					return NULL;
+				} else if (ENOENT != errno)
+				{
+					*error = TRUE;
+					UPDATE_ERROR_STRING("Could not obtain the real path of the database " STR_ARG,
+						ELLIPSIZE(curr->key_name));
+					return NULL;
+				}
+				if (!hash)
+				{	/* If we are looking by a keyname, and the database is missing, skip the entry. Otherwise,
+					 * give a chance to find the key by hash.
+					 */
+					prev = curr;
+					curr = curr->next;
+					continue;
+				}
+			} else
+			{	/* Once the path has been resolved, save it to avoid future realpath()s. */
+				strncpy(curr->key_name, key_name_array, GTM_PATH_MAX);
+				curr->status = UNRES_KEY_RES_DB;
+			}
+		}
+		path_length = strlen(curr->key_path);
+		if (UNRES_KEY_UNRES_DB != curr->status)
 		{	/* It is possible that a newly resolved realpath points to a previously seen database file, in which case we
 			 * should first check whether that database has already been inserted into the tree to avoid inserting a
 			 * duplicate.
 			 */
-			length = strlen(db_real_path);
-			assert(length < GTM_PATH_MAX);
-			if (NULL != (node = keystore_lookup_by_keyname(db_real_path, length + 1, TRUE)))
-			{	/* If we have already loaded a different key for this database, issue an error. */
-				if (memcmp(node->key_hash, curr->key_hash, GTMCRYPT_HASH_LEN))
+			name_length = strlen(curr->key_name);
+			assert(name_length < GTM_PATH_MAX);
+			if (NULL != (node = keystore_lookup_by_keyname(curr->key_name, name_length)))
+			{	/* +1 is to avoid matches of names with common prefixes. */
+				if (strncmp(node->key_path, curr->key_path, path_length + 1))
 				{
 					*error = TRUE;
-					UPDATE_ERROR_STRING("Database file " STR_ARG " resolves to a previously seen file, but "
-						"specifies a different key", ELLIPSIZE(curr->key_name));
+					if (database)
+					{
+						UPDATE_ERROR_STRING("In config file " STR_ARG ", database file in entry #%d "
+							"corresponding to 'database.keys' resolves to a previously seen file but "
+							"specifies a different key", ELLIPSIZE(gc_config_filename), curr->index);
+					} else
+					{
+						UPDATE_ERROR_STRING("In config file " STR_ARG ", keyname in entry #%d "
+							"corresponding to 'files' has already been seen but specifies "
+							"a different key", ELLIPSIZE(gc_config_filename), curr->index);
+					}
 					return NULL;
+				} else
+				{	/* This was already found in our search trees, so remove from the unresolved list. */
+					next = curr->next;
+					if (NULL != prev)
+						prev->next = next;
+					else
+					{
+						assert(curr == keystore_by_unres_key_head);
+						keystore_by_unres_key_head = next;
+					}
+					FREE(curr);
+					curr = next;
+					continue;
 				}
-			} else
-			{	/* It is possible that while no key has been specified for this database, the same key has already
-				 * been loaded for a different database or device, so do a lookup first.
-				 */
-				if (NULL == (node = keystore_lookup_by_hash(curr->key_hash)))
-				{	/* If we have not seen this hash before, create new entries. */
-					GC_ALLOCATE_KEYSTORE_ENTRY(node);
-					memcpy(node->key, curr->key, SYMMETRIC_KEY_MAX);
-					/* This should take care of assigning key_hash to the node itself. */
-					INSERT_KEY_LINK(keystore_by_hash_head, node, gtm_keystore_hash_link_t, link->key_hash,
-							curr->key_hash, GTMCRYPT_HASH_LEN, GTMCRYPT_HASH_LEN);
-				}
-				INSERT_KEY_LINK(keystore_by_keyname_head, node, gtm_keystore_keyname_link_t,
-						key_name, db_real_path, length + 1, GTM_PATH_MAX);
 			}
-			/* If we have not found a suitable node before, and this path matches, set the result to that. Do not break
-			 * the loop, though, as we want to resolve as many previously unresolved paths as possible. And if it
-			 * happens that some other real path matches the one we already found, we will already have it in the
-			 * resolved entries' tree, so it will simply get removed from the unresolved list.
-			 */
-			if ((NULL == result) && (!strcmp(keyname, db_real_path)))
-				result = node;
-			if (NULL != prev)
-				prev->next = next;
-			if (curr == keystore_by_unres_keyname_head)
-				keystore_by_unres_keyname_head = next;
-			FREE(curr);
 		} else
-		{
-			if (ENOENT == errno)
-			{	/* If we still could not resolve the path, move on to the next element. */
-				prev = curr;
-			} else if (ENAMETOOLONG == errno)
+		{	/* Name is unresolved; we better be searching by hash. */
+			assert(hash);
+			name_length = -1;
+		}
+		if (hash || ((name_length == search_len) && !strncmp(search_field, curr->key_name, name_length)))
+		{	/* If either we have a name match or we are searching by hash, go ahead and decrypt the key. */
+			if (NULL == (node = gtmcrypt_decrypt_key(curr->key_path, path_length, curr->key_name, name_length)))
 			{
-				UPDATE_ERROR_STRING("Real path, or a component of the path, of the database " STR_ARG
-					" is too long", ELLIPSIZE(curr->key_name));
+				*error = TRUE;
 				return NULL;
 			} else
 			{
-				UPDATE_ERROR_STRING("Could not obtain the real path of the database " STR_ARG,
-					ELLIPSIZE(curr->key_name));
-				return NULL;
+				next = curr->next;
+				if (NULL != prev)
+					prev->next = next;
+				else
+				{
+					assert(curr == keystore_by_unres_key_head);
+					keystore_by_unres_key_head = next;
+				}
+				FREE(curr);
+				curr = next;
+				/* If the key name or hash (depending on the type of search) matches, return the key. */
+				if (!hash || (!memcmp(node->key_hash, search_field, GTMCRYPT_HASH_LEN)))
+					return node;
+				continue;
 			}
 		}
-		curr = next;
+		prev = curr;
+		curr = curr->next;
 	}
-	return result;
+	return NULL;
 }
 
 /*
- * Helper function to perform a linear search of the key by its hash in the unresolved keys list.
+ * Helper function to decrypt a symmetric key, produce its hash, and store it for future discovery by key name, path, or hash.
  *
- * Arguments:	hash	Hash of the key.
+ * Arguments:	key_path	Path to the key.
+ *		path_length	Length of the keypath.
+ *		key_name	Name of the key.
+ *		name_length	Length of the keyname.
  *
- * Returns:	Pointer to the key, if found; NULL otherwise.
+ * Returns:	Pointer to the key, if created; NULL otherwise.
  */
-STATICFNDEF gtm_keystore_t *keystore_lookup_by_unres_keyname_hash(unsigned char *hash)
+STATICFNDEF gtm_keystore_t *gtmcrypt_decrypt_key(char *key_path, int path_length, char *key_name, int name_length)
 {
-	gtm_keystore_unres_keyname_link_t	*curr;
-	gtm_keystore_t				*node, *result;
+	gtm_keystore_t		*node;
+	unsigned char		raw_key[SYMMETRIC_KEY_MAX];
+	int			raw_key_length;
 
-	result = NULL;
-	/* Unlike with unresolved key lookups by the keyname, we will not attempt to resolve the realpath of the keyname (database
-	 * file) in question. All we are interested in is a matching hash, so do a linear search thereof, and, if found, do not
-	 * delete the entry, but simply create a corresponding keystore entry and a pointer from the hash-based lookup tree.
-	 */
-	curr = keystore_by_unres_keyname_head;
-	while (curr)
-	{
-		if (!memcmp(curr->key_hash, hash, GTMCRYPT_HASH_LEN))
-		{	/* Assumption is that a lookup by hash has already been done and not yielded any result. */
+	/* If we have seen a key with the same path, do not re-read it. */
+	if (NULL == (node = keystore_lookup_by_keypath(key_path, path_length)))
+	{	/* Now that we have the name of the symmetric key file, try to decrypt it. If gc_pk_get_decrypted_key returns a
+		 * non-zero status, it should have already populated the error string.
+		 */
+		if (0 != gc_pk_get_decrypted_key(key_path, raw_key, &raw_key_length))
+			return NULL;
+		if (0 == raw_key_length)
+		{
+			UPDATE_ERROR_STRING("Symmetric key " STR_ARG " found to be empty", ELLIPSIZE(key_path));
+			return NULL;
+		}
+		/* We expect a symmetric key within a certain length. */
+		assert(SYMMETRIC_KEY_MAX >= raw_key_length);
+		GC_PK_COMPUTE_HASH(key_hash_array, raw_key);
+		/* It is possible that while no key has been specified under this name, the same key has already been loaded
+		 * for a different database or device, so look up the key by hash to avoid duplicates.
+		 */
+		if (NULL == (node = keystore_lookup_by_hash(key_hash_array)))
+		{
 			GC_ALLOCATE_KEYSTORE_ENTRY(node);
-			memcpy(node->key, curr->key, SYMMETRIC_KEY_MAX);
+			/* WARNING: Not doing a memset here because raw_key comes padded with NULLs from gc_pk_get_decrypted_key. */
+			memcpy(node->key, raw_key, SYMMETRIC_KEY_MAX);
 			/* This should take care of assigning key_hash to the node itself. */
-			INSERT_KEY_LINK(keystore_by_hash_head, node, gtm_keystore_hash_link_t, link->key_hash, curr->key_hash,
+			INSERT_KEY_LINK(keystore_by_hash_head, node, gtm_keystore_hash_link_t, link->key_hash, key_hash_array,
 					GTMCRYPT_HASH_LEN, GTMCRYPT_HASH_LEN);
-			result = node;
-			break;
 		}
-		curr = curr->next;
+		INSERT_KEY_LINK(keystore_by_keypath_head, node, gtm_keystore_keypath_link_t,
+				link->key_path, key_path, path_length + 1, GTM_PATH_MAX);
 	}
-	return result;
+	if (-1 != name_length)
+	{	/* Only inserting a keyname-based link if the keyname was passed. */
+		INSERT_KEY_LINK(keystore_by_keyname_head, node, gtm_keystore_keyname_link_t,
+				key_name, key_name, name_length + 1, GTM_PATH_MAX);
+	}
+	return node;
 }
 
 /*
- * Re-read the configuration file, if necessary, and store any previously unseen keys in memory. If the configuration file has not
- * been modified since the last successful read, then it is not processed, and the counts for newly loaded DB and device keyname and
- * hash entries are set to -1.
- *
- * Arguments:	new_db_keynames		Address where to place the number of added DB keyname entries.
- * 		new_db_hashes		Address where to place the number of added DB hash entries.
- * 		new_dev_keynames	Address where to place the number of added device keyname entries.
- * 		new_dev_hashes		Address where to place the number of added device hash entries.
+ * Re-read the configuration file, if necessary, and store it in memory.
  *
- * Returns:	0 if succeeded re-reading the configuration file; -1 otherwise.
+ * Returns: 0 if succeeded re-reading the configuration file; -1 otherwise.
  */
-STATICFNDEF int keystore_refresh(int *new_db_keynames, int *new_db_hashes, int *new_dev_keynames, int *new_dev_hashes)
+STATICFNDEF int keystore_refresh()
 {
-	int			n_mappings, just_read;
+	int			n_mappings, status, just_read;
 	char			*config_env;
 	struct stat		stat_info;
 	static long		last_modified_s, last_modified_ns;
-	gtm_keystore_t		*node;
 
 	just_read = FALSE;
+	/* Check and update the value of gtm_passwd if it has changed since we last checked. This way, if the user had originally
+	 * entered a wrong password, but later changed the value (possible in MUMPS using external call), we read the up-to-date
+	 * value instead of issuing an error.
+	 */
+	if (0 != gc_update_passwd(GTM_PASSWD_ENV, &gtmcrypt_pwent, GTMCRYPT_DEFAULT_PASSWD_PROMPT,
+					GTMCRYPT_OP_INTERACTIVE_MODE & gtmcrypt_init_flags))
+	{
+		return -1;
+	}
 	if (CONFIG_FILE_UNREAD)
 	{	/* First, make sure we have a proper environment varible and a regular configuration file. */
 		if (NULL != (config_env = getenv("gtmcrypt_config")))
@@ -374,7 +536,6 @@ STATICFNDEF int keystore_refresh(int *new_db_keynames, int *new_db_hashes, int *
 		|| ((last_modified_s == (long)stat_info.st_mtime)
 			&& (last_modified_ns >= (long)stat_info.st_nmtime)))
 	{
-		*new_db_keynames = *new_db_hashes = *new_dev_keynames = *new_dev_hashes = -1;
 		return 0;
 	}
 	/* File has been modified, so re-read it. */
@@ -384,37 +545,17 @@ STATICFNDEF int keystore_refresh(int *new_db_keynames, int *new_db_hashes, int *
 					config_error_line(&gtmcrypt_cfg), config_error_text(&gtmcrypt_cfg))
 		return -1;
 	}
-	/* Check and update the value of gtm_passwd if it has changed since we last checked. This way, if the user had originally
-	 * entered a wrong password, but later changed the value (possible in MUMPS using external call), we read the up-to-date
-	 * value instead of issuing an error.
-	 */
-	if (0 != gc_update_passwd(GTM_PASSWD_ENV, &gtmcrypt_pwent, GTMCRYPT_DEFAULT_PASSWD_PROMPT,
-					GTMCRYPT_OP_INTERACTIVE_MODE & gtmcrypt_init_flags))
-	{
-		return -1;
-	}
 	/* Clear the entire unresolved keys list because it will be rebuilt. */
 	REMOVE_UNRESOLVED_KEY_LINKS;
-	/* The configuration file has two sections that we are interested in. The "database" section which contains a mapping of
-	 * the database filenames and their corresponding key files and the "files" section which contains a mapping of regular
-	 * files (read and written by GT.M) and their corresponding key files. Read both the sections to create the key and
-	 * encryption / decryption structures as outlined in gtmcrypt_dbk_ref.h.
-	 */
-	*new_db_keynames = *new_db_hashes = *new_dev_keynames = *new_dev_hashes = 0;
-	if (-1 == read_database_section(&gtmcrypt_cfg, &n_mappings, new_db_keynames, new_db_hashes))
+	n_keys = 0;
+	if (-1 == (status = read_database_section(&gtmcrypt_cfg)))
 		return -1;
-	n_keys += n_mappings;
-	if (-1 == read_files_section(&gtmcrypt_cfg, &n_mappings, new_dev_keynames, new_dev_hashes))
+	n_keys += status;
+	if (-1 == (status = read_files_section(&gtmcrypt_cfg)))
 		return -1;
-	n_keys += n_mappings;
-	/* If we update the modified date before we go through the configuration and validate everything in it, any error might
-	 * cause the unresolved list to not be built and configuration file to not subsequently be reread.
-	 */
+	n_keys += status;
 	last_modified_s = (long)stat_info.st_mtime;
 	last_modified_ns = (long)stat_info.st_nmtime;
-	assert((0 == n_keys) ||
-		((NULL != keystore_by_hash_head) && (NULL != keystore_by_keyname_head)) ||
-		(NULL != keystore_by_unres_keyname_head));
 	if (0 == n_keys)
 	{
 		UPDATE_ERROR_STRING("Configuration file " STR_ARG " contains neither 'database.keys' section nor 'files' section, "
@@ -425,128 +566,91 @@ STATICFNDEF int keystore_refresh(int *new_db_keynames, int *new_db_hashes, int *
 }
 
 /*
- * Process the 'files' section of the configuration file, storing any previously unseen key.
+ * Read the 'files' section of the configuration file, storing any previously unseen key in the unresolved list.
  *
  * Arguments:	cfgp		Pointer to the configuration object as populated by libconfig.
- * 		n_mappings	Pointer to a variable where to place the number of key entries found in the file.
- * 		new_keynames	Pointer to a variable where to place the number of key references by keyname added to storage.
- * 		new_hashes	Pointer to a variable where to place the number of key references by hash added to storage.
  *
  * Returns:	0 if successfully processed the 'files' section; -1 otherwise.
  */
-STATICFNDEF int read_files_section(config_t *cfgp, int *n_mappings, int *new_keynames, int *new_hashes)
+STATICFNDEF int read_files_section(config_t *cfgp)
 {
-	int			i, length, lcl_n_maps, raw_key_length;
+	int			i, name_length, path_length, lcl_n_maps;
 	config_setting_t	*setting, *elem;
 	gtm_keystore_t		*node;
-	char			*name, *key;
-	unsigned char		raw_key[SYMMETRIC_KEY_MAX];
+	char			*key_name, *key_path;
 
-	*new_keynames = *new_hashes = 0;
 	if (NULL == (setting = config_lookup(cfgp, "files")))
-	{
-		*n_mappings = 0;
 		return 0;
-	}
 	lcl_n_maps = config_setting_length(setting);
 	for (i = 0; i < lcl_n_maps; i++)
 	{
 		elem = config_setting_get_elem(setting, i);
 		assert(NULL != elem);
-		assert(CONFIG_TYPE_STRING == config_setting_type(elem));
-		if (NULL == (name = config_setting_name(elem)))
+		if (CONFIG_TYPE_STRING != config_setting_type(elem))
 		{
-			UPDATE_ERROR_STRING("In config file " STR_ARG
-				", entry #%d corresponding to 'files' does not have a key attribute",
-				ELLIPSIZE(gc_config_filename), i + 1);
+			UPDATE_ERROR_STRING("In config file " STR_ARG ", entry #%d corresponding to 'files' is not a string",
+					ELLIPSIZE(gc_config_filename), i + 1);
+			return -1;
+		}
+		if (NULL == (key_name = config_setting_name(elem)))
+		{
+			UPDATE_ERROR_STRING("In config file " STR_ARG ", entry #%d corresponding to 'files' does not have a "
+					"key attribute", ELLIPSIZE(gc_config_filename), i + 1);
 			return -1;
 		}
 		/* Length should be under GTM_PATH_MAX because that is the size of the array where the name of a key is stored. */
-		length = strlen(name);
-		if (GTM_PATH_MAX <= length)
+		name_length = strlen(key_name);
+		if (GTM_PATH_MAX <= name_length)
 		{
-			UPDATE_ERROR_STRING("In config file " STR_ARG ", entry #%d's field length exceeds %d",
-						ELLIPSIZE(gc_config_filename), i + 1, GTM_PATH_MAX - 1);
+			UPDATE_ERROR_STRING("In config file " STR_ARG ", 'files' entry #%d's field length exceeds %d",
+					ELLIPSIZE(gc_config_filename), i + 1, GTM_PATH_MAX - 1);
 			return -1;
 		}
-		if (NULL == (key = (char *)config_setting_get_string(elem)))
+		if (NULL == (key_path = (char *)config_setting_get_string(elem)))
 		{
 			UPDATE_ERROR_STRING("In config file " STR_ARG ", cannot find the value corresponding to 'files.%s'",
-						ELLIPSIZE(gc_config_filename), name);
+						ELLIPSIZE(gc_config_filename), key_name);
 			return -1;
 		}
-		/* Now that we have the name of the symmetric key file, try to decrypt it. If gc_pk_get_decrypted_key returns a
-		 * non-zero status, it should have already populated the error string.
-		 */
-		if (0 != gc_pk_get_decrypted_key(key, raw_key, &raw_key_length))
-			return -1;
-		if (0 == raw_key_length)
+		path_length = strlen(key_path);
+		if (GTM_PATH_MAX <= path_length)
 		{
-			UPDATE_ERROR_STRING("Symmetric key " STR_ARG " found to be empty", ELLIPSIZE(key));
+			UPDATE_ERROR_STRING("In config file " STR_ARG ", 'files' entry #%d's field length exceeds %d",
+						ELLIPSIZE(gc_config_filename), i + 1, GTM_PATH_MAX - 1);
 			return -1;
 		}
-		/* We expect a symmetric key within a certain length. */
-		assert(SYMMETRIC_KEY_MAX >= raw_key_length);
-		/* For most key operations we need a hash, so compute it now. */
-		GC_PK_COMPUTE_HASH(key_hash, raw_key);
-		/* Make sure we have not previously specified a different key for the same device. */
-		if (NULL != (node = keystore_lookup_by_keyname(name, length + 1, TRUE)))
-		{
-			if (memcmp(node->key_hash, key_hash, GTMCRYPT_HASH_LEN))
+		if (NULL != (node = keystore_lookup_by_keyname(key_name, name_length)))
+		{	/* +1 is to match the NULL character. */
+			if (strncmp(node->key_path, key_path, path_length + 1))
 			{
-				UPDATE_ERROR_STRING("In config file " STR_ARG ", the key 'files." STR_ARG
-					"' has already been seen, but specifies a different key",
-					ELLIPSIZE(gc_config_filename), ELLIPSIZE(name));
+				UPDATE_ERROR_STRING("In config file " STR_ARG ", keyname in entry #%d corresponding to 'files' "
+					"has already been seen but specifies a different key",
+					ELLIPSIZE(gc_config_filename), i + 1);
 				return -1;
 			} else
 				continue;
 		}
-		/* It is possible that while no key has been specified under this name, the same key has already been loaded
-		 * for a different database or device, so look up the key by hash to avoid duplicates.
-		 */
-		if (NULL == (node = keystore_lookup_by_hash(key_hash)))
-		{
-			GC_ALLOCATE_KEYSTORE_ENTRY(node);
-			/* WARNING: Not doing a memset here because raw_key comes padded with NULLs from gc_pk_get_decrypted_key. */
-			memcpy(node->key, raw_key, SYMMETRIC_KEY_MAX);
-			/* This should take care of assigning key_hash to the node itself. */
-			INSERT_KEY_LINK(keystore_by_hash_head, node, gtm_keystore_hash_link_t, link->key_hash, key_hash,
-					GTMCRYPT_HASH_LEN, GTMCRYPT_HASH_LEN);
-			(*new_hashes)++;
-		}
-		INSERT_KEY_LINK(keystore_by_keyname_head, node, gtm_keystore_keyname_link_t,
-				key_name, name, length + 1, GTM_PATH_MAX);
-		(*new_keynames)++;
+		INSERT_UNRESOLVED_KEY_LINK(key_name, key_path, i + 1, UNRES_KEY_FILE);
 	}
-	*n_mappings = lcl_n_maps;
-	return 0;
+	return lcl_n_maps;
 }
 
 /*
- * Process the 'database' section of the configuration file, storing any previously unseen key.
+ * Process the 'database' section of the configuration file, storing any previously unseen key in the unresolved list.
  *
  * Arguments:	cfgp		Pointer to the configuration object as populated by libconfig.
- * 		n_mappings	Pointer to a variable where to place the number of key entries found in the file.
- * 		new_keynames	Pointer to a variable where to place the number of key references by keyname added to storage.
- * 		new_hashes	Pointer to a variable where to place the number of key references by hash added to storage.
  *
  * Returns:	0 if successfully processed the 'database' section; -1 otherwise.
  */
-STATICFNDEF int read_database_section(config_t *cfgp, int *n_mappings, int *new_keynames, int *new_hashes)
+STATICFNDEF int read_database_section(config_t *cfgp)
 {
-	int			i, length, lcl_n_maps, raw_key_length;
-	int			defer, key_found_by_filename;
+	int			i, name_length, path_length, lcl_n_maps;
 	config_setting_t	*setting, *elem;
 	gtm_keystore_t		*node;
-	char			*name, *key;
-	unsigned char		raw_key[SYMMETRIC_KEY_MAX];
+	char			*key_name, *key_path;
 
-	*new_keynames = *new_hashes = 0;
 	if (NULL == (setting = config_lookup(cfgp, "database.keys")))
-	{
-		*n_mappings = 0;
 		return 0;
-	}
 	lcl_n_maps = config_setting_length(setting);
 	/* The following code makes sure that having an empty last entry in the database section is not required and does not cause
 	 * errors, as GTM-7948's original implementation would have it.
@@ -564,106 +668,47 @@ STATICFNDEF int read_database_section(config_t *cfgp, int *n_mappings, int *new_
 	{
 		elem = config_setting_get_elem(setting, i);
 		assert(NULL != elem);
-		if (!config_setting_lookup_string(elem, "dat", (const char **)&name))
+		if (!config_setting_lookup_string(elem, "dat", (const char **)&key_name))
 		{
 			UPDATE_ERROR_STRING("In config file " STR_ARG ", entry #%d corresponding to "
-				"database.keys does not have a 'dat' item", ELLIPSIZE(gc_config_filename), i + 1);
+				"'database.keys' does not have a 'dat' item", ELLIPSIZE(gc_config_filename), i + 1);
 			return -1;
 		}
 		/* Length should be under GTM_PATH_MAX because that is the size of the array where the name of a key is stored. */
-		if (GTM_PATH_MAX <= strlen(name))
+		name_length = strlen(key_name);
+		if (GTM_PATH_MAX <= name_length)
 		{
-			UPDATE_ERROR_STRING("In config file " STR_ARG ", entry #%d's database file name exceeds %d",
-						ELLIPSIZE(gc_config_filename), i + 1, GTM_PATH_MAX - 1);
+			UPDATE_ERROR_STRING("In config file " STR_ARG ", in entry #%d corresponding to 'database.keys' "
+					"file name exceeds %d", ELLIPSIZE(gc_config_filename), i + 1, GTM_PATH_MAX - 1);
 			return -1;
 		}
-		/* Database might not exist yet, in which case set the flag to place the entry in unresolved databases list and not
-		 * error out.
-		 */
-		if (NULL == realpath(name, db_real_path))
-		{
-			if (ENOENT == errno)
-				defer = 1;
-			else if (ENAMETOOLONG == errno)
-			{
-				UPDATE_ERROR_STRING("In config file " STR_ARG ", the real path, or a component of the path, of the "
-					"database in entry #%d of database.keys section is too long",
-					ELLIPSIZE(gc_config_filename), i + 1);
-				return -1;
-			} else
-			{
-				UPDATE_ERROR_STRING("In config file " STR_ARG ", could not obtain the real path of the database in "
-					"entry #%d of database.keys section", ELLIPSIZE(gc_config_filename), i + 1);
-				return -1;
-			}
-		} else
-			defer = 0;
-		if (!config_setting_lookup_string(elem, "key", (const char **)&key))
+		if (!config_setting_lookup_string(elem, "key", (const char **)&key_path))
 		{
 			UPDATE_ERROR_STRING("In config file " STR_ARG ", entry #%d corresponding to "
-				"database.keys does not have a 'key' item", ELLIPSIZE(gc_config_filename), i + 1);
+				"'database.keys' does not have a 'key' item", ELLIPSIZE(gc_config_filename), i + 1);
 			return -1;
 		}
-		/* Now that we have the name of the symmetric key file, try to decrypt it. If gc_pk_get_decrypted_key returns a
-		 * non-zero status, it should have already populated the error string.
-		 */
-		if (0 != gc_pk_get_decrypted_key(key, raw_key, &raw_key_length))
-			return -1;
-		if (0 == raw_key_length)
+		path_length = strlen(key_path);
+		if (GTM_PATH_MAX <= path_length)
 		{
-			UPDATE_ERROR_STRING("Symmetric key " STR_ARG " found to be empty", ELLIPSIZE(key));
+			UPDATE_ERROR_STRING("In config file " STR_ARG ", 'database.keys' entry #%d's field length exceeds %d",
+						ELLIPSIZE(gc_config_filename), i + 1, GTM_PATH_MAX - 1);
 			return -1;
 		}
-		/* We expect a symmetric key within a certain length. */
-		assert(SYMMETRIC_KEY_MAX >= raw_key_length);
-		/* For most key operations we need a hash, so compute it now. */
-		GC_PK_COMPUTE_HASH(key_hash, raw_key);
-		/* Depending on whether we are deferring the key storage and error processing, either verify that the key is unique
-		 * and create proper references or place it in the unresolved keys list.
-		 */
-		if (!defer)
-		{
-			length = strlen(db_real_path);
-			assert(length < GTM_PATH_MAX);
-			/* Make sure we have not previously specified a different key for the same database. */
-			if (NULL != (node = keystore_lookup_by_keyname(db_real_path, length + 1, TRUE)))
-			{
-				if (memcmp(node->key_hash, key_hash, GTMCRYPT_HASH_LEN))
-				{
-					UPDATE_ERROR_STRING("In config file " STR_ARG ", the database file in entry #%d resolves "
-						"to a previously seen file, but specifies a different key",
-						ELLIPSIZE(gc_config_filename), i + 1);
-					return -1;
-				} else
-					continue;
-			}
-			/* It is possible that while no key has been specified for this database, the same key has already been
-			 * loaded for a different database or device, so look up the key by hash to avoid duplicates.
-			 */
-			if (NULL == (node = keystore_lookup_by_hash(key_hash)))
+		if (NULL != (node = keystore_lookup_by_keyname(key_name, name_length)))
+		{	/* +1 is to match the NULL character. */
+			if (strncmp(node->key_path, key_path, path_length + 1))
 			{
-				GC_ALLOCATE_KEYSTORE_ENTRY(node);
-				/* WARNING: Not doing a memset here because raw_key comes padded with NULLs from
-				 * gc_pk_get_decrypted_key.
-				 */
-				memcpy(node->key, raw_key, SYMMETRIC_KEY_MAX);
-				/* This should take care of assigning key_hash to the node itself. */
-				INSERT_KEY_LINK(keystore_by_hash_head, node, gtm_keystore_hash_link_t, link->key_hash, key_hash,
-						GTMCRYPT_HASH_LEN, GTMCRYPT_HASH_LEN);
-				(*new_hashes)++;
-			}
-			INSERT_KEY_LINK(keystore_by_keyname_head, node, gtm_keystore_keyname_link_t, key_name, db_real_path,
-					length + 1, GTM_PATH_MAX);
-			(*new_keynames)++;
-		} else
-		{	/* WARNING: Not passing the raw key length here because raw_key comes padded with NULLs from
-			 * gc_pk_get_decrypted_key and there is no need to know its length.
-			 */
-			INSERT_UNRESOLVED_KEY_LINK(raw_key, key_hash, name);
+				UPDATE_ERROR_STRING("In config file " STR_ARG ", database file in entry #%d corresponding to "
+					"'database.keys' resolves to a previously seen file but specifies a different key",
+					ELLIPSIZE(gc_config_filename), i + 1);
+				return -1;
+			} else
+				continue;
 		}
+		INSERT_UNRESOLVED_KEY_LINK(key_name, key_path, i + 1, UNRES_KEY_UNRES_DB);
 	}
-	*n_mappings = lcl_n_maps;
-	return 0;
+	return lcl_n_maps;
 }
 
 /*
@@ -743,10 +788,10 @@ void gtm_keystore_cleanup_all()
 		gtm_keystore_cleanup_keyname_tree(keystore_by_keyname_head);
 		keystore_by_keyname_head = NULL;
 	}
-	if (NULL != keystore_by_unres_keyname_head)
+	if (NULL != keystore_by_unres_key_head)
 	{
-		gtm_keystore_cleanup_unres_keyname_list(keystore_by_unres_keyname_head);
-		keystore_by_unres_keyname_head = NULL;
+		gtm_keystore_cleanup_unres_key_list(keystore_by_unres_key_head);
+		keystore_by_unres_key_head = NULL;
 	}
 }
 
@@ -822,15 +867,13 @@ STATICFNDEF void gtm_keystore_cleanup_keyname_tree(gtm_keystore_keyname_link_t *
  *
  * Arguments:	entry	Pointer to the node from which to continue cleaning.
  */
-STATICFNDEF void gtm_keystore_cleanup_unres_keyname_list(gtm_keystore_unres_keyname_link_t *entry)
+STATICFNDEF void gtm_keystore_cleanup_unres_key_list(gtm_keystore_unres_key_link_t *entry)
 {
-	gtm_keystore_unres_keyname_link_t *curr;
+	gtm_keystore_unres_key_link_t *curr;
 
 	while (NULL != entry)
 	{
 		curr = entry;
-		memset(entry->key, 0, SYMMETRIC_KEY_MAX);
-		memset(entry->key_hash, 0, GTMCRYPT_HASH_LEN);
 		entry = entry->next;
 		FREE(curr);
 	}
diff --git a/sr_unix/gtmcrypt_dbk_ref.h b/sr_unix/gtmcrypt_dbk_ref.h
index be69dc5..770e802 100644
--- a/sr_unix/gtmcrypt_dbk_ref.h
+++ b/sr_unix/gtmcrypt_dbk_ref.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc *
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,39 +17,41 @@
  * This file defines several structures that store information about every symmetric key that we load as well the encryption /
  * decryption context for any database or device that uses that particular key. The information about the key includes its raw
  * content and its hash; those are stored in gtm_keystore_t->typed objects malloced invdividually. To assist lookups based on the
- * key's hash or name, we have tree structures consisting of gtm_keystore_hash_link_t- and gtm_keystore_keyname_link_t-typed nodes,
- * respectively. Since we expect hashes to be unique, and the hash information is already stored in gtm_keystore_t nodes, the hash-
- * based tree's nodes contain no additional information and have a one-to-one and onto relationship with the gtm_keystore_t nodes.
- * The keyname-based tree's nodes, on the other hand, also contain the key name information, which may correspond to the database's
- * name or a user-chosen string, in case of device encryption. Additionally, several databases or devices may use the same key, in
- * which case one gtm_keystore_t element may be referenced by multiple keyname tree's nodes. An example is given below:
+ * key's hash, name, or path, we have tree structures consisting of gtm_keystore_hash_link_t-, gtm_keystore_keyname_link_t-, and
+ * gtm_keystore_keypath_linkt_t-typed nodes, respectively. Since we expect hashes to be unique along with the path of each key, the
+ * hash and path information is already stored in gtm_keystore_t nodes, and the hash- and path- based trees' nodes contain no
+ * additional information and have a one-to-one and onto relationship with the gtm_keystore_t nodes. The keyname-based tree's nodes,
+ * on the other hand, also contain the key name information, which may correspond to the database's name or a user-chosen string in
+ * case of device encryption. Additionally, several databases or devices may use the same key, in which case one gtm_keystore_t
+ * element may be referenced by multiple keyname tree's nodes. An example is given below:
  *
- *       keystore_by_hash_head                                         keystore_by_keyname_head
- *    (gtm_keystore_hash_link_t *)   (gtm_keystore_t *)             (gtm_keystore_keyname_link_t *)
- *                 |                      ________                                 |
- *           ______|_____                |        |                          ______|_____
- *          |    link ---|-------------> | key #1 | <-----.    .------------|--- link    |
- *          | left right |               |________|        \  /             | left right |
- *          |_/_______\__|                                  \/              |_/_______\__|
- *           /         \                  ________          /\               /         \
- *   _______/____       \                |        |        /  \       ______/_____      \
- *  |    link ---|-------\-------------> | key #2 | <-----`    `-----|--- link    |      \
- *  | left right |        \              |________|                  | left right |       \
- *  |_/_______\__|         \                                         |_/_______\__|        \
- *  ...       ...           \             ________                    /        ...          \
- *                      _____\______     |        |                  /                  _____\______
- *                     |    link ---|--> | key #3 | <-.------------ / -----------------|--- link    |
- *                     | left right |    |________|    \           /                   | left right |
- *                     |_/_______\__|                   \   ______/_____               |_/_______\__|
- *                     ...       ...                     `-|--- link    |               ...      ...
- *                                                         | left right |
- *                                                         |_/_______\__|
- *                                                         ...       ...
+ *       keystore_by_hash_head                                    keystore_by_keyname_head / keystore_by_keypath_head
+ *    (gtm_keystore_hash_link_t *)   (gtm_keystore_t *)      (gtm_keystore_keyname_link_t * / gtm_keystore_keypath_link_t *)
+ *                 |                      ________                                       |
+ *           ______|_____                |        |                                ______|_____
+ *          |    link ---|-------------> | key #1 | <-----.    .------------------|--- link    |
+ *          | left right |               |________|        \  /                   | left right |
+ *          |_/_______\__|                                  \/                    |_/_______\__|
+ *           /         \                  ________          /\                     /         \
+ *   _______/____       \                |        |        /  \             ______/_____      \
+ *  |    link ---|-------\-------------> | key #2 | <-----`    `-----------|--- link    |      \
+ *  | left right |        \              |________|                        | left right |       \
+ *  |_/_______\__|         \                                               |_/_______\__|        \
+ *  ...       ...           \             ________                          /        ...          \
+ *                      _____\______     |        |                        /                  _____\______
+ *                     |    link ---|--> | key #3 | <-.-------------------/------------------|--- link    |
+ *                     | left right |    |________|    \                 /                   | left right |
+ *                     |_/_______\__|                   \         ______/_____               |_/_______\__|
+ *                     ...       ...                     `-------|--- link    |               ...      ...
+ *                                                               | left right |
+ *                                                               |_/_______\__|
+ *                                                               ...       ...
  *
- * Because we resolve database file names' real paths when we read the configuration file, it is possible that one or more databases
- * might not yet exist (such as when issuing MUPIP CREATE), so we temporarily store whatever information we processed in an
- * unresolved databases' list, hoping that a later attempt of resolving the path will succeed. The list is singly-linked and consist
- * of gtm_keystore_keyname_link_t-typed elements; each element contains information about the key name, raw content, and hash.
+ * Because we do not want to decrypt every key from the configuration file just as we read it, we first store whatever information
+ * we processed in an unresolved key list. The list is singly-linked and consists of gtm_keystore_keyname_link_t-typed elements;
+ * each element contains information about the key name, path, index in the configuration file, and whether it is a key for a device
+ * encryption, database whose address we already resolved, or the one that awaits resolution. (Certain database files referenced in
+ * the configuration file may not actually exist, such as during MUPIP CREATE time or when loading an extract.)
  *
  * As for gtm_keystore_t elements, in addition to the key data they host a pointer to the head of the encryption / decryption state
  * list as well as to the one element of that list that is specific to database encryption. (Because database encryption does not
@@ -83,6 +86,7 @@ typedef struct gtm_keystore_struct
 {
 	unsigned char					key[SYMMETRIC_KEY_MAX];		/* Raw symmetric key contents. */
 	unsigned char					key_hash[GTMCRYPT_HASH_LEN];	/* SHA-512 hash of symmetric key. */
+	char						key_path[GTM_PATH_MAX];		/* Path to the key file. */
 	struct gtm_cipher_ctx_struct			*cipher_head;			/* Linked list of cipher handles for
 											 * either encryption or decryption. A list
 											 * is needed because multiple devices or
@@ -116,6 +120,14 @@ typedef struct gtm_keystore_keyname_link_struct
 	struct gtm_keystore_keyname_link_struct		*right;				/* Pointer to right child. */
 } gtm_keystore_keyname_link_t;
 
+/* Structure to organize references to the key object by the key path, in a binary search tree fashion. */
+typedef struct gtm_keystore_keypath_link_struct
+{
+	gtm_keystore_t					*link;				/* Link to respective key object. */
+	struct gtm_keystore_keypath_link_struct		*left;				/* Pointer to left child. */
+	struct gtm_keystore_keypath_link_struct		*right;				/* Pointer to right child. */
+} gtm_keystore_keypath_link_t;
+
 /* Structure to organize references to the key object by the key hash, in a binary search tree fashion. */
 typedef struct gtm_keystore_hash_link_struct
 {
@@ -125,127 +137,36 @@ typedef struct gtm_keystore_hash_link_struct
 } gtm_keystore_hash_link_t;
 
 /* Structure to temporarily store key information if the real path of the respective database file name could not be obtained. */
-typedef struct gtm_keystore_unres_keyname_link_struct
+typedef struct gtm_keystore_unres_key_link_struct
 {
-	unsigned char					key[SYMMETRIC_KEY_MAX];		/* Raw symmetric key contents. */
-	unsigned char					key_hash[GTMCRYPT_HASH_LEN];	/* SHA-512 hash of symmetric key. */
 	char						key_name[GTM_PATH_MAX];		/* Logical entity that the symmetric key
 											 * maps to. For databases it is the name of
 											 * the database file. For devices it is a
 											 * user-chosen string. */
-	struct gtm_keystore_unres_keyname_link_struct	*next;				/* Pointer to next element. */
-} gtm_keystore_unres_keyname_link_t;
+	char						key_path[GTM_PATH_MAX];		/* Path to the key file. */
+	int						index;				/* Index in the configuration file */
+	int						status;				/* Indication of whether it is for a device,
+											 * unresolved, or resolved database. */
+	struct gtm_keystore_unres_key_link_struct	*next;				/* Pointer to next element. */
+} gtm_keystore_unres_key_link_t;
 
-STATICFNDEF int			keystore_refresh(int *new_db_keys, int *new_db_hashes, int *new_dev_keys, int *new_dev_hashes);
-STATICFNDEF int 		read_files_section(config_t *cfgp, int *n_mappings, int *new_keynames, int *new_hashes);
-STATICFNDEF int 		read_database_section(config_t *cfgp, int *n_mappings, int *new_keynames, int *new_hashes);
+STATICFNDEF int			keystore_refresh();
+STATICFNDEF int 		read_files_section(config_t *cfgp);
+STATICFNDEF int 		read_database_section(config_t *cfgp);
 STATICFNDEF void		gtm_keystore_cleanup_node(gtm_keystore_t *);
 void				gtm_keystore_cleanup_all(void);
 STATICFNDEF void		gtm_keystore_cleanup_hash_tree(gtm_keystore_hash_link_t *entry);
 STATICFNDEF void		gtm_keystore_cleanup_keyname_tree(gtm_keystore_keyname_link_t *entry);
-STATICFNDEF void		gtm_keystore_cleanup_unres_keyname_list(gtm_keystore_unres_keyname_link_t *entry);
-int				gtmcrypt_getkey_by_keyname(char *keyname, int length, gtm_keystore_t **entry,
-				int database, int nulled);
+STATICFNDEF void		gtm_keystore_cleanup_unres_key_list(gtm_keystore_unres_key_link_t *entry);
+int				gtmcrypt_getkey_by_keyname(char *keyname, int length, gtm_keystore_t **entry, int database);
 int				gtmcrypt_getkey_by_hash(unsigned char *hash, gtm_keystore_t **entry);
+STATICFNDEF gtm_keystore_t	*gtmcrypt_decrypt_key(char *key_path, int path_length, char *key_name, int name_length);
 STATICFNDEF gtm_keystore_t	*keystore_lookup_by_hash(unsigned char *hash);
-STATICFNDEF gtm_keystore_t 	*keystore_lookup_by_keyname(char *keyname, int length, int nulled);
-STATICFNDEF gtm_keystore_t 	*keystore_lookup_by_unres_keyname(char *keyname, int *error);
-STATICFNDEF gtm_keystore_t 	*keystore_lookup_by_unres_keyname_hash(unsigned char *hash);
+STATICFNDEF gtm_keystore_t 	*keystore_lookup_by_keyname(char *keyname, int length);
+STATICFNDEF gtm_keystore_t 	*keystore_lookup_by_keypath(char *keypath, int length);
+STATICFNDEF gtm_keystore_t 	*keystore_lookup_by_unres_key(char *search_field, int search_len, int hash,
+				int database, int *error);
 int 				keystore_new_cipher_ctx(gtm_keystore_t *entry, char *iv, int length, int action);
 void 				keystore_remove_cipher_ctx(gtm_cipher_ctx_t *ctx);
 
-/* Allocate a gtm_keystore_t element. */
-#define GC_ALLOCATE_KEYSTORE_ENTRY(X)						\
-{										\
-	X = MALLOC(SIZEOF(gtm_keystore_t));					\
-	(X)->cipher_head = NULL;						\
-	(X)->db_cipher_entry = NULL;						\
-}
-
-/* Allocate a gtm_keystore_xxx_link_t element. */
-#define GC_ALLOCATE_KEYSTORE_LINK(X, TYPE)					\
-{										\
-	X = (TYPE *)MALLOC(SIZEOF(TYPE));					\
-	(X)->left = (X)->right = NULL;						\
-}
-
-/* Insert a new gtm_keystore_xxx_link_t element in a respective tree. It assumes
- * (and asserts) that there is no existing matching node.
- */
-#define INSERT_KEY_LINK(ROOT, LINK, TYPE, FIELD, VALUE, LENGTH, FILL_LEN)	\
-{										\
-	int	diff;								\
-	TYPE	*cur_node, **target_node;					\
-										\
-	target_node = &ROOT;							\
-	while (cur_node = *target_node)	/* NOTE: Assignment!!! */		\
-	{									\
-		diff = memcmp(cur_node->FIELD, VALUE, LENGTH);			\
-		assert(0 != diff);						\
-		if (diff < 0)							\
-			target_node = &cur_node->left;				\
-		else								\
-			target_node = &cur_node->right;				\
-	}									\
-	GC_ALLOCATE_KEYSTORE_LINK(*target_node, TYPE);				\
-	(*target_node)->link = LINK;						\
-	memset((*target_node)->FIELD, 0, FILL_LEN);				\
-	memcpy((*target_node)->FIELD, VALUE, LENGTH);				\
-}
-
-/* Find a particular key based on a binary tree with a specific search criterion, such
- * as the key's name or hash. The macro causes the caller to return the found node.
- */
-#define LOOKUP_KEY(ROOT, TYPE, FIELD, VALUE, LENGTH, CHECK_NULL)		\
-{										\
-	int	diff;								\
-	TYPE	*cur_node;							\
-										\
-	cur_node = ROOT;							\
-	while (cur_node)							\
-	{									\
-		diff = memcmp(cur_node->FIELD, VALUE, LENGTH);			\
-		if (0 < diff)							\
-			cur_node = cur_node->right;				\
-		else if ((0 == diff) &&						\
-			(CHECK_NULL						\
-			 ? '\0' == *(((char *)cur_node->FIELD) + LENGTH)	\
-			 : TRUE))						\
-			return cur_node->link;					\
-		else								\
-			cur_node = cur_node->left;				\
-	}									\
-	return NULL;								\
-}
-
-/* Insert a new gtm_keystore_unres_keyname_link_t element in the unresolved keys list. */
-#define INSERT_UNRESOLVED_KEY_LINK(KEY, HASH, KEYNAME)				\
-{										\
-	gtm_keystore_unres_keyname_link_t *node;				\
-										\
-	node = (gtm_keystore_unres_keyname_link_t *)MALLOC(			\
-		SIZEOF(gtm_keystore_unres_keyname_link_t));			\
-	memcpy(node->key, KEY, SYMMETRIC_KEY_MAX);				\
-	memcpy(node->key_hash, HASH, GTMCRYPT_HASH_LEN);			\
-	memset(node->key_name, 0, GTM_PATH_MAX);				\
-	strncpy(node->key_name, KEYNAME, GTM_PATH_MAX);				\
-	node->next = keystore_by_unres_keyname_head;				\
-	keystore_by_unres_keyname_head = node;					\
-}
-
-/* Remove all elements from the unresolved keys tree. */
-#define REMOVE_UNRESOLVED_KEY_LINKS						\
-{										\
-	gtm_keystore_unres_keyname_link_t *curr, *temp;				\
-										\
-	curr = keystore_by_unres_keyname_head;					\
-	while (curr)								\
-	{									\
-		temp = curr->next;						\
-		FREE(curr);							\
-		curr = temp;							\
-	}									\
-	keystore_by_unres_keyname_head = NULL;					\
-}
-
 #endif /* GTMCRYPT_DBK_REF_H */
diff --git a/sr_unix/gtmcrypt_interface.h b/sr_unix/gtmcrypt_interface.h
index 1887daf..214fc7b 100644
--- a/sr_unix/gtmcrypt_interface.h
+++ b/sr_unix/gtmcrypt_interface.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -26,8 +27,11 @@
 /* Length of the key name (which for databases is an absolute path to the file). */
 #define GTMCRYPT_MAX_KEYNAME_LEN	GTM_PATH_MAX
 
+/* Definitions must match those in gtm_tls_interface.h */
 /* Flag to be used whenever password can be obtained interactively. */
 #define GTMCRYPT_OP_INTERACTIVE_MODE	0x00000001
+/* No environment variable for password - used by gc_update_passwd so must be same in gtmcrypt_interface.h */
+#define	GTMCRYPT_OP_NOPWDENVVAR		0x00000800
 
 /* Special value that indicates invalid / uninitialized encryption state object. */
 #define GTMCRYPT_INVALID_KEY_HANDLE	NULL
diff --git a/sr_unix/gtmcrypt_ref.c b/sr_unix/gtmcrypt_ref.c
index 4dc4358..bdcdf9a 100644
--- a/sr_unix/gtmcrypt_ref.c
+++ b/sr_unix/gtmcrypt_ref.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc *
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -116,6 +117,8 @@ gtm_status_t gtmcrypt_init(gtm_int_t flags)
 	gtmcrypt_inited = TRUE;
 	gtmcrypt_init_flags = flags;
 	gtmcrypt_err_string[0] = '\0';
+	if (0 != gc_pk_gpghome_has_permissions())
+		return -1;
 	return 0;
 }
 
@@ -178,6 +181,7 @@ gtm_status_t gtmcrypt_init_device_cipher_context_by_keyname(gtmcrypt_key_t *hand
 									 gtm_string_t iv, gtm_int_t operation)
 {
 	gtm_keystore_t		*entry;
+	char			key_name[GTM_PATH_MAX];
 	gtm_cipher_ctx_t	**ctx;
 
 	GC_VERIFY_INITED;
@@ -185,7 +189,10 @@ gtm_status_t gtmcrypt_init_device_cipher_context_by_keyname(gtmcrypt_key_t *hand
 	gtmcrypt_err_string[0] = '\0';
 	CHECK_IV_LENGTH(iv);
 	ctx = (gtm_cipher_ctx_t **)handle;
-	if (0 != gtmcrypt_getkey_by_keyname(keyname.address, keyname.length, &entry, FALSE, FALSE))
+	/* NULL-terminating to ensure correct lookups. */
+	memset(key_name, 0, GTM_PATH_MAX);
+	memcpy(key_name, keyname.address, keyname.length);
+	if (0 != gtmcrypt_getkey_by_keyname(key_name, keyname.length, &entry, FALSE))
 		return -1;
 	assert(NULL != entry);
 	if (0 != keystore_new_cipher_ctx(entry, iv.address, iv.length, operation))
@@ -220,7 +227,7 @@ gtm_status_t gtmcrypt_obtain_db_key_hash_by_keyname(gtm_string_t keyname, gtm_st
 		return -1;
 	}
 	length = strlen(real_filename);
-	if (0 != gtmcrypt_getkey_by_keyname(real_filename, length + 1, &entry, TRUE, TRUE))
+	if (0 != gtmcrypt_getkey_by_keyname(real_filename, length, &entry, TRUE))
 		return -1;
 	assert(NULL != entry);
 	hash_dest->length = GTMCRYPT_HASH_LEN;
diff --git a/sr_unix/gtmcrypt_util.c b/sr_unix/gtmcrypt_util.c
index b870932..5821d61 100644
--- a/sr_unix/gtmcrypt_util.c
+++ b/sr_unix/gtmcrypt_util.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -293,8 +294,10 @@ void gc_freeup_pwent(passwd_entry_t *pwent)
 {
 	assert(NULL != pwent);
 	memset(pwent->passwd, 0, pwent->passwd_len);
-	FREE(pwent->passwd);
-	FREE(pwent->env_value);
+	if (NULL != pwent->passwd)
+		FREE(pwent->passwd);
+	if (NULL != pwent->env_value)
+		FREE(pwent->env_value);
 	FREE(pwent);
 }
 
@@ -305,38 +308,60 @@ int gc_update_passwd(char *name, passwd_entry_t **ppwent, char *prompt, int inte
 	gtm_string_t	passwd_str, tmp_passwd_str;
 	passwd_entry_t	*pwent;
 
-	if (!(lpasswd = getenv(name)))
+	pwent = *ppwent;
+	if (!(GTMCRYPT_OP_NOPWDENVVAR & interactive))
 	{
-		UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, name);
-		return -1;
+		if (!(lpasswd = getenv(name)))
+		{
+			UPDATE_ERROR_STRING(ENV_UNDEF_ERROR, name);
+			return -1;
+		}
+		if ((NULL != pwent) && (0 == strcmp(pwent->env_value, lpasswd)))
+			return 0;	/* No change in the environment value. Nothing more to do. */
+	} else
+	{
+		if ((NULL != pwent) && (NULL != pwent->env_value))
+			lpasswd = pwent->env_value;
+		else
+		{
+			UPDATE_ERROR_STRING("No passphrase provided for %s", name);
+			if (NULL != pwent)
+				gc_freeup_pwent(pwent);
+			return -1;
+		}
 	}
-	pwent = *ppwent;
-	if ((NULL != pwent) && (0 == strcmp(pwent->env_value, lpasswd)))
-		return 0;	/* No change in the environment value. Nothing more to do. */
 	len = STRLEN(lpasswd);
-	if (0 != len % 2)
+	if (0 != (len % 2))
 	{
 		UPDATE_ERROR_STRING("Environment variable %s must be a valid hexadecimal string of even length less than %d. "
 			"Length is odd", name, GTM_PASSPHRASE_MAX);
+		if (NULL != pwent)
+			gc_freeup_pwent(pwent);
 		return -1;
 	}
-	if (GTM_PASSPHRASE_MAX * 2 <= len)
+	if ((GTM_PASSPHRASE_MAX * 2) <= len)
 	{
 		UPDATE_ERROR_STRING("Environment variable %s must be a valid hexadecimal string of even length less than %d. "
 			"Length is %d", name, GTM_PASSPHRASE_MAX, len);
+		if (NULL != pwent)
+			gc_freeup_pwent(pwent);
 		return -1;
 	}
-	if (NULL != pwent)
-		gc_freeup_pwent(pwent);
-	pwent = MALLOC(SIZEOF(passwd_entry_t));
-	pwent->env_value = MALLOC(len ? len + 1 : GTM_PASSPHRASE_MAX * 2 + 1);
+	if (!(GTMCRYPT_OP_NOPWDENVVAR & interactive))
+	{
+		if (NULL != pwent)
+			gc_freeup_pwent(pwent);
+		pwent = MALLOC(SIZEOF(passwd_entry_t));
+		pwent->env_value = MALLOC(len ? len + 1 : GTM_PASSPHRASE_MAX * 2 + 1);
+		env_name = pwent->env_name;
+		strncpy(env_name, name, SIZEOF(pwent->env_name));
+		env_name[SIZEOF(pwent->env_name) - 1] = '\0';
+	} else
+		env_name = pwent->env_name;
 	pwent->passwd_len = len ? len / 2 + 1 : GTM_PASSPHRASE_MAX + 1;
 	pwent->passwd = MALLOC(pwent->passwd_len);
-	env_name = pwent->env_name;
 	env_value = pwent->env_value;
 	passwd = pwent->passwd;
-	strncpy(env_name, name, SIZEOF(pwent->env_name));
-	env_name[SIZEOF(pwent->env_name) - 1] = '\0';
 	if (0 < len)
 	{
 		/* First, convert from hexadecimal representation to regular representation */
@@ -345,6 +370,8 @@ int gc_update_passwd(char *name, passwd_entry_t **ppwent, char *prompt, int inte
 		{
 			UPDATE_ERROR_STRING("Environment variable %s must be a valid hexadecimal string of even length "
 				"less than %d. '%c' is not a valid digit (0-9, a-f, or A-F)", name, GTM_PASSPHRASE_MAX, passwd[0]);
+			if (NULL != pwent)
+				gc_freeup_pwent(pwent);
 			return -1;
 		}
 		/* Now, unobfuscate to get the real password */
@@ -362,7 +389,7 @@ int gc_update_passwd(char *name, passwd_entry_t **ppwent, char *prompt, int inte
 	/* Environment variable is set to an empty string. Prompt for password. But, first check if we are running in interactive
 	 * mode. If not, return with an error.
 	 */
-	if (!interactive)
+	if (!(GTMCRYPT_OP_INTERACTIVE_MODE & interactive))
 	{
 		UPDATE_ERROR_STRING("Environment variable %s set to empty string. "
 					"Cannot prompt for password in this mode of operation.", env_name);
diff --git a/sr_unix/gtminstall.sh b/sr_unix/gtminstall.sh
index 3e94416..5ab000c 100644
--- a/sr_unix/gtminstall.sh
+++ b/sr_unix/gtminstall.sh
@@ -1,7 +1,8 @@
 #!/bin/sh -
 #################################################################
 #                                                               #
-#       Copyright 2014 Fidelity Information Services, Inc       #
+# Copyright (c) 2014-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #                                                               #
 #       This source code contains the intellectual property     #
 #       of its copyright holder(s), and is made available       #
@@ -458,6 +459,7 @@ chmod +x configure.sh
 if [ "Y" = "$gtm_dryrun" ] ; then echo Installation prepared in $gtm_tmp ; exit ; fi
 
 ./configure.sh <$gtm_configure_in 1> $gtm_tmp/configure_${timestamp}.out 2>$gtm_tmp/configure_${timestamp}.err
+if [ $? -gt 0 ] ; then cat $gtm_tmp/configure_${timestamp}.out $gtm_tmp/configure_${timestamp}.err ; fi
 if [ "Y" = "$gtm_verbose" ] ; then echo Installation complete ; ls -l $gtm_installdir ; fi
 
 # Create copies of environment scripts and gtm executable
diff --git a/sr_vvms/iomb_wtone.c b/sr_unix/gtmio_ch.c
similarity index 63%
rename from sr_vvms/iomb_wtone.c
rename to sr_unix/gtmio_ch.c
index 57baf98..1f0b444 100644
--- a/sr_vvms/iomb_wtone.c
+++ b/sr_unix/gtmio_ch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2015 Fidelity National Information 		*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,18 +9,16 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
+
 #include "io.h"
+#include "error.h"
 
-void iomb_wtone(int v)
-{
-	mstr	temp;
-	char 	p[1];
+GBLREF boolean_t in_prin_gtmio;
 
-	p[0] = (char)v;
-	temp.len = 1;
-	temp.addr = p;
-	iomb_write(&temp);
-	return;
+CONDITION_HANDLER(gtmio_ch)
+{
+	START_CH(TRUE);
+	in_prin_gtmio = FALSE;
+	NEXTCH;
 }
diff --git a/sr_unix/gtmprofile.gtc b/sr_unix/gtmprofile.gtc
index c999109..e7467eb 100644
--- a/sr_unix/gtmprofile.gtc
+++ b/sr_unix/gtmprofile.gtc
@@ -1,6 +1,7 @@
 #################################################################
 #                                                               #
-#       Copyright 2010, 2014 Fidelity Information Services, Inc.#
+# Copyright (c) 2010-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #                                                               #
 #       This source code contains the intellectual property     #
 #       of its copyright holder(s), and is made available       #
@@ -74,48 +75,25 @@ if [ $gtm_dist != "$old_gtm_dist" ] ; then
     else gtmroutines=$gtm_dist ; fi
     export gtmroutines
     # Set $gtm_icu_version if icu-config is available - should be set before checking for UTF-8 mode
-    # use whence on z/OS and which elsewhere
-    if [ "zos" = $arch ] ; then
-	which="whence"
-    else
-	which="which"
-    fi
-    if [ -z "$gtm_icu_version" -a -n "`$which icu-config`" ] ; then
-	gtm_icu_version=`icu-config --version | gtm_chset=M $gtm_dist/mumps -run %XCMD 'Read x Write $Select(+x>48:$Piece(x,".",1)/10,1:$Piece(x,".",1,2))'`
+    if [ -z "$gtm_icu_version" -a -n "`which icu-config`" ] ; then
+	gtm_icu_version=`icu-config --version | gtm_chset=M $gtm_dist/mumps -run %XCMD 'Read x Write $FNumber(x*$Select(+x>5:.1,1:1),"",1)'`
         export gtm_icu_version
     fi
 
     # If UTF-8 is selected, and UTF-8 mode works, set $gtm_dist to utf8 subdirectory
     # Note that if UTF-8 mode cannot be properly set, GT.M remains configured for M mode
-    if [ "zos" = $arch ] ; then
-	# for z/OS make sure the en_US.UTF-8 locale is available and set $gtm_chset_locale if it is
-	utflocale=`locale -a | grep -i en_us | grep -i utf | sed 's/.lp64$//' | grep '8$' | head -n 1`
-	if [ "`echo $gtm_chset|tr utf UTF`" = "UTF-8" -a -d $gtm_dist/utf8 -a $utflocale = en_US.UTF-8 ] ; then
-		gtm_chset_locale=$utflocale; export gtm_chset_locale
-		if [ "`echo Halt | gtm_prompt='GTM>' $gtm_dist/utf8/mumps -dir | tail -n 1`" = 'GTM>' ] ; then
-		    gtm_dont_tag_UTF8_ASCII=0; export gtm_dont_tag_UTF8_ASCII
-		    gtm_dist=$gtm_dist/utf8
-		    if [ -f "$gtm_dist/libgtmutil.$tmp_gtm_shlib" ] ; then
-			gtmroutines="$gtm_dist/libgtmutil.$tmp_gtm_shlib $gtm_dist"
-		    else gtmroutines=$gtm_dist ; fi
-		else
-		    unset gtm_chset_locale  # undo the set
-		fi
-	fi
-    else
-	# default $LC_CTYPE if not set
-	if [ "`echo $gtm_chset|tr utf UTF`" = "UTF-8" -a -d $gtm_dist/utf8 ] ; then
-		if [ -z "$LC_CTYPE" ] ; then
-			LC_CTYPE=`locale -a | grep -i .utf | head -n 1` ; export LC_CTYPE
-		fi
-		echo $LC_CTYPE | grep -i .utf > /dev/null
-		if [ $? = 0 -a "`echo Halt | gtm_prompt='GTM>' $gtm_dist/utf8/mumps -dir | tail -n 1`" = 'GTM>' ] ; then
-			gtm_dist=$gtm_dist/utf8
-			if [ -f "$gtm_dist/libgtmutil.$tmp_gtm_shlib" ] ; then
-				gtmroutines="$gtm_dist/libgtmutil.$tmp_gtm_shlib $gtm_dist"
-			else gtmroutines=$gtm_dist ; fi
-		fi
-	fi
+    # default $LC_CTYPE if not set
+    if [ "`echo $gtm_chset|tr utf UTF`" = "UTF-8" -a -d $gtm_dist/utf8 ] ; then
+    	if [ -z "$LC_CTYPE" ] ; then
+    		LC_CTYPE=`locale -a | grep -iE '\.utf.?8$' | head -n1` ; export LC_CTYPE
+    	fi
+    	echo $LC_CTYPE | grep -i .utf > /dev/null
+    	if [ $? = 0 -a "`echo Halt | gtm_prompt='GTM>' $gtm_dist/utf8/mumps -dir | tail -n 1`" = 'GTM>' ] ; then
+    		gtm_dist=$gtm_dist/utf8
+    		if [ -f "$gtm_dist/libgtmutil.$tmp_gtm_shlib" ] ; then
+    			gtmroutines="$gtm_dist/libgtmutil.$tmp_gtm_shlib $gtm_dist"
+    		else gtmroutines=$gtm_dist ; fi
+    	fi
     fi
 
     # Set $gtmver - must be set before $gtmroutines and $gtm_prompt are set
diff --git a/sr_unix/gtmrecv_process.c b/sr_unix/gtmrecv_process.c
index e0ebbe2..11db90d 100644
--- a/sr_unix/gtmrecv_process.c
+++ b/sr_unix/gtmrecv_process.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2006, 2014 Fidelity Information Services, Inc.*
+ * Copyright (c) 2006-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -3379,22 +3380,6 @@ STATICFNDEF void do_main_loop(boolean_t crash_restart)
 					/* Assert that endianness_known and cross_endian have already been initialized.
 					 * This ensures that remote_side->cross_endian is reliable */
 					assert(remote_side->endianness_known);
-					if (jnlpool.repl_inst_filehdr->was_rootprimary)
-					{	/* This is the first time an instance that was formerly a root primary
-						 * is brought up as an immediate secondary of the new root primary. Once
-						 * fetchresync rollback has happened and the receiver and source server
-						 * have communicated successfully, the instance file header field that
-						 * indicates this was a root primary can be reset to FALSE as the zero
-						 * or non-zeroness of the "zqgblmod_seqno" field in the respective
-						 * database file headers henceforth controls whether this instance can
-						 * be brought up as a tertiary or not. Flush changes to file on disk.
-						 */
-						grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, GRAB_LOCK_ONLY);
-						GTMRECV_ONLN_RLBK_CLNUP_IF_NEEDED;
-						jnlpool.repl_inst_filehdr->was_rootprimary = FALSE;
-						repl_inst_flush_filehdr();
-						rel_lock(jnlpool.jnlpool_dummy_reg);
-					}
 					assert(REPL_PROTO_VER_MULTISITE <= remote_side->proto_ver);
 					assert(msg_len == MIN_REPL_MSGLEN - REPL_MSG_HDRLEN);
 					start_msg = (repl_start_reply_msg_ptr_t)(buffp - msg_len - REPL_MSG_HDRLEN);
@@ -3458,6 +3443,22 @@ STATICFNDEF void do_main_loop(boolean_t crash_restart)
 						break;
 					}
 					/* Handle REPL_WILL_RESTART_WITH_INFO case now */
+					if (jnlpool.repl_inst_filehdr->was_rootprimary && jnlpool.jnlpool_ctl->upd_disabled)
+					{	/* This is the first time an instance that was formerly a root primary
+						 * is brought up as an immediate secondary of the new root primary. Once
+						 * fetchresync rollback has happened and the receiver and source server
+						 * have communicated successfully, the instance file header field that
+						 * indicates this was a root primary can be reset to FALSE as the zero
+						 * or non-zeroness of the "zqgblmod_seqno" field in the respective
+						 * database file headers henceforth controls whether this instance can
+						 * be brought up as a tertiary or not. Flush changes to file on disk.
+						 */
+						grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, GRAB_LOCK_ONLY);
+						GTMRECV_ONLN_RLBK_CLNUP_IF_NEEDED;
+						jnlpool.repl_inst_filehdr->was_rootprimary = FALSE;
+						repl_inst_flush_filehdr();
+						rel_lock(jnlpool.jnlpool_dummy_reg);
+					}
 					assert(REPL_WILL_RESTART_WITH_INFO == msg_type);
 					repl_log(gtmrecv_log_fp, TRUE, TRUE, "Received REPL_WILL_RESTART_WITH_INFO message"
 							" with seqno "INT8_FMT" "INT8_FMTX"\n", recvd_jnl_seqno, recvd_jnl_seqno);
diff --git a/sr_unix/gtmsource.c b/sr_unix/gtmsource.c
index 6d46812..84225c3 100644
--- a/sr_unix/gtmsource.c
+++ b/sr_unix/gtmsource.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -145,6 +146,25 @@ int gtmsource()
 		repl_log(stdout, TRUE, TRUE, "Initiating START of source server for secondary instance [%s]\n",
 			gtmsource_options.secondary_instname);
 	}
+	if (gtmsource_options.activate && (ROOTPRIMARY_SPECIFIED == gtmsource_options.rootprimary))
+	{	/* MUPIP REPLIC -SOURCE -ACTIVATE -UPDOK has been specified. We need to open the gld and db regions now
+		 * in case this is a secondary -> primary transition. This is so we can later switch journal files in all
+		 * journaled regions when the transition actually happens inside "gtmsource_rootprimary_init". But since
+		 * we have not yet done a "jnlpool_init", we dont know if updates are disabled in it or not. Although we
+		 * need to do the gld/db open only if updates are currently disabled in the jnlpool, we do this always
+		 * because once we do a jnlpool_init, we will come back with the ftok on the jnlpool held and that has
+		 * issues with later db open since we will try to hold the db ftok as part of db open and the ftok logic
+		 * currently has assumptions that a process holds only one ftok at any point in time.
+		 */
+		assert(NULL == gd_header);
+		gvinit();
+		all_files_open = region_init(FALSE);
+		if (!all_files_open)
+		{
+			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOTALLDBOPN);
+			gtmsource_exit(ABNORMAL_SHUTDOWN);
+		}
+	}
 	jnlpool_init(GTMSOURCE, gtmsource_options.start, &is_jnlpool_creator);
 	/* is_jnlpool_creator == TRUE ==> this process created the journal pool
 	 * is_jnlpool_creator == FALSE ==> journal pool already existed and this process simply attached to it.
diff --git a/sr_unix/gtmsource_get_opt.c b/sr_unix/gtmsource_get_opt.c
index eaf9eff..06bd6b9 100644
--- a/sr_unix/gtmsource_get_opt.c
+++ b/sr_unix/gtmsource_get_opt.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2006, 2014 Fidelity Information Services, Inc.*
+ * Copyright (c) 2006-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -58,6 +59,7 @@ GBLREF	gtmsource_options_t	gtmsource_options;
 #ifdef GTM_TLS
 GBLREF	repl_tls_info_t		repl_tls;
 #endif
+GBLREF	volatile boolean_t	timer_in_handler;
 
 error_def(ERR_GETADDRINFO);
 error_def(ERR_LOGTOOLONG);
@@ -67,7 +69,7 @@ error_def(ERR_TEXT);
 
 int gtmsource_get_opt(void)
 {
-	char		*connect_parm_token_str, *connect_parm;
+	char		*connect_parm_token_str, *connect_parm, *strtokptr;
 	char		*connect_parms_str, tmp_connect_parms_str[GTMSOURCE_CONN_PARMS_LEN + 1];
 	char		secondary_sys[MAX_SECONDARY_LEN], *c, inst_name[MAX_FN_LEN + 1];
 	char		statslog_val[SIZEOF("OFF")]; /* "ON" or "OFF" */
@@ -232,9 +234,7 @@ int gtmsource_get_opt(void)
 			     connect_parm_token_str = connect_parms_str;
 			     !connect_parms_badval &&
 			     connect_parms_index < GTMSOURCE_CONN_PARMS_COUNT &&
-			     (connect_parm = strtok(connect_parm_token_str,
-						    GTMSOURCE_CONN_PARMS_DELIM))
-			     		   != NULL;
+			     (connect_parm = STRTOK_R(connect_parm_token_str, GTMSOURCE_CONN_PARMS_DELIM, &strtokptr)) != NULL;
 			     connect_parms_index++,
 			     connect_parm_token_str = NULL)
 
diff --git a/sr_unix/gtmsource_rootprimary_init.c b/sr_unix/gtmsource_rootprimary_init.c
index 2d748dc..c8efd33 100644
--- a/sr_unix/gtmsource_rootprimary_init.c
+++ b/sr_unix/gtmsource_rootprimary_init.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2006-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,11 +26,17 @@
 #include "gtmsource.h"
 #include "repl_instance.h"
 #include "jnl.h"
+#include "change_reg.h"
 
-GBLREF	jnlpool_addrs	jnlpool;
-GBLREF	uint4		process_id;
-GBLREF	jnl_gbls_t	jgbl;
+GBLREF	jnlpool_addrs		jnlpool;
+GBLREF	uint4			process_id;
+GBLREF	jnl_gbls_t		jgbl;
+GBLREF	gd_addr			*gd_header;
+GBLREF	gd_region		*gv_cur_region;
+GBLREF	sgmnt_addrs		*cs_addrs;
+GBLREF	sgmnt_data_ptr_t	cs_data;
 
+error_def(ERR_JNLEXTEND);
 
 /* This function is called primarily to append a new histinfo record to the replication instance file by one of the following
  *	1) MUPIP REPLIC -SOURCE -START -ROOTPRIMARY command (after forking the child source server) if it created the journal pool.
@@ -39,9 +46,13 @@ GBLREF	jnl_gbls_t	jgbl;
  */
 void	gtmsource_rootprimary_init(seq_num start_seqno)
 {
-	unix_db_info	*udi;
-	repl_histinfo	histinfo;
-	boolean_t	was_crit;
+	unix_db_info		*udi;
+	repl_histinfo		histinfo;
+	boolean_t		was_crit, switch_jnl;
+	gd_region		*reg, *region_top;
+	jnl_private_control	*jpc;
+	jnl_buffer_ptr_t	jbp;
+	uint4			jnl_status;
 
 	udi = FILE_INFO(jnlpool.jnlpool_dummy_reg);
 	assert(NULL != jnlpool.repl_inst_filehdr);
@@ -51,6 +62,11 @@ void	gtmsource_rootprimary_init(seq_num start_seqno)
 	if (!was_crit)
 		grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, ASSERT_NO_ONLINE_ROLLBACK);
 	jnlpool.repl_inst_filehdr->root_primary_cycle++;
+	/* If this instance is transitioning from a non-rootprimary to rootprimary, switch journal files.
+	 * This helps with maintaining accurate value of csd->zqgblmod_tn when the former primary connects
+	 * to the current primary through a fetchresync-rollback or receiver-server-autorollback..
+	 */
+	switch_jnl = (!jnlpool.repl_inst_filehdr->was_rootprimary && (0 < jnlpool.repl_inst_filehdr->num_histinfo));
 	jnlpool.repl_inst_filehdr->was_rootprimary = TRUE;
 	assert(start_seqno >= jnlpool.jnlpool_ctl->start_jnl_seqno);
 	assert(start_seqno == jnlpool.jnlpool_ctl->jnl_seqno);
@@ -98,4 +114,38 @@ void	gtmsource_rootprimary_init(seq_num start_seqno)
 	repl_inst_histinfo_add(&histinfo);
 	if (!was_crit)
 		rel_lock(jnlpool.jnlpool_dummy_reg);
+	if (switch_jnl)
+	{
+		SET_GBL_JREC_TIME; /* jnl_ensure_open/jnl_file_extend and its callees assume jgbl.gbl_jrec_time is set */
+		for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions; reg < region_top; reg++)
+		{
+			gv_cur_region = reg;
+			change_reg();		/* sets cs_addrs/cs_data (needed by jnl_ensure_open) */
+			if (!JNL_ENABLED(cs_addrs))
+				continue;
+			grab_crit(gv_cur_region);
+			jpc = cs_addrs->jnl;
+			/* Before writing to jnlfile, adjust jgbl.gbl_jrec_time if needed to maintain time order of jnl
+			 * records. This needs to be done BEFORE the jnl_ensure_open as that could write journal records
+			 * (if it decides to switch to a new journal file)
+			 */
+			jbp = jpc->jnl_buff;
+			ADJUST_GBL_JREC_TIME(jgbl, jbp);
+			jnl_status = jnl_ensure_open();
+			if (0 == jnl_status)
+			{
+				if (EXIT_ERR == jnl_file_extend(jpc, 0))	/* Force jnl switch by passing in a 0 jrec_len */
+					rts_error_csa(CSA_ARG(cs_addrs) VARLSTCNT(4) ERR_JNLEXTEND, 2, JNL_LEN_STR(cs_data));
+			} else
+			{
+				if (SS_NORMAL != jpc->status)
+					rts_error_csa(CSA_ARG(cs_addrs) VARLSTCNT(7) jnl_status, 4, JNL_LEN_STR(cs_data),
+							DB_LEN_STR(gv_cur_region), jpc->status);
+				else
+					rts_error_csa(CSA_ARG(cs_addrs) VARLSTCNT(6) jnl_status, 4, JNL_LEN_STR(cs_data),
+							DB_LEN_STR(gv_cur_region));
+			}
+			rel_crit(gv_cur_region);
+		}
+	}
 }
diff --git a/sr_unix/gtmsource_srv_latch.c b/sr_unix/gtmsource_srv_latch.c
index 05cde74..d691cb9 100644
--- a/sr_unix/gtmsource_srv_latch.c
+++ b/sr_unix/gtmsource_srv_latch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -81,9 +82,11 @@ boolean_t	grab_gtmsource_srv_latch(sm_global_latch_ptr_t latch, uint4 max_timeou
 					 */
 					SNPRINTF(scndry_msg, OUT_BUFF_SIZE, "Instance file header has file_corrupt field set to "
 							"TRUE");
-					/* No need to release the latch before rts_error (mupip_exit_handler will do it for us) */
-					rts_error(VARLSTCNT(8) ERR_REPLREQROLLBACK, 2, LEN_AND_STR(udi->fn),
-						ERR_TEXT, 2, LEN_AND_STR(scndry_msg));
+					/* No need to release the latch before rts_error_csa (mupip_exit_handler will do it for
+					 * us).
+					 */
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_REPLREQROLLBACK, 2, LEN_AND_STR(udi->fn),
+						      ERR_TEXT, 2, LEN_AND_STR(scndry_msg));
 				}
 				cycle_mismatch = (repl_csa->onln_rlbk_cycle != jnlpool.jnlpool_ctl->onln_rlbk_cycle);
 				assert((ASSERT_NO_ONLINE_ROLLBACK != onln_rlbk_action) || !cycle_mismatch);
@@ -104,14 +107,15 @@ boolean_t	grab_gtmsource_srv_latch(sm_global_latch_ptr_t latch, uint4 max_timeou
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			if (RETRY_CASLATCH_CUTOFF == (retries % LOCK_TRIES))
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(latch, TRUE);
 		}
 	}
 	DUMP_LOCKHIST();
 	assert(FALSE);
 	assert(jnlpool.gtmsource_local && jnlpool.gtmsource_local->gtmsource_pid);
-	rts_error(VARLSTCNT(5) ERR_SRVLCKWT2LNG, 2, max_timeout_in_secs, jnlpool.gtmsource_local->gtmsource_pid);
+	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_SRVLCKWT2LNG, 2, max_timeout_in_secs, jnlpool.gtmsource_local->gtmsource_pid);
 	return FALSE; /* to keep the compiler happy */
 }
 
diff --git a/sr_unix/gtmthreadgblasm.m b/sr_unix/gtmthreadgblasm.m
new file mode 100644
index 0000000..bc90ee9
--- /dev/null
+++ b/sr_unix/gtmthreadgblasm.m
@@ -0,0 +1,196 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;								;
+; Copyright (c) 2014-2015 Fidelity National Information 	;
+;  Services, Inc. and/or its subsidiaries. All rights reserved.	;
+;								;
+;	This source code contains the intellectual property	;
+;	of its copyright holder(s), and is made available	;
+;	under a license.  If you do not know the terms of	;
+;	the license, please stop and do not read further.	;
+;								;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;
+; Routine to read gtm_threadgbl_deftypes.h and for the given platform and the threadgbl variables defined in the input
+; file gtm_threadgbl_asm_access.txt, generate the proper #define type declarations to enable assembler routine access
+; to those variables.
+;
+; Argument: Takes three file names as arguments
+;		$gtm_tools/gtm_threadgbl_asm_access.txt
+;		<gtm_threadgbl_defs generated input filename>
+;		<asm output filename>
+;
+; Output: This routine writes the following symbol defininitions for each field defined in gtm_threadgbl_asm_access.txt
+;
+;   - ggo_<fieldname> - Defines the variable's offset within the threadgbl structure.
+;   - ggl_<fieldname> - Defines the variable's data length (in bytes)
+;
+	set accesstxt=$piece($zcmdline," ",1)
+	set defsin=$piece($zcmdline," ",2)
+	set defsout=$piece($zcmdline," ",3)
+	set TAB=$char(9)
+	set months="January,February,March,April,May,June,July,August,September,October,November,December"
+	;
+	; Prefixes (for the desired variable name) we want to collect. All must be the same length
+	;
+	set varprefixcnt=2			; Count of variables below
+	set varprefix("# define ggo_")=1	; Defines variable offset
+	set varprefix("# define ggl_")=1	; Defines variable length
+	set varprefixlen=$zlength($order(varprefix("")))
+	;
+	; See which platform we are running on so we know how to generate records for variables
+	;
+	set platform("AIX","RS6000")="AIXOnPSeries"
+	set platform("HP-UX","IA64")="HPUXOnIA64"
+	set platform("Linux","x86")="LinuxOnX8632"
+	set platform("Linux","x86_64")="LinuxOnX8664"
+	set platform("Solaris","SPARC")="SolarisOnSPARC"
+	;
+	; Note AIX comments handled separated as their comments are the same as C.
+	;
+	set commentchar("HPUXOnIA64")="//"
+	set commentchar("LinuxOnX8632")="#"
+	set commentchar("LinuxOnX8664")="#"
+	set commentchar("SolarisOnSPARC")="!"
+	set gtmzv=$ZVersion
+	set gtmver=$ZPiece(gtmzv," ",2)
+	set gtmos=$ZPiece(gtmzv," ",3)
+	set gtmhdwr=$ZPiece(gtmzv," ",4)
+	if (0=$get(platform(gtmos,gtmhdwr))) do
+	. write "gtmthreadgblasm: Not running on a recognized platform",!
+	. zhalt 1
+	set platform=platform(gtmos,gtmhdwr)
+	set fmtrtn="formatrecfor"_platform
+	;
+	; Check argument
+	;
+	if ($zlength($zcmdline," ")'=3) do
+	. write "gtmthreadgblasm: Invalid arguments ",!
+	. write "gtmthreadgblasm: $gtm_tools/gtm_threadgbl_asm_access.txt <input file name>.in <output file name>.si",!
+	. zhalt 1
+	;
+	; Read in variable list to make available to assembler routines
+	;
+	set infile=accesstxt
+	open infile:readonly
+	use infile
+	set maxvarlen=0
+	for i=1:1 do  quit:$zeof
+	. read line
+	. quit:$zeof
+	. quit:(("#"=$extract(line,1))!(""=line))
+	. do verify(.line)
+	. set globacc(line)=0
+	. set globvarlen=$zlength(line)
+	. if (maxvarlen<globvarlen) set maxvarlen=globvarlen	; For formatting output
+	close infile
+	;
+	; Now that we have a list of variables to look for, open/read the gtm_threadgbl_deftypes.h file to look for entries
+	; to reformat for assembler usage.
+	;
+	set infile=defsin
+	set outfile=defsout
+	open infile:readonly
+	open outfile:new
+	use outfile
+	if ("AIXOnPSeries"=platform) do
+	. write "/*",!
+	. write " * Created by gtmthreadgblasm for version ",gtmver," on ",gtmos," ",gtmhdwr," (",defsout,")",!
+	. write " */",!
+	else  do
+	. write commentchar(platform),!
+	. write commentchar(platform)," Created by gtmthreadgblasm for version ",gtmver," on ",gtmos," ",gtmhdwr," (",defsout,")",!
+	. write commentchar(platform),!
+	for  use infile read line quit:$zeof  do
+	. quit:("#"'=$zextract(line,1))
+	. ;
+	. ; We now have a record to check if we need to gen
+	. ;
+	. quit:(0=$data(varprefix($zextract(line,1,varprefixlen))))	; Not the prefix we were looking for
+	. set varname=$zpiece($zextract(line,varprefixlen+1,999)," ",1)
+	. quit:(0=$data(globacc(varname)))			; Not for our variable
+	. ;
+	. ; We now have a record that we want to produce an assembler record for. How we do that depends on our platform
+	. ; so do the appropriate platform code.
+	. ;
+	. set globacc(varname)=globacc(varname)+1		; Bump count for this var
+	. set varname=$zpiece(line," ",3)			; This is the full varname with the ggX_ prefix
+	. set offorlen=$zpiece(line," ",4)			; offset or length
+	. do @fmtrtn@(varname,offorlen)
+	close infile
+	close outfile
+	use $p
+	;
+	; Now check that each variable we wanted to make sure it was found at least once (may or may not have had a length).
+	;
+	set idx=""
+	for  set idx=$order(globacc(idx)) quit:(""=idx)  do
+	. if (0=globacc(idx)) do
+	. . write "gtmthreadgblasm: Variable ",idx," was not found in the input file: ",infile," - output file may not be correct",!
+	quit
+
+
+;
+; Routine to take a line of input from the gtm_threadgbl_asm_access.txt file and syntax check it. We allow the following:
+;
+;   - trailing white space
+;   - trailing comments preceeded by a '#' character potentially preceeded by white space
+;
+; In either of the above conditions, the input line (passed by reference) is stripped of its trailing junk so only the
+; variable name itself is left when we return.
+;
+verify(line)
+	new newline,var
+	set newline=$translate(line,TAB," ")		; Change TABs to spaces to simplify checks
+	set var=$zpiece(newline," ",1)
+	if (""=var) do
+	. use $principal
+	. write "gtmthreadgblasm: invalid character(s) in variable specification on line "_i,!
+	. zhalt 1
+	set var=$zpiece(var,"#",1)			; Isolate variable name
+	set line=var
+	quit
+
+;
+; Routine to format record for AIX
+;
+formatrecforAIXOnPSeries(varname,offorlen)
+	use outfile
+	write "#define ",varname,?(maxvarlen+8)," ",offorlen,!
+	use infile
+	quit
+
+;
+; Routine to format record for HPUX on IA64
+;
+formatrecforHPUXOnIA64(varname,offorlen)
+	use outfile
+	write varname,?(maxvarlen+5),"= ",offorlen,!
+	use infile
+	quit
+
+;
+; Routine to format record for Linux x86-32
+;
+formatrecforLinuxOnX8632(varname,offorlen)
+	use outfile
+	write varname,?(maxvarlen+5),"= ",offorlen,!
+	use infile
+	quit
+
+;
+; Routine to format record for Linux x86-64
+;
+formatrecforLinuxOnX8664(varname,offorlen)
+	use outfile
+	write varname,?(maxvarlen+5),"= ",offorlen,!
+	use infile
+	quit
+
+;
+; Routine to format record for Solaris SPARC
+;
+formatrecforSolarisOnSPARC(varname,offorlen)
+	use outfile
+	write "#define ",varname,?(maxvarlen+8)," ",offorlen,!
+	use infile
+	quit
diff --git a/sr_unix/gv_trigger.h b/sr_unix/gv_trigger.h
index 527f8fe..672e6cd 100644
--- a/sr_unix/gv_trigger.h
+++ b/sr_unix/gv_trigger.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -350,6 +351,27 @@ typedef struct gvtr_invoke_parms_struct
 	DEBUG_ONLY(if (cdb_sc_normal == STATUS) donot_INVOKE_MUMTSTART = FALSE;)			\
 }
 
+/* Protect MVALs from garabage collection */
+#define INCR_AND_PUSH_MV_STENT(VAR)				\
+{								\
+	PUSH_MV_STENT(MVST_MVAL);				\
+	VAR = &mv_chain->mv_st_cont.mvs_mval;			\
+	VAR->mvtype = 0;					\
+	trig_protected_mval_push_count++;			\
+}
+
+#define DECR_AND_POP_MV_STENT()					\
+{								\
+	while (0 < trig_protected_mval_push_count--)		\
+		POP_MV_STENT();					\
+}
+
+#define RETURN_AND_POP_MVALS(RET)				\
+{ /* Convenience helper macro to avoid repeated retun & pop */	\
+	DECR_AND_POP_MV_STENT();				\
+	return RET;						\
+}
+
 #define	PUSH_ZTOLDMVAL_ON_M_STACK(ZTOLD_MVAL, SAVE_MSP, SAVE_MV_CHAIN)						\
 {														\
 	GBLREF	mv_stent		*mv_chain;								\
@@ -462,7 +484,6 @@ typedef struct gvtr_invoke_parms_struct
 /* Caller has to check for "NULL" value of "cs_addrs" and act accordingly */
 #define	GVTR_SWITCH_REG_AND_HASHT_BIND_NAME(reg)							\
 {													\
-	GBLREF	uint4		dollar_tlevel;								\
 	GBLREF	gv_namehead	*gv_target;								\
 	GBLREF	gd_region	*gv_cur_region;								\
 	GBLREF	gv_key		*gv_currkey;								\
diff --git a/sr_unix/gvcst_init_sysops.c b/sr_unix/gvcst_init_sysops.c
index f49d8db..da1ebd4 100644
--- a/sr_unix/gvcst_init_sysops.c
+++ b/sr_unix/gvcst_init_sysops.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -452,7 +453,7 @@ int db_init(gd_region *reg)
 {
 	boolean_t       	is_bg, read_only, sem_created = FALSE, need_stacktrace, have_standalone_access;
 	boolean_t		shm_setup_ok = FALSE, vermismatch = FALSE, vermismatch_already_printed = FALSE;
-	boolean_t		new_shm_ipc, do_crypt_init = FALSE, replinst_mismatch;
+	boolean_t		new_shm_ipc, do_crypt_init = FALSE, replinst_mismatch, need_shmctl, need_semctl;
 	char            	machine_name[MAX_MCNAMELEN];
 	int			gethostname_res, stat_res, user_id, group_id, perm, save_udi_semid;
 	int4            	status, semval, dblksize, fbwsize, save_errno, wait_time, loopcnt, sem_pid;
@@ -472,7 +473,6 @@ int db_init(gd_region *reg)
 	int			init_status;
 	gtm_uint64_t 		sec_size, mmap_sz;
 	semwait_status_t	retstat;
-	struct perm_diag_data	pdd;
 	boolean_t		bypassed_ftok = FALSE, bypassed_access = FALSE;
 	int			jnl_buffer_size;
 	char			s[JNLBUFFUPDAPNDX_SIZE];	/* JNLBUFFUPDAPNDX_SIZE is defined in jnl.h */
@@ -507,15 +507,7 @@ int db_init(gd_region *reg)
 	if (-1 == stat_res)
 		RTS_ERROR(VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), errno);
 	/* Setup new group and permissions if indicated by the security rules. */
-	if (gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_IPC, &pdd) < 0)
-	{
-		SEND_MSG(VARLSTCNT(6 + PERMGENDIAG_ARG_COUNT)
-			ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("ipc resources"), RTS_ERROR_STRING(udi->fn),
-			PERMGENDIAG_ARGS(pdd));
-		RTS_ERROR(VARLSTCNT(6 + PERMGENDIAG_ARG_COUNT)
-			ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("ipc resources"), RTS_ERROR_STRING(udi->fn),
-			PERMGENDIAG_ARGS(pdd));
-	}
+	gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_IPC);
 	/* if the process has standalone access, it will have udi->grabbed_access_sem set to TRUE at
 	 * this point. Note that down in a local variable as the udi->grabbed_access_sem will be set
 	 * to TRUE even for non-standalone access below and hence we can't rely on that later to determine if the process had
@@ -603,12 +595,22 @@ int db_init(gd_region *reg)
 				if (-1 == semctl(udi->semid, FTOK_SEM_PER_ID - 1, IPC_STAT, semarg))
 					RTS_ERROR(VARLSTCNT(9) ERR_DBFILERR, 2, DB_LEN_STR(reg),
 						  ERR_TEXT, 2, LEN_AND_LIT("Error with database control semctl IPC_STAT1"), errno);
-				if ((-1 != user_id) && (user_id != semstat.sem_perm.uid))
+				if ((INVALID_UID != user_id) && (user_id != semstat.sem_perm.uid))
+				{
 					semstat.sem_perm.uid = user_id;
-				if ((-1 != group_id) && (group_id != semstat.sem_perm.gid))
+					need_semctl = TRUE;
+				}
+				if ((INVALID_GID != group_id) && (group_id != semstat.sem_perm.gid))
+				{
 					semstat.sem_perm.gid = group_id;
-				semstat.sem_perm.mode = perm;
-				if (-1 == semctl(udi->semid, FTOK_SEM_PER_ID - 1, IPC_SET, semarg))
+					need_semctl = TRUE;
+				}
+				if (semstat.sem_perm.mode != perm)
+				{
+					semstat.sem_perm.mode = perm;
+					need_semctl = TRUE;
+				}
+				if (need_semctl && (-1 == semctl(udi->semid, FTOK_SEM_PER_ID - 1, IPC_SET, semarg)))
 					RTS_ERROR(VARLSTCNT(9) ERR_DBFILERR, 2, DB_LEN_STR(reg),
 						  ERR_TEXT, 2, LEN_AND_LIT("Error with database control semctl IPC_SET"), errno);
 				SET_GTM_ID_SEM(udi->semid, status);
@@ -844,13 +846,24 @@ int db_init(gd_region *reg)
 		if (-1 == shmctl(udi->shmid, IPC_STAT, &shmstat))
 			RTS_ERROR(VARLSTCNT(9) ERR_DBFILERR, 2, DB_LEN_STR(reg),
 				ERR_TEXT, 2, LEN_AND_LIT("Error with database control shmctl IPC_STAT1"), errno);
-		/* change group and permissions */
-		if ((-1 != user_id) && (user_id != shmstat.shm_perm.uid))
+		/* change uid, group-id and permissions if needed */
+		need_shmctl = FALSE;
+		if ((INVALID_UID != user_id) && (user_id != shmstat.shm_perm.uid))
+		{
 			shmstat.shm_perm.uid = user_id;
-		if ((-1 != group_id) && (group_id != shmstat.shm_perm.gid))
+			need_shmctl = TRUE;
+		}
+		if ((INVALID_GID != group_id) && (group_id != shmstat.shm_perm.gid))
+		{
 			shmstat.shm_perm.gid = group_id;
-		shmstat.shm_perm.mode = perm;
-		if (-1 == shmctl(udi->shmid, IPC_SET, &shmstat))
+			need_shmctl = TRUE;
+		}
+		if (shmstat.shm_perm.mode != perm)
+		{
+			shmstat.shm_perm.mode = perm;
+			need_shmctl = TRUE;
+		}
+		if (need_shmctl && (-1 == shmctl(udi->shmid, IPC_SET, &shmstat)))
 			RTS_ERROR(VARLSTCNT(9) ERR_DBFILERR, 2, DB_LEN_STR(reg),
 				  ERR_TEXT, 2, LEN_AND_LIT("Error with database control shmctl IPC_SET"), errno);
 		/* Warning: We must read the shm_ctime using IPC_STAT after IPC_SET, which changes it.
@@ -1093,7 +1106,6 @@ int db_init(gd_region *reg)
 		 */
 		if (csa->nl->donotflush_dbjnl && !jgbl.onlnrlbk)
 		{
-			assert(FALSE);
 			PRINT_CRASH_MESSAGE(0, csa->nl, ERR_TEXT, 2,
 				LEN_AND_LIT("mupip recover/rollback created shared memory. Needs MUPIP RUNDOWN"));
 		}
diff --git a/sr_unix/gvcst_spr_queryget.c b/sr_unix/gvcst_spr_queryget.c
index 38d58d3..eb97352 100644
--- a/sr_unix/gvcst_spr_queryget.c
+++ b/sr_unix/gvcst_spr_queryget.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -75,6 +76,7 @@ boolean_t	gvcst_spr_queryget(mval *cumul_val)
 	 * besides it does not hurt that much since only a M-stack entry gets pushed. So we err on the side of caution.
 	 */
 	val = &mv_chain->mv_st_cont.mvs_mval;
+	val->mvtype = 0; /* initialize mval in M-stack in case stp_gcol gets called before mkey gets initialized below */
 	addr = TREF(gd_targ_addr);
 	assert(NULL != addr);
 	gd_reg_start = &addr->regions[0];
@@ -98,7 +100,6 @@ boolean_t	gvcst_spr_queryget(mval *cumul_val)
 	cumul_key_len = 0;
 	DEBUG_ONLY(cumul_key[cumul_key_len] = KEY_DELIMITER;)
 	INCREMENT_GD_TARG_TN(gd_targ_tn); /* takes a copy of incremented "TREF(gd_targ_tn)" into local variable "gd_targ_tn" */
-	val->mvtype = 0; /* initialize mval in M-stack in case stp_gcol gets called before mkey gets initialized below */
 	assert(0 < gvnh_reg->gvspan->end_map_index);
 	assert(gvnh_reg->gvspan->end_map_index < addr->n_maps);
 	end_map = &addr->maps[gvnh_reg->gvspan->end_map_index];
diff --git a/sr_unix/gvcst_spr_zprevious.c b/sr_unix/gvcst_spr_zprevious.c
index 0fd9eda..1cffcf3 100644
--- a/sr_unix/gvcst_spr_zprevious.c
+++ b/sr_unix/gvcst_spr_zprevious.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -103,6 +104,12 @@ boolean_t	gvcst_spr_zprevious(void)
 		 */
 		if (gv_target->root)
 			found = gvcst_zprevious();
+		if (gv_target != start_map_gvt)
+		{	/* Restore gv_cur_region/gv_target etc. */
+			gv_target = start_map_gvt;
+			gv_cur_region = start_map->reg.addr;
+			change_reg();
+		}
 		return found;
 	}
 	/* Do any initialization that is independent of retries BEFORE the op_tstart */
diff --git a/sr_unix/incr_link.c b/sr_unix/incr_link.c
index d33a815..f5b0104 100644
--- a/sr_unix/incr_link.c
+++ b/sr_unix/incr_link.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -41,6 +42,7 @@
 #include "zbreak.h"
 #include "interlock.h"
 #include "util.h"
+#include "arlinkdbg.h"
 
 /* Define linkage types */
 typedef enum
@@ -55,7 +57,7 @@ typedef enum
 
 /* This macro will check if the file is an old non-shared-binary variant of GT.M code and if
  * so just return IL_RECOMPILE to signal a recompile. The assumption is that if we fall out of this
- * macro that there is truly a problem and other measures should be taken (e.g. call zlerror()).
+ * macro that there is truly a problem and other measures should be taken (e.g. call zl_error()).
  * At some point this code can be disabled with the NO_NONUSB_RECOMPILE varible defined. Rather
  * than keep old versions of control blocks around that will confuse the issue, we know that the
  * routine header of these versions started 10 32bit words into the object. Read in the eight
@@ -64,16 +66,15 @@ typedef enum
 #ifndef NO_NONUSB_RECOMPILE
 #  define CHECK_NONUSB_RECOMPILE_RETURN								\
 {												\
-	if (-1 != (status = (ssize_t)lseek(file_desc, COFFHDRLEN, SEEK_SET)))			\
+	if (-1 != (status = (ssize_t)lseek(*file_desc, COFFHDRLEN, SEEK_SET)))			\
 	{											\
-		DOREADRC_OBJFILE(file_desc, marker, SIZEOF(JSB_MARKER) - 1, status);		\
+		DOREADRC_OBJFILE(*file_desc, marker, SIZEOF(JSB_MARKER) - 1, status);		\
 	} else											\
 		status = errno;									\
 	if ((0 == status) && (0 == MEMCMP_LIT(marker, JSB_MARKER)))				\
 	{											\
-		free(hdr);									\
-		hdr = NULL;									\
-		RELEASE_RECENT_ZHIST;								\
+		ZOS_FREE_TEXT_SECTION;								\
+		zl_error_hskpng(linktyp, file_desc, RECENT_ZHIST);				\
 		return IL_RECOMPILE;	/* Signal recompile */					\
 	}											\
 }
@@ -81,6 +82,16 @@ typedef enum
 #  define CHECK_NONUSB_RECOMPILE_RETURN 	/* No old recompile check is being generated */
 #endif
 
+/* Define debugging macro for low-level relinking issues */
+/* #define DEBUG_LOW_RELINK*/
+#ifdef DEBUG_LOW_RELINK
+#  define DBGLRL(x) DBGFPF(x)
+#  define DBGLRL_ONLY(x) x
+#else
+#  define DBGLRL(x)
+#  define DBGLRL_ONLY(x)
+#endif
+
 /* At some point these statics (like all the others) need to move into gtm_threadgbl since these values should
  * *not* be shared amongst the threads of the future.
  */
@@ -91,6 +102,10 @@ GBLREF mident_fixed	zlink_mname;
 GBLREF mach_inst	jsb_action[JSB_ACTION_N_INS];
 GBLREF uint4		gtmDebugLevel;
 GBLREF boolean_t	gtm_utf8_mode;
+#ifdef DEBUG_ARLINK
+GBLREF mval		dollar_zsource;
+#endif
+
 #ifdef __MVS__
 GBLDEF unsigned char	*text_section;
 GBLDEF boolean_t	extended_symbols_present;
@@ -126,20 +141,20 @@ error_def(ERR_ZLINKFILE);
 
 STATICFNDCL void	res_free(res_list *root);
 STATICFNDCL boolean_t	addr_fix(int file, unsigned char *shdr, linktype linktyp, urx_rtnref *urx_lcl);
-STATICFNDCL void	zl_error(void *recent_zhist, linktype linktyp, int4 file, int4 err, int4 len, char *addr,
+STATICFNDCL void	zl_error(void *recent_zhist, linktype linktyp, int4 *file, int4 err, int4 len, char *addr,
 				 int4 len2, char *addr2);
-STATICFNDCL void	zl_error_hskpng(linktype linktyp, int4 file, void *recent_zhist);
+STATICFNDCL void	zl_error_hskpng(linktype linktyp, int4 *file, void *recent_zhist);
 
 /* incr_link - read and process a mumps object module.  Link said module to currently executing image */
 #ifdef AUTORELINK_SUPPORTED
-boolean_t incr_link(int file_desc, zro_ent *zro_entry, zro_hist *recent_zhist, uint4 fname_len, char *fname)
+boolean_t incr_link(int *file_desc, zro_ent *zro_entry, zro_hist *recent_zhist, uint4 fname_len, char *fname)
 #else
-boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fname)
+boolean_t incr_link(int *file_desc, zro_ent *zro_entry, uint4 fname_len, char *fname)
 #endif
 {
 	rhdtyp			*old_rhead;
 	rtn_tabent		*tabent_ptr;
-	int			sect_ro_rel_size, sect_rw_rel_size, name_buf_len, alloc_len, order;
+	int			sect_ro_rel_size, sect_rw_rel_size, name_buf_len, alloc_len, order, zerofd;
 	uint4			lcl_compiler_qlf;
 	boolean_t		dynlits;
 	ssize_t	 		status, sect_rw_nonrel_size, sect_ro_rel_offset;
@@ -156,10 +171,6 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 	char			name_buf[PATH_MAX + 1], marker[SIZEOF(JSB_MARKER) - 1], *rw_rel_start;
 	char			rtnname_buf[MAX_MIDENT_LEN];
 	linktype		linktyp;
-	va_list			save_last_va_list_ptr;
-	boolean_t		util_copy_saved;
-	char			*save_util_outptr;
-	int4			save_error_condition;
 	ZOS_ONLY(ESD		symbol;)
 #	ifdef _AIX
 	FILHDR          	hddr;
@@ -174,10 +185,21 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 	int			rtnlen;
 	char			save_char, *rtnname2;
 #	endif /* DEBUG */
+#	ifdef ZLINK_BYPASS
+	va_list			save_last_va_list_ptr;
+	boolean_t		util_copy_saved;
+	char			*save_util_outptr;
+	int4			save_error_condition;
+#	endif
 #	endif /* AUTORELINK_SUPPORTED */
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
+	if (NULL == file_desc)
+	{	/* Make sure file_desc can *always* be de-referenced */
+		zerofd = 0;
+		file_desc = &zerofd;
+	}
 #	ifdef __MVS__
 	total_length = 0;
 	extended_symbols_present = FALSE;
@@ -197,10 +219,11 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 	hdr = NULL;
 	shdr = NULL;
 	sect_ro_rel = sect_rw_rel = sect_rw_nonrel = NULL;
-	if (file_desc)
+	if (*file_desc)
 	{	/* This is a disk resident object we share if autorelink is enabled in that directory, or instead we
 		 * read/link into process private storage if autorelink is not enabled.
 		 */
+		assert(FD_INVALID != *file_desc);
 		if ((NULL == zro_entry) || (NULL == zro_entry->relinkctl_sgmaddr))
 		{
 			linktyp = LINK_PPRIVOBJ;
@@ -246,6 +269,28 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 		assert(NULL != zro_entry);
 		linktyp = LINK_SHRLIB;
 	}
+#	ifdef DEBUG_ARLINK
+	switch(linktyp)
+	{
+		case LINK_SHROBJ:
+		case LINK_PPRIVOBJ:
+			if (NULL != zro_entry)
+			{
+				DBGFPF((stderr, "incr_link: Requested to (re)link routine %.*s from %.*s\n", fname_len, fname,
+					zro_entry->str.len, zro_entry->str.addr));
+			} else
+			{
+				DBGFPF((stderr, "incr_link: Requested to (re)link routine %.*s from %.*s\n", fname_len, fname,
+					dollar_zsource.str.len, dollar_zsource.str.addr));
+			}
+			break;
+		default:						/* case LINK_SHRLIB: */
+			assert(LINK_SHRLIB == linktyp);
+			DBGFPF((stderr, "incr_link: Requested (re)link routine %.*s from shared library %.*s\n", fname_len, fname,
+				zro_entry->str.len, zro_entry->str.addr));
+			break;
+	}
+#	endif
 	/* Get the routine header where we can make use of it */
 	hdr = (rhdtyp *)malloc(SIZEOF(rhdtyp));
 	switch(linktyp)
@@ -264,10 +309,11 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 #		endif
 		case LINK_PPRIVOBJ:
 		case LINK_SHROBJ:
-			/* Seek past native object headers to get GT.M object's routine header */
-			/* To check if it is not an xcoff64 bit .o */
 #			ifdef _AIX
-			DOREADRC(file_desc, &hddr, SIZEOF(FILHDR), status);
+			/* Seek past native object headers to get GT.M object's routine header
+			 * To check if it is not an xcoff64 bit .o.
+			 */
+			DOREADRC(*file_desc, &hddr, SIZEOF(FILHDR), status);
 			if (0 == status)
 			{
 				magic = hddr.f_magic;
@@ -280,14 +326,14 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			} else
 				zl_error(RECENT_ZHIST, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 #			endif
+#			ifdef __MVS__
 			/* In the GOFF .o on zOS, if the symbol name(name of the module) exceeds ESD_NAME_MAX_LENGTH (8),
 			 * then 2 extra extended records are emitted, which causes the start of text section to vary
 			 */
-#			ifdef __MVS__
-			DOREADRC(file_desc, &symbol, SIZEOF(symbol), status);	/* This is HDR record */
+			DOREADRC(*file_desc, &symbol, SIZEOF(symbol), status);	/* This is HDR record */
 			if (0 == status)
 			{
-				DOREADRC(file_desc, &symbol, SIZEOF(symbol), status);	/* First symbol (ESD record) */
+				DOREADRC(*file_desc, &symbol, SIZEOF(symbol), status);	/* First symbol (ESD record) */
 				if (0 == status)
 				{
 					if (0x01 == symbol.ptv[1])	/* Means the extended records are there */
@@ -302,10 +348,10 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			if (0 != status)
 				zl_error(RECENT_ZHIST, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 #			endif
-			if (-1 != (status = (ssize_t)lseek(file_desc, NATIVE_HDR_LEN, SEEK_SET)))
+			if (-1 != (status = (ssize_t)lseek(*file_desc, NATIVE_HDR_LEN, SEEK_SET)))
 			{
-				ZOS_ONLY(extract_text(file_desc, &total_length));
-				DOREADRC_OBJFILE(file_desc, hdr, SIZEOF(rhdtyp), status);
+				ZOS_ONLY(extract_text(*file_desc, &total_length));
+				DOREADRC_OBJFILE(*file_desc, hdr, SIZEOF(rhdtyp), status);
 			} else
 				status = errno;
 			if (0 != status)
@@ -340,7 +386,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 				pre_v5_routine_name = (pre_v5_mident *)((char*)hdr + PRE_V5_RTNHDR_RTNOFF);
 				for (len = 0; len < SIZEOF(pre_v5_mident) && pre_v5_routine_name->c[len]; len++)
 					;
-				zl_error(RECENT_ZHIST, linktyp, 0, ERR_DLLVERSION, len, &(pre_v5_routine_name->c[0]),
+				zl_error(RECENT_ZHIST, linktyp, NULL, ERR_DLLVERSION, len, &(pre_v5_routine_name->c[0]),
 					 zro_entry->str.len, zro_entry->str.addr);
 			}
 #			if defined(__osf__) || defined(__hppa)
@@ -350,7 +396,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 				 */
 				v50v51_mstr	*mstr5051;	/* declare here so don't have to conditionally add above */
 				mstr5051 = (v50v51_mstr *)((char *)hdr + V50V51_RTNHDR_RTNMSTR_OFFSET);
-				zl_error(RECENT_ZHIST, linktyp, 0, ERR_DLLVERSION, mstr5051->len,
+				zl_error(RECENT_ZHIST, linktyp, NULL, ERR_DLLVERSION, mstr5051->len,
 					 ((char *)shdr + *(int4 *)((char *)hdr + V50V51_FTNHDR_LITBASE_OFFSET)
 					  + (int4)mstr5051->addr), zro_entry->str.len, zro_entry->str.addr);
 			}
@@ -359,7 +405,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			{	/* Note: routine_name field has not been relocated yet, so compute its absolute
 				 * address in the shared library and use it
 				 */
-				zl_error(RECENT_ZHIST, linktyp, 0, ERR_DLLVERSION, hdr->routine_name.len,
+				zl_error(RECENT_ZHIST, linktyp, NULL, ERR_DLLVERSION, hdr->routine_name.len,
 					(char *)shdr + (UINTPTR_T)hdr->literal_text_adr + (UINTPTR_T)hdr->routine_name.addr,
 					 zro_entry->str.len, zro_entry->str.addr);
 			}
@@ -377,12 +423,12 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			 */
 			if ((lcl_compiler_qlf & CQ_UTF8) && !gtm_utf8_mode)
 			{
-				zl_error(NULL, linktyp, 0, ERR_DLLCHSETUTF8, (int)hdr->routine_name.len,
+				zl_error(NULL, linktyp, NULL, ERR_DLLCHSETUTF8, (int)hdr->routine_name.len,
 					(char *)shdr + (UINTPTR_T)hdr->literal_text_adr + (UINTPTR_T)hdr->routine_name.addr,
 					 (int)zro_entry->str.len, zro_entry->str.addr);
 			} else
 			{
-				zl_error(NULL, linktyp, 0, ERR_DLLCHSETM, (int)hdr->routine_name.len,
+				zl_error(NULL, linktyp, NULL, ERR_DLLCHSETM, (int)hdr->routine_name.len,
 					(char *)shdr + (UINTPTR_T)hdr->literal_text_adr + (UINTPTR_T)hdr->routine_name.addr,
 					 (int)zro_entry->str.len, zro_entry->str.addr);
 			}
@@ -406,18 +452,18 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			rtnname_off = (size_t)hdr->literal_text_adr + (size_t)rtnname.addr;	/* Offset into object of rtnname */
 			ZOS_ONLY(assertpro(FALSE /* Read file pointer being reset - recode for ZOS */));
 			/* Read the routine name from the object file */
-			if (-1 != (status = (ssize_t)lseek(file_desc, rtnname_off + NATIVE_HDR_LEN, SEEK_SET)))
+			if (-1 != (status = (ssize_t)lseek(*file_desc, rtnname_off + NATIVE_HDR_LEN, SEEK_SET)))
 			{
-				DOREADRC_OBJFILE(file_desc, rtnname_buf, rtnname.len, status);
+				DOREADRC_OBJFILE(*file_desc, rtnname_buf, rtnname.len, status);
 			} else
 				status = errno;
 			if (0 != status)
-				zl_error(NULL, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
+				zl_error(RECENT_ZHIST, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 			rtnname.addr = rtnname_buf;
 			/* Reset read file-pointer for object file back to what it was */
-			status = (ssize_t)lseek(file_desc, NATIVE_HDR_LEN + SIZEOF(rhdtyp), SEEK_SET);
+			status = (ssize_t)lseek(*file_desc, NATIVE_HDR_LEN + SIZEOF(rhdtyp), SEEK_SET);
 			if (-1 == status)
-				zl_error(NULL, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
+				zl_error(RECENT_ZHIST, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 			break;
 		case LINK_SHRLIB:
 			rtnname = ((rhdtyp *)shdr)->routine_name;
@@ -445,8 +491,13 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 #		else
 		if (old_rhead->objhash == ((rhdtyp *)hdr)->objhash)
 #		endif
-		{	/* This is the same routine - abort re-link but if autorelink-enabled, use the new history.
-			 * Note even a psueo-relink should cancel all the breakpoints in the module. Note we don't address
+		{	/* This is the same routine - abort re-link but if autorelink-enabled, use the new history. The reason
+			 * we do this is we should behave at this point as-if we *had* done the relink. That and the fact that
+			 * we don't want this routine to attempt to reload itself on every call dictates that we get rid of the
+			 * old history we had (with old cycle values) and instead use the new history with the latest cycle
+			 * numbers - as if this routine *had been* relinked.
+			 *
+			 * Note even a pseudo-relink should cancel all the breakpoints in the module. Note we don't address
 			 * issues with whether this would have been a recursive relink or not since when we don't actually do
 			 * the relink, there's no way to remove breakpoints when the last use of this routine leaves the stack
 			 * so eliminate the breakpoints now since newly linked routines are anyway not expected to have
@@ -456,6 +507,8 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			/* Info level message that link was bypassed. Since this could pollute the error buffer, save and
 			 * restore it across the info message we put out (it is either displayed or it isn't - no need to cache it.
 			 */
+			DBGARLNK((stderr, "incr_link: Bypassing (re)zlink for routine %.*s (old rhead 0x"lvaddr") - same objhash\n",
+				  old_rhead->routine_name.len, old_rhead->routine_name.addr, old_rhead));
 #			ifdef ZLINK_BYPASS /* #ifdef'd out for now due to issues with ERRWETRAP */
 			SAVE_UTIL_OUT_BUFFER(save_util_outptr, save_last_va_list_ptr, util_copy_saved);
 			save_error_condition = error_condition;
@@ -464,7 +517,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			error_condition = save_error_condition;
 			RESTORE_UTIL_OUT_BUFFER(save_util_outptr, save_last_va_list_ptr, util_copy_saved);
 #			endif
-			/* Note do these cleanup  release/reset after the error message so these values still around if the error
+			/* Note do this cleanup (release/reset) after the info message so these values still around if the error
 			 * causes an issue in debugging.
 			 */
 			free(hdr);		/* Don't need this (new) copy of routine header */
@@ -475,7 +528,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			/* Save new history if supplied or NULL */
 			old_rhead->zhist = recent_zhist;
 #			endif
-			return IL_DONE;		/* Pretend we did the link (which, effectively, we already have) */
+			return IL_DONE;	/* bypass link since we have already done the link before */
 		}
 	}
 #	ifdef AUTORELINK_SUPPORTED
@@ -495,7 +548,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, fname_len, fname, ERR_TEXT, 2,
 				LEN_AND_LIT("Object file size > 4Gb cannot be auto-relinked"));
 		}
-		shdr = rtnobj_shm_malloc(recent_zhist, file_desc, hdr->object_len, hdr->objhash);
+		shdr = rtnobj_shm_malloc(recent_zhist, *file_desc, hdr->object_len, hdr->objhash);
 		if (NULL == shdr)
 		{	/* Most likely lseek or read of object file into shared memory failed. Possible for example
 			 * if the object file is truncated. Issue error.
@@ -503,7 +556,8 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			zl_error(RECENT_ZHIST, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 		}
 		/* We need this link - continue setup */
-		assert(!memcmp(hdr, shdr, SIZEOF(rhdtyp))); /* we already read rtnhdr from disk, assert that is same as in shm */
+		assert(!memcmp(hdr, shdr, SIZEOF(rhdtyp)));	/* Already read rtnhdr from disk, assert that is same as in shm */
+		(TREF(arlink_loaded))++;			/* Count autorelink routines loaded */
 	}
 #	endif
 	/* Read in and/or relocate the pointers to the various sections. To understand the size calculations
@@ -515,6 +569,10 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 	 */
 	dynlits = DYNAMIC_LITERALS_ENABLED(hdr);
 	rw_rel_start = RW_REL_START_ADR(hdr);	/* Marks end of R/O-release section and start of R/W-release section */
+	/* Assert that relinkctl_bkptr is NULL for LINK_SHRLIB and LINK_PPRIVOBJ. This is assumed by the link-bypass
+	 * code above (which returns IL_DONE) which uses "hdr->relinkctl_bkptr" without regard to linktyp of that routine.
+	 */
+	ARLINK_ONLY(assert((LINK_SHROBJ == linktyp) || (NULL == hdr->relinkctl_bkptr));)
 	switch(linktyp)
 	{
 		case LINK_SHROBJ:
@@ -532,7 +590,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			sect_ro_rel = GTM_TEXT_ALLOC(sect_ro_rel_size);
 			/* R/O-release section should be aligned well at this point but make a debug level check to verify */
 			assert((INTPTR_T)sect_ro_rel == ((INTPTR_T)sect_ro_rel & ~(LINKAGE_PSECT_BOUNDARY - 1)));
-			DOREADRC_OBJFILE(file_desc, sect_ro_rel, sect_ro_rel_size, status);
+			DOREADRC_OBJFILE(*file_desc, sect_ro_rel, sect_ro_rel_size, status);
 			if (0 != status)
 				zl_error(NULL, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 			/* The offset correction is the amount that needs to be applied to a given storage area that
@@ -593,7 +651,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			memcpy(sect_rw_rel, shdr + (INTPTR_T)rw_rel_start, sect_rw_rel_size);
 			break;
 		case LINK_PPRIVOBJ:
-			DOREADRC_OBJFILE(file_desc, sect_rw_rel, sect_rw_rel_size, status);
+			DOREADRC_OBJFILE(*file_desc, sect_rw_rel, sect_rw_rel_size, status);
 			if (0 != status)
 				zl_error(NULL, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 			break;
@@ -663,7 +721,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 			memcpy(sect_rw_nonrel, shdr + (INTPTR_T)hdr->labtab_adr, sect_rw_nonrel_size);
 			break;
 		case LINK_PPRIVOBJ:
-			DOREADRC_OBJFILE(file_desc, sect_rw_nonrel, sect_rw_nonrel_size, status);
+			DOREADRC_OBJFILE(*file_desc, sect_rw_nonrel, sect_rw_nonrel_size, status);
 			if (0 != status)
 				zl_error(NULL, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 			break;
@@ -689,7 +747,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 	 * never be dereferenced except under a test of the linktyp flag to indicate we are processing
 	 * a shared library or a shared object.
 	 */
-	if (!addr_fix(file_desc, shdr, linktyp, &urx_lcl_anchor))
+	if (!addr_fix(*file_desc, shdr, linktyp, &urx_lcl_anchor))
 	{
 		urx_free(&urx_lcl_anchor);
 		/* Decrement "refcnt" bump done by "rtnobj_shm_malloc" above */
@@ -697,6 +755,8 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 		zl_error(RECENT_ZHIST, linktyp, file_desc, ERR_INVOBJFILE, fname_len, fname, 0, NULL);
 	}
 	/* Register new routine in routine name vector displacing old one and performing any necessary cleanup */
+	DBGARLNK((stderr, "incr_link: Registering new version of routine %.*s (rtnhdr 0x"lvaddr")\n",
+		  hdr->routine_name.len, hdr->routine_name.addr, hdr));
 	if (!zlput_rname(hdr))
 	{
 		urx_free(&urx_lcl_anchor);
@@ -736,6 +796,10 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 				olbt_ent->lnr_adr = NULL;
 				olbt_ent->has_parms = 0;
 			}
+			DBGLRL((stderr, "incr_link: Routine %.*s (rtnhdr 0x"lvaddr") label %.*s (labtab_ent 0x"lvaddr
+				") set to "lvaddr"\n",
+				hdr->routine_name.len, hdr->routine_name.addr, old_rhead,
+				olbt_ent->lab_name.len, olbt_ent->lab_name.addr, olbt_ent, olbt_ent->lnr_adr));
 		}
 		old_rhead->src_full_name = hdr->src_full_name;
 		old_rhead->routine_name = hdr->routine_name;
@@ -750,6 +814,8 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 		old_rhead->temp_mvals = hdr->temp_mvals;
 		old_rhead->temp_size = hdr->temp_size;
 		old_rhead->linkage_adr = hdr->linkage_adr;
+		old_rhead->linkage_len = hdr->linkage_len;
+		old_rhead->linkage_names = hdr->linkage_names;
 		old_rhead->literal_adr = hdr->literal_adr;
 		old_rhead->literal_text_adr = hdr->literal_text_adr;
 		old_rhead->literal_len = hdr->literal_len;
@@ -762,6 +828,7 @@ boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fn
 	urx_resolve(hdr, (lab_tabent *)lbt_bot, (lab_tabent *)lbt_top);
 	if (LINK_PPRIVOBJ == linktyp)
 		cacheflush(hdr->ptext_adr, (hdr->ptext_end_adr - hdr->ptext_adr), BCACHE);
+	DBGARLNK((stderr, "incr_link: (re)link for %.*s complete\n", hdr->routine_name.len, hdr->routine_name.addr));
 	/* zOS cleanups */
 	ZOS_FREE_TEXT_SECTION;
 	/* Don't leave global pointers around to active blocks */
@@ -1051,21 +1118,15 @@ STATICFNDEF void res_free(res_list *root)
  *
  * Parameters:
  *   linktyp    - type of linkage performed (enum linktype).
- *   file       - file descriptor of open file.
+ *   file       - pointer to file descriptor of open file.
  *   err        - error code of error to raise.
  *   len/addr   - length/address of 1st substitution string.
  *   len2/addr2 - length/address of 2nd substitution string.
  */
-STATICFNDEF void zl_error(void *recent_zhist, linktype linktyp, int4 file, int4 err, int4 len, char *addr, int4 len2, char *addr2)
+STATICFNDEF void zl_error(void *recent_zhist, linktype linktyp, int4 *file, int4 err, int4 len, char *addr, int4 len2, char *addr2)
 {
-	int rc;
-
 	ZOS_FREE_TEXT_SECTION;
 	zl_error_hskpng(linktyp, file, recent_zhist);
-	if (LINK_PPRIVOBJ == linktyp)
-	{	/* Only private process links have this area to free */
-		CLOSEFILE_RESET(file, rc);	/* resets "file" to FD_INVALID */
-	}
 	/* 5 or 7 arguments */
 	if (0 == len2)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) err, 2, len, addr);
@@ -1077,10 +1138,19 @@ STATICFNDEF void zl_error(void *recent_zhist, linktype linktyp, int4 file, int4
  *
  * Parameters:
  *   linktyp    - type of linkage performed (enum linktype).
- *   file       - file descriptor of open file.
+ *   file       - pointer to file descriptor of open file.
  */
-STATICFNDEF void zl_error_hskpng(linktype linktyp, int4 file, void *recent_zhist)
+STATICFNDEF void zl_error_hskpng(linktype linktyp, int4 *file, void *recent_zhist)
 {
+	int rc;
+
+	if ((NULL != file) && (0 < *file))
+	{	/* We have a file descriptor for both process private and shared object type links */
+		assert ((LINK_PPRIVOBJ == linktyp) || (LINK_SHROBJ == linktyp));
+		CLOSEFILE_RESET(*file, rc);	/* resets "*file" to FD_INVALID, ignore any failure at this point as it is not the
+						 * the primary error.
+						 */
+	}
 	if (NULL != hdr)
 	{
 		free(hdr);
diff --git a/sr_unix/incr_link.h b/sr_unix/incr_link.h
index 282deb7..00ea19c 100644
--- a/sr_unix/incr_link.h
+++ b/sr_unix/incr_link.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -40,10 +41,10 @@
 
 #ifdef AUTORELINK_SUPPORTED
 # define INCR_LINK(FD, ZRO_ENT, ZRO_HIST, FNLEN, FNAME) incr_link(FD, ZRO_ENT, ZRO_HIST, FNLEN, FNAME)
-boolean_t incr_link(int file_desc, zro_ent *zro_entry, zro_hist *recent_zhist_ptr, uint4 fname_len, char *fname);
+boolean_t incr_link(int *file_desc, zro_ent *zro_entry, zro_hist *recent_zhist_ptr, uint4 fname_len, char *fname);
 #else
 # define INCR_LINK(FD, ZRO_ENT, ZRO_HIST, FNLEN, FNAME) incr_link(FD, ZRO_ENT, FNLEN, FNAME)
-boolean_t incr_link(int file_desc, zro_ent *zro_entry, uint4 fname_len, char *fname);
+boolean_t incr_link(int *file_desc, zro_ent *zro_entry, uint4 fname_len, char *fname);
 #endif
 
 #ifdef __MVS__
diff --git a/sr_unix/iopi_iocontrol.c b/sr_unix/iopi_iocontrol.c
index d9ff7a7..078aef3 100644
--- a/sr_unix/iopi_iocontrol.c
+++ b/sr_unix/iopi_iocontrol.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2008, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2008-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -60,12 +61,11 @@ void	iopi_iocontrol(mstr *mn, int4 argcnt, va_list args)
 		if (d_rm->read_only)
 			return;
 		if (FD_INVALID != d_rm->fildes)
-		{
-			/* The output will be flushed via iorm_flush() like in iorm_close.c.  After this call returns,
-			 * $X will be zero which will keep iorm_readfl() from attempting an iorm_wteol() in the fix mode
-			 * after the file descriptor has been closed.
+		{	/* A new line will be inserted by iorm_cond_wteol() if $X is non-zero, just like it is done in iorm_close.c.
+			 * After this call returns, * $X will be zero, which will keep iorm_readfl() from attempting an iorm_wteol()
+			 * in the fixed mode after the file descriptor has been closed.
 			 */
-			iorm_flush(io_curr_device.out);
+			iorm_cond_wteol(io_curr_device.out);
 			IORM_FCLOSE(d_rm, fildes, filstr);
 			assert(FD_INVALID == d_rm->fildes);
 			assert(NULL == d_rm->filstr);
@@ -112,7 +112,7 @@ void	iopi_dlr_zkey(mstr *d)
 	int		len;
 	d_rm_struct	*d_rm;
 	char		tname[MAX_FIXED_STRING];
-	uint4		record_num;	/* record offset in fixed record file */
+	gtm_int64_t	record_num;	/* record offset in fixed record file */
 	uint4		record_byte;	/* byte offset in fixed record block */
 	boolean_t	utf_active;
 	off_t		cur_position;
@@ -128,7 +128,7 @@ void	iopi_dlr_zkey(mstr *d)
 		if (RM_WRITE == d_rm->lastop)
 		{
 			/* need to do an lseek to get current location in file */
-			cur_position = lseek(d_rm->fildes, (off_t)0, SEEK_CUR);
+			cur_position = lseek(d_rm->fildes, 0, SEEK_CUR);
 			if ((off_t)-1 == cur_position)
 			{
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("lseek"),
@@ -160,11 +160,11 @@ void	iopi_dlr_zkey(mstr *d)
 					record_num--;
 				}
 			}
-			SNPRINTF(tname, MAX_FIXED_STRING, "%ld,%ld", record_num, record_byte);
+			SNPRINTF(tname, MAX_FIXED_STRING, "%lld,%ld", record_num, record_byte);
 		} else
 		{
 			record_num = d_rm->file_pos;
-			SNPRINTF(tname, MAX_VAR_STRING, "%ld", record_num);
+			SNPRINTF(tname, MAX_VAR_STRING, "%lld", record_num);
 		}
 		len = STRLEN(tname);
 		/* verify internal buffer has enough space for $ZKEY string value */
diff --git a/sr_unix/iorm_close.c b/sr_unix/iorm_close.c
index 94165bc..8ef8211 100644
--- a/sr_unix/iorm_close.c
+++ b/sr_unix/iorm_close.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,11 +31,13 @@
 #include "gt_timer.h"
 #include "wake_alarm.h"
 #include "copy.h"
+#include "error.h"
 
 GBLREF io_pair		io_curr_device;
 GBLREF io_pair		io_std_device;
-GBLREF	boolean_t	gtm_pipe_child;
-GBLREF	volatile bool	out_of_time;
+GBLREF boolean_t	gtm_pipe_child;
+GBLREF volatile bool	out_of_time;
+GBLREF int		process_exiting;
 
 error_def(ERR_SYSCALL);
 error_def(ERR_DEVPARMTOOSMALL);
@@ -70,6 +73,9 @@ void iorm_close(io_desc *iod, mval *pp)
 	TID		timer_id;
 	int4		pipe_timeout = 2;	/* default timeout in sec waiting for waitpid */
 	off_t		cur_position;
+	boolean_t	ch_set;
+	sigset_t	empty_set, old_set;
+	boolean_t	use_timer;
 
 	DCL_THREADGBL_ACCESS;
 
@@ -82,6 +88,7 @@ void iorm_close(io_desc *iod, mval *pp)
 		return;
 	}
 
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	rm_ptr = (d_rm_struct *)iod->dev_sp;
 
 #ifdef __MVS__
@@ -100,7 +107,7 @@ void iorm_close(io_desc *iod, mval *pp)
 	iorm_use(iod,pp);
 	/* We do not want a NEWLINE to be issued by the middle process. */
 	if (!gtm_pipe_child)
-		iorm_flush(iod);
+		iorm_cond_wteol(iod);
 
 	p_offset = 0;
 	while (*(pp->str.addr + p_offset) != iop_eol)
@@ -231,53 +238,69 @@ void iorm_close(io_desc *iod, mval *pp)
 		assert(FD_INVALID == rm_ptr->read_fildes);
 		assert(NULL == rm_ptr->read_filstr);
 	}
-	/* reap the forked shell process if a pipe - it will be a zombie, otherwise*/
+	/* Reap the forked shell process if a pipe - it will be a zombie otherwise. */
 	if (rm_ptr->pipe_pid > 0)
-	{
-		/* Don't reap if in a child process creating a new pipe or if in parent and independent is set */
+	{	/* Do not reap if in a child process creating a new pipe or if in parent and independent is set. */
 		if (FALSE == gtm_pipe_child)
 		{
 			if (!rm_ptr->independent)
 			{
-				/* start timer for pipe_timeout sec to wait for reap of close via waitpid.  If this
-				   times out, set dollar_zclose = -99 */
+				if (!process_exiting)
+				{	/* Find out whether timers are available. If not, instead of scheduling one to interrupt
+					 * waitpid, simply invoke it with WNOHANG flag instead. Note that sigprocmask below is
+					 * operating on an empty signal set and so is not blocking any signals.
+					 */
+					sigemptyset(&empty_set);
+					sigprocmask(SIG_BLOCK, &empty_set, &old_set);
+					use_timer = !sigismember(&old_set, SIGALRM);
+				} else
+					use_timer = FALSE;
 				out_of_time = FALSE;
-				timer_id = (TID)iorm_close;
-				start_timer(timer_id, pipe_timeout * 1000, wake_alarm, 0, NULL);
+				if (use_timer)
+				{	/* Start timer for pipe_timeout seconds to wait for reap of close via waitpid. If this times
+					 * out, set dollar_zclose = -99.
+					 */
+					timer_id = (TID)iorm_close;
+					start_timer(timer_id, pipe_timeout * 1000, wake_alarm, 0, NULL);
+				}
 				do
 				{
-					done_pid = waitpid(rm_ptr->pipe_pid, &status, 0); /* BYPASSOK */
-				} while((pid_t)-1 == done_pid && EINTR == errno && !out_of_time);
-
-				if ((pid_t)-1 == done_pid && !out_of_time)
+					status = 0;
+					done_pid = waitpid(rm_ptr->pipe_pid, &status, use_timer ? 0 : WNOHANG); /* BYPASSOK */
+				} while (((pid_t)-1 == done_pid) && (EINTR == errno) && (!out_of_time));
+				if (((pid_t)-1 == done_pid) && (!out_of_time))
 				{
-					cancel_timer(timer_id);
+					if (use_timer)
+						cancel_timer(timer_id);
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5,
 						      RTS_ERROR_LITERAL("waitpid"), CALLFROM, errno);
 				}
-				if (out_of_time)
+				if (out_of_time || (!use_timer && (0 == done_pid)))
 				{
 					TREF(dollar_zclose) = -99;
 				} else
-				{
-					/* not an error and didn't timeout */
-					assert(done_pid == rm_ptr->pipe_pid);
-					/* cancel timer since it didn't timeout */
-					cancel_timer(timer_id);
-#ifdef _BSD
+				{	/* Not an error and did not timeout. */
+					assert(!use_timer || (done_pid == rm_ptr->pipe_pid));
+					/* Cancel timer since it did not timeout. */
+					if (use_timer)
+						cancel_timer(timer_id);
+#					ifdef _BSD
 					assert(SIZEOF(wait_status) == SIZEOF(int4));
+					/* The WIF* macros expect a union wait_stat as an argument on BSD. */
 					wait_status.w_status = status;
-					/* the WIF* macros expect a union wait_stat as an argument on BSD */
-#else
+#					else
 					wait_status = status;
-#endif
+#					endif
 					if (WIFEXITED(wait_status))
-						TREF(dollar_zclose) = WEXITSTATUS(wait_status); /* normal exit */
-					else if (WIFSIGNALED(wait_status))
-						/* change the signal to a negative for distinguishing from normal exit codes */
+					{	/* Normal exit. */
+						TREF(dollar_zclose) = WEXITSTATUS(wait_status);
+					} else if (WIFSIGNALED(wait_status))
+					{	/* Change signal to negative for distinguishing from normal exit codes. */
 						TREF(dollar_zclose) = -WTERMSIG(wait_status);
-					else /* set any other non-normal status to -98 */
+					} else
+					{	/* Set any other non-normal status to -98. */
 						TREF(dollar_zclose) = -98;
+					}
 				}
 			}
 		}
@@ -301,5 +324,6 @@ void iorm_close(io_desc *iod, mval *pp)
 	}
 	if ((rm_destroy || rm_ptr->pipe || rm_ptr->fifo) && !rm_rundown)
 	        remove_rms (iod);
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_unix/iorm_flush.c b/sr_unix/iorm_flush.c
index f0fd44a..85b0906 100644
--- a/sr_unix/iorm_flush.c
+++ b/sr_unix/iorm_flush.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,8 +17,14 @@
 #include "io.h"
 #include "iormdef.h"
 
+/* The rm device is unbuffered, so the flush operation is a no-op. */
 void iorm_flush(io_desc *iod)
 {
+	return;
+}
+
+void iorm_cond_wteol(io_desc *iod)
+{
 	d_rm_struct	*rm_ptr;
 	unsigned int	*dollarx_ptr;
 
@@ -32,7 +39,6 @@ void iorm_flush(io_desc *iod)
 		dollarx_ptr = &(iod->dollar.x);
 
 	if (*dollarx_ptr && rm_ptr->lastop == RM_WRITE && !iod->dollar.za)
-		iorm_wteol(1,iod);
+		iorm_wteol(1, iod);
 	return;
 }
-
diff --git a/sr_unix/iorm_get.c b/sr_unix/iorm_get.c
index 14e7f41..f1ae908 100644
--- a/sr_unix/iorm_get.c
+++ b/sr_unix/iorm_get.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2006, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2006-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -34,6 +35,7 @@
 #include "gtm_conv.h"
 #endif
 #include "gtmcrypt.h"
+#include "error.h"
 
 GBLREF	io_pair		io_curr_device;
 GBLREF	spdesc		stringpool;
@@ -52,8 +54,10 @@ error_def(ERR_SYSCALL);
  */
 int	gtm_utf_bomcheck(io_desc *iod, gtm_chset_t *chset, unsigned char *buffer, int len)
 {
-	int	bom_bytes = 0;
+	int		bom_bytes = 0;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&iod->pair, -1, ch_set);
 	switch (*chset)
 	{
 		case CHSET_UTF8:
@@ -99,6 +103,7 @@ int	gtm_utf_bomcheck(io_desc *iod, gtm_chset_t *chset, unsigned char *buffer, in
 		default:
 			assertpro(FALSE);
 	}
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return bom_bytes;
 }
 
@@ -111,10 +116,12 @@ int	iorm_get_bom_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout,
 	int4		bytes2read, bytes_read, reclen, bom_bytes2read, bom_bytes_read;
 	gtm_chset_t	chset;
 	d_rm_struct	*rm_ptr;
-	int4 sleep_left;
-	int4 sleep_time;
+	int4		sleep_left;
+	int4		sleep_time;
 	ABS_TIME	current_time, time_left;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_ptr->pair, -1, ch_set);
 	status = 0;
 	rm_ptr = (d_rm_struct *)(io_ptr->dev_sp);
 	fildes = rm_ptr->fildes;
@@ -139,7 +146,8 @@ int	iorm_get_bom_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout,
 				*msec_timeout = -1;
 				*bom_timeout = TRUE;
 			} else
-				*msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+				*msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+						       DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 			/* make sure it terminates with bom_timeout */
 			if (!*bom_timeout && !*msec_timeout)
 				*msec_timeout = 1;
@@ -182,7 +190,8 @@ int	iorm_get_bom_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout,
 					*msec_timeout = -1;
 					*bom_timeout = TRUE;
 				} else
-					*msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+					*msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+							       DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 
 				/* make sure it terminates with bom_timeout */
 				if ((!*bom_timeout) && (!*msec_timeout))
@@ -194,7 +203,10 @@ int	iorm_get_bom_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout,
 			if (0 < sleep_time)
 				SHORT_SLEEP(sleep_time);
 			if (outofband)
+			{
+				REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 				return 0;
+			}
 			continue; /* for now try and read again if eof or no input ready */
 		} else		  /* error returned */
 		{
@@ -224,6 +236,7 @@ int	iorm_get_bom_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout,
 	/* if outofband is not set then we are done getting the bom */
 	if (!outofband && !*bom_timeout)
 		rm_ptr->done_1st_read = TRUE;
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return 0;
 }
 
@@ -246,7 +259,9 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 	int4		sleep_time;
 	boolean_t	bom_timeout = FALSE;
 	ABS_TIME	current_time, time_left;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_ptr->pair, -1, ch_set);
 	assert (io_ptr->state == dev_open);
 	rm_ptr = (d_rm_struct *)(io_ptr->dev_sp);
 	fildes = rm_ptr->fildes;
@@ -296,6 +311,7 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 		if (!rm_ptr->done_1st_read && outofband)
 		{
 			PIPE_DEBUG(PRINTF("return since iorm_get_bom_fol went outofband\n"); DEBUGPIPEFLUSH;);
+			REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 			return 0;
 		}
 		if (TRUE == bom_timeout)
@@ -322,6 +338,7 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 	{
 		PIPE_DEBUG(PRINTF("iorm_get_fol: bytes2read: %d bytes_already_read: %d, zint_restart: %d\n",
 				  bytes2read,bytes_already_read,zint_restart); DEBUGPIPEFLUSH;);
+		REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 		return 0;
 	}
 	if (0 <= status && 0 < bytes2read)
@@ -340,7 +357,8 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 					*msec_timeout = -1;
 					*follow_timeout = TRUE;
 				} else
-					*msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+					*msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+							       DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 				/* make sure it terminates with follow_timeout */
 				if (!*follow_timeout && !*msec_timeout) *msec_timeout = 1;
 				sleep_left = *msec_timeout;
@@ -384,7 +402,8 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 						*msec_timeout = -1;
 						*follow_timeout = TRUE;
 					} else
-						*msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+						*msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+								       DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 
 					/* make sure it terminates with follow_timeout */
 					if (!*follow_timeout && !*msec_timeout) *msec_timeout = 1;
@@ -410,13 +429,17 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 		if (0 > status)
 		{
 			rm_ptr->inbuf_top = rm_ptr->inbuf_pos += *tot_bytes_read;
+			REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 			return 0;
 		}
 		else
 		{
 			rm_ptr->inbuf_top = rm_ptr->inbuf_pos += status;
 			if ((rm_ptr->inbuf_pos - rm_ptr->inbuf_off) < rm_ptr->recordsize)
+			{
+				REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 				return 0;
+			}
 		}
 	}
 	/* if some bytes were read prior to timeout then process them as if no timeout occurred */
@@ -499,6 +522,7 @@ int	iorm_get_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, bool
 		rm_ptr->last_was_timeout = 0;
 	} else
 		rm_ptr->inbuf_off = rm_ptr->inbuf;
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return (0 <= status ? bytes_read : status);
 }
 
@@ -512,7 +536,9 @@ int	iorm_get_bom(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags,
 	gtm_chset_t	chset;
 	d_rm_struct	*rm_ptr;
 	boolean_t	pipe_or_fifo = FALSE;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_ptr->pair, -1, ch_set);
 	rm_ptr = (d_rm_struct *)(io_ptr->dev_sp);
 	if (rm_ptr->pipe || rm_ptr->fifo)
 		pipe_or_fifo = TRUE;
@@ -619,6 +645,7 @@ int	iorm_get_bom(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags,
 	/* if outofband is not set or its a disk read then we are done with getting the bom */
 	if (!(pipe_or_fifo && outofband))
 		rm_ptr->done_1st_read = TRUE;
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return 0;
 }
 
@@ -636,7 +663,9 @@ int	iorm_get(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags, int4
 	gtm_chset_t	chset;
 	int		fildes;
 	boolean_t	pipe_or_fifo = FALSE;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_ptr->pair, -1, ch_set);
 	assert (io_ptr->state == dev_open);
 	rm_ptr = (d_rm_struct *)(io_ptr->dev_sp);
 	if (rm_ptr->pipe || rm_ptr->fifo)
@@ -681,6 +710,7 @@ int	iorm_get(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags, int4
 		if (!rm_ptr->done_1st_read && (pipe_or_fifo && outofband))
 		{
 			PIPE_DEBUG(PRINTF("return since iorm_get_bom went outofband\n"); DEBUGPIPEFLUSH;);
+			REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 			return 0;
 		}
 		chset = io_ptr->ichset;	/* UTF16 will have changed to UTF16BE or UTF16LE */
@@ -704,6 +734,7 @@ int	iorm_get(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags, int4
 	{
 		PIPE_DEBUG(PRINTF("pipeget: bytes2read: %d bytes_already_read: %d, zint_restart: %d\n",
 				  bytes2read,bytes_already_read,zint_restart); DEBUGPIPEFLUSH;);
+		REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 		return 0;
 	}
 	if ((0 <= status) && (0 < bytes2read))
@@ -730,13 +761,17 @@ int	iorm_get(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags, int4
 		if (0 > status)
 		{
 			rm_ptr->inbuf_top = rm_ptr->inbuf_pos += *tot_bytes_read;
+			REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 			return 0;
 		}
 		else
 		{
 			rm_ptr->inbuf_top = rm_ptr->inbuf_pos += status;
 			if ((rm_ptr->inbuf_pos - rm_ptr->inbuf_off) < rm_ptr->recordsize)
+			{
+				REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 				return 0;
+			}
 		}
 	}
 
@@ -809,5 +844,6 @@ int	iorm_get(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags, int4
 	}
 	rm_ptr->inbuf_top = rm_ptr->inbuf_pos = rm_ptr->inbuf + bytes_read;
 	rm_ptr->inbuf_off = rm_ptr->inbuf;
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return (0 <= status ? bytes_read : status);
 }
diff --git a/sr_unix/iorm_open.c b/sr_unix/iorm_open.c
index 7f7014a..b1478c7 100644
--- a/sr_unix/iorm_open.c
+++ b/sr_unix/iorm_open.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -31,6 +32,7 @@
 #include "gtm_utf8.h"
 #endif
 #include "gtmcrypt.h"
+#include "error.h"
 
 GBLREF io_pair		io_curr_device;
 GBLREF	boolean_t	gtm_utf8_mode;
@@ -43,8 +45,6 @@ error_def(ERR_DEVOPENFAIL);
 error_def(ERR_TEXT);
 error_def(ERR_IOERROR);
 
-
-
 LITREF	mstr		chset_names[];
 LITREF unsigned char	io_params_size[];
 
@@ -66,15 +66,17 @@ short	iorm_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 	boolean_t	closed_nodestroy;
 	boolean_t	append;
 	gtm_chset_t	width_chset, dummy_chset;
-	long		new_position;
+	off_t		new_position;
 	long		pipe_buff_size;
 #	ifdef __MVS__
 	int		file_tag, obtained_tag, realfiletag;
 	char		*errmsg;
 #	endif
+	boolean_t	ch_set;
 
 	newversion = closed_nodestroy = append = FALSE;
 	iod = dev_name->iod;
+	ESTABLISH_RET_GTMIO_CH(&iod->pair, -1, ch_set);
 	size = 0;
 	p_offset = 0;
 	assert((params) *(pp->str.addr + p_offset) < (unsigned char)n_iops);
@@ -146,7 +148,7 @@ short	iorm_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 		{
 			if (iop_append == (ch = *(pp->str.addr + p_offset++)))
 			{
-				if (!d_rm->fifo && !d_rm->pipe && (off_t)-1 == (size = lseek(fd, (off_t)0, SEEK_END)))
+				if (!d_rm->fifo && !d_rm->pipe && (off_t)-1 == (size = lseek(fd, 0, SEEK_END)))
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_DEVOPENFAIL, 2, dev_name->len,
 						      dev_name->dollar_io,
 						      ERR_TEXT, 2, LEN_AND_LIT("Error setting file pointer to end of file"), errno);
@@ -184,13 +186,13 @@ short	iorm_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 				}
 
 				/* lseek to file position for nodestroy */
-				if ((off_t)-1 == (size =lseek (fd, (off_t)new_position, SEEK_SET)))
+				if ((off_t)-1 == (size =lseek (fd, new_position, SEEK_SET)))
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_DEVOPENFAIL, 2,
 						      dev_name->len, dev_name->dollar_io, ERR_TEXT, 2,
 						      LEN_AND_LIT("Error setting file pointer to the current position"), errno);
 			} else
 			{
-				if ((off_t)-1 == (size = lseek(fd, (off_t)0, SEEK_CUR)))
+				if ((off_t)-1 == (size = lseek(fd, 0, SEEK_CUR)))
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_DEVOPENFAIL, 2, dev_name->len,
 						      dev_name->dollar_io, ERR_TEXT, 2,
 						      LEN_AND_LIT("Error setting file pointer to the current position"), errno);
@@ -235,12 +237,12 @@ short	iorm_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 						      dev_name->dollar_io, ERR_TEXT, 2,
 						      LEN_AND_LIT("Error in stream open"), errno);
 			}
-			/* now fseek required for nodestroy if non-fixed M streaming */
+			/* now fseeko required for nodestroy if non-fixed M streaming */
 			if (d_rm->no_destroy && !d_rm->fixed && !IS_UTF_CHSET(iod->ichset))
 			{
-				if (-1 == fseek(d_rm->filstr, (long)d_rm->file_pos, SEEK_SET))	/* move input stream */
+				if ((off_t)-1 == fseeko(d_rm->filstr, d_rm->file_pos, SEEK_SET))	/* move input stream */
 				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("fseek"),
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("fseeko"),
 						      RTS_ERROR_LITERAL("REWIND"), CALLFROM, errno);
 				}
 			}
@@ -411,14 +413,14 @@ short	iorm_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 					bom_size_toread = 0;
 				if (0 < bom_size_toread)
 				{
-					if ((off_t)-1 == lseek(fd, (off_t)0, SEEK_SET))
+					if ((off_t)-1 == lseek(fd, 0, SEEK_SET))
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_DEVOPENFAIL, 2, dev_name->len,
 							      dev_name->dollar_io, ERR_TEXT, 2,
 							      LEN_AND_LIT("Error setting file pointer to beginning of file"),
 							      errno);
 					d_rm->bom_num_bytes = open_get_bom(iod, bom_size_toread);
 					/* move back to previous file position */
-					if ((off_t)-1 == lseek(fd, (off_t)d_rm->file_pos, SEEK_SET))
+					if ((off_t)-1 == lseek(fd, d_rm->file_pos, SEEK_SET))
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_DEVOPENFAIL, 2, dev_name->len,
 							      dev_name->dollar_io, ERR_TEXT, 2,
 							      LEN_AND_LIT("Error setting file pointer to previous file position"),
@@ -434,6 +436,7 @@ short	iorm_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 	if (d_rm->no_destroy)
 		d_rm->no_destroy = FALSE;
 	iod->state = dev_open;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return TRUE;
 }
 
@@ -444,7 +447,9 @@ int	open_get_bom(io_desc *io_ptr, int bom_size)
 	d_rm_struct	*rm_ptr;
 	gtm_chset_t	chset;
 	int 		num_bom_bytes;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_ptr->pair, -1, ch_set);
 	rm_ptr = (d_rm_struct *)(io_ptr->dev_sp);
 	assert(UTF16BE_BOM_LEN == UTF16LE_BOM_LEN);
 	assert(!rm_ptr->input_encrypted);
@@ -470,5 +475,6 @@ int	open_get_bom(io_desc *io_ptr, int bom_size)
 			get_chset_desc(&chset_names[chset]);
 		}
 	}
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 	return (num_bom_bytes);
 }
diff --git a/sr_unix/iorm_readfl.c b/sr_unix/iorm_readfl.c
index dc16a3f..e7a33eb 100644
--- a/sr_unix/iorm_readfl.c
+++ b/sr_unix/iorm_readfl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -34,6 +35,7 @@
 #include "gtm_utf8.h"
 #endif
 #include "gtmcrypt.h"
+#include "error.h"
 
 GBLREF	io_pair		io_curr_device;
 GBLREF	spdesc		stringpool;
@@ -69,9 +71,11 @@ void iorm_readfl_badchar(mval *vmvalptr, int datalen, int delimlen, unsigned cha
 	unsigned char   *delimend;
 	io_desc         *iod;
 	d_rm_struct	*rm_ptr;
+	boolean_t	ch_set;
 
 	assert(0 <= datalen);
 	iod = io_curr_device.in;
+	ESTABLISH_GTMIO_CH(&io_curr_device, ch_set);
 	rm_ptr = (d_rm_struct *)(iod->dev_sp);
 	assert(NULL != rm_ptr);
 	vmvalptr->str.len = datalen;
@@ -102,6 +106,7 @@ void iorm_readfl_badchar(mval *vmvalptr, int datalen, int delimlen, unsigned cha
 	len = SIZEOF(ONE_COMMA) - 1;
 	memcpy(iod->dollar.device, ONE_COMMA, len);
 	memcpy(&iod->dollar.device[len], BADCHAR_DEVICE_MSG, SIZEOF(BADCHAR_DEVICE_MSG));
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 }
 #endif
 
@@ -149,7 +154,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 	int		fstat_res;
 	off_t		cur_position;
 	int		bom_size_toread;
-
+	boolean_t	ch_set;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -161,6 +166,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 	assert(stringpool.free <= stringpool.top);
 
 	io_ptr = io_curr_device.in;
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
 	/* don't allow a read from a writeonly fifo */
 	if (((d_rm_struct *)io_ptr->dev_sp)->write_only)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DEVICEWRITEONLY);
@@ -229,7 +235,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 	if (!rm_ptr->fifo && !rm_ptr->pipe && (2 < rm_ptr->fildes) && (RM_WRITE == rm_ptr->lastop))
 	{
 		/* need to do an lseek to get current location in file */
-		cur_position = lseek(rm_ptr->fildes, (off_t)0, SEEK_CUR);
+		cur_position = lseek(rm_ptr->fildes, 0, SEEK_CUR);
 		if ((off_t)-1 == cur_position)
 		{
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("lseek"),
@@ -240,10 +246,10 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 		if (!rm_ptr->fixed && !utf_active)
 		{
 			/* move input stream */
-			if (-1 == fseek(rm_ptr->filstr, (long)rm_ptr->file_pos, SEEK_SET))
+			if ((off_t)-1 == fseeko(rm_ptr->filstr, rm_ptr->file_pos, SEEK_SET))
 			{
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
-					      RTS_ERROR_LITERAL("fseek"),
+					      RTS_ERROR_LITERAL("fseeko"),
 					      RTS_ERROR_LITERAL("iorm_readfl()"), CALLFROM, errno);
 			}
 		}
@@ -278,15 +284,14 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 					bom_size_toread = 0;
 				if (0 < bom_size_toread)
 				{
-					if ((off_t)-1 == lseek(fildes, (off_t)0, SEEK_SET))
+					if ((off_t)-1 == lseek(fildes, 0, SEEK_SET))
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
 							      RTS_ERROR_LITERAL("lseek"), RTS_ERROR_LITERAL(
 								      "Error setting file pointer to beginning of file"),
 							      CALLFROM, errno);
-
 					rm_ptr->bom_num_bytes = open_get_bom(io_ptr, bom_size_toread);
 					/* move back to previous file position */
-					if ((off_t)-1 == lseek(fildes, (off_t)rm_ptr->file_pos, SEEK_SET))
+					if ((off_t)-1 == lseek(fildes, rm_ptr->file_pos, SEEK_SET))
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
 							      RTS_ERROR_LITERAL("lseek"), RTS_ERROR_LITERAL(
 								      "Error restoring file pointer"), CALLFROM, errno);
@@ -468,7 +473,8 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 					msec_timeout = -1;
                                         out_of_time = TRUE;
                                 } else
-					msec_timeout = (int4)(cur_time.at_sec * 1000 + cur_time.at_usec / 1000);
+					msec_timeout = (int4)(cur_time.at_sec * MILLISECS_IN_SEC +
+							      DIVIDE_ROUND_UP(cur_time.at_usec, MICROSECS_IN_MSEC));
 				if (rm_ptr->follow && !out_of_time && !msec_timeout)
 					msec_timeout = 1;
 				PIPE_DEBUG(PRINTF("piperfl: Taking timeout end time from read restart data - "
@@ -520,7 +526,8 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 							msec_timeout = -1;
 							out_of_time = TRUE;
 						} else
-							msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+							msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+									DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 						/* make sure it terminates with out_of_time */
 						if (!out_of_time && !msec_timeout)
 							msec_timeout = 1;
@@ -564,8 +571,9 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 								msec_timeout = -1;
 								out_of_time = TRUE;
 							} else
-								msec_timeout = (int4)(time_left.at_sec * 1000 +
-										      time_left.at_usec / 1000);
+								msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+										      DIVIDE_ROUND_UP(time_left.at_usec,
+												      MICROSECS_IN_MSEC));
 
 							/* make sure it terminates with out_of_time */
 							if (!out_of_time && !msec_timeout)
@@ -597,6 +605,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 							stringpool.free += tot_bytes_read; /* Don't step on our parade in
 											      the interrupt */
 							(TREF(pipefifo_interrupt))++;
+							REVERT_GTMIO_CH(&io_curr_device, ch_set);
 							outofband_action(FALSE);
 							assertpro(FALSE);	/* Should *never* return from outofband_action */
 							return FALSE;	/* For the compiler.. */
@@ -667,6 +676,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 					rm_ptr->mupintr = TRUE;
 					stringpool.free += tot_bytes_read;	/* Don't step on our parade in the interrupt */
 					(TREF(pipefifo_interrupt))++;
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					outofband_action(FALSE);
 					assertpro(FALSE);	/* Should *never* return from outofband_action */
 					return FALSE;	/* For the compiler.. */
@@ -687,7 +697,8 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 						msec_timeout = -1;
 						out_of_time = TRUE;
 					} else
-						msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+						msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+								      DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 					/* make sure it terminates with out_of_time */
 					if (!out_of_time && !msec_timeout)
 						msec_timeout = 1;
@@ -746,8 +757,9 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 									msec_timeout = -1;
 									out_of_time = TRUE;
 								} else
-									msec_timeout = (int4)(time_left.at_sec * 1000 +
-											      time_left.at_usec / 1000);
+									msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+											      DIVIDE_ROUND_UP(time_left.at_usec,
+													      MICROSECS_IN_MSEC));
 
 								/* make sure it terminates with out_of_time */
 								if (!out_of_time && !msec_timeout)
@@ -780,6 +792,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 								stringpool.free += tot_bytes_read; /* Don't step on our parade
 												      in the interrupt */
 								(TREF(pipefifo_interrupt))++;
+								REVERT_GTMIO_CH(&io_curr_device, ch_set);
 								outofband_action(FALSE);
 								/* Should *never* return from outofband_action */
 								assertpro(FALSE);
@@ -888,6 +901,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 					rm_ptr->mupintr = TRUE;
 					stringpool.free += tot_bytes_read;	/* Don't step on our parade in the interrupt */
 					(TREF(pipefifo_interrupt))++;
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					outofband_action(FALSE);
 					assertpro(FALSE);	/* Should *never* return from outofband_action */
 					return FALSE;	/* For the compiler.. */
@@ -939,6 +953,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 					pipeintr->bytes_read = 0;
 					rm_ptr->mupintr = TRUE;
 					(TREF(pipefifo_interrupt))++;
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					outofband_action(FALSE);
 					assertpro(FALSE);	/* Should *never* return from outofband_action */
 					return FALSE;	/* For the compiler.. */
@@ -1080,7 +1095,8 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 							msec_timeout = -1;
 							out_of_time = TRUE;
 						} else
-							msec_timeout = (int4)(time_left.at_sec * 1000 + time_left.at_usec / 1000);
+							msec_timeout = (int4)(time_left.at_sec * MILLISECS_IN_SEC +
+									DIVIDE_ROUND_UP(time_left.at_usec, MICROSECS_IN_MSEC));
 
 						/* make sure it terminates with out_of_time */
 						if (!out_of_time && !msec_timeout)
@@ -1136,6 +1152,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 						rm_ptr->mupintr = TRUE;
 						(TREF(pipefifo_interrupt))++;
 						PIPE_DEBUG(PRINTF(" %d utf1.1 stream outofband\n", pid); DEBUGPIPEFLUSH);
+						REVERT_GTMIO_CH(&io_curr_device, ch_set);
 						outofband_action(FALSE);
 						assertpro(FALSE);	/* Should *never* return from outofband_action */
 						return FALSE;	/* For the compiler.. */
@@ -1211,8 +1228,10 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 										msec_timeout = -1;
 										out_of_time = TRUE;
 									} else
-										msec_timeout = (int4)(time_left.at_sec * 1000 +
-												      time_left.at_usec / 1000);
+										msec_timeout = (int4)(time_left.at_sec *
+												MILLISECS_IN_SEC +
+												DIVIDE_ROUND_UP(time_left.at_usec,
+												MICROSECS_IN_MSEC));
 
 									/* make sure it terminates with out_of_time */
 									if (!out_of_time && !msec_timeout)
@@ -1261,6 +1280,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 									/* Don't step on our parade in the interrupt */
 									stringpool.free += bytes_count;
 									(TREF(pipefifo_interrupt))++;
+									REVERT_GTMIO_CH(&io_curr_device, ch_set);
 									outofband_action(FALSE);
 									assertpro(FALSE);	/* Should *never* return from
 											   outofband_action */
@@ -1328,6 +1348,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 							/* Don't step on our parade in the interrupt */
 							stringpool.free += bytes_count;
 							(TREF(pipefifo_interrupt))++;
+							REVERT_GTMIO_CH(&io_curr_device, ch_set);
 							outofband_action(FALSE);
 							assertpro(FALSE);	/* Should *never* return from outofband_action */
 							return FALSE;	/* For the compiler.. */
@@ -1655,6 +1676,7 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 		{
 			if (TRUE == io_ptr->dollar.zeof)
 				io_ptr->dollar.zeof = FALSE; /* no EOF in follow mode */
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			return FALSE;
 		}
 		/* on end of file set $za to 9 */
@@ -1720,5 +1742,6 @@ int	iorm_readfl (mval *v, int4 width, int4 timeout) /* timeout in seconds */
 	if (follow_timeout)
 		ret = FALSE;
 	assert (FALSE == rm_ptr->mupintr);
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return (rm_ptr->pipe && out_of_time) ? FALSE : ret;
 }
diff --git a/sr_unix/iorm_use.c b/sr_unix/iorm_use.c
index 781d9ff..fe5426d 100644
--- a/sr_unix/iorm_use.c
+++ b/sr_unix/iorm_use.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -35,6 +36,7 @@
 #include "gtm_utf8.h"
 #endif
 #include "gtmcrypt.h"
+#include "error.h"
 
 /* Only want to do fstat() once on this file, not on every use. */
 #define FSTAT_CHECK(GETMODE)										\
@@ -190,17 +192,19 @@ void	iorm_use(io_desc *iod, mval *pp)
 	char		seek_str[LIMIT_SEEK_STR];
 	char		*seek_ptr;
 	int		seek_type;
-	long		seek_value;
-	long		new_position;
-	long		current_offset;
+	off_t		seek_value;
+	off_t		new_position;
+	off_t		current_offset;
 	char		*endptr;
 	off_t		cur_position;
 	int		bom_size_toread;
 	io_log_name	*dev_name;
 	mstr		input_iv, output_iv, input_key, output_key;
 	char		error_str[MAX_ERROR_SIZE];
+	boolean_t	ch_set;
 
 	p_offset = 0;
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	rm_ptr = (d_rm_struct *)iod->dev_sp;
 	input_key_not_empty = output_key_not_empty = FALSE;
 	input_key_entry_present = output_key_entry_present = FALSE;
@@ -319,30 +323,31 @@ void	iorm_use(io_desc *iod, mval *pp)
 				break;
 			if (iod->state == dev_open && !rm_ptr->fifo && !rm_ptr->pipe)
 			{
-				if (-1 == lseek(rm_ptr->fildes, (off_t)0, SEEK_SET))
+				if ((off_t)-1 == lseek(rm_ptr->fildes, 0, SEEK_SET))
 				{
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("lseek"),
 						      RTS_ERROR_LITERAL("REWIND"), CALLFROM, errno);
 				}
 
-				/* do fseek if non-fixed streaming and iod doesn't point to io_std_device.out */
+				/* do fseeko if non-fixed streaming and iod doesn't point to io_std_device.out */
 				/* Only necessary for the non-utf input which uses buffered reads */
 				if (!rm_ptr->fixed && !IS_UTF_CHSET(iod->ichset) && (iod != io_std_device.out))
 				{
 					/* if streaming non-utf move to end of file first to force flush of any
 					   buffered read io */
-					if (-1 == fseek(rm_ptr->filstr, (long)0, SEEK_END))
+					if ((off_t)-1 == fseeko(rm_ptr->filstr, 0, SEEK_END))
 					{
 						save_errno = errno;
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
-							      RTS_ERROR_LITERAL("fseek"),
+							      RTS_ERROR_LITERAL("fseeko"),
 							      RTS_ERROR_LITERAL("REWIND"), CALLFROM, save_errno);
 					}
 
 
-					if (-1 == fseek(rm_ptr->filstr, (long)0, SEEK_SET))	/* Rewind the input stream */
+					if ((off_t)-1 == fseeko(rm_ptr->filstr, 0, SEEK_SET))	/* Rewind the input stream */
 					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("fseek"),
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
+							      RTS_ERROR_LITERAL("fseeko"),
 							      RTS_ERROR_LITERAL("REWIND"), CALLFROM, errno);
 					}
 				}
@@ -425,7 +430,7 @@ void	iorm_use(io_desc *iod, mval *pp)
 					if (RM_WRITE == rm_ptr->lastop)
 					{
 						/* need to do an lseek to get current location in file */
-						cur_position = lseek(rm_ptr->fildes, (off_t)0, SEEK_CUR);
+						cur_position = lseek(rm_ptr->fildes, 0, SEEK_CUR);
 						if ((off_t)-1 == cur_position)
 						{
 							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
@@ -434,7 +439,7 @@ void	iorm_use(io_desc *iod, mval *pp)
 						} else
 							rm_ptr->file_pos = cur_position;
 					}
-					FTRUNCATE(rm_ptr->fildes, (off_t)rm_ptr->file_pos, ftruncate_res);
+					FTRUNCATE(rm_ptr->fildes, rm_ptr->file_pos, ftruncate_res);
 					if (0 != ftruncate_res)
 					{
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
@@ -472,14 +477,14 @@ void	iorm_use(io_desc *iod, mval *pp)
 				/* the following it only necessary for a non-split device */
 				if (iod->pair.in == iod->pair.out)
 				{
-					if (-1 == fseek(rm_ptr->filstr, (long)rm_ptr->file_pos, SEEK_SET))
+					if ((off_t)-1 == fseeko(rm_ptr->filstr, rm_ptr->file_pos, SEEK_SET))
 					{
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
-							      RTS_ERROR_LITERAL("fseek"),
+							      RTS_ERROR_LITERAL("fseeko"),
 							      RTS_ERROR_LITERAL("TRUNCATE"), CALLFROM, errno);
 					}
 				}
-				if (-1 == lseek(rm_ptr->fildes, (off_t)rm_ptr->file_pos, SEEK_SET))
+				if ((off_t)-1 == lseek(rm_ptr->fildes, rm_ptr->file_pos, SEEK_SET))
 				{
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("lseek"),
 						      RTS_ERROR_LITERAL("TRUNCATE"), CALLFROM, errno);
@@ -487,7 +492,7 @@ void	iorm_use(io_desc *iod, mval *pp)
 				/* if not open then do the truncate here */
 				if (dev_open != iod->state)
 				{
-					FTRUNCATE(rm_ptr->fildes, (off_t)rm_ptr->file_pos, ftruncate_res);
+					FTRUNCATE(rm_ptr->fildes, rm_ptr->file_pos, ftruncate_res);
 					if (0 != ftruncate_res)
 					{
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
@@ -566,7 +571,7 @@ void	iorm_use(io_desc *iod, mval *pp)
 			if ((1 == width) && gtm_utf8_mode && ((IS_UTF_CHSET(iod->ochset)) || (IS_UTF_CHSET(iod->ichset))))
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_WIDTHTOOSMALL);
 			if (IS_UTF_CHSET(iod->ochset) && rm_ptr->fixed)
-				iorm_flush(iod);	/* need to flush current record first */
+				iorm_cond_wteol(iod);	/* Need to insert a newline if $X is non-zero. */
 			rm_ptr->def_width = FALSE;
 			if (0 == width)
 			{
@@ -716,7 +721,7 @@ void	iorm_use(io_desc *iod, mval *pp)
 					if (RM_WRITE == rm_ptr->lastop)
 					{
 						/* need to do an lseek to get current location in file */
-						cur_position = lseek(rm_ptr->fildes, (off_t)0, SEEK_CUR);
+						cur_position = lseek(rm_ptr->fildes, 0, SEEK_CUR);
 						if ((off_t)-1 == cur_position)
 						{
 							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
@@ -746,14 +751,14 @@ void	iorm_use(io_desc *iod, mval *pp)
 							bom_size_toread = 0;
 						if (0 < bom_size_toread)
 						{
-							if ((off_t)-1 == lseek(rm_ptr->fildes, (off_t)0, SEEK_SET))
+							if ((off_t)-1 == lseek(rm_ptr->fildes, 0, SEEK_SET))
 								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
 									      RTS_ERROR_LITERAL("lseek"),
 									      RTS_ERROR_LITERAL("SEEK"), CALLFROM, errno);
 							rm_ptr->bom_num_bytes = open_get_bom(iod, bom_size_toread);
 
 							/* move back to previous file position */
-							if ((off_t)-1 == lseek(rm_ptr->fildes, (off_t)rm_ptr->file_pos, SEEK_SET))
+							if ((off_t)-1 == lseek(rm_ptr->fildes, rm_ptr->file_pos, SEEK_SET))
 								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
 									      RTS_ERROR_LITERAL("lseek"),
 									      RTS_ERROR_LITERAL("SEEK"), CALLFROM, errno);
@@ -779,7 +784,7 @@ void	iorm_use(io_desc *iod, mval *pp)
 					if (!ISDIGIT_ASCII(*seek_ptr))
 						OUTPUT_SDSEEKERR(seek_str);
 					errno = 0; /* not reset if previous failure */
-					seek_value = STRTOL(seek_ptr, &endptr, 10);
+					seek_value = STRTOLL(seek_ptr, &endptr, 10);
 					if (ERANGE == errno)
 						OUTPUT_SDSEEKERR(seek_str);
 					if ('\0' != *endptr)
@@ -846,34 +851,34 @@ void	iorm_use(io_desc *iod, mval *pp)
 						new_position = 0;
 					else if (statbuf.st_size < new_position)
 						new_position = statbuf.st_size;
-					if (-1 == lseek(rm_ptr->fildes, (off_t)new_position, SEEK_SET))
+					if (-1 == lseek(rm_ptr->fildes, new_position, SEEK_SET))
 					{
 						save_errno = errno;
 						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
 							      RTS_ERROR_LITERAL("lseek"),
 							      RTS_ERROR_LITERAL("SEEK"), CALLFROM, save_errno);
 					}
-					/* do fseek if non-fixed streaming and iod doesn't point to io_std_device.out */
+					/* do fseeko if non-fixed streaming and iod doesn't point to io_std_device.out */
 					/* Only necessary for the non-utf input which uses buffered reads */
 					if (!rm_ptr->fixed && !IS_UTF_CHSET(iod->ichset) && (iod != io_std_device.out))
 					{
 						/* if open then move to end of file first to force flush of any buffered read io */
 						if (iod->state == dev_open)
 						{
-							if (-1 == fseek(rm_ptr->filstr, (long)0, SEEK_END))
+							if ((off_t)-1 == fseeko(rm_ptr->filstr, 0, SEEK_END))
 							{
 								save_errno = errno;
 								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
-									      RTS_ERROR_LITERAL("fseek"),
+									      RTS_ERROR_LITERAL("fseeko"),
 									      RTS_ERROR_LITERAL("SEEK"), CALLFROM, save_errno);
 							}
 						}
 						/* move input stream */
-						if (-1 == fseek(rm_ptr->filstr, (long)new_position, SEEK_SET))
+						if ((off_t)-1 == fseeko(rm_ptr->filstr, new_position, SEEK_SET))
 						{
 							save_errno = errno;
 							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7,
-								      RTS_ERROR_LITERAL("fseek"),
+								      RTS_ERROR_LITERAL("fseeko"),
 								      RTS_ERROR_LITERAL("SEEK"), CALLFROM, save_errno);
 						}
 					}
@@ -1100,5 +1105,6 @@ void	iorm_use(io_desc *iod, mval *pp)
 		if (-1 == CHMOD(iod->trans_name->dollar_io, mode))
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) errno);
 	}
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_unix/iorm_write.c b/sr_unix/iorm_write.c
index 1c06f8b..0cc749b 100644
--- a/sr_unix/iorm_write.c
+++ b/sr_unix/iorm_write.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -26,15 +27,18 @@
 #include "gtm_utf8.h"
 #endif
 #include "gtmcrypt.h"
+#include "send_msg.h"
+#include "error.h"
 
 GBLREF io_pair		io_curr_device;
 #ifdef UNICODE_SUPPORTED
-LITREF	mstr		chset_names[];
+LITREF mstr		chset_names[];
 #endif
 
 error_def(ERR_CRYPTBADWRTPOS);
 error_def(ERR_DEVICEREADONLY);
 error_def(ERR_IOERROR);
+error_def(ERR_NOPRINCIO);
 error_def(ERR_NOTTOEOFONPUT);
 error_def(ERR_SYSCALL);
 
@@ -48,7 +52,9 @@ int  iorm_write_utf_ascii(io_desc *iod, char *string, int len)
 	unsigned char	*outstart, *out, *top, *outptr, *nextoutptr, *outptrtop, *nextmb;
 	char		*out_ptr;
 	d_rm_struct	*rm_ptr;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&iod->pair, -1, ch_set);
 	rm_ptr = (d_rm_struct *)iod->dev_sp;
 	assert(NULL != rm_ptr);
 	if (CHSET_UTF8 != iod->ochset)
@@ -94,15 +100,11 @@ int  iorm_write_utf_ascii(io_desc *iod, char *string, int len)
 		} else
 			out_ptr = (char *)outstart;
 		DOWRITERC(rm_ptr->fildes, out_ptr, outlen, status);
-		if (0 != status)
-		{
-			DOLLAR_DEVICE_WRITE(iod, status);
-			iod->dollar.za = 9;
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		}
+		ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 		rm_ptr->write_occurred = TRUE;
 		rm_ptr->out_bytes += outlen;
 	}
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return outlen;
 }
 
@@ -120,9 +122,10 @@ void iorm_write_utf(mstr *v)
 	boolean_t	utf8_active = TRUE;		/* needed by GTM_IO_WCWIDTH macro */
 	boolean_t	stream, wrap;
 	struct stat	statbuf;
-
+	boolean_t	ch_set;
 
 	iod = io_curr_device.out;
+	ESTABLISH_GTMIO_CH(&io_curr_device, ch_set);
 	rm_ptr = (d_rm_struct *)iod->dev_sp;
 	assert(NULL != rm_ptr);
 	inptr = (unsigned char *)v->addr;
@@ -132,7 +135,10 @@ void iorm_write_utf(mstr *v)
 		rm_ptr->out_bytes = 0;			/* user reset $X */
 	inchars = UTF8_LEN_STRICT(v->addr, v->len);	/* validate and get good char count */
 	if (0 >= inchars)
+	{
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return;
+	}
 	usedwidth = 0;
 	stream = rm_ptr->stream;
 	wrap = iod->wrap;
@@ -172,12 +178,7 @@ void iorm_write_utf(mstr *v)
 					} else
 						out_ptr = (char *)outstart;
 					DOWRITERC(rm_ptr->fildes, out_ptr, outbytes, status);
-					if (0 != status)
-					{
-						DOLLAR_DEVICE_WRITE(iod, status);
-						iod->dollar.za = 9;
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					}
+					ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 					rm_ptr->write_occurred = TRUE;
 					outptr = outstart;
 					rm_ptr->out_bytes = outbytes = 0;
@@ -247,12 +248,7 @@ void iorm_write_utf(mstr *v)
 				{
 					DOWRITERC(rm_ptr->fildes, out_ptr, outbytes, status);
 				}
-				if (0 != status)
-				{
-					DOLLAR_DEVICE_WRITE(iod, status);
-					iod->dollar.za = 9;
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
+				ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 				rm_ptr->write_occurred = TRUE;
 			}
 			iod->dollar.x += usedwidth;
@@ -296,12 +292,7 @@ void iorm_write_utf(mstr *v)
 						} else
 							out_ptr = (char *)temppadarray;
 						DOWRITERC(rm_ptr->fildes, out_ptr, padsize, status);
-						if (0 != status)
-						{
-							DOLLAR_DEVICE_WRITE(iod, status);
-							iod->dollar.za = 9;
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-						}
+						ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 						rm_ptr->write_occurred = TRUE;
 					}
 					assert(rm_ptr->out_bytes == rm_ptr->recordsize);
@@ -343,6 +334,7 @@ void iorm_write_utf(mstr *v)
 		assert(usedwidth <= availwidth);	/* there is room in display WIDTH to write at least one character */
 	}
 	iod->dollar.za = 0;
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return;
 }
 
@@ -357,8 +349,10 @@ void iorm_write(mstr *v)
 	boolean_t	stream, wrap;
 	struct stat	statbuf;
 	int		fstat_res, save_errno;
+	boolean_t	ch_set;
 
 	iod = io_curr_device.out;
+	ESTABLISH_GTMIO_CH(&io_curr_device, ch_set);
 #ifdef __MVS__
 	if (NULL == iod->dev_sp)
 		rm_ptr = (d_rm_struct *)(iod->pair.in)->dev_sp;
@@ -421,7 +415,7 @@ void iorm_write(mstr *v)
 	if (!rm_ptr->fifo && !rm_ptr->pipe && !rm_ptr->fixed && (2 < rm_ptr->fildes) && (RM_WRITE != rm_ptr->lastop))
 	{
 		/* need to do an lseek to set current location in file */
-		if (-1 == (lseek(rm_ptr->fildes, (off_t)rm_ptr->file_pos, SEEK_SET)))
+		if ((off_t)-1 == (lseek(rm_ptr->fildes, rm_ptr->file_pos, SEEK_SET)))
 		{
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("lseek"),
 				      RTS_ERROR_LITERAL("iorm_write()"), CALLFROM, errno);
@@ -435,7 +429,7 @@ void iorm_write(mstr *v)
 	    (2 < rm_ptr->fildes) && (RM_WRITE != rm_ptr->lastop))
 	{
 		/* need to do lseek to skip the BOM before writing*/
-		if (-1 == (lseek(rm_ptr->fildes, (off_t)rm_ptr->bom_num_bytes, SEEK_SET)))
+		if ((off_t)-1 == (lseek(rm_ptr->fildes, (off_t)rm_ptr->bom_num_bytes, SEEK_SET)))
 		{
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_IOERROR, 7, RTS_ERROR_LITERAL("lseek"),
 				      RTS_ERROR_LITERAL("iorm_write()"), CALLFROM, errno);
@@ -447,11 +441,15 @@ void iorm_write(mstr *v)
 	if (IS_UTF_CHSET(iod->ochset))
 	{
 		iorm_write_utf(v);
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return;
 	}
 	inlen = v->len;
 	if (!inlen)
+	{
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return;
+	}
 	stream = rm_ptr->stream;
 	wrap = iod->wrap;
 	if (stream && !wrap)
@@ -479,12 +477,7 @@ void iorm_write(mstr *v)
 		{
 			DOWRITERC(rm_ptr->fildes, out_ptr, len, status);
 		}
-		if (0 != status)
-		{
-			DOLLAR_DEVICE_WRITE(iod, status);
-			iod->dollar.za = 9;
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		}
+		ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 		rm_ptr->write_occurred = TRUE;
 		iod->dollar.x += len;
 		if (0 >= (inlen -= len))
@@ -501,12 +494,7 @@ void iorm_write(mstr *v)
 					out_ptr = pvt_crypt_buf.addr;
 				}
 				DOWRITERC(rm_ptr->fildes, out_ptr, RMEOL_LEN, status);
-				if (0 != status)
-				{
-					DOLLAR_DEVICE_WRITE(iod, status);
-					iod->dollar.za = 9;
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
+				ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 				rm_ptr->write_occurred = TRUE;
 			}
 			iod->dollar.x = 0;	/* don't use wteol to terminate wrapped records for fixed. */
@@ -517,5 +505,6 @@ void iorm_write(mstr *v)
 		}
 	}
 	iod->dollar.za = 0;
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
         return;
 }
diff --git a/sr_unix/iorm_wteol.c b/sr_unix/iorm_wteol.c
index 3a1d402..7de6eae 100644
--- a/sr_unix/iorm_wteol.c
+++ b/sr_unix/iorm_wteol.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -27,14 +28,17 @@
 #include "gtm_utf8.h"
 #endif
 #include "gtmcrypt.h"
+#include "send_msg.h"
+#include "error.h"
 
 #ifdef UNICODE_SUPPORTED
-LITREF	mstr		chset_names[];
-GBLREF	UConverter	*chset_desc[];
+LITREF mstr		chset_names[];
+GBLREF UConverter	*chset_desc[];
 #endif
 
 error_def(ERR_CRYPTBADWRTPOS);
 error_def(ERR_DEVICEREADONLY);
+error_def(ERR_NOPRINCIO);
 error_def(ERR_NOTTOEOFONPUT);
 error_def(ERR_SYSCALL);
 
@@ -48,7 +52,9 @@ void iorm_wteol(int4 x,io_desc *iod)
 	unsigned int	*dollary_ptr;
 	struct stat	statbuf;
 	int		fstat_res, save_errno;
+	boolean_t	ch_set;
 
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 #	ifdef __MVS__
 	/* on zos if it is a fifo device then point to the pair.out for $X and $Y */
 	if (((d_rm_struct *)iod->dev_sp)->fifo)
@@ -119,13 +125,7 @@ void iorm_wteol(int4 x,io_desc *iod)
 						out_ptr = pvt_crypt_buf.addr;
 					}
 					DOWRITERL(rm_ptr->fildes, out_ptr, UTF16BE_BOM_LEN, res_size);
-					if (-1 == res_size)
-					{
-						int real_errno = errno;
-						DOLLAR_DEVICE_WRITE(iod, real_errno);
-						iod->dollar.za = 9;
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) real_errno);
-					}
+					ISSUE_NOPRINCIO_IF_NEEDED_RM(res_size, <=, iod);
 					rm_ptr->write_occurred = TRUE;
 					iod->ochset = CHSET_UTF16BE;
 					get_chset_desc(&chset_names[iod->ochset]);
@@ -176,12 +176,7 @@ void iorm_wteol(int4 x,io_desc *iod)
 							out_ptr = pvt_crypt_buf.addr;
 						}
 						DOWRITERC(rm_ptr->fildes, out_ptr, bytes_per_char, status);
-						if (0 != status)
-						{
-							DOLLAR_DEVICE_WRITE(iod, status);
-							iod->dollar.za = 9;
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-						}
+						ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 						rm_ptr->write_occurred = TRUE;
 					}
 					assert(rm_ptr->out_bytes == rm_ptr->recordsize);
@@ -206,13 +201,7 @@ void iorm_wteol(int4 x,io_desc *iod)
 					out_ptr = pvt_crypt_buf.addr;
 				}
 				DOWRITERL(rm_ptr->fildes, out_ptr, pad_size, res_size);
-				if (-1 == res_size)
-				{
-					int real_errno = errno;
-					DOLLAR_DEVICE_WRITE(iod, real_errno);
-					iod->dollar.za = 9;
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) real_errno);
-				}
+				ISSUE_NOPRINCIO_IF_NEEDED_RM(res_size, <=, iod);
 				rm_ptr->write_occurred = TRUE;
 				assert(res_size == pad_size);
 			}
@@ -226,12 +215,7 @@ void iorm_wteol(int4 x,io_desc *iod)
 				out_ptr = pvt_crypt_buf.addr;
 			}
 			DOWRITERC(rm_ptr->fildes, out_ptr, RMEOL_LEN, status);
-			if (0 != status)
-			{
-				DOLLAR_DEVICE_WRITE(iod, status);
-				iod->dollar.za = 9;
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-			}
+			ISSUE_NOPRINCIO_IF_NEEDED_RM(status, ==, iod);
 			rm_ptr->write_occurred = TRUE;
 		}
 		*dollarx_ptr = 0;
@@ -244,5 +228,6 @@ void iorm_wteol(int4 x,io_desc *iod)
 	*dollary_ptr += x;
 	if (iod->length)
 		*dollary_ptr %= iod->length;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
diff --git a/sr_unix/iormdef.h b/sr_unix/iormdef.h
index 40143d1..c2877bc 100644
--- a/sr_unix/iormdef.h
+++ b/sr_unix/iormdef.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -65,17 +66,26 @@ error_def(ERR_CRYPTBADWRTPOS);
 
 #define	IORM_FCLOSE(D_RM, FILDES, FILSTR)								\
 {													\
+	GBLREF int	process_exiting;								\
+													\
 	int		fclose_res, rc, save_fd;							\
 													\
 	if (NULL != D_RM->FILSTR)									\
 	{	/* Since FCLOSE also closes the fd, reset FILDES (no need to close it separately). */	\
 		LINUX_ONLY(assert(D_RM->FILDES == D_RM->FILSTR->_fileno);)				\
-		FCLOSE(D_RM->FILSTR, fclose_res);							\
-		if (0 != fclose_res)									\
-		{											\
-			save_fd = D_RM->FILDES;								\
-			rc = errno;									\
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CLOSEFAIL, 1, save_fd, rc);	\
+		if (!process_exiting)									\
+		{	/* Only do the actual FCLOSE() if the process is not exiting because a) the OS	\
+			 * takes care of opened file descriptors anyway; and b) we might have received	\
+			 * a deadly signal, such as SIGTERM, while in getc(), which can ultimately lead	\
+			 * to a hang on FCLOSE().							\
+			 */										\
+			FCLOSE(D_RM->FILSTR, fclose_res);						\
+			if (0 != fclose_res)								\
+			{										\
+				save_fd = D_RM->FILDES;							\
+				rc = errno;								\
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CLOSEFAIL, 1, save_fd, rc);\
+			}										\
 		}											\
 		D_RM->FILSTR = NULL;									\
 		D_RM->FILDES = FD_INVALID;								\
@@ -114,6 +124,39 @@ error_def(ERR_CRYPTBADWRTPOS);
 	}												\
 }
 
+/* Set prin_out_dev_failure if a write failed on the principal device. If it is a recurrence, issue the
+ * NOPRINCIO error.
+ */
+#define ISSUE_NOPRINCIO_IF_NEEDED_RM(VAR, CMP_SIGN, IOD)						\
+{													\
+	GBLREF io_pair		io_std_device;								\
+	GBLREF bool		prin_out_dev_failure;							\
+													\
+	int			write_status;								\
+													\
+	if (0 CMP_SIGN VAR)										\
+	{	/* Set prin_out_dev_failure to FALSE if it was set TRUE earlier but is working now. */	\
+		if (IOD == io_std_device.out)								\
+			prin_out_dev_failure = FALSE;							\
+	} else												\
+	{												\
+		write_status = (-1 == VAR) ? errno : VAR;						\
+		if (IOD == io_std_device.out)								\
+		{											\
+			if (!prin_out_dev_failure)							\
+				prin_out_dev_failure = TRUE;						\
+			else										\
+			{										\
+				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOPRINCIO);			\
+				stop_image_no_core();							\
+			}										\
+		}											\
+		DOLLAR_DEVICE_WRITE(IOD, write_status);							\
+		IOD->dollar.za = 9;									\
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) write_status);					\
+	}												\
+}
+
 /* Operations for this device type */
 #define RM_NOOP		0
 #define RM_WRITE	1
@@ -207,7 +250,7 @@ typedef struct
 	unsigned char	*inbuf_top;	/* Last char (+1) in inbuf */
 	unsigned char	*outbuf;	/* Output buffer area */
 	FILE		*filstr;
-	uint4		file_pos;
+	off_t		file_pos;
 	long		pipe_buff_size;
 	char		utf_tmp_buffer[CHUNK_SIZE];	/* Buffer to store CHUNK bytes */
 	int		utf_tot_bytes_in_buffer;	/* Number of bytes read from device, it refers utf_tmp_buffer buffer */
@@ -231,6 +274,7 @@ typedef struct
 #endif
 
 int gtm_utf_bomcheck(io_desc *iod, gtm_chset_t *chset, unsigned char *buffer, int len);
+void iorm_cond_wteol(io_desc *iod);
 int iorm_get_bom(io_desc *io_ptr, int *blocked_in, boolean_t ispipe, int flags, int4 *tot_bytes_read,
 		 TID timer_id, int4 *msec_timeout, boolean_t colon_zero);
 int iorm_get_bom_fol(io_desc *io_ptr, int4 *tot_bytes_read, int4 *msec_timeout, boolean_t timed,
diff --git a/sr_unix/iosocket_pass_local.c b/sr_unix/iosocket_pass_local.c
index a1eddd1..6076d87 100644
--- a/sr_unix/iosocket_pass_local.c
+++ b/sr_unix/iosocket_pass_local.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -28,6 +29,7 @@
 #include "eintr_wrappers.h"
 #include "stringpool.h"
 #include "outofband.h"
+#include "error.h"
 
 #define MAX_PASS_FDS			256
 #define PID_CHECKING_SUPPORTED		defined(__linux__) || defined(__sun) || defined(_AIX)
@@ -132,6 +134,7 @@ void iosocket_pass_local(io_desc *iod, pid_t pid, int4 timeout, int argcnt, va_l
 	char			complete_buf[STR_LIT_LEN(ACCEPT_COMPLETE)];
 	char			*errptr;
 	int4			errlen;
+	boolean_t		ch_set;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -166,6 +169,7 @@ void iosocket_pass_local(io_desc *iod, pid_t pid, int4 timeout, int argcnt, va_l
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(2) ERR_CONNSOCKREQ, 0);
 		return;
 	}
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	ENSURE_PASS_SOCKET(socketptr);
 	out_of_time = FALSE;
 #	if PID_CHECKING_SUPPORTED
@@ -188,7 +192,7 @@ void iosocket_pass_local(io_desc *iod, pid_t pid, int4 timeout, int argcnt, va_l
 	/* pass fds */
 	fds = (int *)CMSG_DATA((struct cmsghdr *)cmsg_buffer);
 
-	for (argn=0; argn < argcnt; argn++)
+	for (argn = 0; argn < argcnt; argn++)
 	{
 		handle = va_arg(args, mval *);
 		if ((NULL == handle) || !MV_DEFINED(handle))
@@ -245,7 +249,7 @@ void iosocket_pass_local(io_desc *iod, pid_t pid, int4 timeout, int argcnt, va_l
 		goto ioerr;
 	assert(rval == iov.iov_len);
 
-	for (argn=0; argn < argcnt; argn++)
+	for (argn = 0; argn < argcnt; argn++)
 	{
 		if (0 > (index = iosocket_handle(handles[argn].addr, &handles[argn].len, FALSE, socket_pool)))
 		{
@@ -297,13 +301,14 @@ void iosocket_pass_local(io_desc *iod, pid_t pid, int4 timeout, int argcnt, va_l
 		memcpy(&iod->dollar.device[STR_LIT_LEN(DOLLAR_DEVICE_PREFIX)], errptr, errlen + 1);	/* we want the null */
 		if (socketptr->ioerror)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_SOCKPASS, 0, ERR_TEXT, 2, errlen, errptr);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
 	}
 
 	if ((NO_M_TIMEOUT != timeout) && !out_of_time)
 		cancel_timer(timer_id);
 
-	for (argn=0; argn < argcnt; argn++)
+	for (argn = 0; argn < argcnt; argn++)
 	{
 		handlestr = handles[argn];
 		if (-1 != (index = iosocket_handle(handlestr.addr, &handlestr.len, FALSE, socket_pool)))
@@ -312,6 +317,7 @@ void iosocket_pass_local(io_desc *iod, pid_t pid, int4 timeout, int argcnt, va_l
 
 	if (NO_M_TIMEOUT != timeout)
 		dollar_truth = TRUE;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 
 ioerr:
@@ -319,6 +325,7 @@ ioerr:
 	if (out_of_time && (EINTR == save_errno))
 	{
 		dollar_truth = FALSE;
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
 	}
 	if ((NO_M_TIMEOUT != timeout) && !out_of_time)
@@ -330,6 +337,7 @@ ioerr:
 	memcpy(&iod->dollar.device[STR_LIT_LEN(DOLLAR_DEVICE_PREFIX)], errptr, errlen + 1);	/* we want the null */
 	if (socketptr->ioerror)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_SOCKPASS, 0, save_errno, 0);
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
 
@@ -357,6 +365,7 @@ void iosocket_accept_local(io_desc *iod, mval *handlesvar, pid_t pid, int4 timeo
 	char			complete_buf[STR_LIT_LEN(PASS_COMPLETE)];
 	char			*errptr;
 	int4			errlen;
+	boolean_t		ch_set;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -386,6 +395,7 @@ void iosocket_accept_local(io_desc *iod, mval *handlesvar, pid_t pid, int4 timeo
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(2) ERR_CONNSOCKREQ, 0);
 		return;
 	}
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	ENSURE_PASS_SOCKET(socketptr);
 	out_of_time = FALSE;
 
@@ -410,7 +420,7 @@ void iosocket_accept_local(io_desc *iod, mval *handlesvar, pid_t pid, int4 timeo
 	if (NULL == socket_pool)
 		iosocket_poolinit();
 
-	for (argn=0; argn < argcnt; argn++)
+	for (argn = 0; argn < argcnt; argn++)
 	{
 		handle = va_arg(args, mval *);
 		if ((NULL != handle) && MV_DEFINED(handle))
@@ -592,6 +602,7 @@ void iosocket_accept_local(io_desc *iod, mval *handlesvar, pid_t pid, int4 timeo
 		memcpy(&iod->dollar.device[STR_LIT_LEN(DOLLAR_DEVICE_PREFIX)], errptr, errlen + 1);	/* we want the null */
 		if (socketptr->ioerror)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_SOCKACCEPT, 0, ERR_TEXT, 2, errlen, errptr);
+		REVERT_GTMIO_CH(&iod->pair, ch_set);
 		return;
 	}
 	SENDALL(socketptr->sd, ACCEPT_COMPLETE, STR_LIT_LEN(ACCEPT_COMPLETE), rval);
@@ -654,6 +665,7 @@ ioerr:
 		if (socketptr->ioerror)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_SOCKACCEPT, 0, save_errno, 0);
 	}
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
 
diff --git a/sr_unix/iosocket_tls.c b/sr_unix/iosocket_tls.c
index 8fadbf8..ff6cad1 100644
--- a/sr_unix/iosocket_tls.c
+++ b/sr_unix/iosocket_tls.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -57,6 +58,9 @@ error_def(ERR_TEXT);
 error_def(ERR_ZINTRECURSEIO);
 
 #define	MAX_TLSOPTION	12
+#define TLSLABEL	"tls: { "
+#define COLONBRACKET	": { "
+#define BRACKETSSEMIS	" }; };"
 
 typedef enum
 {
@@ -67,13 +71,14 @@ typedef enum
 } tls_option;
 
 void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password, mval *extraarg)
-{	/* note extraarg is not currently used */
+{
 	int4			length, flags, timeout, msec_timeout, status, status2, len, errlen, devlen, tls_errno, save_errno;
 	io_desc			*iod;
 	d_socket_struct 	*dsocketptr;
 	socket_struct		*socketptr;
 	char			optionstr[MAX_TLSOPTION], idstr[MAX_TLSID_LEN], passwordstr[GTM_PASSPHRASE_MAX_ASCII + 1];
 	const char		*errp;
+	char			*extrastr, *extraptr;
 	tls_option		option;
 	gtm_tls_socket_t	*tlssocket;
 	ABS_TIME		cur_time, end_time;
@@ -83,6 +88,7 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 	fd_set			fds, *readfds, *writefds;
 	struct timeval		timeout_spec, *timeout_ptr;
 #	endif
+	boolean_t		ch_set;
 
 	iod = io_curr_device.out;
 	assert(gtmsocket == iod->type);
@@ -100,10 +106,11 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 	if (dsocketptr->mupintr)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZINTRECURSEIO);
 	socketptr = dsocketptr->socket[dsocketptr->current_socket];
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	ENSURE_DATA_SOCKET(socketptr);
 	if (socket_tcpip != socketptr->protocol)
 	{
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSPARAM, 4, RTS_ERROR_MVAL(optionmval),
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSPARAM, 4, LEN_AND_LIT("/TLS"),
 			LEN_AND_LIT("but socket is not TCP"));
 		return;
 	}
@@ -125,8 +132,8 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 		idstr[length] = '\0';
 	} else
 		idstr[0] = '\0';
-	if (NULL != password)
-	{
+	if (('\0' != idstr[0]) && (NULL != password))
+	{	/* password only usable if tlsid provided - iosocket_iocontrol checks */
 		length = password->str.len;
 		if (GTM_PASSPHRASE_MAX_ASCII < length)
 		{
@@ -136,10 +143,15 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 		}
 		STRNCPY_STR(passwordstr, password->str.addr, length);
 		passwordstr[length] = '\0';
+	} else if (NULL != password)
+	{
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSPARAM, 4, LEN_AND_LIT("passphrase"), LEN_AND_LIT("requires TLSID"));
+		return;
 	} else
 		passwordstr[0] = '\0';
-	length = MIN(MAX_TLSOPTION, optionmval->str.len);
+	length = MIN((SIZEOF(optionstr) - 1), optionmval->str.len);
 	lower_to_upper((uchar_ptr_t)optionstr, (uchar_ptr_t)optionmval->str.addr, length);
+	optionstr[length] = '\0';
 	if (0 == memcmp(optionstr, "CLIENT", length))
 		option = tlsopt_client;
 	else if (0 == memcmp(optionstr, "SERVER", length))
@@ -166,7 +178,7 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 		}
 		assertpro((0 >= socketptr->buffered_length) && (0 >= socketptr->obuffer_length));
 		if (NULL == tls_ctx)
-		{	/* first use of TLS */
+		{	/* first use of TLS in process */
 			if (-1 == gtm_tls_loadlibrary())
 			{
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSDLLNOOPEN, 0, ERR_TEXT, 2, LEN_AND_STR(dl_err));
@@ -186,11 +198,74 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSINIT, 0, ERR_TEXT, 2, errlen, errp);
 				if (NO_M_TIMEOUT != timeoutarg)
 					dollar_truth = FALSE;
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return;
 			}
 		}
 		socketptr->tlsenabled = TRUE;
 		flags = GTMTLS_OP_SOCKET_DEV | ((tlsopt_client == option) ? GTMTLS_OP_CLIENT_MODE : 0);
+		if (NULL != extraarg)
+		{
+			if ('\0' == idstr[0])
+			{
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSPARAM, 4, LEN_AND_STR(optionstr),
+					LEN_AND_LIT("TLSID required for configuration string"));
+				return;
+			}
+			length = extraarg->str.len;
+			extrastr = malloc(length + 1 + SIZEOF(TLSLABEL) - 1 + tlsid->str.len + SIZEOF(COLONBRACKET) - 1
+				+ SIZEOF(BRACKETSSEMIS) - 1);
+			STRNCPY_LIT(extrastr, TLSLABEL);
+			extraptr = extrastr + SIZEOF(TLSLABEL) - 1;
+			memcpy(extraptr, tlsid->str.addr, tlsid->str.len);
+			extraptr += tlsid->str.len;
+			STRNCPY_LIT(extraptr, COLONBRACKET);
+			extraptr = extraptr + SIZEOF(COLONBRACKET) - 1;
+			STRNCPY_STR(extraptr, extraarg->str.addr, length);
+			extraptr += length;
+			STRNCPY_LIT(extraptr, BRACKETSSEMIS);
+			extraptr += SIZEOF(BRACKETSSEMIS) - 1;
+			*extraptr = '\0';
+			if (0 > gtm_tls_add_config(tls_ctx, idstr, extrastr))
+			{	/* error string available */
+				socketptr->tlsenabled = FALSE;
+				free(extrastr);
+				errp = gtm_tls_get_error();
+				len = SIZEOF(ONE_COMMA) - 1;
+				memcpy(iod->dollar.device, ONE_COMMA, len);
+				errlen = STRLEN(errp);
+				devlen = MIN((SIZEOF(iod->dollar.device) - len - 1), errlen);
+				memcpy(&iod->dollar.device[len], errp, devlen + 1);
+				if (devlen < errlen)
+					iod->dollar.device[SIZEOF(iod->dollar.device) - 1] = '\0';
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSCONVSOCK, 0, ERR_TEXT, 2, errlen, errp);
+				return;
+			} else
+				free(extrastr);
+		}
+		if ('\0' != passwordstr[0])
+		{
+			if ('\0' == idstr[0])
+			{
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSPARAM, 4, LEN_AND_STR(optionstr),
+					LEN_AND_LIT("TLSID required for passphrase"));
+				return;
+			}
+			if (0 > gtm_tls_store_passwd(tls_ctx, idstr, passwordstr))
+			{	/* error string available */
+				socketptr->tlsenabled = FALSE;
+				errp = gtm_tls_get_error();
+				len = SIZEOF(ONE_COMMA) - 1;
+				memcpy(iod->dollar.device, ONE_COMMA, len);
+				errlen = STRLEN(errp);
+				devlen = MIN((SIZEOF(iod->dollar.device) - len - 1), errlen);
+				memcpy(&iod->dollar.device[len], errp, devlen + 1);
+				if (devlen < errlen)
+					iod->dollar.device[SIZEOF(iod->dollar.device) - 1] = '\0';
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSCONVSOCK, 0, ERR_TEXT, 2, errlen, errp);
+				return;
+			}
+		}
 		socketptr->tlssocket = gtm_tls_socket(tls_ctx, NULL, socketptr->sd, idstr, flags);
 		if (NULL == socketptr->tlssocket)
 		{
@@ -207,6 +282,7 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSCONVSOCK, 0, ERR_TEXT, 2, errlen, errp);
 			if (NO_M_TIMEOUT != timeoutarg)
 				dollar_truth = FALSE;
+			REVERT_GTMIO_CH(&iod->pair, ch_set);
 			return;
 		}
 		status = 0;
@@ -215,8 +291,9 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 			timeout_ptr = NULL;
 		else
 		{
-			timeout_spec.tv_sec = msec_timeout / 1000;
-			timeout_spec.tv_usec = (msec_timeout % 1000) * 1000;	/* remainder in millsecs to microsecs */
+			timeout_spec.tv_sec = msec_timeout / MILLISECS_IN_SEC;
+			/* remainder in millsecs to microsecs */
+			timeout_spec.tv_usec = (msec_timeout % MILLISECS_IN_SEC) * MICROSECS_IN_MSEC;
 			timeout_ptr = &timeout_spec;
 		}
 #		endif
@@ -278,6 +355,9 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 				if (socketptr->ioerror)
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSHANDSHAKE, 0,
 						ERR_TEXT, 2, errlen, errp);
+				if (NO_M_TIMEOUT != timeoutarg)
+					dollar_truth = FALSE;
+				REVERT_GTMIO_CH(&iod->pair, ch_set);
 				return;
 			}
 			if ((0 != status) && (0 <= status2))	/* not accepted/connected and not error */
@@ -291,11 +371,13 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 						gtm_tls_session_close((gtm_tls_socket_t **)&socketptr->tlssocket);
 						socketptr->tlsenabled = FALSE;
 						dollar_truth = FALSE;
+						REVERT_GTMIO_CH(&iod->pair, ch_set);
 						return;
 					} else
 					{	/* adjust msec_timeout for poll/select */
 #					ifdef	USE_POLL
-						msec_timeout = (cur_time.at_sec * 1000) + (cur_time.at_usec / 1000);
+						msec_timeout = (cur_time.at_sec * MILLISECS_IN_SEC) +
+							DIVIDE_ROUND_UP(cur_time.at_usec, MICROSECS_IN_MSEC);
 #					else
 						timeout_spec.tv_sec = cur_time.at_sec;
 						timeout_spec.tv_usec = (gtm_tv_usec_t)cur_time.at_usec;
@@ -306,6 +388,7 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 					gtm_tls_session_close((gtm_tls_socket_t **)&socketptr->tlssocket);
 					socketptr->tlsenabled = FALSE;
 					dollar_truth = FALSE;
+					REVERT_GTMIO_CH(&iod->pair, ch_set);
 					return;
 				}
 				continue;
@@ -326,7 +409,16 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 				LEN_AND_LIT("but TLS not enabled"));
 			return;		/* make compiler and analyzers happy */
 		}
-		/* TODO: allow verify-mode options in idstr */
+		tlssocket = (gtm_tls_socket_t *)socketptr->tlssocket;
+		if (GTMTLS_OP_CLIENT_MODE & tlssocket->flags)
+		{	/* only server can renegotiate */
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSPARAM, 4, LEN_AND_STR(optionstr),
+				RTS_ERROR_LITERAL("not allowed when client"));
+			return;
+		}
+		/* TODO: allow verify-mode options in idstr but only 32 chars */
+		/* TODO: if anything in input buffer or ready to be read then error */
+		/* TODO: should we flush output buffer first */
 		status = gtm_tls_renegotiate((gtm_tls_socket_t *)socketptr->tlssocket);
 		if (0 != status)
 		{
@@ -345,6 +437,9 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 			if (socketptr->ioerror)
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TLSRENEGOTIATE, 0,
 					ERR_TEXT, 2, errlen, errp);
+			if (NO_M_TIMEOUT != timeoutarg)
+				dollar_truth = FALSE;
+			REVERT_GTMIO_CH(&iod->pair, ch_set);
 			return;
 		}
 	} else
@@ -352,6 +447,7 @@ void	iosocket_tls(mval *optionmval, int4 timeoutarg, mval *tlsid, mval *password
 			LEN_AND_LIT("not a valid option"));
 	if (NO_M_TIMEOUT != timeoutarg)
 		dollar_truth = TRUE;
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
 #endif
diff --git a/sr_unix/iott_close.c b/sr_unix/iott_close.c
index 551c526..ff0ca15 100644
--- a/sr_unix/iott_close.c
+++ b/sr_unix/iott_close.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,23 +21,25 @@
 #include "gtmio.h"
 #include "stringpool.h"
 #include "setterm.h"
+#include "error.h"
 
 GBLREF io_pair		io_std_device;
 LITREF unsigned char	io_params_size[];
 
+error_def(ERR_SYSCALL);
+
 void iott_close(io_desc *v, mval *pp)
 {
-	/* only exception allowed */
-	error_def(ERR_SYSCALL);
-
 	d_tt_struct	*ttptr;
 	params		ch;
 	int		status;
 	int		p_offset;
+	boolean_t	ch_set;
 
 	assert(v->type == tt);
 	if (v->state != dev_open)
 		return;
+	ESTABLISH_GTMIO_CH(&v->pair, ch_set);
 	iott_flush(v);
 	if (v->pair.in != v)
 		assert(v->pair.out == v);
@@ -59,18 +62,23 @@ void iott_close(io_desc *v, mval *pp)
 			(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
 	}
 	if (v == io_std_device.in || (v == io_std_device.out))
+	{
+		REVERT_GTMIO_CH(&v->pair, ch_set);
 		return;
+	}
 
 	CLOSEFILE_RESET(ttptr->fildes, status);	/* resets "ttptr->fildes" to FD_INVALID */
 	if (0 != status)
 	{
 		assert(status == errno);
-		rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("iott_close(CLOSEFILE)"), CALLFROM, status);
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5,
+				RTS_ERROR_LITERAL("iott_close(CLOSEFILE)"), CALLFROM, status);
 	}
 	if (ttptr->recall_buff.addr)
 	{
 		free(ttptr->recall_buff.addr);
 		ttptr->recall_buff.addr = NULL;
 	}
+	REVERT_GTMIO_CH(&v->pair, ch_set);
 	return;
 }
diff --git a/sr_unix/iott_edit.c b/sr_unix/iott_edit.c
index eafc4b3..2b21812 100644
--- a/sr_unix/iott_edit.c
+++ b/sr_unix/iott_edit.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2005, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2005-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,6 +31,7 @@
 #include "gtm_utf8.h"
 #endif
 #include "min_max.h"
+#include "error.h"
 
 GBLREF io_pair 		io_curr_device;
 
@@ -49,9 +51,11 @@ int	iott_write_raw(int fildes, void *str832, unsigned int len)
 	io_desc		*io_ptr = io_curr_device.in;
 	d_tt_struct	*tt_ptr;
 	boolean_t	utf8_active;
+	boolean_t	ch_set;
 
 	if (0 == len)
 		return 0;
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
 	tt_ptr = (d_tt_struct *)io_ptr->dev_sp;
 	utf8_active = gtm_utf8_mode ? (CHSET_M != io_ptr->ichset) : FALSE;
 	if (!utf8_active)
@@ -59,7 +63,10 @@ int	iott_write_raw(int fildes, void *str832, unsigned int len)
 		str = (unsigned char *)str832;
 		DOWRITERL_A(fildes, str, len, written);
 		if (0 > written)
+		{
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			return -1;
+		}
 #ifdef UNICODE_SUPPORTED
 	} else
 	{
@@ -77,12 +84,16 @@ int	iott_write_raw(int fildes, void *str832, unsigned int len)
 			{	/* something to write */
 				DOWRITERL_A(fildes, string, outlen, this_write);
 				if (0 > this_write)
+				{
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					return -1;
+				}
 				written += this_write;
 			}
 		}
 #endif
 	}
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return written;
 }
 
@@ -110,8 +121,10 @@ int 	write_str(void *str832, unsigned int len, unsigned int start_x, boolean_t m
 	io_desc		*io_ptr = io_curr_device.in;
 	d_tt_struct	*tt_ptr;
 	boolean_t	utf8_active, writenewline;
+	boolean_t	ch_set;
 
 	assert(width);
+	ESTABLISH_RET_GTMIO_CH(&io_ptr->pair, -1, ch_set);
 	tt_ptr = (d_tt_struct *)io_ptr->dev_sp;
 	utf8_active = gtm_utf8_mode ? (CHSET_M != io_ptr->ichset) : FALSE;
 	if (utf8_active && !multibyte)
@@ -176,7 +189,10 @@ int 	write_str(void *str832, unsigned int len, unsigned int start_x, boolean_t m
 			{	/* something to write */
 				DOWRITERL_A(fildes, strstart, outlen, written);
 				if (0 > written)
+				{
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					return -1;
+				}
 			}
 			if (!writenewline)
 			{
@@ -198,7 +214,10 @@ int 	write_str(void *str832, unsigned int len, unsigned int start_x, boolean_t m
 			{
 				DOWRITERC(fildes, NATIVE_TTEOL, strlen(NATIVE_TTEOL), ret);
 				if (0 != ret)
+				{
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					return -1;
+				}
 			}
 			number_of_lines_up++;
 			cur_x = line_width = 0;
@@ -216,7 +235,10 @@ int 	write_str(void *str832, unsigned int len, unsigned int start_x, boolean_t m
 					cur_width = len;
 				DOWRITERL_A(fildes, str, cur_width, written);
 				if (0 > written)
+				{
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					return -1;
+				}
 				str += written;
 				len -= written;
 				cur_x += cur_width;
@@ -233,7 +255,10 @@ int 	write_str(void *str832, unsigned int len, unsigned int start_x, boolean_t m
 			{
 		    		DOWRITERC(fildes, NATIVE_TTEOL, strlen(NATIVE_TTEOL), ret);
 				if (0 != ret)
+				{
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					return -1;
+				}
 			}
 			number_of_lines_up++;
 			cur_x = 0;
@@ -247,14 +272,21 @@ int 	write_str(void *str832, unsigned int len, unsigned int start_x, boolean_t m
 	{
 		ret = (NULL != CURSOR_UP) ? write_loop(fildes, (unsigned char *)CURSOR_UP, number_of_lines_up) : 0;
 		if (0 > ret)
+		{
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			return -1;
+		}
 		if (number_of_chars_left > 0)
 			ret = (NULL != CURSOR_LEFT) ? write_loop(fildes, (unsigned char *)CURSOR_LEFT, number_of_chars_left) : 0;
 		else
 			ret = (NULL != CURSOR_RIGHT) ? write_loop(fildes, (unsigned char *)CURSOR_RIGHT, -number_of_chars_left) : 0;
 		if (0 > ret)
+		{
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			return -1;
+		}
 	}
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return 0;
 }
 
@@ -289,9 +321,11 @@ int 	move_cursor_left(int col, int num_cols)
 	 *  returns 0 if success, != 0 if error
 	 * -------------------------------------------------------
 	 */
-	int	fildes = ((d_tt_struct *)((io_curr_device.in)->dev_sp))->fildes;
-	int	ret;
+	int		fildes = ((d_tt_struct *)((io_curr_device.in)->dev_sp))->fildes;
+	int		ret;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
 	if (0 == num_cols)
 		ret = 0;
 	else if (0 > num_cols)
@@ -306,7 +340,10 @@ int 	move_cursor_left(int col, int num_cols)
 			{
 				DOWRITERC(fildes, CURSOR_UP, strlen(CURSOR_UP), ret);
 				if (0 > ret)
+				{
+					REVERT_GTMIO_CH(&io_curr_device, ch_set);
 					return -1;
+				}
 			}
 			ret = (NULL != CURSOR_RIGHT)
 				? write_loop(fildes, (unsigned char *)CURSOR_RIGHT, io_curr_device.in->width - num_cols) : 0;
@@ -317,11 +354,15 @@ int 	move_cursor_left(int col, int num_cols)
 		{
 			DOWRITERC(fildes, CURSOR_UP, strlen(CURSOR_UP), ret);
 			if (0 > ret)
+			{
+				REVERT_GTMIO_CH(&io_curr_device, ch_set);
 				return -1;
+			}
 		}
 		ret = (NULL != CURSOR_RIGHT)
 			? write_loop(fildes, (unsigned char *)CURSOR_RIGHT, io_curr_device.in->width - num_cols) : 0;
 	}
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return ret;
 }
 
@@ -333,10 +374,12 @@ int 	move_cursor_right(int col, int num_cols)
 	 *	returns 0 if success, != 0 if error
 	 * -------------------------------------------------------
 	 */
-	int	fildes = ((d_tt_struct *)((io_curr_device.in)->dev_sp))->fildes;
-	int	ret;
-	io_desc *io_ptr = io_curr_device.in;
+	int		fildes = ((d_tt_struct *)((io_curr_device.in)->dev_sp))->fildes;
+	int		ret;
+	io_desc		*io_ptr = io_curr_device.in;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
 	if (0 == num_cols)
 		ret = 0;
 	else if (0 > num_cols)
@@ -347,11 +390,15 @@ int 	move_cursor_right(int col, int num_cols)
 	{
 		DOWRITERC(fildes, NATIVE_TTEOL, strlen(NATIVE_TTEOL), ret);
 		if (0 > ret)
+		{
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			return -1;
+		}
 		num_cols -= (io_curr_device.in->width - col);
 		if (num_cols)
 			ret = (NULL != CURSOR_RIGHT) ? write_loop(fildes, (unsigned char *)CURSOR_RIGHT, num_cols) : 0;
 	}
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return ret;
 }
 
@@ -425,7 +472,9 @@ int 	compute_dx(void *str832, unsigned int index, unsigned int width, unsigned i
 	io_desc		*io_ptr = io_curr_device.in;
 	wint_t		*str32;
 	int		dx_ret, this_width, i;
+	boolean_t	ch_set;
 
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
 	utf8_active = gtm_utf8_mode ? (CHSET_M != io_ptr->ichset) : FALSE;
 	str32 = (wint_t *)str832;
 	if (utf8_active)
@@ -439,8 +488,12 @@ int 	compute_dx(void *str832, unsigned int index, unsigned int width, unsigned i
 				dx_ret = ROUND_UP(dx_ret, width);	/* add $X padding for wide character in last column */
 			dx_ret += this_width;
 		}
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return dx_ret - dx_start;	/* before returning make sure "dx_ret" is of same dimension as "dx_instr"
 						 * variable in "dm_read" or "iott_readfl" (the callers) */
 	} else
+	{
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return index;	/* every character is 1-display-column wide so no need to look at "str832" */
+	}
 }
diff --git a/sr_unix/iott_flush.c b/sr_unix/iott_flush.c
index 1653d0e..b6e0591 100644
--- a/sr_unix/iott_flush.c
+++ b/sr_unix/iott_flush.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,25 +21,29 @@
 #include "gtmio.h"
 #include "gt_timer.h"
 #include "send_msg.h"
+#include "have_crit.h"
 #include "iott_flush_time.h"
 #include "deferred_events.h"
 
-GBLREF io_pair	io_curr_device;
-GBLREF io_pair	io_std_device;
-GBLREF bool	prin_out_dev_failure;
+GBLREF io_pair		io_curr_device;
+GBLREF io_pair		io_std_device;
+GBLREF bool		prin_out_dev_failure;
+GBLREF int		process_exiting;
+
+error_def(ERR_NOPRINCIO);
 
 void iott_flush_buffer(io_desc *io_ptr, boolean_t new_write_flag)
 {
 	d_tt_struct	*tt_ptr;
 	int4		status;
 	ssize_t		write_len;
-	error_def(ERR_NOPRINCIO);
+	boolean_t	ch_set;
 
 	tt_ptr = io_ptr->dev_sp;
 	if (!tt_ptr->write_active)
 		return;	/* Was assert but that ended up causing endless loops -- now we just survive */
+	ESTABLISH_GTMIO_CH(&io_ptr->pair, ch_set);
 	write_len = (ssize_t)(tt_ptr->tbuffp - tt_ptr->ttybuff);
-
 	if (0 < write_len)
 	{
 		DOWRITERC(tt_ptr->fildes, tt_ptr->ttybuff, write_len, status);
@@ -57,27 +62,20 @@ void iott_flush_buffer(io_desc *io_ptr, boolean_t new_write_flag)
 		} else 	/* (0 != status) */
 		{
 			tt_ptr->write_active = FALSE;		/* In case we come back this-a-way */
-			if (io_ptr == io_std_device.out)
-			{
-				if (!prin_out_dev_failure)
-					prin_out_dev_failure = TRUE;
-				else
-				{
-					send_msg(VARLSTCNT(1) ERR_NOPRINCIO);
-					/* rts_error(VARLSTCNT(1) ERR_NOPRINCIO); This causes a core dump */
-					stop_image_no_core();
-				}
-			}
+			ISSUE_NOPRINCIO_IF_NEEDED_TT(io_ptr);
 			xfer_set_handlers(tt_write_error_event, tt_write_error_set, status);
 		}
 	}
 	tt_ptr->write_active = new_write_flag;
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 }
 
 void iott_flush(io_desc *io_ptr)
 {
 	d_tt_struct	*tt_ptr;
+	boolean_t	ch_set;
 
+	ESTABLISH_GTMIO_CH(&io_ptr->pair, ch_set);
 	tt_ptr = io_ptr->dev_sp;
 	if (tt_ptr->timer_set)
 	{
@@ -85,33 +83,44 @@ void iott_flush(io_desc *io_ptr)
 		tt_ptr->timer_set = FALSE;
 	}
 	if (tt_ptr->write_active)
+	{
+		REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 		return;	/* We are nesting the buffer flush -- let original copy do its job */
+	}
 	tt_ptr->write_active = TRUE;
 	iott_flush_buffer(io_ptr, FALSE);
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 }
 
 void iott_flush_time(TID id, int4 hd_len, io_desc **io_ptr_parm)
 {
 	io_desc		*io_ptr, *flush_parm;
 	d_tt_struct	*tt_ptr;
+	boolean_t	flush_immediately;
+	boolean_t	ch_set;
 
 	io_ptr = *io_ptr_parm;
+	ESTABLISH_GTMIO_CH(&io_ptr->pair, ch_set);
 	tt_ptr = io_ptr->dev_sp;
-
 	assert(tt_ptr->timer_set);
-	if (FALSE == tt_ptr->write_active && !prin_out_dev_failure) /* If not in write code and no failure already, do flush */
+	if ((FALSE == tt_ptr->write_active) && !prin_out_dev_failure) /* If not in write code and no failure already, do flush */
 	{
 		tt_ptr->timer_set = FALSE;
 		tt_ptr->write_active = TRUE;
 		iott_flush_buffer(io_ptr, FALSE);
 	} else					/* doing write, reschedule the flush */
-	{
-		flush_parm = io_ptr;
-		start_timer((TID)io_ptr,
-			    IOTT_FLUSH_RETRY,
-			    &iott_flush_time,
-			    SIZEOF(flush_parm),
-			    (char *)&flush_parm);
+	{	/* We cannot be starting unsafe timers during process exiting or in an interrupt-deferred window. */
+		flush_immediately = (process_exiting || (INTRPT_OK_TO_INTERRUPT != intrpt_ok_state));
+		assert(!flush_immediately || (FALSE == tt_ptr->write_active));
+		if (!flush_immediately)
+		{
+			flush_parm = io_ptr;
+			start_timer((TID)io_ptr,
+				    IOTT_FLUSH_RETRY,
+				    &iott_flush_time,
+				    SIZEOF(flush_parm),
+				    (char *)&flush_parm);
+		}
 	}
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 }
-
diff --git a/sr_unix/iott_open.c b/sr_unix/iott_open.c
index 495baee..e9f6b11 100644
--- a/sr_unix/iott_open.c
+++ b/sr_unix/iott_open.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -28,6 +29,7 @@
 #include "gtm_isanlp.h"
 #include "gtm_conv.h"
 #include "gtmimagename.h"
+#include "error.h"
 
 GBLREF int		COLUMNS, GTM_LINES, AUTO_RIGHT_MARGIN;
 GBLREF uint4		gtm_principal_editing_defaults;
@@ -52,8 +54,10 @@ short iott_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 	int		p_offset;
 	mstr		chset;
 	boolean_t	empt = FALSE;
+	boolean_t	ch_set;
 
 	ioptr = dev_name->iod;
+	ESTABLISH_RET_GTMIO_CH(&ioptr->pair, -1, ch_set);
 	if (ioptr->state == dev_never_opened)
 	{
 		dev_name->iod->dev_sp = (void *)malloc(SIZEOF(d_tt_struct) + SIZEOF(struct termios));
@@ -178,5 +182,6 @@ short iott_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 time
 			tt_ptr->recall_width = 0;
 		}
 	}
+	REVERT_GTMIO_CH(&ioptr->pair, ch_set);
 	return TRUE;
 }
diff --git a/sr_unix/iott_rdone.c b/sr_unix/iott_rdone.c
index 71e7f00..96a4e8c 100644
--- a/sr_unix/iott_rdone.c
+++ b/sr_unix/iott_rdone.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -81,9 +82,11 @@ int	iott_rdone (mint *v, int4 timeout)	/* timeout in seconds */
 	struct timeval	input_timeval;
 	ABS_TIME	cur_time, end_time;
 	mv_stent	*mv_zintdev;
+	boolean_t	ch_set;
 
 	io_ptr = io_curr_device.in;
-	assert (io_ptr->state == dev_open);
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
+	assert(io_ptr->state == dev_open);
 	iott_flush(io_curr_device.out);
 	tt_ptr = (d_tt_struct*) io_ptr->dev_sp;
 	timer_id = (TID) iott_rdone;
@@ -203,6 +206,7 @@ int	iott_rdone (mint *v, int4 timeout)	/* timeout in seconds */
 				if (timed && (0 == msec_timeout))
 					iott_rterm(io_ptr);
 			}
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			outofband_action(FALSE);
 			break;
 		}
@@ -497,6 +501,7 @@ int	iott_rdone (mint *v, int4 timeout)	/* timeout in seconds */
 	if (outofband && jobinterrupt != outofband)
 	{
 		io_ptr->dollar.za = 9;
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return FALSE;
 	}
 	io_ptr->dollar.za = 0;
@@ -550,5 +555,6 @@ int	iott_rdone (mint *v, int4 timeout)	/* timeout in seconds */
 	}
 	memcpy(io_ptr->dollar.key, io_ptr->dollar.zb, (zb_ptr - io_ptr->dollar.zb));
 
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return ret;
 }
diff --git a/sr_unix/iott_readfl.c b/sr_unix/iott_readfl.c
index d9661f4..ab3a489 100644
--- a/sr_unix/iott_readfl.c
+++ b/sr_unix/iott_readfl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -172,10 +173,12 @@ int	iott_readfl(mval *v, int4 length, int4 timeout)	/* timeout in seconds */
 	fd_set		input_fd;
 	struct timeval	input_timeval;
 	struct timeval	save_input_timeval;
+	boolean_t	ch_set;
 
 	assert(stringpool.free >= stringpool.base);
 	assert(stringpool.free <= stringpool.top);
 	io_ptr = io_curr_device.in;
+	ESTABLISH_RET_GTMIO_CH(&io_curr_device, -1, ch_set);
 	tt_ptr = (d_tt_struct *)(io_ptr->dev_sp);
 	assert(dev_open == io_ptr->state);
 	iott_flush(io_curr_device.out);
@@ -380,6 +383,7 @@ int	iott_readfl(mval *v, int4 length, int4 timeout)	/* timeout in seconds */
 				if (!msec_timeout)
 					iott_rterm(io_ptr);
 			}
+			REVERT_GTMIO_CH(&io_curr_device, ch_set);
 			outofband_action(FALSE);
 			break;
 		}
@@ -1135,6 +1139,7 @@ int	iott_readfl(mval *v, int4 length, int4 timeout)	/* timeout in seconds */
 	{
 		v->str.len = 0;
 		io_ptr->dollar.za = 9;
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 		return(FALSE);
 	}
 #ifdef UNICODE_SUPPORTED
@@ -1175,6 +1180,7 @@ int	iott_readfl(mval *v, int4 length, int4 timeout)	/* timeout in seconds */
 				DOWRITE(tt_ptr->fildes, NATIVE_TTEOL, STRLEN(NATIVE_TTEOL));
 		}
 	}
+	REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	return ((short)ret);
 
 term_error:
diff --git a/sr_unix/iott_use.c b/sr_unix/iott_use.c
index 3343586..23fada9 100644
--- a/sr_unix/iott_use.c
+++ b/sr_unix/iott_use.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -52,7 +53,6 @@ LITDEF unsigned char filter_index[27] =
 };
 
 GBLREF boolean_t		ctrlc_on, dollar_zininterrupt;
-GBLREF bool			prin_out_dev_failure;
 GBLREF char			*CURSOR_ADDRESS, *CLR_EOL, *CLR_EOS;
 GBLREF io_pair			io_std_device;
 GBLREF io_pair			io_curr_device;
@@ -82,9 +82,11 @@ void iott_use(io_desc *iod, mval *pp)
 	struct termios		t;
 	uint4			mask_in;
 	unsigned char		ch, len;
+	boolean_t		ch_set;
 
 	p_offset = 0;
 	assert(iod->state == dev_open);
+	ESTABLISH_GTMIO_CH(&iod->pair, ch_set);
 	iott_flush(iod);
 	tt_ptr = (d_tt_struct *)iod->dev_sp;
 	if (*(pp->str.addr + p_offset) != iop_eol)
@@ -102,16 +104,7 @@ void iott_use(io_desc *iod, mval *pp)
 		if (0 != status)
 		{
 			save_errno = errno;
-			if (io_curr_device.out == io_std_device.out)
-			{
-				if (!prin_out_dev_failure)
-					prin_out_dev_failure = TRUE;
-				else
-				{
-					send_msg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOPRINCIO);
-					stop_image_no_core();
-				}
-			}
+			ISSUE_NOPRINCIO_IF_NEEDED_TT(io_curr_device.out);
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_TCGETATTR, 1, tt_ptr->fildes, save_errno);
 		}
 		flush_input = FALSE;
@@ -448,6 +441,7 @@ void iott_use(io_desc *iod, mval *pp)
 		tt_ptr->tt_state_save.who_saved = ttwhichinvalid;
 		io_find_mvstent(iod, TRUE);	/* clear mv stack entry */
 	}
+	REVERT_GTMIO_CH(&iod->pair, ch_set);
 	return;
 }
 
diff --git a/sr_unix/iott_write.c b/sr_unix/iott_write.c
index 75f13bc..b0c787e 100644
--- a/sr_unix/iott_write.c
+++ b/sr_unix/iott_write.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,6 +26,7 @@
 #include "send_msg.h"
 #include "error.h"
 #include "dollarx.h"
+#include "have_crit.h"
 #include "iott_flush_time.h"
 #ifdef UNICODE_SUPPORTED
 #include "gtm_icu_api.h"
@@ -35,6 +37,11 @@ GBLREF io_pair		io_curr_device;
 GBLREF io_pair		io_std_device;
 GBLREF bool		prin_out_dev_failure;
 GBLREF boolean_t	gtm_utf8_mode;
+GBLREF int		process_exiting;
+
+error_def(ERR_NOPRINCIO);
+error_def(ERR_TERMWRITE);
+error_def(ERR_ZINTRECURSEIO);
 
 void  iott_write_buffered_text(io_desc *io_ptr, char *text, int textlen);
 
@@ -42,11 +49,11 @@ void  iott_write_buffered_text(io_desc *io_ptr, char *text, int textlen)
 {
 	d_tt_struct	*tt_ptr;
 	int		buff_left, status;
-	error_def(ERR_NOPRINCIO);
-	error_def(ERR_TERMWRITE);
+	boolean_t	ch_set;
 
 	tt_ptr = io_ptr->dev_sp;
 	assert(tt_ptr->write_active == FALSE);
+	ESTABLISH_GTMIO_CH(&io_ptr->pair, ch_set);
 	tt_ptr->write_active = TRUE;
  	buff_left = IOTT_BUFF_LEN - (int)((tt_ptr->tbuffp - tt_ptr->ttybuff));
 	assert(buff_left > IOTT_BUFF_MIN || prin_out_dev_failure);
@@ -81,23 +88,13 @@ void  iott_write_buffered_text(io_desc *io_ptr, char *text, int textlen)
 			}
 		} else 	/* (0 != status) */
 		{
-			if (io_ptr == io_std_device.out)
-			{
-				if (!prin_out_dev_failure)
-					prin_out_dev_failure = TRUE;
-				else
-				{
-					send_msg(VARLSTCNT(1) ERR_NOPRINCIO);
-					/* rts_error(VARLSTCNT(1) ERR_NOPRINCIO); This causes a core dump */
-					stop_image_no_core();
-				}
-			}
-			rts_error(VARLSTCNT(3) ERR_TERMWRITE, 0, status);
+			ISSUE_NOPRINCIO_IF_NEEDED_TT(io_ptr);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_TERMWRITE, 0, status);
 		}
 	}
+	REVERT_GTMIO_CH(&io_ptr->pair, ch_set);
 }
 
-
 void iott_write(mstr *v)
 {
 	unsigned	str_len;
@@ -109,9 +106,11 @@ void iott_write(mstr *v)
 	d_tt_struct	*tt_ptr;
 	boolean_t	utf8_active = FALSE;
 	wint_t		codepoint;
-	error_def(ERR_TERMWRITE);
-	error_def(ERR_ZINTRECURSEIO);
+	boolean_t	flush_immediately;
+	boolean_t	ch_set;
 
+	/* We cannot be starting unsafe timers during process exiting or in an interrupt-deferred window. */
+	flush_immediately = (process_exiting || (INTRPT_OK_TO_INTERRUPT != intrpt_ok_state));
 	str_len = v->len;
 	if (0 != str_len)
 	{
@@ -119,9 +118,10 @@ void iott_write(mstr *v)
 		io_ptr = io_curr_device.out;
 		tt_ptr = (d_tt_struct *)io_ptr->dev_sp;
 		if (tt_ptr->mupintr)
-			rts_error(VARLSTCNT(1) ERR_ZINTRECURSEIO);
+			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZINTRECURSEIO);
+		ESTABLISH_GTMIO_CH(&io_curr_device, ch_set);
 		UNICODE_ONLY(utf8_active = gtm_utf8_mode ? (CHSET_M != io_ptr->ochset) : FALSE;)
-		for (;  ;)
+		for (; ;)
 		{
 			if (FALSE == io_ptr->wrap)
 				len = str_len;
@@ -158,7 +158,7 @@ void iott_write(mstr *v)
 							io_ptr->dollar.x = io_ptr->width;	/* force wrap */
 							continue;
 						} else
-							rts_error(VARLSTCNT(1) ERR_TERMWRITE);
+							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_TERMWRITE);
 					}
 				}
 #endif
@@ -170,15 +170,22 @@ void iott_write(mstr *v)
 			}
 			assert(0 != len);
 			iott_write_buffered_text(io_ptr, str, len);
-
 			dollarx(io_ptr, (uchar_ptr_t)str, (uchar_ptr_t)str + len);
 			str_len -= len;
 			if (0 >= (signed)str_len)
 				break;
 			str += len;
 		}
-
-		if (FALSE == tt_ptr->timer_set)
+		if (flush_immediately)
+		{
+			if (TRUE == tt_ptr->timer_set)
+			{
+				cancel_timer((TID)io_ptr);
+				tt_ptr->timer_set = FALSE;
+			}
+			tt_ptr->write_active = TRUE;
+			iott_flush_buffer(io_ptr, FALSE);
+		} else if (FALSE == tt_ptr->timer_set)
 		{
 			flush_parm = io_ptr;
 			tt_ptr->timer_set = TRUE;
@@ -188,6 +195,6 @@ void iott_write(mstr *v)
 				    SIZEOF(flush_parm),
 				    (char *)&flush_parm);
 		}
-
+		REVERT_GTMIO_CH(&io_curr_device, ch_set);
 	}
 }
diff --git a/sr_unix/iottdef.h b/sr_unix/iottdef.h
index f76bcfc..171f5f2 100644
--- a/sr_unix/iottdef.h
+++ b/sr_unix/iottdef.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -35,6 +36,26 @@
 #define TT_NOINSERT		0x2000
 #define TT_EMPTERM		0x4000
 
+/* Set prin_out_dev_failure if a write failed on the principal device. If it is a recurrence,
+ * issue the NOPRINCIO error.
+ */
+#define ISSUE_NOPRINCIO_IF_NEEDED_TT(IOD)						\
+{											\
+	GBLREF io_pair		io_std_device;						\
+	GBLREF bool		prin_out_dev_failure;					\
+											\
+	if (IOD == io_std_device.out)							\
+	{										\
+		if (!prin_out_dev_failure)						\
+			prin_out_dev_failure = TRUE;					\
+		else									\
+		{									\
+			send_msg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOPRINCIO);		\
+			stop_image_no_core();						\
+		}									\
+	}										\
+}
+
 enum	tt_which
 {
 	ttwhichinvalid,
diff --git a/sr_unix/is_proc_alive.c b/sr_unix/is_proc_alive.c
index 459de73..338f04d 100644
--- a/sr_unix/is_proc_alive.c
+++ b/sr_unix/is_proc_alive.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -38,10 +39,7 @@ bool is_proc_alive(int4 pid, int4 imagecnt)
 	bool		ret;
 
 	if (0 == pid)
-	{
-		assert(FALSE);
 		return FALSE;
-	}
 #	ifdef __MVS__
 	errno = 0;	/* it is possible getpriority returns -1 even in case of success */
 	status = getpriority(PRIO_PROCESS, (id_t)pid);
diff --git a/sr_unix/jnl_file_extend.c b/sr_unix/jnl_file_extend.c
index 414e841..2dfeaf2 100644
--- a/sr_unix/jnl_file_extend.c
+++ b/sr_unix/jnl_file_extend.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -91,7 +92,10 @@ uint4 jnl_file_extend(jnl_private_control *jpc, uint4 total_jnl_rec_size)
 	assert(csa->jnl_state == csd->jnl_state);
 	assertpro(JNL_ENABLED(csa) && (NOJNL != jpc->channel) && (!JNL_FILE_SWITCHED(jpc)));
 		/* crit and messing with the journal file - how could it have vanished? */
-	if (!csd->jnl_deq || (csd->jnl_alq + csd->jnl_deq > csd->autoswitchlimit))
+	if (!total_jnl_rec_size)
+	{	/* rec_size=0 has special meaning. Caller (source server for now) wants to force an autoswitch. */
+		new_blocks = 0;
+	} else if (!csd->jnl_deq || (csd->jnl_alq + csd->jnl_deq > csd->autoswitchlimit))
 	{
 		assert(DIVIDE_ROUND_UP(total_jnl_rec_size, DISK_BLOCK_SIZE) <= csd->jnl_alq);
 		assert(csd->jnl_alq == csd->autoswitchlimit);
@@ -103,13 +107,14 @@ uint4 jnl_file_extend(jnl_private_control *jpc, uint4 total_jnl_rec_size)
 	jb = jpc->jnl_buff;
 	assert(0 <= new_blocks);
 	DEBUG_ONLY(count = 0);
-	for (need_extend = (jb->last_eof_written || (0 != new_blocks)); need_extend; )
+	do
 	{
 		DEBUG_ONLY(count++);
-		/* usually we will do the loop just once where we do the file extension.
-		 * rarely we might need to do an autoswitch instead after which again rarely
-		 * 	we might need to do an extension on the new journal to fit in the transaction's	journal requirements.
-		 * therefore we should do this loop a maximum of twice. hence the assert below.
+		/* Usually we will do the loop just once where we do the file extension.
+		 * Rarely we might need to do an autoswitch instead.
+		 * Even more rarely, we might need to do a file extension of the autoswitched journal to fit in the
+		 * transaction's journal requirements (because journal file initial allocation did not fit it).
+		 * Therefore we should do this loop a maximum of twice. Assert it.
 		 */
 		assert(count <= 2);
 		need_extend = FALSE;
@@ -133,8 +138,8 @@ uint4 jnl_file_extend(jnl_private_control *jpc, uint4 total_jnl_rec_size)
 					{
 						send_msg_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_NOSPACEEXT, 4,
 								JNL_LEN_STR(csd), new_blocks, avail_blocks);
-						new_blocks = 0;
-						jpc->status = SS_NORMAL;
+						new_blocks = -1;
+						jpc->status = ERR_NOSPACEEXT;
 						break;
 					} else
 						send_msg_csa(CSA_ARG(csa) VARLSTCNT(6) MAKE_MSG_WARNING(ERR_NOSPACEEXT), 4,
@@ -151,8 +156,8 @@ uint4 jnl_file_extend(jnl_private_control *jpc, uint4 total_jnl_rec_size)
 		if (csd->autoswitchlimit < (jb->filesize + (EXTEND_WARNING_FACTOR * new_blocks)))	/* close to max */
 			send_msg_csa(CSA_ARG(csa) VARLSTCNT(5) ERR_JNLSPACELOW, 3, JNL_LEN_STR(csd),
 					csd->autoswitchlimit - jb->filesize);
-		if (jb->last_eof_written || (csd->autoswitchlimit < new_alq))
-		{	/* Reached max, need to autoswitch */
+		if (jb->last_eof_written || (csd->autoswitchlimit < new_alq) || !new_blocks)
+		{	/* Reached max OR caller wants to switch unconditionally. Need to autoswitch */
 			/* Ensure new journal file can hold the entire current transaction's journal record requirements */
 			assert(csd->autoswitchlimit >= MAX_REQD_JNL_FILE_SIZE(total_jnl_rec_size));
 			memset(&jnl_info, 0, SIZEOF(jnl_info));
@@ -296,10 +301,10 @@ uint4 jnl_file_extend(jnl_private_control *jpc, uint4 total_jnl_rec_size)
 			}
 			jb->filesize = new_alq;	/* Actually this is virtual file size blocks */
 		}
-		if (0 >= new_blocks)
+		if (0 > new_blocks)
 			break;
-	}
-	if (0 < new_blocks)
+	} while (need_extend);
+	if (0 <= new_blocks)
 	{
 		INCR_GVSTATS_COUNTER(csa, csa->nl, n_jnl_extends, 1);
 		return EXIT_NRM;
diff --git a/sr_unix/jobsp.h b/sr_unix/jobsp.h
index 928785d..3c652b8 100644
--- a/sr_unix/jobsp.h
+++ b/sr_unix/jobsp.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -19,6 +20,7 @@
 #define MAX_PRCNAM_LEN		15
 #define MAX_STDIOE_LEN		1024
 #define MAX_JOBPARM_LEN		1024
+#define MAX_JOB_LEN		8192	/* The length of the buffer used for storing each argument of the job command */
 
 #define TIMEOUT_ERROR		(MAX_SYSERR + 1)	/* a special value to differentiate it from the rest of errno's */
 
@@ -160,7 +162,7 @@ typedef size_t job_arg_count_msg;
 typedef struct
 {
 	ssize_t			len;				/* negative len indicates null arg */
-	char			data[MAX_JOBPARM_LEN];
+	char			data[MAX_JOB_LEN];
 } job_arg_msg;
 
 typedef size_t job_buffer_size_msg;
diff --git a/sr_unix/laberror.c b/sr_unix/laberror.c
new file mode 100644
index 0000000..a264eec
--- /dev/null
+++ b/sr_unix/laberror.c
@@ -0,0 +1,60 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+#include "mdef.h"
+
+#include "error.h"
+#include <rtnhdr.h>
+#include "stack_frame.h"
+
+GBLREF stack_frame	*frame_pointer;
+
+error_def(ERR_LABELMISSING);
+
+/* Add simple declaration to suppress warning - routine only used by assembler routines so no need for
+ * definition in header file.
+ */
+void laberror(int lblindx);
+
+/* Routine that allows assembler routines to more easily put out the LABELMISSING error message with the
+ * appropriate label name argument.
+ *
+ * Argument:
+ *
+ *   lblindx - index into linkage_adr and linkage_names
+ */
+void laberror(int lblindx)
+{
+	mstr	lblname;
+	int	skiplen;
+	char	*cptr, *maxcptr;
+
+#	ifdef AUTORELINK_SUPPORTED
+	assertpro(0 <= lblindx);
+	assert(lblindx <= frame_pointer->rvector->linkage_len);
+	lblname = frame_pointer->rvector->linkage_names[lblindx];		/* Make copy of possibly shared mstr */
+	lblname.addr += (INTPTR_T)frame_pointer->rvector->literal_text_adr;	/* Relocate addr appropriately */
+	/* Label name is in form of "rtnname.labelname" so forward space past routine name and '.' */
+	maxcptr = lblname.addr + lblname.len;
+	for (cptr = lblname.addr; ('.' != *cptr) && (cptr < maxcptr); cptr++)
+		;
+	assert('.' == *cptr);
+	skiplen = cptr - lblname.addr + 1;					/* + 1 to skip past '.' separator */
+	assert(skiplen < lblname.len);
+	lblname.len -= skiplen;
+	lblname.addr += skiplen;
+	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_LABELMISSING, 2, RTS_ERROR_MSTR(&lblname));
+#	else
+	assertpro(FALSE);
+#	endif
+	return;
+}
diff --git a/sr_unix/lockdefs.h b/sr_unix/lockdefs.h
index a649dca..f4ea471 100644
--- a/sr_unix/lockdefs.h
+++ b/sr_unix/lockdefs.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,6 +11,6 @@
  ****************************************************************/
 
 #define MLK_LOGIN(x)
-#define BLOCKING_PROC_ALIVE(w,x,y,z) (!is_proc_alive(w->blocked->owner, 0))
-#define PENDING_PROC_ALIVE(w,x,y,z) (!is_proc_alive(w->process_id, 0))
-#define PROC_ALIVE(w,x,y,z) (!is_proc_alive(w->owner, 0))
+#define BLOCKING_PROC_DEAD(w,x,y,z) (!is_proc_alive(w->blocked->owner, 0))
+#define PENDING_PROC_DEAD(w,x,y,z) (!is_proc_alive(w->process_id, 0))
+#define PROC_DEAD(w,x,y,z) (!is_proc_alive(w->owner, 0))
diff --git a/sr_unix/mu_cre_file.c b/sr_unix/mu_cre_file.c
index 225d1d6..81f1dce 100644
--- a/sr_unix/mu_cre_file.c
+++ b/sr_unix/mu_cre_file.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -88,6 +89,7 @@ GBLREF	uint4			gtmDebugLevel;
 error_def(ERR_NOSPACECRE);
 error_def(ERR_LOWSPACECRE);
 error_def(ERR_MUNOSTRMBKUP);
+error_def(ERR_PREALLOCATEFAIL);
 
 unsigned char mu_cre_file(void)
 {
@@ -350,16 +352,29 @@ unsigned char mu_cre_file(void)
 	cc = (char*)malloc(DISK_BLOCK_SIZE);
 	memset(cc, 0, DISK_BLOCK_SIZE);
 	DB_LSEEKWRITE(cs_addrs, udi->fn, udi->fd,
-		   (cs_data->start_vbn - 1) * DISK_BLOCK_SIZE + ((off_t)(cs_data->trans_hist.total_blks) * cs_data->blk_size),
-		   cc,
-		   DISK_BLOCK_SIZE,
-		   status);
+		      BLK_ZERO_OFF(cs_data) + ((off_t)(cs_data->trans_hist.total_blks) * cs_data->blk_size),
+		      cc,
+		      DISK_BLOCK_SIZE,
+		      status);
 	if (0 != status)
 	{
 		SPRINTF_AND_PERROR("Error writing out end of file %s\n");
 		CLEANUP(EXIT_ERR);
 		return EXIT_ERR;
 	}
+#	if !defined(__sun) && !defined(__hpux)
+	if (!cs_data->defer_allocate)
+	{
+		status = posix_fallocate(udi->fd, 0, BLK_ZERO_OFF(cs_data) +
+					 ((off_t)(cs_data->trans_hist.total_blks) * cs_data->blk_size) + DISK_BLOCK_SIZE);
+		if (0 != status)
+		{
+			gtm_putmsg_csa(CSA_ARG(cs_addrs) VARLSTCNT(5) ERR_PREALLOCATEFAIL, 2, DB_LEN_STR(gv_cur_region), status);
+			CLEANUP(EXIT_ERR);
+			return EXIT_ERR;
+		}
+	}
+#	endif
 	if ((!udi->raw) && (-1 == CHMOD(pblk.l_dir, 0666)))
 	{
 		SPRINTF_AND_PERROR("Error changing file mode on file %s\n");
diff --git a/sr_unix/mu_extract.c b/sr_unix/mu_extract.c
index 3dfdff5..2add525 100644
--- a/sr_unix/mu_extract.c
+++ b/sr_unix/mu_extract.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -290,7 +291,7 @@ void mu_extract(void)
 		tp_region *rptr;
 		for (rptr = grlist, reg_std_null_coll = -1; NULL != rptr; rptr = rptr->fPtr)
 		{
-			reg=rptr->reg;
+			reg = rptr->reg;
 			if (reg->open)
 			{
 				if (reg_std_null_coll != reg->std_null_coll)
@@ -361,8 +362,8 @@ void mu_extract(void)
 		outptr = outbuf;
 		if (is_any_file_encrypted)
 		{
-			MEMCPY_LIT(outptr, BIN_HEADER_LABEL_ENCR);
-			outptr += STR_LIT_LEN(BIN_HEADER_LABEL_ENCR);
+			MEMCPY_LIT(outptr, BIN_HEADER_LABEL_ENCR_INDEX);
+			outptr += STR_LIT_LEN(BIN_HEADER_LABEL_ENCR_INDEX);
 		} else
 		{
 			MEMCPY_LIT(outptr, BIN_HEADER_LABEL);
@@ -522,7 +523,7 @@ void mu_extract(void)
 		MU_EXTR_STATS_ADD(grand_total, global_total);	/* add global_total to grand_total */
 	}
 	assert((MV_STR == op_val.mvtype) && (MV_STR == op_pars.mvtype));
-	op_val.str.addr = (char *)outfilename;;
+	op_val.str.addr = (char *)outfilename;
 	op_val.str.len = filename_len;
 	op_pars.str.len = SIZEOF(no_param);
 	op_pars.str.addr = (char *)&no_param;
diff --git a/sr_unix/mu_rndwn_rlnkctl.c b/sr_unix/mu_rndwn_rlnkctl.c
index 6aea790..2159c24 100644
--- a/sr_unix/mu_rndwn_rlnkctl.c
+++ b/sr_unix/mu_rndwn_rlnkctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,8 +13,10 @@
 #include "mdef.h"
 
 #ifdef AUTORELINK_SUPPORTED
-
 #include "gtm_string.h"
+#include "gtm_stat.h"
+#include "gtm_stdlib.h"
+#include "gtm_limits.h"
 
 #include "relinkctl.h"
 #include "util.h"
@@ -22,13 +25,18 @@
 #include "cli.h"
 #include "cliif.h"
 #include "cli_parse.h"
+#include "eintr_wrappers.h"
+#include "gtmmsg.h"
 #endif
 #include "mu_rndwn_rlnkctl.h"	/* for mupip_rctldump prototype */
 
 #ifdef AUTORELINK_SUPPORTED
+error_def(ERR_FILEPARSE);
 error_def(ERR_MUPCLIERR);
+error_def(ERR_RLNKCTLRNDWNSUC);
 #endif
 
+/* Implements MUPIP RUNDOWN -RELINKCTL */
 void mu_rndwn_rlnkctl(void)
 {
 #	ifdef AUTORELINK_SUPPORTED
@@ -38,28 +46,86 @@ void mu_rndwn_rlnkctl(void)
 	relinkctl_data		*hdr;
 	rtnobjshm_hdr_t		*rtnobj_shm_hdr;
 	char			objdir[GTM_PATH_MAX];
-	int			i, j, recnum, n_records, shmid, shm_stat, save_errno;
-	unsigned short		max_len;
+	int			i, j, recnum, n_records, shmid, shm_stat, save_errno, objcnt, stat_res;
+	unsigned short		param_len;
 	mstr			dir;
+	zro_ent			*op;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
-	TREF(is_mu_rndwn_rlnkctl) = TRUE;	/* relinkctl_open and relinkctl_rundown check this flag to act differently */
+	TREF(is_mu_rndwn_rlnkctl) = TRUE;	/* relinkctl_open and relinkctl_rundown check this flag to act differently.
+						 * No need to have condition handler to reset this in case of error because
+						 * this is invoked from MUPIP RUNDOWN -RELINKCTL which is the only action
+						 * that the calling process will do in its lifetime.
+						 */
 	if (TREF(parms_cnt))
 	{
 		assert(1 == TREF(parms_cnt));
-		max_len = SIZEOF(objdir);
-		if (!cli_get_str("WHAT", objdir, &max_len))
+		param_len = SIZEOF(objdir) - 1;
+		if (!cli_get_str("WHAT", objdir, &param_len))
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MUPCLIERR);
+		objdir[param_len] = '\0';
 		dir.addr = objdir;
-		dir.len = max_len;
-		linkctl = relinkctl_attach(&dir);
+		dir.len = param_len;
+		linkctl = relinkctl_attach(&dir, NULL, SIZEOF(objdir));
+		assert((dir.len <= SIZEOF(objdir) - 1) && (('\0' == dir.addr[dir.len]) || (0 == dir.len)));
 		assert(linkctl == TREF(open_relinkctl_list));
 		assert((NULL == linkctl) || (NULL == linkctl->next));
+		if (NULL == linkctl)
+		{
+			if (0 == dir.len)
+			{	/* If relinkctl_attach() did not find the object directory corresponding to the user's argument,
+				 * dir.len is set to 0; in that case we want to print an error containing the argument, and so the
+				 * proper length needs to be restored.
+				 */
+				dir.len = param_len;
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2, RTS_ERROR_MSTR(&dir), errno);
+			} else
+				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_RLNKCTLRNDWNSUC, 2, RTS_ERROR_MSTR(&dir));
+		} else
+			relinkctl_rundown(TRUE, FALSE);	/* Runs down the relinkctl file opened above. */
 	} else
+	{	/* Unlike other callers of zro_init(), MUPIP RUNDOWN -RELINKCTL does not want it to do relinkctl_attach() on all
+		 * relinkctl files at once because we leave the attach logic holding the linkctl lock, which might potentially cause
+		 * a deadlock if multiple processes are run concurrently with different $gtmroutines. So, zro_init() / zro_load()
+		 * set the count field of each autorelink-enabled object directory to a negative number based on the
+		 * TREF(is_mu_rndwn_rlnkctl) global, and we look at the count to decide whether to attach to an individual segment.
+		 */
 		zro_init();
-	relinkctl_rundown(TRUE, FALSE);	/* will rundown one or more linkctl files opened above */
+		objcnt = (TREF(zro_root))->count;
+		assert(0 < objcnt);
+		for (op = TREF(zro_root) + 1; (0 < objcnt--);)
+		{	/* Go through each object directory in our array to run down its relinkctl file. */
+			assert((ZRO_TYPE_OBJECT == op->type) || (ZRO_TYPE_OBJLIB == op->type));
+			if (ZRO_TYPE_OBJLIB == op->type)
+				continue;			/* We only deal with object directories in this loop */
+			/* Currently the count field of object directory entries is either unused (with the value of 0) or marked as
+			 * autorelink-enabled (only in case of MUPIP RUNDOWN -RELINKCTL). Assert that.
+			 */
+			assert(0 >= op->count);
+			if (0 > op->count)
+			{	/* Third parameter is 0 because the object directories are stored in fully resolved format in the
+				 * gtmroutines object, so there is no need to update the string.
+				 */
+				linkctl = relinkctl_attach(&op->str, NULL, 0);
+				assert(linkctl == TREF(open_relinkctl_list));
+				assert((NULL == linkctl) || (NULL == linkctl->next));
+				if (NULL == linkctl)
+				{	/* We do not do a check of whether the object directory exists, unlike with an argument,
+					 * because zro_init() would have errored out on a non-existent path.
+					 */
+					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_RLNKCTLRNDWNSUC, 2,
+						       RTS_ERROR_MSTR(&op->str));
+				} else
+					relinkctl_rundown(TRUE, FALSE);	/* Runs down the relinkctl file opened above. */
+			}
+			/* Bump past source entries to next object entry */
+			op++;
+			assert(ZRO_TYPE_COUNT == op->type);
+			op += op->count;
+			op++;
+		}
+	}
 	TREF(is_mu_rndwn_rlnkctl) = FALSE;
 #	endif	/* AUTORELINK_SUPPORTED */
 }
-
diff --git a/sr_unix/mu_swap_root.c b/sr_unix/mu_swap_root.c
index 6cc8564..7f644cc 100644
--- a/sr_unix/mu_swap_root.c
+++ b/sr_unix/mu_swap_root.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2012, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2012, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -85,7 +86,7 @@ error_def(ERR_MUTRUNCNOTBG);
 #define RETRY_SWAP		(0)
 #define ABORT_SWAP		(1)
 
-boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
+void	mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
 {
 	sgmnt_data_ptr_t	csd;
 	sgmnt_addrs		*csa;
@@ -105,8 +106,10 @@ boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
 
 	SETUP_THREADGBL_ACCESS;
 	assert(mu_reorg_process);
-	gv_target->root = 0;
-	gv_target->clue.end = 0;
+	gv_target = gl_ptr->gvt;
+	gv_target->root = 0;		/* reset root so we recompute it in DO_OP_GVNAME below */
+	gv_target->clue.end = 0;	/* reset clue since reorg action on later globals might have invalidated it */
+	reorg_gv_target->gvname.var_name = gv_target->gvname.var_name;	/* needed by SAVE_ROOTSRCH_ENTRY_STATE */
 	dir_hist_ptr = gv_target->alt_hist;
 	gvt_hist_ptr = &(gv_target->hist);
 	inctn_opcode = inctn_invalid_op;
@@ -117,16 +120,18 @@ boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
 	csd = cs_data;	/* Be careful to keep csd up to date. With MM, cs_data can change, and
 			 * dereferencing an older copy can result in a SIG-11.
 			 */
+	if (gv_cur_region->read_only)
+		return;	/* Cannot proceed for read-only data files */
 	if (0 == gv_target->root)
 	{	/* Global does not exist (online rollback). No problem. */
 		gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_GBLNOEXIST, 2, GNAME(gl_ptr).len, GNAME(gl_ptr).addr);
-		return TRUE;
+		return;
 	}
 	if (dba_mm == csd->acc_meth)
 		/* return for now without doing any swapping operation because later mu_truncate
 		 * is going to issue the MUTRUNCNOTBG message.
 		 */
-		return TRUE;
+		return;
 	SET_GV_ALTKEY_TO_GBLNAME_FROM_GV_CURRKEY;		/* set up gv_altkey to be just the gblname */
 	/* ------------ Swap root block of global variable tree --------- */
 	t_begin(ERR_MUREORGFAIL, UPDTRNS_DB_UPDATED_MASK);
@@ -185,7 +190,7 @@ boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
 			if (tn_aborted)
 			{	/* It is not an error if the global (that once existed) doesn't exist anymore (due to ROLLBACK) */
 				gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_GBLNOEXIST, 2, GNAME(gl_ptr).len, GNAME(gl_ptr).addr);
-				return TRUE;
+				return;
 			}
 			continue;
 		}
@@ -223,7 +228,7 @@ boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
 			if (level >= dir_hist_ptr->depth)
 			{	/* done */
 				t_abort(gv_cur_region, csa);
-				return TRUE;
+				return;
 			}
 			child_blk_ptr = dir_hist_ptr->h[level].buffaddr;
 			child_blk_id = dir_hist_ptr->h[level].blk_num;
@@ -265,7 +270,7 @@ boolean_t mu_swap_root(glist *gl_ptr, int *root_swap_statistic_ptr)
 			break;
 		}
 	}
-	return TRUE;
+	return;
 }
 
 /* Finds a free block and adds information to update array and cw_set */
diff --git a/sr_unix/mu_term_setup.c b/sr_unix/mu_term_setup.c
index 87974b7..122974e 100644
--- a/sr_unix/mu_term_setup.c
+++ b/sr_unix/mu_term_setup.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,39 +21,35 @@
 #include "eintr_wrappers.h"
 #include "mu_term_setup.h"
 
-#define STDIN_FILENO	0
 #define STDOUT_FILENO	1
 #define STDERR_FILENO	2
 
-static struct termios 	term_in;
-static struct termios 	term_out;
-static struct termios 	term_err;
+static struct termios 	tty_settings;
 
-static boolean_t get_stdin_charc_pass = TRUE;
+static boolean_t mu_get_term_invoked = FALSE;
 static boolean_t get_stdout_charc_pass = TRUE;
 static boolean_t get_stderr_charc_pass = TRUE;
 
 void mu_get_term_characterstics(void)
 {
-	if ((get_stdin_charc_pass = isatty(STDIN_FILENO)) && (tcgetattr(STDIN_FILENO, &term_in) == -1))
+	assert(!mu_get_term_invoked);	/* No need to invoke this more than once per process. If assert fails fix second caller. */
+	mu_get_term_invoked = TRUE;
+	if (get_stdout_charc_pass = isatty(STDOUT_FILENO))
 	{
-		get_stdin_charc_pass = FALSE;
-		PERROR("tcgetattr :");
-		FPRINTF(stderr, "Unable to get terminal characterstics for standard in\n");
-	}
-
-	if ((get_stdout_charc_pass = isatty(STDOUT_FILENO)) && (tcgetattr(STDOUT_FILENO, &term_out) == -1))
-	{
-		get_stdout_charc_pass = FALSE;
-		PERROR("tcgetattr :");
-		FPRINTF(stderr, "Unable to get terminal characterstics for standard out\n");
-	}
-
-	if ((get_stderr_charc_pass = isatty(STDERR_FILENO)) && (tcgetattr(STDERR_FILENO, &term_err) == -1))
+		if (-1 == tcgetattr(STDOUT_FILENO, &tty_settings))
+		{
+			get_stdout_charc_pass = FALSE;
+			PERROR("tcgetattr :");
+			FPRINTF(stderr, "Unable to get terminal characterstics for standard out\n");
+		}
+	} else if (get_stderr_charc_pass = isatty(STDERR_FILENO))
 	{
-		get_stderr_charc_pass = FALSE;
-		PERROR("tcgetattr :");
-		FPRINTF(stderr, "Unable to get terminal characterstics for standard err\n");
+		if (-1 == tcgetattr(STDERR_FILENO, &tty_settings))
+		{
+			get_stderr_charc_pass = FALSE;
+			PERROR("tcgetattr :");
+			FPRINTF(stderr, "Unable to get terminal characterstics for standard err\n");
+		}
 	}
 }
 
@@ -61,28 +58,26 @@ void mu_reset_term_characterstics(void)
 	int tcsetattr_res;
 	int save_errno;
 
+	if (!mu_get_term_invoked)
+		return;	/* We did not initialize "tty_settings" in this process so dont use it */
 	/* Do not use TCSAFLUSH as it drains all buffered (but yet unprocessed) input in the terminal
-	 * even if that was for the next command at the shell prompt. TCSANOW seems to do what we want
-	 * (which is to reset terminal characteristics right away).
+	 * even if that was for the next command at the shell prompt. So use TCSADRAIN instead.
 	 */
-	Tcsetattr(STDIN_FILENO, TCSANOW, &term_in, tcsetattr_res, save_errno);
-	if (get_stdin_charc_pass && (-1 == tcsetattr_res))
+	if (get_stdout_charc_pass)
 	{
-		PERROR("tcsetattr :");
-		FPRINTF(stderr, "Unable to set terminal characterstics for standard in\n");
-	}
-
-	Tcsetattr(STDOUT_FILENO, TCSANOW, &term_out, tcsetattr_res, save_errno);
-	if (get_stdout_charc_pass && (-1 == tcsetattr_res))
-	{
-		PERROR("tcsetattr :");
-		FPRINTF(stderr, "Unable to set terminal characterstics for standard out\n");
-	}
-
-	Tcsetattr(STDERR_FILENO, TCSANOW, &term_err, tcsetattr_res, save_errno);
-	if (get_stderr_charc_pass && (-1 == tcsetattr_res))
+		Tcsetattr(STDOUT_FILENO, TCSADRAIN, &tty_settings, tcsetattr_res, save_errno);
+		if (-1 == tcsetattr_res)
+		{
+			PERROR("tcsetattr :");
+			FPRINTF(stderr, "Unable to set terminal characterstics for standard out\n");
+		}
+	} else if (get_stderr_charc_pass)
 	{
-		PERROR("tcsetattr :");
-		FPRINTF(stderr, "Unable to set terminal characterstics for standard err\n");
+		Tcsetattr(STDERR_FILENO, TCSADRAIN, &tty_settings, tcsetattr_res, save_errno);
+		if (-1 == tcsetattr_res)
+		{
+			PERROR("tcsetattr :");
+			FPRINTF(stderr, "Unable to set terminal characterstics for standard err\n");
+		}
 	}
 }
diff --git a/sr_unix/mubfilcpy.c b/sr_unix/mubfilcpy.c
index dad8a27..e53d562 100644
--- a/sr_unix/mubfilcpy.c
+++ b/sr_unix/mubfilcpy.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -107,7 +108,6 @@ bool	mubfilcpy (backup_reg_list *list)
 	int			user_id;
 	int			group_id;
 	int			perm;
-	struct perm_diag_data	pdd;
 
 	file = &(list->backup_file);
 	file->addr[file->len] = '\0';
@@ -217,24 +217,10 @@ bool	mubfilcpy (backup_reg_list *list)
 	}
 	FSTAT_FILE(((unix_db_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fd, &stat_buf, fstat_res);
 	if (-1 != fstat_res)
-		if (gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_FILE, &pdd) < 0)
-		{
-			send_msg_csa(CSA_ARG(cs_addrs) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-				ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("backup file"),
-				RTS_ERROR_STRING(((unix_db_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fn),
-				PERMGENDIAG_ARGS(pdd));
-			gtm_putmsg_csa(CSA_ARG(cs_addrs) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-				ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("backup file"),
-				RTS_ERROR_STRING(((unix_db_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fn),
-				PERMGENDIAG_ARGS(pdd));
-			if (online)
-				cs_addrs->nl->nbb = BACKUP_NOT_IN_PROGRESS;
-			CLEANUP_AND_RETURN_FALSE;
-		}
-	/* setup new group and permissions if indicated by the security rules.
-	 */
+		gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_FILE);
+	/* Setup new group and permissions if indicated by the security rules. */
 	if ((-1 == fstat_res) || (-1 == FCHMOD(backup_fd, perm))
-		|| (((-1 != user_id) || (-1 != group_id)) && (-1 == fchown(backup_fd, user_id, group_id))))
+		|| (((INVALID_UID != user_id) || (INVALID_GID != group_id)) && (-1 == fchown(backup_fd, user_id, group_id))))
 	{
 		save_errno = errno;
 		errptr = (char *)STRERROR(save_errno);
diff --git a/sr_unix/mubinccpy.c b/sr_unix/mubinccpy.c
index 0414ebc..6a38de8 100644
--- a/sr_unix/mubinccpy.c
+++ b/sr_unix/mubinccpy.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -164,7 +165,6 @@ bool	mubinccpy (backup_reg_list *list)
 	int			user_id;
 	int			group_id;
 	int			perm;
-	struct perm_diag_data	pdd;
 	DEBUG_INCBKUP_ONLY(int	blks_this_lmap;)
 	DEBUG_INCBKUP_ONLY(gtm_uint64_t backup_write_offset = 0;)
 
@@ -210,23 +210,11 @@ bool	mubinccpy (backup_reg_list *list)
 			{
 				FSTAT_FILE(db_fd, &stat_buf, fstat_res);
 				if (-1 != fstat_res)
-					if (gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_FILE, &pdd) < 0)
-					{
-						send_msg_csa(CSA_ARG(NULL) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-							ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("backup file"),
-							RTS_ERROR_STRING(((unix_db_info *)
-								(gv_cur_region->dyn.addr->file_cntl->file_info))->fn),
-							PERMGENDIAG_ARGS(pdd));
-						gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-							ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("backup file"),
-							RTS_ERROR_STRING(((unix_db_info *)
-								(gv_cur_region->dyn.addr->file_cntl->file_info))->fn),
-							PERMGENDIAG_ARGS(pdd));
-						CLEANUP_AND_RETURN_FALSE;
-					}
+					gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_FILE);
 				/* setup new group and permissions if indicated by the security rules. */
 				if ((-1 == fstat_res) || (-1 == FCHMOD(backup->fd, perm))
-					|| (((-1 != user_id) || (-1 != group_id)) && (-1 == fchown(backup->fd, user_id, group_id))))
+					|| (((INVALID_UID != user_id) || (INVALID_GID != group_id))
+						&& (-1 == fchown(backup->fd, user_id, group_id))))
 				{
 					PERROR("fchmod/fchown error: ");
 					util_out_print("ERROR: Cannot access incremental backup file !AD.",
diff --git a/sr_unix/mumps.cmake b/sr_unix/mumps.cmake
index e998330..2f0fcde 100644
--- a/sr_unix/mumps.cmake
+++ b/sr_unix/mumps.cmake
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2012-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -13,6 +14,8 @@ foreach(v
     gtmroutines
     gtm_chset
     gtm_icu_version
+    gtm_inc
+    gtm_tools
     gtmgbldir
     )
   if(DEFINED ${v})
diff --git a/sr_unix/mupip.c b/sr_unix/mupip.c
index 478cef9..6825871 100644
--- a/sr_unix/mupip.c
+++ b/sr_unix/mupip.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -60,6 +61,7 @@
 #include "common_startup_init.h"
 #include "gtm_threadgbl_init.h"
 #include "continue_handler.h"
+#include "gtmio.h"
 
 #ifdef UNICODE_SUPPORTED
 # include "gtm_icu_api.h"
@@ -128,4 +130,5 @@ int main (int argc, char **argv)
 void display_prompt(void)
 {
 	PRINTF("MUPIP> ");
+	FFLUSH(stdout);
 }
diff --git a/sr_unix/mupip_cmd.c b/sr_unix/mupip_cmd.c
index 9ee21d9..1f5e0a1 100644
--- a/sr_unix/mupip_cmd.c
+++ b/sr_unix/mupip_cmd.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -642,7 +643,9 @@ static	CLI_ENTRY	mup_set_qual[] = {
 { "ACCESS_METHOD",        mupip_set, 0, 0,                  mup_set_acc_qual,     0, 0, VAL_REQ,        1, NON_NEG, VAL_STR,  0 },
 { "BYPASS",               mupip_set, 0, 0,                  0,                    0, 0, VAL_DISALLOWED, 1, NON_NEG, VAL_N_A,  0 },
 { "DBFILENAME",           mupip_set, 0, 0,                  0,                    0, 0, VAL_REQ,        1, NEG,     VAL_STR,  0 },
+{ "DEFER_ALLOCATE",       mupip_set, 0, 0,                  0,                    0, 0, VAL_DISALLOWED,	1, NEG,     VAL_N_A,  0 },
 { "DEFER_TIME",           mupip_set, 0, 0,                  0,                    0, 0, VAL_REQ,        1, NEG,     VAL_STR,  0 },
+{ "EPOCHTAPER",           mupip_set, 0, 0,                  0,                    0, 0, VAL_DISALLOWED,	1, NEG,     VAL_N_A,  0 },
 { "EXTENSION_COUNT",      mupip_set, 0, 0,                  0,                    0, 0, VAL_REQ,        1, NON_NEG, VAL_NUM,  0 },
 { "FILE",                 mupip_set, 0, 0,                  0,                    0, 0, VAL_DISALLOWED, 1, NON_NEG, VAL_N_A,  0 },
 { "FLUSH_TIME",           mupip_set, 0, mup_set_ftime_parm, 0,                    0, 0, VAL_NOT_REQ,    1, NON_NEG, VAL_TIME, 0 },
diff --git a/sr_unix/mupip_rctldump.c b/sr_unix/mupip_rctldump.c
index 236b753..6ec5fd3 100644
--- a/sr_unix/mupip_rctldump.c
+++ b/sr_unix/mupip_rctldump.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -30,6 +31,7 @@
 error_def(ERR_MUPCLIERR);
 #endif
 
+/* Implements MUPIP RCTLDUMP */
 void mupip_rctldump(void)
 {
 #	ifdef AUTORELINK_SUPPORTED
@@ -48,7 +50,7 @@ void mupip_rctldump(void)
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MUPCLIERR);
 		dir.addr = objdir;
 		dir.len = max_len;
-		linkctl = relinkctl_attach(&dir);
+		linkctl = relinkctl_attach(&dir, NULL, 0);
 		assert(linkctl == TREF(open_relinkctl_list));
 		assert((NULL == linkctl) || (NULL == linkctl->next));
 	} else
diff --git a/sr_unix/mupip_set_file.c b/sr_unix/mupip_set_file.c
index 0373696..32a8831 100644
--- a/sr_unix/mupip_set_file.c
+++ b/sr_unix/mupip_set_file.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -77,6 +78,7 @@ error_def(ERR_DBRDONLY);
 error_def(ERR_INVACCMETHOD);
 error_def(ERR_MMNODYNDWNGRD);
 error_def(ERR_MUNOACTION);
+error_def(ERR_NODFRALLOCSUPP);
 error_def(ERR_RBWRNNOTCHG);
 error_def(ERR_TEXT);
 error_def(ERR_WCERRNOTCHG);
@@ -111,7 +113,8 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 	int4			status1;
 	int			glbl_buff_status, defer_status, rsrvd_bytes_status,
 				extn_count_status, lock_space_status, disk_wait_status,
-				inst_freeze_on_error_status, qdbrundown_status, mutex_space_status;
+				inst_freeze_on_error_status, qdbrundown_status, defer_allocate_status, mutex_space_status,
+				epoch_taper_status;
 	int4			new_disk_wait, new_cache_size, new_extn_count, new_lock_space, reserved_bytes, defer_time,
 				new_mutex_space;
 	int			key_size_status, rec_size_status;
@@ -297,11 +300,13 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 		else  if (0 == memcmp(ver_spec, "V6", ver_spec_len))
 			desired_dbver = GDSV6;
 		else
-			GTMASSERT;		/* CLI should prevent us ever getting here */
+			assertpro(FALSE);		/* CLI should prevent us ever getting here */
 	} else
 		desired_dbver = GDSVLAST;	/* really want to keep version, which has not yet been read */
 	inst_freeze_on_error_status = cli_present("INST_FREEZE_ON_ERROR");
 	qdbrundown_status = cli_present("QDBRUNDOWN");
+	defer_allocate_status = cli_present("DEFER_ALLOCATE");
+	epoch_taper_status = cli_present("EPOCHTAPER");
 	if (region)
 		rptr = grlist;
 	else
@@ -332,7 +337,7 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 			fn_len = db_fn_len;
 		}
 		mu_gv_cur_reg_init();
-		strcpy((char *)gv_cur_region->dyn.addr->fname, fn);
+		memcpy(gv_cur_region->dyn.addr->fname, fn, fn_len);
 		gv_cur_region->dyn.addr->fname_len = fn_len;
 		if (!need_standalone)
 		{
@@ -340,7 +345,7 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 			change_reg();	/* sets cs_addrs and cs_data */
 			if (gv_cur_region->read_only)
 			{
-				gtm_putmsg(VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(gv_cur_region));
+				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(gv_cur_region));
 				exit_stat |= EXIT_ERR;
 				gds_rundown();
 				mu_gv_cur_reg_free();
@@ -361,7 +366,7 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 				else
 				{
 					status1 = ERR_MMNODYNDWNGRD;
-					gtm_putmsg(VARLSTCNT(4) status1, 2, REG_LEN_STR(gv_cur_region));
+					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) status1, 2, REG_LEN_STR(gv_cur_region));
 				}
 				if (SS_NORMAL != status1)
 				{	/* "desired_db_format_set" would have printed appropriate error messages */
@@ -400,6 +405,23 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 					util_out_print("Database file !AD now has quick database rundown flag set to !AD", TRUE,
 						       fn_len, fn, 5, (cs_data->mumps_can_bypass ? " TRUE" : "FALSE"));
 				}
+				if (defer_allocate_status)
+				{
+#					if defined(__sun) || defined(__hpux)
+					if (CLI_NEGATED == defer_allocate_status)
+						gtm_putmsg_csa(CSA_ARG(cs_addrs) VARLSTCNT(1) ERR_NODFRALLOCSUPP);
+#					else
+					cs_data->defer_allocate = CLI_PRESENT == defer_allocate_status;
+					util_out_print("Database file !AD now has defer allocation flag set to !AD", TRUE,
+						       fn_len, fn, 5, (cs_data->defer_allocate ? " TRUE" : "FALSE"));
+#					endif
+				}
+				if (epoch_taper_status)
+				{
+					cs_data->epoch_taper = CLI_PRESENT == epoch_taper_status;
+					util_out_print("Database file !AD now has epoch taper flag set to !AD", TRUE,
+						       fn_len, fn, 5, (cs_data->epoch_taper ? " TRUE" : "FALSE"));
+				}
 			} else
 				exit_stat |= status;
 			rel_crit(gv_cur_region);
@@ -433,9 +455,9 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 				util_out_print("Error reading header of file", TRUE);
 				util_out_print("Database file !AD not changed:  ", TRUE, fn_len, fn);
 				if (-1 != status)
-					rts_error(VARLSTCNT(4) ERR_DBRDERR, 2, fn_len, fn);
+					rts_error_csa(CSA_ARG(cs_addrs) VARLSTCNT(4) ERR_DBRDERR, 2, fn_len, fn);
 				else
-					rts_error(VARLSTCNT(4) ERR_DBPREMATEOF, 2, fn_len, fn);
+					rts_error_csa(CSA_ARG(cs_addrs) VARLSTCNT(4) ERR_DBPREMATEOF, 2, fn_len, fn);
 			}
 			if (rsrvd_bytes_status)
 			{
@@ -506,7 +528,7 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 #				ifdef GTM_CRYPT
 				if (dba_mm == access && (csd->is_encrypted))
 				{
-					gtm_putmsg(VARLSTCNT(4) ERR_CRYPTNOMM, 2, DB_LEN_STR(gv_cur_region));
+					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CRYPTNOMM, 2, DB_LEN_STR(gv_cur_region));
 					mupip_exit(ERR_RBWRNNOTCHG);
 				}
 #				endif
@@ -542,6 +564,8 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 				util_out_print("Database file !AD now has partial recovery flag set to  !UL(FALSE) ",
 						TRUE, fn_len, fn, csd->file_corrupt);
 			}
+			if (epoch_taper_status)
+				csd->epoch_taper = CLI_PRESENT == epoch_taper_status;
 			if (dba_mm == access_new)
 			{
 				if (CLI_NEGATED == defer_status)
@@ -608,7 +632,7 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 				util_out_print("write : !AZ", TRUE, errptr);
 				util_out_print("Error writing header of file", TRUE);
 				util_out_print("Database file !AD not changed: ", TRUE, fn_len, fn);
-				rts_error(VARLSTCNT(4) ERR_DBRDERR, 2, fn_len, fn);
+				rts_error_csa(CSA_ARG(cs_addrs) VARLSTCNT(4) ERR_DBRDERR, 2, fn_len, fn);
 			}
 			CLOSEFILE_RESET(fd, rc);	/* resets "fd" to FD_INVALID */
 			/* --------------------- report results ------------------------- */
@@ -639,6 +663,9 @@ int4 mupip_set_file(int db_fn_len, char *db_fn)
 			if (qdbrundown_status)
 				util_out_print("Database file !AD now has quick database rundown flag set to !AD", TRUE,
 					       fn_len, fn, 5, (csd->mumps_can_bypass ? " TRUE" : "FALSE"));
+			if (epoch_taper_status)
+				util_out_print("Database file !AD now has epoch taper flag set to !AD", TRUE,
+					       fn_len, fn, 5, (csd->epoch_taper ? " TRUE" : "FALSE"));
 			if (disk_wait_status)
 				util_out_print("Database file !AD now has wait disk set to !UL seconds",
 						TRUE, fn_len, fn, csd->wait_disk_space);
diff --git a/sr_unix/mupip_trigger.c b/sr_unix/mupip_trigger.c
index 0503005..d087dc3 100644
--- a/sr_unix/mupip_trigger.c
+++ b/sr_unix/mupip_trigger.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -50,7 +51,6 @@ void mupip_trigger(void)
 {
 	char		trigger_file_name[MAX_FN_LEN + 1], select_list[MAX_LINE], select_file_name[MAX_FN_LEN + 1];
 	unsigned short	trigger_file_len = MAX_FN_LEN + 1, select_list_len = MAX_LINE;
-	int		reg_max_rec, reg_max_key, reg_max_blk;
 	unsigned short	sf_name_len;
 	int		local_errno;
 	struct stat	statbuf;
diff --git a/sr_unix/mutex.c b/sr_unix/mutex.c
index 9acb9a9..355fe5c 100644
--- a/sr_unix/mutex.c
+++ b/sr_unix/mutex.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -62,9 +63,6 @@
 #include "gtmsource.h"			/* required for jnlpool GBLREF */
 #endif
 
-#define QUANT_RETRY			10000
-#define QUEUE_RETRY			255
-
 #ifdef MUTEX_MSEM_WAKE
 #define MUTEX_MAX_HEARTBEAT_WAIT        2 /* so that total wait for both select and msem wait will be the same */
 #define MUTEX_LCKALERT_PERIOD		4
@@ -96,6 +94,69 @@
 		BG_TRACE_PRO_ANY(CSA, EVENT);					\
 }
 
+#define	ONE_MUTEX_TRY(CSA, ADDR, CRASH_CNT, PID, LOCK_TYPE, SPINS, SPIN_CNT, YIELDS, YIELD_CNT, Q_SLPS, IN_EPOCH, ATSTART)	\
+MBSTART																\
+{																\
+	ABS_TIME 		ATEND;												\
+	enum cdb_sc		STATUS;												\
+	gtm_uint64_t		FAILED_LOCK_ATTEMPTS;										\
+	node_local		*CNL;												\
+																\
+	CNL = (CSA)->nl;													\
+	if ((CRASH_CNT) != (ADDR)->crashcnt)											\
+		STATUS = cdb_sc_critreset;											\
+	else if (GET_SWAPLOCK(&(ADDR)->semaphore))										\
+	{															\
+		(CSA)->critical->crit_cycle++;											\
+		MUTEX_DPRINT3("%d: Write %sACQUIRED\n", (PID), (MUTEX_LOCK_WRITE == (LOCK_TYPE)) ? "" : "IMMEDIATE ");		\
+		MUTEX_TEST_SIGNAL_HERE("WRTLCK NOW CRIT\n", FALSE);								\
+		(CSA)->now_crit = TRUE;												\
+		MUTEX_TEST_SIGNAL_HERE("WRTLCK SUCCESS\n", FALSE);								\
+		if (-1 != (SPIN_CNT))												\
+		{														\
+			assert((gtm_uint64_t)(SPIN_CNT) <= (SPINS));								\
+			(SPINS) -= (gtm_uint64_t)(SPIN_CNT);			/* reduce by the number of unused */		\
+		}														\
+		if (-1 != (YIELD_CNT))												\
+		{														\
+			assert((gtm_uint64_t)(YIELD_CNT) <= (YIELDS));								\
+			(YIELDS) -= (gtm_uint64_t)(YIELD_CNT);			/* reduce by the number of unused */		\
+		}														\
+		STATUS = cdb_sc_normal;												\
+		INCR_GVSTATS_COUNTER((CSA), CNL, n_crit_success, 1);								\
+	} else															\
+		STATUS = cdb_sc_nolock;												\
+	if ((cdb_sc_normal == STATUS) || (MUTEX_LOCK_WRITE_IMMEDIATE == (LOCK_TYPE)) || (cdb_sc_critreset == STATUS))		\
+	{															\
+		FAILED_LOCK_ATTEMPTS = (SPINS) + (YIELDS) + (Q_SLPS) + (cdb_sc_nolock == STATUS);				\
+		if ((IN_EPOCH))													\
+			INCR_GVSTATS_COUNTER((CSA), CNL, n_crits_in_epch, FAILED_LOCK_ATTEMPTS);				\
+		INCR_GVSTATS_COUNTER((CSA), CNL, n_crit_failed, FAILED_LOCK_ATTEMPTS);						\
+		INCR_GVSTATS_COUNTER((CSA), CNL, sq_crit_failed, FAILED_LOCK_ATTEMPTS * FAILED_LOCK_ATTEMPTS);			\
+		if (YIELDS)												\
+		{														\
+			INCR_GVSTATS_COUNTER((CSA), CNL, n_crit_yields, (YIELDS));						\
+			INCR_GVSTATS_COUNTER((CSA), CNL, sq_crit_yields, (YIELDS) * (YIELDS));					\
+		}														\
+		if (Q_SLPS)													\
+		{														\
+			INCR_GVSTATS_COUNTER((CSA), CNL, n_crit_que_slps, (Q_SLPS));						\
+			INCR_GVSTATS_COUNTER((CSA), CNL, sq_crit_que_slps, (Q_SLPS) * (Q_SLPS));				\
+		}														\
+		if ((CSA)->crit_probe)												\
+		{														\
+			sys_get_curr_time(&ATEND);		/* end time for the probcrit */					\
+			ATEND = sub_abs_time(&ATEND, &(ATSTART));	/* times currently use usec but might someday use ns*/	\
+			(CSA)->probecrit_rec.t_get_crit =  ((gtm_uint64_t)(ATEND.at_sec * 1000000) + ATEND.at_usec) * 1000;	\
+			(CSA)->probecrit_rec.p_crit_failed = (gtm_uint64_t)FAILED_LOCK_ATTEMPTS;				\
+			(CSA)->probecrit_rec.p_crit_yields = (gtm_uint64_t)(YIELDS);						\
+			(CSA)->probecrit_rec.p_crit_que_slps = (gtm_uint64_t)(Q_SLPS);						\
+		}														\
+		return STATUS;													\
+	}															\
+}																\
+MBEND
+
 GBLREF int			num_additional_processors;
 GBLREF jnl_gbls_t		jgbl;
 GBLREF jnlpool_addrs		jnlpool;
@@ -126,7 +187,7 @@ static	unsigned short	next_rand[3];
 static	int		optimistic_attempts;
 static	int		mutex_expected_wake_instance = 0;
 
-static	enum cdb_sc	mutex_wakeup(mutex_struct_ptr_t addr);
+static	enum cdb_sc	mutex_wakeup(mutex_struct_ptr_t addr, mutex_spin_parms_ptr_t mutex_spin_parms);
 void			mutex_salvage(gd_region *reg);
 
 error_def(ERR_MUTEXERR);
@@ -147,15 +208,11 @@ error_def(ERR_WCBLOCKED);
  *		queue slots. If crash is TRUE, then this is a "crash"
  *		reinitialization; otherwise, it's a "clean" initialization.
  *
- *		enum cdb_sc mutex_lockw(reg, mutex_spin_parms, seq)
- *			Write access to mutex for region reg
- *
- *		enum cdb_sc mutex_lockwim(reg, mutex_spin_parms, seq)
- *			Write access for region reg; if cannot lock,
- *		immediately return cdb_sc_nolock
+ *		enum cdb_sc gtm_mutex_lock(reg, mutex_spin_parms, seq, mutex_lock_type)
+ *			mutex for region reg
  *
  *		enum cdb_sc mutex_unlockw(reg, seq);
- *			Unlock write access for region reg
+ *			Unlock mutex for region reg
  *
  *		For routines taking the seq argument, if seq != crash count,
  *		return cdb_sc_critreset.
@@ -303,7 +360,7 @@ static	void	crash_initialize(mutex_struct_ptr_t addr, int n, bool crash)
 	} while (TRUE);
 }
 
-static	enum cdb_sc mutex_long_sleep(mutex_struct_ptr_t addr, mutex_lock_t mutex_lock_type, sgmnt_addrs *csa)
+static	enum cdb_sc mutex_long_sleep(mutex_struct_ptr_t addr, sgmnt_addrs *csa,  mutex_spin_parms_ptr_t mutex_spin_parms)
 {
 	enum cdb_sc		status;
 	boolean_t		wakeup_status;
@@ -328,17 +385,17 @@ static	enum cdb_sc mutex_long_sleep(mutex_struct_ptr_t addr, mutex_lock_t mutex_
 		FPRINTF(stderr, "MUPIP BACKUP is about to start long sleep\n");
 	}
 #	endif
-	if (LOCK_AVAILABLE == addr->semaphore.u.parts.latch_pid && ++optimistic_attempts <= MUTEX_MAX_OPTIMISTIC_ATTEMPTS)
+	if (LOCK_AVAILABLE == addr->semaphore.u.parts.latch_pid && --optimistic_attempts)
 	{
 		MUTEX_DPRINT2("%d: Nobody in crit (II) wake procs\n", process_id);
 		MUTEX_TRACE_CNTR(mutex_trc_mutex_slp_fn_noslp);
-		status = mutex_wakeup(addr);
+		status = mutex_wakeup(addr, mutex_spin_parms);
 		if ((cdb_sc_normal == status) && (woke_self || woke_none))
 			return (cdb_sc_normal);
 		else if (cdb_sc_dbccerr == status)
 			return (cdb_sc_dbccerr);
 	}
-	optimistic_attempts = 0;
+	optimistic_attempts = MUTEX_MAX_OPTIMISTIC_ATTEMPTS;
 	do
 	{
 #		ifdef MUTEX_MSEM_WAKE
@@ -462,19 +519,14 @@ static	enum cdb_sc mutex_long_sleep(mutex_struct_ptr_t addr, mutex_lock_t mutex_
 		 * me. So, I shall try to get the lock NOW
 		 */
 		if (wakeup_status)
-		{
-			if (MUTEX_LOCK_WRITE == mutex_lock_type)
-				return (cdb_sc_normal);
-		} else
+			return (cdb_sc_normal);
+		else
 			mutex_deadlock_check(addr, csa); /* Timed out: See if any deadlocks and fix if detected */
-		status = mutex_wakeup(addr); /* Timed out or reader. In case
-					      * of reader this causes
-					      * accelerated wakeup of readers
-					      * in the queue */
+		status = mutex_wakeup(addr, mutex_spin_parms);
 		if (cdb_sc_dbccerr == status)
 			return (cdb_sc_dbccerr);
 		/* else status is cdb_sc_normal */
-		if (wakeup_status || woke_self || woke_none)
+		if (woke_self || woke_none)
 			return (cdb_sc_normal);
 		/*
 		 * There are others above me in the queue or I missed my
@@ -484,136 +536,7 @@ static	enum cdb_sc mutex_long_sleep(mutex_struct_ptr_t addr, mutex_lock_t mutex_
 	} while (TRUE);
 }
 
-static	enum cdb_sc mutex_sleep(sgmnt_addrs *csa, mutex_lock_t mutex_lock_type)
-{
-	/* Insert this process at the tail of the wait queue and hibernate */
-	mutex_struct_ptr_t	addr;
-	mutex_que_entry_ptr_t	free_slot;
-	int			redo_cntr;
-	int			queue_retry_counter_remq,
-				quant_retry_counter_remq,
-				queue_retry_counter_insq,
-				quant_retry_counter_insq;
-#	ifdef MUTEX_MSEM_WAKE
-	int			rc;
-#	endif
-
-	addr = csa->critical;
-	MUTEX_TRACE_CNTR(mutex_trc_mutex_slp_fn);
-	MUTEX_DPRINT2("%d: In Mutex Sleep\n", process_id);
-	if (LOCK_AVAILABLE == addr->semaphore.u.parts.latch_pid) /* there is nobody in crit */
-	{
-		/*
-		 * The above condition is an optimistic check to speed
-		 * things up by not letting a process sleep.
-		 * In an n-way SMP, there is a possibility that n processes
-		 * (atleast one writer) might run in a lock-step manner
-		 * testing the above condition almost at the same time and
-		 * deciding that nobody is in crit. This might go on till
-		 * atleast one of them grabs crit, or lock attempts cross a
-		 * threshold (leading to recovery). This is not desired. To
-		 * avoid such a scenario, we test the number of times we have
-		 * run into this situation and force ourselves to sleep
-		 */
-		if (++optimistic_attempts < MUTEX_MAX_OPTIMISTIC_ATTEMPTS)
-		{
-			MUTEX_DPRINT2("%d: Nobody in crit (I) wake procs\n", process_id);
-			MUTEX_TRACE_CNTR(mutex_trc_mutex_slp_fn_noslp);
-			return (mutex_wakeup(addr));
-		}
-	}
-	redo_cntr = 0;
-	quant_retry_counter_remq = QUANT_RETRY;
-	do
-	{
-		queue_retry_counter_remq = QUEUE_RETRY;
-		do
-		{
-			free_slot = (mutex_que_entry_ptr_t)REMQHI((que_head_ptr_t)&addr->freehead);
-#			ifdef MUTEX_MSEM_WAKE
-			msem_slot = free_slot;
-#			endif
-			if ((NULL != free_slot) && (mutex_que_entry_ptr_t)INTERLOCK_FAIL != free_slot)
-			{
-				free_slot->pid = process_id;
-				free_slot->mutex_wake_instance = mutex_expected_wake_instance;
-#				ifdef MUTEX_MSEM_WAKE
-				mutex_wake_msem_ptr = &free_slot->mutex_wake_msem;
-				/* this loop makes sure that the msemaphore is locked initially before the process goes to
-				 * long sleep
-				 */
-				do
-				{
-					rc = MSEM_LOCKNW(mutex_wake_msem_ptr);
-				} while (-1 == rc && EINTR == errno);
-#				endif
-				/*
-				 * Significance of mutex_wake_instance field : After queueing itself, a process might go to
-				 * sleep -select call in mutex_long_sleep- awaiting a wakeup message or a timeout. It is
-				 * possible that a wakeup message might arrive after timeout. In this case, a later attempt
-				 * at waiting for a wakeup message will falsely succeed on an old wakeup message. We use the
-				 * mutex_wake_instance field (value 0 or 1) to distinguish between an old and a new wakeup
-				 * message. Since at any given time there is atmost one entry in the queue for a process,
-				 * the only values we need for mutex_wake_instance are 0 and 1.
-				 */
-				mutex_expected_wake_instance = BIN_TOGGLE(mutex_expected_wake_instance);
-				quant_retry_counter_insq = QUANT_RETRY;
-				do
-				{
-					queue_retry_counter_insq = QUEUE_RETRY;
-					do
-					{
-						if (INTERLOCK_FAIL !=
-						    INSQTI((que_ent_ptr_t)free_slot, (que_head_ptr_t)&addr->prochead))
-						{
-							MUTEX_DPRINT3("%d: Inserted %d into wait queue\n", process_id,
-								      free_slot->pid);
-							return mutex_long_sleep(addr, mutex_lock_type, csa);
-						}
-					} while (--queue_retry_counter_insq);
-					if (!(--quant_retry_counter_insq))
-						return (cdb_sc_dbccerr); /* Too many failures */
-					rel_quant();
-				} while (quant_retry_counter_insq);
-				continue;
-			}
-			if ((mutex_que_entry_ptr_t)INTERLOCK_FAIL == free_slot)
-			{
-				/* secondary interlock failed on an attempt to remove an entry from the free queue */
-				redo_cntr = 0;
-				continue;
-			}
-			if ((mutex_que_entry_ptr_t)NULL == free_slot)
-			{
-				/* Record queue full event in db file header if applicable.  Take care not to do it for
-				 * jnlpool which has no concept of a db cache.  In that case csa->hdr is NULL so use
-				 * PROBE_BG_TRACE_PRO_ANY macro.
-				 */
-				PROBE_BG_TRACE_PRO_ANY(csa, mutex_queue_full);
-				csa->probecrit_rec.p_crit_que_full++;
-				MUTEX_DPRINT2("%d: Free Queue full\n", process_id);
-				/* When I can't find a free slot in the queue repeatedly, it means that there is no progress
-				 * in the system. A recovery attempt might be warranted in this scenario. The trick is to
-				 * return cdb_sc_normal which in turn causes another spin-loop initiation (or recovery when
-				 * implemented).  The objective of mutex_sleep is achieved (partially) in that sleep is
-				 * done, though queueing isn't.
-				 */
-			}
-			SLEEP_USEC(ONE_MILLION - 1, FALSE);	/* Wait a second, then try again */
-			mutex_deadlock_check(addr, csa);
-			if (++redo_cntr < MUTEX_MAX_WAIT_FOR_PROGRESS_CNTR)
-				break;
-			return (cdb_sc_normal);
-		} while (--queue_retry_counter_remq);
-		if (redo_cntr)
-			quant_retry_counter_remq = QUANT_RETRY + 1;
-		else
-			rel_quant();
-	} while (--quant_retry_counter_remq);
-	return (cdb_sc_dbccerr);
-}
-
-static	enum cdb_sc mutex_wakeup(mutex_struct_ptr_t addr)
+static	enum cdb_sc mutex_wakeup(mutex_struct_ptr_t addr, mutex_spin_parms_ptr_t mutex_spin_parms)
 {
 	mutex_que_entry_ptr_t	free_entry;
 	int			queue_retry_counter_remq,
@@ -625,17 +548,15 @@ static	enum cdb_sc mutex_wakeup(mutex_struct_ptr_t addr)
 
 	woke_self = FALSE;
 	woke_none = TRUE;
-	quant_retry_counter_remq = QUANT_RETRY;
+	quant_retry_counter_remq = queue_retry_counter_remq = 0;
 	do
 	{
-		queue_retry_counter_remq = QUEUE_RETRY;
 		do
 		{
 			free_entry = (mutex_que_entry_ptr_t)REMQHI((que_head_ptr_t)&addr->prochead);
 			if ((mutex_que_entry_ptr_t)NULL != free_entry &&
 			    (mutex_que_entry_ptr_t)INTERLOCK_FAIL != free_entry)
 			{
-				quant_retry_counter_insq = QUANT_RETRY;
 				wake_this_pid = free_entry->pid;
 				wake_instance = free_entry->mutex_wake_instance;
 #				ifdef MUTEX_MSEM_WAKE
@@ -653,11 +574,10 @@ static	enum cdb_sc mutex_wakeup(mutex_struct_ptr_t addr)
 				/* This makes this entry not belong to any process before
 				 * inserting it into the free queue.
 				 */
-				 free_entry->pid = 0;
+				free_entry->pid = quant_retry_counter_insq = queue_retry_counter_insq = 0;
 #				endif
 				do
 				{
-					queue_retry_counter_insq = QUEUE_RETRY;
 					do
 					{
 						if (INTERLOCK_FAIL !=
@@ -682,7 +602,12 @@ static	enum cdb_sc mutex_wakeup(mutex_struct_ptr_t addr)
 							}
 							return (cdb_sc_normal); /* No more wakes */
 						}
+						if (!queue_retry_counter_insq)		/* save memory reference on fast path */
+							queue_retry_counter_insq = mutex_spin_parms->mutex_hard_spin_count;
 					} while (--queue_retry_counter_insq);
+					if (!quant_retry_counter_insq)			/* save memory reference on fast path */
+						quant_retry_counter_insq = MAX(E_4 - mutex_spin_parms->mutex_hard_spin_count,
+							mutex_spin_parms->mutex_sleep_spin_count);
 					if (!(--quant_retry_counter_insq))
 					{
 #						ifndef MUTEX_MSEM_WAKE
@@ -693,14 +618,19 @@ static	enum cdb_sc mutex_wakeup(mutex_struct_ptr_t addr)
 						return (cdb_sc_dbccerr);
 					} else
 						rel_quant();
-				} while (quant_retry_counter_insq);
+				} while (quant_retry_counter_insq);	/* actually terminated by return 3 lines above */
 			} else if ((mutex_que_entry_ptr_t)NULL == free_entry)
 			{
 				/* Empty wait queue */
 				MUTEX_DPRINT2("%d: Empty wait queue\n", process_id);
 				return (cdb_sc_normal);
 			} /* else secondary interlock failed */
+			if (!queue_retry_counter_remq)			/* save memory reference on fast path */
+				quant_retry_counter_remq = mutex_spin_parms->mutex_hard_spin_count;
 		} while (--queue_retry_counter_remq);
+		if (!quant_retry_counter_remq)				/* save memory reference on fast path */
+			quant_retry_counter_remq = MAX(E_4 - mutex_spin_parms->mutex_hard_spin_count,
+							mutex_spin_parms->mutex_sleep_spin_count);
 		if (!(--quant_retry_counter_remq))
 			return (cdb_sc_dbccerr); /* Too many queue failures */
 		else
@@ -718,101 +648,34 @@ void	gtm_mutex_init(gd_region *reg, int n, bool crash)
 	return;
 }
 
-static enum cdb_sc write_lock_spin(gd_region *reg,
-					 mutex_spin_parms_ptr_t mutex_spin_parms,
-					 int crash_count,
-					 int attempt_recovery,
-					 mutex_lock_t mutex_lock_type,
-					 gtm_uint64_t *spins,
-					 gtm_uint64_t *yields)
-{
-	int			write_sleep_spin_count, write_hard_spin_count;
-	mutex_struct_ptr_t	addr;
-	sgmnt_addrs		*csa;
-#	ifdef MUTEX_REAL_SLEEP
-	int			micro_sleep_time;
-#	endif
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	assert(!csa->now_crit);
-	addr = csa->critical;
-	write_sleep_spin_count = 0;
-	write_hard_spin_count = 0;
-	do
-	{
-		do
-		{
-			if (crash_count != addr->crashcnt)
-				return (cdb_sc_critreset);
-			if (GET_SWAPLOCK(&addr->semaphore))
-			{
-				csa->critical->crit_cycle++;
-				MUTEX_DPRINT3("%d: Write %sACQUIRED\n", process_id,
-					      (MUTEX_LOCK_WRITE == mutex_lock_type) ? "" : "IMMEDIATE ");
-				MUTEX_TEST_SIGNAL_HERE("WRTLCK NOW CRIT\n", FALSE);
-				csa->now_crit = TRUE;
-				MUTEX_TEST_SIGNAL_HERE("WRTLCK SUCCESS\n", FALSE);
-				assert(write_hard_spin_count <= *spins);
-				*spins -= write_hard_spin_count;			/* reduce by the number of unused */
-				assert(write_sleep_spin_count <= *yields);
-				*yields -= write_sleep_spin_count;			/* reduce by the number of unused */
-				return (cdb_sc_normal);
-			} else if (attempt_recovery)
-			{
-				mutex_salvage(reg);
-				attempt_recovery = FALSE;
-			}
-			if (!write_hard_spin_count)	/* save memory reference on fast path */
-			{
-				write_hard_spin_count = num_additional_processors ? mutex_spin_parms->mutex_hard_spin_count : 1;
-				*spins += write_hard_spin_count;			/* start with max */
-			}
-		} while (--write_hard_spin_count);
-		/* Sleep for a very short duration */
-#		ifdef MUTEX_TRACE
-		if (MUTEX_LOCK_WRITE == mutex_lock_type)
-			MUTEX_TRACE_CNTR(mutex_trc_wt_short_slp);
-		else
-			MUTEX_TRACE_CNTR(mutex_trc_wtim_short_slp);
-#		endif
-#		ifdef MUTEX_REAL_SLEEP
-		micro_sleep_time = (nrand48(next_rand) & mutex_spin_parms->mutex_spin_sleep_mask) + 1;
-		assert(micro_sleep_time < ONE_MILLION);
-		assert(FALSE == csa->now_crit);
-		SLEEP_USEC(micro_sleep_time, FALSE);
-#		else
-		rel_quant();
-#		endif
-		if (!write_sleep_spin_count)	/* save memory reference on fast path */
-		{
-			write_sleep_spin_count = mutex_spin_parms->mutex_sleep_spin_count;
-			*yields += write_sleep_spin_count;				/* start with max */
-		}
-	} while (--write_sleep_spin_count);
-	MUTEX_DPRINT4("%d: Could not acquire WRITE %sLOCK, held by %d\n", process_id,
-		(MUTEX_LOCK_WRITE == mutex_lock_type) ? "" : "IMMEDIATE ", addr->semaphore.u.parts.latch_pid);
-	return (cdb_sc_nolock);
-}
-
-static enum cdb_sc mutex_lock(gd_region *reg,
+enum cdb_sc gtm_mutex_lock(gd_region *reg,
 			      mutex_spin_parms_ptr_t mutex_spin_parms,
 			      int crash_count,
 			      mutex_lock_t mutex_lock_type)
 {
 	boolean_t		epoch_count, try_recovery;
 	enum cdb_sc		status;
-	int 			n_queslots;
+	gtm_int64_t		hard_spin_cnt, sleep_spin_cnt;
+	gtm_uint64_t		queue_sleeps, spins, yields;
+	int 			n_queslots, redo_cntr;
 	latch_t			local_crit_cycle;
 	mutex_struct_ptr_t 	addr;
+	mutex_que_entry_ptr_t	free_slot;
 	node_local		*cnl;
 	pid_t			in_crit_pid;
 	sgmnt_addrs		*csa;
 	time_t			curr_time;
 	uint4			curr_time_uint4, next_alert_uint4;
-	gtm_uint64_t		failed_lock_attempts, queue_sleeps, spins, yields;
-	ABS_TIME 		atstart, atend;
+	ABS_TIME 		atstart;
+#	ifdef MUTEX_MSEM_WAKE
+	int			rc;
+#	endif
+#	ifdef MUTEX_REAL_SLEEP
+	int			micro_sleep_time;
+#	endif
 
 	csa = &FILE_INFO(reg)->s_addrs;
+	assert(!csa->now_crit);
 	cnl = csa->nl;
 	/* Check that "mutex_per_process_init" has happened before we try to grab crit and that it was done with our current
 	 * pid (i.e. ensure that even in the case where parent did the mutex init with its pid and did a fork, the child process
@@ -822,52 +685,67 @@ static enum cdb_sc mutex_lock(gd_region *reg,
 	assert((MUTEX_LOCK_WRITE_IMMEDIATE == mutex_lock_type) || (MUTEX_LOCK_WRITE == mutex_lock_type));
 	assert((mutex_per_process_init_pid == process_id) || (0 == mutex_per_process_init_pid) && in_mu_rndwn_file);
 	MUTEX_TRACE_CNTR((MUTEX_LOCK_WRITE == mutex_lock_type) ? mutex_trc_lockw : mutex_trc_lockwim);
-	optimistic_attempts = 0;
-	queue_sleeps = spins = yields = csa->probecrit_rec.p_crit_que_full = 0;
+	optimistic_attempts = MUTEX_MAX_OPTIMISTIC_ATTEMPTS;
+	queue_sleeps = csa->probecrit_rec.p_crit_que_full = 0;
+	spins = yields = 0;
 	local_crit_cycle = 0;	/* this keeps us from doing a MUTEXLCKALERT on the first cycle in case the time latch is stale */
 	try_recovery = jgbl.onlnrlbk; /* salvage lock the first time if we are online rollback thereby reducing unnecessary waits */
 	epoch_count = cnl->doing_epoch;
+	addr = csa->critical;
 	if (csa->crit_probe)
 	{	/* run the active queue to find how many slots are left */
-		addr = csa->critical;
 		csa->probecrit_rec.p_crit_que_slots = (gtm_uint64_t)addr->queslots;		/* free = total number of slots */
 		csa->probecrit_rec.p_crit_que_slots -= verify_queue_lock((que_head_ptr_t)&addr->prochead); /* less used slots */
 		sys_get_curr_time(&atstart);							/* start time for the probecrit */
 	}
 	do
-	{
+	{	/* master loop */
 		in_crit_pid = cnl->in_crit;
+		sleep_spin_cnt = -1;
 		MUTEX_TRACE_CNTR(mutex_trc_w_atmpts);
-		status = write_lock_spin(reg, mutex_spin_parms, crash_count, try_recovery, mutex_lock_type, &spins, &yields);
-		if ((cdb_sc_normal == status) || (MUTEX_LOCK_WRITE_IMMEDIATE == mutex_lock_type) || (cdb_sc_critreset == status))
-		{
-			failed_lock_attempts = spins + yields + queue_sleeps;
-			INCR_GVSTATS_COUNTER(csa, cnl, n_crit_success, 1);
-			if (epoch_count)
-				INCR_GVSTATS_COUNTER(csa, cnl, n_crits_in_epch, failed_lock_attempts);
-			INCR_GVSTATS_COUNTER(csa, cnl, n_crit_failed, failed_lock_attempts);
-			INCR_GVSTATS_COUNTER(csa, cnl, sq_crit_failed, failed_lock_attempts * failed_lock_attempts);
-			if (yields)
-			{
-				INCR_GVSTATS_COUNTER(csa, cnl, n_crit_yields, yields);
-				INCR_GVSTATS_COUNTER(csa, cnl, sq_crit_yields, yields * yields);
-			}
-			if (queue_sleeps)
-			{
-				INCR_GVSTATS_COUNTER(csa, cnl, n_crit_que_slps, queue_sleeps);
-				INCR_GVSTATS_COUNTER(csa, cnl, sq_crit_que_slps, queue_sleeps * queue_sleeps);
+		do
+		{	/* fast grab loop for the master lock */
+			for (status = cdb_sc_nolock, hard_spin_cnt = -1; hard_spin_cnt; --hard_spin_cnt)
+			{	/* hard spin loop for the master lock - don't admit any MUTEX_LOCK_WRITE_IMMEDIATE to try a bit '*/
+				ONE_MUTEX_TRY(csa, addr, crash_count, process_id, MUTEX_LOCK_WRITE, spins, hard_spin_cnt,
+					yields, sleep_spin_cnt, queue_sleeps, epoch_count, atstart);
+				if (try_recovery)
+				{
+					mutex_salvage(reg);
+					try_recovery = FALSE;
+				}
+				if (-1 == hard_spin_cnt)	/* save memory reference on fast path */
+				{
+					hard_spin_cnt = num_additional_processors ? mutex_spin_parms->mutex_hard_spin_count : 1;
+					spins += hard_spin_cnt;			/* start with max */
+				}
 			}
-			if (csa->crit_probe)
+				/* Sleep for a very short duration */
+#			ifdef MUTEX_TRACE
+			if (MUTEX_LOCK_WRITE == mutex_lock_type)
+				MUTEX_TRACE_CNTR(mutex_trc_wt_short_slp);
+			else
+				MUTEX_TRACE_CNTR(mutex_trc_wtim_short_slp);
+#			endif
+#			ifdef MUTEX_REAL_SLEEP
+			micro_sleep_time = (nrand48(next_rand) & mutex_spin_parms->mutex_spin_sleep_mask) + 1;
+			assert(micro_sleep_time < ONE_MILLION);
+			assert(FALSE == csa->now_crit);
+			SLEEP_USEC(micro_sleep_time, FALSE);
+#			else
+			rel_quant();
+#			endif
+			if (-1 == sleep_spin_cnt)	/* save memory reference on fast path */
 			{
-				sys_get_curr_time(&atend);		/* end time for the probcrit */
-				atend = sub_abs_time(&atend, &atstart);	/* the times currently use usec but might someday use */
-				csa->probecrit_rec.t_get_crit =  ((atend.at_sec * 1000000) + atend.at_usec) * 1000; /* nanosecs? */
-				csa->probecrit_rec.p_crit_failed = failed_lock_attempts;
-				csa->probecrit_rec.p_crit_yields = yields;
-				csa->probecrit_rec.p_crit_que_slps = queue_sleeps;
+				sleep_spin_cnt = mutex_spin_parms->mutex_sleep_spin_count;
+				yields += sleep_spin_cnt;				/* start with max */
 			}
-			return (status);
-		}
+		} while (--sleep_spin_cnt);
+		MUTEX_DPRINT4("%d: Could not acquire WRITE %sLOCK, held by %d\n", process_id,
+			(MUTEX_LOCK_WRITE == mutex_lock_type) ? "" : "IMMEDIATE ", addr->semaphore.u.parts.latch_pid);
+		if (MUTEX_LOCK_WRITE_IMMEDIATE == mutex_lock_type)	/* immediate gets 1 last try which returns regardless */
+			ONE_MUTEX_TRY(csa, addr, crash_count, process_id, mutex_lock_type,	/* use real lock type here */
+				spins, (gtm_int64_t)-1, yields, (gtm_int64_t)-1, queue_sleeps, epoch_count, atstart);
 		try_recovery = FALSE;		/* only try recovery once per MUTEXLCKALERT */
 		assert(cdb_sc_nolock == status);
 		time(&curr_time);
@@ -875,7 +753,7 @@ static enum cdb_sc mutex_lock(gd_region *reg,
 		curr_time_uint4 = (uint4)curr_time;
 		next_alert_uint4 = csa->critical->stuckexec.cas_time;
 		if ((curr_time_uint4 > next_alert_uint4) && !IS_REPL_INST_FROZEN)
-		{	/* We've waited long enough and the Instance is not frozen */
+		{	/* We've waited long enough and the Instance is not frozen - might be time to send MUTEXLCKALERT */
 			if (COMPSWAP_LOCK(&csa->critical->stuckexec.time_latch, next_alert_uint4, 0,
 				(curr_time_uint4 + MUTEXLCKALERT_INTERVAL), 0))
 			{	/* and no one else beat us to it */
@@ -920,25 +798,132 @@ static enum cdb_sc mutex_lock(gd_region *reg,
 				MUTEX_DPRINT2("%d: Could not acquire STUCKEXEC time lock", process_id);
 			}
 		}
+		/* time to try for a slot on the mutex queue in order to wait for a wake up when someone releases crit */
 		if (0 == local_crit_cycle)
 			local_crit_cycle = csa->critical->crit_cycle;	/* sync first time waiter */
-		queue_sleeps++;
-		if (cdb_sc_dbccerr == mutex_sleep(csa, mutex_lock_type))
-			return (cdb_sc_dbccerr);
+		MUTEX_TRACE_CNTR(mutex_trc_mutex_slp_fn);
+		MUTEX_DPRINT2("%d: looking for mutex queue slot\n", process_id);
+		if (LOCK_AVAILABLE == addr->semaphore.u.parts.latch_pid) /* there is nobody in crit */
+		{	/* The above condition is an optimistic check to speed hings up by not letting a process sleep.
+		 	* In an n-way SMP, there is a possibility that n processes including at least one writer might run in
+		 	*  lock-step,testing the above condition almost at the same time and deciding that nobody is in crit.
+		 	* This might go on until one of them grabs crit, or lock-attempts cross a threshold leading to recovery.
+			*/
+			if (--optimistic_attempts)
+			{	/* To avoid such an undesireable scenario, we test the number of times we have run into this
+				 * a situation d if too many, sleep sleep as if the latch were held.
+				 */
+				MUTEX_DPRINT2("%d: Nobody in crit (I) wake procs\n", process_id);
+				MUTEX_TRACE_CNTR(mutex_trc_mutex_slp_fn_noslp);
+				if (cdb_sc_normal == mutex_wakeup(addr, mutex_spin_parms))
+					continue;
+				return (cdb_sc_dbccerr);
+			}
+		}
+		for (redo_cntr = MUTEX_MAX_WAIT_FOR_PROGRESS_CNTR; redo_cntr;)
+		{	/* loop on getting a slot on the queue - every time through, if crit is available, grab it and go */
+			ONE_MUTEX_TRY(csa, addr, crash_count, process_id, mutex_lock_type,	/* lock type is MUTEX_LOCK_WRITE */
+				spins, (gtm_int64_t)-1, yields, (gtm_int64_t)-1, queue_sleeps, epoch_count, atstart);
+			free_slot = (mutex_que_entry_ptr_t)REMQHI((que_head_ptr_t)&addr->freehead);
+#			ifdef MUTEX_MSEM_WAKE
+			msem_slot = free_slot;
+#			endif
+			if ((NULL != free_slot) && (mutex_que_entry_ptr_t)INTERLOCK_FAIL != free_slot)
+			{
+				free_slot->pid = process_id;
+				free_slot->mutex_wake_instance = mutex_expected_wake_instance;
+#				ifdef MUTEX_MSEM_WAKE
+				mutex_wake_msem_ptr = &free_slot->mutex_wake_msem;
+				/* this loop makes sure that the msemaphore is locked initially before the process goes to
+				 * long sleep
+				 */
+				do
+				{
+					rc = MSEM_LOCKNW(mutex_wake_msem_ptr);
+				} while (-1 == rc && EINTR == errno);
+#				endif
+				/*
+				 * Significance of mutex_wake_instance field : After queueing itself, a process might go to
+				 * sleep -select call in mutex_long_sleep- awaiting a wakeup message or a timeout. It is
+				 * possible that a wakeup message might arrive after timeout. In this case, a later attempt
+				 * at waiting for a wakeup message will falsely succeed on an old wakeup message. We use the
+				 * mutex_wake_instance field (value 0 or 1) to distinguish between an old and a new wakeup
+				 * message. Since at any given time there is atmost one entry in the queue for a process,
+				 * the only values we need for mutex_wake_instance are 0 and 1.
+				 */
+				mutex_expected_wake_instance = BIN_TOGGLE(mutex_expected_wake_instance);
+				hard_spin_cnt = sleep_spin_cnt = -1;
+				assert(MUTEX_LOCK_WRITE == mutex_lock_type);
+				do
+				{
+					do
+					{
+						if (INTERLOCK_FAIL !=
+							INSQTI((que_ent_ptr_t)free_slot, (que_head_ptr_t)&addr->prochead))
+						{
+							queue_sleeps++;
+							MUTEX_DPRINT3("%d: Inserted %d into wait queue\n", process_id,
+								free_slot->pid);
+							if (cdb_sc_normal
+								== mutex_long_sleep(addr, csa, mutex_spin_parms))
+									break;
+						}
+						if (-1 == hard_spin_cnt)		/* save memory reference on fast path */
+						{
+							hard_spin_cnt = num_additional_processors
+								? mutex_spin_parms->mutex_hard_spin_count : 1;
+							spins += hard_spin_cnt;		/* start with max */
+						}
+					} while (--hard_spin_cnt);
+					if (hard_spin_cnt)
+						break;
+					if (-1 == sleep_spin_cnt)		/* save memory reference on fast path */
+					{
+						sleep_spin_cnt = MAX(E_4 - mutex_spin_parms->mutex_hard_spin_count,
+							mutex_spin_parms->mutex_sleep_spin_count);
+						yields += sleep_spin_cnt;	/* start with max */
+					}
+#					ifndef MUTEX_MSEM_WAKE
+					if (wake_this_pid != process_id)
+						mutex_wake_proc((sm_int_ptr_t)&wake_this_pid, wake_instance);
+#					endif
+					if (!(--sleep_spin_cnt))
+						return (cdb_sc_dbccerr);	/* Too many failures */
+					rel_quant();
+				} while (sleep_spin_cnt);		/* actually terminated by the return two lines above */
+			}
+			if (sleep_spin_cnt)
+			{
+				redo_cntr = 0;
+				break;
+			}
+			if ((mutex_que_entry_ptr_t)NULL == free_slot)
+			{
+				/* Record queue full event in db file header if applicable.  Take care not to do it for
+				 * jnlpool which has no concept of a db cache.  In that case csa->hdr is NULL so use
+				 * PROBE_BG_TRACE_PRO_ANY macro.
+				 */
+				PROBE_BG_TRACE_PRO_ANY(csa, mutex_queue_full);
+				csa->probecrit_rec.p_crit_que_full++;
+				MUTEX_DPRINT2("%d: Free Queue full\n", process_id);
+				/* When I can't find a free slot in the queue repeatedly, it means that there is no progress
+				 * in the system. A recovery attempt might be warranted in this scenario. The trick is to
+				 * return cdb_sc_normal which in turn causes another spin-loop initiation (or recovery when
+				 * implemented).  The objective of mutex_sleep is achieved (partially) in that sleep is
+				 * done, though queueing isn't.
+				 */
+			}
+			mutex_deadlock_check(addr, csa);
+			if (redo_cntr--)
+			{
+				yields++;
+				SLEEP_USEC(HUNDRED_MSEC, FALSE);	/* Wait a tenth of a second, then try again */
+				continue;
+			}
+		} while (redo_cntr);
 	} while (TRUE);
 }
 
-/* in UNIX calls to the following two entry points should be replaced by appropriate (perhaps macro) calls to mutex_lock */
-enum cdb_sc mutex_lockw(gd_region *reg, mutex_spin_parms_ptr_t mutex_spin_parms, int crash_count)
-{
-	return (mutex_lock(reg, mutex_spin_parms, crash_count, MUTEX_LOCK_WRITE));
-}
-
-enum cdb_sc mutex_lockwim(gd_region *reg, mutex_spin_parms_ptr_t mutex_spin_parms, int crash_count)
-{
-	return (mutex_lock(reg, mutex_spin_parms, crash_count, MUTEX_LOCK_WRITE_IMMEDIATE));
-}
-
 enum cdb_sc mutex_unlockw(gd_region *reg, int crash_count)
 {
 	/* Unlock write access to the mutex at addr */
@@ -955,7 +940,9 @@ enum cdb_sc mutex_unlockw(gd_region *reg, int crash_count)
 	assert(csa->critical->semaphore.u.parts.latch_pid == process_id);
 	RELEASE_SWAPLOCK(&csa->critical->semaphore);
 	MUTEX_DPRINT2("%d: WRITE LOCK RELEASED\n", process_id);
-	return (mutex_wakeup(csa->critical));
+	return (mutex_wakeup(csa->critical, NULL != csa->hdr
+		? (mutex_spin_parms_ptr_t)(&csa->hdr->mutex_spin_parms)
+		: (mutex_spin_parms_ptr_t)((sm_uc_ptr_t)csa->critical + JNLPOOL_CRIT_SPACE)));
 }
 
 void mutex_cleanup(gd_region *reg)
diff --git a/sr_unix/mutexsp.h b/sr_unix/mutexsp.h
index 7d2e111..8cb4220 100644
--- a/sr_unix/mutexsp.h
+++ b/sr_unix/mutexsp.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -41,7 +42,8 @@
 
 #define BIN_TOGGLE(x) ((x) ? 0 : 1)
 
-#define ONE_MILLION 			1000000
+#define HUNDRED_MSEC 			100000
+#define E_4				10000
 
 typedef struct
 {
@@ -61,14 +63,12 @@ typedef enum
  */
 void		gtm_mutex_init(gd_region *reg, int n, bool crash);
 
-/* mutex_lockw - write access to mutex for region reg */
-enum	cdb_sc	mutex_lockw(gd_region *reg, mutex_spin_parms_ptr_t mutex_spin_parms, int crash_count);
-
-/*
- * mutex_lockwim - write access to mutex for region reg; if cannot lock,
- *                 immediately return cdb_sc_nolock
- */
-enum	cdb_sc	mutex_lockwim(gd_region *reg, mutex_spin_parms_ptr_t mutex_spin_parms, int crash_count);
+/* gtm_mutex_lock - lock access to mutex for region reg */
+/* gtm prefix added because solaris icu has a mutex_lock */
+enum cdb_sc gtm_mutex_lock(gd_region *reg,
+			      mutex_spin_parms_ptr_t mutex_spin_parms,
+			      int crash_count,
+			      mutex_lock_t mutex_lock_type);
 
 /* mutex_unlockw - unlock write access to mutex for region reg */
 enum	cdb_sc	mutex_unlockw(gd_region *reg, int crash_count);
diff --git a/sr_unix/obj_code.c b/sr_unix/obj_code.c
index 75b05fb..e312833 100644
--- a/sr_unix/obj_code.c
+++ b/sr_unix/obj_code.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -68,8 +69,6 @@ GBLREF short			object_name_len;
 GBLREF char			object_file_name[];
 GBLREF int			object_file_des;
 
-#define PTEXT_OFFSET SIZEOF(rhdtyp)
-
 /* The sections of the internal GT.M object (sans native object wrapper) are grouped
  * according to their type (R/O-retain, R/O-release, R/W-retain, R/W-release). The
  * "retain"/"release" refers to whether the sections in that segment are retained if the
diff --git a/sr_unix/obj_file.c b/sr_unix/obj_file.c
index a61710d..8f0731d 100644
--- a/sr_unix/obj_file.c
+++ b/sr_unix/obj_file.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -53,8 +54,6 @@ static int			emit_buff_used;			/* number of chars in emit_buff */
 static int			symcnt;
 static struct rel_table		*link_rel, *link_rel_end;	/* Linkage relocation entries.  */
 
-static int tmpcnt;
-
 error_def(ERR_OBJFILERR);
 error_def(ERR_STRINGOFLOW);
 
@@ -114,8 +113,6 @@ void emit_immed(char *source, uint4 size)
 {
 	int4 	write;
 
-	if (0 == size)
-		return;			/* Not sure why but this does happen */
 	if (run_time)
 	{
 		if (!IS_STP_SPACE_AVAILABLE_PRO(size))
@@ -151,7 +148,6 @@ void buff_emit(void)
 
 	SETUP_THREADGBL_ACCESS;
 	/* Accumulate object code piece in the object hash with progressive murmurhash call */
-	tmpcnt++;
 	gtmmrhash_128_ingest(TADR(objhash_state), emit_buff, emit_buff_used);
 	DOWRITERC(object_file_des, emit_buff, emit_buff_used, stat);
 	if (0 != stat)
@@ -359,7 +355,6 @@ void obj_init(void)
 	TREF(linkage_last) = NULL;
 	sym_table_size = 0;
 	linkage_size = MIN_LINK_PSECT_SIZE;	/* Minimum size of linkage Psect, assuming no references from generated code */
-   tmpcnt = 0;
 	return;
 }
 
diff --git a/sr_unix/obj_fileu.c b/sr_unix/obj_fileu.c
index 6037967..6b78b1f 100644
--- a/sr_unix/obj_fileu.c
+++ b/sr_unix/obj_fileu.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -75,7 +76,7 @@ int mk_tmp_object_file(const char *object_fname, int object_fname_len)
 		/* Note memcpy() below purposely includes null terminator */
 		memcpy(TADR(tmp_object_file_name) + object_fname_len, MKSTEMP_MASK, SIZEOF(MKSTEMP_MASK));
 		fdesc = mkstemp(TADR(tmp_object_file_name));
-	} while ((-1 == fdesc) && (EEXIST == errno) && (0 < --retry));
+	} while ((FD_INVALID == fdesc) && (EEXIST == errno) && (0 < --retry));
 	if (FD_INVALID == fdesc)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_OBJFILERR, 2, object_fname_len, object_fname, errno);
 	umask_orig = umask(000);	/* Determine umask (destructive) */
diff --git a/sr_unix/ojchildparms.c b/sr_unix/ojchildparms.c
index ea4a9e6..5f984c5 100644
--- a/sr_unix/ojchildparms.c
+++ b/sr_unix/ojchildparms.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -35,6 +36,7 @@
 #include "cache.h"
 #include "hashtab_objcode.h"
 #include "gtmio.h"
+#include "gtmmsg.h"		/* for gtm_putmsg prototype */
 
 GBLREF spdesc			stringpool;
 GBLREF io_log_name		*dollar_principal;
@@ -58,8 +60,14 @@ error_def(ERR_CLOSEFAIL);
 error_def(ERR_JOBSETUP);
 error_def(ERR_STRINGOFLOW);
 error_def(ERR_JOBLVN2LONG);
+error_def(ERR_JOBLVNDETAIL);
+error_def(ERR_MAXACTARG);
 
+#ifdef __hpux
+#define MAX_COMM_FRAME	1
+#else
 #define MAX_COMM_FRAME	5
+#endif
 
 /*
  * ------------------------------------------------
@@ -162,11 +170,14 @@ STATICFNDEF void ojchildparms(job_params_type *jparms, gcall_args *g_args, mval
 			DOREADRC(setup_fd, &arg_count, SIZEOF(arg_count), rc);
 			if (rc < 0)
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JOBSETUP, 2, LEN_AND_LIT("argument count"), errno, 0);
-			g_args->callargs = arg_count + 4;
+			if (arg_count > MAX_ACTUALS)
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXACTARG);
+			g_args->callargs = arg_count + PUSH_PARM_OVERHEAD;
 			g_args->truth = 1;
 			g_args->retval = 0;
 			g_args->mask = 0;
 			g_args->argcnt = arg_count;
+			ENSURE_STP_FREE_SPACE(arg_count * MAX_JOB_LEN);
 			for (i = 0; i < arg_count; i++)
 			{
 				DOREADRC(setup_fd, &arg_msg, SIZEOF(arg_msg), rc);
@@ -177,8 +188,7 @@ STATICFNDEF void ojchildparms(job_params_type *jparms, gcall_args *g_args, mval
 					g_args->argval[i] = op_nullexp();	/* negative len indicates null arg */
 				else
 				{
-					if (!IS_STP_SPACE_AVAILABLE_PRO(STRLEN(sp)))
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) (ERR_STRINGOFLOW));
+					assertpro(arg_msg.len <= MAX_JOB_LEN);
 					arglst[i].str.len = arg_msg.len;
 					arglst[i].str.addr = (char *)stringpool.free;
 					memcpy(stringpool.free, arg_msg.data, arg_msg.len);
@@ -224,12 +234,12 @@ STATICFNDEF void ojchildparms(job_params_type *jparms, gcall_args *g_args, mval
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JOBSETUP, 2,
 					      LEN_AND_LIT("receive buffer size"), errno, 0);
 			if (buffer_size > MAX_STRLEN)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_JOBLVN2LONG, 2, MAX_STRLEN, buffer_size);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_JOBLVNDETAIL, 2, MAX_STRLEN, buffer_size);
 			assert(buffer_size > 0);
 			DOREADRC(setup_fd, local_buff, buffer_size, rc);
 			if (rc < 0)
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JOBSETUP, 2,
-					      LEN_AND_LIT("local fragment"), errno, 0);;
+					      LEN_AND_LIT("local fragment"), errno, 0);
 			assert((NULL != command_str[comm_arg_count]->str.addr) && (0 != buffer_size));
 			command_str[comm_arg_count]->str.len = buffer_size;
 			s2pool(&command_str[comm_arg_count]->str);
diff --git a/sr_unix/ojstartchild.c b/sr_unix/ojstartchild.c
index 7f8a967..75f11a2 100644
--- a/sr_unix/ojstartchild.c
+++ b/sr_unix/ojstartchild.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -64,6 +65,7 @@ GBLREF	zshow_out		*zwr_output;
 GBLREF	uint4			pat_everything[];
 GBLREF	mstr_len_t		sizeof_pat_everything;
 GBLREF	io_pair			io_curr_device;
+GBLREF	boolean_t		exit_handler_active;
 
 static  joberr_t		joberr = joberr_gen;
 static	int			pipe_fd;
@@ -92,7 +94,7 @@ LITREF gtmImageName	gtmImageNames[];
 #pragma pointer_size (restore)
 #endif
 
-#define MAX_JOB_LEN		8192	/* Arbitrary length maximum used for checking job arguments and parameters */
+#define MAX_MUMPS_EXE_PATH_LEN	8192
 #define MAX_PATH		 128	/* Maximum file path length */
 #define MAX_LAB_LEN		  32	/* Maximum Label string length */
 #define MAX_RTN_LEN		  32	/* Maximum Routine string length */
@@ -128,13 +130,14 @@ LITREF gtmImageName	gtmImageNames[];
 	}							\
 }
 
-#define SETUP_OP_FAIL()									\
-{											\
-	kill(child_pid, SIGTERM);							\
-	joberr = joberr_io_setup_op_write;						\
-	job_errno = errno;								\
-	DOWRITERC(pipe_fd, &job_errno, SIZEOF(job_errno), pipe_status);			\
-	_exit(joberr);									\
+#define SETUP_OP_FAIL()											\
+{													\
+	kill(child_pid, SIGTERM);									\
+	joberr = joberr_io_setup_op_write;								\
+	job_errno = errno;										\
+	DOWRITERC(pipe_fd, &job_errno, SIZEOF(job_errno), pipe_status);					\
+	ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */	\
+	_exit(joberr);											\
 }
 
 #define SETUP_DATA_FAIL()								\
@@ -143,6 +146,7 @@ LITREF gtmImageName	gtmImageNames[];
 	joberr = joberr_io_setup_write;							\
 	job_errno = errno;								\
 	DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);		\
+	ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */	\
 	_exit(joberr);									\
 }
 
@@ -183,8 +187,8 @@ static CONDITION_HANDLER(middle_child)
 	 * Do assert after write to prevent parent hang.
 	 */
 	assert(joberr == joberr_rtn);
-	ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(FALSE, NULL);)	/* decrement refcnts for relinkctl shm */
 	DOWRITERC(pipe_fd, &job_errno, SIZEOF(job_errno), pipe_status);
+	ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(FALSE, NULL);)	/* decrement refcnts for relinkctl shm */
 	_exit(joberr);
 }
 
@@ -270,6 +274,7 @@ void ojmidchild_send_var(void)
 	{
 		rc = ERR_JOBLVN2LONG;
 		DOWRITERC(pipe_fd, &rc, SIZEOF(rc), pipe_status);
+		ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */
 		/* No need to SIGTERM the child because child will issue a proper error message and quit */
 		_exit(joberr_io_setup_op_write);
 	}
@@ -313,9 +318,7 @@ STATICFNDEF void local_variable_marshalling(void)
 	return;
 }
 
-
-/*
- * --------------------------------------------------------------------------------------------------------------------------------
+/* --------------------------------------------------------------------------------------------------------------------------------
  * The current process (P) FORKs a middle child process (M) that tests various job parameters. It then forks off the actual Job (J)
  * and exits, culminating the parent's (P) wait. The Job process (J) sets up its env and execs mumps.
  *
@@ -334,12 +337,11 @@ STATICFNDEF void local_variable_marshalling(void)
  *	Return zero indicates success.
  * --------------------------------------------------------------------------------------------------------------------------------
  */
-
 int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_return, int pipe_fds[])
 {
 	boolean_t		need_rtnobj_shm_free;
 	char			cbuff[TEMP_BUFF_SIZE], pbuff[TEMP_BUFF_SIZE], cmdbuff[TEMP_BUFF_SIZE];
-	char			tbuff[MAX_JOB_LEN], tbuff2[MAX_JOB_LEN], fname_buf[MAX_STDIOE_LEN];
+	char			tbuff[MAX_MUMPS_EXE_PATH_LEN], tbuff2[MAX_MUMPS_EXE_PATH_LEN], fname_buf[MAX_STDIOE_LEN];
 	char			*pgbldir_str;
 	char			*transfer_addr;
 	int4			index, environ_count, string_len, temp;
@@ -387,11 +389,11 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		 * Test out various parameters and setup everything possible for the actual Job (J), so it(J) can start off without
 		 * much hitch. If any error occurs during this, exit with appropriate status so the waiting parent can diagnose.
 		 */
-
 		getjobnum();	/* set "process_id" to a value different from parent. This is particularly needed for the
 				 * RELINKCTL_RUNDOWN_MIDDLE_PARENT macro since it does rtnobj_shm_free which deals with latches
 				 * that in turn rely on the "process_id" global variable reflecting the current pid.
 				 */
+		exit_handler_active = TRUE; /* The grandchild and the middle child should never execute gtm_exit_handler() */
 		/* set to TRUE so any child process associated with a pipe device will know it is not the parent in iorm_close() */
 		gtm_pipe_child = TRUE;
 		joberr = joberr_gen;
@@ -481,7 +483,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		joberr = joberr_rtn;
 		/* We are the middle child. It is possible the below call to job_addr loads an object into shared memory
 		 * using "rtnobj_shm_malloc". In that case, as part of halting we need to do a "rtnobj_shm_free" to keep
-		 * the rtnobj reference counts in shared memory intact. The variable "need_rtnobj_shm_free" servers this purpose.
+		 * the rtnobj reference counts in shared memory intact. The variable "need_rtnobj_shm_free" serves this purpose.
 		 * Note that we cannot safely call relinkctl_rundown since we do not want to decrement reference counts for
 		 * routines that have already been loaded by our parent process (which we inherited due to the fork) since
 		 * the parent process is the one that will do the decrement later. We should decrement the count only for
@@ -494,7 +496,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 			&need_rtnobj_shm_free))
 		{
 			DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);
-			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 			_exit(joberr);
 		}
 
@@ -503,7 +505,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		{
 			job_errno = errno;
 			DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);
-			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 			_exit(joberr);
 		}
 
@@ -512,7 +514,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		{
 			job_errno = errno;
 			DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);
-			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 			_exit(joberr);
 		}
 
@@ -548,6 +550,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 					if (pipe_status)
 						kill(child_pid, SIGTERM);
 					DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);
+					ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */
 					_exit(joberr);
 				}
 			}
@@ -560,6 +563,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 				joberr = joberr_pipe_mgc;
 				job_errno = errno;
 				DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);
+				ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */
 				_exit(joberr);
 			}
 			/* send job parameters and arguments to final mumps process over setup socket */
@@ -612,8 +616,15 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 				SETUP_DATA_FAIL();
 			for (jp = jparms->parms;  jp ; jp = jp->next)
 			{
-				if (jp->parm->str.len > MAX_JOB_LEN - 2)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBPARTOOLONG);
+				if (jp->parm->str.len > MAX_JOB_LEN)
+				{
+					kill(child_pid, SIGTERM);
+					joberr = joberr_io_setup_write;
+					job_errno = ERR_JOBPARTOOLONG;
+					DOWRITERC(pipe_fds[1], &job_errno, SIZEOF(job_errno), pipe_status);
+					ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */
+					_exit(joberr);
+				}
 				if (0 == jp->parm->mvtype)
 					arg_msg.len = -1;	/* negative len indicates null arg */
 				else
@@ -649,20 +660,17 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 			/* Send the local variables */
 			if (jparms->passcurlvn)
 				local_variable_marshalling();
-			/* tell job to proceed */
+			/* Tell job to proceed */
 			setup_op = local_trans_done;
 			SEND(setup_fds[0], &setup_op, SIZEOF(setup_op), 0, rc);
 			if (rc < 0)
 				SETUP_OP_FAIL();
-			/* tell job to proceed but before that detach from relinkctl/rtnobj shared memory in case the grandchild
-			 * needs to remove those (due to linkctl->hdr->nattached being 0).
-			 */
-			ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */
-			/* write child_pid into pipe to be read by parent process(P) for $ZJOB */
+			/* Write child_pid into pipe to be read by parent process(P) for $ZJOB */
 			/* Ignore the status if this fails, as the child is already running, and there is likely not a parent
 			 * to report to.
 			 */
 			DOWRITERC(pipe_fds[1], &child_pid, SIZEOF(child_pid), pipe_status);
+			ARLINK_ONLY(relinkctl_rundown(FALSE, FALSE));	/* do not decrement counters, just shmdt */
 			_exit(EXIT_SUCCESS);
 		}
 		/* This is now the grandchild process (actual Job process) -- an orphan as soon as the exit(EXIT_SUCCESS) above
@@ -676,13 +684,21 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		sigaction(SIGTERM, &old_act, 0);		/* restore the SIGTERM handler */
 		CLOSEFILE_RESET(mproc_fds[1], pipe_status);	/* resets "mproc_fds[0]" to FD_INVALID */
 		CLOSEFILE_RESET(setup_fds[0], pipe_status);	/* resets "setup_fds[0]" to FD_INVALID */
+		/* Since middle child and grand child go off independently, it is possible the grandchild executes
+		 * "relinkctl_rundown(TRUE,...)" a little before the middle child has done "relinkctl_rundown(FALSE,...)"
+		 * and this means the grand child could potentially find the GT.M nattached counter to be 0 but the shmctl
+		 * nattach counter could still be non-zero (because the middle child has not yet detached from relinkctl shm).
+		 * To avoid a related assert in "relinkctl_rundown" from failing, set dbg-only variable.
+		 */
+		DEBUG_ONLY(TREF(fork_without_child_wait) = TRUE);
 		DOREADRC(mproc_fds[0], &decision, SIZEOF(decision), pipe_status);
 		if (pipe_status)	 /* We failed to read the communication from middle process */
 		{
-			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 	                rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JOBFAIL, 0, ERR_TEXT, 2,
 						LEN_AND_LIT("Error reading from pipe"), errno);
-		} else {
+		} else
+		{
 			if (JOB_EXIT == decision)
 				exit(EXIT_SUCCESS);
 			assert(JOB_CONTINUE == decision);
@@ -739,9 +755,9 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 #endif
 
 		string_len = STRLEN("%s=%d") + STRLEN(CHILD_FLAG_ENV) + MAX_NUM_LEN - 4;
-		if (string_len > MAX_JOB_LEN)
+		if (string_len > MAX_MUMPS_EXE_PATH_LEN)
 		{
-			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBPARTOOLONG);
 		}
 		c1 = (char *)malloc(string_len + 1);
@@ -760,13 +776,16 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		if (jparms->gbldir.len != 0)
 		{
 			if (jparms->gbldir.len > TEMP_BUFF_SIZE)
+			{
+				ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBPARTOOLONG);
+			}
 			strncpy(pbuff, jparms->gbldir.addr, jparms->gbldir.len);
 			*(pbuff + jparms->gbldir.len) = '\0';
 			string_len = STRLEN("%s=%s") + STRLEN(GBLDIR_ENV) + STRLEN(pbuff) - 4;
 			if (string_len > TEMP_BUFF_SIZE)
 			{
-				ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+				ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBPARTOOLONG);
 			}
 			c1 = (char *)malloc(string_len + 1);
@@ -830,7 +849,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 			strcpy(c2, MUMPS_EXE_STR);
 		} else
 		{
-			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+			ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_LOGTOOLONG, 3, string_len, c1,
 				SIZEOF(tbuff) - SIZEOF(MUMPS_EXE_STR));
 		}
@@ -846,7 +865,10 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		if (jparms->cmdline.len != 0)
 		{
 			if (jparms->cmdline.len > TEMP_BUFF_SIZE)
+			{
+				ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JOBPARTOOLONG);
+			}
 			memcpy(cmdbuff, jparms->cmdline.addr, jparms->cmdline.len);
 			*(cmdbuff + jparms->cmdline.len) = 0;
 		} else
@@ -855,7 +877,7 @@ int ojstartchild (job_params_type *jparms, int argcnt, boolean_t *non_exit_retur
 		 * copied over, we can get rid of our relinkctl files. Note that the below macro decrements
 		 * linkctl->hdr->nattached in the grandchild on behalf of the middle child (who did the increment).
 		 */
-		ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr);)
+		ARLINK_ONLY(RELINKCTL_RUNDOWN_MIDDLE_PARENT(need_rtnobj_shm_free, rtnhdr));
 		/* Do common cleanup in child. Note that the below call to "ojchildioclean" invokes "relinkctl_rundown"
 		 * but that is not needed since we have already done it in the RELINKCTL_RUNDOWN_MIDDLE_PARENT invocation.
 		 */
diff --git a/sr_unix/op_currhd.c b/sr_unix/op_currhd.c
new file mode 100644
index 0000000..31273d8
--- /dev/null
+++ b/sr_unix/op_currhd.c
@@ -0,0 +1,35 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+#include "mdef.h"
+
+#include "op.h"
+#include <rtnhdr.h>
+#include "stack_frame.h"
+#include "linktrc.h"
+
+GBLREF stack_frame	*frame_pointer;
+
+#ifdef AUTORELINK_SUPPORTED
+/* Routine to pick up the current routine header and stash it in lnk_proxy so the next indirect
+ * call picks it up. We return 0 as the index into lnk_proxy to find the routine header.
+ */
+int op_currhd(void)
+{
+	DCL_THREADGBL_ACCESS;
+
+	SETUP_THREADGBL_ACCESS;
+	TADR(lnk_proxy)->rtnhdr_adr = frame_pointer->rvector;
+	DBGINDCOMP((stderr, "op_currhd: Routine reference resolved to 0x"lvaddr"\n", TADR(lnk_proxy)->rtnhdr_adr));
+	return 0;
+}
+#endif
diff --git a/sr_unix/op_fnzsearch.c b/sr_unix/op_fnzsearch.c
index a268e2b..31f5045 100644
--- a/sr_unix/op_fnzsearch.c
+++ b/sr_unix/op_fnzsearch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -12,428 +13,212 @@
 #include "mdef.h"
 
 #include "gtm_string.h"
-#include "gtm_dirent.h"
+#include "gtm_stat.h"
+#include "gtm_facility.h"
+#include "gtm_stdlib.h"
+#include "gtm_limits.h"
+#include "gtm_unistd.h"
 
 #include <errno.h>
-#include "gtm_stat.h"
+#include <glob.h>
+#include <libgen.h>
 
-#include "io.h"
-#include "iosp.h"
+#include "error.h"
 #include "parse_file.h"
-#include "patcode.h"
-#include "compiler.h"
+#include "eintr_wrappers.h"
 #include "lv_val.h"
 #include "stringpool.h"
-#include "stp_parms.h"
-#include "error.h"
-#include "eintr_wrappers.h"
 #include "op.h"
-#include "zroutines.h"
 #include "mvalconv.h"
-#include "gtmctype.h"
 #include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
 #include "gdsbt.h"
-#include "gdsfhead.h"
-#include "alias.h"
 #include "op_fnzsearch.h"
 
-GBLREF	symval		*curr_symval;
-GBLREF	boolean_t	gtm_utf8_mode;
-GBLREF	spdesc		stringpool;
-
-LITREF mval	literal_null;
+LITREF		mval	literal_null;
 
-STATICFNDCL	CONDITION_HANDLER(fnzsrch_ch);
-STATICFNDCL	CONDITION_HANDLER(dir_ch);
-STATICFNDCL int	pop_top(lv_val *src, mval *res);
-STATICFNDCL void dir_srch(parse_blk *pfil);
+STATICFNDCL	int	pop_top(lv_val *src, mval *res);
 
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
 error_def(ERR_INVSTRLEN);
 error_def(ERR_MEMORY);
-error_def(ERR_STACKOFLOW);
 error_def(ERR_ZSRCHSTRMCT);
 
-int op_fnzsearch(mval *file, mint indx, mint mfunc, mval *ret)
+/* This routine is invoked on $ZSEARCH() and ZRUPDATE commands as well as when compiling a source file (via compile_source_file()).
+ * The main purpose of the routine is to return the full path to a file that corresponds to the specified pattern. The pattern may
+ * be absolute (starting with '/') or relative and may include wildcard characters ('*' and '?' for multi- and single-character
+ * replacements) and environment variables.
+ *
+ * To traverse all files matching the specified pattern, in collating sequence, the function may be invoked consecutively with the
+ * same argument. Once the list of matching files is exhaused (or if the query did not yield any results), an empty string is
+ * returned. The implementation relies on a local M variable, referenced by the fnzsearch_lv_vars global, to store the results of
+ * the first invocation with a new pattern; subsequent invocations use the pop_top() function to $ORDER() to, and KILL, the first
+ * found entry.
+ *
+ * The function supports 256 individual search "streams," allowing to maintain results of various searches independently. Each
+ * stream is identified by an integer in the range of [0; 255]. Negative numbers have been adopted for internal callers to avoid
+ * interference with user-initiated searches.
+ *
+ * Parameters:
+ *   pattern   - search pattern, such as 'a.*', '/etc/lib*.?', or 'file-1'.
+ *   indx      - search stream number, between 0 and 255, inclusive.
+ *   mfunc     - indication of whether the caller is M code or an internal function, 0 being the latter.
+ *   ret       - full path to the first matching file in collating sequence.
+ *
+ * Returns: an integer encoded in plength format that contains in each of its bytes the length of one of the matching entry's
+ *          characteristics: length of the directory path, length of the (file) name, and length of the extension. For more details,
+ *          refer to parse_file.h.
+ */
+int op_fnzsearch(mval *pattern, mint indx, mint mfunc, mval *ret)
 {
-	struct stat	statbuf;
-	int		stat_res;
+	plength		pret;
+	char		pblk_buf[GTM_PATH_MAX], sanitized_buf[GTM_PATH_MAX];
+	char		*match, *buf_ptr;
+	int		i, status, length;
+	mval		file;
 	parse_blk	pblk;
-	plength		*plen, pret;
-	char		buf1[MAX_FBUFF + 1]; /* buffer to hold translated name */
-	mval		sub;
-	mstr		tn;
-	lv_val		*ind_tmp;
+	lv_val		*var_ref;
+	plength		*match_len;
+	glob_t		globbuf;
+	boolean_t	absolute;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
-	if (mfunc && ((MAX_STRM_CT <= indx) || ( 0 > indx)))	/* Allow out-of-range stream if internal call */
+	if (mfunc && ((MAX_STRM_CT <= indx) || (0 > indx)))	/* Allow an out-of-range stream only if used internally. */
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZSRCHSTRMCT);
 	ESTABLISH_RET(fnzsrch_ch, -1);
 	TREF(fnzsearch_nullsubs_sav) = TREF(lv_null_subs);
-	TREF(lv_null_subs) = LVNULLSUBS_OK;	/* $ZSearch processing depends on this */
-	MV_FORCE_STR(file);
-	if (file->str.len > MAX_FBUFF)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_INVSTRLEN, 2, file->str.len, MAX_FBUFF);
+	TREF(lv_null_subs) = LVNULLSUBS_OK;			/* $ZSearch processing depends on this. */
+	MV_FORCE_STR(pattern);
+	if (MAX_FBUFF < pattern->str.len)
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_INVSTRLEN, 2, pattern->str.len, MAX_FBUFF);
 	MV_FORCE_MVAL(((mval *)TADR(fnzsearch_sub_mval)), indx);
 	TREF(fnzsearch_lv_vars) = op_srchindx(VARLSTCNT(2) TREF(zsearch_var), (mval *)TADR(fnzsearch_sub_mval));
 	if (TREF(fnzsearch_lv_vars))
-	{
+	{	/* If the parameter is different, kill the local with previous results. */
 		assert((TREF(fnzsearch_lv_vars))->v.mvtype & MV_STR);
-		if ((file->str.len != (TREF(fnzsearch_lv_vars))->v.str.len)
-			|| memcmp(file->str.addr, (TREF(fnzsearch_lv_vars))->v.str.addr, file->str.len))
+		if ((pattern->str.len != (TREF(fnzsearch_lv_vars))->v.str.len)
+			|| memcmp(pattern->str.addr, (TREF(fnzsearch_lv_vars))->v.str.addr, pattern->str.len))
 		{
 			op_kill(TREF(fnzsearch_lv_vars));
 			TREF(fnzsearch_lv_vars) = NULL;
 		}
 	}
-	if (TREF(fnzsearch_lv_vars))
-	{
-		for (;;)
-		{
-			pret.p.pint = pop_top(TREF(fnzsearch_lv_vars), ret);	/* get next element off the top */
-			if (!ret->str.len)
-				break;
-			memcpy(buf1, ret->str.addr, ret->str.len);
-			buf1[ret->str.len] = 0;
-			STAT_FILE(buf1, &statbuf, stat_res);
-			if (-1 == stat_res)
-			{
-				if (errno == ENOENT)
-					continue;
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) errno);
-			}
-			break;
-		}
-	} else
+	ret->mvtype = MV_STR;
+	if ((0 != pattern->str.len) && !TREF(fnzsearch_lv_vars))
 	{
 		memset(&pblk, 0, SIZEOF(pblk));
-		pblk.buffer = buf1;
+		pblk.buffer = pblk_buf;
 		pblk.buff_size = MAX_FBUFF;
-		if (!(parse_file(&file->str, &pblk) & 1))
-		{
-			ret->mvtype = MV_STR;
-			ret->str.len = 0;
-		} else
-		{
-			assert(!TREF(fnzsearch_lv_vars));
-			buf1[pblk.b_esl] = 0;
-			/* establish new search context */
+		if (parse_file(&pattern->str, &pblk) & 1)
+		{	/* Establish new search context. */
 			TREF(fnzsearch_lv_vars) = op_putindx(VARLSTCNT(2) TREF(zsearch_var), TADR(fnzsearch_sub_mval));
-			(TREF(fnzsearch_lv_vars))->v = *file;	/* zsearch_var(indx)=original spec */
-			if (!(pblk.fnb & F_WILD))
-			{
-				sub.mvtype = MV_STR;
-				sub.str.len = pblk.b_esl;
-				sub.str.addr =  buf1;
-				s2pool(&sub.str);
-				ind_tmp = op_putindx(VARLSTCNT(2) TREF(fnzsearch_lv_vars), &sub);
-				ind_tmp->v.mvtype = MV_STR; ind_tmp->v.str.len = 0;
-				plen = (plength *)&ind_tmp->v.m[1];
-				plen->p.pblk.b_esl = pblk.b_esl;
-				plen->p.pblk.b_dir = pblk.b_dir;
-				plen->p.pblk.b_name = pblk.b_name;
-				plen->p.pblk.b_ext = pblk.b_ext;
-			} else
-				dir_srch(&pblk);
-			for (;;)
-			{
-				pret.p.pint = pop_top(TREF(fnzsearch_lv_vars), ret);	/* get next element off the top */
-				if (!ret->str.len)
-					break;
-				memcpy(buf1, ret->str.addr, ret->str.len);
-				buf1[ret->str.len] = 0;
-				STAT_FILE(buf1, &statbuf, stat_res);
-				if (-1 == stat_res)
+			(TREF(fnzsearch_lv_vars))->v = *pattern;	/* zsearch_var(indx)=original spec */
+			if (0 != pblk.b_esl)
+			{	/* Create a NULL-terminated buffer with the pattern to be passed to glob(). If we are dealing with a
+				 * relative-path pattern, prepend it with the absolute path of the working directory first.
+				 */
+				if ('/' != pblk_buf[0])
 				{
-					if (errno == ENOENT)
-						continue;
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) errno);
-				}
-				break;
-			}
-		}
-	}
-	assert((0 == ret->str.len) || (pret.p.pblk.b_esl == ret->str.len));
-	TREF(lv_null_subs) = TREF(fnzsearch_nullsubs_sav);
-	REVERT;
-	return pret.p.pint;
-}
-
-STATICFNDEF void dir_srch(parse_blk *pfil)
-{
-	struct stat	statbuf;
-	int		stat_res;
-	lv_val		*dir1, *dir2, *tmp;
-	mstr		tn;
-	short		p2_len;
-	char		filb[MAX_FBUFF + 1], patb[SIZEOF(ptstr)], *c, *lastd, *top, *p2, *c1, ch;
-	mval		pat_mval, sub, compare;
-	boolean_t	wildname, seen_wd;
-	struct dirent 	*dent;
-	DIR		*dp;
-	plength		*plen;
-	int		closedir_res;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	op_kill(TREF(zsearch_dir1));
-	op_kill(TREF(zsearch_dir2));
-	if (!pfil->b_name)
-		return;		/* nothing to search for */
-	ESTABLISH(dir_ch);
-	pat_mval.mvtype = MV_STR;
-	pat_mval.str.addr = patb;	/* patb should be SIZEOF(ptstr.buff) but instead is SIZEOF(ptstr) since the C compiler
-					 * complains about the former and the latter is just 4 bytes more */
-	pat_mval.str.len = 0;
-	sub.mvtype = MV_STR;
-	sub.str.len = 0;
-	compare.mvtype = MV_STR;
-	compare.str.len = 0;
-	wildname = (pfil->fnb & F_WILD_NAME) != 0;
-	dir1 = TREF(zsearch_dir1);
-	dir2 = TREF(zsearch_dir2);
-	if (pfil->fnb & F_WILD_DIR)
-	{
-		seen_wd = FALSE;
-		for (c = pfil->l_dir, lastd = c, top = c + pfil->b_dir; c < top;)
-		{
-			ch = *c++;
-			if (ch == '/')	/* note the start of each directory segment */
-			{
-				if (seen_wd)
-					break;
-				lastd = c;
-			}
-			if (ch == '?' || ch == '*')
-				seen_wd = TRUE;
-		}
-		assert(c <= top);
-		sub.str.addr = pfil->l_dir;
-		sub.str.len = INTCAST(lastd - sub.str.addr);
-		tmp = op_putindx(VARLSTCNT(2) dir1, &sub);
-		tmp->v.mvtype = MV_STR; tmp->v.str.len = 0;
-		for (;;)
-		{
-			tn.addr = lastd;	/* wildcard segment */
-			tn.len = INTCAST(c - lastd - 1);
-			lastd = c;
-			genpat(&tn, &pat_mval);
-			seen_wd = FALSE;
-			p2 = c - 1;
-			for (; c < top;)
-			{
-				ch = *c++;
-				if (ch == '/')	/* note the start of each directory segment */
-				{
-					if (seen_wd)
-						break;
-					lastd = c;
-				}
-				if (ch == '?' || ch == '*')
-					seen_wd = TRUE;
-			}
-			p2_len = lastd - p2;	/* length of non-wild segment after wild section */
-			for (;;)
-			{
-				pop_top(dir1, &sub);	/* get next item off the top */
-				if (!sub.str.len)
-					break;
-				memcpy(filb, sub.str.addr, sub.str.len);
-				filb[sub.str.len] = 0;
-				sub.str.addr = filb;
-				dp = OPENDIR(filb);
-				if (!dp)
-					continue;
-				while (READDIR(dp, dent))
+					if (NULL == getcwd(sanitized_buf, ARRAYSIZE(sanitized_buf)))
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) errno);
+					else
+					{
+						length = STRLEN(sanitized_buf);
+						if (MAX_FBUFF < length + 1 + pblk.b_esl)
+							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_INVSTRLEN,
+									2, length + 1 + pblk.b_esl, MAX_FBUFF);
+						sanitized_buf[length] = '/';
+					}
+					buf_ptr = sanitized_buf + length + 1;
+				} else
+					buf_ptr = sanitized_buf;
+				/* Escape '[' and ']' for glob() processing (because $zsearch() does not support such sets). Make
+				 * sure that we have enough storage room (the string includes the length of our working directory,
+				 * if prepended, the escaped pattern, which could be twice as long as the original, and a trailing
+				 * '\0' character).
+				 */
+				assert(ARRAYSIZE(sanitized_buf) >= (buf_ptr - sanitized_buf) + 2 * pblk.b_esl + 1);
+				pblk_buf[pblk.b_esl] = '\0';
+				ESCAPE_BRACKETS(pblk_buf, buf_ptr);
+				/* Canonicalize the path by appropriately removing '.' and '..' path modifiers. */
+				CANONICALIZE_PATH(buf_ptr);
+				/* Do not sort the matches because we use $order() to obtain them from a local anyway. */
+				if (0 == (status = glob(sanitized_buf, LINUX_ONLY(GLOB_PERIOD | ) GLOB_NOSORT,
+						(int (*)(const char *, int))NULL, &globbuf)))
 				{
-					compare.str.addr = &dent->d_name[0];
-					compare.str.len = STRLEN(&dent->d_name[0]);
-					UNICODE_ONLY(
-						if (gtm_utf8_mode)
-							compare.mvtype &= ~MV_UTF_LEN;	/* to force "char_len" to be recomputed
-											 * in do_pattern */
-					)
-					assert(compare.str.len);
-					if (('.' == dent->d_name[0])
-					    && ((1 == compare.str.len) || ((2 == compare.str.len) && ('.' == dent->d_name[1]))))
-						continue;	/* don't want to read . and .. */
-					if (compare.str.len + sub.str.len + p2_len > MAX_FBUFF)
-						continue;
-					if (do_pattern(&compare, &pat_mval))
-					{	/* got a hit */
-						ENSURE_STP_FREE_SPACE(compare.str.len + sub.str.len + p2_len + 1);
-						/* concatenate directory and name */
-						c1 = (char *)stringpool.free;
-						tn = sub.str;
-						s2pool(&tn);
-						tn = compare.str;
-						s2pool(&tn);
-						tn.addr = p2;
-						tn.len = p2_len;
-						s2pool(&tn);
-						*stringpool.free++ = 0;
-						compare.str.addr = c1;
-						compare.str.len += sub.str.len + p2_len;
-						STAT_FILE(compare.str.addr, &statbuf, stat_res);
-						if (-1 == stat_res)
+					TREF(fnzsearch_globbuf_ptr) = &globbuf;
+					file.mvtype = MV_STR;
+					for (i = 0; i < globbuf.gl_pathc; i++)
+					{	/* We do not care for . and .. */
+						match = globbuf.gl_pathv[i];
+						length = STRLEN(match);
+						if ((length > 1) && ('.' == match[length - 1]) && (('/' == match[length - 2])
+								|| ((length > 2) && ('.' == match[length - 2])
+								&& ('/' == match[length - 3]))))
 							continue;
-						if (!(statbuf.st_mode & S_IFDIR))
+						/* If the resolved length is too long to be used in a local, skip it. */
+						if (MAX_FBUFF < length)
 							continue;
-						/* put in results tree */
-						tmp = op_putindx(VARLSTCNT(2) dir2, &compare);
-						tmp->v.mvtype = MV_STR;
-						tmp->v.str.len = 0;
+						ENSURE_STP_FREE_SPACE(length);
+						file.str.addr = match;
+						file.str.len = length;
+						s2pool(&file.str);
+						var_ref = op_putindx(VARLSTCNT(2) TREF(fnzsearch_lv_vars), &file);
+						var_ref->v.mvtype = MV_STR;
+						var_ref->v.str.len = 0;
+						match_len = (plength *)&(var_ref->v.m[1]);
+						SET_LENGTHS(match_len, file.str.addr, length, TRUE);
 					}
+					globfree(&globbuf);
+					TREF(fnzsearch_globbuf_ptr) = NULL;
+				} else
+				{
+					globfree(&globbuf);
+					TREF(fnzsearch_globbuf_ptr) = NULL;
+					if (GLOB_NOSPACE == status)
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ENOMEM);	/* Ran out of memory. */
+					else if (GLOB_ABORTED == status)
+						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) EACCES);	/* Access error. */
+					else
+						assert(GLOB_NOMATCH == status);				/* No matches found. */
 				}
-				CLOSEDIR(dp, closedir_res);
 			}
-			tmp = dir1; dir1 = dir2; dir2 = tmp;
-			if (c >= top)
-				break;
 		}
-	} else
-	{
-		sub.str.addr = pfil->l_dir;
-		sub.str.len = pfil->b_dir;
-		tmp = op_putindx(VARLSTCNT(2) dir1, &sub);
-		tmp->v.mvtype = MV_STR; tmp->v.str.len = 0;
 	}
-	if (wildname)
+	/* If we have placed something into a local (now or in a prior invocation), obtain it. */
+	if (TREF(fnzsearch_lv_vars))
+		pret.p.pint = pop_top(TREF(fnzsearch_lv_vars), ret);
+	else
 	{
-		tn.addr = pfil->l_name;
-		tn.len = pfil->b_name + pfil->b_ext;
-		genpat(&tn, &pat_mval);
+		ret->str.len = 0;
+		pret.p.pint = 0;
 	}
-	for (;;)
-	{
-		pop_top(dir1, &sub);	/* get next item off the top */
-		if (!sub.str.len)
-			break;
-		if (wildname)
-		{
-			memcpy(filb, sub.str.addr, sub.str.len);
-			filb[sub.str.len] = 0;
-			sub.str.addr = filb;
-			dp = OPENDIR(filb);
-			if (!dp)
-				continue;
-			while (READDIR(dp, dent))
-			{
-				compare.str.addr = &dent->d_name[0];
-				compare.str.len = STRLEN(&dent->d_name[0]);
-				UNICODE_ONLY(
-					if (gtm_utf8_mode)
-						compare.mvtype &= ~MV_UTF_LEN;/* force "char_len" to be recomputed in do_pattern */
-				)
-				if (('.' == dent->d_name[0])
-				    && ((1 == compare.str.len) || ((2 == compare.str.len) && ('.' == dent->d_name[1]))))
-				{
-					continue;	/* don't want to read . and .. */
-				}
-				if (compare.str.len + sub.str.len > MAX_FBUFF)
-					continue;
-				if (do_pattern(&compare, &pat_mval))
-				{	/* got a hit */
-					ENSURE_STP_FREE_SPACE(compare.str.len + sub.str.len);
-					/* concatenate directory and name */
-					c = (char *)stringpool.free;
-					tn = sub.str;
-					s2pool(&tn);
-					tn = compare.str;
-					s2pool(&tn);
-					compare.str.addr = c;
-					compare.str.len += sub.str.len;
-					/* put in results tree */
-					tmp = op_putindx(VARLSTCNT(2) TREF(fnzsearch_lv_vars), &compare);
-					tmp->v.mvtype = MV_STR;
-					tmp->v.str.len = 0;
-					plen = (plength *)&tmp->v.m[1];
-					plen->p.pblk.b_esl = compare.str.len;
-					plen->p.pblk.b_dir = sub.str.len;
-					for (c = &compare.str.addr[sub.str.len], c1 = top = &compare.str.addr[compare.str.len];
-					     c < top;)
-					{
-						if (*c++ != '.')
-							break;
-					}
-					for (; c < top;)
-					{
-						if (*c++ == '.')
-							c1 = c - 1;
-					}
-					plen->p.pblk.b_ext = top - c1;
-					plen->p.pblk.b_name = plen->p.pblk.b_esl - plen->p.pblk.b_dir - plen->p.pblk.b_ext;
-				}
-			}
-			CLOSEDIR(dp, closedir_res);
-		} else
-		{
-			assert(pfil->fnb & F_WILD_DIR);
-			compare.str.addr = pfil->l_name;
-			compare.str.len = pfil->b_name + pfil->b_ext;
-			if (compare.str.len + sub.str.len > MAX_FBUFF)
-				continue;
-			memcpy(filb, sub.str.addr, sub.str.len);
-			filb[sub.str.len] = 0;
-			sub.str.addr = filb;
-			ENSURE_STP_FREE_SPACE(compare.str.len + sub.str.len);
-			/* concatenate directory and name */
-			c1 = (char *)stringpool.free;
-			tn = sub.str;
-			s2pool(&tn);
-			tn = compare.str;
-			s2pool(&tn);
-			compare.str.addr = c1;
-			compare.str.len += sub.str.len;
-			/* put in results tree */
-			tmp = op_putindx(VARLSTCNT(2) TREF(fnzsearch_lv_vars), &compare);
-			tmp->v.mvtype = MV_STR; tmp->v.str.len = 0;
-			plen = (plength *)&tmp->v.m[1];
-			plen->p.pblk.b_esl = compare.str.len;
-			plen->p.pblk.b_dir = sub.str.len;
-			plen->p.pblk.b_name = pfil->b_name;
-			plen->p.pblk.b_ext = pfil->b_ext;
-		}
-	}
-	op_kill(TREF(zsearch_dir1));
-	op_kill(TREF(zsearch_dir2));
+	assert((0 == ret->str.len) || (pret.p.pblk.b_esl == ret->str.len));
+	TREF(lv_null_subs) = TREF(fnzsearch_nullsubs_sav);
 	REVERT;
+	return pret.p.pint;
 }
 
+/* Condition handler for the op_fnzsearch() operation. It takes care of restoring the lv_null_subs value and freeing the glob()
+ * buffer, if necessary.
+ */
 STATICFNDEF CONDITION_HANDLER(fnzsrch_ch)
 {
-	int	dummy1, dummy2;
-
 	START_CH(TRUE);
-	TREF(lv_null_subs) = TREF(fnzsearch_nullsubs_sav);
-	NEXTCH;
-}
-
-STATICFNDEF CONDITION_HANDLER(dir_ch)
-{
-	int	dummy1, dummy2;
-
-	START_CH(TRUE);
-	if (DUMP)
+	if (NULL != TREF(fnzsearch_globbuf_ptr))
 	{
-		NEXTCH;
+		globfree(TREF(fnzsearch_globbuf_ptr));
+		TREF(fnzsearch_globbuf_ptr) = NULL;
 	}
-	op_kill(TREF(zsearch_dir1));
-	op_kill(TREF(zsearch_dir2));
-	op_kill(TREF(fnzsearch_lv_vars));
-	TREF(fnzsearch_lv_vars) = op_putindx(VARLSTCNT(2) TREF(zsearch_var), TADR(fnzsearch_sub_mval));
-	(TREF(fnzsearch_lv_vars))->v.mvtype = MV_STR;
-	(TREF(fnzsearch_lv_vars))->v.str.len = 0;
-	UNWIND(dummy1, dummy2);
+	TREF(lv_null_subs) = TREF(fnzsearch_nullsubs_sav);
+	NEXTCH;
 }
 
-void	zsrch_clr(int indx)
+/* This routine clears the cached search results on a particular "stream."
+ *
+ * Parameters:
+ *   indx - search stream number, between 0 and 255, inclusive.
+ */
+void zsrch_clr(int indx)
 {
 	lv_val	*tmp;
 	mval	x;
@@ -441,34 +226,54 @@ void	zsrch_clr(int indx)
 
 	SETUP_THREADGBL_ACCESS;
 	MV_FORCE_MVAL(&x, indx);
-	op_kill(TREF(zsearch_dir1));
-	op_kill(TREF(zsearch_dir2));
 	tmp = op_srchindx(VARLSTCNT(2) TREF(zsearch_var), &x);
 	op_kill(tmp);
 }
 
-/* pop_top() - routine scans the specified local variable (in this case, special locals used by $ZSEARCH), taking the top
- * subscript out of the array, and putting it in the result mval.  Subscripts longer than the parse_file() maximum are ignored.
+/* This routine returns the value stored at the first subscript (in collating sequence) of the passed M local. It also sets one of
+ * the passed arguments to the string containing the subscript. Its main use is to aid op_fnzsearch() in traversing through the list
+ * of previously cached search results for a particular pattern. The function also verifies that the file it returns still exists.
+ * If not, it skips it.
+ *
+ * Parameters:
+ *   src - pointer to the local that is to be $ORDER()ed.
+ *   res - pointer to an mval where the first valid subscript is to be placed.
+ *
+ * Returns: the value stored at the first subscript in collating sequence. It is an integer encoded in plength format that contains
+ *          in each of its bytes the length of one of the matching entry's characteristics: length of the directory path, length of
+ *          the (file) name, and length of the extension. For more details, refer to parse_file.h.
  */
 STATICFNDEF int pop_top(lv_val *src, mval *res)
 {
-	lv_val	*tmp;
-	plength	pret;
+	lv_val		*tmp;
+	plength		pret;
+	struct stat	statbuf;
+	int		stat_res;
+	char		file_name[MAX_FBUFF + 1];
 
-	for (;;)
-	{	/* get next element off the top */
+	while (TRUE)
+	{
 		op_fnorder(src, (mval *)&literal_null, res);
-		if (!res->str.len)
+		if (res->str.len)
+		{
+			tmp = op_getindx(VARLSTCNT(2) src, res);
+			assert(MAX_FBUFF >= res->str.len);
+			pret.p.pint = tmp->v.m[1];
+			op_kill(tmp);	/* Remove this element from the tree. */
+			memcpy(file_name, res->str.addr, res->str.len);
+			file_name[res->str.len] = '\0';
+			STAT_FILE(file_name, &statbuf, stat_res);
+			if (-1 == stat_res)
+			{
+				if (ENOENT != errno)
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) errno);
+				continue;
+			}
+		} else
 		{
 			pret.p.pint = 0;
 			op_kill(src);
-			break;
 		}
-		tmp = op_getindx(VARLSTCNT(2) src, res);
-		pret.p.pint = tmp->v.m[1];
-		op_kill(tmp);	/* remove this element from tree */
-		if (res->str.len > MAX_FBUFF)
-			continue;
 		break;
 	}
 	return pret.p.pint;
diff --git a/sr_unix/op_horolog.c b/sr_unix/op_horolog.c
index 2206497..09058b4 100644
--- a/sr_unix/op_horolog.c
+++ b/sr_unix/op_horolog.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -18,23 +19,27 @@
 
 GBLREF spdesc	stringpool;
 
+/* If you update this function, consider updating op_zhorolog() as well */
 void op_horolog(mval *s)
 {
 	uint4		days;
 	time_t		seconds;
 	struct timeval	tv;
+	unsigned char	*strpool_free;
 
-	assert (stringpool.free <= stringpool.top);
-	assert (stringpool.free >= stringpool.base);
+	assert(stringpool.free <= stringpool.top);
+	assert(stringpool.free >= stringpool.base);
 	ENSURE_STP_FREE_SPACE(MAXNUMLEN + 1);
-	gettimeofday(&tv, NULL);
+	strpool_free = stringpool.free;
+	assertpro(-1 != gettimeofday(&tv, NULL));
 	seconds = tv.tv_sec;
 	dollarh(seconds, &days, &seconds);
-	s->str.addr = (char *) stringpool.free;
-	stringpool.free  = i2asc(stringpool.free, days);
-	*stringpool.free++ = ',';
-	stringpool.free = i2asc(stringpool.free, (uint4)seconds);
-	s->str.len = INTCAST((char *)stringpool.free - s->str.addr);
+	s->str.addr = (char *)strpool_free;
+	strpool_free = i2asc(strpool_free, days);
+	*strpool_free++ = ',';
+	strpool_free = i2asc(strpool_free, (uint4)seconds);
+	s->str.len = INTCAST((char *)strpool_free - s->str.addr);
 	s->mvtype = MV_STR;
+	stringpool.free = strpool_free;
 	return;
 }
diff --git a/sr_unix/op_lab_ext.c b/sr_unix/op_lab_ext.c
deleted file mode 100644
index 01bc85b..0000000
--- a/sr_unix/op_lab_ext.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rtnhdr.h>
-
-#ifdef AUTORELINK_SUPPORTED /* entire file */
-/* Routine to provide the content of the thread-local variable "lab_lnr" as a return value to
- * generated code.
- *
- * Parameters: none
- *
- * Return value:
- *   -  Address of line-number table entry corresponding to the entryref's label
- */
-void *op_lab_ext(void)
-{
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	return TREF(lab_lnr);
-}
-#endif /* AUTORELINK_SUPPORTED over entire file */
diff --git a/sr_unix/op_rhd_ext.c b/sr_unix/op_rhd_ext.c
deleted file mode 100644
index aa469aa..0000000
--- a/sr_unix/op_rhd_ext.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#ifdef AUTORELINK_SUPPORTED /* entire file */
-#include "gtm_string.h"
-
-#include <rtnhdr.h>
-#include "op.h"
-#include "relinkctl.h"
-#include "min_max.h"
-#include "zbreak.h"
-
-GBLREF z_records 	zbrk_recs;	/* ZBREAKs in effect */
-
-/* Rebuffering macro for routine and label name for use when needed. Note we don't even do the
- * MV_FORCE_STR() on the given mval until we know we are going to use it.
- */
-#define REBUFFER_MIDENT(MVAL, NEWMVAL, BUFFER)				\
-{									\
-	MV_FORCE_STR(MVAL);						\
-	*(NEWMVAL) = *(MVAL);						\
-	(NEWMVAL)->str.len = MIN(MAX_MIDENT_LEN, (NEWMVAL)->str.len);	\
-	memcpy((BUFFER), (NEWMVAL)->str.addr, (NEWMVAL)->str.len);	\
-	(NEWMVAL)->str.addr = (char *)&(BUFFER);			\
-}
-
-/* Routine called from both generated code and internally to check if a given routine/label need to be auto(re)linked and
- * do so if needbe.
- *
- * Parameters:
- *   - rtnname - address of mval pointing to text of routine name.
- *   - lblname - address of mval pointing to text of label name.
- *   - rhd     - address of routine header (if filled in in linkage table or NULL if not).
- *   - lnr     - address of linenumber table entry (offset) associated with text label or NULL if not yet linked.
- *
- * Return value:
- *   - routine header address of current routine.
- */
-rhdtyp *op_rhd_ext(mval *rtname, mval *lbname, rhdtyp *rhd, void *lnr)
-{
-	lnr_tabent      **lnrptr;
-	char		rtnname_buff[MAX_MIDENT_LEN], lblname_buff[MAX_MIDENT_LEN];
-	mval		rtnname, lblname;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	/* Future TODO:
-	 *   Remove the two additional opcodes and revert back to the single call opcode (op_call, op_extexfun, etc).
-	 *   This would have positive performance enhancements through less generated code and shorter call path if doable.
-	 */
-	if (NULL == rhd)
-	{	/* Routine is not yet linked - perform auto-ZLINK */
-		REBUFFER_MIDENT(rtname, &rtnname, rtnname_buff);
-		REBUFFER_MIDENT(lbname, &lblname, lblname_buff);
-		rhd = op_rhdaddr1(&rtnname);
-		op_labaddr(rhd, &lblname, 0); 	/* Offset != 0 would not go through op_rhd_ext */
-		TREF(lab_lnr) = &((TREF(lab_proxy)).lnr_adr);
-		/* lab_proxy now set by op_labaddr; ready for op_lab_ext next */
-		return rhd;
-	}
-	/* Routine is already linked, but we need to check if a new version is available. This involves traversing the
-	 * "validation linked list", looking for changes in different $ZROUTINES entries. But we also need to base our
-	 * checks on the most recent version of the routine loaded. Note autorelink is only possible when no ZBREAKs are
-	 * defined in the given routine.
-	 */
-	if (!rhd->has_ZBREAK)
-	{	/* Only look for autorelink when no ZBREAKs are defined in this routine */
-		rhd = rhd->current_rhead_adr;		/* Update rhd to most currently linked version */
-		if ((NULL != rhd->zhist) && need_relink(rhd, (zro_hist *)rhd->zhist))
-		{	/* Relink appears to be needed */
-			REBUFFER_MIDENT(rtname, &rtnname, rtnname_buff);
-			REBUFFER_MIDENT(lbname, &lblname, lblname_buff);
-			op_zlink(&rtnname, NULL);
-			rhd = rhd->current_rhead_adr;		/* Pickup routine header of new version to avoid lookup */
-			assert((NULL == rhd->zhist) || (((zro_hist *)(rhd->zhist))->zroutines_cycle == TREF(set_zroutines_cycle)));
-			op_labaddr(rhd, &lblname, 0);
-			TREF(lab_lnr) = &((TREF(lab_proxy)).lnr_adr);
-			return rhd;
-		}
-	}
-	/* Linked routine is already the latest */
-	TREF(lab_lnr) = lnr;
-	return rhd;
-}
-#endif /* AUTORELINK_SUPPORTED */
diff --git a/sr_unix/op_zhorolog.c b/sr_unix/op_zhorolog.c
new file mode 100644
index 0000000..312f2ff
--- /dev/null
+++ b/sr_unix/op_zhorolog.c
@@ -0,0 +1,55 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2015 Fidelity National Information 		*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+#include "mdef.h"
+#include <sys/time.h>
+#include "gtm_time.h"
+#include "stringpool.h"
+#include "op.h"
+#include "dollarh.h"
+
+GBLREF spdesc	stringpool;
+
+/* If you update this function, consider updating op_horolog() as well */
+void op_zhorolog(mval *s)
+{
+	uint4		days;
+	time_t		seconds;
+	struct timeval	tv;
+	unsigned char	*strpool_free;
+	long		gmtoffset;
+
+	assert(stringpool.free <= stringpool.top);
+	assert(stringpool.free >= stringpool.base);
+	ENSURE_STP_FREE_SPACE(MAXNUMLEN + 1);
+	strpool_free = stringpool.free;
+	assertpro(-1 != gettimeofday(&tv, NULL));
+	seconds = tv.tv_sec;
+	gmtoffset = dollarh(seconds, &days, &seconds);
+	s->str.addr = (char *)strpool_free;
+	strpool_free = i2asc(strpool_free, days);
+	*strpool_free++ = ',';
+	strpool_free = i2asc(strpool_free, (uint4)seconds);
+	*strpool_free++ = ',';
+	strpool_free = i2asc(strpool_free, (uint4)tv.tv_usec);
+	*strpool_free++ = ',';
+	if (gmtoffset >= 0) /* The sign check is neccessary because i2ascl doesn't handle negative values */
+		strpool_free = i2ascl(strpool_free, gmtoffset);
+	else
+	{
+		*strpool_free++ = '-';
+		strpool_free = i2ascl(strpool_free, -1UL * gmtoffset);
+	}
+	s->str.len = INTCAST((char *)strpool_free - s->str.addr);
+	s->mvtype = MV_STR;
+	stringpool.free = strpool_free;
+	return;
+}
diff --git a/sr_unix/op_zlink.c b/sr_unix/op_zlink.c
index efd31d3..31de034 100644
--- a/sr_unix/op_zlink.c
+++ b/sr_unix/op_zlink.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -32,6 +33,7 @@
 #ifdef __MVS__
 # include "gtm_zos_io.h"
 #endif
+#include "arlinkdbg.h"
 
 typedef enum
 {
@@ -68,19 +70,20 @@ typedef enum
 #define CLOSE_OBJECT_FD(FD, STATUS)												\
 {																\
 	CLOSE_OBJECT_FILE(FD, STATUS);	/* Resets "object_file_des" to FD_INVALID */						\
-	if (-1 == status)													\
+	if (-1 == (STATUS))													\
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("close()"), CALLFROM, errno);	\
 }
 
 #ifdef AUTORELINK_SUPPORTED
 #  define CHECK_OBJECT_HISTORY(OBJPATH, OBJDIR, RECENT_ZHIST_PARM)								\
 {																\
-	if (TREF(arlink_enabled) && !TREF(trigger_compile))									\
+	if (TREF(arlink_enabled) && !TREF(trigger_compile_and_link))								\
 	{	/* Autorelink is enabled, this is not a trigger and we need a search history for the object file to pass	\
 		 * to incr_link(). We had to wait till this point to discover the search history since at the time of the	\
 		 * call to zro_search(), there may not have been an object file to find or, given where we found the source,	\
 		 * the object file we are linking now may be different from one found before so create the history array given  \
-		 * the supplied object file path and our $ZROUTINES directory array.						\
+		 * the supplied object file path and our $ZROUTINES directory array. See GTM-8311 for potential improvements	\
+		 * in this area.												\
 		 *														\
 		 * Note we cannot assert RECENT_ZHIST_PARM is null here as we may be about to link a recompiled module after	\
 		 * a failed ZLINK but incr_link() took care of releasing the old history in its error path.			\
@@ -114,8 +117,8 @@ ZOS_ONLY(error_def(ERR_BADTAG);)
  * 1. Link into process private - Executable code becomes part of the process private space.
  * 2. Link from a shared library - M routines linked into a shared library can be linked into a process allowing much of the
  *    object file to be shared.
- * 3. Link from a shared object - Current mechanism is to mmap() the object file and link it similar to how shared library links
- *    are done.
+ * 3. Link from a shared object - Shared objects are loaded into shared memory by GT.M (rtnobj.c is the manager) and linked
+ *    much like objects linked from a shared library.
  *
  * Parameters:
  *   - v     - mval containing the name/path of the object file.
@@ -147,6 +150,7 @@ void op_zlink (mval *v, mval *quals)
 	if (MAX_FBUFF < v->str.len)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, v->str.len, v->str.addr, ERR_TEXT, 2,
 			      RTS_ERROR_LITERAL("Filename/path exceeds max length"));
+	DBGARLNK((stderr, "op_zlink: Call to (re)link routine %.*s\n", v->str.len, v->str.addr));
 	object_file_des = FD_INVALID;
 	srcdir = objdir = NULL;
 	expdir = FALSE;
@@ -293,9 +297,8 @@ void op_zlink (mval *v, mval *quals)
 				      errno);
 		/* Note - if explicit ZLINK, objdir can be NULL if link is from a directory not mentioned in $ZROUTINES */
 		CHECK_OBJECT_HISTORY(objnamebuf, objdir, RECENT_ZHIST);
-		if (IL_RECOMPILE == INCR_LINK(object_file_des, objdir, RECENT_ZHIST, objnamelen, objnamebuf))
+		if (IL_RECOMPILE == INCR_LINK(&object_file_des, objdir, RECENT_ZHIST, objnamelen, objnamebuf))
 		{
-			CLOSE_OBJECT_FILE(object_file_des, status);	/* Priority error is version issue so ignore any on close */
 			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZLINKFILE, 2, dollar_zsource.str.len, dollar_zsource.str.addr,
 				      ERR_VERSION);
 		}
@@ -335,7 +338,7 @@ void op_zlink (mval *v, mval *quals)
 				/* The incr_link() routine should drive errors for any issue found with linking from a shared
 				 * library so IL_DONE is the only valid return code we *ever* expect back.
 				 */
-				assertpro(IL_DONE == INCR_LINK(0, objdir, NULL, objnamelen, objnamebuf));
+				assertpro(IL_DONE == INCR_LINK(NULL, objdir, NULL, objnamelen, objnamebuf));
 				return;
 			}
 			if (objdir->str.len + objnamelen > SIZEOF(objnamebuf) - 1)
@@ -367,7 +370,10 @@ void op_zlink (mval *v, mval *quals)
 			} else
 				obj_found = TRUE;
 		} else	/* If source file extension specified, force re-compile */
+		{
 			compile = TRUE;
+			assert(FD_INVALID == object_file_des);	/* Shouldn't be an object file open yet */
+		}
 		STAT_FILE(srcnamebuf, &src_stat, status);	/* Check if source file exists */
 		if (-1 == status)
 		{
@@ -409,11 +415,14 @@ void op_zlink (mval *v, mval *quals)
 				} else
 				{
 					compile = TRUE;
-					assert(FD_INVALID == object_file_des);	/* Make sure closed */
+					assert(FD_INVALID == object_file_des);	/* Make sure no object file open */
 				}
 			} else if (!obj_found)
+			{
+				assert(FD_INVALID == object_file_des);	/* Make sure closed */
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, objnamelen, objnamebuf,
 					      ERR_FILENOTFND, 2, objnamelen, objnamebuf);
+			}
 		}
 		if (compile)
 		{	/* (Re)Compile source file */
@@ -428,6 +437,7 @@ void op_zlink (mval *v, mval *quals)
 			if (!(qlf & CQ_OBJECT) && (SRC != type))
 			{
 				cmd_qlf.qlf = glb_cmd_qlf.qlf;
+				assert(FD_INVALID == object_file_des);	/* Make sure no object file open */
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, ERR_ZLNOOBJECT);
 			}
 			zlcompile(srcnamelen, (uchar_ptr_t)srcnamebuf);
@@ -438,10 +448,9 @@ void op_zlink (mval *v, mval *quals)
 		}
 		assert(FD_INVALID != object_file_des);		/* Object file should be open at this point */
 		CHECK_OBJECT_HISTORY(objnamebuf, objdir, RECENT_ZHIST);
-		status = INCR_LINK(object_file_des, objdir, RECENT_ZHIST, objnamelen, objnamebuf);
+		status = INCR_LINK(&object_file_des, objdir, RECENT_ZHIST, objnamelen, objnamebuf);
 		if (IL_RECOMPILE == status)
 		{	/* Failure due only to version mismatch, so recompile */
-			CLOSE_OBJECT_FD(object_file_des, status);
 			assertpro(!compile);
 			if (!src_found)
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, ERR_VERSION);
@@ -466,7 +475,7 @@ void op_zlink (mval *v, mval *quals)
 			 * created object file could conceivably cause an IL_RECOMPILE code here (incr_link handles all
 			 * the other errors itself). Not at this time considered worthy of special coding.
 			 */
-			assertpro(IL_DONE == INCR_LINK(object_file_des, objdir, RECENT_ZHIST, objnamelen, objnamebuf));
+			assertpro(IL_DONE == INCR_LINK(&object_file_des, objdir, RECENT_ZHIST, objnamelen, objnamebuf));
 		}
 		CLOSE_OBJECT_FD(object_file_des, status);
 	}
diff --git a/sr_unix/op_zmess.c b/sr_unix/op_zmess.c
index bbeefc4..bd08de3 100644
--- a/sr_unix/op_zmess.c
+++ b/sr_unix/op_zmess.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -111,11 +112,10 @@ void op_zmess(unsigned int cnt, ...)
 					fao[33]);
 			} else if ((INFO == tmp_severity) || (SUCCESS == tmp_severity))
 			{
-				gtm_putmsg_noflush_csa(CSA_ARG(NULL) VARLSTCNT(2 + faocnt) errnum, faocnt, fao[0], fao[1], fao[2],
-					fao[3],fao[4], fao[5], fao[6], fao[7], fao[8], fao[9], fao[10], fao[11], fao[12], fao[13],
-					fao[14], fao[15], fao[16], fao[17], fao[18], fao[19], fao[20], fao[21], fao[22], fao[23],
-					fao[24], fao[25], fao[26], fao[27], fao[28], fao[29], fao[30], fao[31], fao[32], fao[33]);
-				PRN_ERROR;
+				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(2 + faocnt) errnum, faocnt, fao[0], fao[1], fao[2], fao[3],
+					fao[4], fao[5], fao[6], fao[7], fao[8], fao[9], fao[10], fao[11], fao[12], fao[13], fao[14],
+					fao[15], fao[16], fao[17], fao[18], fao[19], fao[20], fao[21], fao[22], fao[23], fao[24],
+					fao[25], fao[26], fao[27], fao[28], fao[29], fao[30], fao[31], fao[32], fao[33]);
 			} else
 			{
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(2 + faocnt) errnum, faocnt, fao[0], fao[1], fao[2], fao[3],
@@ -131,4 +131,3 @@ void op_zmess(unsigned int cnt, ...)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) errnum);
 	}
 }
-
diff --git a/sr_unix/op_zrupdate.c b/sr_unix/op_zrupdate.c
index 939e691..e09b0b9 100644
--- a/sr_unix/op_zrupdate.c
+++ b/sr_unix/op_zrupdate.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -39,7 +40,8 @@
 
 #define DOTOBJEXT	".o"
 #define OBJEXT 		'o'
-#define WILDCARD	'*'
+#define ASTERISK	'*'
+#define QUESTION	'?'
 
 LITREF	mval	literal_null;
 
@@ -55,17 +57,14 @@ void op_zrupdate(int argcnt, ...)
 }
 #else
 /* The ZRUPDATE command drives this routine once through for each argument (object file path and object file - potentially
- * containing wildcards). Each file specified, or found in a wildcard search, is separated into its path and its routine
- * name, the path is looked up and the appropriate relinkctl file opened where we lookup the routine name and bump its cycle.
+ * containing wildcards). Each file specified, or found in a wildcard search, is separated into its path and its routine name;
+ * the path is then looked up and the appropriate relinkctl file opened, where we find the routine name and bump its cycle.
  *
- * Although this routine is setup to handle a variable argument list, more than 1 argument is not currently supported. The
- * ZRUPDATE command itself does support a commented list of filespecs but the compiler turns each argument into a separate
- * call to this routine. The purpose of the variable argument list is to support a future proposed enhancement which would
- * allow a ZRUPDATE argument to be a parenthesized list of filespecs with the intention all of them are simultaneously
- * updated. Such a list, when supported would be passed as a list of files to this routine - hence the multi-arg support.
- *
- * To get a consistent view of each directory, the directory is run through realpath() to resolve soft links and normalize the
- * directory name consistently.
+ * Although this routine is set up to handle a variable argument list, more than 1 argument is not currently supported. The
+ * ZRUPDATE command itself does support a commented list of filespecs, but the compiler turns each argument into a separate
+ * call to this routine. The purpose of the variable argument list is to support a future proposed enhancement, which would
+ * allow a ZRUPDATE argument to be a parenthesized list of filespecs with the intention that all of them be simultaneously
+ * updated. Such a list, when supported, would be passed as a list of files to this routine - hence the multi-arg support.
  *
  * Parameters:
  *   argcnt        - currently always 1 (see note above).
@@ -73,185 +72,203 @@ void op_zrupdate(int argcnt, ...)
  *
  * No return value.
  */
-
 void op_zrupdate(int argcnt, ...)
 {
-	mval			*objfilespec;
-	va_list			var;
-	mval			objpath;
-	char			tranbuf[MAX_FBUFF + 1], *chptr, chr;
+	boolean_t		wildcarded, noresult, seenfext, invalid;
+	char			pblkbuf[MAX_FBUFF + 1], statbuf[MAX_FBUFF + 1], namebuf[MAX_FBUFF + 1];
+	char			*chptr, chr;
+	int			status, fextlen, fnamlen, object_count;
+	mstr			objdir, rtnname;
+	mval			*objfilespec, objpath;
 	open_relinkctl_sgm 	*linkctl;
-	relinkrec_t		*rec;
-	plength			plen;
-	int			status, fextlen, fnamlen, fcnt;
 	parse_blk		pblk;
+	plength			plen;
+	relinkrec_t		*rec;
 	struct stat		outbuf;
-        int			stat_res;
-	boolean_t		seenfext, fileexists;
-	mstr			objdir, rtnname;
 	uint4			hash, prev_hash_index;
+	va_list			var;
 
-	/* Currently only expecting one value per invocation right now. That will change in phase 2 hence the stdarg setup */
+	/* Currently only expecting one value per invocation right now. That will change in phase 2, hence the stdarg setup. */
 	va_start(var, argcnt);
 	assert(1 == argcnt);
 	objfilespec = va_arg(var, mval *);
 	va_end(var);
 	MV_FORCE_STR(objfilespec);
-	/* First some pre-processing to determine if an explicit file name or type was specified. If so, it must be ".o" for
-	 * this phase of implementation. Later phases may allow ".m" to be specified but not initially. Use parse_file() to
-	 * parse everything out and isolate any extention.
-	 */
+	/* Initialize pblk with information about the pattern in the argument to ZRUPDATE. */
 	memset(&pblk, 0, SIZEOF(pblk));
-        pblk.buffer = tranbuf;
-	pblk.buff_size = (unsigned char)(MAX_FBUFF);	/* Pass size of buffer - 1 (standard protocol for parse_file) */
-	pblk.def1_buf = DOTOBJEXT;			/* Default .o file type if not specified */
+        pblk.buffer = pblkbuf;
+	pblk.buff_size = (unsigned char)(MAX_FBUFF);	/* Pass size of buffer - 1 (standard protocol for parse_file). */
+	pblk.def1_buf = DOTOBJEXT;			/* Default .o file type if not specified. */
 	pblk.def1_size = SIZEOF(DOTOBJEXT) - 1;
-	pblk.fop = F_SYNTAXO;				/* Syntax check only - bypass directory existence check */
+	pblk.fop = F_SYNTAXO;				/* Syntax check only - bypass directory / file existence check. */
 	status = parse_file(&objfilespec->str, &pblk);
 	if (ERR_PARNORMAL != status)
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2, objfilespec->str.len, objfilespec->str.addr, status);
-	tranbuf[pblk.b_esl] = '\0';			/* Needed for subsequent STAT_FILE */
-	seenfext = FALSE;
-	if (0 != pblk.b_ext)
-	{	/* If a file extension was specified - get the extension sans any potential wildcard character */
-		for (chptr = pblk.l_ext + 1, fextlen = pblk.b_ext - 1; 0 < fextlen; chptr++, fextlen--)
-		{	/* Check each character in the extension except first which is the dot if ext exists at all */
-			if (WILDCARD != *chptr)
-			{	/* We see a char that isn't a wildcard character. If we've already seen our "o" file extension,
-				 * this char makes our requirement filetype impossible so raise an error.
-				 */
-				if (seenfext || (OBJEXT != *chptr))
-					/* No return from this error */
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_FILEPARSE,
-						      2, objfilespec->str.len, objfilespec->str.addr,
-						      ERR_TEXT, 2, RTS_ERROR_TEXT("Unsupported filetype specified"));
-				seenfext = TRUE;
-			}
-		}
-	}
-	/* Do a simlar check for the file type */
+	wildcarded = (pblk.fnb & F_WILD);		/* Our error logic is different depending on the presence of wildcards. */
+	invalid = FALSE;
 	if (0 != pblk.b_name)
-	{	/* A file name was specified (if not, tiz probably hard to find the file but that can be dealt with later).
-		 * Like in the above, the name must be comprised of valid chars for routine names.
+	{	/* A file name was specified (if not, it is probably hard to find the file name, but that can be dealt with later).
+		 * Like above, the string must be comprised of valid chars for routine names.
 		 */
 		for (chptr = pblk.l_name, fnamlen = pblk.b_name; 0 < fnamlen; chptr++, fnamlen--)
 		{
-			if (WILDCARD != *chptr)
-			{	/* Substitute '%' for '_'. While this substitution is really only valid on the first char, only the
-				 * first char check allows "%" so a 2nd or later char check would fail the '%' substitution anyway.
+			if ((ASTERISK != *chptr) && (QUESTION != *chptr))
+			{	/* Substitute '%' for '_'. While this substitution is valid just for the first char, only the first
+				 * char can be '%', so a check of the second or later char would fail the '%' substitution anyway.
 				 */
 				chr = ('_' == *chptr) ? '%' : *chptr;
 				/* We see a char that isn't a wildcard character. If this is the first character, it can be
 				 * alpha or percent. If the second or later character, it can be alphanumeric.
 				 */
-				if (((fnamlen != pblk.b_name) && !VALID_MNAME_NFCHAR(chr))	/* 2nd char or later check */
-				    || ((fnamlen == pblk.b_name) && !VALID_MNAME_FCHAR(chr)))	/* 1st char check */
+				if (((fnamlen == pblk.b_name) && (!VALID_MNAME_FCHAR(chr) || ('%' == *chptr)))	/* If 1st char */
+					|| ((fnamlen != pblk.b_name) && !VALID_MNAME_NFCHAR(chr)))		/* If 2nd+ char */
 				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_FILEPARSE,
-						      2, objfilespec->str.len, objfilespec->str.addr,
-						      ERR_TEXT, 2, RTS_ERROR_TEXT("Filename is not a valid routine name"));
+					invalid = TRUE;
+					break;
 				}
 			}
 		}
-	}
-	/* When specifying a non-wildcarded object file, it is possible for the file to have been removed, in which case we still
-	 * need to update its relinkctl entry (if exists) to notify other processes about the object's deletion.
-	 */
-	if (!(pblk.fnb & F_WILD) & seenfext)
-	{	/* If no wildcards in path and saw the extension we want - no need to wash through zsearch() */
-		objdir.addr = pblk.l_dir;
-		objdir.len = pblk.b_dir;
-		linkctl = relinkctl_attach(&objdir);		/* Create/attach/open relinkctl file */
-		if (NULL == linkctl)				/* Non-existant path and no associated relinkctl file */
-			/* Note this reference to errno depends on nothing in relinkctl_attach() doing anything to modify
-			 * errno after the realpath() call. No return from this error.
-			 */
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2, objfilespec->str.len, objfilespec->str.addr,
-				      errno);
-		/* What we do at this point depends on the following conditions:
-		 *
-		 * 1) If the specified file exists, we can add it to relinkctl file and/or update its cycle.
-		 * 2) If the file doesn't exist on disk but the routine is found in the relinkctl file, update cycle.
-		 * 3) If no file and no entry, just ignore it and do nothing (info error removed by request).
-		 */
-		STAT_FILE(tranbuf, &outbuf, stat_res);
-		if (-1 == stat_res)
-		{
-			if (ENOENT != errno)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2, objfilespec->str.len,
-					      objfilespec->str.addr, errno);
-			fileexists = FALSE;
-		} else
-			fileexists = TRUE;
-		rtnname.len = pblk.b_name;
-		rtnname.addr = pblk.l_name;
-		CONVERT_FILENAME_TO_RTNNAME(rtnname);	/* Set rtnname right before searching in relinkctl file */
-		assert(valid_mname(&rtnname));
-		COMPUTE_RELINKCTL_HASH(&rtnname, hash);
-		rec = relinkctl_find_record(linkctl, &rtnname, hash, &prev_hash_index);
-		if ((NULL == rec) && !fileexists)
-			return;					/* No file and no entry - ignore */
-		/* Either the file exists or the entry exists so add or update it */
-		rec = relinkctl_insert_record(linkctl, &rtnname);
-		RELINKCTL_CYCLE_INCR(rec, linkctl); 		/* Increment cycle indicating change to world */
-		return;
-	}
-	/* If we have a wildcarded request or one without the object filetype, reprocess the string with $ZSEARCH using our
-	 * defined stream to resolve wildcards. Then loop through processing each file returned. In this loop, we just ignore
-	 * any file that doesn't have a ".o" extension.
-	 */
-	op_fnzsearch((mval *)&literal_null, STRM_ZRUPDATE, 0, &objpath);	/* Clear any existing cache */
-	for (fcnt = 0; ; fcnt++)
-	{
+	} else if (!wildcarded)
+		invalid = TRUE;
+	if (invalid)
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_FILEPARSE, 2, objfilespec->str.len, objfilespec->str.addr,
+			      ERR_TEXT, 2, RTS_ERROR_TEXT("Filename is not a valid routine name"));
+	/* Do a simlar check for the file type */
+	seenfext = FALSE;
+	if (0 != pblk.b_ext)
+	{	/* If a file extension was specified - get the extension sans any potential wildcard character. */
+		for (chptr = pblk.l_ext + 1, fextlen = pblk.b_ext - 1; 0 < fextlen; chptr++, fextlen--)
+		{	/* Check each character in the extension except the first, which is the dot if extension exists at all. */
+			if (ASTERISK != *chptr)
+			{	/* We see a char that is not a '*' wildcard character. If we have already seen our "o" file
+				 * extension or a '?' wildcard character (which we assume is "o"), this char makes our requirement
+				 * filetype impossible, so raise an error.
+				 */
+				if (seenfext || ((OBJEXT != *chptr) && (QUESTION != *chptr)))
+				{
+					invalid = TRUE;
+					break;
+				}
+				seenfext = TRUE;
+			}
+		}
+	} else if (!wildcarded)
+		invalid = TRUE;
+	if (invalid)
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_FILEPARSE, 2, objfilespec->str.len, objfilespec->str.addr,
+				ERR_TEXT, 2, RTS_ERROR_TEXT("Unsupported filetype specified"));
+	zsrch_clr(STRM_ZRUPDATE);	/* Clear any existing search cache */
+	object_count = 0;
+	do
+	{	/* The DO-WHILE form is to do one iteration even if not wildcarded. */
 		plen.p.pint = op_fnzsearch(objfilespec, STRM_ZRUPDATE, 0, &objpath);
-		if (0 == objpath.str.len)
-		{	/* End of file list */
-			if (0 == fcnt)
-				/* Still looking to process our first file - give no objects found message as a "soft" message
-				 * (INFO level message - supressed in other than direct mode)
+		if (TRUE == (noresult = (0 == objpath.str.len)))	/* Note: assignment! */
+		{	/* No (more) matches. In wildcarded case we are simply done with this loop. */
+			if (wildcarded)
+				break;
+			else
+			{	/* In a non-wildcarded case we want to verify whether the user is referring to a previously existent
+				 * file that got removed or the one that op_fnzsearch() silently skipped due to access issues. So,
+				 * set the objpath to the user-provided string after processing by parse_file() and adjust the
+				 * length fields accordingly.
 				 */
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) MAKE_MSG_INFO(ERR_FILEPARSE), 2, objfilespec->str.len,
-					      objfilespec->str.addr, ERR_TEXT, 2, RTS_ERROR_TEXT("No object files found"));
-			break;
+				objpath.str.addr = pblk.buffer;
+				objpath.str.len = pblk.b_esl;
+				SET_LENGTHS(&plen, objpath.str.addr, objpath.str.len, FALSE);
+			}
 		}
-		/* The extension contains the extension-start character ('.') so we are looking for the extension '.o' hence
-		 * the length must be 2 and the 2nd char must be OBJEXT.
+		/* Verify the extension and filename on wildcarded patterns; the non-wildcarded ones have been checked earlier.
+		 * Start with the extension.
+		 */
+		if (wildcarded && ((SIZEOF(DOTOBJEXT) - 1 != plen.p.pblk.b_ext)
+				|| (OBJEXT != objpath.str.addr[plen.p.pblk.b_dir + plen.p.pblk.b_name + 1])))
+			continue;
+		/* Before opening the relinkctl file, verify that a valid routine name can be derived, thus almost definitely
+		 * telling us that the object name is also correct. The only exception is when the object name starts with a '%',
+		 * so we want to note down that fact. Note that we cannot operate on the objpath memory because we would be
+		 * affecting the object name, so we have to make a copy first.
 		 */
-		if ((2 == plen.p.pblk.b_ext) && (OBJEXT == *(objpath.str.addr + plen.p.pblk.b_dir + plen.p.pblk.b_name + 1)))
-		{			/* This is (probably) an object file. Double check file is a file and not a directory */
-			memcpy(tranbuf, objpath.str.addr, objpath.str.len);	/* Need null terminated version for STAT */
-			tranbuf[objpath.str.len] = '\0';		/* Not guaranteed null termination from op_fnzsearch */
-			STAT_FILE(tranbuf, &outbuf, stat_res);
-			/* If either something happened to the file since op_fnzsearch() saw it or the file is not a file, then
-			 * ignore it.
+		if (wildcarded && ((0 == plen.p.pblk.b_name) || ('%' == objpath.str.addr[plen.p.pblk.b_dir])))
+			continue;
+		memcpy(namebuf, objpath.str.addr + plen.p.pblk.b_dir, plen.p.pblk.b_name);
+		rtnname.len = plen.p.pblk.b_name;
+		rtnname.addr = namebuf;
+		CONVERT_FILENAME_TO_RTNNAME(rtnname);	/* Get rtnname before searching in relinkctl file */
+		if (wildcarded && !valid_mname(&rtnname))
+			continue;
+		assert(!noresult || !wildcarded);	/* We should have left the loop early on no results with a wildcard. */
+		/* The reasons for doing the below STAT depend on the situation. If we do have at least one result, we need to make
+		 * sure it is legitimate. If we have no results, we do the STAT because op_fnzsearch() on non-wildcarded requests
+		 * may cleanly return an empty list even in the face of access errors, whereas we want to notify the user about
+		 * potential access issues on a single file.
+		 */
+		memcpy(statbuf, objpath.str.addr, objpath.str.len);
+		statbuf[objpath.str.len] = '\0';
+		LSTAT_FILE(statbuf, &outbuf, status);	/* We use lstat to detect and eliminate soft links. */
+		if (-1 == status)
+		{	/* In the wildcarded case we just skip missing files. Any access error (but not the case of a missing file)
+			 * gets reported on non-wildcarded patterns. If we did not find this file initially, it does not matter if
+			 * exists now. We simply want to determine whether the reason that we could not find it had to do with
+			 * access errors.
 			 */
-			if ((-1 == stat_res) || !S_ISREG(outbuf.st_mode))
-			{
-				fcnt--;					/* Don't count files not found for whatever reason */
+			if (wildcarded)
 				continue;
-			}
-			/* Before opening the relinkctl file, verify we actually do have a valid routine name */
-			rtnname.len = plen.p.pblk.b_name;
-			rtnname.addr = objpath.str.addr + plen.p.pblk.b_dir;
-			CONVERT_FILENAME_TO_RTNNAME(rtnname);		/* Set rtnname right before searching in relinkctl file */
-			if (!valid_mname(&rtnname))
-			{
-				fcnt--;
-				continue;				/* Ignore files that are invalid wildcard matches */
-			}
+			else if (ENOENT != errno)
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2,
+						objfilespec->str.len, objfilespec->str.addr, errno);
+		} else if (!S_ISREG(outbuf.st_mode))
+		{	/* We are only interested in regular files. */
+			continue;
+		}
+		/* Extraction of object directory is different depending on whether a match was found or not. If we have a match,
+		 * then objpath already contains the full path to the object, including the directory. If not, then we cannot use
+		 * objpath because it was populated with user's argument to ZRUPDATE, which might not have a directory name in it.
+		 * So, in that case we derive the directory name from the original parsing results populated by parse_file().
+		 */
+		if (noresult)
+		{
+			objdir.addr = pblk.l_dir;
+			objdir.len = pblk.b_dir;
+		} else
+		{
 			objdir.addr = objpath.str.addr;
 			objdir.len = plen.p.pblk.b_dir;
-			linkctl = relinkctl_attach(&objdir);		/* Create/attach/open relinkctl file */
-			if (NULL == linkctl)
-			{
-				fcnt--;					/* Path disappeared - don't count it */
+		}
+		linkctl = relinkctl_attach(&objdir, &objpath.str, 0);	/* Create/attach/open relinkctl file. */
+		if (NULL == linkctl)
+		{
+			if (wildcarded)
 				continue;
+			else
+			{	/* Note that the below errno value should come from the realpath() call in relinkctl_attach()
+				 * invoked above, so we need to make sure nothing gets called in between.
+				 */
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2,
+						objfilespec->str.len, objfilespec->str.addr, errno);
 			}
-			rec = relinkctl_insert_record(linkctl, &rtnname);
-			RELINKCTL_CYCLE_INCR(rec, linkctl); 		/* Increment cycle indicating change to world */
-		} else
-			fcnt--;						/* Don't count ignored files */
-
-	}
+		}
+		if (!wildcarded)
+		{	/* In the non-wildcarded case we decide whether to proceed with the cycle bump thusly:
+			 *  1. If the specified file exists, it may or may not be accounted for in the relinkctl file, meaning that
+			 *     we need to either add it there or simply update its cycle.
+			 *  2. If the file does not exist on disk, but the routine is found in the relinkctl file, update its cycle.
+			 *  3. If there is no file and no entry for it in the relinkctl file, do nothing (info error removed by
+			 *     request).
+			 */
+			COMPUTE_RELINKCTL_HASH(&rtnname, hash, linkctl->hdr->relinkctl_hash_buckets);
+			rec = relinkctl_find_record(linkctl, &rtnname, hash, &prev_hash_index);
+			if ((NULL == rec) && noresult)
+				return;
+		}
+		rec = relinkctl_insert_record(linkctl, &rtnname);
+		RELINKCTL_CYCLE_INCR(rec, linkctl); 		/* Increment cycle indicating change to world */
+		object_count++;					/* Update the count of valid objects encountered. */
+	} while (wildcarded);
+	/* For a wildcarded request that did not return any suitable object files give a no objects found error as a "soft" INFO
+	 * level message, which gets supressed in except in direct mode.
+	 */
+	if (wildcarded && (0 == object_count))
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) MAKE_MSG_INFO(ERR_FILEPARSE), 2, objfilespec->str.len,
+			      objfilespec->str.addr, ERR_TEXT, 2, RTS_ERROR_TEXT("No object files found"));
 }
 #endif /* AUTORELINK_SUPPORTED */
diff --git a/sr_unix/op_zut.c b/sr_unix/op_zut.c
new file mode 100644
index 0000000..f71bc71
--- /dev/null
+++ b/sr_unix/op_zut.c
@@ -0,0 +1,57 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2015 Fidelity National Information 		*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+#include "mdef.h"
+#include <sys/time.h>
+#include "gtm_time.h"
+#include "op.h"
+#include "arit.h"
+
+LITREF	int4	ten_pwr[];
+
+error_def(ERR_WEIRDSYSTIME);
+
+void op_zut(mval *s)
+{
+	struct timeval	tv;
+	gtm_int8	microseconds, msectmp;
+	int		numdigs;
+	int4		pwr;
+
+	assertpro(-1 != gettimeofday(&tv, NULL));
+	microseconds = (1LL * MICROSEC_IN_SEC * tv.tv_sec) + tv.tv_usec;
+	if ((microseconds < 0) && (microseconds > E_18))
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_WEIRDSYSTIME);
+	if (microseconds < E_6)
+	{
+		s->m[1] = ((int4)microseconds * 1000);
+		s->mvtype = MV_INT | MV_NM;
+	} else
+	{
+		msectmp = microseconds;
+		/* Count the number of digits */
+		for (numdigs = 0; msectmp; numdigs++, msectmp /= 10);
+		if (numdigs <= NUM_DEC_DG_1L)
+		{
+			s->m[0] = 0;
+			s->m[1] = (int4)microseconds * ten_pwr[NUM_DEC_DG_1L - numdigs];
+		} else
+		{
+			pwr = ten_pwr[numdigs - NUM_DEC_DG_1L];
+			s->m[0] = (microseconds % pwr) * ten_pwr[NUM_DEC_DG_2L - numdigs];
+			s->m[1] = microseconds / pwr;
+		}
+		s->mvtype = MV_NM;
+		s->e = MV_XBIAS + numdigs;
+	}
+	s->sgn = 0;
+	return;
+}
diff --git a/sr_unix/parse_file.h b/sr_unix/parse_file.h
index f05a9b4..187ae98 100644
--- a/sr_unix/parse_file.h
+++ b/sr_unix/parse_file.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,6 +10,9 @@
  *								*
  ****************************************************************/
 
+#ifndef PARSE_FILE_H_INCLUDED
+#define PARSE_FILE_H_INCLUDED
+
 #define MAX_FBUFF	255		/* Max file size (why different from MAX_PATH[_LEN]/GTM_PATH_MAX ? */
 #define DEF_DBEXT	"*.dat"
 #define DEF_NODBEXT	"*"
@@ -69,4 +73,151 @@ typedef struct plength_struct
 				 */
 #define F_PARNODE	2	/* Look for a node specification - db opening only */
 
+/* Sets the relevant length fields in a plength-typed structure:
+ *  b_esl  - full length of PATH;
+ *  b_dir  - length of the PATH preceding the file name (includes the slash);
+ *  b_name - length of the file name in PATH (excludes the extension); and
+ *  b_ext  - length of the file name extension.
+ * Note that PLEN is a pointer-type argument. ABSOLUTE expects the indication of whether the PATH is absolute or relative.
+ */
+#define SET_LENGTHS(PLEN, PATH, LENGTH, ABSOLUTE)								\
+{														\
+	int		i;											\
+	boolean_t	seen_ext;										\
+														\
+	(PLEN)->p.pblk.b_esl = LENGTH;										\
+	(PLEN)->p.pblk.b_ext = 0;										\
+	for (i = LENGTH - 1, seen_ext = FALSE; i >= 0; i--)							\
+	{													\
+		if ('.' == *((PATH) + i))									\
+		{												\
+			if (!seen_ext)										\
+			{											\
+				(PLEN)->p.pblk.b_ext = LENGTH - i;						\
+				seen_ext = TRUE;								\
+			}											\
+		} else if ('/' == *((PATH) + i))								\
+			break;											\
+	}													\
+	assert((i >= 0) || !(ABSOLUTE)); /* On UNIX absolute paths must have '/'. */				\
+	(PLEN)->p.pblk.b_dir = i + 1;										\
+	(PLEN)->p.pblk.b_name = LENGTH - (PLEN)->p.pblk.b_dir - (PLEN)->p.pblk.b_ext;				\
+}
+
+/* Canonicalize the path by appropriately removing '.' and '..' path modifiers. Note that all* modifications are
+ * performed on the passed string directly.
+ */
+#define CANONICALIZE_PATH(PATH)											\
+{														\
+	char		*src, *dst;										\
+	char		cur_char;										\
+	boolean_t	need_slash;										\
+														\
+	src = dst = (PATH);											\
+	assert('/' == *src);											\
+	need_slash = FALSE;											\
+	while ('\0' != (cur_char = *src++))									\
+	{													\
+		if ('/' == cur_char)										\
+		{	/* Current character is '/'. If it is the last one, do not append a trailing slash. */	\
+			if ('\0' == (cur_char = *src++))							\
+				break;										\
+			if ('/' == cur_char)									\
+			{	/* Current sequence is '//'. Restart the loop from the second slash. */		\
+				src--;										\
+				need_slash = TRUE;								\
+			} else if ('.' == cur_char)								\
+			{	/* Current sequence is '/.'. We need to examine a few potential scenarios. In	\
+				 * particular, if we are at the last character, no need to append anything.	\
+				 */										\
+				if ('\0' == (cur_char = *src++))						\
+					break;									\
+				if ('/' == cur_char)								\
+				{	/* Current sequence is '/./'. Restart the loop from the second '/'. */	\
+					src--;									\
+					need_slash = FALSE;							\
+				} else if ('.' == cur_char)							\
+				{	/* Current sequence is '/..'. If the next character is '/' or we are at	\
+					 * the end of the line, snip off one directory from the tail, if found.	\
+					 */									\
+					cur_char = *src++;							\
+					if (('\0' == cur_char) || ('/' == cur_char))				\
+					{	/* Find an earlier '/'. Reset to '/' if not found. */		\
+						while (--dst >= (PATH))						\
+							if ('/' == *dst)					\
+								break;						\
+						if ((PATH) > dst)						\
+						{								\
+							need_slash = TRUE;					\
+							dst = (PATH);						\
+						} else								\
+							need_slash = FALSE;					\
+						src--;								\
+					} else									\
+					{	/* Current sequence is '/..<x>', where x is not '/' or '\0'. */	\
+						need_slash = FALSE;						\
+						*dst++ = '/';							\
+						*dst++ = '.';							\
+						*dst++ = '.';							\
+						*dst++ = cur_char;						\
+					}									\
+				} else										\
+				{	/* Current sequence is '/.<x>', where x is not '/' or '.' or '\0'. */	\
+					need_slash = FALSE;							\
+					*dst++ = '/';								\
+					*dst++ = '.';								\
+					*dst++ = cur_char;							\
+				}										\
+			} else											\
+			{	/* Current sequence is '/<x>', where x is not '/' or '.' or '\0'. */		\
+				need_slash = FALSE;								\
+				*dst++ = '/';									\
+				*dst++ = cur_char;								\
+			}											\
+		} else												\
+		{	/* Current character is not '/', so write it. But prepend it with a '/' if we have	\
+			 * previously indicated a need for one.							\
+			 */											\
+			if (need_slash)										\
+				*dst++ = '/';									\
+			need_slash = FALSE;									\
+			*dst++ = cur_char;									\
+		}												\
+	}													\
+	assert(dst >= (PATH));											\
+	/* If we did not have anything to put in the canonicalized path, default to '/'. */			\
+	if (dst == (PATH))											\
+		*dst++ = '/';											\
+	*dst = '\0';												\
+}
+
+/* Escape all '[' and ']' characters to prevent glob() from trying to match sets enclosed in them. */
+#define ESCAPE_BRACKETS(ORIG_PATH, RES_PATH)									\
+{														\
+	char		*src, *dst;										\
+	char		cur_char;										\
+	boolean_t	has_slash;										\
+														\
+	src = ORIG_PATH;											\
+	dst = RES_PATH;												\
+	has_slash = FALSE;											\
+	while ('\0' != (cur_char = *src++))									\
+	{													\
+		if ('\\' == cur_char)										\
+			has_slash = !has_slash;									\
+		else if (('[' == cur_char) || (']' == cur_char))						\
+		{												\
+			if (!has_slash)										\
+				*dst++ = '\\';									\
+			else											\
+				has_slash = FALSE;								\
+		} else if (has_slash)										\
+			has_slash = FALSE;									\
+		*dst++ = cur_char;										\
+	}													\
+	*dst = '\0';												\
+}
+
 int4 parse_file(mstr *file, parse_blk *pblk);
+
+#endif /* PARSE_FILE_H_INCLUDED */
diff --git a/sr_unix/pinentry-gtm.sh b/sr_unix/pinentry-gtm.sh
index 4d480d7..d9d7dce 100644
--- a/sr_unix/pinentry-gtm.sh
+++ b/sr_unix/pinentry-gtm.sh
@@ -1,7 +1,8 @@
 #!/bin/sh
 #################################################################
 #                                                               #
-#       Copyright 2010, 2011 Fidelity Information Services, Inc #
+# Copyright (c) 2010-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #                                                               #
 #       This source code contains the intellectual property     #
 #       of its copyright holder(s), and is made available       #
@@ -19,50 +20,54 @@
 #############################################################################################
 
 dir=`dirname $0` ; if [ -z "$dir" ] ; then dir=$PWD ; fi
-
-# Obfuscated password is obtained by a combination of the password, $USER and the inode of $gtm_dist/mumps. If $gtm_chset is set to
-# UTF-8, the resulting character stream need not always represent valid unicode code points when read by pinentry.m. To work around
-# this, force gtm_chset to M if we are coming in with gtm_chset set to UTF-8 and restore it before exit.
-if [ "UTF-8" = "$gtm_chset" ] ; then
-	save_gtm_chset=$gtm_chset
-	save_gtmroutines=$gtmroutines
-fi
-
-# Pinentry M program is invoked whenever GT.M/MUPIP needs the clear-text password to encrypt/decrypt the database. But, it does so
-# while holding database startup locks. If Pinentry itself ended up doing database access, we could create a deadlock because
-# Pinentry will need database startup locks which is held by GT.M/MUPIP and the latter won't let go of the locks until Pinentry
-# exits. Although Pinentry doesn't do explicit database access, it could indirectly end up accessing the database if
-# $gtm_trace_gbl_name is set in the environment. So, temporarily set this environment variable to an empty string before invoking
-# Pinentry. Since the caller of the script could potentially source this script, save it to a temporary variable and restore it
-# before exit.
-save_gtm_trace_gbl_name=$gtm_trace_gbl_name
-export gtm_trace_gbl_name=""
+punt=1
 
 if [ -z "$gtm_dist" ] ; then
 	# $gtm_dist is not set in the environment. See if we can use dirname to find one
-	if [ -x "$dir/../../mumps" ] ; then export gtm_dist=$dir/../.. ; fi
+	if [ "`echo $gtm_chset | tr utf UTF`" = "UTF-8" -a -x "$dir/../../utf8/mumps" ] ; then
+		export gtm_dist=$dir/../../utf8
+	elif [ -x "$dir/../../mumps" ] ; then
+		export gtm_dist=$dir/../..
+		unset gtm_chset
+	fi
 fi
 
 if [ -n "$gtm_passwd" -a -x "$gtm_dist/mumps" ] ; then
-	# temporary directory for object routines
-	if [ -x "`which mktemp 2>/dev/null`" ] ; then
-		tmpdir=`mktemp -d`
-	else
-		tmpdir=/tmp/`basename $0`_$$.tmp ; mkdir $tmpdir
+	# Password and MUMPS exists, perform some extended setup checks
+	if [ -z "$gtmroutines" ] ; then
+		# $gtmroutines is not set in the environment, attempt to pick it up from libgtmutil.so, $gtm_dist, $gtm_dist/plugin
+		if [ -e "$gtm_dist/libgtmutil.so" ] ; then
+			export gtmroutines="$gtm_dist/libgtmutil.so"
+		elif [ -e "$gtm_dist/PINENTRY.o" ] ; then
+			export gtmroutines="$gtm_dist"
+		fi
+	fi
+
+	# Validate gtmroutines. Redirect output or it will affect the password protocol
+	PINENTRY=PINENTRY
+	printf 'zhalt (0=$zlength($text(pinentry^PINENTRY)))' | $gtm_dist/mumps -direct >> /dev/null 2>&1
+	needsprivroutines=$?
+
+	if [ 0 -ne "${needsprivroutines}" ] ; then
+		PINENTRY=pinentry
+		# Need to create a temporary directory for object routines
+		if [ -x "`which mktemp 2>/dev/null`" ] ; then
+			tmpdir=`mktemp -d`
+		else
+			tmpdir=/tmp/`basename $0`_$$.tmp ; mkdir $tmpdir
+		fi
+		trapstr="rm -rf $tmpdir"
+		trap "$trapstr" HUP INT QUIT TERM TRAP
+		export gtmroutines="$tmpdir($dir)"
 	fi
-	trapstr="rm -f $tmpdir ; gtm_chset=$save_gtm_chset ; gtmroutines=$save_gtmroutines"
-	trapstr="$trapstr ; gtm_trace_gbl_name=$save_gtm_trace_gbl_name"
-	trap "$trapstr" HUP INT QUIT TERM TRAP
-	gtm_chset="M"
-	gtmroutines="$tmpdir($dir) $gtm_dist"
-	$gtm_dist/mumps -run pinentry
-	rm -rf $tmpdir
-else # punt to the regular pinentry program
+
+	gtm_trace_gbl_name= gtmdbglvl= gtmcompile= $gtm_dist/mumps -run $PINENTRY
+	punt=$?
+	if [ -d "$tmpdir" ] ; then rm -rf "$tmpdir" ; fi
+fi
+
+if [ 0 -ne $punt ] ;then
+	# Punt to the regular pinentry program
 	pinentry=`which pinentry 2>/dev/null`
 	if [ -x "$pinentry" ] ; then $pinentry $* ; else exit 1 ; fi
 fi
-# Now that we are done with fetching the obfuscated password, restore gtm_chset and gtmroutines to their values noted down at
-# function entry. Also, restore gtm_trace_gbl_name variable to the value noted down at function entry.
-gtm_chset=$save_gtm_chset
-gtmroutines=$save_gtmroutines
-gtm_trace_gbl_name=$save_gtm_trace_gbl_name
diff --git a/sr_unix/pinentry.m b/sr_unix/pinentry.m
index 678ccb1..dbb094c 100644
--- a/sr_unix/pinentry.m
+++ b/sr_unix/pinentry.m
@@ -1,6 +1,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;								;
-;	Copyright 2010, 2014 Fidelity Information Services, Inc	;
+; Copyright (c) 2010-2015 Fidelity National Information 	;
+; Services, Inc. and/or its subsidiaries. All rights reserved.	;
 ;								;
 ;	This source code contains the intellectual property	;
 ;	of its copyright holder(s), and is made available	;
@@ -9,23 +10,47 @@
 ;								;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-pinentry	; Substitute pinentry that returns an unobfuscated password
-		; if $gtm_passwd is defined in the environment.  If the command
-		; received is not GETPIN, this runs /usr/bin/pinentry
-		;
-	set $etrap="write $zstatus,!,$stack($stack,""MCODE""),! halt"
-	set obfpwd=$ztrnlnm("gtm_passwd"),obfpwdlen=$length(obfpwd)
-	set obfpwd=$zconvert(obfpwd,"U")
+pinentry; Custom pinentry that returns an unobfuscated password if $gtm_passwd is defined in the environment
+	;
+	; See the following link for non-authoritative information on the pinentry protocol:
+	; http://info2html.sourceforge.net/cgi-bin/info2html-demo/info2html/info2html?%28pinentry%29Protocol
+	;
+	set $etrap="do error",$zinterrupt=$etrap
+	; gtm_passwd is validated as non-null by pinentry-gtm.sh
+	set obfpwd=$zconvert($ztrnlnm("gtm_passwd"),"U"),obfpwdlen=$zlength(obfpwd)
+	; Avoid NOBADCHAR on $PRINCIPAL - must use [io]chset on the OPEN and not USE
+	open $principal:(ichset="M":ochset="M")
+	; Unmask the password ahead of initiating the pinentry protocol. If the external call is not
+	; available, the error handler is invoked
+	set binobfpwd=""
+	for i=1:2:$zlength(obfpwd) do
+	. set msb=$zfind("0123456789ABCDEF",$zextract(obfpwd,i))-2
+	. set lsb=$zfind("0123456789ABCDEF",$zextract(obfpwd,i+1))-2
+	. set binobfpwd=binobfpwd_$zchar(16*msb+lsb)
+	; If unmasking fails, exit
+	do:$&gpgagent.unmaskpwd(binobfpwd,.clrpwds) error
+	use $principal:(exception="goto error")
 	write "OK Your orders please",!
-	set done=0
-	for  quit:done  read in quit:'$length(in)  do
-	. if "GETPIN"=$zconvert($piece(in," ",1),"U") do
-	. . set obfpwds=""
-	. . for i=1:2:$length(obfpwd) do
-	. . . set msb=$find("0123456789ABCDEF",$extract(obfpwd,i))-2
-	. . . set lsb=$find("0123456789ABCDEF",$extract(obfpwd,i+1))-2
-	. . . set obfpwds=obfpwds_$zchar(16*msb+lsb)
-	. . write:'$&gpgagent.unmaskpwd(obfpwds,.clrpwds) "D ",clrpwds,!
-	. . set done=1
-	. write "OK",!
+	for  read in quit:'$zlength(in)  do
+	. if "GETPIN"=$zconvert($zpiece(in," ",1),"U") write "D ",clrpwds,!,"OK",! zhalt 0
+	. else  write "OK",!
+	; Since this routine only responds to GETPIN, issue an error if it did not receive that command,
+	; letting pinentry-gtm.sh execute the default pinentry
+	zhalt 1
+
+	; The error handler's primary function is to exit with error status so that the calling pinentry-gtm.sh
+	; can execute the default pinentry program. If $gtm_pinentry_log is defined, the routine will dump all
+	; status. Note that the locals are all killed prior to dumping status
+error	kill
+	set pinlog=$ztrnlnm("gtm_pinentry_log")
+	new $etrap set $etrap="zhalt +$zstatus"
+	if $zlength(pinlog) do
+	. open pinlog:(append:chset="M")
+	. use pinlog
+	. write !,"PINENTRY-F-FAILED ",$zdate($horolog,"YYYY/MM/DD 24:60:SS"),!
+	. zwrite $zversion,$ecode,$job,$zchset,$zdirectory,$zroutines,$zstatus
+	. write "Stack trace:",! zshow "S"
+	. write "Loaded external calls:",! zshow "C"
+	. close pinlog
+	zhalt +$zstatus
 	quit
diff --git a/sr_unix/put_cdidx.c b/sr_unix/put_cdidx.c
new file mode 100644
index 0000000..cdbe722
--- /dev/null
+++ b/sr_unix/put_cdidx.c
@@ -0,0 +1,47 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+#include "mdef.h"
+
+#include "gtm_string.h"
+
+#include "opcode.h"
+#include "compiler.h"
+#include "mmemory.h"
+
+/* Creates an operator reference to a given routine or label ultimately used to refer to an index into the linkage
+ * table holding the address of the needed component.
+ *
+ * Parameter:
+ *   - x - mstr address containing name of routine or label.
+ *
+ * Return:
+ *   - operator descriptor
+ */
+oprtype put_cdidx(mstr *x)
+{
+	triple	*ref;
+#	ifdef AUTORELINK_SUPPORTED
+	mstr	*str;
+
+	ref = newtriple(OC_CDIDX);
+	ref->operand[0].oprclass = CDIDX_REF;
+	ref->operand[0].oprval.cdidx = str = (mstr *)mcalloc(SIZEOF(mstr));
+	str->addr = mcalloc(x->len);
+	str->len = x->len;
+	memcpy(str->addr, x->addr, x->len);
+#	else
+	assertpro(FALSE); 	/* Routine should never be used in non-autorelink platform */
+	ref = NULL;		/* Avoid unintialized warnings. Need return in this path to avoid compiler error */
+#	endif
+	return put_tref(ref);
+}
diff --git a/sr_unix/rel_latch.c b/sr_unix/rel_latch.c
index 6cfa572..9e11c9a 100644
--- a/sr_unix/rel_latch.c
+++ b/sr_unix/rel_latch.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -20,7 +21,7 @@
 GBLREF	volatile int4	fast_lock_count;		/* Stop interrupts while we have our parts exposed */
 GBLREF	uint4		process_id;
 
-/* Grab a latch. If cannot get it, return FALSE, else TRUE. */
+/* Release latch specified by argument */
 void	rel_latch(sm_global_latch_ptr_t latch)
 {
 	++fast_lock_count;	/* Disable interrupts (i.e. wcs_stale) for duration to avoid potential deadlocks */
diff --git a/sr_unix/relinkctl.c b/sr_unix/relinkctl.c
index 9cb1429..8b85197 100644
--- a/sr_unix/relinkctl.c
+++ b/sr_unix/relinkctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -47,15 +48,21 @@
 #include "gtmmsg.h"
 #include "hugetlbfs_overrides.h"	/* for the ADJUST_SHM_SIZE_FOR_HUGEPAGES macro */
 #include "gtm_permissions.h"
+#include "sleep.h"
+#include "time.h"
 
-/* This module contains routines that maintain autorelink 'relinkctl' structures.
- * TODO - add description
- */
+/* This module contains routines that maintain autorelink 'relinkctl' structures */
+
+/* Constants defining how many times to retry the loop in relinkctl_open() based on the specific error conditions encountered. */
+#define MAX_RCTL_INIT_WAIT_RETRIES	1000	/* # of sleeps to allow while waiting for the shared memory to be initialized. */
+#define MAX_RCTL_DELETED_RETRIES	16	/* # of times to allow an existing relinkctl file to be deleted before open(). */
+#define MAX_RCTL_RUNDOWN_RETRIES	16	/* # of times to allow a mapped relinkctl file to get run down before shmat(). */
 
 DEBUG_ONLY(GBLDEF int	saved_errno;)
 GBLREF	uint4		process_id;
 GBLREF	rtn_tabent	*rtn_names, *rtn_names_end;
 GBLREF	stack_frame	*frame_pointer;
+GBLREF	int		process_exiting;
 OS_PAGE_SIZE_DECLARE
 
 STATICFNDCL void relinkctl_map(open_relinkctl_sgm *linkctl);
@@ -63,6 +70,11 @@ STATICFNDCL void relinkctl_unmap(open_relinkctl_sgm *linkctl);
 STATICFNDCL int relinkctl_fcntl_lock(int fd, int l_type);
 STATICFNDCL void relinkctl_delete(open_relinkctl_sgm *linkctl);
 
+#define SLASH_GTM_RELINKCTL	"/gtm-relinkctl-"
+#define SLASH_GTM_RELINKCTL_LEN	STRLEN(SLASH_GTM_RELINKCTL)
+#define MAX_RCTL_OPEN_RETRIES	16
+
+error_def(ERR_FILEPARSE);
 error_def(ERR_PERMGENFAIL);
 error_def(ERR_RELINKCTLERR);
 error_def(ERR_RELINKCTLFULL);
@@ -76,18 +88,21 @@ error_def(ERR_TEXT);
  *
  * Parameters:
  *   - obj_container_name - object container name string
+ *   - objpath            - object name string
+ *   - objpath_alloc_len  - length of the buffer where the resolved path to the object directory is to be placed in case of MUPIP
+ *                          RUNDOWN -RELINKCTL
  *
  * Output:
  *   - Found or newly created private structure which points to shared relink control structure
  */
-open_relinkctl_sgm *relinkctl_attach(mstr *obj_container_name)
+open_relinkctl_sgm *relinkctl_attach(mstr *obj_container_name, mstr *objpath, int objpath_alloc_len)
 {
-	open_relinkctl_sgm 	*linkctl, *new_link;
+	open_relinkctl_sgm 	*linkctl, new_link, *new_link_ptr;
 	int			i, len, save_errno;
 	mstr			objdir;
 	char			pathin[GTM_PATH_MAX], resolvedpath[GTM_PATH_MAX];	/* Includes null terminator char */
 	char			*pathptr;
-	boolean_t		pathfound;
+	boolean_t		obj_dir_found;
 	char			relinkctl_path[GTM_PATH_MAX], *ptr;
 	DCL_THREADGBL_ACCESS;
 
@@ -96,9 +111,9 @@ open_relinkctl_sgm *relinkctl_attach(mstr *obj_container_name)
 	/* Directory name normalization - the directory name must always be the same for purposes of mapping the relinkctl
 	 * file. To accomplish this takes two steps:
 	 *    1. Use realpath() on the directory name to disambiguate it.
-	 *    2. Remove trailing slash(es) so the object directory name.
+	 *    2. Remove trailing slash(es) from the object directory name.
 	 */
-	pathfound = TRUE;				/* Assume we'll find the path */
+	obj_dir_found = TRUE;				/* Assume we will find the path */
 	assert(GTM_PATH_MAX > obj_container_name->len);	/* Should have been checked by our caller */
 	memcpy(pathin, obj_container_name->addr, obj_container_name->len);
 	pathin[obj_container_name->len] = '\0';		/* Needs null termination for realpath call */
@@ -107,56 +122,89 @@ open_relinkctl_sgm *relinkctl_attach(mstr *obj_container_name)
 	{
 		if (ENOENT == (save_errno = errno))	/* Note assignment */
 		{
-			pathfound = FALSE;		/* Path no longer exists - use our best attempt to find it */
+			obj_dir_found = FALSE;		/* Path no longer exists - use our best attempt to find it */
 			pathptr = pathin;
 		} else
-			/* This error is appropriate here as the directory was checked in the caller before coming here
+		{	/* This error is appropriate here as the directory was checked in the caller before coming here
 			 * so this error is "just-in-case".
 			 */
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("realpath()"), CALLFROM,
-				      save_errno);
+			if (NULL != objpath)
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_FILEPARSE, 2,
+						objpath->len, objpath->addr, save_errno);
+			else
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5,
+						RTS_ERROR_LITERAL("realpath()"), CALLFROM, save_errno);
+		}
 	}
 	objdir.addr = pathptr;
-	objdir.len = strlen(pathptr);
+	objdir.len = STRLEN(pathptr);
 	assert(objdir.len < ARRAYSIZE(resolvedpath));
+	assert((0 == objpath_alloc_len) || TREF(is_mu_rndwn_rlnkctl));
+	if (TREF(is_mu_rndwn_rlnkctl) && (0 < objpath_alloc_len))
+	{	/* In case MUPIP RUNDOWN -RELINKCTL is done on an argument with a relative path, provide it with the full path. In
+		 * case the object directory is not found, set the length of the passed mstr to 0, but only if the objpath_alloc_len
+		 * argument is non-zero.
+		 */
+		if (!obj_dir_found)
+			obj_container_name->len = 0;
+		else if (objdir.len <= objpath_alloc_len)
+		{
+			memcpy(obj_container_name->addr, objdir.addr, objdir.len);
+			obj_container_name->len = objdir.len;
+		}
+	}
 	while ((1 < objdir.len) && ('/' == *(objdir.addr + objdir.len - 1)))
 		objdir.len--;
-	/* Now look the directory up in our list to see if we have it or not already*/
+	objdir.addr[objdir.len] = '\0';
+	/* Now look the directory up in our list to see if we have it or not already. */
 	for (linkctl = TREF(open_relinkctl_list); NULL != linkctl; linkctl = linkctl->next)
-	{
 		if (MSTR_EQ(&objdir, &linkctl->zro_entry_name))
 			return linkctl;
-	}
-	/* If realpath() didn't find the path and we don't already have it open, don't create a relinkctl file for it. Note if
-	 * the caller is op_zrupdate(), very shortly we are going to try to use the errno value set above in realpath(). If
-	 * anything gets added to this module between the realpath() above and here, a different mechanism for passing errno
-	 * needs to be found.
+	/* Populate the relinkctl segment structure locally rather than in malloced space, so that in case relinkctl_open() below
+	 * fails we do not leak memory.
 	 */
-	if (!pathfound)
-		return NULL;
-	/* Not already open */
 	len = relinkctl_get_key(relinkctl_path, &objdir) + 1;	/* + 1 for trailing null in relinkctl_path */
-	assert(len <= ARRAYSIZE(relinkctl_path));
-	new_link = malloc(SIZEOF(open_relinkctl_sgm) + objdir.len + 1 + len);	/* + 1 for trailing null in zro_entry_name */
-	memset(new_link, 0, SIZEOF(open_relinkctl_sgm));
-	new_link->zro_entry_name.len = objdir.len;
-	new_link->zro_entry_name.addr = ptr = (char *)(new_link + 1);
-	memcpy(ptr, objdir.addr, objdir.len);
-	ptr += objdir.len;
-	*ptr++ = '\0';	/* trailing null for "new_link->zro_entry_name" */
-	new_link->relinkctl_path = ptr;
-	memcpy(ptr, relinkctl_path, len);
-	assert('\0' == new_link->relinkctl_path[len - 1]);
+	assert((len <= ARRAYSIZE(relinkctl_path)) && ('\0' == relinkctl_path[len - 1]));
+	memset(&new_link, 0, SIZEOF(open_relinkctl_sgm));
+	new_link.zro_entry_name = objdir;
+	assert('\0' == new_link.zro_entry_name.addr[new_link.zro_entry_name.len]);
+	new_link.relinkctl_path = relinkctl_path;
+	assert('\0' == new_link.relinkctl_path[len - 1]);
 	for (i = 0; i < NUM_RTNOBJ_SHM_INDEX; i++)
-		new_link->rtnobj_shmid[i] = INVALID_SHMID;
-	/* Open + map structure */
-	relinkctl_open(new_link);	/* initializes new_link->fd, new_link->hdr, new_link->n_records,
-					 * new_link->rec_base, new_link->shm_hashbase and new_link->locked
-					 */
-	/* Add to open list */
-	new_link->next = TREF(open_relinkctl_list);
-	TREF(open_relinkctl_list) = new_link;
-	return new_link;
+		new_link.rtnobj_shmid[i] = INVALID_SHMID;
+	/* Now call relinkctl_open() to initialize new_link.fd, new_link.hdr, new_link.n_records, new_link.rec_base,
+	 * new_link.shm_hashbase, and new_link.locked. Note that in situations when the object file is not found, the call will
+	 * return a non-zero status, giving us a chance to return NULL.
+	 *
+	 * We do that because it is possible that although realpath() did not find the object and we have never opened its relinkctl
+	 * file (derived in case of ZRUPDATE from the user-provided input, which might actually not be the real path), the relinkctl
+	 * file was already created by a different process. Only if relinkctl_open() fails do we return NULL.
+	 *
+	 * Keep in mind that if the caller of relinkctl_attach() is op_zrupdate(), very shortly upon return we are going to attempt
+	 * to use the errno value set above in realpath(), so we need to restore it here first.
+	 *
+	 * It is also possible to get a non-zero return status if the caller is MUPIP RUNDOWN -RELINKCTL and the relinkctl file does
+	 * not exist and therefore does not need to be run down.
+	 */
+	if (0 != relinkctl_open(&new_link, !obj_dir_found))
+	{
+		if (!obj_dir_found)
+			errno = save_errno;
+		return NULL;
+	}
+	/* No errors were raised so far, so copy the segment information into a malloced space. */
+	new_link_ptr = malloc(SIZEOF(open_relinkctl_sgm) + objdir.len + 1 + len); /* + 1 for trailing null in zro_entry_name */
+	memcpy(new_link_ptr, &new_link, SIZEOF(open_relinkctl_sgm));
+	ptr = (char *)(new_link_ptr + 1);
+	memcpy(ptr, new_link.zro_entry_name.addr, new_link.zro_entry_name.len + 1);
+	new_link_ptr->zro_entry_name.addr = ptr;
+	ptr += new_link.zro_entry_name.len + 1;
+	memcpy(ptr, new_link.relinkctl_path, len);
+	new_link_ptr->relinkctl_path = ptr;
+	/* Add to open list. */
+	new_link_ptr->next = TREF(open_relinkctl_list);
+	TREF(open_relinkctl_list) = new_link_ptr;
+	return new_link_ptr;
 #	else
 	return NULL;
 #	endif
@@ -165,91 +213,110 @@ open_relinkctl_sgm *relinkctl_attach(mstr *obj_container_name)
 /* Routine to open and mmap a relinkctl file for a given $ZROUTINES object directory.
  *
  * Parameter:
- *    linkctl - open_relinkctl_sgm (process private) block describing shared (mmap'd) entry and supplying the path/name
- *              of the relinkctl file comprised of both static and hashed directory name values for uniqueness.
+ *   - linkctl            - open_relinkctl_sgm-type (process-private) block describing shared (mmap'd) entry and supplying the path
+ *                          and name of the relinkctl file comprised of both static and hashed directory names for uniqueness.
+ *   - object_dir_missing - flag indicating whether we know for a fact that the object directory we are operating on does not exist.
  *
  * Returns:
  *    Various fields in linkctl (fd, hdr).
  *
  * The control structure should be both readable *and* writable by anything that can read the object directory.
  */
-void relinkctl_open(open_relinkctl_sgm *linkctl)
+int relinkctl_open(open_relinkctl_sgm *linkctl, boolean_t object_dir_missing)
 {
 #	ifdef AUTORELINK_SUPPORTED
-	int			fd, i, j, rc, save_errno, shmid, status, retries;
+	int			fd, i, j, rc, save_errno, shmid, status, stat_res, user_id, group_id, perm;
 	struct stat     	stat_buf;
 	size_t			shm_size;
-	boolean_t		is_mu_rndwn_rlnkctl, shm_removed;
+	boolean_t		is_mu_rndwn_rlnkctl, shm_removed, obtained_perms, rctl_existed, need_shmctl;
 	relinkshm_hdr_t		*shm_base;
 	rtnobjshm_hdr_t		*rtnobj_shm_hdr;
 	relinkctl_data		*hdr;
 	char			errstr[256];
 	struct stat		dir_stat_buf;
-	int			stat_res;
-	int			user_id;
-	int			group_id;
-	int			perm;
-	struct perm_diag_data	pdd;
+	int			rctl_deleted_count, rctl_rundown_count, rctl_init_wait_count;
 	struct shmid_ds		shmstat;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
 	linkctl->hdr = NULL;
-	/* open the given relinkctl file */
+	/* Open the given relinkctl file. */
 	DBGARLNK((stderr, "relinkctl_open: pid = %d : Opening relinkctl file %s for entry %.*s\n", getpid(),
 		linkctl->relinkctl_path, linkctl->zro_entry_name.len, linkctl->zro_entry_name.addr));
-	/* Anybody that has read permissions to the object container should have write permissions to the relinkctl file */
-	retries = 0;
+	/* Anybody that has read permissions to the object container should have write permissions to the relinkctl file. */
+	rctl_deleted_count = rctl_rundown_count = rctl_init_wait_count = 0;
 	is_mu_rndwn_rlnkctl = TREF(is_mu_rndwn_rlnkctl);
 	do
-	{
-		assert('\0' == linkctl->zro_entry_name.addr[linkctl->zro_entry_name.len]);	/* needed for STAT_FILE */
-		STAT_FILE(linkctl->zro_entry_name.addr, &dir_stat_buf, stat_res);
+	{	/* We do not need to check the existence of the actual object directory if we verify that the respective relinkctl
+		 * file has already been created.
+		 */
+		STAT_FILE(linkctl->relinkctl_path, &stat_buf, stat_res);
 		if (-1 == stat_res)
 		{
-			SNPRINTF(errstr, SIZEOF(errstr), "stat() of file %s failed", linkctl->zro_entry_name.addr);
-			ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, errno);
-		}
-		if (gtm_permissions(&dir_stat_buf, &user_id, &group_id, &perm, PERM_IPC, &pdd) < 0)
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(10) ERR_RELINKCTLERR, 2, RTS_ERROR_MSTR(&linkctl->zro_entry_name),
-					ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("relinkctl"),
-					RTS_ERROR_MSTR(&linkctl->zro_entry_name));
-		}
-		/* Attempt to create file with desired permissions */
-		fd = OPEN3(linkctl->relinkctl_path, O_CREAT | O_RDWR | O_EXCL, perm);
-		/* If file created, set owner/group, if needed */
-		if ((FD_INVALID != fd)
-			&& (((-1 != user_id) && (user_id != stat_buf.st_uid))
-				|| ((-1 != group_id) && (group_id != stat_buf.st_gid)))
-			&& (-1 == fchown(fd, user_id, group_id)))
+			if (ENOENT != errno)
+			{	/* If the STAT call failed for a reason other than ENOENT, we will be unable to use the relinkctl
+				 * file, so error out right away.
+			 	 */
+				SNPRINTF(errstr, SIZEOF(errstr), "stat() of file %s failed", linkctl->relinkctl_path);
+				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, errno);
+			} else
+			{	/* If the relinkctl file is missing, then we are not going to create one if either the object
+				 * directory does not exist or we are a MUPIP RUNDOWN -RELINKCTL process.
+				 */
+				if (object_dir_missing || is_mu_rndwn_rlnkctl)
+					return -1;
+				/* We have to create a relinkctl file. We derive the permissions to use based on those of the object
+				 * directory.
+				 */
+				assert('\0' == linkctl->zro_entry_name.addr[linkctl->zro_entry_name.len]); /* For STAT_FILE. */
+				STAT_FILE(linkctl->zro_entry_name.addr, &dir_stat_buf, stat_res);
+				if (-1 == stat_res)
+				{
+					SNPRINTF(errstr, SIZEOF(errstr), "stat() of file %s failed", linkctl->zro_entry_name.addr);
+					ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, errno);
+				}
+				gtm_permissions(&dir_stat_buf, &user_id, &group_id, &perm, PERM_IPC);
+				/* Attempt to create the relinkctl file with desired permissions. */
+				fd = OPEN3(linkctl->relinkctl_path, O_CREAT | O_RDWR | O_EXCL, perm);
+				obtained_perms = TRUE;
+			}
+		} else
+			obtained_perms = FALSE;
+		assert((!obtained_perms) || (!object_dir_missing));
+		/* If file already existed, try to open it. */
+		if ((!obtained_perms) || ((FD_INVALID == fd) && (errno == EEXIST)))
 		{
-			save_errno = errno;
-			CLOSEFILE_RESET(fd, rc);
-			SNPRINTF(errstr, SIZEOF(errstr), "fchown() of file %s failed", linkctl->relinkctl_path);
-			ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
-		}
-		if ((FD_INVALID == fd) && (errno == EEXIST))
-		{	/* file already existed, open existing */
-			fd = OPEN3(linkctl->relinkctl_path, O_CREAT | O_RDWR, 0);
-		}
+			rctl_existed = TRUE;
+			fd = OPEN(linkctl->relinkctl_path, O_RDWR);
+		} else
+			rctl_existed = FALSE;
 		if (FD_INVALID == fd)
-		{
+		{	/* If the file that we have previously seen is now gone, retry. However, avoid an infinite loop. */
+			if (rctl_existed && (ENOENT == errno) && (MAX_RCTL_DELETED_RETRIES > rctl_deleted_count++))
+				continue;
 			SNPRINTF(errstr, SIZEOF(errstr), "open() of file %s failed", linkctl->relinkctl_path);
 			ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, errno);
+		} else if (obtained_perms)
+		{	/* If we just created the relinkctl file, ensure correct permissions on it. */
+			FSTAT_FILE(fd, &stat_buf, status);
+			if (0 != status)
+			{
+				save_errno = errno;
+				CLOSEFILE_RESET(fd, rc);
+				SNPRINTF(errstr, SIZEOF(errstr), "fstat() of file %s failed", linkctl->relinkctl_path);
+				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
+			}
+			if ((((INVALID_UID != user_id) && (user_id != stat_buf.st_uid))
+					|| ((INVALID_GID != group_id) && (group_id != stat_buf.st_gid)))
+				&& (-1 == fchown(fd, user_id, group_id)))
+			{
+				save_errno = errno;
+				CLOSEFILE_RESET(fd, rc);
+				SNPRINTF(errstr, SIZEOF(errstr), "fchown() of file %s failed", linkctl->relinkctl_path);
+				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
+			}
 		}
-
 		linkctl->fd = fd;
-		relinkctl_lock_exclu(linkctl);
-
-		FSTAT_FILE(fd, &stat_buf, status);
-		if (0 != status)
-		{
-			save_errno = errno;
-			CLOSEFILE_RESET(fd, rc);
-			SNPRINTF(errstr, SIZEOF(errstr), "fstat() of file %s failed", linkctl->relinkctl_path);
-			ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
-		}
 		if (RELINKCTL_MMAP_SZ != stat_buf.st_size)
 		{
 			DBGARLNK((stderr, "relinkctl_open: file size = %d\n", stat_buf.st_size));
@@ -259,7 +326,6 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 				if (0 != rc)
 				{
 					save_errno = errno;
-					relinkctl_unlock_exclu(linkctl);
 					SNPRINTF(errstr, SIZEOF(errstr), "ftruncate() of file %s failed", linkctl->relinkctl_path);
 					ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
 				}
@@ -267,23 +333,38 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 		}
 		relinkctl_map(linkctl);	/* linkctl->hdr is now accessible */
 		hdr = linkctl->hdr;
+		if (!hdr->initialized && rctl_existed && (MAX_RCTL_INIT_WAIT_RETRIES > rctl_init_wait_count++))
+		{	/* The creator process has not yet initialized the shared memory for the relinkctl file; give it a chance to
+			 * do so before proceeding with grabbing the lock.
+			 */
+			relinkctl_unmap(linkctl);
+			SLEEP_USEC(1000, FALSE);
+			continue;
+		}
+		relinkctl_lock_exclu(linkctl);
 		if (hdr->file_deleted)
-		{	/* Some other process concurrently opened and closed/deleted the relinkctl file while
-			 * we were still inside relinkctl_open. Reattach to new file (create it if necessary)
-			 * instead of using the current fd as this wont be visible to other new processes.
+		{	/* Some other process concurrently opened and closed/rundown the relinkctl file while we were still inside
+			 * relinkctl_open(). Reattach to new file (create it if necessary) instead of using the current fd as this
+			 * will not be visible to other new processes.
 			 */
 			DBGARLNK((stderr, "relinkctl_open: file_deleted = 1. Retrying open.\n"));
 			relinkctl_unlock_exclu(linkctl);
 			relinkctl_unmap(linkctl);
 			assert(NULL == linkctl->hdr);
-			assertpro(16 > retries++);	/* too many loops is not practically possible. prevent infinite loops */
+			assertpro(MAX_RCTL_RUNDOWN_RETRIES > rctl_rundown_count++); /* Too many loops should not be possible. */
 			continue;
 		}
-		shm_size = RELINKCTL_SHM_SIZE;
-		ADJUST_SHM_SIZE_FOR_HUGEPAGES(shm_size, shm_size); /* second parameter "shm_size" is adjusted size */
+		if (0 == hdr->relinkctl_max_rtn_entries)
+		{
+			hdr->relinkctl_max_rtn_entries = TREF(gtm_autorelink_ctlmax);
+			hdr->relinkctl_hash_buckets = getprime(TREF(gtm_autorelink_ctlmax));
+		} else
+			assert(hdr->relinkctl_hash_buckets == getprime(hdr->relinkctl_max_rtn_entries));
+		shm_size = RELINKCTL_SHM_SIZE(hdr->relinkctl_hash_buckets, hdr->relinkctl_max_rtn_entries);
+		ADJUST_SHM_SIZE_FOR_HUGEPAGES(shm_size, shm_size); /* Second parameter "shm_size" is adjusted size */
 		if (hdr->initialized)
-		{	/* Not creator of shared memory. Need to attach to shared memory.
-			 * Need lock (already obtained) to prevent interaction with concurrent initialization, nattached = 0.
+		{	/* There is an existing shared memory segment, to which we need to attach. Need lock (already obtained) to
+			 * prevent interaction with concurrent initialization, nattached = 0.
 			 */
 			shmid = hdr->relinkctl_shmid;
 			DBGARLNK((stderr, "relinkctl_open: file already initialized : pre-increment hdr->nattached = %d"
@@ -297,35 +378,43 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 			{
 				save_errno = errno;
 				shm_removed = SHM_REMOVED(save_errno);
-				/* If shm has been removed, then direct one to use MUPIP RUNDOWN -RELINKCTL */
+				/* If shm has been removed, then direct one to use MUPIP RUNDOWN -RELINKCTL. */
+				if (!is_mu_rndwn_rlnkctl)
+					relinkctl_lock_exclu(linkctl);
 				if (!shm_removed || !is_mu_rndwn_rlnkctl)
 				{
-					if (!is_mu_rndwn_rlnkctl)
-						relinkctl_lock_exclu(linkctl);
 					hdr->nattached--;
 					relinkctl_unlock_exclu(linkctl);
 					relinkctl_unmap(linkctl);
+					SNPRINTF(errstr, SIZEOF(errstr), "shmat() failed for shmid=%d shmsize=%llu [0x%llx]",
+						shmid, shm_size, shm_size);
 					if (!shm_removed)
-					{
-						SNPRINTF(errstr, SIZEOF(errstr), "shmat() failed for "
-							"shmid=%d shmsize=%llu [0x%llx]", shmid, shm_size, shm_size);
 						ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
-					} else
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_REQRLNKCTLRNDWN, 2,
-									RTS_ERROR_MSTR(&linkctl->zro_entry_name));
+					else
+						ISSUE_REQRLNKCTLRNDWN_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
 				} else
-				{	/* This is MUPIP RUNDOWN -RELINKCTL and shm is removed. Run this relinkctl file down. */
-					DBGARLNK((stderr, "relinkctl_open: Set hdr->initialized to FALSE\n"));
-					hdr->initialized = FALSE;
+				{	/* This is MUPIP RUNDOWN -RELINKCTL and shm is removed. There is no point creating one. */
+					DBGARLNK((stderr, "relinkctl_open: Set hdr->relinkctl_shmid to INVALID_SHMID\n"));
+					hdr->relinkctl_shmid = INVALID_SHMID;
+					return 0;
 				}
 			}
-		}
-		if (!hdr->initialized)
-		{
+		} else if (!is_mu_rndwn_rlnkctl)
+		{	/* We have come here ahead of the process that has created the relinkctl file even though we have slept many
+			 * times, giving the creator a chance to grab the lock. So if we did not obtain the permissions of the
+			 * object directory, we have no permissions to apply on a shared memory segment we are about to create;
+			 * therefore, error out.
+			 */
+			if (!obtained_perms)
+			{
+				relinkctl_unlock_exclu(linkctl);
+				relinkctl_unmap(linkctl);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_REQRLNKCTLRNDWN, 2,
+						RTS_ERROR_MSTR(&linkctl->zro_entry_name));
+			}
 			DBGARLNK((stderr, "relinkctl_open: file first open\n"));
 			hdr->n_records = 0;
 			/* Create shared memory to store hash buckets of routine names for faster search in relinkctl file */
-			assert(RELINKCTL_HASH_BUCKETS == getprime(RELINKCTL_MAX_ENTRIES));
 			shmid = shmget(IPC_PRIVATE, shm_size, RWDALL | IPC_CREAT);
 			if (-1 == shmid)
 			{
@@ -347,13 +436,25 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 					shmid, shm_size, shm_size);
 				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
 			}
-			/* change group and permissions */
-			if ((-1 != user_id) && (user_id != shmstat.shm_perm.uid))
+			assert(obtained_perms);
+			/* Change uid, group-id and permissions if needed */
+			need_shmctl = FALSE;
+			if ((INVALID_UID != user_id) && (user_id != shmstat.shm_perm.uid))
+			{
 				shmstat.shm_perm.uid = user_id;
-			if ((-1 != group_id) && (group_id != shmstat.shm_perm.gid))
+				need_shmctl = TRUE;
+			}
+			if ((INVALID_GID != group_id) && (group_id != shmstat.shm_perm.gid))
+			{
 				shmstat.shm_perm.gid = group_id;
-			shmstat.shm_perm.mode = perm;
-			if (-1 == shmctl(shmid, IPC_SET, &shmstat))
+				need_shmctl = TRUE;
+			}
+			if (shmstat.shm_perm.mode != perm)
+			{
+				shmstat.shm_perm.mode = perm;
+				need_shmctl = TRUE;
+			}
+			if (need_shmctl && (-1 == shmctl(shmid, IPC_SET, &shmstat)))
 			{
 				save_errno = errno;
 				relinkctl_delete(linkctl);
@@ -384,9 +485,15 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 			memset(shm_base, 0, shm_size);
 			strcpy(shm_base->relinkctl_fname, linkctl->relinkctl_path);
 			shm_base->min_shm_index = TREF(relinkctl_shm_min_index);
+			/* Since search for a routine proceeds to check all rtnobj shmids from rtnobj_min_shm_index to
+			 * rtnobj_max_shm_index, set the two to impossible values so creation of the first rtnobj shmid
+			 * (whatever its shm_index turns out to be) causes these two to be overwritten to that shm_index.
+			 * Since rtnobj_min_shm_index is overwritten only if it is greater than shm_index, we set it to
+			 * one more than the highest value possible for shm_index i.e. NUM_RTNOBJ_SHM_INDEX. Likewise for
+			 * rtnobj_max_shm_index.
+			 */
 			shm_base->rtnobj_min_shm_index = NUM_RTNOBJ_SHM_INDEX;
 			shm_base->rtnobj_max_shm_index = 0;
-			shm_base->rtnobj_shmid_cycle = 0;
 			shm_base->rndwn_adjusted_nattch = FALSE;
 			DEBUG_ONLY(shm_base->skip_rundown_check = FALSE;)
 			for (i = 0; i < NUM_RTNOBJ_SHM_INDEX; i++)
@@ -405,12 +512,18 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 			hdr->zro_entry_name_len = MIN(linkctl->zro_entry_name.len, ARRAYSIZE(hdr->zro_entry_name) - 1);
 			memcpy(hdr->zro_entry_name, linkctl->zro_entry_name.addr, hdr->zro_entry_name_len);
 			hdr->zro_entry_name[hdr->zro_entry_name_len] = '\0';
-			/* shared memory initialization complete */
+			/* Shared memory initialization complete. */
 			hdr->initialized = TRUE;
 			relinkctl_unlock_exclu(linkctl);
-		} else if (is_mu_rndwn_rlnkctl)
-			relinkctl_unlock_exclu(linkctl);
-		assert(!linkctl->locked);
+		} else
+		{	/* This is MUPIP RUNDOWN -RELINKCTL and relinkctl file exists but the shared memory does not. We are not
+			 * going to create the shared memory to only later run it down.
+			 */
+			DBGARLNK((stderr, "relinkctl_open: Set hdr->relinkctl_shmid to INVALID_SHMID\n"));
+			hdr->relinkctl_shmid = INVALID_SHMID;
+			return 0;
+		}
+		assert(linkctl->locked == is_mu_rndwn_rlnkctl);
 		assert(0 == ((UINTPTR_T)shm_base % 8));
 		assert(0 == (SIZEOF(relinkshm_hdr_t) % SIZEOF(uint4)));	/* assert SIZEOF(*sm_uint_ptr_t) alignment */
 #		ifdef DEBUG
@@ -418,15 +531,17 @@ void relinkctl_open(open_relinkctl_sgm *linkctl)
 			shm_base->skip_rundown_check = TRUE;
 #		endif
 		linkctl->shm_hashbase = (sm_uint_ptr_t)(sm_uc_ptr_t)(shm_base + 1);
-			/* skip past shm header to reach hash array start */
+			/* Skip past shm header to reach hash array start */
 		assert(0 == ((UINTPTR_T)linkctl->shm_hashbase % 8));	/* assert each section is 8-byte aligned at least */
-		assert(1 == RELINKCTL_HASH_BUCKETS % 2); /* RELINKSHM_RTNHASH_SIZE definition relies on this for 8-byte alignment */
-		linkctl->rec_base = (relinkrec_t *)((sm_uc_ptr_t)linkctl->shm_hashbase + RELINKSHM_RTNHASH_SIZE);
+		/* RELINKSHM_RTNHASH_SIZE definition relies on this for 8-byte alignment */
+		linkctl->rec_base = (relinkrec_t *)((sm_uc_ptr_t)linkctl->shm_hashbase
+						    + RELINKSHM_RTNHASH_SIZE(hdr->relinkctl_hash_buckets));
 		assert(128 >= SIZEOF(relinkrec_t));	/* or else adjust CACHELINE_PAD_COND filler downwards */
 		assert(0 == ((UINTPTR_T)linkctl->rec_base % 8));	/* assert each section is 8-byte aligned at least */
 		break;
 	} while (TRUE);
 #	endif
+	return 0;
 }
 
 #ifdef AUTORELINK_SUPPORTED
@@ -467,15 +582,25 @@ int relinkctl_get_key(char key[GTM_PATH_MAX], mstr *zro_entry_name)
 	gtm_uint16	hash;
 	unsigned char	hexstr[33];
 	int		keylen;
+	char		*key_ptr;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
 	gtmmrhash_128(zro_entry_name->addr, zro_entry_name->len, 0, &hash);
 	gtmmrhash_128_hex(&hash, hexstr);
 	hexstr[32] = '\0';
-	/* TODO: Improve efficiency - use memcpy to build string and provide better max-length checking than an assert */
-	keylen = SNPRINTF(&key[0], GTM_PATH_MAX - 1, "%.*s/gtm-relinkctl-%s", (TREF(gtm_linktmpdir)).len,
-			  (TREF(gtm_linktmpdir)).addr, hexstr);
+	/* If the cumulative path to the relinkctl file exceeds GTM_PATH_MAX, it will be inaccessible, so no point continuing. */
+	if (GTM_PATH_MAX < (TREF(gtm_linktmpdir)).len + SLASH_GTM_RELINKCTL_LEN + SIZEOF(hexstr))
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_RELINKCTLERR, 2, RTS_ERROR_MSTR(zro_entry_name),
+				ERR_TEXT, 2, RTS_ERROR_LITERAL("Path to the relinkctl file is too long"));
+	key_ptr = key;
+	memcpy(key_ptr, (TREF(gtm_linktmpdir)).addr, (TREF(gtm_linktmpdir)).len);
+	key_ptr += (TREF(gtm_linktmpdir)).len;
+	STRCPY(key_ptr, SLASH_GTM_RELINKCTL);
+	key_ptr += SLASH_GTM_RELINKCTL_LEN;
+	STRNCPY_STR(key_ptr, hexstr, 33); /* NULL-terminate the string. */
+	key_ptr += 32;
+	keylen = (key_ptr - key);
 	assert((0 < keylen) && (GTM_PATH_MAX > keylen));
 	return keylen;
 }
@@ -592,17 +717,55 @@ STATICFNDEF int relinkctl_fcntl_lock(int fd, int l_type)
 #endif
 
 #ifdef AUTORELINK_SUPPORTED
-/**
+/*
  * Relinkctl file record management routines
  */
 
+/* Iterate through each relink_record_struct starting at (relink_record_ptr)&linkctl->map_addr[0]
+ * Find rec such that rec->rtnname == rtnname, return offset of rec.
+ * Otherwise, return NOMATCH (defined 0xffff..).
+ */
+relinkrec_t *relinkctl_find_record(open_relinkctl_sgm *linkctl, mstr *rtnname, uint4 hash, uint4 *prev_hash_index)
+{
+	relinkrec_t		*rec, *base;
+	unsigned int		nrec, index;
+	sm_uint_ptr_t		ptr;
+	uint4			rtnhash, prev_index;
+
+	assert(valid_mname(rtnname));
+	linkctl->n_records = linkctl->hdr->n_records;	/* Make sure we search among all currently existing records */
+	ptr = linkctl->shm_hashbase;
+	assert(linkctl->hdr->relinkctl_hash_buckets > hash);
+	ptr += hash;
+	prev_index = *ptr;
+	index = prev_index - 1;	/* 'index' is unsigned so will become huge positive number in case *ptr is 0 */
+	base = linkctl->rec_base;
+	nrec = linkctl->n_records;
+	assert(linkctl->hdr->relinkctl_max_rtn_entries >= nrec);
+	while (index < nrec)
+	{
+		rec = &base[index];
+		DEBUG_ONLY(COMPUTE_RELINKCTL_HASH(rtnname, rtnhash, linkctl->hdr->relinkctl_hash_buckets);)
+		assert(rtnhash == hash);
+		/* Check routine name plus null trailer in fixed version */
+		if ((0 == memcmp(&rec->rtnname_fixed.c, rtnname->addr, rtnname->len))
+				&& ('\0' == rec->rtnname_fixed.c[rtnname->len]))
+			return rec;
+		assert(linkctl->hdr->relinkctl_max_rtn_entries >= rec->hashindex_fl);
+		prev_index = index + 1;
+		index = rec->hashindex_fl - 1;
+	}
+	*prev_hash_index = prev_index;
+	return NULL;
+}
+
 /* Like relinkctl_find_record, but inserts a new entry instead of returning NULL */
 relinkrec_t *relinkctl_insert_record(open_relinkctl_sgm *linkctl, mstr *rtnname)
 {
 	relinkrec_t	*base, *rec;
 	uint4		hash, prev_hash_index, nrec;
 
-	COMPUTE_RELINKCTL_HASH(rtnname, hash);
+	COMPUTE_RELINKCTL_HASH(rtnname, hash, linkctl->hdr->relinkctl_hash_buckets);
 	rec = relinkctl_find_record(linkctl, rtnname, hash, &prev_hash_index);
 	if (NULL == rec)
 	{	/* Record not found while not under lock - lock it and try again */
@@ -613,11 +776,11 @@ relinkrec_t *relinkctl_insert_record(open_relinkctl_sgm *linkctl, mstr *rtnname)
 			assert(linkctl->locked);
 			nrec = linkctl->n_records;
 			assert(nrec == linkctl->hdr->n_records);	/* Assured by relinkctl_find_record() */
-			if (RELINKCTL_MAX_ENTRIES == linkctl->hdr->n_records)
+			if (linkctl->hdr->relinkctl_max_rtn_entries == linkctl->hdr->n_records)
 			{
 				relinkctl_unlock_exclu(linkctl);
 				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_RELINKCTLFULL, 3, linkctl->zro_entry_name.len,
-					      linkctl->zro_entry_name.addr, RELINKCTL_MAX_ENTRIES);
+					      linkctl->zro_entry_name.addr, linkctl->hdr->relinkctl_max_rtn_entries);
 			}
 			base = linkctl->rec_base;
 			rec = base + nrec;
@@ -644,44 +807,6 @@ relinkrec_t *relinkctl_insert_record(open_relinkctl_sgm *linkctl, mstr *rtnname)
 	}
 	return rec;
 }
-
-/* Iterate through each relink_record_struct starting at (relink_record_ptr)&linkctl->map_addr[0]
- * Find rec s.t. rec->rtnname == rtnname, return offset of rec.
- * Otherwise, return NOMATCH (defined 0xffff..).
- */
-relinkrec_t *relinkctl_find_record(open_relinkctl_sgm *linkctl, mstr *rtnname, uint4 hash, uint4 *prev_hash_index)
-{
-	relinkrec_t		*rec, *base;
-	unsigned int		nrec, index;
-	sm_uint_ptr_t		ptr;
-	uint4			rtnhash, prev_index;
-
-	assert(valid_mname(rtnname));
-	linkctl->n_records = linkctl->hdr->n_records;	/* Make sure we search among all currently existing records */
-	ptr = linkctl->shm_hashbase;
-	assert(RELINKCTL_HASH_BUCKETS > hash);
-	ptr += hash;
-	prev_index = *ptr;
-	index = prev_index - 1;	/* 'index' is unsigned so will become huge positive number in case *ptr is 0 */
-	base = linkctl->rec_base;
-	nrec = linkctl->n_records;
-	assert(RELINKCTL_MAX_ENTRIES >= nrec);
-	while (index < nrec)
-	{
-		rec = &base[index];
-		DEBUG_ONLY(COMPUTE_RELINKCTL_HASH(rtnname, rtnhash);)
-		assert(rtnhash == hash);
-		/* Check routine name plus null trailer in fixed version */
-		if ((0 == memcmp(&rec->rtnname_fixed.c, rtnname->addr, rtnname->len))
-				&& ('\0' == rec->rtnname_fixed.c[rtnname->len]))
-			return rec;
-		assert(RELINKCTL_MAX_ENTRIES >= rec->hashindex_fl);
-		prev_index = index + 1;
-		index = rec->hashindex_fl - 1;
-	}
-	*prev_hash_index = prev_index;
-	return NULL;
-}
 #endif
 
 /**
@@ -703,7 +828,7 @@ void relinkctl_rundown(boolean_t decr_attached, boolean_t do_rtnobj_shm_free)
 	relinkshm_hdr_t		*shm_hdr;
 	rtnobjshm_hdr_t		*rtnobj_shm_hdr;
 	stack_frame		*fp;
-	boolean_t		is_mu_rndwn_rlnkctl, remove_shm;
+	boolean_t		is_mu_rndwn_rlnkctl, remove_shm, remove_rctl;
 	struct shmid_ds		shm_buf;
 #	ifdef DEBUG
 	relinkrec_t		*linkrec, *linktop;
@@ -756,53 +881,69 @@ void relinkctl_rundown(boolean_t decr_attached, boolean_t do_rtnobj_shm_free)
 				assert(INVALID_SHMID == linkctl->rtnobj_shmid[i]);
 		}
 		if (decr_attached)
-		{
-			relinkctl_lock_exclu(linkctl);
+		{	/* MUPIP RUNDOWN -RELINKCTL should still hold a lock. */
+			assert(linkctl->locked == is_mu_rndwn_rlnkctl);
+			if (!is_mu_rndwn_rlnkctl)
+				relinkctl_lock_exclu(linkctl);
 			hdr = linkctl->hdr;
-			assert(0 < hdr->nattached);
-			if (0 < hdr->nattached)
-				hdr->nattached--;
-			nattached = hdr->nattached;
-			DBGARLNK((stderr, "relinkctl_rundown : pid = %d : file %s : post-decr nattached = %d\n",
-				getpid(), linkctl->relinkctl_path, nattached));
-			assert(0 <= nattached);
-			assert(INVALID_SHMID != hdr->relinkctl_shmid);
-			shm_hdr = GET_RELINK_SHM_HDR(linkctl);
+			assert((INVALID_SHMID != hdr->relinkctl_shmid) || is_mu_rndwn_rlnkctl);
+			if (INVALID_SHMID != hdr->relinkctl_shmid)
+			{
+				assert(0 < hdr->nattached);
+				if (0 < hdr->nattached)
+					hdr->nattached--;
+				nattached = hdr->nattached;
+				DBGARLNK((stderr, "relinkctl_rundown : pid = %d : file %s : post-decr nattached = %d\n",
+					getpid(), linkctl->relinkctl_path, nattached));
+				assert(0 <= nattached);
+				shm_hdr = GET_RELINK_SHM_HDR(linkctl);
+			} else
+				nattached = -1;
 			if (0 == nattached)
 			{
 				DBGARLNK((stderr, "relinkctl_rundown : nattached = 0\n"));
-				remove_shm = TRUE;
+				remove_shm = remove_rctl = TRUE;
 			} else if (is_mu_rndwn_rlnkctl)
 			{	/* If MUPIP RUNDOWN -RELINKCTL, check if shm_buff.nattch is 1 (i.e. mupip rundown -relinkctl
 				 * is the only one attached to this shm). If so, ignore nattached and run this shm down.
-				 * Most likely processees that had bumped nattached got kill -9ed.
+				 * Most likely processes that had bumped nattached got kill -9ed.
 				 * If shm_buff.nattch is not 1, fix hdr->nattached to match shm_buf.nattch so when the time
 				 * comes for the last GTM process to rundown, it will remove the shm without the need for
 				 * any more MUPIP RUNDOWN -RELINKCTL commands.
 				 */
 				shmid = hdr->relinkctl_shmid;
-				if (0 != shmctl(shmid, IPC_STAT, &shm_buf))
+			 	if (INVALID_SHMID != hdr->relinkctl_shmid)
 				{
-					assert(FALSE);
-					remove_shm = FALSE;
-				} else
-				{
-					nattached = shm_buf.shm_nattch - 1; /* remove self since we will do a SHMDT soon */
-					if (hdr->nattached != nattached)
+					if (0 != shmctl(shmid, IPC_STAT, &shm_buf))
+					{
+						assert(FALSE);
+						remove_shm = remove_rctl = FALSE;
+					} else
+					{
+						nattached = shm_buf.shm_nattch - 1; /* remove self since we will do a SHMDT soon */
+						if (hdr->nattached != nattached)
+						{
+							hdr->nattached = nattached;	/* fix hdr->nattached while at this */
+							shm_hdr->rndwn_adjusted_nattch = TRUE;
+						}
+						remove_shm = remove_rctl = !nattached;
+					}
+					if (!remove_shm)
 					{
-						hdr->nattached = nattached;	/* fix hdr->nattached while at this */
-						shm_hdr->rndwn_adjusted_nattch = TRUE;
+						assert(nattached);
+						gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_RLNKCTLRNDWNFL, 3,
+									RTS_ERROR_MSTR(&linkctl->zro_entry_name), nattached);
 					}
-					remove_shm = !nattached;
-				}
-				if (!remove_shm)
+				} else
 				{
-					assert(nattached);
-					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_RLNKCTLRNDWNFL, 3,
-								RTS_ERROR_MSTR(&linkctl->zro_entry_name), nattached);
+					remove_shm = FALSE;
+					remove_rctl = TRUE;
 				}
 			} else
+			{
 				remove_shm = FALSE;
+				remove_rctl = FALSE;
+			}
 			if (remove_shm)
 			{
 #				ifdef DEBUG
@@ -839,7 +980,7 @@ void relinkctl_rundown(boolean_t decr_attached, boolean_t do_rtnobj_shm_free)
 							 */
 							if (0 == shmctl(shmid, IPC_STAT, &shm_buf))
 							{
-							/* We expect no one else to be attached to relinkctl shm. One case we
+							/* We expect no one else to be attached to the rtnobj shm. One case we
 							 * know of is if a process opens a PIPE device and iopi_open forks off
 							 * a child (which would cause shm_nattch to increment implicitly) and
 							 * continues execution issuing say a CRYPTNOSEEK error and exit BEFORE the
@@ -875,14 +1016,17 @@ void relinkctl_rundown(boolean_t decr_attached, boolean_t do_rtnobj_shm_free)
 				SHMDT(shm_hdr);		/* If error detaching, not much we can do. Just move on */
 				shmid = hdr->relinkctl_shmid;
 				shm_rmid(shmid);	/* If error removing shmid, not much we can do. Just move on */
-				relinkctl_delete(linkctl);
-				if (is_mu_rndwn_rlnkctl)
-					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_RLNKCTLRNDWNSUC, 2,
-								RTS_ERROR_MSTR(&linkctl->zro_entry_name));
 			} else
 			{
 				SHMDT(shm_hdr);		/* If error detaching, not much we can do. Just move on */
 			}
+			if (remove_rctl)
+			{
+				relinkctl_delete(linkctl);
+				if (is_mu_rndwn_rlnkctl)
+					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_RLNKCTLRNDWNSUC, 2,
+							RTS_ERROR_MSTR(&linkctl->zro_entry_name));
+			}
 			linkctl->rec_base = NULL;
 			linkctl->shm_hashbase = NULL;
 			relinkctl_unlock_exclu(linkctl);
diff --git a/sr_unix/relinkctl.h b/sr_unix/relinkctl.h
index 84a1bf0..b40aed0 100644
--- a/sr_unix/relinkctl.h
+++ b/sr_unix/relinkctl.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,6 +14,7 @@
 #define RELINKCTL_H_INCLUDED
 
 # include "gtm_limits.h"
+# include "parse_file.h"	/* for MAX_FBUFF */
 
 /* Input RTNNAME is derived from an object file name and we need to convert it to a proper routine name.
  * a) It is possible we got a '_' as the first character in case of a % routine. But the actual routine name stored in
@@ -27,34 +29,26 @@
 		RTNNAME.len = MAX_MIDENT_LEN;		\
 }
 
-#define	COMPUTE_RELINKCTL_HASH(RTNNAME, RTNHASH)		\
-{								\
-	STR_HASH((RTNNAME)->addr, (RTNNAME)->len, RTNHASH, 0);	\
-	RTNHASH = RTNHASH % RELINKCTL_HASH_BUCKETS;		\
+#define	COMPUTE_RELINKCTL_HASH(RTNNAME, RTNHASH, RELINKCTL_HASH_BUCKETS)	\
+{										\
+	STR_HASH((RTNNAME)->addr, (RTNNAME)->len, RTNHASH, 0);			\
+	RTNHASH = RTNHASH % RELINKCTL_HASH_BUCKETS;				\
 }
 
 /* One relinkctl file can contain at most this many # of routines */
-#ifdef DEBUG
-#  define	RELINKCTL_MAX_ENTRIES	(WBTEST_ENABLED(WBTEST_RELINKCTL_MAX_ENTRIES) ? 100 : 1000000)
-#else
-#  define	RELINKCTL_MAX_ENTRIES	1000000
-#endif
-
-/* The first prime # above RELINKCTL_MAX_ENTRIES */
-#ifdef DEBUG
-#  define	RELINKCTL_HASH_BUCKETS	(WBTEST_ENABLED(WBTEST_RELINKCTL_MAX_ENTRIES) ? 101 : 1000003)
-#else
-#  define	RELINKCTL_HASH_BUCKETS	1000003
-#endif
+#  define	RELINKCTL_MAX_ENTRIES		16000000
+#  define	RELINKCTL_MIN_ENTRIES		(WBTEST_ENABLED(WBTEST_RELINKCTL_MAX_ENTRIES) ? 1 : 1000)
+#  define	RELINKCTL_DEFAULT_ENTRIES	(WBTEST_ENABLED(WBTEST_RELINKCTL_MAX_ENTRIES) ? 100 : 50000)
 
 #define	RELINKCTL_MMAP_SZ	((size_t)SIZEOF(relinkctl_data))
 #define	RELINKSHM_HDR_SIZE	((size_t)SIZEOF(relinkshm_hdr_t))
-/* We are guaranteed RELINKCTL_HASH_BUCKETS is an odd prime number and since we want at least 8-byte alignment between different
- * sections of shared memory, we add a 4-byte filler to the RELINKSHM_RTNHASH_SIZE macro computation.
+/* We are guaranteed relinkctl_hash_buckets is an odd prime number and since we want at least 8-byte alignment between different
+ * sections of shared memory, we add a 4-byte filler to the RELINKSHM_RTNHASH_SIZE macro computation (that's why we are adding + 1).
  */
-#define	RELINKSHM_RTNHASH_SIZE	(((size_t)RELINKCTL_HASH_BUCKETS + 1) * SIZEOF(uint4))	/* see above comment for why "+ 1" */
-#define	RELINKSHM_RECARRAY_SIZE	((size_t)RELINKCTL_MAX_ENTRIES * SIZEOF(relinkrec_t))
-#define	RELINKCTL_SHM_SIZE	(RELINKSHM_HDR_SIZE + RELINKSHM_RTNHASH_SIZE + RELINKSHM_RECARRAY_SIZE)
+#define	RELINKSHM_RTNHASH_SIZE(RELINKCTL_HASH_BUCKETS)	(((size_t)RELINKCTL_HASH_BUCKETS + 1) * SIZEOF(uint4))
+#define	RELINKSHM_RECARRAY_SIZE(RELINKCTL_MAX_RTN_ENTRIES)	(((size_t)RELINKCTL_MAX_RTN_ENTRIES) * SIZEOF(relinkrec_t))
+#define	RELINKCTL_SHM_SIZE(RELINKCTL_HASH_BUCKETS, RELINKCTL_MAX_RTN_ENTRIES)	(RELINKSHM_HDR_SIZE	\
+	+ RELINKSHM_RTNHASH_SIZE(RELINKCTL_HASH_BUCKETS) + RELINKSHM_RECARRAY_SIZE(RELINKCTL_MAX_RTN_ENTRIES))
 
 #define	GET_RELINK_SHM_HDR(LINKCTL)	(relinkshm_hdr_t *)((sm_uc_ptr_t)LINKCTL->shm_hashbase - SIZEOF(relinkshm_hdr_t))
 
@@ -98,8 +92,11 @@ error_def(ERR_RLNKRECLATCH);	/* needed for the RELINKCTL_CYCLE_INCR macro */
 #define	RTNOBJ_GET_SHM_OFFSET(SHM_OFF)	(SHM_OFF & 0x03FFFFFFFFFFFFFFULL)
 #define	RTNOBJ_SET_SHM_INDEX_OFF(SHM_INDEX, SHM_OFF)	(((rtnobj_sm_off_t)SHM_INDEX << MAX_RTNOBJ_SHM_INDEX) | (SHM_OFF))
 
-#define	RLNKSHM_LATCH_TIMEOUT_SEC	60	/* Want to wait 60 seconds max */
-#define	RLNKREC_LATCH_TIMEOUT_SEC	60	/* Want to wait 60 seconds max */
+/* For the latch timeouts below, we believe most are likely done within 1 minute but since IO can be done and a failure in one
+ * of these locks is a hard-error, the max is set to 4 mins.
+ */
+#define	RLNKSHM_LATCH_TIMEOUT_SEC	(4 * 60)	/* 4 min */
+#define	RLNKREC_LATCH_TIMEOUT_SEC	(4 * 60)	/* 4 min */
 
 #define	MIN_RTNOBJ_SIZE_BITS	8		      /* Minimum object file size (including SIZEOF(rtnobj_hdr_t)) is 2**8 = 256 */
 #define	MAX_RTNOBJ_SIZE_BITS	MAX_RTNOBJ_SHM_INDEX  /* Maximum object file size (including SIZEOF(rtnobj_hdr_t)) is 2**32
@@ -112,6 +109,10 @@ error_def(ERR_RLNKRECLATCH);	/* needed for the RELINKCTL_CYCLE_INCR macro */
 #define	IS_INSERT		0
 #define	IS_DELETE		1
 
+#define ISSUE_REQRLNKCTLRNDWN_SYSCALL(ZRO_ENTRY_NAME, ERRSTR, ERRNO)						\
+	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(12) ERR_REQRLNKCTLRNDWN, 2, RTS_ERROR_MSTR(ZRO_ENTRY_NAME),	\
+		      ERR_SYSCALL, 5, LEN_AND_STR(ERRSTR), CALLFROM, DEBUG_ONLY(saved_errno = )ERRNO)
+
 #define ISSUE_RELINKCTLERR_SYSCALL(ZRO_ENTRY_NAME, ERRSTR, ERRNO)						\
 	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(12) ERR_RELINKCTLERR, 2, RTS_ERROR_MSTR(ZRO_ENTRY_NAME),		\
 		      ERR_SYSCALL, 5, LEN_AND_STR(ERRSTR), CALLFROM, DEBUG_ONLY(saved_errno = )ERRNO)
@@ -149,7 +150,7 @@ typedef struct relinkrec_struct
 					 */
 } relinkrec_t;
 
-#define	ZRO_DIR_PATH_MAX	255
+#define	ZRO_DIR_PATH_MAX	MAX_FBUFF	/* since "zro_load" which parses $zroutines uses MAX_FBUFF */
 
 /* Shared structure - relinkctl file header */
 typedef struct relinkctl_data_struct
@@ -176,6 +177,8 @@ typedef struct relinkctl_data_struct
 								 * use this to find the corresponding directory.
 								 */
 	int		zro_entry_name_len;	/* strlen of the null-terminated "zro_entry_name" */
+	int		relinkctl_max_rtn_entries;	/* One relinkctl file can contain at most this many of routines */
+	int		relinkctl_hash_buckets;		/* The first prime # above relinkctl_max_rtn_entries */
 } relinkctl_data;
 
 /* Process private structure - describes a relinkctl file. Process private so can be linked into a list in $ZROUTINES order */
@@ -192,11 +195,6 @@ typedef struct open_relinkctl_struct
 	sm_uc_ptr_t			rtnobj_shm_base[NUM_RTNOBJ_SHM_INDEX];
 	int				rtnobj_shmid[NUM_RTNOBJ_SHM_INDEX];
 	int				fd;
-	int				rtnobj_shmid_cycle;	/* copied over from relinkshm_hdr->shmid_cycle after
-								 * ensuring all relinkshm_hdr->shmid[NUM_RTNOBJ_SHM_INDEX] is
-								 * copied over and all those shmids have been successfully
-								 * shmat()ed.
-								 */
 	int				rtnobj_min_shm_index;	/* Copied over from relinkshm_hdr->rtnobj_min_shm_index */
 	int				rtnobj_max_shm_index;	/* Copied over from relinkshm_hdr->rtnobj_max_shm_index */
 } open_relinkctl_sgm;
@@ -225,11 +223,8 @@ typedef struct relinkshm_hdr
 	int		rtnobj_max_shm_index;		/* Maximum 'i' where rtnobj_shmhdr[i-1].rtnobj_shmid is a valid shmid.
 							 * If no rtnobj_shmhdr[i] has valid shmid, this will be set to 0.
 							 */
-	int		rtnobj_shmid_cycle;		/* bumped when rtnobj_shmhdr[i].rtnobj_shmid gets created for some 'i' */
 	boolean_t	rndwn_adjusted_nattch;		/* MUPIP RUNDOWN -RELINKCTL did adjust nattached */
-#	ifdef DEBUG
 	boolean_t	skip_rundown_check;		/* TRUE if at least one process with gtm_autorelink_keeprtn=1 opened this */
-#	endif
 	rtnobjshm_hdr_t	rtnobj_shmhdr[NUM_RTNOBJ_SHM_INDEX];
 	/* CACHELINE_PAD macro usages surrounding the actual latch below provides spacing so updates to the latch do not interfere
 	 * with updates to adjoining fields which can happen if they fall in the same data cacheline of a processor. No
@@ -288,14 +283,14 @@ typedef struct rtnobj_hdr_struct
 /*
  * Prototypes
  */
-open_relinkctl_sgm *relinkctl_attach(mstr *obj_container_name);
-void	relinkctl_incr_nattached(void);
-int relinkctl_get_key(char key[GTM_PATH_MAX], mstr *zro_entry_name);
-relinkrec_t *relinkctl_find_record(open_relinkctl_sgm *linkctl, mstr *rtnname, uint4 hash, uint4 *prev_hash_index);
-relinkrec_t *relinkctl_insert_record(open_relinkctl_sgm *linkctl, mstr *rtnname);
-void relinkctl_open(open_relinkctl_sgm *linkctl);
-void relinkctl_lock_exclu(open_relinkctl_sgm *linkctl);
-void relinkctl_unlock_exclu(open_relinkctl_sgm *linkctl);
-void relinkctl_rundown(boolean_t decr_attached, boolean_t do_rtnobj_shm_free);
+open_relinkctl_sgm	*relinkctl_attach(mstr *obj_container_name, mstr *objpath, int objpath_alloc_len);
+void			relinkctl_incr_nattached(void);
+int			relinkctl_get_key(char key[GTM_PATH_MAX], mstr *zro_entry_name);
+relinkrec_t		*relinkctl_find_record(open_relinkctl_sgm *linkctl, mstr *rtnname, uint4 hash, uint4 *prev_hash_index);
+relinkrec_t		*relinkctl_insert_record(open_relinkctl_sgm *linkctl, mstr *rtnname);
+int			relinkctl_open(open_relinkctl_sgm *linkctl, boolean_t obj_file_missing);
+void			relinkctl_lock_exclu(open_relinkctl_sgm *linkctl);
+void			relinkctl_unlock_exclu(open_relinkctl_sgm *linkctl);
+void			relinkctl_rundown(boolean_t decr_attached, boolean_t do_rtnobj_shm_free);
 
 #endif /* RELINKCTL_H_INCLUDED */
diff --git a/sr_unix/repl_instance.c b/sr_unix/repl_instance.c
index 19c5336..1b9dd5a 100644
--- a/sr_unix/repl_instance.c
+++ b/sr_unix/repl_instance.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -1155,7 +1156,8 @@ void	repl_inst_flush_jnlpool(boolean_t reset_replpool_fields, boolean_t reset_cr
 /* This function determines if this replication instance was formerly a root primary. It finds this out by looking at the
  * last histinfo record in the instance file and comparing the "root_primary_instname" field there with this instance name.
  * If they are the same, it means the last histinfo was generated by this instance and hence was a root primary then. This
- * function will only be invoked by a propagating primary instance (RECEIVER SERVER or ROLLBACK -FETCHRESYNC).
+ * function will only be invoked by a propagating primary instance (RECEIVER SERVER or ROLLBACK -FETCHRESYNC) or a rootprimary
+ * supplementary instance.
  *
  * It returns TRUE only if the instance file header field "was_rootprimary" is TRUE and if the last histinfo record was generated
  * by this instance. It returns FALSE otherwise.
@@ -1179,6 +1181,13 @@ boolean_t	repl_inst_was_rootprimary(void)
 		csa = &FILE_INFO(jnlpool.jnlpool_dummy_reg)->s_addrs;
 		ASSERT_VALID_JNLPOOL(csa);
 		assert(csa->now_crit);
+		if (!jnlpool.jnlpool_ctl->upd_disabled)
+		{	/* This instance is a root primary supplementary instance where an online rollback is being run
+			 * (either explicitly or implicitly through a receiver server started with -autorollback)
+			 * Since this instance is currently a rootprimary, was_rootprimary is FALSE. Return right away.
+			 */
+			return FALSE;
+		}
 	} else
 		assert(jgbl.mur_rollback); /* ROLLBACK (holding access control lock) can come here without journal pool */
 	/* If this is a supplementary instance, look at the last history record corresponding to the 0th stream index.
diff --git a/sr_unix/rtnhdr.h b/sr_unix/rtnhdr.h
index 8b0ac0d..38673c5 100644
--- a/sr_unix/rtnhdr.h
+++ b/sr_unix/rtnhdr.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -39,17 +40,10 @@ typedef struct
 	GTM64_ONLY(int4		filler;)
 } lab_tabent;
 
-/* Label table entry proxy for run-time linking */
-typedef struct
-{
-	lnr_tabent		*lnr_adr;	/* Pointer to lnrtab entry offset into code for this label */
-	boolean_t		has_parms;	/* Flag to indicate whether the callee has a formallist */
-} lab_tabent_proxy;
-
 /* Linkage table entry */
 typedef struct
 {
-	char_ptr_t	ext_ref;	/* Address (quadword on alpha) this linkage entry resolves to or NULL */
+	char_ptr_t		ext_ref;	/* Address (quadword on alpha) this linkage entry resolves to or NULL */
 } lnk_tabent;
 
 #ifdef AUTORELINK_SUPPORTED
@@ -143,7 +137,8 @@ typedef struct	rhead_struct
 	void_ptr_t		filler1;
 #	endif
 	unsigned char		checksum_128[16];	/* 16-byte MurmurHash3 checksum of routine source code */
-	struct rhead_struct	*active_rhead_adr;	/* Chain of active old versions, fully reserved for continued use */
+	struct rhead_struct	*active_rhead_adr;	/* addr of copy of this (original) header when that new version replaced
+							 * this routine and was on M-Stack. See handle_active_versions() rtn. */
 	routine_source		*source_code;		/* Source code used by $TEXT */
 	ARLINK_ONLY(zro_hist	*zhist;)		/* If shared object -> validation list/array */
 	gtm_uint64_t		objhash;		/* When object file is created, contains hash of object file */
@@ -159,10 +154,25 @@ typedef struct	rhead_struct
 /* Routine table entry */
 typedef struct
 {
-	mident		rt_name;	/* The name of the routine (in the literal text pool) */
-	rhdtyp		*rt_adr;	/* Pointer to its routine header */
+	mident			rt_name;		/* The name of the routine (in the literal text pool) */
+	rhdtyp			*rt_adr;		/* Pointer to its routine header */
 } rtn_tabent;
 
+/* Linkage table proxy for run-time linking of indirects. This struct has some overloaded meanings:
+ *   1. The group of fields rtnhdr_adr/lnr_adr act as a proxy/surrogate linkage table holding those
+ *      two values. They are defined in code with the indexes 0 and 1 respectively.
+ *   2. The group of fields lnr_adr/has_parms pretend they are the proxy part of a label table
+ *   	entry. Assembler code expects has_parms to be in the location following lnr_adr.
+ */
+typedef struct
+{
+	rhdtyp			*rtnhdr_adr;		/* Pointer to routine header for called routine */
+	lnr_tabent		*lnr_adr;		/* Pointer to lnrtab entry offset into code for this label */
+	boolean_t		has_parms;		/* Flag to indicate whether the callee has a formallist */
+	int			filler1;		/* 64 bit alignment */
+} lnk_tabent_proxy;
+#define TABENT_PROXY TREF(lnk_proxy)
+
 /* Byte offset of the routine_name field in the routine headers of pre-V5 releases */
 #define PRE_V5_RTNHDR_RTNOFF		24
 
@@ -201,6 +211,7 @@ typedef struct
 
 #define DYNAMIC_LITERALS_ENABLED(rtnhdr) ((rtnhdr)->compiler_qlf & CQ_DYNAMIC_LITERALS)
 #define RW_REL_START_ADR(rtnhdr) (((DYNAMIC_LITERALS_ENABLED(rtnhdr)) ? (char *)VARTAB_ADR(rtnhdr) : (char *)LITERAL_ADR(rtnhdr)))
+#define PTEXT_OFFSET SIZEOF(rhdtyp)
 
 /* Macro to determine if given address is inside code segment. Note that even though
  * the PTEXT_END_ADR macro is the address of end_of_code + 1, we still want a <= check
@@ -282,9 +293,8 @@ bool zlput_rname(rhdtyp *hdr);
 void zlmov_lnames(rhdtyp *hdr);
 rhdtyp *make_dmode(void);
 void comp_lits(rhdtyp *rhead);
-rhdtyp  *op_rhdaddr(mval *name, rhdtyp *rhd);
-rhdtyp	*op_rhdaddr1(mval *name);
-lnr_tabent **op_labaddr(rhdtyp *routine, mval *label, int4 offset);
+int op_rhdaddr(mval *name, int rtnidx);
+int op_labaddr(int rtnidx, mval *label, int4 offset);
 void urx_resolve(rhdtyp *rtn, lab_tabent *lbl_tab, lab_tabent *lbl_top);
 char *rtnlaboff2entryref(char *entryref_buff, mident *rtn, mident *lab, int offset);
 boolean_t on_stack(rhdtyp *rtnhdr, boolean_t *need_duplicate);
diff --git a/sr_unix/rtnobj.c b/sr_unix/rtnobj.c
index cd10223..ab51534 100644
--- a/sr_unix/rtnobj.c
+++ b/sr_unix/rtnobj.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -43,43 +44,44 @@
 #	define RTNOBJ_DBG(X)
 #endif
 
-#define	CONTINUE_IF_INDEX_INVALID(MIN_INDEX, MAX_INDEX, HAS_RELINKCTL_LOCK)			\
-{												\
-	if (!HAS_RELINKCTL_LOCK)								\
-	{	/* If we dont have a lock, and MIN_INDEX/MAX_INDEX are invalid, redo loop	\
-		 * until we find valid values. After a few redos, get a lock before the search.	\
-		 */										\
-		if ((0 > MIN_INDEX) || (NUM_RTNOBJ_SHM_INDEX < MIN_INDEX)			\
-			|| (0 > MAX_INDEX) || (NUM_RTNOBJ_SHM_INDEX < MAX_INDEX))		\
-		{										\
-			continue;								\
-		}										\
-	} else											\
-	{											\
-		assert(0 <= MIN_INDEX);								\
-		assert(NUM_RTNOBJ_SHM_INDEX >= MIN_INDEX);					\
-		assert(0 <= MAX_INDEX);								\
-		assert(NUM_RTNOBJ_SHM_INDEX >= MAX_INDEX);					\
-	}											\
+#define	DBG_ASSERT_INDEX_VALID(MIN_INDEX, MAX_INDEX)		\
+{								\
+	assert(0 <= MIN_INDEX);					\
+	assert(NUM_RTNOBJ_SHM_INDEX >= MIN_INDEX);		\
+	assert(0 <= MAX_INDEX);					\
+	assert(NUM_RTNOBJ_SHM_INDEX >= MAX_INDEX);		\
 }
 
+/* Macro to make sure this process has attached to ALL rtnobj shared memory segments that currently exist for the
+ * relinkctl shared memory corresponding to LINKCTL. Need to execute this macro before checking if a given routine object
+ * does exist in one of the rtnobj shared memory segments.
+ */
 #define	SYNC_RTNOBJ_SHMID_CYCLE_IF_NEEDED(LINKCTL, MIN_INDEX, MAX_INDEX, SHM_HDR, HAS_RELINKCTL_LOCK, RELINKREC)		\
 {																\
-	int		cycle, i, pvt_shmid, shr_shmid;										\
+	int		pvt_max_index, i, pvt_shmid, shr_shmid;									\
 	int		save_errno;												\
 	size_t		shm_size;												\
 	sm_uc_ptr_t	shm_base;												\
 	char		errstr[256];												\
 																\
-	cycle = SHM_HDR->rtnobj_shmid_cycle;											\
-	/* NARSTODO: Need memory barrier? Since cycle/MIN_INDEX/MAX_INDEX could be read out-of-order */				\
-	if (LINKCTL->rtnobj_shmid_cycle != cycle)										\
+	MAX_INDEX = SHM_HDR->rtnobj_max_shm_index;										\
+	SHM_READ_MEMORY_BARRIER;	/* Read "rtnobj_max_shm_index" BEFORE read memory barrier and everything else		\
+					 * else associated with this index AFTER the memory barrier.				\
+					 */											\
+	pvt_max_index = LINKCTL->rtnobj_max_shm_index;										\
+	DEBUG_ONLY(														\
+		for (i = LINKCTL->rtnobj_min_shm_index; i < pvt_max_index; i++)							\
+		{														\
+			pvt_shmid = LINKCTL->rtnobj_shmid[i];									\
+			shr_shmid = SHM_HDR->rtnobj_shmhdr[i].rtnobj_shmid;							\
+			assert(pvt_shmid == shr_shmid);										\
+		}														\
+	)															\
+	if (pvt_max_index != MAX_INDEX)												\
 	{															\
 		MIN_INDEX = SHM_HDR->rtnobj_min_shm_index;									\
-		MAX_INDEX = SHM_HDR->rtnobj_max_shm_index;									\
-		/* Check integrity of min_index/max_index */									\
-		CONTINUE_IF_INDEX_INVALID(MIN_INDEX, MAX_INDEX, HAS_RELINKCTL_LOCK);						\
-		for (i = MIN_INDEX; i < MAX_INDEX; i++)										\
+		DBG_ASSERT_INDEX_VALID(MIN_INDEX, MAX_INDEX); /* assert validity of min_index/max_index */			\
+		for (i = pvt_max_index; i < MAX_INDEX; i++)									\
 		{														\
 			pvt_shmid = LINKCTL->rtnobj_shmid[i];									\
 			shr_shmid = SHM_HDR->rtnobj_shmhdr[i].rtnobj_shmid;							\
@@ -95,21 +97,23 @@
 					rel_latch(&RELINKREC->rtnobj_latch);							\
 					SNPRINTF(errstr, SIZEOF(errstr), "rtnobj2 shmat() failed for shmid=%d shmsize=0x%llx",	\
 						shr_shmid, shm_size);								\
-					ISSUE_RELINKCTLERR_SYSCALL(&LINKCTL->zro_entry_name, errstr, save_errno);		\
+					if (!SHM_REMOVED(save_errno))								\
+						ISSUE_RELINKCTLERR_SYSCALL(&LINKCTL->zro_entry_name, errstr, save_errno);	\
+					else											\
+						ISSUE_REQRLNKCTLRNDWN_SYSCALL(&LINKCTL->zro_entry_name, errstr, save_errno);	\
 				}												\
 				assert(0 == ((UINTPTR_T)shm_base % 8));								\
 				LINKCTL->rtnobj_shmid[i] = shr_shmid;								\
 				LINKCTL->rtnobj_shm_base[i] = shm_base;								\
 			}													\
 		}														\
-		LINKCTL->rtnobj_min_shm_index = min_index;									\
-		LINKCTL->rtnobj_max_shm_index = max_index;									\
-		LINKCTL->rtnobj_shmid_cycle = cycle;										\
+		LINKCTL->rtnobj_min_shm_index = MIN_INDEX;									\
+		LINKCTL->rtnobj_max_shm_index = MAX_INDEX;									\
 	} else															\
 	{															\
-		MIN_INDEX = linkctl->rtnobj_min_shm_index;									\
-		MAX_INDEX = linkctl->rtnobj_max_shm_index;									\
-		CONTINUE_IF_INDEX_INVALID(MIN_INDEX, MAX_INDEX, HAS_RELINKCTL_LOCK);						\
+		MIN_INDEX = LINKCTL->rtnobj_min_shm_index;									\
+		MAX_INDEX = pvt_max_index;											\
+		DBG_ASSERT_INDEX_VALID(MIN_INDEX, MAX_INDEX);									\
 	}															\
 }
 
@@ -117,13 +121,16 @@
 
 error_def(ERR_PERMGENFAIL);
 error_def(ERR_RELINKCTLERR);
+error_def(ERR_REQRLNKCTLRNDWN);
 error_def(ERR_RLNKRECLATCH);
 error_def(ERR_RLNKSHMLATCH);
 error_def(ERR_SYSCALL);
 
 DEBUG_ONLY(GBLREF int	saved_errno;)
+DEBUG_ONLY(GBLREF int	process_exiting;)
 
 #ifdef DEBUG
+/* Routine to verify the doubly-linked (fl/bl) freelists for each rtnobj size (various 2-powers) are in good shape */
 void	rtnobj_verify_freelist_fl_bl(rtnobjshm_hdr_t *rtnobj_shm_hdr, sm_uc_ptr_t shm_base)
 {
 	int		min_index, max_index, i;
@@ -172,6 +179,7 @@ void	rtnobj_verify_freelist_fl_bl(rtnobjshm_hdr_t *rtnobj_shm_hdr, sm_uc_ptr_t s
 	}
 }
 
+/* Routine to verify the correctness of derived fields, rtnobj_shm_hdr->rtnobj_min_free_index & rtnobj->rtnobj_max_free_index */
 void	rtnobj_verify_min_max_free_index(rtnobjshm_hdr_t *rtnobj_shm_hdr)
 {
 	int		min_index, max_index, i;
@@ -195,13 +203,17 @@ void	rtnobj_verify_min_max_free_index(rtnobjshm_hdr_t *rtnobj_shm_hdr)
 }
 #endif
 
-/* Insert an element at the tail of the queue */
+/* Insert "new_tail" at tail of the doubly-linked relative-queue starting from "que_base".
+ * Note "que_base" is a pointer to relinkctl shared memory whereas "new_tail" is a pointer to rtnobj shared memory.
+ * Hence the need for NULL_RTNOBJ_SM_OFF_T to indicate a link from rtnobj shm to relinkctl shm.
+ * "shm_base" is pointer to the start of rtnobj shared memory. Used to calculate relative offsets.
+ */
 void	insqt_rtnobj(que_ent_ptr_t new_tail, que_ent_ptr_t que_base, sm_uc_ptr_t shm_base)
 {
 	que_ent_ptr_t old_tail;
 
 	RTNOBJ_DBG(fprintf(stderr, "insqt_rtnobj : que_base = 0x%llx : shm_base = 0x%llx : elem = 0x%llx\n",		\
-		(long long unsigned int)que_base, (long long unsigned int)shm_base, (long long unsigned int)new_tail);)
+		(UINTPTR_T)que_base, (UINTPTR_T)shm_base, (UINTPTR_T)new_tail);)
 	if (NULL_RTNOBJ_SM_OFF_T == que_base->bl)
 	{	/* Queue has nothing */
 		assert(NULL_RTNOBJ_SM_OFF_T == que_base->fl);
@@ -223,7 +235,11 @@ void	insqt_rtnobj(que_ent_ptr_t new_tail, que_ent_ptr_t que_base, sm_uc_ptr_t sh
 	return;
 }
 
-/* Remove an element from the head of the queue */
+/* Remove an element from the head of the doubly-linked relative-queue starting from "que_base" and return a pointer to it.
+ * Note "que_base" is a pointer to relinkctl shared memory whereas the returned value is a pointer to rtnobj shared memory.
+ * Hence the need for NULL_RTNOBJ_SM_OFF_T to indicate a link from rtnobj shm to relinkctl shm.
+ * "shm_base" is pointer to the start of rtnobj shared memory. Used to calculate relative offsets.
+ */
 rtnobj_hdr_t *remqh_rtnobj(que_ent_ptr_t que_base, sm_uc_ptr_t shm_base)
 {
 	que_ent_ptr_t	ret, new_head;
@@ -232,7 +248,7 @@ rtnobj_hdr_t *remqh_rtnobj(que_ent_ptr_t que_base, sm_uc_ptr_t shm_base)
 	assert(NULL_RTNOBJ_SM_OFF_T != que_base->fl);
 	ret = (que_ent_ptr_t)(shm_base + que_base->fl);
 	RTNOBJ_DBG(fprintf(stderr, "remqh_rtnobj : que_base = 0x%llx : shm_base = 0x%llx : elem = 0x%llx\n",		\
-		(long long unsigned int)que_base, (long long unsigned int)shm_base, (long long unsigned int)ret);)
+		(UINTPTR_T)que_base, (UINTPTR_T)shm_base, (UINTPTR_T)ret);)
 	assert(0 == (sm_off_t)ret % 8);
 	assert(NULL_RTNOBJ_SM_OFF_T == ret->bl);
 	if (NULL_RTNOBJ_SM_OFF_T == ret->fl)
@@ -251,7 +267,11 @@ rtnobj_hdr_t *remqh_rtnobj(que_ent_ptr_t que_base, sm_uc_ptr_t shm_base)
 	return rtnobj;
 }
 
-/* Remove a specific element "rtnobj" from wherever it is in the queue */
+/* Remove a specific element "rtnobj" from wherever it is in the doubly-linked relative-queue starting from "que_base".
+ * Note "que_base" is a pointer to relinkctl shared memory whereas "rtnobj" is a pointer to rtnobj shared memory.
+ * Hence the need for NULL_RTNOBJ_SM_OFF_T to indicate a link from rtnobj shm to relinkctl shm.
+ * "shm_base" is pointer to the start of rtnobj shared memory. Used to calculate relative offsets.
+ */
 void	remq_rtnobj_specific(que_ent_ptr_t que_base, sm_uc_ptr_t shm_base, rtnobj_hdr_t *rtnobj)
 {
 	que_ent_ptr_t	elem, new_head, rtnque;
@@ -259,7 +279,7 @@ void	remq_rtnobj_specific(que_ent_ptr_t que_base, sm_uc_ptr_t shm_base, rtnobj_h
 	assert(NULL_RTNOBJ_SM_OFF_T != que_base->fl);
 	rtnque = (que_ent_ptr_t)((sm_uc_ptr_t)rtnobj + OFFSETOF(rtnobj_hdr_t, userStorage));
 	RTNOBJ_DBG(fprintf(stderr, "remqh_rtnobj_specific : que_base = 0x%llx : shm_base = 0x%llx : elem = 0x%llx\n",	\
-		(long long unsigned int)que_base, (long long unsigned int)shm_base, (long long unsigned int)rtnque);)
+		(UINTPTR_T)que_base, (UINTPTR_T)shm_base, (UINTPTR_T)rtnque);)
 #	ifdef DEBUG
 	/* Verify that "rtnobj" is actually in the queue first */
 	elem = (que_ent_ptr_t)(shm_base + que_base->fl);
@@ -308,10 +328,17 @@ void	remq_rtnobj_specific(que_ent_ptr_t que_base, sm_uc_ptr_t shm_base, rtnobj_h
 	}
 }
 
+/* Function to allocate "objSize" bytes of space, for the object file that "fd" points to and has a hash value "objhash",
+ * in rtnobj shared memory for the relinkctl file/shared-memory derived from "zhist". If such an object already exists, return
+ * a pointer to that location in rtnobj shared memory after incrementing reference-counts (to indicate how many processes
+ * have linked in to this shared object). In this fast-path case, we hold a lock only on the relink record corresponding
+ * to this object's routine-name. In the other case (where space has to be allocated), we also hold a lock on the entire
+ * relinkctl shared memory (and effectively all rtnobj shared memory segments).
+ */
 sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64_t objhash)
 {
 	boolean_t		has_relinkctl_lock, has_rtnobj_lock;
-	boolean_t		initialized, return_NULL;
+	boolean_t		initialized, return_NULL, need_shmctl;
 	char			errstr[256];
 	gtm_uint64_t		src_cksum_8byte;
 	int			min_index, max_index, min_free_index, max_free_index, shm_index;
@@ -332,14 +359,12 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 	rhdtyp			tmprhd, *rhdr;
 	gtm_uint64_t		elemSize;
 	zro_validation_entry	*zhent;
-	char			zro_entry_str[ZRO_DIR_PATH_MAX + 1];
 	struct stat		dir_stat_buf;
 	int			stat_res;
 	int			user_id;
 	int			group_id;
 	int			perm;
 	int			maxvers, curvers;
-	struct perm_diag_data	pdd;
 	struct shmid_ds		shmstat;
 #	ifdef DEBUG
 	DCL_THREADGBL_ACCESS;
@@ -352,10 +377,6 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 	/* Assert certain design assumptions */
 	assert((MAX_RTNOBJ_SHM_INDEX + RTNOBJ_SHMID_INDEX_MAXBITS) <= (8 * SIZEOF(rtnobj_sm_off_t)));
 	assert(((size_t)1 << RTNOBJ_SHMID_INDEX_MAXBITS) >= MAX_RTNOBJ_SHM_INDEX);
-	/* Check if we are in sync with shared memory. If not attach to requisite shmids first.
-	 * Note that the below logic tries to do search outside of any locks (for performance reasons)
-	 * but that means we need to be extra careful in validating things read outside of a lock.
-	 */
 	shm_hdr = GET_RELINK_SHM_HDR(linkctl);
 	loopcnt = 0;
 	has_relinkctl_lock = FALSE;
@@ -367,8 +388,6 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
 				ERR_RLNKRECLATCH, 3, relinkrec->rtnname_fixed.c, RTS_ERROR_MSTR(&linkctl->zro_entry_name));
 	}
-	memcpy(zro_entry_str, linkctl->zro_entry_name.addr, linkctl->zro_entry_name.len);
-	zro_entry_str[linkctl->zro_entry_name.len] = '\0';
 	do
 	{
 		if (CDB_STAGNATE <= loopcnt++)
@@ -386,8 +405,10 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 			}
 			has_relinkctl_lock = TRUE;
 		}
+		/* Check if we are in sync with the rtnobj shared memory segments corresponding to this relinkctl shared memory.
+		 * If not attach to those rtnobj shmids first.
+		 */
 		SYNC_RTNOBJ_SHMID_CYCLE_IF_NEEDED(linkctl, min_index, max_index, shm_hdr, has_relinkctl_lock, relinkrec);
-			/* note: the above macro could do a "continue" if "has_relinkctl_lock" is FALSE */
 		/* Now that we have attached to the necessary routine buffer shmids, search within shared memory for the
 		 * routine buffer whose <objhash,objLen> matches ours.
 		 */
@@ -428,9 +449,9 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 				rel_latch(&shm_hdr->relinkctl_latch);
 			RTNOBJ_DBG(fprintf(stderr, "rtnobj_shm_malloc : rtnname = %s : objhash = 0x%llx : "		\
 				"linkctl = 0x%llx : Found : refcnt = %d : elem = 0x%llx\n",				\
-				relinkrec->rtnname_fixed.c, (long long unsigned int)objhash,				\
-				(long long unsigned int)linkctl, rtnobj->refcnt,					\
-				(long long unsigned int)&rtnobj->userStorage.userStart);)
+				relinkrec->rtnname_fixed.c, (UINTPTR_T)objhash,				\
+				(UINTPTR_T)linkctl, rtnobj->refcnt,					\
+				(UINTPTR_T)&rtnobj->userStorage.userStart);)
 			zhent->cycle = relinkrec->cycle;	/* Update private cycle to be in sync with shared copy */
 			rel_latch(&relinkrec->rtnobj_latch);
 			objBuff = (sm_uc_ptr_t)&rtnobj->userStorage.userStart;
@@ -463,7 +484,6 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 		}
 		/* Sync up with rtnobj shmids one final time if needed now that we have the relinkctl file lock */
 		SYNC_RTNOBJ_SHMID_CYCLE_IF_NEEDED(linkctl, min_index, max_index, shm_hdr, has_relinkctl_lock, relinkrec);
-			/* note: the above macro is guaranteed not to do a "continue" since "has_relinkctl_lock" is TRUE */
 		/* Find a shared memory buffer to hold the routine object */
 		rtnobj = NULL;
 		for ( ; shm_index < max_index; shm_index++)
@@ -527,27 +547,17 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 				SNPRINTF(errstr, SIZEOF(errstr), "rtnobj shmget() failed for shmsize=0x%llx", shm_size);
 				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
 			}
-			STAT_FILE(zro_entry_str, &dir_stat_buf, stat_res);
+			STAT_FILE(linkctl->zro_entry_name.addr, &dir_stat_buf, stat_res);
 			if (-1 == stat_res)
 			{
 				save_errno = errno;
 				rel_latch(&shm_hdr->relinkctl_latch);
 				rel_latch(&relinkrec->rtnobj_latch);
 				shm_rmid(shmid);	/* if error removing shmid we created, just move on */
-				SNPRINTF(errstr, SIZEOF(errstr), "rtnobj stat() of file %s failed", zro_entry_str);
+				SNPRINTF(errstr, SIZEOF(errstr), "rtnobj stat() of file %s failed", linkctl->zro_entry_name.addr);
 				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
 			}
-			if (gtm_permissions(&dir_stat_buf, &user_id, &group_id, &perm, PERM_IPC|PERM_EXEC, &pdd) < 0)
-			{
-				save_errno = errno;
-				rel_latch(&shm_hdr->relinkctl_latch);
-				rel_latch(&relinkrec->rtnobj_latch);
-				shm_rmid(shmid);	/* if error removing shmid we created, just move on */
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(10)
-						ERR_RELINKCTLERR, 2, RTS_ERROR_MSTR(&linkctl->zro_entry_name),
-						ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("rtnobj"),
-						RTS_ERROR_MSTR(&linkctl->zro_entry_name));
-			}
+			gtm_permissions(&dir_stat_buf, &user_id, &group_id, &perm, PERM_IPC|PERM_EXEC);
 			if (-1 == shmctl(shmid, IPC_STAT, &shmstat))
 			{
 				save_errno = errno;
@@ -558,13 +568,24 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 					shmid, shm_size);
 				ISSUE_RELINKCTLERR_SYSCALL(&linkctl->zro_entry_name, errstr, save_errno);
 			}
-			/* change group and permissions */
-			if ((-1 != user_id) && (user_id != shmstat.shm_perm.uid))
+			/* change uid, group-id and permissions if needed */
+			need_shmctl = FALSE;
+			if ((INVALID_UID != user_id) && (user_id != shmstat.shm_perm.uid))
+			{
 				shmstat.shm_perm.uid = user_id;
-			if ((-1 != group_id) && (group_id != shmstat.shm_perm.gid))
+				need_shmctl = TRUE;
+			}
+			if ((INVALID_GID != group_id) && (group_id != shmstat.shm_perm.gid))
+			{
 				shmstat.shm_perm.gid = group_id;
-			shmstat.shm_perm.mode = perm;
-			if (-1 == shmctl(shmid, IPC_SET, &shmstat))
+				need_shmctl = TRUE;
+			}
+			if (shmstat.shm_perm.mode != perm)
+			{
+				shmstat.shm_perm.mode = perm;
+				need_shmctl = TRUE;
+			}
+			if (need_shmctl && (-1 == shmctl(shmid, IPC_SET, &shmstat)))
 			{
 				save_errno = errno;
 				rel_latch(&shm_hdr->relinkctl_latch);
@@ -614,15 +635,14 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 			rtnobj_shm_hdr->shm_len = shm_size;
 			if (shm_hdr->rtnobj_min_shm_index > shm_index)
 			{
-				assert(0 == shm_hdr->rtnobj_shmid_cycle); /* our shm expansion logic must not reach this codepath */
+				assert(NUM_RTNOBJ_SHM_INDEX == shm_hdr->rtnobj_min_shm_index);
 				shm_hdr->rtnobj_min_shm_index = shm_index;
 			}
-			if (shm_hdr->rtnobj_max_shm_index < (shm_index + 1))
-				shm_hdr->rtnobj_max_shm_index = (shm_index + 1);
+			assert(linkctl->rtnobj_max_shm_index == shm_hdr->rtnobj_max_shm_index);
+			assert(shm_hdr->rtnobj_max_shm_index < (shm_index + 1));
+			SHM_WRITE_MEMORY_BARRIER; /* Update everything except "rtnobj_max_shm_index" BEFORE write memory barrier */
+			shm_hdr->rtnobj_max_shm_index = (shm_index + 1);
 			/* Sync shared memory with private contents for this process to avoid duplicate shmget/shmat */
-			assert(linkctl->rtnobj_shmid_cycle == shm_hdr->rtnobj_shmid_cycle);	/* due to SYNC_* done above */
-			shm_hdr->rtnobj_shmid_cycle++;
-			linkctl->rtnobj_shmid_cycle = shm_hdr->rtnobj_shmid_cycle;
 			linkctl->rtnobj_min_shm_index = shm_hdr->rtnobj_min_shm_index;
 			linkctl->rtnobj_max_shm_index = shm_hdr->rtnobj_max_shm_index;
 			linkctl->rtnobj_shm_base[shm_index] = shm_base;
@@ -651,12 +671,14 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 				rtnobj2->queueIndex = objIndex;
 				DEBUG_ONLY(shm_off = (sm_uc_ptr_t)rtnobj2 - shm_base);
 				assert(0 == (shm_off % ((sm_off_t)1 << (objIndex + MIN_RTNOBJ_SIZE_BITS))));
-				/* rtnobj2->initialized            needs initialization only when state becomes STATE_ALLOCATED */
-				/* rtnobj2->refcnt                 needs initialization only when state becomes STATE_ALLOCATED */
-				/* rtnobj2->src_cksum_8byte        needs initialization only when state becomes STATE_ALLOCATED */
-				/* rtnobj2->next_rtnobj_shm_offset needs initialization only when state becomes STATE_ALLOCATED */
-				/* rtnobj2->relinkctl_index        needs initialization only when state becomes STATE_ALLOCATED */
-				/* rtnobj2->objLen                 needs initialization only when state becomes STATE_ALLOCATED */
+				/* The following fields need initialization only when state becomes STATE_ALLOCATED.
+				 *	rtnobj2->initialized
+				 *	rtnobj2->refcnt
+				 *	rtnobj2->src_cksum_8byte
+				 *	rtnobj2->next_rtnobj_shm_offset
+				 *	rtnobj2->relinkctl_index
+				 *	rtnobj2->objLen
+				 */
 				insqt_rtnobj(&rtnobj2->userStorage.freePtr, freeList, shm_base);
 			} while (objIndex > sizeIndex);
 			if (NUM_RTNOBJ_SIZE_BITS == min_free_index)
@@ -773,9 +795,9 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 		cacheflush(codeadr, codelen, BCACHE);			/* Cacheflush executable part from instruction cache */
 		RTNOBJ_DBG(fprintf(stderr, "rtnobj_shm_malloc : rtnname = %s : objhash = 0x%llx : "		\
 			"linkctl = 0x%llx : Inserted : refcnt = %d : elem = 0x%llx : numvers = %d\n",		\
-			relinkrec->rtnname_fixed.c, (long long unsigned int)objhash,				\
-			(long long unsigned int)linkctl, rtnobj->refcnt,					\
-			(long long unsigned int)objBuff, relinkrec->numvers);)
+			relinkrec->rtnname_fixed.c, (UINTPTR_T)objhash,				\
+			(UINTPTR_T)linkctl, rtnobj->refcnt,					\
+			(UINTPTR_T)objBuff, relinkrec->numvers);)
 		relinkrec->objhash = objhash;
 		++relinkrec->cycle;	/* cycle bump is because of the implicit ZRUPDATE that linking a routine does */
 		if (0 == relinkrec->cycle)
@@ -786,6 +808,12 @@ sm_uc_ptr_t rtnobj_shm_malloc(zro_hist *zhist, int fd, off_t objSize, gtm_uint64
 	} while (TRUE);
 }
 
+/* Function to free the object file in rtnobj shared memory whose routine header is "rhead". If this object file is used
+ * by more than one process (i.e. reference count is > 1), then decrement the reference count and return. This fast path
+ * only holds lock on the relink record corresponding to this object's routine-name. If, however, the reference count is 1,
+ * space for this object file will be freed up and that requires holding a lock on the entire relinkctl shared memory (and
+ * effectively all rtnobj shared memory segments).
+ */
 void	rtnobj_shm_free(rhdtyp *rhead, boolean_t latch_grabbed)
 {
 	relinkrec_t		*relinkrec;
@@ -810,14 +838,17 @@ void	rtnobj_shm_free(rhdtyp *rhead, boolean_t latch_grabbed)
 
 	SETUP_THREADGBL_ACCESS;
 #	endif
+	/* Note that if breakpoints are in effect, rhead->shared_ptext_adr will not be equal to rhead->ptext_adr.
+	 * This is because we would have taken a private copy of the code (for breakpoints) into ptext_adr and kept
+	 * shared_ptext_adr untouched. In that case, it is still possible this function is called as part of process
+	 * exit (when breakpoints on a shared routine object are still active). We will still need to free-up/decrement-refcnt
+	 * the shared copy (shared_ptext_adr). So look at shared_ptext_adr below instead of ptext_adr;
+	 */
 	assert(rhead->shared_object);
 	assert(NULL != rhead->shared_ptext_adr);
 	if (NULL == rhead->shared_ptext_adr)
 		return;	/* in pro, be safe */
-	/* Note that if breakpoints are in effect, rhead->shared_ptext_adr will not be equal to rhead->ptext_adr.
-	 * This is because we would have taken a private copy of the code (for breakpoints) into ptext_adr and kept
-	 * shared_ptext_adr untouched. We will still need to free-up/decrement-refcnt the shared copy (shared_ptext_adr).
-	 */
+	assert(process_exiting || (rhead->shared_ptext_adr == rhead->ptext_adr));
 	objBuff = rhead->shared_ptext_adr - SIZEOF(rhdtyp);
 	rtnobj = (rtnobj_hdr_t *)(objBuff - OFFSETOF(rtnobj_hdr_t, userStorage));
 	assert(STATE_ALLOCATED == rtnobj->state);
@@ -864,8 +895,8 @@ void	rtnobj_shm_free(rhdtyp *rhead, boolean_t latch_grabbed)
 	{	/* The loaded object cannot be freed until refcnt becomes 0. But caller's job done. Return. */
 		RTNOBJ_DBG(fprintf(stderr,											\
 			"rtnobj_shm_free : rtnname = %s : objhash = 0x%llx : Decremented : refcnt = %d : elem = 0x%llx\n",	\
-			relinkrec->rtnname_fixed.c, (long long unsigned int)rtnobj->objhash, rtnobj->refcnt,			\
-			(long long unsigned int)objBuff);)
+			relinkrec->rtnname_fixed.c, (UINTPTR_T)rtnobj->objhash, rtnobj->refcnt,			\
+			(UINTPTR_T)objBuff);)
 		rel_latch(&relinkrec->rtnobj_latch);
 		return;
 	}
@@ -875,8 +906,7 @@ void	rtnobj_shm_free(rhdtyp *rhead, boolean_t latch_grabbed)
 	 * But since additions to the linked list happen only at the end, we are guaranteed that the element of
 	 * interest (rtnobj which we want to free and have already located in rtnobj_shm_malloc) would be found
 	 * without reaching the tail portion of that linked list (which would require attaching to the new shmid).
-	 * So no concurrency issues to worry about like we had to in rtnobj_shm_malloc (see use of
-	 * SYNC_RTNOBJ_SHMID_CYCLE_IF_NEEDED macro and how it could do a "continue").
+	 * So no need to invoke the SYNC_RTNOBJ_SHMID_CYCLE_IF_NEEDED macro like we needed to in "rtnobj_shm_malloc".
 	 */
 	shm_index_off = relinkrec->rtnobj_shm_offset;
 	prev_rtnobj = NULL;
@@ -989,8 +1019,8 @@ void	rtnobj_shm_free(rhdtyp *rhead, boolean_t latch_grabbed)
 	relinkrec->numvers--;
 	RTNOBJ_DBG(fprintf(stderr,												\
 		"rtnobj_shm_free : rtnname = %s : objhash = 0x%llx : Freed : refcnt = %d : elem = 0x%llx : numvers = %d\n",	\
-		relinkrec->rtnname_fixed.c, (long long unsigned int)rtnobj->objhash, rtnobj->refcnt,				\
-		(long long unsigned int)objBuff, relinkrec->numvers);)
+		relinkrec->rtnname_fixed.c, (UINTPTR_T)rtnobj->objhash, rtnobj->refcnt,						\
+		(UINTPTR_T)objBuff, relinkrec->numvers);)
 	rel_latch(&relinkrec->rtnobj_latch);
 	return;
 }
diff --git a/sr_unix/runall.csh b/sr_unix/runall.csh
index 1772fd8..c41cbc3 100644
--- a/sr_unix/runall.csh
+++ b/sr_unix/runall.csh
@@ -1,7 +1,8 @@
 #!/usr/local/bin/tcsh -f
 #################################################################
 #								#
-#	Copyright 2001, 2014 Fidelity Information Services, Inc	#
+# Copyright (c) 2001-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -221,6 +222,11 @@ if ($?RUNALL_BYPASS_GEN_THREADGBL == 0) then
 		echo "Failed to build gtm_threadgbl_deftypes.h - aborting build"
 		exit $runall_status
 	endif
+	# Setup link from $gtm_obj to the proper assembler include file
+	if (! -e ${gtm_obj}/gtm_threadgbl_deftypes_asm.si) then
+	    set asmtgbltype = $gtm_exe:t
+	    \ln -s ${gtm_inc}/gtm_threadgbl_deftypes_asm_${asmtgbltype}.si ${gtm_obj}/gtm_threadgbl_deftypes_asm.si
+	endif
 endif
 
 if ($#argv) then
diff --git a/sr_unix/same_device_check.c b/sr_unix/same_device_check.c
index c030988..3ab3304 100644
--- a/sr_unix/same_device_check.c
+++ b/sr_unix/same_device_check.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -14,19 +15,194 @@
 #include "gtm_stat.h"
 #include "eintr_wrappers.h"
 #include "io.h"
+#include "gtm_netdb.h"
+#include "gtm_socket.h"
+#include "gtm_stdlib.h"
+#include "gtm_string.h"
+#include "gtm_inet.h"
+#include "gtm_un.h"
 
+error_def(ERR_GETSOCKNAMERR);
+error_def(ERR_GETNAMEINFO);
+error_def(ERR_TEXT);
+error_def(ERR_SYSCALL);
+
+typedef struct sockaddr_un *sockun_ptr;
 /* This module checks whether standard in and standard out are the same.
  * In VMS, it gets the input device from the previously established GT.M structure and the output device from its caller.
  * In UNIX, it ignores its arguments and gets the devices from the system designators
  * st_mode includes permissions so just check file type
+ * if same device indicated in st_mode do the following:
+ * 	if is a socket compare
+ * 	else if is a character device then st_rdev will be the same if same device
+ *	else assert
  */
 
 bool	same_device_check (mstr tname, char *buf)
 {
-	int		fstat_res;
-	struct stat	outbuf1, outbuf2;
+	int			fstat_res, gsn_stat;
+	struct stat		outbuf1, outbuf2;
+	GTM_SOCKLEN_TYPE	socknamelen1;
+	GTM_SOCKLEN_TYPE	socknamelen2;
+	GTM_SOCKLEN_TYPE	psocknamelen1;
+	GTM_SOCKLEN_TYPE	psocknamelen2;
+	struct sockaddr_storage	sockname1;
+	struct sockaddr_storage	sockname2;
+	struct sockaddr_storage	psockname1;
+	struct sockaddr_storage	psockname2;
+	char			port_buffer1[NI_MAXSERV];
+	char			port_buffer2[NI_MAXSERV];
+	char			pport_buffer1[NI_MAXSERV];
+	char			pport_buffer2[NI_MAXSERV];
+	char			host_buffer1[NI_MAXHOST];
+	char			host_buffer2[NI_MAXHOST];
+	char			phost_buffer1[NI_MAXHOST];
+	char			phost_buffer2[NI_MAXHOST];
+	int			errcode, tmplen, save_errno;
+	const char		*errptr;
 
 	FSTAT_FILE(0, &outbuf1, fstat_res);
+	if (-1 == fstat_res)
+	{
+		save_errno = errno;
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("fstat"), CALLFROM, save_errno);
+	}
 	FSTAT_FILE(1, &outbuf2, fstat_res);
-	return ((S_IFMT & outbuf1.st_mode) == (S_IFMT & outbuf2.st_mode));
+	if (-1 == fstat_res)
+	{
+		save_errno = errno;
+		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("fstat"), CALLFROM, save_errno);
+	}
+
+	if ((S_IFMT & outbuf1.st_mode) != (S_IFMT & outbuf2.st_mode))
+		return FALSE;
+
+
+	if (S_ISSOCK(outbuf1.st_mode))
+	{
+		/* if here then both 0,1 are sockets */
+		socknamelen1 = SIZEOF(sockname1);
+		if (-1 == (gsn_stat = getsockname(0, (struct sockaddr *)&sockname1, (GTM_SOCKLEN_TYPE *)&socknamelen1)))
+		{
+			save_errno = errno;
+			if (IS_SOCKNAME_UNIXERROR(save_errno))
+			{
+				/* problem with getsockname for AF_UNIX socket so just assign family for the switch below */
+				(((sockaddr_ptr)&sockname1)->sa_family)	= AF_UNIX;
+			} else
+			{
+				/* process error */
+				errptr = (char *)STRERROR(save_errno);
+				tmplen = STRLEN(errptr);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_GETSOCKNAMERR, 3, save_errno, tmplen, errptr);
+			}
+		}
+
+		socknamelen2 = SIZEOF(sockname2);
+		if (-1 == (gsn_stat = getsockname(1, (struct sockaddr *)&sockname2, (GTM_SOCKLEN_TYPE *)&socknamelen2)))
+		{
+			save_errno = errno;
+			if (IS_SOCKNAME_UNIXERROR(save_errno))
+			{
+				/* problem with getsockname for AF_UNIX socket so just assign family for the switch below */
+				(((sockaddr_ptr)&sockname2)->sa_family)	= AF_UNIX;
+			} else
+			{
+				/* process error */
+				errptr = (char *)STRERROR(save_errno);
+				tmplen = STRLEN(errptr);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_GETSOCKNAMERR, 3, save_errno, tmplen, errptr);
+			}
+		}
+		/* if both sockets not the same family then not the same device */
+		if ((((sockaddr_ptr)&sockname1)->sa_family) != (((sockaddr_ptr)&sockname2)->sa_family))
+			return FALSE;
+
+		switch(((sockaddr_ptr)&sockname1)->sa_family)
+		{
+		case AF_INET:
+		case AF_INET6:
+			GETNAMEINFO((struct sockaddr *)&sockname1, socknamelen1, host_buffer1, NI_MAXHOST,
+				    port_buffer1, NI_MAXSERV, NI_NUMERICHOST|NI_NUMERICSERV, errcode);
+			if (0 != errcode)
+			{
+				RTS_ERROR_ADDRINFO(NULL, ERR_GETNAMEINFO, errcode);
+				return FALSE;
+			}
+
+			GETNAMEINFO((struct sockaddr *)&sockname2, socknamelen2, host_buffer2, NI_MAXHOST,
+				    port_buffer2, NI_MAXSERV, NI_NUMERICHOST|NI_NUMERICSERV, errcode);
+			if (0 != errcode)
+			{
+				RTS_ERROR_ADDRINFO(NULL, ERR_GETNAMEINFO, errcode);
+				return FALSE;
+			}
+
+			/* hosts and ports must be the same */
+			if (STRCMP(host_buffer1, host_buffer2) || STRCMP(port_buffer1, port_buffer2))
+				return FALSE;
+
+			psocknamelen1 = SIZEOF(psockname1);
+			if (-1 == (gsn_stat = getpeername(0, (struct sockaddr *)&psockname1,
+							   (GTM_SOCKLEN_TYPE *)&psocknamelen1)))
+			{
+				save_errno = errno;
+				errptr = (char *)STRERROR(save_errno);
+				tmplen = STRLEN(errptr);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_GETSOCKNAMERR, 3, save_errno, tmplen, errptr);
+			}
+
+
+			psocknamelen2 = SIZEOF(psockname2);
+			if (-1 == (gsn_stat = getpeername(1, (struct sockaddr *)&psockname2,
+							   (GTM_SOCKLEN_TYPE *)&psocknamelen2)))
+			{
+				save_errno = errno;
+				errptr = (char *)STRERROR(save_errno);
+				tmplen = STRLEN(errptr);
+				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_GETSOCKNAMERR, 3, save_errno, tmplen, errptr);
+			}
+
+			GETNAMEINFO((struct sockaddr *)&psockname1, psocknamelen1, phost_buffer1, NI_MAXHOST,
+				    pport_buffer1, NI_MAXSERV, NI_NUMERICHOST|NI_NUMERICSERV, errcode);
+			if (0 != errcode)
+			{
+				RTS_ERROR_ADDRINFO(NULL, ERR_GETNAMEINFO, errcode);
+				return FALSE;
+			}
+
+			GETNAMEINFO((struct sockaddr *)&psockname2, psocknamelen2, phost_buffer2, NI_MAXHOST,
+				pport_buffer2, NI_MAXSERV, NI_NUMERICHOST|NI_NUMERICSERV, errcode);
+			if (0 != errcode)
+			{
+				RTS_ERROR_ADDRINFO(NULL, ERR_GETNAMEINFO, errcode);
+				return FALSE;
+			}
+
+			/* hosts and ports for the peer sockets must also be the same */
+			if (STRCMP(phost_buffer1, phost_buffer2) || STRCMP(pport_buffer1, pport_buffer2))
+				return FALSE;
+			break;
+		case AF_UNIX:
+		default:
+			/* if inodes are different or st_dev different then not the same device */
+			if ((outbuf1.st_ino != outbuf2.st_ino) || (outbuf1.st_dev != outbuf2.st_dev))
+				return FALSE;
+			break;
+			}
+		return TRUE;
+	} else if (S_ISCHR(outbuf1.st_mode))
+	{
+		/* if here then both 0,1 are character devices */
+		/* if inodes are different or st_dev different then not the same device */
+		if ((outbuf1.st_ino != outbuf2.st_ino) || (outbuf1.st_dev != outbuf2.st_dev))
+			return FALSE;
+		else
+			return TRUE;
+	} else
+	{
+		/* unexpected type so assert */
+		assert(FALSE);
+		return FALSE;
+	}
 }
diff --git a/sr_unix/sleep.h b/sr_unix/sleep.h
index 775db8d..418e4ab 100644
--- a/sr_unix/sleep.h
+++ b/sr_unix/sleep.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -26,9 +27,6 @@ void m_usleep(int useconds);
 #   endif
 # endif
 
-#define E_6	1000000
-#define E_9	1000000000
-
 #define SET_EXPIR_TIME(NOW_TIMEVAL, EXPIR_TIMEVAL, SECS, USECS)				\
 MBSTART {										\
 	gettimeofday(&(NOW_TIMEVAL), NULL);						\
diff --git a/sr_unix/source_file.c b/sr_unix/source_file.c
index 58a2d0f..486c0e6 100644
--- a/sr_unix/source_file.c
+++ b/sr_unix/source_file.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -33,6 +34,7 @@
 #include "min_max.h"
 #include "cli.h"
 #include "have_crit.h"
+#include "util.h"
 #include "op_fnzsearch.h"
 
 GBLREF unsigned short	source_name_len;
@@ -41,11 +43,12 @@ GBLREF char		rev_time_buf[];
 GBLREF mident		routine_name, module_name, int_module_name;
 GBLREF unsigned char	*source_buffer;
 GBLREF int4		dollar_zcstatus;
-GBLREF io_pair          io_curr_device;
+GBLREF io_pair          io_curr_device, io_std_device;
 GBLREF char		object_file_name[];
 GBLREF short		object_name_len;
 GBLREF int		object_file_des;
 GBLREF command_qualifier cmd_qlf;
+GBLREF stack_frame	*frame_pointer;
 
 LITREF mval		literal_null;
 
@@ -77,9 +80,9 @@ void	compile_source_file(unsigned short flen, char *faddr, boolean_t MFtIsReqd)
 {
 	plength		plen;
 	mval		fstr, ret;
-	int		i;
+	int		i, rc;
 	unsigned char	*p;
-	int		rc;
+	boolean_t	wildcarded, dm_action;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -95,8 +98,8 @@ void	compile_source_file(unsigned short flen, char *faddr, boolean_t MFtIsReqd)
 		fstr.str.len = flen;
 		ESTABLISH(source_ch);
 		tt_so_do_once = FALSE;
-		op_fnzsearch((mval *)&literal_null, STRM_COMP_SRC, 0, &ret);	/* Clear any remaining stream cache */
-		for (i = 0 ;  ; i++)
+		zsrch_clr(STRM_COMP_SRC);	/* Clear any existing search cache */
+		for (i = 0; ; i++)
 		{
 			plen.p.pint = op_fnzsearch(&fstr, STRM_COMP_SRC, 0, &ret);
 			if (!ret.str.len)
@@ -139,7 +142,6 @@ void	compile_source_file(unsigned short flen, char *faddr, boolean_t MFtIsReqd)
 	}
 }
 
-
 CONDITION_HANDLER(source_ch)
 {
 	int	dummy1, dummy2;
diff --git a/sr_unix/ss_initiate.c b/sr_unix/ss_initiate.c
index 8e4341b..f71c41b 100644
--- a/sr_unix/ss_initiate.c
+++ b/sr_unix/ss_initiate.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2009, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2009-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -219,7 +220,6 @@ boolean_t	ss_initiate(gd_region *reg, 			/* Region in which snapshot has to be s
 	shm_snapshot_ptr_t	ss_shm_ptr;
 	snapshot_context_ptr_t	lcl_ss_ctx;
 	snapshot_filhdr_ptr_t	ss_filhdr_ptr;
-	struct perm_diag_data	pdd;
 	struct stat		stat_buf;
 	uint4			crit_counter, fstat_status, prev_ss_shmsize, tempnamprefix_len, tot_blks;
 	void			*ss_shmaddr;
@@ -384,22 +384,10 @@ boolean_t	ss_initiate(gd_region *reg, 			/* Region in which snapshot has to be s
 		 * INTEG started by read-only processes to create snapshot files that are writable by processes having write
 		 * permissions on the database file.
 		 */
-		if (gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_IPC, &pdd) < 0)
-		{
-			send_msg_csa(CSA_ARG(csa) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-				ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("snapshot file"),
-				RTS_ERROR_STRING(((unix_db_info *)(reg->dyn.addr->file_cntl->file_info))->fn),
-				PERMGENDIAG_ARGS(pdd));
-			gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(6+PERMGENDIAG_ARG_COUNT)
-				ERR_PERMGENFAIL, 4, RTS_ERROR_STRING("snapshot file"),
-				RTS_ERROR_STRING(((unix_db_info *)(reg->dyn.addr->file_cntl->file_info))->fn),
-				PERMGENDIAG_ARGS(pdd));
-			UNFREEZE_REGION_IF_NEEDED(csd, reg);
-			return FALSE;
-		}
+		gtm_permissions(&stat_buf, &user_id, &group_id, &perm, PERM_IPC);
 	}
 	if ((-1 == fstat_res) || (-1 == FCHMOD(shdw_fd, perm))
-		|| (((-1 != user_id) || (-1 != group_id)) && (-1 == fchown(shdw_fd, user_id, group_id))))
+		|| (((INVALID_UID != user_id) || (INVALID_GID != group_id)) && (-1 == fchown(shdw_fd, user_id, group_id))))
 	{
 		status = errno;
 		gtm_putmsg_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("fchmod/fchown"), CALLFROM, status);
diff --git a/sr_unix/ss_lock_facility.c b/sr_unix/ss_lock_facility.c
index eaba2f8..2e63d29 100644
--- a/sr_unix/ss_lock_facility.c
+++ b/sr_unix/ss_lock_facility.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2011 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -84,8 +85,8 @@ boolean_t ss_get_lock(gd_region *reg)
 		{
 			/* On every 4th pass, we bide for awhile */
 			wcs_sleep(LOCK_SLEEP);
-			/* If near end of loop segment (LOCK_TRIES iters), see if target is dead and/or wake it up */
-			if (RETRY_CASLATCH_CUTOFF == (retries % LOCK_TRIES))
+			/* Check if we're due to check for lock abandonment check or holder wakeup */
+			if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 				performCASLatchCheck(latch, TRUE);
 		}
 	}
diff --git a/sr_unix/std_dev_outbndset.c b/sr_unix/std_dev_outbndset.c
index 17d8904..b2c7ea0 100644
--- a/sr_unix/std_dev_outbndset.c
+++ b/sr_unix/std_dev_outbndset.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -36,8 +37,8 @@ void std_dev_outbndset(int4 ob_char)
 	d_tt_struct	*tt_ptr;
 
 	assertpro(MAXOUTOFBAND >= ob_char);
-	if (tt == io_std_device.in->type)
-	{
+	if ((NULL != io_std_device.in) && (tt == io_std_device.in->type))
+	{	/* The NULL check above protects against a <CTRL-C> hitting while we're initializing the terminal */
 		tt_ptr = (d_tt_struct *)io_std_device.in->dev_sp;
 		std_dev_outbnd = TRUE;
 		mask = SHFT_MSK << ob_char;
diff --git a/sr_unix/trigger.h b/sr_unix/trigger.h
index 27b1e1a..58471e3 100644
--- a/sr_unix/trigger.h
+++ b/sr_unix/trigger.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -60,7 +61,6 @@ typedef enum
 #define LITERAL_HASHSEQNUM	"#SEQNUM"
 #define	LITERAL_HASHTNAME	"#TNAME"
 #define	LITERAL_HASHTNCOUNT	"#TNCOUNT"
-#define	LITERAL_HASHTRHASH	"#TRHASH"
 
 #define	TRSBS_IN_NONE		0
 #define	TRSBS_IN_BHASH		1
diff --git a/sr_unix/trigger_compare.c b/sr_unix/trigger_compare.c
index 1d80891..45965b2 100644
--- a/sr_unix/trigger_compare.c
+++ b/sr_unix/trigger_compare.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -104,7 +105,10 @@ void build_kill_cmp_str(char *trigvn, int trigvn_len, char **values, uint4 *valu
 	*ptr++ = '\0';
 	COPY_VAL_TO_INDEX_STR(GVSUBS_SUB, ptr);
 	if (!multi_line_xecute)
+	{
 		COPY_VAL_TO_INDEX_STR(XECUTE_SUB, ptr);
+	} else
+		*ptr++ = '\0';
 	kill_key->len = INTCAST(ptr - kill_key->addr) - 1;
 }
 
@@ -125,7 +129,10 @@ void build_set_cmp_str(char *trigvn, int trigvn_len, char **values, uint4 *value
 	COPY_VAL_TO_INDEX_STR(DELIM_SUB, ptr);
 	COPY_VAL_TO_INDEX_STR(ZDELIM_SUB, ptr);
 	if (!multi_line_xecute)
+	{
 		COPY_VAL_TO_INDEX_STR(XECUTE_SUB, ptr);
+	} else
+		*ptr++ = '\0';
 	set_key->len = INTCAST(ptr - set_key->addr) - 1;
 }
 
@@ -134,10 +141,10 @@ boolean_t search_trigger_hash(char *trigvn, int trigvn_len, stringkey *trigger_h
 	mval			collision_indx;
 	mval			*collision_indx_ptr;
 	int			hash_index;
-	mval			data_val, key_val;
+	mval			key_val;
 	int4			len;
 	mval			mv_hash;
-	boolean_t		match, multi_record;
+	boolean_t		match;
 	char			*ptr, *ptr2;
 	int			trig_index;
 	DCL_THREADGBL_ACCESS;
@@ -208,12 +215,8 @@ boolean_t search_triggers(char *trigvn, int trigvn_len, char **values, uint4 *va
 	mval			mv_hash;
 	mval			mv_trig_indx;
 	boolean_t		match, first_match;
-	int4			num;
 	char			*ptr, *ptr2;
-	int4			rec_len;
 	int			sub_indx;
-	mval			sub_val;
-	uint4			trig_hash;
 	int			trig_hash_index;
 	int			trig_index;
 	char			*xecute_buff;
@@ -355,7 +358,8 @@ boolean_t search_triggers(char *trigvn, int trigvn_len, char **values, uint4 *va
 				/* Assume this is the only matching trigger for now. Later match if found will override */
 			} else
 			{
-				assert((first_match_kill_cmp != kill_cmp) || !kill_cmp);
+				assert((first_match_kill_cmp != kill_cmp) || !kill_cmp ||
+						(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number));
 				/* We have TWO matches. Pick the more appropriate one. */
 				if (doing_set != kill_cmp)
 				{	/* Current trigger matches input trigger type. Overwrite first_match */
diff --git a/sr_unix/trigger_delete.c b/sr_unix/trigger_delete.c
index f03c832..63da84f 100644
--- a/sr_unix/trigger_delete.c
+++ b/sr_unix/trigger_delete.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -103,7 +104,6 @@ void cleanup_trigger_hash(char *trigvn, int trigvn_len, char **values, uint4 *va
 		stringkey *kill_hash, boolean_t del_kill_hash, int match_index)
 {
 	sgmnt_addrs		*csa;
-	uint4			len;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -124,7 +124,6 @@ void cleanup_trigger_name(char *trigvn, int trigvn_len, char *trigger_name, int
 	uint4			used_trigvn_len;
 	mval			val;
 	mval			*val_ptr;
-	char			val_str[MAX_DIGITS_IN_INT + 1];
 	int			var_count;
 	boolean_t		is_auto_name;
 	DCL_THREADGBL_ACCESS;
@@ -178,9 +177,8 @@ STATICFNDEF int4 update_trigger_name_value(char *trig_name, int trig_name_len, i
 {
 	int			len;
 	char			name_and_index[MAX_MIDENT_LEN + 1 + MAX_DIGITS_IN_INT];
-	char			new_trig_name[MAX_TRIGNAME_LEN + 1];
 	int			num_len;
-	char			*ptr, *ptr2;
+	char			*ptr;
 	int4			result;
 	mval			trig_gbl;
 	DCL_THREADGBL_ACCESS;
@@ -189,7 +187,7 @@ STATICFNDEF int4 update_trigger_name_value(char *trig_name, int trig_name_len, i
 	assert(!gv_cur_region->read_only);		/* caller should have already checked this */
 	assert(cs_addrs->hasht_tree == gv_target);	/* should have been set up by caller */
 	assert(gv_target->root);			/* should have been ensured by caller */
-	/* $get(^#t("#TNAME",^#t(GVN,index,"#TRIGNAME")) */
+	/* $get(^#t("#TNAME",^#t(GVN,index,"#TRIGNAME"))) */
 	BUILD_HASHT_SUB_SUB_CURRKEY(LITERAL_HASHTNAME, STRLEN(LITERAL_HASHTNAME), trig_name, trig_name_len - 1);
 	if (!gvcst_get(&trig_gbl))
 	{	/* There has to be a #TNAME entry */
@@ -200,18 +198,18 @@ STATICFNDEF int4 update_trigger_name_value(char *trig_name, int trig_name_len, i
 			trig_name_len - 1, trig_name);
 	}
 	ptr = trig_gbl.str.addr;
-	ptr2 = memchr(ptr, '\0', trig_gbl.str.len);
-	if (NULL == ptr2)
-	{	/* We expect $c(0) in the middle of ptr. If we dont find it, this is a restartable situation */
+	len = MIN(trig_gbl.str.len, MAX_MIDENT_LEN);
+	STRNLEN(ptr, len, len);
+	ptr += len;
+	if ((trig_gbl.str.len == len) || ('\0' != *ptr))
+	{
 		if (CDB_STAGNATE > t_tries)
 			t_retry(cdb_sc_triggermod);
 		assert(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number);
 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TRIGNAMBAD, 4, LEN_AND_LIT("\"#TNAME\""),
 			trig_name_len - 1, trig_name);
 	}
-	len = (ptr2 - ptr) + 1;
-	assert(MAX_MIDENT_LEN >= len);
-	memcpy(name_and_index, trig_gbl.str.addr, len);
+	memcpy(name_and_index, trig_gbl.str.addr, ++len); /* inline increment intended */
 	ptr = name_and_index + len;
 	num_len = 0;
 	I2A(ptr, num_len, new_trig_index);
@@ -232,7 +230,7 @@ STATICFNDEF int4 update_trigger_hash_value(char *trigvn, int trigvn_len, char **
 	mval			mv_hash;
 	mval			mv_hash_indx;
 	int			num_len;
-	char			*ptr, *ptr2;
+	char			*ptr;
 	int4			result;
 	char			tmp_str[MAX_MIDENT_LEN + 1 + MAX_DIGITS_IN_INT];
 	DCL_THREADGBL_ACCESS;
@@ -258,8 +256,10 @@ STATICFNDEF int4 update_trigger_hash_value(char *trigvn, int trigvn_len, char **
 		}
 		assert((MAX_MIDENT_LEN + 1 + MAX_DIGITS_IN_INT) >= key_val.str.len);
 		ptr = key_val.str.addr;
-		ptr2 = memchr(ptr, '\0', key_val.str.len);
-		if (NULL == ptr2)
+		len = MIN(key_val.str.len, MAX_MIDENT_LEN);
+		STRNLEN(ptr, len, len);
+		ptr += len;
+		if ((key_val.str.len == len) || ('\0' != *ptr))
 		{	/* We expect $c(0) in the middle of ptr. If we dont find it, this is a restartable situation */
 			if (CDB_STAGNATE > t_tries)
 				t_retry(cdb_sc_triggermod);
@@ -267,7 +267,6 @@ STATICFNDEF int4 update_trigger_hash_value(char *trigvn, int trigvn_len, char **
 			rts_error_csa(CSA_ARG(REG2CSA(gv_cur_region)) VARLSTCNT(8) ERR_TRIGDEFBAD, 6, trigvn_len, trigvn,
 					LEN_AND_LIT("\"#BHASH\""), mv_hash.str.len, mv_hash.str.addr);
 		}
-		len = ptr2 - ptr;
 		memcpy(tmp_str, key_val.str.addr, len);
 		ptr = tmp_str + len;
 		*ptr++ = '\0';
@@ -293,8 +292,10 @@ STATICFNDEF int4 update_trigger_hash_value(char *trigvn, int trigvn_len, char **
 	}
 	assert((MAX_MIDENT_LEN + 1 + MAX_DIGITS_IN_INT) >= key_val.str.len);
 	ptr = key_val.str.addr;
-	ptr2 = memchr(ptr, '\0', key_val.str.len);
-	if (NULL == ptr2)
+	len = MIN(key_val.str.len, MAX_MIDENT_LEN);
+	STRNLEN(ptr, len, len);
+	ptr += len;
+	if ((key_val.str.len == len) || ('\0' != *ptr))
 	{	/* We expect $c(0) in the middle of ptr. If we dont find it, this is a restartable situation */
 		if (CDB_STAGNATE > t_tries)
 			t_retry(cdb_sc_triggermod);
@@ -302,7 +303,6 @@ STATICFNDEF int4 update_trigger_hash_value(char *trigvn, int trigvn_len, char **
 		rts_error_csa(CSA_ARG(REG2CSA(gv_cur_region)) VARLSTCNT(8) ERR_TRIGDEFBAD, 6, trigvn_len, trigvn,
 				LEN_AND_LIT("\"#LHASH\""), mv_hash.str.len, mv_hash.str.addr);
 	}
-	len = ptr2 - ptr;
 	memcpy(tmp_str, key_val.str.addr, len);
 	ptr = tmp_str + len;
 	*ptr++ = '\0';
@@ -320,7 +320,7 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 	char			curr_name[MAX_MIDENT_LEN + 1];
 	uint4			curr_name_len, orig_name_len;
 	mval			mv_curr_nam;
-	char			*ptr, *ptr2;
+	char			*ptr;
 	char			*name_tail_ptr;
 	char			save_name[MAX_MIDENT_LEN + 1];
 	gv_key			save_currkey[DBKEYALLOC(MAX_KEY_SZ)];
@@ -328,8 +328,7 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 	gv_namehead		*save_gv_target;
 	sgm_info		*save_sgm_info_ptr;
 	mval			trig_gbl;
-	mval			trig_value;
-	mval			trigger_count;
+	mval			*trigger_count;
 	char			trigvn[MAX_MIDENT_LEN + 1];
 	int			trigvn_len;
 	int			trig_indx;
@@ -347,6 +346,7 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 					 * 1 for ")" and 1 for trailing '\0'.
 					 */
 	int			disp_trigvn_len;
+	int			trig_protected_mval_push_count;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -374,6 +374,8 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 	memcpy(save_name, trigger_name, trigger_name_len);
 	save_name[trigger_name_len] = '\0';
 	utilprefixlen = ARRAYSIZE(utilprefix);
+	trig_protected_mval_push_count = 0;
+	INCR_AND_PUSH_MV_STENT(trigger_count); /* Protect trigger_count from garbage collection */
 	for (reg = gd_header->regions, reg_top = reg + gd_header->n_regions; reg < reg_top; reg++)
 	{
 		GVTR_SWITCH_REG_AND_HASHT_BIND_NAME(reg);
@@ -389,7 +391,7 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 		memcpy(curr_name, save_name, trigger_name_len);
 		curr_name_len = trigger_name_len;
 		do {
-			/* GVN = $get(^#t("#TNAME",curr_name) */
+			/* GVN = $get(^#t("#TNAME",curr_name)) */
 			BUILD_HASHT_SUB_SUB_CURRKEY(LITERAL_HASHTNAME, STRLEN(LITERAL_HASHTNAME), curr_name, curr_name_len);
 			if (gvcst_get(&trig_gbl))
 			{
@@ -397,8 +399,10 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 					rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_TRIGMODREGNOTRW, 2, REG_LEN_STR(reg));
 				SAVE_TRIGGER_REGION_INFO(save_currkey);
 				ptr = trig_gbl.str.addr;
-				ptr2 = memchr(ptr, '\0', trig_gbl.str.len);
-				if (NULL == ptr2)
+				trigvn_len = MIN(trig_gbl.str.len, MAX_MIDENT_LEN);
+				STRNLEN(ptr, trigvn_len, trigvn_len);
+				ptr += trigvn_len;
+				if ((trig_gbl.str.len == trigvn_len) || ('\0' != *ptr))
 				{	/* We expect $c(0) in the middle of ptr. If not found, this is a restartable situation */
 					if (CDB_STAGNATE > t_tries)
 						t_retry(cdb_sc_triggermod);
@@ -406,23 +410,29 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TRIGNAMBAD, 4, LEN_AND_LIT("\"#TNAME\""),
 							curr_name_len, curr_name);
 				}
-				trigvn_len = ptr2 - ptr;
-				assert(MAX_MIDENT_LEN >= trigvn_len);
-				memcpy(trigvn, ptr, trigvn_len);
-				ptr += trigvn_len + 1;
+				memcpy(trigvn, trig_gbl.str.addr, trigvn_len);
 				/* the index is just beyond the length of the GVN string */
+				ptr++;
 				A2I(ptr, trig_gbl.str.addr + trig_gbl.str.len, trig_indx);
+				if (1 > trig_indx)
+				{	/* Trigger indexes start from 1 */
+					if (CDB_STAGNATE > t_tries)
+						t_retry(cdb_sc_triggermod);
+					assert(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number);
+					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_TRIGNAMBAD, 4, LEN_AND_LIT("\"#TNAME\""),
+							curr_name_len, curr_name);
+				}
 				SET_DISP_TRIGVN(reg, disp_trigvn, disp_trigvn_len, trigvn, trigvn_len);
 				/* $get(^#t(GVN,"COUNT") */
 				BUILD_HASHT_SUB_SUB_CURRKEY(trigvn, trigvn_len, LITERAL_HASHCOUNT, STRLEN(LITERAL_HASHCOUNT));
-				if (!gvcst_get(&trigger_count))
+				if (!gvcst_get(trigger_count))
 				{
 					UTIL_PRINT_PREFIX_IF_NEEDED(first_gtmio, utilprefix, &utilprefixlen);
 					util_out_print_gtmio("Trigger named !AD exists in the lookup table, "
 							"but global ^!AD has no triggers",
 							FLUSH, curr_name_len, curr_name, disp_trigvn_len, disp_trigvn);
 					trig_stats[STATS_ERROR_TRIGFILE]++;
-					return TRIG_FAILURE;
+					RETURN_AND_POP_MVALS(TRIG_FAILURE);
 				}
 				if (!jnl_format_done && JNL_WRITE_LOGICAL_RECS(csa))
 				{
@@ -430,14 +440,14 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 					jnl_format_done = TRUE;
 				}
 				/* kill the target trigger for GVN at index trig_indx */
-				if (PUT_SUCCESS != (trigger_delete(trigvn, trigvn_len, &trigger_count, trig_indx)))
+				if (PUT_SUCCESS != (trigger_delete(trigvn, trigvn_len, trigger_count, trig_indx)))
 				{
 					UTIL_PRINT_PREFIX_IF_NEEDED(first_gtmio, utilprefix, &utilprefixlen);
 					util_out_print_gtmio("Trigger named !AD exists in the lookup table for global ^!AD,"	\
 								" but was not deleted!", FLUSH, orig_name_len, trigger_name,
 								disp_trigvn_len, disp_trigvn);
 					trig_stats[STATS_ERROR_TRIGFILE]++;
-					return TRIG_FAILURE;
+					RETURN_AND_POP_MVALS(TRIG_FAILURE);
 				} else
 				{
 					csa->incr_db_trigger_cycle = TRUE;
@@ -458,6 +468,7 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 								FLUSH, curr_name_len, curr_name, disp_trigvn_len, disp_trigvn);
 					}
 				}
+				trigger_count->mvtype = 0; /* allow stp_gcol to release the current contents if necessary */
 				RESTORE_TRIGGER_REGION_INFO(save_currkey);
 				triggers_deleted++;
 			}
@@ -475,6 +486,7 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 				break;
 		} while (TRUE);
 	}
+	DECR_AND_POP_MV_STENT();
 	if (!jnl_format_done && (NULL != lgtrig_reg))
 	{	/* There was no journaled region that had a ^#t update, but found at least one journaled region
 		 * so write a LGTRIG logical jnl record there.
@@ -522,10 +534,8 @@ boolean_t trigger_delete_name(char *trigger_name, uint4 trigger_name_len, uint4
 int4 trigger_delete(char *trigvn, int trigvn_len, mval *trigger_count, int index)
 {
 	int			count;
-	mval			*mv_cnt_ptr;
 	mval			mv_val;
 	mval			*mv_val_ptr;
-	int			num_len;
 	char			*ptr1;
 	int4			result;
 	int4			retval;
@@ -542,9 +552,6 @@ int4 trigger_delete(char *trigvn, int trigvn_len, mval *trigger_count, int index
 	mval			trigger_index;
 	mval			xecute_index;
 	uint4			xecute_idx;
-	uint4			used_trigvn_len;
-	mval			val;
-	char			val_str[MAX_DIGITS_IN_INT + 1];
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -584,7 +591,7 @@ int4 trigger_delete(char *trigvn, int trigvn_len, mval *trigger_count, int index
 		}
 		if (TRIGNAME_SUB == sub_indx)
 		{
-			trig_name_len = trig_len;
+			trig_name_len = MIN(trig_len, MAX_TRIGNAME_LEN);
 			assert(MAX_TRIGNAME_LEN >= trig_len);
 			memcpy(trig_name, trigger_value.str.addr, trig_name_len);
 			tt_val[sub_indx] = NULL;
@@ -653,6 +660,7 @@ int4 trigger_delete(char *trigvn, int trigvn_len, mval *trigger_count, int index
 			memcpy(ptr1, trigvn, trigvn_len);
 			ptr1 += trigvn_len;
 			*ptr1++ = '\0';
+			tmp_len = trigvn_len + 1;
 			for (sub_indx = 0; sub_indx < NUM_TOTAL_SUBS; sub_indx++)
 			{
 				/* $get(^#t(GVN,trigger_count,sub_indx) */
@@ -699,12 +707,23 @@ int4 trigger_delete(char *trigvn, int trigvn_len, mval *trigger_count, int index
 				{
 					tt_val[sub_indx] = ptr1;
 					tt_val_len[sub_indx] = trig_len;
+					tmp_len += trig_len;
 					if (0 < trig_len)
 					{
+						if (MAX_BUFF_SIZE <= tmp_len)
+						{ /* Exceeding the temporary buffer is impossible, restart*/
+							if (CDB_STAGNATE > t_tries)
+								t_retry(cdb_sc_triggermod);
+							assert(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number);
+							rts_error_csa(CSA_ARG(REG2CSA(gv_cur_region)) VARLSTCNT(8) ERR_TRIGDEFBAD,
+									6, trigvn_len, trigvn, trigvn_len, trigvn,
+									STRLEN(trigger_subs[sub_indx]), trigger_subs[sub_indx]);
+						}
 						memcpy(ptr1, trigger_value.str.addr, trig_len);
 						ptr1 += trig_len;
 					}
 					*ptr1++ = '\0';
+					tmp_len++;
 				}
 			}
 			/* $get(^#t(GVN,trigger_count,"LHASH") for update_trigger_hash_value */
@@ -744,20 +763,16 @@ int4 trigger_delete(char *trigvn, int trigvn_len, mval *trigger_count, int index
 void trigger_delete_all(char *trigger_rec, uint4 len, uint4 *trig_stats)
 {
 	int			count;
-	char			count_str[MAX_DIGITS_IN_INT + 1];
 	sgmnt_addrs		*csa;
 	mval			curr_gbl_name;
 	int			cycle;
 	mval			*mv_count_ptr;
 	mval			*mv_cycle_ptr;
-	mval			mv_indx;
 	gd_region		*reg, *reg_top;
 	int4			result;
 	gd_region		*lgtrig_reg;
-	int			trig_indx;
 	mval			trigger_cycle;
 	mval			trigger_count;
-	mval			val;
 	boolean_t		this_db_updated;
 	uint4			triggers_deleted;
 	mval			trigjrec;
diff --git a/sr_unix/trigger_parse.c b/sr_unix/trigger_parse.c
index b742197..747e8c7 100644
--- a/sr_unix/trigger_parse.c
+++ b/sr_unix/trigger_parse.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -35,6 +36,7 @@
 GBLREF CLI_ENTRY                *cmd_ary;
 GBLREF	gd_region		*gv_cur_region;
 GBLREF CLI_ENTRY                trigger_cmd_ary[];
+GBLREF	volatile boolean_t	timer_in_handler;
 
 #define BITS_PER_INT		(SIZEOF(uint4) * 8)	/* Number of bits in an integer */
 #define MAX_PIECE_VALUE		(BITS_PER_INT * 1024)	/* Largest value allowed in -pieces string */
@@ -552,7 +554,7 @@ STATICFNDEF boolean_t process_options(char *option_str, uint4 option_len, boolea
 			       boolean_t *consistency, boolean_t *noconsistency)
 {
 	char		local_options[MAX_OPTIONS_LEN];
-	char		*ptr;
+	char		*ptr, *strtokptr;
 
 	if (MAX_OPTIONS_LEN < option_len)
 	{
@@ -564,7 +566,7 @@ STATICFNDEF boolean_t process_options(char *option_str, uint4 option_len, boolea
 	ptr = local_options;
 	for ( ; 0 < option_len; ptr++, option_len--)
 		*ptr = TOUPPER(*ptr);
-	ptr = strtok(local_options, ",");
+	ptr = STRTOK_R(local_options, ",", &strtokptr);
 	do
 	{
 		switch (*ptr)
@@ -604,7 +606,7 @@ STATICFNDEF boolean_t process_options(char *option_str, uint4 option_len, boolea
 				assert(FALSE);	/* Parsing should have found invalid command */
 				break;
 		}
-	} while (ptr = strtok(NULL, ","));
+	} while (ptr = STRTOK_R(NULL, ",", &strtokptr));
 	return !((*isolation && *noisolation) || (*consistency && *noconsistency));
 }
 
diff --git a/sr_unix/trigger_select.c b/sr_unix/trigger_select.c
index b2376ad..0497714 100644
--- a/sr_unix/trigger_select.c
+++ b/sr_unix/trigger_select.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -173,8 +174,7 @@ STATICDEF char *triggerfile_quals[] = {
 
 STATICFNDEF void write_subscripts(char *out_rec, char **out_ptr, char **sub_ptr, int *sub_len)
 {
-	char			*out_p, *ptr, *dst_ptr;
-	int			str_len;
+	char			*out_p, *ptr;
 	uint4			len_left, dst_len, len;
 	char			dst[MAX_GVSUBS_LEN];
 
@@ -214,7 +214,7 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 	char			out_rec[MAX_BUFF_SIZE];
 	char			*out_rec_ptr;
 	char			*ptr1, *ptr2, *ptrtop;
-	mval			mi, trigger_count, trigger_value;
+	mval			mi, trigger_count, trigger_value, *protect_trig_mval;
 	mval			*mv_trig_cnt_ptr;
 	boolean_t		multi_line;
 	boolean_t		have_value, multi_record;
@@ -223,13 +223,13 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 	int4			skip_chars;
 	int			sub_len;
 	char			*sub_ptr;
-	char			*tmp_str_ptr, tmp_string[MAX_SRCLINE];
+	char			*tmp_str_ptr;
 	uint4			tmp_str_len;
 	char			cycle[MAX_DIGITS_IN_INT + 1];
-	unsigned char		util_buff[MAX_TRIG_UTIL_LEN];
-	int4			util_len;
+	int			cycle_len;
 	char			*xecute_buff;
 	int4			xecute_len;
+	int			trig_protected_mval_push_count;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -237,6 +237,8 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 	BUILD_HASHT_SUB_SUB_CURRKEY(gbl_name, gbl_name_len, LITERAL_HASHCOUNT, LITERAL_HASHCOUNT_LEN);
 	if (gvcst_get(&trigger_count))
 	{
+		mv_trig_cnt_ptr = &trigger_count;
+		count = MV_FORCE_INT(mv_trig_cnt_ptr);
 		BUILD_HASHT_SUB_SUB_CURRKEY(gbl_name, gbl_name_len, LITERAL_HASHLABEL, STRLEN(LITERAL_HASHLABEL));
 		if (!gvcst_get(&trigger_value))
 		{	/* There has to be a #LABEL */
@@ -254,8 +256,6 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 				/* 1 == #LABEL - No leading blank in xecute string */
 				skip_chars = 0;
 		}
-		mv_trig_cnt_ptr = &trigger_count;
-		count = MV_FORCE_INT(mv_trig_cnt_ptr);
 		BUILD_HASHT_SUB_SUB_CURRKEY(gbl_name, gbl_name_len, LITERAL_HASHCYCLE, LITERAL_HASHCYCLE_LEN);
 		if (!gvcst_get(&trigger_value))
 		{	/* There has to be a #CYCLE */
@@ -265,10 +265,12 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 			rts_error_csa(CSA_ARG(REG2CSA(gv_cur_region)) VARLSTCNT(8) ERR_TRIGDEFBAD, 6, gbl_name_len,
 					gbl_name, gbl_name_len, gbl_name, LEN_AND_LIT("\"#CYCLE\""));
 		}
-		assert(MAX_DIGITS_IN_INT >= trigger_value.str.len);
-		memcpy(cycle, trigger_value.str.addr, trigger_value.str.len);
-		cycle[trigger_value.str.len] = '\0';
+		cycle_len = MIN(trigger_value.str.len, MAX_DIGITS_IN_INT);
+		memcpy(cycle, trigger_value.str.addr, cycle_len);
+		cycle[cycle_len] = '\0';
+		trig_protected_mval_push_count = 0;
 		xecute_buff = NULL;
+		INCR_AND_PUSH_MV_STENT(protect_trig_mval); /* Protect protect_trig_mval from garbage collection */
 		for (indx = 1; indx <= count; indx++)
 		{
 			if ((0 != nam_indx) && (indx != nam_indx))
@@ -325,8 +327,8 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 					continue;
 				BUILD_HASHT_SUB_MSUB_SUB_CURRKEY(gbl_name, gbl_name_len, mi, trigger_subs[sub_indx],
 					STRLEN(trigger_subs[sub_indx]));
-				have_value = gvcst_get(&trigger_value);
-				have_value = have_value && (trigger_value.str.len);
+				have_value = gvcst_get(protect_trig_mval);
+				have_value = have_value && (protect_trig_mval->str.len);
 				multi_record = FALSE;
 				if (!have_value && (XECUTE_SUB == sub_indx))
 				{
@@ -339,9 +341,9 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 					{	/* Output "-name=XYZ" only if it is user defined */
 						BUILD_HASHT_SUB_MSUB_SUB_MSUB_CURRKEY(gbl_name, gbl_name_len, mi,
 							trigger_subs[sub_indx], STRLEN(trigger_subs[sub_indx]), mi);
-						if (!trigger_user_name(trigger_value.str.addr, trigger_value.str.len))
+						if (!trigger_user_name(protect_trig_mval->str.addr, protect_trig_mval->str.len))
 							continue;
-						trigger_value.str.len--;	/* Don't include trailing # */
+						protect_trig_mval->str.len--;	/* Don't include trailing # */
 					}
 					COPY_TO_OUTPUT_AND_WRITE_IF_NEEDED(out_rec, out_rec_ptr, " ", 1);
 					COPY_TO_OUTPUT_AND_WRITE_IF_NEEDED(out_rec, out_rec_ptr, triggerfile_quals[sub_indx],
@@ -350,8 +352,8 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 					{
 						case DELIM_SUB:
 						case ZDELIM_SUB:
-							MAKE_ZWR_STR(trigger_value.str.addr, trigger_value.str.len, out_rec,
-								     out_rec_ptr);
+							MAKE_ZWR_STR(protect_trig_mval->str.addr, protect_trig_mval->str.len,
+									out_rec, out_rec_ptr);
 							break;
 						case XECUTE_SUB:
 							/* After the buffer is malloc-ed by trigger_gbl_fill_xecute_buffer(), the
@@ -362,7 +364,7 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 							 */
 							assert(NULL == xecute_buff);
 							xecute_buff = trigger_gbl_fill_xecute_buffer(gbl_name, gbl_name_len, &mi,
-								multi_record ? NULL : &trigger_value, &xecute_len);
+								multi_record ? NULL : protect_trig_mval, &xecute_len);
 							multi_line = (NULL != memchr(xecute_buff, '\n', xecute_len));
 							assert(NULL != xecute_buff);
 							if (multi_line)
@@ -378,9 +380,10 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 							break;
 						default:
 							COPY_TO_OUTPUT_AND_WRITE_IF_NEEDED(out_rec, out_rec_ptr,
-								trigger_value.str.addr,trigger_value.str.len);
+								protect_trig_mval->str.addr,protect_trig_mval->str.len);
 					}
 				}
+				protect_trig_mval->mvtype = 0; /* can now be garbage collected in the next iteration */
 			}
 			/* we had better have an XECUTE STRING, if not it is a restartable situation */
 			DEBUG_ONLY(if (NULL == xecute_buff) TREF(donot_commit) |= DONOTCOMMIT_TRIGGER_SELECT_XECUTE;)
@@ -410,18 +413,19 @@ STATICFNDEF void write_out_trigger(char *gbl_name, uint4 gbl_name_len, int nam_i
 				xecute_buff = NULL;
 			}
 		}
+		DECR_AND_POP_MV_STENT();
 	}
 }
 
 STATICFNDEF void write_gbls_or_names(char *gbl_name, uint4 gbl_name_len, boolean_t trig_name)
 {
-	char			save_name[MAX_MIDENT_LEN], curr_name[MAX_MIDENT_LEN];
+	char			save_name[MAX_MIDENT_LEN], curr_name[MAX_MIDENT_LEN], curr_gbl[MAX_MIDENT_LEN];
 	boolean_t		wildcard;
 	mval			mv_curr_nam;
-        mval                    mi, trig_gbl;
+        mval                    trig_gbl;
         mval                    mv_trigger_val;
-	int			indx, count;
-	char			*ptr, *ptr2;
+	int			indx;
+	char			*ptr;
 	uint4			curr_name_len;
 	int			trigvn_len;
 	DCL_THREADGBL_ACCESS;
@@ -443,6 +447,7 @@ STATICFNDEF void write_gbls_or_names(char *gbl_name, uint4 gbl_name_len, boolean
 	{
 		if (trig_name)
 		{
+			/* $get(^#t("#TNAME",trigger_name)) */
 			BUILD_HASHT_SUB_SUB_CURRKEY(LITERAL_HASHTNAME, STR_LIT_LEN(LITERAL_HASHTNAME), curr_name, curr_name_len);
 			if (!gvcst_get(&mv_trigger_val))
 			{
@@ -460,9 +465,22 @@ STATICFNDEF void write_gbls_or_names(char *gbl_name, uint4 gbl_name_len, boolean
 				break;
 			}
 			ptr = mv_trigger_val.str.addr;
-			ptr2 = memchr(ptr, '\0', mv_trigger_val.str.len);
-			if (NULL == ptr2)
-			{	/* We expect $c(0) in the middle of ptr. If we dont find it, this is a restartable situation */
+			trigvn_len = MIN(mv_trigger_val.str.len, MAX_MIDENT_LEN);
+			STRNLEN(ptr, trigvn_len, trigvn_len);
+			ptr += trigvn_len;
+			if ((mv_trigger_val.str.len == trigvn_len) || ('\0' != *ptr))
+			{	/* We expect $c(0) in the middle of addr. If we dont find it, this is a restartable situation */
+				if (CDB_STAGNATE > t_tries)
+					t_retry(cdb_sc_triggermod);
+				assert(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number);
+				rts_error_csa(CSA_ARG(REG2CSA(gv_cur_region)) VARLSTCNT(8) ERR_TRIGDEFBAD, 6,
+						LEN_AND_LIT("\"#TNAME\""), curr_name_len, curr_name,
+						mv_trigger_val.str.len, mv_trigger_val.str.addr);
+			}
+			ptr++;
+			A2I(ptr, mv_trigger_val.str.addr + mv_trigger_val.str.len, indx);
+			if (1 > indx)
+			{	/* We expect a valid index */
 				if (CDB_STAGNATE > t_tries)
 					t_retry(cdb_sc_triggermod);
 				assert(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number);
@@ -470,11 +488,9 @@ STATICFNDEF void write_gbls_or_names(char *gbl_name, uint4 gbl_name_len, boolean
 						LEN_AND_LIT("\"#TNAME\""), curr_name_len, curr_name,
 						mv_trigger_val.str.len, mv_trigger_val.str.addr);
 			}
-			trigvn_len = ptr2 - ptr;
-			assert(('\0' == *ptr2) && (mv_trigger_val.str.len > trigvn_len));
-			ptr2++;
-			A2I(ptr2, mv_trigger_val.str.addr + mv_trigger_val.str.len, indx);
-			STR2MVAL(trig_gbl, mv_trigger_val.str.addr, trigvn_len);
+			/* Use a local buffer to avoid possible garbage collection issues from write_out_trigger below */
+			memcpy(curr_gbl, mv_trigger_val.str.addr, trigvn_len);
+			STR2MVAL(trig_gbl, curr_gbl, trigvn_len);
 		} else
 		{
 			STR2MVAL(trig_gbl, curr_name, curr_name_len);
@@ -508,10 +524,7 @@ STATICFNDEF void dump_all_triggers(void)
 	mval			curr_gbl_name, val;
 	gd_region		*reg;
 	gv_namehead		*save_gvtarget;
-	unsigned char		*key;
-	mval			trigger_value;
 	int			reg_index;
-	mstr			gbl_name;
 	char			global[MAX_MIDENT_LEN];
 	int			gbl_len;
 	DCL_THREADGBL_ACCESS;
@@ -718,7 +731,6 @@ STATICFNDEF boolean_t trigger_select(char *select_list, uint4 select_list_len)
 	gd_binding		*map, *start_map, *end_map;
 	gd_region		*reg, *reg_start, *reg_top;
 	int			*reg_done, reg_array_size, reg_index;
-	sgmnt_addrs		*csa;
 
 	assert(dollar_tlevel);
 	select_status = TRIG_SUCCESS;
diff --git a/sr_unix/trigger_source_read_andor_verify.c b/sr_unix/trigger_source_read_andor_verify.c
index 07f4f94..4b2275b 100644
--- a/sr_unix/trigger_source_read_andor_verify.c
+++ b/sr_unix/trigger_source_read_andor_verify.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2011, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2011-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -187,8 +188,6 @@ int trigger_source_read_andor_verify(mstr *trigname, trigger_action trigger_op,
 	gd_region		*reg;
 	int			src_fetch_status;
 	mstr			regname;
-	rtn_tabent		*rttabent;
-	uint4			cycle;
 	DEBUG_ONLY(unsigned int	lcl_t_tries;)
 	DCL_THREADGBL_ACCESS;
 
@@ -334,13 +333,13 @@ STATICFNDEF int trigger_source_raov(mstr *trigname, trigger_action trigger_op, g
 	int			index;
 	mident			rtn_name;
 	mstr			gbl, xecute_buff;
-	mval			trig_index, val;
+	mval			trig_index;
 	rhdtyp			*rtn_vector;
 	rtn_tabent		*rttabent;
 	sgm_info		*save_sgm_info_ptr;
 	sgmnt_addrs		*csa, *regcsa;
 	sgmnt_data_ptr_t	csd;
-	boolean_t		db_trigger_cycle_mismatch, ztrig_cycle_mismatch, needs_reload, needs_restart;
+	boolean_t		db_trigger_cycle_mismatch, ztrig_cycle_mismatch, needs_reload;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -348,7 +347,9 @@ STATICFNDEF int trigger_source_raov(mstr *trigname, trigger_action trigger_op, g
 	DBGTRIGR((stderr, "trigger_source_raov: Entered with trigger action %d\n", trigger_op));
 	/* Before we try to save anything, see if there is something to save and initialize stuff if not */
 	SAVE_TRIGGER_REGION_INFO(save_currkey);
-	if (find_rtn_tabent(&rttabent, trigname))
+	if (NULL != *rtn_vec)
+		rtn_vector = *rtn_vec;
+	else if (find_rtn_tabent(&rttabent, trigname))
 		rtn_vector = rttabent->rt_adr;
 	else
 		rtn_vector = NULL;
@@ -539,7 +540,7 @@ STATICFNDEF int trigger_source_raov(mstr *trigname, trigger_action trigger_op, g
 /* Routine called when need triggers loaded for a given global */
 STATICFNDEF boolean_t trigger_source_raov_trigload(mstr *trigname, gv_trigger_t **ret_trigdsc, gd_region *reg)
 {
-	mval			val;
+	mval			*val;
 	char			*ptr;
 	int			len;
 	sgmnt_addrs		*csa;
@@ -548,28 +549,46 @@ STATICFNDEF boolean_t trigger_source_raov_trigload(mstr *trigname, gv_trigger_t
 	gvt_trigger_t		*gvt_trigger;
 	mstr			xecute_buff;
 	mname_entry		gvname;
-	int			index, n;
+	int			index;
 	mval			trig_index;
 	gv_trigger_t		*trigdsc;
 	uint4			cycle_start;
 	gvnh_reg_t		*gvnh_reg;
 	boolean_t		name_not_found;
+	int			trig_protected_mval_push_count;
 
+
+	trig_protected_mval_push_count = 0;
+	INCR_AND_PUSH_MV_STENT(val); /* Protect val from garbage collection */
 	assert(dollar_tlevel);
 	DBGTRIGR((stderr, "trigger_source_raov_trigload: entry for %s\n", trigname->addr));
 	/* Find region trigger name is in. If "region-name" has been specified, find only in that region. */
-	name_not_found = !trigger_name_search(trigname->addr, trigname->len, &val, &reg);
+	name_not_found = !trigger_name_search(trigname->addr, trigname->len, val, &reg);
 	if (name_not_found)
-		return TRIG_FAILURE;	/* Trigger name not found - nothing we can do */
+		RETURN_AND_POP_MVALS(TRIG_FAILURE);	/* Trigger name not found - nothing we can do */
 	/* Extract region name and trigger index number from result */
 	assert(NULL != reg);
-	ptr = val.str.addr;
-	len = STRLEN(ptr);	/* Do it this way since "val" has multiple fields null separated */
+	ptr = val->str.addr;
+	len = MIN(val->str.len, MAX_MIDENT_LEN);	/* Look for NULL within the MIN */
+	STRNLEN(ptr, len, len);
 	ptr += len;
-	assert(('\0' == *ptr) && (val.str.len > len));
+	if ((val->str.len == len) || ('\0' != *ptr))
+	{
+		if (CDB_STAGNATE > t_tries)
+			t_retry(cdb_sc_triggermod);
+		/* Return an error instead of TRIGDEFBAD. The caller will throw the error */
+		RETURN_AND_POP_MVALS(TRIG_FAILURE);
+	}
 	ptr++;
-	A2I(ptr, val.str.addr + val.str.len, index);
-	gvname.var_name.addr = val.str.addr;
+	A2I(ptr, val->str.addr + val->str.len, index);
+	if (1 > index)
+	{ /* trigger indexes cannot be less than 1 */
+		if (CDB_STAGNATE > t_tries)
+			t_retry(cdb_sc_triggermod);
+		/* Return an error instead of TRIGDEFBAD. The caller will throw the error */
+		RETURN_AND_POP_MVALS(TRIG_FAILURE);
+	}
+	gvname.var_name.addr = val->str.addr;
 	gvname.var_name.len = len;
 	COMPUTE_HASH_MNAME(&gvname);
 	GV_BIND_NAME_ONLY(gd_header, &gvname, gvnh_reg);	/* does tp_set_sgm() */
@@ -594,7 +613,8 @@ STATICFNDEF boolean_t trigger_source_raov_trigload(mstr *trigname, gv_trigger_t
 	{
 		if (CDB_STAGNATE > t_tries)
 			t_retry(cdb_sc_triggermod);
-		return TRIG_FAILURE; /* Return an error instead of TRIGDEFBAD */
+		/* Return an error instead of TRIGDEFBAD. The caller will throw the error */
+		RETURN_AND_POP_MVALS(TRIG_FAILURE);
 	}
 	gvt->db_trigger_cycle = cycle_start;
 	gvt->db_dztrigger_cycle = csa->db_dztrigger_cycle;
@@ -609,7 +629,7 @@ STATICFNDEF boolean_t trigger_source_raov_trigload(mstr *trigname, gv_trigger_t
 								&trig_index, NULL, (int4 *)&xecute_buff.len);
 	trigdsc->xecute_str.str = xecute_buff;
 	*ret_trigdsc = trigdsc;
-	return TRIG_SUCCESS;
+	RETURN_AND_POP_MVALS(TRIG_SUCCESS);
 }
 
 #endif /* GTM_TRIGGER */
diff --git a/sr_unix/trigger_update.c b/sr_unix/trigger_update.c
index 03c7870..0911578 100644
--- a/sr_unix/trigger_update.c
+++ b/sr_unix/trigger_update.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2010, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -248,7 +249,7 @@ LITREF	char 			*trigger_subs[];
 
 #define	OPTION_BITMAP_TO_STR(OPTIONS, BITMAP, LEN)								\
 {														\
-	int		count, optiontype, lcl_len;								\
+	int		count, lcl_len;										\
 	char		*lcl_ptr;										\
 														\
 	count = 0;												\
@@ -289,13 +290,13 @@ LITREF	char 			*trigger_subs[];
 			FLUSH, disp_trigvn_len, disp_trigvn);						\
 }
 
-#define IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(RESULT)						\
-{														\
-	if (PUT_SUCCESS != RESULT)										\
-	{													\
-		TOO_LONG_REC_KEY_ERROR_MSG;									\
-		return STATS_ERROR_TRIGFILE;									\
-	}													\
+#define IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(RESULT)					\
+{													\
+	if (PUT_SUCCESS != RESULT)									\
+	{												\
+		TOO_LONG_REC_KEY_ERROR_MSG;								\
+		RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);						\
+	}												\
 }
 
 #define TRIGGER_SAME_NAME_EXISTS_ERROR(OPNAME, DISP_TRIGVN_LEN, DISP_TRIGVN)						\
@@ -314,21 +315,21 @@ LITREF	char 			*trigger_subs[];
 	util_out_print_gtmio("Error : !AZ trigger on ^!AD not added as another trigger named !AD already exists",	\
 			FLUSH, OPNAME, DISP_TRIGVN_LEN, DISP_TRIGVN,							\
 			value_len[TRIGNAME_SUB], values[TRIGNAME_SUB]);							\
-	return STATS_ERROR_TRIGFILE;											\
+	RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);									\
 }
 
 /* This error macro is used for all definition errors where the target is ^#t(GVN,<#LABEL|#COUNT|#CYCLE>) */
-#define HASHT_DEFINITION_RETRY_OR_ERROR(SUBSCRIPT,MOREINFO,CSA)	\
-{								\
-	if (CDB_STAGNATE > t_tries)				\
-		t_retry(cdb_sc_triggermod);			\
-	else							\
-	{							\
-		HASHT_DEFINITION_ERROR(SUBSCRIPT,MOREINFO,CSA);	\
-	}							\
+#define HASHT_DEFINITION_RETRY_OR_ERROR(SUBSCRIPT, MOREINFO, CSA)	\
+{									\
+	if (CDB_STAGNATE > t_tries)					\
+		t_retry(cdb_sc_triggermod);				\
+	else								\
+	{								\
+		HASHT_DEFINITION_ERROR(SUBSCRIPT, MOREINFO, CSA);	\
+	}								\
 }
 
-#define HASHT_DEFINITION_ERROR(SUBSCRIPT,MOREINFO,CSA)						\
+#define HASHT_DEFINITION_ERROR(SUBSCRIPT, MOREINFO, CSA)					\
 {												\
 	assert(WBTEST_HELPOUT_TRIGDEFBAD == gtm_white_box_test_case_number);			\
 	rts_error_csa(CSA_ARG(CSA) VARLSTCNT(12) ERR_TRIGDEFBAD, 6, trigvn_len, trigvn,		\
@@ -428,7 +429,7 @@ boolean_t trigger_name_search(char *trigger_name, uint4 trigger_name_len, mval *
 	gv_key		save_currkey[DBKEYALLOC(MAX_KEY_SZ)];
 	gv_namehead	*save_gv_target;
 	gvnh_reg_t	*gvnh_reg;
-	int		index, len;
+	int		len;
 	mname_entry	gvname;
 	sgm_info	*save_sgm_info_ptr;
 
@@ -471,7 +472,7 @@ boolean_t trigger_name_search(char *trigger_name, uint4 trigger_name_len, mval *
 		/* gv_target now points to ^#t in region "reg" */
 		if (0 == gv_target->root)
 			continue;
-		/* $get(^#t("#TNAME",trigger_name) */
+		/* $get(^#t("#TNAME",trigger_name)) */
 		BUILD_HASHT_SUB_SUB_CURRKEY(LITERAL_HASHTNAME, STRLEN(LITERAL_HASHTNAME), trigger_name, trigger_name_len);
 		if (!gvcst_get(val))
 			continue;
@@ -487,8 +488,6 @@ boolean_t trigger_name_search(char *trigger_name, uint4 trigger_name_len, mval *
 		}
 		len = ptr2 - ptr;
 		assert(('\0' == *ptr2) && (val->str.len > len));
-		ptr2++;
-		A2I(ptr2, val->str.addr + val->str.len, index);
 		gvname.var_name.addr = val->str.addr;
 		gvname.var_name.len = len;
 		/* Check if global name is indeed mapped to this region by the gld.
@@ -646,11 +645,9 @@ STATICFNDEF boolean_t trigger_already_exists(char *trigvn, int trigvn_len, char
 	sgmnt_addrs		*csa;
 	boolean_t		db_has_K;
 	boolean_t		db_has_S;
-	char			*ptr;
 	int			hash_indx;
 	boolean_t		kill_cmp, kill_found;
 	int			kill_indx;
-	boolean_t		name_match;
 	boolean_t		set_cmp, set_found, set_name_match, kill_name_match;
 	int			set_indx;
 	mval			trigindx;
@@ -878,7 +875,6 @@ STATICFNDEF boolean_t subtract_trigger_cmd_attributes(char *trigvn, int trigvn_l
 {
 	char			cmd_str[MAX_COMMANDS_LEN];
 	int			cmd_str_len;
-	uint4			len;
 	uint4			restore_set = 0;
 	DCL_THREADGBL_ACCESS;
 
@@ -921,6 +917,9 @@ STATICFNDEF int4 modify_record(char *trigvn, int trigvn_len, char add_delete, in
 	char			trig_options[MAX_OPTIONS_LEN + 1];
 	unsigned char		util_buff[MAX_TRIG_UTIL_LEN];
 	int4			util_len;
+	int			trig_cmds_len;
+	int			trig_name_len;
+	int			trig_options_len;
 	mval			val;
 	uint4			db_cmd_bm, tf_cmd_bm;
 	DCL_THREADGBL_ACCESS;
@@ -931,8 +930,9 @@ STATICFNDEF int4 modify_record(char *trigvn, int trigvn_len, char add_delete, in
 	BUILD_HASHT_SUB_MSUB_SUB_CURRKEY(trigvn, trigvn_len, trigindx, trigger_subs[CMD_SUB], STRLEN(trigger_subs[CMD_SUB]));
 	if (!gvcst_get(&val)) /* There has to be a command string */
 		HASHT_GVN_DEFINITION_RETRY_OR_ERROR(trigger_index, ",\"CMD\"", REG2CSA(gv_cur_region));
-	memcpy(trig_cmds, val.str.addr, val.str.len);
-	trig_cmds[val.str.len] = '\0';
+	trig_cmds_len = MIN(val.str.len, MAX_COMMANDS_LEN);
+	memcpy(trig_cmds, val.str.addr, trig_cmds_len);
+	trig_cmds[trig_cmds_len] = '\0';
 	BUILD_COMMAND_BITMAP(db_cmd_bm, trig_cmds);
 	BUILD_COMMAND_BITMAP(tf_cmd_bm, values[CMD_SUB]);
 	/* If trigger file has specified SET and/or KILL triggers and each of them matched to different triggers in database,
@@ -946,18 +946,22 @@ STATICFNDEF int4 modify_record(char *trigvn, int trigvn_len, char add_delete, in
 	BUILD_HASHT_SUB_MSUB_SUB_CURRKEY(trigvn, trigvn_len, trigindx, trigger_subs[OPTIONS_SUB],
 		STRLEN(trigger_subs[OPTIONS_SUB]));
 	if (gvcst_get(&val))
-		memcpy(trig_options, val.str.addr, val.str.len);
-	else
-		val.str.len = 0;
-	trig_options[val.str.len] = '\0';
+	{
+		trig_options_len = MIN(val.str.len, MAX_OPTIONS_LEN);
+		memcpy(trig_options, val.str.addr, trig_options_len);
+	} else
+		trig_options_len = 0;
+	trig_options[trig_options_len] = '\0';
 	/* get(^#t(GVN,trigindx,"TRIGNAME") */
 	BUILD_HASHT_SUB_MSUB_SUB_CURRKEY(trigvn, trigvn_len, trigindx, trigger_subs[TRIGNAME_SUB],
 		STRLEN(trigger_subs[TRIGNAME_SUB]));
 	if (gvcst_get(&val))
-		memcpy(trig_name, val.str.addr, val.str.len);
-	else
-		val.str.len = 0;
-	trig_name[val.str.len] = '\0';
+	{
+		trig_name_len = MIN(val.str.len, ARRAYSIZE(trig_name));
+		memcpy(trig_name, val.str.addr, trig_name_len);
+	} else
+		trig_name_len = 0;
+	trig_name[trig_name_len] = '\0';
 	if ('+' == add_delete)
 	{
 		/* Process -OPTIONS */
@@ -1037,7 +1041,6 @@ STATICFNDEF int4 gen_trigname_sequence(char *trigvn, int trigvn_len, mval *trigg
 {
 	char			name_and_index[MAX_MIDENT_LEN + 1 + MAX_DIGITS_IN_INT];
 	char			*ptr1;
-	int			rndm_int;
 	int			seq_num;
 	int4			result;
 	char			*seq_ptr, *uniq_ptr;
@@ -1045,9 +1048,7 @@ STATICFNDEF int4 gen_trigname_sequence(char *trigvn, int trigvn_len, mval *trigg
 	uint4			trigname_len, uniq_ptr_len;
 	char			unique_seq_str[NUM_TRIGNAME_SEQ_CHARS + 1];
 	mval			val, *val_ptr;
-	char			val_str[MAX_DIGITS_IN_INT + 1];
 	int			var_count, max_seq_num;
-	mval			label, *label_mv;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -1071,13 +1072,7 @@ STATICFNDEF int4 gen_trigname_sequence(char *trigvn, int trigvn_len, mval *trigg
 			if (max_seq_num < seq_num)
 				return TOO_MANY_TRIGGERS;
 		} else
-		{
-			/* Set ^#t("#LABEL")=3 */
-			label_mv = &label;
-			MV_FORCE_MVAL(label_mv, 3);
-			SET_TRIGGER_GLOBAL_SUB_MVAL(LITERAL_HASHLABEL, STRLEN(LITERAL_HASHLABEL), label, result);
 			seq_num = 1;
-		}
 		uniq_ptr = unique_seq_str;
 		INT2STR(seq_num, uniq_ptr);
 		uniq_ptr_len = STRLEN(uniq_ptr);
@@ -1124,7 +1119,6 @@ boolean_t trigger_update_rec(char *trigger_rec, uint4 len, boolean_t noprompt, u
 {
 	char			add_delete;
 	char			ans[2];
-	char			db_trig_name[MAX_USER_TRIGNAME_LEN + 1];
 	boolean_t		multiline_parse_fail;
 	mname_entry		gvname;
 	int4			max_len;
@@ -1132,10 +1126,7 @@ boolean_t trigger_update_rec(char *trigger_rec, uint4 len, boolean_t noprompt, u
 	int4			rec_len;
 	int4			rec_num;
 	boolean_t		status;
-	char			tcount[MAX_DIGITS_IN_INT];
 	char			tfile_rec_val[MAX_BUFF_SIZE];
-	char			trig_cmds[MAX_COMMANDS_LEN + 1];
-	char			trig_options[MAX_OPTIONS_LEN + 1];
 	char			trigvn[MAX_MIDENT_LEN + 1];
 	char			disp_trigvn[MAX_MIDENT_LEN + SPANREG_REGION_LITLEN + MAX_RN_LEN + 1 + 1];
 					/* SPANREG_REGION_LITLEN for " (region ", MAX_RN_LEN for region name,
@@ -1148,8 +1139,6 @@ boolean_t trigger_update_rec(char *trigger_rec, uint4 len, boolean_t noprompt, u
 	stringkey		kill_trigger_hash, set_trigger_hash;
 	char			tmp_str[MAX_HASH_LEN + 1];
 	char			xecute_buffer[MAX_BUFF_SIZE + MAX_XECUTE_LEN], dispbuff[MAX_TRIG_DISPLEN];
-	mval			xecute_index, xecute_size;
-	mval			reportname, reportnamealt;
 	mval			trigjrec;
 	char			*trigjrecptr;
 	int			trigjreclen;
@@ -1503,12 +1492,12 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 	stringkey *kill_trigger_hash, stringkey *set_trigger_hash, char *disp_trigvn, int disp_trigvn_len, uint4 *trig_stats,
 	boolean_t *first_gtmio, char *utilprefix, int *utilprefixlen)
 {
-	mval			trigname[NUM_OPRS]; /* names of matching kill and/or set trigger */
+	mval			*trigname[NUM_OPRS]; /* names of matching kill and/or set trigger */
 	boolean_t		new_name;
 	sgmnt_addrs		*csa;
 	mval			dummymval;
 	boolean_t		skip_set_trigger, trigger_exists;
-	mval			trigger_count;
+	mval			*trigger_count;
 	boolean_t		newtrigger;
 	int			set_index, kill_index, tmp_index;
 	boolean_t		db_matched_kill, db_matched_set, tmp_matched_kill, tmp_matched_set;
@@ -1523,7 +1512,6 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 	char			*opname;
 	int4			updates;
 	uint4			trigload_status;
-	mval			*trig_cnt_ptr;
 	int			num;
 	boolean_t		result;
 	int			sub_indx;
@@ -1533,6 +1521,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 	char			*ptr1;
 	mval			mv_hash;
 	char			trig_name[MAX_USER_TRIGNAME_LEN + 2];	/* One spot for '#' delimiter and one for trailing '\0' */
+	int			trig_protected_mval_push_count;
 
 	csa = cs_addrs;
 	if (NULL == csa)	/* Remote region */
@@ -1586,17 +1575,22 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 	} else
 		new_name = *new_name_ptr;
 	skip_set_trigger = FALSE;
+	trig_protected_mval_push_count = 0;
+	/* Protect MVALs from garabage collection - NOTE: trigger_count is done last as that needs to be popped in one case below */
+	INCR_AND_PUSH_MV_STENT(trigname[OPR_SET]);
+	INCR_AND_PUSH_MV_STENT(trigname[OPR_KILL]);
+	INCR_AND_PUSH_MV_STENT(trigger_count);
 	assert(('+' == add_delete) || ('-' == add_delete));	/* Has to be + or - */
 	if (gv_target->root)
 	{
 		BUILD_HASHT_SUB_SUB_CURRKEY(trigvn, trigvn_len, LITERAL_HASHCOUNT, STRLEN(LITERAL_HASHCOUNT));
-		if (gvcst_get(&trigger_count))
+		if (gvcst_get(trigger_count))
 		{
 			trigger_exists = trigger_already_exists(trigvn, trigvn_len, values, value_len,
 							set_trigger_hash, kill_trigger_hash,
 							&set_index, &kill_index,
 							&db_matched_set, &db_matched_kill, &full_match,
-							&trigname[OPR_SET], &trigname[OPR_KILL]);
+							trigname[OPR_SET], trigname[OPR_KILL]);
 			newtrigger = FALSE;
 		} else
 		{
@@ -1626,15 +1620,15 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 				       " cannot match two different triggers named !AD and !AD at the same time",
 				       FLUSH, disp_trigvn_len, disp_trigvn,
 				       value_len[TRIGNAME_SUB], values[TRIGNAME_SUB],
-				       trigname[OPR_KILL].str.len, trigname[OPR_KILL].str.addr,
-				       trigname[OPR_SET].str.len, trigname[OPR_SET].str.addr);
+				       trigname[OPR_KILL]->str.len, trigname[OPR_KILL]->str.addr,
+				       trigname[OPR_SET]->str.len, trigname[OPR_SET]->str.addr);
 			else
 				util_out_print_gtmio("Error : Input trigger on ^!AD with trigger name !AD"	\
 				       " cannot match a trigger named !AD and a to-be-created SET trigger"	\
 				       " at the same time", FLUSH, disp_trigvn_len, disp_trigvn,
 				       value_len[TRIGNAME_SUB], values[TRIGNAME_SUB],
-				       trigname[OPR_KILL].str.len, trigname[OPR_KILL].str.addr);
-			return STATS_ERROR_TRIGFILE;
+				       trigname[OPR_KILL]->str.len, trigname[OPR_KILL]->str.addr);
+			RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 		}
 		assert(new_name || !new_match || full_match);
 		if (!new_name && ('+' == add_delete) && !full_match)
@@ -1678,7 +1672,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 				opname = oprname[OPR_SET];
 			}
 			updates = modify_record(trigvn, trigvn_len, add_delete, tmp_index, values, value_len,
-					&trigger_count, tmp_matched_set, tmp_matched_kill,
+					trigger_count, tmp_matched_set, tmp_matched_kill,
 					kill_trigger_hash, set_trigger_hash, set_kill_bitmask);
 			if (0 > updates)
 			{
@@ -1688,32 +1682,32 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Error : Current trigger format not compatible to update " \
 					       "the trigger on ^!AD named !AD", FLUSH, disp_trigvn_len, disp_trigvn,
-					       trigname[oprtype].str.len, trigname[oprtype].str.addr);
-					return STATS_ERROR_TRIGFILE;
+					       trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
+					RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 				case KEY_TOO_LONG:
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Error : ^!AD trigger - key larger than max key size", FLUSH,
 						disp_trigvn_len, disp_trigvn);
-					return STATS_ERROR_TRIGFILE;
+					RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 				case VAL_TOO_LONG:
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Error : ^!AD trigger - value larger than record size", FLUSH,
 						disp_trigvn_len, disp_trigvn);
-					return STATS_ERROR_TRIGFILE;
+					RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 				case K_ZTK_CONFLICT:
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Error : Command options !AD incompatible with trigger on " \
 						"^!AD named !AD", FLUSH, value_len[CMD_SUB], values[CMD_SUB],
 						disp_trigvn_len, disp_trigvn,
-						trigname[oprtype].str.len, trigname[oprtype].str.addr);
-					return STATS_ERROR_TRIGFILE;
+						trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
+					RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 				case ADD_SET_NOCHNG_KILL_TRIG:
 					assert(!is_set);
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("!AZ trigger on ^!AD already present in trigger named !AD" \
 								" - no action taken", FLUSH, opname,
 								disp_trigvn_len, disp_trigvn,
-								trigname[oprtype].str.len, trigname[oprtype].str.addr);
+								trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
 					/* kill trigger is unchanged but set trigger (if present in a different trigger)
 					 * needs to be processed separately.
 					 */
@@ -1723,7 +1717,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Modified !AZ trigger on ^!AD named !AD",
 							FLUSH, opname, disp_trigvn_len, disp_trigvn,
-							trigname[oprtype].str.len, trigname[oprtype].str.addr);
+							trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
 					trig_stats[STATS_MODIFIED]++;
 					trigload_status = STATS_NOERROR_TRIGFILE;
 					break;
@@ -1731,16 +1725,16 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Error : Specified options and commands cannot both be different" \
 						" from those in trigger on ^!AD named !AD", FLUSH, disp_trigvn_len, disp_trigvn,
-							trigname[oprtype].str.len, trigname[oprtype].str.addr);
-					return STATS_ERROR_TRIGFILE;
+							trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
+					RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 				case NAME_CMDS_CONFLICT:
 					UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 					util_out_print_gtmio("Error : Specified name !AD different from that of trigger" \
 						" on ^!AD named !AD but specified commands do not contain those in trigger",
 							FLUSH, value_len[TRIGNAME_SUB], values[TRIGNAME_SUB],
 							disp_trigvn_len, disp_trigvn,
-							trigname[oprtype].str.len, trigname[oprtype].str.addr);
-					return STATS_ERROR_TRIGFILE;
+							trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
+					RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 				default:
 					assertpro(FALSE && updates);
 					break;
@@ -1761,7 +1755,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 						UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 						util_out_print_gtmio("Modified !AZ trigger on ^!AD named !AD", FLUSH,
 									opname, disp_trigvn_len, disp_trigvn,
-									trigname[oprtype].str.len, trigname[oprtype].str.addr);
+									trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
 					}
 				} else if (updates & DELETE_REC)
 				{
@@ -1775,14 +1769,14 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 						UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 						util_out_print_gtmio("Deleted !AZ trigger on ^!AD named !AD",
 									FLUSH, opname, disp_trigvn_len, disp_trigvn,
-									trigname[oprtype].str.len, trigname[oprtype].str.addr);
+									trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
 					}
 					/* if KILL trigger deleted, search for possible new SET trigger index */
 					if (!is_set && (kill_index < set_index)
 						&& !(trigger_already_exists(trigvn, trigvn_len, values, value_len,
 								set_trigger_hash, kill_trigger_hash, &set_index,
 								&tmp_index, &db_matched_set, &db_matched_kill,
-								&full_match, &trigname[oprtype], &trigname[oprtype])))
+								&full_match, trigname[oprtype], trigname[oprtype])))
 					{	/* SET trigger found previously is not found again */
 						if (CDB_STAGNATE > t_tries)
 							t_retry(cdb_sc_triggermod);
@@ -1790,8 +1784,8 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 						util_out_print_gtmio("Error : Previously found SET trigger " \
 							"on ^!AD, named !AD but cannot find it again",
 							FLUSH, disp_trigvn_len, disp_trigvn,
-							trigname[oprtype].str.len, trigname[oprtype].str.addr);
-						return STATS_ERROR_TRIGFILE;
+							trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
+						RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 					}
 				} else if ('+' == add_delete)
 				{
@@ -1805,7 +1799,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 						util_out_print_gtmio("!AZ trigger on ^!AD already present " \
 							"in trigger named !AD - no action taken",
 							FLUSH, opname, disp_trigvn_len, disp_trigvn,
-							trigname[oprtype].str.len, trigname[oprtype].str.addr);
+							trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
 					}
 				} else
 				{
@@ -1817,8 +1811,8 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 									: (!kill_cmp ? oprname[OPR_SET] : oprname[OPR_SETKILL]));
 						UTIL_PRINT_PREFIX_IF_NEEDED(*first_gtmio, utilprefix, utilprefixlen);
 						if (!value_len[TRIGNAME_SUB]
-							|| ((trigname[oprtype].str.len == value_len[TRIGNAME_SUB])
-								&& !memcmp(values[TRIGNAME_SUB], trigname[oprtype].str.addr,
+							|| ((trigname[oprtype]->str.len == value_len[TRIGNAME_SUB])
+								&& !memcmp(values[TRIGNAME_SUB], trigname[oprtype]->str.addr,
 									value_len[TRIGNAME_SUB])))
 						{	/* Trigger name matches input name or name was not specified (in which
 							 * case name is considered to match). So the command specified
@@ -1827,14 +1821,14 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 							util_out_print_gtmio("!AZ trigger on ^!AD not present in trigger "	\
 								"named !AD - no action taken", FLUSH, opname,
 								disp_trigvn_len, disp_trigvn,
-								trigname[oprtype].str.len, trigname[oprtype].str.addr);
+								trigname[oprtype]->str.len, trigname[oprtype]->str.addr);
 						} else
 						{
 							util_out_print_gtmio("!AZ trigger on ^!AD matches trigger "	\
 								"named !AD but not with specified name !AD "		\
 								"- no action taken", FLUSH, opname,
 								disp_trigvn_len, disp_trigvn,
-								trigname[oprtype].str.len, trigname[oprtype].str.addr,
+								trigname[oprtype]->str.len, trigname[oprtype]->str.addr,
 								value_len[TRIGNAME_SUB], values[TRIGNAME_SUB]);
 						}
 					}
@@ -1882,16 +1876,17 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 			}
 			if (newtrigger)
 			{
-				trigger_count = literal_one;
+				POP_MV_STENT();
+				trig_protected_mval_push_count--;
+				trigger_count = (mval *)&literal_one;
 				set_index = 1;
 			} else
 			{
 				assert(!trigger_exists);
 				assert(0 == set_index);
-				trig_cnt_ptr = &trigger_count;
-				num = mval2i(trig_cnt_ptr);
+				num = mval2i(trigger_count);
 				set_index = ++num;
-				i2mval(&trigger_count, num);
+				i2mval(trigger_count, num);
 			}
 		}
 	}
@@ -1900,7 +1895,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 	{
 		memcpy(trig_name, values[TRIGNAME_SUB], value_len[TRIGNAME_SUB] + 1);
 		values[TRIGNAME_SUB] = trig_name;
-		result = gen_trigname_sequence(trigvn, trigvn_len, &trigger_count, values[TRIGNAME_SUB], value_len[TRIGNAME_SUB]);
+		result = gen_trigname_sequence(trigvn, trigvn_len, trigger_count, values[TRIGNAME_SUB], value_len[TRIGNAME_SUB]);
 		if (SEQ_SUCCESS != result)
 		{
 			if (TOO_MANY_TRIGGERS == result)
@@ -1912,7 +1907,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 			{
 				TOO_LONG_REC_KEY_ERROR_MSG;
 			}
-			return STATS_ERROR_TRIGFILE;
+			RETURN_AND_POP_MVALS(STATS_ERROR_TRIGFILE);
 		}
 	}
 	if (trig_stats[STATS_ERROR_TRIGFILE])
@@ -1935,13 +1930,13 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 		value_len[TRIGNAME_SUB] = STRLEN(values[TRIGNAME_SUB]);
 		values[CHSET_SUB] = (gtm_utf8_mode) ? UTF8_NAME : LITERAL_M;
 		value_len[CHSET_SUB] = STRLEN(values[CHSET_SUB]);
-		/* set ^#t(GVN,"#LABEL") = "3" */
+		/* set ^#t(GVN,"#LABEL") = HASHT_GBL_CURLABEL */
 		SET_TRIGGER_GLOBAL_SUB_SUB_STR(trigvn, trigvn_len, LITERAL_HASHLABEL, STRLEN(LITERAL_HASHLABEL),
 					       HASHT_GBL_CURLABEL, STRLEN(HASHT_GBL_CURLABEL), result);
 		IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
 		/* set ^#t(GVN,"#COUNT") = trigger_count */
 		SET_TRIGGER_GLOBAL_SUB_SUB_MVAL(trigvn, trigvn_len, LITERAL_HASHCOUNT, STRLEN(LITERAL_HASHCOUNT),
-						trigger_count, result);
+						*trigger_count, result);
 		IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
 		/* Assert that BHASH and LHASH are not part of NUM_SUBS calculation (confirms the -2 done in #define of NUM_SUBS) */
 		assert(BHASH_SUB == NUM_SUBS);
@@ -1951,7 +1946,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 			if (0 >= value_len[sub_indx])	/* subscript index length is zero (no longer used), skip it */
 				continue;
 			/* set ^#t(GVN,trigger_count,values[sub_indx]) = xecute string */
-			SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_STR(trigvn, trigvn_len, trigger_count,
+			SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_STR(trigvn, trigvn_len, *trigger_count,
 				trigger_subs[sub_indx], STRLEN(trigger_subs[sub_indx]), values[sub_indx],
 				value_len[sub_indx], result);
 			if (XECUTE_SUB != sub_indx)
@@ -1968,20 +1963,20 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 					ptr1 = values[XECUTE_SUB];
 					i2mval(&xecute_index, num);
 					/* set ^#t(GVN,trigger_count,"XECUTE",0) = xecute string length */
-					BUILD_HASHT_SUB_MSUB_SUB_MSUB_CURRKEY(trigvn, trigvn_len, trigger_count,
+					BUILD_HASHT_SUB_MSUB_SUB_MSUB_CURRKEY(trigvn, trigvn_len, *trigger_count,
 						trigger_subs[sub_indx], STRLEN(trigger_subs[sub_indx]), xecute_index);
-					SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MSUB_MVAL(trigvn, trigvn_len, trigger_count,
+					SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MSUB_MVAL(trigvn, trigvn_len, *trigger_count,
 						trigger_subs[sub_indx], STRLEN(trigger_subs[sub_indx]), xecute_index,
 						xecute_size, result);
 					IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
 					while (0 < max_len)
 					{
 						i2mval(&xecute_index, ++num);
-						BUILD_HASHT_SUB_MSUB_SUB_MSUB_CURRKEY(trigvn, trigvn_len, trigger_count,
+						BUILD_HASHT_SUB_MSUB_SUB_MSUB_CURRKEY(trigvn, trigvn_len, *trigger_count,
 							trigger_subs[sub_indx], STRLEN(trigger_subs[sub_indx]), xecute_index);
 						offset = MIN(gv_cur_region->max_rec_size, max_len);
 						/* set ^#t(GVN,trigger_count,"XECUTE",num) = xecute string[offset] */
-						SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MSUB_STR(trigvn, trigvn_len, trigger_count,
+						SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MSUB_STR(trigvn, trigvn_len, *trigger_count,
 							trigger_subs[sub_indx], STRLEN(trigger_subs[sub_indx]), xecute_index,
 							ptr1, offset, result);
 						IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
@@ -1995,11 +1990,11 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 				set_trigger_hash);
 		IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
 		MV_FORCE_UMVAL(&mv_hash, kill_trigger_hash->hash_code);
-		SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MVAL(trigvn, trigvn_len, trigger_count,
+		SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MVAL(trigvn, trigvn_len, *trigger_count,
 			trigger_subs[LHASH_SUB], STRLEN(trigger_subs[LHASH_SUB]), mv_hash, result);
 		IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
 		MV_FORCE_UMVAL(&mv_hash, set_trigger_hash->hash_code);
-		SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MVAL(trigvn, trigvn_len, trigger_count, trigger_subs[BHASH_SUB],
+		SET_TRIGGER_GLOBAL_SUB_MSUB_SUB_MVAL(trigvn, trigvn_len, *trigger_count, trigger_subs[BHASH_SUB],
 			STRLEN(trigger_subs[BHASH_SUB]), mv_hash, result);
 		IF_ERROR_THEN_TOO_LONG_ERROR_MSG_AND_RETURN_FAILURE(result);
 		trigload_status = STATS_NOERROR_TRIGFILE;
@@ -2015,7 +2010,7 @@ STATICFNDEF trig_stats_t trigupdrec_reg(char *trigvn, int trigvn_len, boolean_t
 	assert((STATS_UNCHANGED_TRIGFILE == trigload_status) || (STATS_NOERROR_TRIGFILE == trigload_status));
 	if ((0 == trig_stats[STATS_ERROR_TRIGFILE]) && (STATS_NOERROR_TRIGFILE == trigload_status))
 		trigger_incr_cycle(trigvn, trigvn_len);	/* ^#t records changed in this function, increment cycle */
-	return trigload_status;
+	RETURN_AND_POP_MVALS(trigload_status);
 }
 
 STATICFNDEF boolean_t trigger_update_rec_helper(char *trigger_rec, uint4 len, boolean_t noprompt, uint4 *trig_stats)
diff --git a/sr_unix/trigger_upgrade.c b/sr_unix/trigger_upgrade.c
index 3eccd46..a99ae9e 100644
--- a/sr_unix/trigger_upgrade.c
+++ b/sr_unix/trigger_upgrade.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -57,12 +58,18 @@ GBLREF	boolean_t	is_replicator;
 GBLREF	boolean_t	donot_INVOKE_MUMTSTART;
 #endif
 
-error_def(ERR_TRIGLOADFAIL);
+error_def(ERR_TRIGUPBADLABEL);
+
+#define LITERAL_TRIGJNLREC	"; ^#t physical upgrade from #LABEL 2,3 to #LABEL 4 (no logical change)"
+#define	LITERAL_TRIGJNLREC_LEN	STR_LIT_LEN(LITERAL_TRIGJNLREC)
+LITDEF mval literal_trigjnlrec	= DEFINE_MVAL_LITERAL(MV_STR | MV_NUM_APPROX, 0, 0, LITERAL_TRIGJNLREC_LEN, (char *)LITERAL_TRIGJNLREC, 0, 0);	/* BYPASSOK */
 
 LITREF	mval		literal_batch;
+LITREF	mval		literal_curlabel;
 LITREF	mval		literal_hashlabel;
 LITREF	mval		literal_hashcycle;
 LITREF	mval		literal_hashcount;
+LITREF	mval		literal_hashtrhash;
 #define TRIGGER_SUBSDEF(SUBSTYPE, SUBSNAME, LITMVALNAME, TRIGFILEQUAL, PARTOFHASH)	LITREF mval LITMVALNAME;
 #include "trigger_subs_def.h"
 #undef TRIGGER_SUBSDEF
@@ -70,6 +77,7 @@ LITREF	mval		literal_hashcount;
 DEFINE_NSB_CONDITION_HANDLER(trigger_upgrade_ch)
 
 STATICFNDCL void	gvtr_set_hasht_gblsubs(mval *subs_mval, mval *set_mval);
+STATICFNDCL void	gvtr_kill_hasht_gblsubs(mval *subs_mval, boolean_t killall);
 STATICFNDEF void	gvtr_set_hashtrhash(char *trigvn, int trigvn_len, uint4 hash_code, int trigindx);
 
 STATICFNDEF void	gvtr_set_hasht_gblsubs(mval *subs_mval, mval *set_mval)
@@ -90,6 +98,23 @@ STATICFNDEF void	gvtr_set_hasht_gblsubs(mval *subs_mval, mval *set_mval)
 	return;
 }
 
+STATICFNDEF void	gvtr_kill_hasht_gblsubs(mval *subs_mval, boolean_t killall)
+{
+	uint4		curend;
+	boolean_t	was_null = FALSE, is_null = FALSE;
+	DCL_THREADGBL_ACCESS;
+
+	SETUP_THREADGBL_ACCESS;
+	curend = gv_currkey->end; /* note down gv_currkey->end before changing it so we can restore it before function returns */
+	assert(KEY_DELIMITER == gv_currkey->base[curend]);
+	assert(gv_target->gd_csa == cs_addrs);
+	COPY_SUBS_TO_GVCURRKEY(subs_mval, gv_cur_region, gv_currkey, was_null, is_null); /* updates gv_currkey */
+	gvcst_kill(killall);
+	gv_currkey->end = curend;	/* reset gv_currkey->end to what it was at function entry */
+	gv_currkey->base[curend] = KEY_DELIMITER;    /* restore terminator for entire key so key is well-formed */
+	return;
+}
+
 /* Set ^#t(<gbl>,"#TRHASH",hash_code,nnn)=<gbl>_$c(0)_trigindx where gv_currkey is ^#t(<gbl>).
  * Note: This routine has code very similar to that in "add_trigger_hash_entry". There is just
  * not enough commonality to justify merging the two.
@@ -97,8 +122,7 @@ STATICFNDEF void	gvtr_set_hasht_gblsubs(mval *subs_mval, mval *set_mval)
 STATICFNDEF void	gvtr_set_hashtrhash(char *trigvn, int trigvn_len, uint4 hash_code, int trigindx)
 {
 	uint4		curend;
-	boolean_t	was_null = FALSE, is_null = FALSE;
-	mval		tmpmval, mv_indx, *mv_indx_ptr;
+	mval		mv_indx, *mv_indx_ptr;
 	mval		mv_hash;
 	int		hash_indx, num_len;
 	char		name_and_index[MAX_MIDENT_LEN + 1 + MAX_DIGITS_IN_INT];
@@ -144,15 +168,11 @@ STATICFNDEF void	gvtr_set_hashtrhash(char *trigvn, int trigvn_len, uint4 hash_co
 /* Upgrade ^#t global in "reg" region */
 void	trigger_upgrade(gd_region *reg)
 {
-	boolean_t		trigger_status = TRIG_FAILURE;
 	boolean_t		est_first_pass, do_upgrade, is_defined;
 	boolean_t		was_null = FALSE, is_null = FALSE;
-	int			loopcnt;
 	int			seq_num, trig_seq_num;
-	DEBUG_ONLY(unsigned int	lcl_t_tries;)
-	enum cdb_sc		failure;
-	mval			label, *label_mv;
-	mval			tmpmval, xecuteimval, gvname, *tmpmv, *tmpmv2;
+	int			currlabel;
+	mval			tmpmval, xecuteimval, *gvname, *tmpmv, *tmpmv2;
 	int4			result, tmpint4;
 	uint4			curend, gvname_prev, xecute_curend;
 	uint4			hash_code, kill_hash_code;
@@ -166,10 +186,9 @@ void	trigger_upgrade(gd_region *reg)
 	jnl_private_control	*jpc;
 	uint4			sts;
 	int			close_res;
-	mval			trigjrec;
-	char			trigger_rec[] = "; ^#t physical upgrade from #LABEL 2 to #LABEL 3 (no logical change)";
 	hash128_state_t		hash_state, kill_hash_state;
 	uint4			hash_totlen, kill_hash_totlen;
+	int			trig_protected_mval_push_count;
 #	ifdef DEBUG
 	int			save_dollar_tlevel;
 #	endif
@@ -208,11 +227,11 @@ void	trigger_upgrade(gd_region *reg)
 						 * This also sets up gv_currkey */
 	/* Do actual upgrade of ^#t global.
 	 *
-	 * Below is a sample layout of the pre-upgrade ^#t global
+	 * Below is a sample layout of the label 2 ^#t global
 	 * -------------------------------------------------------
-	 * ^#t("#TNAME","x")="a"_$C(0)_"1"
-	 * ^#t("#TRHASH",89771515,1)="a"_$C(0)_"1"
-	 * ^#t("#TRHASH",106937755,1)="a"_$C(0)_"1"
+	 * ^#t("#TNAME","x")="a"_$C(0)_"1"		(present in DEFAULT only)
+	 * ^#t("#TRHASH",89771515,1)="a"_$C(0)_"1"	(present in DEFAULT only)
+	 * ^#t("#TRHASH",106937755,1)="a"_$C(0)_"1"	(present in DEFAULT only)
 	 * ^#t("a",1,"BHASH")="106937755"
 	 * ^#t("a",1,"CHSET")="M"
 	 * ^#t("a",1,"CMD")="S"
@@ -223,10 +242,10 @@ void	trigger_upgrade(gd_region *reg)
 	 * ^#t("a","#CYCLE")="1"
 	 * ^#t("a","#LABEL")="2"
 	 *
-	 * Below is the upgraded layout of the same ^#t global
+	 * Below is a sample layout of the label 3 ^#t global
 	 * -------------------------------------------------------
-	 * ^#t("#LABEL")="3"
-	 * ^#t("#TNAME","x")="a"_$C(0)_"1"
+	 * ^#t("#LABEL")="3"				(present only after upgrade, not regular trigger load)
+	 * ^#t("#TNAME","x")="a"_$C(0)_"1"		(present in CURRENT region)
 	 * ^#t("a",1,"BHASH")="71945627"
 	 * ^#t("a",1,"CHSET")="M"
 	 * ^#t("a",1,"CMD")="S"
@@ -249,43 +268,59 @@ void	trigger_upgrade(gd_region *reg)
 	 * 3) ^#t("a","#LABEL") bumps from 2 to 3. Similarly ^#t("a","#CYCLE") bumps by one (to make sure triggers for this
 	 *	global get re-read if and when we implement an -ONLINE upgrade).
 	 * 4) DEFAULT used to have ^#t("#TNAME",...) nodes corresponding to triggers across ALL regions in the gbldir and
-	 * 	other regions used to have NO ^#t("#TNAME",...) nodes whereas after the upgrade every region will have
+	 * 	other regions used to have NO ^#t("#TNAME",...) nodes whereas after the upgrade every region have
 	 *	^#t("#TNAME",...) nodes	corresponding to triggers installed in that region. So it is safer to kill ^#t("#TNAME")
 	 *	nodes and add them as needed.
 	 * 5) #TRHASH has moved from ^#t() to ^#t(<gbl>). So it is safer to kill ^#t("#TRHASH")	nodes and add them as needed.
+	 *
+	 * Below is a sample layout of the label 4 ^#t global
+	 * -------------------------------------------------------
+	 * ^#t("#TNAME","x")="a"_$C(0)_"1"		(present in CURRENT region)
+	 * ^#t("a",1,"BHASH")="71945627"
+	 * ^#t("a",1,"CHSET")="M"
+	 * ^#t("a",1,"CMD")="S"
+	 * ^#t("a",1,"LHASH")="71945627"
+	 * ^#t("a",1,"TRIGNAME")="x#"
+	 * ^#t("a",1,"XECUTE")=" do ^twork"
+	 * ^#t("a","#COUNT")="1"
+	 * ^#t("a","#CYCLE")="2"
+	 * ^#t("a","#LABEL")="4"
+	 * ^#t("a","#TRHASH",71945627,1)="a"_$C(0)_"1"
+	 *
+	 * Key aspects of the format change
+	 * ----------------------------------
+	 * 1) Removed ^#t("#LABEL") as it is redundant information and trigger load does not include it
+	 * 2) Multiline triggers were incorrectly processed resulting in incorrect BHASH and LHASH values. Upgrade fixes this
+	 * 3) ^#t("a","#LABEL") bumps from 3 to 4. Similarly ^#t("a","#CYCLE") bumps by one (to make sure
+	 * 	triggers for this global get re-read if and when we implement an -ONLINE upgrade).
 	 */
 	tmpmv = &tmpmval;	/* At all points maintain this relationship. The two are used interchangeably below */
-	if (0 == gv_target->root)
-		do_upgrade = FALSE;
-	else
-	{	/* Check if ^#t("#LABEL") exists. If so, upgrade already done. No need to do it again. */
-		is_defined = gvtr_get_hasht_gblsubs((mval *)&literal_hashlabel, tmpmv);
-		assert(!is_defined
-			|| (MV_IS_STRING(tmpmv) && (tmpmval.str.len == STR_LIT_LEN(HASHT_GBL_CURLABEL))
-				&& !MEMCMP_LIT(tmpmval.str.addr, HASHT_GBL_CURLABEL)));
-		do_upgrade = !is_defined;
-	}
+	if (gv_target->root)
+		do_upgrade = TRUE;
 	/* The below logic assumes ^#t global does not have any integrity errors */
 	assert(do_upgrade);	/* caller should have not invoked us otherwise */
 	if (do_upgrade)
-	{	/* kill ^#t("#TRHASH") and ^#t("#TNAME") first. These will be generated again as we process ^#t(<gbl>,...) nodes */
+	{	/* kill ^#t("#TRHASH"), ^#t("#TNAME") and ^#t("#LABEL") first. Regenerate each again as we process ^#t(<gbl>,...) */
 		csa->incr_db_trigger_cycle = TRUE; /* so that we increment csd->db_trigger_cycle at commit time.
-							 * this will force concurrent processes to read upgraded triggers.
+							 * this forces concurrent processes to read upgraded triggers.
 							 */
 		if (JNL_WRITE_LOGICAL_RECS(csa))
 		{	/* Note that the ^#t upgrade is a physical layout change. But it has no logical change (i.e. users
-			 * will see the same MUPIP TRIGGER -SELECT output as before). So write only a dummy LGTRIG journal
+			 * see the same MUPIP TRIGGER -SELECT output as before). So write only a dummy LGTRIG journal
 			 * record for this operation. Hence write a string that starts with a trigger comment character ";".
 			 */
 			assert(!gv_cur_region->read_only);
-			trigjrec.mvtype = MV_STR;
-			trigjrec.str.len = STRLEN(&trigger_rec[0]);
-			trigjrec.str.addr = &trigger_rec[0];
-			jnl_format(JNL_LGTRIG, NULL, &trigjrec, 0);
+			jnl_format(JNL_LGTRIG, NULL, (mval *)&literal_trigjnlrec, 0);
 		}
+		/* KILL ^#t("#LABEL") unconditionally */
+		BUILD_HASHT_SUB_CURRKEY(LITERAL_HASHLABEL, STRLEN(LITERAL_HASHLABEL));
+		if (0 != gvcst_data())
+			gvcst_kill(TRUE);
+		/* KILL ^#t("#TNAME") unconditionally and regenerate */
 		BUILD_HASHT_SUB_CURRKEY(LITERAL_HASHTNAME, STRLEN(LITERAL_HASHTNAME));
 		if (0 != gvcst_data())
 			gvcst_kill(TRUE);
+		/* KILL ^#t("#TRHASH") unconditionally and regenerate */
 		BUILD_HASHT_SUB_CURRKEY(LITERAL_HASHTRHASH, STRLEN(LITERAL_HASHTRHASH));
 		if (0 != gvcst_data())
 			gvcst_kill(TRUE);
@@ -298,20 +333,22 @@ void	trigger_upgrade(gd_region *reg)
 						 * apply anyways in the case of ^#t).
 						 */
 		nullbyte[0] = '\0';
+		trig_protected_mval_push_count = 0;
+		INCR_AND_PUSH_MV_STENT(gvname); /* Protect gvname from garbage collection */
 		do
 		{
-			op_gvorder(&gvname);
-			if (0 == gvname.str.len)
+			op_gvorder(gvname);
+			if (0 == gvname->str.len)
 				break;
-			assert(ARRAYSIZE(trigvn) > gvname.str.len);
-			memcpy(&trigvn[0], gvname.str.addr, gvname.str.len);
-			gvname.str.addr = &trigvn[0];	/* point away from stringpool to avoid stp_gcol issues */
+			assert(ARRAYSIZE(trigvn) > gvname->str.len);
+			memcpy(&trigvn[0], gvname->str.addr, gvname->str.len);
+			gvname->str.addr = &trigvn[0];	/* point away from stringpool to avoid stp_gcol issues */
 			/* Save gv_currkey->prev so it is restored before next call to op_gvorder (which cares about this field).
 			 * gv_currkey->prev gets tampered with in the for loop below (e.g. BUILD_HASHT_SUB_CURRKEY macro).
 			 * No need to do this for gv_currkey->end since the body of the for loop takes care of restoring it.
 			 */
 			gvname_prev = gv_currkey->prev;
-			BUILD_HASHT_SUB_CURRKEY(gvname.str.addr, gvname.str.len);
+			BUILD_HASHT_SUB_CURRKEY(gvname->str.addr, gvname->str.len);
 			/* At this point, gv_currkey is ^#t(<gvn>) */
 			/* Increment ^#t(<gvn>,"#CYCLE") */
 			is_defined = gvtr_get_hasht_gblsubs((mval *)&literal_hashcycle, tmpmv);
@@ -326,13 +363,20 @@ void	trigger_upgrade(gd_region *reg)
 			{
 				tmpint4 = mval2i(tmpmv);
 				count = tmpint4;
+				/* Get ^#t(<gvn>,"#LABEL"), error out for invalid values. Upgrade disallowed for label 1 triggers */
+				is_defined = gvtr_get_hasht_gblsubs((mval *)&literal_hashlabel, tmpmv);
+				assert(is_defined);
+				currlabel = mval2i(tmpmv);
+				if ((V19_HASHT_GBL_LABEL_INT >= currlabel) || (HASHT_GBL_CURLABEL_INT <= currlabel))
+					rts_error_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_TRIGUPBADLABEL, 6, currlabel,
+							HASHT_GBL_CURLABEL_INT, gvname->str.len, gvname->str.addr,
+							REG_LEN_STR(reg));
 			} else
 				count = 0;
-			/* Set ^#t(<gvn>,"#LABEL")=3 */
-			tmpmval.mvtype = MV_STR;
-			tmpmval.str.addr = HASHT_GBL_CURLABEL;
-			tmpmval.str.len = STRLEN(HASHT_GBL_CURLABEL);
-			gvtr_set_hasht_gblsubs((mval *)&literal_hashlabel, tmpmv);
+			/* Set ^#t(<gvn>,"#LABEL")=HASHT_GBL_CURLABEL */
+			gvtr_set_hasht_gblsubs((mval *)&literal_hashlabel, (mval *)&literal_curlabel);
+			/* Kill ^#t(<gvn>,"#TRHASH") unconditionally and regenerate */
+			gvtr_kill_hasht_gblsubs((mval *)&literal_hashtrhash, TRUE);
 			/* At this point, gv_currkey is ^#t(<gvn>) */
 			for (i = 1; i <= count; i++)
 			{
@@ -344,12 +388,12 @@ void	trigger_upgrade(gd_region *reg)
 				COPY_SUBS_TO_GVCURRKEY(tmpmv, gv_cur_region, gv_currkey, was_null, is_null);
 				/* At this point, gv_currkey is ^#t(<gvn>,i) */
 				/* Compute new LHASH and BHASH hash values.
-				 *	LHASH uses : GVSUBS, XECUTE
-				 *	BHASH uses : GVSUBS, XECUTE, DELIM, ZDELIM, PIECES
+				 *	LHASH uses : GVSUBS,                        XECUTE
+				 *	BHASH uses : GVSUBS, DELIM, ZDELIM, PIECES, XECUTE
 				 * So reach each of these pieces and compute hash along the way.
 				 */
 				STR_PHASH_INIT(hash_state, hash_totlen);
-				STR_PHASH_PROCESS(hash_state, hash_totlen, gvname.str.addr, gvname.str.len);
+				STR_PHASH_PROCESS(hash_state, hash_totlen, gvname->str.addr, gvname->str.len);
 				STR_PHASH_PROCESS(hash_state, hash_totlen, nullbyte, 1);
 				/* Read in ^#t(<gvn>,i,"GVSUBS") */
 				is_defined = gvtr_get_hasht_gblsubs((mval *)&literal_gvsubs, tmpmv);
@@ -395,7 +439,7 @@ void	trigger_upgrade(gd_region *reg)
 					STR_PHASH_PROCESS(hash_state, hash_totlen, tmpmval.str.addr, tmpmval.str.len);
 					STR_PHASH_PROCESS(kill_hash_state, kill_hash_totlen, tmpmval.str.addr, tmpmval.str.len);
 				} else
-				{	/* Multi-line XECUTE string */
+				{	/* Multi-record XECUTE string */
 					/* At this point, gv_currkey is ^#t(<gvn>,i) */
 					xecute_curend = gv_currkey->end; /* note gv_currkey->end so we can restore it later */
 					assert(KEY_DELIMITER == gv_currkey->base[xecute_curend]);
@@ -420,17 +464,18 @@ void	trigger_upgrade(gd_region *reg)
 				STR_PHASH_RESULT(hash_state, hash_totlen, hash_code);
 				STR_PHASH_RESULT(kill_hash_state, kill_hash_totlen, kill_hash_code);
 				/* Set ^#t(<gvn>,i,"LHASH") */
-				i2mval(tmpmv, kill_hash_code);
+				MV_FORCE_UMVAL(tmpmv, kill_hash_code);
 				gvtr_set_hasht_gblsubs((mval *)&literal_lhash, tmpmv);
 				/* Set ^#t(<gvn>,i,"BHASH") */
-				i2mval(tmpmv, hash_code);
+				MV_FORCE_UMVAL(tmpmv, hash_code);
 				gvtr_set_hasht_gblsubs((mval *)&literal_bhash, tmpmv);
 				/* Read in ^#t(<gvn>,i,"TRIGNAME") to determine if #SEQNUM/#TNCOUNT needs to be maintained */
 				is_defined = gvtr_get_hasht_gblsubs((mval *)&literal_trigname, tmpmv);
 				assert(is_defined);
 				assert('#' == tmpmval.str.addr[tmpmval.str.len - 1]);
 				tmpmval.str.len--;
-				if (NULL != (ptr = memchr(tmpmval.str.addr, '#', tmpmval.str.len)))
+				if ((tmpmval.str.len <= ARRAYSIZE(name_and_index)) &&
+						(NULL != (ptr = memchr(tmpmval.str.addr, '#', tmpmval.str.len))))
 				{	/* Auto-generated name. Need to maintain #SEQNUM/#TNCOUNT */
 					/* Take copy of trigger name into non-stringpool location to avoid stp_gcol issues */
 					trigname_len = ptr - tmpmval.str.addr;
@@ -442,19 +487,19 @@ void	trigger_upgrade(gd_region *reg)
 					memcpy(trigname, tmpmval.str.addr, tmpmval.str.len);
 					A2I(ptr, ptr + name_index_len, trig_seq_num);
 					/* At this point, gv_currkey is ^#t(<gvn>,i) */
-					/* $get(^#t("#TNAME",GVN,"#SEQNUM")) */
+					/* $get(^#t("#TNAME",<trigger name>,"#SEQNUM")) */
 					BUILD_HASHT_SUB_SUB_SUB_CURRKEY(LITERAL_HASHTNAME, STR_LIT_LEN(LITERAL_HASHTNAME),
 						trigname, trigname_len, LITERAL_HASHSEQNUM, STR_LIT_LEN(LITERAL_HASHSEQNUM));
 					seq_num = gvcst_get(tmpmv) ? mval2i(tmpmv) : 0;
 					if (trig_seq_num > seq_num)
-					{	/* Set ^#t("#TNAME",GVN,"#SEQNUM") = trig_seq_num */
+					{	/* Set ^#t("#TNAME",<trigger name>,"#SEQNUM") = trig_seq_num */
 						SET_TRIGGER_GLOBAL_SUB_SUB_SUB_STR(LITERAL_HASHTNAME,
 							STR_LIT_LEN(LITERAL_HASHTNAME), trigname, trigname_len,
 							LITERAL_HASHSEQNUM, STR_LIT_LEN(LITERAL_HASHSEQNUM),
 							trigindex, name_index_len, result);
 						assert(PUT_SUCCESS == result);
 					}
-					/* set ^#t("#TNAME",GVN,"#TNCOUNT")++ */
+					/* set ^#t("#TNAME",<trigger name>,"#TNCOUNT")++ */
 					BUILD_HASHT_SUB_SUB_SUB_CURRKEY(LITERAL_HASHTNAME, STR_LIT_LEN(LITERAL_HASHTNAME),
 						trigname, trigname_len, LITERAL_HASHTNCOUNT, STR_LIT_LEN(LITERAL_HASHTNCOUNT));
 					tncount = gvcst_get(tmpmv) ? mval2i(tmpmv) + 1 : 1;
@@ -464,14 +509,14 @@ void	trigger_upgrade(gd_region *reg)
 						tmpmval, result);
 					trigname_len += 1 + name_index_len; /* in preparation for ^#t("#TNAME") set below */
 					assert(PUT_SUCCESS == result);
-					BUILD_HASHT_SUB_CURRKEY(gvname.str.addr, gvname.str.len);
+					BUILD_HASHT_SUB_CURRKEY(gvname->str.addr, gvname->str.len);
 					/* At this point, gv_currkey is ^#t(<gvn>) */
 				} else
 				{
 					/* Take copy of trigger name into non-stringpool location to avoid stp_gcol issues */
-					trigname = &name_and_index[0];
-					trigname_len = tmpmval.str.len;  /* in preparation for ^#t("#TNAME") set below */
-					assert(ARRAYSIZE(name_and_index) > trigname_len);
+					trigname = &name_and_index[0];  /* in preparation for ^#t("#TNAME") set below */
+					trigname_len = MIN(tmpmval.str.len, ARRAYSIZE(name_and_index));
+					assert(ARRAYSIZE(name_and_index) >= trigname_len);
 					memcpy(trigname, tmpmval.str.addr, trigname_len);
 					/* Restore gv_currkey to what it was at beginning of for loop iteration */
 					gv_currkey->end = curend;
@@ -479,35 +524,31 @@ void	trigger_upgrade(gd_region *reg)
 				}
 				/* At this point, gv_currkey is ^#t(<gvn>) */
 				if (kill_hash_code != hash_code)
-					gvtr_set_hashtrhash(gvname.str.addr, gvname.str.len, kill_hash_code, i);
+					gvtr_set_hashtrhash(gvname->str.addr, gvname->str.len, kill_hash_code, i);
 				/* Set ^#t(<gvn>,"#TRHASH",hash_code,i) */
-				gvtr_set_hashtrhash(gvname.str.addr, gvname.str.len, hash_code, i);
+				gvtr_set_hashtrhash(gvname->str.addr, gvname->str.len, hash_code, i);
 				/* Set ^#t("#TNAME",<trigname>)=<gvn>_$c(0)_<trigindx> */
 				/* The upgrade assumes that the region does not contain two triggers with the same name.
 				 * V62000 and before could potentially have this out of design case. Once implemented
 				 * the trigger integrity check will warn users of this edge case */
-				ptr = &trigvn[gvname.str.len];
+				ptr = &trigvn[gvname->str.len];
 				*ptr++ = '\0';
 				ilen = 0;
 				I2A(ptr, ilen, i);
 				ptr += ilen;
 				assert(ptr <= ARRAYTOP(trigvn));
 				SET_TRIGGER_GLOBAL_SUB_SUB_STR(LITERAL_HASHTNAME, STR_LIT_LEN(LITERAL_HASHTNAME),
-					trigname, trigname_len, trigvn, ptr - gvname.str.addr, result);
+					trigname, trigname_len, trigvn, ptr - gvname->str.addr, result);
 				assert(PUT_SUCCESS == result);
-				BUILD_HASHT_SUB_CURRKEY(gvname.str.addr, gvname.str.len);
+				BUILD_HASHT_SUB_CURRKEY(gvname->str.addr, gvname->str.len);
 				/* At this point, gv_currkey is ^#t(<gvn>) */
 			}
 			/* At this point, gv_currkey is ^#t(<gvn>) i.e. gv_currkey->end is correct but gv_currkey->prev
 			 * might have been tampered with. Restore it to proper value first.
 			 */
 			 gv_currkey->prev = gvname_prev;
+			gvname->mvtype = 0; /* can now be garbage collected in the next iteration */
 		} while (TRUE);
-		/* set ^#t("#LABEL")=3 */
-		label_mv = &label;
-		MV_FORCE_MVAL(label_mv, 3);
-		SET_TRIGGER_GLOBAL_SUB_MVAL(LITERAL_HASHLABEL, STRLEN(LITERAL_HASHLABEL), label, result);
-		assert(PUT_SUCCESS == result);		/* Size of count can only get shorter or stay the same */
 	}
 	op_tcommit();
 	REVERT; /* remove our condition handler */
diff --git a/sr_unix/ttt.txt b/sr_unix/ttt.txt
index 4d753dc..7251509 100644
--- a/sr_unix/ttt.txt
+++ b/sr_unix/ttt.txt
@@ -8,12 +8,14 @@
 ;	the license, please stop and do not read further.	;
 ;								;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;This table defines the intermediate code (vax code) generated by an opcode.
-;It drives tttgen.m to generate ttt.c.
-;There are multiple versions of this file by platform family and
-;changes to one should trigger review and likely changes to the others.
-;The format is OC_<opcode name>:<tabs>list of vax instructions,one to a line.
-;The opcode must have a corresponding entry in opcode_def.h
+;
+; This table defines the intermediate code (vax code) generated by an opcode.
+; It drives tttgen.m to generate ttt.c.
+; There are multiple versions of this file by platform family and
+; changes to one should trigger review and likely changes to the others.
+; The format is OC_<opcode name>:<tabs>list of vax instructions,one to a line.
+; The opcode must have a corresponding entry in opcode_def.h
+;
 OC_ADD:		pushab	val.0
 		pushab	val.2
 		pushab	val.1
@@ -68,7 +70,8 @@ OC_CONUM:	movab	val.1,r1
 OC_CONTAIN:	movab	val.1,r0
 		movab	val.2,r1
 		jsb	xfer.xf_contain
-OC_CURRHD:	movl	(ap),addr.0
+OC_CURRHD:	jsb	xfer.xf_currhd
+		movl	r0,val.0
 OC_CURRTN:	movab	val.0,r1
 		jsb	xfer.xf_currtn
 OC_CVTPARM:	pushab	val.0
@@ -100,25 +103,25 @@ OC_EXFUNRET:	pushab	val.1
 		calls	#1,xfer.xf_exfunret
 OC_EXFUNRETALS:	pushab	val.1
 		calls	#1,xfer.xf_exfunretals
-OC_EXTCALL:	pushab	val.2
-		pushab	val.1
+OC_EXTCALL:	pushl	val.2
+		pushl	val.1
 		jsb	xfer.xf_extcall
 OC_EXTEXCAL:	irepab	val.5
 		pushl	val.4
 		pushl	val.3
 		pushl	#0
-		pushab	val.2
-		pushab	val.1
+		pushl	val.2
+		pushl	val.1
 		jsb	xfer.xf_extexfun
 OC_EXTEXFUN:	irepab	val.5
 		pushl	val.4
 		pushl	val.3
 		pushab	val.0
-		pushab	val.2
-		pushab	val.1
+		pushl	val.2
+		pushl	val.1
 		jsb	xfer.xf_extexfun
-OC_EXTJMP:	pushab	val.2
-		pushab	val.1
+OC_EXTJMP:	pushl	val.2
+		pushl	val.1
 		jsb	xfer.xf_extjmp
 OC_EXP:		pushab	val.0
 		pushab	val.2
@@ -180,9 +183,9 @@ OC_FNGVGET1:	pushab	val.0
 OC_FNGET1:	pushab	val.0
 		pushab	val.1
 		calls	#2,xfer.xf_fnget1
-OC_FNINCR:	pushab	val.0		; result of $INCR
-		pushab	val.2		; r->operand[1] = increment
-		pushab	val.1		; r->operand[0] = local-variable to increment
+OC_FNINCR:	pushab	val.0		;/* result of $INCR */
+		pushab	val.2		;/* r->operand[1] = increment */
+		pushab	val.1		;/* r->operand[0] = local-variable to increment */
 		calls	#3,xfer.xf_fnincr
 OC_FNJ2:	pushab	val.0
 		pushl	val.2
@@ -208,9 +211,9 @@ OC_FNLVPRVNAME:	pushab	val.0
 		pushab	val.1
 		calls	#2,xfer.xf_fnlvprvname
 OC_FNNAME:	irepab	val.4
-		pushab	val.1		; r->operand[0]
+		pushab	val.1		; /* r->operand[0] */
 		pushl	val.3
-		pushab	val.0		; result of $NAME
+		pushab	val.0		; /* result of $NAME */
 		calls	val.2,xfer.xf_fnname
 OC_FNNEXT:	pushab	val.0
 		pushab	val.2
@@ -329,14 +332,14 @@ OC_FNZCALL:	irepab	val.2
 OC_FNZCHAR:	irepl	val.2
 		pushab	val.0
 		calls	val.1,xfer.xf_fnzchar
-OC_FNZCONVERT2: pushab  val.0                   ; destination mval
-                pushab  val.2                   ; "U"/"L"/"T"
-                pushab  val.1                   ; string
+OC_FNZCONVERT2: pushab  val.0                   ; /* destination mval */
+                pushab  val.2                   ; /* "U"/"L"/"T" */
+                pushab  val.1                   ; /* string */
                 calls   #3,xfer.xf_fnzconvert2
-OC_FNZCONVERT3: pushab  val.0                   ; Destination mval
-                pushab  val.3                   ; target chset
-                pushab  val.2                   ; src chset
-                pushab  val.1                   ; string
+OC_FNZCONVERT3: pushab  val.0                   ; /* Destination mval */
+                pushab  val.3                   ; /* target chset */
+                pushab  val.2                   ; /* src chset */
+                pushab  val.1                   ; /* string */
                 calls   #4,xfer.xf_fnzconvert3
 OC_FNZDATA:	pushab	val.0
 		pushab	val.1
@@ -442,10 +445,10 @@ OC_FNZSIGPROC:	pushab	val.0
 OC_FNZSOCKET:	irepab  val.2
 		pushab  val.0
 		calls   val.1,xfer.xf_fnzsocket
-OC_FNZSUBSTR:   pushab  val.0                   ; Destination mval
-                pushl   val.3                   ; max byte length
-                pushl   val.2                   ; starting character position
-                pushab  val.1                   ; string
+OC_FNZSUBSTR:   pushab  val.0                   ; /* Destination mval */
+                pushl   val.3                   ; /* max byte length */
+                pushl   val.2                   ; /* starting character position */
+                pushab  val.1                   ; /* string */
                 calls   #4,xfer.xf_fnzsubstr
 OC_FNZTRANSLATE: pushab	val.0
 		pushab	val.3
@@ -465,8 +468,8 @@ OC_FNZTRNLNM:	pushab	val.0
 		pushab	val.2
 		pushab	val.1
 		calls	#7,xfer.xf_fnztrnlnm
-OC_FNZWIDTH:    pushab  val.0                   ; destination mval
-                pushab  val.1                   ; string
+OC_FNZWIDTH:    pushab  val.0                   ; /* destination mval */
+                pushab  val.1                   ; /* string */
                 calls   #2,xfer.xf_fnzwidth
 OC_FOLLOW:	movab	val.1,r0
 		movab	val.2,r1
@@ -515,19 +518,19 @@ OC_GETTRUTH:	movab	val.0,r1
 OC_GVDATA:	pushab	val.0
 		calls	#1,xfer.xf_gvdata
 OC_GVEXTNAM:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2		; /* hash_code */
 		calls	val.1,xfer.xf_gvextnam
 OC_GVGET:	pushab	val.0
 		calls	#1,xfer.xf_gvget
-OC_GVINCR:	pushab	val.0		; result of $INCR
-		pushab	val.2		; r->operand[1] = increment (global-variable to increment is gv_currkey so no operand[0])
+OC_GVINCR:	pushab	val.0		; /* result of $INCR */
+		pushab	val.2		; /* r->operand[1] = increment (global-variable to increment is gv_currkey so no operand[0])
 		calls	#2,xfer.xf_gvincr
 OC_GVKILL:	calls	#0,xfer.xf_gvkill
 OC_GVNAKED:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2		; /* hash_code */
 		calls	val.1,xfer.xf_gvnaked
 OC_GVNAME:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2		; /* hash_code */
 		calls	val.1,xfer.xf_gvname
 OC_GVNEXT:	pushab	val.0
 		calls	#1,xfer.xf_gvnext
@@ -565,9 +568,9 @@ OC_INDDEVPARMS:	pushab	val.0
 		pushl	val.2
 		pushab	val.1
 		jsb	xfer.xf_inddevparms
-OC_INDFNNAME:	pushab	val.2		; r->operand[1] = depth
-		pushab	val.1		; r->operand[0]	= name
-		pushab	val.0		; r->dst
+OC_INDFNNAME:	pushab	val.2		; /* r->operand[1] = depth */
+		pushab	val.1		; /* r->operand[0] = name */
+		pushab	val.0		; /* r->dst */
 		jsb	xfer.xf_indfnname
 OC_INDFUN:	pushab	val.0
 		pushl	val.2
@@ -576,9 +579,9 @@ OC_INDFUN:	pushab	val.0
 OC_INDGLVN:	pushab	val.0
 		pushab	val.1
 		jsb	xfer.xf_indglvn
-OC_INDINCR:	pushab	val.1		; r->operand[0] = indirection expression
-		pushab 	val.2		; r->operand[1] = increment (ILIT)
-		pushab	val.0		; r->dst
+OC_INDINCR:	pushab	val.1		; /* r->operand[0] = indirection expression */
+		pushab 	val.2		; /* r->operand[1] = increment (ILIT) */
+		pushab	val.0		; /* r->dst */
 		jsb	xfer.xf_indincr
 OC_INDLVADR:	pushab	val.1
 		jsb	xfer.xf_indlvadr
@@ -682,9 +685,9 @@ OC_KILLALL:	calls	#0,xfer.xf_killall
 OC_KILLALIASALL:	calls	#0,xfer.xf_killaliasall
 OC_LABADDR:	pushl	val.2
 		pushab	val.1
-		pushab	val.3
+		pushl	val.3
 		calls	#3,xfer.xf_labaddr
-		movl	r0,addr.0
+		movl	r0,val.0
 OC_LCKDECR:	pushl	val.1
 		calls	#1,xfer.xf_lckdecr
 OC_LCKINCR:	pushl	val.1
@@ -776,16 +779,18 @@ OC_RET:		jsb	xfer.xf_ret
 OC_RETARG:	movab	val.1,r0
 		movl	val.2,r1
 		jsb	xfer.xf_retarg
-OC_RHDADDR:	pushab	val.2
+OC_RHDADDR:	pushl	val.2
 		pushab	val.1
 		calls	#2,xfer.xf_rhdaddr
-		movl	r0,addr.0
-OC_RHDADDR1:	pushl	#0
+		movl	r0,val.0
+OC_RHDADDR1:	pushl	#-1
 		pushab	val.1
 		calls	#2,xfer.xf_rhdaddr
-		movl	r0,addr.0
+		movl	r0,val.0
+;
 ; Note if OC_RTERROR call changes, linetail.c and eval_expr.c will also need
 ; to change due to it dereferencing the backpoints to get to the opcode.
+;
 OC_RTERROR:	pushl	val.2
 		pushl	val.1
 		jsb	xfer.xf_rterror
@@ -833,7 +838,7 @@ OC_SETZBRK:	pushl	val.5
 		pushl	val.2
 		pushab	val.1
 		pushab	val.3
-		jsb	xfer.xf_setzbrk	;calls	#5,xfer.xf_setzbrk
+		jsb	xfer.xf_setzbrk		; /* calls #5,xfer.xf_setzbrk */
 OC_SETZEXTRACT:	pushab	val.0
 		pushl	val.3
 		pushl	val.2
@@ -980,8 +985,8 @@ OC_ZTRIGGER:	calls	#0,xfer.xf_ztrigger
 OC_ZTSTART:	calls	#0,xfer.xf_ztstart
 OC_ZWRITESVN:   pushl   val.1
                 calls   #1,xfer.xf_zwritesvn
-OC_FNZWRITE:    pushab  val.0                   ; destination mval
-                pushab  val.1                   ; string
+OC_FNZWRITE:    pushab  val.0                   ; /* destination mval */
+                pushab  val.1                   ; /* string */
                 calls   #2,xfer.xf_fnzwrite
 OC_IGETDST:	calls	#0,xfer.xf_igetdst
 		movl    r0,addr.0
@@ -1005,7 +1010,7 @@ OC_RFRSHLVN:	pushl	val.2
 		calls	#2,xfer.xf_rfrshlvn
 		movl	r0,addr.0
 OC_SAVGVN:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2			; /* hash_code */
 		calls	val.1,xfer.xf_savgvn
 OC_SAVLVN:	irepab	val.2
 		calls	val.1,xfer.xf_savlvn
@@ -1027,10 +1032,10 @@ OC_INDGET2:	pushab	val.1
 		calls	#2,xfer.xf_indget2
 OC_INDMERGE2:	pushab	val.1
 		calls	#1,xfer.xf_indmerge2
-OC_LITC:	pushab	val.1			; opcode not in sr_unix_nsb/ttt or sr_vvms/ttt
+OC_LITC:	pushab	val.1			; /* opcode not in sr_unix_nsb/ttt or sr_vvms/ttt */
 		pushab	val.0
 		calls	#2,xfer.xf_litc
-OC_STOLITC:	movc3	#16,val.2,val.1		; opcode not in sr_unix_nsb/ttt or sr_vvms/ttt
+OC_STOLITC:	movc3	#16,val.2,val.1		; /* opcode not in sr_unix_nsb/ttt or sr_vvms/ttt */
 		pushab	val.1
 		calls	#1,xfer.xf_stolitc
 OC_FNZPEEK:	pushab	val.0
@@ -1039,16 +1044,8 @@ OC_FNZPEEK:	pushab	val.0
 		pushl	val.2
 		pushab	val.1
 		calls	#5,xfer.xf_fnzpeek
-OC_FNZSYSLOG:	pushab	val.0			; destination mval
-		pushab	val.1			; string
+OC_FNZSYSLOG:	pushab	val.0			; /* destination mval */
+		pushab	val.1			; /* string */
 		calls	#2,xfer.xf_fnzsyslog
-OC_RHD_EXT:	pushab	val.4
-		pushab	val.3
-		pushab	val.2
-		pushab	val.1
-		calls 	#4,xfer.xf_rhd_ext
-		movl    r0,addr.0
-OC_LAB_EXT:	calls	#0,xfer.xf_lab_ext
-		movl	r0,addr.0
-OC_ZRUPDATE:	irepab	val.2 			; TODO: decide ??? opcode not          + in sr_unix_nsb/ttt or sr_vvms/ttt ???
+OC_ZRUPDATE:	irepab	val.2
 		calls	val.1,xfer.xf_zrupdate
diff --git a/sr_unix/util_output.c b/sr_unix/util_output.c
index 1ad3804..ec5df90 100644
--- a/sr_unix/util_output.c
+++ b/sr_unix/util_output.c
@@ -1,6 +1,7 @@
  /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -53,7 +54,6 @@ GBLDEF	boolean_t		first_syslog = TRUE;	/* Global for a process - not thread spec
 GBLDEF	char			facility[MAX_INSTNAME_LEN + 100];
 
 GBLREF	io_pair			io_std_device;
-GBLREF	io_pair			io_curr_device;
 GBLREF	boolean_t		blocksig_initialized;
 GBLREF  sigset_t		block_sigsent;
 GBLREF	boolean_t		err_same_as_out;
@@ -72,20 +72,20 @@ error_def(ERR_TEXT);
 #define	ZTRIGBUFF_INIT_ALLOC		1024	/* start at 1K */
 #define	ZTRIGBUFF_INIT_MAX_GEOM_ALLOC	1048576	/* stop geometric growth at this value */
 
-#define GETFAOVALDEF(faocnt, var, type, result, defval) \
+#define GETFAOVALDEF(faocnt, var, type, result, defval) 				\
 	if (faocnt > 0) {result = (type)va_arg(var, type); faocnt--;} else result = defval;
 
-#define INSERT_MARKER					\
-{							\
-	STRNCPY_STR(offset, "-", STRLEN("-"));		\
-	offset += STRLEN("-");				\
+#define INSERT_MARKER									\
+{											\
+	STRNCPY_STR(offset, "-", STRLEN("-"));						\
+	offset += STRLEN("-");								\
 }
 
-#define BUILD_FACILITY(strptr)				\
-{							\
-	STRNCPY_STR(offset, strptr, STRLEN(strptr));	\
-	offset += STRLEN(strptr);			\
-	INSERT_MARKER; 					\
+#define BUILD_FACILITY(strptr)								\
+{											\
+	STRNCPY_STR(offset, strptr, STRLEN(strptr));					\
+	offset += STRLEN(strptr);							\
+	INSERT_MARKER; 									\
 }
 
 /*
@@ -93,7 +93,7 @@ error_def(ERR_TEXT);
  *
  *		!/	!_	!^	!!
  *
-
+ *
  *		!mAC	!mAD	!mAF	!mAS	!mAZ
  *
  *		!mSB	!mSW	!mSL
@@ -584,7 +584,7 @@ void	util_out_send_oper(char *addr, unsigned int len)
 /* 2nd arg: length of system long message (not used in Unix implementation) */
 {
 	sigset_t		savemask;
-	char			*img_type, *offset, *proc_type=NULL, *helper_type=NULL;
+	char			*img_type, *offset, *proc_type, *helper_type;
 	char 			temp_inst_fn[MAX_FN_LEN + 1], fn[MAX_FN_LEN + 1];
 	mstr			log_nam, trans_name;
 	uint4			ustatus;
@@ -596,6 +596,7 @@ void	util_out_send_oper(char *addr, unsigned int len)
 	upd_helper_ctl_ptr_t	upd_helper_ctl;
 	upd_helper_entry_ptr_t	helper, helper_top;
 
+	proc_type = helper_type = NULL;
 	if (first_syslog)
 	{
 		first_syslog = FALSE;
@@ -733,8 +734,7 @@ void	util_out_print_vaparm(caddr_t message, int flush, va_list var, int faocnt)
 	char		*fmt_top1, *fmt_top2; /* the top of the buffer after leaving 1 (and 2 bytes respectively) at the end */
 	int		util_avail_len;
 	mstr		flushtxt;
-	boolean_t	use_stdio;
-	io_pair		save_io_curr_device;
+	boolean_t	use_gtmio;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
@@ -748,7 +748,7 @@ void	util_out_print_vaparm(caddr_t message, int flush, va_list var, int faocnt)
 		if (0 < util_avail_len)
 			TREF(util_outptr) = util_format(message, var, TREF(util_outptr), util_avail_len, faocnt);
 	}
-	use_stdio = (IS_MCODE_RUNNING && (NULL != io_std_device.out) && (tt != io_std_device.out->type) && err_same_as_out);
+	use_gtmio = ((NULL != io_std_device.out) && (!IS_GTMSECSHR_IMAGE) && err_same_as_out);
 	switch (flush)
 	{
 		case NOFLUSH:
@@ -756,7 +756,7 @@ void	util_out_print_vaparm(caddr_t message, int flush, va_list var, int faocnt)
 		case RESET:
 			break;
 		case FLUSH:
-			if (!use_stdio)
+			if (!use_gtmio)
 				*(TREF(util_outptr))++ = '\n';
 		case OPER:
 		case SPRINT:
@@ -796,18 +796,23 @@ void	util_out_print_vaparm(caddr_t message, int flush, va_list var, int faocnt)
 			switch (flush)
 			{
 				case FLUSH:
-					if (use_stdio)
+					if (err_same_as_out)
+					{	/* If err and out are conjoined, make sure that all messages that might have been
+						 * printed using PRINTF (unfortunately, we still have lots of such instances) are
+						 * flushed before we proceed.
+						 */
+						FFLUSH(stdout);
+						FFLUSH(stderr);
+					}
+					if (use_gtmio)
 					{
 						flushtxt.addr = fmt_buff;
 						flushtxt.len = INTCAST(TREF(util_outptr) - TREF(util_outbuff_ptr));
-						save_io_curr_device = io_curr_device;
-						io_curr_device = io_std_device;
-						(io_std_device.out->disp_ptr->write)(&flushtxt);
-						io_curr_device = save_io_curr_device;
-						(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
+						write_text_newline_and_flush_pio(&flushtxt);
 					} else
-					{
+					{	/* We should start caring about FPRINTF's return status at some point. */
 						FPRINTF(stderr, "%s", fmt_buff);
+						FFLUSH(stderr);
 					}
 					break;
 				case OPER:
@@ -853,7 +858,7 @@ void	util_out_print(caddr_t message, int flush, ...)
  * If not, the length of the unflushed buffer is stored in dst_len, the actual unflushed buffer
  * is copeid over to "dst", and a TRUE is returned.
  */
-boolean_t	util_out_save(char *dst, int *dstlen_ptr)
+boolean_t util_out_save(char *dst, int *dstlen_ptr)
 {
 	int	srclen, dstlen;
 	DCL_THREADGBL_ACCESS;
@@ -872,31 +877,13 @@ boolean_t	util_out_save(char *dst, int *dstlen_ptr)
 	return TRUE;
 }
 
-/* If $x of the standard output device is non-zero, and we are going to flush a buffer,
- * put out a new line and then do the buffer flush. Called and used only by PRN_ERROR
- * macro.
- */
+/* If there is something in the util_outptr buffer, flush it. Called and used only by PRN_ERROR macro. */
 void util_cond_flush(void)
 {
-	boolean_t	use_stdio, buffer_empty;
-	mval		flushtxt;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
-	use_stdio = FALSE;
-	buffer_empty = TREF(util_outptr) == TREF(util_outbuff_ptr);
-	if (NULL != io_std_device.out)
-	{
-		use_stdio = IS_MCODE_RUNNING && (tt != io_std_device.out->type) && err_same_as_out;
-		if (0 < io_std_device.out->dollar.x)
-		{
-			if (use_stdio)
-				(io_std_device.out->disp_ptr->wteol)(1, io_std_device.out);
-			else if (!buffer_empty)
-				FPRINTF(stderr, "\n");
-		}
-	}
-	if (!buffer_empty)
+	if (TREF(util_outptr) != TREF(util_outbuff_ptr))
 		util_out_print(NULL, FLUSH);
 }
 
diff --git a/sr_unix/wcs_flu.c b/sr_unix/wcs_flu.c
index 79e038a..c4585fe 100644
--- a/sr_unix/wcs_flu.c
+++ b/sr_unix/wcs_flu.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -220,7 +221,7 @@ boolean_t wcs_flu(uint4 options)
 		if (jb->last_eof_written)
 		{
 			assert(jb->fsync_dskaddr == jb->freeaddr);
-			assert((dba_bg != csd->acc_meth)
+			assert((dba_bg != csd->acc_meth) || !csd->jnl_before_image
 				|| (!cnl->wcs_active_lvl && !csa->acc_meth.bg.cache_state->cacheq_active.fl));
 			REL_CRIT_BEFORE_RETURN;
 			return TRUE;
diff --git a/sr_unix/wcs_get_space.c b/sr_unix/wcs_get_space.c
index 034d81e..bd17a41 100644
--- a/sr_unix/wcs_get_space.c
+++ b/sr_unix/wcs_get_space.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2007, 2013 Fidelity Information Services, Inc	*
+ * Copyright (c) 2007-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -302,8 +303,8 @@ bool	wcs_get_space(gd_region *reg, int needed, cache_rec_ptr_t cr)
 			else
 			{	/* On every 4th pass, we bide for awhile */
 				wcs_sleep(LOCK_SLEEP);
-				/* If near end of loop, see if target is dead and/or wake it up */
-				if (RETRY_CASLATCH_CUTOFF == retries)
+				/* Check if we're due to check for lock abandonment check or holder wakeup */
+				if (0 == (retries & (LOCK_CASLATCH_CHKINTVL - 1)))
 					performCASLatchCheck(&base->latch, TRUE);
 			}
 		}
diff --git a/sr_unix/zhist.c b/sr_unix/zhist.c
index af4fd11..d329b36 100644
--- a/sr_unix/zhist.c
+++ b/sr_unix/zhist.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2013, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2013-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -16,11 +17,14 @@
 #include "min_max.h"
 #include <rtnhdr.h>
 #include "gtmlink.h"
+#include "error.h"
+#include "gtmio.h"
 
 #ifdef AUTORELINK_SUPPORTED /* This entire file */
+GBLREF	int	object_file_des;
 
-/* Routine called from op_rhd_ext() to determine if the routine being called needs to be relinked. To return TRUE,
- * the following conditions must be met:
+/* Routine called from auto_relink_check() and op_rhdadd() to determine if the routine being called needs to be relinked.
+ * To return TRUE, the following conditions must be met:
  *   1. Auto-relinking must be enabled in the directory the routine was located in (which may be different from the
  *      directory of the current routine by the same name).
  *   2. This must be a newer version of the routine than what is currently linked.
@@ -37,20 +41,23 @@ boolean_t need_relink(rhdtyp *rtnhdr, zro_hist *zhist)
 {
 	zro_validation_entry	*iter;
 	uint4			cur_cycle, rtnnmlen;
+	boolean_t		norecurslink;
 	DCL_THREADGBL_ACCESS;
 
 	SETUP_THREADGBL_ACCESS;
 	assert(NULL != zhist);		/* Shouldn't be called unless relinking is possible */
-	/* TODO: Do this check second, if below logic would return TRUE */
-	if ((LINK_NORECURSIVE == TREF(relink_allowed)) && on_stack(rtnhdr, NULL))
-		return FALSE;	/* can't relink, or else we'll get LOADRUNNING */
 	/* If $ZROUTINES cycle has changed since validation list was created, signal relink but the relink only
 	 * actually happens if the file op_zlink() locates has a different object hashcode than the currently
 	 * linked routine - else it just rebuilds the history and calls it good.
 	 */
 	if (zhist->zroutines_cycle != TREF(set_zroutines_cycle))
+	{	/* Check if we can return TRUE for this routine */
+		if ((LINK_NORECURSIVE == TREF(relink_allowed)) && on_stack(rtnhdr, NULL))
+			return FALSE;	/* can't relink, or else we'll get LOADRUNNING */
 		return TRUE;
+	}
 	/* Traverse list corresponding to zro entries */
+	norecurslink = (LINK_NORECURSIVE == TREF(relink_allowed));
 	for (iter = &zhist->base[0]; iter != zhist->end; iter++)
 	{
 		DEBUG_ONLY(rtnnmlen = mid_len(&iter->relinkrec->rtnname_fixed));
@@ -58,7 +65,11 @@ boolean_t need_relink(rhdtyp *rtnhdr, zro_hist *zhist)
 		       && (0 == memcmp(&iter->relinkrec->rtnname_fixed, rtnhdr->routine_name.addr, rtnnmlen)));
 		cur_cycle = iter->relinkrec->cycle;
 		if (cur_cycle != iter->cycle)
+		{	/* Check if we can return TRUE for this routine */
+			if (norecurslink && on_stack(rtnhdr, NULL))
+				return FALSE;	/* can't relink, or else we'll get LOADRUNNING */
 			return TRUE;
+		}
 	}
 	return FALSE;
 }
@@ -92,9 +103,12 @@ zro_hist *zro_zhist_saverecent(zro_search_hist_ent *zhist_valent_end, zro_search
 	lcl_recent_zhist = (zro_hist *)malloc(SIZEOF(zro_hist) + (SIZEOF(zro_validation_entry) * hist_len));
 	lcl_recent_zhist->zroutines_cycle = TREF(set_zroutines_cycle);
 	lcl_recent_zhist->end = &lcl_recent_zhist->base[0] + hist_len;
+	assert(NULL == TREF(save_zhist));
+	TREF(save_zhist) = lcl_recent_zhist;
+	ESTABLISH_RET(zro_ins_rec_fail_ch, NULL);
 	for (zhist_valent = zhist_valent_base, zhent = &lcl_recent_zhist->base[0];
-		0 < hist_len;
-			zhist_valent++, zhent++, hist_len--)
+	     0 < hist_len;
+	     zhist_valent++, zhent++, hist_len--)
 	{
 		rtnname.addr = zhist_valent->rtnname.c;
 		rtnname.len = zhist_valent->rtnname_len;
@@ -105,9 +119,28 @@ zro_hist *zro_zhist_saverecent(zro_search_hist_ent *zhist_valent_end, zro_search
 		zhist_valent->zro_valent.cycle = rec->cycle;
 		memcpy((char *)zhent, (char *)&zhist_valent->zro_valent, SIZEOF(zro_validation_entry));
 	}
+	REVERT;
+	TREF(save_zhist) = NULL;
 	return lcl_recent_zhist;
 }
 
+/* Condition handler called when relinkctl_insert_record() fails. We specifically need to (1) release the zro_hist structure
+ * we allocated and (2) close the object file before driving the next condition handler.
+ */
+CONDITION_HANDLER(zro_ins_rec_fail_ch)
+{
+	int	rc;
+
+	START_CH(TRUE);
+	if (NULL != TREF(save_zhist))
+	{
+		free(TREF(save_zhist));
+		TREF(save_zhist) = NULL;
+	}
+	CLOSE_OBJECT_FILE(object_file_des, rc);		/* Close object file ignoring error (processing primary error) */
+	NEXTCH;
+}
+
 /* Routine called from zro_search_hist() to add a $ZROUTINES entry to the (local) search history for a given object file.
  *
  * Parameters:
diff --git a/sr_unix/zlmov_lnames.c b/sr_unix/zlmov_lnames.c
index 3f4fd56..04be170 100644
--- a/sr_unix/zlmov_lnames.c
+++ b/sr_unix/zlmov_lnames.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -10,8 +11,11 @@
  ****************************************************************/
 
 #include "mdef.h"
+
 #include "gtm_string.h"
+
 #include <rtnhdr.h>
+#include "arlinkdbg.h"
 
 #ifdef USHBIN_SUPPORTED
 /* Routine to copy label names out of a shared object's literal text pool for a version of an object
@@ -42,16 +46,23 @@ void zlmov_lnames(rhdtyp *hdr)
 		       && (lab_ent->lab_name.addr < (char *)(hdr->literal_text_adr + hdr->literal_text_len)));
 		size += lab_ent->lab_name.len;
 	}
-	lab_ptr = (char *)malloc(size);
-	/* Store address of malloc'd label text block in the routine header so we can find it to release it on an unlink-all
-	 * (ZGOTO 0:entryref).
-	 */
-	hdr->lbltext_ptr = (unsigned char *)lab_ptr;
-	for (lab_ent = lab_bot + 1; lab_ent < lab_top; lab_ent++)
+	if (0 < size)
 	{
-		memcpy(lab_ptr, lab_ent->lab_name.addr, lab_ent->lab_name.len);
-		lab_ent->lab_name.addr = lab_ptr;
-		lab_ptr += lab_ent->lab_name.len;
-	}
+		lab_ptr = (char *)malloc(size);
+		DBGARLNK((stderr, "zlmov_lnames: Label names copied from rtn %.*s (rtnhdr 0x"lvaddr") to malloc'd space at 0x"lvaddr
+			  " len %d\n", hdr->routine_name.len, hdr->routine_name.addr, hdr, lab_ptr, size));
+		/* Store address of malloc'd label text block in the routine header so we can find it to release it on an unlink-all
+		 * (ZGOTO 0:entryref).
+		 */
+		hdr->lbltext_ptr = (unsigned char *)lab_ptr;
+		for (lab_ent = lab_bot + 1; lab_ent < lab_top; lab_ent++)
+		{
+			memcpy(lab_ptr, lab_ent->lab_name.addr, lab_ent->lab_name.len);
+			lab_ent->lab_name.addr = lab_ptr;
+			lab_ptr += lab_ent->lab_name.len;
+		}
+	} else
+		DBGARLNK((stderr, "zlmov_lnames: Label names for rtn %.*s (rtnhdr 0x"lvaddr" not copied (nothing to copy)\n",
+			  hdr->routine_name.len, hdr->routine_name.addr, hdr));
 }
 #endif /* USHBIN_SUPPORTED */
diff --git a/sr_unix/zro_load.c b/sr_unix/zro_load.c
index 43e38cf..aa0bbfe 100644
--- a/sr_unix/zro_load.c
+++ b/sr_unix/zro_load.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -153,9 +154,25 @@ void zro_load(mstr *str)
 #					endif
 				if (enable_autorelink)
 				{	/* Only setup autorelink struct if it is enabled */
-					transtr.addr = tranbuf;
-					transtr.len = pblk.b_esl;
-					array[oi].relinkctl_sgmaddr = (void_ptr_t)relinkctl_attach(&transtr);
+					if (!TREF(is_mu_rndwn_rlnkctl))
+					{
+						transtr.addr = tranbuf;
+						transtr.len = pblk.b_esl;
+						array[oi].relinkctl_sgmaddr = (void_ptr_t)relinkctl_attach(&transtr, NULL, 0);
+					} else
+					{	/* If zro_load() is called as a part of MUPIP RUNDOWN -RELINKCTL, then we do not
+						 * want to do relinkctl_attach() on all relinkctl files at once because we leave
+						 * the function holding the linkctl lock, which might potentially cause a deadlock
+						 * if multiple processes are run concurrently with different $gtmroutines. However,
+						 * we need a way to tell mu_rndwn_rlnkctl() which object directories are autorelink-
+						 * enabled. For that we set a negative number to the presently unused count field of
+						 * object directory entries in the zro_ent linked list. If we ever decide to make
+						 * that value meaningful, then, perhaps, ensuring that this count remains negative
+						 * in case of MUPIP RUNDOWN -RELINKCTL but has the correct absolute value would do
+						 * the trick.
+						 */
+						array[oi].count = ZRO_DIR_ENABLE_AR;
+					}
 				}
 #				endif
 			}
diff --git a/sr_unix/zro_search.c b/sr_unix/zro_search.c
index 3ada824..d52a457 100644
--- a/sr_unix/zro_search.c
+++ b/sr_unix/zro_search.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -137,7 +138,8 @@ void zro_search(mstr *objstr, zro_ent **objdir, mstr *srcstr, zro_ent **srcdir,
 			sp = op + 1;
 			if (ZRO_TYPE_OBJLIB == op->type)
 			{
-				op = sp;				continue;
+				op = sp;
+				continue;
 			}
 			assert(ZRO_TYPE_COUNT == sp->type);
 			srccnt = (sp++)->count;
@@ -218,7 +220,7 @@ zro_hist *zro_search_hist(char *objnamebuf, zro_ent **objdir)
 	assert(NULL != objstr.addr);
 	objstr.len = STRLEN(objstr.addr);
 	assert(0 < objstr.len);
-	DBGARLNK((stderr, "/n/nzro_search_hist: Entered for %s\n", objnamebuf));
+	DBGARLNK((stderr, "\n\nzro_search_hist: Entered for %s\n", objnamebuf));
 	/* First parse our input string to isolate the directory name we will look up */
 	memset(&pblk, 0, SIZEOF(pblk));
 	pblk.buff_size = MAX_FBUFF;
diff --git a/sr_unix/zroutinessp.h b/sr_unix/zroutinessp.h
index 213f0dd..7e296f9 100644
--- a/sr_unix/zroutinessp.h
+++ b/sr_unix/zroutinessp.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,12 +14,17 @@
 #define ZROUTINESSP_H_INCLUDED
 
 /* Parse token types returned by zro_gettok() used when parsing $ZROUTINES values */
-#define ZRO_EOL 	0	/* End of line */
-#define ZRO_IDN 	1	/* Identifier/name - directory or file name */
-#define ZRO_DEL 	' '	/* Delimiter (space) */
-#define ZRO_LBR 	'('	/* Left parenthesis denoting source directory list start */
-#define ZRO_RBR 	')'	/* Right parenthesis denoting source directory list end */
-#define ZRO_ALF		'*'	/* Auto-relink flag/indicator */
+#define ZRO_EOL 		0	/* End of line */
+#define ZRO_IDN 		1	/* Identifier/name - directory or file name */
+#define ZRO_DEL 		' '	/* Delimiter (space) */
+#define ZRO_LBR 		'('	/* Left parenthesis denoting source directory list start */
+#define ZRO_RBR 		')'	/* Right parenthesis denoting source directory list end */
+#define ZRO_ALF			'*'	/* Auto-relink flag/indicator */
+
+/* Value to use in the count field of a zro_ent structure to mark a particular directory in $gtmroutines as autorelink-enabled for
+ * subsequent traversal in MUPIP RUNDOWN -RELINKCTL. The value must be negative to be distinguishable from a real count.
+ */
+#define ZRO_DIR_ENABLE_AR	-1
 
 /* zro_ent fields are interpreted based on entry type:
  * ZRO_TYPE_COUNT --> count indicates number of entries following
@@ -31,7 +37,7 @@
 typedef	struct zro_ent_type
 {
 	uint4		type;
-	uint4		count;
+	int4		count;
 	mstr		str;			/* Path name */
 	void_ptr_t	shrlib; 		/* Result of dlopen(), if a shared library */
 	void_ptr_t	shrsym; 		/* Placeholder for result of fgn_getrtn(), which we pass from zro_search() to
@@ -41,7 +47,6 @@ typedef	struct zro_ent_type
 } zro_ent;
 
 int zro_gettok(char **lp, char *top, mstr *tok);
-void zsrch_clr(int indx);
 void zro_search(mstr *objstr, zro_ent **objdir, mstr *srcstr, zro_ent **srcdir, boolean_t skip);
 #ifdef AUTORELINK_SUPPORTED
 zro_hist *zro_search_hist(char *objnamebuf, zro_ent **objdir);
diff --git a/sr_unix/zshow_rctldump.c b/sr_unix/zshow_rctldump.c
index 8136031..916d1c7 100644
--- a/sr_unix/zshow_rctldump.c
+++ b/sr_unix/zshow_rctldump.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2014-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -37,6 +38,7 @@
 	}										\
 }
 
+/* Implements ZSHOW "A". But also called by MUPIP RCTLDUMP ("output" parameter is NULL in this case) to do the same thing. */
 void	zshow_rctldump(zshow_out *output)
 {
 	open_relinkctl_sgm	*linkctl;
@@ -58,7 +60,8 @@ void	zshow_rctldump(zshow_out *output)
 		nbytes = SNPRINTF(buff, SIZEOF(buff), "Relinkctl filename       : %s", linkctl->relinkctl_path);
 		DUMP_ONE_LINE(output, buff, nbytes);
 		n_records = hdr->n_records;
-		nbytes = SNPRINTF(buff, SIZEOF(buff), "# of routines            : %d", n_records);
+		nbytes = SNPRINTF(buff, SIZEOF(buff), "# of routines / max      : %d / %d", n_records,
+				  hdr->relinkctl_max_rtn_entries);
 		DUMP_ONE_LINE(output, buff, nbytes);
 		nbytes = SNPRINTF(buff, SIZEOF(buff), "# of attached processes  : %d", hdr->nattached);
 		DUMP_ONE_LINE(output, buff, nbytes);
diff --git a/sr_unix/zshow_zcalls.c b/sr_unix/zshow_zcalls.c
index 52ce515..2d7d4b1 100644
--- a/sr_unix/zshow_zcalls.c
+++ b/sr_unix/zshow_zcalls.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,12 +10,53 @@
  *								*
  ****************************************************************/
 
-/*** STUB FILE ***/
-
 #include "mdef.h"
-#include "mlkdef.h"
+
+#include "gtm_string.h"
+#include <stdarg.h>
+#include <errno.h>
+#include "gtm_stdlib.h"
+#include "copy.h"
+#include "lv_val.h"		/* needed for "fgncal.h" */
+#include "fgncal.h"
+#include "gtmxc_types.h"
+#include "mvalconv.h"
+#include "util.h"
 #include "zshow.h"
 
+#define	DO_ONE_ITEM(OUTPUT, BUFF, NBYTES)						\
+{											\
+	mstr	line;									\
+											\
+	if (NBYTES >= SIZEOF(BUFF))							\
+		NBYTES = SIZEOF(BUFF); /* Output from SNPRINTF was truncated. */	\
+	line.len = NBYTES;								\
+	line.addr = &BUFF[0];								\
+	OUTPUT->flush = TRUE;								\
+	zshow_output(OUTPUT, &line);							\
+}
+
 void zshow_zcalls(zshow_out *output)
-{	return;
+{
+	struct 	extcall_package_list	*package_ptr;
+	struct 	extcall_entry_list	*entry_ptr;
+	int	nbytes, totalbytes;
+	char	buff[OUT_BUFF_SIZE];
+	int 	len;
+
+	DCL_THREADGBL_ACCESS;
+
+	SETUP_THREADGBL_ACCESS;
+	/* Go through loaded packages */
+	for (package_ptr = TREF(extcall_package_root); package_ptr; package_ptr = package_ptr->next_package)
+	{
+		/* Go through the package's entry points */
+		for (entry_ptr = package_ptr->first_entry; entry_ptr; entry_ptr = entry_ptr->next_entry)
+		{
+			nbytes = SNPRINTF(buff, SIZEOF(buff), "%s.%s",package_ptr->package_name.addr,
+				entry_ptr->entry_name.addr);
+			DO_ONE_ITEM(output, buff, nbytes);
+		}
+	}
+	return;
 }
diff --git a/sr_unix_nsb/m_do.c b/sr_unix_nsb/m_do.c
index 2e39830..ce333c2 100644
--- a/sr_unix_nsb/m_do.c
+++ b/sr_unix_nsb/m_do.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001, 2015 Fidelity National Information	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -25,6 +26,7 @@ error_def(ERR_ACTOFFSET);
 
 int m_do(void)
 {
+	int		opcd;
 	oprtype		*cr;
 	triple		*calltrip, *labelref, *obp, *oldchain, *ref0, *ref1, *routineref, tmpchain, *triptr;
 	DCL_THREADGBL_ACCESS;
@@ -72,12 +74,25 @@ int m_do(void)
 					assert(OC_PARAMETER == calltrip->operand[1].oprval.tref->operand[1].oprval.tref->opcode);
 					assert(TRIP_REF ==
 						calltrip->operand[1].oprval.tref->operand[1].oprval.tref->operand[0].oprclass);
-					assert(OC_ILIT == calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
-						operand[0].oprval.tref->opcode);
-					assert(ILIT_REF == calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
-						operand[0].oprval.tref->operand[0].oprclass);
-					if (0 != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
-						operand[0].oprval.tref->operand[0].oprval.ilit)
+					DEBUG_ONLY(opcd = calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						   operand[0].oprval.tref->opcode);
+					assert((OC_ILIT == opcd) || (OC_COMINT == opcd));
+					DEBUG_ONLY(opcd = calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						   operand[0].oprval.tref->operand[0].oprclass);
+					assert((ILIT_REF == opcd) || (TRIP_REF == opcd));
+					/* The opcd references above added to allow an invalid syntax using indirect values for
+					 * offsets while specifying a parm list to get through the above asserts (invalid syntax
+					 * should not trip asserts) but it leads to the conclusion that the below test may not be
+					 * robust enough since it is looking at a literal integer value when there is none so have
+					 * added further checks mirroring the first checks done in the two most recent asserts to
+					 * make the check more robust. [Example bad code: Do @lbl+ at n^artn(arg)]
+					 */
+					if ((0 != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+					     operand[0].oprval.tref->operand[0].oprval.ilit)
+					    || (OC_ILIT != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						operand[0].oprval.tref->opcode)
+					    || (ILIT_REF != calltrip->operand[1].oprval.tref->operand[1].oprval.tref->
+						operand[0].oprval.tref->operand[0].oprclass))
 					{
 						stx_error (ERR_ACTOFFSET);
 						return FALSE;
diff --git a/sr_unix_nsb/rtnhdr.h b/sr_unix_nsb/rtnhdr.h
index 73e7ed6..2327f9f 100644
--- a/sr_unix_nsb/rtnhdr.h
+++ b/sr_unix_nsb/rtnhdr.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -73,6 +74,7 @@ typedef struct
 	int4 		lab_ln_ptr;		/* Offset of the lnrtab entry from the routine header */
 	boolean_t	has_parms;		/* Flag to indicate whether the callee has a formallist */
 } lab_tabent_proxy;
+#define TABENT_PROXY TREF(lab_proxy)
 
 typedef struct	rhead_struct
 {
diff --git a/sr_unix_nsb/ttt.txt b/sr_unix_nsb/ttt.txt
index c50397d..7c00bb9 100644
--- a/sr_unix_nsb/ttt.txt
+++ b/sr_unix_nsb/ttt.txt
@@ -8,13 +8,15 @@
 ;	the license, please stop and do not read further.	;
 ;								;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;This table defines the intermediate code (vax code) generated by an opcode.
-;It drives tttgen.m to generate ttt.c.
-;There are multiple versions of this file by platform family and
-;changes to one should trigger review and likely changes to the others.
-;The format is OC_<opcode name>:<tabs>list of vax instructions,one to a line.
-;The opcode must have a corresponding entry in opcode_def.h
- OC_ADD:		pushab	val.0
+;
+; This table defines the intermediate code (vax code) generated by an opcode.
+; It drives tttgen.m to generate ttt.c.
+; There are multiple versions of this file by platform family and
+; changes to one should trigger review and likely changes to the others.
+; The format is OC_<opcode name>:<tabs>list of vax instructions,one to a line.
+; The opcode must have a corresponding entry in opcode_def.h
+;
+OC_ADD:		pushab	val.0
 		pushab	val.2
 		pushab	val.1
 		calls	#3,xfer.xf_add
@@ -192,9 +194,9 @@ OC_FNGVGET1:	pushab	val.0
 OC_FNGET1:	pushab	val.0
 		pushab	val.1
 		calls	#2,xfer.xf_fnget1
-OC_FNINCR:	pushab	val.0		; result of $INCR
-		pushab	val.2		; r->operand[1] = increment
-		pushab	val.1		; r->operand[0] = local-variable to increment
+OC_FNINCR:	pushab	val.0		; /* result of $INCR */
+		pushab	val.2		; /* r->operand[1] = increment */
+		pushab	val.1		; /* r->operand[0] = local-variable to increment */
 		calls	#3,xfer.xf_fnincr
 OC_FNJ2:	pushab	val.0
 		pushl	val.2
@@ -227,9 +229,9 @@ OC_FNLVPRVNAME:	pushab	val.0
 		pushab	val.1
 		calls	#2,xfer.xf_fnlvprvname
 OC_FNNAME:	irepab	val.4
-		pushab	val.1		; r->operand[0]
+		pushab	val.1		; /* r->operand[0] */
 		pushl	val.3
-		pushab	val.0		; result of $NAME
+		pushab	val.0		; /* result of $NAME */
 		calls	val.2,xfer.xf_fnname
 OC_FNNEXT:	pushab	val.0
 		pushab	val.2
@@ -479,19 +481,19 @@ OC_GETTRUTH:	movab	val.0,r1
 OC_GVDATA:	pushab	val.0
 		calls	#1,xfer.xf_gvdata
 OC_GVEXTNAM:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2		; /* hash_code */
 		calls	val.1,xfer.xf_gvextnam
 OC_GVGET:	pushab	val.0
 		calls	#1,xfer.xf_gvget
-OC_GVINCR:	pushab	val.0		; result of $INCR
-		pushab	val.2		; r->operand[1] = increment (global-variable to increment is gv_currkey so no operand[0])
+OC_GVINCR:	pushab	val.0		; /* result of $INCR */
+		pushab	val.2		; /* r->operand[1] = increment (global-variable to increment is gv_currkey so no operand[0]) BYPASSOK */
 		calls	#2,xfer.xf_gvincr
 OC_GVKILL:	calls	#0,xfer.xf_gvkill
 OC_GVNAKED:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2		; /* hash_code */
 		calls	val.1,xfer.xf_gvnaked
 OC_GVNAME:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2		; /* hash_code */
 		calls	val.1,xfer.xf_gvname
 OC_GVNEXT:	pushab	val.0
 		calls	#1,xfer.xf_gvnext
@@ -529,9 +531,9 @@ OC_INDDEVPARMS:	pushab	val.0
 		pushl	val.2
 		pushab	val.1
 		jsb	xfer.xf_inddevparms
-OC_INDFNNAME:	pushab	val.2		; r->operand[1] = depth
-		pushab	val.1		; r->operand[0]	= name
-		pushab	val.0		; r->dst
+OC_INDFNNAME:	pushab	val.2		; /* r->operand[1] = depth */
+		pushab	val.1		; /* r->operand[0] = name */
+		pushab	val.0		; /* r->dst */
 		jsb	xfer.xf_indfnname
 OC_INDFUN:	pushab	val.0
 		pushl	val.2
@@ -540,9 +542,9 @@ OC_INDFUN:	pushab	val.0
 OC_INDGLVN:	pushab	val.0
 		pushab	val.1
 		jsb	xfer.xf_indglvn
-OC_INDINCR:	pushab	val.1		; r->operand[0] = indirection expression
-		pushab 	val.2		; r->operand[1] = increment (ILIT)
-		pushab	val.0		; r->dst
+OC_INDINCR:	pushab	val.1		; /* r->operand[0] = indirection expression */
+		pushab 	val.2		; /* r->operand[1] = increment (ILIT) */
+		pushab	val.0		; /* r->dst */
 		jsb	xfer.xf_indincr
 OC_INDLVADR:	pushab	val.1
 		jsb	xfer.xf_indlvadr
@@ -743,8 +745,10 @@ OC_RHDADDR1:	pushl	#0
 		pushab	val.1
 		calls	#2,xfer.xf_rhdaddr
 		movl	r0,addr.0
+;
 ; Note if OC_RTERROR call changes, linetail.c and eval_expr.c will also need
 ; to change due to it dereferencing the backpoints to get to the opcode.
+;
 OC_RTERROR:	pushl	val.2
 		pushl	val.1
 		jsb	xfer.xf_rterror
@@ -949,28 +953,28 @@ OC_INDMERGE:	pushab	val.1
 OC_M_SRCHINDX:	irepab	val.2
 		calls	val.1,xfer.xf_m_srchindx
 		movl	r0,addr.0
-OC_FNZCONVERT2: pushab  val.0                   ; destination mval
-                pushab  val.2                   ; "U"/"L"/"T"
-                pushab  val.1                   ; string
+OC_FNZCONVERT2: pushab  val.0                   ; /* destination mval */
+                pushab  val.2                   ; /* "U"/"L"/"T" */
+                pushab  val.1                   ; /* string */
                 calls   #3,xfer.xf_fnzconvert2
-OC_FNZCONVERT3: pushab  val.0                   ; Destination mval
-                pushab  val.3                   ; target chset
-                pushab  val.2                   ; src chset
-                pushab  val.1                   ; string
+OC_FNZCONVERT3: pushab  val.0                   ; /* Destination mval */
+                pushab  val.3                   ; /* target chset */
+                pushab  val.2                   ; /* src chset */
+                pushab  val.1                   ; /* string */
                 calls   #4,xfer.xf_fnzconvert3
-OC_FNZSUBSTR:   pushab  val.0                   ; Destination mval
-                pushl   val.3                   ; max byte length
-                pushl   val.2                   ; starting character position
-                pushab  val.1                   ; string
+OC_FNZSUBSTR:   pushab  val.0                   ; /* Destination mval */
+                pushl   val.3                   ; /* max byte length */
+                pushl   val.2                   ; /* starting character position */
+                pushab  val.1                   ; /* string */
                 calls   #4,xfer.xf_fnzsubstr
-OC_FNZWIDTH:    pushab  val.0                   ; destination mval
-                pushab  val.1                   ; string
+OC_FNZWIDTH:    pushab  val.0                   ; /* destination mval */
+                pushab  val.1                   ; /* string */
                 calls   #2,xfer.xf_fnzwidth
 OC_ZTRIGGER:	calls	#0,xfer.xf_ztrigger
 OC_ZWRITESVN:	pushl	val.1
  		calls	#1,xfer.xf_zwritesvn
-OC_FNZWRITE:    pushab  val.0                   ; destination mval
-                pushab  val.1                   ; string
+OC_FNZWRITE:    pushab  val.0                   ; /* destination mval */
+                pushab  val.1                   ; /* string */
                 calls   #2,xfer.xf_fnzwrite
 OC_IGETDST:	calls	#0,xfer.xf_igetdst
 		movl    r0,addr.0
@@ -994,7 +998,7 @@ OC_RFRSHLVN:	pushl	val.2
 		calls	#2,xfer.xf_rfrshlvn
 		movl	r0,addr.0
 OC_SAVGVN:	irepab	val.3
-		pushl	val.2	; hash_code
+		pushl	val.2			; /* hash_code */
 		calls	val.1,xfer.xf_savgvn
 OC_SAVLVN:	irepab	val.2
 		calls	val.1,xfer.xf_savlvn
@@ -1022,6 +1026,6 @@ OC_FNZPEEK:	pushab	val.0
 		pushl	val.2
 		pushab	val.1
 		calls	#5,xfer.xf_fnzpeek
-OC_FNZSYSLOG:	pushab	val.0			; destination mval
-		pushab  val.1			; string
+OC_FNZSYSLOG:	pushab	val.0			; /* destination mval */
+		pushab  val.1			; /* string */
 		calls	#2,xfer.xf_fnzsyslog
diff --git a/sr_vms_cm/gtcm_ch.c b/sr_vms_cm/gtcm_ch.c
deleted file mode 100644
index 51b41d0..0000000
--- a/sr_vms_cm/gtcm_ch.c
+++ /dev/null
@@ -1,381 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-
-#include <descrip.h>
-#include <rms.h>
-#include <opcdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-
-typedef struct {
-	char			req_code;
-	char			target[3];
-	int4			mess_code;
-	char			text[255];
-}oper_msg_struct;
-
-#define MESSAGE_HDR_LEN 15
-
-error_def(ERR_GVUNDEF);
-error_def(ERR_SERVERERR);
-
-GBLDEF	bool			gtcm_errfile=FALSE;
-GBLDEF	struct FAB		gtcm_errfab;
-GBLDEF	struct RAB		gtcm_errrab;
-GBLDEF	bool			gtcm_firsterr=TRUE;
-
-GBLREF	connection_struct	*curr_entry;
-GBLREF	bool			undef_inhibit;
-
-CONDITION_HANDLER(gtcm_ch)
-{
-	bool			first;
-	int			prev_count,count;
-	uint4		stat;
-	int			i;
-	oper_msg_struct		oper_msg;
-	bool			severe;
-	unsigned short		faolen,severe_len;
-	char			outadr[4];
-	char			*ptr,*end, *tempptr, *buffptr;
-	uint4		flags, len, *argptr;
-	unsigned short		msg_len;
-	uint4		*c;
-	char			buff[512],buff1[512],buff2[512],tempbuf[2048];
-	cmi_descriptor		*tempdesc,*tempdesc1;
-	void			gtcm_write_ast(), preemptive_db_clnup(int);
-	char			errout[259],errbuff[300];
-	char			filename[]="SYS$MANAGER:CMERR.LOG";
-/*	char			filename[]="SYS$LOGIN:CMERR.LOG"; not defined by run/det */
-	$DESCRIPTOR(msg,buff);
-	$DESCRIPTOR(msg2,buff2);
-	$DESCRIPTOR(err1,errout);
-	$DESCRIPTOR(out,"");
-	$DESCRIPTOR(out1,"");
-
-	undef_inhibit = FALSE;	/* reset undef_inhibit to the default value in case it got reset temporarily and there was an error.
-				 * currently, only $INCREMENT temporarily resets this (in gtcmtr_increment.c)
-				 */
-	severe = SEVERITY >= 4;	/* a severe error */
-	preemptive_db_clnup(SEVERITY);
-	if (gtcm_firsterr)				/* open error logging file */
-	{	gtcm_errfab = cc$rms_fab;
-		gtcm_errrab = cc$rms_rab;
-		gtcm_errrab.rab$l_fab = &gtcm_errfab;
-		gtcm_errrab.rab$l_rop = RAB$M_WBH;
-		gtcm_errfab.fab$b_fns = SIZEOF(filename);
-		gtcm_errfab.fab$l_fna = filename;
-		gtcm_errfab.fab$b_shr = FAB$M_SHRGET | FAB$M_UPI;
-		gtcm_errfab.fab$l_fop = FAB$M_MXV | FAB$M_CBT;
-		gtcm_errfab.fab$b_fac = FAB$M_PUT;
-		gtcm_errfab.fab$b_rat = FAB$M_CR;
-		stat = sys$create(&gtcm_errfab);
-		if (stat & 1)
-		{	stat = sys$connect(&gtcm_errrab);
-			if (stat == RMS$_NORMAL)
-			{	gtcm_errfile = TRUE;
-			}
-		}
-		gtcm_firsterr = FALSE;
-	}
-	if (curr_entry)
-	{	ptr = curr_entry->clb_ptr->mbf;
-		end = ptr + curr_entry->clb_ptr->mbl;
-	}else
-	{	ptr = &tempbuf[0];
-		end = &tempbuf[2047];
-	}
-	argptr = &SIGNAL;
-	*ptr++ = CMMS_E_ERROR;
-	*ptr++ = 0;
-	*ptr++ = sig->chf$l_sig_args - 2;	/* discount exception pc and psl */
-	flags = 15;
-	buffptr = &buff1[0];
-	prev_count = 0;
-	for (count = 0; count < sig->chf$l_sig_args - 2;)
-	{	count++;
-		msg_len = 0;
-		msg.dsc$w_length = 512;
-		sys$getmsg(*argptr,&msg_len,&msg,flags,outadr);
-		if ((gtcm_errfile || severe) && *argptr != 0)
-		{	msg.dsc$w_length = msg_len;
-			out.dsc$w_length = 255;
-			out.dsc$a_pointer = &oper_msg.text[MESSAGE_HDR_LEN];
-			c = argptr + 1;
-			faolen = 0;
-			if (sig->chf$l_sig_args > 3)
-			{	switch(*c)
-				{
-					case 0:
-						sys$fao(&msg, &faolen, &out);
-						break;
-					case 1:
-						sys$fao(&msg, &faolen, &out, *(c+1));
-						break;
-					case 2:
-						sys$fao(&msg, &faolen, &out, *(c+1), *(c+2));
-						break;
-					case 3:
-						sys$fao(&msg, &faolen, &out, *(c+1),*(c+2),*(c+3));
-						break;
-					case 4:
-						sys$fao(&msg, &faolen, &out, *(c+1),*(c+2),*(c+3),*(c+4));
-						break;
-					case 5:
-						sys$fao(&msg, &faolen, &out, *(c+1),*(c+2),*(c+3),*(c+4),*(c+5));
-						break;
-					case 6:
-						sys$fao(&msg, &faolen, &out, *(c+1),*(c+2),*(c+3),*(c+4),*(c+5),*(c+6));
-						break;
-				}
-			}else
-			{	sys$fao(&msg, &faolen, &out);
-			}
-			severe_len = faolen;
-			if (gtcm_errfile)
-			{	memcpy(errout,"!%D ",4);
-				memcpy(errout + 4,&oper_msg.text[MESSAGE_HDR_LEN],faolen);
-				err1.dsc$w_length =  faolen + 4;
-				out1.dsc$w_length = 300;
-				out1.dsc$a_pointer = &errbuff[0];
-				sys$fao(&err1, &faolen, &out1, 0);
-				gtcm_errrab.rab$w_rsz = faolen;
-				gtcm_errrab.rab$l_rbf = errbuff;
-				sys$put(&gtcm_errrab);
-				sys$flush(&gtcm_errrab);
-			}
-			/* Special case severe errors, because they will cause the GT.CM process to halt when they
-				are signalled if they are sent normally.  Create ascii string of error and signal
-				with SERVERERR.  Also signal severe errors to operators.
-			*/
-
-			if (severe)
-			{	memcpy(&oper_msg.text[0],"GT.CM SERVER:  ",MESSAGE_HDR_LEN);
-				msg2.dsc$a_pointer = &oper_msg;
-				msg2.dsc$w_length = severe_len + 8 + MESSAGE_HDR_LEN;
-				oper_msg.req_code = OPC$_RQ_RQST;
-				*oper_msg.target = OPC$M_NM_CENTRL | OPC$M_NM_DEVICE | OPC$M_NM_DISKS;
-				sys$sndopr(&msg2,0);
-				ptr--;
-				*ptr++ = 4;
-				*ptr++ = 'L';
-				*(int4*)ptr = ERR_SERVERERR;
-				ptr += SIZEOF(int4);
-				*ptr++ = 'L';
-				*(int4*)ptr = 2;
-				ptr += SIZEOF(int4);
-				*ptr++ = 'L';
-				*(int4*)ptr = severe_len;
-				ptr += SIZEOF(int4);
-				*ptr++ = 'A';
-				*(short*)ptr = severe_len;
-				ptr += SIZEOF(short);
-				memcpy(ptr,&oper_msg.text[MESSAGE_HDR_LEN],severe_len);
-				ptr += faolen;
-				break;					/* skip further processing for severe errors */
-			}
-		}
-
-		/* Mark this argument as the first argument after a signal.  If there are fao parameters
-		   in the message, then this argument will be count, otherwise, it will be the next signal.
-		*/
-		first = TRUE;
-		if (end - ptr < SIZEOF(int4) + 1)			/* need second buff, write out first one */
-		{	if (curr_entry)
-			{	curr_entry->clb_ptr->cbl = (unsigned char *)ptr - curr_entry->clb_ptr->mbf;
-				curr_entry->clb_ptr->ast = 0;
-				tempptr = curr_entry->clb_ptr->mbf + 1;
-				*tempptr++ = 1;
-				*tempptr = count - prev_count;
-				prev_count = count;
-				cmi_write(curr_entry->clb_ptr);
-				ptr = curr_entry->clb_ptr->mbf;
-				*ptr++ = CMMS_E_ERROR;
-				*ptr++ = 0;
-				*ptr++ = sig->chf$l_sig_args - 2 - count;
-			}else
-			{	ptr = &tempbuf[0];
-			}
-		}
-		*ptr++ = 'L';
-		*(int4*)ptr = *argptr++;
-		ptr += SIZEOF(int4);
-		for (i = 0; i < msg_len;)
-		{	if (buff[i++] == '!')
-			{	if (buff[i] == 'A') /* ascii */
-				{	if (first)
-					{	first = FALSE;				/* fao count */
-						if (end - ptr < SIZEOF(int4) + 1)	/* need second buff, write out first one */
-						{	if (curr_entry)
-							{	curr_entry->clb_ptr->cbl = (unsigned char *)ptr
-												- curr_entry->clb_ptr->mbf;
-								curr_entry->clb_ptr->ast = 0;
-								tempptr = curr_entry->clb_ptr->mbf + 1;
-								*tempptr++ = 1;
-								*tempptr = count - prev_count;
-								prev_count = count;
-								cmi_write(curr_entry->clb_ptr);
-								ptr = curr_entry->clb_ptr->mbf;
-								*ptr++ = CMMS_E_ERROR;
-								*ptr++ = 0;
-								*ptr++ = sig->chf$l_sig_args - 2 - count;
-							}else
-							{	ptr = &tempbuf[0];
-							}
-						}
-						*ptr++ = 'L';
-						count++;
-						*(int4*)ptr = *argptr++;
-						ptr += SIZEOF(int4);
-					}
-					if (buff[++i] == 'S')					/* descriptor */
-					{	*buffptr++ = 'D';
-						tempptr = buffptr;
-						buffptr += SIZEOF(short);
-						tempdesc = buffptr;
-						tempdesc1 = *argptr++;
-						*tempdesc = *tempdesc1;
-						tempdesc->dsc$a_pointer = 0;
-						buffptr += SIZEOF(cmi_descriptor);
-						memcpy(buffptr,tempdesc1->dsc$a_pointer, tempdesc1->dsc$w_length);
-						buffptr += tempdesc1->dsc$w_length;
-						*(short*)tempptr = buffptr - tempptr - 2;
-					}else if (buff[i] == 'D')			/* string */
-					{	if (end - ptr < SIZEOF(int4) + 1)	/* need second buff, write out first one */
-						{	if (curr_entry)
-							{	curr_entry->clb_ptr->cbl = (unsigned char *)ptr
-												- curr_entry->clb_ptr->mbf;
-								curr_entry->clb_ptr->ast = 0;
-								tempptr = curr_entry->clb_ptr->mbf + 1;
-								*tempptr++ = 1;
-								*tempptr = count - prev_count;
-								prev_count = count;
-								cmi_write(curr_entry->clb_ptr);
-								ptr = curr_entry->clb_ptr->mbf;
-								*ptr++ = CMMS_E_ERROR;
-								*ptr++ = 0;
-								*ptr++ = sig->chf$l_sig_args - 2 - count;
-							}else
-							{	ptr = &tempbuf[0];
-							}
-						}
-						*ptr++ = 'L';
-						len = *argptr++;
-						*(int4*)ptr = len;
-						ptr += SIZEOF(int4);
-						count++;
-						*buffptr++ = 'A';
-						*(short*)buffptr = len;
-						buffptr += 2;
-						tempptr = *argptr++;
-						memcpy(buffptr, tempptr, len);
-						buffptr += len;
-					}else if (buff[i] == 'C')				/* counted string */
-					{	*buffptr++ = 'C';
-						tempptr = *argptr++;
-						memcpy(buffptr,tempptr, *tempptr);
-						buffptr += *tempptr;
-					}
-                                        if (curr_entry && (end - ptr < buffptr - &buff1[0]))
-					{
-                                        	curr_entry->clb_ptr->cbl = (unsigned char *)ptr - curr_entry->clb_ptr->mbf;
-						curr_entry->clb_ptr->ast = 0;
-						tempptr = curr_entry->clb_ptr->mbf + 1;
-						*tempptr++ = 1;
-						*tempptr = count - prev_count;
-						prev_count = count;
-						cmi_write(curr_entry->clb_ptr);
-						ptr = curr_entry->clb_ptr->mbf;
-						*ptr++ = CMMS_E_ERROR;
-						*ptr++ = 0;
-						*ptr++ = sig->chf$l_sig_args - 2 - count;
-					}
-                                        else if (NULL == curr_entry)
-                                                ptr = &tempbuf[0];
-					memcpy(ptr,&buff1[0],buffptr - &buff1[0]);
-					ptr += buffptr - &buff1[0];
-					buffptr = &buff1[0];
-					count++;
-				}else if (buff[i + 1] == 'L')	/* a longword */
-				{	if(buff[i] == 'U' || buff[i] == 'X' || buff[i] == 'S')
-					{	if (first)
-						{	first = FALSE;
-							if (end - ptr < SIZEOF(int4) + 1)/* need second buff, write out first one */
-							{	if (curr_entry)
-								{	curr_entry->clb_ptr->cbl = (unsigned char *)ptr
-													- curr_entry->clb_ptr->mbf;
-									curr_entry->clb_ptr->ast = 0;
-									tempptr = curr_entry->clb_ptr->mbf + 1;
-									*tempptr++ = 1;
-									*tempptr = count - prev_count;
-									prev_count = count;
-									cmi_write(curr_entry->clb_ptr);
-									ptr = curr_entry->clb_ptr->mbf;
-									*ptr++ = CMMS_E_ERROR;
-									*ptr++ = 0;
-									*ptr++ = sig->chf$l_sig_args - 2 - count;
-								}else
-								{	ptr = &tempbuf[0];
-								}
-							}
-							*ptr++ = 'L';
-							count++;
-							*(int4*)ptr = *argptr++;
-							ptr += SIZEOF(int4);
-						}
-						if (end - ptr < SIZEOF(int4) + 1)	/* need second buff, write out first one */
-						{	if (curr_entry)
-							{	curr_entry->clb_ptr->cbl = (unsigned char *)ptr
-												- curr_entry->clb_ptr->mbf;
-								curr_entry->clb_ptr->ast = 0;
-								tempptr = curr_entry->clb_ptr->mbf + 1;
-								*tempptr++ = 1;
-								*tempptr = count - prev_count;
-								prev_count = count;
-								cmi_write(curr_entry->clb_ptr);
-								ptr = curr_entry->clb_ptr->mbf;
-								*ptr++ = CMMS_E_ERROR;
-								*ptr++ = 0;
-								*ptr++ = sig->chf$l_sig_args - 2 - count;
-							}else
-							{	ptr = &tempbuf[0];
-							}
-						}
-						*ptr++ = 'L';
-						count++;
-						*(int4*)ptr = *argptr++;
-						ptr += SIZEOF(int4);
-					}
-				}
-			}
-		}
-	}
-	if (curr_entry && (ptr > curr_entry->clb_ptr->mbf + 3))					/* unwritten message in buffer */
-	{	curr_entry->clb_ptr->cbl = (unsigned char *)ptr - curr_entry->clb_ptr->mbf;
-		curr_entry->clb_ptr->ast = gtcm_write_ast;
-		cmi_write(curr_entry->clb_ptr);
-	}
-	if (severe)
-		lib$signal(SIGNAL);
-	mch->CHF_MCH_SAVR0 = CM_NOOP;					/* return NOOP, so that nothing more is done */
-	if ((stat = sys$unwind(&mch->CHF_MCH_DEPTH, 0)) != SS$_NORMAL)
-		NEXTCH;
-}
diff --git a/sr_vms_cm/gtcm_exi_ch.c b/sr_vms_cm/gtcm_exi_ch.c
deleted file mode 100644
index f38cad2..0000000
--- a/sr_vms_cm/gtcm_exi_ch.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <rms.h>
-#include <opcdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-#include "error.h"
-
-typedef struct {
-	char			req_code;
-	char			target[3];
-	int4			mess_code;
-	char			text[255];
-}oper_msg_struct;
-
-#define MESSAGE_HDR_LEN 32	/* length of rundownerr string */
-
-GBLREF bool		gtcm_errfile;
-GBLREF struct FAB	gtcm_errfab;
-GBLREF struct RAB	gtcm_errrab;
-GBLREF int4		gtcm_exi_condition;
-GBLREF int4		process_id;
-
-CONDITION_HANDLER(gtcm_exi_ch)
-{
-	static readonly char	filename[] = "SYS$MANAGER:CMEXIT.LOG";
-	static readonly char	rundownerr[] = "GTCM TERMINATION RUNDOWN ERROR :";
-	char			buff[512], buff2[512], errout[259], errbuff[300], outadr[4];
-	unsigned short		faolen, msg_len, severe_len;
-	uint4			*argptr, *a_ptr, flags = 0, stat;
-	oper_msg_struct		oper_msg;
-
-	$DESCRIPTOR(msg, buff);
-	$DESCRIPTOR(msg2, buff2);
-	$DESCRIPTOR(err1, errout);
-	$DESCRIPTOR(out, "");
-	$DESCRIPTOR(out1, "");
-
-	if (!gtcm_errfile)				/* open error logging file */
-	{	gtcm_errfab = cc$rms_fab;
-		gtcm_errrab = cc$rms_rab;
-		gtcm_errrab.rab$l_fab = &gtcm_errfab;
-		gtcm_errrab.rab$l_rop = RAB$M_WBH;
-		gtcm_errfab.fab$b_fns = SIZEOF(filename);
-		gtcm_errfab.fab$l_fna = filename;
-		gtcm_errfab.fab$b_shr = FAB$M_SHRGET | FAB$M_UPI;
-		gtcm_errfab.fab$l_fop = FAB$M_MXV | FAB$M_CBT;
-		gtcm_errfab.fab$b_fac = FAB$M_PUT;
-		gtcm_errfab.fab$b_rat = FAB$M_CR;
-		stat = sys$create(&gtcm_errfab);
-		if (stat & 1)
-		{	stat = sys$connect(&gtcm_errrab);
-			if (RMS$_NORMAL == stat)
-				gtcm_errfile = TRUE;
-		}
-	}
-	argptr = &SIGNAL;
-	sys$getmsg(*argptr, &msg_len, &msg, flags, outadr);
-	msg.dsc$w_length = msg_len;
-	out.dsc$w_length = SIZEOF(oper_msg.text) - MESSAGE_HDR_LEN;
-	out.dsc$a_pointer = &oper_msg.text[MESSAGE_HDR_LEN];
-	a_ptr = argptr + 1;
-	faolen = 0;
-	if (sig->chf$l_sig_args > 3)
-	{	switch(*a_ptr)
-		{
-		case 0:	sys$fao(&msg, &faolen, &out);
-			break;
-		case 1:	sys$fao(&msg, &faolen, &out, *(a_ptr+1));
-			break;
-		case 2:	sys$fao(&msg, &faolen, &out, *(a_ptr+1), *(a_ptr+2));
-			break;
-		case 3:	sys$fao(&msg, &faolen, &out, *(a_ptr+1), *(a_ptr+2), *(a_ptr+3));
-			break;
-		case 4:	sys$fao(&msg, &faolen, &out, *(a_ptr+1), *(a_ptr+2), *(a_ptr+3), *(a_ptr+4));
-			break;
-		case 5:	sys$fao(&msg, &faolen, &out, *(a_ptr+1), *(a_ptr+2), *(a_ptr+3), *(a_ptr+4), *(a_ptr+5));
-			break;
-		case 6:	sys$fao(&msg, &faolen, &out, *(a_ptr+1), *(a_ptr+2), *(a_ptr+3), *(a_ptr+4), *(a_ptr+5), *(a_ptr+6));
-			break;
-		}
-	} else
-		sys$fao(&msg, &faolen, &out);
-	severe_len = faolen;
-	if (gtcm_errfile)
-	{	memcpy(errout, "!%D ", 4);
-		memcpy(errout + 4, &oper_msg.text[MESSAGE_HDR_LEN], faolen);
-		err1.dsc$w_length =  faolen + 4;
-		out1.dsc$w_length = SIZEOF(errbuff);
-		out1.dsc$a_pointer = errbuff;
-		sys$fao(&err1, &faolen, &out1, 0);
-		gtcm_errrab.rab$w_rsz = faolen;
-		gtcm_errrab.rab$l_rbf = errbuff;
-		sys$put(&gtcm_errrab);
-		sys$flush(&gtcm_errrab);
-	}
-	memcpy(oper_msg.text, rundownerr, MESSAGE_HDR_LEN);
-	msg2.dsc$a_pointer = &oper_msg;
-	msg2.dsc$w_length = severe_len + 8 + MESSAGE_HDR_LEN;
-	oper_msg.req_code = OPC$_RQ_RQST;
-	*oper_msg.target = OPC$M_NM_CENTRL | OPC$M_NM_DEVICE | OPC$M_NM_DISKS;
-	sys$sndopr(&msg2, 0);
-	EXIT(gtcm_exi_condition);
-	NEXTCH;
-}
diff --git a/sr_vms_cm/gtcm_mbxread_ast.c b/sr_vms_cm/gtcm_mbxread_ast.c
deleted file mode 100644
index 7f72fcd..0000000
--- a/sr_vms_cm/gtcm_mbxread_ast.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-#include "msg.h"
-#include "gtcm_int_unpack.h"
-
-GBLREF relque action_que;
-GBLREF connection_struct *curr_entry;
-extern long gtcm_action_pending();
-
-gtcm_mbxread_ast(struct NTD *tsk)
-{
-
-	cm_mbx *mp;
-	unsigned char *msg;
-	unsigned short procnum;
-	struct CLB *tell;
-	connection_struct *cnx;
-	msgtype		err;
-	unsigned char *transnum, *laflag;
-	error_def(CMERR_INVINTMSG);
-	struct CLB *gtcm_find_proc();
-	void gtcm_write_ast();
-
-	mp = tsk->mbx.dsc$a_pointer;
-	msg = &mp->text[0];
-	assert(*msg == CMMS_S_INTERRUPT);
-	msg++;
-	procnum = *((unsigned short *)msg)++;
-	tell = gtcm_find_proc(tsk,procnum);
-	assert (tell);
-
-	switch(*msg)
-	{
-		case CMMS_L_LKCANCEL:
-				laflag = transnum = msg + 1;
-				transnum++;
-				cnx = (connection_struct *) tell->usr;
-				if (curr_entry == cnx || gtcm_write_ast == tell->ast)
-				{    /* store information till end of server loop or write done */
-				  cnx->int_cancel.laflag = *laflag | 1;  /* since laflag may be 0, x40, x80 */
-				  cnx->int_cancel.transnum = *transnum;
-				}
-				else
-				{   /* not curr_entry and not write pending */
-				        cnx->lk_cancel = *transnum;
-					memcpy(tell->mbf,msg, S_HDRSIZE + S_LAFLAGSIZE + 1);
-					tell->cbl = S_HDRSIZE + S_LAFLAGSIZE + 1;
-					(void)gtcm_action_pending(cnx);  /* checks if in queue already */
-					cnx->new_msg = FALSE;
-					sys$cantim(cnx,0);
-				}
-				break;
-		default:
-				err.arg_cnt = MID_MSG_SIZE;
-				err.new_opts = err.def_opts = 1;
-				err.msg_number = CMERR_INVINTMSG;
-				err.fp_cnt = 2;
-				sys$putmsg (&err, 0, 0, 0);
-				break;
-	}
-}
diff --git a/sr_vms_cm/gtcm_server.c b/sr_vms_cm/gtcm_server.c
deleted file mode 100644
index b95e0a4..0000000
--- a/sr_vms_cm/gtcm_server.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_limits.h"
-#include "gtm_inet.h"
-
-#include <descrip.h>
-#include <iodef.h>
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "mlkdef.h"
-#include "gdscc.h"
-#include "gt_timer.h"
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-#include "gtcmlkdef.h"
-#include "ladef.h"
-#include "stp_parms.h"
-#include "stringpool.h"
-#include "efn.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmimagename.h"
-#include "desblk.h"		/* for desblk structure */
-#include "gtcmtr_protos.h"
-#include "trans_log_name.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "gdskill.h"
-#include "buddy_list.h"
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "init_secshr_addrs.h"
-#include "gtm_threadgbl_init.h"
-#include "gtm_env_init.h"	/* for gtm_env_init() prototype */
-
-GBLDEF bool			cm_timeout = FALSE;
-GBLDEF bool			cm_shutdown = FALSE;
-GBLDEF unsigned short		procnum;
-GBLDEF short			gtcm_ast_avail;
-GBLDEF int			gtcm_users = 0;
-GBLDEF int4			gtcm_exi_condition;
-GBLDEF connection_struct 	*curr_entry;
-GBLDEF relque ALIGN_QUAD 	action_que;
-GBLDEF desblk			gtcm_exi_blk;
-GBLDEF struct CLB       	*proc_to_clb[USHRT_MAX + 1];    /* for index 0 */
-GBLDEF gd_region		*action_que_dummy_reg;
-
-GBLREF short			astq_dyn_avail;
-GBLREF bool			licensed;
-GBLREF boolean_t		run_time;
-GBLREF boolean_t		gtcm_connection;
-GBLREF uint4			image_count;
-GBLREF int4			lkid, lid;
-GBLREF cm_lckblkreg		*blkdlist;
-GBLREF gv_namehead		*gv_target;
-GBLREF struct NTD		*ntd_root;
-GBLREF spdesc			rts_stringpool, stringpool;
-GBLREF boolean_t		is_replicator;
-
-LITREF char		cm_prd_name[];
-LITREF char		cm_ver_name[];
-LITREF int4		cm_prd_len;
-LITREF int4		cm_ver_len;
-
-#define GTCM_AST_OVRHD 4	/* init ast, read/write overlap, mbx, safety */
-
-error_def(CMERR_CMINTQUE);
-error_def(CMERR_CMSYSSRV);
-error_def(ERR_BADGTMNETMSG);
-error_def(ERR_WILLEXPIRE);
-error_def(LP_NOCNFDB);
-error_def(LP_INVCSM);
-
-gtcm_server()
-{
-	static readonly int4	reptim[2] = {-100000, -1};	/* 10ms */
-       	static readonly int4	wait[2] =  {-1000000, -1};	/* 100ms */
-	void		gtcm_ch(), gtcm_exi_handler(), gtcm_init_ast(), gtcm_int_unpack(), gtcm_mbxread_ast(),
-			gtcm_neterr(), gtcm_read_ast(), gtcm_remove_from_action_queue(), gtcm_shutdown_ast(), gtcm_write_ast(),
-			la_freedb();
-	bool		gtcm_link_accept();
-	bool		alid;
-	char		buff[512];
-	char		*h = NULL;
-	char		*la_getdb();
-	char		nbuff[256];
-	char		*pak = NULL;
-	char		reply;
-	unsigned short	outlen;
-	int4		closewait[2] = {0, -1};
-	int4		inid = 0, mdl = 0, nid = 0, days = 0;
-	int4		lic_status;
-	int4		lic_x;
-	int4		lm_mdl_nid();
-	uint4		status;
-	int		i, receive(), value;
-	mstr		name1, name2;
-	struct NTD	*cmu_ntdroot();
-	connection_struct *prev_curr_entry;
-	struct	dsc$descriptor_s	dprd;
-	struct	dsc$descriptor_s	dver;
-	$DESCRIPTOR(node_name, nbuff);
-	$DESCRIPTOR(proc_name, "GTCM_SERVER");
-	$DESCRIPTOR(timout, buff);
-	DCL_THREADGBL_ACCESS;
-
-	GTM_THREADGBL_INIT;
-        assert(0 == EMPTY_QUEUE);       /* check so dont need gdsfhead everywhere */
-	common_startup_init(GTCM_GNP_SERVER_IMAGE); /* Side-effect: Sets skip_dbtriggers to TRUE for non-trigger platforms */
-	gtm_env_init();	/* read in all environment variables */
-	name1.addr = "GTCMSVRNAM";
-	name1.len = SIZEOF("GTCMSVRNAM") - 1;
-	status = trans_log_name(&name1, &name2, nbuff);
-	if (SS$_NORMAL == status)
-	{
-		proc_name.dsc$a_pointer = nbuff;
-		proc_name.dsc$w_length = node_name.dsc$w_length = name2.len;
-	} else if (SS$_NOLOGNAM == status)
-	{
-		MEMCPY_LIT(nbuff, "GTCMSVR");
-		node_name.dsc$w_length = SIZEOF("GTCMSVR") - 1;
-	} else
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	sys$setprn(&proc_name);
-	status = lib$get_foreign(&timout, 0, &outlen, 0);
-	if ((status & 1) && (6 > outlen))
-	{
-		for (i = 0;  i < outlen;  i++)
-		{
-			value = value * 10;
-			if (buff[i] <= '9' && buff[i] >= '0')
-				value += buff[i] - 48;
-			else
-				break;
-		}
-		if (outlen && (i == outlen))
-		{
-			cm_timeout = TRUE;
-			closewait[0] = value * -10000000;
-		}
-	}
-	dprd.dsc$w_length = cm_prd_len;
-	dprd.dsc$b_dtype  = DSC$K_DTYPE_T;
-	dprd.dsc$b_class  = DSC$K_CLASS_S;
-	dprd.dsc$a_pointer= cm_prd_name;
-	dver.dsc$w_length = cm_ver_len;
-	dver.dsc$b_dtype  = DSC$K_DTYPE_T;
-	dver.dsc$b_class  = DSC$K_CLASS_S;
-	dver.dsc$a_pointer= cm_ver_name;
-	ast_init();
-	licensed = TRUE;
-	lkid = 2;
-#	ifdef NOLICENSE
-	lid = 1;
-#	else
-	/* this code used to be scattered to discourage reverse engineering, but since it now disabled, that seems pointless */
-	lic_status = ((NULL == (h = la_getdb(LMDB))) ? LP_NOCNFDB : SS$_NORMAL);
-	lic_status = ((1 == (lic_status & 1)) ? lm_mdl_nid(&mdl, &nid, &inid) : lic_status);
-	lic_status = ((1 == (lic_status & 1)) ? lp_licensed(h, &dprd, &dver, mdl, nid, &lid, &lic_x, &days, pak) : lic_status);
-	if (LP_NOCNFDB != lic_status)
-		la_freedb(h);
-	if (1 == (lic_status & 1))
-	{
-		licensed = TRUE;
-		if (days < 14)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_WILLEXPIRE);
-	} else
-	{
-		licensed = FALSE;
-		sys$exit(lic_status);
-	}
-#	endif
-	gtcm_ast_avail = astq_dyn_avail - GTCM_AST_OVRHD;
-	stp_init(STP_INITSIZE);
-	rts_stringpool = stringpool;
-	cache_init();
-	procnum = 0;
-	get_proc_info(0, TADR(login_time), &image_count);
-        memset(proc_to_clb, 0, SIZEOF(proc_to_clb));
-	status = cmi_init(&node_name, 0, 0, gtcm_init_ast, gtcm_link_accept);
-	if (!(status & 1))
-	{
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ((status ^ 3) | 4));
-		sys$exit(status);
-	}
-	ntd_root = cmu_ntdroot();
-	ntd_root->mbx_ast =  gtcm_mbxread_ast;
-	ntd_root->err = gtcm_neterr;
-	gtcm_connection = FALSE;
-	lib$establish(gtcm_ch);
-	gtcm_exi_blk.exit_hand = &gtcm_exi_handler;
-	gtcm_exi_blk.arg_cnt = 1;
-	gtcm_exi_blk.cond_val = &gtcm_exi_condition;
-	sys$dclexh(&gtcm_exi_blk);
-	INVOKE_INIT_SECSHR_ADDRS;
-	initialize_pattern_table();
-	assert(run_time); /* Should have been set by common_startup_init */
-	while (!cm_shutdown)
-	{
-		if (blkdlist)
-			gtcml_chkreg();
-
-		assert(!lib$ast_in_prog());
-		status = sys$dclast(&gtcm_remove_from_action_queue, 0, 0);
-		if (SS$_NORMAL != status)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) CMERR_CMSYSSRV, 0, status, 0);
-		if (INTERLOCK_FAIL == curr_entry)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) CMERR_CMINTQUE);
-		if (EMPTY_QUEUE != curr_entry)
-		{
-			switch (*curr_entry->clb_ptr->mbf)
-			{
-				case CMMS_L_LKCANALL:
-					reply = gtcmtr_lkcanall();
-					break;
-				case CMMS_L_LKCANCEL:
-					reply = gtcmtr_lkcancel();
-					break;
-				case CMMS_L_LKREQIMMED:
-					reply = gtcmtr_lkreqimmed();
-					break;
-				case CMMS_L_LKREQNODE:
-					reply = gtcmtr_lkreqnode();
-					break;
-				case CMMS_L_LKREQUEST:
-					reply = gtcmtr_lkrequest();
-					break;
-				case CMMS_L_LKRESUME:
-					reply = gtcmtr_lkresume();
-					break;
-				case CMMS_L_LKACQUIRE:
-					reply = gtcmtr_lkacquire();
-					break;
-				case CMMS_L_LKSUSPEND:
-					reply = gtcmtr_lksuspend();
-					break;
-				case CMMS_L_LKDELETE:
-					reply = gtcmtr_lkdelete();
-					break;
-				case CMMS_Q_DATA:
-					reply = gtcmtr_data();
-					break;
-				case CMMS_Q_GET:
-					reply = gtcmtr_get();
-					break;
-				case CMMS_Q_KILL:
-					reply = gtcmtr_kill();
-					break;
-				case CMMS_Q_ORDER:
-					reply = gtcmtr_order();
-					break;
-				case CMMS_Q_PREV:
-					reply = gtcmtr_zprevious();
-					break;
-				case CMMS_Q_PUT:
-					reply = gtcmtr_put();
-					break;
-				case CMMS_Q_QUERY:
-					reply = gtcmtr_query();
-					break;
-				case CMMS_Q_ZWITHDRAW:
-					reply = gtcmtr_zwithdraw();
-					break;
-				case CMMS_S_INITPROC:
-					reply = gtcmtr_initproc();
-					break;
-				case CMMS_S_INITREG:
-					reply = gtcmtr_initreg();
-					break;
-				case CMMS_S_TERMINATE:
-					reply = gtcmtr_terminate(TRUE);
-					break;
-				case CMMS_E_TERMINATE:
-					reply = gtcmtr_terminate(FALSE);
-					break;
-				case CMMS_U_LKEDELETE:
-					reply = gtcmtr_lke_clearrep(curr_entry->clb_ptr, curr_entry->clb_ptr->mbf);
-					break;
-				case CMMS_U_LKESHOW:
-					reply = gtcmtr_lke_showrep(curr_entry->clb_ptr, curr_entry->clb_ptr->mbf);
-					break;
-				case CMMS_B_BUFRESIZE:
-					reply = CM_WRITE;
-					value = *(unsigned short *)(curr_entry->clb_ptr->mbf + 1);
-					if (value > curr_entry->clb_ptr->mbl)
-					{
-						free(curr_entry->clb_ptr->mbf);
-						curr_entry->clb_ptr->mbf = malloc(value);
-					}
-					*curr_entry->clb_ptr->mbf = CMMS_C_BUFRESIZE;
-					curr_entry->clb_ptr->mbl = value;
-					curr_entry->clb_ptr->cbl = 1;
-					break;
-				case CMMS_B_BUFFLUSH:
-					reply = gtcmtr_bufflush();
-					break;
-				case CMMS_Q_INCREMENT:
-					reply = gtcmtr_increment();
-					break;
-				default:
-					reply = FALSE;
-					if (SS$_NORMAL == status)
-                                                rts_error_csa(CSA_ARG(NULL)
-							VARLSTCNT(3) ERR_BADGTMNETMSG, 1, (int)*curr_entry->clb_ptr->mbf);
-					break;
-			}
-			if (curr_entry)		/* curr_entry can be NULL if went through gtcmtr_terminate */
-			{
-				status = sys$gettim(&curr_entry->lastact[0]);
-				if (SS$_NORMAL != status)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				/* curr_entry is used by gtcm_mbxread_ast to determine if it needs to defer the interrupt message */
-				prev_curr_entry = curr_entry;
-				if (CM_WRITE == reply)
-				{	/* if ast == gtcm_write_ast, let it worry */
-					curr_entry->clb_ptr->ast = gtcm_write_ast;
-					curr_entry = EMPTY_QUEUE;
-					cmi_write(prev_curr_entry->clb_ptr);
-				} else
-				{
-					curr_entry = EMPTY_QUEUE;
-					if (1 == (prev_curr_entry->int_cancel.laflag & 1))
-					{  /* valid interrupt cancel msg, handle in gtcm_mbxread_ast */
-						status = sys$dclast(gtcm_int_unpack, prev_curr_entry, 0);
-						if (SS$_NORMAL != status)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					} else  if (CM_READ == reply)
-					{
-						prev_curr_entry->clb_ptr->ast = gtcm_read_ast;
-						cmi_read(prev_curr_entry->clb_ptr);
-					}
-				}
-			}
-		} else  if (1 < astq_dyn_avail)
-		{
-#			ifdef GTCM_REPTIM
-			/* if reptim is not needed - and smw doesn't know why it would be - remove this	*/
-			status = sys$schdwk(0, 0, &wait[0], &reptim[0]);
-#			else
-			status = sys$schdwk(0, 0, &wait[0], 0);
-#			endif
-			sys$hiber();
-			sys$canwak(0, 0);
-		}
-		if (cm_timeout && (0 == gtcm_users))
-                        sys$setimr(efn_ignore, closewait, gtcm_shutdown_ast, &cm_shutdown, 0);
-	}
-}
diff --git a/sr_vms_cm/gtcmd_ini_reg.c b/sr_vms_cm/gtcmd_ini_reg.c
deleted file mode 100644
index a404b6e..0000000
--- a/sr_vms_cm/gtcmd_ini_reg.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-#include <syidef.h>
-#include <efndef.h>
-
-#include "vmsdtype.h"
-
-typedef struct {
-	item_list_3	ilist;
-	int4		terminator;
-} syistruct;
-
-GBLREF cm_region_head	*reglist;
-
-cm_region_head *gtcmd_ini_reg(connection_struct *cnx)
-{
-	cm_region_head	*rh, *ptr, *last;
-	struct FAB	tst;
-	struct NAM	name;
-	unsigned char	*fname,dummy[MAX_FN_LEN];
-	unsigned short	len;
-	uint4		status;
-	unsigned short	retlen;
-	char		node[15];
-	syistruct	syi_list;
-	short		iosb[4];
-	gds_file_id	dbid;
-	gd_region	*gv_match();
-	file_control	*file_cntl;
-
-	error_def (ERR_DBOPNERR);
-
-	ptr = 0;
-	fname = cnx->clb_ptr->mbf;
-	fname++;
-	len = *((unsigned short *) fname)++;
-	if (len > MAX_FN_LEN)
-		rts_error(VARLSTCNT(4) ERR_DBOPNERR, 2, len, fname);
-	tst = cc$rms_fab;
-	tst.fab$l_nam = &name;
-	name = cc$rms_nam;
-	name.nam$b_ess = MAX_FN_LEN;
-	name.nam$l_esa = dummy;
-	tst.fab$l_fna = fname;
-	tst.fab$b_fns = len;
-	status = sys$parse(&tst);
-	if (status != RMS$_NORMAL)
-		rts_error(VARLSTCNT(6) ERR_DBOPNERR, 2, len, fname, status, tst.fab$l_stv);
-	status = sys$search(&tst);
-	if (status != RMS$_NORMAL)
-		rts_error(VARLSTCNT(6) ERR_DBOPNERR, 2, len, fname, status, tst.fab$l_stv);
-	memcpy(dbid.dvi, name.nam$t_dvi, SIZEOF(name.nam$t_dvi));
-	memcpy(dbid.did, name.nam$w_did, SIZEOF(name.nam$w_did));
-	memcpy(dbid.fid, name.nam$w_fid, SIZEOF(name.nam$w_fid));
-	last = reglist;
-	for (ptr = reglist; ptr; ptr = ptr->next)
-	{
-		file_cntl = ptr->reg->dyn.addr->file_cntl;
-		if ((NULL != file_cntl) && (NULL != file_cntl->file_info)
-				&& is_gdid_gdid_identical(&dbid, &((vms_gds_info *)file_cntl->file_info)->file_id))
-			break;
-		last = ptr;
-	}
-	/* All open regions should be stored in a manner accessible to stop processing in case of the server being VMS stopped */
-	if (!ptr)
-	{	/* open region */
-		ptr = malloc(SIZEOF(*ptr));
-		ptr->next = 0;
-		ptr->last = 0;
-		ptr->head.fl = ptr->head.bl = 0;
-		if (last)
-		{
-			last->next = ptr;
-			ptr->last = last;
-		} else
-			reglist = ptr;
-		ptr->reg = malloc(SIZEOF(struct gd_region_struct) + SIZEOF(struct gd_segment_struct));
-		memset(ptr->reg, 0,SIZEOF(struct gd_region_struct) + SIZEOF(struct gd_segment_struct));
-		ptr->refcnt = 0;
-		ptr->reg->open = FALSE;
-		ptr->reg->dyn.addr = (unsigned char *) ptr->reg + SIZEOF(struct gd_region_struct);
-		ptr->reg->dyn.addr->acc_meth = dba_bg;
-		memcpy(ptr->reg->dyn.addr->fname,fname,len);
-		ptr->reg->dyn.addr->fname_len = len;
-		ptr->reg_hash = malloc(SIZEOF(hash_table_mname));
-		syi_list.ilist.buffer_length = SIZEOF(node);
-		syi_list.ilist.item_code = SYI$_NODENAME;
-		syi_list.ilist.buffer_address = node;
-		syi_list.ilist.return_length_address = &retlen;
-		syi_list.terminator = 0;
-		status = sys$getsyiw(EFN$C_ENF, 0, 0, &syi_list, &iosb[0], 0, 0);
-		if ((status & 1) && (iosb[0] & 1))
-		{
-			memcpy(ptr->reg->rname, node, retlen);
-			if (retlen < SIZEOF(node))
-			{
-				ptr->reg->rname[retlen] = ':';
-				if (retlen < (SIZEOF(node) - 1))
-					ptr->reg->rname[retlen + 1] = ':';
-			}
-		}
-	}
-	if (!ptr->reg->open)
-	{
-		ptr->wakeup = 0;	/* Init EACH time (re)open region */
-		gtcmd_cst_init(ptr);
-	}
-	return ptr;
-}
diff --git a/sr_vms_cm/gvcmz_errmsg.c b/sr_vms_cm/gvcmz_errmsg.c
deleted file mode 100644
index 8de3ba0..0000000
--- a/sr_vms_cm/gvcmz_errmsg.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-
-gvcmz_errmsg(c,close)
-struct CLB *c;
-bool close;
-{
-	char *buf1,*buf2,*buf3,*ptr;
-	int  i,j,x,count1,count2,count3;
-	int4 *msgbuf,*msgptr;
-	uint4 status;
-	cmi_descriptor *desc;
-
-	buf1 = c->mbf;
-	buf2 = buf3 = 0;
-	count2 = count3 = 0;
-	ptr = buf1 + 1;
-	if (*ptr)
-	{	buf2 = malloc(c->mbl);
-		c->mbf = buf2;
-		status = cmi_read(c);
-		if ((status & 1) == 0)
-		{	buf2 = 0;
-			count2 = 1;
-			goto signal;
-		}
-		if (*c->mbf != CMMS_E_ERROR)
-		{	buf2 = 0;
-			count2 = 1;
-			goto signal;
-		}
-		ptr = buf2 + 1;
-		if (*ptr)
-		{	buf3 = malloc(c->mbl);
-			c->mbf = buf3;
-			status = cmi_read(c);
-			if ((status & 1) == 0)
-			{	buf3 = 0;
-				count3 = 1;
-				goto signal;
-			}
-			if (*c->mbf != CMMS_E_ERROR)
-			{	buf3 = 0;
-				count3 = 1;
-				goto signal;
-			}
-		}
-	}
-	ptr = buf1 + 2;
-	count1 = *ptr++;
-	if (buf2)
-	{	ptr = buf2 + 2;
-		count2 = *ptr;
-		if (buf3)
-		{	ptr = buf3 + 2;
-			count3 = *ptr;
-		}
-		ptr = buf1 + 3;
-	}
-signal:
-	msgbuf = malloc((count1 + count2 + count3 + 1) * SIZEOF(int4));
-	msgptr = msgbuf;
-	*msgptr++ = count1 + count2 + count3;
-	x = count1;
-	for ( j = 0; ; j++)
-	{	for ( i = 0; i < x ; i++)
-		{	if (*ptr == 'L')
-			{	ptr++;
-				*msgptr++ = *(int4 *)ptr;
-				ptr += SIZEOF(int4);
-			}else if (*ptr == 'Q')
-			{	ptr++;
-				*msgptr++ = ptr;
-				ptr += 4 * SIZEOF(int4);
-			}else if (*ptr == 'C')
-			{	ptr++;
-				*msgptr++ = ptr + 1;
-				ptr += 2 + *(short*)ptr;
-			}else if (*ptr == 'A')
-			{	ptr++;
-				*msgptr++ = ptr + 2;
-				ptr += 2 + *(short*)ptr;
-			}else if (*ptr == 'D')
-			{	desc = ptr + 1;
-				desc->dsc$a_pointer = ptr + SIZEOF(cmi_descriptor) + 1;
-				*msgptr++ = desc;
-				ptr += 1 + SIZEOF(cmi_descriptor) + desc->dsc$w_length;
-			}else
-			{	if (j == 0)
-					*msgbuf = i;
-				else if (j == 1)
-					*msgbuf = i + count1;
-				else
-					*msgbuf = i + count1 + count2;
-				j = 2;
-				break;
-			}
-		}
-		if (j == 0 && buf2)
-		{	x = count2;
-			ptr = buf2 + 3;
-		}else if (j == 1 && buf3)
-		{	x = count3;
-			ptr = buf3 + 3;
-		}else
-		{	break;
-		}
-	}
-	if (buf2)
-		free(buf2);
-	if (buf3)
-		free(buf3);
-	c->mbf = buf1;
-	if (close)
-	{	gvcmy_close(c);
-	}
-	callg_signal(msgbuf);
-}
diff --git a/sr_vvms/append_time_stamp.c b/sr_vvms/append_time_stamp.c
deleted file mode 100644
index e2a4880..0000000
--- a/sr_vvms/append_time_stamp.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_fcntl.h"
-
-#include <ssdef.h>
-#include <rms.h>
-#include <devdef.h>
-#include <descrip.h>
-#include <libdtdef.h>
-#include <libdef.h>
-#include <starlet.h>
-
-#include "iosp.h"
-#include "gtm_file_stat.h"
-#include "gtm_rename.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "filestruct.h"
-#include "jnl.h"
-
-#define	YR_DIGIT_SIZE	4
-#define	TIME_DIGIT_SIZE	6
-
-/* Append the formatted timestamp to the file name (fn); *fn_len contains the current length of the filename and at exit from this
- * function, it is updated to reflect the new length.
- */
-uint4 append_time_stamp(char *fn, int *fn_len, jnl_tm_t now)
-{
-	uint4		status1;
-	gtm_uint64_t	whole_time;
-	char		es_buffer[MAX_FN_LEN], name_buffer[MAX_FN_LEN];
-	char		yr_arr[MAX_FN_LEN], yr_time_arr[MAX_FN_LEN], time_arr[MAX_FN_LEN];
-	char 		format_arr[MAX_FN_LEN], output_arr[MAX_FN_LEN];
-	short 		yr_len;
-	unsigned long	days, context = 0;
-	long yearflag = LIB$K_OUTPUT_FORMAT;
-	long daysflag = LIB$K_DAY_OF_YEAR;
-	$DESCRIPTOR(yr_time_format, JNLSWITCH_TM_FMT);
-	$DESCRIPTOR(yr_time_str, yr_time_arr);
-
-	JNL_WHOLE_FROM_SHORT_TIME(whole_time, now);
-	if (LIB$_NORMAL != (status1 = lib$cvt_from_internal_time(&daysflag, &days, &whole_time))) /* Get julian date */
-		return status1;
-	if (SS$_NORMAL != (status1 = lib$init_date_time_context(&context, &yearflag, &yr_time_format)))
-		return status1;
-	yr_len = MAX_FN_LEN;
-	if (SS$_NORMAL != (status1 = lib$format_date_time(&yr_time_str, &whole_time, &context, &yr_len, 0))) /* get the year */
-	{
-		lib$free_date_time_context(&context);
-		return status1;
-	}
-	if (SS$_NORMAL != (status1 = lib$free_date_time_context(&context)))
-		return status1;
-	yr_time_arr[yr_len]='\0';
-	memcpy(yr_arr, yr_time_arr, YR_DIGIT_SIZE);
-	yr_arr[YR_DIGIT_SIZE] = '\0';
-	memcpy(time_arr, &yr_time_arr[YR_DIGIT_SIZE + 1], TIME_DIGIT_SIZE);
-	time_arr[TIME_DIGIT_SIZE] = '\0';
-	SPRINTF(fn + *fn_len, "_%s%d%s", yr_arr, days, time_arr);
-	*fn_len = strlen(fn);
-	return SS_NORMAL;
-}
diff --git a/sr_vvms/ast.h b/sr_vvms/ast.h
deleted file mode 100644
index 8a0e6f9..0000000
--- a/sr_vvms/ast.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define ENABLE 1
-#define DISABLE 0
-
-#define ENABLE_AST sys$setast(ENABLE);
-#define DISABLE_AST sys$setast(DISABLE);
diff --git a/sr_vvms/ast_get_static.c b/sr_vvms/ast_get_static.c
deleted file mode 100644
index 7552979..0000000
--- a/sr_vvms/ast_get_static.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "efn.h"
-#include "timers.h"
-#include <ssdef.h>
-
-GBLREF short astq_dyn_alloc;
-GBLREF short astq_dyn_avail;
-GBLREF short astq_dyn_min;
-
-bool ast_get_static(needed)
-int needed;
-{
-	int4		pause[2];
-
-	if ((astq_dyn_alloc - needed) < astq_dyn_min)
-		return FALSE;
-	astq_dyn_alloc -= needed;
-	astq_dyn_avail -= needed;
-	pause[0] = TIM_AST_WAIT;
-	pause[1] = -1;
-	while (astq_dyn_avail < 0 )
-	{	if (sys$setimr(efn_immed_wait, &pause, 0, 0, 0) == SS$_NORMAL)
-		{	sys$synch(efn_immed_wait, 0);
-		}
-	};
-	return TRUE;
-}
diff --git a/sr_vvms/ast_init.c b/sr_vvms/ast_init.c
deleted file mode 100644
index d67e42d..0000000
--- a/sr_vvms/ast_init.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include "ast_init.h"
-
-#define MIN_DYN_ASTS 4
-
-GBLDEF short astq_dyn_avail;
-GBLDEF short astq_dyn_alloc;
-GBLDEF short astq_dyn_min;
-
-void ast_init(void)
-{
-int4 item, outv;
-
-	item = JPI$_ASTLM;
-	lib$getjpi(&item, 0, 0, &outv, 0, 0);
-	astq_dyn_alloc = astq_dyn_avail = outv;
-	astq_dyn_min = MIN_DYN_ASTS;
-	sys$setrwm(0);	/* set resource wait mode, so will not create error if exceeded I/O limit */
-}
diff --git a/sr_vvms/ast_init.h b/sr_vvms/ast_init.h
deleted file mode 100644
index b4d3425..0000000
--- a/sr_vvms/ast_init.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef AST_INIT_INCLUDED
-#define AST_INIT_INCLUDED
-
-void ast_init(void);
-
-#endif /* AST_INIT_INCLUDED */
diff --git a/sr_vvms/backup_buffer_flush.c b/sr_vvms/backup_buffer_flush.c
deleted file mode 100644
index 3f0623e..0000000
--- a/sr_vvms/backup_buffer_flush.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <iodef.h>
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "efn.h"
-#include "util.h"
-#include "memcoherency.h"
-#include "sleep_cnt.h"
-#include "wcs_sleep.h"
-#include "iormdef.h"
-#include "shmpool.h"
-#include "gtmimagename.h"
-#include "mupipbckup.h"
-#include "send_msg.h"
-
-GBLREF	int			process_id;
-
-error_def(ERR_BKUPTMPFILOPEN);
-error_def(ERR_BKUPTMPFILWRITE);
-
-/* Return true if flush attempted, false if lock not obtained or other error */
-boolean_t backup_buffer_flush(gd_region *reg)
-{
-	int4			status, write_size, write_len, lcnt;
-	sgmnt_addrs		*csa;
-	shmpool_buff_hdr_ptr_t	sbufh_p;
-	shmpool_blk_hdr_ptr_t	sblkh_p, next_sblkh_p;
-	boolean_t		multiple_writes;
-	sm_uc_ptr_t		write_ptr;
-
-	struct FAB		fab;
-	struct NAM		nam;
-	struct RAB		rab;
-	VMS_ONLY(int		flush_cnt);
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	sbufh_p = csa->shmpool_buffer;
-
-	if (!shmpool_lock_hdr_nowait(reg))
-	{
-#ifdef DEBUG
-		/* someone else is flushing it right now */
-		if (!IS_GTM_IMAGE)
-			util_out_print("Process !12UL has the shmpool lock preventing backup buffer flush.",
-				TRUE, sbufh_p->shmpool_crit_latch.u.parts.latch_pid);
-#endif
-		return FALSE;
-	}
-
-
-	if (0 != sbufh_p->backup_errno)
-	{	/* Since this is signal/mupip initiated, the proper message will be (or already has been) output on exit. */
-		shmpool_unlock_hdr(reg);
-		return FALSE;		/* Async error state change (perhaps mupip stop) -- nothing to do if backup is dying */
-	}
-
-	/* See if there are any buffers needing flushing. Note that we are holding the shmpool lock across
-	   the IO we will be doing. This simplifies the backup logic substantialy. If we released and obtained
-	   the lock for each buffer we dequeue (to allow other processes to proceed while we are doing IO) it
-	   is likely that some of those other processes would get the idea to also run a buffer flush. Then we
-	   would have to manage the task of doing multiple simultaneous IO to the temporary file potentially
-	   resulting in gaps in the file which is something we definitely do not want to do. Besides, if a backup
-	   is going on (and thus causing the flush) we are likely doing this in crit which is holding up all
-	   other processes anyway so we aren't losing much if anything. This is also historically how this
-	   has been done to assure the robustness of the temporary file. SE 1/2005.
-	*/
-	if (0 < sbufh_p->backup_cnt)
-	{	/* open the file, write to it at the address and close the file */
-		fab = cc$rms_fab;
-		fab.fab$b_fac = FAB$M_PUT;
-		fab.fab$l_fna = sbufh_p->tempfilename;
-		fab.fab$b_fns = strlen(sbufh_p->tempfilename);
-		rab = cc$rms_rab;
-                rab.rab$l_fab = &fab;
-                rab.rab$l_rop = RAB$M_WBH | RAB$M_EOF;
-
-		for (lcnt = 1;  MAX_OPEN_RETRY >= lcnt;  lcnt++)
-		{
-			if (RMS$_FLK != (status = sys$open(&fab, NULL, NULL)))
-				break;
-			wcs_sleep(lcnt);
-		}
-
-		if ((RMS$_NORMAL != status) || (RMS$_NORMAL != (status = sys$connect(&rab))))
-		{	/* Unable to open temporary file */
-			sbufh_p->backup_errno = status;
-			sbufh_p->failed = process_id;
-			csa->nl->nbb = BACKUP_NOT_IN_PROGRESS;
-			send_msg(VARLSTCNT(5) ERR_BKUPTMPFILOPEN, 2, LEN_AND_STR(sbufh_p->tempfilename), sbufh_p->backup_errno);
-			shmpool_unlock_hdr(reg);
-			return FALSE;
-		}
-
-		DEBUG_ONLY(flush_cnt = 0);
-		for (sblkh_p = SBLKP_REL2ABS(&sbufh_p->que_backup, fl);
-		     sblkh_p != (shmpool_blk_hdr_ptr_t)&sbufh_p->que_backup;
-		     sblkh_p = next_sblkh_p)
-		{	/* Loop through the queued backup blocks */
-			DEBUG_ONLY(++flush_cnt);
-			VERIFY_QUEUE((que_head_ptr_t)&sbufh_p->que_free);
-			VERIFY_QUEUE((que_head_ptr_t)&sbufh_p->que_backup);
-			next_sblkh_p = SBLKP_REL2ABS(sblkh_p, fl);	/* Get next offset now in case remove entry */
-			/* Need read fence for checking if block has valid data or not since these
-			   fields are not set under lock */
-			SHM_READ_MEMORY_BARRIER;
-			assert(SHMBLK_BACKUP == sblkh_p->blktype);
-			if (!sblkh_p->valid_data)
-				continue;
-			assert(sbufh_p->blk_size >= ((blk_hdr_ptr_t)(sblkh_p + 1))->bsiz);	/* Still validly sized blk? */
-			/* This block has valid data. Flush it first, then dequeue it. It won't hurt if this
-			   process fails between the time that it starts the IO and it dequeues the block. The
-			   worst that would happen is the block would be in the temporary file twice which, while
-			   a little annoying is not functionally incorrect. If we dequeue it first though, there is
-			   a possibility that the IO could be lost and an invalid block written to the temporary file
-			   or missed altogether.
-			*/
-			write_size = SIZEOF(*sblkh_p) + sbufh_p->blk_size;	/* Assume write hdr/data in one block */
-			write_ptr = (sm_uc_ptr_t)sblkh_p;
-			while (write_size)
-			{	/* Our block + hdr would exceed the 32K max. Write it in two writes as necessary. Since this
-				   is standard buffered IO, this is not as big a deal as it could be hence we don't go
-				   crazy with our own buffering scheme.
-				*/
-				write_len = MIN(MAX_RMS_RECORDSIZE, write_size);
-				rab.rab$l_rbf = write_ptr;
-				rab.rab$w_rsz = write_len;
-				if (RMS$_NORMAL != (status = sys$put(&rab)))
-				{
-					sbufh_p->backup_errno = status;
-					sbufh_p->failed = process_id;
-					csa->nl->nbb = BACKUP_NOT_IN_PROGRESS;
-					send_msg(VARLSTCNT(5) ERR_BKUPTMPFILWRITE, 2, LEN_AND_STR(sbufh_p->tempfilename),
-						 sbufh_p->backup_errno);
-					break;
-				}
-				write_ptr += write_len;
-				write_size -= write_len;
-			}
-			if (sbufh_p->backup_errno)
-				break;
-			/* Update disk addr with record just written */
-			sbufh_p->dskaddr += (SIZEOF(*sblkh_p) + sbufh_p->blk_size);
-			/* Now we can deque this entry from the backup queue safely and release it */
-			shmpool_blk_free(reg, sblkh_p);
-		}
-		sys$close(&fab);
-	}
-	shmpool_unlock_hdr(reg);
-	return TRUE;
-}
diff --git a/sr_vvms/bin_load.c b/sr_vvms/bin_load.c
deleted file mode 100644
index 5c206a0..0000000
--- a/sr_vvms/bin_load.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_ctype.h"
-#include "gtm_stdlib.h"
-
-#include "stringpool.h"
-#include <rms.h>
-#include "iormdef.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "msg.h"
-#include "muextr.h"
-#include "outofband.h"
-#include "collseq.h"
-#include "copy.h"
-#include "util.h"
-#include "op.h"
-#include "gvsub2str.h"
-#include "error.h"
-#include "mu_load_stat.h"
-#include "load.h"
-#include "mvalconv.h"
-#include "mu_gvis.h"
-#include "gtmmsg.h"
-#include "hashtab_mname.h"
-#include "min_max.h"
-
-#define 	CR 13
-#define 	LF 10
-#define		LCL_BUF_SIZE 512
-#define 	FILLFACTOR_EXPONENT 10
-#define		V3_STDNULLCOLL	"00000"	/* V3 denotes binary extract header version number (not GT.M version number) */
-
-GBLREF bool		mu_ctrlc_occurred;
-GBLREF bool		mu_ctrly_occurred;
-GBLREF bool		mupip_DB_full;
-GBLREF bool		mupip_error_occurred;
-GBLREF spdesc 		stringpool;
-GBLREF gv_key		*gv_altkey;
-GBLREF gv_key		*gv_currkey;
-GBLREF gd_addr		*gd_header;
-GBLREF int4		gv_keysize;
-GBLREF gv_namehead	*gv_target;
-
-error_def(ERR_BEGINST);
-error_def(ERR_BINHDR);
-error_def(ERR_BLKCNT);
-error_def(ERR_COLLTYPVERSION);
-error_def(ERR_COLLATIONUNDEF);
-error_def(ERR_CORRUPT);
-error_def(ERR_GVIS);
-error_def(ERR_LDBINFMT);
-error_def(ERR_LOADABORT);
-error_def(ERR_LOADCTRLY);
-error_def(ERR_LOADEOF);
-error_def(ERR_MUNOACTION);
-error_def(ERR_OLDBINEXTRACT);
-error_def(ERR_PREMATEOF);
-error_def(ERR_TEXT);
-
-/***********************************************************************************************/
-/*					Binary Format                                          */
-/***********************************************************************************************/
-
-/* starting extract file format 3, we have an extra record for each gvn, that contains the
- * collation information of the database at the time of extract. This record is transparent
- * to the user, so the semantics of the command line options, 'begin' and 'end' to MUPIP LOAD
- * will remain same. The collation header is identified in the binary extract by the fact
- * that its size is 4 bytes and no valid data record can have length 4.
- */
-
-void bin_load(uint4 begin, uint4 end, struct RAB *inrab, struct FAB *infab)
-{
-	boolean_t	need_xlation, new_gvn;
-	char 		*buff, std_null_coll[BIN_HEADER_NUMSZ + 1];
-	coll_hdr	db_collhdr, extr_collhdr;
-	collseq		*db_collseq, *extr_collseq, *save_gv_target_collseq;
-	gv_key 		*tmp_gvkey = NULL;	/* null-initialize at start, will be malloced later */
-	int 		current, last, len, max_blk_siz, max_key, other_rsz, status, subsc_len;
-	msgtype		msg;
-	mval		tmp_mval, v;
-	rec_hdr		*next_rp, *rp;
-	uint4 		extr_std_null_coll, global_key_count, key_count, max_data_len, max_subsc_len, rec_count;
-	unsigned char	*btop, *cp1, *cp2, *end_buff, *gvkey_char_ptr, hdr_lvl ,*tmp_ptr, *tmp_key_ptr,
-			cmpc_str[MAX_KEY_SZ + 1], dest_buff[MAX_ZWR_KEY_SZ], dup_key_str[MAX_KEY_SZ + 1], src_buff[MAX_KEY_SZ + 1];
-	unsigned short	next_cmpc, rec_len;
-	mname_entry	gvname;
-	gvnh_reg_t	*gvnh_reg;
-	gd_region	*dummy_reg;
-	mstr		opstr;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	assert(4 == SIZEOF(coll_hdr));
-	inrab->rab$l_ubf = malloc(LCL_BUF_SIZE);
-	inrab->rab$w_usz = LCL_BUF_SIZE - 1;
-	max_data_len = max_subsc_len = key_count = 0;
-	rec_count = 1;
-	status = sys$get(inrab);
-	if (RMS$_EOF == status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_PREMATEOF);
-	if (!(status & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	len = inrab->rab$w_rsz;
-	buff = inrab->rab$l_rbf;
-	while ((0 < len) && ((LF == buff[len - 1]) || (CR == buff[len - 1])))
-		len--;
-	/* expect the level can be represented in a single character */
-        assert(' ' == *(buff + SIZEOF(BIN_HEADER_LABEL) - 3));
-	hdr_lvl = EXTR_HEADER_LEVEL(buff);
-        if (0 != memcmp(buff, BIN_HEADER_LABEL, SIZEOF(BIN_HEADER_LABEL) - 2) || '2' > hdr_lvl
-	    || *(BIN_HEADER_VERSION) < hdr_lvl)
-	{				/* ignore the level check */
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_LDBINFMT);
-		return;
-	}
-	if ('3' < hdr_lvl)
-	{
-		memcpy(std_null_coll, buff + BIN_HEADER_NULLCOLLOFFSET, BIN_HEADER_NUMSZ);
-		std_null_coll[BIN_HEADER_NUMSZ] = '\0';
-		extr_std_null_coll = STRTOUL(std_null_coll, NULL, 10);
-		if (0 != extr_std_null_coll && 1!= extr_std_null_coll)
-		{
-                	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
-				ERR_TEXT, 2, RTS_ERROR_TEXT("Corrupted null collation field in header"), ERR_LDBINFMT);
-			return;
-		}
-	} else
-	{
-		memcpy(std_null_coll, V3_STDNULLCOLL, BIN_HEADER_NUMSZ);
-		assert(BIN_HEADER_NUMSZ == STR_LIT_LEN(V3_STDNULLCOLL));
-		std_null_coll[BIN_HEADER_NUMSZ] = '\0';
-		extr_std_null_coll = 0;
-	}
-	msg.arg_cnt = 18;
-	msg.new_opts = msg.def_opts = 1;
-	msg.msg_number = ERR_BINHDR;
-	msg.fp_cnt = 16;
-	msg.fp[0].n = SIZEOF(BIN_HEADER_LABEL) - 1;
-	msg.fp[1].cp = buff;
-	msg.fp[2].n = SIZEOF("YEARMMDD") - 1;
-	msg.fp[3].cp = buff + SIZEOF(BIN_HEADER_LABEL) - 1;
-	msg.fp[4].n = SIZEOF(BIN_HEADER_DATEFMT) - SIZEOF("YEARMMDD");
-	msg.fp[5].cp = buff + SIZEOF("YEARMMDD") + SIZEOF(BIN_HEADER_LABEL) - 2;
-	msg.fp[6].n = BIN_HEADER_NUMSZ;
-	msg.fp[7].cp = buff + BIN_HEADER_BLKOFFSET;
-	msg.fp[8].n = BIN_HEADER_NUMSZ;
-	msg.fp[9].cp = buff + BIN_HEADER_RECOFFSET;
-	msg.fp[10].n = BIN_HEADER_NUMSZ;
-	msg.fp[11].cp = buff + BIN_HEADER_KEYOFFSET;
-	msg.fp[12].n = BIN_HEADER_NUMSZ;
-	msg.fp[13].cp = &std_null_coll[0];
-	if (hdr_lvl > '3')
-	{
-		msg.fp[14].n = BIN_HEADER_SZ - (BIN_HEADER_NULLCOLLOFFSET + BIN_HEADER_NUMSZ);
-		msg.fp[15].cp = buff + BIN_HEADER_NULLCOLLOFFSET + BIN_HEADER_NUMSZ;
-	} else
-	{
-		msg.fp[14].n = V3_BIN_HEADER_SZ - (BIN_HEADER_KEYOFFSET + BIN_HEADER_NUMSZ);
-		msg.fp[15].cp = buff + BIN_HEADER_KEYOFFSET + BIN_HEADER_NUMSZ;
-	}
-	sys$putmsg(&msg, 0, 0, 0);
-	v.mvtype = MV_STR;
-	v.str.len = BIN_HEADER_NUMSZ;
-	v.str.addr = buff + BIN_HEADER_BLKOFFSET;
-	s2n(&v);
-	stringpool.free = stringpool.base;
-	max_blk_siz = MV_FORCE_INTD(&v);
-	assert(max_blk_siz > LCL_BUF_SIZE - 1);
-	infab->fab$w_mrs = max_blk_siz;
-	/* Note the buffer size below is the same as the blocksize but the extract data will not contain the block header.
-	 * But rather than reduce the buffer by that amount we just leave it (somewhat) larger. Reason is beginning with V5
-	 * we also accept V4 extracts which had a smaller block header so the real size is indeterminate and since the
-	 * difference is only a few bytes, we leave the buffer size at the full blocksize. SE 4/2005
-	 */
-	inrab->rab$w_usz = max_blk_siz;
-	free(inrab->rab$l_ubf);
-	inrab->rab$l_ubf = malloc(inrab->rab$w_usz);
-	v.mvtype = MV_STR;
-	rec_count++;
-	new_gvn = FALSE;
-	if ('2' < hdr_lvl)
-	{
-		status = sys$get(inrab);
-		if (RMS$_EOF == status)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_PREMATEOF);
-		if (!(status & 1))
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		if (SIZEOF(coll_hdr) != inrab->rab$w_rsz)
-                {
-                        rts_error_csa(CSA_ARG(NULL)
-				VARLSTCNT(5) ERR_TEXT, 2, RTS_ERROR_TEXT("Corrupt collation header"), ERR_LDBINFMT);
-			return;
-                }
-		extr_collhdr = *((coll_hdr *)(inrab->rab$l_rbf));
-		new_gvn = TRUE;
-	} else
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_OLDBINEXTRACT, 1, hdr_lvl - '0');
-	if (begin < 2)
-		begin = 2;
-	for ( ; rec_count < begin; )
-	{
-		status = sys$get(inrab);
-		if (RMS$_EOF == status)
-		{
-			sys$close(infab);
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_LOADEOF, 1, begin);
-			mupip_exit(ERR_MUNOACTION);
-		}
-		if (RMS$_NORMAL != status)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		if (SIZEOF(coll_hdr) == inrab->rab$w_rsz)
-		{
-			assert(hdr_lvl > '2');
-			continue;
-		}
-		rec_count++;
-	}
-	msg.msg_number = ERR_BEGINST;
-	msg.arg_cnt = 3;
-	msg.fp_cnt = 1;
-	msg.fp[0].n = rec_count;
-	sys$putmsg(&msg, 0, 0, 0);
-	ESTABLISH(mupip_load_ch);
-	extr_collseq = db_collseq = NULL;
-	need_xlation = FALSE;
-	rec_count = begin - 1;
-	other_rsz = 0;
-	assert(NULL == tmp_gvkey);	/* GVKEY_INIT macro relies on this */
-	GVKEY_INIT(tmp_gvkey, DBKEYSIZE(MAX_KEY_SZ));	/* tmp_gvkey will point to malloced memory after this */
-	gvnh_reg = NULL;
-	for ( ; !mupip_DB_full; )
-	{
-		if (++rec_count > end)
-			break;
-		next_cmpc = 0;
-		mupip_error_occurred = FALSE;
-		if (mu_ctrly_occurred)
-			break;
-		if (mu_ctrlc_occurred)
-		{
-			mu_load_stat(max_data_len, max_subsc_len, key_count, key_count ? (rec_count - 1) : 0, ERR_BLKCNT);
-			mu_gvis();
-			util_out_print(0, TRUE);
-		}
-		/* reset the stringpool for every record in order to avoid garbage collection */
-		stringpool.free = stringpool.base;
-		if (other_rsz)
-		{	/* read an extra block when it wasn't a tail, but rather a new record */
-			inrab->rab$w_rsz = other_rsz;
-			rp = inrab->rab$l_ubf + MAX_BIN_WRT;
-			btop = rp + other_rsz;
-			other_rsz = 0;
-		} else
-		{
-			if (RMS$_EOF == (status = sys$get(inrab)))
-				break;
-			if (RMS$_NORMAL != status)
-			{
-				lib$signal(status);
-				mupip_error_occurred = TRUE;
-				break;
-			}
-			assert((max_blk_siz >= inrab->rab$w_rsz) && (MAX_BIN_WRT >= inrab->rab$w_rsz));
-			rp = inrab->rab$l_rbf;
-			btop = inrab->rab$l_rbf + inrab->rab$w_rsz;
-			if (MAX_BIN_WRT == inrab->rab$w_rsz)
-			{	/* Most likely there's more, so do another read */
-				inrab->rab$l_ubf += MAX_BIN_WRT;
-				status = sys$get(inrab);
-				if ((RMS$_NORMAL != status) && ((end != rec_count) || (RMS$_EOF != status)))
-				{
-					lib$signal(status);
-					mupip_error_occurred = TRUE;
-					break;
-				}
-				other_rsz = inrab->rab$w_rsz;
-				inrab->rab$l_ubf = rp;
-			}
-		}
-		if (SIZEOF(coll_hdr) == inrab->rab$w_rsz)
-		{
-			extr_collhdr = *((coll_hdr *)(inrab->rab$l_rbf));
-			assert(hdr_lvl > '2');
-			new_gvn = TRUE;                 /* next record will contain a new gvn */
-			rec_count--;	/* Decrement as this record does not count as a record for loading purposes */
-			continue;
-		}
-		cp1 = rp + 1;
-		v.str.addr = cp1;
-		while (*cp1++)
-			;
-		v.str.len = cp1 - (unsigned char *)v.str.addr - 1;
-		if (hdr_lvl <= '2' || new_gvn)
-		{
-			gvname.var_name = v.str;
-			gvname.var_name.len = MIN(gvname.var_name.len, MAX_MIDENT_LEN);
-			COMPUTE_HASH_MNAME(&gvname);
-			GV_BIND_NAME_AND_ROOT_SEARCH(gd_header, &gvname, gvnh_reg);
-			/* "gv_cur_region" will be set at this point in case the global does NOT span regions.
-			 * For globals that do span regions, "gv_cur_region" will be set just before the call to op_gvput
-			 */
-			max_key = gvnh_reg->gd_reg->max_key_size;
-			db_collhdr.act = gv_target->act;
-			db_collhdr.ver = gv_target->ver;
-			db_collhdr.nct = gv_target->nct;
-		}
-		if ((0 != rp->cmpc) || (v.str.len > rp->rsiz) || mupip_error_occurred)
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT, 2, rec_count, global_key_count);
-			mu_gvis();
-			util_out_print(0, TRUE);
-			continue;
-		}
-		if (new_gvn)
-		{
-			global_key_count = 1;
-			if ((db_collhdr.act != extr_collhdr.act) || (db_collhdr.ver != extr_collhdr.ver)
-				|| (db_collhdr.nct != extr_collhdr.nct) || (gvnh_reg->gd_reg->std_null_coll != extr_std_null_coll))
-			{
-				if (extr_collhdr.act)
-				{
-					if (extr_collseq = ready_collseq((int)extr_collhdr.act))
-					{
-						if (!do_verify(extr_collseq, extr_collhdr.act, extr_collhdr.ver))
-						{
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_COLLTYPVERSION, 2,
-								extr_collhdr.act, extr_collhdr.ver,
-								ERR_GVIS, 2, gv_altkey->end - 1, gv_altkey->base);
-						}
-					} else
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_COLLATIONUNDEF, 1, extr_collhdr.act,
-							ERR_GVIS, 2, gv_altkey->end - 1, gv_altkey->base);
-					}
-				}
-				if (db_collhdr.act)
-				{
-					if (db_collseq = ready_collseq((int)db_collhdr.act))
-					{
-						if (!do_verify(db_collseq, db_collhdr.act, db_collhdr.ver))
-						{
-							rts_error_csa(CSA_ARG(NULL)
-								VARLSTCNT(8) ERR_COLLTYPVERSION, 2, db_collhdr.act, db_collhdr.ver,
-								ERR_GVIS, 2, gv_altkey->end - 1, gv_altkey->base);
-						}
-					} else
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_COLLATIONUNDEF, 1, db_collhdr.act,
-							ERR_GVIS, 2, gv_altkey->end - 1, gv_altkey->base);
-					}
-				}
-				need_xlation = TRUE;
-			} else
-				need_xlation = FALSE;
-		}
-		new_gvn = FALSE;
-		GET_USHORT(rec_len, &rp->rsiz);
-		for (; rp < btop; rp = (unsigned char *)rp + rec_len)
-		{
-			GET_USHORT(rec_len, &rp->rsiz);
-			if ((rec_len + (unsigned char *)rp > btop) && (other_rsz))
-			{	/* if there was a second read try to use it */
-				btop += other_rsz;
-				other_rsz = 0;
-			}
-			if (rec_len + (unsigned char *)rp > btop)
-			{
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT, 2, rec_count, global_key_count);
-				mu_gvis();
-				util_out_print(0, TRUE);
-				break;
-			}
-			cp1 = rp + 1;
-			cp2 = &gv_currkey->base + rp->cmpc;
-			current = 1;
-			for (;;)
-			{
-				last = current;
-				current = *cp2++ = *cp1++;
-				if ((0 == last) && (0 == current))
-					break;
-				if ((cp1 > ((unsigned char *)rp + rec_len)) ||
-				    (cp2 > ((unsigned char *)gv_currkey + gv_currkey->top)))
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT, 2, rec_count, global_key_count);
-					mu_gvis();
-					util_out_print(0, TRUE);
-					break;
-				}
-			}
-			if (mupip_error_occurred)
-				break;
-			gv_currkey->end = cp2 - (unsigned char *)&gv_currkey->base - 1;
-			if (max_subsc_len < (gv_currkey->end + 1))
-				max_subsc_len = gv_currkey->end + 1;
-			if (need_xlation)
-			{				/* gv_currkey would have been modified/translated in the earlier put */
-				memcpy(gv_currkey->base, cmpc_str, next_cmpc);
-				next_rp = (rec_hdr *)((unsigned char*)rp + rec_len);
-				if ((unsigned char*)next_rp < btop)
-				{
-					next_cmpc = next_rp->cmpc;
-					assert(next_cmpc <= gv_currkey->end);
-					memcpy(cmpc_str, gv_currkey->base, next_cmpc);
-				} else
-					next_cmpc = 0;
-				assert(hdr_lvl >= '3');
-				assert(extr_collhdr.act || db_collhdr.act || extr_collhdr.nct || db_collhdr.nct
-						|| (extr_std_null_coll != gvnh_reg->gd_reg->std_null_coll));
-							/* the length of the key might change (due to nct variation),
-							 * so get a copy of the original key from the extract */
-				memcpy(dup_key_str, gv_currkey->base, gv_currkey->end + 1);
-				gvkey_char_ptr = dup_key_str;
-				while (*gvkey_char_ptr++)
-					;
-				gv_currkey->end = gvkey_char_ptr - dup_key_str;
-				assert(gv_keysize <= tmp_gvkey->top);
-				while (*gvkey_char_ptr)
-				{
-						/* get next subscript (in GT.M internal subsc format) */
-					subsc_len = 0;
-					tmp_ptr = src_buff;
-					while (*gvkey_char_ptr)
-						*tmp_ptr++ = *gvkey_char_ptr++;
-					subsc_len = tmp_ptr - src_buff;
-					src_buff[subsc_len] = '\0';
-					if (extr_collseq)
-					{
-						/* undo the extract time collation */
-						TREF(transform) = TRUE;
-						save_gv_target_collseq = gv_target->collseq;
-						gv_target->collseq = extr_collseq;
-					} else
-						TREF(transform) = FALSE;
-						/* convert the subscript to string format */
-					opstr.addr = dest_buff;
-					opstr.len = MAX_ZWR_KEY_SZ;
-					end_buff = gvsub2str(src_buff, &opstr, FALSE);
-						/* transform the string to the current subsc format */
-					TREF(transform) = TRUE;
-					tmp_mval.mvtype = MV_STR;
-					tmp_mval.str.addr = (char *)dest_buff;
-					tmp_mval.str.len = end_buff - dest_buff;
-					tmp_gvkey->prev = 0;
-					tmp_gvkey->end = 0;
-					if (extr_collseq)
-						gv_target->collseq = save_gv_target_collseq;
-					mval2subsc(&tmp_mval, tmp_gvkey, gvnh_reg->gd_reg->std_null_coll);
-					/* we now have the correctly transformed subscript */
-					tmp_key_ptr = gv_currkey->base + gv_currkey->end;
-					memcpy(tmp_key_ptr, tmp_gvkey->base, tmp_gvkey->end + 1);
-					gv_currkey->prev = gv_currkey->end;
-					gv_currkey->end += tmp_gvkey->end;
-					gvkey_char_ptr++;
-				}
-			}
-			if (gv_currkey->end >= max_key)
-			{
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT, 2, rec_count, global_key_count);
-				mu_gvis();
-				util_out_print(0, TRUE);
-				continue;
-			}
-			v.str.addr = cp1;
-			v.str.len = rec_len - (cp1 - (unsigned char *)rp);
-			if (max_data_len < v.str.len)
-				max_data_len = v.str.len;
-			/* The below macro finishes the task of GV_BIND_NAME_AND_ROOT_SEARCH
-			 * (e.g. setting gv_cur_region for spanning globals).
-			 */
-			GV_BIND_SUBSNAME_IF_GVSPAN(gvnh_reg, gd_header, gv_currkey, dummy_reg);
-			op_gvput(&v);
-			if (mupip_error_occurred)
-			{
-				if (!mupip_DB_full)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT, 2, rec_count, global_key_count);
-					util_out_print(0, TRUE);
-				}
-				break;
-			}
-			key_count++;
-			global_key_count++;
-		}
-	}
-	free(tmp_gvkey);
-	lib$revert();
-	status = sys$close(infab);
-	if (RMS$_NORMAL != status)
-	{
-		lib$signal(status);
-		mupip_error_occurred = TRUE;
-	}
-	mu_load_stat(max_data_len, max_subsc_len, key_count, key_count ? (rec_count - 1) : 0, ERR_BLKCNT);
-	if (mupip_error_occurred)
-		lib$signal(ERR_LOADABORT, 1, rec_count - 1);
-	if (mu_ctrly_occurred)
-		lib$signal(ERR_LOADCTRLY);
-	free(inrab->rab$l_ubf);
-}
diff --git a/sr_vvms/bt_que_refresh.c b/sr_vvms/bt_que_refresh.c
deleted file mode 100644
index 0bcdbb1..0000000
--- a/sr_vvms/bt_que_refresh.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "wcs_recover.h"
-
-void bt_que_refresh(gd_region *greg)
-{
-	sgmnt_addrs *cs;
-	bt_rec *que_base, *que_top, *p;
-	int 	i;
-
-	cs = &FILE_INFO(greg)->s_addrs;
-	i = 0;
-	for (que_base = cs->bt_header, que_top = que_base + cs->hdr->bt_buckets + 1; que_base < que_top ; que_base++)
-	{
-		assert(que_base->blk == BT_QUEHEAD);
-		for (p = (bt_rec *) ((char *) que_base + que_base->blkque.fl) ; p != que_base ;
-			p = (bt_rec *) ((char *) p + p->blkque.fl))
-		{
-			if (i++ > cs->hdr->n_bts)
-			{	wcs_recover(greg);
-				return;
-			}
-			if ((int4)p & 3)
-			{	wcs_recover(greg);
-				return;
-			}
-			p->cache_index = CR_NOTVALID;
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/build_print_stage.com b/sr_vvms/build_print_stage.com
deleted file mode 100644
index 1d47c4a..0000000
--- a/sr_vvms/build_print_stage.com
+++ /dev/null
@@ -1,20 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! build_print_stage.com - prints the current time and stage of the build with appropriate indentation
-$!
-$! p1 - string indicating the stage
-$! p2 - string indicating "begin" or "end" or "middle" (they get 0 2 and 4 spaces indentation respectively)
-$!
-$  time_stamp = f$time()
-$  if (p2 .eqs. "begin")  then write sys$output "    ''time_stamp' --> BEGIN ''p1'"
-$  if (p2 .eqs. "middle") then write sys$output "    ''time_stamp' -->   ''p1'"
-$! if (p2 .eqs. "end")    then write sys$output "    ''time_stamp' -->    END ''p1'"
diff --git a/sr_vvms/buildaux.com b/sr_vvms/buildaux.com
deleted file mode 100644
index 95ac3e4..0000000
--- a/sr_vvms/buildaux.com
+++ /dev/null
@@ -1,420 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2013 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildaux - build auxiliary utilities
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!	p4 = optional auxillary to build ("gde", "dse", "mupip", "lke", "lmu", "gtmstop",
-$!						"cmi", "gtcm_server", "gtcm_stop", "ibi_xfm", "ddp", "dbcertify")
-$!		(if none specified, will build all auxillaries)
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ lnkimg=f$locate(p2,"PBD")
-$ if (f$length(p2) .ne. 1) .or. (lnkimg .eq. 3)
-$ then
-$	write sys$output "Library must be P, B or D"
-$	exit
-$ endif
-$!
-$ if p3 .eqs. ""
-$ then
-$	write sys$output "Must specify a target directory for the .exe files"
-$	exit
-$ endif
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$ @gtm$tools:build_print_stage "buildaux" "begin"
-$!
-$! ---------- buildaux set linker options -----------
-$!
-$ lnkopt = f$element(lnkimg,",","/notrace,/debug,/debug")
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ if alpha then lnkopt = lnkopt + "/section"
-$!
-$! ---------- buildaux determine set of auxillaries to build -----------
-$!
-$ if p4 .eqs. ""
-$ then
-$	buildaux_gde        = "yes"
-$	buildaux_dse        = "yes"
-$	buildaux_mupip      = "yes"
-$	buildaux_lke        = "yes"
-$	buildaux_lmu        = "yes"
-$	buildaux_gtmstop    = "yes"
-$	buildaux_cmi        = "yes"
-$	buildaux_gtcm_server= "yes"
-$	buildaux_gtcm_stop  = "yes"
-$	buildaux_ibi_xfm    = "yes"
-$	buildaux_ddp        = "yes"
-$	buildaux_dbcertify  = "yes"
-$ else
-$	buildaux_gde        = ""
-$	buildaux_dse        = ""
-$	buildaux_mupip      = ""
-$	buildaux_lke        = ""
-$	buildaux_lmu        = ""
-$	buildaux_gtmstop    = ""
-$	buildaux_cmi        = ""
-$	buildaux_gtcm_server= ""
-$	buildaux_gtcm_stop  = ""
-$	buildaux_ibi_xfm    = ""
-$	buildaux_ddp        = ""
-$	buildaux_dbcertify  = ""
-$	buildaux_'p4'       = "yes"
-$ endif
-$!
-$!  smw 2001/5/2 force no dsf debug files for now - later check axp and logical
-$ dsffiles = 0
-$!
-$ @gtm$tools:setactive_silent 'p1' 'p2'
-$ set def gtm$vrt
-$ set def gtm$exe
-$!
-$ set def [.obj]
-$ objdir = f$environment("default")
-$ set def 'p3'
-$ targdir = f$environment("default")
-$ set def [.map]
-$ mapfile = f$environment("default")
-$ set def [-]
-$!
-$! ---------- buildaux prepare options for the linker in .opt files -----------
-$!
-$ open/write relnam release_name.opt
-$ write relnam "ident=",p1
-$ close relnam
-$!
-$! Because the linker creates image sections on a per-cluster
-$! basis, create a cluster for all of the code Psect's (whose
-$! pages can be shared among processes) and collect all of the
-$! code Psect's into it so the pages corresponding to that image
-$! section can be shared.  Note the MACRO/MIGRATION compiler
-$! names its code Psect "$CODE" (as do most of the VAX compilers),
-$! while the AXP C compiler and MACRO assembler name their code
-$! Psect's "$CODE$".
-$ open/write clusnam cluster.opt
-$ write clusnam "cluster = literal_clust"
-$ write clusnam "collect = literal_clust,GTM$LITERALS"
-$ write clusnam "cluster = code_clust"
-$ write clusnam "collect = code_clust,GTM$CODE,$CODE,$CODE$"
-$ close clusnam
-$!
-$ open/write secshrlink secshrlink.opt
-$ if ("" .eqs. f$trnlnm("gtm_no_secshr")) .or. (p2 .nes. "P")
-$ then
-$ 	write secshrlink "gtm$pro:gtmsecshr.exe/share"
-$ endif
-$ close secshrlink
-$!
-$! ---------- buildaux gde -----------
-$!
-$ if (buildaux_gde .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building GDE" "middle"
-$!
-$!	use production images to compile GDE*.M and other GT.M utilities
-$	@gtm$tools:setactive_silent 'p1' p
-$	set def [.obj]
-$!
-$	set command gtm$src:GTMCOMMANDS.CLDX	! define MUMPS command if .cldx file present
-$	mumps gtm$src:gde*.m
-$	gtm_library /replace mumps gde*.obj
-$	gtm_delete gde*.obj;*
-$!
-$	gtm_copy gtm$src:lclcol.mpt []_lclcol.m
-$	mumps _lclcol
-$	gtm_library /replace mumps _lclcol.obj
-$	gtm_delete _lclcol.m;,_lclcol.obj;
-$!
-$	gtm_copy gtm$src:patcode.mpt []_patcode.m
-$	mumps _patcode
-$	gtm_library /replace mumps _patcode.obj
-$	gtm_delete _patcode.m;,_patcode.obj;
-$!
-$	set def [-]
-$	@gtm$tools:setactive_silent 'p1' 'p2' ! revert back to currently building image
-$!
-$	xtra = "," + f$parse(f$search("gtm$src:gde*.msg"),,,"NAME")
-$	set noon
-$	search/nooutput gtm$src:gde.m patcode
-$	if $severity .eq. 1 then $ xtra = xtra + ",_patcode"
-$	set on
-$	gdedsf = ""
-$	if dsffiles then gdedsf = "/dsf=gde.dsf"
-$	define/user gdeobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'gde.map/full/exe='targdir'gde.exe'lnkopt' 'gdedsf' gdeobj/incl=(gde'xtra'),sys$input/opt,target:cluster.opt/opt,target:release_name.opt/opt  ! BYPASSOK
-gdeobj/incl=(_lclcol,gdeadd,gdechang,gdetempl,gdedelet,gdeexit,gdeget,gdemsgin)
-gdeobj/incl=(gdehelp,gdesetgd,gdeinit,gdelocks,gdelog,gdemap,gdeparse,gdeput,gdequit)
-gdeobj/incl=(gderenam,gdescan,gdeshow,gdespawn,gdeverif)
-SYMBOL=GTM$CTRLC_ENABLE,0
-name  = GDE.EXE
-$ endif
-$!
-$! ---------- buildaux dse -----------
-$!
-$ if (buildaux_dse .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building DSE" "middle"
-$	dsedsf = ""
-$	if dsffiles then dsedsf = "/dsf=dse.dsf"
-$	define/user dseobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'dse.map/full/cross/exe='targdir'dse.exe'lnkopt' 'dsedsf' dseobj/libr/incl=dse,target:secshrlink.opt/opt,target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = DSE.EXE
-$ endif
-$!
-$! ---------- buildaux mupip -----------
-$!
-$ if (buildaux_mupip .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building MUPIP" "middle"
-$	mupipdsf = ""
-$	if dsffiles then mupipdsf = "/dsf=mupip.dsf"
-$	define/user mupipobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'mupip.map/full/cross/exe='targdir'mupip.exe'lnkopt' 'mupipdsf' mupipobj/libr/incl=mupip,target:secshrlink.opt/opt,target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = MUPIP.EXE
-$ endif
-$!
-$! ---------- buildaux dbcertify -----------
-$!
-$ if (buildaux_dbcertify .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building DBCERTIFY" "middle"
-$	dbcertifydsf = ""
-$	if dsffiles then dbcertifydsf = "/dsf=dbcertify.dsf"
-$	define/user dbcertifyobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'dbcertify.map/full/cross/exe='targdir'dbcertify.exe'lnkopt' 'dbcertifydsf' dbcertifyobj/libr/incl=dbcertify,target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = DBCERTIFY.EXE
-$ endif
-$!
-$! ---------- buildaux lke -----------
-$!
-$ if (buildaux_lke .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building LKE" "middle"
-$	lkedsf = ""
-$	if dsffiles then lkedsf = "/dsf=lke.dsf"
-$	define/user lkeobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'lke.map/full/exe='targdir'lke.exe'lnkopt' 'lkedsf' lkeobj/libr/incl=lke,target:secshrlink.opt/opt,target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = LKE.EXE
-$ endif
-$!
-$! ---------- buildaux lmu if not NOLICENSE in mdef.h -----------
-$!
-$ if (buildaux_lmu .nes. "")
-$ then
-$	search/nooutput gtm$src:mdef.h nolicense
-$	if $severity .ne. 1
-$	then
-$		@gtm$tools:build_print_stage "Building LMU" "middle"
-$		define/user lmuobj 'objdir'mumps.olb
-$		define/user target 'targdir'
-$		link/map='mapfile'lmu.map/full/exe='targdir'lmu.exe'lnkopt' lmuobj/libr/incl=lmu,target:secshrlink.opt/opt,target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = LMU.EXE
-$	endif
-$ endif
-$!
-$! ---------- skip gtmstop and cmi building for "minimal_build" -----------
-$!
-$ minimal = f$trnlnm("minimal_build")
-$ if (minimal .nes. "")
-$ then
-$ 	goto minimal_build_skip
-$ endif
-$!
-$! ---------- buildaux gtmstop -----------
-$!
-$ if (buildaux_gtmstop .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building GTM$STOP" "middle"
-$!
-$!	use production images to compile GTMSTOP.M
-$	@gtm$tools:setactive_silent 'p1' p
-$	set def [.obj]
-$	set command gtm$src:GTMCOMMANDS.CLDX	! define MUMPS command if .cldx file present
-$	mumps gtm$src:gtmstop.m
-$	gtm_library /replace mumps gtmstop.obj
-$	gtm_delete gtmstop.obj;
-$	set def [-]
-$	@gtm$tools:setactive_silent 'p1' 'p2' ! revert back to currently building image
-$!
-$	gtmstopdsf = ""
-$	if dsffiles then gtmstopdsf = "/dsf=gtm$stop.dsf"
-$	define/user gtmstopobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/exe=gtm$stop.exe/map='mapfile'gtm$stop.map/full 'gtmstopdsf' gtmstopobj/incl=(gtmstop,gtmstopzc,merrors),sys$input/opt,target:cluster.opt/opt,target:release_name.opt/opt  ! BYPASSOK
-gtm$vrt:[pct]_dh.obj,_do.obj,_exp.obj,_st.obj
-name = GTM$STOP.EXE
-$ endif
-$!
-$! ---------- buildaux cmishr -----------
-$!
-$ if (buildaux_cmi .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building CMISHR" "middle"
-$	@gtm$tools:cmicom 'p1' 'p2' 'objdir'
-$	xtra = f$element(alpha,",","/incl=cmivector,")
-$	cmilink = "cmilink." + f$element(alpha,",","vax,axp")
-$	cmidsf = ""
-$	if dsffiles then cmidsf = "/dsf=cmishr.dsf"
-$	define/user cmiobj 'objdir'cmi.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'cmishr.map/full/share='targdir'cmishr.exe'lnkopt' 'cmidsf' cmiobj/libr'xtra',gtm$tools:'cmilink'/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = CMISHR.EXE
-$	set security/protect=(o:rwed,s:rwed,g:re,w:re) 'targdir'cmishr.exe
-$	if p2 .eqs. "P"
-$	then
-$		gtm_copy 'targdir'cmishr.exe 'targdir''p1'_cmishr.exe
-$		curpriv=f$setprv("sysprv")
-$		gtm_copy/protect=(o:rwed,s:rwed,g:re,w:re) 'targdir'cmishr.exe gtm$sec:'p1'_cmishr.exe
-$		curpriv=f$setprv(curpriv)
-$		set security/protect=(o:rwed,s:rwed,g:re,w:re) 'targdir''p1'_cmishr.exe
-$	endif
-$ endif
-$!
-$! ---------- buildaux gtcm_server -----------
-$!
-$ if (buildaux_gtcm_server .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building GTCM_SERVER" "middle"
-$	gtcmsrvdsf = ""
-$	if dsffiles then gtcmsrvdsf = "/dsf=gtcm_server.dsf"
-$	define/user gtcmobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'gtcm_server.map/full/exe='targdir'gtcm_server.exe'lnkopt' 'gtcmsrvdsf' gtcmobj/libr/incl=gtcm_server,target:secshrlink.opt/opt,target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = GTCM_SERVER.EXE
-$ endif
-$!
-$! ---------- buildaux gtcm_stop -----------
-$!
-$ if (buildaux_gtcm_stop .nes. "")
-$ then
-$	@gtm$tools:build_print_stage "Building GTCM_STOP" "middle"
-$!
-$!	use production images to compile GTCMSTOP.M
-$	@gtm$tools:setactive_silent 'p1' p
-$	set def [.obj]
-$	set command gtm$src:GTMCOMMANDS.CLDX	! define MUMPS command if .cldx file present
-$	mumps gtm$src:gtcmstop.m
-$	gtm_library /replace mumps gtcmstop.obj
-$	gtm_delete gtcmstop.obj;
-$	set def [-]
-$	@gtm$tools:setactive_silent 'p1' 'p2' ! revert back to currently building image
-$!
-$	gtcmstpdsf = ""
-$	if dsffiles then gtcmstpdsf = "/dsf=gtcm_stop.dsf"
-$	define/user gtcmstopobj 'objdir'mumps.olb
-$	define/user target 'targdir'
-$	link/map='mapfile'gtcm_stop.map/full/exe='targdir'gtcm_stop.exe gtcmstopobj/incl=(gtcmstop,gtmstopzc,merrors),target:cluster.opt/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-gtm$vrt:[pct]_dh.obj,_exp.obj
-name = GTCM_STOP.EXE
-$ endif
-$!
-$! ---------- buildaux ibi_xfm -----------
-$!
-$ if (buildaux_ibi_xfm .nes. "")
-$ then
-$	set noon
-$	define/user sys$error nl:
-$	define/user sys$output nl:
-$	gtm_library/extract=dsm_api_vector/output=nl: 'objdir'mumps.olb
-$	severity = $severity
-$	set on
-$	if severity .eq. 1
-$	then
-$		@gtm$tools:build_print_stage "Building IBI_XFM" "middle"
-$		define/user ibiobj 'objdir'mumps.olb
-$		define/user target 'targdir'
-$		link/share='targdir'ibi_xfm.exe/map='mapfile'ibi_xfm.map/full ibiobj/libr/incl=dsm_api_vector,sys$input/opt,target:cluster.opt/opt,target:release_name.opt/opt  ! BYPASSOK
-GTMSHR/SHARE
-GSMATCH=LEQ,4,0
-name=DSM$SHARE
-$	endif
-$ endif
-$!
-$! ---------- buildaux ddpserver, ddpgvusr and gtcmddpstop -----------
-$!
-$ if (buildaux_ddp .nes. "")
-$ then
-$	set noon
-$	define/user sys$error nl:
-$	define/user sys$output nl:
-$	gtm_library/extract=ddpserver/output=nl: 'objdir'mumps.olb
-$	severity = $severity
-$	set on
-$	if severity .eq. 1
-$	then
-$		@gtm$tools:build_print_stage "Building DDPSERVER" "middle"
-$		define/user ddpobj 'objdir'mumps.olb
-$		define/user target 'targdir'
-$		link/map='mapfile'ddpserver.map/full/exe='targdir'ddpserver.exe'lnkopt' ddpobj/libr/incl=ddpserver,sys$input/opt,target:cluster.opt/opt,target:release_name.opt/opt  ! BYPASSOK
-gtmshr/share
-gtmsecshr/share
-name = DDPSERVER.EXE
-$		@gtm$tools:build_print_stage "Building DDPGVUSR" "middle"
-$		ddplink ="ddplink." + f$element(alpha,",","vax,axp")
-$		define/user ddpobj 'objdir'mumps.olb
-$		define/user target 'targdir'
-$		link/share='targdir'ddpgvusr.exe'lnkopt'/map='mapfile'DDPGVUSR.MAP/full ddpobj/incl=(DDPGVUSR),gtm$tools:'ddplink'/opt,sys$input/opt,target:release_name.opt/opt  ! BYPASSOK
-name = DDPGVUSR.EXE
-$		if p2 .eqs. "P"
-$		then
-$			@gtm$tools:build_print_stage "Building GTCMDDPSTOP" "middle"
-$!
-$			set def [.obj]
-$			set command gtm$src:GTMCOMMANDS.CLDX	! define MUMPS command if .cldx file present
-$!
-$			mumps gtm$src:stpimg.m
-$			gtm_library /replace mumps stpimg.obj
-$			gtm_delete stpimg.obj;
-$!
-$			mumps gtm$src:pid.m
-$			gtm_library /replace mumps pid.obj
-$			gtm_delete pid.obj;
-$!
-$			set def [-]
-$!
-$			define/user ddpobj 'objdir'mumps.olb
-$			define/user target 'targdir'
-$			link/exe='targdir'gtcmddpstop.exe/map='mapfile'gtcmddpstop.map/full ddpobj/incl=(stpimg),sys$input/opt,target:cluster.opt/opt,target:release_name.opt/opt  ! BYPASSOK
-ddpobj/incl=(pid,gtmstopzc,merrors)
-gtm$vrt:[pct]_dh.obj,_exp.obj
-SYMBOL=GTM$CTRLC_ENABLE,0
-name = GTCMDDPSTOP.EXE
-$		endif
-$	endif
-$ endif
-$!
-$! ---------- buildaux end -----------
-$!
-$minimal_build_skip:
-$ gtm_delete cluster.opt;*,release_name.opt;*,secshrlink.opt;*
-$ if p4 .eqs. ""
-$ then
-$	gtm_purge
-$	gtm_purge [.map]*.*
-$ endif
-$ set security/protect=(o:rwed,s:rwed,g:re,w:re) *.exe
-$ @gtm$tools:build_print_stage "buildaux" "end"
-$!
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/buildbta.com b/sr_vvms/buildbta.com
deleted file mode 100644
index d9ad026..0000000
--- a/sr_vvms/buildbta.com
+++ /dev/null
@@ -1,47 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildbta.com - build bta images p1=version number; p2 = VMS version for libraries
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ old = 0
-$ vmsver = f$extract(1,3,f$getsyi("version")) - "."
-$ if (f$extract(0,1,p2) .eqs. "V") .and. (f$extract(1,2,p2) .nes. vmsver)
-$  then
-$   old = 1
-$   @gtm$tools:define-old-library-logicals 'p2'
-$ endif
-$ @gtm$tools:buildshr 'p1' b gtm$root:['p1'.bta]
-$ if f$search("gtm$vrt:[pct]_dh.obj") .eqs. "" then @gtm$tools:movempt 'p1'
-$ @gtm$tools:buildaux 'p1' b gtm$root:['p1'.bta]
-$!
-$ minimal = f$trnlnm("minimal_build")
-$ if (minimal .eqs. "")
-$ then
-$	@gtm$tools:buildtcx 'p1' b gtm$root:['p1'.bta]
-$ endif
-$ if (f$getsyi("arch_name") .eqs. "Alpha") then $ @gtm$tools:srm_check gtm$root:['p1'.bta]
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$!
-$! libr/out=gtm$vrt:[bta.obj]xref.lis/cross gtm$vrt:[bta.obj]mumps
-$ gtm_purge gtm$vrt:[bta.obj]
-$ set prot=w:re gtm$vrt:[bta]*.exe
-$ set prot=w:r gtm$vrt:[bta]*.olb
-$ if old then $ @gtm$tools:define-old-library-logicals remove
-$!
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/buildcm.com b/sr_vvms/buildcm.com
deleted file mode 100644
index dff5145..0000000
--- a/sr_vvms/buildcm.com
+++ /dev/null
@@ -1,20 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildcm - build gtcm_server, cmishr and gtcm_stop
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "cmi"
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "gtcm_server"
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "gtcm_stop"
diff --git a/sr_vvms/buildcmi.com b/sr_vvms/buildcmi.com
deleted file mode 100644
index 511f31a..0000000
--- a/sr_vvms/buildcmi.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildcmi - build cmishr
-$!	This uses an existing library and does not purge
-$!	p1 = version number
-$!	p2 = library (p, b, or d)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' cmi
diff --git a/sr_vvms/builddbcertify.com b/sr_vvms/builddbcertify.com
deleted file mode 100644
index 2061ca8..0000000
--- a/sr_vvms/builddbcertify.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2005 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! builddbcertify - build a dbcertify
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "dbcertify"
diff --git a/sr_vvms/builddbg.com b/sr_vvms/builddbg.com
deleted file mode 100644
index 8264766..0000000
--- a/sr_vvms/builddbg.com
+++ /dev/null
@@ -1,32 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! builddbg.com build dbg images - p1 = version number; p2 = VMS version for libraries
-$!
-$ if p1 .eqs. "" then $exit
-$ old = 0
-$ vmsver = f$extract(1,3,f$getsyi("version")) - "."
-$ if (f$extract(0,1,p2) .eqs. "V") .and. (f$extract(1,2,p2) .nes. vmsver)
-$  then
-$   old = 1
-$   @gtm$tools:define-old-library-logicals 'p2'
-$ endif
-$ @gtm$tools:buildshr 'p1' d gtm$root:['p1'.dbg]
-$ @gtm$tools:buildaux 'p1' d gtm$root:['p1'.dbg]
-$!
-$ minimal = f$trnlnm("minimal_build")
-$ if (minimal .eqs. "")
-$ then
-$	@gtm$tools:buildtcx 'p1' d gtm$root:['p1'.dbg]
-$ endif
-$ if (f$getsyi("arch_name") .eqs. "Alpha") then $ @gtm$tools:srm_check gtm$root:['p1'.dbg]
-$ if old then $ @gtm$tools:define-old-library-logicals remove
-$ exit
diff --git a/sr_vvms/buildddp.com b/sr_vvms/buildddp.com
deleted file mode 100644
index 3eccd74..0000000
--- a/sr_vvms/buildddp.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildaux - build utilties
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "ddp"
diff --git a/sr_vvms/builddse.com b/sr_vvms/builddse.com
deleted file mode 100644
index d1c9aa3..0000000
--- a/sr_vvms/builddse.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! builddse - build dse
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "dse"
diff --git a/sr_vvms/buildgde.com b/sr_vvms/buildgde.com
deleted file mode 100644
index 551ea01..0000000
--- a/sr_vvms/buildgde.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildgde - build gde
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "gde"
diff --git a/sr_vvms/buildhlp.com b/sr_vvms/buildhlp.com
deleted file mode 100644
index 2b76318..0000000
--- a/sr_vvms/buildhlp.com
+++ /dev/null
@@ -1,43 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildhlp.com - build help files
-$!
-$ if p1 .eqs. "" then $exit
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$ @gtm$tools:build_print_stage "buildhlp" "begin"
-$ @gtm$tools:setactive_silent 'p1' b
-$ set def gtm$help
-$!
-$ @gtm$tools:build_print_stage "Creating *.hlb files" "middle"
-$ gtm_library/create=(block:25,key:60)/help dse
-$ gtm_library/help dse gtm$src:dse
-$ gtm_library/create=(block:25,key:60)/help LKE
-$ gtm_library/help LKE gtm$src:LKE
-$ gtm_library/create=(block:25,key:60)/help mupip.hlb
-$ gtm_library/help mupip.hlb gtm$src:mupip
-$ gtm_library/create=(block:25,key:60)/help gde
-$ gtm_library/help gde gtm$src:gde
-$ gtm_library/create=(block:25,key:60)/help cce
-$ gtm_library/help cce gtm$src:cce
-$ gtm_library/create=(block:25,key:60)/help la
-$ gtm_library/help la gtm$src:la
-$ gtm_library/create=(block:25,key:60)/help lmu
-$ gtm_library/help lmu gtm$src:lmu
-$ gtm_library/create=(block:25,keysize:60)/help mumps
-$ gtm_library/help mumps gtm$src:mumps
-$ gtm_purge
-$ set prot=w:r *.hlb
-$ set def gtm$ver
-$!
-$ @gtm$tools:build_print_stage "buildhlp" "end"
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/buildlke.com b/sr_vvms/buildlke.com
deleted file mode 100644
index ca7fd14..0000000
--- a/sr_vvms/buildlke.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildlke - build an lke
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "lke"
diff --git a/sr_vvms/buildmapdb.com b/sr_vvms/buildmapdb.com
deleted file mode 100644
index d3b50ed..0000000
--- a/sr_vvms/buildmapdb.com
+++ /dev/null
@@ -1,78 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! -----------------------------------------------------------------------------------------------------------
-$!	This utility builds a database out of each *.map file created in gtm$map.
-$!	The database is named mapdb.dat with its global directory mapdb.gld both in gtm$map.
-$! -----------------------------------------------------------------------------------------------------------
-$ if (f$trnlnm("gtm$map") .eqs. "")
-$ then
-$	write sys$output "Logical gtm$map not defined. Exiting..."
-$	exit
-$ endif
-$!
-$ define sys$output nl:
-$ define sys$error  nl:
-$ savegbldir = f$trnlnm("gtm$gbldir")
-$ savepwd = f$environment("default")
-$ set def gtm$map
-$ curpwd = f$environment("default")
-$ delete/log mapdb.gld.*
-$ delete/log mapdb.dat.*
-$ define gtm$gbldir gtm$map:mapdb.gld
-$!
-$ open/write outfile mapdbtmp.com
-$ write outfile "change /seg $DEFAULT /file=''curpwd'mapdb.dat"
-$ write outfile "change /seg $DEFAULT /allocation=200"
-$ close outfile
-$ gde
- at mapdbtmp.com
-exit
-$ delete/log mapdbtmp.com.*
-$!
-$ mupip create
-$!
-$ delete/log mapdb.m.*
-$ delete/log mapdb.obj.*
-$maploop:
-$ mapfile = f$search("*.map")
-$ if (mapfile .eqs. "") then goto end_maploop
-$ imagename = f$parse(mapfile,,,"NAME")
-$ if (imagename .eqs. "IPCRM") then goto maploop
-$ if (imagename .eqs. "MCOMPILE") then goto maploop
-$ if (imagename .eqs. "GTM$DMOD") then goto maploop
-$ if (imagename .eqs. "GTM$STOP") then goto maploop
-$ if (imagename .eqs. "GTCM_STOP") then goto maploop
-$ if (imagename .eqs. "CRASHANDBURN") then goto maploop
-$ if (imagename .eqs. "GTCMDDPSTOP") then goto maploop
-$ if (imagename .eqs. "CCP") then goto maploop
-$ deassign sys$output
-$ write sys$output "  --> Building in gtm$map:mapdb.dat : global ^''imagename'"
-$ define sys$output nl:
-$ gawk /input=gtm$tools:mapdb.awk /var=("image=''imagename'") 'mapfile' /out=mapdb.m
-$ gtm
-if $e($zv,6,9)]"V4.0" d ^mapdb  quit
-; versions <= V4.0 complain mapdb.m has too many literals. so we xecute all contents of mapdb.m instead
-set file="mapdb.m" open file use file read str
-for  quit:str=""  xecute str  read str
-$ mumps gtm$src:mapoff.m
-$ purge mapoff.obj
-$ delete/log gtm$obj:*.lis.*/excl=xref.lis
-$ delete/log mapdb.m.*
-$ delete/log mapdb.obj.*
-$ goto maploop
-$!
-$end_maploop:
-$ define gtm$gbldir 'savegbldir'
-$ deassign sys$output
-$ deassign sys$error
-$ set def 'savepwd'
-$!
diff --git a/sr_vvms/buildmupip.com b/sr_vvms/buildmupip.com
deleted file mode 100644
index 6e5d085..0000000
--- a/sr_vvms/buildmupip.com
+++ /dev/null
@@ -1,18 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildmupip - build a mupip
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ @gtm$tools:buildaux 'p1' 'p2' 'p3' "mupip"
diff --git a/sr_vvms/buildpro.com b/sr_vvms/buildpro.com
deleted file mode 100644
index 91ee3c4..0000000
--- a/sr_vvms/buildpro.com
+++ /dev/null
@@ -1,64 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildpro.com - build pro images p1 = version number; p2 = VMS version for libraries
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ old = 0
-$ vmsver = f$extract(1,3,f$getsyi("version")) - "."
-$ if (f$extract(0,1,p2) .eqs. "V") .and. (f$extract(1,2,p2) .nes. vmsver)
-$  then
-$   old = 1
-$   @gtm$tools:define-old-library-logicals 'p2'
-$ endif
-$ @gtm$tools:buildsec 'p1' p gtm$root:['p1'.pro]
-$ @gtm$tools:buildshr 'p1' p gtm$root:['p1'.pro]
-$ @gtm$tools:movempt 'p1'
-$ @gtm$tools:buildaux 'p1' p gtm$root:['p1'.pro]
-$!
-$ minimal = f$trnlnm("minimal_build")
-$ if (minimal .eqs. "")
-$ then
-$	@gtm$tools:buildtcx 'p1' p gtm$root:['p1'.pro]
-$ endif
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$!
-$ if (f$getsyi("arch_name") .eqs. "Alpha") then $ @gtm$tools:srm_check gtm$root:['p1'.pro]
-$ dir/nohead/notrail/ver=1/out=gtm$root:['p1']src.txt gtm$src
-$ gtm_purge gtm$root:['p1']src.txt
-$ set def gtm$root:['p1'.pro]
-$ gtm_copy gtm$src:gtmcommands.cldx []gtmcommands.cld
-$ gtm_copy gtm$src:gtm$defaults.* gtm$vrt:[tls]
-$ gtm_purge gtm$vrt:[tls]
-$ gtm_library/create=(block:25)/macro gtmzcall
-$ gtm_library/macro gtmzcall gtm$src:gtmzcall.max
-$ set noon
-$ gtm_library/extract=mumps_binding/output=mumps_binding.max gtm$vrt:[pro.obj]maclib.mlb
-$ if $severity .eq. 1
-$  then
-$   gtm_library/macro gtmzcall mumps_binding.max
-$   gtm_delete mumps_binding.max.
-$ endif
-$ gtm_library/out=gtm$vrt:[pro.obj]xref.lis/cross gtm$vrt:[pro.obj]mumps
-$ set def gtm$pro
-$ gtm_purge gtm$root:['p1'.pro]
-$ set prot=w:re gtm$vrt:[pro]*.exe
-$ set prot=w:r gtm$vrt:[pro]*.olb
-$ if old then $ @gtm$tools:define-old-library-logicals remove
-$!
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/buildsec.com b/sr_vvms/buildsec.com
deleted file mode 100644
index 6f220ad..0000000
--- a/sr_vvms/buildsec.com
+++ /dev/null
@@ -1,130 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2013 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildsec - build gtmsecshr
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ lnkimg=f$locate(p2,"PBD")
-$ if (f$length(p2) .ne. 1) .or. (lnkimg .eq. 3)
-$ then
-$	write sys$output "Library must be P, B or D"
-$	exit
-$ endif
-$!
-$ if p3 .eqs. ""
-$ then
-$	write sys$output "Must specify a target directory for the .exe files"
-$	exit
-$ endif
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$ @gtm$tools:build_print_stage "buildsec" "begin"
-$!
-$! ---------- set linker options -----------
-$!
-$ lnkopt = ""
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ if alpha then lnkopt = lnkopt + "/section"
-$!
-$! smw 2001/5/2 force no dsf files for now - later check axp and logical
-$ dsffiles = 0
-$!
-$ @gtm$tools:setactive_silent 'p1' 'p2'
-$ set def 'p3'
-$ targdir = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def gtm$vrt
-$ set def gtm$exe
-$ if f$search("gtmshr.olb") .eqs. "" then gtm_library/create gtmshr.olb
-$ if f$search("gtmlib.olb") .eqs. "" then gtm_library/create gtmlib.olb
-$ set def [.obj]
-$ objdir = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ define/nolog obd 'objdir'mumps.olb	! used by secshrlink.axp
-$ define/nolog urd 'objdir'user_rundown.obj
-$ gtm_library /extract=user_rundown /out=user_rundown mumps.olb
-$ set def 'targdir'
-$ set def [.map]
-$ mapfile = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def [-]
-$!
-$! ---------- prepare options for the linker in .opt files -----------
-$!
-$ open/write relnam release_name.opt
-$ write relnam "ident=",p1
-$ close relnam
-$!
-$! ---------- build gtmsecshr -----------
-$!
-$ @gtm$tools:build_print_stage "Building GTMSECSHR" "middle"
-$ secshrlink = "secshrlink." + f$element(alpha,",","vax,axp")
-$ gtmsecshrdsf = ""
-$ if dsffiles then gtmsecshrdsf = "/dsf=gtmsecshr.dsf"
-$ define/user target 'targdir'
-$ link /protect/notrace/share='targdir'gtmsecshr.exe 'gtmsecshrdsf' 'lnkopt' -
-       /map='mapfile'gtmsecshr.map/full gtm$tools:'secshrlink'/opt,sys$input/opt,target:release_name.opt/opt
-name = GTMSECSHR.EXE
-$ set prot=(o:rewd,s:rewd,g:re,w:re) 'targdir'gtmsecshr.exe
-$!
-$! ---------- build crashandburn -----------
-$!
-$ @gtm$tools:build_print_stage "Building CRASHANDBURN" "middle"
-$ ccopts := /standard=vaxc/share_globals/float=g_float/warn=disable=(signedknown,signedmember,questcompare,questcompare1)
-$ ccopts = ccopts + "/inc=(gtm$src:,tcpip$examples:)/assume=nowritable_string_literals/nolist/define=(TEST_REPL"
-$ if "P" .nes. f$edit(f$extract(0, 1, p2), "UPCASE") then $ ccopts = ccopts + ",DEBUG"
-$ ccopts = ccopts + ")"
-$ if "D" .eqs. f$edit(f$extract(0, 1, p2), "UPCASE") then $ ccopts = ccopts + "/nooptimize/debug"
-$ cc'ccopts'/object=urd gtm$src:USER_RUNDOWN.C
-$ define/user target 'targdir'
-$ link /protect/notrace/share='targdir'crashandburn.exe 'lnkopt' -
-       /map='mapfile'crashandburn.map/full gtm$tools:'secshrlink'/opt,sys$input/opt,target:release_name.opt/opt
-name = CRASHANDBURN.EXE
-$ if (f$parse(targdir,,,,"NO_CONCEAL") - "][") .eqs. (f$parse("GTM$ROOT:[" + P1 + ".PRO]",,,,"NO_CONCEAL") - "][")
-$  then
-$   newsec = p1 + "_gtmsecshr.exe"
-$   newburn = p1 + "_crashandburn.exe"
-$   gtm_copy gtmsecshr.exe 'newsec'
-$   gtm_copy crashandburn.exe 'newburn'
-$   if dsffiles
-$   then
-$     newdsf = p1 + "_gtmsecshr.dsf"
-$     gtm_copy gtmsecshr.dsf 'newdsf'
-$   endif
-$   curpriv=f$setprv("bypas")
-$   gtm_copy 'newsec' gtm$sec:
-$   curpriv=f$setprv(curpriv)
-$   curpriv=f$setprv("cmkrnl")
-$   install replace/header/share/protect/open gtm$sec:'newsec'
-$
-$!  install remove older version 'p1'_crashandburn.exe in case it was previously installed
-$   define/user sys$output nl:
-$   define/user sys$error  nl:
-$   install remove gtm$root:['p1'.pro]'newburn'
-$
-$   curpriv=f$setprv(curpriv)
-$   newsec = newsec + ","
-$  else
-$   newsec :=
-$ endif
-$ gtm_delete 'f$trnlnm("urd").
-$!
-$! pur/log 'targdir''newsec'gtmsecshr.exe,'mapfile'gtmsecshr.map
-$!
-$ @gtm$tools:build_print_stage "buildsec" "end"
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/buildshr.com b/sr_vvms/buildshr.com
deleted file mode 100644
index 17b25fd..0000000
--- a/sr_vvms/buildshr.com
+++ /dev/null
@@ -1,208 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2012 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildshr - build a shareable image
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ lnkimg=f$locate(p2,"PBD")
-$ if (f$length(p2) .ne. 1) .or. (lnkimg .eq. 3)
-$ then
-$	write sys$output "Library must be P, B or D"
-$	exit
-$ endif
-$!
-$ if p3 .eqs. ""
-$ then
-$	write sys$output "Must specify a target directory for the .exe files"
-$	exit
-$ endif
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$ @gtm$tools:build_print_stage "buildshr" "begin"
-$!
-$! ---------- buildshr set linker options -----------
-$!
-$ lnkopt = f$element(lnkimg,",","/notrace,/debug,/debug")
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ if alpha then lnkopt = lnkopt + "/section"
-$!
-$! smw 2001/5/2 force no dsf files for now - later check axp and logical
-$ dsffiles = 0
-$!
-$ @gtm$tools:setactive_silent 'p1' 'p2'
-$ set def gtm$vrt
-$ set def gtm$exe
-$ if f$search("gtmshr.olb") .eqs. "" then gtm_library/create gtmshr.olb
-$ if f$search("gtmlib.olb") .eqs. "" then gtm_library/create gtmlib.olb
-$ set def 'p3'
-$ targdir = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def gtm$vrt
-$ set def gtm$exe
-$ set def [.obj]
-$ objdir = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def 'targdir'
-$ set def [.map]
-$ mapfile = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def [-]
-$!
-$! ---------- buildshr prepare options for the linker in .opt files -----------
-$!
-$ open/write relnam release_name.opt
-$ write relnam "ident=",p1
-$ close relnam
-$!
-$ open/write secshrlink secshrlink.opt
-$ if ("" .eqs. f$trnlnm("gtm_no_secshr")) .or. (p2 .nes. "P")
-$ then
-$ 	write secshrlink "gtm$pro:gtmsecshr.exe/share"
-$ endif
-$ close secshrlink
-$!
-$! ---------- buildshr gtmshr (after determining filler) -----------
-$!
-$ fillname = ""
-$!
-$ if (lnkimg .eq. 0) .and. ((f$extract(0,2,p1) .nes. "V9") .or. (p1 .eqs. "V999"))	! keep the pro image size stable
-$ then
-$   @gtm$tools:build_print_stage "Building template GTMSHR" "middle"
-$   @gtm$tools:linkshr 'targdir' 'objdir' 'lnkopt'/share=nl:/map=sizemap.tmp/brief ""
-$   search/out=temp.tmp sizemap.tmp "virtual memory allocated"
-$   if 1 .ne. $severity
-$    then
-$     write sys$output "%GTM-F-BUILDCHK, Check map (sizemap.tmp) format"
-$     @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$     exit
-$   endif
-$   open/read temp temp.tmp
-$   read temp a
-$   close temp
-$   x = f$locate(",",a) + 1
-$   a = f$extract(x,99,a)
-$   image_size = f$extract(1,f$locate(".",a)-1,a)
-$   if 0 .eq. f$integer(image_size)
-$    then
-$     write sys$output "%GTM-F-BUILDCHK, Check map (sizemap.tmp) virtual memory pages"
-$     @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$     exit
-$   endif
-$   gtm_delete temp.tmp;*,sizemap.tmp;*
-$   if alpha
-$     then
-$!	Note: pages are 512 bytes
-$       page_target = 6000
-$       if f$extract(1,4,p1) .eqs. "60FT" .or. f$extract(1,4,p1) .eqs. "60BL"
-$	    then
-$		if f$extract(5,2,p1) .lts. "09" then $ page_target = 5120
-$	endif
-$       if f$extract(1,5,p1) .les. "60000" then $ page_target = 5120
-$       if f$extract(1,2,p1) .lts. "43" then $ page_target = 4000
-$     else
-$       page_target = 2000
-$       if f$extract(0,3,p1) .eqs. "V42" then $ page_target = 1600
-$       if f$extract(0,3,p1) .eqs. "V40" then $ page_target = 1200
-$       if f$extract(0,3,p1) .eqs. "V32" then $ page_target = 1200
-$       if f$extract(0,3,p1) .eqs. "V31" then $ page_target = 1000
-$       if f$extract(0,2,p1) .eqs. "V2" then $ page_target = 950
-$   endif
-$   if image_size .lt. page_target
-$    then
-$     fillname = "gtmfiller." + f$element(alpha,",","mar,m64")
-$     create 'fillname'
-	.title	gtmfiller - patch & expansion space
-	.psect	gtmfiller,con,nord,noexe,nowrt,pic,shr,gbl
-$     open/append fill 'fillname'
-$     write fill "page_target = ",page_target
-$     write fill "actual_pages = ",image_size
-$     write fill "	.blkb	<page_target - actual_pages> * 512"
-$     write fill "	.end"
-$     close fill
-$     if f$environment("VERIFY_PROCEDURE") then write sys$output "[BUILDSHR-I-IMAGESIZE Actual size ",image_size," pages]"
-$     qual = f$element(alpha,",",",/alpha")
-$     fillname := gtmfiller
-$     macro'qual'/nolist gtmfiller
-$   else
-$     write sys$output "%BUILDSHR-W-IMAGESIZE Image size (",image_size,") is greater than target size of ",page_target
-$   endif
-$ endif
-$!
-$ @gtm$tools:build_print_stage "Building real GTMSHR" "middle"
-$ gtmshrdsf = ""
-$ if dsffiles then gtmshrdsf = "/dsf=gtmshr.dsf"
-$ @gtm$tools:linkshr 'targdir' 'objdir' 'lnkopt'/symb='mapfile'gtmshr.stb/share=gtmshr.exe/map='mapfile'gtmshr.map/full'gtmshrdsf' 'fillname'
-$ if fillname .nes. "" then $ gtm_delete gtmfiller.obj;*,gtmfiller.m%%;*
-$!
-$! ---------- buildshr mcompile -----------
-$!
-$ @gtm$tools:build_print_stage "Building MCOMPILE" "middle"
-$ define/user objlib 'objdir'mumps.olb
-$ define/user target 'targdir'
-$ set def 'targdir'
-$ mcompdsf = ""
-$ if dsffiles then mcompdsf = "/dsf=mcompile.dsf"
-$ link/exe=mcompile.exe/map=[.map]mcompile.map/full'lnkopt' 'mcompdsf' objlib/incl=mcompile,sys$input/opt,target:release_name/opt
-stack = 256
-name = MCOMPILE.EXE
-target:gtmshr.exe/share
-$!
-$! ---------- buildshr create gtmshr.olb and gtmlib.olb -----------
-$!
-$ @gtm$tools:build_print_stage "Creating GTMSHR.OLB and GTMLIB.OLB" "middle"
-$ gtm_library/create=(block:5,hist:0,modu:3,glob:10)/share gtmshr.olb
-$ gtm_library gtmshr.olb gtmshr.exe
-$ gtm_library/create=(block:5,hist:0,modu:3,glob:10) gtmlib.olb
-$ gtm_library/extract=(gtm_main,gtm$defaults,gtmi$def)/out=gtm_main 'objdir'mumps
-$ gtm_library gtmlib.olb gtm_main.obj
-$ set noon
-$ gtm_library/extract=gtm_zc/out=gtm_zc 'objdir'mumps
-$ severity = $severity
-$ set on
-$ if severity .eq. 1
-$  then
-$   gtm_library gtmlib.olb gtm_zc
-$   gtm_delete gtm_zc.obj;*
-$ endif
-$!
-$! ---------- buildshr gtm$dmod -----------
-$!
-$ @gtm$tools:build_print_stage "Building GTM$DMOD" "middle"
-$!
-$! use production images to compile GTM$DMOD.M
-$ @gtm$tools:setactive_silent 'p1' p
-$ set def [.obj]
-$ set command gtm$src:GTMCOMMANDS.CLDX	! define MUMPS command if .cldx file present
-$ mumps gtm$src:gtm$dmod.m
-$ gtm_library /replace mumps gtm$dmod.obj
-$ gtm_delete gtm$dmod.obj;
-$ set def [-]
-$ @gtm$tools:setactive_silent 'p1' 'p2' ! revert back to currently building image
-$!
-$ dmoddsf = ""
-$ if dsffiles then dmoddsf = "/dsf=gtm$dmod.dsf"
-$ define/user target 'targdir'
-$ link/map=[.map]gtm$dmod.map/full/exe=gtm$dmod.exe'lnkopt' 'dmoddsf' 'objdir'mumps/includ=gtm$dmod,sys$input/opt,target:release_name/opt
-name = GTM$DMOD.EXE
-$!
-$! ---------- buildshr end -----------
-$!
-$ gtm_delete gtm_main.obj.*,release_name.opt;*,secshrlink.opt;*
-$ @gtm$tools:build_print_stage "buildshr" "end"
-$!
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/buildtcx.com b/sr_vvms/buildtcx.com
deleted file mode 100644
index 84f704c..0000000
--- a/sr_vvms/buildtcx.com
+++ /dev/null
@@ -1,93 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! buildtcx - build gt.cx
-$! parameters:
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ lnkimg=f$locate(p2,"PBD")
-$ if (f$length(p2) .ne. 1) .or. (lnkimg .eq. 3)
-$ then
-$	write sys$output "Library must be P, B or D"
-$	exit
-$ endif
-$!
-$ if p3 .eqs. ""
-$ then
-$	write sys$output "Must specify a target directory for the .exe files"
-$	exit
-$ endif
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$ @gtm$tools:build_print_stage "buildtcx" "begin"
-$!
-$! ---------- buildtcx set linker options -----------
-$!
-$ lnkopt = f$element(lnkimg,",","/notrace,/debug,/debug")
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ if alpha then lnkopt = lnkopt + "/section"
-$!
-$ @gtm$tools:setactive_silent 'p1' 'p2'
-$ set def 'p3'
-$ targdir = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def gtm$vrt
-$ set def gtm$exe
-$ set def [.obj]
-$ objdir = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def 'targdir'
-$ set def [.map]
-$ mapfile = f$parse("*.*",,,"device")+f$parse("*.*",,,"directory")
-$ set def [-]
-$!
-$! ---------- buildtcx prepare options for the linker in .opt files -----------
-$!
-$ open/write relnam release_name.opt
-$ write relnam "ident=",p1
-$ close relnam
-$!
-$ open/write secshrlink secshrlink.opt
-$ if ("" .eqs. f$trnlnm("gtm_no_secshr")) .or. (p2 .nes. "P")
-$ then
-$ 	write secshrlink "gtm$pro:gtmsecshr.exe/share"
-$ endif
-$ close secshrlink
-$!
-$! ---------- buildtcx ccp -----------
-$!
-$ @gtm$tools:build_print_stage "Building CCP" "middle"
-$ define/user target 'targdir'
-$ link/map='mapfile'CCP.map/exe='targdir'CCP.exe'lnkopt' 'objdir'mumps/lib/inc=CCP,sys$input/opt,target:secshrlink.opt/opt,target:release_name.opt/opt
-name = CCP.EXE
-$!
-$! ---------- buildtcx cce -----------
-$!
-$ @gtm$tools:build_print_stage "Building CCE" "middle"
-$ define/user target 'targdir'
-$ link/map='mapfile'CCE.map/exe='targdir'CCE.exe'lnkopt' 'objdir'mumps/lib/inc=CCE,sys$input/opt,target:secshrlink.opt/opt,target:release_name.opt/opt
-name = CCE.EXE
-$!
-$! ---------- buildtcx end -----------
-$!
-$ gtm_purge
-$ gtm_purge [.map]*.*
-$ gtm_delete release_name.opt;*,secshrlink.opt;*
-$!
-$ @gtm$tools:build_print_stage "buildtcx" "end"
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/cce.c b/sr_vvms/cce.c
deleted file mode 100644
index c946352..0000000
--- a/sr_vvms/cce.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <climsgdef.h>
-#include <descrip.h>
-#include <rmsdef.h>
-
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "getjobnum.h"
-#include "dfntmpmbx.h"
-#include "get_page_size.h"
-#include "gtm_env_init.h"     /* for gtm_env_init() prototype */
-#include "gtm_threadgbl_init.h"
-
-GBLDEF	uint4	ret_status = 1;
-
-static bool cce_done;
-
-cce()
-{
-	$DESCRIPTOR(prompt,"CCE> ");
-	int status;
-	char buff[512];
-	$DESCRIPTOR(command,buff);
-	unsigned short outlen;
-	mstr	lnm$group = {9, "LNM$GROUP"};
-	int CCE_CMD(), CLI$DCL_PARSE(), CLI$DISPATCH();
-	DCL_THREADGBL_ACCESS;
-
-	GTM_THREADGBL_INIT;			/* This is the first C routine in the cce so do init here */
-	gtm_env_init();	/* read in all environment variables before any function call (particularly malloc) */
-	getjobnum();
-	get_page_size();
-	dfntmpmbx (lnm$group.len, lnm$group.addr);
-	status = lib$get_foreign(&command,0,&outlen,0);
-	if ((status & 1) && outlen > 0)
-	{	command.dsc$w_length = outlen;
-		status = CLI$DCL_PARSE(&command ,&CCE_CMD, &lib$get_input, 0, 0);
-		if (status == CLI$_NORMAL)
-			CLI$DISPATCH();
-	}else
-	{	while (!cce_done)
-		{
-			status = CLI$DCL_PARSE(0 ,&CCE_CMD, &lib$get_input
-			, &lib$get_input, &prompt);
-			if (status == RMS$_EOF)
-				cce_done = TRUE;
-			else if (status == CLI$_NORMAL)
-			     {
-				ret_status = 1;
-				CLI$DISPATCH();
-			     }
-		}
-	}
-	return ret_status;
-}
-
-void cce_stop()
-{
-
-	ccp_sendmsg(CCTR_STOP, 0);
-	return;
-}
-
-void cce_debug()
-{
-
-	ccp_sendmsg(CCTR_DEBUG, 0);
-	return;
-}
-
-void cce_exit()
-{
-	cce_done = TRUE;
-	return;
-}
diff --git a/sr_vvms/cce.hlp b/sr_vvms/cce.hlp
deleted file mode 100644
index 1c6b751..0000000
--- a/sr_vvms/cce.hlp
+++ /dev/null
@@ -1,253 +0,0 @@
-
-1 Overview
- Overview
-   The principle components of GT.CX  are  the  CCP  and  the  utility
-   program,   CCE.   The  CCE  examines  and  changes  conditions  for
-   clustered operation.  Use the CCE to:
-
-    o  Change database files to and from clustered operation
-    o  Control the time processes will wait without reporting an error
-       for access to clustered files
-    o  Examine the status of files, locks and the CCP
-    o  Stop the CCP
-
-2 Use of CCE
- Use of CCE
-   CCE prompts for all  required  information.   Use  HELP  to  invoke
-   online information about CCE.  SET FILE /CLUSTER to change a new or
-   previously non-clustered file to  clustered  operation.   SET  FILE
-   /NORESPONSE  to  make cluster access failures hang processes rather
-   than giving  errors.   STOP  the  CCP  when  terminating  clustered
-   operation.  When the CCE session is complete, EXIT.
-1 Commands
- Commands
-   CCE commands can be entered at the CCE> prompt or as parameters  to
-   the CCE command when CCE is defined as a foreign command.
-
-   Example:
-
-   $ CCE
-   CCE> STOP
-   CCE>
-
-   or
-
-   $ CCE STOP
-   $
-
-   CCE commands, command parameters and qualifiers may be  abbreviated
-   using  enough  characters  from  the  beginning  of  the command to
-   unambiguously identify the keyword.  CCE  keywords  can  always  be
-   abbreviated  to  4  characters  or  less.  The description for each
-   command identifies the current minimum abbreviations by showing the
-   optional part of the keyword in square brackets ([]).
-1 EXIT
- E[XIT]
-   The EXIT command terminates an CCE session.   The  syntax  for  the
-   EXIT command is:
-
-       E[XIT]
-
-   Example:
-
-   CCE> EXIT
-   $
-
-1 HELP
- H[ELP]
-   The HELP command displays online information about CCE commands and
-   qualifiers,  using  the  VMS help facility.  HELP takes an optional
-   parameter which specifies a topic on which you desire  help.   Exit
-   from HELP by entering <RET> enough times to leave all nested levels
-   or by entering <CTRL Z>.  The syntax for the HELP command is:
-
-       H[ELP] [topic]
-
-   Example:
-
-   CCE> HELP SET
-
-   This command would display help on the SET command.
-1 QUIT
- Q[UIT]
-   The QUIT command is synonymous with the EXIT command and terminates
-   CCE.  The syntax for the QUIT command is:
-
-       Q[UIT]
-
-1 SET
- SE[T]
-   The SET command changes clustering characteristics.  The syntax for
-   the SET command is:
-
-       SE[T] F[ILE] file-spec set-file-qualifier
-
-   SET FILE makes a file clustered or non-clustered and/or alters  the
-   cluster  timers.   The  set-file-qualifiers determine the exact SET
-   FILE action
-
-   Several set-file-qualifiers have time  arguments  which  share  the
-   following characteristics:
-    o  they accept a VMS delta-time.
-    o  the maximum time accepted is 00:59:59.99.  Because  the  format
-       is hh:mm:ss, normally it is specified as 00:00:ss.
-    o  if no argument is supplied, the default value is reestablished.
-
-2 /CLUSTER
- /C[LUSTER]
-   The /CLUSTER qualifier controls whether a file is non-clustered  or
-   clustered.  The syntax for the CLUSTER qualifier is:
-
-       /[NO]C[LUSTER]
-
-   In order for SET FILE/[NO]CLUSTER to  successfully  switch  a  file
-   between  modes  of  operation, the file must be quiescent, i.e.  no
-   process may currently be accessing the file.
-
-   A clustered file is open to all members of the cluster  which  have
-   active  CCPs.   A non-clustered file is restricted to access by the
-   first node of the cluster to open the file.  Only databases with BG
-   access  method  can  be clustered.  When files are created by MUPIP
-   CREATE they are non-clustered.
-2 /QUANTUM_INTERVAL
- /QUANTUM_INTERVAL
-   The /QUANTUM_INTERVAL should only be changed on  instructions  from
-   Greystone.  The syntax for the /QUANTUM_INTERVAL qualifier is:
-
-       /Q[UANTUM_INTERVAL]=delta-time
-
-2 /RESPONSE_INTERVAL
- /RESPONSE_INTERVAL
-   The /RESPONSE_INTERVAL qualifier controls how long a  GT.M  process
-   will  wait  for  a response from the CCP before reporting an error.
-   The syntax for the /RESPONSE_INTERVAL qualifier is:
-
-       /[NO]R[ESPONSE_INTERVAL]=delta-time
-
-   If a member  of  the  cluster  has  a  capacity  problem  seriously
-   affecting  response  time,  increasing  the  RESPONSE_INTERVAL  may
-   prevent database timeout errors.
-
-   If a database cannot be accessed within the RESPONSE_INTERVAL,  the
-   default  error  handling  strategy  is  to  inform  the application
-   program with an error.  The application program may then notify the
-   user  and/or  operator  and retry or halt.  /NORESPONSE_INTERVAL or
-   RESPONSE_INTERVAL=0 permit the alternate approach of suspending the
-   application  program  until the problem is resolved by an operator.
-   In this case CCP operator messages or stalling of  normal  activity
-   are relied upon to signal the error.
-
-   The default RESPONSE_INTERVAL is 1 minute.
-2 /STALE_INTERVAL
- /STALE_INTERVAL
-   The /STALE_INTERVAL qualifier controls how long  a  cluster  member
-   not  active  in  updating the file may operate before verifying any
-   local  copies  of  database  information.   The  syntax   for   the
-   /STALE_INTERVAL qualifier is:
-
-       /[NO]S[TALE_INTERVAL]=delta-time
-
-   Increasing the STALE_INTERVAL may slightly reduce system overhead.
-
-   A cluster member updating a file or LOCKing a name mapped to a file
-   is  forced  to constantly verify synchronization with that file.  A
-   cluster member exclusively reading a file is allowed to have  local
-   copies  of  database  information  which  may  not be current.  The
-   STALE_INTERVAL controls how "out of date" local copies can be.
-
-   /NOSTALE_INTERVAL or  /STALE_INTERVAL=0  turns  off  the  staleness
-   timer.   This is appropriate only if all cluster members constantly
-   mix reads and writes or if a cluster member exclusively reading can
-   function properly using perceptibly out of date information.
-
-   The default STALE_INTERVAL is 5 seconds.
-2 /TICK_INTERVAL
- /TICK_INTERVAL
-   The /TICK_INTERVAL should only  be  changed  on  instructions  from
-   Greystone.  The syntax for the /TICK_INTERVAL qualifier is:
-
-       /T[ICK_INTERVAL]=delta-time
-
-2 Examples
- Examples
-
-   CCE>SET FILE MUMPS.DAT/CLUSTER/STALE=00:00:10
-
-   This command would make the file MUMPS.DAT clustered and change the
-   STALE_TIMER to 10 seconds.
-
-   CCE>SET FILE TEMP.DAT/NOCLUSTER
-
-   This command would make the file TEMP.DAT non-clustered.
-1 SHOW
- SH[OW]
-   The SHOW command displays information on locks, database  files  or
-   CCP activity.  The syntax for the SHOW command is:
-
-   SH[OW] C[CP] | F[ILE] file-spec 
-          | L[OCKS] | T[RANSACTIONS] [ /O[UT]=file-spec ] 
-
-2 CCP
- C[CP]
-   SHOW CCP displays the status  of  the  CCP  for  the  node  in  the
-   cluster.   If  a  CCP  is  running  and the CCE user has the SYSLCK
-   privilege, this command reports the PID of the  CCP  and  how  many
-   processes are accessing clustered databases.
-
-   Example:
-
-   CCE>SHOW CCP
-
-   %GTM-I-CCENOCCP, The cluster control program is not running on this
-   node
-
-2 FILE
- F[ILE]
-   SHOW FILE displays the clustering status of a database  file.   The
-   status  includes  whether  the  file  is  clustered  and  the timer
-   intervals for that file.
-
-   Example:
-
-   CCE>SHOW FILE MUMPS.DAT
-
-   Database file MUMPS.DAT is a cluster database
-   STALE_INTERVAL      00:00:05.00                    
-   RESPONSE_INTERVAL   00:01:00.00                    
-   QUANTUM_INTERVAL    00:00:01.00                    
-   TICK_INTERVAL       00:00:00.10                    
-
-2 LOCKS
- L[OCKS]
-   SHOW LOCKS displays the VMS locks used by GT.CX  and  GT.M  on  the
-   node.   SHOW  LOCKS does not display locks the CCE process does not
-   have privileges to examine.  The meaning of the lock display is not
-   documented  for  the user and this command is intended for use only
-   under the direction of Greystone.
-2 TRANSACTIONS
- T[RANSACTIONS]
-   SHOW TRANSACTIONS displays the 100 most recent  CCP  actions.   The
-   meaning  of  the transaction display is not documented for the user
-   and this command is intended for use only under  the  direction  of
-   Greystone.
-2 /OUT
- /O[UT]
-   SHOW LOCKS and SHOW TRANSACTIONS accept  the  /OUT=  qualifier  for
-   directing the display to a file.  By default the output is directed
-   to SYS$OUTPUT.
-1 STOP
- ST[OP]
-   The  STOP  command  terminates  the  Cluster  Control  Program  and
-   therefore  all  access  from this node to clustered databases.  The
-   syntax for the STOP command is:
-
-       ST[OP]
-
-   If possible, use this command after  application  procedures  cause
-   all processes to drop their interest in the clustered file(s).
-
-   Example:
-
-   CCE>STOP
-
-   This command would stop the CCP.
diff --git a/sr_vvms/cce_ccp.c b/sr_vvms/cce_ccp.c
deleted file mode 100644
index 7576491..0000000
--- a/sr_vvms/cce_ccp.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <prvdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <dvidef.h>
-#include <jpidef.h>
-#include <efndef.h>
-
-#include "vmsdtype.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-GBLREF	uint4	ret_status;
-
-cce_ccp()
-{
-	struct
-	{
-		item_list_3	item[2];
-		int4		terminator;
-	} item_list;
-	uint4		status;
-	char			out_str[15];
-	$DESCRIPTOR(out_desc,out_str);
-	unsigned short		out_len;
-	short			dvisb[4];
-	int4			refnum, pid, pidadr;
-	short			dummy;
-	int4			prvadr[2], prvprv[2];
-	int4			iosb[2];
-	short ccp_channel;
-	error_def(ERR_CCENOCCP);
-	error_def(ERR_CCECCPPID);
-	error_def(ERR_CCECLSTPRCS);
-	error_def(ERR_CCENOWORLD);
-	error_def(ERR_CCENOGROUP);
-
-	lib$establish(cce_ccp_ch);
-	ccp_channel = ccp_sendmsg(CCTR_NULL,0);
-	lib$revert();
-	if (!ccp_channel)
-	{
-		ret_status = ERR_CCENOCCP;
-		lib$signal(ERR_CCENOCCP);
-		return;
-	}
-	prvadr[0] = PRV$M_WORLD;
-	prvadr[1] = 0;
-	status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-	if (status != SS$_NORMAL)
-	{	lib$signal(ERR_CCENOWORLD);
-		prvadr[0] = PRV$M_GROUP;
-		prvadr[1] = 0;
-		status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-		if (status != SS$_NORMAL)
-		{	lib$signal(ERR_CCENOGROUP);
-		}
-	}
-	item_list.item[0].buffer_length		= SIZEOF(pid);
-	item_list.item[0].buffer_address	= &pid;
-	item_list.item[0].item_code		= JPI$_PID;
-	item_list.item[0].return_length_address = &dummy;
-	item_list.item[1].buffer_length		= 15;
-	item_list.item[1].buffer_address	= out_str;
-	item_list.item[1].item_code		= JPI$_PRCNAM;
-	item_list.item[1].return_length_address = &out_len;
-	item_list.terminator = 0;
-	pidadr = -1;
-	for (; ;)
-	{	status = sys$getjpiw(EFN$C_ENF,&pidadr,0,&item_list,&iosb,0,0);
-		if (status == SS$_NORMAL && out_len == (SIZEOF(CCP_PRC_NAME) - 1)
-				&& memcmp(&out_str[0],CCP_PRC_NAME,(SIZEOF(CCP_PRC_NAME) - 1)) == 0)
-		{	lib$signal(ERR_CCECCPPID,1,pid);
-			break;
-		}
-		if (status == SS$_NOMOREPROC)
-			break;
-	}
-	refnum = 0;
-	memset(&item_list, 0, SIZEOF(item_list));
-	item_list.item[0].buffer_length		= SIZEOF(refnum);
-	item_list.item[0].buffer_address	= &refnum;
-	item_list.item[0].item_code		= DVI$_REFCNT;
-	item_list.item[0].return_length_address = &dummy;
-	status = sys$getdviw (0, ccp_channel, 0, &item_list, &dvisb, 0, 0, 0);
-	if (status != SS$_NORMAL)
-	{	lib$signal(status);
-		if (prvprv[0] & prvadr[0] == 0)
-		{	sys$setprv(FALSE, &prvadr[0], FALSE, 0);
-		}
-		return;
-	}
-	if (pid)
-	{	lib$signal(ERR_CCECLSTPRCS,1,refnum - 2);
-	}else
-	{	lib$signal(ERR_CCECLSTPRCS,1,refnum - 1);
-	}
-	if (prvprv[0] & prvadr[0] == 0)
-	{	sys$setprv(FALSE, &prvadr[0], FALSE, 0);
-	}
-	return;
-}
diff --git a/sr_vvms/cce_ccp_ch.c b/sr_vvms/cce_ccp_ch.c
deleted file mode 100644
index a25a5c0..0000000
--- a/sr_vvms/cce_ccp_ch.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-void cce_ccp_ch()
-{
-return;
-}
diff --git a/sr_vvms/cce_ccpdmp.c b/sr_vvms/cce_ccpdmp.c
deleted file mode 100644
index 4ecf64d..0000000
--- a/sr_vvms/cce_ccpdmp.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <prvdef.h>
-#include "vmsdtype.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include <jpidef.h>
-#include <efndef.h>
-
-#include "cli.h"
-
-void cce_ccpdmp(void)
-{
-
-	struct
-	{
-		item_list_3	item[2];
-		int4		terminator;
-	} item_list;
-	short		ccp_channel, dummy, out_len, iosb[4];
-	int4		prvadr[2], prvprv[2], pid, pidadr, status;
-	char		out_str[15];
-	uint4	dumpon,dumpnow;
-	int4		error;
-	error_def(ERR_CCEDUMPNOW);
-	error_def(ERR_CCEDUMPON);
-	error_def(ERR_CCEDUMPOFF);
-	error_def(ERR_CCENOCCP);
-	error_def(ERR_NOCCPPID);
-	error_def(ERR_CCEDMPQUALREQ);
-
-	if (cli_present("DB") == CLI_PRESENT)
-	{	cce_dbdump();
-		return;
-	}
-	lib$establish(cce_ccp_ch);
-	ccp_channel = ccp_sendmsg(CCTR_NULL,0);
-	lib$revert();
-	if (!ccp_channel)
-	{	rts_error(VARLSTCNT(1) ERR_CCENOCCP);
-		return;
-	}
-	dumpnow = cli_present("NOW");
-	if (dumpnow != CLI_PRESENT && ((dumpon = cli_present("ON")) != CLI_PRESENT) && (dumpon != CLI_NEGATED))
-	{	rts_error(VARLSTCNT(1) ERR_CCEDMPQUALREQ);
-		return;
-	}
-	if (dumpon == CLI_NEGATED)
-		dumpon = FALSE;
-	prvadr[0] = PRV$M_WORLD;
-	prvadr[1] = 0;
-	status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-	if (status != SS$_NORMAL)
-	{	prvadr[0] = PRV$M_GROUP;
-		prvadr[1] = 0;
-		sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-	}
-	item_list.item[0].buffer_length		= SIZEOF(pid);
-	item_list.item[0].buffer_address	= &pid;
-	item_list.item[0].item_code		= JPI$_PID;
-	item_list.item[0].return_length_address = &dummy;
-	item_list.item[1].buffer_length		= 15;
-	item_list.item[1].buffer_address	= out_str;
-	item_list.item[1].item_code		= JPI$_PRCNAM;
-	item_list.item[1].return_length_address = &out_len;
-	item_list.terminator = 0;
-	pidadr = -1;
-	for (; ;)
-	{	status = sys$getjpiw(EFN$C_ENF,&pidadr,0,&item_list,&iosb,0,0);
-		if (status == SS$_NORMAL && out_len == (SIZEOF(CCP_PRC_NAME) - 1)
-				&& memcmp(&out_str[0],CCP_PRC_NAME,(SIZEOF(CCP_PRC_NAME) - 1)) == 0)
-			break;
-		if (status == SS$_NOMOREPROC)
-		{	rts_error(VARLSTCNT(1) ERR_NOCCPPID);
-			return;
-		}
-	}
-	if (dumpnow == CLI_PRESENT)
-		error = ERR_CCEDUMPNOW;
-	else if (dumpon == CLI_PRESENT)
-		error = ERR_CCEDUMPON;
-	else
-		error = ERR_CCEDUMPOFF;
-	status = sys$forcex(&pid,0,error);
-	if (status != SS$_NORMAL)
-	{	rts_error(VARLSTCNT(1) status);
-		return;
-	}
-	return;
-}
diff --git a/sr_vvms/cce_cluster.c b/sr_vvms/cce_cluster.c
deleted file mode 100644
index f74fcaa..0000000
--- a/sr_vvms/cce_cluster.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdsblk.h"
-#include <rmsdef.h>
-#include <fab.h>
-#include <xab.h>
-#include <ssdef.h>
-#include <iodef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include <efndef.h>
-#include "cli.h"
-
-#include "filestruct.h"
-#include "util.h"
-#include "timers.h"
-#include "dbcx_ref.h"
-
-void cce_cluster(void )
-{
-	enum db_ver		database;
-	char			fn[256];
-	struct FAB  		ccpfab;
-	struct XABFHC		xab;
-	sgmnt_data		*old_data, *dummy_data;
-	short			iosb[4];
-	unsigned short		fn_len;
-	int4			status, size, cluster, space_needed;
-	error_def(ERR_CCERDERR);
-	error_def(ERR_CCEWRTERR);
-	error_def(ERR_CCEDBCL);
-	error_def(ERR_CCEDBNTCL);
-	error_def(ERR_CCEBADFN);
-	error_def(ERR_DBOPNERR);
-	error_def(ERR_DBNOTGDS);
-	error_def(ERR_BADDBVER);
-	error_def(ERR_CCEBGONLY);
-	$DESCRIPTOR(cluster_qualifier, "CLUSTER");
-
-	fn_len = SIZEOF(fn);
-	if (!cli_get_str("FILE",fn,&fn_len))
-	{
-		lib$signal(ERR_CCEBADFN);
-		return;
-	}
-	ccpfab = cc$rms_fab;
-	ccpfab.fab$l_fna = fn;
-	ccpfab.fab$b_fns = fn_len;
-	ccpfab.fab$b_fac = FAB$M_BIO | FAB$M_GET | FAB$M_PUT;
-	ccpfab.fab$l_fop = FAB$M_UFO;
-	xab = cc$rms_xabfhc;
-	ccpfab.fab$l_xab = &xab;
-	status = sys$open(&ccpfab);
-	if (status != RMS$_NORMAL)
-	{
-		lib$signal(ERR_DBOPNERR, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna, status);
-		return;
-	}
-	dummy_data = malloc(ROUND_UP(SIZEOF(sgmnt_data), OS_PAGELET_SIZE));
-	status = sys$qiow(EFN$C_ENF, ccpfab.fab$l_stv, IO$_READVBLK, iosb, 0, 0, dummy_data,
-			  ROUND_UP(SIZEOF(sgmnt_data), OS_PAGELET_SIZE), 1,0,0,0);
-	if (status & 1)
-		status = iosb[0];
-	if ((status & 1) == 0)
-	{
-		lib$signal(ERR_CCERDERR, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna, status);
-		sys$dassgn(ccpfab.fab$l_stv);
-		free(dummy_data);
-		return;
-	}
-/*
-  Commented out as this is unused code and we are removing the old version database references
-  (SE - 4/2005 V5.0)
-  if (memcmp(&dummy_data->label[0], GDS_LABEL, GDS_LABEL_SZ))
-  {	if (memcmp(&dummy_data->label[0], GDS_LABEL, GDS_LABEL_SZ - 3))
-  {	lib$signal (ERR_DBNOTGDS, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna);
-  status = sys$dassgn(ccpfab.fab$l_stv);
-  assert(status & 1);
-  free(dummy_data);
-  return;
-  }else
-  {
-  if (!memcmp(&dummy_data->label[GDS_LABEL_SZ - 3],GDS_V23,2))
-  database = v23;
-  else if (!memcmp(&dummy_data->label[GDS_LABEL_SZ - 3],GDS_V24,2))
-  database = v24;
-  else if (!memcmp(&dummy_data->label[GDS_LABEL_SZ - 3],GDS_V25,2))
-  database = v25;
-  else if (!memcmp(&dummy_data->label[GDS_LABEL_SZ - 3],GDS_V254,2))
-  database = v254;
-  else
-  lib$signal (ERR_BADDBVER, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna);
-  }
-  }
-  else
-  database = v255;
-*/
-
-	if (dummy_data->acc_meth != dba_bg)
-	{
-		lib$signal(ERR_CCEBGONLY);
-		status = sys$dassgn(ccpfab.fab$l_stv);
-		assert(status & 1);
-		free(dummy_data);
-		return;
-	}
-	size = (LOCK_BLOCK(dummy_data) * DISK_BLOCK_SIZE) + LOCK_SPACE_SIZE(dummy_data);
-	old_data = malloc(size);
-	memcpy(old_data, dummy_data, SIZEOF(sgmnt_data));
-	cluster = cli$present(&cluster_qualifier);
-	if (cluster == CLI$_NEGATED)
-		old_data->clustered = FALSE;
-	else if (cluster == CLI$_PRESENT)
-	{
-		old_data->clustered = TRUE;
-		old_data->trans_hist.lock_sequence = 0;
-	}
-	change_fhead_timer("STALE_INTERVAL", old_data->staleness, -50000000, TRUE);
-	change_fhead_timer("RESPONSE_INTERVAL",old_data->ccp_response_interval, -600000000, TRUE);
-	change_fhead_timer("QUANTUM_INTERVAL", old_data->ccp_quantum_interval, -10000000, FALSE);
-	change_fhead_timer("TICK_INTERVAL", old_data->ccp_tick_interval, -1000000, FALSE);
-	if (old_data->unbacked_cache)
-	{
-		space_needed = (old_data->n_bts + getprime(old_data->n_bts) + 1) * SIZEOF(bt_rec);
-		if (space_needed > old_data->free_space)
-		{
-			old_data->n_bts = old_data->free_space/(2*SIZEOF(bt_rec));
-			for (;;)
-			{
-				space_needed = (old_data->n_bts + getprime(old_data->n_bts) + 1) * SIZEOF(bt_rec);
-				if (space_needed <= old_data->free_space)
-				{
-					old_data->bt_buckets = getprime(old_data->n_bts);
-					break;
-				}
-				old_data->n_bts--;
-			}
-			util_out_open(0);
-			util_out_print("Only have space for !UL cache records in clustered file !AD, adjusting file",TRUE,
-				       old_data->n_bts, fn_len, fn);
-		}
-		old_data->free_space -= space_needed;
-		old_data->unbacked_cache = FALSE;
-	}
-	status = dbcx_ref(old_data, ccpfab.fab$l_stv);
-	if ((status & 1) == 0)
-		lib$signal(ERR_CCEWRTERR, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna, status);
-	if (cluster != CLI$_ABSENT)
-		lib$signal ((old_data->clustered) ? ERR_CCEDBCL : ERR_CCEDBNTCL, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna);
-	status = sys$dassgn(ccpfab.fab$l_stv);
-	assert(status & 1);
-	free(dummy_data);
-	free(old_data);
-	return;
-}
diff --git a/sr_vvms/cce_cmd.cld b/sr_vvms/cce_cmd.cld
deleted file mode 100644
index 9915c7a..0000000
--- a/sr_vvms/cce_cmd.cld
+++ /dev/null
@@ -1,110 +0,0 @@
-MODULE CCE_CMD
-
-DEFINE VERB DUMP
-	ROUTINE cce_ccpdmp
-	QUALIFIER ON
-		NEGATABLE
-	QUALIFIER NOW
-		NONNEGATABLE
-	QUALIFIER DB
-		NONNEGATABLE
-	DISALLOW ANY2(NOW,ON,DB)
-
-DEFINE VERB SET
-	PARAMETER P1
-		VALUE	(TYPE = SET_ACTIONS)
-
-DEFINE TYPE	SET_ACTIONS
-	KEYWORD FILE SYNTAX SET_FILE
-
-DEFINE SYNTAX SET_FILE
-	ROUTINE cce_cluster
-	PARAMETER P1
-		LABEL = SHOW_ACTIONS
-		VALUE(REQUIRED)
-	PARAMETER P2
-		LABEL = FILE
-		PROMPT = "File"
-		VALUE(TYPE=$FILE,REQUIRED)
-	QUALIFIER CLUSTER
-	QUALIFIER RESPONSE_INTERVAL
-		VALUE(TYPE = $DELTATIME)
-		NEGATABLE
-	QUALIFIER STALE_INTERVAL
-		VALUE(TYPE = $DELTATIME)
-		NEGATABLE
-	QUALIFIER QUANTUM_INTERVAL
-		VALUE(TYPE = $DELTATIME)
-		NONNEGATABLE
-	QUALIFIER TICK_INTERVAL
-		VALUE(TYPE = $DELTATIME)
-		NONNEGATABLE
-
-DEFINE VERB debug
-	ROUTINE cce_debug
-
-DEFINE VERB exit
-	ROUTINE cce_exit
-
-DEFINE VERB help
-	ROUTINE cce_help
-	PARAMETER P1, LABEL=QUERY
-
-DEFINE VERB quit
-	ROUTINE cce_exit
-
-DEFINE VERB SHOW
-	PARAMETER P1
-		VALUE	(TYPE = SHOW_ACTIONS)
-
-DEFINE TYPE	SHOW_ACTIONS
-	KEYWORD TRANSACTIONS SYNTAX = SHOW_TRANSACTIONS
-	KEYWORD LOCKS SYNTAX = SHOW_LOCKS
-	KEYWORD FILE SYNTAX = SHOW_FILE
-	KEYWORD CCP SYNTAX = SHOW_CCP
-
-DEFINE SYNTAX SHOW_LOCKS
-	ROUTINE cce_show_locks
-	PARAMETER P1
-		LABEL = SHOW_ACTIONS
-		VALUE(REQUIRED)
-	QUALIFIER ALL
-		NONNEGATABLE
-	QUALIFIER OUTPUT
-		VALUE (TYPE = $FILE)
-		NONNEGATABLE
-DEFINE SYNTAX SHOW_TRANSACTIONS
-	ROUTINE cce_dump
-	PARAMETER P1
-		LABEL = SHOW_ACTIONS
-		VALUE(REQUIRED)
-	QUALIFIER OUTPUT
-		VALUE (TYPE = $FILE)
-		NONNEGATABLE
-
-DEFINE SYNTAX SHOW_FILE
-	ROUTINE cce_show_file
-	PARAMETER P1
-		LABEL = SHOW_ACTIONS
-		VALUE(REQUIRED)
-	PARAMETER P2
-		LABEL = FILE
-		PROMPT = "File"
-		VALUE(TYPE=$FILE,REQUIRED)
-	QUALIFIER OUTPUT
-		VALUE (TYPE = $FILE)
-		NONNEGATABLE
-
-DEFINE SYNTAX SHOW_CCP
-	ROUTINE cce_ccp
-
-DEFINE VERB stop
-	ROUTINE cce_stop
-
-DEFINE VERB start
-	ROUTINE cce_start
-	QUALIFIER PRIORITY
-		VALUE (REQUIRED)
-		NONNEGATABLE
-
-
diff --git a/sr_vvms/cce_dbdump.c b/sr_vvms/cce_dbdump.c
deleted file mode 100644
index eebf5ab..0000000
--- a/sr_vvms/cce_dbdump.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <clidef.h>
-#include <rms.h>
-#include <iodef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <ssdef.h>
-#include <secdef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "mlkdef.h"
-#include "util.h"
-#include "mem_list.h"
-#include "cce_sec_size.h"
-#include "init_sec.h"
-#include "fid_from_sec.h"
-
-OS_PAGE_SIZE_DECLARE
-#define RECORD_SIZE	1024
-#define EXTRA_SPACE	256
-
-typedef struct
-{	unsigned short status;
-	unsigned short char_ct;
-	uint4 pid;
-}m_iosb;
-
-void cce_dbdump(void)
-{
-	uint4	channel, status, flags, pid, real_size, req_size, size, addrs[2], sec_addrs[2];
-	int		i, j, k, l;
-	gds_file_id	file;
-	m_iosb		stat_blk;
-	sgmnt_data	*sd;
-	unsigned char	mbuff[512], *c, *cptr, *ctop;
-	$DESCRIPTOR(d_sec,mbuff);
-	static readonly $DESCRIPTOR(d_cmd,"install lis/glo");
-	static readonly $DESCRIPTOR(d_mnam,"CCE$DBDUMPMBX");
-	static readonly $DESCRIPTOR(d_pnam,"CCE$DBDUMPPRC");
-	char		filename[]="SYS$LOGIN:CCE_DBDUMP.DMP", buff[RECORD_SIZE], id_lab[]=" FILE ID:";
-	struct FAB	fab;
-	struct RAB	rab;
-	error_def(ERR_CCEDBDUMP);
-	error_def(ERR_CCEDBNODUMP);
-
-
-	util_out_open(0);
-	status = sys$crembx(0, &channel, 512, 0, 0, PSL$C_USER, &d_mnam);
-	if (status != SS$_NORMAL)
-		sys$exit(status);
-	flags = CLI$M_NOWAIT | CLI$M_NOLOGNAM;
-	status = lib$spawn(&d_cmd, 0, &d_mnam, &flags, &d_pnam, &pid);
-	if (status != SS$_NORMAL)
-	{	if (status == SS$_DUPLNAM)
-		{	util_out_print("Spawned process CCE$DBDUMPPRC already exists, cannot continue rundown",TRUE);
-		}
-		sys$exit(status);
-	}
-	/* the following guess at the dump file size is modeled on the calculation for a section */
-	size = DIVIDE_ROUND_UP((SIZEOF(sgmnt_data) + (WC_MAX_BUFFS + getprime(WC_MAX_BUFFS) + 1) * SIZEOF(bt_rec)
-				+ (DEF_LOCK_SIZE / OS_PAGELET_SIZE)
-				 + (WC_MAX_BUFFS + getprime(WC_MAX_BUFFS)) * SIZEOF(cache_rec) + SIZEOF(cache_que_heads)),
-				OS_PAGELET_SIZE);
-	size += EXTRA_SPACE;
-
-	fab = cc$rms_fab;
-	fab.fab$b_fac = FAB$M_PUT;
-	fab.fab$l_fop = FAB$M_CBT | FAB$M_MXV | FAB$M_TEF;
-	fab.fab$l_fna = filename;
-	fab.fab$b_fns = SIZEOF(filename);
-	fab.fab$b_rfm = FAB$C_FIX;
-	fab.fab$w_mrs = RECORD_SIZE;
-	fab.fab$w_deq = size;
-	fab.fab$l_alq = size;
-	switch (status = sys$create(&fab))
-	{
-	case RMS$_NORMAL:
-	case RMS$_CREATED:
-	case RMS$_SUPERSEDE:
-	case RMS$_FILEPURGED:
-		break;
-	default:
-		util_out_print("Error: Cannot create dump file !AD.",TRUE,fab.fab$b_fns,fab.fab$l_fna);
-		sys$exit(status);
-	}
-
-	rab = cc$rms_rab;
-	rab.rab$l_fab = &fab;
-	status = sys$connect(&rab);
-	if (status != RMS$_NORMAL)
-	{	util_out_print("Error: Cannot connect to dump file !AD.",TRUE,fab.fab$b_fns,fab.fab$l_fna);
-		sys$exit(status);
-	}
-	rab.rab$w_rsz = SIZEOF(buff);
-
-	for (; ;)
-	{	status = sys$qiow (0, channel,IO$_READVBLK ,&stat_blk, 0, 0, mbuff, 512,0,0,0,0);
-		if (status != SS$_NORMAL)
-		{	sys$exit(status);
-			break;
-		}
-		if (stat_blk.status == SS$_ENDOFFILE)
-			break;
-		if (stat_blk.status != SS$_NORMAL)
-		{	sys$exit(stat_blk.status);
-			break;
-		}
-		if (!memcmp("GT$S",mbuff,4))
-		{	for ( c = mbuff; *c > 32 ; c++)
-				;
-			d_sec.dsc$w_length = c - mbuff;
-			flags = SEC$M_GBL | SEC$M_WRT | SEC$M_SYSGBL | SEC$M_PAGFIL | SEC$M_DZRO | SEC$M_PERM;
-			addrs[0] = addrs[1] = 0;
-			fid_from_sec(&d_sec,&file);
-
-			real_size = cce_sec_size(&file);
-			if (real_size == 0)
-				real_size = size;
-			real_size += 1;
-
-			assert(OS_PAGE_SIZE % OS_PAGELET_SIZE == 0);
-
-			/* Request enough pagelets to ensure enough contiguous pages to contain desired number of pagelets. */
-			req_size = ROUND_UP(real_size, OS_PAGE_SIZE);
-			lib$get_vm_page(&req_size, &addrs[0]);
-
-			/* addrs will hold addresses of start and end of contiguous block of pagelets for use by $deltva. */
-			assert((addrs[0] + (req_size * OS_PAGELET_SIZE) - 1) == addrs[1]);
-
-			/* $get_vm_page returns pagelets; we must align to integral page boundary. */
-			/* sec_addrs will contain the starting and ending addresses of the mapped section. */
-			sec_addrs[0] = ROUND_UP(addrs[0], OS_PAGE_SIZE);	/* align to first integral page boundary */
-			sec_addrs[1] = addrs[0] + (real_size * OS_PAGELET_SIZE);
-			sec_addrs[1] = ROUND_UP(addrs[1], OS_PAGE_SIZE) - 1;  /* A(last byte of last page) */
-
-			status = init_sec(sec_addrs, &d_sec, 0, real_size, flags);
-			if (status & 1)
-			{
-				sd = sec_addrs[0];
-				memset(buff, 0, RECORD_SIZE);
-				memcpy(buff, d_sec.dsc$a_pointer, d_sec.dsc$w_length);
-				cptr = &buff[0] + d_sec.dsc$w_length;
-				memcpy(cptr,id_lab,SIZEOF(id_lab));
-				cptr += SIZEOF(id_lab);
-				memcpy(cptr,&file,SIZEOF(file));
-				rab.rab$l_rbf = buff;
-				status = sys$put(&rab);
-				if (status != RMS$_NORMAL)
-				{	util_out_print("Error writing to dump file !AD.",TRUE,fab.fab$b_fns,fab.fab$l_fna);
-					util_out_print("Status code is !UL.",TRUE,status);
-					break;
-				}
-				for (c = sd, i = 0; (real_size + EXTRA_SPACE) >= i;
-					c += RECORD_SIZE, i += (RECORD_SIZE / DISK_BLOCK_SIZE))
-				{
-					rab.rab$l_rbf = c;
-					status = sys$put(&rab);
-					if (status != RMS$_NORMAL)
-					{	util_out_print("Error writing to dump file !AD.",TRUE,fab.fab$b_fns,fab.fab$l_fna);
-						util_out_print("Status code is !UL.",TRUE,status);
-						break;
-					}
-				}
-				lib$signal(ERR_CCEDBDUMP,2,d_sec.dsc$w_length,d_sec.dsc$a_pointer);
-			}else
-			{	lib$signal(ERR_CCEDBNODUMP,2,d_sec.dsc$w_length,d_sec.dsc$a_pointer,status,0);
-			}
-			gtm_deltva(&addrs[0],0,0);
-			lib$free_vm_page(&real_size,&addrs[0]);
-		}
-	}
-	sys$exit(SS$_NORMAL);
-}
diff --git a/sr_vvms/cce_dump.c b/sr_vvms/cce_dump.c
deleted file mode 100644
index 93c0a0b..0000000
--- a/sr_vvms/cce_dump.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "cce_output.h"
-
-void cce_dump(void)
-{
-	ccp_action_aux_value mbxname;
-
-	cce_get_return_channel(&mbxname);
-	ccp_sendmsg(CCTR_QUEDUMP, &mbxname);
-	cce_read_return_channel();
-	return;
-}
diff --git a/sr_vvms/cce_get_return_channel.c b/sr_vvms/cce_get_return_channel.c
deleted file mode 100644
index 9b9a3b5..0000000
--- a/sr_vvms/cce_get_return_channel.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include <dvidef.h>
-#include <descrip.h>
-
-GBLDEF unsigned short cce_return_channel;
-static struct dsc$descriptor_s cce_return_channel_name;
-static unsigned char cce_return_channel_name_buffer[20];
-
-void cce_get_return_channel(p)
-ccp_action_aux_value *p;
-{
-	int status;
-	int4 namlen;
-
-	if (!cce_return_channel)
-	{
-		status = sys$crembx(0, &cce_return_channel, 0,0,0,0, 0);
-		if ((status & 1) == 0)
-			lib$signal(status);
-		cce_return_channel_name.dsc$w_length = SIZEOF(cce_return_channel_name_buffer);
-		cce_return_channel_name.dsc$b_dtype = DSC$K_DTYPE_T;
-		cce_return_channel_name.dsc$b_class = DSC$K_CLASS_S;
-		cce_return_channel_name.dsc$a_pointer = cce_return_channel_name_buffer;
-		status = lib$getdvi(&DVI$_FULLDEVNAM, &cce_return_channel,0,0,&cce_return_channel_name, &namlen);
-		if ((status & 1) == 0)
-			lib$signal(status);
-		if (cce_return_channel_name.dsc$w_length > SIZEOF(p->str.txt))
-			GTMASSERT;
-		cce_return_channel_name.dsc$w_length = namlen;
-	}
-	p->str.len = cce_return_channel_name.dsc$w_length;
-	memcpy(p->str.txt, cce_return_channel_name.dsc$a_pointer, p->str.len);
-	return;
-}
diff --git a/sr_vvms/cce_help.c b/sr_vvms/cce_help.c
deleted file mode 100644
index 50a31c8..0000000
--- a/sr_vvms/cce_help.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <climsgdef.h>
-#include <descrip.h>
-
-#define HLP$M_PROMPT 1
-#define HELP_LIBRARY "GTM$HELP:CCE"
-
-void cce_help(void)
-{
-
-	uint4 flags;
-	char buff[256];
-	$DESCRIPTOR(line, buff);
-	$DESCRIPTOR(libr, HELP_LIBRARY);
-	$DESCRIPTOR(ent, "QUERY");
-
-	if (CLI$PRESENT(&ent) != CLI$_PRESENT || CLI$GET_VALUE(&ent,&line) != SS$_NORMAL)
-		line.dsc$w_length = 0;
-	flags = HLP$M_PROMPT;
-	lbr$output_help(lib$put_output,0,&line,&libr,&flags,lib$get_input);
-	return;
-
-}
diff --git a/sr_vvms/cce_output.c b/sr_vvms/cce_output.c
deleted file mode 100644
index 4f57ee3..0000000
--- a/sr_vvms/cce_output.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include <rab.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include "cce_output.h"
-
-static struct RAB *cce_output_rab = 0;
-static struct FAB *cce_output_fab = 0;
-
-void cce_out_open(void)
-{
-	uint4 status;
-	static readonly unsigned char sys_output_name[] = "SYS$OUTPUT";
-	$DESCRIPTOR(output_qualifier, "OUTPUT");
-	char output_name[255];
-	$DESCRIPTOR(output_name_desc, output_name);
-	short unsigned outnamlen;
-
-	status = cli$get_value(&output_qualifier, &output_name_desc, &outnamlen);
-	if (status != 1)
-	{
-		outnamlen = SIZEOF(sys_output_name) - 1;
-		output_name_desc.dsc$a_pointer = sys_output_name;
-	}
-	cce_output_fab = malloc(SIZEOF(*cce_output_fab));
-	cce_output_rab = malloc(SIZEOF(*cce_output_rab));
-	*cce_output_fab  = cc$rms_fab;
-	*cce_output_rab  = cc$rms_rab;
-	cce_output_rab->rab$l_fab = cce_output_fab;
-	cce_output_rab->rab$w_usz = 255;
-	cce_output_fab->fab$w_mrs = 255;
-	cce_output_fab->fab$b_fac = FAB$M_GET | FAB$M_PUT;
-	cce_output_fab->fab$b_rat = FAB$M_CR;
-	cce_output_fab->fab$l_fna = output_name_desc.dsc$a_pointer;
-	cce_output_fab->fab$b_fns = outnamlen;
-	status = sys$create(cce_output_fab, 0, 0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-	status = sys$connect(cce_output_rab, 0, 0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-}
-
-void cce_out_write( unsigned char *addr, unsigned int len)
-{
-	int status;
-
-	cce_output_rab->rab$l_rbf = addr;
-	cce_output_rab->rab$w_rsz = len;
-	status = sys$put(cce_output_rab,0 ,0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-	return;
-}
-
-void cce_out_close(void)
-{
-	sys$close(cce_output_fab, 0, 0);
-	free(cce_output_fab);
-	free(cce_output_rab);
-	cce_output_fab = 0;
-	cce_output_rab = 0;
-	return;
-}
diff --git a/sr_vvms/cce_output.h b/sr_vvms/cce_output.h
deleted file mode 100644
index e11bf79..0000000
--- a/sr_vvms/cce_output.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __CCE_OUTPUT_H__
-#define  __CCE_OUTPUT_H__
-
-void cce_out_open(void);
-void cce_out_write(unsigned char *addr, unsigned int len);
-void cce_out_close(void);
-void cce_read_return_channel(void);
-
-#endif
diff --git a/sr_vvms/cce_read_return_channel.c b/sr_vvms/cce_read_return_channel.c
deleted file mode 100644
index 93cf231..0000000
--- a/sr_vvms/cce_read_return_channel.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include <iodef.h>
-#include <ssdef.h>
-#include "efn.h"
-#include "cce_output.h"
-
-GBLREF unsigned short cce_return_channel;
-
-void cce_read_return_channel(void)
-{
-	unsigned short mbsb[4];
-	uint4 status;
-	unsigned char buff[255];
-	int4	efn_mask;
-	static uint4 time[2] = { -30000000, -1 };  /* 3 seconds */
-	error_def(ERR_CCERDTIMOUT);
-
-	cce_out_open();
-	for (;;)
-	{
-		efn_mask = (1 << efn_immed_wait | 1 << efn_timer);
-		status = sys$setimr(efn_timer,time,0,&cce_return_channel,0);
-		if ((status & 1) == 0)
-			lib$signal(status);
-		status = sys$qio(efn_immed_wait, cce_return_channel, IO$_READVBLK, &mbsb[0], 0, 0, &buff,
-							SIZEOF(buff), 0, 0, 0, 0);
-		if ((status & 1) == 0)
-			lib$signal(status);
-		if ((status = sys$wflor(efn_immed_wait,efn_mask)) != SS$_NORMAL)
-			lib$signal(status);
-		if ((status = sys$readef(efn_immed_wait, &efn_mask)) == SS$_WASSET)
-		{	sys$cantim(&cce_return_channel,0);
-	 		status = mbsb[0];
-			if (status == SS$_ENDOFFILE)
-				break;
-			if ((status & 1) == 0)
-				lib$signal(status);
-			cce_out_write(buff, mbsb[1]);
-		}else
-		{	lib$signal(ERR_CCERDTIMOUT);
-			break;
-		}
-	}
-	cce_out_close();
-	return;
-}
diff --git a/sr_vvms/cce_sec_size.c b/sr_vvms/cce_sec_size.c
deleted file mode 100644
index 99c6670..0000000
--- a/sr_vvms/cce_sec_size.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <iodef.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "cce_sec_size.h"
-
-int cce_sec_size(gds_file_id *file)
-{
-	uint4			status;
-	int			size;
-	short			iosb[4];
-	sgmnt_data		sd;
-	sgmnt_data_ptr_t	csd = &sd;
-	char			expanded_file_name[MAX_FN_LEN];
-	struct FAB		fab;
-	struct NAM		nam;
-	int			buckets;
-
-	fab = cc$rms_fab;
-	fab.fab$l_fop = FAB$M_NAM | FAB$M_UFO;
-	fab.fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_BIO;
-	fab.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-	fab.fab$l_nam = &nam;
-	nam = cc$rms_nam;
-	nam.nam$b_ess = MAX_FN_LEN;
-	nam.nam$l_esa = expanded_file_name;
-	memcpy(nam.nam$t_dvi, file->dvi,file->dvi[0] + 1);
-	memcpy(nam.nam$w_fid, file->fid, SIZEOF(file->fid));
-	status = sys$open(&fab, 0, 0);
-	if (!(status & 1))
-		return 0;
-	status = sys$qiow(EFN$C_ENF,fab.fab$l_stv, IO$_READVBLK, &iosb[0], 0,0, csd, SIZEOF(sgmnt_data), 1,0,0,0);
-	if (!(status & 1))
-		return 0;
-	buckets = getprime(sd.n_bts);
-	size = (LOCK_BLOCK(csd) * DISK_BLOCK_SIZE) + LOCK_SPACE_SIZE(csd) + CACHE_CONTROL_SIZE(csd) + NODE_LOCAL_SPACE(csd)
-			+ JNL_SHARE_SIZE(csd);
-	sys$dassgn(fab.fab$l_stv);
-	return size / OS_PAGELET_SIZE;
-}
diff --git a/sr_vvms/cce_sec_size.h b/sr_vvms/cce_sec_size.h
deleted file mode 100644
index 3b5821a..0000000
--- a/sr_vvms/cce_sec_size.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef CCE_SEC_SIZE_INCLUDED
-#define CCE_SEC_SIZE_INCLUDED
-
-int cce_sec_size(gds_file_id *file);
-
-#endif /* CCE_SEC_SIZE_INCLUDED */
diff --git a/sr_vvms/cce_show_file.c b/sr_vvms/cce_show_file.c
deleted file mode 100644
index 7f93580..0000000
--- a/sr_vvms/cce_show_file.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdsblk.h"
-#include <rmsdef.h>
-#include <fab.h>
-#include <xab.h>
-#include <ssdef.h>
-#include <iodef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include <efndef.h>
-
-#include "filestruct.h"
-#include "util.h"
-#include "cli.h"
-
-#define PUTTIM(L,T) (outbufidx = 0 , memset(outbuf, ' ', SIZEOF(outbuf)), \
-    PUTLIT(L), sys$asctim(&timlen, &time_desc, (T), 1), outbufidx = time_desc.dsc$w_length + timlen, \
-    util_out_write(outbuf, outbufidx))
-#define PUTSTR(A,L) (memcpy(&outbuf[outbufidx], (A), (L)), outbufidx += (L))
-#define PUTLIT(X) PUTSTR((X), SIZEOF(X) - 1)
-
-/* NOTE: WHY BOTH old_data and dummy_data? */
-cce_show_file()
-{
-	char			fn[256];
-	struct FAB  		ccpfab;
-	struct XABFHC		xab;
-	sgmnt_data		*old_data, *dummy_data;
-	sgmnt_addrs		*cs;
-	short			iosb[4];
-	unsigned short		fn_len;
-	short unsigned		timlen;
-	struct dsc$descriptor_s	time_desc;
-	int4			status, size, cluster;
-	unsigned char		*c;
-	unsigned char 		outbuf[80];
-	int			outbufidx;
-	$DESCRIPTOR(output_qualifier, "OUTPUT");
-	error_def(ERR_CCERDERR);
-	error_def(ERR_CCEBADFN);
-	error_def(ERR_DBOPNERR);
-	error_def(ERR_DBNOTGDS);
-	error_def(ERR_BADDBVER);
-	error_def(ERR_CCEBGONLY);
-
-	fn_len = SIZEOF(fn);
-	if (!cli_get_str("FILE",fn,&fn_len))
-	{
-		lib$signal(ERR_CCEBADFN);
-		return;
-	}
-	ccpfab = cc$rms_fab;
-	ccpfab.fab$l_fna = fn;
-	ccpfab.fab$b_fns = fn_len;
-	ccpfab.fab$b_fac = FAB$M_BIO | FAB$M_GET;
-	ccpfab.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-	ccpfab.fab$l_fop = FAB$M_UFO;
-	xab = cc$rms_xabfhc;
-	ccpfab.fab$l_xab = &xab;
-	status = sys$open(&ccpfab);
-	if (status != RMS$_NORMAL)
-	{
-		lib$signal(ERR_DBOPNERR, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna, status);
-		return;
-	}
-	dummy_data = malloc(512);
-	status = sys$qiow(EFN$C_ENF, ccpfab.fab$l_stv, IO$_READVBLK, iosb, 0, 0, dummy_data, 512, 1, 0, 0, 0);
-	if (status & 1)
-		status = iosb[0];
-	if ((status & 1) == 0)
-	{
-		lib$signal(ERR_CCERDERR, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna, status);
-		sys$dassgn(ccpfab.fab$l_stv);
-		return;
-	}
-	if (memcmp(&dummy_data->label[0], GDS_LABEL, 12))
-	{
-		if (memcmp(&dummy_data->label[0], GDS_LABEL, 9))
-			lib$signal (ERR_DBNOTGDS, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna);
-		else
-			lib$signal (ERR_BADDBVER, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna);
-		status = sys$dassgn(ccpfab.fab$l_stv);
-		assert(status & 1);
-		return;
-	}
-	if (dummy_data->acc_meth != dba_bg)
-	{
-		lib$signal(ERR_CCEBGONLY);
-		status = sys$dassgn(ccpfab.fab$l_stv);
-		assert(status & 1);
-		return;
-	}
-	size = (((SIZEOF(sgmnt_data)) + 511)/512) * 512;
-	old_data = malloc(size);
-	status = sys$qiow(EFN$C_ENF, ccpfab.fab$l_stv, IO$_READVBLK, iosb, 0, 0, old_data, size, 1, 0, 0, 0);
-	if (status & 1)
-		status = iosb[0];
-	if ((status & 1) == 0)
-	{
-		lib$signal(ERR_CCERDERR, 2, ccpfab.fab$b_fns, ccpfab.fab$l_fna, status);
-		status = sys$dassgn(ccpfab.fab$l_stv);
-		assert(status & 1);
-		return;
-	}
-	outbufidx = 0;
-	util_out_open(&output_qualifier);
-	PUTLIT("Database file ");
-	PUTSTR(fn, fn_len);
-	PUTLIT(" is ");
-	if (!old_data->clustered)
-	{
-		PUTLIT(" NOT ");
-	}
-	PUTLIT(" a cluster database");
-	util_out_write(outbuf, outbufidx);
-	time_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	time_desc.dsc$b_class = DSC$K_CLASS_S;
-	time_desc.dsc$a_pointer = &outbuf[20];
-	time_desc.dsc$w_length = 40;
-	PUTTIM("STALE_INTERVAL", old_data->staleness);
-	PUTTIM("RESPONSE_INTERVAL",old_data->ccp_response_interval);
-	PUTTIM("QUANTUM_INTERVAL", old_data->ccp_quantum_interval);
-	PUTTIM("TICK_INTERVAL", old_data->ccp_tick_interval);
-	util_out_close();
-	status = sys$dassgn(ccpfab.fab$l_stv);
-	assert(status & 1);
-	free(dummy_data);
-	free(old_data);
-	return;
-}
diff --git a/sr_vvms/cce_show_locks.c b/sr_vvms/cce_show_locks.c
deleted file mode 100644
index 4adb843..0000000
--- a/sr_vvms/cce_show_locks.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "vmsdtype.h"
-#include <lckdef.h>
-#include <jpidef.h>
-#include <descrip.h>
-#include <lkidef.h>
-#include <climsgdef.h>
-#include <psldef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-#include "util.h"
-
-
-void display_lock_mode(int n, char *out);
-
-void cce_show_locks(void)
-{
-	struct
-	{
-		int4 length;
-		struct
-		{
-			unsigned int group:16, rmod:8, status: 7, sysnam:1;
-		} value;
-	} namespace;
-	struct
-	{
-		int4 length;
-		int4 value;
-	} lkidadr, remlkid, system, pid;
-
-	struct
-	{
-		int4 length;
-		char value[31];
-	} resnam;
-	struct
-	{
-		int4 length;
-		char value[3];
-	} state;
-
-#define ITEM_DEF(A, B) SIZEOF((B).value), A, &((B).value), &((B).length)
-
-	item_list_3	ilist[] = {
-		ITEM_DEF(LKI$_LOCKID, lkidadr),
-		ITEM_DEF(LKI$_PID, pid),
-		ITEM_DEF(LKI$_REMLKID, remlkid),
-		ITEM_DEF(LKI$_RESNAM, resnam),
-		ITEM_DEF(LKI$_STATE, state),
-		ITEM_DEF(LKI$_SYSTEM, system),
-		ITEM_DEF(LKI$_NAMSPACE, namespace),
-		0, 0, 0, 0};
-	int4 in_id;
-	uint4	status;
-	bool show_all_locks;
-	struct
-	{
-		char lockid[8];
-		char sp0[1];
-		char remoteid[8];
-		char sp1[1];
-		char que[4];
-		char sp2[1];
-		char rq[2];
-		char sp2a[1];
-		char gn[2];
-		char sp3[1];
-		char systemid[8];
-		char sp4[1];
-		char owner[8];
-		char sp5[1];
-		char procname[15];
-		char sp6[1];
-		char group[8];
-		char sp7[1];
-		char rmod[4];
-		char sp8[1];
-		char sysnam[3];
-		char sp9[1];
-		char resourcename[31];
-	} print_line;
-	struct dsc$descriptor_s dsc_procname;
-	$DESCRIPTOR(all_qualifier, "ALL");
-	$DESCRIPTOR(output_qualifier, "OUTPUT");
-	unsigned char *cp, *ctop;
-	uint4 prvprv1[2], prvprv2[2], prvadr[2];
-	static readonly char heading_line[] =
-		"LOCK ID  REMOTEID QUE  RQ GN SYSTEMID OWNER    PROCESS NAME    GROUP    MODE LVL RESOURCE NAME";
-	error_def(ERR_CCENOSYSLCK);
-	error_def(ERR_CCENOWORLD);
-	error_def(ERR_CCENOGROUP);
-
-	prvadr[1] = 0;
-	prvadr[0] = PRV$M_SYSLCK;
-	status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv1[0]);
-	if (status != SS$_NORMAL)
-		lib$signal(ERR_CCENOSYSLCK);
-	prvadr[0] = PRV$M_WORLD;
-	status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv2[0]);
-	if (status != SS$_NORMAL)
-	{
-		lib$signal(ERR_CCENOWORLD);
-		prvadr[0] = PRV$M_GROUP;
-		status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv2[0]);
-		if (status != SS$_NORMAL)
-			lib$signal(ERR_CCENOGROUP);
-	}
-
-	status = cli$present(&all_qualifier);
-	show_all_locks = (status == CLI$_PRESENT);
-	dsc_procname.dsc$w_length = SIZEOF(print_line.procname);
-	dsc_procname.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc_procname.dsc$b_class = DSC$K_CLASS_S;
-	dsc_procname.dsc$a_pointer = print_line.procname;
-	util_out_open(&output_qualifier);
-	util_out_write(LIT_AND_LEN(heading_line));
-	util_out_write(heading_line, 0);
-	for (in_id = -1;  ;)
-	{
-		status = sys$getlkiw(EFN$C_ENF, &in_id, &ilist, 0, 0, 0, 0);
-		if (status != 1)
-			break;
-		if (!show_all_locks && memcmp("GTM", &resnam.value, SIZEOF("GTM") - 2) != 0)
-			continue;
-		memset(&print_line, ' ', SIZEOF(print_line));
-		i2hex(lkidadr.value, print_line.lockid, SIZEOF(print_line.lockid));
-		i2hex(pid.value, print_line.owner, SIZEOF(print_line.owner));
-		i2hex(system.value, print_line.systemid, SIZEOF(print_line.systemid));
-		i2hex(remlkid.value, print_line.remoteid, SIZEOF(print_line.remoteid));
-		i2hex(namespace.value.group, print_line.group, SIZEOF(print_line.group));
-		display_lock_mode(state.value[0], &print_line.rq);
-		display_lock_mode(state.value[1], &print_line.gn);
-		memcpy(print_line.resourcename, resnam.value, resnam.length);
-		switch(state.value[2])
-		{
-			case LKI$C_GRANTED:
-				cp = "GRNT";
-				break;
-			case LKI$C_CONVERT:
-				cp = "CONV";
-				break;
-			case LKI$C_WAITING:
-				cp = "WAIT";
-				break;
-			default:
-				cp = "????";
-				break;
-		}
-		memcpy(print_line.que, cp, SIZEOF(print_line.que));
-		status = lib$getjpi(&JPI$_PRCNAM, &pid.value, 0, 0, &dsc_procname, 0);
-		switch(namespace.value.rmod)
-		{
-			case PSL$C_USER:
-				cp = "USER";
-				break;
-			case PSL$C_EXEC:
-				cp = "EXEC";
-				break;
-			case PSL$C_SUPER:
-				cp = "SUPR";
-				break;
-			case PSL$C_KERNEL:
-				cp = "KRNL";
-				break;
-			default:
-				cp = "????";
-				break;
-		}
-		memcpy(print_line.rmod, cp, SIZEOF(print_line.rmod));
-		cp = namespace.value.sysnam ? "SYS" : "GRP";
-		memcpy(print_line.sysnam, cp, SIZEOF(print_line.sysnam));
-		for (cp = print_line.resourcename, ctop = cp + SIZEOF(print_line.resourcename);  cp < ctop;  cp++)
-			if (*cp < 32 || *cp > 127)
-				*cp = '.';
-		for (cp = &print_line, ctop = cp + SIZEOF(print_line);  cp < ctop && *(ctop - 1) == ' ';  ctop--)
-			;
-		util_out_write(&print_line, ctop - cp);
-	}
-	util_out_close();
-	if (prvprv2[0] & prvadr[0] == 0)
-		sys$setprv(FALSE, &prvadr[0], FALSE, 0);
-	prvadr[1] = 0;
-	prvadr[0] = PRV$M_SYSLCK;
-	if (prvprv1[0] & PRV$M_SYSLCK == 0)
-		sys$setprv(FALSE, &prvadr[0], FALSE, 0);
-	return;
-}
-
-void display_lock_mode(int n, char *out)
-{
-	char *cp;
-	switch (n)
-	{
-		case LCK$K_NLMODE:
-			cp = "NL";
-			break;
-		case LCK$K_CRMODE:
-			cp = "CR";
-			break;
-		case LCK$K_CWMODE:
-			cp = "CW";
-			break;
-		case LCK$K_PRMODE:
-			cp = "PR";
-			break;
-		case LCK$K_PWMODE:
-			cp = "PW";
-			break;
-		case LCK$K_EXMODE:
-			cp = "EX";
-			break;
-		default:
-			cp = "??";
-			break;
-	}
-	*out++ = *cp++;
-	*out = *cp;
-	return;
-}
diff --git a/sr_vvms/cce_start.c b/sr_vvms/cce_start.c
deleted file mode 100644
index 70fda5f..0000000
--- a/sr_vvms/cce_start.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <secdef.h>
-#include <descrip.h>
-#include <prvdef.h>
-#include <prcdef.h>
-#include <rms.h>
-#include "util.h"
-#include "cli.h"
-
-void cce_start(void)
-{
-	int4 status;
-	uint4	prvadr[2], prvprv[2];
-	static readonly $DESCRIPTOR(proc,"GT.CX_CONTROL");
-	static readonly $DESCRIPTOR(image,"GTM$DIST:CCP.EXE");
-	static readonly	uic = 65540; /* uic = [1,4] */
-	$DESCRIPTOR(ccp,"");
-	unsigned char success[] = "GT.CX Cluster controller started with PID =        ";
-	uint4 pid;
-	uint4 baspri;
-	struct FAB ccp_fab;
-	struct NAM ccp_nam;
-	unsigned char ccp_namebuf[63];	/* max image name allowable for creprc */
-
-	prvadr[1] = 0;
-	prvadr[0] = PRV$M_DETACH | PRV$M_OPER | PRV$M_SYSNAM | PRV$M_SYSLCK | PRV$M_TMPMBX;
-	status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-	if (status == SS$_NORMAL)
-	{
-		baspri = 5;
-		cli_get_num("PRIORITY",&baspri);
-
-		ccp_fab = cc$rms_fab;
-		ccp_fab.fab$l_fna = image.dsc$a_pointer;
-		ccp_fab.fab$b_fns = image.dsc$w_length;
-		ccp_fab.fab$l_nam = &ccp_nam;
-		ccp_nam = cc$rms_nam;
-		ccp_nam.nam$l_esa = ccp_namebuf;
-		ccp_nam.nam$b_ess = SIZEOF(ccp_namebuf);
-		ccp_nam.nam$b_nop = NAM$M_SYNCHK;
-		status = sys$parse (&ccp_fab);
-		if (!(status & 1))
-		{	lib$signal(status);
-			return;
-		}
-		ccp.dsc$a_pointer = ccp_namebuf;
-		ccp.dsc$w_length = ccp_nam.nam$b_esl;
-
-		status = sys$creprc(&pid, &ccp, 0, 0, 0, &prvadr, 0, &proc, baspri, uic, 0, PRC$M_DETACH);
-		sys$setprv(FALSE, &prvprv[0], FALSE, 0);
-		if (status != SS$_NORMAL)
-		{	lib$signal(status);
-			return;
-		}
-		util_out_open(0);
-		i2hex(pid, &success[ SIZEOF(success) - 8], 8);
-		util_out_write(&success[0], SIZEOF(success));
-		util_out_close();
-	}
-	else
-		lib$signal(status);
-}
-
diff --git a/sr_vvms/ccp.c b/sr_vvms/ccp.c
deleted file mode 100644
index 4872f92..0000000
--- a/sr_vvms/ccp.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "get_page_size.h"
-#include "gtm_env_init.h"     /* for gtm_env_init() prototype */
-
-GBLDEF	bool		ccp_stop;
-GBLDEF	int		ccp_stop_ctr;
-GBLREF	bool		licensed ;
-int ccp(void)
-{
-	ccp_action_record	*act;
-	error_def(ERR_CCPBADMSG);
-	error_def(ERR_OPRCCPSTOP);
-
-#define CCP_TABLE_ENTRY(A,B,C,D) void B();
-#include "ccpact_tab.h"
-#undef CCP_TABLE_ENTRY
-#define CCP_TABLE_ENTRY(A,B,C,D) B,
-	static readonly (*dispatch_table[])() =
-{
-#include "ccpact_tab.h"
-};
-#undef CCP_TABLE_ENTRY
-
-	licensed= TRUE ;
-	gtm_env_init();	/* read in all environment variables before any function call (particularly malloc) */
-	get_page_size();
-	ccp_init();
-	lib$establish(ccp_ch);
-	while (!ccp_stop || ccp_stop_ctr > 0)
-	{
-		act = ccp_act_select();
-		if (!act)
-			sys$hiber();
-		else
-		{
-			if (act->action < 0 || act->action >= CCPACTION_COUNT)
-				ccp_signal_cont(ERR_CCPBADMSG);
-			else
-				(*dispatch_table[act->action])(act);
-			ccp_act_complete();
-		}
-	}
-	ccp_exit();
-	return ERR_OPRCCPSTOP;
-}
diff --git a/sr_vvms/ccp_add_reg.c b/sr_vvms/ccp_add_reg.c
deleted file mode 100644
index 394bc2b..0000000
--- a/sr_vvms/ccp_add_reg.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-GBLREF ccp_db_header *ccp_reg_root;
-
-void ccp_add_reg(d)
-ccp_db_header *d;
-{
-	/* see note for ccp_get_reg...go ordered list for efficiency */
-	d->next = ccp_reg_root;
-	ccp_reg_root = d;
-	return;
-}
diff --git a/sr_vvms/ccp_bt_get.c b/sr_vvms/ccp_bt_get.c
deleted file mode 100644
index f0dd075..0000000
--- a/sr_vvms/ccp_bt_get.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-
-
-bt_rec *ccp_bt_get(cs_addrs, block)
-/* this function returns a pointer to the bt_rec entry or 0 if not found */
-int4 block;	/* block number to put */
-sgmnt_addrs *cs_addrs;
-{
-	register sgmnt_addrs *cs;
-	bt_rec	*p;
-
-	cs = cs_addrs;
-	p = cs->bt_header + (block % cs->hdr->bt_buckets);
-	assert(p->blk == BT_QUEHEAD);
-	for (;;)
-	{	p = (bt_rec *) ((char *) p + p->blkque.fl);
-		if (p->blk == block)
-		{	return p;
-		}
-		if (p->blk == BT_QUEHEAD)
-		{	return 0;
-		}
-	}
-}
diff --git a/sr_vvms/ccp_ch.c b/sr_vvms/ccp_ch.c
deleted file mode 100644
index b31d585..0000000
--- a/sr_vvms/ccp_ch.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include <descrip.h>
-#include <lnmdef.h>
-#include <opcdef.h>
-
-GBLREF	uint4	process_id;
-GBLREF	bool		ccp_dump_on;
-
-error_def(ERR_CCPSIGCONT);
-
-static	unsigned char	pid_msg[] = "GT.CX_CONTROL--PID: ",
-			pc_msg[] = "PC: ";
-
-static	$DESCRIPTOR	(lnm$dcl_logical, "LNM$DCL_LOGICAL");
-static	$DESCRIPTOR	(gtm$deadlock, "GTM$DEADLOCK");
-
-static	int		attr = LNM$M_CASE_BLIND;
-
-
-CONDITION_HANDLER(ccp_ch)
-{
-	struct
-	{
-		char	type;
-		int	target : 24;
-		int4	rqstid;
-		char	text[255];
-	}			oper_msg;
-
-	struct dsc$descriptor_s	oper_msg_dsc, sig_msg_dsc, fao_out_dsc;
-	int4			*pc, count;
-	uint4		*c, status;
-	unsigned short		sig_msg_len, fao_len, oper_text_len;
-	char			*text_ptr, sig_msg_buffer[255];
-
-
-	c = &SIGNAL;
-
-	/* Don't report CANCEL, and don't report DEADLOCK unless logical name GTM$DEADLOCK is defined */
-	if (SIGNAL == ERR_CCPSIGCONT  &&  sig->chf$l_sig_args > 2  &&
-	    (*(c + 3) == SS$_CANCEL  ||
-	     *(c + 3) == SS$_DEADLOCK  &&  sys$trnlnm(&attr, &lnm$dcl_logical, &gtm$deadlock, NULL, NULL) != SS$_NORMAL))
-		CONTINUE;
-
-	if (ccp_dump_on)
-		ccp_dump();
-
-
-	/* Initialize constant fields */
-
-	oper_msg_dsc.dsc$b_dtype = fao_out_dsc.dsc$b_dtype
-				 = sig_msg_dsc.dsc$b_dtype
-				 = DSC$K_DTYPE_T;
-
-	oper_msg_dsc.dsc$b_class = fao_out_dsc.dsc$b_class
-				 = sig_msg_dsc.dsc$b_class
-				 = DSC$K_CLASS_S;
-
-	oper_msg_dsc.dsc$a_pointer = &oper_msg;
-	sig_msg_dsc.dsc$a_pointer = sig_msg_buffer;
-
-	oper_msg.type = OPC$_RQ_RQST;
-	oper_msg.target = OPC$M_NM_CLUSTER;	/***** This should be setable by CCE *****/
-	oper_msg.rqstid = 0;
-
-
-	/* Move PID text into message */
-	text_ptr = oper_msg.text;
-	memcpy(text_ptr, pid_msg, sizeof pid_msg - 1);
-	text_ptr += sizeof pid_msg - 1;
-	text_ptr += ojhex_to_str(process_id, text_ptr);
-	*text_ptr++ = ' ';
-
-	if (SIGNAL != ERR_CCPSIGCONT)
-	{
-		pc = (int4 *)sig + sig->chf$l_sig_args - 1;
-		memcpy(text_ptr, pc_msg, sizeof pc_msg - 1);
-		text_ptr += sizeof pc_msg - 1;
-		text_ptr += ojhex_to_str(*pc, text_ptr);
-		*text_ptr++ = ' ';
-	}
-
-	fao_out_dsc.dsc$w_length = sizeof oper_msg.text - (text_ptr - oper_msg.text);
-	count = sig->chf$l_sig_args - 2;
-
-	for (;;)
-	{
-		sig_msg_dsc.dsc$w_length = sizeof sig_msg_buffer;
-		sys$getmsg(*c++, &sig_msg_len, &sig_msg_dsc, 0, NULL);
-		sig_msg_dsc.dsc$w_length = sig_msg_len;
-
-		fao_out_dsc.dsc$a_pointer = text_ptr;
-		/* Allow max of 4 fao args, will ignore if not used */
-		sys$fao(&sig_msg_dsc, &fao_len, &fao_out_dsc, *(c+1), *(c+2), *(c+3), *(c+4));
-		text_ptr += fao_len;
-
-		if (--count != 0)
-			if (fao_len == sig_msg_len)
-			{
-				if (*c == 0)
-				{
-					c++;
-					count--;
-				}
-			}
-			else
-			{
-				count -= *c + 1;
-				c += *c + 1;
-			}
-
-		if (count == 0)
-			break;
-
-		*text_ptr++ = ' ';
-		fao_out_dsc.dsc$w_length -= fao_len + 1;
-	}
-
-	oper_msg_dsc.dsc$w_length = text_ptr - (char *)&oper_msg;
-	sys$sndopr(&oper_msg_dsc, 0);
-
-	/* Drop active entry, if any, and continue to operate */
-	if (SIGNAL == ERR_CCPSIGCONT)
-		CONTINUE;
-
-	NEXTCH;
-}
diff --git a/sr_vvms/ccp_close1.c b/sr_vvms/ccp_close1.c
deleted file mode 100644
index ca7b7d1..0000000
--- a/sr_vvms/ccp_close1.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <lckdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "jnl.h"
-#include "locks.h"
-#include "del_sec.h"
-#include "mem_list.h"
-
-#define PRIORITY 2
-
-GBLREF	ccp_relque	*ccp_action_que;
-GBLREF	ccp_db_header	*ccp_reg_root;
-GBLREF	bool		ccp_stop;
-GBLREF	int		ccp_stop_ctr;
-GBLREF 	jnl_gbls_t	jgbl;
-
-void			ccp_close_timeout();  /* TODO: move to a header */
-
-static	int4		delta_1_sec[2] = { -10000000, -1 };
-
-
-void	ccp_close1(ccp_db_header *db)
-{
-	ccp_db_header		*db0, *db1;
-	ccp_que_entry		*que_ent;
-	ccp_relque		*que_hd;
-	mem_list		*ml_ptr, *ml_ptr_hold;
-	sgmnt_addrs		*csa;
-	vms_gds_info		*gds_info;
-	unsigned char		section_name[GLO_NAME_MAXLEN];
-	uint4			retadr[2], status, outaddrs[2];
-	struct dsc$descriptor_s name_dsc;
-
-
-	if (ccp_stop)
-		ccp_stop_ctr--;
-
-	if (db->stale_in_progress)
-		sys$cantim(&db->stale_timer_id, PSL$C_USER);
-
-	ccp_quemin_adjust(CCP_CLOSE_REGION);
-
-	sys$cantim(&db->tick_timer_id, PSL$C_USER);
-	sys$cantim(&db->quantum_timer_id, PSL$C_USER);
-
-	db->segment->nl->ccp_state = CCST_CLOSED;
-	db->wmexit_requested = TRUE;	/* ignore any blocking ASTs - already releasing */
-
-	gds_info = FILE_INFO(db->greg);
-
-	if (JNL_ENABLED(db->glob_sec))
-	{
-		if (db->segment->jnl != NULL  &&  db->segment->jnl->channel != 0)
-		{
-			status = sys$setimr(0, delta_1_sec, ccp_close_timeout, &db->close_timer_id, 0);
-			if (status != SS$_NORMAL)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			status = ccp_enqw(EFN$C_ENF, LCK$K_EXMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_NOQUEUE, NULL, 0,
-					  NULL, 0, NULL, PSL$C_USER, 0);
-			if (status == SS$_NOTQUEUED)
-				/* We're not the only node accessing the journal file */
-				jnl_file_close(db->greg, FALSE, FALSE);
-			else
-			{
-				/***** Check error status here? *****/
-				if (db->segment->jnl->jnl_buff->before_images  &&
-				    db->segment->ti->curr_tn > db->segment->jnl->jnl_buff->epoch_tn)
-				{
-					csa = db->segment;
-					JNL_SHORT_TIME(jgbl.gbl_jrec_time);	/* needed for jnl_put_jrt_pini()
-											and jnl_write_epoch_rec() */
-					if (0 == csa->jnl->pini_addr)
-						jnl_put_jrt_pini(csa);
-					db->segment->jnl->jnl_buff->epoch_tn = db->segment->ti->curr_tn;
-					jnl_write_epoch_rec(db->segment);
-				}
-				jnl_file_close(db->greg, TRUE, FALSE);
-			}
-			sys$cantim(&db->close_timer_id, PSL$C_USER);
-			status = gtm_deq(gds_info->s_addrs.jnl->jnllsb->lockid, NULL, PSL$C_USER, 0);
-			if (status != SS$_NORMAL)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		}
-	}
-
-	db->segment = NULL;	/* Warn AST's that the segment has been deleted */
-
-	status = sys$deq(db->lock_iosb.lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-	if (status != SS$_NORMAL  &&  status != SS$_CANCELGRANT)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = sys$deq(db->refcnt_iosb.lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-	if (status != SS$_NORMAL  &&  status != SS$_CANCELGRANT)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = sys$deq(db->wm_iosb.lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-	if (status != SS$_NORMAL  &&  status != SS$_CANCELGRANT)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = sys$deq(db->flush_iosb.lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-	if (status != SS$_NORMAL  &&  status != SS$_CANCELGRANT)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = sys$cancel(gds_info->fab->fab$l_stv);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = sys$dassgn(gds_info->fab->fab$l_stv);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	csa = &gds_info->s_addrs;
-
-	outaddrs[0] = csa->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-	outaddrs[1] = csa->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-	if (FALSE == is_va_free(outaddrs[0]))
-		gtm_deltva(outaddrs, NULL, PSL$C_USER);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = sys$cretva(csa->db_addrs, retadr, PSL$C_USER);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	assert(retadr[0] == csa->db_addrs[0]  &&  retadr[1] == csa->db_addrs[1]);
-
-	ml_ptr_hold=db->mem_ptr;
-
-	if (ml_ptr_hold->prev != NULL)
-	{
-		/* if prior segment is adjacent and free, coalesce the segments */
-		if (ml_ptr_hold->prev->free  &&
-		    ml_ptr_hold->addr == ml_ptr_hold->prev->addr + OS_PAGELET_SIZE * ml_ptr_hold->prev->pages)
-		{
-			ml_ptr = ml_ptr_hold->prev;
-			ml_ptr->next = ml_ptr_hold->next;
-			if (ml_ptr->next != NULL)
-				ml_ptr->next->prev = ml_ptr;
-			ml_ptr->pages += ml_ptr_hold->pages;
-			free(ml_ptr_hold);
-			ml_ptr_hold = ml_ptr;
-		}
-	}
-
-	if (ml_ptr_hold->next != NULL)
-	{
-		/* if next segment is adjacent and free, coalesce the segments */
-		if (ml_ptr_hold->next->free  &&
-		    ml_ptr_hold->next->addr == ml_ptr_hold->addr + OS_PAGELET_SIZE * ml_ptr_hold->pages)
-		{
-			ml_ptr = ml_ptr_hold->next;
-			ml_ptr_hold->next = ml_ptr->next;
-			if (ml_ptr_hold->next != NULL)
-				ml_ptr_hold->next->prev = ml_ptr_hold;
-			ml_ptr_hold->pages += ml_ptr->pages;
-			free(ml_ptr);
-		}
-	}
-
-	ml_ptr_hold->free = TRUE;
-
-	global_name("GT$S", &gds_info->file_id, section_name);
-	name_dsc.dsc$a_pointer = &section_name[1];
-	name_dsc.dsc$w_length = section_name[0];
-	name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	status = del_sec(SEC$M_SYSGBL, &name_dsc, NULL);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	/* Dequeue locks after delete section in ccp_close,
-	   acquire lock before create section in gvcst_init,
-	   release lock after delete section in gds_rundown   */
-
-	status = gtm_deq(db->lock_iosb.lockid, NULL, PSL$C_USER, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = gtm_deq(db->refcnt_iosb.lockid, NULL, PSL$C_USER, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = gtm_deq(db->wm_iosb.lockid, NULL, PSL$C_USER, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	status = gtm_deq(db->flush_iosb.lockid, NULL, PSL$C_USER, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	que_hd = &ccp_action_que[PRIORITY];
-	for (que_ent = (char *)que_hd + que_hd->bl;  que_ent != que_hd;  que_ent = (char *)que_ent + que_ent->q.bl)
-		if (que_ent->value.v.h == db)
-			que_ent->value.v.h = 0;
-
-	free(gds_info->fab->fab$l_nam);
-	free(gds_info->fab);
-	free(db->greg->dyn.addr);
-	free(db->greg);
-
-	/* Remove db from list, this list should never be changed in an AST */
-	for (db0 = ccp_reg_root, db1 = NULL;  db0 != db;  db1 = db0, db0 = db0->next)
-		;
-	if (db1 == NULL)
-		ccp_reg_root = db0->next;
-	else
-		db1->next = db0->next;
-
-	free(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_close_timeout.c b/sr_vvms/ccp_close_timeout.c
deleted file mode 100644
index 138a428..0000000
--- a/sr_vvms/ccp_close_timeout.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "jnl.h"
-
-
-/* AST routine entered on expiration of timer set in ccp_close1 */
-
-void ccp_close_timeout(pdb)
-ccp_db_header	**pdb;
-{
-	ccp_db_header	*db;
-
-
-	assert(lib$ast_in_prog());
-
-	db = *pdb;
-	db->segment->jnl->jnl_buff->dskaddr = db->segment->jnl->jnl_buff->freeaddr;
-
-	sys$wake(NULL, NULL);
-
-	return;
-}
diff --git a/sr_vvms/ccp_closejnl_ast.c b/sr_vvms/ccp_closejnl_ast.c
deleted file mode 100644
index e790462..0000000
--- a/sr_vvms/ccp_closejnl_ast.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <psldef.h>
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-
-static	void	ccp_closejnl_ast_user( gd_region *reg)
-{
-	ccp_action_record	buffer;
-
-	buffer.action = CCTR_CLOSEJNL;
-	buffer.pid = 0;
-	buffer.v.reg = reg;
-	ccp_act_request(&buffer);
-}
-
-
-/* NOTE:  Because this blocking AST routine is established via a call to gtm_enqw, it
-   executes in KERNEL mode;  ccp_closejnl_ast_user, however, must execute in USER mode.
-   This is accomplished by using sys$dclast, explicitly specifying USER mode. */
-
-void	ccp_closejnl_ast( gd_region	*reg)
-{
-	assert(lib$ast_in_prog());
-
-	sys$dclast(ccp_closejnl_ast_user, reg, PSL$C_USER);
-}
diff --git a/sr_vvms/ccp_cluster_lock_wake.c b/sr_vvms/ccp_cluster_lock_wake.c
deleted file mode 100644
index 6e178c4..0000000
--- a/sr_vvms/ccp_cluster_lock_wake.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "ccp_cluster_lock_wake.h"
-
-void ccp_cluster_lock_wake(gd_region *reg)
-{
-	ccp_sendmsg(CCTR_LKRQWAKE, &((vms_gds_info *)(reg->dyn.addr->file_cntl->file_info))->file_id);
-	return;
-}
diff --git a/sr_vvms/ccp_dump.c b/sr_vvms/ccp_dump.c
deleted file mode 100644
index a4a717b..0000000
--- a/sr_vvms/ccp_dump.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "jnl.h"
-#include <iodef.h>
-#include "probe.h"
-
-GBLREF	ccp_db_header	*ccp_reg_root;
-
-static	const	char	header_label[] = "<ccp_db_header @ -------------->",
-#define header_offset	17	/*        -----------------^		*/
-			region_label[] = "<gd_region @ ------------------>",
-#define region_offset	13	/*        -------------^		*/
-			addrs_label[]  = "<sgmnt_addrs @ ---------------->",
-#define addrs_offset	15	/*        ---------------^		*/
-			node_label[]   = "<node_local @ ----------------->",
-#define node_offset	14	/*        --------------^		*/
-			jnl_label[]    = "<jnl_private_control @ -------->",
-#define jnl_offset	23	/*        -----------------------^	*/
-			data_label1[]  = "<sgmnt_data @ ",
-#define data_offset	14	/*        --------------^	*/
-			data_label2[]  = " starts in next block>",
-			end_label[]    = "<End of data>",
-			filename[]     = "SYS$MANAGER:CCPDUMP.DMP";
-
-#define READ		FALSE
-#define RECORD_SIZE	1024
-
-
-void ccp_dump(void)
-{
-	ccp_db_header	*db;
-	sgmnt_data	dummy;
-	struct FAB	fab;
-	struct RAB	rab;
-	char		*c, buffer[RECORD_SIZE];
-	int		i;
-
-
-	if (ccp_reg_root == NULL)
-		return;
-	fab = cc$rms_fab;
-	fab.fab$b_fns = SIZEOF(filename - 1);
-	fab.fab$l_fna = filename;
-	fab.fab$w_mrs = RECORD_SIZE;
-	fab.fab$b_rfm = FAB$C_FIX;
-	fab.fab$b_fac = FAB$M_PUT;
-	fab.fab$l_fop = FAB$M_CBT | FAB$M_MXV | FAB$M_TEF;
-	dummy.n_bts = WC_MAX_BUFFS;
-	dummy.bt_buckets = getprime(WC_MAX_BUFFS);
-	fab.fab$w_deq = fab.fab$l_alq
-		      = LOCK_BLOCK(&dummy);
-	switch (sys$create(&fab))
-	{
-	case RMS$_NORMAL:
-	case RMS$_CREATED:
-	case RMS$_SUPERSEDE:
-	case RMS$_FILEPURGED:
-		break;
-	default:
-		return;
-	}
-	rab = cc$rms_rab;
-	rab.rab$w_rsz = RECORD_SIZE;
-	rab.rab$l_fab = &fab;
-	if (sys$connect(&rab) != RMS$_NORMAL)
-		return;
-	for (db = ccp_reg_root;  db != NULL;  db = db->next)
-	{
-		memset(buffer, 0, SIZEOF(buffer));
-		c = buffer;
-		if (probe(SIZEOF(ccp_db_header), db, READ))
-		{
-			memcpy(c, header_label, SIZEOF(header_label) - 1);
-			(void)i2hex_nofill(db, c + header_offset, SIZEOF(c) * 2);
-			c += SIZEOF(header_label) - 1;
-			/* ccp_db_header is defined in CCP.H */
-			memcpy(c, db, SIZEOF(ccp_db_header));
-			c += ROUND_UP(SIZEOF(ccp_db_header), 32);
-		}
-		if (probe(SIZEOF(gd_region), db->greg, READ))
-		{
-			memcpy(c, region_label, SIZEOF(region_label) - 1);
-			(void)i2hex_nofill(db->greg, c + region_offset, SIZEOF(c) * 2);
-			c += SIZEOF(region_label) - 1;
-			/* gd_region is defined in GDSFHEAD.H */
-			memcpy(c, db->greg, SIZEOF(gd_region));
-			c += ROUND_UP(SIZEOF(gd_region), 32);
-		}
-		if (probe(SIZEOF(sgmnt_addrs), db->segment, READ))
-		{
-			memcpy(c, addrs_label, SIZEOF(addrs_label) - 1);
-			(void)i2hex_nofill(db->segment, c + addrs_offset, SIZEOF(c) * 2);
-			c += SIZEOF(addrs_label) - 1;
-			/* sgmnt_addrs is defined in GDSFHEAD.H */
-			memcpy(c, db->segment, SIZEOF(sgmnt_addrs));
-			c += ROUND_UP(SIZEOF(sgmnt_addrs), 32);
-			if (probe(SIZEOF(node_local), db->segment->nl, READ))
-			{
-				memcpy(c, node_label, SIZEOF(node_label) - 1);
-				(void)i2hex_nofill(db->segment->nl, c + node_offset, SIZEOF(c) * 2);
-				c += SIZEOF(node_label) - 1;
-				/* node_local is defined in GDSBT.H */
-				memcpy(c, db->segment->nl, SIZEOF(node_local));
-				c += ROUND_UP(SIZEOF(node_local), 32);
-			}
-			if (db->segment->jnl != NULL  &&  probe(SIZEOF(jnl_private_control), db->segment->jnl, READ))
-			{
-				memcpy(c, jnl_label, SIZEOF(jnl_label) - 1);
-				(void)i2hex_nofill(db->segment->jnl, c + jnl_offset, SIZEOF(c) * 2);
-				c += SIZEOF(jnl_label) - 1;
-				/* jnl_private_control is defined in JNL.H */
-				memcpy(c, db->segment->jnl, SIZEOF(jnl_private_control));
-				c += ROUND_UP(SIZEOF(jnl_private_control), 32);
-			}
-		}
-		memcpy(c, data_label1, SIZEOF(data_label1) - 1);
-		i = i2hex_nofill(db->glob_sec, c + data_offset, SIZEOF(c) * 2);
-		memcpy(c + SIZEOF(data_label1) - 1 + i, data_label2, SIZEOF(data_label2) - 1);
-		rab.rab$l_rbf = buffer;
-		if (sys$put(&rab) != RMS$_NORMAL)
-		{
-			sys$close(&fab);
-			return;
-		}
-		/* db->glob_sec points to sgmnt_data, defined in GDSFHEAD.H */
-		if (probe(RECORD_SIZE, db->glob_sec, READ))
-		{
-			i = DIVIDE_ROUND_UP((LOCK_BLOCK(db->glob_sec) * DISK_BLOCK_SIZE) + LOCK_SPACE_SIZE(db->glob_sec)
-				+ CACHE_CONTROL_SIZE(db->glob_sec), OS_PAGELET_SIZE);
-			for (c = db->glob_sec;  i > 0;  c += RECORD_SIZE, i -= (RECORD_SIZE / OS_PAGELET_SIZE))
-				if (probe(RECORD_SIZE, c, READ))
-				{
-					rab.rab$l_rbf = c;
-					if (sys$put(&rab) != RMS$_NORMAL)
-					{
-						sys$close(&fab);
-						return;
-					}
-				} else
-					break;
-		}
-	}
-	memset(buffer, 0, RECORD_SIZE);
-	memcpy(buffer, end_label, SIZEOF(end_label) - 1);
-	rab.rab$l_rbf = buffer;
-	sys$put(&rab);
-	sys$close(&fab);
-	return;
-}
diff --git a/sr_vvms/ccp_enq.c b/sr_vvms/ccp_enq.c
deleted file mode 100644
index ae9000d..0000000
--- a/sr_vvms/ccp_enq.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "error.h"
-#include "locks.h"
-
-/*
- *	ccp_enq is identical to sys$enq, except that it causes the CCPSIGCONT
- *	message to be issued to OPCOM if sys$enq returns an unsuccessful status.
- */
-
-uint4 ccp_enq(
-	unsigned int	efn,
-	unsigned int	lkmode,
-	lock_sb		*lksb,
-	unsigned int	flags,
-	void		*resnam,
-	unsigned int	parid,
-	void		*astadr,
-	unsigned int	astprm,
-	void		*blkast,
-	unsigned int	acmode,
-	unsigned int	nullarg)
-{
-	uint4	status;
-	error_def(ERR_CCPSIGCONT);
-
-	status = sys$enq(efn, lkmode, lksb, flags, resnam, parid, astadr, astprm, blkast, acmode, nullarg);
-	if ((ERROR | SEVERE) & status)
-		rts_error(VARLSTCNT(4) ERR_CCPSIGCONT, 1, caller_id(), status);
-	return status;
-}
diff --git a/sr_vvms/ccp_enqw.c b/sr_vvms/ccp_enqw.c
deleted file mode 100644
index abd77c8..0000000
--- a/sr_vvms/ccp_enqw.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "error.h"
-#include "locks.h"
-
-/*
- *	ccp_enqw is identical to sys$enqw, except that it causes the CCPSIGCONT
- *	message to be issued to OPCOM if sys$enqw returns an unsuccessful status.
- */
-
-uint4 ccp_enqw(
-	unsigned int	efn,
-	unsigned int	lkmode,
-	lock_sb		*lksb,
-	unsigned int	flags,
-	void		*resnam,
-	unsigned int	parid,
-	void		*astadr,
-	unsigned int	astprm,
-	void		*blkast,
-	unsigned int	acmode,
-	unsigned int	nullarg)
-{
-	uint4	status;
-	error_def(ERR_CCPSIGCONT);
-
-	status = sys$enqw(efn, lkmode, lksb, flags, resnam, parid, astadr, astprm, blkast, acmode, nullarg);
-	if (SUCCESS & status)
-		status = (uint4)lksb->cond;
-	if ((ERROR | SEVERE) & status)
-		rts_error(VARLSTCNT(4) ERR_CCPSIGCONT, 1, caller_id(), status);
-	return status;
-}
diff --git a/sr_vvms/ccp_ewmwtbf_interrupt.c b/sr_vvms/ccp_ewmwtbf_interrupt.c
deleted file mode 100644
index 8a7577b..0000000
--- a/sr_vvms/ccp_ewmwtbf_interrupt.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-void ccp_ewmwtbf_interrupt( ccp_db_header **p)
-{
-	ccp_db_header *db;
-	ccp_action_record buff;
-
-	assert(lib$ast_in_prog());
-	db = *p;
-	buff.action = CCTR_EWMWTBF;
-	buff.pid = 0;
-	buff.v.h = db;
-	ccp_act_request(&buff);
-	return;
-}
diff --git a/sr_vvms/ccp_exi_ch.c b/sr_vvms/ccp_exi_ch.c
deleted file mode 100644
index 94ca1b9..0000000
--- a/sr_vvms/ccp_exi_ch.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-
-
-#define UNWIND_LEVELS 3
-/* 0 unwinds CCP_EXI_CH, 1 unwinds CCP_RUNDOWN,  2,3 and 4 unwind the three VMS handlers,
-   thus returning to the pc when the exit condition was received.		*/
-
-static uint4	depth = UNWIND_LEVELS;
-
-CONDITION_HANDLER(ccp_exi_ch)
-{
-	START_CH(FALSE);
-	UNWIND(&depth, 0);
-}
diff --git a/sr_vvms/ccp_exitwm1.c b/sr_vvms/ccp_exitwm1.c
deleted file mode 100644
index 2a8971d..0000000
--- a/sr_vvms/ccp_exitwm1.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <iodef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-
-/* AST routine entered on completion of sys$qio to write the master map, in ccp_tr_exitwm */
-
-void ccp_exitwm1( ccp_db_header	*db)
-{
-	sgmnt_addrs	*cs_addrs;
-	uint4	status;
-
-
-	assert(lib$ast_in_prog());
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	cs_addrs = db->segment;
-	if (db->last_lk_sequence < cs_addrs->ti->lock_sequence)
-	{
-		status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_WRITEVBLK, &db->qio_iosb, ccp_exitwm1a, db,
-				 cs_addrs->lock_addrs[0], db->glob_sec->lock_space_size, LOCK_BLOCK(db->glob_sec) + 1, 0, 0, 0);
-		if ((status & 1) == 0)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		db->last_lk_sequence = cs_addrs->ti->lock_sequence;
-	}
-	else
-		ccp_exitwm2(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_exitwm1a.c b/sr_vvms/ccp_exitwm1a.c
deleted file mode 100644
index 204a0c4..0000000
--- a/sr_vvms/ccp_exitwm1a.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-
-/* AST routine entered on completion of sys$qio to write the lock block, in ccp_tr_exitwm or ccp_exitwm1 */
-
-void ccp_exitwm1a( ccp_db_header *db)
-{
-	assert(lib$ast_in_prog());
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	ccp_exitwm2(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_exitwm2.c b/sr_vvms/ccp_exitwm2.c
deleted file mode 100644
index b9a3044..0000000
--- a/sr_vvms/ccp_exitwm2.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <iodef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-
-/* If required, start to write header to disk */
-
-void ccp_exitwm2( ccp_db_header	*db)
-{
-	uint4	status;
-
-	ccp_exitwm2a(db);
-	return;
-}
diff --git a/sr_vvms/ccp_exitwm2a.c b/sr_vvms/ccp_exitwm2a.c
deleted file mode 100644
index dc3febf..0000000
--- a/sr_vvms/ccp_exitwm2a.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <iodef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-
-/* Start to write transaction history to disk */
-
-void ccp_exitwm2a(ccp_db_header *db)
-{
-	uint4	status;
-
-
-	assert(db->segment->ti->early_tn == db->segment->ti->curr_tn);
-
-	status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_WRITEVBLK, &db->qio_iosb, ccp_exitwm3, db,
-			 &db->glob_sec->trans_hist, BT_SIZE(db->glob_sec) + SIZEOF(th_index), TH_BLOCK, 0, 0, 0);
-	if ((status & 1) == 0)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_exitwm3.c b/sr_vvms/ccp_exitwm3.c
deleted file mode 100644
index f6e46f8..0000000
--- a/sr_vvms/ccp_exitwm3.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "jnl.h"
-#include "locks.h"
-#include <lckdef.h>
-#include <psldef.h>
-#include <efndef.h>
-
-
-error_def(ERR_GTMCHECK);
-
-
-/* AST routine entered on completion of sys$qio to write transaction history to disk, in ccp_exitwm2a;
-   now we may drop write mode and start writing dirty buffers */
-
-void	ccp_exitwm3( ccp_db_header *db)
-{
-	sgmnt_addrs		*csa;
-	bt_rec			*que_base, *que_top, *p;
-	ccp_action_record	request;
-	uint4		status;
-
-
-	assert(lib$ast_in_prog());
-
-	csa = db->segment;
-	assert(csa->nl->ccp_state == CCST_WMXREQ);
-	assert(csa->ti->curr_tn == csa->ti->early_tn);
-
-	db->wm_iosb.valblk[CCP_VALBLK_TRANS_HIST] = csa->ti->curr_tn + csa->ti->lock_sequence;
-	if (JNL_ENABLED(csa->hdr)  &&  csa->jnl != NULL)
-	{
-		assert(csa->jnl->channel != 0);
-		db->wm_iosb.valblk[CCP_VALBLK_JNL_ADDR] = csa->jnl->jnl_buff->freeaddr;
-		db->wm_iosb.valblk[CCP_VALBLK_EPOCH_TN] = csa->jnl->jnl_buff->epoch_tn;
-		/* lastaddr is no longer a field in jnl_buff
-		 *	db->wm_iosb.valblk[CCP_VALBLK_LST_ADDR] = csa->jnl->jnl_buff->lastaddr;
-		 */
-	}
-
-	/* Convert Write-mode lock from Protected Write to Concurrent Read, writing the lock value block */
-	status = ccp_enqw(EFN$C_ENF, LCK$K_CRMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-			  NULL, 0, NULL, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-	for (que_base = csa->bt_header, que_top = que_base + csa->hdr->bt_buckets;
-	     que_base < que_top;
-	     ++que_base)
-	{
-		assert(que_base->blk == BT_QUEHEAD);
-
-		for (p = (bt_rec *)((char *)que_base + que_base->blkque.fl);
-		     p != que_base;
-		     p = (bt_rec *)((char *)p + p->blkque.fl))
-		{
-			if (((int4)p & 3) != 0)
-				ccp_signal_cont(ERR_GTMCHECK);	/***** Is this reasonable? *****/
-			p->flushing = FALSE;
-		}
-	}
-
-	db->blocking_ast_received = FALSE;
-	db->wmexit_requested = FALSE;
-	csa->nl->ccp_state = CCST_WMXGNT;
-	db->wc_rover = 0;
-
-	request.action = CCTR_EWMWTBF;
-	request.pid = 0;
-	request.v.h = db;
-	ccp_act_request(&request);
-
-	return;
-}
diff --git a/sr_vvms/ccp_exitwm_attempt.c b/sr_vvms/ccp_exitwm_attempt.c
deleted file mode 100644
index eeea4ee..0000000
--- a/sr_vvms/ccp_exitwm_attempt.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include <ssdef.h>
-
-
-/********************************************************************************
-*   After any of the state transitions which might lead to exit write mode	*
-*   processing, this routine must be called to determine if all necessary	*
-*   criteria have been met.							*
-*										*
-*   CAUTION: (1) To avoid race conditions this routine MUST only be called as	*
-*		 an AST;							*
-*	     (2) All bit fiddling with the db_header state bits MUST be done	*
-*		 within an AST for the same reason.				*
-********************************************************************************/
-
-void ccp_exitwm_attempt( ccp_db_header	*db)
-{
-	ccp_action_record	request;
-	int4			curr_time[2], result_time[2], ticks_left;
-	uint4		status;
-
-
-	assert(lib$ast_in_prog());
-
-	if (db->quantum_expired  &&  db->wmexit_requested  &&
-	    db->segment != NULL  &&  db->segment->nl->ccp_state == CCST_DRTGNT)
-	{
-		/* If first request is after quantum expired, one extra tick to try and get writes off */
-		if (db->drop_lvl == 0)
-		{
-			if (!db->extra_tick_started)
-			{
-				/* db->glob_sec->wcs_active_lvl -= db->glob_sec->n_bts / 2 - 7; */
-				db->extra_tick_started = TRUE;
-				status = sys$setimr(0, &db->glob_sec->ccp_tick_interval, ccp_extra_tick, &db->extra_tick_id, 0);
-				if (status == SS$_NORMAL)
-					return;
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			}
-			else
-				if (!db->extra_tick_done)
-					return;
-			db->extra_tick_started = db->extra_tick_done
-					       = FALSE;
-		}
-		assert(!db->tick_in_progress);
-		db->segment->nl->ccp_crit_blocked = TRUE;
-		if (db->segment->nl->in_crit == 0  &&  db->glob_sec->freeze == 0)
-		{
-			request.action = CCTR_EXITWM;
-			request.pid = 0;
-			request.v.exreq.fid = FILE_INFO(db->greg)->file_id;
-			request.v.exreq.cycle = db->segment->nl->ccp_cycle;
-			ccp_act_request(&request);
-		}
-	}
-	else
-		if (!db->quantum_expired  &&  db->wmexit_requested  &&  db->drop_lvl == 0)
-		{
-			/* Gradually drop active_lvl to reduce the number of dirty
-			   buffers the CCP has to write upon releasing write mode */
-			sys$gettim(curr_time);
-			lib$sub_times(&db->start_wm_time, curr_time, result_time);
-			ticks_left = result_time[0] / db->glob_sec->ccp_tick_interval[0];
-			if (ticks_left >= 1)
-				db->drop_lvl = (db->glob_sec->n_bts / 2 - 7) / ticks_left;
-		}
-
-	return;
-}
-
-/***********************************************************************
-Write mode may not be exited while a GT.M process is processing in the critical
-section.  In order to ensure this, the following scheme is used:
-
-THIS ROUTINE:
- 1. crit_blocked <-- 1
- 2. if crit is not owned then raise request for CCTR_EXITWM
-
-GRAB_CRIT:
- 1. Get critical section
- 2. If crit_blocked is set
-	A. Raise request for CCTR_EXITWM, wait for WMEXIT to complete
-	B. If not write mode, request write mode, wait to enter write mode
-
-REL_CRIT:
- 1. Acquire cycle number
- 1. Release critical section
- 2. If crit_blocked is set
-	A. Raise request for CCTR_EXITWM for cycle number,
-		wait for WMEXIT to complete
-
-Requests for CCTR_EXITWM include the cycle number.  If duplicates or 'obsolete'
-requests are received, they are ignored.  For duplicate requests, i.e., the CCP
-is currently in the process of releasing write mode for the indicated cycle,
-the process id is stored to be issued a wake up when the exiting process is
-completed.
-
-The cycle must be acquired prior to releasing the critical section as the
-database could cycle between the time that crit is released and the ccp acts on
-the message, as during that time, either the ccp or another process that enters
-crit could initiate an WMEXIT.
-
-This routine will not enter a request to exit write mode in the queue if the
-critical section is owned as, having set the crit_blocked flag, it is
-guaranteed that a GT.M process will send such a request.  This routine must set
-the flag and then check crit, and REL_CRIT must release crit and then check the
-flag in order to guarantee an exit write mode request being issued.
-
-An exit write mode request must be issued from REL_CRIT because it can not be
-guaranteed that another process will ever enter the critical section.
-
-This scheme leaves a small hole open because of the possible interaction of a
-second GT.M process.  With the use of only two boolean flags (in crit and crit
-blocked) concurrency control cannot be guaranteed with the interaction of three
-processes.  The hole is shown by the following sequence of events:
-
-	1. GTM1 enters crit
-	2. GTM1 releases crit
-	3. GTM2 enters crit
-	4. GTM2 checks ccp_crit_blocked, finds it clear and begins processing
-	5. CCP sets crit blocked
-	6. CCP checks in_crit, finds it non-zero and returns
-	7. GTM1 checks crit_blocked, finds it set and issues an WMEXIT request
-	8. CCP processes the WMEXIT request while GTM2 is processing in crit
-
-To remove this hole, another flag or the use of a state flag and state
-transistions rather than a boolean flag might be utilised.  Currently, it is
-detected rather than prevented.  This is done in CCP_TR_EXITWM by checking when
-the request has come from a GTM process to see if the critical section is
-owned.  If it is and the process holding it is not the process that issued the
-WMEXIT request, then a second process has slipped through the hole.  In this
-case, the WMEXIT request is ignored, as the second process will issue a request
-upon leaving the critical section.  The process id is stored so that upon
-completion of the exiting process, the GTM process will be issued a wakeup.
-Should the check be done after the second process has already left the critical
-section, the CCP will continue exiting write mode.  It will receive a second
-spurious request that will be ignored.  (And possibly even a third request from
-a process entering the critical section which will also be ignored).
-
-Two optimizations have been conceived to reduce the chances of a process
-holding the critical section during the period that the database is not in read
-mode.  The first of these is to have all GTM processes ensure that they are in
-write mode before they attempt to grab the critical section.  The second is to
-have GTM processes wait until the ccp_crit_blocked flag is clear before
-attempting to grab the critical section.  This second optimization is not
-currently implemented, because the use of CCP_USERWAIT requires that the
-process receive a wakeup from the CCP.  To do this it must send a message and
-the only appropriate message is a request for write mode.  Because the database
-is currently in write mode, waiting to exit it, this results in a stream of
-spurious messages being sent that clog the CCP's queues and mailbox.  To
-implement this optimization will require a spin wait loop of some sort or the
-introduction of a new message type allowing a GTM process to wait on the
-clearing of the ccp_crit_blocked flag rather than on being in write mode.
-If this optimization is implemented, the call to CCP_USERWAIT could be
-eliminated from REL_CRIT.
-
-***********************************************************************/
diff --git a/sr_vvms/ccp_exitwm_blkast.c b/sr_vvms/ccp_exitwm_blkast.c
deleted file mode 100644
index 5a4dd17..0000000
--- a/sr_vvms/ccp_exitwm_blkast.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-
-
-/* Blocking AST routine entered when there is a Write-mode request from another machine */
-
-void ccp_exitwm_blkast(ccp_db_header	**pdb)
-{
-	ccp_db_header	*db;
-
-
-	db = *pdb;
-	db->blocking_ast_received = TRUE;
-
-	if (!db->wmexit_requested  &&  CCP_SEGMENT_STATE(db->segment->nl, CCST_MASK_WRITE_MODE))
-	{
-		db->wmexit_requested = TRUE;
-		if (!db->quantum_expired  &&  db->segment->nl->ccp_state == CCST_DRTGNT)
-			ccp_tick_start(db);
-		ccp_exitwm_attempt(db);
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_extra_tick.c b/sr_vvms/ccp_extra_tick.c
deleted file mode 100644
index 3e43d1d..0000000
--- a/sr_vvms/ccp_extra_tick.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-
-void ccp_extra_tick(ccp_db_header **p)
-{
-	ccp_db_header *db;
-
-	assert(lib$ast_in_prog());
-	db = *p;
-	db->extra_tick_done = 1;
-	ccp_exitwm_attempt(db);
-	return;
-}
diff --git a/sr_vvms/ccp_format_querec.c b/sr_vvms/ccp_format_querec.c
deleted file mode 100644
index 5bb58ca..0000000
--- a/sr_vvms/ccp_format_querec.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include <descrip.h>
-#include "probe.h"
-
-
-unsigned char *ccp_format_time(
-date_time *tim,
-unsigned char *inaddr,
-unsigned short maxlen)
-{
-	globalvalue LIB$M_TIME_FIELDS;
-	struct dsc$descriptor_s dx;
-	short outlen;
-	unsigned int flags = LIB$M_TIME_FIELDS;
-
-	dx.dsc$w_length = maxlen;
-	dx.dsc$b_dtype = DSC$K_DTYPE_T;
-	dx.dsc$b_class = DSC$K_CLASS_S;
-	dx.dsc$a_pointer = inaddr;
-	lib$format_date_time(&dx, tim, 0, &outlen, &flags);
-	return inaddr + outlen;
-}
-
-
-unsigned char *ccp_fqstr(
-unsigned char *str,
-unsigned char *cp,
-unsigned int maxlen)
-{
-	int n;
-	for (n = 0 ; n < maxlen && *cp ; n++)
-		*str++ = *cp++;
-	return str;
-}
-
-
-#define CCP_TABLE_ENTRY(A,B,C,D) "A",
-static	const unsigned char	names[][16] =
-{
-#include "ccpact_tab.h"
-};
-#undef CCP_TABLE_ENTRY
-
-#define CCP_TABLE_ENTRY(A,B,C,D) C,
-static	const unsigned char	rectyp[] =
-{
-#include "ccpact_tab.h"
-};
-#undef CCP_TABLE_ENTRY
-
-
-unsigned char *ccp_format_querec(
-ccp_que_entry	*inrec,
-unsigned char	*outbuf,
-unsigned short	outbuflen)
-{
-	unsigned char		*out, *out1;
-	ccp_action_code		act;
-	ccp_action_record	*rec;
-	ccp_db_header		*db;
-	int			n;
-
-	rec = &inrec->value;
-	out = outbuf;
-	act = rec->action;
-	if (act < 0 || act >= CCPACTION_COUNT)
-	{
-		out = ccp_fqstr(out, "Action code not valid", outbuflen);
-		/* should add more info here */
-		return out;
-	}
-	out1 = out + 10;
-	out = ccp_fqstr(out, &names[act][5], SIZEOF(names[act]));
-	while (out < out1)
-		*out++ = ' ';
-	i2hex(rec->pid, out, SIZEOF(rec->pid) *2);
-	out += 8;
-	*out++ = ' ';
-	out = ccp_format_time(&inrec->request_time, out, outbuf + outbuflen - out);
-	*out++ = ' ';
-	out = ccp_format_time(&inrec->process_time, out, outbuf + outbuflen - out);
-	*out++ = ' ';
-	switch(rectyp[act])
-	{
-/* add info here */
-	case CCTVSTR:
-		out = ccp_fqstr(out, rec->v.str.txt, rec->v.str.len);
-		break;
-	case CCTVMBX:
-		break;
-	case CCTVFIL:
-		assert(rec->v.file_id.dvi[0] < SIZEOF(rec->v.file_id.dvi));
-		out = ccp_fqstr(out, &rec->v.file_id.dvi[1], rec->v.file_id.dvi[0]);
-		for (n = 0 ; n < SIZEOF(rec->v.file_id.did) / SIZEOF(rec->v.file_id.did[0]) ; n++)
-		{
-			*out++ = ' ';
-			i2hex(rec->v.file_id.did[n], out, SIZEOF(rec->v.file_id.did[n]) * 2);
-			out += SIZEOF(rec->v.file_id.did[n]) * 2;
-			/* note: wouldn't hurt tomodify i2hex to return end of string */
-		}
-		for (n = 0 ; n < SIZEOF(rec->v.file_id.fid) / SIZEOF(rec->v.file_id.fid[0]) ; n++)
-		{
-			*out++ = ' ';
-			i2hex(rec->v.file_id.fid[n], out, SIZEOF(rec->v.file_id.fid[n]) * 2);
-			out += SIZEOF(rec->v.file_id.fid[n]) * 2;
-		}
-		break;
-	case CCTVDBP:
-		db = rec->v.h;
-		if (probe(SIZEOF(*db),db,FALSE) && probe(SIZEOF(gd_region), db->greg, FALSE))
-		{	if (probe(SIZEOF(sgmnt_data),db->glob_sec,FALSE) &&
-				!memcmp(db->glob_sec->label, GDS_LABEL,GDS_LABEL_SZ -1))
-			{
-				assert(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.dvi[0]
-					< SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.dvi));
-				out = ccp_fqstr(out, &((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.dvi[1],
-						((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.dvi[0]);
-				for (n = 0 ; n <
-					SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.did)
-					/ SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.did[0]) ;
-					n++)
-				{
-					*out++ = ' ';
-					i2hex(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.did[n], out,
-					 SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.did[n]) * 2);
-					out +=
-					 SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.did[n]) * 2;
-					/* note: wouldn't hurt tomodify i2hex to return end of string */
-				}
-				for (n = 0 ;
-					n <
-					 SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.fid)
-					 / SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.fid[0]) ;
-					n++)
-				{
-					*out++ = ' ';
-					i2hex(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.fid[n],
-					 out,
-					 SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.fid[n]) * 2);
-					out +=
-					 SIZEOF(((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id.fid[n]) * 2;
-				}
-			}
-		}
-		break;
-	}
-	return out;
-}
diff --git a/sr_vvms/ccp_get_reg.c b/sr_vvms/ccp_get_reg.c
deleted file mode 100644
index 31e1564..0000000
--- a/sr_vvms/ccp_get_reg.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-GBLREF ccp_db_header *ccp_reg_root;
-
-ccp_db_header *ccp_get_reg(name)
-gds_file_id *name;
-{
-	ccp_db_header *ptr;
-
-	assert(!lib$ast_in_prog());
-	/* note: should use ordered list for more efficiency */
-	for ( ptr = ccp_reg_root ; ptr ; ptr = ptr->next)
-	{	if (!memcmp(name, &((vms_gds_info *)(ptr->greg->dyn.addr->file_cntl->file_info))->file_id, SIZEOF(gds_file_id)))
-			break;
-	}
-	return ptr;
-}
diff --git a/sr_vvms/ccp_get_reg_by_fab.c b/sr_vvms/ccp_get_reg_by_fab.c
deleted file mode 100644
index da2f2b2..0000000
--- a/sr_vvms/ccp_get_reg_by_fab.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-GBLREF ccp_db_header *ccp_reg_root;
-
-ccp_db_header *ccp_get_reg_by_fab(fb)
-struct FAB *fb;
-{
-	ccp_db_header *ptr;
-
-	assert(!lib$ast_in_prog());
-	for ( ptr = ccp_reg_root ; ptr && ((vms_gds_info *)(ptr->greg->dyn.addr->file_cntl->file_info))->fab != fb; ptr = ptr->next)
-		;
-	return ptr;
-}
diff --git a/sr_vvms/ccp_gotdrt_tick.c b/sr_vvms/ccp_gotdrt_tick.c
deleted file mode 100644
index 209769c..0000000
--- a/sr_vvms/ccp_gotdrt_tick.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-void ccp_gotdrt_tick( ccp_db_header *db)
-{
-
-	if (!db->tick_in_progress && !db->quantum_expired)
-	{	ccp_tick_start(db);
-	}
-	return;
-}
diff --git a/sr_vvms/ccp_init.c b/sr_vvms/ccp_init.c
deleted file mode 100644
index ab87329..0000000
--- a/sr_vvms/ccp_init.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2007 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <jpidef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-#include "gtm_inet.h"
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ladef.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "gdscc.h"
-#include "locks.h"
-#include "gdskill.h"
-#include "buddy_list.h"
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "getjobnum.h"
-#include "lmdef.h"
-#include "dfntmpmbx.h"
-#include "init_secshr_addrs.h"
-
-typedef struct{
-int4	link;
-int4	*exit_hand;
-int4	arg_cnt;
-int4	*cond_val;
-} desblk;
-
-GBLDEF int4		ccp_exi_condition;
-GBLDEF desblk		ccp_exi_blk;
-GBLDEF unsigned short	ccp_channel;
-GBLDEF ccp_db_header	*ccp_reg_root = 0;
-
-GBLREF bool		checkdb_timer;
-GBLREF bool		ccp_dump_on;
-GBLREF bool		licensed;
-GBLREF int4		lkid, lid;
-
-LITREF int4		ccp_prd_len;
-LITREF char		ccp_prd_name[];
-LITREF char		ccp_ver_name[];
-LITREF int4		ccp_ver_len;
-OS_PAGE_SIZE_DECLARE
-
-static unsigned char	old_name_str[15];
-static uint4		name_status;
-static $DESCRIPTOR(old_proc_name, old_name_str);
-
-void
-ccp_init(void)
-{
-	uint4			status, grp_num, prvadr[2], prvprv[2];
-	mstr			lnm$system = {10, "LNM$SYSTEM"};
-	unsigned short		out_len;
-	$DESCRIPTOR(proc_name, CCP_PRC_NAME);
-	$DESCRIPTOR(desc, "GTM$CLSTLK");
-	$DESCRIPTOR(lognam, CCP_MBX_NAME);
-	error_def(ERR_CCPGRP);
-	error_def(ERR_CCPNAME);
-	error_def(ERR_CCPMBX);
-	error_def(ERR_WILLEXPIRE);
-	error_def(LP_NOCNFDB);
-	error_def(LP_INVCSM);
-	int4	lic_status;			/* license status	*/
-	int4	inid = 0;			/* initial node number	*/
-	int4	mdl = 0;			/* hw. nodel		*/
-	int4	nid = 0;			/* node number		*/
-	int4	days = 0;			/* days to expiration	*/
-	int4	lic_x;				/* license value	*/
-	char	*h = NULL;			/* license data base	*/
-	char	*pak = NULL;			/* license pak		*/
-	struct dsc$descriptor_s dprd;
-	struct dsc$descriptor_s dver;
-	int4	thirty_sec[2] = { -300000000 , -1};
-
-        ccp_dump_on = 1;
-	dprd.dsc$w_length = ccp_prd_len;
-	dprd.dsc$b_dtype = DSC$K_DTYPE_T;
-	dprd.dsc$b_class = DSC$K_CLASS_S;
-	dprd.dsc$a_pointer = ccp_prd_name;
-	dver.dsc$w_length = ccp_ver_len;
-	dver.dsc$b_dtype = DSC$K_DTYPE_T;
-	dver.dsc$b_class = DSC$K_CLASS_S;
-	dver.dsc$a_pointer = ccp_ver_name;
-	licensed = TRUE;
-	lic_status = SS$_NORMAL;
-	lkid = 2;
-#ifndef NOLICENSE
-	lic_status = ((NULL == (h = la_getdb(LMDB))) ? LP_NOCNFDB : SS$_NORMAL);
-#endif
-#ifndef DEBUG
-	status = lib$getjpi(&JPI$_GRP, 0, 0, &grp_num, 0, 0);
-	if (0 == (status & 1))
-		lib$signal(ERR_CCPGRP, 0, status);
-	if (1 != grp_num)
-		lib$signal(ERR_CCPGRP);
-#endif
-	name_status = lib$getjpi(&JPI$_PRCNAM, 0, 0, 0, &old_proc_name, &out_len);
-	old_proc_name.dsc$w_length = out_len;
-	status = sys$setprn(&proc_name);
-	if (0 == (status & 1))
-		lib$signal(ERR_CCPNAME, 0, status);
-#ifndef NOLICENSE
-	lic_status = ((1 == (lic_status & 1)) ? lm_mdl_nid(&mdl, &nid, &inid) : lic_status);
-#endif
-	getjobnum();
-	INVOKE_INIT_SECSHR_ADDRS;
-	prvadr[1] = 0;
-	prvadr[0] = PRV$M_SYSLCK | PRV$M_SYSNAM | PRV$M_OPER;
-	status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-	if (0 == (status & 1))
-		lib$signal(status);
-#ifdef	NOLICENSE
-	lid = 1;
-	lic_x = 32767;
-#else
-	lic_status = ((1 == (lic_status & 1)) ? lp_licensed(h, &dprd, &dver, mdl, nid, &lid, &lic_x, &days, pak) : lic_status);
-#endif
-	dfntmpmbx(lnm$system.len, lnm$system.addr);
-	status = sys$crembx(0, &ccp_channel, 0, 0, 0, 0, &lognam);
-	if (0 == (status & 1))
-		lib$signal(ERR_CCPMBX, 0, status);
-	ccp_act_init();
-#ifndef NOLICENSE
-	if (LP_NOCNFDB != lic_status)
-		la_freedb(h);
-	if (1 == (lic_status & 1))
-	{
-		licensed = TRUE;
-		if (days < 14)
-			rts_error(VARLSTCNT(1) ERR_WILLEXPIRE);
-	} else
-	{
-		licensed = FALSE;
-		/* if (LP_INVCSM != lic_status) */
-			rts_error(VARLSTCNT(1) lic_status);
-	}
-#endif
-	ccp_mbx_start();
-	ccp_exi_blk.exit_hand = &ccp_rundown;
-	ccp_exi_blk.arg_cnt = 1;
-	ccp_exi_blk.cond_val = &ccp_exi_condition;
-	sys$dclexh(&ccp_exi_blk);
-	sys$setimr(0, &thirty_sec[0], ccp_tr_checkdb, 0, 0);
-	checkdb_timer = TRUE;
-	return;
-}
-
-void
-ccp_exit(void)
-{
-	error_def(ERR_OPRCCPSTOP);
-
-	if (name_status & 1)
-		sys$setprn(&old_proc_name);
-	lib$signal(ERR_OPRCCPSTOP);
-}
diff --git a/sr_vvms/ccp_lkdowake_blkast.c b/sr_vvms/ccp_lkdowake_blkast.c
deleted file mode 100644
index 4a65c83..0000000
--- a/sr_vvms/ccp_lkdowake_blkast.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-/* blocking ast for lock wake up, request from another machine to do a lock wake up */
-
-void ccp_lkdowake_blkast(db)
-ccp_db_header *db;
-{
-	assert(lib$ast_in_prog());
-	db->remote_wakeup = TRUE;
-	return;
-}
diff --git a/sr_vvms/ccp_lkrqwake1.c b/sr_vvms/ccp_lkrqwake1.c
deleted file mode 100644
index 2af74b1..0000000
--- a/sr_vvms/ccp_lkrqwake1.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "locks.h"
-#include <lckdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-
-
-/* AST routine entered on completion of CR mode lock conversion request
-   in ccp_opendb3c, ccp_tr_lkrqwake, ccp_tr_writedb1, or here */
-
-void ccp_lkrqwake1( ccp_db_header *db)
-{
-	uint4	status;
-
-
-        assert(lib$ast_in_prog());
-
-	if (db->lock_iosb.cond == SS$_NORMAL)
-		return;
-
-	ccp_signal_cont(db->lock_iosb.cond);	/***** Is this reasonable? *****/
-
-	if (db->lock_iosb.cond == SS$_DEADLOCK)
-	{
-		/* Just try again */
-		status = ccp_enq(0, LCK$K_CRMODE, &db->lock_iosb, LCK$M_CONVERT | LCK$M_SYNCSTS, NULL, 0,
-				 ccp_lkrqwake1, db, ccp_lkdowake_blkast, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_mbx_manager.c b/sr_vvms/ccp_mbx_manager.c
deleted file mode 100644
index 284f8cb..0000000
--- a/sr_vvms/ccp_mbx_manager.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include <iodef.h>
-#include <efndef.h>
-
-
-GBLREF	unsigned short	ccp_channel;
-static bool mailbox_running = FALSE;
-
-static void ccp_mbx_interrupt(void);
-
-void ccp_mbx_start(void)
-{
-	uint4 status;
-	error_def(ERR_CCPMBX);
-
-	if (mailbox_running)
-		return;
-	mailbox_running = TRUE;
-	status = sys$qio(0, ccp_channel, (IO$_SETMODE|IO$M_WRTATTN), 0,0,0, ccp_mbx_interrupt,0 ,0 ,0 ,0 ,0);
-	if ((status & 1) == 0)
-		lib$signal(ERR_CCPMBX, 0 , status);
-	return;
-}
-
-static void ccp_mbx_interrupt(void)
-{
-	ccp_action_record buff;
-	unsigned short mbsb[4];
-	bool more_room;
-	uint4 status;
-	error_def(ERR_CCPMBX);
-
-	mailbox_running = FALSE;
-	status = sys$qiow(EFN$C_ENF, ccp_channel, (IO$_READVBLK | IO$M_NOW), &mbsb[0], 0, 0, &buff,
-						SIZEOF(buff), 0, 0, 0, 0);
-	if (status & 1)
-		status = mbsb[0];
-	if ((status & 1) == 0)
-		lib$signal(ERR_CCPMBX, 0, status);
-	more_room = ccp_act_request(&buff);
-	if (more_room)
-		ccp_mbx_start();
-	return;
-}
diff --git a/sr_vvms/ccp_opendb.c b/sr_vvms/ccp_opendb.c
deleted file mode 100644
index d823bed..0000000
--- a/sr_vvms/ccp_opendb.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include <fab.h>
-#include <nam.h>
-
-void ccp_opendb( ccp_action_record *rec)
-{
-	ccp_db_header *db;
-	struct NAM *ccp_nam;
-	struct FAB *ccp_fab;
-	uint4 status;
-	int size;
-
-	db = malloc(SIZEOF(*db));
-	memset(db, 0, SIZEOF(*db));
-	db->write_wait.last = &db->write_wait.first;
-	db->flu_wait.last = &db->flu_wait.first;
-	db->exitwm_wait.last = &db->exitwm_wait.first;
-	db->reopen_wait.last = &db->reopen_wait.first;
-	ccp_pndg_proc_add(&db->write_wait, rec->pid);
-	db->greg = malloc(SIZEOF(*db->greg));
-	memset(db->greg, 0, SIZEOF(*db->greg));
-	db->greg->dyn.addr = malloc(SIZEOF(gd_segment));
-	memset(db->greg->dyn.addr, 0, SIZEOF(gd_segment));
-	FILE_CNTL_INIT(db->greg->dyn.addr);
-	ccp_fab = ((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->fab = malloc(SIZEOF(struct FAB));
-	*ccp_fab = cc$rms_fab;
-	ccp_nam = malloc(SIZEOF(*ccp_nam));
-	*ccp_nam = cc$rms_nam;
-	ccp_fab->fab$l_nam = ccp_nam;
-	db->greg->dyn.addr->acc_meth = dba_bg;
-	((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id = rec->v.file_id;
-	db->segment = &((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->s_addrs;
-/* Malloc a temporary local node struct so can mark the state, necessary for processing of CCP_TR_WRITEDB from other processes */
-	db->segment->nl = malloc(SIZEOF(node_local));
-	db->segment->nl->ccp_state = CCST_OPNREQ;
-	db->segment->now_crit = 0;
-	ccp_add_reg(db);
-	memcpy(ccp_nam->nam$t_dvi,rec->v.file_id.dvi,SIZEOF(rec->v.file_id.dvi));
-	memcpy(ccp_nam->nam$w_did,rec->v.file_id.did, SIZEOF(rec->v.file_id.did));
-	memcpy(ccp_nam->nam$w_fid,rec->v.file_id.fid, SIZEOF(rec->v.file_id.fid));
-	ccp_fab->fab$l_fop = (FAB$M_UFO | FAB$M_NAM | FAB$M_CBT);
-	ccp_fab->fab$b_fac = (FAB$M_PUT | FAB$M_GET | FAB$M_BIO);
-	ccp_fab->fab$b_rtv = WINDOW_ALL;
-	ccp_fab->fab$b_shr = (FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI);
-	db->extra_tick_id = db->tick_timer_id = db->quantum_timer_id = db->exitwm_timer_id =
-		db->wmcrit_timer_id = db->close_timer_id = db;
-	sys$open(ccp_fab, ccp_opendb1e, ccp_opendb1a);
-	ccp_quemin_adjust(CCP_OPEN_REGION);
-	return;
-}
diff --git a/sr_vvms/ccp_opendb1.c b/sr_vvms/ccp_opendb1.c
deleted file mode 100644
index 00f2700..0000000
--- a/sr_vvms/ccp_opendb1.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-
-/* AST routine entered on completion of sys$qio to read database file header in ccp_tr_opendb1a */
-
-void ccp_opendb1( ccp_db_header	*db)
-{
-	ccp_action_record	request;
-
-
-	assert(lib$ast_in_prog());
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	request.action = CCTR_OPENDB1;
-	request.pid = 0;
-	request.v.h = db;
-	ccp_act_request(&request);
-
-	return;
-}
diff --git a/sr_vvms/ccp_opendb1a.c b/sr_vvms/ccp_opendb1a.c
deleted file mode 100644
index e83dadd..0000000
--- a/sr_vvms/ccp_opendb1a.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-void ccp_opendb1a( struct FAB *fb)
-/* entered after sucessful sys$open from ccp_opendb */
-{
-	ccp_action_record buff;
-
-	buff.action = CCTR_OPENDB1A;
-	buff.pid = 0;
-	buff.v.fab = fb;
-	ccp_act_request(&buff);
-	return;
-}
-
diff --git a/sr_vvms/ccp_opendb1e.c b/sr_vvms/ccp_opendb1e.c
deleted file mode 100644
index f40ff53..0000000
--- a/sr_vvms/ccp_opendb1e.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-void ccp_opendb1e( struct FAB *fb)
-/* entered after failure sys$open from ccp_opendb */
-{
-	ccp_action_record buff;
-
-	buff.action = CCTR_OPENDB1E;
-	buff.pid = 0;
-	buff.v.fab = fb;
-	ccp_act_request(&buff);
-	return;
-}
-
diff --git a/sr_vvms/ccp_opendb2.c b/sr_vvms/ccp_opendb2.c
deleted file mode 100644
index a5a060e..0000000
--- a/sr_vvms/ccp_opendb2.c
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "mlkdef.h"
-#include "jnl.h"
-#include "locks.h"
-#include <descrip.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <psldef.h>
-#include <secdef.h>
-#include <ssdef.h>
-#include "min_max.h"
-#include "mem_list.h"
-#include "init_sec.h"
-
-OS_PAGE_SIZE_DECLARE
-
-GBLREF	mem_list	*mem_list_head;
-
-
-/* AST routine entered on completion of PW mode lock conversion request
-   in ccp_tr_opendb1, ccp_tr_opendb1b, or here */
-
-void ccp_opendb2(ccp_db_header *db)
-{
-	uint4		status;
-	unsigned char		section_name[GLO_NAME_MAXLEN];
-	struct dsc$descriptor_s name_dsc;
-	int4			size;
-	sgmnt_addrs		*csa;
-	sgmnt_data		*csd;
-	mem_list		*ml_ptr;
-
-
-	assert(lib$ast_in_prog());
-
-	if (db->wm_iosb.cond != SS$_NORMAL  &&  db->wm_iosb.cond != SS$_VALNOTVALID)
-	{
-		ccp_signal_cont(db->wm_iosb.cond);	/***** Is this reasonable? *****/
-
-		if (db->wm_iosb.cond == SS$_DEADLOCK)
-		{
-			/* Just try again */
-			/* Convert Write-mode lock from Null to Protected Write, reading the lock value block */
-			status = ccp_enq(0, LCK$K_PWMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-					 ccp_opendb2, db, NULL, PSL$C_USER, 0);
-			/***** Check error status here? *****/
-			return;
-		}
-	}
-
-	csa = db->segment;
-	if (csa->hdr->lock_space_size == 0)
-		if (csa->hdr->n_bts * csa->hdr->blk_size <= DEF_LOCK_SIZE)
-			csa->hdr->lock_space_size = csa->hdr->n_bts * csa->hdr->blk_size;
-		else
-		{
-			csa->hdr->lock_space_size = DEF_LOCK_SIZE;
-
-			/* REPLACE THIS WITH FREE_SPACE WHEN NEXT BASELINE MADE */
-			csa->hdr->free_space = csa->hdr->n_bts * csa->hdr->blk_size - DEF_LOCK_SIZE;
-		}
-
-	size = DIVIDE_ROUND_UP((LOCK_BLOCK(csa->hdr) * DISK_BLOCK_SIZE) + LOCK_SPACE_SIZE(csa->hdr) + CACHE_CONTROL_SIZE(csa->hdr)
-			+ NODE_LOCAL_SPACE(csa->hdr) + JNL_SHARE_SIZE(csa->hdr), OS_PAGELET_SIZE);
-
-	status = gtm_expreg(size, csa->db_addrs, PSL$C_USER, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	assert(csa->db_addrs[1] == csa->db_addrs[0] + OS_PAGELET_SIZE * size - 1);
-	csa->db_addrs[1] = csa->db_addrs[0] + OS_PAGELET_SIZE * (size - OS_PAGE_SIZE/OS_PAGELET_SIZE) - 1;
-
-	for (ml_ptr = mem_list_head; ml_ptr != NULL; ml_ptr = ml_ptr->next)
-		if (csa->db_addrs[0] == ml_ptr->addr)
-			break;
-	assert (ml_ptr);
-	db->mem_ptr = ml_ptr;
-	global_name("GT$S", &FILE_INFO(db->greg)->file_id, section_name);
-	name_dsc.dsc$a_pointer = &section_name[1];
-	name_dsc.dsc$w_length = section_name[0];
-	name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	status = init_sec(csa->db_addrs, &name_dsc, 0, size - OS_PAGE_SIZE/OS_PAGELET_SIZE,
-			  SEC$M_GBL | SEC$M_DZRO | SEC$M_WRT | SEC$M_PAGFIL | SEC$M_SYSGBL | SEC$M_PERM);
-	if (status != SS$_NORMAL  &&  status != SS$_CREATED)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	memcpy(csa->db_addrs[0], csa->hdr, SIZEOF(sgmnt_data));
-	free (csa->hdr);
-	csa->hdr = csa->db_addrs[0];
-
-	csa->critical = csa->db_addrs[0] + (LOCK_BLOCK(csa->hdr) * DISK_BLOCK_SIZE) + LOCK_SPACE_SIZE(csa->hdr)
-			+ CACHE_CONTROL_SIZE(csa->hdr);
-	assert((-(SIZEOF(int4) * 2) & (uint4)csa->critical) == (uint4)csa->critical);	/* DB64 */
-	mutex_init(csa->critical, NUM_CRIT_ENTRY(csa->hdr), FALSE);
-
-	free(csa->nl);
-	csa->nl = (char *)csa->critical + CRIT_SPACE(NUM_CRIT_ENTRY(csa->hdr));
-	csa->nl->ccp_state = CCST_OPNREQ;
-
-	status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_opendb3, db,
-			 &csa->hdr->trans_hist, BT_SIZE(csa->hdr) + SIZEOF(th_index), TH_BLOCK, 0, 0, 0);
-	if ((status & 1) == 0)
-	{
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		ccp_close1(db);
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_opendb3.c b/sr_vvms/ccp_opendb3.c
deleted file mode 100644
index 8eb2285..0000000
--- a/sr_vvms/ccp_opendb3.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-
-/* AST routine entered on completion of sys$qio to read transaction history in ccp_opendb2 */
-
-void ccp_opendb3( ccp_db_header	*db)
-{
-	ccp_action_record	request;
-
-
-	assert(lib$ast_in_prog());
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	request.action = CCTR_OPENDB3;
-	request.pid = 0;
-	request.v.h = db;
-	ccp_act_request(&request);
-
-	return;
-}
diff --git a/sr_vvms/ccp_opendb3a.c b/sr_vvms/ccp_opendb3a.c
deleted file mode 100644
index 4b7d565..0000000
--- a/sr_vvms/ccp_opendb3a.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "ccp_opendb3a.h"
-
-void ccp_opendb3a( ccp_db_header *db)
-{
-	ccp_action_record buff;
-
-	if ((db->wm_iosb.cond & 1) == 0)
-		lib$signal(db->wm_iosb.cond);
-	buff.action = CCTR_OPENDB3A;
-	buff.pid = 0;
-	buff.v.h = db;
-	ccp_act_request(&buff);
-	return;
-}
diff --git a/sr_vvms/ccp_opendb3a.h b/sr_vvms/ccp_opendb3a.h
deleted file mode 100644
index 374ad40..0000000
--- a/sr_vvms/ccp_opendb3a.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __CCP_OPENDB3A_H__
-#define __CCP_OPENDB3A_H__
-
-void ccp_opendb3a(ccp_db_header *db);
-
-#endif
diff --git a/sr_vvms/ccp_opendb3b.c b/sr_vvms/ccp_opendb3b.c
deleted file mode 100644
index 95ba539..0000000
--- a/sr_vvms/ccp_opendb3b.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <iodef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-
-void ccp_opendb3b( ccp_db_header *db)
-{
-	uint4	status;
-
-
-	db->glob_sec->trans_hist.early_tn = db->glob_sec->trans_hist.curr_tn;
-
-	status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_WRITEVBLK, &db->qio_iosb, ccp_opendb3c, db,
-			 db->segment->db_addrs[0], (MM_BLOCK + 1) * 512 + MASTER_MAP_SIZE_V4, 1, 0, 0, 0);
-	if ((status & 1) == 0)
-	{
-		ccp_close1(db);
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_opendb3c.c b/sr_vvms/ccp_opendb3c.c
deleted file mode 100644
index 011133a..0000000
--- a/sr_vvms/ccp_opendb3c.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <psldef.h>
-#include <lckdef.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gdsblk.h"
-#include "ccp.h"
-#include "jnl.h"
-#include "locks.h"
-#include "mlk_shr_init.h"
-
-error_def(ERR_CCPJNLOPNERR);
-
-/* AST routine entered on completion of sys$qio to update header in ccp_opendb3b */
-void ccp_opendb3c(ccp_db_header *db)
-{
-	char		*c;
-	sgmnt_addrs	*csa;
-	sgmnt_data	*csd;
-	unsigned int	i;
-	uint4	status;
-
-	assert(lib$ast_in_prog());
-
-	csa = db->segment;
-	csd = csa->hdr;
-
-	if (JNL_ENABLED(csd))
-		if (db->wm_iosb.valblk[CCP_VALBLK_JNL_ADDR] == 0)
-		{
-			db->wm_iosb.valblk[CCP_VALBLK_JNL_ADDR] = csa->jnl->jnl_buff->freeaddr;
-			db->wm_iosb.valblk[CCP_VALBLK_EPOCH_TN] = csa->jnl->jnl_buff->epoch_tn;
-			/* lastaddr is no longer a field in jnl_buff
-			 *	db->wm_iosb.valblk[CCP_VALBLK_LST_ADDR] = csa->jnl->jnl_buff->lastaddr;
-			 */
-		}
-		else
-		{
-			/* Open journal file, not first machine */
-			jnl_file_open(db->greg, FALSE, ccp_closejnl_ast);
-			if (csa->jnl->channel == 0)
-			{
-				ccp_close1(db);
-				ccp_signal_cont(ERR_CCPJNLOPNERR);	/***** Is this reasonable? *****/
-			}
-			csa->jnl->jnl_buff->before_images = csd->ccp_jnl_before;
-		}
-
-	db->wm_iosb.valblk[CCP_VALBLK_TRANS_HIST] = csd->trans_hist.curr_tn + csd->trans_hist.lock_sequence;
-
-	/* Convert Write-mode lock from Protected Write to Concurrent Read, writing the lock value block */
-	status = ccp_enqw(EFN$C_ENF, LCK$K_CRMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-			  NULL, 0, NULL, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-	i = SIZEOF(sgmnt_data);
-	assert((-(SIZEOF(int4) * 2) & i) == i);		/* check quadword alignment */
-	csa->nl->bt_header_off = i;
-	csa->nl->th_base_off = (i += csd->bt_buckets * SIZEOF(bt_rec));
-	csa->nl->th_base_off += SIZEOF(que_ent);		/* Skip over links for hash table queue */
-	csa->nl->bt_base_off = i + SIZEOF(bt_rec);		/* one unused rec to anchor TH queue */
-	bt_init(csa);
-	csa->nl->cache_off = -CACHE_CONTROL_SIZE(csd);
-	db_csh_ini(csa);
-	bt_que_refresh(db->greg);
-	db_csh_ref(csa, TRUE);
-	mlk_shr_init(csa->lock_addrs[0], csd->lock_space_size, csa, (FALSE == db->greg->read_only));
-	db->greg->open = TRUE;
-
-	/* Convert M-lock lock from Null to Concurrent Read, and establish a blocking AST routine */
-	status = ccp_enq(0, LCK$K_CRMODE, &db->lock_iosb, LCK$M_CONVERT | LCK$M_SYNCSTS, NULL, 0,
-			 ccp_lkrqwake1, db, ccp_lkdowake_blkast, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-/*	csd->glob_sec_init = TRUE;	this field is not used by vms or the ccp */
-	if (csd->staleness[0] != 0  ||  csd->staleness[1] != 0)		/* if values are 0, no stale timer */
-		 db->stale_timer_id = db;
-
-	ccp_request_write_mode(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_pndg_proc_add.c b/sr_vvms/ccp_pndg_proc_add.c
deleted file mode 100644
index 25b9a81..0000000
--- a/sr_vvms/ccp_pndg_proc_add.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-void ccp_pndg_proc_add(list, pid)
-ccp_wait_head *list;
-int4 pid;
-{
-	/* add a processes id to a ccp_wait list.
-	   we add at the end of the list so that wakeup's
-	   will be delivered to VMS in FIFO order
-	*/
-	ccp_wait *e;
-
-	for (e = list->first; e; e = e->next)
-	{	if (e->pid == pid)
-			return;
-	}
-	e = malloc(SIZEOF(*e));
-	e->pid = pid;
-	e->next = 0;
-	*(list->last) = &(e->next);
-	list->last = e;
-	return;
-}
diff --git a/sr_vvms/ccp_pndg_proc_wake.c b/sr_vvms/ccp_pndg_proc_wake.c
deleted file mode 100644
index 09dd379..0000000
--- a/sr_vvms/ccp_pndg_proc_wake.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "crit_wake.h"
-
-void ccp_pndg_proc_wake( ccp_wait_head *list)
-{
-	ccp_wait *e, *ex;
-
-	for (e = list->first ; e ; e = ex)
-	{
-		crit_wake(&e->pid);
-		ex = e->next;
-		free(e);
-	}
-	list->first = 0;
-	list->last = &list->first;
-	return;
-}
diff --git a/sr_vvms/ccp_quantum_interrupt.c b/sr_vvms/ccp_quantum_interrupt.c
deleted file mode 100644
index 6dfc3d0..0000000
--- a/sr_vvms/ccp_quantum_interrupt.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-
-void ccp_quantum_interrupt( ccp_db_header **p)
-{
-
-	ccp_db_header *db;
-
-	db = *p;
-	assert(lib$ast_in_prog());
-	if (!db->quantum_expired)
-	{
-		assert(db->segment->nl->ccp_state != CCST_WMXREQ);
-		if (db->tick_in_progress)
-		{
-			db->tick_in_progress = FALSE;
-			sys$cantim(&db->tick_timer_id, 0);
-		}
-		db->quantum_expired = TRUE;
-	}
-	ccp_exitwm_attempt(db);
-	return;
-}
diff --git a/sr_vvms/ccp_queue_manager.c b/sr_vvms/ccp_queue_manager.c
deleted file mode 100644
index 3a6aa58..0000000
--- a/sr_vvms/ccp_queue_manager.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccp_retchan_manager.h"
-#include "ast.h"
-#include <psldef.h>
-#include <ssdef.h>
-
-/* ccp_queue_manager - A package to manage ccp queue entries */
-
-#define NUM_QUE_SLOTS	100
-#define MIN_QUE_FREE	5
-#define QUE_EXTEND_SIZE	(NUM_QUE_SLOTS / 2)
-#define MAX_QUE_SIZE	1000
-
-GBLDEF	ccp_que_entry	*current_item;
-GBLDEF	ccp_relque	*ccp_action_que;
-
-error_def(ERR_CCPINTQUE);
-
-static	ccp_relque	*ccp_free_que;
-static	short int	ccp_que_entry_count, ccp_que_free_count, ccp_que_free_minimum;
-
-#define CCP_MAX_PRIORITY 3
-#define CCPR_HI		2
-#define CCPR_NOR	1
-#define CCPR_LOW	0
-
-#define CCP_TABLE_ENTRY(A,B,C,D) D,
-static	const unsigned char	priority[] =
-{
-#include "ccpact_tab.h"
-};
-#undef CCP_TABLE_ENTRY
-
-/* Get the first action available to process;  if NULL, queues were empty */
-
-ccp_action_record *ccp_act_select(void)
-{
-	ccp_relque	*p;
-	ccp_que_entry	*result;
-
-
-	assert(current_item == NULL);
-
-	for (p = &ccp_action_que[CCP_MAX_PRIORITY];  p > ccp_action_que;)
-	{
-		result = remqhi(--p);
-		if (result == -1)
-			lib$signal(ERR_CCPINTQUE);
-		else
-			if (result != NULL)
-				break;
-	}
-
-	if (result == NULL)
-		return NULL;
-
-	current_item = result;
-
-	return &result->value;
-}
-
-
-void ccp_act_complete(void)
-{
-	int4	status;
-
-
-	assert(current_item != NULL);
-	sys$gettim(&current_item->process_time);
-	status = insqti(current_item, ccp_free_que);
-	if (status == -1)
-		lib$signal(ERR_CCPINTQUE);
-
-	current_item = NULL;
-	adawi(1, &ccp_que_free_count);
-
-	if (ccp_que_free_count == ccp_que_free_minimum + MIN_QUE_FREE)
-	{
-		status = sys$dclast(ccp_mbx_start, 0, PSL$C_USER);
-		if (status != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-
-	return;
-}
-
-bool ccp_act_request(ccp_action_record *rec)
-{
-	ccp_action_code	act;
-	ccp_que_entry	*ptr;
-	/* need to deal with starvation */
-
-
-	act = rec->action;
-
-	if (act == CCTR_NULL)
-		return (ccp_que_free_count > ccp_que_free_minimum);
-
-	if (act <= 0 || act >= CCPACTION_COUNT)
-		GTMASSERT;
-
-	ptr = remqhi(ccp_free_que);
-	if (ptr == -1)
-		lib$signal(ERR_CCPINTQUE);
-	if (ptr == 0)
-		GTMASSERT;
-
-	adawi(-1, &ccp_que_free_count);
-
-	sys$gettim(&ptr->request_time);
-	ptr->value = *rec;
-	insqti(ptr, &ccp_action_que[priority[act]]);
-
-	sys$wake(NULL, NULL);
-
-	return (ccp_que_free_count > ccp_que_free_minimum);
-}
-
-
-/* Places the request at the head of the high priority queue */
-
-bool ccp_priority_request(ccp_action_record *rec)
-{
-	ccp_action_code	act;
-	ccp_que_entry	*ptr;
-	/* need to deal with starvation */
-
-
-	act = rec->action;
-
-	if (act == CCTR_NULL)
-		return (ccp_que_free_count > ccp_que_free_minimum);
-
-	if (act <= 0 || act >= CCPACTION_COUNT)
-		GTMASSERT;
-
-	ptr = remqhi(ccp_free_que);
-	if (ptr == -1)
-		lib$signal(ERR_CCPINTQUE);
-	if (ptr == 0)
-		GTMASSERT;
-
-	adawi(-1, &ccp_que_free_count);
-
-	sys$gettim(&ptr->request_time);
-	ptr->value = *rec;
-	insqhi(ptr, &ccp_action_que[priority[act]]);
-
-	sys$wake(NULL, NULL);
-
-	return (ccp_que_free_count > ccp_que_free_minimum);
-}
-
-void ccp_act_init(void)
-{
-	unsigned char	*ptr;
-	int		n, siz;
-
-
-	ccp_free_que = malloc(SIZEOF(ccp_relque));
-	memset(ccp_free_que, 0, SIZEOF(ccp_relque));
-
-	ccp_action_que = malloc(SIZEOF(ccp_relque) * CCP_MAX_PRIORITY);
-	memset(ccp_action_que, 0, SIZEOF(ccp_relque) * CCP_MAX_PRIORITY);
-
-	ccp_que_free_count = ccp_que_entry_count = NUM_QUE_SLOTS;
-	ccp_que_free_minimum = MIN_QUE_FREE;
-
-	if (SIZEOF(ccp_que_entry) & 7)
-		siz = (SIZEOF(ccp_que_entry) & ~7) + 8;
-	else
-		siz = SIZEOF(ccp_que_entry) ;
-	ptr = malloc(siz * ccp_que_entry_count);
-	/* set buffer space to zero in order to distinguish history records from never used records */
-	memset(ptr, 0, siz * ccp_que_entry_count);
-
-	for (n = 0;  n < ccp_que_entry_count;  n++, ptr += siz)
-	{
-		insqti(ptr, ccp_free_que);
-		/* could check for success here */
-	}
-
-	return;
-}
-
-
-void ccp_quemin_adjust(char oper)
-{
-	if (oper == CCP_OPEN_REGION && ccp_que_free_minimum < ccp_que_entry_count / 2)
-		ccp_que_free_minimum += 3;
-	else
-		if (oper == CCP_CLOSE_REGION && ccp_que_free_minimum > MIN_QUE_FREE)
-			ccp_que_free_minimum -= 3;
-
-	return;
-}
-
-#define PUTLIT(X)	ccp_retchan_text(context, LIT_AND_LEN(X));
-#define GETTAIL(X)	(((unsigned char *) (X)) + (X)->bl)
-
-
-void ccp_quedump1(ccp_action_record *tr)
-{
-	unsigned char	*endptr, *context, buffer[128];
-	ccp_que_entry	*qe;
-
-
-	context = ccp_retchan_init(&tr->v);
-
-	PUTLIT("HISTORY QUEUE CONTENTS:");
-
-	for (qe = GETTAIL(ccp_free_que);  qe != ccp_free_que;  qe = GETTAIL(&(qe->q)))
-		if (qe->value.action != CCTR_NULL)
-		{
-			endptr = ccp_format_querec(qe, buffer, SIZEOF(buffer));
-			ccp_retchan_text(context, buffer, endptr - buffer);
-		}
-
-	ccp_retchan_fini(context);
-
-	return;
-}
-
-
-void ccp_tr_quedump(ccp_action_record *tr)
-{
-	uint4	status;
-
-	/* Note: should add other requests here, also syntax in ccp might be sho que/history */
-
-	/* ccp_quedump1 needs to be in an AST to prevent ccp_mbx_interrupt from changing the queue */
-	status = sys$dclast(ccp_quedump1, tr, PSL$C_USER);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_release_name.c b/sr_vvms/ccp_release_name.c
deleted file mode 100644
index fd79d71..0000000
--- a/sr_vvms/ccp_release_name.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* ccp_release_name.c : defines product name and version for licensing
-
-*/
-#include "mdef.h"
-
-LITDEF char	ccp_prd_name[] = "GT.CX" ;
-LITDEF int4	ccp_prd_len    = SIZEOF(ccp_prd_name) - 1 ;
-LITDEF char	ccp_ver_name[] = "V120";
-LITDEF int4	ccp_ver_len    = SIZEOF(ccp_ver_name) - 1 ;
diff --git a/sr_vvms/ccp_reqdrtbuf_interrupt.c b/sr_vvms/ccp_reqdrtbuf_interrupt.c
deleted file mode 100644
index e703c13..0000000
--- a/sr_vvms/ccp_reqdrtbuf_interrupt.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "locks.h"
-#include <lckdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-
-
-/* AST routine entered on completion of EX mode lock conversion request
-   in ccp_tr_writedb1 (or here) granted (we hope) for got dirty buffers */
-
-void ccp_reqdrtbuf_interrupt( ccp_db_header *db)
-{
-	uint4		status;
-	ccp_action_record	request;
-
-
-	assert(lib$ast_in_prog());
-
-	if (db->flush_iosb.cond == SS$_NORMAL)
-	{
-		request.action = CCTR_GOTDRT;
-		request.pid = 0;
-		request.v.h = db;
-		ccp_act_request(&request);
-		return;
-	}
-
-	ccp_signal_cont(db->flush_iosb.cond);	/***** Is this reasonable? *****/
-
-	if (db->flush_iosb.cond == SS$_DEADLOCK)
-	{
-		/* Just try again */
-		status = ccp_enq(0, LCK$K_EXMODE, &db->flush_iosb, LCK$M_CONVERT | LCK$M_SYNCSTS, NULL, 0,
-				 ccp_reqdrtbuf_interrupt, db, NULL, PSL$C_USER, 0);
-		if (status == SS$_SYNCH)
-		{
-			request.action = CCTR_GOTDRT;
-			request.pid = 0;
-			request.v.h = db;
-			ccp_act_request(&request);
-		}
-		/***** Check error status here? *****/
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_request_write_mode.c b/sr_vvms/ccp_request_write_mode.c
deleted file mode 100644
index 0760f3e..0000000
--- a/sr_vvms/ccp_request_write_mode.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "locks.h"
-#include <lckdef.h>
-#include <psldef.h>
-
-GBLREF bool ccp_stop;
-
-
-void ccp_request_write_mode( ccp_db_header *db)
-{
-	uint4	status;
-
-
-	if (ccp_stop)
-		return;
-
-	db->write_mode_requested = TRUE;
-
-	if (db->stale_in_progress)
-	{
-		sys$cantim(&db->stale_timer_id, PSL$C_USER);
-		db->stale_in_progress = FALSE;
-	}
-
-	/* Convert Write-mode lock from Concurrent Read to Protected Write, reading the lock value block */
-	status = ccp_enq(0, LCK$K_PWMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-			 ccp_reqwm_interrupt, &db->wmcrit_timer_id, ccp_exitwm_blkast, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_reqwm_interrupt.c b/sr_vvms/ccp_reqwm_interrupt.c
deleted file mode 100644
index 4081fef..0000000
--- a/sr_vvms/ccp_reqwm_interrupt.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include <iodef.h>
-#include <ssdef.h>
-#include "ccp_writedb2.h"
-
-GBLREF	uint4		process_id;
-GBLREF sgmnt_addrs	*vms_mutex_check_csa;
-
-
-static	int4		delta_100_msec[2] = { -100000, -1 };
-
-
-/* AST routine entered on completion of PW mode lock conversion request in ccp_request_write_mode */
-
-void ccp_reqwm_interrupt(ccp_db_header **pdb)
-{
-	ccp_db_header	*db;
-	sgmnt_addrs	*csa;
-	uint4	status;
-
-
-	assert(lib$ast_in_prog());
-
-	db = *pdb;
-
-	csa = db->segment;
-	if (csa == NULL  ||  csa->nl->ccp_state == CCST_CLOSED)
-		return;
-	vms_mutex_check_csa = csa;
-	switch (db->wm_iosb.cond)
-	{
-	case SS$_DEADLOCK:
-		ccp_signal_cont(SS$_DEADLOCK);
-		/* Just try again */
-		ccp_request_write_mode(db);
-		return;
-
-	case SS$_CANCEL:
-		/* Lock cancelled by close */
-		return;
-
-	case SS$_VALNOTVALID:
-		/* Force reads from disk */
-		db->wm_iosb.valblk[CCP_VALBLK_TRANS_HIST] = 0;
-		db->last_lk_sequence = db->master_map_start_tn
-				     = 0;
-		/* Drop through ... */
-
-	case SS$_NORMAL:
-		if (db->wm_iosb.valblk[CCP_VALBLK_TRANS_HIST] == csa->ti->curr_tn + csa->ti->lock_sequence)
-		{
-			/* No change to current tn, do not need to update header */
-			if (csa->now_crit)
-			{
-				assert (csa->nl->in_crit == process_id);
-				csa->nl->in_crit = 0;
-				(void)mutex_unlockw(csa->critical, csa->critical->crashcnt, &csa->now_crit);
-				/***** Check error status here? *****/
-			}
-			ccp_writedb5(db);
-		}
-		else
-		{
-			if (csa->nl->in_crit == 0)
-			{
-				if (mutex_lockwim(csa->critical, csa->critical->crashcnt, &csa->now_crit) == cdb_sc_normal)
-					csa->nl->in_crit = process_id;		/* now_crit was set by mutex_lockwim */
-				else
-					if (csa->nl->in_crit == 0)		/***** Why is this re-tested? *****/
-					{
-						status = sys$setimr(0, delta_100_msec, ccp_reqwm_interrupt, &db->wmcrit_timer_id,
-								    0);
-						if (status != SS$_NORMAL)
-							ccp_signal_cont(status);	/***** Is this reasonable? *****/
-						return;
-					}
-			}
-			status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_writedb2, db,
-					 &db->glob_sec->trans_hist, BT_SIZE(csa->hdr) + SIZEOF(th_index), TH_BLOCK, 0, 0, 0);
-			if (status != SS$_NORMAL)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		}
-		return;
-
-	default:
-		ccp_signal_cont(db->wm_iosb.cond);		/***** Is this reasonable? *****/
-		return;
-	}
-}
diff --git a/sr_vvms/ccp_retchan_manager.c b/sr_vvms/ccp_retchan_manager.c
deleted file mode 100644
index 6dac4a5..0000000
--- a/sr_vvms/ccp_retchan_manager.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccp_retchan_manager.h"
-#include <descrip.h>
-#include <iodef.h>
-
-static void ccp_retchan_cl1(unsigned short chan);
-
-static short ccp_retchan_open(ccp_action_aux_value *v)
-{
-	struct dsc$descriptor mbxname;
-	short return_channel;
-	uint4 status;
-
-	mbxname.dsc$w_length = v->str.len;
-	mbxname.dsc$b_dtype = DSC$K_DTYPE_T;
-	mbxname.dsc$b_class = DSC$K_CLASS_S;
-	mbxname.dsc$a_pointer = v->str.txt;
-	status = sys$assign(&mbxname, &return_channel, 0, 0);
-	if ((status & 1) == 0)
-		return_channel = 0;
-	return return_channel;
-}
-
-
-static void ccp_retchan_close(unsigned short chan)
-{
-	sys$qio(0, chan, IO$_WRITEOF, 0, ccp_retchan_cl1, chan, 0, 0, 0, 0, 0, 0);
-	return;
-}
-
-static void ccp_retchan_cl1(unsigned short chan)
-{
-	uint4 status;
-
-	status = sys$dassgn(chan);
-	assert(status & 1);
-	return;
-}
-
-static uint4 ccp_retchan_write(
-unsigned short chan,
-unsigned char *addr,
-unsigned short len,
-void (*completion_addr)(),
-uint4 completion_arg)
-{
-	uint4 status;
-
-	status = sys$qio(0, chan, IO$_WRITEVBLK, 0, completion_addr, completion_arg, addr, len, 0, 0, 0, 0);
-	return status;
-}
-
-/***********************************************************************
-   The following routines are used to return a file of text records
-   to cce.
-
-   To start, call ccp_retchan_init(v), where v contains the return
-	mailbox name.  This routine returns a pointer which is the
-	context for this suite and must be preserved until the
-	last call.
-
-   To send a text line, call ccp_retchan_text(p,addr,len), where
-	p is the context and addr and len define the text to be
-	sent.
-
-   To finish, call ccp_retchan_fini(p) with the context p.
-	Nothing is sent out and there are no I/O waits until
-	the last call.  The last call operates through a chain
-	of completion ast's.  Therefore, consistent queue contents
-	(for example) may be returned to the cce with these routines
-
-   Note: error status returns will cause a clean-up to commence and
-        processing to terminate on the assumption that the CCE
-	either exited or malfunctioned under this circumstance.
-***********************************************************************/
-
-struct retchan_header *ccp_retchan_init(ccp_action_aux_value *v)
-{
-	struct retchan_header *p;
-
-	p = malloc(SIZEOF(*p));
-	p->head = 0;
-	p->tail = p;
-	p->chan = 0;
-	p->mbxnam = *v;
-	return p;
-}
-
-void ccp_retchan_text(
-struct retchan_header *p,
-unsigned char *addr,
-unsigned short len)
-{
-	struct retchan_txt *v;
-	v = malloc(SIZEOF(*v) - 1 + len);
-	*(p->tail) = v;
-	p->tail = v;
-	v->next = 0;
-	v->len = len;
-	memcpy(v->txt, addr, len);
-}
-
-static void ccp_retchan_cleanup(struct retchan_header *p)
-{
-	struct retchan_txt *v, *w;
-
-	for (v = p->head ; v ; v = w)
-	{
-		w = v->next;
-		free(v);
-	}
-	if (p->chan)
-		ccp_retchan_close(p->chan);
-	free(p);
-	return;
-}
-
-static void ccp_retchan_fini1(struct retchan_header *p)
-{
-	struct retchan_txt *v, *w;
-	uint4 status;
-	assert(p->head);
-	v = p->head;
-	w = v->next;
-	free(v);
-	if (!w)
-	{
-		ccp_retchan_close(p->chan);
-		free(p);
-	} else
-	{
-		p->head = w;
-		status = ccp_retchan_write(p->chan, w->txt, w->len, ccp_retchan_fini1, p);
-		if ((status & 1) == 0)
-			ccp_retchan_cleanup(p);
-	}
-	return;
-}
-
-void ccp_retchan_fini(struct retchan_header *p)
-{
-	uint4 status;
-
-	if(p->head == 0)
-		return;
-	p->chan = ccp_retchan_open(&p->mbxnam.str);
-	if (p->chan)
-	{
-		status = ccp_retchan_write(p->chan, p->head->txt, p->head->len, ccp_retchan_fini1, p);
-		if (status & 1)
-			return;
-	}
-	ccp_retchan_cleanup(p);
-	return;
-}
diff --git a/sr_vvms/ccp_retchan_manager.h b/sr_vvms/ccp_retchan_manager.h
deleted file mode 100644
index 36d4f52..0000000
--- a/sr_vvms/ccp_retchan_manager.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __CCP_RETCHAN_MANAGER_H__
-#define __CCP_RETCHAN_MANAGER_H__
-
-
-struct retchan_txt
-{
-	struct retchan_txt *next;
-	unsigned char len;
-	unsigned char txt[1];
-};
-
-struct retchan_header
-{
-	struct retchan_txt *head;
-	struct retchan_txt **tail;
-	uint4 chan;
-	ccp_action_aux_value mbxnam;
-};
-
-struct retchan_header *ccp_retchan_init(ccp_action_aux_value *v);
-void ccp_retchan_text(struct retchan_header *p,unsigned char *addr,unsigned short len);
-void ccp_retchan_fini(struct retchan_header *p);
-
-#endif
diff --git a/sr_vvms/ccp_rundown.c b/sr_vvms/ccp_rundown.c
deleted file mode 100644
index 0b6031d..0000000
--- a/sr_vvms/ccp_rundown.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-typedef struct{
-int4	link;
-int4	*exit_hand;
-int4	arg_cnt;
-int4	*cond_val;
-}desblk;
-
-GBLREF int4 ccp_exi_condition;
-GBLREF desblk ccp_exi_blk;
-GBLDEF bool ccp_dump_on;
-
-void ccp_rundown(void)
-{
-	error_def(ERR_CCEDUMPON);
-	error_def(ERR_CCEDUMPOFF);
-	error_def(ERR_CCEDUMPNOW);
-	error_def(ERR_FORCEDHALT);
-
-	ccp_action_record buff;
-
-	if (ccp_exi_condition == ERR_CCEDUMPNOW || ccp_exi_condition == ERR_CCEDUMPON ||
-		 ccp_exi_condition == ERR_CCEDUMPOFF || ccp_exi_condition == ERR_FORCEDHALT)
-	{	if (ccp_exi_condition == ERR_FORCEDHALT)
-		{	buff.action = CCTR_STOP;
-			buff.pid=0;
-			ccp_priority_request(&buff);
-		}
-		else
-		{	if (ccp_exi_condition == ERR_CCEDUMPNOW)
-				ccp_dump();
-			else
-				ccp_dump_on = (ccp_exi_condition == ERR_CCEDUMPON);
-		}
-		ccp_exi_blk.exit_hand = &ccp_rundown;
-		ccp_exi_blk.arg_cnt = 1;
-		ccp_exi_blk.cond_val = &ccp_exi_condition;
-		sys$dclexh(&ccp_exi_blk);
-		lib$establish(ccp_exi_ch);
-		lib$signal(ccp_exi_condition);	/* signal an error so can unwind and continue processing */
-	}
-	lib$signal(ccp_exi_condition);
-}
diff --git a/sr_vvms/ccp_sendmsg.c b/sr_vvms/ccp_sendmsg.c
deleted file mode 100644
index 1c1075f..0000000
--- a/sr_vvms/ccp_sendmsg.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include "gdsroot.h"
-#include "ccp.h"
-#include <iodef.h>
-#include <descrip.h>
-#include <psldef.h>
-
-error_def(ERR_CCPMBX);
-
-GBLREF	uint4	process_id;
-
-static	short		channel;
-static	ccp_iosb	iosb;
-static	$DESCRIPTOR	(devnam, CCP_MBX_NAME);
-
-
-short	ccp_sendmsg(action, aux_value)
-ccp_action_code		action;
-ccp_action_aux_value	*aux_value;
-{
-	ccp_action_record	request;
-
-
-	if (channel == 0  &&  sys$assign(&devnam, &channel, PSL$C_USER, NULL) != SS$_NORMAL)
-	{
-		rts_error(ERR_CCPMBX);
-		return 0;	/* Necessary for operation of cce_ccp */
-	}
-
-	request.action = action;
-	request.pid = process_id;
-	if (aux_value != NULL)
-		request.v = *aux_value;
-
-	if (sys$qio(0, channel, IO$_WRITEVBLK | IO$M_NOW, &iosb, NULL, 0, &request, sizeof request, 0, 0, 0, 0)
-		!= SS$_NORMAL)
-	{
-		rts_error(ERR_CCPMBX);
-		return 0;		/* Necessary for operation of cce_ccp */
-	}
-
-	return channel;
-}
diff --git a/sr_vvms/ccp_signal_cont.c b/sr_vvms/ccp_signal_cont.c
deleted file mode 100644
index ac7855c..0000000
--- a/sr_vvms/ccp_signal_cont.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <stdarg.h>
-
-void ccp_signal_cont(uint4 arg1, ...)
-{
-	va_list	var;
-	uint4	arg2, arg3, arg4, arg5;
-	int4	numargs, pc;
-
-	error_def(ERR_CCPSIGCONT);
-
-	pc = caller_id();
-	VAR_START(var, arg1);
-	va_count(numargs);
-	switch (numargs)
-	{
-	case 1:
-		lib$signal(ERR_CCPSIGCONT, 1, pc, arg1);
-		break;
-	case 2:
-		arg2 = va_arg(var, uint4);
-		lib$signal(ERR_CCPSIGCONT, 1, pc, arg1, arg2);
-		break;
-	case 3:
-		arg2 = va_arg(var, uint4);
-		arg3 = va_arg(var, uint4);
-		lib$signal(ERR_CCPSIGCONT, 1, pc, arg1, arg2, arg3);
-		break;
-	case 4:
-		arg2 = va_arg(var, uint4);
-		arg3 = va_arg(var, uint4);
-		arg4 = va_arg(var, uint4);
-		lib$signal(ERR_CCPSIGCONT, 1, pc, arg1, arg2, arg3, arg4);
-		break;
-	default:
-		arg2 = va_arg(var, uint4);
-		arg3 = va_arg(var, uint4);
-		arg4 = va_arg(var, uint4);
-		arg5 = va_arg(var, uint4);
-		lib$signal(ERR_CCPSIGCONT, 1, pc, arg1, arg2, arg3, arg4, arg5);
-		break;
-	}
-	va_end(var);
-}
diff --git a/sr_vvms/ccp_staleness.c b/sr_vvms/ccp_staleness.c
deleted file mode 100644
index f34f894..0000000
--- a/sr_vvms/ccp_staleness.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-void ccp_staleness(ccp_db_header **p)
-{
-	ccp_db_header *db;
-	ccp_action_record buff;
-
-	db = *p;
-	db->stale_in_progress = FALSE;
-	if (!db->write_mode_requested)
-	{	buff.action = CCTR_WRITEDB;
-		buff.pid = 0;
-		buff.v.exreq.fid = ((vms_gds_info *)(db->greg->dyn.addr->file_cntl->file_info))->file_id;
-		buff.v.exreq.cycle = db->segment->nl->ccp_cycle;
-		ccp_act_request(&buff);
-	}
-	return;
-}
diff --git a/sr_vvms/ccp_tick_interrupt.c b/sr_vvms/ccp_tick_interrupt.c
deleted file mode 100644
index daf2790..0000000
--- a/sr_vvms/ccp_tick_interrupt.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-
-void ccp_tick_interrupt( ccp_db_header **p)
-{
-	ccp_db_header *db;
-
-	assert(lib$ast_in_prog());
-	db = *p;
-	if (!db->quantum_expired)
-	{
-		assert(db->wmexit_requested);
-		assert(db->segment == NULL || db->segment->nl->ccp_state != CCST_WMXREQ);
-		assert(db->tick_in_progress == TRUE);
-		/* db->glob_sec->wcs_active_lvl -= db->drop_lvl; */
-		if ((db->segment != NULL) && (db->tick_tn != db->segment->ti->curr_tn))
-			ccp_tick_start(db);
-		else
-		{
-			/* cancel quantum timer */
-			sys$cantim(&db->quantum_timer_id, 0);
-			db->tick_in_progress = FALSE;
-			db->quantum_expired = TRUE;
-			ccp_exitwm_attempt(db);
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/ccp_tick_start.c b/sr_vvms/ccp_tick_start.c
deleted file mode 100644
index 0ac65a1..0000000
--- a/sr_vvms/ccp_tick_start.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include <ssdef.h>
-
-
-/* AST routine called from ccp_exitwm_blkast, ccp_gotdrt_tick, and ccp_tick_interrupt */
-
-void ccp_tick_start( ccp_db_header *db)
-{
-	uint4	status;
-
-
-	assert(lib$ast_in_prog());
-	assert(!db->quantum_expired);
-	assert(db->wmexit_requested);
-	assert(db->segment->nl->ccp_state != CCST_WMXREQ);
-
-	db->tick_in_progress = TRUE;
-	db->tick_tn = db->segment->ti->curr_tn;
-
-	status = sys$setimr(0, &db->glob_sec->ccp_tick_interval, ccp_tick_interrupt, &db->tick_timer_id, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_checkdb.c b/sr_vvms/ccp_tr_checkdb.c
deleted file mode 100644
index 0222716..0000000
--- a/sr_vvms/ccp_tr_checkdb.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include <ssdef.h>
-
-GBLREF	ccp_db_header	*ccp_reg_root;
-GBLDEF	bool		checkdb_timer;
-
-static	int4		delta_30_sec[2] = { -300000000, -1 };
-
-
-/* Check to see if any databases are still being accessed */
-
-void ccp_tr_checkdb(void)
-{
-	ccp_db_header		*db;
-	ccp_action_record	request;
-	uint4		status;
-
-
-	checkdb_timer = FALSE;
-
-	if (ccp_reg_root == NULL)
-	{
-		status = sys$setimr(0, delta_30_sec, ccp_tr_checkdb, 0, 0);
-		if (status == SS$_NORMAL)
-			checkdb_timer = TRUE;
-		else
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-	else
-		for (db = ccp_reg_root;  db != NULL;  db = db->next)
-		{
-			request.action = CCTR_CLOSE;
-			request.pid = 0;
-			request.v.file_id = FILE_INFO(db->greg)->file_id;
-			if (!ccp_act_request(&request))
-				break;
-		}
-		/* Let ccp_tr_close restart the timer so we don't build up redundant requests */
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_close.c b/sr_vvms/ccp_tr_close.c
deleted file mode 100644
index 3d3e93e..0000000
--- a/sr_vvms/ccp_tr_close.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "locks.h"
-#include <psldef.h>
-#include <lckdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-GBLREF	bool	ccp_stop, checkdb_timer;
-
-static	int4	delta_30_sec[2] = { -300000000, -1 };
-
-
-/* Close the database;  the process no longer has an interest in the region */
-
-void ccp_tr_close( ccp_action_record *rec)
-{
-	ccp_db_header	*db;
-	uint4	status;
-
-
-	db = ccp_get_reg(&rec->v.file_id);
-
-	if (db != NULL  &&  db->segment->nl->ccp_state != CCST_OPNREQ)
-	{
-		status = ccp_enqw(EFN$C_ENF, LCK$K_EXMODE, &db->refcnt_iosb, LCK$M_CONVERT | LCK$M_NOQUEUE, NULL, 0,
-				  NULL, 0, NULL, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-
-		if (status == SS$_NORMAL  ||  ccp_stop)
-			if (db->segment->nl->ccp_state == CCST_RDMODE)
-				ccp_close1(db);
-			else
-			{
-				db->close_region = TRUE;
-				if (db->wmexit_requested)
-					status = sys$dclast(ccp_exitwm_attempt, db, PSL$C_USER);
-				else
-					status = sys$dclast(ccp_exitwm_blkast, &db->exitwm_timer_id, PSL$C_USER);
-				if (status != SS$_NORMAL)
-					ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			}
-
-		/* NOTE:  The following `else' clause is a temporary kludge.  There appears to be a scenario in which
-			  the CCP loses track of a request to relinquish write mode, causing GT.M processes to hang.
-			  We piggyback on the checkdb timer processing here to guarantee that the hang doesn't persist,
-			  by simulating the receipt of the blocking AST that initiates write mode exit processing. */
-		else
-			if (db->quantum_expired  &&  CCP_SEGMENT_STATE(db->segment->nl, CCST_MASK_WRITE_MODE))
-			{
-				status = sys$dclast(ccp_exitwm_blkast, &db->exitwm_timer_id, PSL$C_USER);
-				if (status != SS$_NORMAL)
-					ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			}
-	}
-
-	if (rec->pid == 0  &&  !checkdb_timer)
-	{
-		/* Request was from ccp_tr_checkdb */
-		status = sys$setimr(0, delta_30_sec, ccp_tr_checkdb, 0, 0);
-		if (status == SS$_NORMAL)
-			checkdb_timer = TRUE;
-		else
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_closejnl.c b/sr_vvms/ccp_tr_closejnl.c
deleted file mode 100644
index 88d212e..0000000
--- a/sr_vvms/ccp_tr_closejnl.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gdsbgtr.h"
-#include "ccp.h"
-#include <psldef.h>
-#include "jnl.h"
-#include "locks.h"
-
-
-void	ccp_tr_closejnl( ccp_action_record *rec)
-{
-	ccp_db_header		*db;
-	sgmnt_addrs		*csa;
-	jnl_private_control	*jpc;
-	uint4		status;
-
-
-	db = ccp_get_reg(&FILE_INFO(rec->v.reg)->file_id);
-
-	assert(db->segment->nl->ccp_state == CCST_WMXGNT);
-
-	csa = &FILE_INFO(db->greg)->s_addrs;
-
-	if (csa->hdr->jnl_state != jnl_closed)
-		return;
-
-	jpc = csa->jnl;
-
-	if (jpc->qio_active)
-	{
-		/* Just keep trying */
-		if ((status = sys$dclast(ccp_closejnl_ast, db, PSL$C_USER)) != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-		return;
-	}
-	assert(0 != jpc->jnllsb->lockid);
-	if ((status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0)) != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	jpc->jnllsb->lockid = 0;
-	if ((status = sys$dassgn(jpc->channel)) != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	jpc->channel = 0;
-	jpc->pini_addr = 0;
-}
diff --git a/sr_vvms/ccp_tr_debug.c b/sr_vvms/ccp_tr_debug.c
deleted file mode 100644
index f2f1716..0000000
--- a/sr_vvms/ccp_tr_debug.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include <ssdef.h>
-
-void ccp_tr_debug(r)
-ccp_action_record *r;
-{
-	/* could/should establish dbg$input and dbg$output */
-	lib$signal(SS$_DEBUG);
-	return;
-}
diff --git a/sr_vvms/ccp_tr_ewmwtbf.c b/sr_vvms/ccp_tr_ewmwtbf.c
deleted file mode 100644
index fc2d431..0000000
--- a/sr_vvms/ccp_tr_ewmwtbf.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gdsbgtr.h"
-#include "ccp.h"
-#include "locks.h"
-#include <lckdef.h>
-#include <psldef.h>
-#include <efndef.h>
-
-#include "jnl.h"
-
-
-static	int4	delta_50_msec[2] = { -500000, -1 };	/**** PUT THIS IN THE DATA BASE HEADER !!! ***/
-
-
-/* Exit write mode and wait for buffers to be written out */
-
-void	ccp_tr_ewmwtbf( ccp_action_record *rec)
-{
-	ccp_db_header	*db;
-	gd_region	*r;
-	sgmnt_addrs	*csa;
-	cache_rec	*w, *wtop;
-	uint4	status;
-
-
-	db = rec->v.h;
-	assert(db->segment->nl->ccp_state == CCST_WMXGNT);
-
-	r = db->greg;
-	wcs_wtfini(r);
-	sys$dclast(wcs_wtstart, r, 0);
-	csa = &FILE_INFO(r)->s_addrs;
-
-	w = &db->segment->acc_meth.bg.cache_state->cache_array;
-	w += db->segment->hdr->bt_buckets;
-	for (wtop = w + db->glob_sec->n_bts; (w < wtop) && (0 == w->dirty); ++w)
-		;
-
-	if (w >= wtop  &&  db->segment->acc_meth.bg.cache_state->cacheq_active.fl == 0  &&
-	    (!JNL_ENABLED(csa->hdr)  ||  csa->jnl == NULL  ||  csa->jnl->jnl_buff->dskaddr == csa->jnl->jnl_buff->freeaddr))
-	{
-		/* All dirty buffers have now been flushed */
-		(void)ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->flush_iosb, LCK$M_CONVERT, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-
-		db->segment->nl->ccp_state = CCST_RDMODE;
-		db->write_mode_requested = FALSE;
-
-		ccp_pndg_proc_wake(&db->exitwm_wait);
-
-		if (db->close_region)
-			ccp_close1(db);
-		else
-			if (db->write_wait.first != NULL  ||  db->flu_wait.first != NULL)
-				ccp_request_write_mode(db);
-	}
-	else
-		if ((status = sys$setimr(0, delta_50_msec, ccp_ewmwtbf_interrupt, &db->exitwm_timer_id, 0)) != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-}
diff --git a/sr_vvms/ccp_tr_exitwm.c b/sr_vvms/ccp_tr_exitwm.c
deleted file mode 100644
index 010fed6..0000000
--- a/sr_vvms/ccp_tr_exitwm.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <iodef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include <ssdef.h>
-#include "wcs_recover.h"
-#include "crit_wake.h"
-
-
-/****************************************************************************************
-*	The scheme for managing exit write mode is explained in CCP_EXITWM_ATTEMPT.C.	*
-*	Please do not update this code without updating the comments in that module.	*
-****************************************************************************************/
-
-error_def(ERR_CCPSIGDMP);
-error_def(ERR_GTMASSERT);
-
-/* Request to relinquish write mode */
-
-void ccp_tr_exitwm( ccp_action_record *rec)
-{
-	ccp_db_header	*db;
-	sgmnt_addrs	*cs_addrs;
-	bt_rec		*que_base, *que_top, *p;
-	int4		n, i;
-	uint4	status;
-
-	db = ccp_get_reg(&rec->v.exreq.fid);
-	if (db == NULL)
-		return;
-
-	cs_addrs = db->segment;
-
-	if (rec->v.exreq.cycle != db->segment->nl->ccp_cycle  ||  db->segment->nl->ccp_state != CCST_DRTGNT)
-	{
-		if (rec->pid != 0)
-			if (db->segment->nl->ccp_state == CCST_WMXREQ)
-				ccp_pndg_proc_add(&db->exitwm_wait, rec->pid);
-			else
-				crit_wake(&rec->pid);
-		return;
-	}
-
-	if (rec->pid != 0)
-		ccp_pndg_proc_add(&db->exitwm_wait, rec->pid);
-
-	if (cs_addrs->nl->in_crit != 0  &&  cs_addrs->nl->in_crit != rec->pid)
-		return;
-
-	if (cs_addrs->nl->wc_blocked)
-		wcs_recover(db->greg);
-
-	assert(!db->tick_in_progress);
-	assert(db->quantum_expired);
-	assert(db->segment->nl->ccp_crit_blocked);
-	assert(db->segment->nl->ccp_state == CCST_DRTGNT);
-	assert(db->segment->ti->curr_tn == db->segment->ti->early_tn);
-
-	db->segment->nl->ccp_state = CCST_WMXREQ;
-
-	if (db->stale_timer_id != NULL)
-	{
-		status = sys$setimr(0, &db->glob_sec->staleness, ccp_staleness, &db->stale_timer_id, 0);
-		if (status != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		db->stale_in_progress = TRUE;
-	}
-
-	db->last_write_tn = db->segment->ti->early_tn;
-
-	for (;;)
-	{
-		for (que_base = db->segment->bt_header, que_top = que_base + db->glob_sec->n_bts;
-		     que_base < que_top;
-		     que_base++)
-		{
-			assert(que_base->blk == BT_QUEHEAD);
-			i = 0;
-			for (p = (bt_rec *)((char *)que_base + que_base->blkque.fl);
-			     p != que_base;
-			     p = (bt_rec *)((char *)p + p->blkque.fl))
-			{
-				if (((int4)p & 3) != 0)
-					ccp_signal_cont(ERR_GTMASSERT);	/***** Is this reasonable? *****/
-				n = p->cache_index;
-				p->flushing = (n == -1) ? FALSE : ((cache_rec *)((char *)db->glob_sec + n))->dirty;
-				if (i > db->glob_sec->n_bts)
-					break;
-				i++;
-			}
-			if (i > db->glob_sec->n_bts)
-				break;
-		}
-		if (i > db->glob_sec->n_bts)
-		{
-			lib$signal(ERR_CCPSIGDMP, 1);
-			wcs_recover(db->greg);
-		}
-		else
-			break;
-	}
-
-	/* Update the master map if it has changed.  If the map is updated, then the master map ast completion
-	   routine will start the transaction history update.  Otherwise, we will start it here.	*/
-	if (db->master_map_start_tn < cs_addrs->ti->mm_tn)
-	{
-		status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_WRITEVBLK, &db->qio_iosb, ccp_exitwm1, db,
-				 MM_ADDR(db->glob_sec), MASTER_MAP_SIZE(db->glob_sec), MM_BLOCK, 0, 0, 0);
-		if ((status & 1) == 0)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		db->master_map_start_tn = cs_addrs->ti->mm_tn;
-	}
-	else
-		if (db->last_lk_sequence < cs_addrs->ti->lock_sequence)
-		{
-			status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_WRITEVBLK, &db->qio_iosb, ccp_exitwm1a, db,
-					 cs_addrs->lock_addrs[0], db->glob_sec->lock_space_size, LOCK_BLOCK(db->glob_sec) + 1,
-					 0, 0, 0);
-			if ((status & 1) == 0)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			db->last_lk_sequence = cs_addrs->ti->lock_sequence;
-		}
-		else
-			ccp_exitwm2(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_exwmreq.c b/sr_vvms/ccp_tr_exwmreq.c
deleted file mode 100644
index aa725e4..0000000
--- a/sr_vvms/ccp_tr_exwmreq.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include <psldef.h>
-#include <ssdef.h>
-
-
-/* Request to relinquish write mode, implying that there is a write mode request from another machine */
-
-void ccp_tr_exwmreq( ccp_action_record	*rec)
-{
-	ccp_db_header	*db;
-	uint4	status;
-
-
-	db = rec->v.h;
-
-	if (db != NULL  &&  !db->wmexit_requested)
-	{
-		status = sys$dclast(ccp_exitwm_blkast, &db->exitwm_timer_id, PSL$C_USER);
-		if (status != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_flushlk.c b/sr_vvms/ccp_tr_flushlk.c
deleted file mode 100644
index b93e904..0000000
--- a/sr_vvms/ccp_tr_flushlk.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "crit_wake.h"
-
-void ccp_tr_flushlk( ccp_action_record *rec)
-{
-	ccp_db_header *db;
-
-	db = ccp_get_reg(&rec->v.file_id);
-	assert(db);
-	{
-		/* file is open */
-		if (CCP_SEGMENT_STATE(db->segment->nl, CCST_MASK_HAVE_DIRTY_BUFFERS))
-			crit_wake(&rec->pid);
-		else
-		{
-			ccp_pndg_proc_add(&db->flu_wait, rec->pid);
-			if (!db->write_mode_requested)
-				ccp_request_write_mode(db);
-		}
-	}
-}
diff --git a/sr_vvms/ccp_tr_gotdrt.c b/sr_vvms/ccp_tr_gotdrt.c
deleted file mode 100644
index 0ed895e..0000000
--- a/sr_vvms/ccp_tr_gotdrt.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include <psldef.h>
-#include <ssdef.h>
-
-
-/* Dirty buffers acquired;  entered after successful conversion of Flush-lock to Exclusive mode */
-
-void ccp_tr_gotdrt( ccp_action_record	*rec)
-{
-	ccp_db_header	*db;
-	uint4	status;
-	void		ccp_exitwm_attempt(), ccp_gotdrt_tick();
-
-
-	db = rec->v.h;
-
-	assert(!db->dirty_buffers_acquired);
-	db->dirty_buffers_acquired = TRUE;
-
-	assert(db->segment->nl->ccp_state == CCST_WRTGNT);
-	db->segment->nl->ccp_state = CCST_DRTGNT;
-
-	if (db->blocking_ast_received  &&  !db->tick_in_progress  &&  !db->quantum_expired)
-	{
-		status = sys$dclast(ccp_gotdrt_tick, db, PSL$C_USER);
-		if (status != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-
-	ccp_pndg_proc_wake(&db->flu_wait);
-	status = sys$dclast(ccp_exitwm_attempt, db, PSL$C_USER);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_lkrqwake.c b/sr_vvms/ccp_tr_lkrqwake.c
deleted file mode 100644
index 7924d60..0000000
--- a/sr_vvms/ccp_tr_lkrqwake.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "locks.h"
-#include <psldef.h>
-#include <lckdef.h>
-#include <ssdef.h>
-
-
-/* Request to wake up all cluster processes waiting for an M-lock */
-
-void ccp_tr_lkrqwake( ccp_action_record	*rec)
-{
-	ccp_db_header	*db;
-	uint4	status;
-
-
-	db = ccp_get_reg(&rec->v.file_id);
-	if (db != NULL)
-	{
-		/* Deliver blocking AST's to any CCP's running on other nodes */
-		status = ccp_enq(0, LCK$K_EXMODE, &db->lock_iosb, LCK$M_CONVERT, NULL, 0,
-				 NULL, 0, NULL, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-
-		/* Cancel the previous request;  its only purpose was to deliver the blocking AST's */
-		status = sys$deq(db->lock_iosb.lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-		if (status != SS$_NORMAL  &&  status != SS$_CANCELGRANT)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-		/* Reestablish our own blocking AST routine */
-		status = ccp_enq(0, LCK$K_CRMODE, &db->lock_iosb, LCK$M_CONVERT | LCK$M_SYNCSTS, NULL, 0,
-				 ccp_lkrqwake1, db, ccp_lkdowake_blkast, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_null.c b/sr_vvms/ccp_tr_null.c
deleted file mode 100644
index b0cacad..0000000
--- a/sr_vvms/ccp_tr_null.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-
-void ccp_tr_null(r)
-ccp_action_record *r;
-{
-	return;
-}
diff --git a/sr_vvms/ccp_tr_opendb1.c b/sr_vvms/ccp_tr_opendb1.c
deleted file mode 100644
index b8e3419..0000000
--- a/sr_vvms/ccp_tr_opendb1.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "vmsdtype.h"
-#include "locks.h"
-#include <descrip.h>
-#include <lckdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-
-
-#define DEF_NODE 0xFFFF
-
-typedef struct
-	{
-		item_list_3	ilist;
-		int4		terminator;
-	} syistruct;
-
-
-/* Open database, second phase;  entered after successful sys$open from ccp_opendb1 */
-
-void	ccp_tr_opendb1( ccp_action_record *rec)
-{
-	ccp_action_record	request;
-	ccp_db_header		*db;
-	uint4		node, status, retlen;
-	unsigned short		iosb[4];
-	unsigned char		resnam_buffer[GLO_NAME_MAXLEN];
-	struct dsc$descriptor_s	resnam;
-	syistruct		syi_list;
-
-
-	if ((db = rec->v.h) == NULL)
-		return;
-
-	global_name("GT$F", &FILE_INFO(db->greg)->file_id, resnam_buffer);
-	resnam.dsc$a_pointer = &resnam_buffer[1];
-	resnam.dsc$w_length = resnam_buffer[0];
-	resnam.dsc$b_dtype = DSC$K_DTYPE_T;
-	resnam.dsc$b_class = DSC$K_CLASS_S;
-
-	status = ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->flush_iosb, LCK$M_SYSTEM, &resnam, 0, NULL, 0, NULL, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-	resnam_buffer[4] = 'L';
-	status = ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->lock_iosb, LCK$M_SYSTEM, &resnam, 0, NULL, 0, NULL, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-	memset(db->wm_iosb.valblk, 0, SIZEOF(db->wm_iosb.valblk));
-	resnam_buffer[4] = 'S';
-	status = ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->wm_iosb, LCK$M_SYSTEM, &resnam, 0, NULL, 0, NULL, PSL$C_USER, 0);
-	/***** Check error status here? *****/
-
-	if (db->wm_iosb.cond == SS$_NORMAL)
-	{
-		node = 0;
-		syi_list.ilist.item_code = SYI$_NODE_CSID;
-		syi_list.ilist.buffer_address = &node;
-		syi_list.ilist.buffer_length = SIZEOF(node);
-		syi_list.ilist.return_length_address = &retlen;
-		syi_list.terminator = 0;
-		status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list, iosb, NULL, 0);
-		if (status != SS$_NORMAL  ||  (status = iosb[0]) != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		if (node == 0)
-			node = DEF_NODE;
-
-		memcpy(resnam_buffer, "GT$N_", 5);
-		i2hex(node, &resnam_buffer[5], 8);
-
-		resnam.dsc$a_pointer = resnam_buffer;
-		resnam.dsc$w_length = 13;
-		status = ccp_enqw(EFN$C_ENF, LCK$K_CRMODE, &db->refcnt_iosb, LCK$M_SYSTEM, &resnam, db->wm_iosb.lockid,
-				  NULL, 0, NULL, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-	}
-	else
-		/* Force a retry in ccp_tr_opendb1b (we set the low bit to distinguish this from a true deadlock) */
-		db->refcnt_iosb.cond = SS$_DEADLOCK | 1;
-
-	if (db->flush_iosb.cond == SS$_NORMAL  &&  db->lock_iosb.cond   == SS$_NORMAL  &&
-	    db->wm_iosb.cond    == SS$_NORMAL  &&  db->refcnt_iosb.cond == SS$_NORMAL)
-	{
-		/* Convert Write-mode lock from Null to Protected Write, reading the lock value block */
-		status = ccp_enq(0, LCK$K_PWMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-				 ccp_opendb2, db, NULL, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-	}
-	else
-	{
-		request.action = CCTR_OPENDB1B;
-		request.pid = 0;
-		request.v.h = db;
-		ccp_act_request(&request);
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_opendb1a.c b/sr_vvms/ccp_tr_opendb1a.c
deleted file mode 100644
index 44c1411..0000000
--- a/sr_vvms/ccp_tr_opendb1a.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include <iodef.h>
-
-
-/* Open database, first phase, step two;  entered after successful completion
-   of sys$open in ccp_opendb (via ccp_opendb1a) */
-
-void ccp_tr_opendb1a( ccp_action_record	*rec)
-{
-	ccp_db_header	*db;
-	uint4	status;
-
-
-	db = ccp_get_reg_by_fab(rec->v.fab);
-	db->segment->hdr = malloc(SIZEOF(sgmnt_data));
-
-	status = sys$qio(0, rec->v.fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_opendb1, db,
-			 db->segment->hdr, SIZEOF(sgmnt_data), 1, 0, 0, 0);
-	if ((status & 1) == 0)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_opendb1b.c b/sr_vvms/ccp_tr_opendb1b.c
deleted file mode 100644
index 6d1b80d..0000000
--- a/sr_vvms/ccp_tr_opendb1b.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "vmsdtype.h"
-#include "locks.h"
-#include <descrip.h>
-#include <lckdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-
-
-#define DEF_NODE 0xFFFF
-
-typedef struct
-	{
-		item_list_3	ilist;
-		int4		terminator;
-	} syistruct;
-
-
-/* Entered after any failure to grant database locks in ccp_tr_opendb1;  retry */
-
-void	ccp_tr_opendb1b( ccp_action_record *rec)
-{
-	ccp_action_record	request;
-	ccp_db_header		*db;
-	uint4		node, status, retlen;
-	unsigned short		iosb[4];
-	unsigned char		resnam_buffer[GLO_NAME_MAXLEN];
-	struct dsc$descriptor_s	resnam;
-	syistruct		syi_list;
-
-
-	if ((db = rec->v.h) == NULL)
-		return;
-
-	global_name("GT$F", &FILE_INFO(db->greg)->file_id, resnam_buffer);
-	resnam.dsc$a_pointer = &resnam_buffer[1];
-	resnam.dsc$w_length = resnam_buffer[0];
-	resnam.dsc$b_dtype = DSC$K_DTYPE_T;
-	resnam.dsc$b_class = DSC$K_CLASS_S;
-
-	if (db->flush_iosb.cond != SS$_NORMAL)
-	{
-		ccp_signal_cont(db->flush_iosb.cond);	/***** Is this reasonable? *****/
-
-		if (db->flush_iosb.cond == SS$_DEADLOCK)
-		{
-			/* Just try again */
-			status = ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->flush_iosb, LCK$M_SYSTEM, &resnam, 0,
-					  NULL, 0, NULL, PSL$C_USER, 0);
-			/***** Check error status here? *****/
-		}
-	}
-
-	if (db->lock_iosb.cond != SS$_NORMAL)
-	{
-		ccp_signal_cont(db->lock_iosb.cond);	/***** Is this reasonable? *****/
-
-		if (db->lock_iosb.cond == SS$_DEADLOCK)
-		{
-			resnam_buffer[4] = 'L';
-			/* Just try again */
-			status = ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->lock_iosb, LCK$M_SYSTEM, &resnam, 0,
-					  NULL, 0, NULL, PSL$C_USER, 0);
-			/***** Check error status here? *****/
-		}
-	}
-
-	if (db->wm_iosb.cond != SS$_NORMAL)
-	{
-		ccp_signal_cont(db->wm_iosb.cond);	/***** Is this reasonable? *****/
-
-		if (db->wm_iosb.cond == SS$_DEADLOCK)
-		{
-			memset(db->wm_iosb.valblk, 0, SIZEOF(db->wm_iosb.valblk));
-			resnam_buffer[4] = 'S';
-			/* Just try again */
-			status = ccp_enqw(EFN$C_ENF, LCK$K_NLMODE, &db->wm_iosb, LCK$M_SYSTEM, &resnam, 0,
-					  NULL, 0, NULL, PSL$C_USER, 0);
-			/***** Check error status here? *****/
-		}
-	}
-
-	if (db->wm_iosb.cond == SS$_NORMAL  &&  db->refcnt_iosb.cond != SS$_NORMAL)
-		if ((db->refcnt_iosb.cond & 0xFFFE) == SS$_DEADLOCK)	/* Ignore low bit possibly set in ccp_tr_opendb1 */
-		{
-			if ((db->refcnt_iosb.cond & 1) == 0)		/* Only report a true deadlock */
-				ccp_signal_cont(SS$_DEADLOCK);
-
-			node = 0;
-			syi_list.ilist.item_code = SYI$_NODE_CSID;
-			syi_list.ilist.buffer_address = &node;
-			syi_list.ilist.buffer_length = SIZEOF(node);
-			syi_list.ilist.return_length_address = &retlen;
-			syi_list.terminator = 0;
-			status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list, iosb, NULL, 0);
-			if (status != SS$_NORMAL  ||  (status = iosb[0]) != SS$_NORMAL)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			if (node == 0)
-				node = DEF_NODE;
-
-			memcpy(resnam_buffer, "GT$N_", 5);
-			i2hex(node, &resnam_buffer[5], 8);
-
-			resnam.dsc$a_pointer = resnam_buffer;
-			resnam.dsc$w_length = 13;
-			/* Just try again */
-			status = ccp_enqw(EFN$C_ENF, LCK$K_CRMODE, &db->refcnt_iosb, LCK$M_SYSTEM, &resnam, db->wm_iosb.lockid,
-					  NULL, 0, NULL, PSL$C_USER, 0);
-			/***** Check error status here? *****/
-		}
-		else
-			ccp_signal_cont(db->refcnt_iosb.cond);	/***** Is this reasonable? *****/
-
-	if (db->flush_iosb.cond == SS$_NORMAL  &&  db->lock_iosb.cond   == SS$_NORMAL  &&
-	    db->wm_iosb.cond    == SS$_NORMAL  &&  db->refcnt_iosb.cond == SS$_NORMAL)
-	{
-		/* Convert Write-mode lock from Null to Protected Write, reading the lock value block */
-		status = ccp_enq(0, LCK$K_PWMODE, &db->wm_iosb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-				 ccp_opendb2, db, NULL, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-	}
-	else
-	{
-		/* Try again... */
-		request.action = CCTR_OPENDB1B;
-		request.pid = 0;
-		request.v.h = db;
-		ccp_act_request(&request);
-	}
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_opendb1e.c b/sr_vvms/ccp_tr_opendb1e.c
deleted file mode 100644
index 2a5d6aa..0000000
--- a/sr_vvms/ccp_tr_opendb1e.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-GBLREF	ccp_db_header	*ccp_reg_root;
-
-
-/* Entered after unsuccessful sys$open in ccp_opendb (via ccp_opendb1e) */
-
-void ccp_tr_opendb1e( ccp_action_record	*rec)
-{
-	ccp_db_header	*db, *db0, *db1;
-	uint4	status, status1;
-
-
-	db = ccp_get_reg_by_fab(rec->v.fab);
-	if (db == NULL)
-		return;
-
-	status = rec->v.fab->fab$l_sts;
-	status1 = rec->v.fab->fab$l_stv;
-
-	for (db0 = ccp_reg_root, db1 = NULL;  db0 != db;  db1 = db0, db0 = db0->next)
-		;
-	if (db1 == NULL)
-		ccp_reg_root = db0->next;
-	else
-		db1->next = db0->next;
-
-	free(FILE_INFO(db->greg)->fab->fab$l_nam);
-	free(FILE_INFO(db->greg)->fab);
-	free(db->greg->dyn.addr);
-	free(db->greg);
-	free(db);
-
-	ccp_quemin_adjust(CCP_CLOSE_REGION);
-	ccp_signal_cont(status, 0, status1);	/***** Is this reasonable? *****/
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_opendb3.c b/sr_vvms/ccp_tr_opendb3.c
deleted file mode 100644
index e5c9f6b..0000000
--- a/sr_vvms/ccp_tr_opendb3.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <fab.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "jnl.h"
-#include "ccp_opendb3a.h"
-
-error_def(ERR_CCPJNLOPNERR);
-
-
-
-/* Open database, third phase;  entered after completion of sys$qio
-   to read transaction history in ccp_opendb2 (via ccp_opendb3) */
-
-void	ccp_tr_opendb3(ccp_action_record *rec)
-{
-	ccp_db_header		*db;
-	sgmnt_addrs		*csa;
-	sgmnt_data		*csd;
-	jnl_private_control	*jpc;
-	uint4		status;
-
-
-	db = rec->v.h;
-	db->master_map_start_tn = 0;
-
-	csa = db->segment;
-	csd = db->glob_sec
-	    = csa->hdr
-	    = csa->db_addrs[0];
-
-	adawi(1, &csa->nl->ref_cnt);	/* GT.M process that sent open request */
-	csa->lock_addrs[0] = (unsigned char *)csd + (LOCK_BLOCK(csd) * DISK_BLOCK_SIZE);
-	csa->lock_addrs[1] = csa->lock_addrs[0] + csd->lock_space_size;
-
-	if (JNL_ENABLED(csd))
-	{
-		jpc = csa->jnl
-		    = malloc(SIZEOF(jnl_private_control));
-		memset(jpc, 0, SIZEOF(jnl_private_control));
-
-		jpc->region = db->greg;
-		jpc->jnl_buff = csa->lock_addrs[1] + CACHE_CONTROL_SIZE(csd) + JNL_NAME_EXP_SIZE;
-
-		FILE_INFO(db->greg)->s_addrs.jnl->jnllsb->lockid = 0;
-
-		if (db->wm_iosb.valblk[CCP_VALBLK_JNL_ADDR] == 0)
-		{
-			/* Open jnl file based on data in file header, first machine to open */
-			jnl_file_open(db->greg, FALSE, ccp_closejnl_ast);
-			if (jpc->channel == 0)
-			{
-				/* Open failed */
-				ccp_close1(db);
-				ccp_signal_cont(ERR_CCPJNLOPNERR);	/***** Is this reasonable? *****/
-				return;
-			}
-
-			/* Write out file id for other machines */
-			csd->trans_hist.ccp_jnl_filesize = jpc->jnl_buff->filesize;
-			csd->ccp_jnl_before = jpc->jnl_buff->before_images;
-
-			status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_WRITEVBLK, &db->qio_iosb, ccp_opendb3a, db,
-					 csd, (MM_BLOCK - 1) * OS_PAGELET_SIZE, 1, 0, 0, 0);
-		}
-		else
-		{
-/* ??? --> */		/* Open jnl file based on id in header.  Read in header to make sure get file id from first machine */
-
-			status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_opendb3a, db,
-					 csd, (MM_BLOCK - 1) * OS_PAGELET_SIZE, 1, 0, 0, 0);
-		}
-
-		if (status != SS$_NORMAL)
-		{
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			ccp_close1(db);
-		}
-	}
-	else
-		ccp_opendb3b(db);
-
-}
diff --git a/sr_vvms/ccp_tr_opendb3a.c b/sr_vvms/ccp_tr_opendb3a.c
deleted file mode 100644
index 8d635a8..0000000
--- a/sr_vvms/ccp_tr_opendb3a.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-
-void ccp_tr_opendb3a( ccp_action_record *rec)
-{
-	ccp_db_header *db;
-
-	db = rec->v.h;
-	ccp_opendb3b(db);
-	return;
-}
diff --git a/sr_vvms/ccp_tr_stop.c b/sr_vvms/ccp_tr_stop.c
deleted file mode 100644
index 7abc598..0000000
--- a/sr_vvms/ccp_tr_stop.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-GBLREF	bool		ccp_stop;
-GBLREF	int		ccp_stop_ctr;
-GBLREF 	ccp_db_header	*ccp_reg_root;
-
-void ccp_tr_stop( ccp_action_record *r)
-{
-	ccp_db_header *ptr;
-	ccp_action_record buff;
-
-	if (ccp_stop)
-		return;
-	ccp_stop = TRUE;
-	for (ptr = ccp_reg_root; ptr; ptr = ptr->next)
-	{	ccp_stop_ctr++;
-		buff.action = CCTR_CLOSE;
-		buff.pid = 0;
-		buff.v.file_id = ((vms_gds_info *)(ptr->greg->dyn.addr->file_cntl->file_info))->file_id;
-		ccp_act_request(&buff);
-	}
-	return;
-}
diff --git a/sr_vvms/ccp_tr_writedb.c b/sr_vvms/ccp_tr_writedb.c
deleted file mode 100644
index 7564b7f..0000000
--- a/sr_vvms/ccp_tr_writedb.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "crit_wake.h"
-
-GBLREF	bool	ccp_stop;
-
-
-/* Request for write mode */
-
-void ccp_tr_writedb( ccp_action_record	*rec)
-{
-	ccp_db_header	*db;
-
-
-	db = ccp_get_reg(&rec->v.file_id);
-
-	if (db == NULL)
-	{
-		if (rec->pid != 0  &&  !ccp_stop)
-			ccp_opendb(rec);
-	}
-	else
-		/* File is open or in the process of being opened */
-		if (rec->pid != 0  &&  !db->segment->nl->ccp_crit_blocked  &&
-		    CCP_SEGMENT_STATE(db->segment->nl, CCST_MASK_WRITE_MODE))
-			crit_wake(&rec->pid);
-		else
-		{
-			if (rec->pid != 0)
-				ccp_pndg_proc_add(&db->write_wait, rec->pid);
-			if (!db->write_mode_requested  &&  db->segment->nl->ccp_state != CCST_OPNREQ)
-				ccp_request_write_mode(db);
-		}
-
-	return;
-}
diff --git a/sr_vvms/ccp_tr_writedb1.c b/sr_vvms/ccp_tr_writedb1.c
deleted file mode 100644
index 976e5f2..0000000
--- a/sr_vvms/ccp_tr_writedb1.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "mlkdef.h"
-#include "jnl.h"
-#include "locks.h"
-#include <lckdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include "crit_wake.h"
-
-
-#define NODENUMBER	0xFFE00000
-
-GBLREF	uint4	process_id;
-
-/* TODO: move to a header */
-void			ccp_quantum_interrupt(), ccp_reqdrtbuf_interrupt();
-
-static	int4		delta_100_msec[2] = { -1000000, -1 };
-
-
-/* Request for write mode;  entered after successful conversion of Write-mode lock to Protected Write */
-
-void	ccp_tr_writedb1(ccp_action_record *rec)
-{
-	ccp_action_record	request;
-	ccp_db_header		*db;
-	jnl_buffer		*jb;
-	sgmnt_addrs		*csa;
-	int4			curr_time[2];
-	uint4		status, *p1, *p2, *top;
-
-
-	if ((db = rec->v.h) == NULL)
-		return;
-
-	csa = db->segment;
-	assert(csa->nl->ccp_state == CCST_RDMODE  ||  csa->nl->ccp_state == CCST_CLOSED  ||  csa->nl->ccp_state == CCST_OPNREQ);
-
-	if (JNL_ENABLED(csa->hdr))
-	{
-		assert(csa->jnl->channel != 0);
-
-		jb = csa->jnl->jnl_buff;
-
-		if (jb->blocked != 0)
-		{
-			/* jnl writes from a previous write mode are not done yet;  try again later */
-			if ((status = sys$setimr(0, delta_100_msec, ccp_writedb5, db, 0)) != SS$_NORMAL)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			return;
-		}
-
-		jb->epoch_tn = db->wm_iosb.valblk[CCP_VALBLK_EPOCH_TN];
-		jb->freeaddr = jb->dskaddr
-			     = ROUND_UP(db->wm_iosb.valblk[CCP_VALBLK_JNL_ADDR], DISK_BLOCK_SIZE);
-		/* lastaddr is no longer a field in jnl_buff
-		 *	jb->lastaddr = db->wm_iosb.valblk[CCP_VALBLK_LST_ADDR];
-		 */
-		jb->free = jb->dsk
-			 = 0;
-	}
-
-	/* Note:  We must clear these flags prior to changing state or a set from ccp_exitwm_blkast may be missed */
-	db->quantum_expired = FALSE;
-	db->tick_in_progress = FALSE;
-
-	if (db->remote_wakeup)
-	{
-		for (p2 = NULL, p1 = csa->lock_addrs[0], top = p1 + SIZEOF(int4) * NUM_CLST_LCKS;
-		     *p1 != 0  &&  p1 <= top;
-		     ++p1)
-		{
-			if ((*p1 & NODENUMBER) == (process_id & NODENUMBER))
-			{
-				crit_wake(p1);
-				if (p2 == NULL)
-					p2 = p1;
-				*p1 = 0;
-			}
-			else
-				if (p2 != NULL)
-				{
-					*p2++ = *p1;
-					*p1 = 0;
-				}
-		}
-
-		db->remote_wakeup = FALSE;
-
-		status = ccp_enq(0, LCK$K_CRMODE, &db->lock_iosb, LCK$M_CONVERT | LCK$M_SYNCSTS, NULL, 0,
-				 ccp_lkrqwake1, db, ccp_lkdowake_blkast, PSL$C_USER, 0);
-		/***** Check error status here? *****/
-	}
-
-	db->glob_sec->freeze = 0;
-	/* db->glob_sec->wcs_active_lvl = db->glob_sec->n_bts / 2; */
-	db->drop_lvl = 0;
-
-	sys$gettim(curr_time);
-	lib$add_times(curr_time, db->glob_sec->ccp_quantum_interval, &db->start_wm_time);
-
-	csa->nl->ccp_state = CCST_WRTGNT;
-
-	if (db->blocking_ast_received)
-	{
-		status = sys$dclast(ccp_exitwm_blkast, &db->exitwm_timer_id, PSL$C_USER);
-		if (status != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-
-	csa->nl->ccp_crit_blocked = FALSE;
-	++csa->nl->ccp_cycle;
-
-	status = sys$setimr(0, &db->glob_sec->ccp_quantum_interval, ccp_quantum_interrupt, &db->quantum_timer_id, 0);
-	if (status != SS$_NORMAL)
-		ccp_signal_cont(status);	/***** Is this reasonable? *****/
-
-	db->dirty_buffers_acquired = FALSE;
-	ccp_pndg_proc_wake(&db->write_wait);
-
-	status = ccp_enq(0, LCK$K_EXMODE, &db->flush_iosb, LCK$M_CONVERT | LCK$M_SYNCSTS, NULL, 0,
-			 ccp_reqdrtbuf_interrupt, db, NULL, PSL$C_USER, 0);
-	if (status == SS$_SYNCH)
-	{
-		request.action = CCTR_GOTDRT;
-		request.pid = 0;
-		request.v.h = db;
-		ccp_act_request(&request);
-	}
-	/***** Check error status here? *****/
-
-}
diff --git a/sr_vvms/ccp_userwait.c b/sr_vvms/ccp_userwait.c
deleted file mode 100644
index 3aaab96..0000000
--- a/sr_vvms/ccp_userwait.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <fab.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-
-static bool ccp_communication_timeout;
-/***********************************************************************
-This routine is called to wait for a clustered data base to transition
-to a new state.  If the "state" parameter is non-zero, then it is
-considered a bit mask, with state zero being the lsb, etc.  (All of
-these masks are symbolically defined in ccp.h as CCST_MASK_nnnnn.)
-In this case we will return when the state is obtained.  If the
-state is zero, we will return when the ccp_cycle count is bumped,
-indicating that we have transitioned into read mode.  In any event
-we will return after the "next" cycle has passed, so that if we
-"miss" our window, we can try again.
-***********************************************************************/
-bool ccp_userwait(gd_region *reg, uint4 state, int4 *timadr, unsigned short cycle)
-	/* if timadr is non-zero, then the timeout quadword, else use the seg's timeout interval */
-{
-	int4		status;
-	static void	ccp_nocomm();
-	bool		timer_on;
-	sgmnt_data	*seg;
-	sgmnt_addrs	*csa;
-	int4		*timptr;
-	char		buff[(MM_BLOCK - 1) * DISK_BLOCK_SIZE];
-	short		iosb[4];
-	error_def(ERR_CCPNOTFND);
-
-	csa = &((vms_gds_info *)(reg->dyn.addr->file_cntl->file_info))->s_addrs;
-	seg = ((vms_gds_info *)(reg->dyn.addr->file_cntl->file_info))->s_addrs.hdr;
-	timptr = timadr ? timadr : (int4 *) &seg->ccp_response_interval;
-	timer_on = timptr[0] != 0 && timptr[1] != 0;
-	for (; ;)
-	{	ccp_communication_timeout = FALSE;
-		if (timer_on)
-		{
-			status = sys$setimr(0, timptr, ccp_nocomm, ccp_nocomm, 0);
-			if ((status & 1) == 0)
-				rts_error(VARLSTCNT(1) status);
-		}
-		while (!CCP_SEGMENT_STATE(csa->nl, state) && csa->nl->ccp_cycle == cycle && !ccp_communication_timeout)
-		{
-			sys$hiber();
-		}
-
-		if (ccp_communication_timeout && !(CCP_SEGMENT_STATE(csa->nl, state) || csa->nl->ccp_cycle != cycle))
-		{
-			status = sys$qiow(EFN$C_ENF, ((vms_gds_info *)(reg->dyn.addr->file_cntl->file_info))->fab->fab$l_stv,
-								IO$_READVBLK, &iosb[0], 0, 0, buff, SIZEOF(buff), 1, 0, 0, 0);
-			if ((status & 1) && (iosb[0] & 1) && ((sgmnt_data *)buff)->freeze)
-				continue;
-			rts_error(VARLSTCNT(1) ERR_CCPNOTFND);
-		}else
-			break;
-	}
-	if (timer_on)
-		sys$cantim(ccp_nocomm,0);
-	return CCP_SEGMENT_STATE(csa->nl, state);
-}
-
-static void ccp_nocomm()
-{
-	ccp_communication_timeout = TRUE;
-	sys$wake(0,0);
-	return;
-}
diff --git a/sr_vvms/ccp_writedb2.c b/sr_vvms/ccp_writedb2.c
deleted file mode 100644
index fead00d..0000000
--- a/sr_vvms/ccp_writedb2.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "jnl.h"
-#include <iodef.h>
-#include <ssdef.h>
-#include "wcs_recover.h"
-#include "ccp_writedb2.h"
-#include "ccp_writedb3.h"
-
-
-error_def(ERR_CCPSIGDMP);
-
-GBLREF	uint4	process_id;
-
-
-
-/* AST routine entered on completion of sys$qio to read transaction history in ccp_reqwm_interrupt */
-
-void ccp_writedb2(ccp_db_header *db)
-{
-	bt_rec		*btr, *que_base, *que_top;
-	cache_rec	*wtop, *w;
-	sgmnt_addrs	*cs_addrs;
-	int		i;
-	uint4	status;
-
-
-	assert(lib$ast_in_prog());
-
-	cs_addrs = db->segment;
-	if (cs_addrs == NULL  ||  cs_addrs->nl->ccp_state == CCST_CLOSED)
-		return;
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	if (JNL_ENABLED(cs_addrs->hdr))
-		cs_addrs->jnl->jnl_buff->filesize = cs_addrs->ti->ccp_jnl_filesize;
-
-/******************************************************************************
-
-There are several possible threads of execution subsequent to the completion of
-this routine.  If the master map needs to be re-read, then we inititate the qio
-read.   The completions ast for this read, ccp_writedb4, checks the status and
-then either initiates a read to update the lock section if necessary or calls
-ccp_writedb5 which posts an action request to finish the job.  On the  other
-hand, if the master map is up to date, then we either read the lock section if
-necessary or call ccp_writedb5 at this time so that the next step will be
-effected upon completion of this routine.  The completion ast for the lock read
-checks the status and then  calls ccp_writedb5 to post an action request to
-finish the job. We post the reads first in order to overlap the I/O and
-processing. (Note: further improvement could be obtained by not waiting on
-completion of the master map read until some time later when a GT.M process
-required the master map.  Would still need to update the total_blks field.)
-
-******************************************************************************/
-
-	assert (cs_addrs->ti->curr_tn == cs_addrs->ti->early_tn);
-
-	if (db->wm_iosb.valblk[CCP_VALBLK_TRANS_HIST] == 0)
-	{
-		status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_writedb3, db,
-				 cs_addrs->db_addrs[0], (MM_BLOCK - 1) * 512, 1, 0, 0, 0);
-		if (status == SS$_IVCHAN)
-			/* database has been closed out, section deleted */
-			return;
-		if (status != SS$_NORMAL)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-	}
-	else
-		if (db->master_map_start_tn < cs_addrs->ti->mm_tn)
-		{
-			status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_writedb4, db,
-					 MM_ADDR(db->glob_sec), MASTER_MAP_SIZE(db->glob_sec), MM_BLOCK, 0, 0, 0);
-			if (status == SS$_IVCHAN)
-				/* database has been closed out, section deleted */
-				return;
-			if (status != SS$_NORMAL)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			db->master_map_start_tn = cs_addrs->ti->mm_tn;
-		}
-		else
-			if (db->last_lk_sequence < cs_addrs->ti->lock_sequence)
-			{
-				status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb,
-						 ccp_writedb4a, db, cs_addrs->lock_addrs[0], db->glob_sec->lock_space_size,
-						 LOCK_BLOCK(db->glob_sec) + 1, 0, 0, 0);
-				if (status == SS$_IVCHAN)
-					/* database has been closed out, section deleted */
-					return;
-				if (status != SS$_NORMAL)
-					ccp_signal_cont(status);	/***** Is this reasonable? *****/
-				db->last_lk_sequence = cs_addrs->ti->lock_sequence;
-			}
-			else
-				ccp_writedb5(db);
-
-	w = &cs_addrs->acc_meth.bg.cache_state->cache_array;
-	w += cs_addrs->hdr->bt_buckets;
-	for (wtop = w + cs_addrs->hdr->n_bts;  w < wtop;  ++w)
-	{
-		if (w->blk != CR_BLKEMPTY)
-			if ((btr = ccp_bt_get(cs_addrs, w->blk)) == NULL)
-			{
-				if (w->tn <= OLDEST_HIST_TN(cs_addrs))
-				{
-					w->cycle++;	/* increment cycle whenever blk number changes (tp_hist depends on this) */
-					w->blk = CR_BLKEMPTY;
-				}
-				w->bt_index = 0;
-			}
-			else
-				if (btr->tn < db->last_write_tn)	/* not changed since dropped write mode */
-				{
-					w->bt_index = GDS_ABS2REL(btr);
-					btr->cache_index = GDS_ABS2REL(w);
-				}
-				else
-				{
-					assert(0 == w->dirty);
-					btr->cache_index = CR_NOTVALID;
-					w->cycle++;	/* increment cycle whenever blk number changes (tp_hist depends on this) */
-					w->blk = CR_BLKEMPTY;
-					w->bt_index = 0;
-				}
-		assert(0 == w->dirty);
-	}
-
-	for (;;)
-	{
-		for (que_base = cs_addrs->bt_header, que_top = que_base + cs_addrs->hdr->bt_buckets;
-		     que_base < que_top;
-		     ++que_base)
-		{
-			assert(que_base->blk == BT_QUEHEAD);
-			i = 0;
-			for (btr = (bt_rec *)((char *)que_base + que_base->blkque.fl);
-			     btr != que_base;
-			     btr = (bt_rec *)((char *)btr + btr->blkque.fl))
-			{
-				if (btr->cache_index != CR_NOTVALID)
-				{
-					w = GDS_REL2ABS(btr->cache_index);
-					if (w->blk != btr->blk)
-						btr->cache_index = CR_NOTVALID;
-				}
-
-				if (i > cs_addrs->hdr->n_bts)
-					break;
-				++i;
-			}
-
-			if (i > cs_addrs->hdr->n_bts)
-				break;
-		}
-
-		if (i > cs_addrs->hdr->n_bts)
-		{
-			lib$signal(ERR_CCPSIGDMP, 1);
-			wcs_recover(db->greg);
-		}
-		else
-			break;
-	}
-
-	if (cs_addrs->now_crit)
-	{
-		assert(cs_addrs->nl->in_crit == process_id);
-		cs_addrs->nl->in_crit = 0;
-		(void)mutex_unlockw(cs_addrs->critical, cs_addrs->critical->crashcnt, &cs_addrs->now_crit);
-		/***** Check error status here? *****/
-	}
-}
diff --git a/sr_vvms/ccp_writedb2.h b/sr_vvms/ccp_writedb2.h
deleted file mode 100644
index 0bb73b8..0000000
--- a/sr_vvms/ccp_writedb2.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __CCP_WRITEDB2_H__
-#define __CCP_WRITEDB2_H__
-
-void ccp_writedb2(ccp_db_header *db);
-
-#endif
diff --git a/sr_vvms/ccp_writedb3.c b/sr_vvms/ccp_writedb3.c
deleted file mode 100644
index eba7e52..0000000
--- a/sr_vvms/ccp_writedb3.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <rms.h>
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "ccp.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp_writedb3.h"
-
-
-/* AST routine entered on completion of sys$qio to read header in ccp_writedb2 */
-
-void ccp_writedb3(ccp_db_header	*db)
-{
-	uint4		status;
-	sgmnt_addrs		*cs_addrs;
-
-
-	assert(lib$ast_in_prog());
-
-	cs_addrs = db->segment;
-
-	if (cs_addrs == NULL  ||  cs_addrs->nl->ccp_state == CCST_CLOSED)
-		return;
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	cs_addrs->nl->in_wtstart = 0;
-	cs_addrs->nl->wc_in_free = cs_addrs->hdr->n_bts;
-
-	if (db->master_map_start_tn < cs_addrs->ti->mm_tn)
-	{
-		status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_writedb4, db,
-				 MM_ADDR(db->glob_sec), MASTER_MAP_SIZE(db->glob_sec), MM_BLOCK, 0, 0, 0);
-		if (status == SS$_IVCHAN)		/* database has been closed out, section deleted */
-			return;
-		if ((status & 1) == 0)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		db->master_map_start_tn = cs_addrs->ti->mm_tn;
-	}
-	else
-		if (db->last_lk_sequence < cs_addrs->ti->lock_sequence)
-		{
-			status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_writedb4a, db,
-					 cs_addrs->lock_addrs[0], db->glob_sec->lock_space_size, LOCK_BLOCK(db->glob_sec) + 1,
-					 0, 0, 0);
-			if (status == SS$_IVCHAN)		/* database has been closed out, section deleted */
-				return;
-			if ((status & 1) == 0)
-				ccp_signal_cont(status);	/***** Is this reasonable? *****/
-			db->last_lk_sequence = cs_addrs->ti->lock_sequence;
-		}
-		else
-			ccp_writedb5(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_writedb3.h b/sr_vvms/ccp_writedb3.h
deleted file mode 100644
index 82f8436..0000000
--- a/sr_vvms/ccp_writedb3.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __CCP_WRITEDB3_H__
-#define __CCP_WRITEDB3_H__
-
-void ccp_writedb3(ccp_db_header *db);
-
-#endif
diff --git a/sr_vvms/ccp_writedb4.c b/sr_vvms/ccp_writedb4.c
deleted file mode 100644
index 8ab5dfd..0000000
--- a/sr_vvms/ccp_writedb4.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <rms.h>
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "ccp.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-
-
-/* AST routine entered on completion of sys$qio to read the master map,
-   in ccp_writedb2 or ccp_writedb3 */
-
-void ccp_writedb4(ccp_db_header *db)
-{
-	sgmnt_addrs		*cs_addrs;
-	uint4		status;
-
-
-	assert(lib$ast_in_prog());
-
-	cs_addrs = db->segment;
-
-	if (cs_addrs == NULL  ||  cs_addrs->nl->ccp_state == CCST_CLOSED)
-		return;
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	if (db->last_lk_sequence < cs_addrs->ti->lock_sequence)
-	{
-		status = sys$qio(0, FILE_INFO(db->greg)->fab->fab$l_stv, IO$_READVBLK, &db->qio_iosb, ccp_writedb4a, db,
-				 cs_addrs->lock_addrs[0], db->glob_sec->lock_space_size, LOCK_BLOCK(db->glob_sec) + 1, 0, 0, 0);
-		if (status == SS$_IVCHAN)		/* database has been closed out, section deleted */
-			return;
-		if ((status & 1) == 0)
-			ccp_signal_cont(status);	/***** Is this reasonable? *****/
-		db->last_lk_sequence = cs_addrs->ti->lock_sequence;
-	}
-	else
-		ccp_writedb5(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_writedb4a.c b/sr_vvms/ccp_writedb4a.c
deleted file mode 100644
index 9527a26..0000000
--- a/sr_vvms/ccp_writedb4a.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include <ssdef.h>
-
-
-/* AST routine entered on completion of sys$qio to read the lock block,
-   in ccp_writedb2, ccp_writedb3, or ccp_writedb4 */
-
-void ccp_writedb4a(ccp_db_header *db)
-{
-	assert(lib$ast_in_prog());
-
-	if (db->segment == NULL  ||  db->segment->nl->ccp_state == CCST_CLOSED)
-		return;
-
-	if ((db->qio_iosb.cond & 1) == 0)
-		ccp_signal_cont(db->qio_iosb.cond);	/***** Is this reasonable? *****/
-
-	ccp_writedb5(db);
-
-	return;
-}
diff --git a/sr_vvms/ccp_writedb5.c b/sr_vvms/ccp_writedb5.c
deleted file mode 100644
index 207ff49..0000000
--- a/sr_vvms/ccp_writedb5.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "ccp.h"
-#include "ccpact.h"
-
-void ccp_writedb5(ccp_db_header *db)
-{
-	ccp_action_record buff;
-
-	buff.action = CCTR_WRITEDB1;
-	buff.pid = 0;
-	buff.v.h = db;
-	ccp_act_request(&buff);
-	return;
-}
diff --git a/sr_vvms/ce_init.c b/sr_vvms/ce_init.c
deleted file mode 100644
index 04d22e1..0000000
--- a/sr_vvms/ce_init.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "mdef.h"
-#include "comp_esc.h"
-#include "io.h"
-#include "trans_log_name.h"
-
-
-GBLDEF bool			ce_init_done = FALSE;
-GBLDEF struct ce_sentinel_desc	*ce_def_list;
-
-
-int ce_init (void)
-{
-	$DESCRIPTOR(filename,"GTM$COMPILER_ESCAPE");
-	$DESCRIPTOR(entrypoint,"GTM$COMPILER_ESCAPE");
-
-	int4	(*compiler_escape_init)();
-	mstr	filename_logical, filename_translation;
-	char	buffer[256];
-
-	uint4	status;
-
-
-	status = SS$_NORMAL;
-	if (!ce_init_done)
-	{
-		ce_def_list = NULL;
-
-		/* Check for existence of logical name; if present, invoke corresponding entry point. */
-		filename_logical.addr = filename.dsc$a_pointer;
-		filename_logical.len  = filename.dsc$w_length;
-
-		if (trans_log_name(&filename_logical, &filename_translation, buffer) == SS$_NORMAL)
-		{
-			if ((status = lib$find_image_symbol(&filename, &entrypoint, &compiler_escape_init)) == SS$_NORMAL)
-				compiler_escape_init();
-		}
-
-		ce_init_done = TRUE;
-	}
-
-	return status;
-}
diff --git a/sr_vvms/ce_substitute.c b/sr_vvms/ce_substitute.c
deleted file mode 100644
index d7acc19..0000000
--- a/sr_vvms/ce_substitute.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "compiler.h"
-#include "comp_esc.h"
-
-GBLREF unsigned char		*source_buffer;
-GBLREF boolean_t		run_time;
-GBLREF struct ce_sentinel_desc	*ce_def_list;
-
-error_def(ERR_CEUSRERROR);
-error_def(ERR_CEBIGSKIP);
-error_def(ERR_CETOOLONG);
-
-void ce_substitute (struct ce_sentinel_desc *shp, int4 source_column, int4 *skip_count)
-{
-	unsigned char	*cp, sub_buffer[MAX_SRCLINE];
-	int4		source_length, tail_length;
-	int4		lcl_src_col, sav_last_src_col, status;
-	boolean_t	run_or_compile;
-	struct dsc$descriptor_s	buffer, substitution;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	for (source_length = source_column;
-	     source_buffer[source_length-1] != '\0'  &&  source_length <= MAX_SRCLINE;
-	     source_length++)
-		;
-	buffer.dsc$a_pointer = source_buffer;
-	buffer.dsc$w_length = source_length;
-	substitution.dsc$a_pointer = sub_buffer;
-	substitution.dsc$w_length = MAX_SRCLINE;
-	/* Copy important values to locals to prevent inadvertent user modification. */
-	run_or_compile = run_time;
-	lcl_src_col = source_column;
-	status = shp->user_routine(&buffer, &lcl_src_col, run_or_compile, &substitution, skip_count);
-	if (status != SS$_NORMAL)
-	{
-		sav_last_src_col = TREF(last_source_column);
-		TREF(last_source_column) = source_column;
-		stx_error (ERR_CEUSRERROR, 1, status);
-		TREF(last_source_column) = sav_last_src_col;
-		return;
-	}
-	tail_length = source_length - (source_column + *skip_count) + 1;
-	if (0 > tail_length)
-	{
-		sav_last_src_col = TREF(last_source_column);
-		TREF(last_source_column) = source_column;
-		stx_error (ERR_CEBIGSKIP);
-		TREF(last_source_column) = sav_last_src_col;
-		return;
-	}
-	source_length = (source_column - 1) + substitution.dsc$w_length + tail_length;
-	if (source_length  >  MAX_SRCLINE - 2)
-	{
-		sav_last_src_col = TREF(last_source_column);
-		TREF(last_source_column) = source_column;
-		stx_error (ERR_CETOOLONG);
-		TREF(last_source_column) = sav_last_src_col;
-		return;
-	}
-	if (0 < tail_length)
-	{
-		memcpy (&source_buffer[(source_column-1) + substitution.dsc$w_length],
-			&source_buffer[(source_column-1) + *skip_count],
-			tail_length);
-	}
-	if (0 < substitution.dsc$w_length)
-		memcpy (&source_buffer[source_column-1], substitution.dsc$a_pointer, substitution.dsc$w_length);
-	source_buffer[source_length] = source_buffer[source_length+1] = '\0';
-	return;
-}
diff --git a/sr_vvms/change_fhead_timer.c b/sr_vvms/change_fhead_timer.c
deleted file mode 100644
index f931424..0000000
--- a/sr_vvms/change_fhead_timer.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <climsgdef.h>
-#include <descrip.h>
-#include <ssdef.h>
-
-#include "timers.h"
-
-void change_fhead_timer(char *timer_name, sm_int_ptr_t timer_address, int default_time, bool zero_is_ok)
-/* default_time is in milliseconds */
-{
-	uint4 old_value[2];
-	int i;
-	short len;
-	int4 status;
-	char *cp;
-	unsigned char time_buff[63];
-	struct dsc$descriptor_s dsc, timd;
-
-	error_def(ERR_TIMRBADVAL);
-
-	timd.dsc$b_dtype = DSC$K_DTYPE_T;
-	timd.dsc$b_class = DSC$K_CLASS_S;
-	timd.dsc$a_pointer = time_buff;
-	timd.dsc$w_length = SIZEOF(time_buff);
-	dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc.dsc$b_class = DSC$K_CLASS_S;
-	dsc.dsc$a_pointer = timer_name;
-	for (i = 0 , cp = timer_name ; *cp && i < SIZEOF(time_buff) ; cp++, i++)
-	    ;
-	dsc.dsc$w_length = i;
-	status = cli$present(&dsc);
-	if (CLI$_NEGATED == status)
-	{
-		if (TRUE == zero_is_ok)
-			timer_address[0] = timer_address[1] = 0;
-		else
-		{
-			timer_address[0] = default_time * TIMER_SCALE;
-	    		timer_address[1] = -1;
-		}
-	} else if (CLI$_PRESENT == status)
-	{
-		status = cli$get_value(&dsc, &timd, &len);
-		if (SS$_NORMAL == status)
-		{
-			old_value[0] = timer_address[0];
-			old_value[1] = timer_address[1];
-			timd.dsc$w_length = len;
-			status = sys$bintim(&timd, timer_address);
-			if ((!zero_is_ok && timer_address[0] == 0) || timer_address[1] < -9 ||
-				(timer_address[1] == -9 && timer_address[0] < -1640161632))		/* < 1 hour */
-			{
-				timer_address[0] = old_value[0];
-				timer_address[1] = old_value[1];
-				rts_error(VARLSTCNT(1) ERR_TIMRBADVAL);
-			}
-			assert(status & 1);
-		}
-		else
-			rts_error(VARLSTCNT(1) ERR_TIMRBADVAL);
-	}
-	return;
-}
diff --git a/sr_vvms/cli.c b/sr_vvms/cli.c
deleted file mode 100644
index dcd0db5..0000000
--- a/sr_vvms/cli.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <climsgdef.h>
-#include <descrip.h>
-#include "gtm_limits.h"
-
-#include "gtm_ctype.h"
-#include "gtm_stdlib.h"
-#include "gtm_string.h"
-
-#include "cli.h"
-#include "gtmmsg.h"
-#include "error.h"
-
-extern int4 CLI$GET_VALUE();
-extern int CLI$PRESENT();
-
-error_def(ERR_STRNOTVALID);
-
-CONDITION_HANDLER(clich)
-{
-	START_CH(FALSE);
-	CONTINUE;
-}
-
-boolean_t cli_get_hex(char *e, uint4 *dst)
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	char		buf[MAX_LINE], *ptr;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			ptr = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_hex */
-			if (!cli_str_to_hex(ptr, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return (FALSE);
-			}
-			return (TRUE);
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return (FALSE);
-}
-
-boolean_t cli_get_hex64(char *e, gtm_uint64_t *dst)
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	char		buf[MAX_LINE], *ptr;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			ptr = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_hex64 */
-			if (!cli_str_to_hex64(ptr, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return (FALSE);
-			}
-			return (TRUE);
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return (FALSE);
-}
-
-boolean_t cli_get_uint64(char *e, gtm_uint64_t *dst)
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	char		buf[MAX_LINE], *ptr;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			ptr = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_uint64 */
-			if (!cli_str_to_uint64(ptr, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return (FALSE);
-			}
-			return (TRUE);
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return (FALSE);
-}
-
-boolean_t cli_get_int(char *e, int *dst)		/* entity, destination */
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	unsigned char	buf[MAX_LINE], *bufpt;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			bufpt = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_int */
-			if (!cli_str_to_int(bufpt, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return FALSE;
-			} else
-				return TRUE;
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return FALSE;
-}
-
-boolean_t cli_get_int64(char *e, gtm_int64_t *dst)		/* entity, destination */
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	unsigned char	buf[MAX_LINE], *bufpt;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			bufpt = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_int64 */
-			if (!cli_str_to_int64(bufpt, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return FALSE;
-			} else
-				return TRUE;
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return FALSE;
-}
-
-boolean_t cli_get_num(char *e, int *dst)		/* entity, destination */
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	unsigned char	buf[MAX_LINE], *bufpt;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			bufpt = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_num */
-			if (!cli_str_to_num(bufpt, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return FALSE;
-			} else
-				return TRUE;
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return FALSE;
-}
-
-boolean_t cli_get_num64(char *e, gtm_int64_t *dst)		/* entity, destination */
-{
-	uint4		status;
-	unsigned short	retlength = 0;
-	unsigned char	buf[MAX_LINE], *bufpt;
-
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (CLI$_PRESENT == CLI$PRESENT(&d_ent))
-	{
-		if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-		{
-			bufpt = &buf[0];
-			buf[retlength] = 0;	/* for cli_str_to_num64 */
-			if (!cli_str_to_num64(bufpt, dst))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_STRNOTVALID, 2, retlength, buf);
-				return FALSE;
-			} else
-				return TRUE;
-		} else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-	}
-	return FALSE;
-}
-
-boolean_t cli_get_str(char *e, char *dst, unsigned short *ml)	/* entity, destination, max length */
-{
-	char	buf[MAX_LINE];
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-	unsigned short	l=0;
-	int4	status;
-
-	assert(*ml > 0);
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (((CLI$_PRESENT == (status = CLI$PRESENT(&d_ent))) || (CLI$_LOCPRES == status))
-		&& (CLI$_ABSENT != CLI$GET_VALUE(&d_ent, &d_buf, &l)))
-	{
-		if (l <= *ml)
-		{
-			memset(dst, 0, *ml);
-			memcpy(dst, buf, l);
-			*ml = l;
-			return TRUE;
-		}
-	}
-	return FALSE;
-}
-
-boolean_t cli_negated(char *e)	/* entity */
-{
-	$DESCRIPTOR(d_ent, " ");
-	int4	status;
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-	status =CLI$PRESENT(&d_ent);
-	if ((CLI$_NEGATED == status) || (CLI$_LOCNEG == status))
-		return TRUE;
-	else
-		return FALSE;
-}
-
-int cli_present(char *e)	/* entity */
-{
-	int4	status;
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-	status = CLI$PRESENT(&d_ent);
-	if ((CLI$_PRESENT == status) || (CLI$_LOCPRES == status))
-		return CLI_PRESENT;
-	else if ((CLI$_NEGATED == status) || (CLI$_LOCNEG == status))
-		return CLI_NEGATED;
-	else if (CLI$_ABSENT == status)
-		return CLI_ABSENT;
-	else
-		return status;
-}
-
-int4 cli_t_f_n(char *e)	/* entity */
-{	/* this function retrieves a CLI value of type TRUE_FALSE_NEITHER (for example, as seen in PATCH_CMD.CLD).
-	 * It assumes the presence of the qualifier in question.
-	 */
-	uint4 		status;
-	char		buf[MAX_LINE];
-	unsigned short		retlength = 0;
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-	{
-		if ('T' == buf[0])
-			return (1);
-		else  if ('F' == buf[0])
-			return (0);
-		else
-			return (-1);
-	} else
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-		return (-1);
-	}
-}
-
-int4 cli_n_a_e(char *e)	/* entity */
-{	/* this function retrieves a CLI value of type TRUE_ALWAYS_FALSE_NEVER_EXISTING .
-	 * It assumes the presence of the qualifier in question.
-	 */
-	uint4 		status;
-	char		buf[MAX_LINE];
-	unsigned short		retlength = 0;
-	$DESCRIPTOR(d_buf, buf);
-	$DESCRIPTOR(d_ent, " ");
-
-	d_ent.dsc$a_pointer = e;
-	d_ent.dsc$w_length = strlen(e);
-	assert(d_ent.dsc$w_length > 0);
-
-	if (SS$_NORMAL == (status = CLI$GET_VALUE(&d_ent, &d_buf, &retlength)))
-	{
-		if ('F' == buf[0] || 'N' == buf[0])
-			return (0);
-		else if ('T' == buf[0] || 'A' == buf[0])
-			return (1);
-		else  if ('E' == buf[0])
-			return (2);
-		else
-			return (-1);
-	} else
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_STRNOTVALID, 2, retlength, buf, status);
-		return (-1);
-	}
-}
diff --git a/sr_vvms/cli.h b/sr_vvms/cli.h
deleted file mode 100644
index 5c0e332..0000000
--- a/sr_vvms/cli.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef CLI$_NEGATED
-#include <climsgdef.h>
-#endif
-
-#define CLI_NEGATED CLI$_NEGATED
-#define CLI_PRESENT CLI$_PRESENT
-#define CLI_ABSENT  CLI$_ABSENT
-#define MAX_LINE 512
-#define CLI_GET_STR_ALL	cli_get_str_all_piece
-
-/* include platform independent prototypes */
-
-#include "cliif.h"
-
-int cli_get_str_all_piece(unsigned char *cli_text, unsigned char *all_piece_buff,
-	int *all_piece_buff_len); /***type int added***/
diff --git a/sr_vvms/cli_get_str_all_piece.c b/sr_vvms/cli_get_str_all_piece.c
deleted file mode 100644
index ec02825..0000000
--- a/sr_vvms/cli_get_str_all_piece.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-#include <climsgdef.h>
-#include <descrip.h>
-#include "gtm_string.h"
-#include "cli.h"
-
-extern int4 CLI$GET_VALUE();
-extern int CLI$PRESENT();
-/* This routine is written as a parallel module of UNIX cli_get_str(),
-	which always returns the concatenated string.
-	cli_get_str() of VVMS returns one piece at a time.
-   Note: cli_text must be a null terminated string below */
-cli_get_str_all_piece(unsigned char *cli_text, unsigned char *all_piece_buff, int *all_piece_buff_len)
-{
-	unsigned char                   map_pool[256], *ptr;
-	int				status, s_len;
-	unsigned short			n_len;
-
-	struct dsc$descriptor_s desc_cli_str;
-	$DESCRIPTOR(buffer, map_pool);
-        desc_cli_str.dsc$a_pointer = cli_text;
-        desc_cli_str.dsc$w_length = strlen(cli_text);
-        desc_cli_str.dsc$b_dtype = DSC$K_DTYPE_T;
-        desc_cli_str.dsc$b_class = DSC$K_CLASS_S;
-	*all_piece_buff_len = s_len = 0;
-	for (; ;)
-	{
-		status = CLI$GET_VALUE(&desc_cli_str, &buffer, &n_len);
-		if (SS$_NORMAL == status)
-		{
-			memcpy(all_piece_buff + s_len, buffer.dsc$a_pointer, n_len);
-			s_len += n_len;
-			all_piece_buff[s_len] = 0;
-			break;
-		}
-		if (CLI$_ABSENT == status)
-			return FALSE;
-		assert(CLI$_COMMA == status);
-		if (CLI$_COMMA == status)
-		{
-			memcpy(all_piece_buff + s_len, buffer.dsc$a_pointer, n_len);
-			s_len += n_len;
-			all_piece_buff[s_len]=',';
-			s_len++;
-		}
-	}
-	*all_piece_buff_len = s_len;
-	return TRUE;
-}
diff --git a/sr_vvms/cmicom.com b/sr_vvms/cmicom.com
deleted file mode 100644
index 688b7e6..0000000
--- a/sr_vvms/cmicom.com
+++ /dev/null
@@ -1,73 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! cmicom - compile/assemble cmi modules and place them in cmi.olb
-$!	p1 = version number
-$!	p2 = library (p, d, or b)
-$!	p3 = target device and directory
-$!
-$ if p1 .eqs. ""
-$  then
-$   write sys$output "Must supply a version"
-$   exit
-$ endif
-$ compopt=f$locate(p2,"PBD")
-$ if (f$length(p2) .ne. 1) .or. (compopt .eq. 3)
-$  then
-$   write sys$output "Library must be P, B or D"
-$   exit
-$ endif
-$ if p3 .eqs. ""
-$  then
-$   write sys$output "Must specify a target directory for the .olb file"
-$   exit
-$ endif
-$!
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ decc = alpha .or. (f$integer(f$extract(1,2,p1)) .ge. 32)
-$ macopt = f$element(alpha,",",",/migration/flag=(hints)") + "/nolist" + f$element(compopt,",",",,/debug")
-$! 2000/2/3 smw optimized cmi loops so turn off for now - 2000/2/8 fixed DEC C 6.2 ECO 2
-$ compopt = "/include=gtm$src:/nolist" + f$element(compopt,",","/optimize,/optimize/define=debug,/nooptimize/define=debug/debug")
-$! compopt = "/include=gtm$src:/nolist" + f$element(compopt,",","/nooptimize,/nooptimize/define=debug,/nooptimize/define=debug/debug")
-$ compopt = "/standard=vaxc/assume=nowritable_string_literals" + compopt
-$ ctlb :=
-$ if alpha then ctlb = "+" + f$search("sys$library:sys$lib_c.tlb") + "/libr"
-$ @gtm$tools:setactive_silent 'p1' 'p2'
-$ calldir = f$environment("default")
-$ set def 'p3'
-$ x := message/nolist gtm$vrt:[cmi]cmierrors
-$ if f$environment("VERIFY_PROCEDURE") then write sys$output x
-$ x
-$ x = "macro" + macopt + " gtm$vrt:[cmi]cmj_util.mar+" + f$search("gtm$src:maclib.mlb") + "/lib"
-$ if f$environment("VERIFY_PROCEDURE") then write sys$output x
-$ x
-$ if .not. alpha
-$  then
-$   x := macro'macopt' gtm$vrt:[cmi]cmivector.mar
-$   if f$environment("VERIFY_PROCEDURE") then write sys$output x
-$   x
-$ endif
-$cloop:
-$ fil = f$search("gtm$vrt:[cmi]*.c")
-$ if fil .nes. ""
-$  then
-$   x = "cc"+compopt+" "+fil+ctlb
-$   if f$environment("VERIFY_PROCEDURE") then write sys$output x
-$   x
-$   goto cloop
-$ endif
-$ gtm_library/create cmi
-$ gtm_library cmi *
-$ gtm_delete *.obj;*
-$ gtm_purge cmi.olb
-$ set def 'calldir'
-$!
-$ exit
diff --git a/sr_vvms/cmidefsp.h b/sr_vvms/cmidefsp.h
deleted file mode 100644
index 31b58b0..0000000
--- a/sr_vvms/cmidefsp.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*** The following typedef's will have to be changed if this is ported to UNIX (for DUX) at least */
-
-#ifndef CMIDEFSP_H_INCLUDED
-#define CMIDEFSP_H_INCLUDED
-
-#ifndef MDEFSP_included
-typedef 	long	int4;	/* 4-byte signed integer */
-typedef	unsigned long	uint4;	/* 4 byte unsigned integer */
-#endif
-
-#define ALIGN_QUAD _align(quadword)
-
-#define CMM_MIN_PEER_LEVEL	"010"
-
-enum nsn_type
-{	connect_op, discon_op, abort_op, exit_op, pathlost, protocol,
-	thirdparty, timeout, netshut, intmsg, reject, confirm,
-	nsn_type_count
-}; /* connect, discon, abort, exit were renamed connect_op, discon_op, abort_op, exit_op respectively to prevent name conflicts
-    * with system library routines */
-
-typedef struct
-{
-	unsigned short msg;
-	unsigned short unit;
-	unsigned char netnum;
-	unsigned char netnam[3];
-	unsigned char len;
-	unsigned char text[3];
-} cm_mbx;
-
-typedef struct
-{
-	unsigned short status;
-	unsigned short xfer_count;
-	uint4 dev_info;
-} qio_iosb;
-
-typedef struct
-{
-	unsigned short dsc$w_length;
-	unsigned char dsc$b_dtype;
-	unsigned char dsc$b_class;
-	char *dsc$a_pointer;
-} cmi_descriptor;
-
-typedef struct
-{
-	int4 fl;
-	int4 bl;
-} relque;
-
-struct NTD
-{
-	relque cqh;
-	qio_iosb mst;
-	cmi_descriptor mnm;
-	cmi_descriptor mbx;
-	unsigned short dch;
-	unsigned short mch;
-	int (*crq)();
-	void (*err)();
-	void (*sht)();
-	void (*dcn)();
-	void (*mbx_ast)();
-	bool (*acc)();
-	short unsigned stt[nsn_type_count];
-};
-
-typedef struct clb_stat_struct
-{
-	struct
-	{
-		uint4 msgs,errors,bytes,last_error;
-	} read,write;
-} clb_stat;
-
-struct CLB
-{
-	relque cqe;
-	cmi_descriptor nod;
-	cmi_descriptor tnd;
-	struct NTD *ntd;
-	unsigned short dch;
-	unsigned short mun;
-	uint4 usr;
-	void (*err)();
-	qio_iosb ios;
-	unsigned short cbl;
-	unsigned short mbl;
-	unsigned char *mbf;
-	void (*tra)();
-	unsigned char sta;
-	unsigned char unused1;
-	unsigned short tmo;
-	void (*ast)();
-	struct clb_stat_struct stt;
-};
-
-typedef struct CLB clb_struct;
-
-#include <ssdef.h>
-
-#define CMI_MUTEX_DECL		long int was_setast
-#define CMI_MUTEX_BLOCK	{ \
-				was_setast = DISABLE_AST; /* save previous state */ \
-				assert(SS$_WASSET == was_setast); \
-			}
-#define CMI_MUTEX_RESTORE { \
-				if (SS$_WASSET == was_setast) /* don't enable if was disabled coming in */ \
-	  				ENABLE_AST; \
-			  }
-
-#define ALIGN_QUAD	_align(quadword)
-
-#define CM_URGDATA_OFFSET	0
-#define CM_URGDATA_LEN		6
-
-#define CMI_ERROR(s)		(0 == ((s) & 1))
-#define CMI_CLB_IOSTATUS(c)	((c)->ios.status)
-#define CMI_CLB_ERROR(c)	(CMI_ERROR(CMI_CLB_IOSTATUS(c)))
-#define CMI_MAKE_STATUS(s)	(!CMI_ERROR(s) ? SS$_NORMAL : (s))
-
-typedef uint4 cmi_status_t;
-typedef uint4 cmi_reason_t;
-typedef int cmi_unit_t;
-
-#include <msgdef.h>
-
-#define CMI_REASON_INTMSG	MSG$_INTMSG
-#define CMI_REASON_DISCON	MSG$_DISCON
-#define CMI_REASON_ABORT	MSG$_ABORT
-#define CMI_REASON_EXIT		MSG$_EXIT
-#define CMI_REASON_PATHLOST	MSG$_PATHLOST
-#define CMI_REASON_PROTOCOL	MSG$_PROTOCOL
-#define CMI_REASON_THIRDPARTY	MSG$_THIRDPARTY
-#define CMI_REASON_TIMEOUT	MSG$_TIMEOUT
-#define CMI_REASON_NETSHUT	MSG$_NETSHUT
-#define CMI_REASON_REJECT	MSG$_REJECT
-#define CMI_REASON_CONFIRM	MSG$_CONFIRM
-
-#define CMI_IDLE(milliseconds)	hiber_start_wait_any((milliseconds))
-
-uint4 cmi_init(cmi_descriptor *tnd, unsigned char tnr, void (*err)(), void (*crq)(), bool (*acc)());
-
-#define cmi_realloc_mbf(clb, newsize)				\
-	{							\
-		if (clb->mbf)					\
-		{						\
-			clb->mbl = 0;				\
-			free(clb->mbf);				\
-		}						\
-		clb->mbf = (unsigned char *)malloc(newsize); 	\
-		clb->mbl = newsize;				\
-	}
-
-#endif /* CMIDEFSP_H_INCLUDED */
diff --git a/sr_vvms/cms_load.com b/sr_vvms/cms_load.com
deleted file mode 100644
index 451ece0..0000000
--- a/sr_vvms/cms_load.com
+++ /dev/null
@@ -1,105 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! This DCL command file is a front end to launch a platform_CMS_LOAD, which in turn fetches
-$! files from CMS libraries and puts them into the appropriate source directory(ies) for the
-$! specified platform.
-$!
-$! 	p1 - target platform or CMS library specification from which the target can be determined
-$!	p2 - "to version", version of GT.M to populate on target platform (including punctuation, e.g., class name)
-$!	p3 - library's password (for Unix platforms)
-$!	p4 - "from version", version of GT.M to fetch (defaults to p2)
-$!
-$ interact = (F$MODE() .eqs. "INTERACTIVE")
-$!
-$askplat:
-$!
-$! Determine platform.
-$! Since VMS DCL doesn't have an "elseif" command, the following are
-$! all single "if"'s to improve readability and maintainability by
-$! keeping down the number of nesting levels.
-$!
-$! check by specific platform name
-$!
-$  platform :=
-$  if ((p1 .eqs. "ALPHA2") .or. (p1 .eqs. "WIGLAF") .or (p1 .eqs. "ASGARD"))
-$   then
-$    cms_lib = "S_AVMS"
-$    dl_type = "VMS"
-$    platform = "''p1'"
-$  endif
-$!
-$  if ( p1 .eqs. "CETUS" )
-$   then
-$    cms_lib = "S_VMS"
-$    dl_type = "VMS"
-$    platform = "CETUS"
-$  endif
-$!
-$  if ( platform .eqs. "" )
-$  then
-$    if ( interact )
-$    then
-$      inquire p1 "Enter valid CMS library or target platform name"
-$      if ( p1 .eqs. "" )
-$      then
-$        write sys$output "%CMS_LOAD-E-BADPLATFORM, Invalid platform or CMS library specified"
-$        exit
-$      endif
-$      goto askplat		! verify platform or CMS library specification
-$    else
-$        write sys$output "%CMS_LOAD-E-BADPLATFORM, Invalid platform or CMS library specified"
-$        exit
-$    endif
-$  endif
-$!
-$! Verify CMS library.
-$  cms set library 'cms_lib'
-$  if ( $severity .ne. 1 )
-$   then
-$    write sys$output "%CMS_LOAD-E-BADCMSLIB, Invalid platform or CMS library specified for first argument"
-$    exit
-$  endif
-$!
-$! If we get to this point, we should have a valid platform and CMS library; now verify the "to" version.
-$! This is the version on the target platform to which the sources will be copied.
-$!
-$  to_version = p2
-$askver:
-$  if ( to_version .eqs. "" )
-$  then
-$    if ( interact )
-$    then
-$      write sys$output "%CMS_LOAD-I-NOTOVERSION, You have specified a null ""to version""; the default is V9.9-0"
-$      inquire to_version "Enter ""to version"" (with all punctuation) or enter <CR> to retain V9.9-0"
-$    endif
-$    if ( to_version .eqs. "" )
-$    then
-$      write sys$output "%CMS_LOAD-I-DEFAULTVER, Defaulting ""to version"" to V9.9-0"
-$      to_version = "V9.9-0"
-$    endif
-$  endif
-$!
-$  from_version == p4
-$!
-$  cmsver = to_version - "." - "-"
-$  toolsdir = "user:[library.''cmsver'.tools]"
-$  gtmverdir = "user:[library.''cmsver']"
-$  @'toolsdir'cms_load_verify_from_to_version 'to_version' 'from_version'
-$  if ( $status .ne. 1 )
-$    then
-$      exit
-$  endif
-$!
-$ when = f$trnlnm("test_run_time")
-$ if when .nes. "" then $ when = "/after=""" + when + """"
-$  submit/noprint/notify/queue='dl_type'_download_hiq/log='gtmverdir''platform'_cms_load.log 'toolsdir''dl_type'_cms_load.com -
-	'when' /parameters=("''to_version'","''platform'","''cms_lib'","''p3'","''from_version'")
diff --git a/sr_vvms/cms_load_verify_from_to_version.com b/sr_vvms/cms_load_verify_from_to_version.com
deleted file mode 100644
index 790e55b..0000000
--- a/sr_vvms/cms_load_verify_from_to_version.com
+++ /dev/null
@@ -1,99 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! This DCL command file verifies the validity of the "from version" and
-$! "to version" for a dowload from CMS to a target platform.  The rules
-$! are:
-$!
-$!	if "to version" is "V9.x-x" and not "V9.9-0", then "from version"
-$!		can be any valid version ("V9.9-0" must always be the most
-$!		recent on the main line of descent),
-$!	otherwise, "from version" must match "to version"
-$!
-$!	if "from version" is not specified and there is a choice, this
-$!	script, if invoked interactively, will prompt for it.  The default
-$!	is to set "from version" to "to version".
-$!
-$!
-$! Input:
-$!
-$!	p1 - "to version", the version of GT.M to populate on the target platform
-$!	p2 - "from version", the version of GT.M to fetch from CMS
-$!
-$!
-$! Output:
-$!
-$!	from_version - set to version of GT.M to fetch from CMS, compatible
-$!			with requested "to version"
-$!
-$!
-$! Error:
-$!
-$!	exit
-$!
-$  interact = (F$MODE() .eqs. "INTERACTIVE")
-$!  set verify
-$!
-$! Determine whether the user wishes to fetch a different version (the "from version") that that being populated.
-$! This is only legal when the "to version" is a V9.9-x version other than V9.9-0 (which must always be the most
-$! recent on the main line of descent).
-$!
-$!
-$  to_version = p1
-$  from_version == p2
-$!
-$  if ( from_version .nes. ""  .and.  from_version .nes. to_version )
-$    then
-$      if ( f$extract(0,3,to_version) .nes. "V9."  .and.  f$extract(0,6,from_version) .nes. "NEXT32" )
-$        then
-$          write sys$output "%CMS_LOAD-I-MISMATCH, You cannot overwrite ''to_version' with any other version"
-$          exit 9
-$        else
-$          if ( to_version .eqs. "V9.9-0" )
-$            then
-$              write sys$output "%CMS_LOAD-I-ILLDEVELOP, V9.9-0 must always be the most recent version the main line of descent"
-$              exit 9
-$          endif
-$      endif
-$  endif
-$!
-$!
-$! If user didn't specify a different "from version", determine whether it's allowed;
-$! if so, and this is an interactive invocation, prompt the user for a "from version".
-$!
-$  if ( from_version .eqs. "" )
-$    then
-$      if ( f$extract(0,3,to_version) .nes. "V9."  .or.  to_version .eqs. "V9.9-0" )
-$        then
-$          from_version == to_version	! no comment needed about defaulting; there's no choice
-$        else
-$          if ( interact )
-$            then
-$              write sys$output "%CMS_LOAD-I-NOFROMVERSION, You have specified a null ""from version""; the default is ",to_version
-$              inquire spec_version "Enter ""from version"" (with all punctuation) or enter <CR> to retain ''from_version'"
-$              from_version == spec_version
-$          endif
-$          if ( from_version .eqs. "" )
-$            then
-$              write sys$output "%CMS_LOAD-I-DEFAULTVER, Defaulting ""from version"" to ",to_version
-$              from_version == to_version
-$          endif
-$      endif
-$  endif
-$!
-$  if ( F$EXTRACT(0,3,from_version) .eqs. "V9." )
-$    then
-$      write sys$output ""
-$      write sys$output "You have selected ",from_version," which contains the most recent versions in the main line of descent"
-$      write sys$output ""
-$  endif
-$!
-$  exit 1
diff --git a/sr_vvms/comall.m b/sr_vvms/comall.m
deleted file mode 100644
index ab371fa..0000000
--- a/sr_vvms/comall.m
+++ /dev/null
@@ -1,259 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2013 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-main	;	by default go to prompt
-prompt	;
-	s lower="abcdefghijklmnopqrstuvwxyz",upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-	For  Read "V[AX] or A[XP]? ",vaxoraxp,! Do  Quit:$Data(vaxoraxp)
-	.	Set vaxoraxp=$Translate($Extract(vaxoraxp,1),lower,upper)
-	.	If vaxoraxp="A" Set vaxoraxp="AXP"
-	.	Else  If vaxoraxp="V" Set vaxoraxp="VAX"
-	.	Else  Write "  Should be VAX or AXP",! Kill vaxoraxp
-	If vaxoraxp="AXP" Do
-	.	Set vaxc=0
-	.	For i=0:1  Set x=$ztrnlnm("gtm$libsrc",,i) Quit:x=""  Do
-	.	.	If x="T_VMS" Write "GTM$LIBSRC contains VAX directory for AXP platform, aborting list generation",!  Halt
-	Else  Do
-	.	For i=0:1  Set x=$ztrnlnm("gtm$libsrc",,i) Quit:x=""  Do
-	.	.	If x="T_AVMS" Write "GTM$LIBSRC contains AXP directory for VAX platform, aborting list generation",!  Halt
-	.	For  Read "D[EC C] or V[AX C]? ",vaxc,! Do  Quit:$Data(vaxc)
-	.	.	Set vaxc=$Translate($Extract(vaxc,1),lower,upper)
-	.	.	If vaxc="V" Set vaxc=1
-	.	.	Else  If vaxc="D" Set vaxc=0
-	.	.	Else  Write "  Should be DECC or VAXC",! Kill vaxc
-	For  Read "F[ull] or I[ncremental] Version? ",efori,! Do  Quit:$d(efori)
-	.	Set efori=$Translate($Extract(efori,1),lower,upper)
-	.	If efori="F" Set efori=1
-	.	Else  If efori="I" Set efori=0
-	.	Else  Write "  Should be F or I",! Kill efori
-	For  Read "multiple compilations per line? [Y] ",mcpl,! Do  Quit:$d(mcpl)
-	.	Set mcpl=$tr($e(mcpl,1),lower,upper)
-	.	If mcpl="Y"!'$l(mcpl) Set mcpl=1
-	.	Else  If mcpl="N" Set mcpl=0
-	.	Else  Write "  Should be Y or N",! Kill mcpl
-	For  Write "VMS version: [",$Select(vaxoraxp="AXP":"V7.2",1:"V7.2") Read "] ",vmsver,! Do  Quit:$d(vmsver)
-	.	If vmsver="" Set vmsver=$Select(vaxoraxp="AXP":"V72",1:"V72") Quit
-	.	Set vmsver=$TRanslate(vmsver,lower_".",upper)
-	.	If vmsver="V72" Quit
-	.	If vaxoraxp="AXP",vmsver="V71"!(vmsver="V62")!(vmsver="V73") Quit
-	.	If vaxoraxp="VAX",vmsver="V71"!(vmsver="V61")!(vmsver="V55") Quit
-	.	Else  Write "  Should be V7.2 or ",$Select(vaxoraxp="AXP":"V7.3, V7.1 or V6.2",1:"V7.1, V6.1 or V5.5"),! Kill vmsver
-	do common
-	quit
-noprompt;	with no input reads for the alpha
-	s lower="abcdefghijklmnopqrstuvwxyz",upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-	set vaxoraxp="AXP"
-	set efori=1
-	set mcpl=1
-	set vmsver="V72"
-	set vaxc=0
-	do common
-	quit
-common	;
-	k ar,br
-	Set ofil=$zparse($ztrnlnm("gtm$libsrc"),"directory")
-	If $p(ofil,".")="[LIBRARY",$p(ofil,".",3)="SRC]" s tfil=$p(ofil,".",2)
-	Else  If $extract(ofil,1,2)="[V",$piece(ofil,".",2)="SRC]" Set tfil=$extract($piece(ofil,".",1),2,$length(ofil))
-	Else  Read "GT.M Version: ",tfil,!
-	If tfil="" Write !,"No version specified",! Quit
-	Set ofil=$zparse(vaxoraxp_"_gtm$gtmdev:[LIBRARY."_tfil_"]"_vaxoraxp_"_comlist.com")
-	if ofil="" w !,"No version structure for "_tfil,! quit
-	s (mtables,relname)=0
-	f  s x=$zsearch("gtm$libsrc:*.*") q:x=""  s ar($p($p(x,";",1),"]",2))=""
-	f  s x=$o(ar(x)) q:x=""  s br($p(x,".",2),$p(x,".",1))="" s:x["MTABLES.C" mtables=1 s:x["RELEASE_NAME.H" relname=1
-	i 'relname w !,"WARNING: No RELEASE_NAME.H"
-	e  i 'mtables s br("C","MTABLES")="" w !,"Added MTABLES.C to the compile list"
-	;
-	o ofil:newv u ofil
-	d proc
-	c ofil
-	q
-proc	;
-	s count=0
-	w "$! comlist.com : p1=macro params, p2=cc params, p3=gtm$xxx, p4 = version number, p5 = YES to build",!
-	w "$ set verify",!
-	w "$ show time",!
-	w "$!",!
-	Write "$! default to building development version",!
-	w "$ if p4 .eqs. """" then p4 = ""d""",!
-	w "$!",!
-	Write "$! use production images to compile MSG.M",!
-	w "$ @gtm$com:setactive 'p4' p",!
-	w "$ set noon",!
-	w "$ install list gtmsecshr",!
-	w "$ if $severity .ne. 1",!
-	w "$  then",!
-	w "$   pdir = ""gtm$root:["" + f$trnlnm(""gtm$curpro"") + "".pro]""",!
-	w "$   define gtmsecshr gtm$sec:'f$trnlnm(""gtm$curpro"")'_gtmsecshr.exe",!
-	w "$   define gtmshr 'pdir'gtmshr.exe",!
-	w "$   define mcompile 'pdir'mcompile.exe",!
-	w "$ endif",!
-	w "$ set default 'p3'",!
-	w "$ set default [.obj]",!
-	w "$!",!
-	;
-	Set listopts="/nolist"
-	s srcdir="gtm$src:",srctail=""
-	Set maxlen=0,comend="",search="CLD",exclude="",command="$ set command/object"_listopts Do genlst
-	w "$",!
-	Set maxlen=0,search="MSG",exclude="",command="$ message/object"_listopts Do genlst
-	w "$",!
-	w "$! define MUMPS command if .cldx file present",!
-	s srcdir="gtm$src:",srctail=""
-	Set maxlen=0,comend="",search="CLDX",exclude="",command="$ set command" Do genlst
-	w "$",!
-	Set search="MSG"
-	Write "$ if f$extract(1,2,p4) .lt. 43 then $ goto skpmsg",!
-	Write "$ mumps 'f$search(""gtm$src:MSG.M"")'",!
-	Write "$ link msg",!
-	Write "$ gtm_process_msg == ""$"" + f$environment(""DEFAULT"") + ""msg.exe""",!
-	Set pname="",errctl=0
-	For  Set pname=$Order(br(search,pname)) Quit:""=pname  Do:pname["ERRORS"
-	. Write "$ gtm_process_msg ",srcdir,pname,".",search," VMS",!
-	. Set br("C",pname_"_CTL")="",errctl=1
-	. If "MERRORS"=pname Write "$ rename/log merrors_ansi.h gtm$src",!
-	If errctl Write "$ rename/log *errors_ctl.c gtm$src",!
-	Write "$ delete/log msg.obj;",!
-	Write "$ delete/log msg.exe;",!
-	Write "$ @gtm$tools:gen_gtm_threadgbl_deftypes",!
-	Write "$ if 1 .ne. $status",!
-	Write "$ then",!
-	Write "$        write sys$output ""Failed to build gtm_threadgbl_deftypes.h - aborting build""",!
-	Write "$        exit",!
-	Write "$ endif",!
-	Write "$",!
-	Write "$skpmsg:",!
-	If efori write "$!",!
-	Set srcdir="gtm$src:",srctail=""
-	s maxlen=0
-	i mcpl s maxlen=100
-	w "$ compiler = ""cc""",!
-	Set vaxcopts="/vaxc"
-	Set deccslit="/assume=nowritable_string_literals"
-	Set deccopts="/standard=vaxc/share_globals/float=g_float"
-	Set deccopts=deccopts_"/warn=disable=(signedknown,signedmember,questcompare,questcompare1)/inc=(gtm$src:,tcpip$examples:)"
-	If (vaxoraxp="VAX")&(vaxc=1) Set opts=vaxcopts
-	Else  Set opts=deccopts_deccslit
-	Set opts=opts_listopts_"'p2'"
-	Write "$ opts = """_opts_"""",!
-	Set axpexcl="GTCM_NETERR,GTCM_SERVER,"        ; these sources need different options and header files on AXP VMS
-	Set deccexcl="MEMMOVE,SECSHR_DB_CLNUP,SEC_SHR_BLK_BUILD,"	; these need to omit "DECC$" prefix from "MEMMOVE"
-	; avoid compiling GTM_THREADGBL_DEFTYPES.C since it is used by gtm$tools:gen_gtm_threadgbl_deftypes.com to
-	; build GTM_THREADGBL_DEFTYPES.H. It is not part of the GTM runtime. SE 11/10.
-	Set exclude="GTM_THREADGBL_DEFTYPES,"
-	If vaxoraxp="AXP" Set exclude=exclude_axpexcl; Do
-	.	Set deccaxp="MUPIP_SET_FILE,",exclude=exclude_deccaxp
-	If vaxc=0 Set exclude=exclude_deccexcl
-	s comend="",search="C",command="$ 'compiler''opts'" d genlst
-	If vaxoraxp="AXP" Do
-	.	;Write "$ write sys$output ""DECC-E-NFG - REMOVE this nonsense when DECC can compile MUPIP_SET_FILE /optimize""",!
-	.	;Write "$ opts = """_deccopts_listopts_"'p2'/noopti""",!
-	.	;Write command_$p(deccaxp,",")_".C"_comend,!
-	.	; end of MUPIP_SET_FILE nonsense
-	.	; N.B.  On AXP VMS V6.1 or later, <NBFDEF.H> has been moved to SYS$LIB_C.TLB; recompile source files that need it.
-	.	Write "$ opts = """_deccopts_listopts_"'p2'""",!	; N.B. omit "/assume=nowritable_string_literals"
-	.	Set comend="+sys$library:sys$lib_c.tlb/library",command="$ 'compiler''opts'"
-	.	For i=1:1 Set pname=$Piece(axpexcl,",",i) Quit:pname=""  Do
-	.	.	If $Data(br("C",pname)) Write command_" "_srcdir_pname_".C"_comend,!
-	If vaxc=0 Do
-	.	w "$! Turn off prefix generation for the name memmove in order to generate references to local version.",!
-	.	w "$! Then compile memmove and anything in gtmsecshr that refers to it in order to eliminate",!
-	.	w "$! any outbound calls from gtmsecshr (other modules that refer to memmove should use the one",!
-	.	w "$! in the DEC C shared executable because it's probably faster).",!
-	.	Write "$ opts = """_deccopts_deccslit_listopts_"/prefix=except=(MEMMOVE)'p2'""",!
-	.	s comend="",search="C",command="$ 'compiler''opts'"
-	.	For i=1:1 Set pname=$Piece(deccexcl,",",i) Quit:pname=""  Do
-	.	.	If $Data(br("C",pname)) Write command_" "_srcdir_pname_".C"_comend,!
-	If efori Write "$ library/macro/create/log maclib",!  Set libopt="/insert"
-	Else     Write "$ copy/log gtm$src:maclib.mlb []",!   Set libopt=""
-	Set maxlen=0,comend="",search="MAX",exclude="",command="$ library/macro"_libopt_"/log maclib" Do genlst
-	Write "$ copy maclib.mlb gtm$src",!
-	Write "$ purge/log maclib.mlb,gtm$src:maclib.mlb",!
-	Write "$ library/macro/list gtm$src:maclib",!
-	;
-	; Native VAX MACRO dialect modules.
-	Write "$ compiler = ""macro""",!
-	If vaxoraxp="VAX" Write "$ opts = """_listopts_"'p1'""",!
-	Else  Write "$ opts = ""/migration/flag=(hints)"_listopts_"'p1'""",!
-	Set maxlen=0,comend="+maclib/lib",search="MAR",exclude="",command="$ 'compiler''opts'" Do genlst
-	;
-	; Native AXP MACRO dialect modules.
-	If vaxoraxp="AXP" Do
-	.	Write "$ compiler = ""macro""",!
-	.	Write "$ opts = ""/alpha_axp"_listopts_"'p1'""",!
-	.	Set maxlen=0,comend="+maclib/lib",search="M64",exclude="",command="$ 'compiler''opts'" Do genlst
-	If efori Do newolb
-	w "$!",!
-	If $Data(br("C","DDPGVUSR")) Do
-	.	Write "$ library/log/noglobals mumps ddpgvusr.obj",!
-	.	Write "$ delete/log ddpgvusr.*;*",!
-	w "$ dir *.obj;2",!	; look for duplicates (usually caused by both C and MACRO versions)
-	; Macro64 V1.2-108 has a bug which leaves dummy symbols from bndsym
-	; gtm_main.m64 does not use bndsym but library/list/name showed it
-	; also generated dummy symbols incorrectly.  See mails in C9E07-002614 folder
-	; The problem in gtm_main.m64 is using the $call macro with an argument of type /A
-	; This bug was fixed by -118 which we no longer have
-	For m64bug="CMI_SYMBOLS","DDPGVUSR_SYMBOLS","GTM_MAIN"  Do
-	. If $Data(br("M64",m64bug)) Do
-	. .	Write "$ library/log mumps "_m64bug_".obj",!
-	. .	Write "$ library/list="_m64bug_".name/name/only="_m64bug_" mumps",!
-	. .	Write "$ search/noout/nowarn "_m64bug_".name macro64$",!
-	. .	Write "$ if $status .ne. %X08D78053  ! NOMATCHES",!
-	. .	Write "$ then",!
-	. .	Write "$     library/remove=macro64$* mumps",!
-	. .	Write "$ endif",!
-	. .	Write "$ delete/log "_m64bug_".obj;*,"_m64bug_".name;*",!
-	If 'efori Write "$ library/log mumps *.obj",!
-	If efori  Write "$ library mumps *.obj",!
-	If efori  write "$ library/compress/data=reduce mumps.olb",!
-	If efori  Write "$ purge/log mumps.olb",!
-	write "$ delete *.obj;*",!
-	write "$ show time",!
-	write "$ if p5 .nes. ""YES"" then exit",!
-	write "$ if p3 .eqs. ""GTM$DBG"" then $@gtm$tools:builddbg 'p4' ",vmsver,!
-	write "$ if p3 .eqs. ""GTM$BTA"" then $@gtm$tools:buildbta 'p4' ",vmsver,!
-	write "$ if p3 .eqs. ""GTM$PRO"" then $@gtm$tools:buildpro 'p4' ",vmsver,!
-	write "$ show time",!
-	quit
-genlst	s command=command_" "_srcdir,str=command,pname="",linecnt=0
-	f  s pname=$o(br(search,pname)) q:pname=""  d
-	.	If '(exclude[(pname_",")) Do
-	.	.	s count=count+1,linecnt=linecnt+1
-	.	.	s x=pname_"."_search_comend
-	.	.	i maxlen,$l(x)+$l(str)>maxlen d flush s linecnt=1
-	.	.	s str=str_x_","
-	.	.	i 'maxlen d flush
-	d flush:(maxlen)&(linecnt)
-	q
-flush	w $e(str,1,$l(str)-1)_srctail,!
-	s str=command,linecnt=0
-	q
-newolb	;
-	w "$",!
-	w "$ ! ----- create new mumps.olb -------",!
-	w "$",!
-	w "$ show status",!
-	w "$ set noverify",!
-	w "$ size = 0",!
-	w "$ count = 0",!
-	w "$ cntblk:",!
-	w "$ x = f$search(""*.obj"")",!
-	w "$ if x .nes. """"",!
-	w "$  then ",!
-	w "$   count = count + 1",!
-	w "$   size = size + f$file_attributes(x,""EOF"")",!
-	w "$   goto cntblk",!
-	w "$ endif",!
-	w "$ gblcnt = count + count / 10",!
-	w "$ size = size + size / 10",!
-	w "$ set verify",!
-	w "$ purge/log",!
-	w "$ library/create=(history:0,module:'count',global:'gblcnt',block:'size') mumps",!
-	q
diff --git a/sr_vvms/comimage.com b/sr_vvms/comimage.com
deleted file mode 100644
index 3ddda36..0000000
--- a/sr_vvms/comimage.com
+++ /dev/null
@@ -1,110 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! This file submits either PRO, BTA or DBG image for build
-$! P1 is the target-version
-$! P2 is the target-image (bta, dbg, pro)
-$! P3 is the target-node (which determines the platform)
-$! P4 is an optional quoted list of submit qualifiers (e.g. "/queue=alpha1_hiq/after=time")
-$!
-$ interact = (f$mode() .eqs. "INTERACTIVE")
-$!
-$ if p1 .eqs. ""
-$  then
-$   write sys$output "Must specify a version"
-$   if interact then inquire p1 "Version"
-$   if p1 .eqs. ""
-$    then
-$     write sys$output "No action taken"
-$     exit
-$   endif
-$ endif
-$!
-$askimage:
-$ if f$locate(p2,"/BTA/DBG/PRO") .eq. f$length("/BTA/DBG/PRO")
-$  then
-$   write sys$output "Must specify an image"
-$   if interact
-$    then
-$     inquire p2 "Image (bta,dbg,pro)"
-$     if f$locate(p2,"/BTA/DBG/PRO") .eq. f$length("/BTA/DBG/PRO")
-$      then
-$	write sys$output "Check Spelling"
-$       goto askimage
-$     endif
-$    else
-$     write sys$output "No action taken"
-$     exit
-$   endif
-$ endif
-$!
-$ if p3 .eqs. "" then p3 = f$getsyi("nodename")
-$!
-$ if (p3 .eqs. "CETUS")
-$  then
-$   if interact
-$    then
-$	write sys$output " "
-$	inquire link "Do you want to link the ''p2' files? Y/N	"
-$	if ((link .eqs. "Y") .or. (link .eqs. "y"))
-$	   then
-$   		linkopt := YES
-$          else
-$		linkopt := NO
-$	endif
-$    else
-$     linkopt := NO
-$   endif
-$  else
-$   linkopt := YES
-$ endif
-$!
-$ platform = f$getsyi("arch_name")
-$ if (platform .eqs. "Alpha")
-$  then
-$    platform := AXP
-$ endif
-$!
-$ @gtm$tools:build_print_stage "comimage ''p1' ''p2' on ''p3'" "begin"
-$!
-$ when = f$trnlnm("test_run_time")
-$ if when .nes. "" then $ when = "/after=""" + when + """"
-$ comlist = f$search("user:[library."+p1+"]"+platform+"_comlist.com",0)
-$ if ( comlist .eqs. "" )
-$ then
-$   write sys$output "%COMIMAGE-E-NOCOMLIST, no comlist for version"
-$   exit
-$ endif
-$ if (p2 .eqs. "PRO" .or. p2 .eqs. "P")
-$    then
-$       submit/noprint/name=buildpro/log=user:[library.'p1']buildpro.log -
-	  /queue='p3'_hiq/parameters=("","",gtm$pro,'p1','linkopt') 'comlist''p4''when'
-$	comimage_entry == $entry
-$	exit
-$ endif
-$ if (p2 .eqs. "BTA" .or. p2 .eqs. "B")
-$    then
-$	submit/noprint/name=buildbta/log=user:[library.'p1']buildbta.log -
-          /queue='p3'_hiq/parameters=("/debug","/nooptimize/debug",gtm$bta,'p1','linkopt') -
-			'comlist''p4''when'
-$	comimage_entry == $entry
-$ 	exit
-$ endif
-$ if (p2 .eqs. "DBG" .or. p2 .eqs. "D")
-$     then
-$        submit/noprint/name=builddbg/log=user:[library.'p1']builddbg.log -
-          /queue='p3'_hiq/parameters=("/debug","/nooptimize/debug/define=DEBUG",gtm$dbg,'p1','linkopt') -
-			'comlist''p4''when'
-$	comimage_entry == $entry
-$ 	exit
-$ endif
-$ @gtm$tools:build_print_stage "comimage" "end"
-$ exit
diff --git a/sr_vvms/comp_lits.c b/sr_vvms/comp_lits.c
deleted file mode 100644
index 374c5e5..0000000
--- a/sr_vvms/comp_lits.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "compiler.h"
-#include <rtnhdr.h>
-#include "mdq.h"
-#include "stringpool.h"
-
-GBLREF mliteral 	literal_chain;
-GBLREF spdesc 		stringpool;
-GBLREF unsigned short 	source_name_len;
-GBLREF mident		routine_name;
-
-GBLDEF uint4 		lits_size;
-
-void comp_lits(rhead)
-rhdtyp *rhead;
-{
-	uint4 offset;
-	mliteral *p;
-
-	offset = stringpool.free - stringpool.base;
-	offset += PADLEN(offset, NATIVE_WSIZE);
-	rhead->src_full_name.len = source_name_len;
-	rhead->src_full_name.addr = (char *)offset;
-	offset += source_name_len;
-	offset += PADLEN(offset, NATIVE_WSIZE);
-	rhead->routine_name.len = routine_name.len;
-	rhead->routine_name.addr = (char *)offset;
-	offset += routine_name.len;
-	offset += PADLEN(offset, NATIVE_WSIZE);
-	dqloop(&literal_chain, que, p)
-		if (p->rt_addr < 0)
-		{
-			p->rt_addr = offset;
-			offset += SIZEOF(mval);
-		}
-	lits_size = offset;
-}
diff --git a/sr_vvms/comque.com b/sr_vvms/comque.com
deleted file mode 100644
index dbbc77d..0000000
--- a/sr_vvms/comque.com
+++ /dev/null
@@ -1,53 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2005 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! p1 is the version to build
-$! p2 is the node on which to build; defaults to the node on which it is submitted
-$! p3 can be used to specify a quoted list of submit qualifiers like "/hold" or "/after=0-23:59"
-$!
-$ interact = (f$mode() .eqs. "INTERACTIVE")
-$!
-$ if p1 .eqs. "" then p1 = f$trnlnm("gtm$verno")
-$ if p2 .eqs. "" then p2 = f$getsyi("nodename")
-$!
-$ @gtm$com:setactive 'p1' p
-$ @gtm$tools:comimage 'p1' "PRO" 'p2' 'p3'
-$ comimage_pro_entry = comimage_entry
-$
-$ @gtm$tools:comimage 'p1' "DBG" 'p2' 'p3'
-$ comimage_dbg_entry = comimage_entry
-$
-$ @gtm$tools:buildhlp 'p1'
-$
-$ set entry /release 'comimage_pro_entry'
-$ sync /entry='comimage_pro_entry'
-$ set noverify
-$ search gtm$ver:buildpro.log "-W-","-E-","-F-" /out=gtm$ver:errorpro.log
-$ comimage_pro_status = $status
-$ set verify
-$ if (comimage_pro_status .eqs. "%X00000001") then goto error_handler
-$ if (((comimage_pro_status / 2) * 2) .eqs. comimage_pro_status) then goto error_handler
-$ delete/log gtm$ver:errorpro.log.
-$
-$ set entry /release 'comimage_dbg_entry'
-$ sync /entry='comimage_dbg_entry'
-$ set noverify
-$ search gtm$ver:builddbg.log "-W-","-E-","-F-" /out=gtm$ver:errordbg.log
-$ comimage_dbg_status = $status
-$ set verify
-$ if (comimage_dbg_status .eqs. "%X00000001") then goto error_handler
-$ if (((comimage_dbg_status / 2) * 2) .eqs. comimage_dbg_status) then goto error_handler
-$ delete/log gtm$ver:errordbg.log.
-$
-$ exit
-$
-$error_handler:
-$ exit
diff --git a/sr_vvms/cre_comlist.com b/sr_vvms/cre_comlist.com
deleted file mode 100644
index 9cc5a58..0000000
--- a/sr_vvms/cre_comlist.com
+++ /dev/null
@@ -1,45 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! cre_comlist invokes commal to create a typ_comlist.com compile driver
-$!
-$ interact = (f$mode() .eqs. "INTERACTIVE")
-$!
-$ if f$search("gtm$libsrc:*.*.*",0) .eqs. ""
-$  then
-$   write sys$output "GTM$LIBSRC does not point to any sources"
-$   if interact
-$    then
-$     inquire libsrc "Compile directory list"
-$     define gtm$libsrc 'libsrc'
-$   endif
-$   if f$search("gtm$libsrc:*.*.*",0) .eqs. ""
-$    then
-$     write sys$output "No action taken"
-$     exit
-$   endif
-$ endif
-$ show log gtm$libsrc
-$ curver = f$element(1,".",f$trnlnm("gtm$vrt"))
-$ curimg = f$extract(0,1,f$element(1,"$",f$trnlnm("gtm$exe")))
-$! "expand" gtm$src, i.e. get all directories in the search list, if
-$! it is a search list
-$ src1 = f$trnlnm("gtm$src",,0)
-$ src2 = f$trnlnm("gtm$src",,1)
-$ define gtmsrc "''src1'"
-$ if "" .nes. src2 then define/nolog gtmsrc "''src1',''src2'"
-$ define gtm$routines "[]/src=(''f$trnlnm("gtmsrc")')"
-$ version p p
-$ gtm
-o "SYS$COMMAND" u "SYS$COMMAND" d ^comall
-$ version 'curver' 'curimg'
-$ delete comall.obj.
-$ exit
diff --git a/sr_vvms/cre_comlistxp.com b/sr_vvms/cre_comlistxp.com
deleted file mode 100644
index d73ac14..0000000
--- a/sr_vvms/cre_comlistxp.com
+++ /dev/null
@@ -1,32 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! cre_comlistxp invokes commalxp to create a typ_comlist.com compile driver
-$! 	--- assumes "version" command was executed before coming in here
-$!
-$ set def gtm$ver
-$ curver = f$element(1,".",f$trnlnm("gtm$vrt"))
-$ curimg = f$extract(0,1,f$element(1,"$",f$trnlnm("gtm$exe")))
-$ define gtm$libsrc axp_gtm$gtmdev:[library.'curver'.src]
-$ show log gtm$libsrc
-$! "expand" gtm$src, i.e. get all directories in the search list, if
-$! it is a search list
-$ src1 = f$trnlnm("gtm$src",,0)
-$ src2 = f$trnlnm("gtm$src",,1)
-$ define gtmsrc "''src1'"
-$ if "" .nes. src2 then define/nolog gtmsrc "''src1',''src2'"
-$ define gtm$routines "[]/src=(''f$trnlnm("gtmsrc")')"
-$ version p p
-$ gtm
-o "SYS$COMMAND" u "SYS$COMMAND" d noprompt^comall
-$ version 'curver' 'curimg'
-$ delete comall.obj.
-$ exit
diff --git a/sr_vvms/crit_wake.c b/sr_vvms/crit_wake.c
deleted file mode 100644
index f6813c9..0000000
--- a/sr_vvms/crit_wake.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <prvdef.h>
-
-
-int	crit_wake(uint4 *pid)
-{
-	uint4	status, prvprv[2],
-			prvadr[2] = { PRV$M_WORLD, 0 };
-
-
-	if ((status = sys$setprv(TRUE, prvadr, FALSE, prvprv)) == SS$_NORMAL)
-	{
-		status = sys$wake(pid, NULL);
-
-		if ((prvprv[0] & PRV$M_WORLD) == 0)
-			(void)sys$setprv(FALSE, prvadr, FALSE, NULL);
-	}
-
-	return (int)status;
-}
diff --git a/sr_vvms/ctrap_set.c b/sr_vvms/ctrap_set.c
deleted file mode 100644
index c97650a..0000000
--- a/sr_vvms/ctrap_set.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "efn.h"
-#include <ssdef.h>
-#include "xfer_enum.h"
-#include "outofband.h"
-
-/* ------------------------------------------------------------------
- * Set flags and transfer table for synchronous handling of  ctrap.
- * Should be called only from set_xfer_handlers.
- * ------------------------------------------------------------------
- */
-
-GBLREF volatile int4 	ctrap_action_is;
-GBLREF int 		(* volatile xfer_table[])();
-GBLREF volatile int4 	outofband;
-
-void ctrap_set(int4 ob_char)
-{
-	int4	status;
-	void	op_fetchintrrpt(), op_startintrrpt(), op_forintrrpt();
-
-	if (!outofband)
-	{
-		status = sys$setef(efn_outofband);
-		assert(SS$_WASCLR == status);
-		if (status != SS$_WASCLR && status != SS$_WASSET)
-			GTMASSERT;
-		outofband = ctrap;
-		ctrap_action_is = ob_char;
-		xfer_table[xf_linefetch] = op_fetchintrrpt;
-		xfer_table[xf_linestart] = op_startintrrpt;
-		xfer_table[xf_zbfetch] = op_fetchintrrpt;
-		xfer_table[xf_zbstart] = op_startintrrpt;
-		xfer_table[xf_forchk1] = op_startintrrpt;
-		xfer_table[xf_forloop] = op_forintrrpt;
-		sys$wake(0,0);
-	}
-}
diff --git a/sr_vvms/ctrlc_set.c b/sr_vvms/ctrlc_set.c
deleted file mode 100644
index cfe0822..0000000
--- a/sr_vvms/ctrlc_set.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "efn.h"
-#include <ssdef.h>
-
-#include "gtm_string.h"
-#include "xfer_enum.h"
-#include "outofband.h"
-#include "msg.h"
-#include "op.h"
-#include "gtmimagename.h"
-
-/* ------------------------------------------------------------------
- * Set flags and transfer table for synchronous handling of cntl-C.
- * Should be called only from set_xfer_handlers.
- *
- * Note: dummy parameter is for calling compatibility.
- * ------------------------------------------------------------------
- */
-
-GBLREF int 				(* volatile xfer_table[])();
-GBLREF volatile boolean_t		ctrlc_on;
-GBLREF volatile char 			source_file_name[];
-GBLREF volatile int4			ctrap_action_is, outofband;
-
-error_def(ERR_LASTFILCMPLD);
-
-ctrlc_set(int4 dummy_param)
-{
-	int4		status;
-	msgtype		message;
-
-	if (!IS_MCODE_RUNNING)
-	{
-		message.arg_cnt = 4;
-		message.def_opts = message.new_opts = 0;
-		message.msg_number = ERR_LASTFILCMPLD;
-		message.fp_cnt = 2;
-		message.fp[0].n = strlen(source_file_name);
-		message.fp[1].cp = source_file_name;
-		sys$putmsg(&message, 0, 0, 0);
-	} else if (!outofband)
-	{
-		if (ctrlc_on)
-		{
-			status = sys$setef(efn_outofband);
-			assert(SS$_WASCLR == status);
-			assertpro((SS$_WASCLR == status) || (SS$_WASSET == status));
-			ctrap_action_is = 0;
-			outofband = ctrlc;
-			xfer_table[xf_linefetch] = op_fetchintrrpt;
-			xfer_table[xf_linestart] = op_startintrrpt;
-			xfer_table[xf_zbfetch] = op_fetchintrrpt;
-			xfer_table[xf_zbstart] = op_startintrrpt;
-			xfer_table[xf_forchk1] = op_startintrrpt;
-			xfer_table[xf_forloop] = op_forintrrpt;
-			sys$wake(0,0);
-		}
-	}
-}
diff --git a/sr_vvms/ctrly_set.c b/sr_vvms/ctrly_set.c
deleted file mode 100644
index b225b34..0000000
--- a/sr_vvms/ctrly_set.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "efn.h"
-#include <ssdef.h>
-#include "xfer_enum.h"
-#include "outofband.h"
-#include "op.h"
-#include "deferred_events.h"
-#include "gtmimagename.h"
-
-/* ------------------------------------------------------------------
- * Set flags and transfer table for synchronous handling of cntl-Y.
- * Should be called only from set_xfer_handlers.
- *
- * Note: dummy parameter is for calling compatibility.
- * ------------------------------------------------------------------
- */
-
-GBLREF int			(* volatile xfer_table[])();
-GBLREF volatile int4		outofband, ctrap_action_is;
-
-void ctrly_set(int4 dummy_param)
-{
-	int4 status;
-
-	if (!IS_MCODE_RUNNING)
-	{
-		outofband = ctrly;
-		outofband_clear();
-	} else
-	{
-		status = sys$setef(efn_outofband);
-		assert(SS$_WASCLR == status);
-		if (status != SS$_WASCLR && status != SS$_WASSET)
-			GTMASSERT;
-		ctrap_action_is = 0;
-		outofband = ctrly;
-		xfer_table[xf_linefetch] = op_fetchintrrpt;
-		xfer_table[xf_linestart] = op_startintrrpt;
-		xfer_table[xf_zbfetch] = op_fetchintrrpt;
-		xfer_table[xf_zbstart] = op_startintrrpt;
-		xfer_table[xf_forchk1] = op_startintrrpt;
-		xfer_table[xf_forloop] = op_forintrrpt;
-		sys$wake(0,0);
-	}
-}
diff --git a/sr_vvms/curr_dev_outbndset.c b/sr_vvms/curr_dev_outbndset.c
deleted file mode 100644
index 25cdf98..0000000
--- a/sr_vvms/curr_dev_outbndset.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "outofband.h"
-#include "curr_dev_outbndset.h"
-#include "deferred_events.h"
-
-GBLREF bool	std_dev_outbnd;
-
-void curr_dev_outbndset(int4 ob_char)
-{
-
-	if (ob_char > MAXOUTOFBAND)
-	{
-		GTMASSERT;
-	}
-	else
-	{	std_dev_outbnd = FALSE;
-		ctrap_set(ob_char);
-	}
-}
diff --git a/sr_vvms/curr_dev_outbndset.h b/sr_vvms/curr_dev_outbndset.h
deleted file mode 100644
index 160fac3..0000000
--- a/sr_vvms/curr_dev_outbndset.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef CURR_DEV_OUTBNDSET_INCLUDED
-#define CURR_DEV_OUTBNDSET_INCLUDED
-
-void curr_dev_outbndset(int4 ob_char);
-
-#endif /* CURR_DEV_OUTBNDSET_INCLUDED */
diff --git a/sr_vvms/cvtprot.c b/sr_vvms/cvtprot.c
deleted file mode 100644
index b4cad85..0000000
--- a/sr_vvms/cvtprot.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <xab.h>
-#include "cvtprot.h"
-
-int cvtprot(char *cp, short cnt)
-{
-	int	mask;
-
-	/* a protection mask consists of 4 bits, R(ead), W(rite), E(xecute), and D(elete).
-	   to deny access, the bit is one; to grant access, the
-	   bit is set to zero.
-	*/
-	mask = 0;
-	for (;cnt > 0 ; cnt--, cp++)
-	{
-		switch (*cp)
-		{
-			case 'R':
-			case 'r':
-				mask |= XAB$M_NOREAD;
-				break;
-			case 'W':
-			case 'w':
-				mask |= XAB$M_NOWRITE;
-				break;
-			case 'E':
-			case 'e':
-				mask |= XAB$M_NOEXE;
-				break;
-			case 'D':
-			case 'd':
-				mask |= XAB$M_NODEL;
-				break;
-			default:
-				return -1;
-		}
-	}
-	return mask;
-}
-
diff --git a/sr_vvms/cvttime.c b/sr_vvms/cvttime.c
deleted file mode 100644
index 978a7be..0000000
--- a/sr_vvms/cvttime.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include "cvttime.h"
-
-
-int4 cvttime(mval *src, int4 tim[2])
-{
-	$DESCRIPTOR	(dsrc,src->str.addr) ;
-	int4            cnx= 0, fl= 127;
-	int4		status;
-
-	dsrc.dsc$w_length= src->str.len ;
-	status= lib$convert_date_string(&dsrc,tim,&cnx,&fl,0,0) ;
-	return status;
-}
-
diff --git a/sr_vvms/dbcertify_cmd.cld b/sr_vvms/dbcertify_cmd.cld
deleted file mode 100644
index 375d59d..0000000
--- a/sr_vvms/dbcertify_cmd.cld
+++ /dev/null
@@ -1,20 +0,0 @@
-MODULE DBCERTIFY_CMD
-
-DEFINE VERB SCAN
-	PARAMETER P1, LABEL=REGION, PROMPT="Region", VALUE(REQUIRED)
-	ROUTINE	  dbcertify_scan_phase
-	QUALIFIER BSU_KEYS		NEGATABLE
-	QUALIFIER DEBUG			NEGATABLE
-	QUALIFIER DETAIL		NEGATABLE
-	QUALIFIER KEEP_TEMPS		NEGATABLE
-	QUALIFIER OUTFILE		NONNEGATABLE	VALUE(TYPE = $FILE, REQUIRED)
-	QUALIFIER REPORT_ONLY		NEGATABLE
-	QUALIFIER TEMPFILE_DIR		NONNEGATABLE	VALUE(TYPE = $FILE, REQUIRED)
-
-DEFINE VERB CERTIFY
-	PARAMETER P1, LABEL=P1OUTFILE, PROMPT="DBCERTIFY SCAN output filename", VALUE(TYPE = $FILE, REQUIRED)
-	ROUTINE	  dbcertify_certify_phase
-	QUALIFIER BLOCKS		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER DEBUG			NEGATABLE
-	QUALIFIER KEEP_TEMPS		NEGATABLE
-	QUALIFIER TEMPFILE_DIR		NONNEGATABLE	VALUE(TYPE = $FILE, REQUIRED)
diff --git a/sr_vvms/dbcertify_dbfilop.c b/sr_vvms/dbcertify_dbfilop.c
deleted file mode 100644
index a65e228..0000000
--- a/sr_vvms/dbcertify_dbfilop.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005, 2009 Fidelity Information Services, LLC.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <descrip.h>
-#include <iodef.h>
-#include <psldef.h>
-#include <rms.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "v15_gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "v15_gdsbt.h"
-#include "gdsfhead.h"
-#include "v15_gdsfhead.h"
-#include "gdsblk.h"
-#include "gdsblkops.h"
-#include "filestruct.h"
-#include "efn.h"
-#include "vmsdtype.h"
-#include "sleep_cnt.h"
-#include "error.h"
-#include "wcs_sleep.h"
-#include "gtm_file_stat.h"
-#include "iosb_disk.h"
-#include "iosp.h"
-#include "is_file_identical.h"
-#include "dbcertify.h"
-
-#define DEFDBEXT		".dat"
-#define MAX_NODE_NAME_LEN	16
-
-static	int msgcodes[2] = {1 , 0};			/* allows for 1 parm for sys$putmsg() */
-
-void dbcertify_dbfilop(phase_static_area *psa)
-{
-	uint4		addrs[2], lcnt, node_area, node_number, status, hold_esa;
-	unsigned short	retlen[4];
-	io_status_block_disk	iosb;
-	char		node_name[MAX_NODE_NAME_LEN], dnetid[MAX_NODE_NAME_LEN];
-	struct
-	{
-		item_list_3	ilist[3];
-		int4		terminator;
-	} syi_list;
-	vms_gds_info	*gds_info;
-	$DESCRIPTOR	(faodsc, dnetid);
-	static readonly $DESCRIPTOR	(ctrstr, "!UL.!UL");
-
-	error_def(ERR_DBFILOPERR);
-	error_def(ERR_MUSTANDALONE);
-	error_def(ERR_NETDBOPNERR);
-	error_def(ERR_DBOPNERR);
-	error_def(ERR_SYSCALL);
-
-	gds_info = psa->fc->file_info;
-	switch(psa->fc->op)
-	{
-		case	FC_READ:
-			assert(psa->fc->op_pos > 0);		/* gt.m uses the vms convention of numbering the blocks from 1 */
-			status = sys$qiow(EFN$C_ENF, gds_info->fab->fab$l_stv, IO$_READVBLK, &iosb, NULL, 0,
-					  psa->fc->op_buff, psa->fc->op_len, psa->fc->op_pos, 0, 0, 0);
-			if (SYSCALL_SUCCESS(status))
-				status = iosb.cond;
-			if (SYSCALL_ERROR(status))
-				rts_error(VARLSTCNT(5) ERR_DBFILOPERR, 2, gds_info->fab->fab$b_fns, gds_info->fab->fab$l_fna,
-					status);
-			break;
-		case	FC_WRITE:
-			status = sys$qiow(EFN$C_ENF, gds_info->fab->fab$l_stv, IO$_WRITEVBLK,
-					  &iosb, NULL, 0, psa->fc->op_buff, psa->fc->op_len, psa->fc->op_pos, 0, 0, 0);
-			if (SYSCALL_SUCCESS(status))
-				status = iosb.cond;
-			if (SYSCALL_ERROR(status))
-				rts_error(VARLSTCNT(5) ERR_DBFILOPERR, 2, gds_info->fab->fab$b_fns,
-					gds_info->fab->fab$l_fna, status);
-			break;
-		case	FC_OPEN:
-			if (NULL == gds_info->fab)
-				gds_info->fab = malloc(SIZEOF(*gds_info->fab));
-
-			*gds_info->fab = cc$rms_fab;
-			gds_info->fab->fab$l_fna = psa->dbc_gv_cur_region->dyn.addr->fname;
-			gds_info->fab->fab$b_fns = psa->dbc_gv_cur_region->dyn.addr->fname_len;
-			gds_info->fab->fab$b_fac = FAB$M_BIO | FAB$M_GET | FAB$M_PUT;
-			gds_info->fab->fab$l_fop = FAB$M_UFO;
-			if (psa->phase_one)
-			{	/* We need shared access for phase-1 but not phase-2 which must run standalone */
-				gds_info->fab->fab$b_rtv = WINDOW_ALL;
-				gds_info->fab->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-			} else
-				gds_info->fab->fab$b_shr = FAB$M_NIL;
-			gds_info->fab->fab$l_dna = DEFDBEXT;
-			gds_info->fab->fab$b_dns = SIZEOF(DEFDBEXT) - 1;
-			if (NULL == gds_info->nam)
-			{
-				gds_info->nam = malloc(SIZEOF(*gds_info->nam));
-				*gds_info->nam = cc$rms_nam;
-				gds_info->nam->nam$l_esa = malloc(MAX_FN_LEN + 1);
-			}
-			gds_info->nam->nam$b_ess = MAX_FN_LEN;
-			gds_info->fab->fab$l_nam = gds_info->nam;
-			if (NULL == gds_info->xabfhc)
-				gds_info->xabfhc = malloc(SIZEOF(*gds_info->xabfhc));
-			*gds_info->xabfhc = cc$rms_xabfhc;
-			gds_info->fab->fab$l_xab = gds_info->xabfhc;
-			if (NULL == gds_info->xabpro)
-				gds_info->xabpro = malloc(SIZEOF(*gds_info->xabpro));
-			*gds_info->xabpro = cc$rms_xabpro;
-			gds_info->xabfhc->xab$l_nxt = gds_info->xabpro;
-
-			psa->dbc_gv_cur_region->read_only = FALSE;	/* maintain csa->read_write simultaneously */
-			gds_info->s_addrs.read_write = TRUE;		/* maintain reg->read_only simultaneously */
-			if (0 == gds_info->fab->fab$b_fns)
-			{
-				memcpy(gds_info->nam->nam$t_dvi, gds_info->file_id.dvi, SIZEOF(gds_info->nam->nam$t_dvi));
-				memcpy(gds_info->nam->nam$w_did, gds_info->file_id.did, SIZEOF(gds_info->nam->nam$w_did));
-				memcpy(gds_info->nam->nam$w_fid, gds_info->file_id.fid, SIZEOF(gds_info->nam->nam$w_fid));
-				gds_info->fab->fab$l_fop |= FAB$M_NAM;
-			} else
-			{
-				gds_info->nam->nam$b_nop = NAM$M_NOCONCEAL;
-				if (0 == (1 & (status = sys$parse(gds_info->fab, NULL, NULL))))
-					rts_error(VARLSTCNT(9) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("sys$parse"),
-						  CALLFROM, status, gds_info->fab->fab$l_stv);
-				if (gds_info->nam->nam$b_node)
-				{
-					syi_list.ilist[0].item_code = SYI$_NODENAME;
-					syi_list.ilist[0].buffer_address = &node_name;
-					syi_list.ilist[0].buffer_length = SIZEOF(node_name);
-					syi_list.ilist[0].return_length_address = &retlen[0];
-					syi_list.ilist[1].item_code = SYI$_NODE_AREA;
-					syi_list.ilist[1].buffer_address = &node_area;
-					syi_list.ilist[1].buffer_length = SIZEOF(node_area);
-					syi_list.ilist[1].return_length_address = &retlen[1];
-					syi_list.ilist[2].item_code = SYI$_NODE_NUMBER;
-					syi_list.ilist[2].buffer_address = &node_number;
-					syi_list.ilist[2].buffer_length = SIZEOF(node_number);
-					syi_list.ilist[2].return_length_address = &retlen[2];
-					syi_list.terminator = 0;
-					status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list, &iosb, NULL, 0);
-					if (SYSCALL_SUCCESS(status))
-						status = sys$fao(&ctrstr, &retlen[3], &faodsc, node_area, node_number);
-					if (SYSCALL_ERROR(status))
-						rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("sys$getsyiw()"),
-							  CALLFROM, status);
-					if (((gds_info->nam->nam$b_node - 2 != retlen[0])
-					     || (0 != memcmp(gds_info->nam->nam$l_esa, node_name, retlen[0])))
-					    && ((gds_info->nam->nam$b_node - 2 != retlen[3])
-						|| (0 != memcmp(gds_info->nam->nam$l_esa, dnetid, retlen[3]))))
-					{
-						rts_error(VARLSTCNT(1) ERR_NETDBOPNERR);
-					}
-					gds_info->fab->fab$l_fna = gds_info->nam->nam$l_esa + gds_info->nam->nam$b_node;
-					gds_info->fab->fab$b_fns = gds_info->nam->nam$b_esl - gds_info->nam->nam$b_node;
-				}
-			}
-			for (lcnt = 1;  15 >= lcnt;  lcnt++)
-			{	/* Try for 15 seconds */
-				if (RMS$_FLK != (status = sys$open(gds_info->fab, NULL, NULL)))
-					break;
-				sleep(1);
-			}
-			if (SYSCALL_ERROR(status))
-			{
-				if (RMS$_PRV == status)
-				{
-					gds_info->fab->fab$b_fac = FAB$M_BIO | FAB$M_GET;
-					psa->dbc_gv_cur_region->read_only = TRUE; /* maintain csa->read_write simultaneously */
-					gds_info->s_addrs.read_write = FALSE;	  /* maintain reg->read_only simultaneously */
-					gds_info->fab->fab$l_fna = gds_info->nam->nam$l_esa;
-					gds_info->fab->fab$b_fns = gds_info->nam->nam$b_esl;
-					status = sys$open(gds_info->fab);
-				}
-				if (RMS$_NORMAL != status)
-				{
-					if (RMS$_FLK == status)
-						rts_error(VARLSTCNT(4) MAKE_MSG_TYPE(ERR_MUSTANDALONE, ERROR),
-							  2, gds_info->fab->fab$b_fns, gds_info->fab->fab$l_fna);
-					else
-						rts_error(VARLSTCNT(6) ERR_DBOPNERR, 2, gds_info->fab->fab$b_fns,
-							  gds_info->fab->fab$l_fna, status, gds_info->fab->fab$l_stv);
-				}
-			}
-			memcpy(gds_info->file_id.dvi, gds_info->nam->nam$t_dvi, SIZEOF(gds_info->nam->nam$t_dvi));
-			memcpy(gds_info->file_id.did, gds_info->nam->nam$w_did, SIZEOF(gds_info->nam->nam$w_did));
-			memcpy(gds_info->file_id.fid, gds_info->nam->nam$w_fid, SIZEOF(gds_info->nam->nam$w_fid));
-			/* Copy after removing the version number from file name */
-			fncpy_nover(gds_info->nam->nam$l_esa, gds_info->nam->nam$b_esl,
-				    psa->dbc_gv_cur_region->dyn.addr->fname, psa->dbc_gv_cur_region->dyn.addr->fname_len);
-			gds_info->nam->nam$b_esl = gds_info->fab->fab$b_fns = psa->dbc_gv_cur_region->dyn.addr->fname_len;
-			strcpy(gds_info->fab->fab$l_fna, psa->dbc_gv_cur_region->dyn.addr->fname);
-			gds_info->fab->fab$l_xab = NULL;
-			gds_info->fab->fab$l_nam = NULL;
-			gds_info->xabfhc->xab$l_nxt = NULL;
-			break;
-		case	FC_CLOSE:
-			status = sys$dassgn(gds_info->fab->fab$l_stv);
-			if (!(status & 1))
-				gtm_putmsg(VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("sys$dassgn"), CALLFROM, status);
-			break;
-		default:
-			GTMASSERT;
-	}
-}
diff --git a/sr_vvms/dbcertify_exit_handler.c b/sr_vvms/dbcertify_exit_handler.c
deleted file mode 100644
index 92bf3bf..0000000
--- a/sr_vvms/dbcertify_exit_handler.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gtm_inet.h"
-#include "gtm_stdio.h"	/* for FILE structure etc. */
-#include "gtm_time.h"
-
-#include "ast.h"
-#include "gdsroot.h"
-#include "v15_gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "v15_gdsbt.h"
-#include "gdsfhead.h"
-#include "v15_gdsfhead.h"
-#include "filestruct.h"
-#include "v15_filestruct.h"
-#include "error.h"
-#include "iotimer.h"
-#include "jnl.h"
-#include "locklits.h"
-#include "gtmrecv.h"	/* for recvpool etc. */
-#include "io.h"
-#include "iosp.h"
-#include "sleep_cnt.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_sem.h"
-#include "repl_shm.h"
-#include "desblk.h"
-#include "gtmimagename.h"
-#include "util.h"
-#include "op.h"
-#include "repl_log.h"
-#include "generic_exit_handler.h"
-#include "gv_rundown.h"
-#include "have_crit.h"
-#include "print_exit_stats.h"
-#include "setzdir.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "gtmmsg.h"
-#include "secshr_db_clnup.h"
-#include "gdsblk.h"
-#include "gdsblkops.h"
-#include "dbcertify.h"
-
-GBLREF	int4			exi_condition;
-GBLREF	desblk			exi_blk;
-GBLREF	enum gtmImageTypes	image_type;
-GBLREF	uint4			process_id;
-GBLREF	phase_static_area	*psa_gbl;
-
-error_def(ERR_ACK);
-error_def(ERR_FORCEDHALT);
-error_def(ERR_UNKNOWNFOREX);
-
-void dbcertify_exit_handler(void)
-{
-	void		(*signal_routine)();
-	int4		lcnt;
-
-	sys$setast(ENABLE);	/* safer and doesn't hurt much */
-	sys$cantim(0,0);	/* cancel all outstanding timers.  prevents unwelcome surprises */
-
-	/* We can defer exit-handling if it was a forced-halt and we are in an AST or have crit in any region.
-	 * If we are in an AST when a fatal exception occurs we can neither defer exiting nor do normal exit-handling,
-	 * 	so we return immediately with the hope that the privileged exit-handler in GTMSECSHR,
-	 *	secshr_db_clnup(ABNORMAL_TERMINATION) will do the necessary cleanup.
-	 * Note that even if we hold crit in any region when a non-deferrable exception occurs, we can still go ahead with
-	 *	normal exit-handling chores. secshr_db_clnup(NORMAL_TERMINATION) (invoked below) will cleanup the crits for us.
-	 */
-	if (ERR_FORCEDHALT == exi_condition || 0 == exi_condition)
-	{
-		if (lib$ast_in_prog())	/* The rest of this assumes that it may use AST's */
-		{
-			EXIT_HANDLER(&exi_blk);				/* reestablish the exit handler */
-			sys$forcex(&process_id);			/* make the forcex come back as an AST */
-			ESTABLISH(exi_ch);				/* set a condition handler to unwind exit handler levels */
-			rts_error_csa(CSA_ARG(NULL) ERR_ACK);		/* and signal success */
-		}
-		assert(!lib$ast_in_prog());
-		/* We defer exiting only if we are in commit phase in any region as opposed to holding crit in that region.
-		 * The danger of deferring if we are holding crit in a region is that we may do infinite defers in processes
-		 *	that have no intention of releasing crit.
-		 * But the commit phase (beginning from when early_tn is curr_tn + 1 to when they become equal) is a relatively
-		 * 	finite window wherefrom we are guaranteed to return.
-		 */
-		if ((NULL != psa_gbl) && psa_gbl->dbc_critical)
-		{
-			EXIT_HANDLER(&exi_blk);
-			ESTABLISH(exi_ch);
-			rts_error_csa(CSA_ARG(NULL) exi_condition ? exi_condition : ERR_FORCEDHALT);
-		}
-	} else if (lib$ast_in_prog())
-		rts_error_csa(CSA_ARG(NULL) exi_condition);	/* this shouldn't return */
-	SET_FORCED_EXIT_STATE_ALREADY_EXITING;
-	print_exit_stats();
-	if (0 == exi_condition)
-		exi_condition = ERR_UNKNOWNFOREX;
-	if (NULL != psa_gbl)
-	{
-		if (psa_gbl->phase_one)
-			dbc_scan_phase_cleanup();
-		else
-			dbc_certify_phase_cleanup();
-	}
-}
diff --git a/sr_vvms/dbcertify_parse_and_dispatch.c b/sr_vvms/dbcertify_parse_and_dispatch.c
deleted file mode 100644
index b7f0687..0000000
--- a/sr_vvms/dbcertify_parse_and_dispatch.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005 Fidelity Information Services, LLC.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rmsdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include <ssdef.h>
-
-#include "cli.h"
-#include "gdsroot.h"
-#include "v15_gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "v15_gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "v15_gdsfhead.h"
-#include "gdsblkops.h"
-#include "error.h"
-#include "mupip_exit.h"	/* Wrong name but does what we want */
-#include "dbcertify.h"
-
-GBLREF	phase_static_area	*psa_gbl;
-
-extern int DBCERTIFY_CMD(), CLI$DCL_PARSE(), CLI$DISPATCH();
-
-void dbcertify_parse_and_dispatch(int argc, char **argv)
-{
-	char 		buff[512];
-	int		status;
-	unsigned short	outlen;
-	$DESCRIPTOR(command, buff);
-	error_def(ERR_CLIERR);
-
-	status = lib$get_foreign(&command, 0, &outlen, 0);
-	if (status & 1)
-	{
-		if (0 < outlen)
-		{
-			command.dsc$w_length = outlen;
-			status = CLI$DCL_PARSE(&command, &DBCERTIFY_CMD, &lib$get_input, 0, 0);
-			if (status == CLI$_NORMAL)
-			{	/* Before we dispatch the function, process one common parameter we need immediately */
-				psa_gbl->dbc_debug = (CLI_PRESENT == cli_present("DEBUG"));
-				CLI$DISPATCH();
-			}
-		} else
-			rts_error(VARLSTCNT(4) ERR_CLIERR, 2, RTS_ERROR_LITERAL("No parameters specified"));
-	}
-	mupip_exit(status);
-}
diff --git a/sr_vvms/dbcx_ref.c b/sr_vvms/dbcx_ref.c
deleted file mode 100644
index 6e7f2c9..0000000
--- a/sr_vvms/dbcx_ref.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* This routine takes a pointer to a sgmnt_data struct with space for the BTs and
-	locks attached.  The BTs and the lock space are initialized and then written
-	to disk to the file specified by channel.
-*/
-
-#include "mdef.h"
-#include <rms.h>
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include <efndef.h>
-#include "mlk_shr_init.h"
-#include "dbcx_ref.h"
-
-
-int dbcx_ref(sgmnt_data *sd, int chan)
-{
-	char		*qio_ptr, *qio_top;
-	short		iosb[4];
-	int		block, status;
-	sgmnt_addrs	sa;
-
-
-	sa.hdr = sd;
-	bt_malloc(&sa);
-	mlk_shr_init((char *)sd + (LOCK_BLOCK(sd) * DISK_BLOCK_SIZE), sd->lock_space_size, &sa, TRUE);
-	qio_ptr = (char *)sd;
-	qio_top = qio_ptr + (LOCK_BLOCK(sd) * DISK_BLOCK_SIZE) + LOCK_SPACE_SIZE(sd);
-	for ( block = 1; qio_ptr < qio_top; block++, qio_ptr += DISK_BLOCK_SIZE)
-	{
-		if (SS$_NORMAL != (status = sys$qiow(EFN$C_ENF, chan, IO$_WRITEVBLK, iosb,
-							0, 0, qio_ptr, DISK_BLOCK_SIZE, block, 0, 0, 0)))
-			return status;
-		if (!(iosb[0] & 1))
-			return iosb[0];
-	}
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/dbcx_ref.h b/sr_vvms/dbcx_ref.h
deleted file mode 100644
index 470c4be..0000000
--- a/sr_vvms/dbcx_ref.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DBCX_REF_INCLUDED
-#define DBCX_REF_INCLUDED
-
-int dbcx_ref(sgmnt_data *sd, int chan);
-
-#endif /* DBCX_REF_INCLUDED */
diff --git a/sr_vvms/dbfilop.c b/sr_vvms/dbfilop.c
deleted file mode 100644
index f01a30e..0000000
--- a/sr_vvms/dbfilop.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <descrip.h>
-#include <iodef.h>
-#include <psldef.h>
-#include <rms.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "efn.h"
-#include "vmsdtype.h"
-#include "sleep_cnt.h"
-#include "dbfilop.h"
-#include "wcs_sleep.h"
-#include "gtm_file_stat.h"
-#include "gtm_malloc.h"		/* for CHECK_CHANNEL_STATUS macro */
-#include "iosb_disk.h"
-#include "iosp.h"
-
-#define DEFDBEXT		".dat"
-#define MAX_NODE_NAME_LEN	16
-
-GBLREF	gd_region	*gv_cur_region;
-
-uint4 dbfilop(file_control *fc)
-{
-	uint4			addrs[2], lcnt, node_area, node_number, status;
-	unsigned short		retlen[4];
-	io_status_block_disk	iosb;
-	char			node_name[MAX_NODE_NAME_LEN], dnetid[MAX_NODE_NAME_LEN];
-	struct {
-		item_list_3 ilist[3];
-		int4 terminator;
-	}			syi_list;
-	vms_gds_info		*gds_info;
-	uint4			channel_id;
-
-	$DESCRIPTOR	(faodsc, dnetid);
-	static readonly $DESCRIPTOR	(ctrstr, "!UL.!UL");
-
-	error_def(ERR_DBFILOPERR);
-	error_def(ERR_DBNOTGDS);
-	error_def(ERR_NETDBOPNERR);
-	error_def(ERR_SYSCALL);
-
-	assert((dba_mm == fc->file_type) || (dba_bg == fc->file_type));
-	gds_info = fc->file_info;
-	switch(fc->op)
-	{
-		case	FC_READ:
-			assert(fc->op_pos > 0);		/* gt.m uses the vms convention of numbering the blocks from 1 */
-			channel_id = gds_info->fab->fab$l_stv;
-			status = sys$qiow(EFN$C_ENF, channel_id, IO$_READVBLK, &iosb, NULL, 0,
-						fc->op_buff, fc->op_len, fc->op_pos, 0, 0, 0);
-			if (SYSCALL_SUCCESS(status))
-				status = iosb.cond;
-			if (SYSCALL_ERROR(status))
-			{
-				CHECK_CHANNEL_STATUS(status, channel_id);
-				rts_error(VARLSTCNT(5) ERR_DBFILOPERR, 2, gds_info->fab->fab$b_fns, gds_info->fab->fab$l_fna,
-					status);
-			}
-			if ((1 == fc->op_pos) && (0 != memcmp(fc->op_buff, GDS_LABEL, GDS_LABEL_SZ - 3)))
-				rts_error(VARLSTCNT(4) ERR_DBNOTGDS, 2, gds_info->fab->fab$b_fns, gds_info->fab->fab$l_fna);
-			break;
-		case	FC_WRITE:
-			if ((1 == fc->op_pos) && (0 != memcmp(fc->op_buff, GDS_LABEL, GDS_LABEL_SZ - 1)
-					|| (0 == ((sgmnt_data_ptr_t)fc->op_buff)->acc_meth)))
-				GTMASSERT;
-			assert((1 != fc->op_pos) || fc->op_len <= SIZEOF_FILE_HDR(fc->op_buff));
-			switch(fc->file_type)
-			{
-				case dba_bg:
-					channel_id = gds_info->fab->fab$l_stv;
-					status = sys$qiow(EFN$C_ENF, channel_id, IO$_WRITEVBLK,
-							&iosb, NULL, 0, fc->op_buff, fc->op_len, fc->op_pos, 0, 0, 0);
-					if (SYSCALL_SUCCESS(status))
-						status = iosb.cond;
-					else
-						CHECK_CHANNEL_STATUS(status, channel_id);
-					break;
-				case dba_mm:
-					addrs[0] = fc->op_buff;
-					addrs[1] = addrs[0] + fc->op_len - 1;
-					status = sys$updsec(addrs, NULL, PSL$C_USER, 0, efn_immed_wait, &iosb, NULL, 0);
-					if (SYSCALL_SUCCESS(status))
-					{
-						status = sys$synch(efn_immed_wait, &iosb);
-						if (SS$_NORMAL == status)
-							status = iosb.cond;
-					} else  if (SS$_NOTMODIFIED == status)
-						status = SS$_NORMAL;
-					break;
-				default:
-					GTMASSERT;
-			}
-			if (SYSCALL_ERROR(status))
-				rts_error(VARLSTCNT(5) ERR_DBFILOPERR, 2, gds_info->fab->fab$b_fns,
-					gds_info->fab->fab$l_fna, status);
-			break;
-		case	FC_OPEN:
-			if (NULL == gds_info->fab)
-				gds_info->fab = malloc(SIZEOF(*gds_info->fab));
-
-			*gds_info->fab = cc$rms_fab;
-			gds_info->fab->fab$l_fna = gv_cur_region->dyn.addr->fname;
-			gds_info->fab->fab$b_fns = gv_cur_region->dyn.addr->fname_len;
-			gds_info->fab->fab$b_rtv = WINDOW_ALL;
-			gds_info->fab->fab$b_fac = FAB$M_BIO | FAB$M_GET | FAB$M_PUT;
-			gds_info->fab->fab$l_fop = FAB$M_UFO;
-			gds_info->fab->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-			gds_info->fab->fab$l_dna = DEFDBEXT;
-			gds_info->fab->fab$b_dns = SIZEOF(DEFDBEXT) - 1;
-			if (NULL == gds_info->nam)
-			{
-				gds_info->nam = malloc(SIZEOF(*gds_info->nam));
-				*gds_info->nam = cc$rms_nam;
-				gds_info->nam->nam$l_esa = malloc(MAX_FN_LEN);
-			}
-			gds_info->nam->nam$b_ess = MAX_FN_LEN;
-			gds_info->fab->fab$l_nam = gds_info->nam;
-			if (NULL == gds_info->xabfhc)
-				gds_info->xabfhc = malloc(SIZEOF(*gds_info->xabfhc));
-			*gds_info->xabfhc = cc$rms_xabfhc;
-			gds_info->fab->fab$l_xab = gds_info->xabfhc;
-			if (NULL == gds_info->xabpro)
-				gds_info->xabpro = malloc(SIZEOF(*gds_info->xabpro));
-			*gds_info->xabpro = cc$rms_xabpro;
-			gds_info->xabfhc->xab$l_nxt = gds_info->xabpro;
-
-			gv_cur_region->read_only = FALSE;	/* maintain csa->read_write simultaneously */
-			gds_info->s_addrs.read_write = TRUE;	/* maintain reg->read_only simultaneously */
-			if (0 == gds_info->fab->fab$b_fns)
-			{
-				memcpy(gds_info->nam->nam$t_dvi, gds_info->file_id.dvi, SIZEOF(gds_info->nam->nam$t_dvi));
-				memcpy(gds_info->nam->nam$w_did, gds_info->file_id.did, SIZEOF(gds_info->nam->nam$w_did));
-				memcpy(gds_info->nam->nam$w_fid, gds_info->file_id.fid, SIZEOF(gds_info->nam->nam$w_fid));
-				gds_info->fab->fab$l_fop |= FAB$M_NAM;
-			} else
-			{
-				gds_info->nam->nam$b_nop = NAM$M_NOCONCEAL;
-				if (0 == (1 & (status = sys$parse(gds_info->fab, NULL, NULL))))
-					return status;
-				if (gds_info->nam->nam$b_node)
-				{
-					syi_list.ilist[0].item_code = SYI$_NODENAME;
-					syi_list.ilist[0].buffer_address = &node_name;
-					syi_list.ilist[0].buffer_length = SIZEOF(node_name);
-					syi_list.ilist[0].return_length_address = &retlen[0];
-					syi_list.ilist[1].item_code = SYI$_NODE_AREA;
-					syi_list.ilist[1].buffer_address = &node_area;
-					syi_list.ilist[1].buffer_length = SIZEOF(node_area);
-					syi_list.ilist[1].return_length_address = &retlen[1];
-					syi_list.ilist[2].item_code = SYI$_NODE_NUMBER;
-					syi_list.ilist[2].buffer_address = &node_number;
-					syi_list.ilist[2].buffer_length = SIZEOF(node_number);
-					syi_list.ilist[2].return_length_address = &retlen[2];
-					syi_list.terminator = 0;
-					status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list, &iosb, NULL, 0);
-					if (SYSCALL_SUCCESS(status))
-						status = sys$fao(&ctrstr, &retlen[3], &faodsc, node_area, node_number);
-					if (SYSCALL_ERROR(status))
-						return status;
-					if (((gds_info->nam->nam$b_node - 2 != retlen[0])
-							|| (0 != memcmp(gds_info->nam->nam$l_esa, node_name, retlen[0])))
-						&& ((gds_info->nam->nam$b_node - 2 != retlen[3])
-							|| (0 != memcmp(gds_info->nam->nam$l_esa, dnetid, retlen[3]))))
-						return ERR_NETDBOPNERR;
-
-					gds_info->fab->fab$l_fna = gds_info->nam->nam$l_esa + gds_info->nam->nam$b_node;
-					gds_info->fab->fab$b_fns = gds_info->nam->nam$b_esl - gds_info->nam->nam$b_node;
-				}
-			}
-			for (lcnt = 1;  MAX_OPEN_RETRY >= lcnt;  lcnt++)
-			{
-				if (RMS$_FLK != (status = sys$open(gds_info->fab, NULL, NULL)))
-					break;
-				wcs_sleep(lcnt);
-			}
-			if (SYSCALL_ERROR(status))
-			{
-				if (RMS$_PRV == status)
-				{
-					gds_info->fab->fab$b_fac = FAB$M_BIO | FAB$M_GET;
-					gv_cur_region->read_only = TRUE;	/* maintain csa->read_write simultaneously */
-					gds_info->s_addrs.read_write = FALSE;	/* maintain reg->read_only simultaneously */
-					gds_info->fab->fab$l_fna = gds_info->nam->nam$l_esa;
-					gds_info->fab->fab$b_fns = gds_info->nam->nam$b_esl;
-					status = sys$open(gds_info->fab);
-				}
-				if (RMS$_NORMAL != status)
-				{
-					if (RMS$_ACC == status)
-						status = gds_info->fab->fab$l_stv;
-					return status;
-				}
-			}
-			memcpy(gds_info->file_id.dvi, gds_info->nam->nam$t_dvi, SIZEOF(gds_info->nam->nam$t_dvi));
-			memcpy(gds_info->file_id.did, gds_info->nam->nam$w_did, SIZEOF(gds_info->nam->nam$w_did));
-			memcpy(gds_info->file_id.fid, gds_info->nam->nam$w_fid, SIZEOF(gds_info->nam->nam$w_fid));
-			/* Copy after removing the version number from file name */
-			fncpy_nover(gds_info->nam->nam$l_esa, gds_info->nam->nam$b_esl,
-				gv_cur_region->dyn.addr->fname, gv_cur_region->dyn.addr->fname_len);
-			gds_info->nam->nam$b_esl = gds_info->fab->fab$b_fns = gv_cur_region->dyn.addr->fname_len;
-			memcpy(gds_info->fab->fab$l_fna, gv_cur_region->dyn.addr->fname, gds_info->fab->fab$b_fns);
-			gds_info->fab->fab$l_xab = NULL;
-			gds_info->fab->fab$l_nam = NULL;
-			gds_info->xabfhc->xab$l_nxt = NULL;
-			break;
-		case	FC_CLOSE:
-			status = sys$dassgn(gds_info->fab->fab$l_stv);
-			if (!(status & 1))
-				gtm_putmsg(VARLSTCNT(8) ERR_SYSCALL, 5, RTS_ERROR_LITERAL("sys$dassgn"), CALLFROM, status);
-			break;
-		default:
-			GTMASSERT;
-	}
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/dbgflip.com b/sr_vvms/dbgflip.com
deleted file mode 100644
index 343c696..0000000
--- a/sr_vvms/dbgflip.com
+++ /dev/null
@@ -1,38 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2003, 2008 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! dbgflip.com - turn "off" or "on" debug bit in gtm$dbg:*.exe and gtm$bta.exe (if it exists). Default is to turn "off"
-$!
-$ if p1 .eqs. ""
-$ then
-$	off_or_on = "off"
-$ else
-$	off_or_on = "''p1'"
-$ endif
-$!
-$ nodebugi := $gtm$bin:flipdebug.exe
-$!
-$bta_loop:
-$       exename = f$search("gtm$bta:*.exe")
-$       if (exename .eqs. "") then goto end_bta_loop
-$	write sys$output "nodebugi ''exename' ''off_or_on' alpha"
-$	nodebugi 'exename' 'off_or_on' alpha
-$       goto bta_loop
-$end_bta_loop:
-$
-$dbg_loop:
-$       exename = f$search("gtm$dbg:*.exe")
-$       if (exename .eqs. "") then goto end_dbg_loop
-$	write sys$output "nodebugi ''exename' ''off_or_on' alpha"
-$	nodebugi 'exename' 'off_or_on' alpha
-$       goto dbg_loop
-$end_dbg_loop:
-$
diff --git a/sr_vvms/dbinit_ch.c b/sr_vvms/dbinit_ch.c
deleted file mode 100644
index 75c27bd..0000000
--- a/sr_vvms/dbinit_ch.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <fab.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <lkidef.h>
-#include <psldef.h>
-#include <prvdef.h>
-#include <secdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "vmsdtype.h"
-#include "error.h"
-#include "locks.h"
-#include "del_sec.h"
-#include "mem_list.h"
-#include "repl_sp.h"		/* for F_CLOSE (used by JNL_FD_CLOSE) */
-#include "iosp.h"		/* for SS_NORMAL used by JNL_FD_CLOSE */
-#include "shmpool.h"		/* needed for shmpool structures */
-#include "have_crit.h"
-
-error_def(ERR_REQRUNDOWN);
-
-GBLREF	gd_region	*db_init_region;
-
-CONDITION_HANDLER(dbinit_ch)
-{
-	char		name_buff[GLO_NAME_MAXLEN];
-	short		iosb[4];
-	uint4		last_one_status, outaddrs[2], status, lk_status;
-	int4		lock_addrs_end;
-	vms_gds_info	*gds_info;
-	sgmnt_addrs	*csa;
-	boolean_t	read_write, is_bg;
-	vms_lock_sb	*file_lksb;
-	struct
-        {
-                int4 length;
-                char value[3];
-        } state;
-	item_list_3	ilist[2];
-	uint4 		prvprv1[2], prvprv2[2], prvadr[2];
-       	$DESCRIPTOR(desc, name_buff);
-
-	START_CH(FALSE);
-	if (SUCCESS == SEVERITY || INFO == SEVERITY)
-	{
-		PRN_ERROR;
-		CONTINUE;
-	}
-	last_one_status = 0;
-	lock_addrs_end = 0;
-	gds_info = NULL;
-	if (NULL != db_init_region->dyn.addr->file_cntl)
-		gds_info = FILE_INFO(db_init_region);
-	if (NULL != gds_info)
-	{
-		gds_info = FILE_INFO(db_init_region);
-		file_lksb = &gds_info->file_cntl_lsb;
-		csa = &gds_info->s_addrs;
-		read_write = (FALSE == db_init_region->read_only);
-		is_bg = (dba_bg == db_init_region->dyn.addr->acc_meth);
-
-		if ((NULL != csa->hdr) && (0 != csa->hdr->label[0]) && (JNL_ENABLED(csa->hdr)) && (NULL != csa->jnl))
-		{
-			if (NOJNL != csa->jnl->channel)
-				JNL_FD_CLOSE(csa->jnl->channel, status);	/* sets csa->jnl->channel to NOJNL */
-			if ((NULL != csa->jnl->jnllsb) && (0 != csa->jnl->jnllsb->lockid))
-			{
-				status = gtm_deq(csa->jnl->jnllsb->lockid, NULL, PSL$C_USER, 0);
-				assert(SS$_NORMAL == status);
-				csa->jnl->jnllsb->lockid = 0;
-			}
-		}
-
-		if (0 != file_lksb->lockid)
-		{
-			/* Emulate rundown code - see if we are the last one before deleting the section */
-			/* examine which lock state we are in at first */
-			prvadr[1] = 0;
-			prvadr[0] = PRV$M_SYSLCK;
-			status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv1[0]);
-			if (SS$_NORMAL == status)
-			{
-				prvadr[0] = PRV$M_WORLD;
-				status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv2[0]);
-			}
-			if (SS$_NORMAL == status)
-			{
-				memset(&ilist, 0, SIZEOF(ilist));
-				ilist[0].item_code = LKI$_STATE;
-				ilist[0].buffer_length = SIZEOF(state.value);
-				ilist[0].buffer_address = &(state.value[0]);
-				ilist[0].return_length_address = &(state.length);
-				status = sys$getlkiw(EFN$C_ENF, &(file_lksb->lockid), &ilist, 0, 0, 0, 0);
-			}
-			if (SS$_NORMAL != status)
-			{
-				state.value[1] = LCK$K_NLMODE;
-				status = SS$_NORMAL;
-			}
-			if (0 == (prvprv2[0] & PRV$M_WORLD))
-				sys$setprv(FALSE, &prvadr[0], FALSE, 0);
-			prvadr[0] = PRV$M_SYSLCK;
-			if (0 == (prvprv1[0] & PRV$M_SYSLCK))
-				sys$setprv(FALSE, &prvadr[0], FALSE, 0);
-			switch (state.value[1])
-			{
-				case LCK$K_NLMODE:
-				case LCK$K_CRMODE:
-				case LCK$K_CWMODE:
-				case LCK$K_PRMODE:
-					status = gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, file_lksb, LCK$M_CONVERT | LCK$M_NODLCKBLK,
-						NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-					if (SS$_NORMAL == status)
-						status = file_lksb->cond;
-				case LCK$K_PWMODE:
-					if (SS$_NORMAL == status)
-					{
-						last_one_status = gtm_enqw(EFN$C_ENF, LCK$K_EXMODE, file_lksb,
-							LCK$M_CONVERT | LCK$M_NOQUEUE | LCK$M_NODLCKWT,
-							NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-						if (SS$_NORMAL == last_one_status)
-							status =
-							last_one_status = file_lksb->cond;
-					}
-			}
-			if (csa->nl)
-			{
-				if ((1 == csa->nl->ref_cnt) && (ERR_REQRUNDOWN != SIGNAL) && (csa->read_write)
-					&& (NULL != csa->hdr) && (FALSE == csa->hdr->clustered))
-				{
-					/* last writer and applicable to clean up the stamp in database */
-					csa->hdr->owner_node = 0;
-					memset(csa->hdr->now_running, 0, SIZEOF(csa->hdr->now_running));
-					if (0 != csa->hdr->label[0])
-						sys$qiow(EFN$C_ENF, gds_info->fab->fab$l_stv, IO$_WRITEVBLK, iosb,
-							NULL, 0, csa->hdr, SIZEOF(sgmnt_data), 1, 0, 0, 0);
-				}
-				if (!is_bg)
-				{
-					assert(csa->db_addrs[0]);
-					if (!csa->hdr)
-						csa->hdr = csa->db_addrs[0];
-					lock_addrs_end = (sm_uc_ptr_t)(csa->nl) + ROUND_UP(LOCK_SPACE_SIZE(csa->hdr)
-								+ NODE_LOCAL_SPACE(csa->hdr) + JNL_SHARE_SIZE(csa->hdr)
-								+ SHMPOOL_BUFFER_SIZE, OS_PAGE_SIZE) - 1;
-				}
-				if (SS$_NORMAL == last_one_status)
-				{	/* Do not remove shared memory if we did not create it. */
-					if (TREF(new_dbinit_ipc))
-					{
-						global_name("GT$S", &gds_info->file_id, name_buff);
-						desc.dsc$a_pointer = &name_buff[1];
-						desc.dsc$w_length = name_buff[0];
-						desc.dsc$b_dtype = DSC$K_DTYPE_T;
-						desc.dsc$b_class = DSC$K_CLASS_S;
-						del_sec(SEC$M_SYSGBL, &desc, NULL);
-						if (!is_bg)
-						{
-							name_buff[4] = 'L';
-							del_sec(SEC$M_SYSGBL, &desc, NULL);
-						}
-					}
-					gds_info->file_cntl_lsb.valblk[0] = 0;
-					gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, &gds_info->file_cntl_lsb, LCK$M_CONVERT | LCK$M_VALBLK,
-						NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-				} else if (csa->ref_cnt)
-				{	/* we incremented csa->nl->ref_cnt; so decrement it now.
-					 * decrement private ref_cnt before shared ref_cnt decrement. currently journaling
-					 * logic in gds_rundown() in VMS relies on this order to detect last writer
-					 */
-					csa->ref_cnt--;
-					assert(!csa->ref_cnt);
-					adawi(-1, &csa->nl->ref_cnt);
-				}
-			}
-		}
-		if (NULL != csa->db_addrs[0])
-		{	/* Unmap the section used by the database */
-			outaddrs[0] = csa->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-			outaddrs[1] = csa->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-			gtm_deltva(outaddrs, NULL, PSL$C_USER);
-			if ((!is_bg) && (csa->nl))
-			{
-				csa->lock_addrs[0] = (sm_uc_ptr_t)(csa->nl);
-				csa->lock_addrs[1] = lock_addrs_end;
-				assert(csa->lock_addrs[1] > csa->lock_addrs[0]);
-				gtm_deltva(csa->lock_addrs, NULL, PSL$C_USER);
-			}
-		}
-		if (0 != gds_info->file_cntl_lsb.lockid)
-		{
-			if (0 != gds_info->cx_cntl_lsb.lockid)
-			{	/* if they have been granted, release the sub-locks too */
-				status = gtm_deq(gds_info->cx_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-				assert(SS$_NORMAL == status);
-				gds_info->cx_cntl_lsb.lockid = 0;
-			}
-			status = gtm_deq(gds_info->file_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-			assert(SS$_NORMAL == status);
-			gds_info->file_cntl_lsb.lockid = 0;
-		}
-		csa->hdr = NULL;
-		csa->nl = NULL;
-		if (NULL != csa->jnl)
-		{
-			free(csa->jnl);
-			csa->jnl = NULL;
-		}
-		sys$dassgn(gds_info->fab->fab$l_stv);
-	}
-	/* Reset intrpt_ok_state to OK_TO_INTERRUPT in case we got called (due to an rts_error) with intrpt_ok_state
-	 * being set to INTRPT_IN_GVCST_INIT.
-	 * We should actually be calling RESTORE_INTRPT_OK_STATE macro but since we don't have access to local variable
-	 * save_intrpt_ok_state, set intrpt_ok_state directly.
-	 */
-	assert((INTRPT_OK_TO_INTERRUPT == intrpt_ok_state) || (INTRPT_IN_GVCST_INIT == intrpt_ok_state));
-	intrpt_ok_state = INTRPT_OK_TO_INTERRUPT;
-	NEXTCH;
-}
diff --git a/sr_vvms/dcp_a2c.c b/sr_vvms/dcp_a2c.c
deleted file mode 100644
index f16dfd1..0000000
--- a/sr_vvms/dcp_a2c.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <secdef.h>
-#include <jpidef.h>
-#include <ssdef.h>
-#include <stddef.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "decddp.h"
-#include "longset.h"
-#include "dcp_a2c.h"
-#include "crit_wake.h"
-#include "is_proc_alive.h"
-
-GBLDEF com_hdr_t	*com_area = NULL;
-GBLDEF com_slot_t	*com_ptr = NULL;
-GBLDEF int4		ddp_slot_size;
-
-GBLREF mstr		my_circuit_name;
-GBLREF int4		ddp_max_rec_size;
-
-static int4		queue_retry_count = 20000;
-static boolean_t	transmit_timer_expired;
-
-static condition_code	init_section(boolean_t agent);
-static condition_code	get_pid(int4 *pid);
-static void		transmit_timer_ast(void);
-static void		set_transmit_timer(void);
-
-static condition_code init_section(boolean_t agent)
-{
-	condition_code		status;
-	int4			inadr[2], retadr[2], flags, com_pagcnt, nproc;
-	com_slot_t		*nthslot;
-	struct dsc$descriptor	section_name;
-	char section_name_buffer[] = DDP_AGENT_BUFF_NAME;
-
-	/* Global section layout ****
-	 *
-	 * COM_HDR								<- com_area
-	 * MAXIMUM_PROCESSES * COM_SLOT	(slot 0 thru MAXIMUM_PROCESSES - 1)	<- com_area->slot array
-	 */
-	INIT_DESCRIP(section_name, section_name_buffer);
-	section_name.dsc$w_length = STR_LIT_LEN(section_name_buffer);
-	assert(DDP_CIRCUIT_NAME_LEN < section_name.dsc$w_length);
-	memcpy(&section_name.dsc$a_pointer[section_name.dsc$w_length - DDP_CIRCUIT_NAME_LEN],
-			my_circuit_name.addr, my_circuit_name.len);
-	inadr[0] = inadr[1] = 0; /* indicates that data is to be mapped into p0 space. Does not specify starting address, as
-				  * SEC$M_EXPREG is set in the flags */
-	ddp_slot_size = ROUND_UP(offsetof(com_slot_t, text[0]) + DDP_MSG_HDRLEN + ddp_max_rec_size, OS_PAGELET_SIZE);
-	assert(0 == (ddp_slot_size & 1)); /* even slot size for padding odd length outbound message */
-	com_pagcnt = DIVIDE_ROUND_UP(SIZEOF(com_hdr_t) + MAXIMUM_PROCESSES * ddp_slot_size, OS_PAGELET_SIZE);
-	flags = SEC$M_GBL | SEC$M_SYSGBL | SEC$M_WRT | SEC$M_PAGFIL | SEC$M_EXPREG | SEC$M_DZRO;
-	status = sys$crmpsc(inadr, retadr, 0, flags, &section_name, 0, 0, 0, com_pagcnt, 0, 0, 0);
-	if (0 == (status & 1))
-		return status;
-	com_area = retadr[0];
-	if (agent && 0 == com_area->server_pid)
-	{
-		for (nproc = 0; MAXIMUM_PROCESSES > nproc; nproc++)
-		{
-			nthslot = (com_slot_t *)((unsigned char *)com_area->slot + (nproc * ddp_slot_size));
-			lib$insqti(&(nthslot->q), &(com_area->unused_slots), &queue_retry_count);
-		}
-	}
-	return status;
-}
-
-static condition_code get_pid(int4 *pid)
-{
-	condition_code	status;
-	int4		item_code;
-
-	item_code = JPI$_PID;
-	status = lib$getjpi(&item_code, 0, 0, pid, 0, 0);
-	return status;
-}
-
-/* Initialize shared memory: agent's version */
-condition_code dcpa_shm_init(void)
-{
-	condition_code status;
-
-	status = init_section(TRUE);
-	if (0 == (status & 1))
-		return status;
-	status = get_pid(&(com_area->server_pid));
-	return status;
-}
-
-/* routine to get message from client...0 means there is none*/
-com_slot_t *dcpa_read(void)
-{
-	com_slot_t *p;
-
-	lib$remqhi(&(com_area->outbound_pending), &p, &queue_retry_count);
-	return (p == &(com_area->outbound_pending)) ? 0 : p;
-}
-
-void dcpa_send(com_slot_t *p)
-{
-	p->state = 0;
-	crit_wake(&(p->pid));
-	return;
-}
-
-void dcpa_free_user(com_slot_t *user)
-{
-	user->pid = 0;
-	lib$insqti(&(user->q), &(com_area->unused_slots), &queue_retry_count);
-}
-
-/* Initialize shared memory: client's version */
-condition_code dcpc_shm_init(boolean_t init_shm)
-{
-	condition_code	status;
-	uint4		server;
-	error_def(ERR_DDPTOOMANYPROCS);
-	error_def(ERR_DDPNOSERVER);
-
-	if (FALSE != init_shm)
-	{
-		status = init_section(FALSE);
-		if (0 == (status & 1))
-			return status;
-	}
-	if (0 == (server = com_area->server_pid) /* server not running, client had enough privs. to create shm memory */
-	    || !is_proc_alive(server, 0))
-		return ERR_DDPNOSERVER;
-	lib$remqhi(&(com_area->unused_slots), &com_ptr, &queue_retry_count);
-	if (com_ptr == &com_area->unused_slots)
-	{
-		com_ptr = NULL;
-		return ERR_DDPTOOMANYPROCS;
-	}
-	status = get_pid(&(com_ptr->pid));
-	return status;
-}
-
-/* Client routine to send-to-agent */
-void dcpc_send2agent(void)
-{
-	com_ptr->state = 1;
-	lib$insqti(&(com_ptr->q), &(com_area->outbound_pending), &queue_retry_count);
-	crit_wake(&(com_area->server_pid));
-	return;
-}
-
-static void transmit_timer_ast()
-{
-	transmit_timer_expired = TRUE;
-	sys$wake(0, 0);
-}
-
-static void set_transmit_timer(void)
-{
-	static readonly int4 timeout[2] = {-50000000, -1}; /* 5 s */
-
-	transmit_timer_expired = FALSE;
-	sys$setimr(0, timeout, transmit_timer_ast, &transmit_timer_expired, 0);
-}
-
-/* Client routine to receive from agent */
-/* Returns 1 if timed out, 0 if got some data */
-int dcpc_rcv_from_agent(void)
-{
-	set_transmit_timer();
-	while (com_ptr->state == 1)
-	{
-		sys$hiber();
-		if (transmit_timer_expired)
-		{
-			com_ptr->state = 0;
-			return 1;
-		}
-	}
-	sys$cantim(&transmit_timer_expired, 0);
-	return 0;
-}
-
-void dcpc_shm_rundown(void)
-{
-	com_ptr->pid = 0;
-	lib$insqti(&(com_ptr->q), &(com_area->unused_slots), &queue_retry_count);
-}
diff --git a/sr_vvms/dcp_a2c.h b/sr_vvms/dcp_a2c.h
deleted file mode 100644
index e4f81de..0000000
--- a/sr_vvms/dcp_a2c.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DCP_A2C_H_INCLUDED
-#define DCP_A2C_H_INCLUDED
-
-condition_code	dcpa_shm_init(void);
-com_slot_t	*dcpa_read(void);
-void		dcpa_send(struct com_slot *p);
-void		dcpa_free_user(struct com_slot *user);
-condition_code	dcpc_shm_init(boolean_t init_shm);
-void		dcpc_send2agent(void);
-int		dcpc_rcv_from_agent(void);
-void		dcpc_shm_rundown(void);
-
-#endif /* DCP_A2C_H_INCLUDED */
diff --git a/sr_vvms/dcp_get_circuit.c b/sr_vvms/dcp_get_circuit.c
deleted file mode 100644
index 1fd2539..0000000
--- a/sr_vvms/dcp_get_circuit.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <lnmdef.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "decddp.h"
-#include "trans_log_name.h"
-#include "getzprocess.h"
-#include "five_bit.h"
-#include "is_five_bit.h"
-
-GBLDEF unsigned short	my_circuit = 0;
-GBLDEF mstr		my_circuit_name;
-static unsigned char	cktnam_buff[MAX_TRANS_NAME_LEN];
-
-condition_code dcp_get_circuit(mval *logical)
-{
-	condition_code	status;
-
-	error_def(ERR_DDPINVCKT);
-
-	status = trans_log_name(&logical->str, &my_circuit_name, cktnam_buff);
-	if (SS$_NORMAL == status)
-	{
-		if (DDP_CIRCUIT_NAME_LEN == my_circuit_name.len && is_five_bit(my_circuit_name.addr))
-			my_circuit = five_bit(my_circuit_name.addr);
-		else
-			status = ERR_DDPINVCKT;
-	}
-	return status;
-}
diff --git a/sr_vvms/dcp_get_groups.c b/sr_vvms/dcp_get_groups.c
deleted file mode 100644
index e982ad3..0000000
--- a/sr_vvms/dcp_get_groups.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_ctype.h"
-
-#include <ssdef.h>
-#include <lnmdef.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "decddp.h"
-#include "trans_log_name.h"
-
-GBLREF unsigned short	my_group_mask;
-GBLREF mstr		my_circuit_name;
-
-condition_code dcp_get_groups(void)
-{
-	char		*grpp, *grpp_top, digit;
-	char		group_list_buffer[MAX_TRANS_NAME_LEN], group_logical_buffer[MAX_TRANS_NAME_LEN];
-	mstr 		group_list, group_logical;
-	condition_code	status;
-	int 		group;
-	unsigned short	group_mask;
-
-	assert(DDP_DEFAULT_GROUP_MASK == my_group_mask); /* this function should be called only once, this is a crude check */
-	group_logical.addr = group_logical_buffer;
-	memcpy(group_logical.addr, DDP_GROUP_LOGICAL_PREFIX, STR_LIT_LEN(DDP_GROUP_LOGICAL_PREFIX));
-	memcpy(&group_logical.addr[STR_LIT_LEN(DDP_GROUP_LOGICAL_PREFIX)], my_circuit_name.addr, my_circuit_name.len);
-	group_logical.len = STR_LIT_LEN(DDP_GROUP_LOGICAL_PREFIX) + my_circuit_name.len;
-	if (SS$_NORMAL != (status = trans_log_name(&group_logical, &group_list, group_list_buffer)))
-	{
-		if (SS$_NOLOGNAM == status)
-			status = SS$_NORMAL;
-		return status;
-	}
-	for (group = 0, group_mask = 0, grpp = group_list.addr, grpp_top = group_list.addr + group_list.len;
-	     grpp < grpp_top;
-	     grpp++, group = 0)
-	{
-		if (',' == *grpp)
-			continue;
-		do
-		{
-			digit = *grpp;
-			if (ISDIGIT(digit))
-				group = (group * 10 + digit - '0');
-			else
-				break;
-		} while (++grpp < grpp_top);
-		if (',' == digit || grpp == grpp_top)
-		{
-			if (DDP_MAX_GROUP > group)
-				group_mask |= (1 << group);
-		} else
-		{ /* skip to the next group */
-			while (++grpp < grpp_top && ',' != *grpp)
-				;
-		}
-	}
-	my_group_mask = group_mask;
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/dcp_get_maxrecsize.c b/sr_vvms/dcp_get_maxrecsize.c
deleted file mode 100644
index face3ea..0000000
--- a/sr_vvms/dcp_get_maxrecsize.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <lnmdef.h>
-#include <stddef.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "decddp.h"
-#include "trans_log_name.h"
-#include "getzprocess.h"
-#include "five_bit.h"
-#include "is_five_bit.h"
-
-GBLDEF int4	ddp_max_rec_size;
-GBLREF mstr	my_circuit_name;
-
-condition_code dcp_get_maxrecsize(void)
-{
-	mstr		recsize, recsize_logical;
-	char		recbuff[MAX_TRANS_NAME_LEN], recsize_logical_buffer[MAX_TRANS_NAME_LEN];
-	condition_code	status;
-	error_def(ERR_DDPRECSIZNOTNUM);
-
-	recsize_logical.addr = recsize_logical_buffer;
-	memcpy(recsize_logical.addr, DDP_MAXRECSIZE_PREFIX, STR_LIT_LEN(DDP_MAXRECSIZE_PREFIX));
-	memcpy(&recsize_logical.addr[STR_LIT_LEN(DDP_MAXRECSIZE_PREFIX)], my_circuit_name.addr, my_circuit_name.len);
-	recsize_logical.len = STR_LIT_LEN(DDP_MAXRECSIZE_PREFIX) + my_circuit_name.len;
-	if (SS$_NORMAL == (status = trans_log_name(&recsize_logical, &recsize, recbuff)))
-	{
-		if (-1 != (ddp_max_rec_size = asc2i(recbuff, recsize.len)))
-		{
-			if (DDP_MIN_RECSIZE > ddp_max_rec_size)
-				ddp_max_rec_size = DDP_MIN_RECSIZE;
-		} else
-			status = ERR_DDPRECSIZNOTNUM;
-	}
-	return status;
-}
diff --git a/sr_vvms/dcp_get_volsets.c b/sr_vvms/dcp_get_volsets.c
deleted file mode 100644
index ee4be7b..0000000
--- a/sr_vvms/dcp_get_volsets.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2002, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-
-#include <ssdef.h>
-#include <lnmdef.h>
-#include <descrip.h>
-#include <fab.h>
-#include <rms.h>
-#include <iodef.h>
-#include <errno.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "five_bit.h"
-#include "is_five_bit.h"
-#include "eintr_wrappers.h"
-
-GBLREF mstr	my_circuit_name;
-static int 	vug_parse(char *line, unsigned short *vol, unsigned short *uci, mstr *gld);
-
-static int vug_parse(char *line, unsigned short *vol, unsigned short *uci, mstr *gld)
-{
-	char	*begin, esa[MAX_FN_LEN];
-	struct FAB fab;
-	struct NAM nam;
-
-	error_def(ERR_DDPCONFGOOD);
-	error_def(ERR_DDPCONFIGNORE);
-	error_def(ERR_DDPCONFINCOMPL);
-	error_def(ERR_DDPCONFBADVOL);
-	error_def(ERR_DDPCONFBADUCI);
-	error_def(ERR_DDPCONFBADGLD);
-
-	for (; '\0' != *line && ISSPACE(*line); line++) /* skip over leading spaces */
-		;
-	if ('\0' == *line || VUG_CONFIG_COMMENT_CHAR == *line) /* ignore empty or comment line */
-		return ERR_DDPCONFIGNORE;
-	for (begin = line++; '\0' != *line && !ISSPACE(*line); line++) /* look for beginning of volume */
-		;
-	if ('\0' == *line) /* end of line when volume expected */
-		return ERR_DDPCONFINCOMPL;
-	if (DDP_VOLUME_NAME_LEN != line - begin || !is_five_bit(begin)) /* valid volume spec? */
-		return ERR_DDPCONFBADVOL;
-	*vol = five_bit(begin);
-	for (line++; '\0' != *line && ISSPACE(*line); line++) /* skip over spaces; look for uci */
-		;
-	if ('\0' == *line) /* end of line when uci expected */
-		return ERR_DDPCONFINCOMPL;
-	for (begin = line++; '\0' != *line && !ISSPACE(*line); line++) /* find end of uci spec */
-		;
-	if ('\0' == *line) /* line ends with uci, gld not in the configuration */
-		return ERR_DDPCONFINCOMPL;
-	if (DDP_UCI_NAME_LEN != line - begin || !is_five_bit(begin)) /* valid uci spec? */
-		return ERR_DDPCONFBADUCI;
-	*uci = five_bit(begin);
-	for (line++; '\0' != *line && ISSPACE(*line); line++) /* skip over spaces, find beginning of gld */
-		;
-	if ('\0' == *line) /* end of line when gld expected */
-		return ERR_DDPCONFINCOMPL;
-	for (begin = line++; '\0' != *line && !ISSPACE(*line); line++) /* find end of gld */
-		;
-	gld->addr = begin;
-	gld->len = line - begin;
-	/* valid file specified for gld? */
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	nam.nam$b_nop = NAM$M_SYNCHK;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = gld->addr;
-	fab.fab$b_fns = gld->len;
-	nam.nam$l_esa = esa;
-	nam.nam$b_ess = SIZEOF(esa);
-	if (RMS$_NORMAL != sys$parse(&fab, 0, 0))
-		return ERR_DDPCONFBADGLD;
-	return ERR_DDPCONFGOOD;
-}
-
-condition_code dcp_get_volsets(void)
-{
-	char		vug_conf_buffer[MAX_TRANS_NAME_LEN], vug_logical_buffer[MAX_TRANS_NAME_LEN];
-	mstr 		vug_conf, vug_logical;
-	condition_code	status;
-	int		volset_count, line_no, parse_status;
-	unsigned short	vol, uci;
-	char		*line_p;
-	char		line[BUFSIZ];
-	FILE		*vol_fp;
-	mstr		gld;
-	char		err_str[1024];
-
-	error_def(ERR_DDPVOLSETCONFIG);
-	error_def(ERR_DDPCONFGOOD);
-	error_def(ERR_DDPCONFIGNORE);
-
-	vug_logical.addr = vug_logical_buffer;
-	memcpy(vug_logical.addr, DDP_VOLSET_CONF_LOGICAL_PREFIX, STR_LIT_LEN(DDP_VOLSET_CONF_LOGICAL_PREFIX));
-	memcpy(&vug_logical.addr[STR_LIT_LEN(DDP_VOLSET_CONF_LOGICAL_PREFIX)], my_circuit_name.addr, my_circuit_name.len);
-	vug_logical.len = STR_LIT_LEN(DDP_VOLSET_CONF_LOGICAL_PREFIX) + my_circuit_name.len;
-	if (SS$_NORMAL != (status = trans_log_name(&vug_logical, &vug_conf, vug_conf_buffer)))
-	{
-		decddp_log_error(status, "Volume Set Configuration File logical translation failed", 0, 0);
-		return status;
-	}
-	vug_conf.addr[vug_conf.len] = '\0';
-	if (NULL == (vol_fp = Fopen(vug_conf.addr, "r")))
-	{
-		SNPRINTF(err_str, SIZEOF(err_str), "Volume Set Configuration File %s open error : %s", vug_conf.addr,
-				strerror(errno));
-		decddp_log_error(ERR_DDPVOLSETCONFIG, err_str, 0, 0);
-		return ERR_DDPVOLSETCONFIG;
-	}
-	/* Read lines from the configuration file and set up volset_table */
-	for (line_no = 1, volset_count = 0; DDP_MAX_VOLSETS > volset_count; line_no++)
-	{
-		FGETS_FILE(line, BUFSIZ, vol_fp, line_p);
-		if (NULL != line_p)
-		{
-			if (ERR_DDPCONFGOOD == (parse_status = vug_parse(line_p, &vol, &uci, &gld)))
-			{
-				if (FALSE != enter_vug(vol, uci, &gld))
-					volset_count++;
-			} else if (ERR_DDPCONFIGNORE != parse_status)
-			{
-				SNPRINTF(err_str, SIZEOF(err_str),
-						"Incomplete or invalid configuration entry at line %d of file %s", line_no,
-						vug_conf.addr);
-				decddp_log_error(parse_status, err_str, 0, 0);
-			}
-		} else if (feof(vol_fp))
-			break;
-		else /* ferror(vol_fp) */
-		{
-			SNPRINTF(err_str, SIZEOF(err_str), "Volume Set Configuration File %s read error : %s", vug_conf.addr,
-					strerror(errno));
-			decddp_log_error(ERR_DDPVOLSETCONFIG, err_str, 0, 0);
-			fclose(vol_fp);
-			return ERR_DDPVOLSETCONFIG;
-		}
-	}
-	fclose(vol_fp);
-	if (0 == volset_count)
-	{
-		SNPRINTF(err_str, SIZEOF(err_str), "Volume Set Configuration File %s does not contain any valid VOL UCI GLD triple",
-				vug_conf.addr);
-		decddp_log_error(ERR_DDPVOLSETCONFIG, err_str, 0, 0);
-		return ERR_DDPVOLSETCONFIG;
-	}
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/dcpsubs.c b/sr_vvms/dcpsubs.c
deleted file mode 100644
index c5fd9ad..0000000
--- a/sr_vvms/dcpsubs.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_limits.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "dcpsubs.h"
-
-#define SUBS_OUT(X) (is_negative  ? ('9' - (X)) : ((X) + '0'))
-
-
-/********************************************
-* DCPSUBS.C
-*
-* Convert GT.M global reference to DSM global reference
-********************************************/
-
-boolean_t dcp_g2d(unsigned char **inptradr, unsigned char **outptradr, int outbuflen, unsigned char *naked_size_p)
-/*
-unsigned char **inptradr;	Address of pointer to GT.M global reference to be converted
-unsigned char **outptradr;	Address of pointer to DSM global reference buffer
-unsigned char *naked_size_p;	Address where to store naked_size
-*/
-
-/* Upon return: the pointers pointed to by inptradr and outptradr are updated.
-   If the return value is true then the conversion was completely successful.
-   If false, then the conversion was completed to the extend possible.  However,
-   there was a non-convertable character, such as an embedded null.
-*/
-{
-	unsigned char	*ipt, *opt, *start_out, *opt_top;
-	unsigned char	ch;
-	boolean_t	succeeded;
-	int 		expval, outexp, digit;
-	boolean_t	is_negative;
-	error_def(ERR_DDPSUBSNUL);
-	error_def(ERR_GVSUBOFLOW);
-
-	/* Work with local copies of the pointers, as there are otherwise two
-	   levels of de-referencing involved
-	*/
-	ipt = *inptradr;
-	opt = start_out = *outptradr;
-	opt_top = opt + outbuflen;
-	/* The 'succeeded' flag indicates whether the conversion was performed
-	   with complete success.  It is initialized to 'TRUE'.  If at any time,
-	   the program detects that the conversion will not be 100% accurate, the
-	   variable will be set to 'FALSE'.
-	*/
-	succeeded = TRUE;
-	/* The variable 'ch' will always contain the current character that we are
-	   working on.
-	*/
-	/* Do global name in 7-bit format first */
-	while (KEY_DELIMITER != (ch = *ipt++) && opt < opt_top)
-		*opt++ = (ch << 1) + 1;
-	if (KEY_DELIMITER == ch)
-		*(opt - 1) &= ~1; /* the last byte of the global has bit 0 cleared, all others have bit 0 set */
-	else
-		rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-	while (KEY_DELIMITER != (ch = *ipt++) && opt < opt_top)
-	{
-		if (UCHAR_MAX < opt - start_out)
-			rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-		*naked_size_p = opt - start_out;
-		if (STR_SUB_PREFIX == ch || (SUBSCRIPT_STDCOL_NULL == ch &&  KEY_DELIMITER == *ipt))
-		{ /* GT.M subscript is a string subscript */
-			ch = *ipt++;
-			if (KEY_DELIMITER == ch) /* If input subscript is null, make output subscript null */
-				*opt++ = 1; /* 1 is special indicator for null string */
-			else
-			{ /* Non-null string is here */
-				assert(STR_SUB_PREFIX == *(ipt -2));
-				*opt++ = 0xFE;	/* FE is indication that non-null string follows */
-				for ( ; 0 != ch && opt < opt_top; ch = *ipt++)
-				{
-					if (1 == ch)
-					{ /* Decode GT.M style control characters */
-						if (0 == (ch = (*ipt++ - 1)))
-							rts_error(VARLSTCNT(1) ERR_DDPSUBSNUL);
-					}
-					*opt++ = ch;
-				}
-				if (0 != ch)
-					rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-			}
-		} else
-		{ /* GT.M subscript is a numeric subscript */
-			if (0x80 == ch)
-			{ /* Special case: input value is zero */
-				if (opt + 1 < opt_top) /* need two bytes */
-				{
-					*opt++ = 0x80;
-					*opt++ = '0';
-					ipt++;
-				} else
-					rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-			} else
-			{
-				is_negative = (0 == (ch & 0x80));
-				if (is_negative)
-					ch = ~ch;
-				expval = (ch & 0x7f);
-				expval -= 0x3F;		/* Remove bias */
-				/* For DSM, all negative exponents are = 0x81 */
-				if (-1 > expval)
-					outexp = -1;
-				else
-					outexp = expval;
-				/* 1 collation byte + 1 decimal point + expval zeros + max 18 digits + trailer if negative */
-				if ((1 + 1 + (0 > expval ? -expval : expval) + 2 * (MAX_NUM_SUBSC_LEN - 1) + (is_negative ? 1 : 0))
-				    > opt_top - opt) /* stricter check than necessary, the number might not be all of 18 digits */
-					rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-				*opt++ = is_negative ? (0x7e - outexp) : outexp + 0x82;
-				if (-1 > expval) /* Leading decimal point? */
-				{ /* Yes, output decimal point and leading zeros */
-					*opt++ = '.';
-					for (digit = expval; 0 > ++digit; )
-						*opt++ = SUBS_OUT(0);
-				}
-				while (0 != (ch = *ipt++) && STR_SUB_PREFIX != ch)
-				{ /* Output mantissa */
-					if (is_negative)
-						ch = ~ch;
-					ch--;
-					if (-1 == expval--)
-						*opt++ = '.';
-					digit = (ch >> 4); /* upper nibble */
-					*opt++ = SUBS_OUT(digit);
-					if (-1 == expval--)
-						*opt++ = '.';
-					digit = (ch & 0xF); /* lower nibble */
-					*opt++ = SUBS_OUT(digit);
-				}
-				if (STR_SUB_PREFIX == ch && KEY_DELIMITER == *ipt)	/* at end of negative subscript */
-					ipt++;						/* increment past trailing zero byte */
-				if (expval < -1)
-				{	/* Trim possible trailing zero and possible "." */
-					if (*(opt - 1) == SUBS_OUT(0))
-						opt--;
-					if ('.' == *(opt - 1))
-						opt--;
-				} else
-				{ /* Output trailing zeroes, if any */
-					for ( ; 0 <= expval; expval--)
-						*opt++ = SUBS_OUT(0);
-				}
-				/* negative subscripts have a FE trailer */
-				if (is_negative)
-					*opt++ = 0xFE;
-			}
-		}
-		if (opt < opt_top)
-			*opt++ = 0;
-		else
-			rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-	}
-	/* Operation completed, clean-up and return */
-	*outptradr = opt;
-	*inptradr = ipt;
-	return succeeded;
-}
diff --git a/sr_vvms/dcpsubs.h b/sr_vvms/dcpsubs.h
deleted file mode 100644
index 59792df..0000000
--- a/sr_vvms/dcpsubs.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DCPSUBS_H_INCLUDED
-#define DCPSUBS_H_INCLUDED
-
-boolean_t	dcp_g2d(unsigned char **inptradr, unsigned char **outptradr, int outbuflen, unsigned char *naked_size_p);
-
-#endif /* DCPSUBS_H_INCLUDED */
diff --git a/sr_vvms/ddp_db_op.c b/sr_vvms/ddp_db_op.c
deleted file mode 100644
index 6068617..0000000
--- a/sr_vvms/ddp_db_op.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_ctype.h"
-#include "gtm_time.h"
-
-#include <descrip.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "decddp.h"
-#include "route_table.h"
-#include "subscript.h"
-#include "seven_2_ascii.h"
-
-#define DDP_LOG_ZSTATUS								\
-{										\
-	gtm$zstatus(&ddp_result);						\
-	DDP_LOG_ERROR(ddp_result.dsc$w_length, ddp_result.dsc$a_pointer);	\
-}
-
-GBLDEF int4 			subscript_count;
-GBLDEF struct dsc$descriptor	ddp_result;
-GBLDEF struct dsc$descriptor	subscript_array[1 + 1 + 1 + MAX_GVSUBSCRIPTS]; /* worst case (SET operation) -
-										* 1 - input data (for SET)
-										* 1 - global directory
-										* 1 - global name
-										* MAX_GVSUBSCRIPTS - max # subscripts
-										*/
-GBLREF bool                     dec_nofac;
-error_def(ERR_ZGBLDIRACC);
-error_def(ERR_DBOPNERR);
-error_def(ERR_GVUNDEF);
-error_def(ERR_REC2BIG);
-error_def(ERR_LCKSTIMOUT);
-error_def(ERR_DDPOUTMSG2BIG);
-error_def(ERR_DDPLOGERR);
-
-void	gtm$zstatus(struct dsc$descriptor *zstatus);
-
-static unsigned char spool[MAX_ETHER_DATA_SIZE];
-
-char *ddp_db_op(
-	struct in_buffer_struct *bp,
-	condition_code (*func)(),	/* function to dispatch to*/
-	unsigned char *addr,		/* if == 0, then receive the result in 'ddp_result'
-				   	   if == 1, then there is no result
-				   	   if > 1, set the first descriptor to be equal to the data pointed to at addr */
-	int len)			/* if addr > 1, then this is the length of the data to set-up */
-{
-	ddp_hdr_t		*dp;	/* pointer to input buffer */
-	unsigned char		*cp, *inkeyptr, *keytop, *extref;
-	int			ch, index, length, jobno, subscript_type, bufavail, gtm_prefix_len;
-	condition_code		status;
-	routing_tab		*remote_node;
-	mstr			*gld;
-	ddp_global_request_t	*gp;
-
-	dp = &bp->dh;
-	gp = dp->txt;
-	jobno = dp->source_job_number;
-	assert((2 <= jobno) && (0 == (jobno & 1)));
-	jobno >>= 1;
-	jobno -= 1;
-	assert(0 <= jobno && MAX_USERS_PER_NODE >= jobno);
-	if (NULL == (remote_node = find_route(dp->source_circuit_name))) /* couldn't find sender in our tables */
-		return "";
-	if (dp->message_number > remote_node->incoming_users[jobno] + 1) /* sequencing error, incoming message number is too big */
-		return "";
-	remote_node->incoming_users[jobno] = dp->message_number;
-	/* Vinaya, 07/11/02 -  Based on ether traces, we noticed that the field global_type is always 0x02. Since we don't know
-	 * what 0x02 really means, we don't want to sanity check the incoming message for the value of this field in the
-	 * incoming message. Hence the disabling of the check. Note, the check had been disabled before the DDP revamp
-	 * exercise in 2002. */
-/*** temorarily noop this
-*	if (DDP_GLOBAL_TYPE != gp->global_type)
-*		return "<FORMT>";
-*****/
-	cp = spool;
-	subscript_count = 0;	/* incremented after every add of a subscript to subscript_array.
-				 * this is usually done with the INIT_DESCRIP and DESCRIP_LENGTH usage */
-	if (addr > (char *)1)
-	{ /* set-up pointer to input data */
-		INIT_DESCRIP(subscript_array[subscript_count], addr);
-		subscript_array[subscript_count].dsc$w_length = len;
-		subscript_count++;
-	}
-	/* set-up global directory */
-	INIT_DESCRIP(subscript_array[subscript_count], cp);
-	if (NULL != (gld = find_gld(gp->vol, gp->uci)))
-	{
-		memcpy(cp, gld->addr, gld->len);
-		cp += gld->len;
-	} else
-		return "<NOUCI>";
-	DESCRIP_LENGTH(subscript_array[subscript_count], cp);
-	subscript_count++;
-	inkeyptr = gp->global;
-	keytop = inkeyptr + (int)gp->global_len;
-	if (keytop > (char *)dp + dp->message_length) /* check to see that key length doesnt send us off the end of the record */
-		return "<FORMT>";
-	/* set-up global name */
-	INIT_DESCRIP(subscript_array[subscript_count], cp);
-	length = seven_2_ascii(inkeyptr, cp);
-	cp += length;
-	inkeyptr += length;
-	if (inkeyptr > keytop)
-		return "<FORMT>";
-	DESCRIP_LENGTH(subscript_array[subscript_count], cp);
-	subscript_count++;
-	/* set-up subscripts */
-	/* our subscript format takes less space than DSM's subscript format; so we don't have to check for buffer overflow */
-	for ( ; inkeyptr < keytop; )
-	{
-		subscript_type = *inkeyptr++;
-		if (1 < subscript_type && 0x80 > subscript_type)
-		{
-			subscript_type = 0x7F - subscript_type;
-			*--inkeyptr = '-';
-			INIT_DESCRIP(subscript_array[subscript_count], inkeyptr);
-			inkeyptr++;
-			while(subscript_type--)
-			{
-				ch = *inkeyptr;
-				ch = 0x69 - ch;
-				assert(ISDIGIT(ch));
-				*inkeyptr++ = ch;
-			}
-			assert('.' == *inkeyptr || 0xFE == *inkeyptr);
-			if ('.' == *inkeyptr)
-				inkeyptr++;
-			while (0xFE != (ch = *inkeyptr))
-			{
-				ch = 0x69 - ch;
-				assert(ISDIGIT(ch));
-				*inkeyptr++ = ch;
-			}
-			inkeyptr++;
-			DESCRIP_LENGTH(subscript_array[subscript_count], inkeyptr - 1);
-			subscript_count++;
-			assert('\0' != *inkeyptr);
-			inkeyptr++;
-		} else
-		{
-			INIT_DESCRIP(subscript_array[subscript_count], inkeyptr);
-			while ('\0' != *inkeyptr++)
-				;
-			DESCRIP_LENGTH(subscript_array[subscript_count], inkeyptr - 1);
-			subscript_count++;
-		}
-		if (inkeyptr > keytop)
-			return "<FORMT>";
-	}
-	/* perform operation */
-	status = ddp_dal_dispatch(func, (addr == 0) ? &ddp_result : NULL);
-	if (0 == (status & 1))
-	{
-		DDP_LOG_ZSTATUS;
-		if (status == ERR_GVUNDEF)
-			return "<UNDEF>";
-		if (status == ERR_ZGBLDIRACC)
-			return "<NOUCI>";
-		if (status == ERR_DBOPNERR)
-			return "<DKHER>";
-/****** This is displayed as a SYNTX error
-		if (status == ERR_REC2BIG)
-			return "<MXSTR>";
-********/
-		/*default:*/
-		decddp_log_error(status, "Undecoded status message, returned as <DBDGD>", &bp->dh.source_circuit_name,
-				 &bp->dh.source_job_number);
-		return "<DBDGD>";
-	}
-	/* This is the message received from the client, so reply to the source of this message */
-	decddp_shdr(DDPTR_RESPONSE, 1, dp->source_circuit_name, dp->source_job_number, dp->message_number, bp->fh.source_address);
-	if (NULL == addr && 0 < ddp_result.dsc$w_length)
-	{ /* note, input buffer and output buffer are different and so we can test the incoming message header fields */
-		bufavail = decddp_bufavail();
-		if (DDPTR_QUERY != dp->trancode && bufavail > ddp_result.dsc$w_length)
-			decddp_s8bit_counted(ddp_result.dsc$a_pointer, ddp_result.dsc$w_length);
-		else if (DDPTR_QUERY == dp->trancode &&
-			 bufavail > DSM_EXTREF_FORM_LEN + ddp_result.dsc$w_length -
-				    (gtm_prefix_len = STR_LIT_LEN(GTM_EXTREF_PREFIX) + gld->len + STR_LIT_LEN(GTM_EXTREF_SUFFIX)))
-		{ /* form of extref is        ^|"globaldirectory"|global */
-		  /* form of extref should be       ^["UCI","VOL"]global */
-			extref = ddp_result.dsc$a_pointer;
-			assert(0 == memcmp(extref, GTM_EXTREF_PREFIX, STR_LIT_LEN(GTM_EXTREF_PREFIX)));
-			assert(0 == memcmp(&extref[STR_LIT_LEN(GTM_EXTREF_PREFIX)], gld->addr, gld->len));
-			assert(0 == memcmp(&extref[STR_LIT_LEN(GTM_EXTREF_PREFIX) + gld->len], GTM_EXTREF_SUFFIX,
-					   STR_LIT_LEN(GTM_EXTREF_SUFFIX)));
-			decddp_s8bit_counted(LIT_AND_LEN(DSM_EXTREF_PREFIX));
-			decddp_s5asc(gp->uci);
-			decddp_s8bit_counted(LIT_AND_LEN(DSM_UCI_VOL_SEPARATOR));
-			decddp_s5asc(gp->vol);
-			decddp_s8bit_counted(LIT_AND_LEN(DSM_EXTREF_SUFFIX));
-			decddp_s8bit_counted(&extref[gtm_prefix_len], ddp_result.dsc$w_length - gtm_prefix_len);
-		} else /* result is larger than our outbound buffer size */
-		{
-			decddp_log_error(ERR_DDPOUTMSG2BIG, "Undecoded status message, returned as <DBDGD>",
-					 &bp->dh.source_circuit_name, &bp->dh.source_job_number);
-			return "<DBDGD>";
-		}
-	}
-	decddp_putbyte(DDP_MSG_TERMINATOR);
-	return NULL;
-}
-
-char *ddp_lock_op(
-	struct in_buffer_struct *bptr,
-	condition_code (*func)(),	/* function to dispatch to*/
-	int unlock_code)		/* if =1, then this is an unlock */
-{
-	ddp_hdr_t	*dp;		/* pointer to input buffer */
-	unsigned char	*bp, *btop, *uci_p, *vol_p;
-	unsigned char	*cp;
-	int 		ch, jobno;
-	condition_code	status;
-	boolean_t	success;
-	routing_tab	*remote_node;
-	auxvalue	aux;
-	mstr		*gld;
-
-	dp = &bptr->dh;
-	jobno = dp->source_job_number;
-	assert((2 <= jobno) && (0 == (jobno & 1)));
-	jobno >>= 1;
-	jobno -= 1;
-	assert(0 <= jobno && MAX_USERS_PER_NODE >= jobno);
-	if (NULL == (remote_node = find_route(dp->source_circuit_name))) /* couldn't find sender in our tables */
-		return "";
-	if (dp->message_number > remote_node->incoming_users[jobno] + 1) /* sequencing error, incoming message number is too big */
-		return "";
-	remote_node->incoming_users[jobno] = dp->message_number;
-	bp = dp->txt;
-	btop = (char *)dp + dp->message_length - 1;
-	if ('^' != *bp++ || '[' != *bp++ || '\"' != *bp++)
-		return "<FORMT>";
-	subscript_count = 0;	/* incremented after every add of a subscript to subscript_array.
-				 * this is usually done with the INIT_DESCRIP and DESCRIP_LENGTH usage */
-	cp = spool;
-	/* set-up global directory */
-	INIT_DESCRIP(subscript_array[subscript_count], cp);
-	uci_p = bp;
-	bp += DDP_UCI_NAME_LEN;
-	if (*bp++ != '\"' || *bp++ != ',' || *bp++ != '\"')
-		return "<FORMT>";
-	vol_p = bp;
-	bp += DDP_VOLUME_NAME_LEN;
-	if (*bp++ != '\"' || *bp++ != ']')
-		return "<FORMT>";
-	if (NULL != (gld = find_gld(five_bit(vol_p), five_bit(uci_p))))
-	{
-		memcpy(cp, gld->addr, gld->len);
-		cp += gld->len;
-	} else
-		return "<NOUCI>";
-	DESCRIP_LENGTH(subscript_array[subscript_count], cp);
-	subscript_count++;
-	/* Load global name */
-	if (bp > btop)
-		return "<FORMT>";
-	INIT_DESCRIP(subscript_array[subscript_count], bp);
-	for (; '(' != *bp && bp < btop; bp++)
-		;
-	DESCRIP_LENGTH(subscript_array[subscript_count], bp);
-	subscript_count++;
-	if (bp < btop && '(' != *bp++)
-		return "<FORMT>";
-	for ( ; bp < btop; )
-	{
-		ch = *bp++;
-		if (')' == ch)
-			break;
-		if ('\"' != ch)
-		{
-			INIT_DESCRIP(subscript_array[subscript_count], bp - 1);
-			if ('-' == ch)
-				ch = *bp++;
-			for (; ;)
-			{
-				ch = *bp++;
-				if (bp > btop)
-					break;
-				if (ISDIGIT(ch) || ch == '.')
-					continue;
-				break;
-			}
-			DESCRIP_LENGTH(subscript_array[subscript_count], bp - 1);
-			subscript_count++;
-		} else
-		{
-			INIT_DESCRIP(subscript_array[subscript_count], bp);
-			for (; ;)
-			{
-				ch = *bp++;
-				if ('\"' == ch)
-				{ /* CAUTION:  MUST REMOVE DOUBLE QUOTES */
-					ch = *bp++;
-					if ('\"' != ch)
-						break;
-				}
-			}
-			DESCRIP_LENGTH(subscript_array[subscript_count], bp -  2);
-			subscript_count++;
-		}
-		if (')' == ch)
-			break;
-		if (',' != ch || ch >= btop)
-			return "<FORMT>";
-	}
-	success = TRUE;
-	aux.as.circuit = dp->source_circuit_name;
-	aux.as.job = jobno;
-	status = ddp_lock_dispatch(func, unlock_code, aux.auxid);
-	if (0 == (status & 1))
-	{
-		if (status == ERR_LCKSTIMOUT)
-			success = FALSE;
-		else
-		{
-			DDP_LOG_ZSTATUS;
-			if (ERR_ZGBLDIRACC == status)
-				return "<NOUCI>";
-			if (ERR_DBOPNERR == status)
-				return "<DKHER>";
-			/*default:*/
-			decddp_log_error(status, "Undecoded status message, returned as <DBDGD>", &bptr->dh.source_circuit_name,
-					 &bptr->dh.source_job_number);
-			return "<DBDGD>";
-		}
-	}
-	/* This is the message received from the client, so reply to the source of this message */
-	decddp_shdr(DDPTR_RESPONSE, 1, dp->source_circuit_name, dp->source_job_number, dp->message_number, bptr->fh.source_address);
-	if (!unlock_code)
-		decddp_putbyte(success ? 'S' : 'F');
-	decddp_putbyte(DDP_MSG_TERMINATOR);
-	return NULL;
-}
diff --git a/sr_vvms/ddp_spkitbld.dat b/sr_vvms/ddp_spkitbld.dat
deleted file mode 100644
index 21005b1..0000000
--- a/sr_vvms/ddp_spkitbld.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-SPKITBLD$KITNAME := GTCD60002
-SPKITBLD$REWIND_TAPE := N
-SPKITBLD$AUTOINIT_TAPE := 'GTM_INIT_TAPE'
-SPKITBLD$SKIP_FIRST_TAPE_READY_PROMPT := Y
-SPKITBLD$SKIP_FIRST_DISK_READY_PROMPT := Y
-SPKITBLD$SAVESET_A := GTM$VRT:[TDP]KITINSTAL.COM;,DDPKITHLP.COM;,GTM$VRT:[PRO]DDPSERVER.EXE;,GTM$VRT:[PRO]DDPGVUSR.EXE;,GTM$VRT:[PRO]GTCMDDPSTOP.EXE;
diff --git a/sr_vvms/ddp_trace_output.c b/sr_vvms/ddp_trace_output.c
deleted file mode 100644
index ec03155..0000000
--- a/sr_vvms/ddp_trace_output.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_string.h"
-
-#define D2HEX(X) 	(((X) < 10) ? (X) + '0' : (X) - 10 + 'A')
-#define BYTES_PER_LINE	32
-
-char *ddp_trace_prefix[] =
-{
-	"-> ", /* DDP_SEND */
-	"<- "  /* DDP_RECV */
-};
-
-void ddp_trace_output(unsigned char *cp, int len, int code)
-{
-	unsigned char	outbuf[BYTES_PER_LINE * 4]; /* space before and after each byte */
-	unsigned char	*cin, *cout, *ctop;
-	int 		n, m, p, prefix_len;
-
-	prefix_len = strlen(ddp_trace_prefix[code]);
-	assert(BYTES_PER_LINE > prefix_len);
-	strcpy(outbuf, ddp_trace_prefix[code]);
-	for (cin = cp, ctop = cin + len , cout = outbuf + prefix_len, n = 0; cin < ctop; n++)
-	{
-		if (n >= BYTES_PER_LINE)
-		{
-			cce_out_write(outbuf, cout - outbuf);
-			strcpy(outbuf, ddp_trace_prefix[code]);
-			cout = outbuf + prefix_len;
-			n = 0;
-		}
-		m = *cin++;
-		p = (m >> 4);
-		*cout++ = D2HEX(p);
-		p = (m & 0x0F);
-		*cout++ = D2HEX(p);
-		*cout++ = ' ';
-	}
-	if (n)
-		cce_out_write(outbuf, cout - outbuf);
-	return;
-}
diff --git a/sr_vvms/ddp_trace_output.h b/sr_vvms/ddp_trace_output.h
deleted file mode 100644
index 220de80..0000000
--- a/sr_vvms/ddp_trace_output.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DDP_TRACE_OUTPUT_INCLUDED
-#define DDP_TRACE_OUTPUT_INCLUDED
-
-#define DDP_TRACE_ENV	"GTMDDP$TRACE"
-
-enum
-{
-	DDP_SEND = 0,
-	DDP_RECV = 1
-};
-
-int ddp_trace_output(unsigned char *cp, int len, int code);
-
-#endif /* DDP_TRACE_OUTPUT_INCLUDED */
diff --git a/sr_vvms/ddpcom.h b/sr_vvms/ddpcom.h
deleted file mode 100644
index e6cb172..0000000
--- a/sr_vvms/ddpcom.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DDPCOM_H_INCLUDED
-#define DDPCOM_H_INCLUDED
-
-struct iosb_struct
-{
-	unsigned short	status;
-	unsigned short	length;
-	uint4		devinfo;
-};
-
-struct queue_entry
-{
-	int4 fl;
-	int4 bl;
-};
-
-typedef struct com_slot
-{
-	struct queue_entry	q;
-	struct iosb_struct	iosb;
-	uint4			pid;
-	short			len;
-	short			state;	/* 1 means no message for client, 0 means message is ready for client */
-	char			text[1]; /* actually, ddp_slot_size bytes */
-} com_slot_t;
-
-/* The state flag is actually used to mean that the client may proceed to reuse the message space.
-   Once the client places a message in the slot, the flag remains 1 until the server has returned
-   a reply.  It is necessary to check that the server has replied as there is no mutex protecting the
-   message slot.  If the client aborts prior to the server replying, and were to then start a new
-   transaction, placing a new message in the slot, the server's reply to the previous request could
-   overlay the new message.
-*/
-
-typedef struct com_hdr
-{
-	struct queue_entry	unused_slots;
-	struct queue_entry	outbound_pending;
-	uint4			server_pid;
-	int4			filler;	/* we must be quad-word aligned */
-	com_slot_t		slot[1];
-} com_hdr_t;
-
-#define MAXIMUM_CIRCUITS	32
-#define MAX_USERS_PER_NODE 	MAXIMUM_PROCESSES /* Only MAXIMUM_PROCESSES supported at this time */
-
-typedef struct
-{
-	unsigned short	circuit_name;
-	char		ether_addr[ETHERADDR_LENGTH];
-	unsigned char	incoming_users[MAX_USERS_PER_NODE];
-	unsigned char	outgoing_users[MAX_USERS_PER_NODE];
-} routing_tab;
-
-typedef struct
-{
-	unsigned short volset_name;
-	unsigned short circuit_name;
-} circuit_tab;
-
-typedef struct uci_gld_pair_struct
-{
-	unsigned short			uci;
-	mstr				gld;
-	struct uci_gld_pair_struct	*next;
-} uci_gld_pair;
-
-typedef struct
-{
-	unsigned short	vol;
-	uci_gld_pair	*ug;
-} volset_tab;
-
-#define VUG_CONFIG_COMMENT_CHAR '#'
-
-typedef union
-{
-	uint4 auxid;
-	struct
-	{
-		short circuit;
-		short job;
-	}as;
-} auxvalue;
-
-#define DDP_XMIT_FAIL		"<DDP_ETHER_IO_FAIL>"
-#define DDP_MSG2BIG		"<DDP_MSG2BIG>"
-#define DDP_AGENT_BUFF_NAME	"GTMDDP$AGENTBUFF$XXX" /* XXX - DDP_CIRCUIT_NAME_LEN characters that will be filled in
-							* by init_section */
-
-#endif /* DDPCOM_H_INCLUDED */
diff --git a/sr_vvms/ddpgvusr.c b/sr_vvms/ddpgvusr.c
deleted file mode 100644
index cb51ef2..0000000
--- a/sr_vvms/ddpgvusr.c
+++ /dev/null
@@ -1,772 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_ctype.h"
-#include "gtm_limits.h"
-#include <ssdef.h>
-#include <stddef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "send_msg.h"
-#include "dcpsubs.h"
-#include "dcp_a2c.h"
-#include "five_bit.h"
-#include "is_five_bit.h"
-#include "five_2_ascii.h"
-#include "subscript.h"
-#include "str2gvkey.h"
-#include "gvusr.h"
-#include "min_max.h"
-#include "is_proc_alive.h"
-
-/* Retry count should be user parameter */
-#define RETRYCNT 5
-
-/* list of machines that this client is speaking to.  The message number
-	is unique per client, per machine.  Since multiple database files
-	can reside on a given machine, the message number can not be associated
-	with a region structure.  Since the number must be in synch for each
-	machine, it can't be in the client structure.  Hence the appropriate
-	sequence number for each machine for this client must be kept separately.
-*/
-
-error_def(ERR_GVDATAFAIL);
-error_def(ERR_GVGETFAIL);
-error_def(ERR_GVKILLFAIL);
-error_def(ERR_GVORDERFAIL);
-error_def(ERR_GVPUTFAIL);
-error_def(ERR_GVQUERYFAIL);
-error_def(ERR_GVSUBOFLOW);
-error_def(ERR_GVZPREVFAIL);
-error_def(ERR_NETDBOPNERR);
-error_def(ERR_NETFAIL);
-error_def(ERR_NETLCKFAIL);
-error_def(ERR_TEXT);
-error_def(ERR_UNIMPLOP);
-error_def(ERR_DDPBADRESPONSE);
-error_def(ERR_DDPCONGEST);
-error_def(ERR_DDPNOCONNECT);
-error_def(ERR_DDPSHUTDOWN);
-error_def(ERR_DDPTOOMANYPROCS);
-error_def(ERR_DDPNOSERVER);
-error_def(ERR_REC2BIG);
-
-GBLREF gd_region	*gv_cur_region;
-GBLREF gv_key		*gv_altkey;
-GBLREF gv_key		*gv_currkey;
-
-GBLREF struct com_slot	*com_ptr;
-GBLREF struct com_hdr	*com_area;
-
-GBLREF int4		ddp_max_rec_size;
-GBLREF int4		ddp_slot_size;
-
-static unsigned short	my_jobno;
-static ddp_info		*ddp_values;
-static gv_key		**ckey_adr;
-static gv_key		**akey_adr;
-static gd_region	**creg_adr;
-static unsigned char	*bufptr;
-
-static condition_code	send_to_agent();
-static int 		gvusr_o2(char trancode);
-
-static void setup_global_pointers(char trancode)
-{
-	char			*inpt;
-	unsigned char		*ptr, *lastsubstart;
-	ddp_hdr_t		*dp;
-	ddp_global_request_t	*gp;
-
-	gv_currkey = *ckey_adr;
-	gv_altkey = *akey_adr;
-	gv_cur_region = *creg_adr;
-	inpt = gv_currkey->base;
-	ddp_values = &FILE_INFO(gv_cur_region)->file_id;
-	dp = com_ptr->text;
-	dp->trancode = trancode;
-	dp->proto = DDP_PROTO_VERSION;
-	/* source_circuit_name filled in by agent */
-	dp->source_job_number = my_jobno;
-	dp->remote_circuit_name = ddp_values->volset;	/* Actually the volset name.  Translated by the agent */
-	dp->remote_job_number = 0;
-	dp->filler1 = 0;
-	dp->hdrlen = DDP_MSG_HDRLEN;
-	gp = dp->txt;
-	gp->naked_size = 0;
-	gp->uci = ddp_values->uci;
-	gp->vol = ddp_values->volset;
-	gp->global_type = DDP_GLOBAL_TYPE;
-	bufptr = gp->global;
-	dcp_g2d(&inpt, &bufptr, (unsigned char *)com_ptr + ddp_slot_size - bufptr, &gp->naked_size);
-	if (UCHAR_MAX >= bufptr - gp->global)
-		gp->global_len = bufptr - gp->global;
-	else
-		rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-	return;
-}
-
-static condition_code send_to_agent(void)
-{
-	uint4	server;
-
-	com_ptr->len = bufptr - (unsigned char *)com_ptr->text;
-	dcpc_send2agent();
-	if (0 == dcpc_rcv_from_agent())
-		return SS$_NORMAL;
-	return (0 == (server = com_area->server_pid) || !is_proc_alive(server, 0)) ? ERR_DDPNOSERVER : ERR_NETFAIL;
-}
-
-void gvusr_init(gd_region *reg, gd_region **creg, gv_key **ckey, gv_key **akey)
-/* 2nd argument is a pointer to gv_cur_region in gtmshr */
-/* 3rd argument is a pointer to gv_currkey in gtmshr */
-/* 4th argument is a pointer to gv_altkey in gtmshr */
-{
-	char		*cp;
-	condition_code	status;
-	gd_segment	*seg;
-	mval cktnam_logi = DEFINE_MVAL_STRING(MV_STR, 0, 0, STR_LIT_LEN(DDP_CLIENT_CKTNAM_LOGI), DDP_CLIENT_CKTNAM_LOGI, 0, 0);
-	static boolean_t shm_inited = FALSE;
-
-	ckey_adr = ckey;
-	akey_adr = akey;
-	creg_adr = creg;
-	gv_cur_region = reg;
-	seg = reg->dyn.addr;
-	/* NOTE: In a clean and better world, these structures shouldn't have to
-		be set up this way for a dba_usr database.  Users should be able
-		to define their own structures to put in seg->file_cntl.  But this
-		is the real world, and GV_MATCH will get sick if we don't toe the
-		line, and make a usr database look like a bg or mm database at
-		this structure level.  No one is using the usr funcitionality except
-		our implementation of DEC DDP, I believe, so it shouldn't be too
-		embarrassing.
-	*/
-	FILE_CNTL_INIT_IF_NULL(seg);
-	ddp_values = &FILE_INFO(reg)->file_id;
-	if (0 == ddp_values->uci)
-	{ /* Calculate UCI and Volume set names */
-		cp = &reg->dyn.addr->fname;
-		if (!is_five_bit(cp))
-			rts_error(VARLSTCNT(6) ERR_NETDBOPNERR, 0, ERR_TEXT, 2, LEN_AND_LIT("Invalid VOLUME specification"));
-		ddp_values->volset = five_bit(cp);
-		cp += DDP_VOLUME_NAME_LEN;
-		if (':' != *cp++ || ':' != *cp++)
-			rts_error(VARLSTCNT(6) ERR_NETDBOPNERR, 0, ERR_TEXT, 2,
-					LEN_AND_LIT("Invalid separator between volume and uci"));
-		if (!is_five_bit(cp))
-			rts_error(VARLSTCNT(6) ERR_NETDBOPNERR, 0, ERR_TEXT, 2, LEN_AND_LIT("Invalid UCI specification"));
-		ddp_values->uci = five_bit(cp);
-	}
-	if (NULL != com_ptr)
-	{ /* Have already established communications with the agent */
-		reg->open = TRUE;
-		return;
-	}
-	if (NULL == com_area)
-	{
-		status = dcp_get_circuit(&cktnam_logi);
-		if (0 == (status & 1))
-			rts_error(VARLSTCNT(7) ERR_NETDBOPNERR, 0, ERR_TEXT, 2,
-					LEN_AND_LIT("Could not find circuit name to use"), status);
-		status = dcp_get_maxrecsize();
-		if (0 == (status & 1))
-			rts_error(VARLSTCNT(7) ERR_NETDBOPNERR, 0, ERR_TEXT, 2,
-					LEN_AND_LIT("Could not find maximum record size"), status);
-	}
-	status = dcpc_shm_init(NULL == com_area);
-	if (0 == (status & 1))
-	{
-		if (ERR_DDPTOOMANYPROCS == status)
-			rts_error(VARLSTCNT(5) ERR_NETDBOPNERR, 0, ERR_DDPTOOMANYPROCS, 1, MAXIMUM_PROCESSES);
-		else
-			rts_error(VARLSTCNT(3) ERR_NETDBOPNERR, 0, status);
-	}
-	my_jobno = ((((unsigned char *)com_ptr - (unsigned char *)com_area->slot) / ddp_slot_size) + 1) << 1;
-			/* Note: no slot zero...slot 1 is for server/agent; normal users use $J*2 */
-	reg->open = TRUE;
-	return;
-}
-
-void gvusr_rundown(void)
-{
-	ddp_hdr_t		*dp;
-	ddp_global_request_t	*gp;
-
-	if (NULL == com_ptr)
-		return;
-	dp = com_ptr->text;
-	dp->trancode = DDPTR_USEREXIT;
-	dp->source_job_number = my_jobno;
-	gp = dp->txt;
-	com_ptr->len = gp->global - (unsigned char *)com_ptr->text;
-	dcpc_send2agent();
-	/* Deal with LOCK rundowns */
-	com_ptr = NULL;
-	return;
-}
-
-int gvusr_data(void)
-{
-	ddp_hdr_t	*msg;
-	char		*cp, *cp_top;
-	int		msglen;
-	int		retval;
-	condition_code	status;
-	int		retry_count;
-
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_global_pointers(DDPTR_DEFINE);
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		/* Result can be at most two digits, each digit being the ASCII value of char '0' or '1' */
-		/* Possible valid results : "0", "1", "00", "01", "10", or "11" - without the quotes, quotes shown here only
-		 * to indicate that the result is a string */
-		for (retval = 0, cp = msg->txt, cp_top = cp + MIN(2, msglen); cp < cp_top; cp++)
-		{ /* only 2 digits for $D result */
-			retval *= 10;
-			if ('1' == *cp)
-				retval++;
-			else if ('0' != *cp)
-			{	/* Note: perhaps this should be retry */
-				send_msg(VARLSTCNT(8) ERR_GVDATAFAIL, 2, LEN_AND_LIT("DDP_FORMAT"), ERR_TEXT, 2, msglen, msg->txt);
-				rts_error(VARLSTCNT(8) ERR_GVDATAFAIL, 2, LEN_AND_LIT("DDP_FORMAT"), ERR_TEXT, 2, msglen, msg->txt);
-			}
-		}
-		return retval;
-	case DDPTR_ERRESPONSE:
-		rts_error(VARLSTCNT(4) ERR_GVDATAFAIL, 2, msglen, msg->txt);
-		return 0;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return 0;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return 0;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return 0;
-	default:
-		send_msg(VARLSTCNT(11) ERR_GVDATAFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(11) ERR_GVDATAFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		return 0;
-	}
-	return 0;
-}
-
-static int gvusr_o2(char trancode)
-{
-	ddp_hdr_t	*msg;
-	int		msglen;
-	mval		tv;
-	condition_code	status;
-	int		retry_count;
-
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_global_pointers(trancode);
-		if (0 == gv_currkey->prev)	/* Name level dollar orders are not supported */
-			rts_error(VARLSTCNT(6) ERR_UNIMPLOP, 0, ERR_TEXT, 2, LEN_AND_LIT("Name level $ORDER"));
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		tv.mvtype = MV_STR;
-		tv.str.addr = msg->txt;
-		tv.str.len = msglen;
-		memcpy(gv_altkey, gv_currkey, SIZEOF(*gv_currkey) + gv_currkey->prev);
-		gv_altkey->end = gv_altkey->prev;
-		gtm$mval2subsc(&tv, gv_altkey);
-		return (0 != msglen) ? 1 : 0;
-	case DDPTR_ERRESPONSE:
-		rts_error(VARLSTCNT(4) ERR_GVORDERFAIL, 2, msglen, msg->txt);
-		return 0;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return 0;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return 0;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return 0;
-	default:
-		send_msg(VARLSTCNT(11) ERR_GVORDERFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(11) ERR_GVORDERFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		return 0;
-	}
-	return 0;
-}
-
-int gvusr_order(void)
-{
-	return(gvusr_o2(DDPTR_ORDER));
-}
-
-int gvusr_query(mval *v)
-{
-	ddp_hdr_t	*msg;
-	int		msglen, retval;
-	condition_code	status;
-	int		retry_count;
-
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_global_pointers(DDPTR_QUERY);
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		if (0 != msglen)
-		{
-			v->mvtype = MV_STR;
-			v->str.len = msglen;
-			v->str.addr = msg->txt;
-			return 1;
-		}
-		return 0;
-	case DDPTR_ERRESPONSE:
-		if (0 != memcmp(msg->txt, "<UNDEF>", STR_LIT_LEN("<UNDEF>")))
-			rts_error(VARLSTCNT(4) ERR_GVQUERYFAIL, 2, msglen, msg->txt);
-		return 0;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return 0;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return 0;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return 0;
-	default:
-		send_msg(VARLSTCNT(11) ERR_GVQUERYFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(11) ERR_GVQUERYFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		return 0;
-	}
-	return 0;
-}
-
-int gvusr_zprevious(void)
-{
-	return(gvusr_o2(DDPTR_PREVIOUS));
-}
-
-int gvusr_get(mval *v)
-{
-	ddp_hdr_t	*msg;
-	int		msglen;
-	int		retval;
-	condition_code	status;
-	int		retry_count;
-
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_global_pointers(DDPTR_GET);
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		v->mvtype = MV_STR;
-		v->str.len = msglen;
-		v->str.addr = msg->txt;
-		return 1;
-	case DDPTR_ERRESPONSE:
-		if (0 != memcmp(msg->txt, "<UNDEF>", STR_LIT_LEN("<UNDEF>")))
-			rts_error(VARLSTCNT(4) ERR_GVGETFAIL, 2, msglen, msg->txt);
-		return 0;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return 0;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return 0;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return 0;
-	default:
-		send_msg(VARLSTCNT(11) ERR_GVGETFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(11) ERR_GVGETFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		return 0;
-	}
-	return 0;
-}
-
-void gvusr_kill(bool do_subtree)
-{
-	ddp_hdr_t	*msg;
-	int		msglen;
-	condition_code	status;
-	int		retry_count;
-
-	if (!do_subtree)
-		rts_error(VARLSTCNT(1) ERR_UNIMPLOP);
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_global_pointers(DDPTR_KILL);
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		assert(0 == msglen);
-		return;
-	case DDPTR_ERRESPONSE:
-		rts_error(VARLSTCNT(4) ERR_GVKILLFAIL, 2, msglen, msg->txt);
-		return;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return;
-	default:
-		send_msg(VARLSTCNT(11) ERR_GVKILLFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(11) ERR_GVKILLFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		return;
-	}
-	return;
-}
-
-void gvusr_put(mval *v)
-{
-	int		buff_remaining;
-	condition_code	status;
-	ddp_hdr_t	*msg;
-	int		msglen;
-	int		retry_count;
-
-	msg = com_ptr->text;
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_global_pointers(DDPTR_PUT);
-		buff_remaining = (unsigned char *)com_ptr + ddp_slot_size - bufptr;
-		assert(0 <= buff_remaining); /* we shouldn't have trashed someone else's slot */
-		if (v->str.len + 1 > buff_remaining) /* + 1 for the mysterious last byte that the protocol seems to want */
-			rts_error(VARLSTCNT(6) ERR_REC2BIG, 4, ((ddp_global_request_t *)(msg->txt))->global_len + v->str.len,
-				  ddp_slot_size - offsetof(com_slot_t, text[0]) - DDP_MSG_HDRLEN
-				  - offsetof(ddp_global_request_t, global[0]), REG_LEN_STR(gv_cur_region));
-		memcpy(bufptr, v->str.addr, v->str.len);
-		bufptr += v->str.len;
-	 	bufptr++;	/* Not sure why the extra byte is here, but the protocol seems to have it */
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		assert(0 == msglen);
-		return;
-	case DDPTR_ERRESPONSE:
-		rts_error(VARLSTCNT(4) ERR_GVPUTFAIL, 2, msglen, msg->txt);
-		return;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return;
-	default:
-		send_msg(VARLSTCNT(11) ERR_GVPUTFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(11) ERR_GVPUTFAIL, 2, LEN_AND_LIT("DDP_NET_FAIL"),
-			ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		return;
-	}
-	return;
-}
-
-static void setup_lock_message(char trancode, uint4 lock_len, unsigned char *lock_key, gd_region *creg)
-{
-	unsigned char	sub_len, *lock_top, *lptr, *lptr_top, sep, ch, *cptr, *buftop;
-	ddp_info	*reg_values;
-	ddp_hdr_t	*dp;
-	boolean_t	is_string, seen_dot, timed_out;
- 	int		tries;
-
-	sep = '(';
-	lock_top = lock_key + lock_len;
-	sub_len = *lock_key++;
-	reg_values = &FILE_INFO(creg)->file_id;
-	dp = (ddp_hdr_t *)com_ptr->text;
-	memset(dp, 0, SIZEOF(*dp));
-	dp->trancode = trancode;
-	dp->proto = DDP_PROTO_VERSION;
-	dp->source_job_number = my_jobno;
-	dp->remote_circuit_name = reg_values->volset;	/* Actually the volset name.  Translated by the agent */
-	dp->remote_job_number = 0;
-	dp->filler1 = 0;
-	dp->hdrlen = DDP_MSG_HDRLEN;
-	bufptr = dp->txt; /* beginning of the nref */
-	if ('^' == *lock_key)
-	{
-		*bufptr++ = *lock_key++;
-		sub_len--;
-	}
-	/* put a ["UCI","VOL"] in the buffer in front of the lock namespace */
-	cptr = DSM_EXTREF_PREFIX;
-	cptr++; /* go past the ^ */
-	memcpy(bufptr, cptr, STR_LIT_LEN(DSM_EXTREF_PREFIX) - 1); /* -1 bcoz ^ has already been accounted for */
-	bufptr += (STR_LIT_LEN(DSM_EXTREF_PREFIX) - 1);
-	bufptr = five_2_ascii(&reg_values->uci, bufptr);
-	memcpy(bufptr, DSM_UCI_VOL_SEPARATOR, STR_LIT_LEN(DSM_UCI_VOL_SEPARATOR));
-	bufptr += STR_LIT_LEN(DSM_UCI_VOL_SEPARATOR);
-	bufptr = five_2_ascii(&reg_values->volset, bufptr);
-	memcpy(bufptr, DSM_EXTREF_SUFFIX, STR_LIT_LEN(DSM_EXTREF_SUFFIX));
-	bufptr += STR_LIT_LEN(DSM_EXTREF_SUFFIX);
-	buftop = (unsigned char *)com_ptr + ddp_slot_size;
-	if (bufptr + sub_len + 2 >= buftop)
-		rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-	memcpy(bufptr, lock_key, sub_len);
-	bufptr += sub_len;
-	lock_key += sub_len;
-	if (lock_key < lock_top)
-	{
-		while (lock_key < lock_top)
-		{
-			*bufptr++ = sep;
-			sub_len = *lock_key++;
-			lptr = lock_key;
-			lptr_top = lptr + sub_len;
-			seen_dot = is_string = FALSE;
-			if (0 != sub_len && '-' == *lptr)
-				*lptr++;
-			for ( ; lptr < lptr_top; )
-			{
-				ch = *lptr++;
-				if ('.' == ch)
-				{
-					if (seen_dot)
-					{
-						is_string = TRUE;
-						break;
-					} else
-					{
-						seen_dot = TRUE;
-						continue;
-					}
-				}
-				if (!ISDIGIT(ch))
-				{
-					is_string = TRUE;
-					break;
-				}
-			}
-			if (is_string)
-			{
-				if (bufptr >= buftop)
-					rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-				*bufptr++ = '\"';
-			}
-			lptr = lock_key;
-			lptr_top = lptr + sub_len;
-			for ( ; lptr < lptr_top; )
-			{
-				if (bufptr >= buftop)
-					rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-				ch = *lptr++;
-				*bufptr++ = ch;
-				if ('\"' != ch)
-					continue;
-				else
-				{
-					if (bufptr >= buftop)
-						rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-					*bufptr++ = ch;		/* double the quotes to make a legal reference */
-				}
-			}
-			if (is_string)
-			{
-				if (bufptr >= buftop)
-					rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-				*bufptr++ = '\"';
-			}
-			lock_key += sub_len;
-			sep = ',';
-		}
-		if (bufptr >= buftop)
-			rts_error(VARLSTCNT(1) ERR_GVSUBOFLOW);
-		*bufptr++ = ')';
-	}
-	*bufptr++ = DDP_MSG_TERMINATOR;
-	return;
-}
-
-int gvusr_lock(uint4 lock_len, unsigned char *lock_key, gd_region *creg)
-{
-	ddp_hdr_t	*msg;
-	int		msglen;
-	int		retval;
-	condition_code	status;
-	int		retry_count;
-
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_lock_message(DDPTR_ZALLOC, lock_len, lock_key, creg);
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		assert(0 != msglen);
-		if ('S' == msg->txt[0])
-			return 0;	/* 0 is a successful lock */
-		assert('F' == msg->txt[0]);
-		return 1;
-	case DDPTR_ERRESPONSE:
-		rts_error(VARLSTCNT(1) ERR_NETLCKFAIL);
-		return 1;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return 1;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return 1;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return 1;
-	default:
-		send_msg(VARLSTCNT(9) ERR_NETLCKFAIL, 0, ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(9) ERR_NETLCKFAIL, 0, ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen,msg->txt);
-		return 1;
-	}
-	return 1;
-}
-
-void gvusr_unlock(uint4 lock_len, unsigned char *lock_key, gd_region *creg)
-{
-	ddp_hdr_t	*msg;
-	int		msglen;
-	condition_code	status;
-	int		retry_count;
-
-	for (retry_count = 0; ; retry_count++)
-	{
-		setup_lock_message(DDPTR_ZDEALLOC, lock_len, lock_key, creg);
-		status = send_to_agent();
-		if (0 != (status & 1))
-			break;
-		if (RETRYCNT <= retry_count)
-			rts_error(VARLSTCNT(1) status);
-	}
-	msg = com_ptr->text;
-	msglen = msg->message_length - msg->hdrlen - 1; /* -1 to strip the terminator byte */
-	if (0 > msglen)
-		msglen = 0;
-	switch(msg->trancode)
-	{
-	case DDPTR_RESPONSE:
-		assert(0 == msglen);
-		return;
-	case DDPTR_ERRESPONSE:
-		rts_error(VARLSTCNT(1) ERR_NETLCKFAIL);
-		return;
-	case DDPTRX_CONGESTION:
-		rts_error(VARLSTCNT(1) ERR_DDPCONGEST);
-		return;
-	case DDPTRX_SHUTDOWN:
-		rts_error(VARLSTCNT(1) ERR_DDPSHUTDOWN);
-		return;
-	case DDPTRX_NOCONNECT:
-		rts_error(VARLSTCNT(4) ERR_DDPNOCONNECT, 2, DB_LEN_STR(gv_cur_region));
-		return;
-	default:
-		send_msg(VARLSTCNT(9) ERR_NETLCKFAIL, 0, ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen, msg->txt);
-		rts_error(VARLSTCNT(9) ERR_NETLCKFAIL, 0, ERR_DDPBADRESPONSE, 1, (long)msg->trancode, ERR_TEXT, 2, msglen,msg->txt);
-		return;
-	}
-	return;
-}
diff --git a/sr_vvms/ddpkithlp.com b/sr_vvms/ddpkithlp.com
deleted file mode 100644
index 44c9213..0000000
--- a/sr_vvms/ddpkithlp.com
+++ /dev/null
@@ -1,157 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$ IF F$EXTRACT(0,5,P1) .EQS. "HELP_" THEN GOTO 'P1'
-$ EXIT VMI$_UNSUPPORTED
-$HELP_PURGE:
-$ TYPE SYS$INPUT
-
-  If GT.CM DDP is previously installed,  there  is  no  reason  to keep  older
-  versions of the software online, unless you wish to test before purging.
-
-$ EXIT
-$HELP_NDB_CNT:
-$ TYPE SYS$INPUT
-  The installation inserts this  value as  the  default  for  controlling  the
-  DDP Server quotas established in GTCMDDPSTART.COM.  If you  provide a  value
-  less than 1, the value will be set to  1.  This value can be easily  changed
-  later.
-
-$ EXIT
-$HELP_RC_CNT:
-$ TYPE SYS$INPUT
-  The installation  inserts  this  value as the  default for  controlling  the
-  DDP Server quotas established in GTCMDDPSTART.COM.  If you  provide a  value
-  less than 1, the value will be set to  1.  This value can be easily  changed
-  later.
-
-$ EXIT
-$HELP_SRV_UIC:
-$ TYPE SYS$INPUT
-  The DDP Server usually must have broad  file  access  so  running  under the
-  SYSTEM  UIC  may  make  sense.   The  recommended  alternative  is  to use a
-  distinguished UIC which has appropriate UIC or ACL based  access  to  served
-  files.
-
-$ EXIT
-$HELP_STD_CNF:
-$ TYPE SYS$INPUT
-  The standard configuration performs the following:
-
-   *  Places files in SYS$COMMON:[GTM_DIST] with SYSTEM as owner
-   *  Gives the DDP server a "UCI" of DDP, and a "VOLUME SET" of GTM
-   *  Gives the DDP server a global directory of GTM$DIST:DDP_SERVER.GLD
-   *  Creates a volume configuration file DDP_VOLCONF.LIS and copies it to GTM$DIST
-   *  Copies the GT.CM DDP command procedures to SYS$MANAGER
-   *  Adds GTCMDDPSTART.COM to the system startup database
-   *  Starts GT.CM DDP at the end of the installation
-
-  If the SYSTEM id is not set up, the installation will use [1,4].
-  If you answer YES, no more questions will be asked.
-
-$ EXIT
-$HELP_DST_OWN:
-$ TYPE SYS$INPUT
-  Provide a UIC, normally SYSTEM, to own the files in the  GT.M  distribution.
-  The UIC can be a name, a group name and a user name separated  by  a  comma,
-  or a pair of octal codes separated by a comma which specify group and user.
-
-$ EXIT
-$HELP_SYS_DST:
-$ TYPE SYS$INPUT
-  Usual practice is to place a system component  such  as  GT.CM  DDP  on  the
-  system disk.   If you have severe space constraints,  you may  need  to  use
-  another volume.
-
-$ EXIT
-$HELP_SYS_DIR:
-$ TYPE SYS$INPUT
-  This directory  becomes be a sub-directory of  SYS$COMMON  and   holds   the
-  distribution.   If it does not  exist,  the  installation  creates  it  with
-  WORLD=RE access.   If you  are  not  concerned  with  mixing  software  from
-  different vendors, you may wish to use SYSLIB.
-
-$ EXIT
-$HELP_DST_DEV:
-$ TYPE SYS$INPUT
-  The disk must be mounted, on-line and have adequate space to hold the  GT.CM
-  DDP distribution.  The disk name may be physical or logical.
-
-$ EXIT
-$HELP_DST_DIR:
-$ TYPE SYS$INPUT
-  This  directory  holds  the  distribution.    If  it  does  not  exist,  the
-  installation creates it with WORLD=RE access.
-
-$ EXIT
-$HELP_VOLCONF:
-$ TYPE SYS$INPUT
-  The GT.CM DDP Server requires one or more Global  Directories  in  order  to
-  find the appropriate database files.   Each Global Directory  is  associated
-  with a  "UCI"  "Volume-set"  pair  by  an entry  in the volume configuration
-  file  in the form  of
-
-  VOL	UCI	GlobalDirectory
-
-  where  VOL  and  UCI  are each  3  characters  long.  The name of the volume
-  configuration   file  is  parameter  P1  to  the  script   GTCMDDPSTART.COM.
-  The file you  specify now will be generated and used as the default if P1 is
-  not specified for GTCMDDPSTART. The installation  creates  the configuration
-  file with one entry using the  "Volume-Set",  "UCI",  "Global Directory" you
-  specify in response to the following questions.
-
-$ EXIT
-$HELP_VOL_NAME:
-$ TYPE SYS$INPUT
-  The GT.CM DDP Server requires one or more Global  Directories  in  order  to
-  find the appropriate database files.   Each Global Directory  is  associated
-  with a  "UCI"  "Volume-set"  pair  by  an entry  in the volume configuration
-  file.  Specify the   "Volume-set"  name  that  you  wish  to  enter  in  the
-  configuration file.
-
-$ EXIT
-$HELP_UCI_NAME:
-$ TYPE SYS$INPUT
-  The GT.CM DDP Server requires one or more Global  Directories  in  order  to
-  find the appropriate database files.   Each Global Directory  is  associated
-  with a  "UCI"  "Volume-set"  pair  by  an entry  in the volume configuration
-  file.  Specify  the  "UCI"  name  for  the "Volume-set" name  you  specified
-  before.
-
-$ EXIT
-$HELP_GBLDIR:
-$ TYPE SYS$INPUT
-  The GT.CM DDP Server requires one or more Global  Directories  in  order  to
-  find the appropriate database files.   Each Global Directory  is  associated
-  with a  "UCI"  "Volume-set"  pair  by  an entry  in the volume configuration
-  file.   Specify  the  "Global Directory"  file  name  for  the  "Volume-set"
-  "UCI" pair you  specified before.
-
-$ EXIT
-$HELP_STARTDB:
-$ TYPE SYS$INPUT
-  Answering yes causes the  installation  to  place  GTCMDDPSTART.COM  in  the
-  startup database so the system  startup  automatically  sets  up  the  GT.CM
-  DDP server whenever the system boots.
-
-$ EXIT
-$HELP_RUN_IVP:
-$ TYPE SYS$INPUT
-  This installation kit contains an installation verification procedure  (IVP)
-  which you can run as part of the installation to verify the  correctness  of
-  the software.   Note that if you choose this option, the  GT.M  images  must
-  already be  installed.
-
-$ EXIT
-$HELP_START_CM:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to start GT.CM DDP Server.
-
-$ EXIT
diff --git a/sr_vvms/ddpkitinstal.com b/sr_vvms/ddpkitinstal.com
deleted file mode 100644
index fd663d3..0000000
--- a/sr_vvms/ddpkitinstal.com
+++ /dev/null
@@ -1,557 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!	KITINSTAL.COM PROCEDURE FOR THE GT.CM DDP PRODUCT
-$!
-$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y
-$! ON WARNING THEN EXIT $STATUS		!! allow warning on install replace
-$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL
-$ IF P1 .EQS. "VMI$_POSTINSTALL" THEN GOTO POSTINSTALL
-$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP
-$ EXIT VMI$_UNSUPPORTED
-$!
-$INSTALL:
-$ TYPE SYS$INPUT
-
-  GT.CM DDP  (c)  COPYRIGHT 1988, 2002  by  Sanchez Computer Associates, Inc
-                           ALL RIGHTS RESERVED
-
-$!  the following 2 lines must be maintained
-$ GTCM$VMS_VERSION :== 072	! Minimum VMS version required
-$ GTCM$DISK_SPACE == 1600	! Minumum disk space on system disk required for install (2x result)
-$ IF F$ELEMENT(0,",",VMI$VMS_VERSION) .EQS. "RELEASED"
-$  THEN
-$   GTCM$VMS_IS == F$ELEMENT(1,",",VMI$VMS_VERSION)
-$   IF GTCM$VMS_IS .LTS. GTCM$VMS_VERSION
-$    THEN
-$     VMI$CALLBACK MESSAGE E VMSMISMATCH "This GT.CM DDP kit requires an existing VMS''GTCM$VMS_VERSION' system."
-$     EXIT VMI$_FAILURE
-$   ENDIF
-$  ELSE
-$   GTCM$VMS_IS :==
-$   WRITE SYS$OUTPUT "  No VMS version checking performed for field test versions."
-$ ENDIF
-$ IF (GTCM$VMS_IS .GES. "052") THEN T1 = F$VERIFY(VMI$KIT_DEBUG)
-$ VMI$CALLBACK CHECK_NET_UTILIZATION GTCM$ROOM 'GTCM$DISK_SPACE'
-$ IF .NOT. GTCM$ROOM
-$  THEN
-$   VMI$CALLBACK MESSAGE E NOSPACE "There is not enough disk space -- GT.CM DDP needs ''GTCM$DISK_SPACE' blocks."
-$   EXIT VMI$_FAILURE
-$ ENDIF
-$!  setup default answers
-$ GTCM$DOPURGE :== YES
-$ GTCM$RUN_IVP == 0	!! should be "YES", but no IVP yet
-$ GTCM$NDB_CNT == 12
-$ GTCM$RC_CNT == 16
-$ GTCM$STD_CNF :== YES
-$ GTCM$DST_OWN :== SYSTEM
-$ IF F$IDENTIFIER(GTCM$DST_OWN,"NAME_TO_NUMBER") .EQ. 0 THEN GTCM$DST_OWN :== 1,4
-$ GTCM$SRV_UIC :==
-$ GTCM$SYS_DST :== YES
-$ GTCM$DST_DIR :== GTM_DIST
-$ GTCM$DST_CRE == GTCM$DST_DIR
-$ GTCM$DST_DEV :==
-$ GTCM$STARTDB :== YES
-$ GTCM$UCI_NAME :== DDP
-$ GTCM$VOL_NAME :== GTM
-$ GTCM$VOLCONF == "DDP_VOLCONF.LIS"
-$ GTCM$START_SRV :== YES
-$!
-$ VMI$CALLBACK ASK GTCM$DOPURGE "Do you want to purge files replaced by this installation" 'GTCM$DOPURGE' B -
-  "@VMI$KWD:DDPKITHLP HELP_PURGE"
-$ IF .NOT. GTCM$DOPURGE THEN VMI$CALLBACK SET PURGE NO
-$ VMI$CALLBACK ASK GTCM$NDB_CNT "How many networked databases will this node serve" 'GTCM$NDB_CNT' I -
-  "@VMI$KWD:DDPKITHLP HELP_NDB_CNT"
-$ IF GTCM$NDB_CNT .LT. 1
-$  THEN
-$   GTCM$NDB_CNT == 1
-$   WRITE SYS$OUTPUT "  The installation set this value to 1 as 0 or negative values are not useful."
-$ ENDIF
-$ VMI$CALLBACK ASK GTCM$RC_CNT "How many client links will this node serve" 'GTCM$RC_CNT' I -
-  "@VMI$KWD:DDPKITHLP HELP_RC_CNT"
-$ IF GTCM$RC_CNT .LT. 1
-$  THEN
-$   GTCM$RC_CNT == 1
-$   WRITE SYS$OUTPUT "  The installation set this value to 1 as 0 or negative values are not useful."
-$ ENDIF
-$ VMI$CALLBACK ASK GTCM$SRV_UIC "Under what UIC should the Server operate" "''GTCM$SRV_UIC'" S -
-  "@VMI$KWD:DDPKITHLP HELP_SRV_UIC"
-$ GTCM$SRV_UIC == GTCM$SRV_UIC - "[" - "]"
-$ IF GTCM$SRV_UIC - "," .NES. GTCM$SRV_UIC THEN GTCM$SRV_UIC :== ['GTCM$SRV_UIC']
-$ VMI$CALLBACK ASK GTCM$STD_CNF "Do you want the standard GT.CM DDP configuration" 'GTCM$STD_CNF' B -
-  "@VMI$KWD:DDPKITHLP HELP_STD_CNF"
-$ IF GTCM$STD_CNF
-$  THEN
-$   GTCM$SYS_DST == 1
-$   GTCM$STARTDB == 1
-$   GTCM$START_CM == 1
-$   GTCM$DST_LOG :== SYS$COMMON:['GTCM$DST_DIR']
-$   GTCM$DIR_TYPE :== COMMON
-$   GTCM$GBLDIR == "DDP_SERVER.GLD"
-$   GTCM$RUN_IVP == 0	!! no IVP yet
-$  ELSE ! not standard configuration
-$   VMI$CALLBACK ASK GTCM$DST_OWN "What UIC should own the GT.CM DDP distribution" 'GTCM$DST_OWN' S -
-$   "@VMI$KWD:DDPKITHLP HELP_DST_OWN"
-$   GTCM$DST_OWN == GTCM$DST_OWN - "[" - "]"
-$   VMI$CALLBACK ASK GTCM$SYS_DST "Do you want the GT.CM DDP distribution to go into a System Directory" 'GTCM$SYS_DST' B -
-    "@VMI$KWD:DDPKITHLP HELP_SYS_DST"
-$   IF GTCM$SYS_DST
-$    THEN
-$     VMI$CALLBACK ASK GTCM$DST_DIR "In what System Directory do you want to place GT.CM DDP" 'GTCM$DST_DIR' S -
-      "@VMI$KWD:DDPKITHLP HELP_SYS_DIR"
-$     GTCM$DST_DIR == GTCM$DST_DIR - "[" - "]"
-$     GTCM$DST_CRE == GTCM$DST_DIR
-$     GTCM$DST_LOG :== SYS$COMMON:['GTCM$DST_DIR']
-$     GTCM$DIR_TYPE :== COMMON
-$    ELSE ! not system disk
-$     VMI$CALLBACK ASK GTCM$DST_DEV "On which device do you want to place GT.CM DDP" "''GTCM$DST_DEV'" S -
-      "@VMI$KWD:DDPKITHLP HELP_DST_DEV"
-$     VMI$CALLBACK ASK GTCM$DST_DIR "In what directory on that device do you want to place GT.CM DDP" 'GTCM$DST_DIR' S -
-      "@VMI$KWD:DDPKITHLP HELP_DST_DIR"
-$     GTCM$DST_DEV == GTCM$DST_DEV - ":"
-$     GTCM$DST_DIR == GTCM$DST_DIR - "[" - "]"
-$     GTCM$DST_LOG :== 'GTCM$DST_DEV':['GTCM$DST_DIR']
-$     GTCM$DST_CRE == GTCM$DST_LOG
-$     GTCM$DIR_TYPE :== USER
-$   ENDIF ! system disk
-$   GTCM$GBLDIR == "DDP_SERVER.GLD"
-$   VMI$CALLBACK ASK GTCM$VOLCONF "What file do you want as volume-set configuration file for the DDP Server" 'GTCM$VOLCONF' S -
-    "@VMI$KWD:DDPKITHLP HELP_VOLCONF"
-$   VMI$CALLBACK ASK GTCM$VOL_NAME "What ""VOLSET"" do you want to assign to the GT.CM DDP Server" 'GTCM$VOL_NAME' S -
-    "@VMI$KWD:DDPKITHLP HELP_VOL_NAME"
-$   VMI$CALLBACK ASK GTCM$UCI_NAME "What ""UCI"" do you want to assign to the GT.CM DDP Server" 'GTCM$UCI_NAME' S -
-    "@VMI$KWD:DDPKITHLP HELP_UCI_NAME"
-$   VMI$CALLBACK ASK GTCM$GBLDIR "What file do you want as the global directory for the GT.CM DDP Server" 'GTCM$GBLDIR' S -
-    "@VMI$KWD:DDPKITHLP HELP_GBLDIR"
-$   VMI$CALLBACK ASK GTCM$STARTDB "Do you want GTCMDDPSTART.COM in the startup database" 'GTCM$STARTDB' B -
-    "@VMI$KWD:DDPKITHLP HELP_STARTDB"
-$!! no IVP yet
-$   IF 0 THEN VMI$CALLBACK ASK GTCM$RUN_IVP "Do you want to run the IVP (requires GT.M)" 'GTCM$RUN_IVP' B -
-    "@VMI$KWD:DDPKITHLP HELP_RUN_IVP"
-$   IF GTCM$RUN_IVP
-$    THEN
-$     GTCM$START_CCP == 1
-$    ELSE
-$     VMI$CALLBACK ASK GTCM$START_CM "Do you want to start GT.CM DDP now" 'GTCM$START_SRV' B "@VMI$KWD:DDPKITHLP HELP_START_CM"
-$   ENDIF
-$ ENDIF ! standard configuration
-$ TYPE SYS$INPUT
-
-  The following files are created and copied to appropriate destination
-
-        GTCMDDPSTART.COM copied to SYS$MANAGER:
-        GTCMDDPSTOP.COM  copied to SYS$MANAGER:
-$ WRITE SYS$OUTPUT "        ''GTCM$VOLCONF' copied to ''GTCM$DST_LOG'"
-$ TYPE SYS$INPUT
-
-  Each file contains its own user documentation.
-
-  All the questions have been asked. Installation now proceeds without your
-  manual intervention for about 5-10 minutes.
-$ IF GTCM$RUN_IVP THEN WRITE SYS$OUTPUT "  Finally the installation verification procedure tests the installation."
-$ WRITE SYS$OUTPUT ""
-$ VMI$CALLBACK CREATE_DIRECTORY 'GTCM$DIR_TYPE' 'GTCM$DST_CRE' "/OWNER_UIC=[''GTCM$DST_OWN'] /PROTECTION=(WO:RE)"
-$ VMI$CALLBACK MESSAGE I CRECOM "Creating command files."
-$!  Create GTCMDDPSTART.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMDDPSTART.COM
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!								!"
-$ WRITE OUFILE "$!	Copyright 1988, 2003 Sanchez Computer Associates, Inc.	!"
-$ WRITE OUFILE "$!								!"
-$ WRITE OUFILE "$!	This source code contains the intellectual property	!"
-$ WRITE OUFILE "$!	of its copyright holder(s), and is made available	!"
-$ WRITE OUFILE "$!	under a license.  If you do not know the terms of	!"
-$ WRITE OUFILE "$!	the license, please stop and do not read further.	!"
-$ WRITE OUFILE "$!								!"
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! The invoking user requires the following privileges:"
-$ WRITE OUFILE "$! CMKRNL, DETATCH, OPER, NETMBX, PSWAPM, SYSNAM, SYSGBL and TMPMBX."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! The parameters are:"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P1 = VOLSET_CONFIGURATION_FILE"
-$ WRITE OUFILE "$!		if not specified, or specifed as """", defaults to"
-$ WRITE OUFILE "$!		what is specified during the installation. For"
-$ WRITE OUFILE "$!		standard installation, GT.CM sets the default to"
-$ WRITE OUFILE "$!		GTM$DIST:DDP_VOLCONF.LIS"
-$ WRITE OUFILE "$!	P2 = CIRCUIT_NAME"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to"
-$ WRITE OUFILE "$!		NOD, where NOD is the first three characters of the"
-$ WRITE OUFILE "$!		node name"
-$ WRITE OUFILE "$!	Note, only the first three characters of CIRCUIT_NAME"
-$ WRITE OUFILE "$! 	are used. If the specification is less than 3 characters in length,"
-$ WRITE OUFILE "$!	the specification is suffixed with the appropriate number of"
-$ WRITE OUFILE "$!	_ (underbar) characters."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P3 = ETHERNET_DEVICE"
-$ WRITE OUFILE "$!		no default"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P4 = GROUPS (comma separated group numbers 0-15)"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to 0"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P5 = comma separated list of GT.CM DDP tunable parameters"
-$ WRITE OUFILE "$!	Note, the delimiter is comma alone and not comma-space."
-$ WRITE OUFILE "$!	To omit specifying a parameter, specify the empty string """", or omit"
-$ WRITE OUFILE "$!	everything (including double-quotes) in the appropriate"
-$ WRITE OUFILE "$!	comma-delimited position"
-$ WRITE OUFILE "$!	P5 = P5A,P5B,P5C"
-$ WRITE OUFILE "$!	where"
-$ WRITE OUFILE "$!	P5A = MAX RECORD SIZE"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to MINRECSIZE"
-$ WRITE OUFILE "$!		MINRECSIZE is 1024 bytes"
-$ WRITE OUFILE "$!		GT.CM rounds up (MAX RECORD SIZE + 39) to the nearest 512 byte"
-$ WRITE OUFILE "$!		value and uses that for outbound/incoming buffer space. 39"
-$ WRITE OUFILE "$!		is the overhead needed by GT.CM and the DDP protocol."
-$ WRITE OUFILE "$!		Considering that ethernet messages cannot exceed 1500 bytes"
-$ WRITE OUFILE "$!		and that the DDP protocol doesn't appear to support message"
-$ WRITE OUFILE "$!		fragmenting, the value MINRECSIZE is sufficient to support all"
-$ WRITE OUFILE "$!		database operations (buffer space is 1536 for record size 1024)."
-$ WRITE OUFILE "$!		If we account for the overhead for a database request and"
-$ WRITE OUFILE "$!		response, the maximum outbound request size (SET operation)"
-$ WRITE OUFILE "$!		is 1478, and the maximum incoming result size is 1484."
-$ WRITE OUFILE "$!		Keep this in mind while loading data into files that are"
-$ WRITE OUFILE "$!		served DDP servers. Note, GT.CM imposes a limit of 255 for the"
-$ WRITE OUFILE "$!		key length (maximum combined length of subscripts) and so"
-$ WRITE OUFILE "$!		does the DDP protocol. In some cases, although GT.CM's format"
-$ WRITE OUFILE "$!		for keys is shorter than this maximum, the format required"
-$ WRITE OUFILE "$!		by DDP might be longer and hence might cause"
-$ WRITE OUFILE "$!		GVSUBOFLOW/REC2BIG errors"
-$ WRITE OUFILE "$!	P5B = ETHERNET RECEIVE BUFFER COUNT"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to 64."
-$ WRITE OUFILE "$!		GT.CM pre-allocates this many Ethernet Receive Buffers."
-$ WRITE OUFILE "$!	P5C = MAXIMUM REQUEST CREDITS"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to 4."
-$ WRITE OUFILE "$!		GT.CM sends this value for the request credits in the protocol"
-$ WRITE OUFILE "$!		handshake exchange (WI, II announce) messages.  This value"
-$ WRITE OUFILE "$!		is used for flow control between client and server nodes."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! The name of the server will be"
-$ WRITE OUFILE "$!	GTMDDP_SERV_<CIRCUIT_NAME>"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! Following logicals are defined in the system table by the startup script"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!      <Process-name-of-server> = <CIRCUIT_NAME>"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	DDPGVUSR = GTM$DIST:DDPGVUSR.EXE"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMDDP_VOLCONF_<CIRCUIT_NAME> = P1"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	If P3 is specifed and not """","
-$ WRITE OUFILE "$!		GTMDDP_CONTROLLER_<CIRCUIT_NAME> = <ETHERNET_DEVICE>"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	If P3 is not specified (or specifed as """"), or the DDP server fails to"
-$ WRITE OUFILE "$!	open the specified <ETHERNET_DEVICE>, then the server attempts to open"
-$ WRITE OUFILE "$!	the following devices in the order specified, and uses the first device"
-$ WRITE OUFILE "$!	successfully opened."
-$ WRITE OUFILE "$!		ECA0, ESA0, ETA0, EWA0, EXA0, EZA0, XEA0, XQA0"
-$ WRITE OUFILE "$!	If the server fails to open all devices, it exits with an error."
-$ WRITE OUFILE "$!	One can use SHOW PROC/ID=<DDP Server PID> to find the ethernet device"
-$ WRITE OUFILE "$!	being used by the DDP server."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!      GTMDDP_GROUPS_<CIRCUIT_NAME> = P4"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMDDP_MAXRECSIZE_<CIRCUIT_NAME> = P5A"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMDDP_ETHRCVBUFCNT_<CIRCUIT_NAME> = P5B"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMDDP_MAXREQCREDITS_<CIRCUIT_NAME> = P5C"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! In the below discussion, the units for quotas and limits are as per VMS"
-$ WRITE OUFILE "$! documentation."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! P6 = comma seprated list of process quotas for the DDP server"
-$ WRITE OUFILE "$! Note, the delimiter is comma alone and not comma-space."
-$ WRITE OUFILE "$! To omit specifying a quota, specify the empty string """", or omit"
-$ WRITE OUFILE "$! everything (including double-quotes) in the appropriate"
-$ WRITE OUFILE "$! comma-delimited position"
-$ WRITE OUFILE "$! P6 = P6A,P6B,P6C,P6D,P6E"
-$ WRITE OUFILE "$! where"
-$ WRITE OUFILE "$!	P6A is the maximum number of database files served to the network."
-$ WRITE OUFILE "$!		if not specifed, or specified as """", defaults to value"
-$ WRITE OUFILE "$!		specified during installation. For standard installation,"
-$ WRITE OUFILE "$!		GT.CM sets the default to 12."
-$ WRITE OUFILE "$!		This parameter is used to compute the following parameters"
-$ WRITE OUFILE "$!		for the server"
-$ WRITE OUFILE "$!		AST_LIMIT, ENQUEUE_LIMIT, FILE_LIMIT, IO_DIRECT, QUEUE_LIMIT,"
-$ WRITE OUFILE "$!		PAGE_FILE "
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P6B is the maximum number of remote clients served."
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to value"
-$ WRITE OUFILE "$!		specified during installation. For standard installation,"
-$ WRITE OUFILE "$!		GT.CM sets the default to 16."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P6C is the default working set size"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to"
-$ WRITE OUFILE "$!		FILE_LIMIT * 200 (see how FILE_LIMIT is computed below)"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P6D is the priority and should be at an appropriate priority"
-$ WRITE OUFILE "$!	 	to balance network response with local load"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to 5"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	P6E is the byte limit and should be greater than or equal to 30000"
-$ WRITE OUFILE "$!		if not specified, or specified as """", defaults to 30000"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! The server is run with UIC specified during installation. For standard"
-$ WRITE OUFILE "$! installation, GT.CM sets the UIC to [1,4]"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! Server errors are logged to SYS$MANAGER:DDP_CME.LOG"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! The server has DUMP enabled, and is run with option to inhibit SWAPPING while"
-$ WRITE OUFILE "$! in wait state."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! Based on GT.CM requirements, each quota or limit is computed as"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$! AST_LIMIT = (P6A + 1) * 3 + P6B"
-$ WRITE OUFILE "$! ENQUEUE_LIMIT = (P6A + 1) * 3"
-$ WRITE OUFILE "$! FILE_LIMIT = P6A + P6B + 3"
-$ WRITE OUFILE "$! IO_BUFFERED = (P6B + 3) * 1024"
-$ WRITE OUFILE "$! IO_DIRECT = P6A * 7"
-$ WRITE OUFILE "$! QUEUE_LIMIT = (P6A + 1) * 2"
-$ WRITE OUFILE "$! PRIORITY = P6D"
-$ WRITE OUFILE "$! WORKING_SET = P6C"
-$ WRITE OUFILE "$! MAXIMUM_WORKING_SET = WORKING_SET + 200 "
-$ WRITE OUFILE "$! BUFFER_LIMIT = P6E"
-$ WRITE OUFILE "$! PAGE_FILE = P6A * 10000"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""TMPMBX"")"
-$ WRITE OUFILE "$ ON CONTROL_C THEN GOTO ERROR"
-$ WRITE OUFILE "$ ON ERROR THEN GOTO ERROR"
-$ WRITE OUFILE "$ CURPRV=F$SETPRV(""CMKRNL,DETACH,NETMBX,OPER,PSWAPM,SYSNAM,SYSGBL,TMPMBX"")+"",""+CURPRV"
-$ WRITE OUFILE "$ IF F$PRIVILEGE(""CMKRNL,DETACH,NETMBX,OPER,PSWAPM,SYSNAM,SYSGBL,TMPMBX"")"
-$ WRITE OUFILE "$  THEN"
-$ WRITE OUFILE "$   DEFINE /SYSTEM DDPGVUSR GTM$DIST:DDPGVUSR.EXE"
-$ WRITE OUFILE "$   NODE = F$GETSYI(""SCSNODE"")"
-$ WRITE OUFILE "$   NOD = F$EDIT(F$EXTRACT(0,3,NODE),""TRIM"")"
-$ WRITE OUFILE "$   IF F$LENGTH(NOD) .LT. 3 THEN NOD = NOD + F$EXTRACT(0,3-F$LENGTH(NOD),""___"")"
-$ WRITE OUFILE "$   P2 = F$EDIT(P2,""COLLAPSE"")"
-$ WRITE OUFILE "$   IF P2 .EQS. """""
-$ WRITE OUFILE "$    THEN"
-$ WRITE OUFILE "$     P2 = NOD"
-$ WRITE OUFILE "$    ELSE"
-$ WRITE OUFILE "$     P2 = F$EDIT(F$EXTRACT(0,3,P2),""TRIM"")"
-$ WRITE OUFILE "$     IF F$LENGTH(P2) .LT. 3 THEN P2 = P2 + F$EXTRACT(0,3-F$LENGTH(P2),""___"")"
-$ WRITE OUFILE "$   ENDIF"
-$ WRITE OUFILE "$   P1 = F$EDIT(P1,""COLLAPSE"")"
-$ WRITE OUFILE "$   IF P1 .EQS. """" THEN P1 = ""GTM$DIST:''GTCM$VOLCONF'"""
-$ WRITE OUFILE "$   DEFINE /SYSTEM GTMDDP_VOLCONF_'P2' 'P1'"
-$ WRITE OUFILE "$   IF P3 .NES. """""
-$ WRITE OUFILE "$    THEN"
-$ WRITE OUFILE "$     DEFINE /SYSTEM GTMDDP_CONTROLLER_'P2' 'P3'"
-$ WRITE OUFILE "$    ELSE"
-$ WRITE OUFILE "$     IF F$TRNLNM(""GTMDDP_CONTROLLER_'","'P2'"",""LNM$SYSTEM_TABLE"") .NES. """""
-$ WRITE OUFILE "$      THEN"
-$ WRITE OUFILE "$       DEASSIGN /SYSTEM GTMDDP_CONTROLLER_'P2'"
-$ WRITE OUFILE "$     ENDIF"
-$ WRITE OUFILE "$   ENDIF"
-$ WRITE OUFILE "$   IF P4 .EQS. """" THEN P4 = ""0"""
-$ WRITE OUFILE "$   DEFINE /SYSTEM GTMDDP_GROUPS_'P2' ""'","'P4'"""
-$ WRITE OUFILE "$   P5A = F$ELEMENT(0,"","",P5)"
-$ WRITE OUFILE "$   IF P5A .EQS. "," THEN P5A :="
-$ WRITE OUFILE "$   P5B = F$ELEMENT(1,"","",P5)"
-$ WRITE OUFILE "$   IF P5B .EQS. "," THEN P5B :="
-$ WRITE OUFILE "$   P5C = F$ELEMENT(2,"","",P5)"
-$ WRITE OUFILE "$   IF P5C .EQS. "," THEN P5C :="
-$ WRITE OUFILE "$   MINRECSIZE = 1024"
-$ WRITE OUFILE "$   IF P5A .LT. MINRECSIZE THEN P5A = MINRECSIZE"
-$ WRITE OUFILE "$   DEFINE /SYSTEM GTMDDP_MAXRECSIZE_'P2' 'P5A'"
-$ WRITE OUFILE "$   IF P5B .NES. """""
-$ WRITE OUFILE "$    THEN"
-$ WRITE OUFILE "$     DEFINE /SYSTEM GTMDDP_ETHRCVBUFCNT_'P2' 'P5B'"
-$ WRITE OUFILE "$    ELSE"
-$ WRITE OUFILE "$     IF F$TRNLNM(""GTMDDP_ETHRCVBUFCNT_'","'P2'"",""LNM$SYSTEM_TABLE"") .NES. """""
-$ WRITE OUFILE "$      THEN"
-$ WRITE OUFILE "$       DEASSIGN /SYSTEM GTMDDP_ETHRCVBUFCNT_'P2'"
-$ WRITE OUFILE "$     ENDIF"
-$ WRITE OUFILE "$   ENDIF"
-$ WRITE OUFILE "$   IF P5C .NES. """""
-$ WRITE OUFILE "$    THEN"
-$ WRITE OUFILE "$     DEFINE /SYSTEM GTMDDP_MAXREQCREDITS_'P2' 'P5C'"
-$ WRITE OUFILE "$    ELSE"
-$ WRITE OUFILE "$     IF F$TRNLNM(""GTMDDP_MAXREQCREDITS_'","'P2'"",""LNM$SYSTEM_TABLE"") .NES. """""
-$ WRITE OUFILE "$      THEN"
-$ WRITE OUFILE "$       DEASSIGN /SYSTEM GTMDDP_MAXREQCREDITS_'P2'"
-$ WRITE OUFILE "$     ENDIF"
-$ WRITE OUFILE "$   ENDIF"
-$ WRITE OUFILE "$   PROCNAME := GTMDDP_SERV_'P2'"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""Starting the GT.CM DDP Server as process "",PROCNAME"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!  Note, all logicals are keyed by the <CIRCUIT_NAME>, but to pass the"
-$ WRITE OUFILE "$!  the circuit name to the server, we use a logical <server-process-name>,"
-$ WRITE OUFILE "$!  the value of which will be set to the CIRCUIT_NAME by this script."
-$ WRITE OUFILE "$!  Server will find its circuit name by translating the logical"
-$ WRITE OUFILE "$!  <server-process-name>"
-$ WRITE OUFILE "$   DEFINE /SYSTEM 'PROCNAME' 'P2'"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$   P6A = F$ELEMENT(0,"","",P6)"
-$ WRITE OUFILE "$   IF P6A .EQS. "","" then P6A :="
-$ WRITE OUFILE "$   P6B = F$ELEMENT(1,"","",P6)"
-$ WRITE OUFILE "$   IF P6B .EQS. "","" THEN P6B :="
-$ WRITE OUFILE "$   P6C = F$ELEMENT(2,"","",P6)"
-$ WRITE OUFILE "$   IF P6C .EQS. "","" THEN P6C :="
-$ WRITE OUFILE "$   P6D = F$ELEMENT(3,"","",P6)"
-$ WRITE OUFILE "$   IF P6D .EQS. "","" THEN P6D :="
-$ WRITE OUFILE "$   P6E = F$ELEMENT(4,"","",P6)"
-$ WRITE OUFILE "$   IF P6E .EQS. "","" THEN P6E :="
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$   IF P6A .EQS. """" THEN P6A = ''GTCM$NDB_CNT'"
-$ WRITE OUFILE "$   IF P6B .EQS. """" THEN P6B = ''GTCM$RC_CNT'"
-$ WRITE OUFILE "$   AL = ((P6A + 1) * 3) + P6B"
-$ WRITE OUFILE "$   BL = (P6B + 3) * 1024"
-$ WRITE OUFILE "$   EL = (P6A + 1) * 3"
-$ WRITE OUFILE "$   FL = P6A + 3 + PP7"
-$ WRITE OUFILE "$   DL = P6A * 7"
-$ WRITE OUFILE "$   TQ  = (P6A + 1) * 2"
-$ WRITE OUFILE "$   IF P6C .EQS. """" THEN P6C = FL * 200"
-$ WRITE OUFILE "$   WSE = P6C + 200"
-$ WRITE OUFILE "$   IF P6D .EQS. """" THEN P6D = 5"
-$ WRITE OUFILE "$   IF P6E .EQS. """" THEN P6E = 30000"
-$ WRITE OUFILE "$   PF = P6A * 10000"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$   RUN /DETACHED /PROCESS='PROCNAME' /PRIV=(SYSNAM) -"
-$ WRITE OUFILE "        /ERROR=SYS$MANAGER:DDP_CME.LOG -"
-$ WRITE OUFILE "        /DUMP /NOSWAPPING /UIC=''GTCM$SRV_UIC' /AST_LIMIT='AL' /ENQUEUE_LIMIT='EL' -"
-$ WRITE OUFILE "        /FILE_LIMIT='FL' /IO_BUFFERED='BL' /IO_DIRECT='DL' /QUEUE_LIMIT='TQ' -"
-$ WRITE OUFILE "        /PRIORITY='P6D' /WORKING_SET='P6C' /MAXIMUM_WORKING_SET='WSE' -"
-$ WRITE OUFILE "        /BUFFER_LIMIT='P6E' /PAGE_FILE='PF' GTM$DIST:DDPSERVER"
-$ WRITE OUFILE "$  ELSE"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""NOT starting GT.CM DDP Server because of inadequate privileges"""
-$ WRITE OUFILE "$ ENDIF"
-$ WRITE OUFILE "$ERROR:"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(CURPRV)"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTCMDDPSTOP.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMDDPSTOP.COM
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!								!"
-$ WRITE OUFILE "$!	Copyright 1988, 2003 Sanchez Computer Associates, Inc.	!"
-$ WRITE OUFILE "$!								!"
-$ WRITE OUFILE "$!	This source code contains the intellectual property	!"
-$ WRITE OUFILE "$!	of its copyright holder(s), and is made available	!"
-$ WRITE OUFILE "$!	under a license.  If you do not know the terms of	!"
-$ WRITE OUFILE "$!	the license, please stop and do not read further.	!"
-$ WRITE OUFILE "$!								!"
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTCMDDPSTOP.COM stops the GT.CM DDP Server for a node."
-$ WRITE OUFILE "$!	Place an invocation or copy of this procedure in the site specific"
-$ WRITE OUFILE "$!	 shutdown: SYS$MANAGER:SYSHUTDWN to ensure all GT.M databases are"
-$ WRITE OUFILE "$!	 properly closed before VMS terminates.  GTCMDDPSTOP should precede"
-$ WRITE OUFILE "$!	 GTCXSTOP, if used, and GTMSTOP, in any case."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ STOPIMAGE := $GTM$DIST:GTCMDDPSTOP.EXE"
-$ WRITE OUFILE "$ STOPIMAGE DDPSERVER"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$! Create the volume configuration file
-$ OPEN /WRITE OUFILE VMI$KWD:'GTCM$VOLCONF'
-$ WRITE OUFILE "#################################################################"
-$ WRITE OUFILE "#								#"
-$ WRITE OUFILE "#	Copyright 2002, 2003 Sanchez Computer Associates, Inc.	#"
-$ WRITE OUFILE "#								#"
-$ WRITE OUFILE "#	This source code contains the intellectual property	#"
-$ WRITE OUFILE "#	of its copyright holder(s), and is made available	#"
-$ WRITE OUFILE "#	under a license.  If you do not know the terms of	#"
-$ WRITE OUFILE "#	the license, please stop and do not read further.	#"
-$ WRITE OUFILE "#								#"
-$ WRITE OUFILE "#################################################################"
-$ WRITE OUFILE ""
-$ WRITE OUFILE "# The first argument to the GT.M DDP startup script (GTCMDDPSTART.COM)"
-$ WRITE OUFILE "# is the name of the configuration file listing the VOLUMEs and UCIs"
-$ WRITE OUFILE "# that the server serves. If the first argument is not specified,"
-$ WRITE OUFILE "# this file is used."
-$ WRITE OUFILE ""
-$ WRITE OUFILE "# Empty lines and those beginning with # are ignored by the server."
-$ WRITE OUFILE ""
-$ WRITE OUFILE "# One VOLUME, UCI, GLD triple can be specified on a line as"
-$ WRITE OUFILE "# VOL	UCI	GLD"
-$ WRITE OUFILE "# VOL and UCI must be three characters long and consist of only"
-$ WRITE OUFILE "# uppercase letters."
-$ WRITE OUFILE ""
-$ WRITE OUFILE "# There can be any number of white space characters between the VOLUME"
-$ WRITE OUFILE "# and UCI, and UCI and GLD. All characters after the first white space"
-$ WRITE OUFILE "# after GLD are ignored."
-$ WRITE OUFILE ""
-$ WRITE OUFILE "# There must be at least one valid entry for the server to start"
-$ WRITE OUFILE "# succesfully. No more than 16 entries are accepted by the server."
-$ WRITE OUFILE "# If multiple entries exist for the same VOLUME, UCI pair, the last"
-$ WRITE OUFILE "# entry is accepted and all previous entries are ignored."
-$ WRITE OUFILE ""
-$ WRITE OUFILE "''GTCM$VOL_NAME'	''GTCM$UCI_NAME'	GTM$DIST:''GTCM$GBLDIR'"
-$ CLOSE OUFILE
-$!
-$ VMI$CALLBACK MESSAGE I PREINS "Preparing files for installation."
-$!  GTCMFILES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMFILES.KIT
-$ WRITE OUFILE "GTCM$ GTCMDDPSTART.COM VMI$ROOT:[SYSMGR] C"
-$ WRITE OUFILE "GTCM$ GTCMDDPSTOP.COM VMI$ROOT:[SYSMGR] C"
-$ WRITE OUFILE "GTCM$ GTCMDDPSTART.COM ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCMDDPSTOP.COM ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ ''GTCM$VOLCONF' ''GTCM$DST_LOG'"
-$ CLOSE OUFILE
-$!  GTCMIMAGES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMIMAGES.KIT
-$ WRITE OUFILE "GTCM$ DDPGVUSR.EXE ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ DDPSERVER.EXE ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCMDDPSTOP.EXE ''GTCM$DST_LOG'"
-$ CLOSE OUFILE
-$!  Provide the command procedures and configuration file(s)
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTCMFILES.KIT "" T
-$!  Make sure the owner is who the installer asked for
-$ VMI$CALLBACK SECURE_FILE 'GTCM$DST_LOG'GTCMDDPSTART.COM ['GTCM$DST_OWN']
-$ VMI$CALLBACK SECURE_FILE 'GTCM$DST_LOG'GTCMDDPSTOP.COM ['GTCM$DST_OWN']
-$ VMI$CALLBACK SECURE_FILE 'GTCM$DST_LOG''GTCM$VOLCONF' ['GTCM$DST_OWN']
-$!
-$!  Provide the images
-$ VMI$CALLBACK PROVIDE_IMAGE "" VMI$KWD:GTCMIMAGES.KIT "" T
-$!  Make sure the owner is who the installer asked for
-$ VMI$CALLBACK SECURE_FILE 'GTCM$DST_LOG'DDPGVUSR.EXE ['GTCM$DST_OWN']
-$ VMI$CALLBACK SECURE_FILE 'GTCM$DST_LOG'DDPSERVER.EXE ['GTCM$DST_OWN']
-$ VMI$CALLBACK SECURE_FILE 'GTCM$DST_LOG'GTCMDDPSTOP.EXE ['GTCM$DST_OWN']
-$!
-$ VMI$CALLBACK MESSAGE I FININS "Finalizing the installation."
-$ IF GTCM$START_CM THEN VMI$CALLBACK SET POSTINSTALL YES
-$ IF GTCM$RUN_IVP THEN VMI$CALLBACK SET IVP YES
-$ IF GTCM$STARTDB THEN VMI$CALLBACK MODIFY_STARTUP_DB ADD GTCMDDPSTART.COM END
-$ EXIT VMI$_SUCCESS
-$!
-$POSTINSTALL:
-$!
-$ @'GTCM$DST_LOG'GTMLOGIN
-$ SET NOON
-$ DEFINE /USER_MODE SYS$ERROR NL:
-$ DEFINE /USER_MODE SYS$OUTPUT NL:
-$ IF GTCM$MGR_COM
-$  THEN
-$   T1 := SYS$MANAGER:
-$  ELSE
-$   T1 = GTCM$DST_LOG
-$ ENDIF
-$ @'T1'GTCMDDPSTOP
-$ SET ON
-$ @'T1'GTCMDDPSTART
-$ EXIT VMI$_SUCCESS
-$!
-$IVP:
-$!	The real Installation Verification Procedure.
-$ TYPE SYS$INPUT
-
-  GT.CM DDP Installation Verification Procedure
-
-$!  Extract the IVP .COM file from the text library.
-$ LIBRARIAN /EXTRACT=GTCMDDP$IVP /OUTPUT=GTCMDDP$IVP.COM GTCMDDP$IVP.TLB
-$ @GTCMDDP$IVP
-$ EXIT $STATUS
diff --git a/sr_vvms/ddpserver.c b/sr_vvms/ddpserver.c
deleted file mode 100644
index 309c5d4..0000000
--- a/sr_vvms/ddpserver.c
+++ /dev/null
@@ -1,466 +0,0 @@
-#/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-#include "gtm_time.h"
-
-#include <stddef.h>
-#include <ssdef.h>
-#include <lnmdef.h>
-#include <descrip.h>
-#include <fab.h>
-#include <rms.h>
-#include <iodef.h>
-#include <errno.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "vmsdtype.h"	/* for trans_log_name */
-#include "io.h"
-#include "dcpsubs.h"
-#include "decddp.h"
-#include "dcp_a2c.h"
-#include "route_table.h"
-#include "ddp_trace_output.h"
-#include "cce_output.h"
-#include "trans_log_name.h"
-#include "logical_truth_value.h"
-#include "gtm_ctype.h"
-#include "cli.h"
-#include "eintr_wrappers.h"
-#include "gtm_env_init.h"     /* for gtm_env_init() prototype */
-
-GBLDEF boolean_t 	ddp_trace;
-GBLDEF unsigned short	my_group_mask = DDP_DEFAULT_GROUP_MASK;
-GBLDEF volset_tab	volset_table[DDP_MAX_VOLSETS];
-
-GBLREF unsigned short		my_circuit;
-GBLREF com_hdr_t		*com_area;
-GBLREF struct dsc$descriptor	ddp_result;
-GBLREF unsigned char		decddp_multicast_addr[ETHERADDR_LENGTH];
-GBLREF mval			dollar_zproc;
-GBLREF int4			ddp_slot_size;
-
-error_def(ERR_DDPOUTMSG2BIG);
-
-static char		ddp_input_buffer[offsetof(struct in_buffer_struct, dh) + MAX_ETHER_DATA_SIZE];
-static struct
-{
-	int4	link;
-	void	(*exit_hand)();
-	int4	arg_cnt;
-	int4	*cond_val;
-} exi_desblk;
-static int4 exi_condition;
-
-static void 	self_wake(void);
-
-void 		ddp_return_error(struct in_buffer_struct *bp, char *msg);
-void 		reply_to_client(int chn, char *buff, int bufflen);
-void		declare_client_error(int chn, char m);
-void		declare_err_msg(ddp_hdr_t *ddptr_client, ddp_hdr_t *ddptr_server, char *error);
-void		ddp_exi_rundown(void);
-
-mainx()
-{
-	/* server automatic declarations */
-	condition_code	gtm$gbldata();
-	condition_code	gtm$gblget();
-	condition_code	gtm$gblkill();
-	condition_code	gtm$gblorder();
-	condition_code	gtm$gblprevious();
-	condition_code	gtm$gblput();
-	condition_code	gtm$gblquery();
-	condition_code	gtm$lock2();
-	condition_code	gtm$zdealloc2();
-	condition_code	status;
-	int		ckt;
-	boolean_t	sendit, input_pending, circuit_entered;
-	mstr		trace_logical = {LEN_AND_LIT(DDP_TRACE_ENV)};
-	char		*addr, *topaddr, *errmsg;
-	ddp_hdr_t	*ddptr;
-	routing_tab	*remote_node;
-	struct frame_hdr	*frame;
-	struct in_buffer_struct *bufptr = (struct in_buffer_struct *)ddp_input_buffer;
-	ddp_announce_msg_t	*ap;
-	ddp_global_request_t	*gp;
-	char		errstr[1024];
-	DCL_THREADGBL_ACCESS;
-
-	/* Agent automatic declarations */
-	unsigned char	*buff;
-	short		len;
-	int4		jobno;
-	com_slot_t	*cptr;
-
-	GTM_THREADGBL_INIT;
-	gtm_env_init();	/* read in all environment variables before any function call (particularly malloc) */
-	if (ddp_trace = logical_truth_value(&trace_logical, FALSE, NULL))
-		cce_out_open();
-
-	getzprocess();
-	status = dcp_get_circuit(&dollar_zproc);
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Circuit Name initialization failed", 0, 0);
-		return status;
-	}
-	status = dcp_get_volsets();
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Volume Set initialization failed", 0, 0);
-		return status;
-	}
-
-	status = dcp_get_groups();
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Group mask initialization failed", 0, 0);
-		return status;
-	}
-
-	status = dcp_get_maxrecsize();
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Max record size could not be found", 0, 0);
-		return status;
-	}
-
-	ddp_result.dsc$b_dtype = DSC$K_DTYPE_T;
-	ddp_result.dsc$b_class = DSC$K_CLASS_D;
-	ddp_result.dsc$w_length = 0;
-
-	gtm$init();
-
-	status = decddp_init();
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Ethernet controller initialization failed", 0, 0);
-		return status;
-	}
-	decddp_shdr(DDPTR_ANNOUNCE, 1, 1, 0, 0, decddp_multicast_addr);
-	decddp_sinit("WI");
-	status = decddp_send();
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Network connection failed", 0, 0);
-		return status;
-	}
-	decddp_log_error(0, "Server has connected to network", 0, 0);
-
-	/* Establish exit handler */
-	exi_desblk.exit_hand = ddp_exi_rundown;
-	exi_desblk.arg_cnt = 1;
-	exi_desblk.cond_val = &exi_condition;
-	sys$dclexh(&exi_desblk);
-
-	status = dcpa_shm_init();
-	if (0 == (status & 1))
-	{
-		decddp_log_error(status, "Agent buffer initialization failed", 0, 0);
-		return status;
-	}
-
-/**************
-	self_wake();
-*/
-	for (;;)
-	{
-		/* The input + output loop is structured in this way in order to make input and output 'fair' */
-		input_pending = dcp_get_input_buffer(bufptr, SIZEOF(ddp_input_buffer));
-		if (NULL != (cptr = dcpa_read()))
-		{ /* Service local client request */
-			len = cptr->len;
-			jobno = ((unsigned char *)cptr - (unsigned char *)com_area->slot) / ddp_slot_size;
-			ddptr = buff = cptr->text;
-			assert((jobno + 1) == (ddptr->source_job_number >> 1));
-			if (DDPTR_USEREXIT != ddptr->trancode)
-			{
-				ddptr->source_circuit_name = my_circuit;
-				/* client gives us the name of the volume set.  we translate it to the node supporting it */
-				if (0 == (ckt = find_circuit(ddptr->remote_circuit_name)))
-				{
-					declare_client_error(jobno, DDPTRX_NOCONNECT);
-					continue;
-				}
-				ddptr->remote_circuit_name = ckt;
-				remote_node = find_route(ckt);
-				if (!remote_node)
-				{
-					declare_client_error(jobno, DDPTRX_NOCONNECT);
-					continue;
-				}
-				ddptr->message_number = remote_node->outgoing_users[jobno];
-				decddp_set_etheraddr(remote_node->ether_addr);
-				status = dcp_send_message(buff, len, &cptr->iosb);
-				if (0 == (status & 1))
-				{
-					decddp_log_error(status, "Server transmission failed", &ckt, 0);
-					if (0 != cptr->state)
-					{
-						declare_err_msg(ddptr, ddptr, DDP_XMIT_FAIL);
-						dcpa_send(cptr);
-					}
-				}
-			} else
-			{
-				reset_user_count(jobno);
-				dcpa_free_user(cptr);
-			}
-		} else
-		{
-			if (!input_pending)
-				sys$hiber();
-		}
-		if (input_pending)
-		{ /* Service remote request */
-			sendit = TRUE;
-			errmsg = NULL;
-			frame = &bufptr->fh;
-			ddptr = &bufptr->dh;
-			switch (ddptr->trancode)
-			{
-			case DDPTR_GET:
-				errmsg = ddp_db_op(bufptr, gtm$gblget, NULL, 0);
-				break;
-			case DDPTR_PUT:
-				gp = ddptr->txt;
-				addr = gp->global + gp->global_len;
-				topaddr = ((char *)ddptr) + ddptr->message_length;
-				if (addr > topaddr)
-				{
-					errmsg = "<FORMT>";
-					break;
-				}
-				errmsg = ddp_db_op(bufptr, gtm$gblput, addr, topaddr - addr - 1); /* -1 to get rid of the mysterious
-												   * last byte in PUT message */
-				break;
-			case DDPTR_KILL:
-				errmsg = ddp_db_op(bufptr, gtm$gblkill,(char *)1 ,0);
-				break;
-			case DDPTR_ORDER:
-				errmsg = ddp_db_op(bufptr, gtm$gblorder, NULL, 0);
-				break;
-			case DDPTR_PREVIOUS:
-				errmsg = ddp_db_op(bufptr, gtm$gblprevious, NULL, 0);
-				break;
-			case DDPTR_DEFINE:
-				errmsg = ddp_db_op(bufptr, gtm$gbldata, NULL, 0);
-				break;
-			case DDPTR_QUERY:
-				errmsg = ddp_db_op(bufptr, gtm$gblquery, NULL, 0);
-				break;
-			case DDPTR_ZALLOC:
-				errmsg = ddp_lock_op(bufptr, gtm$lock2, 0);
-				break;
-			case DDPTR_ZDEALLOC:
-				errmsg = ddp_lock_op(bufptr, gtm$zdealloc2, 1);
-				break;
-			case DDPTR_ANNOUNCE:
-				ap = ddptr->txt;
-				if ('W' != ap->code[0] || 'I' != ap->code[1])
-				{
-					sendit = FALSE;
-					if ('I' == ap->code[0] && 'S' == ap->code[1])
-					{
-						remove_circuits(ddptr);
-						enter_circuits(ddptr);
-						decddp_log_error(0, "Volume set configuration has changed",
-								 &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-					} else if ('I' == ap->code[0] && 'D' == ap->code[1])
-					{
-						remove_circuits(ddptr);
-						decddp_log_error(0, "Circuit has shut-down",
-								 &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-					} else if (('I' == ap->code[0] && 'I' == ap->code[1]) ||
-						   ('W' == ap->code[0] && 'A' == ap->code[1]))
-					{
-						if (FALSE != (circuit_entered = enter_circuits(ddptr))
-						    && ('W' != ap->code[0] || 'A' != ap->code[1]))
-							decddp_log_error(0,"System connected in response to our connection request",
-								 &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-					}
-				} else if (FALSE != (sendit = enter_circuits(ddptr)))
-				{ /* code == WI and we belong to some group that the announcer also belongs to */
-					decddp_log_error(0, "System is now connected",
-							 &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-					decddp_shdr(DDPTR_ANNOUNCE, 1, 1, 0, 0, frame->source_address);
-					decddp_sinit("II");
-				}
-				break;
-			case DDPTR_RESPONSE:
-			case DDPTR_ERRESPONSE:
-				sendit = FALSE;
-				errmsg = NULL;
-				jobno = (ddptr->remote_job_number >> 1);
-				jobno -= 1;
-				assert(jobno >= 0 && jobno < MAX_USERS_PER_NODE);
-				remote_node = find_route(ddptr->source_circuit_name);
-				/* ignore if we can't match the message sequence numbers */
-				if (remote_node && remote_node->outgoing_users[jobno] == ddptr->message_number)
-				{
-					remote_node->outgoing_users[jobno]++;
-					reply_to_client(jobno, ddptr, ddptr->message_length);
-				}
-				break;
-			default:
-				SNPRINTF(errstr, SIZEOF(errstr), "Unknown transaction code type: %d", ddptr->trancode);
-				decddp_log_error(0, errstr, &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-				errmsg = "<FORMT>"; /* Let the server know that this was a badly formatted message */
-				break;/* throw away unkown transaction types */
-			}
-			if (NULL != errmsg)
-			{
-				if ('\0' != *errmsg)
-					ddp_return_error(bufptr, errmsg);
-				else
-				{	 /* a null error msg indicates a sequencing error - the message is ignored */
-					SNPRINTF(errstr, SIZEOF(errstr),
-						"Sequencing error - expected: %d, got: %d", remote_node->incoming_users[jobno] + 1,
-						bufptr->dh.message_number);
-					decddp_log_error(0, errstr,
-							 &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-				}
-			} else if (sendit)
-			{
-				status = decddp_send();
-				if (0 == (status & 1))
-				{
-					decddp_log_error(status, "Server response transmission failed",
-							 &bufptr->dh.source_circuit_name, &bufptr->dh.source_job_number);
-					if (ERR_DDPOUTMSG2BIG == status)
-						ddp_return_error(bufptr, "<DBDGD>"); /* should ideally be something like
-										      * "<MSG2BIG>", but we don't yet know the
-										      * code DSM uses - Vinaya 06/28/02 */
-				}
-			}
-		}
-	}
-}
-
-/* Client subroutines */
-void ddp_return_error(struct in_buffer_struct *bp, char *msg)
-{
-	condition_code	status;
-
-	decddp_shdr(DDPTR_ERRESPONSE, 1, bp->dh.source_circuit_name, bp->dh.source_job_number,
-			bp->dh.message_number, bp->fh.source_address);
-	(void)decddp_s8bit(msg);
-	decddp_putbyte(DDP_MSG_TERMINATOR);
-	status = decddp_send();
-	if (0 == (status & 1))
-	{
-		assert(ERR_DDPOUTMSG2BIG != status);
-		decddp_log_error(status, "Server error response transmission failed",
-				 &bp->dh.source_circuit_name, &bp->dh.source_job_number);
-	}
-}
-
-static void self_wake(void)
-{
-	static readonly int4 timeout[2] = {-50000000, -1}; /* 5 seconds */
-	sys$wake(0, 0);
-	sys$setimr(0, timeout, self_wake, 0, 0);
-}
-
-/* Agent subroutines */
-
-void reply_to_client(int chn, char *buff, int bufflen)
-{
-	com_slot_t 	*cp;
-	ddp_hdr_t	*ddptr_r, *ddptr_s;
-	DEBUG_ONLY(unsigned char  *extref;)
-	DEBUG_ONLY(ddp_global_request_t	*gp;)
-
-	cp = (com_slot_t *)((unsigned char *)com_area->slot + chn * ddp_slot_size);
-	assert(0 != cp->pid);
-	/* Only reply once.  If state is zero, then there is alreay a message
-	in the buffer or a time out.  Don't overlay message.
-	State may also be zero because we have timed out, in which case we
-	don't want to overlay the retry message */
-	if (0 == cp->state)
-		return;
-	ddptr_r = (ddp_hdr_t *)buff;
-	ddptr_s = (ddp_hdr_t *)cp->text; /* until we overwrite this com slot, the slot contains the message we sent */
-	if ((DDPTR_QUERY != ddptr_s->trancode) || 1 == bufflen || (1 == (ddptr_r->message_length - ddptr_r->hdrlen)))
-	{ /* non QUERY operation, OR,
-	   * came here from declare_client_error, OR
-	   * "" result from QUERY (message contains 0xFF, just one byte) */
-		if (ddp_slot_size - offsetof(com_slot_t, text[0]) >= bufflen)
-		{
-			cp->len = bufflen;
-			memcpy(ddptr_s, ddptr_r, bufflen);
-		} else
-		{ /* we don't want to trash someone else's slot; declare error instead */
-			assert(1 != bufflen); /* if we came into this function from declare_client_error, we should have sufficient
-						 space in slot. Also, calling declare_err_msg is not good when there is no message
-						 that has been formatted in the buffer. */
-			declare_err_msg(ddptr_s, ddptr_r, DDP_MSG2BIG);
-		}
-	} else
-	{ /* remove the extended reference from the response */
-		assert(DSM_EXTREF_FORM_LEN < ddptr_r->message_length - ddptr_r->hdrlen);
-		DEBUG_ONLY(extref = ddptr_r->txt);
-		DEBUG_ONLY(gp = ddptr_s->txt);
-		assert(0 == memcmp(extref, DSM_EXTREF_PREFIX, STR_LIT_LEN(DSM_EXTREF_PREFIX)));
-		assert(gp->uci == five_bit(&extref[STR_LIT_LEN(DSM_EXTREF_PREFIX)]));
-		assert(0 == memcmp(&extref[STR_LIT_LEN(DSM_EXTREF_PREFIX) + DDP_UCI_NAME_LEN],
-				   DSM_UCI_VOL_SEPARATOR, STR_LIT_LEN(DSM_UCI_VOL_SEPARATOR)));
-		assert(gp->vol ==
-			five_bit(&extref[STR_LIT_LEN(DSM_EXTREF_PREFIX) + DDP_UCI_NAME_LEN + STR_LIT_LEN(DSM_UCI_VOL_SEPARATOR)]));
-		assert(0 == memcmp(&extref[STR_LIT_LEN(DSM_EXTREF_PREFIX) + DDP_UCI_NAME_LEN +
-					   STR_LIT_LEN(DSM_UCI_VOL_SEPARATOR) + DDP_VOLUME_NAME_LEN],
-				   DSM_EXTREF_SUFFIX, STR_LIT_LEN(DSM_EXTREF_SUFFIX)));
-		assert(DDP_MSG_TERMINATOR == ddptr_r->txt[ddptr_r->message_length - ddptr_r->hdrlen - 1]);
-		if (ddp_slot_size - ddptr_r->message_length >= offsetof(com_slot_t, text[0]) - (DSM_EXTREF_FORM_LEN - 1))
-		{ /* we don't want to trash someone else's slot; declare error instead */
-			memcpy((char *)ddptr_s, (char *)ddptr_r, ddptr_r->hdrlen); /* copy the header */
-			ddptr_s->message_length -= (DSM_EXTREF_FORM_LEN - 1); /* adjust for the removal of the extref prefix */
-									      /* -1 because we want to retain ^ */
-			ddptr_s->txt[0] = '^'; /* global indicator */
-			memcpy(&ddptr_s->txt[1],
-			       &ddptr_r->txt[DSM_EXTREF_FORM_LEN], /* global without the extref prefix */
-			       ddptr_r->message_length - ddptr_r->hdrlen - DSM_EXTREF_FORM_LEN);
-		} else
-			declare_err_msg(ddptr_s, ddptr_r, DDP_MSG2BIG);
-	}
-	dcpa_send(cp);
-	return;
-}
-
-void declare_client_error(int chn, char m)
-{
-	reply_to_client(chn, &m, SIZEOF(m));
-	return;
-}
-
-void declare_err_msg(ddp_hdr_t *ddptr_client, ddp_hdr_t *ddptr_server, char *error)
-{ /* error should be '\0' terminated */
-	int	error_len;
-
-	error_len = strlen(error) + 1;  /* we want the terminating null to be copied due to the way we compute the message length
-					 * for response messages in ddpgvusr */
-	memcpy((char *)ddptr_client, (char *)ddptr_server, ddptr_server->hdrlen); /* copy the header */
-	memcpy(ddptr_client->txt, error, error_len); /* Change the message text */
-	ddptr_client->message_length = ddptr_client->hdrlen + error_len;
-	ddptr_client->trancode = DDPTR_ERRESPONSE;
-}
-
-void ddp_exi_rundown(void)
-{
-
-	decddp_shdr(DDPTR_ANNOUNCE, 1, 1, 0, 0, decddp_multicast_addr);
-	decddp_sinit("ID");
-	decddp_send();
-}
diff --git a/sr_vvms/dec_err.c b/sr_vvms/dec_err.c
deleted file mode 100644
index 00548a5..0000000
--- a/sr_vvms/dec_err.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "msg.h"
-#include <stdarg.h>
-
-GBLREF bool dec_nofac;
-
-void dec_err(int4 msgnum, ...)
-{
-	va_list		var;
-	uint4		i, count, argcnt;
-	msgtype 	msg;
-
-	VAR_START(var, msgnum);
-	va_count(argcnt);
-	msg.msg_number = msgnum;
-	argcnt--;
-	if (argcnt)
-	{	count = va_arg(var, int4);
-		assert (count <= argcnt);
-	} else
-		count = 0;
-
-	count = (count > DEF_MSG_ARGS ? DEF_MSG_ARGS : count);
-	msg.new_opts = msg.def_opts = dec_nofac;
-	msg.arg_cnt = 2 + count; /* count + overhead */
-	msg.fp_cnt = count;
-	for (i = 0; i < count; i++)
-		msg.fp[i].n = va_arg(var, int4);
-	sys$putmsg(&msg,0,0,0);
-	va_end(var);
-}
diff --git a/sr_vvms/decddp.c b/sr_vvms/decddp.c
deleted file mode 100644
index 9117eaa..0000000
--- a/sr_vvms/decddp.c
+++ /dev/null
@@ -1,393 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-#include <lnmdef.h>	/* for trans_log_name */
-#include <stddef.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "vmsdtype.h"	/* for trans_log_name */
-#include "nmadef.h"
-#include "dcpsubs.h"
-#include "decddp.h"
-#include "ddp_trace_output.h"
-#include "trans_log_name.h"
-#include "five_bit.h"
-#include "five_2_ascii.h"
-
-/* Ethernet controller information.  */
-
-#define XMTBUFLEN	MAX_ETHER_DATA_SIZE	/* size of a transmit buffer */
-#define RETRY_LIMIT	3			/* number of attempts to get past an error (as of this writing used by send) */
-
-GBLDEF unsigned char	decddp_multicast_addr[ETHERADDR_LENGTH] = {9, 0, 0x2b, 0, 0, 1};
-
-GBLREF unsigned short	my_circuit;
-GBLREF unsigned short	my_group_mask; /* filled in dcp_get_group_mask */
-GBLREF boolean_t	ddp_trace;
-GBLREF volset_tab	volset_table[];
-GBLREF mstr		my_circuit_name;
-
-typedef struct
-{
-	int4		buflen;
-	unsigned char	*bufptr;
-} quad_desc;
-
-#ifdef __ALPHA
-# pragma member_alignment save
-# pragma nomember_alignment
-#endif
-
-static struct
-{
-	short	parm_id;
-	int4	parm_val;
-} setparm[] =
-{ /* Keep NMA$C_PCLI_BFN as the first element */
-	{NMA$C_PCLI_BFN, ETH_RCV_BUFCNT},	/* GT.CM default # of receive buffers to preallocate */
-	{NMA$C_PCLI_FMT, NMA$C_LINFM_ETH},	/* packet format = ethernet packet format */
-	{NMA$C_PCLI_PTY, DDP_ETH_PROTO_TYPE},	/* protocol type = Distributed Data Processing (DDP) protocol */
-	{NMA$C_PCLI_PAD, NMA$C_STATE_OFF},	/* padding = no size field */
-	{NMA$C_PCLI_MLT, NMA$C_STATE_ON},	/* multicast address state = accecpt all multicast addresses */
-	{NMA$C_PCLI_BUS, ETHERNET_HEADER_SIZE + MAX_ETHER_DATA_SIZE}	/* maximum allowable port receive data size */
-};
-
-#ifdef __ALPHA
-# pragma member_alignment restore
-#endif
-
-static quad_desc		setparmdsc = {SIZEOF(setparm), setparm};
-static unsigned char		sensebuf[250]; /* recommeded size for attributes buffer, see LAN Device Drivers in I/O manual */
-static quad_desc		sensedsc = {SIZEOF(sensebuf), sensebuf};
-static unsigned char		xmtbuf[XMTBUFLEN], *xmtbufptr = NULL;
-static struct iosb_struct	read_iosb, write_iosb;
-static uint4			ethchan;	/* returned ethernet channel # (only low-order word used) */
-static unsigned char		destination_address[ETHERADDR_LENGTH];
-static unsigned char		my_ether_addr[ETHERADDR_LENGTH];
-static boolean_t		input_pending = FALSE;
-static unsigned char		max_ddp_request_credits = DDP_MAX_REQUEST_CREDITS;
-/*	End of ethernet control information.  */
-
-static struct dsc$descriptor_s ethdsc[] =
-{
-	{STR_LIT_LEN("ECA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "ECA0"},
-	{STR_LIT_LEN("ESA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "ESA0"},
-	{STR_LIT_LEN("ETA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "ETA0"},
-	{STR_LIT_LEN("EWA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "EWA0"},
-	{STR_LIT_LEN("EXA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "EXA0"},
-	{STR_LIT_LEN("EZA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "EZA0"},
-	{STR_LIT_LEN("XEA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "XEA0"},
-	{STR_LIT_LEN("XQA0"), DSC$K_DTYPE_T, DSC$K_CLASS_S, "XQA0"}
-};
-
-condition_code decddp_init(void)
-{
-	condition_code		status;
-	char			*sbp, logical_buffer[MAX_TRANS_NAME_LEN], translation_buffer[MAX_TRANS_NAME_LEN];
-	mstr			logical, translation;
-	int4			eth_recv_bufcnt, credits;
-	struct dsc$descriptor_s	ethdsc1;
-	int			eth_index;
-
-	assert(0 == (SIZEOF(xmtbuf) & 1)); /* even buffer size for padding odd length outbound message */
-	logical.addr = logical_buffer;
-	memcpy(logical.addr, DDP_ETHER_DEV_PREFIX, STR_LIT_LEN(DDP_ETHER_DEV_PREFIX));
-	memcpy(&logical.addr[STR_LIT_LEN(DDP_ETHER_DEV_PREFIX)], my_circuit_name.addr, my_circuit_name.len);
-	logical.len = STR_LIT_LEN(DDP_ETHER_DEV_PREFIX) + my_circuit_name.len;
-	if (SS$_NORMAL == trans_log_name(&logical, &translation, translation_buffer))
-	{
-		ethdsc1.dsc$w_length = translation.len;
-		ethdsc1.dsc$b_dtype = DSC$K_DTYPE_T;
-		ethdsc1.dsc$b_class = DSC$K_CLASS_S;
-		ethdsc1.dsc$a_pointer = translation.addr;
-		status = SYS$ASSIGN(&ethdsc1, &ethchan, 0, 0);
-	} else
-		status = SS$_NOSUCHDEV;
-
-	for (eth_index = 0;
-	     (SS$_NOSUCHDEV == status) && (SIZEOF(ethdsc) / SIZEOF(struct dsc$descriptor_s) > eth_index);
-	     status = SYS$ASSIGN(&ethdsc[eth_index++], &ethchan, 0, 0));
-	if (0 != (status & 1))	/* if any of the SYS$ASSIGN's succeeded */
-	{
-		logical.addr = logical_buffer;
-		memcpy(logical.addr, DDP_ETH_RCV_BUFCNT_PREFIX, STR_LIT_LEN(DDP_ETH_RCV_BUFCNT_PREFIX));
-		memcpy(&logical.addr[STR_LIT_LEN(DDP_ETH_RCV_BUFCNT_PREFIX)], my_circuit_name.addr, my_circuit_name.len);
-		logical.len = STR_LIT_LEN(DDP_ETH_RCV_BUFCNT_PREFIX) + my_circuit_name.len;
-		if (SS$_NORMAL == trans_log_name(&logical, &translation, translation_buffer) && 0 < translation.len)
-		{
-			eth_recv_bufcnt = asc2i((uchar_ptr_t)translation_buffer, translation.len);
-			if (MIN_ETH_RECV_BUFCNT > eth_recv_bufcnt || MAX_ETH_RECV_BUFCNT < eth_recv_bufcnt)
-				eth_recv_bufcnt = ETH_RCV_BUFCNT;
-			assert(NMA$C_PCLI_BFN == setparm[0].parm_id);
-			setparm[0].parm_val = eth_recv_bufcnt;		/* OK to overwrite static since once per run */
-		}
-		status = SYS$QIOW(EFN$C_ENF, ethchan, (IO$_SETMODE | IO$M_CTRL | IO$M_STARTUP), &write_iosb, 0, 0,
-                                  0, &setparmdsc, 0, 0, 0, 0);
-		if (0 != (status & 1))
-			status = write_iosb.status;
-		if (0 != (status & 1))
-		{
-			status = SYS$QIOW(EFN$C_ENF, ethchan, (IO$_SENSEMODE | IO$M_CTRL), &write_iosb, 0, 0, 0, &sensedsc,
-					  0, 0, 0, 0);
-			if (0 != (status & 1))
-				status = write_iosb.status;
-			if (0 != (status & 1))
-			{
-				/* Locate the PHA parameter.  */
-				status = SS$_NOSUCHDEV;		/* default in case we don't find PHA parameter */
-				for (sbp = sensebuf;  sbp < sensebuf + SIZEOF(sensebuf);)
-				{
-					if (0 == (*(short *)sbp & 0x1000))	/* if not string parameter, must be longword */
-						sbp += SIZEOF(short) + SIZEOF(int4);	/* skip longword parameter */
-					else if (NMA$C_PCLI_PHA != (*(short *)sbp & 0x0fff))	/* compare without flag bits */
-					{
-						sbp += SIZEOF(short);			/* skip to string count */
-						sbp += SIZEOF(short) + *(short *)sbp;	/* skip over string count and string */
-					} else	/* must be NMA$C_PCLI_PHA */
-					{
-						sbp += 2 * SIZEOF(short);	/* skip over parameter ID and string count */
-						memcpy(my_ether_addr, sbp, ETHERADDR_LENGTH);	/* get ethernet address */
-						sbp += ETHERADDR_LENGTH;
-						status = decddp_start_ast();
-						break;
-					}
-				}
-				logical.addr = logical_buffer;
-				memcpy(logical.addr, DDP_MAXREQCREDITS_PREFIX, STR_LIT_LEN(DDP_MAXREQCREDITS_PREFIX));
-				memcpy(&logical.addr[STR_LIT_LEN(DDP_MAXREQCREDITS_PREFIX)], my_circuit_name.addr,
-												my_circuit_name.len);
-				logical.len = STR_LIT_LEN(DDP_MAXREQCREDITS_PREFIX) + my_circuit_name.len;
-				if (SS$_NORMAL == trans_log_name(&logical, &translation, translation_buffer)
-							&& 0 < translation.len)
-				{
-					credits = asc2i((uchar_ptr_t)translation_buffer, translation.len);
-				      	if (DDP_LEAST_MAXREQCREDITS <= credits && DDP_LARGEST_MAXREQCREDITS >= credits)
-						max_ddp_request_credits = (unsigned char)credits;
-				}
-			}
-		}
-	}
-	return status;
-}
-
-condition_code decddp_start_ast(void)
-{ /* Enable attention AST.  */
-	return SYS$QIOW(EFN$C_ENF, ethchan, (IO$_SETMODE | IO$M_ATTNAST), &read_iosb, 0, 0, decddp_ast_handler, 0, 0, 0, 0, 0);
-}
-
-
-void decddp_ast_handler(void)
-{
-	input_pending = TRUE;
-	SYS$WAKE(0, 0);
-	return;
-}
-
-boolean_t dcp_get_input_buffer(struct in_buffer_struct *input_buffer, size_t inbufsiz)
-{
-	bool		retval;
-	condition_code	status;
-
-	if (FALSE == input_pending)
-		status = 0;
-	else
-	{
-		input_pending = FALSE;
-		status = SYS$QIOW(EFN$C_ENF, ethchan, IO$_READVBLK, &read_iosb, 0, 0, &input_buffer->dh,
-				  inbufsiz - offsetof(struct in_buffer_struct, dh), 0, 0, input_buffer->fh.destination_address, 0);
-		input_buffer->fh.frame_length = read_iosb.length;
-		/* At this point, input_buffer should point to:
-			2 bytes containing the number of bytes read	(in_buffer_struct.len)
-			14 bytes of Ethernet packet header information	(in_buffer_struct.fh)
-			data starting at byte 16			(in_buffer_struct.dh followed by ddp message contents)
-		*/
-		if (ddp_trace)
-			ddp_trace_output(&input_buffer->dh, input_buffer->fh.frame_length, DDP_RECV);
-		status = decddp_start_ast();
-	}
-	return (0 != (status & 1));
-}
-
-/* decddp_shdr - initialize transmit buffer with DDP packet header */
-void decddp_shdr(unsigned char trancode, short jobno, unsigned short remote_circuit, short return_jobno, unsigned char msgno,
-		 unsigned char *etheraddr)
-/* trancode is DDP transaction code */
-/* jobno is job number */
-/* remote_circuit is 5-bit format of remote circuit name.  However, a 0001 if this is a multicast announcement.  */
-/* return_jobno is for response, job number of client; for request, 0 */
-/* msgno is message number */
-/* etheraddr is pointer to destination ethernet address (6 bytes) */
-{
-	ddp_hdr_t	*dp;
-
-	assert(SIZEOF(xmtbuf) - 1 > DDP_MSG_HDRLEN); /* buffer overflow check; - 1 to accommodate terminator byte */
-	dp = (ddp_hdr_t *)xmtbuf;
-	dp->trancode			= trancode;		/* transaction code */
-	dp->proto			= DDP_PROTO_VERSION;
-	dp->source_circuit_name		= my_circuit; 		/* 5-bit format of local circuit name */
-	dp->source_job_number		= jobno;		/* job number << 1 */
-	dp->remote_circuit_name		= remote_circuit;	/* 5-bit format of remote circuit name */
-	dp->remote_job_number		= return_jobno;		/* response: $J; request: 0 */
-	dp->message_number		= msgno;		/* sequence number; must be in order */
-	dp->filler1			= 0x00;			/* literal 00 */
-	/* leave message_length unset; filled later */
-	dp->hdrlen			= DDP_MSG_HDRLEN;	/* DDP header length */
-
-	xmtbufptr = &xmtbuf[DDP_MSG_HDRLEN];	/* first free position in buffer */
-	memcpy(destination_address, etheraddr, ETHERADDR_LENGTH);
-	return;
-}
-
-void decddp_set_etheraddr(unsigned char *adr)
-{ /* set up Ethernet address */
-	memcpy(destination_address, adr, ETHERADDR_LENGTH);
-	return;
-}
-
-unsigned char *decddp_s5bit(unsigned char *cp)
-{ /* convert 3 bytes to '5-bit format' and store in the transmit buffer; return pointer to next free transmit buffer location */
-	*((unsigned short *)xmtbufptr)++ = five_bit(cp);
-	return xmtbufptr;
-}
-
-unsigned char *decddp_s5asc(unsigned short fivebit)
-{ /* convert 5-bit format number to ASCII and store in the transmit buffer; return pointer to next free transmit buffer location */
-	xmtbufptr = five_2_ascii(&fivebit, xmtbufptr);
-	return xmtbufptr;
-}
-
-unsigned char *decddp_s7bit(unsigned char *cp)
-{ /* convert zero terminated string to '7-bit format' and store in the transmit buffer;
-     return pointer to next free transmit buffer location
-   */
-	unsigned char	*mycp;
-
-	if ('\0' != *cp)
-	{ /* Copy characters, shifting low-order 7 bits to high-order 7 bits and set low-order bit.  */
-		for (mycp = cp;  '\0' != *mycp;  mycp++)
-			*xmtbufptr++ = ((*mycp << 1) & 0xff) | 0x01;
-		*(xmtbufptr - 1) &= 0xfe;	/* clear low order bit of last byte signifying end of string */
-						/* N.B., shortest allowable string is zero bytes with no terminator */
-	}
-	return xmtbufptr;
-}
-
-
-unsigned char *decddp_s8bit(unsigned char *cp)
-{ /* transcribe zero terminated string to the transmit buffer; return pointer to next free transmit buffer location */
-	unsigned char	*mycp;
-
-	mycp = cp;
-	do	/* just copy the bytes, including terminating zero byte; shortest string is 1 byte (terminator) */
-		*xmtbufptr++ = *mycp++;
-	while ('\0' != *mycp);
-
-	return xmtbufptr;
-}
-
-void decddp_s8bit_counted(char *cp, int len)
-{
-	if (len)
-		memcpy(xmtbufptr, cp, len);
-	xmtbufptr += len;
-	return;
-}
-
-void decddp_putbyte(unsigned char ch)		/* note the VAX MACRO version declared this of type (char *), but never set r0! */
-{ /* copy single character to transmit buffer */
-
-	*xmtbufptr++ = ch;
-	return;
-}
-
-condition_code decddp_send(void)
-{ /* transmit message */
-
-	return(dcp_send_message(xmtbuf, (xmtbufptr - xmtbuf), &write_iosb));
-}
-
-condition_code dcp_send_message(unsigned char *buffer, int length, struct iosb_struct *iosbp)
-{
-	int		buflen, retry;
-	condition_code	status;
-	error_def(ERR_DDPOUTMSG2BIG);
-
-	((ddp_hdr_t *)buffer)->message_length = buflen = length;
-	if (0 != (buflen & 1))
-		buffer[buflen++] = 0xff;	/* pad to even number of bytes with 0xff */
-	if (buflen < DDP_MIN_MSG_LEN)
-		buflen = DDP_MIN_MSG_LEN;	/* pad to min len */
-	if (ddp_trace)
-		ddp_trace_output(buffer, buflen, DDP_SEND);
-	if (MAX_ETHER_DATA_SIZE < buflen)
-		return ERR_DDPOUTMSG2BIG;
-	for (retry = 0, status = 0; (0 == (status & 1)) && (RETRY_LIMIT > retry); retry++)
-	{
-		status = SYS$QIOW(EFN$C_ENF, ethchan, IO$_WRITEVBLK, iosbp, 0, 0, buffer, buflen, 0, 0, &destination_address, 0);
-		if (0 != (status & 1))
-			status = iosbp->status;
-	}
-	return status;
-}
-
-void decddp_sinit(unsigned char *response_code)
-{ /* DDP session initialization message (must have called decddp_shdr() first) */
-	ddp_announce_msg_t	*ap;
-	int			volset_index;
-
-	assert(DDP_ANNOUNCE_MSG_LEN <= SIZEOF(xmtbuf) - (xmtbufptr - xmtbuf)); /* buffer overflow check */
-	ap = (ddp_announce_msg_t *)xmtbufptr; /* xmtbufptr points to the byte past the header */
-
-	ap->filler0 = 0;
-	ap->code[0] = response_code[0];
-	ap->code[1] = response_code[1];
-	memcpy(ap->ether_addr, my_ether_addr, ETHERADDR_LENGTH);
-	ap->circuit_name = my_circuit;
-	ap->filler1 = 0;
-	ap->filler2 = 0;
-	ap->max_job_no = MAX_USERS_PER_NODE;
-	ap->group_mask = my_group_mask;
-	ap->advertise_interval = DDP_ADVERTISE_INTERVAL;
-	ap->max_request_credits = max_ddp_request_credits;	/* used for flow control */
-	ap->cpu_type = DDP_CPU_TYPE;
-	ap->version = DDP_SOFTWARE_VERSION;
-	ap->cpu_load_rating = DDP_CPU_LOAD_RATING;
-	ap->proto_version = DDP_PROTO_VERSION;
-	ap->node_status = DDP_NODE_STATUS_ALL_CLEAR;
-	ap->autoconfigure_version = DDP_AUTOCONFIGURE_VERSION;
-	for (volset_index = 0; volset_index < DDP_MAX_VOLSETS; volset_index++)		/* copy volset names to the buffer */
-		ap->volset[volset_index] = volset_table[volset_index].vol;
-	/*********************** BEGIN STUFF THAT IS YET TO BE UNDERSTOOD ************************/
-	memset(ap->filler3, 0, SIZEOF(ap->filler3));
-	*((uint4 *)&ap->filler3[32]) = DDP_ANNOUNCE_FILLER3_LITERAL;
-	/*********************** END   STUFF THAT IS YET TO BE UNDERSTOOD ************************/
-	ap->terminator = DDP_MSG_TERMINATOR;
-
-	xmtbufptr += DDP_ANNOUNCE_MSG_LEN;
-	return;
-}
-
-unsigned char *decddp_xmtbuf(void)
-{
-	return xmtbuf;
-}
-
-int decddp_bufavail(void)
-{
-	return SIZEOF(xmtbuf) - (xmtbufptr - xmtbuf);
-}
diff --git a/sr_vvms/decddp.h b/sr_vvms/decddp.h
deleted file mode 100644
index e99668f..0000000
--- a/sr_vvms/decddp.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DECDDP_H_INCLUDED
-#define DECDDP_H_INCLUDED
-
-#define INIT_DESCRIP(X,A) ((X).dsc$a_pointer = (A), (X).dsc$b_dtype = DSC$K_DTYPE_T, (X).dsc$b_class = DSC$K_CLASS_S)
-#define DESCRIP_LENGTH(X,A) ((X).dsc$w_length = (char *)(A) - (X).dsc$a_pointer)
-
-condition_code	decddp_init(void);
-condition_code	decddp_start_ast(void);
-void		decddp_ast_handler(void);
-boolean_t	dcp_get_input_buffer(struct in_buffer_struct *input_buffer, size_t inbuflen);
-void		decddp_shdr(unsigned char trancode, short jobno, unsigned short remote_circuit, short return_jobno,
-				unsigned char msgno, unsigned char *etheraddr);
-void		decddp_set_etheraddr(unsigned char *adr);
-unsigned char	*decddp_s5bit(unsigned char *cp);
-unsigned char	*decddp_s5asc(unsigned short fivebit);
-unsigned char	*decddp_s7bit(unsigned char *cp);
-unsigned char	*decddp_s8bit(unsigned char *cp);
-void		decddp_putbyte(unsigned char ch);
-condition_code	decddp_send(void);
-condition_code	dcp_send_message(unsigned char *buffer, int length, struct iosb_struct *iosbp);
-void		decddp_sinit(unsigned char *response_code);
-void		decddp_log_error(condition_code status, char *message_text, unsigned short *source_circuit,
-				 unsigned short *source_job);
-void		decddp_s8bit_counted(char *cp, int len);
-char 		*ddp_db_op(struct in_buffer_struct *bp, condition_code (*f)(), unsigned char *addr, int len);
-char 		*ddp_lock_op(struct in_buffer_struct *bptr, condition_code (*f)(), int unlock_code);
-condition_code	dcp_get_circuit(mval *logical);
-condition_code	dcp_get_volsets(void);
-condition_code	dcp_get_groups(void);
-condition_code	dcp_get_maxrecsize(void);
-unsigned char	*decddp_xmtbuf(void);
-
-#endif /* DECDDP_H_INCLUDED */
diff --git a/sr_vvms/decddp_log_error.c b/sr_vvms/decddp_log_error.c
deleted file mode 100644
index 8034fdb..0000000
--- a/sr_vvms/decddp_log_error.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_time.h"
-
-#include <descrip.h>
-#include <opcdef.h>
-#include <ssdef.h>
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "dcpsubs.h"
-#include "decddp.h"
-#include "five_2_ascii.h"
-#include "util.h"
-
-#define PUTINBUFFER(X)	(memcpy(bufptr, (X), SIZEOF(X)), bufptr += SIZEOF(X) - 1)
-#define NEWLINE		(*bufptr++ = '\r' , *bufptr++ = '\n')
-#define MAX_MSG_LEN	512
-
-GBLREF bool                     dec_nofac;
-
-void decddp_log_error(condition_code status, char *message_text, unsigned short *source_circuit, unsigned short *source_job)
-{
-	int4 			jobno, index;
-	short			res_length;
-	char			*bufptr;
-	oper_msg_struct		oper;
-	mstr			errmsg;
-	$DESCRIPTOR(opmsg, "");
-	error_def(ERR_SYSCALL);
-	error_def(ERR_DDPLOGERR);
-
-	bufptr = oper.text;
-	PUTINBUFFER("GTM.DDP Server Status");
-	if (NULL != source_circuit)
-	{
-		PUTINBUFFER("   Source circuit=");
-		bufptr = five_2_ascii(source_circuit, bufptr);
-	}
-	if (NULL != source_job)
-	{
-		PUTINBUFFER("   Source job=");
-		jobno = *source_job;
-		bufptr += 5;
-		for (index = 1; index <= 5; index++)
-		{
-			*(bufptr - index) = (jobno % 10) + '0';
-			jobno /= 10;
-		}
-	}
-	NEWLINE;
-	if (NULL != message_text)
-	{
-		while (*bufptr++ = *message_text++)
-			;
-		bufptr--; /* remove the <NUL> terminator */
-		NEWLINE;
-	}
-	if (0 != status)
-	{
-		assert(SIZEOF(oper.text) - MAX_MSG_LEN >= bufptr - oper.text);
-		errmsg.addr = bufptr;
-		errmsg.len = MAX_MSG_LEN;
-		gtm_getmsg(status, &errmsg);
-		bufptr += errmsg.len;
-	}
-	oper.req_code = OPC$_RQ_RQST;
-	oper.target = OPC$M_NM_OPER1;
-	opmsg.dsc$a_pointer = &oper;
-	opmsg.dsc$w_length = SIZEOF(oper) - SIZEOF(oper.text) + (bufptr - oper.text);
-	if (SS$_NORMAL != (status = sys$sndopr(&opmsg, 0))) /* to the operator log */
-		dec_err(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("SYS$SNDOPR"), CALLFROM, status); /* record sndopr error in log */
-	DDP_LOG_ERROR(bufptr - oper.text, oper.text); /* also to the error log */
-	return;
-}
diff --git a/sr_vvms/define-old-library-logicals.com b/sr_vvms/define-old-library-logicals.com
deleted file mode 100644
index 8b4e830..0000000
--- a/sr_vvms/define-old-library-logicals.com
+++ /dev/null
@@ -1,137 +0,0 @@
-$ set noon
-$! Define old library logicals to support linking against older versions of
-$! VMS.
-$! John Francini 17 Apr 1997
-$! Roger Partridge 15 Dec 1999
-$! Xianguan Li 05 Jan 2000
-$! Sam Weiner 11 Jul 2004
-$!
-$! If on a AXP, call with P1 = "V62" to define for V6.2 libraries.
-$! If on a AXP, call with P1 = "V71" to define for V7.1 libraries.
-$! Default on AXP is V7.2-1.
-$!
-$! If on a VAX, call with P1 = "V55" to define for V5.5-2 libraries.
-$!              P1 = "V61 for V6.1 libraries
-$! Default on VAX is V7.1.
-$!
-$! If called with P1 = "CHECK", a display of the current state of the libraries
-$! is given.
-$!
-$! If called with P1 = "REMOVE", then the logicals are deleted.
-$!
-$! These last two options may be abbrieviated to a single letter.
-$!
-$! All logicals are defined in the PROCESS logical name table.
-$ say := write sys$output
-$ myarch = f$getsyi("arch_type")
-$ on_vax := false
-$ on_alpha := false
-$ nosys := false
-$ dpn := define/process/nolog
-$ if myarch .eq. 1
-$ then
-$ 	on_vax := true
-$	arch_str := "VAX"
-$ endif
-$ if myarch .eq. 2
-$ then
-$	on_alpha := true
-$	arch_str := "Alpha"
-$	node = f$edit(f$getsyi("nodename"),"upcase")
-$	if node .eqs. "YETI" then nosys := true
-$	if node .eqs. "BGFOOT" then nosys := true
-$ endif
-$ if f$extract(0,1,p1) .eqs. "C" then goto check_logicals
-$ if f$extract(0,1,p1) .eqs. "R" then goto undefine_logicals
-$!
-$! Here to define the logicals
-$!
-$ if on_alpha
-$ then
-$	axplib := V721LIB
-$	verstr := V7.2-1
-$	if p1 .eqs. "V62"
-$	then
-$		axplib := V62LIB
-$		verstr := V6.2
-$       endif
-$	if p1 .eqs. "V71"
-$	then
-$		axplib := V71LIB
-$		verstr := V7.1
-$       endif
-$	say "[Defining old library logicals for OpenVMS Alpha ''verstr']"
-$	if nosys
-$	then
-$		dpn alpha$library gtm$root:[alpha$'axplib'.sys$library]
-$		dpn sys$library gtm$root:[alpha$'axplib'.sys$library]
-$		dpn alpha$loadable_images gtm$root:[alpha$'axplib'.sys$ldr]
-$		dpn sys$loadable_images gtm$root:[alpha$'axplib'.sys$ldr]
-$	else
-$		dpn alpha$library disk$launch-box:[alpha$'axplib'.sys$library]
-$		dpn sys$library disk$launch-box:[alpha$'axplib'.sys$library]
-$		dpn alpha$loadable_images disk$launch-box:[alpha$'axplib'.sys$ldr]
-$		dpn sys$loadable_images disk$launch-box:[alpha$'axplib'.sys$ldr]
-$	endif
-$	dpn old_library_logicals 'verstr'
-$ endif
-$ if on_vax
-$ then
-$	vaxlib := V71LIB
-$	verstr := V7.1
-$	if p1 .eqs. "V61"
-$	then
-$		vaxlib := V61LIB
-$		verstr := V6.1
-$	endif
-$	if p1 .eqs. "V55"
-$	then
-$		vaxlib := V55LIB
-$		verstr := V5.5-2
-$	endif
-$	say "[Defining old library logicals for OpenVMS VAX ''verstr']"
-$	dpn sys$library disk$cetus:[vax$'vaxlib'.sys$library]
-$	dpn vax$library disk$cetus:[vax$'vaxlib'.sys$library]
-$	dpn sys$loadable_images disk$cetus:[vax$'vaxlib'.sys$ldr]
-$	dpn vax$loadable_images disk$cetus:[vax$'vaxlib'.sys$ldr]
-$       dpn mthrtl disk$cetus:[vax$'vaxlib'.sys$library]uvmthrtl.exe
-$       dpn uvmthrtl disk$cetus:[vax$'vaxlib'.sys$library]uvmthrtl.exe
-$       dpn librtl2 disk$cetus:[vax$'vaxlib'.sys$library]librtl2.exe
-$	dpn old_library_logicals 'verstr'
-$ endif
-$ exit
-$!
-$! Here to check to see if the logicals are defined...
-$!
-$check_logicals:
-$ verstr = f$trnlnm("OLD_LIBRARY_LOGICALS","LNM$PROCESS")
-$ if verstr .eqs. ""
-$ then
-$	say "[No old library logicals are defined]"
-$ else
-$	say "[Currently using old library logicals for OpenVMS ''arch_str' ''verstr]"
-$ endif
-$ exit
-$!
-$! Here to undefine the old library logicals...
-$!
-$undefine_logicals:
-$ call undefiner sys$library
-$ call undefiner vax$library
-$ call undefiner sys$loadable_images
-$ call undefiner vax$loadable_images
-$ call undefiner mthrtl
-$ call undefiner uvmthrtl
-$ call undefiner librtl2
-$ call undefiner alpha$library
-$ call undefiner alpha$loadable_images
-$ call undefiner old_library_logicals
-$ say "[Old library logicals have been removed from your process table]"
-$ exit
-$!
-$! Subroutine to undefine a logical only if it exists in the PROCESS logical
-$! name table...
-$undefiner: SUBROUTINE
-$ if f$trnlnm(P1,"LNM$PROCESS") .NES. "" THEN DEASSIGN/PROCESS 'P1'
-$ exit
-$ endsubroutine
diff --git a/sr_vvms/del_sec.c b/sr_vvms/del_sec.c
deleted file mode 100644
index 4869466..0000000
--- a/sr_vvms/del_sec.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <psldef.h>
-#include <secdef.h>
-#include <descrip.h>
-#include <prvdef.h>
-#include "del_sec.h"
-
-int del_sec(uint4 flags,struct dsc$descriptor *gdsnam,char *ident)
-{
-int4 status;
-uint4	prvadr[2], prvprv[2];
-
-prvadr[1] = 0;
-prvadr[0] = PRV$M_SYSGBL | PRV$M_PRMGBL;
-status = sys$setprv(TRUE, &prvadr[0], FALSE, &prvprv[0]);
-if (status == SS$_NORMAL)
-{	status = sys$dgblsc(flags,gdsnam,ident);
-}
-if (~prvprv[0] & (PRV$M_SYSGBL | PRV$M_PRMGBL))
-{	prvprv[0] = ~prvprv[0];
-	prvprv[1] = ~prvprv[1];
-	sys$setprv(FALSE, &prvprv[0], FALSE, 0);
-}
-return status;
-}
diff --git a/sr_vvms/del_sec.h b/sr_vvms/del_sec.h
deleted file mode 100644
index c6297e9..0000000
--- a/sr_vvms/del_sec.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DEL_SEC_INCLUDED
-#define DEL_SEC_INCLUDED
-
-int del_sec(uint4 flags, struct dsc$descriptor *gdsnam, char *ident);
-
-#endif /* DEL_SEC_INCLUDED */
diff --git a/sr_vvms/desblk.h b/sr_vvms/desblk.h
deleted file mode 100644
index b642c9b..0000000
--- a/sr_vvms/desblk.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-typedef struct {
-	int4	link;
-	int4	*exit_hand;
-	int4	arg_cnt;
-	int4	*cond_val;
-} desblk;
-
-#define	SET_EXIT_HANDLER(exi_blk, exit_handler, exit_condition)		\
-{									\
-	exi_blk.exit_hand = &exit_handler;				\
-	exi_blk.arg_cnt = 1;						\
-	exi_blk.cond_val = &exit_condition;				\
-	EXIT_HANDLER(&exi_blk);						\
-}
diff --git a/sr_vvms/desc2mval.c b/sr_vvms/desc2mval.c
deleted file mode 100644
index 8de9094..0000000
--- a/sr_vvms/desc2mval.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "stringpool.h"
-#include <descrip.h>
-#include "desc2mval.h"
-#include "mvalconv.h"
-
-GBLREF spdesc stringpool;
-
-error_def(ERR_ERRCALL);
-error_def(ERR_MAXSTRLEN);
-error_def(ERR_UNSDCLASS);
-error_def(ERR_UNSDDTYPE);
-
-void desc2mval (struct dsc$descriptor *src, mval *v)
-{
-	if ($is_desc64(src))
-		desc2mval_64((struct dsc64$descriptor *)src, v);
-	else
-		desc2mval_32(src, v);
-}
-
-void desc2mval_32(struct dsc$descriptor *src, mval *v)
-{
-	int4		status;
-	struct dsc$descriptor	dst;
-	double		dstnm;
-
-	switch(src->dsc$b_class)
-	{
-		case DSC$K_CLASS_S:	/* scalar or string descriptor */
-		case DSC$K_CLASS_D:	/* dynamic descriptor is same as _S for input */
-			v->mvtype = MV_STR;
-			switch(src->dsc$b_dtype)
-			{
-				case DSC$K_DTYPE_G:
-					double2s(src->dsc$a_pointer, v);
-					break;
-				case DSC$K_DTYPE_B:
-					MV_FORCE_MVAL(v, *(char *)src->dsc$a_pointer);
-					break;
-				case DSC$K_DTYPE_BU:
-					MV_FORCE_MVAL(v, *(unsigned char *)src->dsc$a_pointer);
-					break;
-				case DSC$K_DTYPE_W:
-					MV_FORCE_MVAL(v, *(short *)src->dsc$a_pointer);
-					break;
-				case DSC$K_DTYPE_WU:
-					MV_FORCE_MVAL(v, *(unsigned short *)src->dsc$a_pointer);
-					break;
-				case DSC$K_DTYPE_L:
-					MV_FORCE_MVAL(v, *(int4 *)src->dsc$a_pointer);
-					break;
-				case DSC$K_DTYPE_LU:
-				case DSC$K_DTYPE_Q:
-				case DSC$K_DTYPE_QU:
-				case DSC$K_DTYPE_D:
-				case DSC$K_DTYPE_F:
-				case DSC$K_DTYPE_H:
-					dst.dsc$w_length	= SIZEOF(double);
-					dst.dsc$b_dtype		= DSC$K_DTYPE_G;
-					dst.dsc$b_class		= DSC$K_CLASS_S;
-					dst.dsc$a_pointer	= &dstnm;
-					status = lib$cvt_dx_dx(src, &dst);
-					if (!(status & 1))
-						rts_error(VARLSTCNT(1) status);
-					double2s(&dstnm, v);
-					break;
-				case DSC$K_DTYPE_T:
-					ENSURE_STP_FREE_SPACE(src->dsc$w_length);
-					assert(stringpool.free >= stringpool.base);
-					v->str.addr = stringpool.free;
-					stringpool.free += v->str.len = src->dsc$w_length;
-					assert(stringpool.free <= stringpool.top);
-					memcpy(v->str.addr, src->dsc$a_pointer, v->str.len);
-					break;
-				default:
-					rts_error(VARLSTCNT(1) ERR_UNSDDTYPE);
-			}
-			break;
-		default:
-			rts_error(VARLSTCNT(7) ERR_UNSDCLASS, 5, ERR_ERRCALL, 3, CALLFROM);
-	}
-}
-
-void desc2mval_64 (struct dsc64$descriptor *src, mval *v)
-{
-	int4		status;
-	struct dsc64$descriptor	dst;
-	double		dstnm;
-
-	switch(src->dsc64$b_class)
-	{
-		case DSC64$K_CLASS_S:	/* scalar or string descriptor */
-		case DSC64$K_CLASS_D:	/* dynamic descriptor is same as _S for input */
-			v->mvtype = MV_STR;
-			switch(src->dsc64$b_dtype)
-			{
-				case DSC64$K_DTYPE_G:
-					double2s((double *)src->dsc64$pq_pointer, v);
-					break;
-				case DSC64$K_DTYPE_B:
-					MV_FORCE_MVAL(v, *(char *)src->dsc64$pq_pointer);
-					break;
-				case DSC64$K_DTYPE_BU:
-					MV_FORCE_MVAL(v, *(unsigned char *)src->dsc64$pq_pointer);
-					break;
-				case DSC64$K_DTYPE_W:
-					MV_FORCE_MVAL(v, *(short *)src->dsc64$pq_pointer);
-					break;
-				case DSC64$K_DTYPE_WU:
-					MV_FORCE_MVAL(v, *(unsigned short *)src->dsc64$pq_pointer);
-					break;
-				case DSC64$K_DTYPE_L:
-					MV_FORCE_MVAL(v, *(int4 *)src->dsc64$pq_pointer);
-					break;
-				case DSC64$K_DTYPE_LU:
-				case DSC64$K_DTYPE_Q:
-				case DSC64$K_DTYPE_QU:
-				case DSC64$K_DTYPE_FS:
-				case DSC64$K_DTYPE_F:
-				case DSC64$K_DTYPE_D:
-				case DSC64$K_DTYPE_H:
-					dst.dsc64$w_mbo = 1;
-					dst.dsc64$l_mbmo = -1;
-					dst.dsc64$q_length = SIZEOF(double);
-					dst.dsc64$b_dtype = DSC64$K_DTYPE_G;
-					dst.dsc64$b_class = DSC64$K_CLASS_S;
-					dst.dsc64$pq_pointer = (char *)&dstnm;
-					status = lib$cvt_dx_dx(src, &dst);
-					if (!(status & 1))
-						rts_error(VARLSTCNT(1) status);
-					double2s(&dstnm, v);
-					break;
-				case DSC64$K_DTYPE_T:
-					if(MAX_STRLEN < src->dsc64$q_length)
-						rts_error(VARLSTCNT(1) ERR_MAXSTRLEN);
-					ENSURE_STP_FREE_SPACE(src->dsc64$q_length);
-					assert(stringpool.free >= stringpool.base);
-					v->str.addr = stringpool.free;
-					stringpool.free += v->str.len = src->dsc64$q_length;
-					assert(stringpool.free <= stringpool.top);
-					memcpy(v->str.addr, src->dsc64$pq_pointer, v->str.len);
-					break;
-				default:
-					rts_error(VARLSTCNT(1) ERR_UNSDDTYPE);
-			}
-			break;
-		default:
-			rts_error(VARLSTCNT(7) ERR_UNSDCLASS, 5, ERR_ERRCALL, 3, CALLFROM);
-	}
-}
diff --git a/sr_vvms/desc2mval.h b/sr_vvms/desc2mval.h
deleted file mode 100644
index 26b377c..0000000
--- a/sr_vvms/desc2mval.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DESC2MVAL_INCLUDED
-#define DESC2MVAL_INCLUDED
-
-void desc2mval(struct dsc$descriptor *src, mval *v);
-void desc2mval_32(struct dsc$descriptor *src, mval *v);
-void desc2mval_64(struct dsc64$descriptor *src, mval *v);
-
-#endif /* DESC2MVAL_INCLUDED */
diff --git a/sr_vvms/dfntmpmbx.c b/sr_vvms/dfntmpmbx.c
deleted file mode 100644
index 62dc5ec..0000000
--- a/sr_vvms/dfntmpmbx.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <lnmdef.h>
-#include "vmsdtype.h"
-
-int4 dfntmpmbx (len, addr)
-short	len;
-char	*addr;
-{
-	int4			status;
-	int4			ret;
-	$DESCRIPTOR		(proc_dir, "LNM$PROCESS_DIRECTORY");
-	$DESCRIPTOR		(lnm$tmpmbx, "LNM$TEMPORARY_MAILBOX");
-	struct
-	{
-		item_list_3	le[1];
-		int4		terminator;
-	} item_list;
-
-	item_list.le[0].buffer_length		= len;
-	item_list.le[0].item_code		= LNM$_STRING;
-	item_list.le[0].buffer_address		= addr;
-	item_list.le[0].return_length_address	= &ret;
-	item_list.terminator			= 0;
-
-	status = sys$crelnm (0, &proc_dir, &lnm$tmpmbx, 0, &item_list);
-	return status;
-}
diff --git a/sr_vvms/dfntmpmbx.h b/sr_vvms/dfntmpmbx.h
deleted file mode 100644
index c693e75..0000000
--- a/sr_vvms/dfntmpmbx.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DFNTMPMBX_INCLUDED
-#define DFNTMPMBX_INCLUDED
-
-int4 dfntmpmbx(short len, char *addr);
-
-#endif /* DFNTMPMBX_INCLUDED */
diff --git a/sr_vvms/disable_ctrl.c b/sr_vvms/disable_ctrl.c
deleted file mode 100644
index aeebeec..0000000
--- a/sr_vvms/disable_ctrl.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-void disable_ctrl(mask_addr, ctrl_mask)
-    uint4   *mask_addr;
-    int4	    *ctrl_mask;
-
-    {
-	lib$disable_ctrl(mask_addr, ctrl_mask);
-    }
diff --git a/sr_vvms/disk_block_available.c b/sr_vvms/disk_block_available.c
deleted file mode 100644
index 8fbf916..0000000
--- a/sr_vvms/disk_block_available.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* disk_block_available(int fd, uint4 *free_blocks)
- *      parameter:
- *              fd:     file descriptor of the file that is located
- *                      on the disk being examined
- *		free_blocks:
- *			address to an uint4 where the number of
- *			free blocks will be returned to
- *      return:
- *		the status of the system service sys$getdviw()
- *		if status is normal, then free_blocks is the correct value
- *		otherwise, free_blocks is undetermined
- */
-#include "mdef.h"
-
-#include <dvidef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-#include "vmsdtype.h"
-#include "disk_block_available.h"
-
-int4 disk_block_available(int fd, uint4 *free_blocks)
-{
-	unsigned short		retlen;
-        struct
-        {
-                item_list_3	item;
-                int4		terminator;
-        } item_list;
-	short			iosb[4];
-	int4			status;
-
-	item_list.item.buffer_length         = 4;
-	item_list.item.item_code             = DVI$_FREEBLOCKS;
-	item_list.item.buffer_address        = free_blocks;
-	item_list.item.return_length_address = &retlen;
-	item_list.terminator 		     = 0;
-	status = sys$getdviw(EFN$C_ENF, fd, NULL, &item_list, iosb, NULL, 0, 0);
-	if (SS$_NORMAL == status)
-		status = iosb[0];
-
-	return status;
-}
diff --git a/sr_vvms/disk_block_available.h b/sr_vvms/disk_block_available.h
deleted file mode 100644
index 366a114..0000000
--- a/sr_vvms/disk_block_available.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef DISK_BLOCK_AVAILABLE_INCLUDED
-#define DISK_BLOCK_AVAILABLE_INCLUDED
-
-int4 disk_block_available(int fd, uint4 *free_blocks);
-
-#endif /* DISK_BLOCK_AVAILABLE_INCLUDED */
diff --git a/sr_vvms/dm_read.c b/sr_vvms/dm_read.c
deleted file mode 100644
index 63e243f..0000000
--- a/sr_vvms/dm_read.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-#include <efndef.h>
-
-
-#include "comline.h"
-#include "io.h"
-#include "iotimer.h"
-#include "iottdef.h"
-#include "stringpool.h"
-#include "op.h"
-#include "outofband.h"
-#include "m_recall.h"
-#include "dm_read.h"
-
-GBLDEF int		comline_index;
-
-GBLREF mstr		*comline_base;
-GBLREF io_pair		io_curr_device;
-GBLREF io_pair		io_std_device;
-GBLREF bool		prin_in_dev_failure;
-GBLREF int4		outofband;
-GBLREF bool		ctrlu_occurred;
-GBLREF spdesc		stringpool;
-GBLREF io_desc		*active_device;
-
-#define	CCPROMPT	0x00010000
-#define CCRECALL	0x008D0000
-
-void dm_read(mval *v)
-{
-	boolean_t	done;
-	unsigned short	iosb[4];
-	int		cl, index;
-	uint4		max_width, save_modifiers, save_term_msk, status;
-	read_iosb	stat_blk;
-	io_desc		*io_ptr;
-	t_cap		s_mode;
-	d_tt_struct	*tt_ptr;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	if (tt == io_curr_device.out->type)
-		iott_flush(io_curr_device.out);
-	if (!comline_base)
-	{
-		comline_base = malloc(MAX_RECALL * SIZEOF(mstr));
-		memset(comline_base, 0, (MAX_RECALL * SIZEOF(mstr)));
-	}
-	io_ptr = io_curr_device.in;
-	assert(tt == io_ptr->type);
-	assert(dev_open == io_ptr->state);
-	if (io_ptr->dollar.zeof)
-		op_halt();
-	if (outofband)
-	{
-		outofband_action(FALSE);
-		assert(FALSE);
-	}
-	tt_ptr = (d_tt_struct *)io_ptr->dev_sp;
-	max_width = (io_ptr->width > tt_ptr->in_buf_sz) ? io_ptr->width : tt_ptr->in_buf_sz;
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.free <= stringpool.top);
-	ENSURE_STP_FREE_SPACE(max_width);
-	active_device = io_ptr;
-	index = 0;
-	/* the following section of code puts the terminal in "easy of use" mode */
-	status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_SENSEMODE,
-		&stat_blk, 0, 0, &s_mode, 12, 0, 0, 0, 0);
-	if (SS$_NORMAL == status)
-		status = stat_blk.status;
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	if ((s_mode.ext_cap & TT2$M_PASTHRU) ||
-		!(s_mode.ext_cap & TT2$M_EDITING) ||
-		!(s_mode.term_char & TT$M_ESCAPE) ||
-		!(s_mode.term_char & TT$M_TTSYNC))
-	{
-		s_mode.ext_cap &= (~TT2$M_PASTHRU);
-		s_mode.ext_cap |= TT2$M_EDITING;
-		s_mode.term_char |= (TT$M_ESCAPE | TT$M_TTSYNC);
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel,
-			IO$_SETMODE, &stat_blk, 0, 0, &s_mode, 12, 0, 0, 0, 0);
-		if (SS$_NORMAL == status)
-			status = stat_blk.status;
-		if (SS$_NORMAL != status)
-			/* The following error is probably going to cause the terminal state to get mucked up */
-			rts_error(VARLSTCNT(1) status);
-		/* the following flag is normally used by iott_rdone, iott_readfl and iott_use but dm_read resets it when done */
-		tt_ptr->term_chars_twisted = TRUE;
-	}
-	save_modifiers = (unsigned)tt_ptr->item_list[0].addr;
-	tt_ptr->item_list[0].addr = (unsigned)tt_ptr->item_list[0].addr | TRM$M_TM_NORECALL & (~TRM$M_TM_NOECHO);
-	tt_ptr->item_list[1].addr = NO_M_TIMEOUT;			/* reset key click timeout */
-	save_term_msk = ((io_termmask *)tt_ptr->item_list[2].addr)->mask[0];
-	((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = TERM_MSK | (SHFT_MSK << CTRL_B) | (SHFT_MSK << CTRL_Z);
-	tt_ptr->item_list[4].buf_len = (TREF(gtmprompt)).len;
-	do
-	{
-		done = TRUE;
-		assert(0 <= index && index <= MAX_RECALL + 1);
-		cl = clmod(comline_index - index);
-		if ((0 == index) || (MAX_RECALL + 1 == index))
-			tt_ptr->item_list[5].buf_len	= 0;
-		else
-		{
-			tt_ptr->item_list[5].buf_len	= comline_base[cl].len;
-			tt_ptr->item_list[5].addr	= comline_base[cl].addr;
-		}
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel, tt_ptr->read_mask, &stat_blk, 0, 0,
-			stringpool.free, tt_ptr->in_buf_sz, 0, 0, tt_ptr->item_list, 6 * SIZEOF(item_list_struct));
-		if (outofband)
-			break;
-		if (SS$_NORMAL != status)
-		{
-			if (io_curr_device.in == io_std_device.in && io_curr_device.out == io_std_device.out)
-			{
-				if (prin_in_dev_failure)
-					sys$exit(status);
-				else
-					prin_in_dev_failure = TRUE;
-			}
-			break;
-		}
-		if (stat_blk.term_length > ESC_LEN - 1)
-		{
-			stat_blk.term_length = ESC_LEN - 1;
-			if (SS$_NORMAL == stat_blk.status)
-				stat_blk.status = SS$_PARTESCAPE;
-		}
-		if (SS$_NORMAL != stat_blk.status)
-		{
-			if (ctrlu_occurred)
-			{
-				index = 0;
-				done = FALSE;
-				ctrlu_occurred = FALSE;
-				iott_wtctrlu(stat_blk.char_ct + (TREF(gtmprompt)).len, io_ptr);
-			} else
-			{
-				status = stat_blk.status;
-				break;
-			}
-		} else
-		{
-			if ((CTRL_B == stat_blk.term_char) ||
-				(stat_blk.term_length == tt_ptr->key_up_arrow.len &&
-				!memcmp(tt_ptr->key_up_arrow.addr, stringpool.free + stat_blk.char_ct,
-				tt_ptr->key_up_arrow.len)))
-			{
-				done = FALSE;
-				if ((MAX_RECALL + 1 != index) && (comline_base[cl].len || !index))
-					index++;
-			} else
-			{
-				if (stat_blk.term_length == tt_ptr->key_down_arrow.len &&
-					!memcmp(tt_ptr->key_down_arrow.addr, stringpool.free + stat_blk.char_ct,
-					tt_ptr->key_down_arrow.len))
-				{
-					done = FALSE;
-					if (index)
-						--index;
-				}
-			}
-			if (!done)
-			{
-				status = sys$qiow(EFN$C_ENF, tt_ptr->channel,
-					IO$_WRITEVBLK, &iosb, NULL, 0,
-					tt_ptr->erase_to_end_line.addr, tt_ptr->erase_to_end_line.len,
-					0, CCRECALL, 0, 0);
-			} else
-			{
-				if (stat_blk.char_ct > 0
-					&& (('R' == *stringpool.free) || ('r' == *stringpool.free)) &&
-					(TRUE == m_recall(stat_blk.char_ct, stringpool.free, &index, tt_ptr->channel)))
-				{
-					assert(-1 <= index && index <= MAX_RECALL);
-					done = FALSE;
-					flush_pio();
-					status = sys$qiow(EFN$C_ENF, tt_ptr->channel,
-						IO$_WRITEVBLK, &iosb, NULL, 0,
-						0, 0, 0, CCPROMPT, 0, 0);
-					if ((-1 == index) || (CTRL_Z == stat_blk.term_char))
-						index = 0;
-				}
-			}
-			if (!done)
-			{
-				if (SS$_NORMAL == status)
-					status = iosb[0];
-				if (SS$_NORMAL != status)
-					break;
-			} else
-			{
-				if (CTRL_Z == stat_blk.term_char)
-					io_curr_device.in->dollar.zeof = TRUE;
-			}
-		}
-	} while (!done);
-	/* put the terminal back the way the user had it set up */
-	tt_ptr->item_list[0].addr = save_modifiers;
-	((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = save_term_msk;
-	if (tt_ptr->term_chars_twisted)
-	{
-		s_mode.ext_cap &= (~TT2$M_PASTHRU & ~TT2$M_EDITING);
-		s_mode.ext_cap |= (tt_ptr->ext_cap & (TT2$M_PASTHRU | TT2$M_EDITING));
-		s_mode.term_char &= (~TT$M_ESCAPE);
-		s_mode.term_char |= (tt_ptr->term_char & TT$M_ESCAPE);
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel,
-			IO$_SETMODE, iosb, 0, 0, &s_mode, 12, 0, 0, 0, 0);
-		if (SS$_NORMAL == status)
-			status = iosb[0];
-		tt_ptr->term_chars_twisted = FALSE;
-	}
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	if (outofband)
-	{
-		/* outofband not going to help more than a error so it's checked 2nd */
-		outofband_action(FALSE);
-		assert(FALSE);
-	}
-	v->mvtype = MV_STR;
-	v->str.len = stat_blk.char_ct;
-	v->str.addr = stringpool.free;
-	if (stat_blk.char_ct)
-	{
-		cl = clmod(comline_index - 1);
-		if (stat_blk.char_ct != comline_base[cl].len || memcmp(comline_base[cl].addr, stringpool.free, stat_blk.char_ct))
-		{
-			comline_base[comline_index] = v->str;
-			comline_index = clmod(comline_index + 1);
-		}
-		stringpool.free += stat_blk.char_ct;
-	}
-	assert(stringpool.free <= stringpool.top);
-	if ((io_ptr->dollar.x += stat_blk.char_ct) > io_ptr->width && io_ptr->wrap)
-	{
-		/* dm_read doesn't maintain the other io status isv's,
-		 but it does $x and $y so the user can find out where they wound up */
-		io_ptr->dollar.y += io_ptr->dollar.x / io_ptr->width;
-		if (io_ptr->length)
-			io_ptr->dollar.y %= io_ptr->length;
-		io_ptr->dollar.x %= io_ptr->width;
-	}
-	active_device = 0;
-}
diff --git a/sr_vvms/do_verify.c b/sr_vvms/do_verify.c
deleted file mode 100644
index 0aa33e9..0000000
--- a/sr_vvms/do_verify.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* do_verify.c VMS - call user-supplied collation type and version
- *                   verification routine.
- */
-
-#include "mdef.h"
-#include "collseq.h"
-
-int4 do_verify(csp, type, ver)
-	collseq *csp;
-	unsigned char type, ver;
-{
-	return (*csp->verify)(type,ver);
-}
diff --git a/sr_vvms/do_xform.c b/sr_vvms/do_xform.c
deleted file mode 100644
index ac45b7b..0000000
--- a/sr_vvms/do_xform.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-
-#include "collseq.h"
-#include "do_xform.h"
-
-#define	MAX_INPUT_LEN 65535
-
-void do_xform(collseq *csp, int fc_type, mstr *input, mstr *output, int *length)
-{
-	struct dsc64$descriptor outbuff1, insub1;
-	struct dsc$descriptor outbuff, insub;
-	int4	status;
-
-	error_def(ERR_COLLARGLONG);
-
-	DO_XFORM_RETURN_IF_NULL_STRING(input, output, length);
-	assert (0 == csp->argtype || 1 == csp->argtype);
-	assert(XFORM == fc_type || XBACK == fc_type);
-	if (0 == csp->argtype)
-	{
-		if (MAX_INPUT_LEN < input->len)
-			rts_error(VARLSTCNT(3) ERR_COLLARGLONG, 1, csp->act);
-		insub.dsc$b_dtype = DSC$K_DTYPE_T;
-		insub.dsc$b_class = DSC$K_CLASS_S;
-		insub.dsc$w_length = input->len;
-		insub.dsc$a_pointer = input->addr;
-
-		outbuff.dsc$b_dtype = DSC$K_DTYPE_T;
-		outbuff.dsc$b_class = DSC$K_CLASS_S;
-		outbuff.dsc$w_length = output->len;
-		outbuff.dsc$a_pointer = output->addr;
-
-		if (XFORM == fc_type)
-			status = (csp->xform)(&insub, 1, &outbuff, length);
-		else
-			status = (csp->xback)(&insub, 1, &outbuff, length);
-		/* If collation routine has changed outbuff1.val, it stores the transformed value in the
-		 * externally allocated buffer. In this case, update output->addr before returning. */
-		if (outbuff.dsc$a_pointer != output->addr)
-			output->addr = outbuff.dsc$a_pointer;
-	} else
-	{
-		insub1.dsc64$b_dtype = DSC64$K_DTYPE_T;
-		insub1.dsc64$b_class = DSC64$K_CLASS_S;
-		insub1.dsc64$q_length = input->len;
-		insub1.dsc64$pq_pointer = input->addr;
-
-		outbuff1.dsc64$b_dtype = DSC64$K_DTYPE_T;
-		outbuff1.dsc64$b_class = DSC64$K_CLASS_S;
-		outbuff1.dsc64$q_length = output->len;
-		outbuff1.dsc64$pq_pointer = output->addr;
-
-		if (XFORM == fc_type)
-			status = (csp->xform)(&insub1, 1, &outbuff1, length);
-		else
-			status = (csp->xback)(&insub1, 1, &outbuff1, length);
-		/* If collation routine has changed outbuff1.val, it stores the transformed value in the
-		 * externally allocated buffer. In this case, update output->addr before returning. */
-		if (outbuff1.dsc64$pq_pointer != output->addr)
-		{
-			output->addr = (char*)(outbuff1.dsc64$pq_pointer);
-			assert(output->addr == outbuff1.dsc64$pq_pointer); /* ensure 32-bit address */
-		}
-	}
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-}
diff --git a/sr_vvms/do_zcall.c b/sr_vvms/do_zcall.c
deleted file mode 100644
index dfb6f25..0000000
--- a/sr_vvms/do_zcall.c
+++ /dev/null
@@ -1,569 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include <inttypes.h>
-#include <libdef.h>
-#include "stringpool.h"
-#include "zcall.h"
-#include "zcdef.h"
-#include "io.h"
-#include "mval2desc.h"
-#include "desc2mval.h"
-#include "setterm.h"
-#include "gtmdbglvl.h"		/* for VERIFY_STORAGE_CHAINS macro */
-#include "gtm_malloc.h"		/* for VERIFY_STORAGE_CHAINS macro */
-
-typedef	struct lclarg_type
-{
-	unsigned char		skip;
-	unsigned char		initted;
-	unsigned char		filler[2];
-	unsigned char		*zctab;
-	struct dsc64$descriptor	dsc;
-	unsigned char		data[16];
-} lclarg;
-
-#define	VAL_NONE	0
-#define	VAL_INPUTMVAL	1
-#define	VAL_ZCTABVAL	2
-#define	N_DSIZES	32
-/*	memset(dsizes, 0, N_DSIZES * SIZEOF(dsizes[0]));
-	dsizes[ZC$DTYPE_STRING]		= -1;
-	dsizes[ZC$DTYPE_BYTE]		= 1;
-	dsizes[ZC$DTYPE_WORD]		= 2;
-	dsizes[ZC$DTYPE_LONG]		= 4;
-	dsizes[ZC$DTYPE_QUAD]		= 8;
-	dsizes[ZC$DTYPE_FLOATING]	= 4;
-	dsizes[ZC$DTYPE_DOUBLE]		= 8;
-	dsizes[ZC$DTYPE_G_FLOATING]	= 8;
-	dsizes[ZC$DTYPE_H_FLOATING]	= 16;
-*/
-#define INIT_64BITDESC							\
-{									\
-				is_a_desc64 = TRUE;			\
-				dsc64 = &lclp->dsc;			\
-				dsc64->dsc64$w_mbo = 1;			\
-				dsc64->dsc64$l_mbmo = -1;		\
-				type = &dsc64->dsc64$b_dtype;		\
-				class = &dsc64->dsc64$b_class;		\
-}
-
-#define INIT_32BITDESC								\
-{										\
-				is_a_desc64 = FALSE;				\
-				dsc = (struct dsc$descriptor *)&lclp->dsc;	\
-				type = &dsc->dsc$b_dtype;			\
-				class = &dsc->dsc$b_class;			\
-}
-
-static readonly short	dsizes[N_DSIZES] = {
-	0, 0, 1, 2, 4, 0, 1, 2, 4, 8, 4, 8,
-	0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-	0, 0, 0, 8, 16, 0, 0, 0
-};
-
-GBLREF spdesc	stringpool;
-GBLREF io_pair	io_std_device;
-
-LITREF mval	skiparg;
-
-error_def(ERR_MAXSTRLEN);
-error_def(ERR_VMSMEMORY2);
-error_def(ERR_ZCALLTABLE);
-error_def(ERR_ZCCONMSMTCH);
-error_def(ERR_ZCCONVERT);
-error_def(ERR_ZCINPUTREQ);
-error_def(ERR_ZCOPT0);
-error_def(ERR_ZCPOSOVR);
-error_def(ERR_ZCUNKMECH);
-error_def(ERR_ZCUNKQUAL);
-error_def(ERR_ZCUNKTYPE);
-error_def(ERR_ZCWRONGDESC);
-
-void do_zcall(mval		*dst,
-	      int		mask,
-	      mval		**mvallist, mval **mvallistend,
-	      zctabrtn		*zcrtn,
-	      lclarg		*lcllist, lclarg *lcllistend)
-{
-	zctabret		*zcret;
-	zctabinput		*firstin;
-	zctaboutput		*firstout, *lastout;
-	int4			status, alloclen;
-	zctabinput		*inp;
-	zctaboutput		*outp;
-	mval			**mvpp;
-	lclarg			*lclp;
-	struct dsc64$descriptor	*dsc64;
-	struct dsc$descriptor	*dsc, *valdsc;
-	unsigned char 		*type;
-	unsigned char		*class;
-	boolean_t		is_a_desc64;
-	unsigned char		use_value;
-	union
-	{
-		double		f0;
-		int		r0;
-	} save_ret;
-	uint4			dstlen, indx, byref;
-	struct dsc$descriptor	tmpdsc;
-	mval			tmpmval;
-	uint64_t		val_qw;
-	unsigned short		val_us;
-
-	zcret = (zctabret *)((char *)zcrtn + SIZEOF(zctabrtn) - 1 + zcrtn->callnamelen);
-	firstin = (zctabinput *)ROUND_UP((int) zcret + SIZEOF(zctabret), SIZEOF(int4));
-	firstout = firstin + zcrtn->n_inputs;
-	lastout = firstout + zcrtn->n_outputs;
-	for (lclp = lcllist; lclp < lcllistend; lclp++)
-		lclp->initted = FALSE;
-	is_a_desc64 = FALSE;
-	for (inp = firstin, mvpp = mvallist; inp < (zctabinput *)firstout; inp++)
-	{
-		switch (inp->type)	/* guard type */
-		{
-			case ZC$DTYPE_STRING:
-			case ZC$DTYPE_BYTE:
-			case ZC$DTYPE_BYTEU:
-			case ZC$DTYPE_WORD:
-			case ZC$DTYPE_WORDU:
-			case ZC$DTYPE_LONG:
-			case ZC$DTYPE_LONGU:
-			case ZC$DTYPE_QUAD:
-			case ZC$DTYPE_FLOATING:
-			case ZC$DTYPE_DOUBLE:
-			case ZC$DTYPE_H_FLOATING:
-				break;
-			default:
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCUNKTYPE);
-		}
-		switch (inp->mechanism)	/* guard mechanism */
-		{
-			case ZC$MECH_VALUE:
-			case ZC$MECH_REFERENCE:
-			case ZC$MECH_DESCRIPTOR:
-			case ZC$MECH_DESCRIPTOR64:
-				break;
-			default:
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCUNKMECH);
-		}
-		assertpro(mvpp <= mvallistend);
-		lclp = lcllist + inp->position - 1;
-		if (lclp->initted)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZCALLTABLE, 0, ERR_ZCPOSOVR, 1, inp->position);
-		lclp->skip = FALSE;
-		lclp->zctab = inp;
-		if (ZC$MECH_DESCRIPTOR64 == inp->mechanism)
-		{
-			INIT_64BITDESC;
-		} else
-		{
-			INIT_32BITDESC;
-		}
-		use_value = VAL_NONE;
-		switch (inp->qualifier)
-		{
-			case ZC$IQUAL_CONSTANT:
-				use_value = VAL_ZCTABVAL;
-				break;
-			case ZC$IQUAL_OPTIONAL:
-				if (mvpp == mvallistend)
-					lclp->skip = TRUE;
-				else if (!MV_DEFINED(*mvpp) && M_ARG_SKIPPED(*mvpp))
-				{
-					lclp->skip = TRUE;
-					mvpp++;
-				} else
-					use_value = VAL_INPUTMVAL;
-				break;
-			case ZC$IQUAL_OPTIONAL_0:
-				if ((mvpp == mvallistend) || (!MV_DEFINED(*mvpp) && M_ARG_SKIPPED(*mvpp)))
-				{
-					if (!(ZC$MECH_REFERENCE == inp->mechanism ||
-					      ZC$MECH_DESCRIPTOR == inp->mechanism || ZC$MECH_DESCRIPTOR64 == inp->mechanism))
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ZCALLTABLE, 0, ERR_ZCOPT0);
-					lclp->skip = TRUE;
-					if (is_a_desc64)
-						dsc64->dsc64$pq_pointer = 0;
-					else
-						dsc->dsc$a_pointer = 0;
-					if (mvpp < mvallistend)
-						mvpp++;
-				} else
-					use_value = VAL_INPUTMVAL;
-				break;
-			case ZC$IQUAL_DEFAULT:
-				if (mvpp == mvallistend)
-					use_value = VAL_ZCTABVAL;
-				else if (!MV_DEFINED(*mvpp) && (*mvpp)->str.addr == (*mvpp))
-				{
-					use_value = VAL_ZCTABVAL;
-					mvpp++;
-				} else
-					use_value = VAL_INPUTMVAL;
-				break;
-			case ZC$IQUAL_REQUIRED:
-				if (mvpp == mvallistend || (!MV_DEFINED(*mvpp) && (*mvpp)->str.addr == (*mvpp)))
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCINPUTREQ);
-				use_value = VAL_INPUTMVAL;
-				break;
-			default:
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ZCALLTABLE, 0, ERR_ZCUNKQUAL);
-		}
-		switch (use_value)
-		{
-			case VAL_INPUTMVAL:
-				if (!is_a_desc64)
-					dsc->dsc$w_length = 0;
-				else
-					dsc64->dsc64$q_length = 0;
-				*class = DSC$K_CLASS_S;
-				*type = inp->type;
-				if (ZC$DTYPE_STRING == inp->type)
-				{
-					MV_FORCE_STR(*mvpp);
-					if (!is_a_desc64)
-					{
-						if (65535 < (*mvpp)->str.len)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCWRONGDESC);
-						dsc->dsc$w_length =(*mvpp)->str.len ;
-						dsc->dsc$a_pointer = (*mvpp)->str.addr;
-					} else
-					{
-						dsc64->dsc64$q_length = (*mvpp)->str.len;
-						dsc64->dsc64$pq_pointer = (*mvpp)->str.addr;
-					}
-				} else
-				{
-					if (!is_a_desc64)
-					{
-						dsc->dsc$w_length = dsizes[inp->type];
-						dsc->dsc$a_pointer = &lclp->data;
-					} else
-					{
-						dsc64->dsc64$q_length = dsizes[inp->type];
-						dsc64->dsc64$pq_pointer = (char *)&lclp->data;
-					}
-					assert(is_a_desc64 ? dsc64->dsc64$q_length : dsc->dsc$w_length);
-					mval2desc(*mvpp, &lclp->dsc);
-				}
-				mvpp++;
-				break;
-			case VAL_ZCTABVAL:
-				if (ZC$DTYPE_STRING == inp->type)
-				{
-					/*
-					  for this case inp->value cannot be a 64-bit descriptor, inp->value is the descriptor
-					  created by putval macro in gtmzcall.max. putval creates a descriptor for each input
-					  string value by using the directive .ascid. So for descriptor64, we only copy the
-					  32-bit contents to dsc64.
-					*/
-					if (is_a_desc64)
-					{
-						valdsc = (struct dsc$descriptor *)inp->value;
-						dsc64->dsc64$w_mbo = 1;
-						dsc64->dsc64$b_dtype = valdsc->dsc$b_dtype;
-						dsc64->dsc64$b_class = valdsc->dsc$b_class;
-						dsc64->dsc64$l_mbmo = -1;
-						dsc64->dsc64$q_length = valdsc->dsc$w_length;
-						dsc64->dsc64$pq_pointer = valdsc->dsc$a_pointer;
-					}
-					else
-						*dsc = *(struct dsc$descriptor *)inp->value;
-				} else
-				{
-					*type = inp->type;
-					*class = DSC$K_CLASS_S;
-					if (!is_a_desc64)
-					{
-						dsc->dsc$w_length = dsizes[inp->type];
-						dsc->dsc$a_pointer = &lclp->data;
-						memcpy(dsc->dsc$a_pointer, inp->value, dsizes[inp->type]);
-					} else
-					{
-						dsc64->dsc64$q_length = dsizes[inp->type];
-						dsc64->dsc64$pq_pointer = (char *)&lclp->data;
-						memcpy(dsc64->dsc64$pq_pointer, inp->value, dsizes[inp->type]);
-					}
-				}
-				break;
-			case VAL_NONE:
-				break;
-			default:
-				assertpro(FALSE && use_value);
-				break;		/* though not necessary, keep compiler on some platforms happy */
-		}
-		lclp->initted = TRUE;
-	}
-	assert(inp == (zctabinput *)firstout);
-	if (mvpp < mvallistend) rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCCONMSMTCH);
-	assert(mvpp == mvallistend);
-	is_a_desc64 = FALSE;
-	for (outp = firstout; outp < lastout; outp++)
-	{
-		switch (outp->type)	/* guard type */
-		{
-			case ZC$DTYPE_STRING:
-			case ZC$DTYPE_BYTE:
-			case ZC$DTYPE_BYTEU:
-			case ZC$DTYPE_WORD:
-			case ZC$DTYPE_WORDU:
-			case ZC$DTYPE_LONG:
-			case ZC$DTYPE_LONGU:
-			case ZC$DTYPE_QUAD:
-			case ZC$DTYPE_FLOATING:
-			case ZC$DTYPE_DOUBLE:
-			case ZC$DTYPE_H_FLOATING:
-				break;
-			default:
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCUNKTYPE);
-		}
-		switch (outp->mechanism)	/* guard mechanism */
-		{
-			case ZC$MECH_VALUE:
-			case ZC$MECH_REFERENCE:
-			case ZC$MECH_DESCRIPTOR:
-			case ZC$MECH_DESCRIPTOR64:
-				break;
-			default:
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZCUNKMECH);
-		}
-		switch (outp->qualifier)	/* guard qualifier */
-		{
-			case ZC$OQUAL_REQUIRED:
-			case ZC$OQUAL_DUMMY:
-			case ZC$OQUAL_PREALLOCATE:
-				break;
-			default:
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ZCALLTABLE, 0, ERR_ZCUNKQUAL);
-		}
-		lclp = lcllist + outp->position - 1;
-		if (lclp->initted)
-		{
-			inp = lclp->zctab;
-			if (lclp->skip || outp->type != inp->type || outp->mechanism != inp->mechanism ||
-			    inp->type == ZC$DTYPE_STRING || outp->qualifier == ZC$OQUAL_PREALLOCATE)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZCALLTABLE, 0, ERR_ZCPOSOVR, 1, outp->position);
-		} else
-		{
-			lclp->skip = FALSE;
-			lclp->zctab = outp;
-			if (ZC$MECH_DESCRIPTOR64 == outp->mechanism)
-			{
-				INIT_64BITDESC;
-			} else
-			{
-				INIT_32BITDESC;
-			}
-			*class = DSC$K_CLASS_S;
-			*type = outp->type;
-			if (outp->type == ZC$DTYPE_STRING)
-			{
-				assert(ZC$MECH_DESCRIPTOR == outp->mechanism || ZC$MECH_DESCRIPTOR64 == outp->mechanism );
-				if (!is_a_desc64)
-				{
-					dsc->dsc$w_length = 0;
-					dsc->dsc$a_pointer = 0;
-				} else
-				{
-					dsc64->dsc64$q_length = 0;
-					dsc64->dsc64$pq_pointer = 0;
-				}
-				if (ZC$OQUAL_PREALLOCATE == outp->qualifier && dst)
-				{	/* if no output string, ignore this, else allocate space for the output string */
-					assert((0 < outp->value) && (outp->value <= MAX_STRLEN));
-					alloclen = outp->value;
-					if (is_a_desc64)
-					{
-						val_qw = alloclen;
-						status = lib$sget1_dd_64(&val_qw, dsc64);
-					} else
-					{
-						val_us = alloclen;
-						status = lib$sget1_dd(&val_us, dsc);
-					}
-					if (!(status & 1))
-					{
-						if (LIB$_INSVIRMEM == status)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_VMSMEMORY2, 1, alloclen);
-						else
-						{	/* Only other return code is fatal internal error */
-							assert(LIB$_FATERRLIB == status);
-							assertpro(LIB$_INSVIRMEM == status);	/* to force dump file creation */
-						}
-					}
-				} else
-				{
-					assert(0 == outp->value);
-					*class = DSC$K_CLASS_D;
-				}
-			} else
-			{
-				if (!is_a_desc64)
-				{
-					dsc->dsc$w_length = dsizes[inp->type];
-					dsc->dsc$a_pointer = &lclp->data;
-				} else
-				{
-					dsc64->dsc64$q_length = dsizes[inp->type];
-					dsc64->dsc64$pq_pointer = (char *)&lclp->data;
-				}
-				assert(is_a_desc64 ? dsc64->dsc64$q_length : dsc->dsc$w_length);
-			}
-		}
-	}
-	assert(outp == lastout);
-	if (zcrtn->outbnd_reset)	/* if indicated, disable our outofband handling */
-	{
-		if (io_std_device.in->type == tt)
-			resetterm(io_std_device.in);
-		zc_call(zcrtn, zcret, lcllist, lcllistend, &save_ret);
-		if (io_std_device.in->type == tt)
-			setterm(io_std_device.in);
-	} else
-		zc_call(zcrtn, zcret, lcllist, lcllistend, &save_ret);
-	VERIFY_STORAGE_CHAINS;
-	if (mask)
-	{
-		for (indx = 0;; indx++)
-		{
-			if (!mask)
-				break;
-			byref = mask & 1;
-			mask >>= 1;
-			if (!byref)
-				continue;
-			inp = firstin + indx;
-			lclp = lcllist + inp->position - 1;
-			if (!lclp->skip)
-			{
-				desc2mval(&lclp->dsc, &tmpmval);
-				mvpp = mvallist + indx;
-				**mvpp = tmpmval;
-			}
-		}
-	}
-	if (dst != NULL)	/* if a return value expected */
-	{	/* Allocate space in stringpool for destination mval */
-		dst->mvtype = 0;
-		dstlen = 0;
-		if (ZC$RETC_VALUE == zcret->class)
-			dstlen += MAXNUMLEN;
-		for (outp = firstout; outp < lastout; outp++)
-		{
-			if (ZC$OQUAL_DUMMY != outp->qualifier)
-			{
-				if (dstlen)
-					dstlen += 1;
-				lclp = lcllist + outp->position - 1;
-				if ($is_desc64(&lclp->dsc))
-				{
-					INIT_64BITDESC;
-				} else
-				{
-					INIT_32BITDESC;
-				}
-				if (DSC$K_DTYPE_T != *type)
-					dstlen += MAXNUMLEN;
-				else
-				{
-					if (!is_a_desc64)
-						dstlen += dsc->dsc$w_length;
-					else {
-						if (MAX_STRLEN < dsc64->dsc64$q_length)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXSTRLEN);
-						dstlen += dsc64->dsc64$q_length;
-					}
-				}
-			}
-		}
-		if (MAX_STRLEN < dstlen)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXSTRLEN);
-		ENSURE_STP_FREE_SPACE(dstlen);
-		/* Construct destination mval */
-		dst->str.addr = stringpool.free;
-		dstlen = 0;
-		if (ZC$RETC_VALUE == zcret->class)
-		{
-			tmpdsc.dsc$b_dtype = zcret->type;
-			tmpdsc.dsc$b_class = DSC$K_CLASS_S;
-			tmpdsc.dsc$a_pointer = &save_ret;
-			desc2mval(&tmpdsc, &tmpmval);
-			MV_FORCE_STRD(&tmpmval);
-			dstlen += tmpmval.str.len;
-			*stringpool.free++ = ',';
-			dstlen++;
-		}
-		for (outp = firstout; outp < lastout; outp++)
-		{
-			if (ZC$OQUAL_DUMMY != outp->qualifier)
-			{
-				lclp = lcllist + outp->position - 1;
-				if ($is_desc64(&lclp->dsc))
-				{
-					INIT_64BITDESC;
-				} else
-				{
-					INIT_32BITDESC;
-				}
-				if (DSC64$K_DTYPE_T == *type)
-				{
-					if (!is_a_desc64)
-					{
-						memcpy(stringpool.free, dsc->dsc$a_pointer, dsc->dsc$w_length);
-						stringpool.free += dsc->dsc$w_length;
-						dstlen += dsc->dsc$w_length;
-					} else
-					{
-						memcpy(stringpool.free, dsc64->dsc64$pq_pointer, dsc64->dsc64$q_length);
-						stringpool.free += dsc64->dsc64$q_length;
-						dstlen += dsc64->dsc64$q_length;
-					}
-					if (DSC64$K_CLASS_S == *class && ZC$OQUAL_PREALLOCATE == outp->qualifier)
-					{
-						if (!is_a_desc64)
-							dsc->dsc$w_length = outp->value;
-						else
-							dsc64->dsc64$q_length = outp->value;
-						if ((status = lib$sfree1_dd(&lclp->dsc)) != SS$_NORMAL)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ZCCONVERT, 0, status);
-					} else if (DSC64$K_CLASS_D == *class && (dsc->dsc$a_pointer || dsc64->dsc64$pq_pointer))
-					{
-						if ((status = lib$sfree1_dd(&lclp->dsc)) != SS$_NORMAL)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_ZCCONVERT, 0, status);
-					}
-				} else
-				{
-					desc2mval(&lclp->dsc, &tmpmval);
-					MV_FORCE_STRD(&tmpmval);
-					dstlen += tmpmval.str.len;
-				}
-				*stringpool.free++ = ',';
-				dstlen++;
-			}
-		}
-		dst->mvtype = MV_STR;
-		if (dstlen == 0)
-		{
-			assert(IS_AT_END_OF_STRINGPOOL(dst->str.addr, 0));
-			dst->str.len = 0;
-		} else
-		{
-			stringpool.free--;	/* take off trailing , */
-			dst->str.len = stringpool.free - (unsigned char *)dst->str.addr;
-			assert(dst->str.len == dstlen - 1);
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/dpgbldir_sysops.c b/sr_vvms/dpgbldir_sysops.c
deleted file mode 100644
index 44d3ee1..0000000
--- a/sr_vvms/dpgbldir_sysops.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <fab.h>
-#include <iodef.h>
-#include <nam.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gbldirnam.h"
-#include "filestruct.h"
-#include "io.h"
-#include "stringpool.h"
-#include "dpgbldir.h"
-#include "dpgbldir_sysops.h"
-#include "trans_log_name.h"
-#include "gtm_logicals.h"
-
-GBLREF mval	dollar_zgbldir;
-GBLREF gd_addr	*gd_header;
-
-error_def(ERR_ZGBLDIRACC);
-
-char LITDEF gde_labels[GDE_LABEL_NUM][GDE_LABEL_SIZE] =
-{
-	GDE_LABEL_LITERAL
-};
-
-/************************THESE ROUTINES ARE OS SPECIFIC AND SO WILL HAVE TO RESIDE IN ANOTHER MODULE*********************/
-
-#define DVI_LEN		(SIZEOF(cc$rms_nam.nam$t_dvi))
-#define DID_LEN		(SIZEOF(cc$rms_nam.nam$w_did))
-#define FID_LEN		(SIZEOF(cc$rms_nam.nam$w_fid))
-
-bool comp_gd_addr(gd_addr *gd_ptr, struct FAB *file_ptr)
-{
-	if ((memcmp(&file_ptr->fab$l_nam->nam$w_fid, gd_ptr->id->fid, FID_LEN) == 0) &&
-	    (memcmp(&file_ptr->fab$l_nam->nam$t_dvi, gd_ptr->id->dvi, DVI_LEN) == 0))
-
-		return TRUE;
-	return FALSE;
-}
-
-void fill_gd_addr_id(gd_addr *gd_ptr, struct FAB *file_ptr)
-{
-	gd_ptr->id = malloc(SIZEOF(*gd_ptr->id));
-	memcpy(&gd_ptr->id->dvi, &file_ptr->fab$l_nam->nam$t_dvi, DVI_LEN);
-	memcpy(&gd_ptr->id->did, &file_ptr->fab$l_nam->nam$w_did, DID_LEN);
-	memcpy(&gd_ptr->id->fid, &file_ptr->fab$l_nam->nam$w_fid, FID_LEN);
-
-	return;
-}
-/********************************THESE ROUTINES ARE STUBS PROVIDED FOR TESTING PURPOSES************************************/
-#define DOTGLD ".GLD"
-void *open_gd_file(mstr *v)
-{
-	struct FAB	*fab;
-	int4		status;
-
-	fab = malloc(SIZEOF(struct FAB));
-	*fab = cc$rms_fab;
-	fab->fab$l_fna = v->addr;
-	fab->fab$b_fns = v->len;
-	fab->fab$l_fop = FAB$M_UFO ;
-	fab->fab$b_fac = FAB$M_GET | FAB$M_BIO;
-	fab->fab$l_nam = malloc(SIZEOF(struct NAM));
-	fab->fab$l_dna = DOTGLD;
-	fab->fab$b_dns = SIZEOF(DOTGLD) - 1;
-	*fab->fab$l_nam = cc$rms_nam;
-	status = sys$open(fab);
-	if (status != RMS$_NORMAL)
-	{
-		if (!dollar_zgbldir.str.len || ((dollar_zgbldir.str.len == v->len)
-							&& !memcmp(dollar_zgbldir.str.addr, v->addr, v->len)))
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_ZGBLDIRACC, 6, v->len, v->addr,
-				LEN_AND_LIT(".  Cannot continue"), LEN_AND_LIT(""), status);
-			assert(FALSE);
-		}
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_ZGBLDIRACC, 6, v->len, v->addr, LEN_AND_LIT(".  Retaining "),
-			dollar_zgbldir.str.len, dollar_zgbldir.str.addr, status);
-	}
-	return fab;
-}
-
-void file_read(struct FAB *file_ptr, int4 size, char *buff, int4 pos)
-{
-	int4		status;
-	short		iosb[4];
-
-	status = sys$qiow(EFN$C_ENF,file_ptr->fab$l_stv, IO$_READVBLK, &iosb[0], 0, 0, buff, size, pos, 0, 0, 0);
-	if (status == SS$_NORMAL)
-		status = iosb[0];
-	if (status != SS$_NORMAL)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_ZGBLDIRACC, 6, file_ptr->fab$b_fns,file_ptr->fab$l_fna,
-			LEN_AND_LIT(""), LEN_AND_LIT(""), status);
-	return;
-}
-
-void close_gd_file(struct FAB *file_ptr)
-{
-	sys$dassgn(file_ptr->fab$l_stv);
-	if (file_ptr->fab$l_nam)
-		free(file_ptr->fab$l_nam);
-	free(file_ptr);
-	return;
-}
-
-
-void dpzgbini(void)
-{
-	mstr	temp_mstr;
-	char	temp_buff[MAX_TRANS_NAME_LEN];
-
-	dollar_zgbldir.mvtype = MV_STR;
-	dollar_zgbldir.str.addr = GTM_GBLDIR;
-	dollar_zgbldir.str.len = SIZEOF(GTM_GBLDIR) - 1;
-	if (SS$_NORMAL == trans_log_name(&dollar_zgbldir.str, &temp_mstr, &temp_buff[0]))
-	{
-		dollar_zgbldir.str.len = temp_mstr.len;
-		dollar_zgbldir.str.addr = temp_mstr.addr;
-	}
-	s2pool(&dollar_zgbldir.str);
-	gd_header = NULL;
-}
-
-mstr *get_name(mstr *ms)
-{
-	int4	status;
-	char	c[MAX_TRANS_NAME_LEN];
-	mstr	ms1, *new;
-
-	if ((status = trans_log_name(ms,&ms1,&c[0])) == SS$_NORMAL)
-		ms = &ms1;
-	else if (status != SS$_NOLOGNAM)
-		rts_error_csa(CSA_ARG(NULL)
-			VARLSTCNT(9) ERR_ZGBLDIRACC, 6, ms->len, ms->addr, LEN_AND_LIT(""), LEN_AND_LIT(""), status);
-	new = malloc(SIZEOF(mstr));
-	new->len = ms->len;
-	new->addr = malloc(ms->len);
-	memcpy(new->addr,ms->addr,ms->len);
-	return new;
-}
diff --git a/sr_vvms/dpgbldir_sysops.h b/sr_vvms/dpgbldir_sysops.h
deleted file mode 100644
index d6cf868..0000000
--- a/sr_vvms/dpgbldir_sysops.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __DPGBLDIR_SYSOPS_H__
-#define  __DPGBLDIR_SYSOPS_H__
-
-bool comp_gd_addr(gd_addr *gd_ptr, struct FAB *file_ptr);
-void fill_gd_addr_id(gd_addr *gd_ptr, struct FAB *file_ptr);
-void file_read(struct FAB *file_ptr, int4 size, char *buff, int4 pos);
-void close_gd_file(struct FAB *file_ptr);
-void dpzgbini(void);
-mstr *get_name(mstr *ms);
-
-#endif
diff --git a/sr_vvms/dse.c b/sr_vvms/dse.c
deleted file mode 100644
index ad8a387..0000000
--- a/sr_vvms/dse.c
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <efndef.h>
-#include <signal.h>
-#include <iodef.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-
-#include "gtm_inet.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "filestruct.h"
-#include "cli.h"
-#include "error.h"
-#include "io.h"
-#include "iottdef.h"
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "stp_parms.h"
-#include "stringpool.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmimagename.h"
-#include "desblk.h"		/* for desblk structure */
-#include "util.h"
-#include "dse.h"
-#include "patcode.h"
-#include "generic_exit_handler.h"
-#include "dfntmpmbx.h"
-#include "ladef.h"
-#include "ast_init.h"
-#include "init_secshr_addrs.h"
-#include "dse_exit.h"
-#include "gtm_env_init.h"	/* for gtm_env_init() prototype */
-#include "common_startup_init.h"
-#include "gtm_threadgbl_init.h"
-
-GBLDEF block_id		patch_curr_blk;
-
-GBLREF VSIG_ATOMIC_T	util_interrupt;
-GBLREF desblk		exi_blk;
-GBLREF int4		exi_condition;
-GBLREF int4 		lkid;
-GBLREF boolean_t        dse_running;
-GBLREF gv_namehead	*gv_target;
-GBLREF gd_region	*gv_cur_region;
-GBLREF gd_addr          *gd_header;
-GBLREF gd_addr          *original_header;
-GBLREF sgmnt_addrs	*cs_addrs;
-GBLREF short		crash_count;
-GBLREF bool		wide_out;
-GBLREF spdesc		rts_stringpool, stringpool;
-GBLREF boolean_t        	write_after_image;
-
-error_def(ERR_CTRLC);
-
-extern int		DSE_CMD();
-extern int		CLI$DCL_PARSE();
-extern int		CLI$DISPATCH();
-
-$DESCRIPTOR	(prompt, "DSE> ");
-
-static readonly mstr lnm$group = {9,  "LNM$GROUP"};
-static void dse_process(void);
-
-void dse(void)
-{
-	$DESCRIPTOR	(desc, "SYS$OUTPUT");
-	char		buff[MAX_LINE];
-	$DESCRIPTOR	(command, buff);
-	unsigned short	outlen;
-	uint4		status;
-	int4		sysout_channel;
-	t_cap		t_mode;
-	DCL_THREADGBL_ACCESS;
-
-	GTM_THREADGBL_INIT;
-	common_startup_init(DSE_IMAGE);
-	gtm_env_init();	/* read in all environment variables */
-	TREF(transform) = TRUE;
-	TREF(no_spangbls) = TRUE;	/* dse operates on a per-region basis irrespective of global mapping in gld */
-	util_out_open(0);
-	SET_EXIT_HANDLER(exi_blk, generic_exit_handler, exi_condition);	/* Establish exit handler */
-	ESTABLISH(util_base_ch);
-	status =lp_id(&lkid);
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	INVOKE_INIT_SECSHR_ADDRS;
-	dfntmpmbx(lnm$group.len, lnm$group.addr);
-	ast_init();
-	stp_init(STP_INITSIZE);
-	rts_stringpool = stringpool;
-	initialize_pattern_table();
-	gvinit();
-	region_init(FALSE);
-	sys$assign(&desc, &sysout_channel, 0, 0);
-	if (sysout_channel)
-	{
-		sys$qiow(EFN$C_ENF, sysout_channel, IO$_SENSEMODE, 0, 0, 0, &t_mode, 12, 0, 0, 0, 0);
-		if (t_mode.pg_width >= 132)
-			wide_out = TRUE;
-		else
-			wide_out = FALSE;
-	} else
-		wide_out = FALSE;
-	if (cs_addrs)
-		crash_count = cs_addrs->critical->crashcnt;
-	patch_curr_blk = get_dir_root();
-	REVERT;
-	util_out_print("!/File  !_!AD", TRUE, DB_LEN_STR(gv_cur_region));
-	util_out_print("Region!_!AD!/", TRUE, REG_LEN_STR(gv_cur_region));
-	dse_ctrlc_setup();
-	/* Since DSE operates on a region-by-region basis (for the most part), do not use a global directory at all from now on */
-	original_header = gd_header;
-	gd_header = NULL;
-	status = lib$get_foreign(&command, 0, &outlen, 0);
-	if ((status & 1) && outlen > 0)
-	{
-		command.dsc$w_length = outlen;
-		status = CLI$DCL_PARSE(&command, &DSE_CMD, &lib$get_input, 0, 0);
-		if (RMS$_EOF == status)
-			dse_exit();
-		else if (CLI$_NORMAL == status)
-		{
-			ESTABLISH(util_ch);
-			CLI$DISPATCH();
-			REVERT;
-		}
-	}
-	for (;;)
-		dse_process();
-}
-
-static void dse_process(void)
-{
-	uint4	status;
-
-	ESTABLISH(util_ch);
-	status = CLI$DCL_PARSE(0, &DSE_CMD, &lib$get_input, &lib$get_input, &prompt);
-	if (RMS$_EOF == status)
-		dse_exit();
-	else if (CLI$_NORMAL == status)
-		CLI$DISPATCH();
-	if (util_interrupt)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_CTRLC);
-}
diff --git a/sr_vvms/dse.hlp b/sr_vvms/dse.hlp
deleted file mode 100644
index 354817c..0000000
--- a/sr_vvms/dse.hlp
+++ /dev/null
@@ -1,1158 +0,0 @@
-
-1 Overview
-  Overview
-   The  GT.M  Database  Structure   Editor,   DSE,   examines   and   repairs
-   Greystone Technology  Database  Structure  (GDS)  database(s).  GT.M  uses
-   Buffered Global (BG)  and  Mapped  Memory  (MM)  access  methods  for  GDS
-   files. For more information on  GDS,  refer  to  the  "Greystone  Database
-   Structure" chapter  in  the  GT.M  Administration  and  Operations  Guide.
-   MUPIP  INTEG  provides  comprehensive  error  checking,  which  serves  to
-   verify  the  results  of   repairs   undertaken   with   DSE.   For   more
-   information on MUPIP INTEG, refer to  the  "MUMPS  Peripheral  Interchange
-   Program" chapter in the GT.M  Administration  and  Operations  Guide.  For
-   more information on the use of DSE, refer  to  the  "Maintaining  Database
-   Integrity" chapter in the GT.M Administration and Operations Guide.
-
-1 DSE_Functions
-  Functions of DSE
-   DSE is primarily a database repair utility.
-
-   Use DSE to:
-
-   o  Dump parts of the database for troubleshooting database errors
-
-   o  Add or delete a record in a block
-
-   o  Update file, block or record header information
-
-   o  Update bit maps
-
-   o  Save  copies   of   database   fragments   for   analysis,   audit   or
-      restoration.
-
-   When GT.CX is installed,  DSE  may  report  DSEBLKRDFAIL,  Failed  attempt
-   to read block. Use  the  command  CRITICAL  /SEIZE  followed  by  CRITICAL
-   /RELEASE to clear this error.
-
-   Use the DSE EXIT command to leave DSE.
-
-1 Command_Syntax
-  Command Syntax
-   The format for DSE commands is:
-
-     Command  qualifier
-
-   DSE  interprets  all  numeric  input  as  hexadecimal,  except  for   time
-   values,     the     /BLK_SIZE=,     /KEY_MAX_SIZE=,     /RECORD_MAX_SIZE=,
-   /REFERENCE_COUNT=,  /TIMERS_PENDING=  and  /WRITES_PER_FLUSH=  on   CHANGE
-   /FILEHEADER, and /VERSION=  on  the  REMOVE  and  RESTORE  commands.  This
-   convention corresponds to the  displays  provided  by  DSE  and  by  MUPIP
-   INTEG.
-
-1 ADD
-  AD[D]
-   The ADD command adds a record to a block.
-
-   The format of the ADD command is:
-
-   AD[D] [/B[LOCK]=block]
-
-   For greater than level 0 blocks add:
-
-   /STAR /POINTER=block
-
-   or
-
-   /OFFSET=offset|/RECORD=record /KEY=key /POINTER=block
-
-   For level 0 blocks add:
-
-   /OFFSET=offset|/RECORD=record /KEY=key /D[ATA]=string
-
-   The ADD command requires  either  the  /OFFSET  or  /RECORD  qualifier  to
-   position the record in  the  block  and  either  the  /KEY  or  the  /STAR
-   qualifier to define the key for the block.
-
-   The /STAR qualifier is not valid at level 0  (i.e.,  for  a  data  block).
-   The  ADD  command  requires  the  /DATA  qualifier  at  level  0  or   the
-   /POINTER qualifier at any other  level  to  provide  the  content  of  the
-   record.
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies the block to receive the new record.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, .i.e.,  on  the  first  block  oriented  command,  DSE  uses
-   block one (1).
-
-/DATA
-  /D[ATA]=string
-   Specifies the data field for  records  added  to  a  data  block.  Use
-   quotes around  string  and  escape  codes  of  the  form  \a  or  \ab,
-   where  a  and  b  are  hexadecimal  digits  representing  non-printing
-   characters.  \\  translates  to  a   single   backslash.   The   /DATA
-   qualifier only applies  at  level  0  and  is  incompatible  with  the
-   /STAR and /POINTER qualifiers.
-
-/KEY
-  /K[EY]=key
-   Specifies the key  of  the  new  record.  Enclose  MUMPS-style  global
-   references  in  quotes  ("").  The  /KEY  qualifier  is   incompatible
-   with the /STAR qualifier.
-
-/OFFSET
-  /O[FFSET]=offset
-   Adds  the  new  record  at  the  next  record   boundary   after   the
-   specified offset. The  /OFFSET  qualifier  is  incompatible  with  the
-   /RECORD and /STAR qualifiers.
-
-/POINTER
-  /P[OINTER]=pointer
-   Specifies the block pointer  field  for  records  added  to  an  index
-   block.  The  /POINTER  qualifier  is  incompatible  with   the   /DATA
-   qualifier and cannot  be used at level 0.
-
-/RECORD
-  /R[ECORD]=record_number
-   Specifies  a  record  number  of   the   new   record.   The   /RECORD
-   qualifier is incompatible with the /OFFSET and /STAR qualifiers.
-
-/STAR
-  /S[TAR]
-   Adds  a  star  record  (i.e.,  a  record  that  identifies  the   last
-   record in an indexed  block)  at  the  end  of  the  specified  block.
-   The  /STAR  qualifier  is  incompatible  with  all  qualifiers  except
-   /BLOCK and /POINTER and cannot be used at level 0.
-
-1 ALL
-  AL[L]
-   The ALL command applies action(s) specified by  a  qualifier  to  all  GDS
-   regions  defined  by  the  current  Global  Directory.  This  is  a   very
-   powerful command; use caution.  Be  especially  careful  if  you  have  an
-   overlapping  database  structure  (e.g.,  overlapping   regions   accessed
-   from separate application global  directories).
-
-2 Qualifiers
-/BUFFER_FLUSH
-  /B[UFFER_FLUSH]
-   Flushes  to  disk  buffers  all  regions  specified  by  the   current
-   Global  Directory.  The  /BUFFER_FLUSH   qualifier   is   incompatible
-   with the /RENEW qualifier.
-
-/CRITINIT
-  /C[RITINIT]
-   Initializes  critical  sections  for  all  regions  specified  by  the
-   current    Global    Directory.    The    /CRITINIT    qualifier    is
-   incompatible with the /RENEW, /RELEASE and /SEIZE qualifiers.
-
-/FREEZE
-  /[NO]F[REEZE]
-   Prevents  updates  to  all  GDS  regions  specified  by  the   current
-   Global  Directory.  The  /NOFREEZE   allows   updates   to   all   GDS
-   regions  specified  by  the  current  Global  Directory.  The  /FREEZE
-   qualifier is incompatible with the /RENEW qualifier.
-
-   DSE releases /FREEZE when it  EXITs.  To  hold  all  databases,  enter
-   ALL /FREEZE=TRUE and then SPAWN to perform other operations.
-
-/REFERENCE
-  /REF[ERENCE]
-   Resets reference  counts  to  1  for  all  regions  specified  by  the
-   current   Global    Directory.    The    /REFERENCE    qualifier    is
-   incompatible with the /RENEW qualifier.
-
-/RELEASE
-  /REL[EASE]
-   Releases  critical  sections  for  all  regions   specified   by   the
-   current Global  Directory.  The  /RELEASE  qualifier  is  incompatible
-   with the /CRITINIT, /RENEW and /SEIZE qualifiers.
-
-/RENEW
-  /REN[EW]
-   Reinitializes    critical    sections    (/CRITICAL)    and    buffers
-   (/WCINIT),  resets  reference  counts  to  1  (/REFERENCE_COUNT)   and
-   clears freeze  flags  for  all    regions  specified  by  the  current
-   Global  Directory  (/NOFREEZE).  /RENEW  requires  confirmation.   The
-   /RENEW qualifier is incompatible with all other qualifiers.
-
-/SEIZE
-  /S[EIZE]
-   Seizes  the  critical  section  for  all  regions  specified  by   the
-   current  Global  Directory.  The  /SEIZE  qualifier  is   incompatible
-   with the /CRITINIT, /RELEASE and /RENEW qualifiers.
-
-   The  SEIZE  qualifier   can   be   useful   when   you   encounter   a
-   DSEBLKRDFAIL error, generated when DSE  is  unable  to  read  a  block
-   from  the  database.  If  you  encounter  this  error  when  accessing
-   data on  a  cluster  using  GT.CX,  SEIZE  and  RELEASE  the  critical
-   section; this may solve the problem.
-
-/WCINIT
-  /W[CINIT]
-   Reinitializes  buffers  for  all  regions  specified  by  the  current
-   Global  Directory.  /WCINIT   requires   confirmation.   The   /WCINIT
-   qualifier is incompatible with the /RENEW qualifier.
-
-1 BUFFER_FLUSH
-  B[UFFER_FLUSH]
-   The BUFFER_FLUSH command flushes the current region's buffers to disk.
-
-
-   The format of the BUFFER_FLUSH command is:
-
-   B[UFFER_FLUSH]
-
-   The BUFFER_FLUSH command has no qualifiers.
-
-1 CHANGE
-  CH[ANGE]
-   The CHANGE command changes fields of  a  file,  block,  or  record  header
-   and the bit map.
-
-   The CHANGE command either has  a  /FILEHEADER  qualifier  or  an  implicit
-   or explicit  /BLOCK  qualifier  plus  one  or  more  of  their  associated
-   qualifiers to define the target of the change.
-
-2 Block_qualifiers
-/BLOCK
-  /BL[OCK]=block_number
-   Specifies   the   block   to   modify.   The   /BLOCK   qualifier   is
-   incompatible  with  the  /FILEHEADER  qualifier  and  all   qualifiers
-   related to /FILEHEADER.
-
-   /BLOCK  is  the  default  qualifier.  On  commands  with   neither   a
-   /BLOCK  nor  a  /FILEHEADER  qualifier,  DSE  uses  the   last   block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, that is, on  the  first  block-oriented  command,  DSE  uses
-   block one (1).
-
-/BSIZ
-  /BS[IZ]=block_size
-   Changes the block  size  field  of  the  specified  block.  Decreasing
-   the block size  can  result  in  loss  of  existing  data.  The  /BSIZ
-   qualifier  is  incompatible  with  all   qualifiers   except   /BLOCK,
-   /LEVEL and /TN.
-
-/LEVEL
-  /L[EVEL]=level
-   Changes  the  level  field  for  the  specified  block.   The   /LEVEL
-   qualifier  is  incompatible  with  all   qualifiers   except   /BLOCK,
-   /BSIZ and /TN.
-
-/TN
-  /TN[=transaction_number]
-   Changes  the  transaction  number  for  the  current  block.  When   a
-   CHANGE command does not include  a  /TN=,  DSE  sets  the  transaction
-   number  to  the  current  transaction  number.  Manipulation  of   the
-   block  transaction  number  affects  MUPIP  BACKUP  /INCREMENTAL.  The
-   /TN qualifier is  incompatible  with  all  qualifiers  except  /BLOCK,
-   /BSIZ and /LEVEL.
-
-/OFFSET
-  /OF[FSET]=offset
-   Specifies the offset within  the  block  of  the  target  record.  The
-   /OFFSET  qualifier  is  incompatible  with   all   qualifiers   except
-   /BLOCK, /CMPC and /RSIZ.
-
-/RECORD
-  /RE[CORD]=record_number
-   Specifies  the  record  number  of  the  target  record.  The  /RECORD
-   qualifier  is  incompatible  with  all   qualifiers   except   /BLOCK,
-   /CMPC and /RSIZ.
-
-/CMPC
-  /CM[PC]=compression_count
-   Changes the compression count  field  of  the  specified  record.  The
-   /CMPC  qualifier  is   incompatible   with   all   qualifiers   except
-   /BLOCK, /OFFSET, and /RECORD.
-
-/RSIZ
-  /RS[IZ]=record_size
-   Changes the record size field  of  the  specified  record.  The  /RSIZ
-   qualifier is incompatible  with  all  qualifiers  except  /OFFSET  and
-   /RECORD.
-
-2 File_header_qualifiers
-/FILEHEADER
-  /FI[LEHEADER]
-   Enables modification of  specific  fields  in  the  file  header.  The
-   /FILEHEADER qualifier  is  incompatible  with  the  /BLOCK  and    all
-   qualifiers  related   to   /BLOCK   (i.e.,   /BSIZ,   /CMPC,   /LEVEL,
-   /OFFSET,  /RECORD, /RSIZ and /TN qualifiers).
-
-/BLK_SIZE
-  /BLK[_SIZE]=block_size
-   Changes the  decimal  block  size  field  of  the  current  file.  Use
-   the /BLK_SIZE qualifier  only  in  conjunction  with  the  /FILEHEADER
-   qualifier.   Do   not   use   this   CHANGE   qualifier   except    on
-   instructions from Greystone.
-
-/BLOCKS_FREE
-  /BLO[CKS_FREE]=free blocks
-   Changes  the  free  blocks  field  of  the  current  file.   Use   the
-   /BLOCK_FREE  qualifier  only  in  conjunction  with  the   /FILEHEADER
-   qualifier.  Database  operations   maintain   this   field   for   the
-   user's  convenience.  The  field  does  not   control   any   database
-   operations.
-
-/B_COMPREHENSIVE
-  /B_C[OMPREHENSIVE]=transaction_number
-   Changes  the  transaction  number  in  the  fileheader  of  the   last
-   comprehensive backup  to  the  value  specified.  Use  this  qualifier
-   only in conjunction with the /FILEHEADER qualifier.
-
-/B_INCREMENTAL
-  /B_I[NCREMENTAL]=transaction_number
-   Changes  the  transaction  number  in  the  fileheader  of  the   last
-   incremental  backup  to  the  value  specified.  Use  this   qualifier
-   only in conjunction with the /FILEHEADER qualifier.
-
-/B_RECORD
-  /B_R[ECORD]=transaction_number
-   Changes  the  transaction  number  in  the  fileheader  of  the   last
-   /RECORD backup  to  the  value  specified.  Use  this  qualifier  only
-   in conjunction with the /FILEHEADER qualifier.
-
-/CORRUPT_FILE
-  /CO[RRUPT_FILE]=value
-   Sets the file_corrupt  field  in  the  file  header.  Possible  values
-   are:  TRUE,  FALSE  and  NOCHANGE.  Use  the  /CORRUPT_FILE  qualifier
-   only in conjunction with the /FILEHEADER qualifier.
-
-   WARNING: when DSE  EXITs  after  a  CHANGE  /FILEHEADER  /CORRUPT=TRUE
-   without  a  matching  CHANGE  /FILEHEADER  /CORRUPT=FALSE,  the   file
-   becomes unavailable to all future access.
-
-/CURRENT_TN
-  /CU[RRENT_TN]=transaction_number
-   Changes  the  current  transaction  number  for  the  current  region.
-   Use  the  /CURRENT_TN  qualifier  only   in   conjunction   with   the
-   /FILEHEADER  qualifier.  This  qualifier  has  implications  only  for
-   MUPIP  BACKUP   /INCREMENTAL.   Raising   the   /CURRENT_TN   corrects
-   block transaction number too large errors.
-
-/FLUSH_TIME
-  /FL[USH_TIME][=delta_time]
-   Changes  the  flush_time  default  interval   (in   delta_time).   The
-   time entered must be between 0 and 1 hour.
-
-   Use  the  /FLUSH_TIME  qualifier  only   in   conjunction   with   the
-   /FILEHEADER  qualifier.  Do  not  use  this  CHANGE  qualifier  except
-   on  instructions  from  Greystone.  A  /FLUSH_TIME   with   no   value
-   resets   the   /FLUSH_TIME   to   the   default   value.   Input    is
-   interpreted as decimal.
-
-/FREEZE
-  /FR[EEZE]=value
-   Sets availability of the  region  for  update.  Possible  values  are:
-   TRUE,  FALSE  and  NOCHANGE.  Use  to   "freeze"   (disable   database
-   writes)  or  "unfreeze"  the  database.  Use  the  /FREEZE   qualifier
-   only in conjunction with the /FILEHEADER qualifier.
-
-   DSE  releases  /FREEZE  when  it  EXITs.  To  hold  the   database(s),
-   CHANGE /FILEHEADER  /FREEZE=TRUE  and  then  SPAWN  to  perform  other
-   operations.
-
-/KEY_MAX_SIZE
-  /K[EY_MAX_SIZE]=key_max_size
-   Changes  the  decimal  value  for  the  maximum  allowable  key  size.
-   Use  the  /KEY_MAX_SIZE  qualifier  only  in  conjunction   with   the
-   /FILEHEADER  qualifier.  Reducing  KEY_MAX_SIZE  can  restrict  access
-   to existing data  and  cause  GT.M-generated  errors.  Do  not  create
-   incompatible  key  and  record  sizes.  If  you   make   a   permanent
-   change to the key  size  using  DSE,  use  GDE  to  check  that    the
-   appropriate Global Directory  contains  the  same  key  size  for  the
-   region. For more  information  on  key  and  record  sizes,  refer  to
-   the "Global Directory  Editor"  chapter  in  the  GT.M  Administration
-   and Operations Guide.
-
-/NULL_SUBSCRIPTS
-  /N[ULL_SUBSCRIPTS]=value
-   Sets  the  acceptability  of  null  subscripts   in   database   keys.
-   Possible   values   are:   TRUE,   FALSE   and   NOCHANGE.   Use   the
-   /NULL_SUBSCRIPTS   qualifier   only   in    conjunction    with    the
-   /FILEHEADER  qualifier.  Prohibiting  null-subscripts   can   restrict
-   access to existing data and cause GT.M generated errors.
-
-/QUANTUM_INTERVAL
-  /Q[UANTUM_INTERVAL][=delta_time]
-   Changes  the  amount  of  time  a  single  system  holds  control   of
-   writes to the database file.  The  time  entered  must  be  between  0
-   and 1 hour.
-
-   Use the /QUANTUM_INTERVAL  qualifier  only  in  conjunction  with  the
-   /FILEHEADER  qualifier.  This  field   applies   only   to   clustered
-   databases.   Do   not   use   this   CHANGE   qualifier   except    on
-   instructions  from  Greystone.  A  /QUANTUM_INTERVAL  with  no   value
-   resets  the  /QUANTUM_INTERVAL  to  the  default   value.   Input   is
-   interpreted as decimal.
-
-/RECORD_MAX_SIZE
-  /REC[ORD_MAX_SIZE]=record_max_size
-   Changes the decimal value  for  the  maximum  allowable  record  size.
-   Use the  /RECORD_MAX_SIZE  qualifier  only  in  conjunction  with  the
-   /FILEHEADER  qualifier.  Reducing  the  RECORD_MAX_SIZE  can  restrict
-   access to existing  data  and  cause  GT.M-generated  errors.  Do  not
-   create  incompatible  key  and   record   sizes.   If   you   make   a
-   permanent  change  to  the  record  size  using  DSE,  make  sure  GDE
-   contains  the  same   record   size   for   the   appropriate   Global
-   Directory. For  more  information  on  key  and  record  sizes,  refer
-   to "Global  Directory  Editor"  chapter  in  GT.M  Administration  and
-   Operations Guide.
-
-/REFERENCE_COUNT
-  /REF[ERENCE_COUNT]=reference_count
-   Sets a field that  tracks  how  many  processes  are  accessing    the
-   database from the current  node.  MUPIP  INTEG  and  DSE  use  decimal
-   numbers  for  /REFERENCE_COUNT.  Use  the  /REFERENCE_COUNT  qualifier
-   only  in  conjunction  with  the    /FILEHEADER  qualifier.   Restrict
-   CHANGE  /FILEHEADER   /REFERENCE_COUNT   to   the   case   where   the
-   process  running  DSE  has  exclusive  (stand-alone)  access  to   the
-   database file. When DSE has sole  access  to  a  database  file    the
-   /REFERENCE_COUNT should be 1.  This  is  an  informational  field  and
-   does not have any effect on processing.
-
-/RESPONSE_INTERVAL
-  /[NO]RES[PONSE_INTERVAL][=delta_time]
-   Changes the  time  that  processes  trying  to  access  the  clustered
-   database  wait  before  returning   an   error.   /NORESPONSE_INTERVAL
-   prevents  the  system  from  reporting  cluster  access  timeouts   as
-   errors. The time entered must be between 0 and 1 hour.
-
-   A  large  /RESPONSE_INTERVAL   or   /NORESPONSE_INTERVAL   effectively
-   hangs processes when  a  cluster  problem  occurs.  When  an  operator
-   action   clears   the   problem,   processing   resumes.    A    small
-   /RESPONSE_INTERVAL  causes  GT.M  processes  to  generate   an   error
-   when a  cluster  problem  occurs.  The  /RESPONSE_INTERVAL  should  be
-   set to at least  the  /QUANTUM_INTERVAL  times  twice  the  number  of
-   systems in the cluster running GT.CX.
-
-   Use  the  /RESPONSE_INTERVAL  qualifier  only  in   conjunction   with
-   the /FILEHEADER  qualifier.  This  field  applies  only  to  clustered
-   databases.   Do   not   use   this   CHANGE   qualifier   except    on
-   instructions  from  Greystone.  A  /RESPONSE_INTERVAL  with  no  value
-   resets  the  /RESPONSE_INTERVAL  to  the  default  value.   Input   is
-   interpreted as decimal.
-
-/STALENESS_TIMER
-  /[NO]S[TALENESS_TIMER][=delta_time]
-   Changes the amount of  time  a  system  reading  the  database  allows
-   to    pass    before    resynchronizing     with     the     database.
-   /NOSTALENESS_TIMER  prevents  the  system  from  enforcing  this  type
-   of  synchronization.  The  time  entered  must  be  between  0  and  1
-   hour.
-
-   {/\-}~STALENESS_TIMER limits how long  old  blocks  can  be  in  cache
-   memory   before   they   are   refreshed.    A    node    synchronizes
-   automatically when it writes or when  it  reads  a    new  block  from
-   disk    that    shows     synchronization     is     required.     The
-   /STALENESS_TIMER    should    be    set    to     at     least     the
-   /QUANTUM_INTERVAL    times    twice    the    number    of    systems.
-   Use the  /STALENESS_TIMER  qualifier  only  in  conjunction  with  the
-   /FILEHEADER  qualifier.  This  field   applies   only   to   clustered
-   databases.   Do   not   use   this   CHANGE   qualifier   except    on
-   instructions  from  Greystone.  A  /STALENESS_TIMER  with   no   value
-   resets  the  /STALENESS_TIMER  to  the   default   value.   Input   is
-   interpreted as decimal.
-
-/TICK_INTERVAL
-  /TIC[K_INTERVAL][=delta_time]
-   Changes  the  time  a  system   controlling   writes   continues   its
-   /QUANTUM_INTERVAL  when  it  has  no  writes  to  perform  and   other
-   systems have writes pending.  The  time  entered  must  be  between  0
-   and 1 hour.
-
-   If /TICK_INTERVAL  is  equal  to  or  larger  than  /QUANTUM_INTERVAL,
-   it   is   effectively   disabled.   For    the    best    performance,
-   /TICK_INTERVAL should generally be small.
-
-   Use  the  /TICK_INTERVAL  qualifier  only  in  conjunction  with   the
-   /FILEHEADER    qualifier.  This  field  applies  only   to   clustered
-   databases.   Do   not   use   this   CHANGE   qualifier   except    on
-   instructions  from  Greystone.  A   /TICK_INTERVAL   with   no   value
-   resets  the  /TICK_INTERVAL   to   the   default   value.   Input   is
-   interpreted as decimal.
-
-/TIMERS_PENDING
-  /TI[MERS_PENDING]=timers_pending
-   Sets  field  that  tracks  the  number  of  processes  considering   a
-   timed   flush.   Use   the   /TIMERS_PENDING   qualifier    only    in
-   conjunction with the  /FILEHEADER  qualifier.  Proper  values  are  0,
-   1,  and  2.   Do   not   use   this   CHANGE   qualifier   except   on
-   instructions from Greystone.
-
-/TOTAL_BLKS
-  /TO[TAL_BLKS]=total_blocks
-   Changes  the  total  blocks  field  of  the  current  file.  Use   the
-   /TOTAL_BLKS  qualifier  only  in  conjunction  with  the   /FILEHEADER
-   qualifier.
-
-   WARNING: The total blocks  field  should  always  reflect  the  actual
-   size of  the  database.  Change  this  field  only  if  it  no  longer
-   reflects the size of the database.
-
-/TRIGGER_FLUSH
-  /TR[IGGER_FLUSH]=trigger_flush
-   Sets the decimal value  for  the  triggering  threshold,  in  buffers,
-   for  flushing  the  cache  modified  queue.  Use  the   /TRIGGER_FLUSH
-   qualifier only in  conjunction  with  the  /FILEHEADER  qualifier.  Do
-   not  use  this  CHANGE   qualifier   except   on   instructions   from
-   Greystone.
-
-/WRITES_PER_FLUSH
-  /WR[ITES_PER_FLUSH]=writes_per_flush
-   Sets the decimal  number  of  blocks  to  write  in  each  flush.  Use
-   the  /WRITES_PER_FLUSH  qualifier  only  in   conjunction   with   the
-   /FILEHEADER  qualifier.  Do  not  use  this  CHANGE  qualifier  except
-   on instructions from Greystone.
-
-1 CLOSE
-  CL[OSE]
-   The CLOSE command closes the currently open  output  file.  Use  to  close
-   the opened dump file.
-
-   The format of the CLOSE command is:
-
-   CL[OSE]
-
-   The CLOSE command has no qualifiers.
-
-1 CRITICAL
-  CR[ITICAL]
-   The  CRITICAL  command  along  with   its   qualifiers   displays   and/or
-   modifies  the  status  and  contents  of  the  critical  section  for  the
-   current  region.  The  critical  section  provides  a  control  mechanism.
-   This  field  identifies,  by  its  PID,  the  process  presently  managing
-   updates to database.
-
-   The format of the CRITICAL command is:
-
-   CR[ITICAL]       /I[NIT]
-        /O[WNER]
-        /REL[EASE]
-        /REM[OVE]
-        /RES[ET]
-        /S[EIZE]
-
-   By default, the CRITICAL  command  assumes  the  /OWNER  qualifier,  which
-   displays the status of the critical section.
-
-2 Qualifiers
-/INIT
-  /I[NIT]
-   Reinitializes  the  critical  section.  The  /RESET  qualifier  causes
-   all processes actively accessing  that  database  file  to  signal  an
-   error. Do not use  /INIT  without  the  /RESET  parameter  when  other
-   processes are accessing the region.
-
-   CAUTION: Using CRITICAL /INIT when  the  write  owner  of  a  critical
-   section is an  active  GT.M  process  may  cause  structural  database
-   damage.
-
-/OWNER
-  /O[WNER]
-   Displays  the  ID  of  the  process  at  the  head  of  the   critical
-   section,  the  ID  of  the  process  running  DSE  and  the  count  of
-   critical read owners. When  the  current  process  owns  the  critical
-   section, DSE displays a  warning  message.  The  /OWNER  qualifier  is
-   incompatible with other qualifiers.
-
-   Example:
-
-   DSE> critical/owner
-
-   Write critical section is currently unowned
-
-/RELEASE
-  /REL[EASE]
-   Releases  the  critical  section  if  the  process  running  DSE  owns
-   the  section.  The  /RELEASE  qualifier  is  incompatible  with  other
-   qualifiers.
-
-/REMOVE
-  /REM[OVE]
-   Terminates any write ownership  of  the  critical  section.  Use  this
-   when  the  critical  section  is  owned   by   a   process   that   is
-   nonexistent or is  known  to  no  longer  be  running  a  GT.M  image.
-   The /REMOVE qualifier is incompatible with other qualifiers.
-
-   CAUTION:  Using  CRITICAL/REMOVE   when   the   write   owner   of   a
-   critical section is an active  GT.M  process    may  cause  structural
-   database damage.
-
-/RESET
-  /RES[ET]
-   Displays  the  number  of  times  the  critical   section   has   been
-   through an online reinitialization.
-
-   /RESET when used  with  /INIT  causes  an  error  for  processes  that
-   are attempting  to  get  the  critical  section  of  the  region.  Use
-   /RESET normally or  if  the  write  ownership  belongs  to  an  active
-   GT.M process that does  not  respond  to  a  MUPIP  STOP.  The  /RESET
-   qualifier is only compatible with the /INIT qualifier.
-
-/SEIZE
-  /S[EIZE]
-   Seizes  the  critical  section  if  the  section  is  available.   The
-   /SEIZE qualifier is incompatible with other qualifiers.
-
-1 DUMP
-  D[UMP]
-   The DUMP command displays blocks, records or  file  headers.  DUMP  serves
-   as one of the primary DSE examination commands.  Use  the  error  messages
-   reported by MUPIP INTEG to determine what to DUMP  and  examine  from  the
-   database. DUMP also transfers records to  a  sequential  file  for  future
-   study and/or for input to MUPIP LOAD.
-
-   The  DUMP  command  requires  specification  of  either  /BLOCK,  /HEADER,
-   /RECORD or  /FILEHEADER.
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies the  starting  block  of  the  dump.  The  /BLOCK  qualifier
-   is incompatible with the /FILEHEADER qualifier.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, .i.e.,  on  the  first  block  oriented  command,  DSE  uses
-   block one (1).
-
-   Example:
-
-   DSE> dump/block=2
-
-   Block 2   Size 1B   Level 0   TN 2
-   Rec:1  Blk 2  Off 7  Size A  Cmpc 0  Ptr 8  Key ^a
-         7 : |  A  0  0 61  0  0  8  0  0  0
-              |  .  .  .  a  .  .  .  .  .  .
-
-   Rec:2  Blk 2  Off 11  Size A  Cmpc 0  Ptr B  Key ^b
-         11 : |  A  0  0 62  0  0  B  0  0  0
-              |  .  .  .  b  .  .  .  .  .  .
-
-   
-/COUNT
-  /C[OUNT]=count
-   Specifies the  number  of  block  headers  or  records  to  DUMP.  The
-   /COUNT qualifier is incompatible with the /FILEHEADER qualifier.
-
-/FILEHEADER
-  /F[ILEHEADER]
-   Dumps  file  header  information.   The   /FILEHEADER   qualifier   is
-   incompatible with all other qualifiers.
-
-/GLO
-  /G[LO]
-   Dumps  the  specified  record  or  blocks  into  the  current   output
-   file  in  Global  Output  (GO)   format.   The   /GLO   qualifier   is
-   incompatible with the /HEADER and /FILEHEADER qualifiers.
-
-/HEADER
-  /[NO]H[EADER]
-   Specifies whether the dump of  the  specified  blocks  or  records  is
-   restricted  to,  or  excludes,  headers.  The  /HEADER  qualifier   is
-   incompatible with the /GLO and /FILEHEADER qualifiers.
-
-   By default, DUMP displays all information in a block or record.
-
-/OFFSET
-  /O[FFSET]=offset
-   Specifies the offset of the starting  record  for  the  dump.  If  the
-   offset does not point  to  the  beginning  of  a  record,  DSE  rounds
-   down to the last valid  record  start  (e.g.,  DUMP/OFF=10  starts  at
-   /OFF=A if  that  was  the  last  record).  The  /OFFSET  qualifier  is
-   incompatible with the /RECORD and  /FILEHEADER qualifiers.
-
-/RECORD
-  /R[ECORD]=record_number
-   Specifies the record number  of  the  starting  record  of  the  dump.
-   The  /RECORD  qualifier  is  incompatible   with   the   /OFFSET   and
-   /FILEHEADER qualifiers.
-
-1 EVALUATE
-  EV[ALUATE]
-   The  EVALUATE  command  displays  a  number  in   both   hexadecimal   and
-   decimal. Use it to translate a hexadecimal  number  to  decimal  and  vice
-   versa. The /DECIMAL and /HEXADECIMAL qualifiers  specify  the  input  base
-   for  the number.
-
-   The format of the EVALUATE command is:
-
-   EV[ALUATE]       /D[ECIMAL]
-        /H[EXADECIMAL]
-        /N[UMBER]=number
-
-   The /NUMBER qualifier is required.
-
-   By default, EVALUATE treats the number as having a hexadecimal base.
-
-2 Qualifiers
-/DECIMAL
-  /D[ECIMAL]
-   Specifies that the input number  has  a  decimal  base.  The  /DECIMAL
-   qualifier is incompatible with the /HEXADECIMAL qualifier
-
-/HEXADECIMAL
-  /H[EXADECIMAL]
-   Specifies  that  the  input  number  has  a  hexadecimal   base.   The
-   /HEXADECIMAL   qualifier   is   incompatible   with    the    /DECIMAL
-   qualifier.
-
-/NUMBER
-  /N[UMBER]=number
-   Specifies the number to evaluate. This qualifier is required.
-
-   Example:
-
-   DSE> evaluate/number=61
-
-    Hex:  61   Dec:  97
-
-
-1 EXIT
-  EX[IT]
-   The EXIT command ends a DSE session.
-
-   The format of the EXIT command is:
-
-   EX[IT]
-
-   The EXIT command has no qualifiers.
-
-1 FIND
-  F[IND]
-   The FIND  command  directs  DSE  to  a  given  block  or  region.  At  the
-   beginning of a DSE session, use the FIND /REGION  command  to  select  the
-   target region.
-
-   The FIND command, except  with  the  /FREEBLOCK  and  /REGION  qualifiers,
-   uses the index  tree  to  locate  blocks.  FIND  can  locate  blocks  only
-   within  the  index  tree  structure.  If   you   need   to   locate   keys
-   independent of their attachment to the tree, use the RANGE command.
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies   the   block   to   find.   The   /BLOCK    qualifier    is
-   incompatible with the /KEY and /REGION qualifiers.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, .i.e.,  on  the  first  block  oriented  command,  DSE  uses
-   block one (1).
-
-/EXHAUSTIVE
-  /E[XHAUSTIVE]
-   Instructs  DSE  to  search  the  entire  index   structure   for   the
-   desired path or siblings.  FIND  /EXHAUSTIVE  is  useful  in  locating
-   blocks  that  are  in  the  tree  but  not  indexed   correctly.   The
-   /EXHAUSTIVE  qualifier  is  incompatible  with  the  /FREEBLOCK,  /KEY
-   and /REGION qualifiers.
-
-/FREEBLOCK
-  /F[REEBLOCK]
-   Finds the  nearest  free  block  to  the  block  specified  by  /HINT.
-   The   /FREEBLOCK   qualifier   is   incompatible   with   all    other
-   qualifiers  except  /BLOCK  and  /HINT.   The   /HINT   qualifier   is
-   required with the /FREEBLOCK qualifier.
-
-/HINT
-  /H[INT]=block_number
-   Designates the starting  point  of  a  /FREEBLOCK  search.  The  /HINT
-   qualifier  can  be  used  only  in  conjunction  with  the  /FREEBLOCK
-   qualifier.
-
-/KEY
-  /K[EY]=key
-   Searches  the  database  for  the  block  containing   the   specified
-   key.  Enclose  a  MUMPS  style  key   in   quotes   ("").   The   /KEY
-   qualifier is incompatible with all other qualifiers.
-
-/REGION
-  /R[EGION][=region]
-   Switches  to  the  named  Global   Directory   region.   The   /REGION
-   qualifier is incompatible with all other qualifiers.
-
-   /REGION  without  a  specified  region,  or  /REGION=*,  displays  all
-   existing regions in the database.
-
-/SIBLINGS
-  /S[IBLINGS]
-   Displays  the  block  numbers  of  the   logical   siblings   of   the
-   specified  block.  The  logical   siblings   are   the   blocks   that
-   logically exist to the right and  left  of  the  given  block  in  the
-   database tree  structure.  The  /SIBLINGS  qualifier  is  incompatible
-   with the /FREEBLOCK, /KEY and /REGION qualifiers.
-
-1 HELP
-  H[ELP]
-   The HELP command explains DSE commands.  The  HELP  command  uses  similar
-   conventions to the VAX/VMS help facility.
-
-   The format of the HELP command is:
-
-   H[ELP] [item]
-
-   Item tells HELP which  information  to  display.  Enter  the  DSE  command
-   (item) after the HELP command or at the  Topic  prompt.  Use  <RETURN>  or
-   <CTRL Z> to return to the DSE prompt.
-
-1 INTEGRIT
-  I[NTEGRIT]
-   The INTEGRIT command checks  the  internal  consistency  of  a  non-bitmap
-   block. INTEG reports errors in hexadecimal notation.
-
-   The format of the INTEGRIT command is:
-
-   I[NTEGRIT] /B[LOCK]=block_number
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies the block for DSE to check.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, .i.e.,  on  the  first  block  oriented  command,  DSE  uses
-   block one (1).
-
-1 MAPS
-  M[APS]
-   The MAPS command examines or updates bit maps.
-
-   MAPS  forces  blocks  either  /BUSY  or  /FREE.  The   /MASTER   qualifier
-   reflects the current status of a  local  bit  map  back  into  the  master
-   map. The /RESTORE qualifier rebuilds all maps  and  should  be  used  with
-   a great deal of caution as it can destroy important information.
-
-   By default, MAPS shows the  status  of  the  bit  map  for  the  specified
-   block.
-
-2 Qualifiers
-/BLOCK
-  /BL[OCK]=block_number
-   Specifies  the  target  block  for  MAPS.  The  /BLOCK  qualifier   is
-   incompatible with the /RESTORE_ALL qualifier.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed,  .i.e.,  on  the  first  block-oriented  command,  DSE  uses
-   block one (1).
-
-/BUSY
-  /BU[SY]
-   Marks  the  current  block  busy  in  the  block's   local   map   and
-   appropriately updates the master  bit  map.  The  /BUSY  qualifier  is
-   incompatible with all qualifiers except /BLOCK.
-
-/FREE
-  /F[REE]
-   Marks  the  current  block  free  in  the  block's   local   map   and
-   appropriately updates the master  bit  map.  The  /FREE  qualifier  is
-   incompatible with all qualifiers except /BLOCK.
-
-/MASTER
-  /M[ASTER]
-   Sets the master bit  map  bit  associated  with  the  current  block's
-   local map according  to  whether  that  local  map  is  full  or  not.
-   The /MASTER qualifier  is  incompatible  with  all  qualifiers  except
-   /BLOCK.
-
-/RESTORE_ALL
-  /R[ESTORE_ALL]
-   Sets all local bit  maps  and  the  master  bit  map  to  reflect  the
-   blocks used  in  the  database  file.  Use  RESTORE_ALL  only  if  the
-   database contents are known to be  correct,  but  a  large  number  of
-   the  bit  maps  require  correction.  The  /RESTORE_ALL  qualifier  is
-   incompatible with all other qualifiers.
-
-1 OPEN
-  OP[EN]
-   The OPEN command opens a file for sequential  output  of  global  variable
-   data. OPEN a file to which you want to "dump" information.
-
-   The format of the OPEN command is:
-
-   OP[EN] /F[ILE]=file
-
-   If an OPEN command does not  have  a  /FILE  qualifier,  DSE  reports  the
-   name of the current output file.
-
-2 Qualifiers
-/F[ILE]
-  /F[ILE]=file
-   Specifies the file to open.
-
-1 OVERWRITE
-  OV[ERWRITE]
-   The OVERWRITE command overwrites  the  specified  string  onto  the  given
-   offset  in  the  current  block.  Use  extreme  caution  when  using  this
-   command.
-
-   The format of the OVERWRITE command is:
-
-   OV[ERWRITE]      /D[ATA]=string
-        /O[FFSET]=offset
-
-2 Qualifiers
-/D[ATA]
-  /D[ATA]=string
-   Specifies the data  to  be  written.  Use  quotes  around  string  and
-   escape  codes  of  the  form  \a  or  \ab,   where   a   and   b   are
-   hexadecimal  digits,  for  non-printing  characters.   \\   translates
-   to a single backslash.
-
-/O[FFSET]
-  /O[FFSET]=offset
-   Specifies  the  offset  in  the  current  block  where  the  overwrite
-   should begin.
-
-1 PAGE
-  P[AGE]
-   The PAGE command sends one form feed to the output  device.  Use  PAGE  to
-   add form feeds to  a  dump  file,  making  the  hardcopy  file  easier  to
-   read. If you plan to use the  dump  file  with  MUPIP  LOAD,  do  not  use
-   PAGE.
-
-   The format of the PAGE command is:
-
-   P[AGE]
-
-   The PAGE command has no qualifiers.
-
-1 RANGE
-  RA[NGE]
-   The RANGE command finds  all  blocks  in  the  database  whose  first  key
-   falls in the specified range  of  keys.  The  RANGE  command  may  take  a
-   very long time unless the range  specified  by  /FROM  and  /TO  is  close
-   together. Use FIND /KEY first to determine  whether  the  key  appears  in
-   the tree.
-
-   The format of the RANGE command is:
-
-   RA[NGE]    /F[ROM]=block
-      /T[O]=block
-      /L[OWER]=key
-      /U[PPER]=key
-
-2 Qualifiers
-/FROM
-  /F[ROM]=block_number
-   Specifies a starting block number for the range search.
-
-   By  default,  RANGE  starts  processing  at  the  beginning   of   the
-   file.
-
-/TO
-  /T[O]=block_number
-   Specifies an ending block number for the range search.
-
-   By default, RANGE stops processing at the end of the file.
-
-/LOWER
-  /L[OWER]=key
-   Specifies the lower bound for the key range.
-
-/UPPER
-  /U[PPER]=key
-   Specifies the upper bound for the key range.
-
-1 REMOVE
-  REM[OVE]
-   The REMOVE command removes one or more records or a save buffer.
-
-   The format of the REMOVE command is:
-
-   REM[OVE]   /B[LOCK]=block_number
-        /C[OUNT]=count
-        /O[FFSET]
-        /R[ECORD]=record_number
-        /V[ERSION]=version_number
-
-   The version number is specified in decimal.
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies the  block  associated  with  the  record  or  buffer  being
-   deleted.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, .i.e.,  on  the  first  block  oriented  command,  DSE  uses
-   block one (1).
-
-/COUNT
-  /C[OUNT]=count
-   Specifies the number  of  records  to  remove.  The  /COUNT  qualifier
-   is incompatible with the /VERSION qualifier.
-
-   By default, REMOVE deletes a single record.
-
-/OFFSET
-  /O[FFSET]=offset
-   Specifies  the  offset  of  the  record   to   remove.   The   /OFFSET
-   qualifier   is   incompatible   with   the   /RECORD   and    /VERSION
-   qualifiers.
-
-/RECORD
-  /R[ECORD]=record_number
-   Specifies the record number of  the  record  to  remove.  The  /RECORD
-   qualifier   is   incompatible   with   the   /OFFSET   and    /VERSION
-   qualifiers.
-
-/VERSION
-  /V[ERSION]=version_number
-   Specifies  the  decimal  version  number  in  decimal  of   the   save
-   buffer to remove. /VERSION  is  required  to  REMOVE  a  SAVE  buffer.
-   /VERSION is incompatible with all qualifiers except /BLOCK.
-
-1 RESTORE
-  RES[TORE]
-   The RESTORE command restores saved versions of blocks.
-
-   The format of the RESTORE command is:
-
-   RES[TORE]  /B[LOCK]=block_number
-        /F[ROM]=from
-        /R[EGION]=region
-        /V[ERSION]=version_number
-
-   The version number is specified in decimal.
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies the block to restore.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed, .i.e.,  on  the  first  block  oriented  command,  DSE  uses
-   block one (1).
-
-/FROM
-  /F[ROM]=block_number
-   Specifies the block number of the save buffer to restore.
-
-   By  default,  RESTORE  uses  the  target  block  number  as  the  SAVE
-   block number.
-
-/REGION
-  /R[EGION]=region_number
-   Specifies the region of the saved buffer to restore.
-
-   By default, RESTORE uses SAVE buffers from the current region.
-
-/VERSION
-  /V[ERSION]=version_number
-   Specifies  the  decimal  version  number  of  the  block  to  restore.
-   The version number is required.
-
-1 SAVE
-  SA[VE]
-   The SAVE command saves  versions  of  blocks  or  displays  a  listing  of
-   saved versions. Saved information is lost when DSE  EXITs.  Use  with  the
-   RESTORE command  to  move  blocks.  As  a  safety  feature,  use  SAVE  to
-   retain fallback copies of database blocks before changing them.
-
-   The format of the SAVE command is:
-
-   SA[VE]     /B[LOCK]=block_number
-      /C[OMMENT]=string
-      /L[IST]
-
-2 Qualifiers
-/BLOCK
-  /B[LOCK]=block_number
-   Specifies the block to save.
-
-   On commands with  no  /BLOCK=  qualifier,  DSE  uses  the  last  block
-   handled by a DSE operation. In this  case,  when  no  block  has  been
-   accessed,  .i.e.,  on  the  first  block-oriented  command,  DSE  uses
-   block one (1).
-
-/COMMENT
-  /C[OMMENT]=string
-   Specifies a comment to save with  the  block.  Enclose  the    comment
-   in quotes ("").  The  /COMMENT  qualifier  is  incompatible  with  the
-   /LIST qualifier.
-
-/LIST
-  /L[IST]
-   Lists saved versions of  specified  blocks.  The  /LIST  qualifier  is
-   incompatible with the /COMMENT qualifier.
-
-   By default, SAVE /LIST provides a directory of all SAVEd blocks.
-
-1 SHIFT
-  SH[IFT]
-   The SHIFT command shifts data in a block, filling  the  block  with  zeros
-   or shortening the block. The format of the SHIFT command is:
-
-   SH[IFT]    /B[ACKWARD]=shift
-      /F[ORWARD]=shift
-      /O[FFSET]=offset
-
-2 Qualifiers
-/BACKWARD
-  /B[ACKWARD]=shift
-   Specifies  the  extent  to  which  DSE  should  shift  data  backwards
-   towards   the   block   header.    The    /BACKWARD    qualifier    is
-   incompatible with the /FORWARD qualifier.
-
-/FORWARD
-  /F[ORWARD]=shift
-   Specifies  the  extent  to  which  DSE  should  shift   data   forward
-   towards  the  end  of   the   block.   The   /FORWARD   qualifier   is
-   incompatible with the /BACKWARD qualifier.
-
-/OFFSET
-  /O[FFSET]=offset
-   Specifies  the  starting  offset  of  the  portion  of  the  block  to
-   shift.
-
-1 SPAWN
-  SP[AWN]
-   The SPAWN command creates a subprocess  for  access  to  the  VMS  Command
-   Language  Interpreter  (CLI),  usually  DCL,   without   terminating   the
-   current DSE environment. Use  the  SPAWN  command  to  suspend  a  session
-   and issue DCL commands such as MUPIP  INTEG  /REGION  or  GDE.  The  SPAWN
-   command spawns a subprocess with  an  optional  command  string.  A  SPAWN
-   with no command  string  parameter  leaves  your  terminal  at  the  input
-   prompt of the CLI of the spawned process.
-
-   The format of the SPAWN command is:
-
-   SP[AWN] [command]
-
-   The SPAWN command has no qualifiers.
-
-1 WCINIT
-  W[CINIT]
-   The WCINIT  command  reinitializes  the  global  buffers  of  the  current
-   region. Because it cleans out  the  cache,  WCINIT  is  a  very  dangerous
-   command  and  therefore  should  not  be  used  except   under   Greystone
-   supervision.
-
-   WARNING: A WCINIT command issued  while  normal  database  operations  are
-   in progress can cause catastrophic damage to the database.
-
-   The format of the WCINIT command is:
-
-   W[CINIT]
-
-   The WCINIT command has no qualifiers.
-
-   When  you  issue  the  WCINIT  command,  DSE  issues   the   CONFIRMATION:
-   prompt. You must verify the WCINIT command by responding with a "YES."
-
-   If you do not confirm the WCINIT, DSE issues the message:
-
-   No action taken, enter  yes  at  the  CONFIRMATION  prompt  to  initialize
-   global buffers.
-
-
diff --git a/sr_vvms/dse_cmd.cld b/sr_vvms/dse_cmd.cld
deleted file mode 100644
index f856d88..0000000
--- a/sr_vvms/dse_cmd.cld
+++ /dev/null
@@ -1,364 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2014 Fidelity Information Services, Inc	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-MODULE DSE_CMD
-
-DEFINE VERB add
-	ROUTINE dse_adrec
-	QUALIFIER block 					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER data						NONNEGATABLE	VALUE(TYPE=$QUOTED_STRING,REQUIRED)
-	QUALIFIER key						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER offset					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER pointer					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER record					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER star		SYNTAX=AD_STAR_SYN		NONNEGATABLE
-
-	DISALLOW STAR AND (DATA OR KEY OR RECORD OR OFFSET) OR DATA AND POINTER OR RECORD AND OFFSET
-
-DEFINE SYNTAX AD_STAR_SYN
-	ROUTINE dse_adstar
-
-DEFINE VERB all
-	ROUTINE dse_all
-	QUALIFIER all						NONNEGATABLE
-	QUALIFIER buffer_flush					NONNEGATABLE
-	QUALIFIER critinit					NONNEGATABLE
-	QUALIFIER dump						NONNEGATABLE
-	QUALIFIER freeze					NEGATABLE
-	QUALIFIER override					NONNEGATABLE
-	QUALIFIER reference					NONNEGATABLE
-	QUALIFIER release					NONNEGATABLE
-	QUALIFIER renew		SYNTAX = ALL_CONFIRM_SYNTAX	NONNEGATABLE
-	QUALIFIER seize						NONNEGATABLE
-	QUALIFIER wcinit	SYNTAX = ALL_CONFIRM_SYNTAX	NONNEGATABLE
-
-	DISALLOW (WCINIT AND BUFFER_FLUSH)
-	DISALLOW (RENEW AND (FREEZE OR SEIZE OR RELEASE OR CRITINIT OR BUFFER_FLUSH OR REFERENCE OR WCINIT OR OVERRIDE))
-	DISALLOW (SEIZE AND RELEASE) OR (CRITINIT AND (SEIZE OR RELEASE))
-	DISALLOW (DUMP AND (BUFFER_FLUSH OR CRITINIT OR FREEZE OR OVERRIDE OR REFERENCE OR RELEASE OR RENEW OR SEIZE OR WCINIT ))
-	DISALLOW ALL AND NOT DUMP
-
-DEFINE SYNTAX ALL_CONFIRM_SYNTAX
-	ROUTINE	dse_all
-	PARAMETER P1, LABEL=CONFIRMATION, VALUE(REQUIRED)
-
-DEFINE VERB buffer_flush
-	ROUTINE dse_flush
-
-DEFINE VERB cache
-	ROUTINE dse_cache
-	QUALIFIER all						NONNEGATABLE
-	QUALIFIER change					NONNEGATABLE
-	QUALIFIER crit 						NEGATABLE
-	QUALIFIER offset					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER recover					NONNEGATABLE
-	QUALIFIER show						NONNEGATABLE
-	QUALIFIER size						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER value						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER verify					NONNEGATABLE
-
-	DISALLOW NOT (CHANGE OR RECOVER OR SHOW OR VERIFY)
-	DISALLOW ANY2(CHANGE,RECOVER,SHOW,VERIFY)
-	DISALLOW ALL AND CHANGE
-	DISALLOW NOT (CHANGE OR SHOW) AND (OFFSET OR SIZE OR VALUE)
-	DISALLOW SHOW AND VALUE
-	DISALLOW CHANGE AND NOT OFFSET
-	DISALLOW OFFSET AND NOT SIZE
-	DISALLOW SIZE AND NOT OFFSET
-	DISALLOW VALUE AND NOT OFFSET
-	DISALLOW NEG CRIT AND (CHANGE OR RECOVER OR VERIFY)
-
-DEFINE VERB change
-	QUALIFIER fileheader	SYNTAX = CHANGE_FH_SYNTAX
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER bsiz		SYNTAX=CHANGE_BH_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER cmpc		SYNTAX=CHANGE_RH_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER level		SYNTAX=CHANGE_BH_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER offset	SYNTAX=CHANGE_RH_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER record	SYNTAX=CHANGE_RH_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER rsiz		SYNTAX=CHANGE_RH_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER tn		SYNTAX=CHANGE_BH_SYN		NONNEGATABLE	VALUE(DEFAULT = "FFFFFFFFFFFFFFFF")
-
-	DISALLOW (fileheader AND (BLOCK OR LEVEL OR BSIZ OR RECORD OR OFFSET OR CMPC OR RSIZ OR TN)) OR
-		((LEVEL OR BSIZ OR TN) AND (RECORD OR OFFSET OR CMPC OR RSIZ)) OR
-		(RECORD AND OFFSET)
-
-DEFINE SYNTAX CHANGE_FH_SYNTAX
-	ROUTINE dse_chng_fhead
-	QUALIFIER abandoned_kills			NONNEGATABLE    VALUE(TYPE = $NUMBER, REQUIRED)
-	QUALIFIER avg_blks_read				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER blks_to_upgrade			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER blk_size				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER b_bytestream				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER b_comprehensive			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER b_database				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER b_incremental				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER b_record				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER blocks_free				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER cert_db_ver				NONNEGATABLE	VALUE(REQUIRED,TYPE=DB_VERS)
-	QUALIFIER corrupt_file						VALUE(TYPE=TRUE_FALSE_NOCHANGE), DEFAULT
-	QUALIFIER crit					NEGATABLE
-	QUALIFIER current_tn				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER db_write_fmt				NONNEGATABLE	VALUE(REQUIRED,TYPE=DB_VERS)
-	QUALIFIER declocation				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER decvalue				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER def_collation				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER flush_time 				NONNEGATABLE	VALUE(TYPE = $DELTATIME)
-	QUALIFIER freeze						VALUE(TYPE=TRUE_FALSE_NOCHANGE), DEFAULT
-	QUALIFIER fully_upgraded			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER got2v5once				NONNEGATABLE	VALUE(REQUIRED)
- 	QUALIFIER gvstatsreset				NONNEGATABLE
-	QUALIFIER hard_spin_count			NONNEGATABLE	VALUE(TYPE = $NUMBER, REQUIRED)
-	QUALIFIER hexlocation 				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER hexvalue				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER inhibit_kills				NONNEGATABLE	VALUE(TYPE = $NUMBER, REQUIRED)
-	QUALIFIER interrupted_recov					VALUE(TYPE=TRUE_FALSE_NOCHANGE), DEFAULT
-	QUALIFIER jnl_cache						VALUE(TYPE=TRUE_FALSE_NOCHANGE), DEFAULT
-	QUALIFIER key_max_size				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER kill_in_prog				NONNEGATABLE    VALUE(REQUIRED)
-	QUALIFIER location				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER machine_name				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER max_tn				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER mbm_size				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER null_subscripts					VALUE(TYPE=NEVER_ALWAYS_ALLOWEXISTING), DEFAULT
-	QUALIFIER online_nbb				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER override				NONNEGATABLE
-	QUALIFIER pre_read_trigger_factor		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER quantum_interval			NONNEGATABLE	VALUE(TYPE = $DELTATIME)
-	QUALIFIER rc_srv_count				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER record_max_size			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER reference_count			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER reg_seqno				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER reserved_bytes			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER resync_seqno				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER resync_tn				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER response_interval			NEGATABLE	VALUE(TYPE = $DELTATIME)
-	QUALIFIER size					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER sleep_spin_count			NONNEGATABLE	VALUE(TYPE = $NUMBER, REQUIRED)
-	QUALIFIER spin_sleep_time			NONNEGATABLE	VALUE(TYPE = $NUMBER, REQUIRED)
-	QUALIFIER staleness_timer			NEGATABLE	VALUE(TYPE = $DELTATIME)
-	QUALIFIER stdnullcoll						VALUE(TYPE=TRUE_FALSE_NOCHANGE), DEFAULT
-	QUALIFIER tick_interval				NONNEGATABLE	VALUE(TYPE = $DELTATIME)
-	QUALIFIER timers_pending			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER total_blks				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER trigger_flush				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER upd_reserved_area			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER upd_writer_trigger_factor		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER value 				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER wait_disk				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER warn_max_tn				NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER writes_per_flush 			NONNEGATABLE	VALUE(REQUIRED)
-
-DEFINE TYPE DB_VERS
-	KEYWORD V4
-	KEYWORD V6
-
-DEFINE TYPE TRUE_FALSE_NOCHANGE
-	KEYWORD TRUE
-	KEYWORD FALSE
-	KEYWORD NOCHANGE, DEFAULT
-
-DEFINE TYPE NEVER_ALWAYS_ALLOWEXISTING
-	KEYWORD ALWAYS
-	KEYWORD EXISTING
-	KEYWORD FALSE
-	KEYWORD NEVER
-	KEYWORD TRUE
-	KEYWORD NOCHANGE, DEFAULT
-
-DEFINE SYNTAX CHANGE_BH_SYN
-	ROUTINE dse_chng_bhead
-
-DEFINE SYNTAX CHANGE_RH_SYN
-	ROUTINE dse_chng_rhead
-
-DEFINE VERB close
-	ROUTINE dse_close
-
-DEFINE VERB critical
-	ROUTINE dse_crit
-	QUALIFIER all						NONNEGATABLE
-	QUALIFIER crash						NONNEGATABLE
-	QUALIFIER cycle                                         NONNEGATABLE
-	QUALIFIER init						NONNEGATABLE
-	QUALIFIER owner						NONNEGATABLE
-	QUALIFIER release					NONNEGATABLE
-	QUALIFIER remove					NONNEGATABLE
-	QUALIFIER reset						NONNEGATABLE
-	QUALIFIER seize						NONNEGATABLE
-
-	DISALLOW ANY2(INIT,OWNER,SEIZE,RELEASE,REMOVE)
-	DISALLOW CRASH AND (SEIZE OR RELEASE OR OWNER OR RESET)
-	DISALLOW RESET AND (SEIZE OR RELEASE OR OWNER)
-	DISALLOW CYCLE AND (INIT OR REMOVE OR SEIZE OR RELEASE OR RESET)
-	DISALLOW ALL AND (CRASH OR CYCLE OR INIT OR OWNER OR RELEASE OR REMOVE OR RESET OR SEIZE)
-
-DEFINE VERB dump
-	ROUTINE	dse_dmp
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER count 							VALUE(REQUIRED)
-	QUALIFIER crit						NEGATABLE
-	QUALIFIER fileheader	SYNTAX=FILE_HEAD_SYN		NONNEGATABLE
-	QUALIFIER glo						NONNEGATABLE
-	QUALIFIER header					NEGATABLE
-	QUALIFIER offset					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER record					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER zwr						NONNEGATABLE
-
-	DISALLOW ANY2(RECORD,OFFSET,FILEHEADER) OR FILEHEADER AND (BLOCK OR HEADER OR COUNT OR GLO OR ZWR) OR GLO AND ZWR
-		OR GLO AND HEADER OR ZWR AND HEADER OR COUNT AND NOT HEADER AND NOT (RECORD OR OFFSET) AND NOT BLOCK
-
-DEFINE SYNTAX FILE_HEAD_SYN
-	ROUTINE dse_dmp_fhead
-	QUALIFIER all						NONNEGATABLE
-	QUALIFIER backup					NEGATABLE
-	QUALIFIER basic						NEGATABLE
-	QUALIFIER bg_trc					NEGATABLE
-	QUALIFIER db_csh					NEGATABLE
-	QUALIFIER environment					NEGATABLE
-	QUALIFIER gvstats					NEGATABLE
-	QUALIFIER journal					NEGATABLE
-	QUALIFIER mixedmode					NEGATABLE
-	QUALIFIER retries					NEGATABLE
-	QUALIFIER tpblkmod					NEGATABLE
-	QUALIFIER tpretries					NEGATABLE
-	QUALIFIER updproc					NEGATABLE
-
-DEFINE VERB evaluate
-	ROUTINE dse_eval
-	QUALIFIER decimal					NONNEGATABLE
-	QUALIFIER hexadecimal					NONNEGATABLE
-	QUALIFIER number					NONNEGATABLE	VALUE(REQUIRED)
-
-DEFINE VERB exit
-	ROUTINE dse_exit
-
-DEFINE VERB find
-	ROUTINE dse_f_blk
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER crit						NEGATABLE
-	QUALIFIER exhaustive					NONNEGATABLE
-	QUALIFIER freeblock	SYNTAX=FIND_FREE_SYN		NONNEGATABLE
-	QUALIFIER hint						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER key		SYNTAX=FIND_KEY_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER region	SYNTAX=FIND_REG_SYN		NONNEGATABLE	VALUE(DEFAULT="*")
-	QUALIFIER siblings					NONNEGATABLE
-
-	DISALLOW ANY2(BLOCK,FREEBLOCK,KEY,REGION)
-	DISALLOW (EXHAUSTIVE OR SIBLINGS) AND (FREEBLOCK OR KEY OR REGION)
-	DISALLOW HINT AND NOT FREEBLOCK
-	DISALLOW FREEBLOCK AND NOT HINT
-
-DEFINE SYNTAX FIND_KEY_SYN
-	ROUTINE dse_f_key
-
-DEFINE SYNTAX FIND_FREE_SYN
-	ROUTINE dse_f_free
-
-DEFINE SYNTAX FIND_REG_SYN
-	ROUTINE dse_f_reg
-
-DEFINE VERB help
-	ROUTINE dse_help
-	PARAMETER P1, LABEL=QUERY
-
-DEFINE VERB integrit
-	ROUTINE dse_integ
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER crit						NEGATABLE
-
-DEFINE VERB maps
-	ROUTINE dse_maps
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER busy						NONNEGATABLE
-	QUALIFIER free						NONNEGATABLE
-	QUALIFIER master					NONNEGATABLE
-	QUALIFIER restore_all					NONNEGATABLE
-
-	DISALLOW ANY2(FREE,BUSY,MASTER,RESTORE_ALL) OR (BLOCK AND RESTORE_ALL)
-
-DEFINE VERB open
-	ROUTINE dse_open
-	QUALIFIER file						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER ochset                                       NONNEGATABLE    VALUE(TYPE=$QUOTED_STRING,REQUIRED)
-
-DEFINE VERB overwrite
-	ROUTINE dse_over
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER data						NONNEGATABLE	VALUE(TYPE=$QUOTED_STRING,REQUIRED)
-	QUALIFIER offset					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER ochset                                       NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-
-DEFINE VERB page
-	ROUTINE dse_page
-
-DEFINE VERB quit
-	ROUTINE dse_exit
-
-DEFINE VERB range
-	ROUTINE dse_range
-	QUALIFIER busy						NEGATABLE
-	QUALIFIER crit						NEGATABLE
-	QUALIFIER from						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER index						NONNEGATABLE
-	QUALIFIER lost						NONNEGATABLE
-	QUALIFIER lower						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER star						NONNEGATABLE
-	QUALIFIER to						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER upper						NONNEGATABLE	VALUE(REQUIRED)
-
-DEFINE VERB remove
-	ROUTINE dse_rmsb
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER count								VALUE(REQUIRED)
-	QUALIFIER offset	SYNTAX=REC_REMO_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER record	SYNTAX=REC_REMO_SYN		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER version					NONNEGATABLE	VALUE(REQUIRED)
-
-	DISALLOW ANY2(RECORD,OFFSET,VERSION) OR VERSION AND COUNT
-
-DEFINE SYNTAX REC_REMO_SYN
-	ROUTINE dse_rmrec
-
-DEFINE VERB restore
-	ROUTINE dse_rest
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER from						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER region					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER version					NONNEGATABLE	VALUE(REQUIRED)
-
-DEFINE VERB save
-	ROUTINE dse_save
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER comment					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER crit						NEGATABLE
-	QUALIFIER list						NONNEGATABLE
-
-	DISALLOW LIST AND COMMENT
-
-DEFINE VERB shift
-	ROUTINE dse_shift
-	QUALIFIER backward					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER block						NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER forward					NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER offset					NONNEGATABLE	VALUE(REQUIRED)
-
-	DISALLOW FORWARD AND BACKWARD
-
-DEFINE VERB spawn
-	ROUTINE util_spawn
-	PARAMETER P1, LABEL=COMMAND, VALUE(DEFAULT="")
-
-DEFINE VERB version
-	ROUTINE dse_version
-
-DEFINE VERB wcinit
-	ROUTINE dse_wcreinit
-	PARAMETER P1, LABEL=CONFIRMATION, VALUE(REQUIRED)
diff --git a/sr_vvms/dse_ctrlc_setup.c b/sr_vvms/dse_ctrlc_setup.c
deleted file mode 100644
index 28200ef..0000000
--- a/sr_vvms/dse_ctrlc_setup.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* chtest.c
-/*
- */
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include <iodef.h>
-#include <dvidef.h>
-#include <dcdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <chfdef.h>
-#include <efndef.h>
-#include <signal.h>
-
-GBLREF VSIG_ATOMIC_T	util_interrupt;
-
-#define OUTOFBAND_MSK 0x02000008
-
-void intr_handler(void)
-{
-    util_interrupt = 1;
-}
-
-void dse_ctrlc_setup(void)
-{	int4		status, channel, item_code, event;
-	uint4	devclass;
-	io_terminator	outofband_msk;
-	$DESCRIPTOR(sys_input,"SYS$INPUT");
-
-	if ((status = sys$assign(&sys_input,&channel,0,0)) != SS$_NORMAL)
-		lib$signal(status);
-	item_code = DVI$_DEVCLASS;
-	lib$getdvi(&item_code, &channel, 0, &devclass, 0, 0);
-	if (devclass == DC$_TERM)
-	{
-		outofband_msk.x = 0;
-		outofband_msk.mask = OUTOFBAND_MSK;
-		if ((status = sys$qiow(EFN$C_ENF,channel
-				,(IO$_SETMODE | IO$M_OUTBAND | IO$M_TT_ABORT)
-				,0 ,0 ,0
-				,intr_handler
-				,&outofband_msk
-				,0 ,0 ,0 ,0 )) != SS$_NORMAL)
-		{	lib$signal(status);
-		}
-	}
-	util_interrupt = 0;
-	return;
-}
-
-
-
diff --git a/sr_vvms/dse_help.c b/sr_vvms/dse_help.c
deleted file mode 100644
index 8d7e0fa..0000000
--- a/sr_vvms/dse_help.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "release_name.h"
-#include <ssdef.h>
-#include <climsgdef.h>
-#include <descrip.h>
-#include "util.h"
-#include "dse.h"
-
-#define HLP$M_PROMPT 1
-#define HELP_LIBRARY "GTM$HELP:DSE"
-
-void dse_help(void)
-{
-
-	uint4 flags;
-	char buff[256];
-	$DESCRIPTOR(line, buff);
-	$DESCRIPTOR(libr, HELP_LIBRARY);
-	$DESCRIPTOR(ent, "QUERY");
-
-	if (CLI$PRESENT(&ent) != CLI$_PRESENT || CLI$GET_VALUE(&ent,&line) != SS$_NORMAL)
-		line.dsc$w_length = 0;
-	flags = HLP$M_PROMPT;
-	lbr$output_help(lib$put_output,0,&line,&libr,&flags,lib$get_input);
-	return;
-
-}
-
-void dse_version(void)
-{
-	/*
-	 * The following assumptions have been made in this function
-	 * 1. GTM_RELEASE_NAME is of the form "GTM_PRODUCT VERSION THEREST"
-	 *    (Refer file release_name.h)
-	 * 2. A single blank separates GTM_PRODUCT and VERSION
-	 * 3. If THEREST exists, it is separated from VERSION by atleast
-	 *    one blank
-	 */
-	char gtm_rel_name[] = GTM_RELEASE_NAME;
-	char dse_rel_name[SIZEOF(GTM_RELEASE_NAME) - SIZEOF(GTM_PRODUCT)];
-	int  dse_rel_name_len;
-	char *cptr;
-
-	for (cptr = gtm_rel_name + SIZEOF(GTM_PRODUCT), dse_rel_name_len = 0;
-	     *cptr != ' ' && *cptr != '\0';
-	     dse_rel_name[dse_rel_name_len++] = *cptr++);
-	dse_rel_name[dse_rel_name_len] = '\0';
-	util_out_print("!AD", TRUE, dse_rel_name_len, dse_rel_name);
-	return;
-}
diff --git a/sr_vvms/dse_open.c b/sr_vvms/dse_open.c
deleted file mode 100644
index 417ed73..0000000
--- a/sr_vvms/dse_open.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdsblk.h"
-#include "cli.h"
-#include "dse.h"
-#include "util.h"
-
-#define NO_P_MSG_SIZE (SIZEOF(msg) / SIZEOF(int4) - 5)
-
-static struct FAB patch_fab;
-static struct RAB patch_rab;
-static char patch_ofile[256];
-
-GBLREF enum dse_fmt	dse_dmp_format;
-
-void dse_open(void)
-{
-	$DESCRIPTOR(d_buff, patch_ofile);
-	$DESCRIPTOR(d_ent, "FILE");
-	int4 status,i;
-	struct {
-		short int arg_cnt;
-		short int def_opt;
-		int4 msg_number;
-		short int fp_cnt;
-		short new_opts;
-		int4 fp_n[4];
-	} msg;
-
-	if (cli_present("FILE") == CLI_PRESENT)
-	{
-		if (CLOSED_FMT != dse_dmp_format)
-		{
-			util_out_print("Error:  output file already open.",TRUE);
-			util_out_print("Current output file:  !AD", TRUE, strlen(patch_ofile), &patch_ofile[0]);
-			return;
-		}
-		if (CLI$GET_VALUE(&d_ent,&d_buff) != SS$_NORMAL)
-			return;
-		for(i = 254; patch_ofile[i] == ' ' ;i--)
-			if (i == 0)
-			{
-				util_out_print("Error: must specify a file name.",TRUE);
-				return;
-			}
-		i++;
-		patch_ofile[i] = 0;
-		patch_fab = cc$rms_fab;
-		patch_fab.fab$b_rat = FAB$M_CR;
-		patch_fab.fab$l_fna = patch_ofile;
-		patch_fab.fab$b_fns = i;
-		status = sys$create(&patch_fab);
-		switch (status )
-		{
-		case RMS$_NORMAL:
-		case RMS$_CREATED:
-		case RMS$_SUPERSEDE:
-		case RMS$_FILEPURGED:
-			break;
-		default:
-			msg.arg_cnt = NO_P_MSG_SIZE;
-			msg.new_opts = msg.def_opt = 1;
-			msg.msg_number = status;
-			msg.fp_cnt = 0;
-			sys$putmsg(&msg,0,0,0);
-			return;
-		}
-		patch_rab = cc$rms_rab;
-		patch_rab.rab$l_fab = &patch_fab;
-		status = sys$connect(&patch_rab);
-		if (status != RMS$_NORMAL)
-		{
-			msg.arg_cnt = NO_P_MSG_SIZE;
-			msg.new_opts = msg.def_opt = 1;
-			msg.msg_number = status;
-			msg.fp_cnt = 0;
-			sys$putmsg(&msg,0,0,0);
-			return;
-		}
-		dse_dmp_format = OPEN_FMT;
-	} else
-	{
-		if (CLOSED_FMT != dse_dmp_format)
-			util_out_print("Current output file:  !AD", TRUE, strlen(patch_ofile), &patch_ofile[0]);
-		else
-			util_out_print("No current output file.",TRUE);
-	}
-	return;
-
-}
-
-boolean_t dse_fdmp_output(void *addr, int4 len)
-{
-	int4 status;
-	static char	*buffer = NULL;
-	static int	bufsiz = 0;
-
-	struct {
-		short int arg_cnt;
-		short int def_opt;
-		int4 msg_number;
-		short int fp_cnt;
-		short new_opts;
-		int4 fp_n[4];
-	} msg;
-	assert(len >= 0);
-	if (len + 1 > bufsiz)
-	{
-		if (buffer)
-			free(buffer);
-		bufsiz = len + 1;
-		buffer = (char *)malloc(bufsiz);
-	}
-	if (len)
-	{
-		memcpy(buffer, addr, len);
-		buffer[len] = 0;
-	}
-	patch_rab.rab$l_rbf = buffer;
-	patch_rab.rab$w_rsz = len;
-	status = sys$put(&patch_rab);
-	if (status != RMS$_NORMAL)
-	{
-		rts_error(VARLSTCNT(1) status);
-		return FALSE;
-	}
-	return TRUE;
-}
-
-
-void dse_close(void)
-{
-	int4 status;
-	struct {
-		short int arg_cnt;
-		short int def_opt;
-		int4 msg_number;
-		short int fp_cnt;
-		short new_opts;
-		int4 fp_n[4];
-	} msg;
-
-	if (CLOSED_FMT != dse_dmp_format)
-	{
-		util_out_print("Closing output file:  !AD",TRUE,LEN_AND_STR(patch_ofile));
-		status = sys$close(&patch_fab);
-		if (status != RMS$_NORMAL)
-		{
-			msg.arg_cnt = NO_P_MSG_SIZE;
-			msg.new_opts = msg.def_opt = 1;
-			msg.msg_number = status;
-			msg.fp_cnt = 0;
-			sys$putmsg(&msg,0,0,0);
-			return;
-		}
-		dse_dmp_format = CLOSED_FMT;
-	}
-	else
-		util_out_print("Error:  no current output file.",TRUE);
-	return;
-}
diff --git a/sr_vvms/dse_puttime.c b/sr_vvms/dse_puttime.c
deleted file mode 100644
index 4012104..0000000
--- a/sr_vvms/dse_puttime.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include "util.h"
-#include "dse_puttime.h"
-
-void dse_puttime(int_ptr_t time, char *c, bool flush)
-{	unsigned char outbuf[12];
-	short unsigned	timelen;
-	$DESCRIPTOR(time_desc,outbuf);
-
-	memset(outbuf, 0, SIZEOF(outbuf));
-	sys$asctim(&timelen, &time_desc, time, 1);
-	util_out_print(c,flush,timelen,outbuf);
-	return;
-}
diff --git a/sr_vvms/dsk_read.c b/sr_vvms/dsk_read.c
deleted file mode 100644
index 3fa7d74..0000000
--- a/sr_vvms/dsk_read.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <iodef.h>
-#include <rms.h>
-#include <ssdef.h>
-#include "gtm_string.h"
-#ifdef DEBUG
-#include "gtm_stdio.h"
-#endif
-
-#include "cdb_sc.h"
-#include "efn.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gtm_malloc.h"		/* for CHECK_CHANNEL_STATUS macro */
-#include "iosb_disk.h"
-#include "iosp.h"
-#include "gds_blk_upgrade.h"
-#include "gdsbml.h"
-#include "gtmimagename.h"
-
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	sgmnt_addrs		*cs_addrs;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF	uint4			update_trans;
-GBLREF	volatile int4		fast_lock_count;
-GBLREF	boolean_t		dse_running;
-
-error_def(ERR_DYNUPGRDFAIL);
-
-int4 dsk_read(block_id blk, sm_uc_ptr_t buff, enum db_ver *ondsk_blkver, boolean_t blk_free)
-{
-	int4			status, size;
-	io_status_block_disk	iosb;
-	enum db_ver		tmp_ondskblkver;
-	sm_uc_ptr_t		save_buff = NULL;
-	uint4			channel_id;
-	boolean_t		fully_upgraded;
-	DEBUG_ONLY(
-		blk_hdr_ptr_t	blk_hdr;
-		static int	in_dsk_read;
-	)
-	/* It is possible that the block that we read in from disk is a V4 format block.  The database block scanning routines
-	 * (gvcst_*search*.c) that might be concurrently running currently assume all global buffers (particularly the block
-	 * headers) are V5 format.  They are not robust enough to handle a V4 format block. Therefore we do not want to
-	 * risk reading a potential V4 format block directly into the cache and then upgrading it. Instead we read it into
-	 * a private buffer, upgrade it there and then copy it over to the cache in V5 format. This is the static variable
-	 * read_reformat_buffer. We could have as well used the global variable "reformat_buffer" for this purpose. But
-	 * that would then prevent dsk_reads and concurrent dsk_writes from proceeding. We dont want that loss of asynchronocity.
-	 * Hence we keep them separate. Note that while "reformat_buffer" is used by a lot of routines, "read_reformat_buffer"
-	 * is used only by this routine and hence is a static instead of a GBLDEF.
-	 */
-	static sm_uc_ptr_t	read_reformat_buffer;
-	static int		read_reformat_buffer_len;
-
-	assert(!blk_free); /* VMS should never try to read a FREE block from the disk */
-	assert(0 == in_dsk_read);	/* dsk_read should never be nested. the read_reformat_buffer logic below relies on this */
-	DEBUG_ONLY(in_dsk_read++;)
-	assert(cs_addrs->hdr == cs_data);
-	size = cs_data->blk_size;
-	assert(cs_data->acc_meth == dba_bg);
-	/* Since cs_data->fully_upgraded is referenced more than once in this module (once explicitly and once in
-	 * GDS_BLK_UPGRADE_IF_NEEDED macro used below), take a copy of it and use that so all usages see the same value.
-	 * Not doing this, for example, can cause us to see the database as fully upgraded in the first check causing us
-	 * not to allocate save_buff (a temporary buffer to hold a V4 format block) at all but later in the macro
-	 * we might see the database as NOT fully upgraded so we might choose to call the function gds_blk_upgrade which
-	 * does expect a temporary buffer to have been pre-allocated. It is ok if the value of cs_data->fully_upgraded
-	 * changes after we took a copy of it since we have a buffer locked for this particular block (at least in BG)
-	 * so no concurrent process could be changing the format of this block. For MM there might be an issue.
-	 */
-	fully_upgraded = cs_data->fully_upgraded;
-	if (!fully_upgraded)
-	{
-		save_buff = buff;
-		if (size > read_reformat_buffer_len)
-		{	/* do the same for the reformat_buffer used by dsk_read */
-			assert(0 == fast_lock_count);	/* this is mainline (non-interrupt) code */
-			++fast_lock_count;		/* No interrupts in free/malloc across this change */
-			if (NULL != read_reformat_buffer)
-				free(read_reformat_buffer);
-			read_reformat_buffer = malloc(size);
-			read_reformat_buffer_len = size;
-			--fast_lock_count;
-		}
-		buff = read_reformat_buffer;
-	}
-	if (NULL != cs_addrs->nl)	/* could be NULL in case of MUPIP CREATE */
-		INCR_GVSTATS_COUNTER(cs_addrs, cs_addrs->nl, n_dsk_read, 1);
-	channel_id = ((vms_gds_info*)(gv_cur_region->dyn.addr->file_cntl->file_info))->fab->fab$l_stv;
-	status = sys$qiow(efn_bg_qio_read, channel_id, IO$_READVBLK, &iosb, 0, 0,
-				buff, size, (size / DISK_BLOCK_SIZE) * blk + cs_data->start_vbn, 0, 0, 0);
-	if (SS$_NORMAL != status)
-	{
-		DEBUG_ONLY(in_dsk_read--;)
-		assert(FALSE);
-		CHECK_CHANNEL_STATUS(status, channel_id);
-		return status;
-	}
-	status = iosb.cond;
-	if (SS$_NORMAL != status)
-	{
-		DEBUG_ONLY(in_dsk_read--;)
-		assert(FALSE);
-		return status;
-	}
-	assert(0 == (long)buff % 2);
-	/* GDSV4 (0) version uses "buff->bver" as a block length so should always be > 0 when M code is running.
-	 * The only exception is if the block has not been initialized (possible if it is BLK_FREE status in the
-	 * bitmap). This is possible due to concurrency issues while traversing down the tree. But if we have
-	 * crit on this region, we should not see these either. Assert accordingly.
-	 */
-	assert(!IS_MCODE_RUNNING || !cs_addrs->now_crit || ((blk_hdr_ptr_t)buff)->bver);
-	/* Block must be converted to current version (if necessary) for use by internals.
-	 * By definition, all blocks are converted from/to their on-disk version at the IO point.
-	 */
-	GDS_BLK_UPGRADE_IF_NEEDED(blk, buff, save_buff, cs_data, &tmp_ondskblkver, status, fully_upgraded);
-	DEBUG_DYNGRD_ONLY(
-		if (GDSVCURR != tmp_ondskblkver)
-			PRINTF("DSK_READ: Block %d being dynamically upgraded on read\n", blk);
-	)
-	assert((GDSV6 == tmp_ondskblkver) || (NULL != save_buff));	/* never read a V4 block directly into cache */
-	if (NULL != ondsk_blkver)
-		*ondsk_blkver = tmp_ondskblkver;
-	/* a bitmap block should never be short of space for a dynamic upgrade. assert that. */
-	assert((NULL == ondsk_blkver) || !IS_BITMAP_BLK(blk) || (ERR_DYNUPGRDFAIL != status));
-	/* If we didn't run gds_blk_upgrade which would move the block into the cache, we need to do
-	 * it ourselves. Note that buff will be cleared by the GDS_BLK_UPGRADE_IF_NEEDED macro if
-	 * buff and save_buff are different and gds_blk_upgrade was called.
-	 */
-	if ((NULL != save_buff) && (NULL != buff))	/* Buffer not moved by upgrade, we must move */
-		memcpy(save_buff, buff, size);
-	DEBUG_ONLY(
-		in_dsk_read--;
-		if (cs_addrs->now_crit && !dse_running)
-		{	/* Do basic checks on GDS block that was just read. Do it only if holding crit as we could read
-			 * uninitialized blocks otherwise. Also DSE might read bad blocks even inside crit so skip checks.
-			 */
-			blk_hdr = (NULL != save_buff) ? (blk_hdr_ptr_t)save_buff : (blk_hdr_ptr_t)buff;
-			GDS_BLK_HDR_CHECK(cs_data, blk_hdr, fully_upgraded);
-		}
-	)
-	if (cs_data->clustered && !cs_addrs->now_crit && ((blk_hdr_ptr_t)buff)->tn > cs_addrs->ti->curr_tn)
-	{	/* a future read */
-		/* Note !! This clustering code is currently dead as no clustering product currently exists. Should
-		   it be resurrected, the test above needs some work as "buff" can be zeroed at this point (even though
-		   it is unlikely we would ever support the headache of auto-upgrade in a clustered environment).
-		*/
-		assert(FALSE);	/* update_trans is relied upon by t_end/tp_tend currently and it is not clear
-				 * if setting it to TRUE here is ok. since this is clustering code and is not
-				 * currently supported, an assert is added to revisit this once clustering is enabled.
-				 */
-		update_trans = UPDTRNS_DB_UPDATED_MASK;
-		return FUTURE_READ;
-	}
-	return status;
-}
diff --git a/sr_vvms/dsk_write.c b/sr_vvms/dsk_write.c
deleted file mode 100644
index 6c8001e..0000000
--- a/sr_vvms/dsk_write.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#ifdef DEBUG
-#include "gtm_stdio.h"
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsbgtr.h"
-#include "gdsfhead.h"
-#include <iodef.h>
-#include "efn.h"
-#include <ssdef.h>
-#include "iosb_disk.h"
-#include "iosp.h"
-#include "shmpool.h"
-#include "filestruct.h"
-#include "gtm_malloc.h"		/* for CHECK_CHANNEL_STATUS macro */
-#include "memcoherency.h"
-#include "gds_blk_downgrade.h"
-#include "gdsbml.h"
-
-/***********************************************************************************
- * WARNING: This routine does not manage the number of outstanding AST available.
- * The calling routine is responsible for that.
- ***********************************************************************************/
-
-GBLREF	sm_uc_ptr_t	reformat_buffer;
-GBLREF	int		reformat_buffer_len;
-GBLREF	volatile int	reformat_buffer_in_use;	/* used only in DEBUG mode */
-GBLREF	volatile int4	fast_lock_count;
-GBLREF	boolean_t	dse_running;
-
-int4	dsk_write(gd_region *reg, block_id blk, cache_rec_ptr_t cr, void (*ast_rtn)(), int4 ast_param, io_status_block_disk *iosb)
-{
-	int4			size, status;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	shmpool_blk_hdr_ptr_t	sblkh_p;
-	boolean_t		asyncIO;
-	sm_uc_ptr_t		buff;
-	uint4			channel_id;
-	DEBUG_ONLY(
-		boolean_t	reformat;
-		blk_hdr_ptr_t	blk_hdr;
-	)
-
-	csa = &((vms_gds_info*)(reg->dyn.addr->file_cntl->file_info))->s_addrs;
-	csd = csa->hdr;
-	assert(NULL != csd);
-	assert(cr);
-	assert(cr->buffaddr);
-	assert(blk == cr->blk);
-	buff = GDS_ANY_REL2ABS(csa, cr->buffaddr);
-	DEBUG_ONLY(
-		/* Check GDS block that is about to be written. Dont do this for DSE as it may intentionally create bad blocks */
-		if (!dse_running)
-		{
-			blk_hdr = (blk_hdr_ptr_t)buff;
-			assert((unsigned)GDSVLAST > (unsigned)blk_hdr->bver);
-			assert((LCL_MAP_LEVL == blk_hdr->levl) || ((unsigned)MAX_BT_DEPTH > (unsigned)blk_hdr->levl));
-			assert((unsigned)csd->blk_size >= (unsigned)blk_hdr->bsiz);
-			assert(csd->trans_hist.curr_tn >= blk_hdr->tn);
-		}
-	)
-	assert(((blk_hdr_ptr_t)buff)->bver);	/* GDSV4 (0) version uses this field as a block length so should always be > 0 */
-	asyncIO = TRUE;
-	DEBUG_ONLY(reformat = FALSE);
-	if (IS_GDS_BLK_DOWNGRADE_NEEDED(cr->ondsk_blkver))
-	{	/* Need to downgrade/reformat this block back to a previous format.
-		 * Ask for a buffer from our shared memory pool buffer manager.
-		 */
-		DEBUG_ONLY(reformat = TRUE);
-		sblkh_p = shmpool_blk_alloc(reg, SHMBLK_REFORMAT);
-		if ((shmpool_blk_hdr_ptr_t)-1 == sblkh_p)
-		{	/* We weren't able to get a reformat block from the pool for async IO
-			   use so we will have to make do with a static buffer and a synchronous IO.
-			*/
-			DEBUG_DYNGRD_ONLY(PRINTF("DSK_WRITE: Block %d being dynamically downgraded on write (syncIO)\n", blk));
-			asyncIO = FALSE;
-			assert(0 <= fast_lock_count);
-			++fast_lock_count; 	/* Prevents interrupt from using reformat buffer while we have it */
-			/* reformat_buffer_in_use should always be incremented only AFTER incrementing fast_lock_count
-			 * as it is the latter that prevents interrupts from using the reformat buffer. Similarly
-			 * the decrement of fast_lock_count should be done AFTER decrementing reformat_buffer_in_use.
-			 */
-			assert(0 == reformat_buffer_in_use);
-			DEBUG_ONLY(reformat_buffer_in_use++;)
-			if (csd->blk_size > reformat_buffer_len)
-			{	/* Buffer not big enough (or does not exist) .. get a new one releasing old if it exists */
-				if (reformat_buffer)
-					free(reformat_buffer);
-				reformat_buffer = malloc(csd->blk_size);
-				reformat_buffer_len = csd->blk_size;
-			}
-			gds_blk_downgrade((v15_blk_hdr_ptr_t)reformat_buffer, (blk_hdr_ptr_t)buff);
-			buff = reformat_buffer;
-			BG_TRACE_PRO_ANY(csa, dwngrd_refmts_syncio);
-		} else
-		{	/* We have a reformat buffer. Make the necessary attachments, and mark it valid */
-			DEBUG_DYNGRD_ONLY(PRINTF("DSK_WRITE: Block %d being dynamically downgraded on write (asyncIO)\n", blk));
-			/* note (sblkh_p + 1) is shorthand to address data portion of blk following header */
-			gds_blk_downgrade((v15_blk_hdr_ptr_t)(sblkh_p + 1), (blk_hdr_ptr_t)buff);
-			buff = (v15_blk_hdr_ptr_t)(sblkh_p + 1);
-			sblkh_p->use.rfrmt.cr_off = GDS_ANY_ABS2REL(csa, cr);
-			sblkh_p->use.rfrmt.cycle = cr->cycle;
-			sblkh_p->blkid = blk;
-			/* Note that this is updating this offset field in the cache record outside of crit but since this
-			   field is not govered by crit, this should not be an issue as the updates to the block are always
-			   well sequenced (here and in wcs_wtfini()). Also the subsequent write barriers will make sure to
-			   broadcast this change to all processors.
-			*/
-			cr->shmpool_blk_off = GDS_ANY_ABS2REL(csa, sblkh_p);
-			/* Need a write coherency fence here as we want to make sure the above info is stored and
-			   reflected to other processors before we mark the block valid.
-			*/
-			SHM_WRITE_MEMORY_BARRIER;
-			sblkh_p->valid_data = TRUE;
-			BG_TRACE_PRO_ANY(csa, dwngrd_refmts_asyncio);
-		}
-		size = ((v15_blk_hdr_ptr_t)buff)->bsiz;
-		assert(size <= csd->blk_size - SIZEOF(blk_hdr) + SIZEOF(v15_blk_hdr));
-		size = (size + 1) & ~1;
-		assert(SIZEOF(v15_blk_hdr) <= size);
-	} else DEBUG_ONLY(if (GDSV6 == cr->ondsk_blkver))
-	{
-		size = (((blk_hdr_ptr_t)buff)->bsiz + 1) & ~1;
-		assert(SIZEOF(blk_hdr) <= size);
-	}
-	DEBUG_ONLY(else GTMASSERT);
-	if (csa->do_fullblockwrites)
-		/* round size up to next full logical filesys block. */
-		size = ROUND_UP(size, csa->fullblockwrite_len);
-	assert(size <= csd->blk_size);
-	assert(FALSE == reg->read_only);
-	assert(dba_bg == reg->dyn.addr->acc_meth);
-	assert((size / 2 * 2) == size);
-	assert(0 == (((uint4) buff) & 7));	/* some disk controllers require quadword aligned xfers */
-	assert(!csa->acc_meth.bg.cache_state->cache_array || buff != csd);
-	/* if doing a reformat, the buffer is not in cache so points to a local reformat buffer so the check below is superfluous */
-	assert(reformat || !csa->acc_meth.bg.cache_state->cache_array
-	       || (buff >= (unsigned char *)csa->acc_meth.bg.cache_state->cache_array
-		   + (SIZEOF(cache_rec) * (csd->bt_buckets + csd->n_bts))));
-	assert(buff < (sm_uc_ptr_t)csd || reformat);	/* assumes hdr follows immediately after the buffer pool in shared memory */
-	assert(size <= csd->blk_size);
-	channel_id = ((vms_gds_info*)(reg->dyn.addr->file_cntl->file_info))->fab->fab$l_stv;
-	if (asyncIO)
-	{
-		status = sys$qio(efn_bg_qio_write, channel_id, IO$_WRITEVBLK, iosb ,ast_rtn, ast_param, buff, size,
-				 (csd->blk_size / DISK_BLOCK_SIZE) * blk + csd->start_vbn, 0, 0, 0);
-		CHECK_CHANNEL_STATUS(status, channel_id);
-	} else
-	{
-		status = sys$qiow(efn_bg_qio_write, channel_id, IO$_WRITEVBLK, iosb ,ast_rtn, ast_param, buff, size,
-				  (csd->blk_size / DISK_BLOCK_SIZE) * blk + csd->start_vbn, 0, 0, 0);
-		CHECK_CHANNEL_STATUS(status, channel_id);
-		DEBUG_ONLY(reformat_buffer_in_use--;)
-		assert(0 == reformat_buffer_in_use);
-		--fast_lock_count;
-		assert(0 <= fast_lock_count);
-		/* Since we are doing synchroous IO here, if we also happen to already hold crit, then
-		   invoke wcs_wtfini() to handle completion of that IO. Else it will have to be handled
-		   elsewhere as grabbing crit here could create a deadlock situation.
-		*/
-		if (csa->now_crit)
-			wcs_wtfini(reg);
-	}
-	return status;
-}
diff --git a/sr_vvms/dsk_write_nocache.c b/sr_vvms/dsk_write_nocache.c
deleted file mode 100644
index 4428878..0000000
--- a/sr_vvms/dsk_write_nocache.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include "gtm_stdio.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include <iodef.h>
-#include "efn.h"
-#include <ssdef.h>
-#include "iosb_disk.h"
-#include "iosp.h"
-#include "filestruct.h"
-#include "gtm_malloc.h"		/* for CHECK_CHANNEL_STATUS macro */
-#include "gds_blk_downgrade.h"
-
-/***********************************************************************************
- * WARNING: This routine does not manage the number of outstanding AST available.
- * The calling routine is responsible for that.
- ***********************************************************************************/
-
-GBLREF	sm_uc_ptr_t	reformat_buffer;
-GBLREF	int		reformat_buffer_len;
-GBLREF	volatile int	reformat_buffer_in_use;	/* used only in DEBUG mode */
-GBLREF	volatile int4	fast_lock_count;
-
-int4	dsk_write_nocache(gd_region *reg, block_id blk, sm_uc_ptr_t buff, enum db_ver ondsk_blkver,
-			  void (*ast_rtn)(), int4 ast_param, io_status_block_disk *iosb)
-{
-	int4			size, status;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	boolean_t		reformat;
-	uint4			channel_id;
-
-	csa = &((vms_gds_info*)(reg->dyn.addr->file_cntl->file_info))->s_addrs;
-	size = (((blk_hdr_ptr_t)buff)->bsiz + 1) & ~1;
-	csd = csa->hdr;
-	assert(NULL != csd);
-	assert(((blk_hdr_ptr_t)buff)->bver);	/* GDSV4 (0) version uses this field as a block length so should always be > 0 */
-	reformat = FALSE;
-	if (IS_GDS_BLK_DOWNGRADE_NEEDED(ondsk_blkver))
-	{	/* Need to downgrade/reformat this block back to a previous format */
-		assert(0 == fast_lock_count);	/* since this is mainline (non-interrupt) code */
-		++fast_lock_count; 			/* Prevents interrupt from using reformat buffer while we have it */
-		DEBUG_DYNGRD_ONLY(PRINTF("DSK_WRITE_NOCACHE: Block %d being dynamically downgraded on write\n", blk));
-		reformat = TRUE;
-		/* reformat_buffer_in_use should always be incremented only AFTER incrementing fast_lock_count
-		 * as it is the latter that prevents interrupts from using the reformat buffer. Similarly
-		 * the decrement of fast_lock_count should be done AFTER decrementing reformat_buffer_in_use.
-		 */
-		assert(0 == reformat_buffer_in_use);
-		DEBUG_ONLY(reformat_buffer_in_use++;)
-		if (csd->blk_size > reformat_buffer_len)
-		{	/* Buffer not big enough (or does not exist) .. get a new one releasing old if it exists */
-			if (reformat_buffer)
-				free(reformat_buffer);
-			reformat_buffer = malloc(csd->blk_size);
-			reformat_buffer_len = csd->blk_size;
-		}
-		gds_blk_downgrade((v15_blk_hdr_ptr_t)reformat_buffer, (blk_hdr_ptr_t)buff);
-		buff = reformat_buffer;
-		size = (((v15_blk_hdr_ptr_t)buff)->bsiz + 1) & ~1;
-		assert(SIZEOF(v15_blk_hdr) <= size);
-		/* Represents a state change from V5 -> V4 format */
-		INCR_BLKS_TO_UPGRD(csa, csd, 1);
-	} else DEBUG_ONLY(if (GDSV6 == ondsk_blkver))
-	{
-		size = (((blk_hdr_ptr_t)buff)->bsiz + 1) & ~1;
-		assert(SIZEOF(blk_hdr) <= size);
-		/* no adjustment to blks_to_upgrd counter is needed since the format we are going to write is GDSVCURR */
-	}
-	DEBUG_ONLY(else GTMASSERT);
-	if (csa->do_fullblockwrites)
-		size = ROUND_UP(size, csa->fullblockwrite_len);	/* round size up to next full logical filesys block. */
-	assert(size <= csd->blk_size);
-	assert(FALSE == reg->read_only);
-	assert((size / 2 * 2) == size);
-	assert(0 == (((uint4) buff) & 7));	/* some disk controllers require quadword aligned xfers */
-	assert(!csa->acc_meth.bg.cache_state->cache_array || buff != csd);
-	assert(size <= csd->blk_size);
-	channel_id = ((vms_gds_info*)(reg->dyn.addr->file_cntl->file_info))->fab->fab$l_stv;
-	status = sys$qiow(efn_bg_qio_write, channel_id, IO$_WRITEVBLK, iosb ,ast_rtn, ast_param, buff, size,
-			  (csd->blk_size / DISK_BLOCK_SIZE) * blk + csd->start_vbn, 0, 0, 0);
-	if (reformat)
-	{
-		DEBUG_ONLY(
-			reformat_buffer_in_use--;
-			assert(0 == reformat_buffer_in_use);
-		)
-		--fast_lock_count;
-		assert(0 == fast_lock_count);
-	}
-	CHECK_CHANNEL_STATUS(status, channel_id);
-	return status;
-}
diff --git a/sr_vvms/dsm_api.c b/sr_vvms/dsm_api.c
deleted file mode 100644
index 55cf2b6..0000000
--- a/sr_vvms/dsm_api.c
+++ /dev/null
@@ -1,895 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <fab.h>
-#include <rab.h>
-
-#include "gtmidef.h"
-
-#ifdef __ALPHA
-#include <builtins.h>
-#else
-#pragma builtins
-#endif
-
-#define memcpy(DST,SRC,LEN) _MOVC3((unsigned short) (LEN), (char *) (SRC), (char *) (DST))
-#define memset(DST, VALUE, LEN) _MOVC5(0, (char *)0, VALUE, LEN, (char *)(DST))
-
-typedef int4 condition_code;
-#ifdef TRACE_API
-/*******debug only*****/
-#define TRACE(X) dsmapi_out_write(X, SIZEOF(X) - 1)
-#define TRACE_NUM(X) dsmapi_out_hex(X)
-#define TRACE_DESC(X) (TRACE("Descriptor Length/Value:"), \
-	TRACE_NUM((X).dsc$w_length), \
-	dsmapi_out_write((X).dsc$a_pointer, (X).dsc$w_length))
-/*****debug above this ****/
-#else
-#define TRACE(X)
-#define TRACE_NUM(X)
-#define TRACE_DESC(X)
-#endif
-void dsmapi_out_write();
-
-#define CHECK_ARGUMENT_COUNT(ARG_CNT, FIRST_ARG, MIN, MAX) \
-	(ARG_CNT) = *(((int *) (&FIRST_ARG)) - 1); \
-	if ((ARG_CNT) > (MAX) || (ARG_CNT) < (MIN)) \
-		return DSM$_CI_ARGCNT
-#define CHECK_SDB(SDB) if ((SDB)->sdb_size != DSM$K_SDB_SIZE) return DSM$_CI_SDB
-#define CHECK_GDB(GDB) if ((GDB)->gdb_size != DSM$K_GDB_SIZE) return DSM$_CI_GDB
-#define CHECK_STATUS(STAT) if (((STAT) & 1) == 0) return (STAT)
-#define CHECK_GTM_STATUS(STAT) if (((STAT) & 1) == 0)\
-	{\
-		if (STAT == ERR_UNDEF || STAT == ERR_GVUNDEF)\
-			STAT = DSM$_UNDEF;\
-		else if (STAT == ERR_MAXNRSUBSCRIPTS || STAT == ERR_GVSUBOFLOW)\
-			STAT = DSM$_INVSUBSCR;\
-		else if (STAT == ERR_GVNAKED || STAT == ERR_GVNAKEDEXTNM)\
-			STAT = DSM$_NAKEDERR;\
-		else if (STAT == ERR_LVNULLSUBS || STAT == ERR_NULSUBSC)\
-			STAT = DSM$_NULLSUBSCR;\
-		else if (STAT == ERR_IFNOTINIT)\
-			STAT = DSM$_CI_NOTINIT;\
-		else if (STAT == ERR_VAREXPECTED)\
-			STAT = DSM$_NAME;\
-		return STAT;\
-	}
-#define GBLDIR_PREFIX "GTMAPI$"
-#define DSM$DK_NAME_LENGTH 8
-globalvalue DSM$K_NAME_LENGTH = DSM$DK_NAME_LENGTH;		/* Max length of global/local name*/
-#define DSM$DK_NUMBER_SUBSCRIPT 25
-globalvalue DSM$K_NUMBER_SUBSCRIPT = DSM$DK_NUMBER_SUBSCRIPT;	/* Max # of subscripts */
-globalvalue DSM$K_STRING_LENGTH = 512;		/* Max string length */
-globalvalue DSM$K_SUBSCRIPT_LENGTH = 245;	/* Max length of a subscript */
-globalvalue DSM$K_UCI_NAME_LENGTH = 3;		/* UCI name length */
-#define DSM$DK_VOLSET_NAME_LENGTH 3
-globalvalue DSM$K_VOLSET_NAME_LENGTH = DSM$DK_VOLSET_NAME_LENGTH;	/* Volume set name length */
-
-#define DSM$M_SIBLING 1
-#define DSM$M_PREVIOUS 2
-
-/* Return status indicators from the callable routines */
-/* Theirs */
-globalvalue DSM$_ALLOC		= 0x007F800A;
-globalvalue DSM$_CI_GDB		= 0x007F8092;
-globalvalue DSM$_ARGERR		= 0x007F8012;
-globalvalue DSM$_CI_ITEMBUFLEN	= 0x007F809A;
-globalvalue DSM$_CI_ITEMINSUF	= 0x007F80A2;
-globalvalue DSM$_CI_ITEMTYPE	= 0x007F80AA;
-globalvalue DSM$_CI_LOCKMODE	= 0x007F80B2;
-globalvalue DSM$_CI_NOSIBLING	= 0x007F80B8;
-globalvalue DSM$_CI_NOTINIT	= 0x007F80C2;
-globalvalue DSM$_CI_SDB		= 0x007F80CA;
-globalvalue DSM$_CI_SUBPOS	= 0x007F80D2;
-globalvalue DSM$_CI_ACTIVE	= 0x007F8082;
-globalvalue DSM$_CI_ARGCNT	= 0x007F808A;
-globalvalue DSM$_INVSUBSCR	= 0x007F8542;
-globalvalue DSM$_FORCEXIT	= 0x007F82A4;
-globalvalue DSM$_NAKEDERR	= 0x007F862A;
-globalvalue DSM$_NAME		= 0x007F863A;
-globalvalue DSM$_NOSUCHUCI	= 0x007F86A2;
-globalvalue DSM$_NOSUCHVOLSET	= 0x007F86AA;
-globalvalue DSM$_NOTRUN		= 0x007F86C2;
-globalvalue DSM$_STRLEN		= 0x007F885A;
-globalvalue DSM$_SUCCESS	= 0x007F8861;
-globalvalue DSM$_NULLSUBSCR	= 0x007F86DA;
-globalvalue DSM$_SYNTAX		= 0x007F886A;
-globalvalue DSM$_TIMEOUT	= 0x007F889A;
-globalvalue DSM$_TPABORT	= 0x007F88A2;
-globalvalue DSM$_TPNORU		= 0x007F88C2;
-globalvalue DSM$_TPNOTCONF	= 0x007F88CA;
-globalvalue DSM$_TPROTRAN	= 0x007F88FA;
-globalvalue DSM$_PROT		= 0x007F8772;
-globalvalue DSM$_UNDEF		= 0x007F890A;
-globalvalue DSM$_RULEVEL	= 0x007F87C2;
-globalvalue DSM$_RUNDOWN	= 0x007F87D0;
-
-/* Ours */
-#define error_def(x) globalvalue x
-error_def(ERR_UNIMPLOP);
-error_def(ERR_GVUNDEF);
-error_def(ERR_UNDEF);
-error_def(ERR_IFNOTINIT);
-error_def(ERR_VAREXPECTED);
-error_def(ERR_LVNULLSUBS);
-error_def(ERR_NULSUBSC);
-error_def(ERR_GVNAKED);
-error_def(ERR_GVNAKEDEXTNM);
-error_def(ERR_MAXNRSUBSCRIPTS);
-error_def(ERR_GVSUBOFLOW);
-
-/* Global Data Block definition */
-struct gdb
-{
-	int4 gdb_size;				/* length of gdb in longwords */
-	int4 name_length;			/* length of global name */
-						/* If zero, this is a global reference */
-	char global_name[DSM$DK_NAME_LENGTH];	/* global name */
-	char uci_nlen;
-	char uci_name[DSM$DK_NAME_LENGTH];	/* uci name */
-	char volset_nlen;
-	char volset_name[DSM$DK_VOLSET_NAME_LENGTH]; /* volume set name */
-};
-
-globalvalue DSM$K_GDB_SIZE = 11;	/* Number of longwords in a GDB */
-
-/* SDB data block definition */
-struct sdb
-{
-	int4 sdb_size;		/* length of sdb in longwords */
-	int4 sdb_count;		/* subscript count */
-	struct dsc$descriptor_s subscripts[DSM$DK_NUMBER_SUBSCRIPT]; /* array of subscripts */
-};
-
-globalvalue DSM$K_SDB_SIZE = 90;	/* number of longwords in a SDB */
-
-static struct dsc$descriptor_s return_string = {0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0 };
-static struct dsc$descriptor_s global_name_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
-static char global_directory_buffer[24];
-static struct dsc$descriptor_s global_directory_desc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, global_directory_buffer };
-
-extern condition_code gtm$gblget(), gtm$get(), gtm$gblorder(), gtm$gbldata(), gtm$init(),
-	gtm$kill(), gtm$put(), gtm$xecute();
-
-struct dsc$descriptor_s *setup_gname(global_data_block)
-struct gdb *global_data_block;
-{
-	if (global_data_block->name_length == 0)
-		return 0;
-	global_name_desc.dsc$w_length = global_data_block->name_length;
-	global_name_desc.dsc$a_pointer = global_data_block->global_name;
-	return &global_name_desc;
-}
-
-struct dsc$descriptor_s *setup_gdir(global_data_block)
-struct gdb *global_data_block;
-{
-	char *cp;
-
-	if (global_data_block->uci_nlen != 3 || global_data_block->volset_nlen != 3)
-		return 0;
-	memcpy(global_directory_buffer, GBLDIR_PREFIX, SIZEOF(GBLDIR_PREFIX) - 1);
-	cp = global_directory_buffer + SIZEOF(GBLDIR_PREFIX) - 1;
-	memcpy(cp, global_data_block->uci_name, SIZEOF(global_data_block->uci_name));
-	cp += SIZEOF(global_data_block->uci_name);
-	*cp++ = '$';
-	memcpy(cp, global_data_block->volset_name, SIZEOF(global_data_block->volset_name));
-	cp += SIZEOF(global_data_block->volset_name);
-	global_directory_desc.dsc$w_length = cp - global_directory_buffer;
-	return &global_directory_desc;
-}
-
-condition_code check_3_alphas(cp)
-char *cp;
-{
-	int i, ch;
-
-	for (i = 0 ; i < 3 ; i++)
-	{
-		ch = *cp++;
-		if (ch < 'A' || ch > 'Z')
-			return DSM$_NOSUCHUCI;
-	}
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$dsm(command_line)
-struct dsc$descriptor_s *command_line;
-{
-	int arg_cnt;
-
-	CHECK_ARGUMENT_COUNT(arg_cnt, command_line, 1, 1);
-TRACE("at DSM$DSM");
-	return ERR_UNIMPLOP;
-}
-
-condition_code dsm$gdb_clear(global_data_block)
-struct gdb *global_data_block;
-{
-	int arg_cnt;
-
-TRACE("condition_code dsm$gdb_clear(global_data_block)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_data_block, 1, 1);
-	CHECK_GDB(global_data_block);
-	global_data_block->name_length = 0;
-	global_data_block->uci_nlen = 0;
-	global_data_block->volset_nlen = 0;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$gdb_create(gdb_address)
-struct gdb **gdb_address;
-{
-	struct gdb *global_data_block;
-	condition_code status;
-	int arg_cnt;
-
-TRACE("condition_code dsm$gdb_create(gdb_address)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, gdb_address, 1, 1);
-	status = lib$get_vm(&SIZEOF(*global_data_block), &global_data_block, 0);
-	CHECK_STATUS(status);
-	*gdb_address = global_data_block;
-	memset(global_data_block, 0, SIZEOF(*global_data_block));
-	global_data_block->gdb_size = DSM$K_GDB_SIZE;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$gdb_initialize(gdbsiz, global_data_block)
-uint4 *gdbsiz;
-struct gdb *global_data_block;
-{
-	int arg_cnt;
-
-TRACE("condition_code dsm$gdb_initialize(gdbsiz, global_data_block)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, gdbsiz, 2, 2);
-	if (*gdbsiz != DSM$K_GDB_SIZE)
-		lib$signal(DSM$_CI_GDB);
-	memset(global_data_block, 0, SIZEOF(*global_data_block));
-	global_data_block->gdb_size = DSM$K_GDB_SIZE;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$gdb_extract(global_data_block, global_name, global_name_length, uci_name, volume_set_name)
-struct gdb *global_data_block;
-struct dsc$descriptor_s *global_name;
-unsigned short *global_name_length;
-struct dsc$descriptor_s *uci_name;
-struct dsc$descriptor_s *volume_set_name;
-{
-	int arg_cnt;
-	struct dsc$descriptor_s	auto_string;
-	condition_code status;
-
-TRACE("condition_code dsm$gdb_extract(global_data_block, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_data_block, 2, 5);
-	CHECK_GDB(global_data_block);
-	auto_string.dsc$w_length = global_data_block->name_length;
-	auto_string.dsc$b_dtype = DSC$K_DTYPE_T;
-	auto_string.dsc$b_class = DSC$K_CLASS_S;
-	auto_string.dsc$a_pointer = global_data_block->global_name;
-	status = lib$scopy_dxdx(&auto_string, global_name);
-	CHECK_STATUS(status);
-	if (arg_cnt > 2)
-	{
-		if (global_name_length)
-			*global_name_length = global_data_block->name_length;
-		if (arg_cnt > 3)
-		{
-			if (uci_name)
-			{
-				auto_string.dsc$w_length = global_data_block->uci_nlen;
-				auto_string.dsc$a_pointer = global_data_block->uci_name;
-				status = lib$scopy_dxdx(&auto_string, uci_name);
-				CHECK_STATUS(status);
-			}
-			if (arg_cnt > 4)
-			{
-				if (volume_set_name)
-				{
-					auto_string.dsc$w_length = global_data_block->volset_nlen;
-					auto_string.dsc$a_pointer = global_data_block->volset_name;
-					status = lib$scopy_dxdx(&auto_string, volume_set_name);
-					CHECK_STATUS(status);
-				}
-			}
-		}
-	}
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$gdb_insert(global_name, global_data_block, uci_name, volume_set_name)
-struct dsc$descriptor_s *global_name;
-struct gdb *global_data_block;
-struct dsc$descriptor_s *uci_name;
-struct dsc$descriptor_s *volume_set_name;
-{
-	int arg_cnt;
-	condition_code status;
-	int n;
-	char *cin, *cout;
-
-TRACE("condition_code dsm$gdb_insert(global_name, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_name, 2, 4);
-	CHECK_GDB(global_data_block);
-	n = global_name->dsc$w_length;
-	if (n < 1 || n > DSM$K_NAME_LENGTH)
-		return DSM$_NAME;
-	global_data_block->name_length = n;
-	for (cin = global_name->dsc$a_pointer, cout = global_data_block->global_name ; n-- > 0 ; )
-		*cout++ = *cin++;
-	if (arg_cnt > 2 && uci_name)
-	{
-		status = check_3_alphas(uci_name);
-		if ((status & 1) == 0)
-			return DSM$_NOSUCHUCI;
-		for (cin = uci_name->dsc$a_pointer, cout = global_data_block->uci_name , n = SIZEOF(global_data_block->uci_name);
-			 n-- > 0 ; )
-			*cout++ = *cin++;
-	}
-	if (arg_cnt > 3 && volume_set_name)
-	{
-		status = check_3_alphas(volume_set_name);
-		if ((status & 1) == 0)
-			return DSM$_NOSUCHVOLSET;
-		for (cin = volume_set_name->dsc$a_pointer,
-			 cout = global_data_block->volset_name , n = SIZEOF(global_data_block->volset_name);
-			 n-- > 0 ; )
-			*cout++ = *cin++;
-	}
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$gdb_free(global_data_block)
-struct gdb *global_data_block;
-{
-	int arg_cnt;
-	condition_code status;
-
-TRACE("condition_code dsm$gdb_free(global_data_block)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_data_block, 1, 1);
-	CHECK_GDB(global_data_block);
-	status = lib$free_vm(&SIZEOF(*global_data_block), &global_data_block, 0);
-	CHECK_STATUS(status);
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$global_$data(global_data_block, subscript_data_block, dvalue)
-struct gdb *global_data_block;
-struct sdb *subscript_data_block;
-uint4 *dvalue;
-{
-	int arg_cnt;
-	condition_code status;
-	struct dsc$descriptor *gname_desc;
-	struct dsc$descriptor *gdir_desc;
-	struct dsc$descriptor return_data_value;
-/***************DEBUG **************/
-#ifdef TRACE_API
-int4 *ip, nnn;
-ip = subscript_data_block;
-TRACE("SDB HEADER VALUE: ");
-TRACE_NUM(ip);
-TRACE_NUM(*ip);
-for (nnn = 0 ; nnn < subscript_data_block->sdb_count ; nnn++)
-	TRACE_DESC(subscript_data_block->subscripts[nnn]);
-/************END DEBUG **********/
-TRACE("condition_code dsm$global_$data(global_data_block, ...");
-#endif
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_data_block, 3, 3);
-	CHECK_GDB(global_data_block);
-	CHECK_SDB(subscript_data_block);
-	gname_desc = setup_gname(global_data_block);
-	gdir_desc = setup_gdir(global_data_block);
-	return_data_value.dsc$w_length = SIZEOF(int4);
-	return_data_value.dsc$b_dtype = DSC$K_DTYPE_L;
-	return_data_value.dsc$b_class =  DSC$K_CLASS_S;
-	return_data_value.dsc$a_pointer = dvalue;
-	status = dsm_api_dispatch(gtm$gbldata, &return_data_value, gdir_desc, gname_desc, subscript_data_block->sdb_count,
-		subscript_data_block->subscripts);
-	CHECK_GTM_STATUS(status)
-#ifdef TRACE_GLOBALS
-display_global_ref("$D", global_data_block, subscript_data_block);
-display_int(*dvalue);
-#endif
-TRACE_DESC(return_data_value);
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$global_$order(global_data_block, subscript_data_block,
-	option_mask, sibling, sibling_length)
-struct gdb *global_data_block;
-struct sdb *subscript_data_block;
-uint4 *option_mask;
-struct dsc$descriptor_s *sibling;
-unsigned short *sibling_length;
-{
-	int arg_cnt;
-	condition_code status;
-	struct dsc$descriptor *gname_desc;
-	struct dsc$descriptor *gdir_desc;
-
-TRACE("condition_code dsm$global_$order(global_data_block, ");
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_data_block, 3, 5);
-	CHECK_GDB(global_data_block);
-	CHECK_SDB(subscript_data_block);
-	if (subscript_data_block->sdb_count < 1)
-		return DSM$_NAKEDERR;
-	if (*option_mask & 2)	/* Should be $ZPREVIOUS */
-	{
-TRACE("At $ZPREVIOUS");
-		lib$signal(ERR_UNIMPLOP);
-	}
-	gname_desc = setup_gname(global_data_block);
-	gdir_desc = setup_gdir(global_data_block);
-	status = dsm_api_dispatch(gtm$gblorder, &return_string, gdir_desc, gname_desc, subscript_data_block->sdb_count,
-		subscript_data_block->subscripts);
-	CHECK_GTM_STATUS(status)
-	if (return_string.dsc$w_length == 0)
-	{
-		status = DSM$_CI_NOSIBLING;
-TRACE("Found NOSIBLING");
-		if (*option_mask & 1)
-			subscript_data_block->sdb_count--;
-#ifdef TRACE_GLOBALS
-display_global_ref("$O", global_data_block, subscript_data_block);
-display_str("=<null>");
-#endif
-	}
-	else
-	{
-		status = DSM$_SUCCESS;
-		if (*option_mask & 1)
-TRACE_DESC(return_string);
-		{
-TRACE("option_mask is odd, performining scopy_dxdxto subscript_data_block");
-			lib$scopy_dxdx(&return_string, &subscript_data_block->subscripts[subscript_data_block->sdb_count - 1]);
-		}
-		if (arg_cnt > 3 && sibling)
-		{
-			lib$scopy_dxdx(&return_string, sibling);
-			if (arg_cnt > 4 && sibling_length)
-			{
-				*sibling_length = (return_string.dsc$w_length < sibling->dsc$w_length)
-				? return_string.dsc$w_length : sibling->dsc$w_length;
-			}
-		}
-#ifdef TRACE_GLOBALS
-display_global_ref("$O", global_data_block, subscript_data_block);
-display_descript(&return_string, return_string.dsc$w_length);
-#endif
-	}
-	lib$sfree1_dd(&return_string);
-	return status;
-}
-
-condition_code dsm$global_get_t(global_data_block, subscript_data_block, get_value, get_value_length)
-struct gdb *global_data_block;
-struct sdb *subscript_data_block;
-struct dsc$descriptor_s *get_value;
-unsigned short *get_value_length;
-{
-	int arg_cnt;
-	condition_code status;
-	struct dsc$descriptor *gname_desc;
-	struct dsc$descriptor *gdir_desc;
-
-TRACE("condition_code dsm$global_get_t(global_data_block, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, global_data_block, 3, 4);
-	CHECK_GDB(global_data_block);
-	CHECK_SDB(subscript_data_block);
-	gname_desc = setup_gname(global_data_block);
-	gdir_desc = setup_gdir(global_data_block);
-	status = dsm_api_dispatch(gtm$gblget, &return_string, gdir_desc, gname_desc, subscript_data_block->sdb_count,
-		subscript_data_block->subscripts);
-	CHECK_GTM_STATUS(status)
-#ifdef TRACE_GLOBALS
-display_global_ref("G ", global_data_block, subscript_data_block);
-display_descript(&return_string, return_string.dsc$w_length);
-#endif
-	TRACE_DESC(return_string);
-	if (arg_cnt > 3 && get_value_length)
-	{
-		*get_value_length = (return_string.dsc$w_length < get_value->dsc$w_length)
-		    ? return_string.dsc$w_length : get_value->dsc$w_length;
-	}
-	lib$scopy_dxdx(&return_string, get_value);
-	lib$sfree1_dd(&return_string);
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$initialize(command_line)
-struct dsc$descriptor_s *command_line;
-{
-	int arg_cnt;
-	condition_code status;
-
-TRACE("condition_code dsm$initialize(command_line)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, command_line, 0, 1);
-	if (arg_cnt > 0 && command_line != 0 && command_line->dsc$w_length != 0)
-	{
-TRACE("AT DSM$INITIALIZE");
- 	dsmapi_out_write(command_line->dsc$a_pointer, command_line->dsc$w_length);
-		return ERR_UNIMPLOP;
-	}
-	status = gtm$init();
-	CHECK_GTM_STATUS(status)
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_clear(subscript_data_block)
-struct sdb *subscript_data_block;
-{
-	int arg_cnt;
-
-TRACE("condition_code dsm$sdb_clear(subscript_data_block)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, subscript_data_block, 1, 1);
-	CHECK_SDB(subscript_data_block);
-	subscript_data_block->sdb_count = 0;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_count(subscript_data_block, count)
-struct sdb *subscript_data_block;
-uint4 *count;
-{
-	int arg_cnt;
-
-TRACE("condition_code dsm$sdb_count(subscript_data_block, count)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, subscript_data_block, 2, 2);
-	CHECK_SDB(subscript_data_block);
-	*count = subscript_data_block->sdb_count;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_create(sdb_address)
-struct sdb **sdb_address;
-{
-	struct sdb *subscript_data_block;
-	condition_code status;
-	int arg_cnt, dsm_sdb_size;
-
-TRACE("condition_code dsm$sdb_create(sdb_address)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, sdb_address, 1, 1);
-	status = lib$get_vm(&SIZEOF(*subscript_data_block), &subscript_data_block, 0);
-	CHECK_STATUS(status);
-	*sdb_address = subscript_data_block;
-	memset(subscript_data_block, 0, SIZEOF(*subscript_data_block));
-	dsm_sdb_size = DSM$K_SDB_SIZE;
-	status = dsm$sdb_initialize(&dsm_sdb_size, subscript_data_block);
-	CHECK_STATUS(status);
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_extract_one_t(subscript_data_block, position, sub_value, sub_value_length)
-struct sdb *subscript_data_block;
-uint4 *position;
-struct dsc$descriptor_s *sub_value;
-unsigned short *sub_value_length;
-{
-	int arg_cnt;
-	condition_code status;
-	int pos;
-
-TRACE("condition_code dsm$sdb_extract_one_t(subscript_data_block, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, subscript_data_block, 3, 4);
-	CHECK_SDB(subscript_data_block);
-	pos = *position - 1;
-	if (pos < 0 || pos > subscript_data_block->sdb_count + 1)
-		return DSM$_CI_SUBPOS;
-	status = lib$scopy_dxdx(&subscript_data_block->subscripts[pos], sub_value);
-	CHECK_STATUS(status);
-	if (arg_cnt > 3 && sub_value_length)
-		*sub_value_length = subscript_data_block->subscripts[pos].dsc$w_length;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_free(subscript_data_block)
-struct sdb *subscript_data_block;
-{
-	int arg_cnt, dsm_number_subscript;
-	condition_code status;
-
-TRACE("condition_code dsm$sdb_free(subscript_data_block)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, subscript_data_block, 1, 1);
-	CHECK_SDB(subscript_data_block);
-	dsm_number_subscript = DSM$K_NUMBER_SUBSCRIPT;
-	status = lib$sfreen_dd(&dsm_number_subscript, subscript_data_block->subscripts);
-	CHECK_STATUS(status);
-	status = lib$free_vm(&SIZEOF(*subscript_data_block), &subscript_data_block, 0);
-	CHECK_STATUS(status);
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_initialize(sdbsize, subscript_data_block)
-int4 *sdbsize;
-struct sdb *subscript_data_block;
-{
-	int arg_cnt;
-	condition_code status;
-	int n;
-
-TRACE("condition_code dsm$sdb_initialize(sdbsize, subscript_data_block)");
-	CHECK_ARGUMENT_COUNT(arg_cnt, sdbsize, 2, 2);
-	if (*sdbsize != DSM$K_SDB_SIZE)
-		return DSM$_CI_SDB;
-	subscript_data_block->sdb_size = DSM$K_SDB_SIZE;
-	subscript_data_block->sdb_count = 0;
-	for (n = 0 ; n < DSM$K_NUMBER_SUBSCRIPT ; n++)
-	{
-		subscript_data_block->subscripts[n].dsc$w_length = 0;
-		subscript_data_block->subscripts[n].dsc$b_dtype = DSC$K_DTYPE_T;
-		subscript_data_block->subscripts[n].dsc$b_class = DSC$K_CLASS_D;
-		subscript_data_block->subscripts[n].dsc$a_pointer = 0;
-	}
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_insert_null(position, subscript_data_block)
-uint4 *position;
-struct sdb *subscript_data_block;
-{
-	int arg_cnt;
-	condition_code status;
-	int pos;
-
-TRACE("condition_code dsm$sdb_insert_null(position, subscript_data_block)");
-TRACE("Null inserted at position");
-TRACE_NUM(*position);
-	CHECK_ARGUMENT_COUNT(arg_cnt, position, 2, 2);
-	CHECK_SDB(subscript_data_block);
-	pos = *position - 1;
-	if (pos < 0 || pos > subscript_data_block->sdb_count + 1)
-		return DSM$_CI_SUBPOS;
-	subscript_data_block->subscripts[pos].dsc$w_length = 0;
-	subscript_data_block->sdb_count = pos + 1;
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$sdb_insert_one_t(position, sub_value, subscript_data_block)
-uint4 *position;
-struct dsc$descriptor_s *sub_value;
-struct sdb *subscript_data_block;
-{
-	int arg_cnt;
-	condition_code status;
-	int pos;
-
-TRACE("condition_code dsm$sdb_insert_one_t(position, ...");
-TRACE("Position/Value");
-TRACE_NUM(*position);
-TRACE_DESC(*sub_value);
-	CHECK_ARGUMENT_COUNT(arg_cnt, position, 3, 3);
-	CHECK_SDB(subscript_data_block);
-	pos = *position - 1;
-	if (pos < 0 || pos > subscript_data_block->sdb_count + 1)
-		return DSM$_CI_SUBPOS;
-	status = lib$scopy_dxdx(sub_value, &subscript_data_block->subscripts[pos]);
-	CHECK_STATUS(status);
-	if (pos >= subscript_data_block->sdb_count)
-	subscript_data_block->sdb_count = pos + 1;
-	/* Note check here for maximum depth! */
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$xecute(mumps_code)
-struct dsc$descriptor_s *mumps_code;
-{
-	int arg_cnt;
-	condition_code status;
-
-	CHECK_ARGUMENT_COUNT(arg_cnt, mumps_code, 1, 1);
-	status = gtm$xecute(mumps_code);
-	CHECK_GTM_STATUS(status)
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$rundown()
-{
-TRACE("condition_code dsm$rundown()");
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$local_get(local_name, get_value, get_value_length)
-struct dsc$descriptor_s *local_name;
-struct dsc$descriptor_s *get_value;
-unsigned short *get_value_length;
-{
-	int arg_cnt;
-	condition_code status;
-
-TRACE("condition_code dsm$local_get(local_name, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, local_name, 2, 3);
-	status = gtm$get(GTMI$_LOCAL, &return_string, local_name);
-	CHECK_GTM_STATUS(status)
-#ifdef TRACE_GLOBALS
-display_descript(&local_name, local_name.dsc$w_length);
-display_descript(&return_string, return_string.dsc$w_length);
-#endif
-	TRACE_DESC(return_string);
-	if (arg_cnt > 2 && get_value_length)
-	{
-		*get_value_length = (return_string.dsc$w_length < get_value->dsc$w_length)
-		    ? return_string.dsc$w_length : get_value->dsc$w_length;
-	}
-	lib$scopy_dxdx(&return_string, get_value);
-	lib$sfree1_dd(&return_string);
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$local_set(local_name, set_value)
-struct dsc$descriptor_s *local_name;
-struct dsc$descriptor_s *set_value;
-{
-	int arg_cnt;
-	condition_code status;
-
-TRACE("condition_code dsm$local_set(local_name, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, local_name, 2, 2);
-	status = gtm$put(GTMI$_LOCAL, set_value, local_name);
-	CHECK_GTM_STATUS(status)
-	return DSM$_SUCCESS;
-}
-
-condition_code dsm$local_kill(local_name)
-struct dsc$descriptor_s *local_name;
-{
-	int arg_cnt;
-	condition_code status;
-
-TRACE("condition_code dsm$local_set(local_name, ...");
-	CHECK_ARGUMENT_COUNT(arg_cnt, local_name, 1, 1);
-	status = gtm$kill(GTMI$_LOCAL, local_name);
-	CHECK_GTM_STATUS(status)
-	return DSM$_SUCCESS;
-}
-
-#ifdef TRACE_GLOBALS
-static unsigned char tg_buffer[132];
-static unsigned char *tgb;
-
-display_global_ref(typ, g, s)
-unsigned char *typ;
-struct gdb *g;
-struct sdb *s;
-{
-	int i, j;
-	unsigned char *cp;
-
-	tgb = tg_buffer;
-	while (*typ)
-		*tgb++ = *typ++;
-	*tgb++ = ':';
-	*tgb++ = '^';
-	cp = g->global_name;
-	for (i = 0 ; i < g->name_length ; i++)
-		*tgb++ = *cp++;
-	if (s->sdb_count == 0)
-		return;
-	*tgb++ = '(';
-	for (i = 0 ; i < s->sdb_count ; i++)
-	{
-		*tgb++ = '"';
-		for (cp = s->subscripts[i].dsc$a_pointer, j = s->subscripts[i].dsc$w_length ; j-- > 0 ; )
-			*tgb++ = *cp++;
-		*tgb++ = '"';
-		*tgb++ = ',';
-	}
-	*(tgb - 1) = ')';
-	return;
-}
-
-display_int(n)
-int n;
-{
-	*tgb++ = '=';
-	if (n > 9)
-		*tgb++ = '0' + ((n / 10) % 10);
-	*tgb++ = '0' + (n % 10);
-	display_dump();
-}
-
-display_descript(d, len)
-struct dsc$descriptor_s *d;
-int len;
-{
-	char *cp;
-	int n;
-
-	*tgb++ = '=';
-	for (n = 0 , cp = d->dsc$a_pointer ; n++ < len; )
-		*tgb++ = *cp++;
-	display_dump();
-}
-display_dump()
-{
-	dsmapi_out_write(tg_buffer, tgb - tg_buffer);
-}
-
-display_str(s)
-char *s;
-{
-	while (*tgb++ = *s++)
-		;
-	dsmapi_out_write(tg_buffer, tgb - tg_buffer);
-}
-
-#endif
-
-static struct RAB *dsmapi_output_rab = 0;
-static struct FAB *dsmapi_output_fab = 0;
-
-static void dsmapi_out_open()
-{
-	uint4			status;
-
-	dsmapi_output_fab = malloc(SIZEOF(*dsmapi_output_fab));
-	dsmapi_output_rab = malloc(SIZEOF(*dsmapi_output_rab));
-	*dsmapi_output_fab  = cc$rms_fab;
-	*dsmapi_output_rab  = cc$rms_rab;
-	dsmapi_output_rab->rab$l_fab = dsmapi_output_fab;
-	dsmapi_output_rab->rab$w_usz = 255;
-	dsmapi_output_fab->fab$w_mrs = 255;
-	dsmapi_output_fab->fab$b_fac = FAB$M_GET | FAB$M_PUT;
-	dsmapi_output_fab->fab$b_rat = FAB$M_CR;
-	dsmapi_output_fab->fab$l_fna = "SYS$OUTPUT";
-	dsmapi_output_fab->fab$b_fns = SIZEOF("SYS$OUTPUT") - 1;
-	status = sys$create(dsmapi_output_fab, 0, 0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-	status = sys$connect(dsmapi_output_rab, 0, 0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-}
-
-static void dsmapi_out_write(addr, len)
-unsigned char *addr;
-unsigned int len;
-{
-	if (!dsmapi_output_fab)
-		dsmapi_out_open();
-	dsmapi_output_rab->rab$l_rbf = addr;
-	dsmapi_output_rab->rab$w_rsz = len;
-	sys$put(dsmapi_output_rab,0 ,0);
-	return;
-}
-
-static void dsmapi_out_hex(val)
-int4 val;
-{
-	register char *cp;
-	register unsigned int n;
-	char x;
-	char dest[8];
-
-	n = val;
-	cp = &dest[8];
-	while (cp > dest)
-	{
-		x = n & 0xF;
-		n >>= 4;
-		*--cp = x + ((x > 9) ? 'A' - 10 : '0');
-	}
-	dsmapi_out_write(dest, SIZEOF(dest));
-	return;
-}
-
-static void dsmapi_out_close()
-{
-	sys$close(dsmapi_output_fab, 0, 0);
-	free(dsmapi_output_fab);
-	free(dsmapi_output_rab);
-	dsmapi_output_fab = 0;
-	dsmapi_output_rab = 0;
-	return;
-}
diff --git a/sr_vvms/dtgbldir.c b/sr_vvms/dtgbldir.c
deleted file mode 100644
index f3d90e9..0000000
--- a/sr_vvms/dtgbldir.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* dtgbldir.c - test global directory functions */
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-#include "gtm_stdlib.h"
-#include <fab.h>
-#include <rmsdef.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <psldef.h>
-#include <lnmdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gbldirnam.h"
-#include "dpgbldir.h"
-
-main()
-{
-	struct FAB	fab;
-	header_struct	*header;
-	gd_addr		*addr, *addr1, *addr2, *addr3;
-	gd_region	*region;
-	gd_segment	*segment;
-	int4		*long_ptr, ret_addr;
-	short		iosb[4];
-	mval		v;
-	char		file_name1[] = "dtgbld01.gld", file_name2[] = "dtgbld02.gld", file_name3[] = "dtgbld03.gld";
-	char		label[] = GDE_LABEL_LITERAL;
-	char		file_name4[]="dtlog1";
-	uint4		status, size;
-	$DESCRIPTOR(proc_tab, "LNM$PROCESS");
-	$DESCRIPTOR(gbldir, "GTM$GBLDIR");
-	$DESCRIPTOR(dtlog, "DTLOG1");
-	typedef struct
-	{	short	buf_len;
-		short	item;
-		int4	buf_addr;
-		int4	ret_addr;
-		int4	term;
-	}item_list;
-	item_list	ilist;
-	char		acmo=PSL$C_USER;
-
-/************************* Create logical names for tests **********************************************************/
-	ilist.item = LNM$_STRING;
-	ilist.buf_len = SIZEOF(file_name1) - 1;
-	ilist.buf_addr = file_name1;
-	ilist.term = 0;
-	ilist.ret_addr = &ret_addr;
-	status = sys$crelnm(0, &proc_tab, &gbldir, &acmo, &ilist);
-	if (!(status & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	ilist.buf_len = SIZEOF(file_name2) - 1;
-	ilist.buf_addr = file_name2;
-	status = sys$crelnm(0, &proc_tab, &dtlog, &acmo, &ilist);
-	if (!(status & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-
-/************************* Create global directory files for tests *************************************************/
-	fab = cc$rms_fab;
-	fab.fab$l_alq = 5;
-	fab.fab$l_fna = file_name1;
-	fab.fab$b_fns = SIZEOF(file_name1) - 1;
-	fab.fab$l_fop = (FAB$M_UFO | FAB$M_CBT);
-	fab.fab$b_fac = (FAB$M_PUT | FAB$M_GET | FAB$M_BIO);
-	fab.fab$b_shr = (FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI);
-	status = sys$create(&fab);
-	if (status != RMS$_CREATED && status != RMS$_FILEPURGED && status != RMS$_NORMAL)
-		sys$exit(status);
-	DUMMY_GLD_INIT(header, addr, region, segment, size, RELATIVE_OFFSET_TRUE);
-	/* the above macro invocation initializes "header", "addr", "region", "segment" and "size" */
-	region = (char*)addr + (int4)(addr->regions);
-	segment = (char*)addr + (int4)(addr->segments);
-	memset(region, 0, SIZEOF(gd_region));
-	region->rname_len = 5;
-	memcpy(region->rname,"TEMP1",5);
-	region->dyn.offset = addr->segments;
-	region->max_rec_size = 100;
-	region->max_key_size = 64;
-	segment->sname_len = 5;
-	memcpy(segment->sname, "TEMP1", 5);
-	memcpy(segment->fname, "MUMPS1.DAT", 10);
-	segment->fname_len = 10;
-	segment->blk_size = 2 * DISK_BLOCK_SIZE;
-	segment->allocation = 100;
-	segment->ext_blk_count = 100;
-	segment->cm_blk = 0;
-	segment->lock_space = 20;
-	memcpy(segment->defext, ".DAT", 4);
-	segment->global_buffers = 64;
-	segment->buckets = 0;
-	segment->windows = 0;
-	segment->acc_meth = dba_bg;
-	segment->defer_time = 0;
-	segment->file_cntl = 0;
-	status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_WRITEVBLK, &iosb[0], 0, 0, header, size, 1, 0, 0, 0);
-	if (!(status & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	if (!(iosb[0] & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	sys$dassgn(fab.fab$l_stv);
-	region->rname_len = 5;
-	memcpy(region->rname,"TEMP2",5);
-	segment->sname_len = 5;
-	memcpy(segment->sname,"TEMP2",5);
-	memcpy(segment->fname,"MUMPS2.DAT",10);
-	segment->fname_len = 10;
-	fab.fab$l_fna = file_name2;
-	fab.fab$b_fns = SIZEOF(file_name3) - 1;
-	status = sys$create(&fab);
-	if (status != RMS$_CREATED && status != RMS$_FILEPURGED && status != RMS$_NORMAL)
-		sys$exit(status);
-	status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_WRITEVBLK, &iosb[0], 0, 0, header, size, 1, 0, 0, 0);
-	if (!(status & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	if (!(iosb[0] & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	sys$dassgn(fab.fab$l_stv);
-	region->rname_len = 5;
-	memcpy(region->rname, "TEMP3", 5);
-	segment->sname_len = 5;
-	memcpy(segment->sname, "TEMP3", 5);
-	memcpy(segment->fname, "MUMPS3.DAT", 10);
-	segment->fname_len = 10;
-	fab.fab$l_fna = file_name3;
-	fab.fab$b_fns = SIZEOF(file_name3) - 1;
-	status = sys$create(&fab);
-	if (status != RMS$_CREATED && status != RMS$_FILEPURGED && status != RMS$_NORMAL)
-		sys$exit(status);
-	status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_WRITEVBLK, &iosb[0], 0, 0, header, size, 1, 0, 0, 0);
-	if (!(status & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	if (!(iosb[0] & 1))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	sys$dassgn(fab.fab$l_stv);
-
-/*************************** Run tests********************************************/
-	v.str.len = SIZEOF(file_name1) - 1;
-	v.str.addr = file_name1;
-	PRINTF("Open first global directory:  dtgbld01.gld\n");
-	addr1 = zgbldir(&v);
-	PRINTF("Region name is %s, expected TEMP1\n", addr1->regions->rname);
-	PRINTF("Segment name is %s, expected TEMP1\n", addr1->regions->dyn.addr->sname);
-	PRINTF("File name is %s, expected MUMPS1.DAT\n", addr1->regions->dyn.addr->fname);
-	v.str.len = SIZEOF(file_name2) - 1;
-	v.str.addr = file_name2;
-	PRINTF("Open second global directory:  dtgbld02.gld\n");
-	addr2 = zgbldir(&v);
-	PRINTF("Region name is %s, expected TEMP2\n", addr2->regions->rname);
-	PRINTF("Segment name is %s, expected TEMP2\n", addr2->regions->dyn.addr->sname);
-	PRINTF("File name is %s, expected MUMPS2.DAT\n", addr2->regions->dyn.addr->fname);
-	v.str.len = SIZEOF(file_name3) - 1;
-	v.str.addr = file_name3;
-	PRINTF("Open third global directory:  dtgbld03.gld\n");
-	addr3 = zgbldir(&v);
-	PRINTF("Region name is %s, expected TEMP3\n", addr3->regions->rname);
-	PRINTF("Segment name is %s, expected TEMP3\n", addr3->regions->dyn.addr->sname);
-	PRINTF("File name is %s, expected MUMPS3.DAT\n", addr3->regions->dyn.addr->fname);
-	PRINTF("Open null string global directory:  dtgbld01.gld\n");
-	v.str.len = 0;
-	addr = zgbldir(&v);
-	if (addr != addr1)
-		PRINTF("Expected pointer to previous struct, got new structure\n");
-	else
-		PRINTF("Got same pointer as expected.\n");
-	PRINTF("Open dtlog1 global directory:  dtgbld02.gld\n");
-	v.str.len = SIZEOF(file_name4) - 1;
-	v.str.addr = file_name4;
-	addr = zgbldir(&v);
-	if (addr != addr2)
-		PRINTF("Expected pointer to previous struct, got new structure\n");
-	else
-		PRINTF("Got same pointer as expected.\n");
-	v.str.len = SIZEOF(file_name3) - 1;
-	v.str.addr = file_name3;
-	PRINTF("Reopen third global directory:  dtgbld03.gld\n");
-	addr = zgbldir(&v);
-	if (addr != addr3)
-		PRINTF("Expected pointer to previous struct, got new structure\n");
-	else
-		PRINTF("Got same pointer as expected.\n");
-	return;
-}
diff --git a/sr_vvms/edrelbta.m b/sr_vvms/edrelbta.m
deleted file mode 100644
index 0c51e1b..0000000
--- a/sr_vvms/edrelbta.m
+++ /dev/null
@@ -1,37 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-edrelnam	; ; ; verify a proposed release name and update release_name.h
-	;
-	set $zro="[]/src=([],gtm$vrt:[pct])"
-	Write "$ztrnlnm(""gtm_new_ver_id"") = """,$ztrnlnm("gtm_new_ver_id"),"""",!
-	set relnam=$$FUNC^%UCASE($ztrnlnm("gtm_new_ver_id")),suffix=$piece(relnam,"-",2)
-	if $p(relnam,"-")'?1"V"1.2N1"."1.2N&'((suffix?1.2N.1A)!(suffix?1"BL"1.2N)!(suffix?1"FT"1.2N)) do
-	.	write !,"The parameter """,relnam,""" (gtm_new_ver_id) is not a valid format",!
-	.	set $ztrap="" zmessage 2
-	set file="release_name.h",new="temp.tmp"
-	open file:(read:exception="goto noopen"),new:newversion
-	;
-	Use file:exception="goto eof"
-	For  Read line  Do
-	.	Use new
-	.	If line["GTM_RELEASE_NAME" Do
-	.	.	Write $Piece(line,"V"),relnam,"-beta ",$Piece($Piece(line,"V",2,999)," ",2,99),!
-	.	Else  Do
-	.	.	If line["GTM_VERSION" Write $Piece(line,"V",1,2),$Piece(relnam,"-"),"""",!
-	.	.	Else                  Write line,!
-	.	Use file:exception="goto eof"
-	Quit
-	;
-eof	close file,new:rename=file
-	quit
-	;
-noopen	write !,"Unable to open release_name.h",!
-	set $ztrap="" zmessage 2
diff --git a/sr_vvms/edrelnam.m b/sr_vvms/edrelnam.m
deleted file mode 100644
index bc6f503..0000000
--- a/sr_vvms/edrelnam.m
+++ /dev/null
@@ -1,37 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-edrelnam	; ; ; verify a proposed release name and update release_name.h
-	;
-	set $zro="[]/src=([],gtm$vrt:[pct])"
-	Write "$ztrnlnm(""gtm_new_ver_id"") = """,$ztrnlnm("gtm_new_ver_id"),"""",!
-	set relnam=$$FUNC^%UCASE($ztrnlnm("gtm_new_ver_id")),suffix=$piece(relnam,"-",2)
-	if $p(relnam,"-")'?1"V"1.2N1"."1.2N&'((suffix?1.2N.1A)!(suffix?1"BL"1.2N)!(suffix?1"FT"1.2N)) do
-	.	write !,"The parameter """,relnam,""" (gtm_new_ver_id) is not a valid format",!
-	.	set $ztrap="" zmessage 2
-	set file="release_name.h",new="temp.tmp"
-	open file:(read:exception="goto noopen"),new:newversion
-	;
-	Use file:exception="goto eof"
-	For  Read line  Do
-	.	Use new
-	.	If line["GTM_RELEASE_NAME" Do
-	.	.	Write $Piece(line,"V"),relnam," ",$Piece($Piece(line,"V",2,999)," ",2,99),!
-	.	Else  Do
-	.	.	If line["GTM_VERSION" Write $Piece(line,"V",1,2),$Piece(relnam,"-"),"""",!
-	.	.	Else                  Write line,!
-	.	Use file:exception="goto eof"
-	Quit
-	;
-eof	close file,new:rename=file
-	quit
-	;
-noopen	write !,"Unable to open release_name.h",!
-	set $ztrap="" zmessage 2
diff --git a/sr_vvms/efn.h b/sr_vvms/efn.h
deleted file mode 100644
index a3f1d35..0000000
--- a/sr_vvms/efn.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <efndef.h>
-
-enum efn_names
-{
-	efn_bg_qio_read = 3,	/* According to the Programming Concepts Manual section on "Using Event Flags",
-				 *    event flag 0 is the default flag used by system routines.
-				 *    event flag 1 to 23 may be used in system routines.
-				 *    event flag 24 to 31 is reserved for Compaq/HP use only.
-				 *    event flags in cluster #1 i.e. flag # 32 to 63 are Local and Available for general use.
-				 * However, we have not (yet) noticed any issues with our event flag usage. We'll stick with
-				 * cluster 0 usage until we've had a chance to cleanup event flag usage
-				 */
-	efn_bg_qio_write,
-	efn_ignore_obsolete,
-	efn_immed_wait,		/* to be used whenever we are NOT in an AST and are going to WAIT */
-	efn_op_job,
-	efn_outofband,
-	efn_timer,
-	efn_sys_wait,
-        efn_2timer,             /* used by gt.cm cmi */
-	efn_jnl,
-        efn_iott_write,
-        efn_cmi_immed_wait,
-        efn_cmi_mbx,
-	efn_timer_ast,		/* to be used whenever we are in an AST and are going to WAIT */
-	efn_hiber_start,	/* used by hiber_start when not in an AST */
-	efn_ignore = EFN$C_ENF
-};
diff --git a/sr_vvms/error_return.c b/sr_vvms/error_return.c
deleted file mode 100644
index 095396d..0000000
--- a/sr_vvms/error_return.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2010, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdlib.h"
-#include "gtm_stdio.h"
-
-#include "error.h"
-#include "error_trap.h"
-#include "dollar_zlevel.h"
-#include <rtnhdr.h>
-#include "stack_frame.h"
-#include "golevel.h"
-#include "io.h"
-
-#define BASE_FRAME(fp) ((fp->type & SFT_DM))
-
-GBLREF	stack_frame		*frame_pointer;
-GBLREF	unsigned short		proc_act_type;
-GBLREF	dollar_ecode_type	dollar_ecode;			/* structure containing $ECODE related information */
-GBLREF	int			mumps_status;
-GBLREF	stack_frame		*error_frame;
-GBLREF	io_desc			*gtm_err_dev;
-
-error_def(ERR_REPEATERROR);
-
-void error_return(void)
-{
-	int		parent_level;
-	stack_frame	*curframe, *cur_counted_frame, *parent_counted_frame;
-	boolean_t	rethrow_needed = FALSE, dev_act_err;
-
-	DBGEHND((stderr, "error_return: Entered\n"));
-	assert((frame_pointer->flags & SFF_ETRAP_ERR) || (error_frame == frame_pointer));
-	/* Determine counted frame at the current $zlevel */
-	for (curframe = frame_pointer; (NULL != curframe) && !(curframe->type & SFT_COUNT) && !BASE_FRAME(curframe);
-			curframe = curframe->old_frame_pointer)
-		;
-	cur_counted_frame = curframe;
-	NULLIFY_ERROR_FRAME;	/* reset error_frame */
-	dev_act_err = ((NULL != cur_counted_frame) && (cur_counted_frame->flags & SFF_ETRAP_ERR)
-		&& (cur_counted_frame->flags & SFF_DEV_ACT_ERR));
-	/* If the top level error is a device exception error, we do not want to unwind upto the parent frame but instead
-	 * rethrow the error at the current level and use $ztrap/$etrap exception handling. In case even that fails,
-	 * we will come again to error_return at which point, we will do the unwind upto the parent frame.
-	 */
-	if (!dev_act_err && (NULL != curframe))		/* Determine counted frame at the parent  $zlevel */
-		for (curframe = curframe->old_frame_pointer;
-		    (NULL != curframe) && !(curframe->type & SFT_COUNT) && !BASE_FRAME(curframe);
-		    curframe = curframe->old_frame_pointer)
-			;
-	parent_counted_frame = curframe;
-	/* Exit if we are at the bottom of the stack */
-	parent_level = dollar_zlevel() - 1;
-	if ((NULL == parent_counted_frame) || (1 > parent_level))
-		EXIT(dollar_ecode.error_last_ecode);
-	assert(parent_level > 0);
-	if (dev_act_err || (!BASE_FRAME(parent_counted_frame) && dollar_ecode.index))
-		rethrow_needed = TRUE;
-	DBGEHND((stderr, "error_return: rethrow_needed: %d  dev_act_err: %d\n", rethrow_needed, dev_act_err));
-	if (!dev_act_err)
-	{
-		if (parent_counted_frame->type & SFT_DM)
-		{	/* hack to retain SFT_DM frame from being unwound by golevel */
-			parent_counted_frame->type |= SFT_COUNT;
-			GOLEVEL(parent_level + 1, FALSE);
-			parent_counted_frame->type &= ~SFT_COUNT;
-			assert(parent_counted_frame->type & SFT_DM);
-		} else
-			GOLEVEL(parent_level, FALSE);
-		/* Check that we have unwound exactly upto the parent counted frame. */
-		assert(parent_counted_frame == frame_pointer);
-	} else
-	{
-		GOLEVEL(parent_level + 1, FALSE);
-		/* Check that we have unwound exactly upto the current counted frame. */
-		assert(cur_counted_frame == frame_pointer);
-	}
-	assert(!proc_act_type);
-	if (rethrow_needed)
-	{
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_REPEATERROR);
-		assert(FALSE);	/* the previous rts_error() should not return */
-	}
-	/* zero the error device just to be safe */
-	assert(NULL == gtm_err_dev);
-	gtm_err_dev = NULL;
-}
diff --git a/sr_vvms/errorsp.h b/sr_vvms/errorsp.h
deleted file mode 100644
index da485f4..0000000
--- a/sr_vvms/errorsp.h
+++ /dev/null
@@ -1,171 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __ERRORSP_H__
-#define __ERRORSP_H__
-
-#include <ssdef.h>
-#include <errnodef.h>
-#include <chfdef.h>
-
-typedef	unsigned int	ch_ret_type;
-GBLREF int4		 error_condition;
-
-#define CONDITION_HANDLER(name) \
-	ch_ret_type name(struct chf$signal_array *sig, struct chf$mech_array *mch)
-
-#define WARNING		0x00000000
-#define SUCCESS		0x00000001
-#define ERROR		0x00000002
-#define INFO		0x00000003
-#define SEVERE		0x00000004
-#define SEV_MSK		0x00000007
-
-#define SIGNAL		sig->chf$l_sig_name
-#define SEVERITY 	(SIGNAL & SEV_MSK)
-
-#define FAC_MSK 	0x08010000
-#define MSGCC_MASK	0x00FFFFF8
-#define NOT_EXC 	4
-#define FACILITY_MASK	(0x0FFF0000)
-#define GTM_FACILITY	(0x08F60000)
-#define RMS_FACILITY	(RMS$_FACILITY << 16)
-#define SYSTEM_FACILITY	(SYSTEM$_FACILITY << 16)
-#define IS_GTM_ERROR(X) 	((X & FACILITY_MASK) == GTM_FACILITY)
-#define IS_RMS_ERROR(X) 	((X & FACILITY_MASK) == RMS_FACILITY)
-#define IS_SYSTEM_ERROR(X)	((X & FACILITY_MASK) == SYSTEM_FACILITY)
-/* Count of arguments the TPRETRY error will make available for tp_restart to use */
-#define TPRESTART_ARG_CNT 10	/* see comment in INVOKE_RESTART macro in tp.h */
-
-/* ***** If the system error was a hardware trap or a hardware fault the ***** */
-/* ***** PC and PSL are necessary for message output. In all other cases ***** */
-/* ***** the PC and PSL are removed from the signal argument list by     ***** */
-/* ***** subtracting two from the argument count in sig->chf$l_sig_args. ***** */
-/* ***** If the severity code held in the first 3 bits of the argument   ***** */
-/* ***** sig->chf$l_sig_name is 5, 6, or 7 (reserved for digital) it is  ***** */
-/* ***** a fault or trap.						 ***** */
-
-#define ERROR_RTN		error_return_vms
-
-#define TRAP 			(!(SIGNAL & FAC_MSK) && (SIGNAL & SEV_MSK) > NOT_EXC)
-
-#define PRN_ERROR		{							\
-					if (!(TRAP))					\
-						sig->chf$l_sig_args -= 2;		\
-					if (0 < sig->chf$l_sig_args)			\
-						sys$putmsg(sig, 0);			\
-				}
-/* MUM_TSTART unwinds the current C-stack and restarts executing generated code from the top of the current M-stack */
-#define MUM_TSTART              UNWIND(&mch->CHF_MCH_DEPTH, CODE_ADDRESS(mum_tstart))
-
-#define ESTABLISH_NOJMP(x)	lib$establish(x)
-#define ESTABLISH_NOUNWIND(x)	lib$establish(x)
-#define ESTABLISH_RET(x,ret)	lib$establish(x)
-#define ESTABLISH(x)		lib$establish(x)
-
-#define REVERT			lib$revert()
-#define CONTINUE		return SS$_CONTINUE
-#define NEXTCH			return SS$_RESIGNAL
-#define UNWIND(X, Y)		{ \
-					int stat; \
-					stat = sys$unwind((X), (Y)); \
-					if ((SS$_NORMAL != stat) && (SS$_UNWINDING != stat)) \
-						EXIT(stat); \
-					return SS$_NORMAL; \
-				}
-
-#define START_CH(dummy	)											\
-				error_def(ERR_TPRETRY);			/* BYPASSOK */				\
-				DCL_THREADGBL_ACCESS;								\
-														\
-				SETUP_THREADGBL_ACCESS;								\
-				if (SIGNAL != ERR_TPRETRY)							\
-				{										\
-					if (SIGNAL == SS$_UNWIND)						\
-						return SS$_NORMAL;						\
-					if (SIGNAL == SS$_DEBUG)						\
-						return SS$_RESIGNAL;						\
-					if ((SIGNAL & MSGCC_MASK) == (C$_SIGUSR1 & MSGCC_MASK))			\
-					{	/* Ignore signal if no handler. Call handler as AST */		\
-						/* because deferred_events() needs it that way. */  		\
-						/* Ignore errors 'cause we can't handle them now anyway */	\
-						if (NULL != RFPTR(gtm_sigusr1_handler))	     	 		\
-							if (lib$ast_in_prog())					\
-								IVFPTR(gtm_sigusr1_handler);			\
-							else							\
-								sys$dclast(RFPTR(gtm_sigusr1_handler), 0, 0);	\
-						return SS$_CONTINUE;				       	  	\
-					}									\
-					error_condition = SIGNAL;						\
-				}
-
-#define MDB_START		{									\
-					ESTABLISH(terminate_ch);					\
-					if (cs_addrs  &&  cs_addrs->hdr  &&  cs_addrs->hdr->clustered)	\
-						sys$cantim(&cs_addrs->hdr->clustered, 0);		\
-				}
-
-#define TERMINATE		{					\
-					lib$sig_to_stop(sig, mch);	\
-					return SS$_RESIGNAL;		\
-				}
-
-#define SUPPRESS_DUMP		(FALSE)
-#define DUMP_CORE		TERMINATE
-
-#define MUMPS_EXIT		{					\
-					mumps_status = SIGNAL;		\
-					GOLEVEL(0, FALSE);		\
-					MUM_TSTART;			\
-				}
-#define PROCDIE(x)		EXIT(x)
-#define EXIT(x)			sys$exit(x)
-
-#define DUMP			(   SIGNAL == SS$_ACCVIO			\
-				 || SIGNAL == SS$_ASTFLT			\
-				 || SIGNAL == SS$_OPCCUS			\
-				 || SIGNAL == SS$_OPCDEC			\
-				 || SIGNAL == SS$_PAGRDERR			\
-				 || SIGNAL == SS$_RADRMOD			\
-				 || SIGNAL == SS$_ROPRAND			\
-				 || SIGNAL == ERR_ASSERT			\
-				 || SIGNAL == ERR_GTMASSERT			\
-				 || SIGNAL == ERR_GTMASSERT2			\
-				 || SIGNAL == ERR_GTMCHECK	/* BYPASSOK */	\
-                                 || SIGNAL == ERR_VMSMEMORY 			\
-				 || SIGNAL == ERR_STACKOFLOW )
-
-/* true if one of above or SEVERE and GTM error or SYSTEM error */
-#define DUMPABLE		( DUMP || (SEVERITY == SEVERE &&  \
-					   ( IS_GTM_ERROR(SIGNAL))))
-
-unsigned char *set_zstatus(mstr *src, struct chf$signal_array *sig, unsigned char **ctxtp, boolean_t need_rtsloc);
-
-#define SET_ZSTATUS(ctxt)	set_zstatus(&src_line_d, sig, ctxt, TRUE)
-#define MSG_OUTPUT		!(SIGNAL & 0xF0000000)
-
-
-#define EXIT_HANDLER(x)		sys$dclexh(x)
-
-#define SEND_CALLERID(callee) send_msg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_CALLERID, 3, LEN_AND_STR((callee)), caller_id());
-#define PRINT_CALLERID util_out_print(" -- generated from 0x!XL.", NOFLUSH, caller_id());
-#define MAKE_MSG_WARNING(x)     ((x) & ~SEV_MSK | WARNING)
-#define MAKE_MSG_SUCCESS(x)     ((x) & ~SEV_MSK | SUCCESS)
-#define MAKE_MSG_ERROR(x)       ((x) & ~SEV_MSK | ERROR)
-#define MAKE_MSG_INFO(x)        ((x) & ~SEV_MSK | INFO)
-#define MAKE_MSG_SEVERE(x)      ((x) & ~SEV_MSK | SEVERE)
-#define MAX_MSG_SIZE 		256
-
-CONDITION_HANDLER(ccp_ch);
-CONDITION_HANDLER(ccp_exi_ch);
-CONDITION_HANDLER(ojch);
-
-#endif
diff --git a/sr_vvms/ether_trace.c b/sr_vvms/ether_trace.c
deleted file mode 100644
index fed5cd8..0000000
--- a/sr_vvms/ether_trace.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "nmadef.h"
-#include "ddphdr.h"
-#include <descrip.h>
-#include <iodef.h>
-#include <efndef.h>
-#include "util.h"
-#include "ddp_trace_output.h"
-
-
-unsigned char packet_header[20];
-unsigned char local_buffer[1000];
-char *buffer_top = local_buffer;
-
-#define CHECK_STATUS if ((status & 1) == 0) lib$signal(status);
-#define CHECK_IOSB if ((status & 1) != 0) status = ether_iosb.result ; CHECK_STATUS;
-int ether_trace(void)
-{
-    int4 status;
-    char ether_string[] = "ESA0";
-    $DESCRIPTOR(ether_name, ether_string);
-    $DESCRIPTOR(output_qual, "OUTPUT");
-    int4 ether_channel = 0;
-    int i;
-    struct
-    {
-	unsigned short result;
-	short length;
-	int4 devspec;
-    } ether_iosb;
-    struct
-    {
-	short param_id;
-	int4 param_value;
-    } set_parm_array[] =
-    {
-	{
-	    NMA$C_PCLI_PRM, NMA$C_STATE_ON
-	}
-    };
-    struct dsc$descriptor_s set_parm;
-
-    util_out_open(&output_qual);
-    set_parm.dsc$w_length = SIZEOF(set_parm_array);
-    set_parm.dsc$a_pointer = set_parm_array;
-    set_parm.dsc$b_dtype = 0;
-    set_parm.dsc$b_class = 0;
-    status = sys$assign (
-	&ether_name,
-	&ether_channel,
-	0,
-	0);
-    CHECK_STATUS;
-    status = sys$qiow (
-		 0,
-		 ether_channel,
-		 IO$_SETMODE | IO$M_CTRL | IO$M_STARTUP,
-		 &ether_iosb,
-		 0,
-		 0,
-		 0,
-		 &set_parm,
-		 0,
-		 0,
-		 0,
-		 0);
-    CHECK_IOSB;
-    for (i = 0 ; i < 2000 ; i++)
-    {
-retry:
-        status = sys$qiow(EFN$C_ENF,
-    		 ether_channel,
-    		 IO$_READPBLK,
-    		 &ether_iosb,
-    		 0,
-    		 0,
-    		 buffer_top, 1500, 0, 0, packet_header, 0);
-        CHECK_IOSB;
-	if (packet_header[0] != 0xAA && packet_header[6] != 0xAA)
-		goto retry;
-/*	util_out_write("Packet", SIZEOF("Packet"));
-	ddp_trace_output(packet_header, SIZEOF(packet_header));
-	ddp_trace_output(buffer_top, ether_iosb.length);
-*/
-	ddp_trace_output(buffer_top, 30, DDP_RECV);
-    }
-    util_out_close();
-    return 1;
-}
diff --git a/sr_vvms/exi_ch.c b/sr_vvms/exi_ch.c
deleted file mode 100644
index 0d2c9a0..0000000
--- a/sr_vvms/exi_ch.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "error.h"
-#include "have_crit.h"
-
-
-#define UNWIND_LEVELS 4
-/* 0 unwinds EXI_CH, 1 unwinds EXI_RUNDOWN,  2,3 and 4 unwind the three VMS handlers,
-   thus returning to pc was at when the exit condition was received.            */
-
-static int      		depth = UNWIND_LEVELS;
-
-CONDITION_HANDLER(exi_ch)
-{
-        START_CH(FALSE);
-	SET_FORCED_EXIT_STATE;
-        UNWIND(&depth, NULL);
-}
diff --git a/sr_vvms/exttime.c b/sr_vvms/exttime.c
deleted file mode 100644
index 7d24a89..0000000
--- a/sr_vvms/exttime.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-
-int exttime(uint4 short_time, char *buffer, int extract_len)
-{
-	char		*p;
-	jnl_proc_time	VMS_time;
-	uint4		days, h_seconds;
-
-	JNL_WHOLE_FROM_SHORT_TIME(VMS_time, short_time);
-	/* Convert the VMS time to the number of days since the system
-	   zero date, and the number of hundredths of a second since midnight */
-	lib$day(&days, &VMS_time, &h_seconds);
-	/* Convert days and h_seconds to $Horolog format */
-	p = i2asc((unsigned char *)(buffer + extract_len), days + DAYS);
-	*p++ = ',';
-	p = i2asc(p, h_seconds / CENTISECONDS);
-	*p++ = '\\';
-	return p - buffer;
-}
diff --git a/sr_vvms/f_piece.c b/sr_vvms/f_piece.c
deleted file mode 100644
index 91239dc..0000000
--- a/sr_vvms/f_piece.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "compiler.h"
-#include "opcode.h"
-#include "toktyp.h"
-#include "advancewindow.h"
-#include "fnpc.h"
-
-error_def(ERR_COMMA);
-
-int f_piece(oprtype *a, opctype op)
-{
-	delimfmt	unichar;
-	mval		*delim_mval;
-	oprtype		x;
-	triple		*delimiter, *first, *last, *r, *srcislit;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	r = maketriple(op);
-	if (EXPR_FAIL == expr(&(r->operand[0]), MUMPS_STR))
-		return FALSE;
-	if (TK_COMMA != TREF(window_token))
-	{
-		stx_error(ERR_COMMA);
-		return FALSE;
-	}
-	advancewindow();
-	delimiter = newtriple(OC_PARAMETER);
-	r->operand[1] = put_tref(delimiter);
-	first = newtriple(OC_PARAMETER);
-	delimiter->operand[1] = put_tref(first);
-	if (EXPR_FAIL == expr(&x, MUMPS_STR))
-		return FALSE;
-	if (TK_COMMA != TREF(window_token))
-		first->operand[0] = put_ilit(1);
-	else
-	{
-		advancewindow();
-		if (EXPR_FAIL == expr(&(first->operand[0]), MUMPS_INT))
-			return FALSE;
-	}
-	assert(TRIP_REF == x.oprclass);
-	if ((TK_COMMA != TREF(window_token)) && (OC_LIT == x.oprval.tref->opcode)
-	     && (1 == x.oprval.tref->operand[0].oprval.mlit->v.str.len))
-	{	/* Single char delimiter */
-		delim_mval = &x.oprval.tref->operand[0].oprval.mlit->v;
-		unichar.unichar_val = 0;
-		r->opcode = OC_FNP1;
-		unichar.unibytes_val[0] = *delim_mval->str.addr;
-		delimiter->operand[0] = put_ilit(unichar.unichar_val);
-		srcislit = newtriple(OC_PARAMETER);
-		first->operand[1] = put_tref(srcislit);
-	} else
-	{
-		delimiter->operand[0] = x;
-		last = newtriple(OC_PARAMETER);
-		first->operand[1] = put_tref(last);
-		if (TK_COMMA != TREF(window_token))
-			last->operand[0] = first->operand[0];
-		else
-		{
-			advancewindow();
-			if (EXPR_FAIL == expr(&(last->operand[0]), MUMPS_INT))
-				return FALSE;
-		}
-		srcislit = newtriple(OC_PARAMETER);
-		last->operand[1] = put_tref(srcislit);
-	}
-	/* Pass value 1 (TRUE) if src string is a literal, else 0 (FALSE) */
-	srcislit->operand[0] = put_ilit((OC_LIT == r->operand[0].oprval.tref->opcode) ? TRUE : FALSE);
-	ins_triple(r);
-	*a = put_tref(r);
-	return TRUE;
-}
diff --git a/sr_vvms/fetch_cms_version.com b/sr_vvms/fetch_cms_version.com
deleted file mode 100644
index 20b4925..0000000
--- a/sr_vvms/fetch_cms_version.com
+++ /dev/null
@@ -1,90 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!	fetch_cms_version.com - fetch CMS elements for a specific version (class)
-$!
-$!	p1 - "from version" class name (version name with punctuation; e.g. "V3.2-015")
-$!	p2 - CMS library list (e.g., S_SUN or S_UNIX_CM)
-$!
-$!	This command file fetches the elements from CMS libraries; depending on
-$!	its arguments, it will fetch either the most recent generations on the main line
-$!	of descent or the generations corresponding to any release for which we have
-$!	created a CMS class.  Its complexity is due to the requirement to handle elements
-$!	present in old releases that have subsequently been NIX'ed.
-$!
-$  if (f$extract(0,4,p1) .eqs. "V9.9"  .or.  p1 .eqs. "NEXT" )
-$  then
-$	write sys$output ""
-$	write sys$output "MOST RECENT GENERATIONS IN THE MAIN LINE OF DESCENT ARE BEING DOWNLOADED ..."
-$	write sys$output "Fetching version ", p1
-$!
-$!	Get the most recent generation on the main line of descent of all source files:
-$	cms set library 'p2'
-$	cms fetch *.* ""
-$!
-$!	If release_name.h is present, modify the release number to target_version.
-$	if (f$search("release_name.h") .nes. "")
-$	then
-$		if f$search("edrelnam.obj") .nes. ""
-$		then
-$			delete edrelnam.obj;*	! in case it's for the wrong CPU
-$		endif
-$		version p p			! production version should always be present and working
-$		define/user gtm_new_ver_id 'p1'
-$		gtm						! Set to correct version
-set $zroutines="[]/src=([],gtm$src,gtm$vrt:[pct])"
-d ^edrelnam
-$		delete release_name.h;1
-$		delete edrelnam.obj;*
-$		rename release_name.h;2 release_name.h;1
-$	endif
-$!
-$!	Don't bother processing NIX'ed files; they don't belong in "most recent" version.
-$	directory *.*nix
-$	if f$search("*.*nix;*") .nes. "" then delete/log *.*nix;*
-$     else
-$    	write sys$output "Fetching version ", p1
-$!
-$!	Because this is a configured version and not just the most recent on the
-$!	main line of descent, it's possible some of the elements in this version
-$!	have been NIX'ed since the version was created.  For this reason, we need
-$!	to go through each component CMS source library, one at a time, and change
-$!	any NIX'ed files back to their original names.  This is necessary in order
-$!	to preserve proper occlusion behavior.
-$!
-$       lib_ind = 0
-$       lib_cnt = f$trnlnm(p2,,,,,"MAX_INDEX")
-$lib_loop:
-$	  lib = f$trnlnm(p2,,lib_ind)
-$	  cms set library 'lib'
-$	  cms fetch *.*/gen='p1' ""
-$	  show symbol $status
-$nix_loop:
-$	    nixname = f$search("*.*NIX")
-$           if (nixname .eqs. "") then goto end_nixloop
-$	    nixname = nixname - f$parse(nixname,,,"VERSION")
-$	    basename = nixname - "NIX"
-$	    rename/log 'nixname' 'basename'
-$	    goto nix_loop
-$end_nixloop:
-$	  lib_ind = lib_ind + 1
-$	  if (lib_ind .le. lib_cnt) then goto lib_loop
-$!
-$  endif
-$  directory
-$!
-$! Delete duplicates that should have been superseded by previous versions:
-$  if f$search("*.*;4") .nes. "" then delete/log *.*;4
-$  if f$search("*.*;3") .nes. "" then delete/log *.*;3
-$  if f$search("*.*;2") .nes. "" then delete/log *.*;2
-$!
-$ccfini:
-$  directory
diff --git a/sr_vvms/fgn_parms.c b/sr_vvms/fgn_parms.c
deleted file mode 100644
index 65fc51c..0000000
--- a/sr_vvms/fgn_parms.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "compiler.h"
-#include <descrip.h>
-#include "desc2mval.h"
-
-static readonly mval empty_mv;
-static mval ret_mv;
-
-int fgn_parms(
-int output,
-mval *margs[],
-int maxargs,
-int *fgnargs)
-{
-	int	i,argcnt, *fparms;
-	mval	**v;
-	error_def(ERR_MAXACTARG);
-
-	v = margs;
-	fparms = fgnargs;
-	argcnt = *fparms++;
-	if (output)
-	{	argcnt--;
-		fparms++;
-		margs[maxargs] = &ret_mv;	/* extra slot on the end just to take return value */
-
-	}
-	else
-		margs[maxargs] = 0;
-
-	if (argcnt > MAX_ACTUALS)
-		rts_error(VARLSTCNT(1) ERR_MAXACTARG);
-
-	for (i = 0; i < argcnt; i++)
-	{	*v = push_mval(&empty_mv);
-		desc2mval(*fparms++, *v++);
-	}
-	return argcnt;
-}
diff --git a/sr_vvms/fgn_resolve_lab.c b/sr_vvms/fgn_resolve_lab.c
deleted file mode 100644
index 5b09c17..0000000
--- a/sr_vvms/fgn_resolve_lab.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rtnhdr.h>
-
-GBLDEF mval	fgn_label = DEFINE_MVAL_STRING(MV_STR, 0, 0, 0, NULL, 0, 0);
-
-USHBIN_ONLY(lnr_tabent **) NON_USHBIN_ONLY(lnr_tabent *) fgn_resolve_lab(rhdtyp *rtn, int lab_len, char* lab_name)
-{
-	fgn_label.str.len = lab_len;
-	fgn_label.str.addr = lab_name;
-	return op_labaddr(rtn, &fgn_label, 0);
-}
diff --git a/sr_vvms/fgncal_ch.c b/sr_vvms/fgncal_ch.c
deleted file mode 100644
index c638e07..0000000
--- a/sr_vvms/fgncal_ch.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "lv_val.h"
-#include "error.h"
-#include "op.h"
-#include "io.h"
-#include "fgncal.h"
-
-GBLREF lv_val           *active_lv;
-GBLREF sgmnt_addrs      *cs_addrs;
-GBLREF int		mumps_status;
-
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(fgncal_ch)
-{
-        int4            status;
-
-        START_CH(FALSE);
-        if (DUMP)
-        {
-                gtm_dump();
-                NEXTCH;
-        }
-        MDB_START;
-        if (active_lv)
-        {
-		if (!LV_IS_VAL_DEFINED(active_lv) && !LV_HAS_CHILD(active_lv))
-                        op_kill(active_lv);
-                active_lv = (lv_val *)0;
-        }
-        set_zstatus(NULL, sig, NULL, FALSE);
-        if (SEVERITY == SEVERE)
-                EXIT(SIGNAL);
-        fgncal_unwind();
-        mumps_status = SIGNAL;
-        mch->CHF_MCH_SAVR0 = mumps_status;
-        UNWIND(NULL, NULL);
-}
diff --git a/sr_vvms/fgncal_rundown.c b/sr_vvms/fgncal_rundown.c
deleted file mode 100644
index 814f1ef..0000000
--- a/sr_vvms/fgncal_rundown.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <psldef.h>
-#include <descrip.h>
-#include "gtm_inet.h"
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "iotimer.h"
-#include "repl_msg.h"	/* needed by gtmsource.h */
-#include "gtmsource.h"	/* needed for jnlpool_addrs and etc. */
-#include "repl_shm.h"	/* needed for DETACH_FROM_JNLPOOL macro */
-#include "op.h"
-#include <rtnhdr.h>
-#include "lv_val.h"	/* needed for "fgncal.h" */
-#include "fgncal.h"
-#include "gv_rundown.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "dpgbldir.h"
-
-GBLREF	gv_key			*gv_currkey;
-GBLREF	boolean_t	        pool_init;
-GBLREF	jnlpool_addrs	        jnlpool;
-GBLREF	jnlpool_ctl_ptr_t	jnlpool_ctl;
-GBLREF	uint4			dollar_tlevel;
-
-void fgncal_rundown(void)
-{
-	sys$cantim(0,0);	/* cancel all outstanding timers.  prevents unwelcome surprises */
-	if (gv_currkey != NULL)
-	{
-		gv_currkey->end = 0;	/* key no longer valid, since all databases are closed */
-		gv_currkey->base[0] = 0;
-	}
-	finish_active_jnl_qio();
-	DETACH_FROM_JNLPOOL(pool_init, jnlpool, jnlpool_ctl);
-	if (dollar_tlevel)
-		OP_TROLLBACK(0);
-	op_lkinit();
-	op_unlock();
-	op_zdeallocate(NO_M_TIMEOUT);
-	gv_rundown();	/* run down all databases */
-	gd_rundown();
-}
diff --git a/sr_vvms/fgncal_zlinit.c b/sr_vvms/fgncal_zlinit.c
deleted file mode 100644
index c6173b3..0000000
--- a/sr_vvms/fgncal_zlinit.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-void fgncal_zlinit (void)
-{
-	void	fgncal_rtn(), gtm$fgncall();
-	bool	dummy;
-
-	dummy = zlput_rname(CODE_ADDRESS(fgncal_rtn));
-	assert(TRUE == dummy);
-	dummy = zlput_rname(CODE_ADDRESS(gtm$fgncall));
-	assert(TRUE == dummy);
-}
diff --git a/sr_vvms/fgncalsp.h b/sr_vvms/fgncalsp.h
deleted file mode 100644
index 93d876a..0000000
--- a/sr_vvms/fgncalsp.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __FGNCALSP_H__
-#define __FGNCALSP_H__
-
-void fgncal_zlinit (void);
-
-#endif
diff --git a/sr_vvms/fid_from_sec.c b/sr_vvms/fid_from_sec.c
deleted file mode 100644
index 8ddb2d4..0000000
--- a/sr_vvms/fid_from_sec.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include <descrip.h>
-
-#define PREFIX_SIZE 4
-
-fid_from_sec(section,file)
-struct dsc$descriptor	*section;
-gds_file_id		*file;
-{
-	int		i, j, k, l = 0;
-	char		*cptr, *ctop;
-
-	/* See the routine GLOBAL_NAME for the encoding algorithm.  Keep these two routines in tandom */
-
-	for (cptr = ctop = section->dsc$a_pointer + section->dsc$w_length - 1; *cptr != '$'; cptr--)
-			;
-	file->dvi[0] = (cptr - section->dsc$a_pointer) - PREFIX_SIZE;
-	memcpy (&file->dvi[1], (char *)section->dsc$a_pointer + 4, file->dvi[0]);
-	for ( i = (SIZEOF(file->fid) / SIZEOF(file->fid[0])) - 1; i >= 0 ; i--)
-	{	for ( j = 0; j < SIZEOF(file->fid[0]) * 2 ; j++, ctop--)
-		{	k = *ctop - (*ctop > '9' ? 55 : 48);
-			l = (l << 4) + k;
-		}
-		file->fid[i] = l;
-	}
-	return;
-}
diff --git a/sr_vvms/fid_from_sec.h b/sr_vvms/fid_from_sec.h
deleted file mode 100644
index 084140e..0000000
--- a/sr_vvms/fid_from_sec.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef FID_FROM_SEC_INCLUDED
-#define FID_FROM_SEC_INCLUDED
-
-int fid_from_sec(struct dsc$descriptor *section, gds_file_id *file);		/***type int added***/
-
-#endif /* FID_FROM_SEC_INCLUDED */
diff --git a/sr_vvms/file_head_read.c b/sr_vvms/file_head_read.c
deleted file mode 100644
index c87fade..0000000
--- a/sr_vvms/file_head_read.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <descrip.h>
-#include <rms.h>
-#include <climsgdef.h>
-#include <iodef.h>
-#include <efndef.h>
-#include <ssdef.h>
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gtmio.h"
-#include "gtmmsg.h"
-#include "iosb_disk.h"
-#include "iosp.h"
-/*
- * This is a plain way to read file header.
- * User needs to take care of concurrency issue etc.
- * Parameters :
- *	fn : full name of a database file.
- *	header: Pointer to database file header structure (may not be in shared memory)
- *	len: size of header (may be just SGMNT_HDR_LEN or SIZEOF_FILE_HDR_MAX)
- */
-boolean_t file_head_read(char *fn, sgmnt_data_ptr_t header, int4 len)
-{
-	int			header_size;
-	int4			status1;
-	uint4			status2;
-	io_status_block_disk	iosb;
-	struct FAB  		fab;
-	struct XABFHC		xabfhc;
-
-	error_def(ERR_DBOPNERR);
-	error_def(ERR_DBFILOPERR);
-	error_def(ERR_DBNOTGDS);
-
-	header_size = SIZEOF(sgmnt_data);
-	fab = cc$rms_fab;
-	fab.fab$l_fna = fn;
-	fab.fab$b_fns = strlen(fn);
-	fab.fab$b_fac = FAB$M_GET;
-	fab.fab$l_fop = FAB$M_UFO;
-	fab.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-	xabfhc = cc$rms_xabfhc;
-	fab.fab$l_xab = &xabfhc;
-	status1 = sys$open(&fab);
-	if ((status1 & 1) == 0)
-	{
- 		gtm_putmsg(VARLSTCNT(6) ERR_DBOPNERR, 2, LEN_AND_STR(fn), status1, fab.fab$l_stv);
-		return FALSE;
-	}
-	status2 = SS_NORMAL;
-	DO_FILE_READ(fab.fab$l_stv, 0, header, header_size, status1, status2);
-	if (!(status1 & 1))
-	{
-		sys$dassgn(fab.fab$l_stv);
-		gtm_putmsg(VARLSTCNT(5) ERR_DBFILOPERR, 2, LEN_AND_STR(fn), status1);
-		return FALSE;
-	}
-	if (memcmp(header->label, GDS_LABEL, GDS_LABEL_SZ - 1))
-	{
-		sys$dassgn(fab.fab$l_stv);
-		gtm_putmsg(VARLSTCNT(4) ERR_DBNOTGDS, 2, LEN_AND_STR(fn));
-		return FALSE;
-	}
-	assert(MASTER_MAP_SIZE_MAX >= MASTER_MAP_SIZE(header));
-	assert(SGMNT_HDR_LEN == len || SIZEOF_FILE_HDR(header) <= len);
-	if (SIZEOF_FILE_HDR(header) <= len)
-	{
-		status2 = SS_NORMAL;
-		DO_FILE_READ(fab.fab$l_stv, ROUND_UP(SGMNT_HDR_LEN + 1, DISK_BLOCK_SIZE), MM_ADDR(header),
-				MASTER_MAP_SIZE(header), status1, status2);
-		if (!(status1 & 1))
-		{
-			sys$dassgn(fab.fab$l_stv);
-			gtm_putmsg(VARLSTCNT(5) ERR_DBFILOPERR, 2, LEN_AND_STR(fn), status1);
-			return FALSE;
-		}
-	}
-	sys$dassgn(fab.fab$l_stv);	/* use sys$dassgn (not sys$close) since FAB$M_UFO was specified in fab$l_fop in open */
-	return TRUE;
-}
diff --git a/sr_vvms/file_head_write.c b/sr_vvms/file_head_write.c
deleted file mode 100644
index ff17f14..0000000
--- a/sr_vvms/file_head_write.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <descrip.h>
-#include <rms.h>
-#include <climsgdef.h>
-#include <iodef.h>
-#include <efndef.h>
-#include <ssdef.h>
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gtmio.h"
-#include "gtmmsg.h"
-#include "iosb_disk.h"
-#include "iosp.h"
-
-error_def(ERR_DBFILOPERR);
-error_def(ERR_DBNOTGDS);
-error_def(ERR_DBOPNERR);
-
-/*
- * This is a plain way to write file header.
- * User needs to take care of concurrency issue etc.
- * Parameters :
- *	fn : full name of a database file.
- *	header: Pointer to database file header structure (may not be in shared memory)
- *	len: length of header to write (should be either SGMNT_HDR_LEN or SIZEOF_FILE_HDR(header))
- */
-boolean_t file_head_write(char *fn, sgmnt_data_ptr_t header, int4 len)
-{
-	int			header_size;
-	int4			status1;
-	uint4			status2;
-	io_status_block_disk	iosb;
-	struct FAB  		fab;
-	struct XABFHC		xabfhc;
-
-	header_size = SIZEOF_FILE_HDR(header);
-	assert(SGMNT_HDR_LEN == len || header_size == len);
-	fab = cc$rms_fab;
-	fab.fab$l_fna = fn;
-	fab.fab$b_fns = strlen(fn);
-	fab.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-	fab.fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_UPD ;
-	fab.fab$l_fop = FAB$M_UFO;
-	xabfhc = cc$rms_xabfhc;
-	fab.fab$l_xab = &xabfhc;
-	status1 = sys$open(&fab);
-	if ((status1 & 1) == 0)
-	{
- 		gtm_putmsg(VARLSTCNT(6) ERR_DBOPNERR, 2, LEN_AND_STR(fn), status1, fab.fab$l_stv);
-		return FALSE;
-	}
-	status2 = SS_NORMAL;
-	DB_DO_FILE_WRITE(fab.fab$l_stv, 0, header, len, status1, status2);
-	if (!(status1 & 1))
-	{
-		sys$dassgn(fab.fab$l_stv);	/* use sys$dassgn (not sys$close) since FAB$M_UFO was specified
-						   in fab$l_fop in open */
-		gtm_putmsg(VARLSTCNT(5) ERR_DBFILOPERR, 2, LEN_AND_STR(fn), status1);
-		return FALSE;
-	}
-	sys$dassgn(fab.fab$l_stv);
-	return TRUE;
-}
diff --git a/sr_vvms/filestruct.h b/sr_vvms/filestruct.h
deleted file mode 100644
index 4c2e3e1..0000000
--- a/sr_vvms/filestruct.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* filestruct.h */
-
-#include "gdsdbver.h"
-
-#define GDS_LABEL_GENERIC 	"GDSDYNSEG"
-#define GDS_LABEL 		GDS_LABEL_GENERIC GDS_CURR	/* This string must be of length GDS_LABEL_SZ */
-#define GDS_RPL_LABEL 		"GDSRPLUNX03" 			/* This string must be of length GDS_LABEL_SZ */
-
-typedef struct vms_gds_info_struct	/* BG and MM databases */
-{
-	struct FAB	*fab;
-	struct NAM	*nam;
-	struct XABFHC	*xabfhc;
-	sgmnt_addrs	s_addrs;
-	gds_file_id	file_id;
-	vms_lock_sb	file_cntl_lsb;	/* replaces gd_region lsb */
-	vms_lock_sb	cx_cntl_lsb;	/* replaces gd_region ref_lsb */
-	struct XABPRO	*xabpro;
-} vms_gds_info;
-
-typedef struct vms_gd_info_struct	/* Global Directories */
-{
-	struct FAB	*fab;
-	struct NAM	*nam;
-} vms_gd_info;
-
-typedef struct vms_file_info_struct	/* sequential files used by MUPIP */
-{
-	struct FAB	*fab;
-	struct NAM	*nam;
-	struct RAB	*rab;
-} vms_file_info;
-
-#define FILE_INFO(reg)	((vms_gds_info *)(reg)->dyn.addr->file_cntl->file_info)
-#define FILE_ID(reg)	((vms_gds_info *)(reg)->dyn.addr->file_cntl->file_info)->file_id
-#define GDS_INFO vms_gds_info
-#define FI_FN(file_info)	((vms_file_info *)file_info)->fab->fab$b_fns
-#define FI_FN_LEN(file_info)	((vms_file_info *)file_info)->fab->fab$l_fna
-
-#define REG_EQUAL(fileinfo,reg) (memcmp(&(fileinfo)->file_id, &FILE_INFO(reg)->file_id, SIZEOF(gds_file_id)) == 0)
-#define WINDOW_ALL 255
-#define WRT_STRT_PNDNG (unsigned short)65534 /* the code assumes this is non-zero, even,
-					and that VMS never uses its value for iosb.cond */
diff --git a/sr_vvms/finish_active_jnl_qio.c b/sr_vvms/finish_active_jnl_qio.c
deleted file mode 100644
index b03b049..0000000
--- a/sr_vvms/finish_active_jnl_qio.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "send_msg.h"
-#include "sleep_cnt.h"
-#include "dpgbldir.h"
-#include "wcs_sleep.h"
-
-void	finish_active_jnl_qio(void)
-{
-	gd_addr			*addr_ptr;
-	gd_region		*reg, *r_top;
-	int4			lcnt;
-	sgmnt_addrs		*csa;
-	jnl_private_control	*jpc;
-
-	error_def(ERR_JNLFLUSH);
-
-	for (addr_ptr = get_next_gdr(NULL);  addr_ptr;  addr_ptr = get_next_gdr(addr_ptr))
-	{
-		for (reg = addr_ptr->regions, r_top = reg + addr_ptr->n_regions;  reg < r_top;  reg++)
-		{
-			if (reg->open && !reg->was_open && (NULL != (csa = &FILE_INFO(reg)->s_addrs)) && (NULL != csa->hdr)
-		        	&& (JNL_ENABLED(csa->hdr) && (NULL != (jpc = csa->jnl)) && (NULL != jpc->jnl_buff)))
-			{
-				for (lcnt = 1;  (FALSE != jpc->qio_active) && (0 == jpc->jnl_buff->iosb.cond);  lcnt++)
-				{
-					if (lcnt <= JNL_MAX_FLUSH_TRIES)
-		                        	wcs_sleep(lcnt);
-					else
-			                {
-						jnl_send_oper(jpc, ERR_JNLFLUSH);
-					        assert(FALSE);
-						break;
-					}
-				}
-			}
-		}
-	}
-}
diff --git a/sr_vvms/fix_pages.c b/sr_vvms/fix_pages.c
deleted file mode 100644
index a9428e3..0000000
--- a/sr_vvms/fix_pages.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <prtdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-
-#include "stringpool.h"
-#include "fix_pages.h"
-
-#define CHUNK_SIZE	16384	/* should be the largest OS_PAGE_SIZE, or a multiple thereof, and not an unfair strain on stp */
-
-GBLREF spdesc		stringpool;
-OS_PAGE_SIZE_DECLARE
-
-void fix_pages(unsigned char *inbot, unsigned char *intop)
-{
-	register unsigned char *bot, *top;
-	unsigned char	*buff, *range[2];
-	uint4		chunk, size, status;
-
-	bot = ((uint4)inbot) & ~(OS_PAGE_SIZE - 1);
-	top = ((uint4)intop) & ~(OS_PAGE_SIZE - 1);
-  	top += OS_PAGE_SIZE;
-	range[0] = bot;
-	range[1] = top - 1;
-	status = sys$setprt(range, NULL, (uint4)PSL$C_USER, (uint4)PRT$C_UW, NULL);
-	if (status != SS$_NORMAL)	/* can't update shared readonly memory */
-	{
-		chunk = top - bot;	/* already a multiple of OS_PAGE_SIZE due to rounding of bot and top */
-		chunk = chunk < CHUNK_SIZE ? chunk : CHUNK_SIZE;
-		ENSURE_STP_FREE_SPACE(chunk);		/* ensure temp space in the stringpool */
-		buff = stringpool.free;
-		assert(buff >= stringpool.base);
-		assert(buff <= stringpool.top);
-		chunk = (stringpool.top - buff) & ~(OS_PAGE_SIZE - 1);	/* use as much as there is */
-		for (;  bot < top;  bot += size)
-		{
-			size = top - bot;
-			if (size > chunk)
-				size = chunk;
-			assert(0 == (size & (OS_PAGE_SIZE - 1)));
-			memcpy(buff, bot, size);			/* save the content of a chunk */
-			range[0] = bot;
-			range[1] = bot + size - 1;
-			status = sys$cretva(range, 0, PSL$C_USER);	/* replace an address range with empty pages */
-			if (status != SS$_NORMAL)
-			{
-				rts_error(VARLSTCNT(1) status);
-				break;					/* hygenic; should never be reached */
-			}
-			memcpy(bot, buff, size);			/* restore content to the new overlay */
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/gbldirnam.h b/sr_vvms/gbldirnam.h
deleted file mode 100644
index 1c9d716..0000000
--- a/sr_vvms/gbldirnam.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define GDE_LABEL_SIZE 13
-#define GDE_LABEL_NUM 1
-/* Note, GDE_LABEL_LITERAL must be maintained in gdeinit.m if changes are made here */
-#define GDE_LABEL_LITERAL "GTCGBLDIR010"
diff --git a/sr_vvms/gde.hlp b/sr_vvms/gde.hlp
deleted file mode 100644
index 959967c..0000000
--- a/sr_vvms/gde.hlp
+++ /dev/null
@@ -1,887 +0,0 @@
-
-1 Overview
-  GDE Overview
-   The  GT.M  Global  Directory  Editor,  GDE,  is  a  tool   for   creating,
-   examining, and modifying Global  Directories  (GDs).  A  Global  Directory
-   is a file that identifies:
-
-   o  What global variables go to what database files
-
-   o  The size limits for names and values of global variables
-
-   o  Other database characteristics
-
-   o  If and what type of journaling should take place
-
-   All MUMPS programs that use  the  same  Global  Directory  share  all  the
-   same global variables, unless the  Global  Directory  uses  logical  names
-   for  which  users  have  varying  definitions.  The  local  variables  are
-   accessible only among programs executed within a single process scope.
-
-
-2 Functions
-  GDE Functions
-   The main functions of the Global Directory Editor are to:
-
-   o   Define the mapping of global variables to database files
-
-   o   Define the  character  limitations  of  global  variable  names  and
-       records
-
-   o   Provide  the  MUMPS  Peripheral  Interchange  Program  (MUPIP)  with
-       characteristics  (e.g.,  /ALLOCATION  size)  used  in  creating  and
-       extending a database file
-
-   o   Define whether a database file should be journaled and how
-
-   o   Define the /ACCESS_METHOD used to  access  the  database  files  and
-       other database characteristics
-
-2 Mapping
-  Mapping
-   Defining  a  "map,"  i.e.,  where  GT.M  stores   a   global   variable,
-   requires defining, not only the NAME of  the  global  variable  and  the
-   database  FILE  in  the  Global  Directory,  but  also  the  REGION  and
-   SEGMENT.
-
-   A REGION is a logical structure that  holds  information  such  as  key-
-   and  record-size  about  a  portion  of  a  database.   GT.M   and   the
-   operating system handle data stored in  a  REGION  together  by  storing
-   it in the same place or  places,  backing  it  up  as  a  unit,  etc.  A
-   REGION must map to a SEGMENT.
-
-   A  SEGMENT  defines  additional  database  storage  characteristics  not
-   required for RMS files. A SEGMENT  must  map  to  a  FILE.  The  SEGMENT
-   exists   primarily   for   future   design   considerations,   when    a
-   one-to-one  correspondence  between  the  REGION  and  SEGMENT  will  no
-   longer be required.
-
-   The  connection  in  the  map  between  a  name  and  a  file  is   very
-   important  and  is  used  by  the  run-time   system   and   most   GT.M
-   utilities. Specifying  a  map  requires  entering  (a)  NAME(S)  with  a
-   connection to a REGION,  a  REGION  with  a  connection  to  a  SEGMENT,
-   and a SEGMENT with  a  connection  to  a  database  file.  The  commands
-   may be issued in any order, but the final  result  must  be  a  complete
-   logical path from name to file.
-
-   NAME(s) ---> REGION ---> SEGMENT ---> FILE
-
-2 Default_GD
-  Creating a Default Global Directory
-   The  Global  Directory   Editor   creates   a   quick   default   Global
-   Directory  for  purposes  such  as  development  and  testing  work.   A
-   default Global Directory also  serves  as  a  starting  point  or  shell
-   for a custom Global Directory.
-
-   To  create  a   default   Global   Directory   structure,   invoke   and
-   immediately EXIT GDE. GDE creates a  Global  Directory  mapping  of  all
-   NAMEs to  the  REGION  $DEFAULT,  the  default  REGION  to  the  SEGMENT
-   $DEFAULT and the default SEGMENT to the default file-specification
-   MUMPS with the default file extension of .DAT.
-
-2 Custom_GD
-  Creating a Custom Global Directory
-   When a default Global Directory does  not  meet  your  needs,  you  need
-   to customize a  Global  Directory.  Usually  you  customize  the  Global
-   Directory  when  you  define  your  production   database   file.   This
-   enables you to optimize the sharing and location of your data.
-
-   To  create  a  custom  Global  Directory,  invoke  GDE  and  issue   the
-   commands necessary to build  the  desired  Global  Directory.  For  more
-   information  about  mapping,  refer  to   the   "How   to   Map   Global
-   Variables" section.
-
-2 GTM$GBLDIR
- Defining the GTM$GBLDIR Logical Name
-   GT.M identifies  the  current  Global  Directory  by  the  logical  name
-   GTM$GBLDIR. GDE, MUPIP, LKE,  DSE  and  the  GT.M  run-time  system  use
-   this  logical  name  to  identify  the   file   used   as   the   Global
-   Directory. The run-time system normally  uses  this  logical  name,  but
-   may  also  access  a  Global  Directory  by  setting  $ZGBLDIR  or   the
-   extended global reference ([]) syntax.
-
-   If you  maintain  multiple  Global  Directories,  define  GTM$GBLDIR  to
-   the Global Directory you currently  want  to  use.  The  system  manager
-   normally defines GTM$GBLDIR in a GROUP  or  SYSTEM  table.  The  default
-   installation  procedure  creates  a  startup  command  procedure,  which
-   assigns  GTM$GBLDIR  the  name  MUMPS.GLD.  You  may  want   to   define
-   GTM$GBLDIR in your LOGIN.COM file.
-
-   Example
-
-   $ DEFINE GTM$GBLDIR PROD.GLD
-
-   For more information on  defining  logical  names  in  LOGIN.COM,  refer
-   to the VAX/VMS Guide to Using VMS.
-
-1 Command_syntax
-  Command Syntax
-   The general format for GDE commands is:
-
-   command        [/object-type]        [object-name]         [/qualifier...]
-   ex:      /NAME          Name-space    /region-qualifier...
-            /REGION        Region-name   /region-qualifier...
-            /SEGMENT       Segment-name  /segment-qualifier...
-
-   where:
-
-   Object-type      Indicates whether the  command  operates  on  a  /N[AME],
-                    /R[EGION]  or /S[EGMENT].
-
-   Object-name      Specifies  the  name  of  a  N[AME]  space,  R[EGION]  or
-                    S[EGMENT]. Object-names of different types may have the
-                    same name.
-
-   Name-space       Specifies a name or name prefix that maps to a REGION.
-                    Names may include the wildcard operator * as a suffix.
-
-   Region-name      Specifies a REGION name.
-
-   Segment-name     Specifies a SEGMENT name.
-
-   Qualifier        Indicates a command or object qualifier.
-
-   The  format  for  each  command  specifies  required  qualifiers  for  the
-   command.
-
-   The @,  EXIT,  HELP,  LOG,  QUIT  and  SPAWN  commands  do  not  use  this
-   general  format.  For  the  applicable  format,  refer  to   the   section
-   explaining each of these commands.
-
-   Comments on the command line may  be  delimited  by  an  exclamation  mark
-   (!). An exclamation  mark  not  enclosed  in  quotes  (")  causes  GDE  to
-   ignore the rest of the input line.
-
-1 at-sign
-  @
-   The @ command executes a GDE command  file.  Use  the  @  command  to  run
-   stored GDE command sequences from an interactive session.
-
-   The format of the @ command is:
-
-   @ file-specification
-
-   The  file-specification  specifies  the  command  file  to  execute.   GDE
-   provides   the   default   file   extension   ".COM"   in   creating   the
-   file-specification.
-
-   GDE executes each line of the  command  file  as  if  the  line  had  been
-   typed at the terminal.
-
-   Example
-
-   GDE> @standard
-
-   This command transfers the  GDE  input  to  STANDARD.COM  in  the  current
-   default  directory.  STANDARD.COM  should  contain   GDE   commands;   any
-   comments should start with an exclamation mark (!).
-
-1 ADD
-  A[DD]
-   The ADD command inserts a new NAME, REGION, or  SEGMENT  into  the  Global
-   Directory.
-
-   The format of the ADD command is:
-
-   A[DD]/N[AME]               name-space                /R[EGION]=region-name
-   A[DD]/R[EGION]   region-name   /D[YNAMIC]=segment-name   [/region-qual...]
-   A[DD]/S[EGMENT] segment-name /F[ILE_NAME]=file-spec [/segment-qual...]
-
-   The  ADD  command   requires   specification   of   an   object-type   and
-   object-name. GDE supplies default values for qualifiers not supplied.
-
-   Name-spaces are case-sensitive while other objects are not.
-
-1 CHANGE
-  C[HANGE]
-   The CHANGE command  alters  the  NAME  to  REGION  or  REGION  to  SEGMENT
-   mapping and the environment for a REGION or SEGMENT.
-
-   The format of the CHANGE command is:
-
-   C[HANGE]/N[AME]              name-space               /R[EGION]=new-region
-   C[HANGE]/R[EGION]            region-name            [/region-qualifier...]
-   C[HANGE]/S[EGMENT] segment-name [/segment-qualifier...]
-
-   The  CHANGE  command  requires  specification  of   an   object-type   and
-   object-name.
-
-   Changes to  the  database  environment  characteristics  take  effect  the
-   next time you create a new file with the  MUPIP  CREATE  command.  Mapping
-   changes  take  effect  for  subsequent  image  activation,   for   example
-   following the next RUN or MUMPS/DIRECT command.
-
-1 DELETE
-  D[ELETE]
-   The DELETE command removes a NAME, REGION,  or  SEGMENT  from  the  Global
-   Directory. The DELETE command does not delete the  actual  data  from  the
-   database but can make the data inaccessible  to  MUMPS  images  using  the
-   resulting directory.
-
-   The format of the DELETE command is:
-
-   D[ELETE]/N[AME] name-space
-   D[ELETE]/R[EGION] region-name
-   D[ELETE]/S[EGMENT] segment-name
-
-   The  DELETE  command  requires  specification  of   an   object-type   and
-   object-name.
-
-   Deleting a NAME removes the NAME to  REGION  mapping.  Deleting  a  REGION
-   unmaps all NAMES mapped to the  REGION.  Deleting  a  SEGMENT  unmaps  the
-   REGION mapped to the SEGMENT.
-
-   Map the  deleted  names  to  another  REGION  or  the  deleted  REGION  to
-   another SEGMENT using the CHANGE command.
-   The default name-space (*) can not be deleted.
-
-1 EXIT
-  E[XIT]
-   The EXIT command writes all  changes  made  in  the  current  GDE  editing
-   session to the Global Directory.
-
-   The format of the EXIT command is:
-
-   E[XIT]
-
-   GDE performs a full  verification  test  (VERIFY)  on  the  data.  If  the
-   verification succeeds, GDE writes the new Global  Directory  to  disk  and
-   issues a verification message.
-
-   If the verification fails, GDE displays  a  listing  of  all  unverifiable
-   mappings and  waits  for  corrections.  Make  appropriate  corrections  or
-   leave the Global Directory  in  its  original,  unedited  state  by  using
-   the QUIT command.
-
-   If you have not made any changes to the Global  Directory,  GDE  does  not
-   create a new Global Directory.
-
-1 HELP
-  H[ELP]
-   The HELP  command  explains  the  GDE  commands.  The  HELP  command  uses
-   similar conventions to the VAX/VMS help facility.
-
-   The format of the HELP command is:
-
-   HE[LP] [keyword...]
-
-   Specify the GDE command for  which  you  want  information  at  the  Topic
-   prompt. The help facility also provides an "Overview."
-
-   Use <RETURN> or <CTRL Z> to return to the GDE prompt.
-
-1 LOCKS
-  LOC[KS]
-   The LOCKS command specifies the REGION  into  which  GT.M  maps  locks  on
-   names not starting with ^.  GDE  maps  locks  on  global  names  (starting
-   with ^) to the region of the database specified for that name.
-
-   The format of the LOCKS command is:
-
-   LOC[KS] /R[EGION]=region-name
-
-   The LOCK /REGION= qualifier allows specification of  a  region  for  local
-   locks.  By  default,  GDE  maps  local  locks  to   the   default   region
-   $DEFAULT.
-
-   Example
-
-   GDE> LOCK/REGION=MAIN
-
-   This command maps all locks  on  resource  names  that  don't  start  with
-   "^" to region MAIN.
-
-1 LOG
-  LOG
-   The LOG command creates a log  file  of  all  GDE  commands  and  displays
-   for  the  current  editing  session.  Because   the   system   places   an
-   exclamation point (i.e., the comment  symbol)  before  all  display  lines
-   in the log, a log can be used with the @ sign as a command procedure.
-
-   The format of the LOG command is:
-
-   LOG
-   LOG /ON[=file-spec]
-   LOG /OF[F]
-
-   The LOG command without a qualifier reports  the  current  status  of  GDE
-   logging. The LOG command displays a message  showing  whether  logging  is
-   in effect and the specification of  the  current  log  file  for  the  GDE
-   session.
-
-   The log facility  can  be  turned  on  and  off  using  the  /ON  or  /OFF
-   qualifiers any time during a GDE session.  However,  GDE  closes  the  log
-   files only when the GDE session ends.
-
-   The /ON qualifier  has  an  optional  argument  of  a  file-specification,
-   which  must  identify  a  legal  RMS  file.  GDE  uses  the  default  file
-   extension ".LOG". If LOG  /ON  has  no  file-specification  argument,  GDE
-   uses the previous log file for the editing session. If  no  log  file  has
-   previously been specified  during  this  editing  session,  GDE  uses  the
-   default log file GDELOG.LOG.
-
-1 QUIT
-  Q[UIT]
-   The QUIT command ends the  current  editing  session  without  saving  any
-   changes to the Global Directory. GDE does not  create  an  updated  Global
-   Directory file.
-
-   The format of the QUIT command is:
-
-   Q[UIT]
-
-   If the session  made  changes  to  the  Global  Directory,  GDE  issues  a
-   message warning that the Global Directory has not been updated.
-
-1 RENAME
-  R[ENAME]
-   The RENAME command allows changes of a NAME,  the  name  of  a  REGION  or
-   the name of a SEGMENT.
-
-   The format of the RENAME command is:
-
-   R[ENAME]/N[AME] old-name new-name
-   R[ENAME]/R[EGION] old-reg-name new-reg-name
-   R[ENAME]/S[EGMENT] old-seg-name new-seg-name
-
-   The RENAME command  requires  specification  of  an  object-type  and  two
-   object-names.
-
-   When renaming a REGION,  GDE  transfers  all  NAME  mappings  to  the  new
-   REGION. When renaming a SEGMENT, GDE  transfers  the  REGION  mappings  to
-   the new SEGMENT.
-
-1 SETGD
-  SE[TGD]
-   The SETGD command closes out edits  on  one  Global  Directory  and  opens
-   edits on another.
-
-   The format of the SETGD command is:
-
-   SE[TGD] /F[ILE]=file-specification [/Q[UIT]]
-
-   The  /FILE=file-specification  qualifier   identifies   the   new   Global
-   Directory. When you provide a partial  file-specification,  GDE  uses  the
-   current default directory and defaults the type to .GLD.
-
-   The /QUIT qualifier specifies that any changes  that  have  been  made  to
-   the current Global Directory are  not  written,  i.e.,  are  lost,  during
-   the change of Global Directory.
-
-   A SETGD changes the Global Directory  on  which  the  GDE  edits  act.  If
-   the  current  Global  Directory  has  not  been  modified  or  the   /QUIT
-   qualifier appears in the  command,  the  change  simply  occurs.  However,
-   if the current Global  Directory  has  been  modified,  GDE  verifies  the
-   Global Directory, and if  the  verification  is  successful,  writes  that
-   Global Directory.  If  the  verification  is  not  successful,  the  SETGD
-   fails.
-
-1 SHOW
-  SH[OW]
-   The  SHOW  command  displays  information   about   NAMEs,   REGIONs   and
-   SEGMENTs.
-
-   The format of the SHOW command is:
-
-   SH[OW] /N[AME] [name-space]
-   SH[OW] /R[EGION] [region-name]
-   SH[OW] /S[EGMENT] [segment-name]
-   SH[OW] /M[AP] [R[EGION]=region-name]
-   SH[OW] /T[EMPLATE]
-   SH[OW] /A[LL]
-
-   The object-type  is  optional.  /MAP,  /TEMPLATE,  and  /ALL  are  special
-   qualifiers used as follows:
-
-   o  /MAP - displays the  mapping  of  all  NAMES,  REGIONs,  SEGMENTs,  and
-      files
-
-   o  /TEMPLATE - displays the current REGION and SEGMENT templates
-
-   o  /ALL - displays all templates, the  map,  and  information  about  each
-      defined NAME, REGION, and SEGMENT
-
-   By default, SHOW displays /ALL.
-
-
-1 SPAWN
-  SP[AWN]
-   The SPAWN command creates a subprocess for  access  to  VMS  CLI  (usually
-   DCL) without terminating  the  current  GDE  environment.  Use  the  SPAWN
-   command to suspend a session and issue  DCL  commands  such  as  DIRECTORY
-   or  SHOW  LOGICAL.  The  SPAWN  command  spawns  a  subprocess   with   an
-   optional command string. If SPAWN has no  command  string  parameter,  the
-   GDE command leaves the  terminal  at  the  prompt  for  the  CLI  (usually
-   DCL) of the spawned process.
-
-   The format of the SPAWN command is:
-
-   SP[AWN] [DCL command]
-
-   Example
-
-   GDE> SPAWN "DIR *.DAT"
-
-   This command  invokes  a  VMS  directory  listing  of  all  files  in  the
-   current default directory with a .DAT extension.
-
-1 TEMPLATE
-  T[EMPLATE]
-   The TEMPLATE command maintains a  set  of  REGION  and  SEGMENT  qualifier
-   values for use as templates when ADDing  regions  and  segments.  When  an
-   ADD  command  omits  qualifiers,  GDE  uses   the   template   values   as
-   defaults. GDE maintains a separate set of  SEGMENT  qualifier  values  for
-   each ACCESS_METHOD. When GDE  modifies  the  ACCESS_METHOD,  it  activates
-   the appropriate set of  TEMPLATEs  and  sets  all  unspecified  qualifiers
-   to the template defaults for the  new  ACCESS_METHOD.  Use  the  GDE  SHOW
-   command to display qualifier values for all ACCESS_METHODs.
-
-   The format of the TEMPLATE command is:
-
-   T[EMPLATE]/R[EGION] [/region-qualifier...]
-   T[EMPLATE]/S[EGMENT] [/segment-qualifier...]
-
-   The TEMPLATE command requires specification of an object-type.
-
-1 VERIFY
-  V[ERIFY]
-   The VERIFY command checks the  NAME  to  REGION  mappings  to  insure  all
-   NAMES map to a  REGION.  The  VERIFY  command  checks  REGION  to  SEGMENT
-   mappings to insure each REGION maps to a SEGMENT,  each  SEGMENT  maps  to
-   only one REGION and the SEGMENT maps to an  RMS  file.  The  EXIT  command
-   implicitly performs a VERIFY /ALL.
-
-   The format of the VERIFY command is:
-
-   V[ERIFY]
-   V[ERIFY] /N[AME] [name-space]
-   V[ERIFY] /R[EGION] [region-name]
-   V[ERIFY] /S[EGMENT] [segment-name]
-   V[ERIFY] /M[AP]
-   V[ERIFY] /T[EMPLATE]
-   V[ERIFY] /A[LL]
-
-   The object-type  is  optional.  /MAP,  /TEMPLATE,  and  /ALL  are  special
-   qualifiers used as follows:
-
-   o  /MAP - checks that all NAMES map to a REGION,  all  REGIONs  map  to  a
-      SEGMENT, and all SEGMENTs map to a FILE
-
-   o  /TEMPLATE - checks that all  templates  currently  are  consistent  and
-      useable
-
-   o  /ALL - checks all map and template data
-
-   VERIFY with no qualifier, VERIFY /MAP  and  VERIFY  /ALL  each  check  all
-   current information.
-
-1 Qualifiers
-  GDE Command Qualifiers
-   The  /NAME,  /REGION,  and  /SEGMENT  qualifiers  each   have   additional
-   qualifiers  used  to  further  define  or  specify  characteristics  of  a
-   NAME,  REGION,  or  SEGMENT.  This  section  discusses  these   additional
-   qualifiers.
-
-2 Name_Qualifiers
-  Name Qualifiers
-   The only /NAME qualifier, used with  the  commands  ADD  or  CHANGE,  is
-   the /REGION qualifier.
-
-3 /REGION
-  /R[EGION]=region-name
-   Specifies the name of a REGION.
-
-   The maximum length is 16 alphanumeric characters.
-
-   Example
-
-   GDE> add/Name a*/Region=areg
-
-   This command creates the name "a," if  it  does  not  exist  and  maps
-   it to the region "areg."
-
-
-2 Region_Qualifiers
-  Region Qualifiers
-   The following /REGION qualifiers  can  be  used  with  the  ADD,  CHANGE
-   or TEMPLATE commands.
-
-3 /DYNAMIC_SEGMENT
-  /D[YNAMIC_SEGMENT]=segment-name
-   Specifies  the  name  of  a  dynamic  SEGMENT.   A   dynamic   segment
-   allows read-write access.
-
-   The minimum length is 1 alpha character.
-
-   The maximum length is 16 alphanumeric characters.
-
-3 /KEY_SIZE
-  /K[EY_SIZE]=size in bytes
-   Specifies  the  maximum  size  of  keys,  in  bytes,  which   can   be
-   stored in the region.
-
-   CAUTION: The  key  size  must  be  less  than  the  record  size.  GDE
-   rejects the command if  the  key  size  is  greater  than  the  record
-   size.
-
-   The minimum key size is 3 bytes.
-
-   The maximum key size is 255 bytes.
-
-   By default, GDE uses a key size of 64 bytes.
-
-3 /RECORD_SIZE
-  /R[ECORD_SIZE]=size in bytes
-   Specifies the maximum record size,  in  bytes,  which  can  be  stored
-   in the region.
-
-   CAUTION: The  key  size  must  be  less  than  the  record  size.  GDE
-   rejects the command if the key size exceeds the record size.
-
-   The record size  must  be  less  than  half  the  block  size  of  the
-   segment to which the region maps. If  the  record  size  is  not  less
-   than  half  the  block  size  minus  7  bytes,  GDE  issues  an  error
-   message. To VERIFY or EXIT, you must change the record size.
-
-   The minimum record size is 7 bytes.
-
-   The maximum record size is 32,508 bytes.
-
-   By default, GDE uses a record size of 256 bytes.
-
-3 /NULL_SUBSCRIPTS
-  /[NO]N[ULL_SUBSCRIPTS]
-   Indicates   whether   GT.M   allows   null   subscripts   for   global
-   variables  stored  in  the  region,   i.e.,   whether   GT.M   permits
-   reference such as ^aaa("",1).
-
-   By default, REGIONS have /NONULL_SUBSCRIPTS.
-
-3 /JOURNAL
-  /[NO]J[OURNAL][=journal-option-list]
-   Specifies whether the database  file  allows  journaling  and,  if  it
-   does, establishes characteristics for the journal file.
-
-   /NOJOURNAL  specifies  that  the  database   file   does   not   allow
-   journaling. /NOJOURNAL does not accept an argument assignment.
-
-   /JOURNAL  specifies  that  journaling  is  allowed.   /JOURNAL   takes
-   one   or   more    arguments    in    a    journal-option-list.    The
-   journal-option-list  contains  keywords  separated  with  commas   (,)
-   enclosed  in  parentheses  ().  When  the  list  contains   only   one
-   keyword, the parentheses are optional.
-
-   For  more  information   about   journaling,   refer   to   the   GT.M
-   Journaling  chapter  of  the  GT.M   Administration   and   Operations
-   Guide.
-
-4 BEFORE_IMAGE
-  [NO]BE[FORE_IMAGE]
-   [NO]BEFORE_IMAGE  controls  whether  the  journal   should   capture
-   before  images  of  information  that  an   update   is   about   to
-   modify.
-
-   A  BEFORE_IMAGE  journal  permits  the  possibility  of   performing
-   "roll-back"   recovery   (i.e.,   Backward    Recovery)    of    the
-   associated  database  file.  BEFORE_IMAGE  increases  the  load   on
-   I/O and CPU resources and therefore may affect performance.
-
-4 FILE_NAME
-  F[ILE_NAME]=file-specification
-   FILE_NAME=file-specification   specifies    the    name    of    the
-   journal file.
-
-   Journal file-specifications are limited to 255 characters.
-
-   By  default,   GDE   derives   the   file-specification   from   the
-   database file name.
-
-   By default, GDE uses a journal file type of .MJL.
-
-4 ALLOCATION
-  A[LLOCATION]=blocks
-   ALLOCATION=blocks  specifies  the  initial  size  of   the   journal
-   file  in  RMSblocks.  Because  frequent  journal   file   extensions
-   degrade  run-time  performance,   make   journal   file   allocation
-   ample for a production database file.
-
-   When  you  change  the  ALLOCATION   and   do   not   also   specify
-   EXTENSION,  the  EXTENSION  automatically  changes  to   equal   the
-   ALLOCATION.
-
-   The minimum allocation is 10 blocks.
-
-   The maximum allocation is 16777216 blocks.
-
-   By default, GDE uses an allocation of 100 blocks.
-
-4 EXTENSION
-  E[XTENSION]=blocks
-   EXTENSION=blocks  specifies  the  size  by  which  a  journal   file
-   extends  when  it  becomes  full.  EXTENSION=0  prevents   automatic
-   journal   file   extension.   Because    frequent    journal    file
-   extensions  degrade   run-time   performance,   make   the   journal
-   file extension ample for a production database file.
-
-   When  you  change  the  ALLOCATION   and   do   not   also   specify
-   EXTENSION,  the  EXTENSION  automatically  changes  to   equal   the
-   ALLOCATION.
-
-   The minimum EXTENSION is 0 blocks.
-
-   The maximum EXTENSION is 65536 blocks.
-
-   By default, GDE uses an EXTENSION of 100 blocks.
-
-4 BUFFER_SIZE
-  BU[FFER_SIZE]=pages
-   BUFFER_SIZE=pages  specifies  the   amount   of   memory   used   to
-   buffer  journal  file   output.   A   larger   BUFFER_SIZE   usually
-   smooths and improves run-time performance.
-
-   A  larger  BUFFER_SIZE  requires  more   memory   resources,   which
-   may  be  scarce.  A  larger  BUFFER_SIZE  provides  more  room   for
-   journal  records  in  memory  on  their  way   to   the   disk   and
-   therefore increases  the  number  of  update  records  that  may  be
-   lost in a system failure.
-
-   The  minimum  BUFFER_SIZE  is  enough  512-byte  pages  to  hold   2
-   GDS database blocks.
-
-   The maximum BUFFER_SIZE is 2000 pages.
-
-   By default, GDE uses a BUFFER_SIZE of 128 pages.
-
-2 Segment_Qualifiers
-  Segment Qualifiers
-   The following /SEGMENT qualifiers can be  used  with  the  ADD,  CHANGE,
-   or TEMPLATE commands.
-
-3 /FILE_NAME
-  /F[ILE_NAME]=file-spec
-   Specifies  the  file  name   for   a   SEGMENT.   GT.M   allows   full
-   file-specifications  and  logical  names.  Note  that  if  the   file-
-   specification is a  search  list,  the  first  file  in  the  list  is
-   used and all others are ignored.
-
-   The maximum file-specification length is 255 characters.
-
-   By default, GDE uses a file name of MUMPS.
-
-   By default, GDE uses a file extension of .DAT.
-
-3 /ACCESS_METHOD
-  /AC[CESS_METHOD]=code
-   Specifies the access method GT.M  uses  to  store  and  retrieve  data
-   from  the  global  database  file.  The  two  methods   are   Buffered
-   Global (BG) and Mapped Memory (MM).
-
-   GDE  maintains  a  separate  set  of  SEGMENT  qualifier  values   for
-   each  ACCESS_METHOD.  When  GDE   modifies   the   ACCESS_METHOD,   it
-   activates  the   appropriate   set   of   TEMPLATEs   and   sets   all
-   unspecified  qualifiers  to  the  template  defaults   for   the   new
-   ACCESS_METHOD.
-
-   By default, GDE uses an access method of BG.
-
-
-3 /BLOCK_SIZE
-  /BL[OCK_SIZE]=size
-   Specifies the  size,  in  bytes,  of  each  database  block  on  disk.
-   The block-size must  be  a  multiple  of  512  (the  RMS  block-size).
-   If the block-size is not  a  multiple  of  512,  GDE  rounds  off  the
-   block-size  to  the  next  highest  multiple  of  512  and  issues   a
-   warning message.
-
-   If the specified  block-size  is  less  than  the  minimum,  GDE  uses
-   the  minimum  block-size.  If  the  specified  block-size  is  greater
-   than the maximum, GDE issues an error message.
-
-   A  1024  byte  or  2048  byte  block-size   serves   well   for   most
-   applications.
-
-
-   The minimum block-size is 512 bytes.
-
-   The maximum block-size is 65,024 bytes.
-
-   By default, GDE uses  a  block-size  of  1024  bytes  for  BG  and  MM
-   files.
-
-3 /ALLOCATION
-  /AL[LOCATION]=size
-   Specifies  the  number  of  blocks  GT.M  allocates  to  a  disk  file
-   when MUPIP creates the file.  For  GDS  files,  the  number  of  bytes
-   allocated is ALLOCATION size times the BLOCK_SIZE.
-
-   The   default   allocation   was   chosen   for   small    development
-   projects. Use  larger  allocations  for  production  files  and  large
-   projects.  Because  file  fragmentation  impairs   performance,   make
-   the  initial  allocation  large  enough  to   hold   the   anticipated
-   contents of the file  for  a  length  of  time  consistent  with  your
-   RMS file reorganization schedule.
-
-   The minimum ALLOCATION is 10 blocks.
-
-   The maximum ALLOCATION is 16777216 blocks.
-
-   By default, GDE uses an ALLOCATION of 100 blocks.
-
-3 /EXTENSION_COUNT
-  /E[XTENSION_COUNT]=size
-   Specifies the number of extra  GDS  blocks  of  disk  space  by  which
-   the file should extend.  The  extend  amount  is  interpreted  as  the
-   number  of  usable  GDS  blocks  to  create  with  the  extension.  To
-   calculate the number  of  host  operating  system  blocks  added  with
-   each extension, multiply the  number  of  GDS  blocks  added  by  (GDS
-   block size/host block  size);  to  this  amount,  add  one  local  bit
-   map block for each  512-byte  block  added  in  each  extension,  plus
-   one for any remaining bytes.
-
-   The  default  extension  amount  was  chosen  for  small   development
-   projects.  Use  larger  extensions  for  larger  files.  Because  many
-   file  extensions  adversely  affect  performance,  set  up  extensions
-   appropriate to the file allocation.
-
-   BG files may extend automatically  when  the  file  is  full.  A  zero
-   extension size prevents a BG file from automatically extending.
-
-   BG  files  may  be,  and  MM  files  must  be,  extended  with   MUPIP
-   EXTEND. When a MUPIP  EXTEND  command  does  not  include  a  /BLOCKS=
-   qualifier,  EXTEND  uses  the   extension   size   in   the   database
-   header. The extension  amount  may  be  changed  with  the  MUPIP  SET
-   command. To  require  explicit  expansion  for  BG  files  with  MUPIP
-   EXTEND, set /EXTENSION_COUNT to zero.
-
-   The minimum EXTENSION is 0 blocks.
-
-   The maximum EXTENSION is 65,535 blocks.
-
-   By default, GDE uses an EXTENSION of 100 blocks.
-
-3 /GLOBAL_BUFFER_COUNT
-  /G[LOBAL_BUFFER_COUNT]=size
-   Specifies  the  number  of  global  buffers   for   a   file.   Global
-   buffers serve as part of the database caching mechanisms.
-
-   Avoid  inadequate  settings  of  this   factor.   However,   if   your
-   system  is  memory  constrained  and  the  database  file  traffic  is
-   not  heavy  enough  to  hold   the   cache   in   memory,   increasing
-   GLOBAL_BUFFER_COUNT  may  induce  VMS  paging.   Therefore,   do   not
-   increase   this   factor   to   a   large   value   without    careful
-   observation.
-
-   The  proper  number  of  GLOBAL_BUFFERs  depends  on  the  application
-   and the amount  of  primary  memory  available  on  the  system.  Most
-   production  databases  exhibit  a  direct  relationship  between   the
-   number   of   GLOBAL_BUFFERs    and    performance.    However,    the
-   relationship is  not  linear,  but  rather  more  parabolic,  so  that
-   increases past  some  point  have  progressively  less  benefit.  This
-   point  of  diminishing  returns  depends  on  the   application.   For
-   most  applications,  Greystone   expects   the   optimum   number   of
-   GLOBAL_BUFFERs to be between 512 and 2048.
-
-   Generally, you  should  increase  the  number  of  GLOBAL_BUFFERs  for
-   production GDS  databases.  This  is  because  GT.M  uses  the  shared
-   memory database cache associated with  each  GDS  file  for  the  vast
-   majority of caching.
-
-   The minimum for BG is 64 blocks.
-
-   The maximum for BG is 4096 blocks.
-
-   By default, GDE uses a GLOBAL_BUFFER_COUNT of 128 blocks.
-
-3 /DEFER
-  /[NO]D[EFER]
-   Instructs  GT.M  whether  or  not  to  store  updates  on   the   disk
-   immediately.
-
-   DEFER has  a  significant  performance  benefit  for  heavily  updated
-   database  files.  However,  DEFER  should  only  be  used  for  files,
-   such  as  those  containing  temporary  storage  for  reports,   which
-   can be recreated if the system crashes.
-
-   By default, GDE makes MM database files /DEFER.
-
-3 /LOCK_SPACE
-  /LOC[K_SPACE]=size
-   Specifies  the  number  of  pages  of  space  to  use  for  the   lock
-   database stored with this segment.  If  GT.M  runs  out  of  space  to
-   store  locks,  the  system  becomes  slightly  less   efficient.   The
-   default amount is generous for most MUMPS applications.
-
-   The minimum LOCK_SPACE is 10 pages.
-
-   The maximum LOCK_SPACE is 1000 pages.
-
-   By default, GDE uses a LOCK_SPACE of 20 pages.
-
-1 Guidelines
-  Mapping Guidelines
-   Global  Directory  maps  consist  of  a  hierarchy  of   NAMEs,   REGIONs,
-   SEGMENTs  and  FILEs.  The  following  section  provides  guidelines   for
-   defining and using these mapping components.
-
-2 Names
-  NAME Guidelines
-   GT.M uses a NAME to  place  global  variables  in  a  physical  database
-   file.
-   A NAME:
-
-   o   Maps to only one REGION in the Global Directory
-
-   o   Can be a discrete "global" name, e.g., aaa is a discrete global
-
-   o   Can be a partial name ending with a wild card ("*")
-
-   o   Must begin with an alphabetic character or a % sign
-
-   o   Can be 1 to 8 alphanumeric characters
-
-   o   Is case sensitive
-
-   A wild card defines all  names  starting  with  the  characters  of  the
-   partial name. For  example,  abc*,  defines  the  range  of  all  global
-   names beginning with the three characters "abc."
-
-2 Regions
-  REGION Guidelines
-   GT.M uses a REGION  to  logically  define  a  portion  of  the  database
-   with  the  same  characteristics,  such  as  key  and   record-size.   A
-   REGION maps to a SEGMENT. More than one NAME may  map  to  a  REGION.  A
-   Global Directory must have at least one REGION.
-
-   A region-name:
-
-   o   Must begin with an alphabetic character, except for $DEFAULT
-
-   o   Can include alphanumerics, a dollar sign and an underscore
-
-   o   Can be 1 to 15 characters
-
-   GDE automatically converts region-names to upper-case.
-
-   By default, GDE uses $DEFAULT for the default region-name.
-
-2 Segments
-  SEGMENT Guidelines
-   GT.M uses a SEGMENT to define a physical  file  and  access  method  for
-   the database stored in that  file.  A  SEGMENT  maps  to  only  one  RMS
-   file. A SEGMENT can be mapped by only one REGION.
-
-   A segment-name:
-
-   o   Must begin with an alphabetic character, except for $DEFAULT
-
-   o   Can include alphanumerics, a dollar sign and an underscore
-
-   o   Can be 1 to 15 characters
-
-   GDE automatically converts segment-names to upper-case.
-
-   By default, GDE uses the  file  name  MUMPS  for  the  $DEFAULT  default
-   segment. By default, GDE uses  the  file  extension  .DAT  for  database
-   files.
-
-
diff --git a/sr_vvms/gdeget.m b/sr_vvms/gdeget.m
deleted file mode 100644
index 117bc10..0000000
--- a/sr_vvms/gdeget.m
+++ /dev/null
@@ -1,443 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2006, 2013 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-gdeget:	;read in an existing GD or create a default
-LOAD
-	n abs,contents,rel,xregs,xsegs,reglist,map,$et
-	i debug s $et="b"
-	e  s $et="g ABORT^GDE:($p($p($zs,"","",3),""-"")'=""%GDE"") u io w !,$p($zs,"","",3,999),! d GETOUT^GDEEXIT h"
-	s abs=1,update=0,chset=$SELECT($ZV["OS390":"ISO8859-1",1:"")
-	o file:(exc="g badfile":rewind:recordsize=SIZEOF("dsk_blk"):readonly:fixed:blocksize=SIZEOF("dsk_blk"):ichset=chset)
-	u file r rec
-	i debug u @useio
-; header
-	s label=$ze(rec,1,12)
-	n gldfmt
-	set v600=0
-	s gldfmt=+$ze(label,10,12)
-	i gldfmt=9 s label=hdrlab,v600=1,update=1			;autoconvert
-	i (v600=1) n SIZEOF d v600init
-	set v5ft1=0
-	i gldfmt=8 s label=hdrlab,v5ft1=1,update=1			;autoconvert
-	i v5ft1=1 n SIZEOF d v5ft1init
-	set v44=0
-	i gldfmt=7 s label=hdrlab,v44=1,update=1			;autoconvert
-	i v44=1 n MAXNAMLN,MAXSEGLN,MAXREGLN,SIZEOF d v44init
-	s v30=0
-	i gldfmt=6 s label=hdrlab,v30=4,update=1			;autoconvert
-	i label'=hdrlab zm gdeerr("GDUNKNFMT"):file,gdeerr("INPINTEG")
-	s filesize=$$bin2num($ze(rec,13,16))
-	s abs=abs+SIZEOF("gd_header")
-; contents
-	s ptrsize=4
-	i $ze(rec,abs,abs+ptrsize-1)'=$tr($j("",ptrsize)," ",ZERO) zm gdeerr("INPINTEG")	; gd_addr.local_locks
-	s abs=abs+ptrsize
-	s contents("maxrecsize")=$$bin2num($ze(rec,abs,abs+3)),abs=abs+4
-	n cntsize  s cntsize=$s((gldfmt>9):4,1:2)				; counters are 4-bytes since V6.1
-	s contents("mapcnt")=$$bin2num($ze(rec,abs,abs+cntsize-1)),abs=abs+cntsize
-	s contents("regioncnt")=$$bin2num($ze(rec,abs,abs+cntsize-1)),abs=abs+cntsize
-	s contents("segmentcnt")=$$bin2num($ze(rec,abs,abs+cntsize-1)),abs=abs+cntsize
-	i '(gldfmt>9) d
-	. i $ze(rec,abs,abs+cntsize-1)'=$tr($j("",cntsize)," ",ZERO) zm gdeerr("INPINTEG") ; filler
-	. s abs=abs+cntsize
-	e  d
-	. s contents("gblnamecnt")=$$bin2num($ze(rec,abs,abs+cntsize-1)),abs=abs+cntsize
-	. s contents("varmapslen")=$$bin2num($ze(rec,abs,abs+cntsize-1)),abs=abs+cntsize
-	s contents("maps")=$$bin2num($ze(rec,abs,abs+3)),abs=abs+4
-	s contents("regions")=$$bin2num($ze(rec,abs,abs+3)),abs=abs+4
-	s contents("segments")=$$bin2num($ze(rec,abs,abs+3)),abs=abs+4
-	i (gldfmt>9) s contents("gblnames")=$$bin2num($ze(rec,abs,abs+3)),abs=abs+4
-	s abs=abs+12								;skip link, tab_ptr and id pointers
-	s contents("end")=$$bin2num($ze(rec,abs,abs+3)),abs=abs+4
-	i (gldfmt>9) s abs=abs+16	; reserved for runtime fillers
-	i contents("regioncnt")'=contents("segmentcnt") zm gdeerr("INPINTEG")
-	i contents("regioncnt")-1>contents("mapcnt") zm gdeerr("INPINTEG")
-; verify offsets
-	i abs'=(SIZEOF("gd_header")+SIZEOF("gd_contents")+1) zm gdeerr("INPINTEG")
-	s x=contents("maps")
-	i x+1'=(abs-SIZEOF("gd_header")) zm gdeerr("INPINTEG")
-	s x=x+(contents("mapcnt")*SIZEOF("gd_map"))
-	i (gldfmt>9)  s x=x+contents("varmapslen")		; add variable maps section too if available
-	i x'=contents("regions") zm gdeerr("INPINTEG")
-	s x=x+(contents("regioncnt")*SIZEOF("gd_region"))
-	i x'=contents("segments") zm gdeerr("INPINTEG")
-	s x=x+(contents("segmentcnt")*(SIZEOF("gd_segment")-v30))
-	i (gldfmt>9) d
-	. i x'=contents("gblnames") zm gdeerr("INPINTEG")
-	. s x=x+(contents("gblnamecnt")*(SIZEOF("gd_gblname")))
-	i x'=contents("end") zm gdeerr("INPINTEG")
-	s rel=abs
-; maps - verify that mapped regions and regions are 1-to-1
-	k reglist
-	i '(gldfmt>9) d
-	. f i=1:1:contents("mapcnt") d mapPreV61
-	e  d
-	. n maparray,tmpabs,newabs
-	. f i=1:1:contents("mapcnt") d mapfixed(i)	; read through fixed    section of MAPS
-	. s tmpabs=abs
-	. f i=1:1:contents("mapcnt") d mapvariable(i)	; read through variable section of MAPS
-	. s newabs=(((abs-1)+(ptrsize-1))\ptrsize*ptrsize)+1 ; make "abs" 8-byte aligned for 64bit platforms (and 4-byte for 32-bit)
-	. s rel=rel+(newabs-abs)			; adjust "rel" to take "abs"-8-byte-alignment-adjustment into account
-	. s abs=newabs
-	. i (abs-tmpabs)'=contents("varmapslen") zm gdeerr("INPINTEG")
-	s s=""
-	f i=1:1:contents("regioncnt") s s=$o(reglist(s))
-	i $zl($o(reglist(s))) zm gdeerr("INPINTEG")
-	i i'=contents("regioncnt") zm gdeerr("INPINTEG")
-; regions
-	k regs,xregs s regs=0
-	f i=1:1:contents("regioncnt") d region
-	i regs'=contents("regioncnt") zm gdeerr("INPINTEG")
-; segments
-	k segs,xsegs s segs=0
-	f i=1:1:contents("segmentcnt") d segment
-	i segs'=contents("segmentcnt") zm gdeerr("INPINTEG")
-; gblnames
-	i (gldfmt>9) d
-	. k gnams s gnams=0
-	. f i=1:1:contents("gblnamecnt") d gblname(i)
-	e  s gnams=0
-	; wait until "gnams" is setup before checking maps, as "gnams" is used in case of subscripted gvns in map entries
-	zm:'$$MAP2NAM^GDEMAP(.map) gdeerr("INPINTEG")
-; template access method
-	s tmpacc=$$gderead(4)
-	i accmeth'[("\"_tmpacc) zm gdeerr("INPINTEG")
-; templates
-	k tmpreg,tmpseg
-	d cretmps
-	f s="ALLOCATION","BEFORE_IMAGE","BUFFER_SIZE" d tmpreg(s)
-	i 'v30 d tmpreg("COLLATION_DEFAULT")
-	f s="EXTENSION","FILE_NAME" d tmpreg(s)
-	f s="JOURNAL","KEY_SIZE","NULL_SUBSCRIPTS","RECORD_SIZE" d tmpreg(s)
-	; need to handle versioning
-	i 'v44&'v30 d tmpreg("STDNULLCOLL")
-	f i=2:1:$zl(accmeth,"\") s am=$p(accmeth,"\",i) d
-	. i am="MM" d:$zl(rec)-(rel-1)<3 nextrec i +$ze(rec,rel,rel+2)'=2 n tmpsegcommon d tmpmm q
-	. f s="ACCESS_METHOD","ALLOCATION","BLOCK_SIZE","BUCKET_SIZE","DEFER","EXTENSION_COUNT","FILE_TYPE" d tmpseg(am,s)
-	. f s="GLOBAL_BUFFER_COUNT","LOCK_SPACE" d tmpseg(am,s)
-	. i (gldfmt>9) d tmpseg(am,"MUTEX_SLOTS")
-	. i 'v30 d tmpseg(am,"RESERVED_BYTES")					;autoconvert, can be condensed someday
-	. d tmpseg(am,"WINDOW_SIZE")
-	c file
-; resolve
-	s s=""
-	f  s s=$o(nams(s)) q:'$zl(s)  zm:'$d(xregs(nams(s))) gdeerr("INPINTEG") s nams(s)=xregs(nams(s))
-	f  s s=$o(regs(s)) q:'$zl(s)  zm:'$d(xsegs(regs(s,"DYNAMIC_SEGMENT"))) gdeerr("INPINTEG") d
-	. s regs(s,"DYNAMIC_SEGMENT")=xsegs(regs(s,"DYNAMIC_SEGMENT"))
-	f  s s=$o(segs(s)) q:'$zl(s)  s am=segs(s,"ACCESS_METHOD") d
-	. s x="" f  s x=$o(segs(s,x)) q:x=""  i x'="FILE_NAME",'$zl(tmpseg(am,x)) zm:segs(s,x) gdeerr("INPINTEG") s segs(s,x)=""
-	; fall through !
-verify:	s x=$$ALL^GDEVERIF
-	i 'x zm gdeerr("INPINTEG")
-	q
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-badfile ;file access failed
-	s:'debug $et="" u file:exc="" s abortzs=$zs zm gdeerr("GDREADERR"):file,+abortzs
-	d GETOUT^GDEEXIT
-	h
-	;
-bin2num:(bin)	; binary number -> number
-	n num,i
-	s num=0
-	i endian=TRUE f i=$zl(bin):-1:1 s num=$a(bin,i)*HEX($zl(bin)-i*2)+num
-	e  f i=1:1:$zl(bin) s num=$a(bin,i)*HEX(i-1*2)+num
-	q num
-	;
-
-;----------------------------------------------------------------------------------------------------------------------------------
-regoffchk:(x)	; check region offset
-	s reglist(x)="",x=x-contents("regions")
-	i x#SIZEOF("gd_region") zm gdeerr("INPINTEG")
-	i x\SIZEOF("gd_region")'<contents("regioncnt") zm gdeerr("INPINTEG")
-	q
-
-mapPreV61:
-	i $zl(rec)-(rel-1)<SIZEOF("gd_map") d nextrec
-	s s=$ze(rec,rel,rel+SIZEOF("mident")-1),rel=rel+SIZEOF("mident")
-	s x=$f(s,ZERO)-2 i x=-2 s x=SIZEOF("mident")
-	s s=$ze(s,1,x)
-	s x=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s map(s)=x
-	d regoffchk(x)
-	s abs=abs+SIZEOF("gd_map")
-	q
-
-mapfixed:(i)
-	n regoffset,keyoffset,gvnamelen,gvkeylen
-	i $zl(rec)-(rel-1)<SIZEOF("gd_map") d nextrec
-	s keyoffset=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s regoffset=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s gvnamelen=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s gvkeylen=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s maparray(i,1)=keyoffset
-	s maparray(i,2)=regoffset
-	s maparray(i,3)=gvnamelen
-	s maparray(i,4)=gvkeylen+1	; include second null byte as well
-	d regoffchk(regoffset)
-	s abs=abs+SIZEOF("gd_map")
-	q
-
-mapvariable:(i)
-	n keyoffset,regoffset,gvnamelen,gvkeylen,s
-	s keyoffset=maparray(i,1)
-	s regoffset=maparray(i,2)
-	s gvnamelen=maparray(i,3)
-	s gvkeylen=maparray(i,4)
-	i (keyoffset+1+SIZEOF("gd_header"))'=abs zm gdeerr("INPINTEG")
-	i (keyoffset+gvkeylen)>contents("regions") zm gdeerr("INPINTEG")
-	f  q:(($zl(rec)-(rel-1))'<gvkeylen)  d nextrec
-	s s=$ze(rec,rel,rel+gvkeylen-1)
-	i $ze(s,gvnamelen+1)'=ZERO zm gdeerr("INPINTEG")
-	i $ze(s,gvkeylen-1)'=ZERO zm gdeerr("INPINTEG")
-	i $ze(s,gvkeylen)'=ZERO zm gdeerr("INPINTEG")
-	s s=$ze(s,1,gvkeylen-2)
-	s map(s)=regoffset
-	s rel=rel+gvkeylen
-	s abs=abs+gvkeylen
-	q
-
-region:
-	i $zl(rec)-(rel-1)<SIZEOF("gd_region") d nextrec
-	s regs=regs+1
-	s l=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s s=$ze(rec,rel,rel+l-1),rel=rel+MAXREGLN,xregs(abs-1-SIZEOF("gd_header"))=s
-	s regs(s,"KEY_SIZE")=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s regs(s,"RECORD_SIZE")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s regs(s,"DYNAMIC_SEGMENT")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s x=regs(s,"DYNAMIC_SEGMENT")-contents("segments")
-	i x#(SIZEOF("gd_segment")-v30) zm gdeerr("INPINTEG")						; autoconvert
-	i x\(SIZEOF("gd_segment")-v30)'<contents("segmentcnt") zm gdeerr("INPINTEG")			; autoconvert
-	i $ze(rec,rel,rel+ptrsize-1)'=$tr($j("",ptrsize)," ",ZERO) zm gdeerr("INPINTEG")		; static segment
-	s rel=rel+ptrsize
-	i $ze(rec,rel)'=ZERO zm gdeerr("INPINTEG")							; OPEN state
-	s rel=rel+1
-	i $ze(rec,rel)'=ZERO zm gdeerr("INPINTEG")							; lock_write
-	s rel=rel+1
-	s regs(s,"NULL_SUBSCRIPTS")=$$bin2num($ze(rec,rel)),rel=rel+1
-	s regs(s,"JOURNAL")=$$bin2num($ze(rec,rel)),rel=rel+1
-	s regs(s,"ALLOCATION")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4					; journal options
-	s regs(s,"EXTENSION")=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s regs(s,"BUFFER_SIZE")=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s regs(s,"BEFORE_IMAGE")=$$bin2num($ze(rec,rel)),rel=rel+1
-	i $ze(rec,rel,rel+3)'=$tr($j("",4)," ",ZERO) zm gdeerr("INPINTEG")				; 4 chars
-	s rel=rel+4
-	s regs(s,"COLLATION_DEFAULT")=$$bin2num($ze(rec,rel)),rel=rel+1					; default collating type
-	; stdnullcoll is applicable from V5
-	i 'v44&'v30 s regs(s,"STDNULLCOLL")=$$bin2num($ze(rec,rel))
-	e  d
-	. i $ze(rec,rel)'=$tr($j("",1)," ",ZERO) zm gdeerr("INPINTEG")					; 1 chars
-	. s regs(s,"STDNULLCOLL")=0
-	s rel=rel+1
-	s l=$$bin2num($ze(rec,rel)),rel=rel+1 ;jnl_file_len
-	s regs(s,"FILE_NAME")=$ze(rec,rel,rel+l-1),rel=rel+SIZEOF("file_spec")
-	i $ze(rec,rel,rel+7)'=$tr($j("",8)," ",ZERO) zm gdeerr("INPINTEG")				; reserved
-	s rel=rel+8
-	i (gldfmt>9) s rel=rel+16	; reserved for runtime fillers
-	s abs=abs+SIZEOF("gd_region")
-	q
-segment:
-	i $zl(rec)-(rel-1)<(SIZEOF("gd_segment")-v30) d nextrec						; autoconvert
-	s segs=segs+1
-	s x=$$bin2num($ze(rec,rel+SIZEOF("am_offset")-v30,rel+SIZEOF("am_offset")-v30+3))		; autoconvert
-	s am=$s(x=1:"BG",x=2:"MM",x=4:"USER",1:"ERROR")
-	i am="ERROR" zm gdeerr("INPINTEG")
-	s l=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s s=$ze(rec,rel,rel+l-1),rel=rel+MAXSEGLN,xsegs(abs-1-SIZEOF("gd_header"))=s
-	s segs(s,"ACCESS_METHOD")=am
-	s l=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s segs(s,"FILE_NAME")=$ze(rec,rel,rel+l-1),rel=rel+SIZEOF("file_spec")
-	s segs(s,"BLOCK_SIZE")=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s segs(s,"EXTENSION_COUNT")=$$bin2num($ze(rec,rel,rel+1)),rel=rel+2
-	s segs(s,"ALLOCATION")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	i $ze(rec,rel,rel+3)'=$tr($j("",4)," ",ZERO) zm gdeerr("INPINTEG")			; reserved for clb
-	s rel=rel+4
-	i $ze(rec,rel,rel+3)'=".DAT" zm gdeerr("INPINTEG")
-	s rel=rel+4
-	s segs(s,"DEFER")=$$bin2num($ze(rec,rel))
-	s rel=rel+1
-	s x=$$bin2num($ze(rec,rel)),rel=rel+1
-	s segs(s,"FILE_TYPE")=$s(x=0:"DYNAMIC",1:"ERROR")
-	i segs(s,"FILE_TYPE")="ERROR" zm gdeerr("INPINTEG")
-	s segs(s,"BUCKET_SIZE")=$$bin2num($ze(rec,rel))
-	s rel=rel+1
-	s segs(s,"WINDOW_SIZE")=$$bin2num($ze(rec,rel))
-	s rel=rel+1
-	s segs(s,"LOCK_SPACE")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	s segs(s,"GLOBAL_BUFFER_COUNT")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	i 'v30 s segs(s,"RESERVED_BYTES")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4		;autoconvert
-	e  s segs(s,"RESERVED_BYTES")=0
-	i (gldfmt>9) d
-	. s segs(s,"MUTEX_SLOTS")=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4
-	e  s segs(s,"MUTEX_SLOTS")=defseg("MUTEX_SLOTS")
-	s rel=rel+4										; access method already processed
-	i $ze(rec,rel,rel+3)'=$tr($j("",4)," ",ZERO) zm gdeerr("INPINTEG")			; file_cntl pointer
-	s rel=rel+4
-	i $ze(rec,rel,rel+3)'=$tr($j("",4)," ",ZERO) zm gdeerr("INPINTEG")			; repl_list pointer
-	s rel=rel+4
-	i (gldfmt>9) s rel=rel+16	; reserved for runtime fillers
-	s abs=abs+SIZEOF("gd_segment")-v30
-	q
-gblname(i);
-	n x,y
-	i $zl(rec)-(rel-1)<SIZEOF("gd_gblname") d nextrec
-	s gnams=gnams+1
-	s s=$ze(rec,rel,rel+SIZEOF("mident")-1),rel=rel+SIZEOF("mident")
-	s x=$zf(s,ZERO)-2 i x=-2 zm gdeerr("INPINTEG")	; it better be null terminated
-	s s=$ze(s,1,x)
-	s x=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4 	; read 4 bytes
-	i x>maxgnam("COLLATION") zm gdeerr("INPINTEG")	; collation # should be <= 255
-	s y=$$bin2num($ze(rec,rel,rel+3)),rel=rel+4 	; read 4 bytes
-	d chkcoll^GDEPARSE(x,s,y)
-	s gnams(s,"COLLATION")=x
-	s gnams(s,"COLLVER")=y
-	s abs=abs+SIZEOF("gd_gblname")
-	q
-gderead:(max)
-	n s
-	i $zl(rec)-(rel-1)<3 d nextrec
-	s l=$ze(rec,rel,rel+2),rel=rel+3,abs=abs+3
-	i l>max zm gdeerr("INPINTEG")
-	i $zl(rec)-(rel-1)<l d nextrec
-	s s=$ze(rec,rel,rel+l-1),rel=rel+l,abs=abs+l
-	q s
-	;
-tmpreg:(s)
-	i $zl(rec)-(rel-1)<3 d nextrec
-	s l=$ze(rec,rel,rel+2),rel=rel+3,abs=abs+3
-	i $zl(rec)-(rel-1)<l d nextrec
-	s tmpreg(s)=$ze(rec,rel,rel+l-1),rel=rel+l,abs=abs+l
-	q
-tmpseg:(a,s)
-	i $zl(rec)-(rel-1)<3 d nextrec
-	s l=$ze(rec,rel,rel+2),rel=rel+3,abs=abs+3
-	i $zl(rec)-(rel-1)<l d nextrec
-	s tmpseg(a,s)=$s($zl(tmpseg(a,s)):$ze(rec,rel,rel+l-1),1:"") s rel=rel+l,abs=abs+l
-	q
-nextrec:
-	n nextrec
-	u file r nextrec
-	i debug u @useio
-	s rec=$ze(rec,rel,$zl(rec))_nextrec,rel=1
-	q
-;----------------------------------------------------------------------------------------------------------------------------------
-
-CREATE
-	k contents,nams,regs,segs,tmpreg,tmpseg
-	s update=1
-	s header=$tr($j("",SIZEOF("gd_header")-16)," ",ZERO)
-	s nams=2,(nams("*"),nams("#"))=defreg
-	s regs=1,regs(defreg,"DYNAMIC_SEGMENT")=defseg,reg="regs(defreg)"
-	s gnams=0
-	d cretmps
-	s x=""
-	f  s x=$o(tmpreg(x)) q:'$zl(x)  s @reg@(x)=tmpreg(x)
-	s segs=1
-	s am=tmpacc d maktseg
-	q
-cretmps:
-	s tmpreg("ALLOCATION")=100
-	s tmpreg("BEFORE_IMAGE")=1
-	s tmpreg("BUFFER_SIZE")=128
-	s tmpreg("COLLATION_DEFAULT")=0
-	s tmpreg("EXTENSION")=100
-	s tmpreg("FILE_NAME")=""
-	s tmpreg("JOURNAL")=0
-	s tmpreg("KEY_SIZE")=64
-	s tmpreg("NULL_SUBSCRIPTS")=0
-	s tmpreg("RECORD_SIZE")=256
-	s tmpreg("STDNULLCOLL")=0
-	n tmpsegcommon
-	; First define segment characteristics that are identical to BG and MM access methods (done inside "tmpmm")
-	; Then define overrides specific to BG and MM
-	d tmpmm
-	m tmpseg("BG")=tmpsegcommon	; copy over all common templates into BG access method first
-	; now add BG specific overrides
-	s tmpseg("BG","ACCESS_METHOD")="BG"
-	s tmpseg("BG","DEFER")=""
-	s tmpseg("BG","GLOBAL_BUFFER_COUNT")=defglo
-	; now define USER access method defaults
-	d tmpuser
-	s tmpacc="BG"	; set default access method to BG
-	q
-tmpmm:	;
-	d tmpsegcommon
-	m tmpseg("MM")=tmpsegcommon	; copy over all common stuff into MM access method first
-	; now add MM specific overrides
-	s tmpseg("MM","ACCESS_METHOD")="MM"
-	s tmpseg("MM","DEFER")=1
-	s tmpseg("MM","GLOBAL_BUFFER_COUNT")=1024
-	q
-tmpsegcommon:
-	m tmpsegcommon=defseg
-	q
-tmpuser:
-	s tmpseg("USER","ACCESS_METHOD")="USER"
-	s tmpseg("USER","ALLOCATION")=""
-	s tmpseg("USER","BLOCK_SIZE")=""
-	s tmpseg("USER","BUCKET_SIZE")=""
-	s tmpseg("USER","DEFER")=""
-	s tmpseg("USER","EXTENSION_COUNT")=""
-	s tmpseg("USER","FILE_TYPE")="DYNAMIC"
-	s tmpseg("USER","MUTEX_SLOTS")=0
-	s tmpseg("USER","GLOBAL_BUFFER_COUNT")=""
-	s tmpseg("USER","RESERVED_BYTES")=0
-	s tmpseg("USER","LOCK_SPACE")=""
-	s tmpseg("USER","WINDOW_SIZE")=""
-	q
-maktseg: s segs(defseg,"FILE_NAME")=defdb
-	s seg="segs(defseg)",x=""
-	f  s x=$o(tmpseg(am,x)) q:'$zl(x)  s @seg@(x)=tmpseg(am,x)
-	q
-v44init:
-	s SIZEOF("am_offset")=308
-	s SIZEOF("file_spec")=256
-	s SIZEOF("gd_header")=16
-	s SIZEOF("gd_contents")=44
-	s SIZEOF("gd_map")=12
-	s SIZEOF("gd_region")=316
-	s SIZEOF("gd_segment")=320
-	s SIZEOF("mident")=8
-	s SIZEOF("blk_hdr")=7
-	s SIZEOF("rec_hdr")=3
-	s SIZEOF("dsk_blk")=512
-	s SIZEOF("max_str")=32767
-	s MAXNAMLN=SIZEOF("mident"),MAXREGLN=16,MAXSEGLN=16
-	q
-v5ft1init:
-	s SIZEOF("am_offset")=324
-	s SIZEOF("file_spec")=256
-	s SIZEOF("gd_header")=16
-	s SIZEOF("gd_contents")=44
-	s SIZEOF("gd_map")=36
-	s SIZEOF("gd_region")=332
-	s SIZEOF("gd_segment")=336
-	s SIZEOF("mident")=32
-	s SIZEOF("rec_hdr")=3
-	s SIZEOF("dsk_blk")=512
-	s SIZEOF("max_str")=32767
-	i ver'="VMS" s SIZEOF("blk_hdr")=8
-	e  s SIZEOF("blk_hdr")=7
-	q
-v600init:
-	s SIZEOF("am_offset")=324
-	s SIZEOF("file_spec")=256
-	s SIZEOF("gd_header")=16
-	s SIZEOF("gd_contents")=44
-	s SIZEOF("gd_map")=36
-	s SIZEOF("gd_region")=332
-	s SIZEOF("gd_segment")=336
-	s SIZEOF("mident")=32
-	s SIZEOF("blk_hdr")=16
-	s SIZEOF("rec_hdr")=3
-	s SIZEOF("dsk_blk")=512
-	s SIZEOF("max_str")=32767
-	q
diff --git a/sr_vvms/gdeput.m b/sr_vvms/gdeput.m
deleted file mode 100644
index 28fa098..0000000
--- a/sr_vvms/gdeput.m
+++ /dev/null
@@ -1,237 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2006, 2013 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-gdeput:	;output the result of the session to the global directory file
-GDEPUT()
-	n rec,gds,cregs,csegs,cregcnt,csegcnt,maxrecsize,mapcnt,map,hasSpanGbls,isSpanned,curMapSpanning,prevMapSpanning
-	n varmapslen,vargblnamelen,tmplen,ptrsize,varmapoff,gnamcnt,gblnamelen,filler16byte,filler12byte
-	d CREATEGLDMAP^GDEMAP
-	s ptrsize=4
-	s s="",gdeputzs="",varmapslen=0,mapcnt=0,hasSpanGbls=0
-	f  s s=$o(map(s)),tmplen=$l(s) q:'tmplen  d
-	. s cregs(map(s))=""
-	. s varmapslen=(varmapslen+tmplen+2) ; varmapslen needs to account 2 null terminating bytes
-	. s varmapslen($incr(mapcnt))=tmplen
-	. s gblnamelen=$zf(s,ZERO)
-	. i gblnamelen'=0 s hasSpanGbls=1
-	. s gblnamelen=$s(gblnamelen=0:tmplen,1:gblnamelen-2)
-	. s vargblnamelen(mapcnt)=gblnamelen
-	s varmapslen=(varmapslen+ptrsize-1)\ptrsize*ptrsize	; do 8-byte or 4-byte rounding up as appropriate
-	s maxrecsize=0
-	f cregcnt=0:1 s s=$o(cregs(s)) q:'$l(s)  d
-	. s csegs(regs(s,"DYNAMIC_SEGMENT"))=s i maxrecsize<regs(s,"RECORD_SIZE") s maxrecsize=regs(s,"RECORD_SIZE")
-	. s isSpanned(s)=0
-	f csegcnt=0:1 s s=$o(csegs(s)) q:'$l(s)  d fdatum
-	i cregcnt'=csegcnt d error1
-	s x=SIZEOF("gd_contents")+(mapcnt*SIZEOF("gd_map"))+varmapslen,s=""
-	f i=0:1 s s=$o(cregs(s)) q:'$l(s)  s cregs(s,"offset")=i*SIZEOF("gd_region")+x
-	s x=x+(cregcnt*SIZEOF("gd_region"))
-	f i=0:1 s s=$o(csegs(s)) q:'$l(s)  s csegs(s,"offset")=i*SIZEOF("gd_segment")+x
-	s x=x+(csegcnt*SIZEOF("gd_segment"))
-	s gnamcnt=gnams
-	s rec=""
-	s $p(filler12byte,ZERO,12)=ZERO
-	s $p(filler16byte,ZERO,16)=ZERO
-; contents
-	s rec=rec_$tr($j("",ptrsize)," ",ZERO)			; not used (gd_addr.local_locks)
-	s rec=rec_$$num2bin(4,maxrecsize)			; max rec size
-	s filesize=SIZEOF("gd_contents")
-	s rec=rec_$$num2bin(4,mapcnt)_$$num2bin(4,cregcnt)	; maps,regs
-	s rec=rec_$$num2bin(4,csegcnt)_$$num2bin(4,gnamcnt) 	; segs,gblnames
-	s rec=rec_$$num2bin(4,varmapslen)			; varmapslen
-	s rec=rec_$$num2bin(ptrsize,filesize)			; mapptr
-	s varmapoff=filesize+(mapcnt*SIZEOF("gd_map"))     	; offset of variable length map section
-	s filesize=varmapoff+varmapslen
-	s rec=rec_$$num2bin(ptrsize,filesize)			; regionptr
-	s filesize=filesize+(cregcnt*SIZEOF("gd_region"))
-	s rec=rec_$$num2bin(ptrsize,filesize)			; segmentptr
-	s filesize=filesize+(csegcnt*SIZEOF("gd_segment"))
-	s rec=rec_$$num2bin(ptrsize,filesize)			; gblnameptr
-	s filesize=filesize+(gnamcnt*SIZEOF("gd_gblname"))
-	s rec=rec_$tr($j("",(3*ptrsize))," ",ZERO)		; reserved
-	s rec=rec_$$num2bin(ptrsize,filesize)			; end
-	s rec=rec_$$num2bin(4,hasSpanGbls)			; has_span_gbls
-	s rec=rec_filler12byte					; for runtime filler
-	s rec=hdrlab_$$num2bin(4,$l(hdrlab)+4+filesize)_rec
-	i create zm gdeerr("GDCREATE"):file
-	e  s:$ZVersion["VMS" $p(file,";",2)=$p(file,";",2)+1  zm gdeerr("GDUPDATE"):file
-	s gdexcept="s gdeputzs=$zs  zgoto "_$zl_":writeerr^GDEPUT"
-	i $ZVersion["VMS"  s tempfile=$p(file,";",1)_"inprogress"
-	e  s tempfile=file_"inprogress"
-	s chset=$SELECT($ZV["OS390":"ISO8859-1",1:"")
-	o tempfile:(rewind:noreadonly:newversion:recordsize=512:fixed:blocksize=512:exception=gdexcept:ochset=chset)
-; maps
-	s s="",curMapSpanning=0,prevMapSpanning=0
-	f i=1:1 s s=$o(map(s)) q:'$l(s)  d mapfixed(i,s)
-	f i=1:1 s s=$o(map(s)) q:'$l(s)  d mapvariable(i,s)
-	; write padding if not 4-byte aligned after variable maps section
-	s tmplen=varmapoff#ptrsize
-	i tmplen s tmplen=ptrsize-tmplen,rec=rec_$tr($j("",tmplen)," ",ZERO)
-; cregs
-	f  s s=$o(cregs(s)) q:'$l(s)  d cregion
-; csegs
-	f  s s=$o(csegs(s)) q:'$l(s)  d csegment
-; cgnams
-	f  s s=$o(gnams(s)) q:'$l(s)  d cgblname(s)
-; template access method
-	i accmeth'[("\"_tmpacc) d error1
-	s rec=rec_$tr($j($l(tmpacc),3)," ",0)
-	s rec=rec_tmpacc
-; templates
-	f  s s=$o(tmpreg(s)) q:'$l(s)  s rec=rec_$tr($j($l(tmpreg(s)),3)," ",0) s rec=rec_tmpreg(s)
-	f i=2:1:$l(accmeth,"\") s am=$p(accmeth,"\",i) s s="" d
-	. f  s s=$o(tmpseg(am,s)) q:'$l(s)  s rec=rec_$tr($j($l(tmpseg(am,s)),3)," ",0),rec=rec_tmpseg(am,s)
-	u tempfile
-	f  s record=$e(rec,1,512),rec=$e(rec,513,MAXSTRLEN) q:'$l(record)  w record,!
-	u @useio
-	i $ZV'["VMS" o file c file:delete
-	c tempfile:rename=file
-	q 1
-
-;-----------------------------------------------------------------------------------------------------------------------------------
-
-fdatum:
-	s x=segs(s,"ACCESS_METHOD")
-	s filetype=$s((x="BG")!(x="MM"):"GDS",x="USER":"USER",1:"ERROR")
-	i filetype="ERROR" d error1
-	q
-mapfixed:(i,key)
-	n tmpmaplen,tmpnamelen,reg
-	d writerec
-	s tmpmaplen=varmapslen(i)
-	s rec=rec_$$num2bin(4,varmapoff)		; gvkey.offset
-	i (gtm64=TRUE) s rec=rec_$$num2bin(4,0) 	; add padding
-	s reg=map(key)
-	s rec=rec_$$num2bin(4,cregs(reg,"offset"))	; reg.offset
-	i (gtm64=TRUE) s rec=rec_$$num2bin(4,0)		; add padding
-	s tmpnamelen=vargblnamelen(i)
-	s rec=rec_$$num2bin(4,tmpnamelen)		; gvname_len
-	s rec=rec_$$num2bin(4,tmpmaplen+1)		; gvkey_len
-	s varmapoff=varmapoff+tmpmaplen+2
-	s curMapSpanning=(tmpnamelen'=tmpmaplen)
-	i (curMapSpanning!prevMapSpanning) s isSpanned(reg)=1
-	s prevMapSpanning=curMapSpanning
-	q
-mapvariable:(i,key)
-	d writerec
-	s rec=rec_key_ZERO_ZERO
-	q
-cregion:
-	d writerec
-	s rec=rec_$$num2bin(2,$l(s))
-	s rec=rec_s_$tr($j("",MAXREGLN-$l(s))," ",ZERO)
-	s rec=rec_$$num2bin(2,regs(s,"KEY_SIZE"))
-	s rec=rec_$$num2bin(4,regs(s,"RECORD_SIZE"))
-	s rec=rec_$$num2bin(4,csegs(regs(s,"DYNAMIC_SEGMENT"),"offset"))
-	s rec=rec_$$num2bin(4,0)
-	s rec=rec_ZERO										; OPEN state
-	s rec=rec_ZERO										; LOCK_WRITE
-	s rec=rec_$c(regs(s,"NULL_SUBSCRIPTS"))
-	s rec=rec_$c(regs(s,"JOURNAL"))
-	s rec=rec_$$num2bin(4,regs(s,"ALLOCATION"))
-	s rec=rec_$$num2bin(2,regs(s,"EXTENSION"))
-	s rec=rec_$$num2bin(2,regs(s,"BUFFER_SIZE"))
-	s rec=rec_$c(regs(s,"BEFORE_IMAGE"))
-	s rec=rec_$tr($j("",4)," ",ZERO)							;filler
-	s rec=rec_$$num2bin(1,regs(s,"COLLATION_DEFAULT"))
-	s rec=rec_$$num2bin(1,regs(s,"STDNULLCOLL"))
-	s rec=rec_$$num2bin(1,$l(regs(s,"FILE_NAME")))
-	s rec=rec_regs(s,"FILE_NAME")_$tr($j("",SIZEOF("file_spec")-$l(regs(s,"FILE_NAME")))," ",ZERO)
-	s rec=rec_$tr($j("",8)," ",ZERO)							; reserved
-	s rec=rec_$$num2bin(4,isSpanned(s))							; is_spanned
-	s rec=rec_filler12byte									; runtime filler
-	q
-csegment:
-	d writerec
-	s ref=$l(rec)
-	s am=segs(s,"ACCESS_METHOD")
-	s rec=rec_$$num2bin(2,$l(s))
-	s rec=rec_s_$tr($j("",MAXSEGLN-$l(s))," ",ZERO)
-	s rec=rec_$$num2bin(2,$l(segs(s,"FILE_NAME")))
-	s rec=rec_segs(s,"FILE_NAME")_$tr($j("",SIZEOF("file_spec")-$l(segs(s,"FILE_NAME")))," ",ZERO)
-	s rec=rec_$$num2bin(2,segs(s,"BLOCK_SIZE"))
-	s rec=rec_$$num2bin(2,segs(s,"EXTENSION_COUNT"))
-	s rec=rec_$$num2bin(4,segs(s,"ALLOCATION"))
-	s rec=rec_$tr($j("",4)," ",ZERO)								;reserved for clb
-	s rec=rec_".DAT"
-	s rec=rec_$c(+segs(s,"DEFER"))
-	s rec=rec_ZERO											;DYNAMIC segment
-	s rec=rec_$$num2bin(1,segs(s,"BUCKET_SIZE"))
-	s rec=rec_$$num2bin(1,segs(s,"WINDOW_SIZE"))
-	s rec=rec_$$num2bin(4,segs(s,"LOCK_SPACE"))
-	s rec=rec_$$num2bin(4,segs(s,"GLOBAL_BUFFER_COUNT"))
-	s rec=rec_$$num2bin(4,segs(s,"RESERVED_BYTES"))
-	s rec=rec_$$num2bin(4,segs(s,"MUTEX_SLOTS"))
-	s x=$s(am="BG":1,am="MM":2,am="USER":4,1:-1)
-	i x=-1 d error1
-	s rec=rec_$$num2bin(4,x)
-	s rec=rec_$$num2bin(4,0)		; file_cntl ptr
-	s rec=rec_$$num2bin(4,0)		; repl_list ptr
-	s rec=rec_filler16byte			; runtime filler
-	q
-cgblname:(s)
-	n len,coll,ver
-	d writerec
-	s len=$zl(s)
-	s rec=rec_s_$tr($j("",SIZEOF("mident")-len)," ",ZERO)
-	s rec=rec_$$num2bin(4,gnams(s,"COLLATION"))
-	s coll=gnams(s,"COLLATION")
-	s rec=rec_$$num2bin(4,coll)
-	s ver=$view("YCOLLATE",coll)
-	s rec=rec_$$num2bin(4,ver)
-	q
-
-;-----------------------------------------------------------------------------------------------------------------------------------
-
-num2bin:(l,n)
-	q $s(l=1:$$num2tiny(+n),l=2:$$num2shrt(+n),l=4:$$num2long(+n),1:$$num2error)
-	;
-num2tiny:(num)
-	i (num<0)!(num'<256) d error1
-	q $c(num)
-	;
-num2shrt:(num)
-	i (num<0)!(num'<TWO(16)) d error1
-	i endian=TRUE q $c(num\256,num#256)
-	q $c(num#256,num\256)
-	;
-num2long:(num)
-	i (num<0)!(num'<TWO(32)) d error1
-	i endian=TRUE q $c(num/16777216,num/65536#256,num/256#256,num#256)
-	q $c(num#256,num/256#256,num/65536#256,num/16777216)
-
-num2error:()
-	d error1
-	q 0
-
-;----------------------------------------------------------------------------------------------------------------------------------
-
-fatal:(msgno)
-	q msgno\8*8+4
-	;
-error1:
-	s $et="d ABORT^GDE"
-	c tempfile:delete
-	zm $$fatal(gdeerr("VERIFY")):"FAILED"
-	;
-writerec:
-	n len
-	s len=$l(rec)
-	i len<512 q
-	s len=len\512*512
-	s record=$e(rec,1,len),rec=$e(rec,len+1,MAXSTRLEN)
-	; At this point, "rec" is guaranteed to be less than 512 bytes.
-	u tempfile w record,! u @useio
-	q
-writeerr
-	u @useio
-	c tempfile:delete
-	zm gdeerr("WRITEERROR"):gdeputzs
-	q 0
diff --git a/sr_vvms/gdeverif.m b/sr_vvms/gdeverif.m
deleted file mode 100644
index 50f9894..0000000
--- a/sr_vvms/gdeverif.m
+++ /dev/null
@@ -1,231 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2006, 2013 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-verify:	;implement the verb: VERIFY, also invoked from show and GDEGET
-ALL()	;external
-	n verified,gqual s verified=1
-	s gqual="NAME" d ALLNAM
-	s gqual="GBLNAME" d ALLGBL
-	s gqual="REGION" d ALLREG,usereg
-	s gqual="SEGMENT" d ALLSEG,useseg
-	d ALLTEM
-	zm gdeerr("VERIFY"):$s(verified:"OK",1:"FAILED") w !
-	q verified
-
-;-----------------------------------------------------------------------------------------------------------------------------------
-; called from GDEPARSE.M
-
-ALLNAM
-	n NAME,hassubs s NAME="",hassubs=0
-	f  s NAME=$o(nams(NAME)) q:'$zl(NAME)  d name1  i +$g(nams(NAME,"NSUBS")) s hassubs=1
-	; if using subscripted names, check that all regions where a globals spans has STDNULLCOLL set to TRUE
-	i hassubs d
-	. n map,currMap,nextMap,nextMapHasSubs,reg,gblname,mapreg
-	. d NAM2MAP^GDEMAP
-	. s currMap="",nextMap="",nextMapHasSubs=0
-	. f  s currMap=$o(map(currMap),-1) q:currMap="#)"  d
-	. . s hassubs=$zf(currMap,ZERO,0)
-	. . ; Check if current map entry has subscripts. If so this map entry should have STDNULLCOLL set.
-	. . ; Also check if next map entry had subscripts. If so this map entry should have STDNULLCOLL set
-	. . ; 	That is because a portion of the global in the next map entry lies in the current map entry region.
-	. . i (hassubs!nextMapHasSubs) d
-	. . . ; check if region has STDNULLCOLL defined to true
-	. . . s reg=map(currMap)
-	. . . i '+$g(regs(reg,"STDNULLCOLL")) d
-	. . . . s verified=0
-	. . . . i nextMapHasSubs d
-	. . . . . s gblname=$ze(nextMap,1,nextMapHasSubs-2)
-	. . . . . i '$d(mapreg(reg,gblname)) zm gdeerr("STDNULLCOLLREQ"):reg:"^"_gblname s mapreg(reg,gblname)=""
-	. . . . i hassubs d
-	. . . . . s gblname=$ze(currMap,1,hassubs-2)
-	. . . . . i '$d(mapreg(reg,gblname)) zm gdeerr("STDNULLCOLLREQ"):reg:"^"_gblname s mapreg(reg,gblname)=""
-	. . s nextMapHasSubs=hassubs,nextMap=currMap
-	q
-ALLGBL
-	n GBLNAME s GBLNAME=""
-	f  s GBLNAME=$o(gnams(GBLNAME)) q:""=GBLNAME  d gblname1
-	q
-ALLREG
-	n REGION s REGION=""
-	f  s REGION=$o(regs(REGION)) q:'$l(REGION)  d region1
-	q
-ALLSEG
-	n SEGMENT s SEGMENT=""
-	f  s SEGMENT=$o(segs(SEGMENT)) q:'$l(SEGMENT)  d seg1
-; No duplicate region->segment mappings
-	n refdyns s s=""
-	f  s s=$o(regs(s)) q:'$l(s)  d:$d(refdyns(regs(s,"DYNAMIC_SEGMENT"))) dupseg s refdyns(regs(s,"DYNAMIC_SEGMENT"),s)=""
-; No duplicate segment->file mappings
-	n reffils
-	f  s s=$o(segs(s)) q:'$l(s)  d:$d(reffils(segs(s,"FILE_NAME"))) dupfile s reffils(segs(s,"FILE_NAME"),s)=""
-	q
-NAME
-	i '$d(nams(NAME)) k verified d  q
-	. zm $$info(gdeerr("OBJNOTFND")):"Name":$s(NAME'="#":$$namedisp^GDESHOW(NAME,0),1:"Local Locks")
-name1:	i '$d(regs(nams(NAME))) d
-	. s verified=0
-	. zm gdeerr("MAPBAD"):"Region":nams(NAME):"Name":$s(NAME'="#":$$namedisp^GDESHOW(NAME,0),1:"Local Locks")
-	q
-GBLNAME
-	i '$d(gnams(GBLNAME)) k verified zm $$info(gdeerr("OBJNOTFND")):"Global Name":GBLNAME q
-gblname1:
-	n s,sval,errissued s s=""
-	f  s s=$o(gnams(GBLNAME,s)) q:""=s  s sval=gnams(GBLNAME,s) d
-	. s errissued=0
-	. i $d(mingnam(s)),mingnam(s)>sval s errissued=1 zm gdeerr("VALTOOSMALL"):sval:mingnam(s):s
-	. i $d(maxgnam(s)),maxgnam(s)<sval s errissued=1 zm gdeerr("VALTOOBIG"):sval:maxgnam(s):s
-	. i errissued s verified=0 zm gdeerr("GBLNAMEIS"):GBLNAME
-	. i (s="COLLATION") d
-	. . i $d(gnams(GBLNAME,"COLLVER")) d
-	. . . d chkcoll^GDEPARSE(sval,GBLNAME,gnams(GBLNAME,"COLLVER"))
-	. . e  d chkcoll^GDEPARSE(sval,GBLNAME)
-	; now that all gblnames and names have been read, do some checks between them
-	; ASSERT : i $d(namrangeoverlap)  zsh "*"  h
-	d gblnameeditchecks^GDEPARSE("*",0)	; check all name specifications are good given the gblname collation settings
-	; ASSERT : i $d(namrangeoverlap)  zsh "*"  h
-	q
-REGION
-	i '$d(regs(REGION)) k verified zm $$info(gdeerr("OBJNOTFND")):"Region":REGION q
-region1:	i '$d(segs(regs(REGION,"DYNAMIC_SEGMENT"))) s verified=0
-	i  zm gdeerr("MAPBAD"):"Dynamic segment":regs(REGION,"DYNAMIC_SEGMENT"):"Region":REGION q
-	n rquals s s=""
-	f  s s=$o(regs(REGION,s)) q:'$l(s)  s rquals(s)=regs(REGION,s)
-	f  s s=$o(minreg(s)) q:'$l(s)  i '$d(rquals(s)) s verified=0 zm $$info(gdeerr("QUALREQD")):s,gdeerr("REGIS"):REGION
-	f  s s=$o(maxreg(s)) q:'$l(s)  i '$d(rquals(s)) s verified=0 zm $$info(gdeerr("QUALREQD")):s,gdeerr("REGIS"):REGION
-	s x=$$RQUALS(.rquals)
-	q
-SEGMENT
-	i '$d(segs(SEGMENT)) k verified zm $$info(gdeerr("OBJNOTFND")):"Segment":SEGMENT q
-seg1:	i '$d(segs(SEGMENT,"ACCESS_METHOD")) s verified=0 zm $$info(gdeerr("QUALREQD")):"Access method",gdeerr("SEGIS"):"":SEGMENT q
-	s am=segs(SEGMENT,"ACCESS_METHOD")
-	n squals s s=""
-	f  s s=$o(segs(SEGMENT,s)) q:'$l(s)  s squals(s)=segs(SEGMENT,s)
-	f  s s=$o(minseg(am,s)) q:'$l(s)  i '$d(squals(s)) s verified=0 zm $$info(gdeerr("QUALREQD")):s,gdeerr("SEGIS"):am:SEGMENT
-	f  s s=$o(maxseg(am,s)) q:'$l(s)  i '$d(squals(s)) s verified=0 zm $$info(gdeerr("QUALREQD")):s,gdeerr("SEGIS"):am:SEGMENT
-	s x=$$SQUALS(am,.squals)
-	q
-usereg:	n REGION,NAME s REGION=""
-	f  s REGION=$o(regs(REGION)) q:'$l(REGION)  d usereg1
-	q
-usereg1:	s NAME=""
-	f  s NAME=$o(nams(NAME)) q:$g(nams(NAME))=REGION!'$l(NAME)
-	i '$l(NAME) s verified=0 zm gdeerr("MAPBAD"):"A":"NAME":"REGION":REGION
-	q
-useseg:	n SEGMENT,REGION s SEGMENT=""
-	f  s SEGMENT=$o(segs(SEGMENT)) q:'$l(SEGMENT)  d useseg1
-	q
-useseg1:	s REGION=""
-	f  s REGION=$o(regs(REGION)) q:$g(regs(REGION,"DYNAMIC_SEGMENT"))=SEGMENT!'$l(REGION)
-	i '$l(REGION) s verified=0 zm gdeerr("MAPBAD"):"A":"REGION":"SEGMENT":SEGMENT
-	q
-;-----------------------------------------------------------------------------------------------------------------------------------
-; routine services
-
-info:(mesno)
-	q mesno\8*8+3
-	;
-dupseg:	s verified=0
-	zm gdeerr("MAPDUP"):"Regions":$o(refdyns(regs(s,"DYNAMIC_SEGMENT"),"")):s:"Dynamic segment":regs(s,"DYNAMIC_SEGMENT")
-	q
-dupfile:	s verified=0
-	zm gdeerr("MAPDUP"):"Dynamic segments":$o(reffils(segs(s,"FILE_NAME"),"")):s:"File":segs(s,"FILE_NAME")
-	q
-ALLTEM
-	s x=$$TRQUALS(.tmpreg)
-	; The change is for TR C9E02-002518, any template command updates only active segment
-	; so verify only that segment with template region, not all segments
-	d tmpseg
-	q
-tmpseg:	n squals s s=""
-	f  s s=$o(tmpseg(am,s)) q:'$l(s)  s squals(s)=tmpseg(am,s)
-	s x=$$TSQUALS(am,.squals)
-	q
-regelm:	i s'="DYNAMIC_SEGMENT",'$d(tmpreg(s)) zm $$info(gdeerr("QUALBAD")):s
-	e  i $d(minreg(s)),minreg(s)>rquals(s) zm gdeerr("VALTOOSMALL"):rquals(s):minreg(s):s
-	e  i $d(maxreg(s)),maxreg(s)<rquals(s) zm gdeerr("VALTOOBIG"):rquals(s):maxreg(s):s
-	i  s verified=0 zm gdeerr("REGIS"):REGION
-	q
-segelm:	i s'="FILE_NAME",'$l(tmpseg(am,s)) zm $$info(gdeerr("QUALBAD")):s
-	e  i $d(minseg(am,s)),minseg(am,s)>squals(s) zm gdeerr("VALTOOSMALL"):squals(s):minseg(am,s):s
-	e  i $d(maxseg(am,s)),maxseg(am,s)<squals(s) zm gdeerr("VALTOOBIG"):squals(s):maxseg(am,s):s
-	i  s verified=0 zm gdeerr("SEGIS"):am:SEGMENT
-	q
-rec2blk:	s y=s-f-SIZEOF("blk_hdr")
-	i x>y s verified=0 zm gdeerr("RECSIZIS"):x,gdeerr("REGIS"):REGION,gdeerr("RECTOOBIG"):s:f:y,gdeerr("SEGIS"):am:SEGMENT
-	q
-buf2blk:	i REGION="TEMPLATE" q
-	i "USER"[am s verified=0 zm gdeerr("NOJNL"):am,gdeerr("REGIS"):REGION,gdeerr("SEGIS"):am:SEGMENT
-	s y=s/256
-	i y>x s verified=0 zm gdeerr("BUFSIZIS"):x,gdeerr("REGIS"):REGION,gdeerr("BUFTOOSMALL"):s:y,gdeerr("SEGIS"):am:SEGMENT
-	q
-mmbichk:	i REGION="TEMPLATE",am="MM",tmpacc'="MM" q
-	i am="MM" s verified=0 zm gdeerr("MMNOBEFORIMG"),gdeerr("REGIS"):REGION,gdeerr("SEGIS"):am:SEGMENT
-	q
-
-;-----------------------------------------------------------------------------------------------------------------------------------
-; called from GDEADD.M and GDECHANG.M
-
-RQUALS(rquals)
-	i '$d(verified) n verified s verified=1
-	s s=""
-	f  s s=$o(rquals(s)) q:'$l(s)  d regelm
-	i $d(rquals("FILE_NAME")),$l(rquals("FILE_NAME"))>(SIZEOF("file_spec")-1) s verified=0
-	i  zm $$info(gdeerr("VALTOOLONG")):rquals("FILE_NAME"):SIZEOF("file_spec")-1:"Journal filename",gdeerr("REGIS"):REGION
-	s s="KEY_SIZE",s=$s($d(rquals(s)):rquals(s),$d(regs(REGION,s)):regs(REGION,s),1:tmpreg(s))
-	s x="RECORD_SIZE",x=$s($d(rquals(x)):rquals(x),$d(regs(REGION,x)):regs(REGION,x),1:tmpreg(x))
-	i s+4>x s verified=0 zm gdeerr("KEYSIZIS"):s,gdeerr("KEYTOOBIG"):x:x-4,gdeerr("REGIS"):REGION
-	i REGION="TEMPLATE" s s=tmpseg(tmpacc,"BLOCK_SIZE"),f=tmpseg(tmpacc,"RESERVED_BYTES")
-	; note "else" used in two consecutive lines intentionally (instead of using a do block inside one else).
-	; this is because we want the QUIT to quit out of RQUALS and the NEW of SEGMENT,am to happen at the RQUALS level.
-	e  s s="DYNAMIC_SEGMENT",s=$s($d(rquals(s)):rquals(s),$d(regs(REGION,s)):regs(REGION,s),1:0)
-	e  q:'$d(segs(s)) verified n SEGMENT,am d
-	. s SEGMENT=s,am=segs(s,"ACCESS_METHOD"),s=$g(segs(s,"BLOCK_SIZE")),f=$g(segs(s,"RESERVED_BYTES"))
-	i am'="USER" d rec2blk
-	s x="JOURNAL"
-	i '$s('$d(rquals(x)):tmpreg(x),1:rquals(x)) q verified
-	s x="BUFFER_SIZE",x=$s($d(rquals(x)):rquals(x),$d(regs(REGION,x)):regs(REGION,x),1:tmpreg(x)) d buf2blk
-	i nommbi s x="BEFORE_IMAGE" i $s('$d(rquals(x)):tmpreg(x),1:rquals(x)) d mmbichk
-	q verified
-	;
-SQUALS(am,squals)
-	i '$d(verified) n verified s verified=1
-	n s s s=""
-	f  s s=$o(squals(s)) q:'$l(s)  i $l(squals(s)) d segelm
-	s s="BLOCK_SIZE"
-	i $d(squals(s)),squals(s)#512 s x=squals(s),squals(s)=x\512+1*512
-	i  zm gdeerr("BLKSIZ512"):x:squals(s),gdeerr("SEGIS"):am:SEGMENT
-	s s="WINDOW_SIZE"
-	i SEGMENT="TEMPLATE" s x=tmpreg("RECORD_SIZE") d segreg q verified
-	n REGION s REGION=""
-	f  s REGION=$o(regs(REGION)) q:'$l(REGION)  d
-	. i regs(REGION,"DYNAMIC_SEGMENT")=SEGMENT s s=regs(REGION,"RECORD_SIZE") d segreg
-	q verified
-segreg:
-	i am'="USER" d
-	. s s="BLOCK_SIZE",s=$s($d(squals(s)):squals(s),$d(segs(SEGMENT,s)):segs(SEGMENT,s),1:tmpseg(am,s))
-	. s f="RESERVED_BYTES",f=$s($d(squals(f)):squals(f),$d(segs(SEGMENT,s)):seg(SEGMENT,f),1:tmpseg(am,f))
-	. s x="RECORD_SIZE",x=$s($d(regs(REGION,x)):regs(REGION,x),1:tmpreg(x))
-	. d rec2blk
-	i '$s(SEGMENT="TEMPLATE":0,1:regs(REGION,"JOURNAL")) q
-	s x=$s(SEGMENT="TEMPLATE":tmpreg("BUFFER_SIZE"),1:regs(REGION,"BUFFER_SIZE")) d buf2blk
-	i nommbi,$s(SEGMENT="TEMPLATE":0,1:regs(REGION,"BEFORE_IMAGE")) d mmbichk
-	q
-
-;-----------------------------------------------------------------------------------------------------------------------------------
-; called from GDETEMPL.M
-
-TRQUALS(rquals)
-	n REGION,SEGMENT,am s (REGION,SEGMENT)="TEMPLATE",am=tmpacc
-	q $$RQUALS(.rquals)
-	;
-TSQUALS(am,squals)
-	n REGION,SEGMENT s (REGION,SEGMENT)="TEMPLATE"
-	q $$SQUALS(am,.squals)
-
diff --git a/sr_vvms/gds_file_size.c b/sr_vvms/gds_file_size.c
deleted file mode 100644
index 48f95aa..0000000
--- a/sr_vvms/gds_file_size.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gtmmsg.h"
-
-error_def(ERR_DBFILOPERR);
-
-/* If a routine other than mupip integ uses this module, the interface and error reporting may need to change. */
-gtm_uint64_t gds_file_size(file_control *fc)
-{
-	vms_gds_info	*gds_info;
-	uint4		status;
-	unsigned int	ret_size;
-	struct FAB	fab;
-	struct XABFHC	xab;
-
-	gds_info = (vms_gds_info *)fc->file_info;
-	if (gds_info->xabfhc)
-	{	/* if sys$open fails, we will be returning xab$l_ebk that was prior existing and printing an error message. */
-		ret_size = gds_info->xabfhc->xab$l_ebk;
-
-		fab		= cc$rms_fab;
-		xab		= cc$rms_xabfhc;
-		fab.fab$l_xab	= &xab;
-		fab.fab$l_fna	= gds_info->fab->fab$l_fna;
-		fab.fab$b_fns	= gds_info->fab->fab$b_fns;
-		fab.fab$b_fac	= FAB$M_GET;
-		fab.fab$b_shr   = FAB$M_SHRPUT | FAB$M_SHRGET;
-		if (RMS$_NORMAL == (status = sys$open(&fab)))
-		{
-			ret_size = xab.xab$l_ebk;
-			status = sys$close(&fab);
-		}
-		if (RMS$_NORMAL != status)
-			gtm_putmsg(VARLSTCNT(8) ERR_DBFILOPERR, 2, FAB_LEN_STR(&fab), 0, status);
-	} else
-		ret_size = 0;
-	return (gtm_uint64_t)ret_size;
-}
diff --git a/sr_vvms/gds_rundown.c b/sr_vvms/gds_rundown.c
deleted file mode 100644
index 4eed2f9..0000000
--- a/sr_vvms/gds_rundown.c
+++ /dev/null
@@ -1,586 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <fab.h>
-#include <lckdef.h>
-#include <iodef.h>
-#include <psldef.h>
-#include <secdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gtm_time.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ast.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "cdb_sc.h"
-#include "efn.h"
-#include "jnl.h"
-#include "timers.h"
-#include "error.h"
-#include "iosp.h"
-#include "locks.h"
-#include "util.h"
-#include "send_msg.h"
-#include "change_reg.h"
-#include "is_proc_alive.h"
-#include "del_sec.h"
-#include "mem_list.h"
-#include "gvusr.h"
-#include "gtmmsg.h"
-#include "wcs_recover.h"
-#include "wcs_flu.h"
-#include "gtmimagename.h"
-#include "iosb_disk.h"
-#include "wbox_test_init.h"
-#include "shmpool.h"	/* needed for shmpool structures */
-
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	sgmnt_addrs		*cs_addrs;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF	int4			exi_condition;
-GBLREF	uint4			image_count, process_id;
-GBLREF	short			crash_count, astq_dyn_avail;
-GBLREF	boolean_t       	is_src_server;
-GBLREF	boolean_t		is_rcvr_server;
-GBLREF	boolean_t		is_updproc;
-GBLREF  boolean_t		mupip_jnl_recover;
-GBLREF	jnl_process_vector	*originator_prc_vec;
-GBLREF	jnl_process_vector	*prc_vec;
-GBLREF 	jnl_gbls_t		jgbl;
-GBLREF	boolean_t		mu_rndwn_process;
-GBLREF	boolean_t		dse_running;
-#ifdef DEBUG
-GBLREF	boolean_t		in_mu_rndwn_file;
-#endif
-
-LITREF	char			gtm_release_name[];
-LITREF	int4			gtm_release_name_len;
-
-static	const	unsigned short	zero_fid[3];
-
-error_def(ERR_ASSERT);
-error_def(ERR_CRITRESET);
-error_def(ERR_DBRNDWN);
-error_def(ERR_DBRNDWNWRN);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_IPCNOTDEL);
-error_def(ERR_JNLFLUSH);
-error_def(ERR_OUTOFSPACE);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_TEXT);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(gds_rundown_ch)
-{
-	vms_gds_info		*gds_info;
-	jnl_private_control	*jpc = NULL;
-	uint4			outaddrs[2], retadr[2], status;
-	boolean_t		nonclst_bg;
-
-        START_CH(FALSE);
-
-	if (PRO_ONLY(mu_rndwn_process &&) DUMPABLE && !SUPPRESS_DUMP)
-		TERMINATE;
-	/* deq all the locks, so it wont affect other processes */
-	gds_info = gv_cur_region->dyn.addr->file_cntl->file_info;
-	cs_addrs = &gds_info->s_addrs;
-	DEBUG_ONLY(in_mu_rndwn_file = FALSE);
-	TREF(donot_write_inctn_in_wcs_recover) = FALSE; /* might have been set to TRUE in mu_rndwn_file(). */
-	if (cs_addrs)
-	{
-		if (cs_addrs->now_crit)
-			rel_crit(gv_cur_region);
-		jpc = cs_addrs->jnl;
-	}
-	if (jpc && jpc->jnllsb && 0 != jpc->jnllsb->lockid)
-	{
-		status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		jpc->jnllsb->lockid = 0;
-	}
-	if (0 != gds_info->cx_cntl_lsb.lockid)
-	{
-		status = gtm_deq(gds_info->cx_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		gds_info->cx_cntl_lsb.lockid = 0;
-	}
-	if (0 != gds_info->file_cntl_lsb.lockid)
-	{
-		status = gtm_deq(gds_info->file_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		gds_info->file_cntl_lsb.lockid = 0;
-	}
-
-	/* -------------------------- take care of address space ------------------------- */
-	if (cs_addrs)
-	{
-		if (cs_addrs->hdr)
-		{
-			nonclst_bg = (dba_bg == cs_addrs->hdr->acc_meth);
-			if (FALSE == nonclst_bg)
-			{
-				cs_addrs->lock_addrs[1] = (sm_uc_ptr_t)(cs_addrs->nl) + ROUND_UP(LOCK_SPACE_SIZE(cs_addrs->hdr)
-								+ NODE_LOCAL_SPACE(cs_addrs->hdr) + JNL_SHARE_SIZE(cs_addrs->hdr)
-								+ SHMPOOL_BUFFER_SIZE + 1, OS_PAGE_SIZE) + 1;
-				cs_addrs->lock_addrs[0] = (sm_uc_ptr_t)(cs_addrs->nl);
-				if (FALSE == is_va_free(cs_addrs->lock_addrs[0]))
-					gtm_deltva(cs_addrs->lock_addrs, retadr, PSL$C_USER);
-			}
-		}
-		outaddrs[0] = cs_addrs->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-		outaddrs[1] = cs_addrs->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-		if (FALSE == is_va_free(outaddrs[0]))
-			gtm_deltva(outaddrs, retadr, PSL$C_USER);
-	}
-
-	sys$dassgn(gds_info->fab->fab$l_stv);
-	gv_cur_region->open = FALSE;
-	if (cs_addrs)
-	{
-		cs_addrs->hdr = NULL;
-		cs_addrs->nl = NULL;
-		REMOVE_CSA_FROM_CSADDRSLIST(cs_addrs);	/* remove "cs_addrs" from list of open regions (cs_addrs_list) */
-		cs_addrs->db_addrs[0] = NULL;
-		cs_addrs->lock_addrs[0] = NULL;
-	}
-        PRN_ERROR;
-	gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_DBRNDWN, 2, REG_LEN_STR(gv_cur_region));
-        UNWIND(NULL, NULL);
-}
-
-void	gds_rundown(void)
-{
-	bool			nonclst_bg, clustered, read_write;
-	char			name_buff[GLO_NAME_MAXLEN];
-	io_status_block_disk	iosb;
-	uint4			jnl_status, last_one_status, outaddrs[2], retadr[2], status, we_are_last_writer;
-	vms_gds_info		*gds_info;
-	boolean_t		ipc_deleted, remove_shm, cancelled_timer, cancelled_dbsync_timer, vermismatch;
-	now_t			now; 						/* for GET_CUR_TIME macro*/
-	char			*time_ptr, time_str[CTIME_BEFORE_NL + 2]; 	/* for GET_CUR_TIME macro*/
-	jnl_private_control	*jpc;
-	jnl_buffer_ptr_t	jbp;
-	$DESCRIPTOR(desc, name_buff);
-
-	jnl_status = 0;
-	if (!gv_cur_region->open)
-		return;
-	if (dba_usr == gv_cur_region->dyn.addr->acc_meth)
-	{
-		change_reg();
-		gvusr_rundown();
-		return;
-	}
-	if ((dba_bg != gv_cur_region->dyn.addr->acc_meth) && (dba_mm != gv_cur_region->dyn.addr->acc_meth))
-		return;
-	ESTABLISH(gds_rundown_ch);
-	gds_info = gv_cur_region->dyn.addr->file_cntl->file_info;
-	cs_addrs = &gds_info->s_addrs;
-	assert(cs_data == cs_addrs->hdr);
-	clustered = cs_addrs->hdr->clustered;
-	crash_count = cs_addrs->critical->crashcnt;
-	last_one_status = we_are_last_writer = FALSE;
-	nonclst_bg = (dba_bg == cs_addrs->hdr->acc_meth);
-	read_write = (FALSE == gv_cur_region->read_only);
-	if (!cs_addrs->persistent_freeze)
-		region_freeze(gv_cur_region, FALSE, FALSE, FALSE);
-	if (ERR_CRITRESET != exi_condition)
-		rel_crit(gv_cur_region);
-	sys$cantim(gv_cur_region, PSL$C_USER);	/* cancel all database write timers and jnl_mm_timer()s for this region */
-	cancelled_timer = FALSE;
-	if (cs_addrs->timer)
-	{
-		adawi(-1, &cs_addrs->nl->wcs_timers);
-		cs_addrs->timer = FALSE;
-		cancelled_timer = TRUE;
-		++astq_dyn_avail;
-	}
-	/* The order of resetting cs_addrs->dbsync_timer and the sys$cantim(cs_addrs) following it is important.
-	 * This is because once dbsync_timer is set to FALSE, both wcs_clean_dbsync_timer_ast and wcs_clean_dbsync_ast
-	 * 	know not to proceed with the dbsync any further.
-	 * If we cancelled the timer first, then it is possible that before resetting dbsync_timer to FALSE, we
-	 *	got interrupted by wcs_clean_dbsync_timer_ast which might then set off a timer to drive
-	 *	wcs_clean_dbsync_ast only to have dbsync_timer reset to FALSE by the next statement in gds_rundown()
-	 *	effectively ending up in a situation where we will have an orphaned wcs_clean_dbsync_ast timer pop
-	 *	much later after the region has been rundown which we don't want.
-	 */
-	cancelled_dbsync_timer = FALSE;
-	if (cs_addrs->dbsync_timer)
-	{
-		cs_addrs->dbsync_timer = FALSE;
-		cancelled_dbsync_timer = TRUE;
-		++astq_dyn_avail;
-	}
-	sys$cantim(cs_addrs, PSL$C_USER);	/* cancel all epoch-timers for this region */
-	jpc = cs_addrs->jnl;
-	if (JNL_ENABLED(cs_addrs->hdr) && IS_GTCM_GNP_SERVER_IMAGE);
-		originator_prc_vec = NULL;
-	if (memcmp(cs_addrs->nl->now_running, gtm_release_name, gtm_release_name_len + 1))
-	{	/* VERMISMATCH condition. Possible only if DSE */
-		assert(dse_running);
-		vermismatch = TRUE;
-	} else
-		vermismatch = FALSE;
-	if (TRUE == clustered)
-	{
-		nonclst_bg = FALSE;
-		if (JNL_ENABLED(cs_addrs->hdr) && (NULL != jpc) && (NOJNL != jpc->channel)
-			&& (0 != memcmp(cs_addrs->nl->jnl_file.jnl_file_id.fid, zero_fid, SIZEOF(zero_fid))))
-		{
-			if (0 != jpc->pini_addr)
-			{
-				grab_crit(gv_cur_region);
-				if (JNL_ENABLED(cs_addrs->hdr))
-				{
-					jnl_status = jnl_ensure_open();
-					if (jnl_status == 0)
-					{
-						jnl_put_jrt_pfin(cs_addrs);
-						if (SS_NORMAL != (jnl_status = jnl_flush(gv_cur_region)))
-						{
-							send_msg_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_JNLFLUSH, 2,
-								JNL_LEN_STR(cs_data), ERR_TEXT, 2,
-								RTS_ERROR_TEXT("Error with journal flush in gds_rundown1"),
-								jnl_status);
-							assert(NOJNL == jpc->channel);/* jnl file lost has been triggered */
-							/* In this routine, all code that follows from here on does not
-							 * assume anything about the journaling characteristics of this
-							 * database so it is safe to continue execution even though
-							 * journaling got closed in the middle.
-							 */
-						}
-					}
-				}
-				rel_crit(gv_cur_region);
-			}
-			if (!is_src_server)
-			{
-				assert(0 != jpc->jnllsb->lockid);
-				status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-				assert(SS$_NORMAL == status);
-				jpc->jnllsb->lockid = 0;
-			}
-			sys$dassgn(jpc->channel);
-		}
-	} else
-	{	/* ----------------------------- acquire startup/shutdown lock ---------------------------------- */
-		/* Acquire PW mode to ensure that this is the only process in this section of the rundown code.
-		 * Then attempt to get EX mode;  if granted, then this process is the only process accessing the
-		 * database, and cache rundown and header flushing should occur.  Use the NOQUEUE flag so that
-		 * we don't have to wait for the lock.
-		 */
-		status = gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, &gds_info->file_cntl_lsb, LCK$M_CONVERT | LCK$M_NODLCKBLK,
-			NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = gds_info->file_cntl_lsb.cond;
-		if (SS$_NORMAL == status)
-		{
-			status = gtm_enqw(EFN$C_ENF, LCK$K_EXMODE, &gds_info->file_cntl_lsb,
-						LCK$M_CONVERT | LCK$M_NOQUEUE | LCK$M_NODLCKWT,
-						NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-			if ((SS$_NORMAL == status) && !vermismatch)
-				last_one_status = status = gds_info->file_cntl_lsb.cond;
-		}
-		if (read_write)
-		{
-			assert(cs_addrs->nl->ref_cnt > 0);
-			assert(cs_addrs->ref_cnt);
-			/* The primary purpose of the shared ref_cnt flag is to indicate whether we are the last writer.
-			 * The private ref_cnt and shared ref_cnt should always be updated in the following order.
-			 * While incrementing, shared ref_cnt should be updated first
-			 * While decrementing, shared ref_cnt should be updated last
-			 * This way, it is guaranteed that whenever the private ref_cnt is TRUE, this process
-			 * 	definitely has incremented the shared ref_cnt.
-			 * The only issue with this is that it is possible that the shared ref_cnt has been incremented
-			 * 	although the private ref_cnt has not been (due to STOP/ID or kill -9) or when the private
-			 * 	ref_cnt has been decremented, while the shared ref_cnt has not been.
-			 * In this case, the actual last writer might conclude he is not actually the last writer and
-			 * 	hence might not do the necessary cleanup (like writing an EOF record in the journal file etc.)
-			 * 	although a later MUPIP RUNDOWN will take care of doing the necessary stuff.
-			 * If the ordering of updates of the shared and private ref_cnt were reversed, we have the issue of
-			 * 	some process incorrectly concluding itself as the last writer and doing cleanup when it
-			 * 	should not be doing so. That is dangerous and can cause damage to the database/journal.
-			 */
-			if (cs_addrs->ref_cnt)
-			{
-				cs_addrs->ref_cnt--;
-				assert(!cs_addrs->ref_cnt);
-				adawi(-1, &cs_addrs->nl->ref_cnt);
-			}
-		}
-		/* ------------------------------ flush if applicable ------------------------------------------
-		 * If cs_addrs->nl->donotflush_dbjnl is set, it means mupip recover/rollback was interrupted and therefore we
-		 * 	should not flush shared memory contents to disk as they might be in an inconsistent state.
-		 * In this case, we will go ahead and remove shared memory (without flushing the contents) in this routine.
-		 * A reissue of the recover/rollback command will restore the database to a consistent state.
-		 */
-		if (read_write && !cs_addrs->nl->donotflush_dbjnl && !vermismatch)
-		{
-			if (cs_addrs->nl->ref_cnt < 1)
-			{	/* since csa->nl->ref_cnt is not an accurate indicator of whether we are the last writer or not,
-				 * we need to be careful before modifying any shared memory fields below, hence the grab_crit */
-				grab_crit(gv_cur_region);
-				cs_addrs->nl->ref_cnt = 0;	/* just in case for pro */
-				we_are_last_writer = TRUE;
-				/* ========================= laster writer in this region ================= */
-				if (nonclst_bg)
-				{	/* Note WCSFLU_SYNC_EPOCH ensures the epoch is synced to the journal and indirectly
-					 * also ensures that the db is fsynced. We don't want to use it in the calls to
-					 * wcs_flu() from t_end() and tp_tend() since we can defer it to out-of-crit there.
-					 * In this case, since we are running down, we don't have any such option.
-					 */
-					cs_addrs->nl->remove_shm =
-							wcs_flu(WCSFLU_FLUSH_HDR | WCSFLU_WRITE_EPOCH | WCSFLU_SYNC_EPOCH);
-				}
-				assert(0 == memcmp(cs_addrs->hdr->label, GDS_LABEL, GDS_LABEL_SZ - 1));
-				cs_addrs->hdr->owner_node = 0;
-				memset(cs_addrs->hdr->now_running, 0, SIZEOF(cs_addrs->hdr->now_running));
-				if (nonclst_bg)
-				{
-					sys$qiow(EFN$C_ENF, gds_info->fab->fab$l_stv, IO$_WRITEVBLK, &iosb, NULL, 0,
-							cs_addrs->hdr, SIZEOF(sgmnt_data), 1, 0, 0, 0);
-				} else
-				{
-					if (SS$_NORMAL == sys$updsec(cs_addrs->db_addrs, NULL, PSL$C_USER, 0,
-							efn_immed_wait, &iosb, NULL, 0))
-					{
-						cs_addrs->nl->remove_shm = TRUE;
-						sys$synch(efn_immed_wait, &iosb);
-					}
-				}
-				rel_crit(gv_cur_region);
-			} else if ((cancelled_timer && (0 > cs_addrs->nl->wcs_timers)) || cancelled_dbsync_timer)
-			{	/* cancelled pending db or jnl flush timers - flush database and journal buffers to disk */
-				grab_crit(gv_cur_region);
-				/* we need to sync the epoch as the fact that there is no active pending flush timer implies
-				 * there will be noone else who will flush the dirty buffers and EPOCH to disk in a timely fashion
-				 */
-				wcs_flu(WCSFLU_FLUSH_HDR | WCSFLU_WRITE_EPOCH | WCSFLU_SYNC_EPOCH);
-				rel_crit(gv_cur_region);
-			}
-			if (JNL_ENABLED(cs_addrs->hdr)
-				&& ((NOJNL != jpc->channel) && !JNL_FILE_SWITCHED(jpc)
-                                || (we_are_last_writer
-					&& (0 != memcmp(cs_addrs->nl->jnl_file.jnl_file_id.fid, zero_fid, SIZEOF(zero_fid))))))
-			{	/* We need to close the journal file cleanly if we have the latest generation journal file open
-				 *	or if we are the last writer and the journal file is open in shared memory (not necessarily
-				 *	by ourselves e.g. the only process that opened the journal got shot abnormally)
-				 * Note: we should not rely on the shared memory value of csa->nl->jnl_file.jnl_file_id
-				 * 	if we are not the last writer as it can be concurrently updated.
-				 */
-				grab_crit(gv_cur_region);
-				if (JNL_ENABLED(cs_addrs->hdr))
-				{
-					/* jnl_ensure_open/set_jnl/jnl_file_close/jnl_put_jrt_pini/pfin need it */
-					SET_GBL_JREC_TIME;
-					/* Before writing to jnlfile, adjust jgbl.gbl_jrec_time if needed to maintain time order
-					 * of jnl records. This needs to be done BEFORE the jnl_ensure_open as that could write
-					 * journal records (if it decides to switch to a new journal file).
-					 */
-					jbp = jpc->jnl_buff;
-					ADJUST_GBL_JREC_TIME(jgbl, jbp);
-					if (!we_are_last_writer || is_src_server)
-					{	/* last writer of this database should actually execute the "else" part which calls
-						 * set_jnl_file_close(), but if it happens to be the source server, then we should
-						 * not go there because set_jnl_file_close() does gtm_enq and gtm_deq on jpc->jnllsb
-						 * and the source-server is the only one that bypasses getting those locks in
-						 * jnl_file_open. instead we call jnl_file_close() to just write an EOF record for
-						 * us.
-						 */
-						jnl_status = jnl_ensure_open();
-						if (0 == jnl_status)
-						{
-							if (!jgbl.mur_extract)
-							{
-								if (we_are_last_writer && (0 == jpc->pini_addr))
-									jnl_put_jrt_pini(cs_addrs);
-								if (0 != jpc->pini_addr)
-									jnl_put_jrt_pfin(cs_addrs);
-							}
-							if (FALSE == nonclst_bg)
-							{	/* in the case of MM, the above jnl_put_jrt_{pini,pfin}() calls
-								 * would have started timers to do jnl-qio through the call to
-								 * jnl_mm_timer() from jnl_write(). we do not want the timer routine
-								 * jnl_mm_timer_write() to pop and try dereferencing csa->jnl or
-								 * csa->nl after we have closed the journal or have detached from
-								 * this region's shared memory. cancel those timers here. Unix does
-								 * not suffer from this issue since over there, jnl_mm_timer_write()
-								 * is not region-based and hence does the proper checks on each
-								 * region before trying to dereference csa->jnl or csa->nl.
-								 */
-								sys$cantim(gv_cur_region, PSL$C_USER);
-							}
-							/* if not the last writer and no pending flush timer left,
-							 * do jnl flush now.
-							 */
-							if (!we_are_last_writer && (0 > cs_addrs->nl->wcs_timers))
-							{
-								if (SS_NORMAL != (jnl_status = jnl_flush(gv_cur_region)))
-								{
-									send_msg_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_JNLFLUSH, 2,
-										JNL_LEN_STR(cs_data), ERR_TEXT, 2,
-										RTS_ERROR_TEXT( \
-										"Error with journal flush in gds_rundown2"),
-										jnl_status);
-									/* jnl file lost has been triggered */
-									assert(NOJNL == jpc->channel);
-									/* In this routine, all code that follows from here on does
-									 * not assume anything about the journaling characteristics
-									 * of this database so it is safe to continue execution
-									 * even though journaling got closed in the middle.
-									 */
-								}
-							}
-							jnl_file_close(gv_cur_region, we_are_last_writer, FALSE);
-						}
-					} else
-					{	/* since csa->nl->ref_cnt is not a reliable indicator of last writer status, we
-						 * want to make sure any other process having this journal file open relinquishes
-						 * control of it even though "we_are_last_writer" is TRUE. hence the call to
-						 * set_jnl_file_close().  We do not check the return value below as it is not clear
-						 * what to do in case of error.
-						 */
-						status = set_jnl_file_close(SET_JNL_FILE_CLOSE_RUNDOWN);
-						assert(SS$_NORMAL == status);
-					}
-					assert(jpc->jnllsb->lockid || is_src_server || (NOJNL == jpc->channel));
-				}
-				rel_crit(gv_cur_region);
-			}
-		}
-		/* release the journal file lock if we have a non-zero jnllsb->lockid */
-		if ((NULL != jpc) && (0 != jpc->jnllsb->lockid))
-		{
-			assert(read_write);
-			status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-			assert((SS$_NORMAL == status)
-				|| (SS$_IVLOCKID == status)
-					&& gtm_white_box_test_case_enabled);
-			jpc->jnllsb->lockid = 0;
-		}
-	}
-	/* Get the remove_shm status from node_local before deleting address space of global section.
-	 * If cs_addrs->nl->donotflush_dbjnl is TRUE, it means we can safely remove shared memory without compromising data
-	 * 	integrity as a reissue of recover will restore the database to a consistent state.
-	 */
-	remove_shm = !vermismatch && (cs_addrs->nl->remove_shm || cs_addrs->nl->donotflush_dbjnl);
-	/* -------------------------- take care of address space ------------------------- */
-	if (FALSE == nonclst_bg)
-	{
-		cs_addrs->lock_addrs[1] = (sm_uc_ptr_t)(cs_addrs->nl) + ROUND_UP(LOCK_SPACE_SIZE(cs_addrs->hdr)
-						+ NODE_LOCAL_SPACE(cs_addrs->hdr) + JNL_SHARE_SIZE(cs_addrs->hdr)
-						+ SHMPOOL_BUFFER_SIZE + 1, OS_PAGE_SIZE) + 1;
-		cs_addrs->lock_addrs[0] = (sm_uc_ptr_t)(cs_addrs->nl);
-		gtm_deltva(cs_addrs->lock_addrs, retadr, PSL$C_USER);
-	}
-	outaddrs[0] = cs_addrs->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-	outaddrs[1] = cs_addrs->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-	gtm_deltva(outaddrs, retadr, PSL$C_USER);
-	/* -------------------------- take care of global section ------------------------- */
-	assert (!is_rcvr_server);
-	ipc_deleted = FALSE;
-	/* Don't dismantle global section if last writer didn't succeed in flushing the cache out */
-	if (SS$_NORMAL == last_one_status)
-	{
-		if (remove_shm)
-		{
-			global_name("GT$S", &FILE_INFO(gv_cur_region)->file_id, name_buff);
-			desc.dsc$w_length = name_buff[0];
-			desc.dsc$b_dtype = DSC$K_DTYPE_T;
-			desc.dsc$b_class = DSC$K_CLASS_S;
-			desc.dsc$a_pointer = &name_buff[1];
-			assert(!vermismatch);
-			del_sec(SEC$M_SYSGBL, &desc, NULL);
-			if (FALSE == nonclst_bg)
-			{
-				name_buff[4] = 'L';
-				del_sec(SEC$M_SYSGBL, &desc, NULL);
-			}
-			ipc_deleted = TRUE;
-		} else if (is_src_server || is_updproc)
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_DBRNDWNWRN, 4, DB_LEN_STR(gv_cur_region),
-					process_id, process_id);
-			send_msg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_DBRNDWNWRN, 4, DB_LEN_STR(gv_cur_region),
-					process_id, process_id);
-		} else
-			send_msg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_DBRNDWNWRN, 4, DB_LEN_STR(gv_cur_region),
-					process_id, process_id);
-	}
-	/* ------------------------- take care of locks ------------------------------------ */
-	if (TRUE == clustered)
-	{
-		/* Dequeue locks after delete section in ccp_close,
-		   acquire lock before create section in gvcst_init,
-		   release lock after delete section in gds_rundown */
-		status = gtm_deq(gds_info->cx_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		gds_info->cx_cntl_lsb.lockid = 0;
-		status = gtm_deq(gds_info->file_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		gds_info->file_cntl_lsb.lockid = 0;
-		ccp_sendmsg(CCTR_CLOSE, &FILE_INFO(gv_cur_region)->file_id);
-	} else
-	{
-		if (SS$_NORMAL == last_one_status)
-		{
-			gds_info->file_cntl_lsb.valblk[0] = 0;
-			gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, &gds_info->file_cntl_lsb, LCK$M_CONVERT | LCK$M_VALBLK,
-				NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		}
-		status = gtm_deq(gds_info->cx_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		gds_info->cx_cntl_lsb.lockid = 0;
-		status = gtm_deq(gds_info->file_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		gds_info->file_cntl_lsb.lockid = 0;
-	}
-	if (!ipc_deleted)
-	{
-		GET_CUR_TIME;
-		if (is_src_server)
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_IPCNOTDEL, 6, CTIME_BEFORE_NL, time_ptr,
-				LEN_AND_LIT("Source server"), REG_LEN_STR(gv_cur_region));
-		if (is_updproc)
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_IPCNOTDEL, 6, CTIME_BEFORE_NL, time_ptr,
-				LEN_AND_LIT("Update process"), REG_LEN_STR(gv_cur_region));
-		if (mupip_jnl_recover)
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_IPCNOTDEL, 6, CTIME_BEFORE_NL, time_ptr,
-				LEN_AND_LIT("Mupip journal process"), REG_LEN_STR(gv_cur_region));
-			send_msg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_IPCNOTDEL, 6, CTIME_BEFORE_NL, time_ptr,
-				LEN_AND_LIT("Mupip journal process"), REG_LEN_STR(gv_cur_region));
-		}
-	}
-	REVERT;
-	/* -------------------------- nullify pointers ------------------------------------- */
-	sys$dassgn(gds_info->fab->fab$l_stv);
-	gv_cur_region->open = FALSE;
-	cs_addrs->hdr = NULL;
-	cs_addrs->nl = NULL;
-	REMOVE_CSA_FROM_CSADDRSLIST(cs_addrs);	/* remove "cs_addrs" from list of open regions (cs_addrs_list) */
-	cs_addrs->db_addrs[0] = NULL;
-	cs_addrs->lock_addrs[0] = NULL;
-}
diff --git a/sr_vvms/gdsfheadsp.h b/sr_vvms/gdsfheadsp.h
deleted file mode 100644
index 3eafeb3..0000000
--- a/sr_vvms/gdsfheadsp.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __GDSFHEADSP_H__
-#define __GDSFHEADSP_H__
-
-int4 dsk_write(gd_region *r, block_id blk, cache_rec_ptr_t cr,
-	       void (*ast_rtn)(), int4 ast_param, io_status_block_disk *iosb);
-int4 dsk_write_nocache(gd_region *r, block_id blk, sm_uc_ptr_t buff, enum db_ver ondsk_blkver,
-		       void (*ast_rtn)(), int4 ast_param, io_status_block_disk *iosb);
-void wcs_clean_dbsync_ast(sgmnt_addrs *csa);
-void wcs_clean_dbsync_timer_ast(sgmnt_addrs *csa);
-
-#endif
diff --git a/sr_vvms/gdsfilext.c b/sr_vvms/gdsfilext.c
deleted file mode 100644
index 4b23161..0000000
--- a/sr_vvms/gdsfilext.c
+++ /dev/null
@@ -1,387 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <iodef.h>
-#include <lckdef.h>
-#include <psldef.h>
-#include <dvidef.h>
-#include <rms.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "ast.h"
-#include "buddy_list.h"
-#include "gdsroot.h"
-#include "gdskill.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbml.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "iosp.h"
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "vmsdtype.h"
-#include "locks.h"
-#include "send_msg.h"
-#include "bit_set.h"
-#include "gt_timer.h"
-#include "dbfilop.h"
-#include "disk_block_available.h"
-#include "gtmmsg.h"
-#include "gdsfilext.h"
-#include "bm_getfree.h"
-#include "gdsblk.h"		/* needed for gds_blk_downgrade.h */
-#include "gds_blk_downgrade.h"	/* for IS_GDS_BLK_DOWNGRADE_NEEDED macro */
-#include "gtmimagename.h"
-
-GBLREF	sgmnt_addrs	*cs_addrs;
-GBLREF	sgmnt_data_ptr_t cs_data;
-GBLREF	unsigned char	cw_set_depth;
-GBLREF	uint4		dollar_tlevel;
-GBLREF	gd_region	*gv_cur_region;
-GBLREF	boolean_t	mu_reorg_process;
-GBLREF	inctn_opcode_t	inctn_opcode;
-GBLREF	sgm_info	*sgm_info_ptr;
-GBLREF	unsigned int	t_tries;
-GBLREF	jnl_gbls_t	jgbl;
-GBLREF	inctn_detail_t	inctn_detail;			/* holds detail to fill in to inctn jnl record */
-GBLREF	boolean_t	gtm_dbfilext_syslog_disable;	/* control whether db file extension message is logged or not */
-
-error_def(ERR_DBFILERR);
-error_def(ERR_DBFILEXT);
-error_def(ERR_DBOPNERR);
-error_def(ERR_DSKSPACEFLOW);
-error_def(ERR_ERRCALL);
-error_def(ERR_GBLOFLOW);
-error_def(ERR_JNLFILOPN);
-error_def(ERR_JNLFLUSH);
-error_def(ERR_MUSTANDALONE);
-error_def(ERR_TEXT);
-error_def(ERR_TOTALBLKMAX);
-
-#define ERROR_CLEANUP				\
-	sys$close(&fcb);			\
-	if (FALSE == was_crit)			\
-		rel_crit(gv_cur_region);
-
-uint4 gdsfilext(uint4 blocks, uint4 filesize)
-{
-	bool			was_crit;
-	char			*buff;
-	unsigned char		*mastermap[2], *retadr[2];
-	short			iosb[4];
-	uint4			alloc_blocks, avail_blocks, new_bit_maps, blocks_needed, block_factor,
-				bplmap, jnl_status, map, new_blocks, new_total,
-				save_inctn_opcode, save_stv, status;
-	struct FAB		fcb;
-	struct RAB		rab;
-	file_control		*fc;
-	vms_gds_info		*gds_info;
-	trans_num		curr_tn;
-	int4			prev_extend_blks_to_upgrd;
-	jnl_private_control	*jpc;
-	jnl_buffer_ptr_t	jbp;
-
-	/* Both blocks and total blocks are unsigned ints so make sure we aren't asking for huge numbers that will
-	   overflow and end up doing silly things.
-	*/
-	assert(blocks <= (MAXTOTALBLKS(cs_data) - cs_data->trans_hist.total_blks));
-
-	if (0 == blocks)
-		return (NO_FREE_SPACE); /* should this be changed to show extension not enabled ? */
-	gds_info = gv_cur_region->dyn.addr->file_cntl->file_info;
-	assert(cs_data == cs_addrs->hdr);	/* because following line used to check cs_addrs->hdr (instead of cs_data) */
-	if (dba_mm == cs_data->acc_meth)
-	{	/* mm only works MUPIP standalone, but calling this keeps the logic in one place */
-		status = gtm_enqw(EFN$C_ENF, LCK$K_EXMODE, &gds_info->file_cntl_lsb,
-				LCK$M_CONVERT | LCK$M_NOQUEUE | LCK$M_NODLCKWT,
-				NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = gds_info->file_cntl_lsb.cond;
-		if (SS$_NORMAL != status)
-		{
-			gtm_putmsg(VARLSTCNT(5) ERR_MUSTANDALONE, 2, FAB_LEN_STR(&fcb), status);
-			return (NO_FREE_SPACE); /* should this be changed to show extention not enabled ? */
-		}
-	}
-	was_crit = cs_addrs->now_crit;
-	/* If we are coming from mupip_extend (which gets crit itself) we better have waited for any unfreezes to occur.
-	 * If we are coming from online rollback (when that feature is available), we will come in holding crit and in
-	 * 	the final retry. In that case too, we expect to have waited for unfreezes to occur in the caller itself.
-	 * Therefore if we are coming in holding crit from MUPIP, we expect the db to be unfrozen so no need to wait for
-	 * freeze.
-	 * If we are coming from GT.M and final retry (in which case we come in holding crit) we expect to have waited
-	 * 	for any unfreezes (by invoking tp_crit_all_regions) to occur (TP or non-TP) before coming into this
-	 *	function. However, there is one exception. In the final retry, if tp_crit_all_regions notices that
-	 *	at least one of the participating regions did ONLY READs, it will not wait for any freeze on THAT region
-	 *	to complete before grabbing crit. Later, in the final retry, if THAT region did an update which caused
-	 *	op_tcommit to invoke bm_getfree->gdsfilext, then we would have come here with a frozen region on which
-	 *	we hold crit.
-	 */
-	assert(!was_crit || !cs_data->freeze || (dollar_tlevel && (CDB_STAGNATE <= t_tries)));
-	/*
-	 * If we are in the final retry and already hold crit, it is possible that csa->nl->wc_blocked is also set to
-	 * TRUE (by a concurrent process in phase2 which encountered an error in the midst of commit and secshr_db_clnup
-	 * finished the job for it). In this case we do NOT want to invoke wcs_recover as that will update the "bt"
-	 * transaction numbers without correspondingly updating the history transaction numbers (effectively causing
-	 * a cdb_sc_blkmod type of restart). Therefore do NOT call grab_crit (which unconditionally invokes wcs_recover)
-	 * if we already hold crit.
-	 */
-	if (!was_crit)
-	{
-		for ( ; ; )
-		{
-			grab_crit(gv_cur_region);
-			if (!cs_data->freeze)
-				break;
-			rel_crit(gv_cur_region);
-			while (cs_data->freeze)
-				hiber_start(1000);
-		}
-	} else if (cs_data->freeze && dollar_tlevel)
-	{	/* We don't want to continue with file extension as explained above. Hence return with an error code which
-		 * op_tcommit will recognize (as a cdb_sc_needcrit type of restart) and restart accordingly.
-		 */
-		assert(CDB_STAGNATE <= t_tries);
-		return (uint4)(FINAL_RETRY_FREEZE_PROG);
-	}
-	assert(cs_addrs->ti->total_blks == cs_data->trans_hist.total_blks);
-	if (cs_data->trans_hist.total_blks != filesize)
-	{
-		if (FALSE == was_crit)
-			rel_crit(gv_cur_region);
-		return (SS$_NORMAL);
-	}
-	if (IS_GTM_IMAGE && (2 * (dollar_tlevel ? sgm_info_ptr->cw_set_depth : cw_set_depth) < cs_addrs->ti->free_blocks))
-	{
-		if (FALSE == was_crit)
-		{
-			rel_crit(gv_cur_region);
-			return (EXTEND_SUSPECT);
-		}
-		/* If free_blocks counter is not ok, then correct it. Do the check again. If still fails, then GTMASSERT. */
-		if (is_free_blks_ctr_ok() ||
-				(2 * (dollar_tlevel ? sgm_info_ptr->cw_set_depth : cw_set_depth) < cs_addrs->ti->free_blocks))
-			GTMASSERT;	/* held crit through bm_getfree into gdsfilext and still didn't get it right */
-	}
-	CHECK_TN(cs_addrs, cs_data, cs_data->trans_hist.curr_tn);	/* can issue rts_error TNTOOLARGE */
-	bplmap = cs_data->bplmap;
-	fcb = cc$rms_fab;
-	fcb.fab$b_shr = gds_info->fab->fab$b_shr;
-	fcb.fab$l_fna = &(gv_cur_region->dyn.addr->fname);
-	fcb.fab$b_fns = gv_cur_region->dyn.addr->fname_len;
-	fcb.fab$b_fac = FAB$M_BIO | FAB$M_GET | FAB$M_PUT;
-	fcb.fab$l_fop = FAB$M_CBT;
-	if (RMS$_NORMAL == (status = sys$open(&fcb)))
-	{
-		block_factor = cs_data->blk_size / DISK_BLOCK_SIZE;
-		if (SS$_NORMAL == (status = disk_block_available(gds_info->fab->fab$l_stv, &avail_blocks)))
-		{
-			avail_blocks /= block_factor;
-			if ((blocks * EXTEND_WARNING_FACTOR) > avail_blocks)
-			{
-				if (blocks > avail_blocks)
-				{
-					send_msg(VARLSTCNT(11) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb),
-						ERR_ERRCALL, 3, CALLFROM);
-					ERROR_CLEANUP;
-					return (NO_FREE_SPACE);
-				}
-				send_msg(VARLSTCNT(10) ERR_DSKSPACEFLOW, 3, FAB_LEN_STR(&fcb), avail_blocks * block_factor,
-					ERR_ERRCALL, 3, CALLFROM);
-			}
-		} else
-		{
-			send_msg(VARLSTCNT(13) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb), status, 0,
-				ERR_ERRCALL, 3, CALLFROM);
-			ERROR_CLEANUP;
-			return (NO_FREE_SPACE);
-		}
-	} else
-	{
-		if (FALSE == was_crit)
-			rel_crit(gv_cur_region);
-		send_msg(VARLSTCNT(15) ERR_GBLOFLOW, 0, ERR_DBOPNERR, 2, FAB_LEN_STR(&fcb), status, 0, fcb.fab$l_stv, 0,
-			ERR_ERRCALL, 3, CALLFROM);
-		return (NO_FREE_SPACE);
-	}
-	/* new total of non-bitmap blocks will be number of current, non-bitmap blocks, plus new blocks desired
-	 * There are (bplmap - 1) non-bitmap blocks per bitmap, so add (bplmap - 2) to number of non-bitmap blocks
-	 *	and divide by (bplmap - 1) to get total number of bitmaps for expanded database. (must round up in this
-	 *	manner as every non-bitmap block must have an associated bitmap)
-	 * Current number of bitmaps is (total number of current blocks + bplmap - 1) / bplmap.
-	 * Subtract current number of bitmaps from number needed for expanded database to get number of new bitmaps needed.
-	 */
-	new_bit_maps = DIVIDE_ROUND_UP(cs_data->trans_hist.total_blks
-			- DIVIDE_ROUND_UP(cs_data->trans_hist.total_blks, bplmap) + blocks, bplmap - 1)
-			- DIVIDE_ROUND_UP(cs_data->trans_hist.total_blks, bplmap);
-	new_blocks = blocks + new_bit_maps;
-	assert(0 < (int)new_blocks);
-	new_total = cs_data->trans_hist.total_blks + new_blocks;
-	if (new_total > MAXTOTALBLKS(cs_data))
-	{
-		send_msg(VARLSTCNT(7) ERR_TOTALBLKMAX, 0, ERR_ERRCALL, 3, CALLFROM);
-		ERROR_CLEANUP;
-		return (NO_FREE_SPACE);
-	}
-	if (JNL_ENABLED(cs_data))
-	{
-		if (!jgbl.dont_reset_gbl_jrec_time)
-			SET_GBL_JREC_TIME;	/* needed before jnl_ensure_open as that can write jnl records */
-		jpc = cs_addrs->jnl;
-		jbp = jpc->jnl_buff;
-		/* Before writing to jnlfile, adjust jgbl.gbl_jrec_time if needed to maintain time order
-		 * of jnl records. This needs to be done BEFORE the jnl_ensure_open as that could write
-		 * journal records (if it decides to switch to a new journal file).
-		 */
-		ADJUST_GBL_JREC_TIME(jgbl, jbp);
-		jnl_status = jnl_ensure_open();
-		if (jnl_status)
-		{
-			send_msg(VARLSTCNT(11) jnl_status, 4, JNL_LEN_STR(cs_data), DB_LEN_STR(gv_cur_region),
-				ERR_ERRCALL, 3, CALLFROM);
-			ERROR_CLEANUP;
-			return (NO_FREE_SPACE); /* should have better return status */
-		}
-	}
-	buff = malloc(cs_data->blk_size);
-	memset(buff, 0, cs_data->blk_size);
-	rab = cc$rms_rab;
-	rab.rab$l_fab = &fcb;
-	rab.rab$l_rbf = buff;
-	rab.rab$w_rsz = cs_data->blk_size;
-	rab.rab$l_rop |= RAB$M_EOF;
-	if (RMS$_NORMAL != (status = sys$connect(&rab)))
-	{
-		save_stv = fcb.fab$l_stv;
-		free(buff);
-		send_msg(VARLSTCNT(15) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb), status, 0, save_stv, 0,
-			 ERR_ERRCALL, 3, CALLFROM);
-		ERROR_CLEANUP;
-		return (NO_FREE_SPACE);
-	}
-	/* get last block needed, position write to be (block_size/512-1) blocks before so that will end at desired block */
-	rab.rab$l_bkt = cs_data->start_vbn + (block_factor * new_total) - block_factor;
-	status = sys$write(&rab);
-	free(buff);
-	if (RMS$_NORMAL != status)
-	{
-		save_stv = fcb.fab$l_stv;
-		send_msg(VARLSTCNT(15) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb), status, 0, save_stv, 0,
-			 ERR_ERRCALL, 3, CALLFROM);
-		ERROR_CLEANUP;
-		return (NO_FREE_SPACE);
-	}
-
-	if (RMS$_NORMAL != (status = sys$close(&fcb)))
-	{
-		if (FALSE == was_crit)
-			rel_crit(gv_cur_region);
-		send_msg(VARLSTCNT(15) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb), status, 0, fcb.fab$l_stv, 0,
-			ERR_ERRCALL, 3, CALLFROM);
-		return (NO_FREE_SPACE);
-	}
-	DEBUG_ONLY(prev_extend_blks_to_upgrd = cs_data->blks_to_upgrd;)
-	/* inctn_detail.blks_to_upgrd_delta holds the increase in "csd->blks_to_upgrd" due to the file extension */
-	inctn_detail.blks2upgrd_struct.blks_to_upgrd_delta
-		= (IS_GDS_BLK_DOWNGRADE_NEEDED(cs_data->desired_db_format) ? new_bit_maps : 0);
-	if (JNL_ENABLED(cs_data))
-	{
-		save_inctn_opcode = inctn_opcode;
-		if (mu_reorg_process)
-			inctn_opcode = inctn_gdsfilext_mu_reorg;
-		else
-			inctn_opcode = inctn_gdsfilext_gtm;
-		if (0 == jpc->pini_addr)
-			jnl_put_jrt_pini(cs_addrs);
-		jnl_write_inctn_rec(cs_addrs);
-		inctn_opcode = save_inctn_opcode;
-		/* Harden INCTN to disk before updating/flushing database. This will ensure that any positive adjustment to the
-		 * blks_to_upgrd counter (stored in the inctn record) is seen by recovery before a V4 format bitmap block is.
-		 */
-		jnl_status = jnl_flush(gv_cur_region);
-		if (SS_NORMAL != jnl_status)
-		{
-			send_msg(VARLSTCNT(9) ERR_JNLFLUSH, 2, JNL_LEN_STR(cs_data),
-				ERR_TEXT, 2, RTS_ERROR_TEXT("Error with journal flush during gdsfilext"),
-				jnl_status);
-			assert(NOJNL == jpc->channel); /* jnl file lost has been triggered */
-			/* In this routine, all code that follows from here on does not assume anything about the
-			 * journaling characteristics of this database so it is safe to continue execution even though
-			 * journaling got closed in the middle. Let the caller deal with this situation.
-			 */
-		}
-	}
-	if (new_bit_maps)
-	{
-		for (map = ROUND_UP(cs_data->trans_hist.total_blks, bplmap); map < new_total; map += bplmap)
-		{
-			DEBUG_ONLY(new_bit_maps--;)
-			if (SS$_NORMAL != (status = bml_init(map)))
-			{
-				if (FALSE == was_crit)
-					rel_crit(gv_cur_region);
-				send_msg(VARLSTCNT(13) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb), status, 0,
-					ERR_ERRCALL, 3, CALLFROM);
-				return (NO_FREE_SPACE);
-			}
-		}
-		assert(0 == new_bit_maps);
-	}
-	assert(cs_data->blks_to_upgrd == (inctn_detail.blks2upgrd_struct.blks_to_upgrd_delta + prev_extend_blks_to_upgrd));
-	assert(0 < (int)blocks);
-	assert(0 < (int)(cs_data->trans_hist.free_blocks + blocks));
-	cs_data->trans_hist.free_blocks += blocks;
-	blocks = cs_data->trans_hist.total_blks;
-	cs_data->trans_hist.total_blks = new_total;
-	if (blocks / bplmap * bplmap != blocks)
-	{
-		bit_set( blocks / bplmap, MM_ADDR(cs_data)); /* Mark old last local map as having space */
-		if ((int4)blocks > cs_addrs->nl->highest_lbm_blk_changed)
-			cs_addrs->nl->highest_lbm_blk_changed = blocks;
-	}
-	cs_addrs->ti->mm_tn++;
-	curr_tn = cs_addrs->ti->curr_tn;
-	assert(cs_addrs->ti->early_tn == cs_addrs->ti->curr_tn);
-	/* do not increment transaction number for forward recovery */
-	if (!jgbl.forw_phase_recovery || JNL_ENABLED(cs_data))
-	{
-		cs_data->trans_hist.early_tn = cs_data->trans_hist.curr_tn + 1;
-		INCREMENT_CURR_TN(cs_data);
-	}
-	fc = gv_cur_region->dyn.addr->file_cntl;
-	fc->file_type = cs_addrs->hdr->acc_meth;
-	fc->op = FC_WRITE;
-	fc->op_buff = (sm_uc_ptr_t)cs_addrs->hdr;
-	fc->op_len = SIZEOF_FILE_HDR(cs_data);
-	fc->op_pos = 1;		/* write from the start of the file-header */
-		/* Note: (for bg) if machine crashes after update is done, BT queues could malformed from partial write. */
-	status = dbfilop(fc);
-	if (FALSE == was_crit)
-		rel_crit(gv_cur_region);
-	if (SS$_NORMAL != status)
-	{
-		send_msg(VARLSTCNT(13) ERR_GBLOFLOW, 0, ERR_DBFILERR, 2, FAB_LEN_STR(&fcb), status, 0, ERR_ERRCALL, 3, CALLFROM);
-		return (NO_FREE_SPACE);
-	}
-	INCR_GVSTATS_COUNTER(cs_addrs, cs_addrs->nl, n_db_extends, 1);
-	if (!gtm_dbfilext_syslog_disable)
-		send_msg(VARLSTCNT(7) ERR_DBFILEXT, 5, FAB_LEN_STR(&fcb), blocks, new_total, &curr_tn);
-	return (SS$_NORMAL);
-}
diff --git a/sr_vvms/gen_gtm_threadgbl_deftypes.com b/sr_vvms/gen_gtm_threadgbl_deftypes.com
deleted file mode 100644
index 16daae0..0000000
--- a/sr_vvms/gen_gtm_threadgbl_deftypes.com
+++ /dev/null
@@ -1,159 +0,0 @@
-$!#################################################################
-$!#                                                               #
-$!#       Copyright 2010, 2012 Fidelity Information Services, Inc #
-$!#                                                               #
-$!#       This source code contains the intellectual property     #
-$!#       of its copyright holder(s), and is made available       #
-$!#       under a license.  If you do not know the terms of       #
-$!#       the license, please stop and do not read further.       #
-$!#                                                               #
-$!#################################################################
-$!
-$ set noon
-$ savedir = f$environment("DEFAULT")
-$!
-$! Generate gtm_threadgbl_deftypes.h from gtm_threadgbl_deftypes.c. The result is a list of
-$! #defines for the (real) types of the neutral-typed vars in the gtm_threadgbl structure. The
-$! vars are neutral so not all types have to be defined in all modules. This mechanism allows
-$! us to type only the vars used in the module.
-$!
-$! First setup the compile options and commands we need
-$!
-$ common_options := /standard=vaxc/share/assume=nowrit/float=g_float/inc=(here:,gtm$src:)/warn=disable=(signedknown,signedmember,questcompare,questcompare1)
-$ ccdbg :== cc'common_options'/define=(debug,nolicense)/debug/nooptimize
-$ ccpro :== cc'common_options'
-$!
-$! We need to build this table twice - once for pro and once for dbg because the elements in the
-$! table could be different sizes. So setup the necessary #ifdefs so the proper set is selected
-$! when the module is built. One complication is that gtm_malloc_src.h gets built both as PRO and
-$! DBG in the same module for a pro build. The DEBUG flag is overridden and the PRO build is
-$! selected is PRO_BUILD is defined (set by gtm_malloc_dbg.c).
-$!
-$ set def gtm$obj
-$ if $severity .ne. 1
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: Unable to switch to gtm$obj - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ if f$search("gtm_threadgbl_deftypes.h") .nes. "" then delete/nolog gtm_threadgbl_deftypes.h.*
-$ if f$search("gtm_threadgbl_deftypes.h") .nes. ""
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: Unable to delete old gtm$obj:gtm_threadgbl_deftypes.h - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$!
-$! Create gtm_threadgbl_deftypes.h file - create in gtm$obj first so we don't replace the gtm$src version
-$! until/unless we know it is replaceable.
-$!
-$ year = f$extract(7, 4, f$time())
-$ open/share/write ofile gtm_threadgbl_deftypes.h
-$ write ofile "/******************************************************************"
-$ write ofile " *								  *"
-$ write ofile " *	Copyright 2010, ''year' Fidelity Information Services, Inc	  *"
-$ write ofile " *								  *"
-$ write ofile " *	This source code contains the intellectual property	  *"
-$ write ofile " *	of its copyright holder(s), and is made available	  *"
-$ write ofile " *	under a license.  If you do not know the terms of	  *"
-$ write ofile " *	the license, please stop and do not read further.	  *"
-$ write ofile " *								  *"
-$ write ofile " ******************************************************************/"
-$ write ofile " "
-$ write ofile "#ifndef GTM_THREADGBL_DEFTYPES_INCLUDED"
-$ write ofile "#define GTM_THREADGBL_DEFTYPES_INCLUDED"
-$ gtmvrt = f$trnlmn("gtm$vrt")
-$ gtmtools = f$extract(0,f$length(gtmvrt)-1,gtmvrt)
-$ write ofile "/* Generated by ''gtmtools'TOOLS]gen_gtm_threadgbl_deftypes.com */"
-$!
-$! Output selection criteria for PRO build
-$!
-$ write ofile " "
-$ write ofile "#if !defined(DEBUG) || defined(PRO_BUILD)"
-$!
-$! Now do pro build/run
-$!
-$ ccpro gtm$src:gtm_threadgbl_deftypes.c
-$ if 1 .ne. $severity
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: pro build of gtm$obj:gtm_threadgbl_deftypes failed - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ link/map=gtm_threadgbl_deftypes.map/full/exe=gtm_threadgbl_deftypes gtm_threadgbl_deftypes.obj
-$ if 1 .ne. $severity
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: pro build link of gtm$obj/gtm_threadgbl_deftypes failed. See gtm$obj:gtm_threadgbl_deftypes.map - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ define/user/nolog sys$output ofile
-$ run gtm_threadgbl_deftypes
-$ if 1 .ne. $severity
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: generating pro output failed - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ write ofile "#else"
-$!
-$! Do debug build
-$!
-$ ccdbg gtm$src:gtm_threadgbl_deftypes.c
-$ if 1 .ne. $severity
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: dbg build of gtm$obj:gtm_threadgbl_deftypes failed - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ link/map=gtm_threadgbl_deftypes.map/full/exe=gtm_threadgbl_deftypes gtm_threadgbl_deftypes.obj
-$ if 1 .ne. $severity
-$ then
-$   write "gen_gtm_threadgbl_deftypes.com-E-: dbg build link of gtm$obj/gtm_threadgbl_deftypes failed. See gtm$obj:gtm_threadgbl_deftypes.map - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ define/user/nolog sys$output ofile
-$ run gtm_threadgbl_deftypes
-$ if 1 .ne. $severity
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: generating dbg output failed - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$ write ofile "#endif"
-$ write ofile "#endif"
-$ close ofile
-$!
-$! Make sure it is there
-$!
-$ if f$search("gtm_threadgbl_deftypes.h") .eqs. ""
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: Unable to generate new gtm$obj:gtm_threadgbl_deftypes.h - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$!
-$! See if it is different from the one in gtm$src (or if the gtm$src one is not there). Only move it there if
-$! needed to prevent unneeded re-compiles of the world.
-$!
-$ keepold = 0
-$ if f$search("gtm$src:gtm_threadgbl_deftypes.h") .nes. ""
-$ then
-$   diff/output=gtm_threadgbl_deftypes.diff gtm$src:gtm_threadgbl_deftypes.h gtm$obj:gtm_threadgbl_deftypes.h
-$   if $severity .eq. 1 then keepold = 1
-$ endif
-$ if keepold .eq. 0 then copy /nolog gtm_threadgbl_deftypes.h gtm$src:
-$ if 1 .ne. $severity
-$ then
-$   write sys$output "gen_gtm_threadgbl_deftypes.com-E-: Unable to copy/replace gtm$src:gtm_threadgbl_deftypes.h - ERROR"
-$   set def 'savedir'
-$   exit 2
-$ endif
-$!
-$ if f$search("gtm_threadgbl_deftypes.exe") .nes. "" then delete/nolog gtm_threadgbl_deftypes.exe.*
-$ if f$search("gtm_threadgbl_deftypes.obj") .nes. "" then delete/nolog gtm_threadgbl_deftypes.obj.*
-$ if f$search("gtm_threadgbl_deftypes.map") .nes. "" then delete/nolog gtm_threadgbl_deftypes.map.*
-$ if f$search("gtm_threadgbl_deftypes.diff") .nes. "" then delete/nolog gtm_threadgbl_deftypes.diff.*
-$ set def 'savedir'
-$ exit 1
diff --git a/sr_vvms/generic_exit_handler.c b/sr_vvms/generic_exit_handler.c
deleted file mode 100644
index 08cb088..0000000
--- a/sr_vvms/generic_exit_handler.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include "gtm_inet.h"
-#include <psldef.h>
-#include <descrip.h>
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gtm_stdio.h"	/* for FILE structure etc. */
-#include "gtm_time.h"
-
-#include "ast.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "error.h"
-#include "iotimer.h"
-#include "jnl.h"
-#include "locklits.h"
-#include "gtmrecv.h"	/* for recvpool etc. */
-#include "io.h"
-#include "iosp.h"
-#include "sleep_cnt.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_sem.h"
-#include "repl_shm.h"
-#include "desblk.h"
-#include "gtmimagename.h"
-#include "util.h"
-#include "op.h"
-#include "repl_log.h"
-#include "generic_exit_handler.h"
-#include "gv_rundown.h"
-#include "have_crit.h"
-#include "print_exit_stats.h"
-#include "setzdir.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "gtmmsg.h"
-#include "secshr_db_clnup.h"
-#include "repl_shutdcode.h"
-
-GBLREF	void			(*call_on_signal)();
-GBLREF	uint4			dollar_tlevel;
-GBLREF	int4			exi_condition;
-GBLREF	desblk			exi_blk;
-GBLREF	int			gtmsource_srv_count, gtmrecv_srv_count;
-GBLREF	FILE			*gtmsource_log_fp, *gtmrecv_log_fp;
-GBLREF	boolean_t        	is_src_server, is_rcvr_server, is_tracing_on, is_updproc, is_updhelper;
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	jnlpool_ctl_ptr_t	jnlpool_ctl;
-GBLREF	boolean_t		pool_init;
-GBLREF	uint4			process_id;
-GBLREF	recvpool_addrs		recvpool;
-GBLREF	FILE			*updproc_log_fp;
-GBLREF	mval			original_cwd;
-GBLREF 	jnl_gbls_t		jgbl;
-GBLREF	upd_helper_entry_ptr_t	helper_entry;
-GBLREF	volatile boolean_t	in_wcs_recover; /* TRUE if in "wcs_recover" */
-GBLREF	boolean_t		exit_handler_active;
-GBLREF	int			process_exiting;
-
-error_def(ERR_ACK);
-error_def(ERR_CRITRESET);
-error_def(ERR_FORCEDHALT);
-error_def(ERR_MUJNLSTAT);
-error_def(ERR_UNKNOWNFOREX);
-
-void generic_exit_handler(void)
-{
-	void		(*signal_routine)();
-	boolean_t	is_mupip, is_gtm;
-	static int	invoke_cnt = 0;	/* how many times generic_exit_handler was invoked in the lifetime of this process */
-
-	is_gtm = IS_GTM_IMAGE;
-	is_mupip = IS_MUPIP_IMAGE;
-	exit_handler_active = TRUE;
-	sys$setast(ENABLE);	/* safer and doesn't hurt much */
-	if (is_tracing_on)
-		turn_tracing_off(NULL);
-	/* We expect generic_exit_handler to be invoked at most twice. Once by MUPIP STOP at which time we might have decided
-	 * to defer exiting (because of holding crit etc.) but after all those resources which prevented us from exiting have
-	 * been released, we should reinvoke generic_exit_handler once more and that invocation SHOULD EXIT. Assert this.
-	 */
-	assert(invoke_cnt < 2);
-	DEBUG_ONLY(invoke_cnt++;)
-	/* We can defer exit-handling if it was a forced-halt and we are in an AST or have crit in any region.
-	 * If we are in an AST when a fatal exception occurs we can neither defer exiting nor do normal exit-handling,
-	 * 	so we return immediately with the hope that the privileged exit-handler in GTMSECSHR,
-	 *	secshr_db_clnup(ABNORMAL_TERMINATION) will do the necessary cleanup.
-	 * Note that even if we hold crit in any region when a non-deferrable exception occurs, we can still go ahead with
-	 *	normal exit-handling chores. secshr_db_clnup(NORMAL_TERMINATION) (invoked below) will cleanup the crits for us.
-	 */
-	if (ERR_FORCEDHALT == exi_condition || 0 == exi_condition)
-	{
-		if (lib$ast_in_prog())	/* The rest of this assumes that it may use AST's */
-		{
-			assert(!process_exiting);
-			EXIT_HANDLER(&exi_blk);				/* reestablish the exit handler */
-			sys$forcex(&process_id);			/* make the forcex come back as an AST */
-			ESTABLISH(exi_ch);				/* set a condition handler to unwind exit handler levels */
-			rts_error_csa(CSA_ARG(NULL) ERR_ACK);		/* and signal success */
-		}
-		assert(!lib$ast_in_prog());
-		/* There are at least three cases where we definitely want to defer exiting as abnormally terminating could
-		 * potentially cause database damage. They are
-		 *	a) Commit phase (beginning from when early_tn is curr_tn + 1 to when they become equal)
-		 *	b) Cache recovery phase (if we are in "wcs_recover" recovering the cache). In that case too
-		 *		early_tn is set to curr_tn + 1 (just like (a)) so no special processing is needed.
-		 *	c) When the intrpt_ok_state is flagged
-		 */
-		if ((0 != have_crit(CRIT_HAVE_ANY_REG | CRIT_IN_COMMIT)) || (INTRPT_OK_TO_INTERRUPT != intrpt_ok_state))
-		{
-			assert(!process_exiting);
-			EXIT_HANDLER(&exi_blk);
-			ESTABLISH(exi_ch);
-			rts_error_csa(CSA_ARG(NULL) exi_condition ? exi_condition : ERR_FORCEDHALT);
-		}
-		assert(!in_wcs_recover); /* case (b) above should have been handled by have_crit(CRIT_IN_COMMIT) itself */
-	} else if (lib$ast_in_prog())
-		rts_error_csa(CSA_ARG(NULL) exi_condition);	/* this shouldn't return */
-	process_exiting = TRUE;
-	sys$cantim(0,0); /* cancel all outstanding timers.  prevents unwelcome surprises...DO this only after AFTER we decide NOT
-			  * to defer exit-handling as otherwise we might cause a deadlock due to cancelling a timer that the
-			  * mainline code holding CRIT is waiting for */
-	SET_FORCED_EXIT_STATE_ALREADY_EXITING;
-	ESTABLISH(lastchance1);
-	/* call_on_signal is currently used only by certain mupip commands, but it will be NULL if unused */
-	if ((SS$_NORMAL != exi_condition) && call_on_signal && (!(IS_GTM_ERROR(exi_condition)) || ERR_FORCEDHALT == exi_condition))
-	{
-		assert(!lib$ast_in_prog());
-		signal_routine = call_on_signal;
-		call_on_signal = NULL;
-		(*signal_routine)();
-	}
-	finish_active_jnl_qio();
-	if (jgbl.mupip_journal)
-		mur_close_files(); /* Will it increase gtm image size pulling mur*.c ??? */
-	DETACH_FROM_JNLPOOL(pool_init, jnlpool, jnlpool_ctl);
-	secshr_db_clnup(NORMAL_TERMINATION);
-	if (dollar_tlevel)
-		OP_TROLLBACK(0);
-	if (is_gtm)	/* do lock rundown only for GT.M (though it probably is harmless if invoked by the others) */
-	{
-		op_lkinit();	/* seems to be GT.CM client specific */
-		op_unlock();
-		op_zdeallocate(NO_M_TIMEOUT);
-	}
-	REVERT;
-	ESTABLISH(lastchance2);
-	gv_rundown();
-	REVERT;
-	ESTABLISH(lastchance3);
-	print_exit_stats();
-	io_rundown(NORMAL_RUNDOWN);
-	if (0 == exi_condition)
-		exi_condition = ERR_UNKNOWNFOREX;
-	if (is_mupip)		/* do mupip-specific replication processing  */
-	{
-		assert(!lib$ast_in_prog());
-		if (is_updhelper && NULL != helper_entry) /* haven't had a chance to cleanup, must be an abnormal exit */
-		{
-			helper_entry->helper_shutdown = ABNORMAL_SHUTDOWN;
-			helper_entry->helper_pid = 0; /* vacate my slot */
-			helper_entry = NULL;
-		}
-		if (recvpool.recvpool_ctl)
-		{
-			detach_shm(recvpool.shm_range);
-			signoff_from_gsec(recvpool.shm_lockid);
-			memset(&recvpool, 0, SIZEOF(recvpool));
-		}
-		if (is_src_server && sem_set_exists(SOURCE) && gtmsource_srv_count && (0 != rel_sem(SOURCE, SRC_SERV_COUNT_SEM)))
-			repl_log(gtmsource_log_fp, TRUE, TRUE, "Error releasing the source server count semaphore : %s\n",
-					REPL_SEM_ERROR);
-		if (is_rcvr_server && sem_set_exists(RECV) && gtmrecv_srv_count && (0 != rel_sem(RECV, RECV_SERV_COUNT_SEM)))
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Error releasing the receiver server count semaphore : %s\n",
-					REPL_SEM_ERROR);
-		if (is_updproc && sem_set_exists(RECV) && (0 != rel_sem(RECV, UPD_PROC_COUNT_SEM)))
-			repl_log(updproc_log_fp, TRUE, TRUE, "Error releasing the update process count semaphore : %s\n",
-					REPL_SEM_ERROR);
-		/* log the exit of replication servers */
-		if (is_src_server)
-			repl_log(gtmsource_log_fp, TRUE, TRUE, "Source server exiting...\n");
-		else if (is_rcvr_server)
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Receiver server exiting...\n");
-		else if (is_updproc)
-			repl_log(updproc_log_fp, TRUE, TRUE, "Update process exiting...\n");
-		else if (is_updhelper)
-			repl_log(updproc_log_fp, TRUE, TRUE, "Helper exiting...\n");
-		util_out_close();
-	}
-	if (is_gtm)
-		setzdir(&original_cwd, NULL); /* Restore the image startup cwd. This is done here 'cos VMS chdir() doesn't behave
-					       * as documented. See comments in setzdir(). */
-}
diff --git a/sr_vvms/generic_exit_handler.h b/sr_vvms/generic_exit_handler.h
deleted file mode 100644
index 723c29d..0000000
--- a/sr_vvms/generic_exit_handler.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef GENERIC_EXIT_HANDLER_INCLUDED
-#define GENERIC_EXIT_HANDLER_INCLUDED
-
-void generic_exit_handler(void);
-
-
-#endif /* GENERIC_EXIT_HANDLER_INCLUDED */
diff --git a/sr_vvms/get_command_line.c b/sr_vvms/get_command_line.c
deleted file mode 100644
index 8e48dcb..0000000
--- a/sr_vvms/get_command_line.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "stringpool.h"
-#include <descrip.h>
-#include "get_command_line.h"
-
-#define MAX_COMMAND_LINE_LENGTH 255
-
-GBLREF spdesc		stringpool;
-
-void get_command_line(mval *v, boolean_t zcmd_line)
-{
-	struct dsc$descriptor_s cmd_desc;
-
-	/* zcmd_line is currently unused in VMS */
-	ENSURE_STP_FREE_SPACE(MAX_COMMAND_LINE_LENGTH);
-	v->mvtype = MV_STR;
-	cmd_desc.dsc$w_length = MAX_COMMAND_LINE_LENGTH;
-	cmd_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	cmd_desc.dsc$b_class = DSC$K_CLASS_S;
-	cmd_desc.dsc$a_pointer = stringpool.free;
-	/* initialize the 4-byte int v->str.len to 0 before calling lib$get_foreign() with &v->str.len as the function
-	 * expects a pointer to a short (rather than an int) and hence will reset only the lower-order 2-bytes in v->str.len
-	 */
-	v->str.len = 0;
-	if ((lib$get_foreign (&cmd_desc, 0, &v->str.len) & 1) == 0)
-		v->str.len = 0;
-	v->str.addr = stringpool.free;
-	stringpool.free += v->str.len;
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.free < stringpool.top);
-	return;
-}
diff --git a/sr_vvms/get_full_path.c b/sr_vvms/get_full_path.c
deleted file mode 100644
index 3972e64..0000000
--- a/sr_vvms/get_full_path.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <errno.h>
-#include <rms.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include <iodef.h>
-#include "gtmmsg.h"
-#include "gtm_file_stat.h"
-
-
-/* Gets expanded path of a file.
- * NOTE: Since gtm_file_stat now expands a file name with full path, consider nixing this routine : Layek 5/10/2
- * Output Parameter
- *	uint4 *status : error number
- * Returns:
- *	TRUE: if file path is expanded
- *	FALSE: if file path cannot be expanded
- */
-boolean_t get_full_path(char *name, unsigned int len, char *exp_file_name,
-			unsigned int *exp_name_len, int max_len, uint4 *status)
-{
-	struct FAB	fab;
-	struct NAM	nam;
-	char		es_buffer[MAX_FN_LEN], name_buffer[MAX_FN_LEN];
-	char		*src, *srctop, *dest, *destmax;
-	error_def(ERR_FILENAMETOOLONG);
-
-	nam = cc$rms_nam;
-	/* Note From Documentation :
-	 * 	The nam$l_esa and nam$b_ess fields must be specified (nonzero) for wildcard character processing.
-	 *      nam$l_rsa required for wildcard character processing */
-	nam.nam$l_rsa = name_buffer; 		/* Resultant string area address: specifies name, type,
-						 * 	and version of last file found */
-	nam.nam$b_rss = SIZEOF(name_buffer);	/* Resultant String Area size. */
-	nam.nam$l_esa = es_buffer;		/* Expanded String area address: specifies file name, type,
-						 * 	and version of file. */
-	nam.nam$b_ess = SIZEOF(es_buffer);	/* Size of Expanded String area */
-	nam.nam$b_nop = NAM$M_NOCONCEAL;	/* indicates that when a concealed device logical name is present,
-						 * 	the concealed device logical name is to be replaced by the
-						 * 	actual physical device name in the expanded string. */
-	fab = cc$rms_fab;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = name;			/* File specification string address. */
-	fab.fab$b_fns = len;			/* File specification string size. */
-	if ((*status = sys$parse(&fab, 0, 0)) != RMS$_NORMAL)
-		return FALSE;
-	*status = sys$search(&fab, 0, 0);
-	if (*status != RMS$_NORMAL && *status != RMS$_NMF && *status != RMS$_FNF)
-		return FALSE;
-	/* For returned length eliminate version info */
-	fncpy_nover(nam.nam$l_rsa, nam.nam$b_rsl, exp_file_name, *exp_name_len);
-	return TRUE;
-}
diff --git a/sr_vvms/get_page_size.c b/sr_vvms/get_page_size.c
deleted file mode 100644
index 0138253..0000000
--- a/sr_vvms/get_page_size.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <syidef.h>
-#include "get_page_size.h"
-
-GBLDEF int4 gtm_os_page_size;
-
-void get_page_size(void)
-{
-	int4 status;
-
-	status = lib$getsyi(&SYI$_PAGE_SIZE, &gtm_os_page_size, 0, 0, 0, 0);
-	if ((status & 1) == 0)
-		rts_error(status);
-	return;
-}
diff --git a/sr_vvms/get_proc_info.c b/sr_vvms/get_proc_info.c
deleted file mode 100644
index 4975d42..0000000
--- a/sr_vvms/get_proc_info.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <jpidef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "efn.h"
-#include "gtmsecshr.h"
-#include "vmsdtype.h"
-#include "repl_sp.h"
-
-uint4	get_proc_info(uint4 pid, uint4 *time, uint4 *icount)
-{
-	struct
-	{
-		item_list_3	item[2];
-		int4		terminator;
-	} item_list;
-	unsigned short	iosb[4], retlen, retlen1;
-	uint4		status;
-	uint4		prvadr[2], prvprv[2];
-
-	GTMSECSHR_SET_PRIV(PRV$M_WORLD, status);
-	if (SS$_NORMAL == status)
-	{
-		item_list.item[0].buffer_length		= SIZEOF(*icount);
-		item_list.item[0].item_code		= JPI$_IMAGECOUNT;
-		item_list.item[0].buffer_address	= icount;
-		item_list.item[0].return_length_address = &retlen1;
-		if (NULL != time)
-		{
-			item_list.item[1].buffer_length		= SIZEOF(uint4) * 2;
-			item_list.item[1].item_code		= JPI$_LOGINTIM;
-			item_list.item[1].buffer_address	= time;
-			item_list.item[1].return_length_address = &retlen;
-		} else	/* from is_proc_alive, no need for LOGINTIM which may require an INSWAP */
-		{	/* each of these is a short */
-			item_list.item[1].buffer_length		= 0;
-			item_list.item[1].item_code		= 0;
-		}
-		item_list.terminator			= 0;
-		status = sys$getjpiw(EFN$C_ENF, &pid, NULL, &item_list, iosb, NULL, 0);
-		if (SS$_NORMAL == status)
-			status = iosb[0];
-		GTMSECSHR_REL_PRIV;
-	}
-	return status;
-}
diff --git a/sr_vvms/get_src_line.c b/sr_vvms/get_src_line.c
deleted file mode 100644
index 756ca4b..0000000
--- a/sr_vvms/get_src_line.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <fab.h>
-#include <rab.h>
-#include <rmsdef.h>
-
-#include "compiler.h"
-#include <rtnhdr.h>
-#include "srcline.h"
-#include "zroutines.h"
-#include "op.h"
-#include "gt_timer.h"
-#include "zbreak.h"
-#include "hashtab_mname.h"
-#include "rtn_src_chksum.h"
-
-#define RT_TBL_SZ 20
-
-int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp **rtn_vec)
-{
-	struct FAB		fab;
-	struct RAB		rab;
-	struct NAM		nam;
-	bool			added;
-	unsigned char		buff[MAX_SRCLINE], *cp1, *cp2, *cp3;
-	unsigned char		es[255], srcnamebuf[SIZEOF(mident_fixed) + STR_LIT_LEN(DOTM)];
-	boolean_t		badfmt, found;
-	int			*lt_ptr, tmp_int, status;
-	uint4			lcnt, srcstat, *src_tbl;
-	mstr			src;
-	rhdtyp			*rtn_vector;
-	zro_ent			*srcdir;
-	mstr			*base, *current, *top;
-	ht_ent_mname		*tabent;
-	var_tabent		rtnent;
-	gtm_rtn_src_chksum_ctx	checksum_ctx;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	srcstat = 0;
-	*srcret = NULL;
-	if (NULL == (TREF(rt_name_tbl)).base)
-		init_hashtab_mname(TADR(rt_name_tbl), RT_TBL_SZ, HASHTAB_NO_COMPACT, HASHTAB_NO_SPARE_TABLE);
-	assert(routine->mvtype & MV_STR);
-	if (NULL == (rtn_vector = find_rtn_hdr(&routine->str)))	/* Note assignment */
-	{
-		op_zlink(routine, NULL);
-		rtn_vector = find_rtn_hdr(&routine->str);
-		if (!rtn_vector)
-		{
-			if (NULL != rtn_vec)
-				*rtn_vec = NULL;
-			return OBJMODMISS;
-		}
-	}
-	if (!rtn_vector->src_full_name.len)
-	{
-		if (NULL != rtn_vec)
-			*rtn_vec = NULL;
-		return SRCNOTAVAIL;
-	}
-	if (NULL != rtn_vec)
-		*rtn_vec = rtn_vector;
-	rtnent.var_name = rtn_vector->routine_name;
-	COMPUTE_HASH_MNAME(&rtnent);
-	added = add_hashtab_mname(TADR(rt_name_tbl), &rtnent, NULL, &tabent);
-	src_tbl = (uint4 *)tabent->value;
-	if (added || 0 == tabent->value)
-	{
-		fab = cc$rms_fab;
-		fab.fab$l_fna = rtn_vector->src_full_name.addr;
-		fab.fab$b_fns = rtn_vector->src_full_name.len;
-		fab.fab$l_nam = &nam;
-		nam = cc$rms_nam;
-		nam.nam$l_esa = es;
-		nam.nam$b_ess = SIZEOF(es);
-		status = sys$parse(&fab);
-		if (!(status & 1))
-			found = FALSE;
-		else
-		{
-			status = sys$search(&fab);
-			if (!(status & 1))
-				found = FALSE;
-			else
-				found = TRUE;
-		}
-		if (!found)
-		{
-			tmp_int = rtn_vector->routine_name.len;
-			memcpy (srcnamebuf, rtn_vector->routine_name.addr, tmp_int);
-			if ('%' == srcnamebuf[0])	/* percents are translated to _ on filenames */
-				srcnamebuf[0] = '_';
-			MEMCPY_LIT(&srcnamebuf[tmp_int], DOTM);
-			src.addr = srcnamebuf;
-			src.len = tmp_int + STR_LIT_LEN(DOTM);
-			zro_search(0, 0, &src, &srcdir);
-			if (srcdir)
-			{
-				fab.fab$l_fna = srcnamebuf;
-				fab.fab$b_fns = tmp_int + 2;
-				fab.fab$l_dna = srcdir->str.addr;
-				fab.fab$b_dns = srcdir->str.len;
-				found = TRUE;
-			}
-		}
-		if (!found)
-			srcstat |= SRCNOTFND;
-		else
-		{
-			fab.fab$b_fac = FAB$M_GET;
-			fab.fab$b_shr = FAB$M_SHRGET;
-			for (lcnt = 0;  lcnt < MAX_FILE_OPEN_TRIES;  lcnt++)
-			{
-				status = sys$open(&fab);
-				if (RMS$_FLK != status)
-					break;
-				hiber_start(WAIT_FOR_FILE_TIME);
-			}
-			if (RMS$_NORMAL != status)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-			rab = cc$rms_rab;
-			rab.rab$l_fab = &fab;
-			rab.rab$l_ubf = buff;
-			rab.rab$w_usz = SIZEOF(buff);
-			if (RMS$_NORMAL != (status = sys$connect(&rab)))
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		}
-
-		tmp_int = found ? rtn_vector->lnrtab_len : 0;
-		assert((found && tmp_int >= 1) || (0 == tmp_int));
-		/* first two words are the status code and the number of entries */
-		src_tbl = (uint4 *)malloc(tmp_int * SIZEOF(mstr) + SIZEOF(uint4) * 2);
-		base = (mstr *)(src_tbl + 2);
-		*(src_tbl + 1) = tmp_int;	/* So zlput_rname knows how big we are */
-		badfmt = FALSE;
-		rtn_src_chksum_init(&checksum_ctx);
-		for (current = base + 1, top = base + tmp_int;  current < top;  current++)
-		{
-			status = sys$get(&rab);
-			if (RMS$_EOF == status)
-			{
-				badfmt = TRUE;
-				break;
-			} else  if (RMS$_NORMAL != status)
-			{
-				free(src_tbl);
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-			}
-			if (rab.rab$w_rsz)
-			{
-				/* set cp1 = to start of line separator */
-				for (cp1 = buff , cp2 = cp1 + rab.rab$w_rsz;
-					cp1 < cp2 && (' ' != *cp1) && ('\t' != *cp1);  cp1++)
-						;
-				/* calculate checksum */
-				rtn_src_chksum_line(&checksum_ctx, buff, cp2 - buff);
-				current->len = rab.rab$w_rsz;
-				current->addr = malloc(rab.rab$w_rsz);
-				memcpy(current->addr, buff, rab.rab$w_rsz);
-			} else
-			{
-				current->addr = malloc(1);
-				current->addr[0] = ' ';
-				current->len = 1;
-			}
-		}
-		if (found)
-		{
-			*base = *(base + 1);
-			if (!badfmt)
-			{
-				status = sys$get(&rab);
-				rtn_src_chksum_digest(&checksum_ctx);
-				if ((RMS$_EOF != status)
-					|| !rtn_src_chksum_match(get_ctx_checksum(&checksum_ctx), get_rtnhdr_checksum(rtn_vector)))
-					badfmt = TRUE;
-			}
-			sys$close(&fab);
-			if (badfmt)
-				srcstat |= CHECKSUMFAIL;
-		}
-		*src_tbl = srcstat;
-		tabent->value = (char *)src_tbl;
-	}
-	srcstat |= *src_tbl;
-	lt_ptr = find_line_addr(rtn_vector, &label->str, 0, NULL);
-	if (!lt_ptr)
-		srcstat |= LABELNOTFOUND;
-	else  if (!(srcstat & (SRCNOTFND | SRCNOTAVAIL)))
-	{
-		tmp_int = (int)(lt_ptr - (int *)LNRTAB_ADR(rtn_vector));
-		tmp_int += offset;
-		if (0 == tmp_int)
-			srcstat |= ZEROLINE;
-		else  if (tmp_int < 0)
-			srcstat |= NEGATIVELINE;
-		else  if (tmp_int >= rtn_vector->lnrtab_len)
-			srcstat |= AFTERLASTLINE;
-		else	/* successfully located line */
-			*srcret = ((mstr *)(src_tbl + 2)) + tmp_int;
-	}
-	return srcstat;
-}
-
-void free_src_tbl(rhdtyp *rtn_vector)
-{
-	ht_ent_mname    *tabent;
-	mname_entry	key;
-	uint4		entries;
-	mstr		*curline;
-	uint4		*src_tbl;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	/* If source has been read in for old routine, free space. Since routine name is the key, do this before
-	   (in USHBIN builds) we release the literal text section as part of the releasable read-only section.
-	 */
-	tabent = NULL;
-	if (NULL != (TREF(rt_name_tbl)).base)
-	{
-		key.var_name = rtn_vector->routine_name;
-		COMPUTE_HASH_MNAME(&key);
-		tabent = lookup_hashtab_mname(TADR(rt_name_tbl), &key);
-		if ((NULL != tabent) && tabent->value)
-		{
-			src_tbl = (uint4 *)tabent->value;
-			/* Must delete the entries piece-meal */
-			entries = *(src_tbl + 1);
-			/* Don't count line 0 which we bypass */
-			if (0 != entries)
-				entries--;
-			/* curline start is 2 uint4s into src_tbl and then space past line 0 or
-			   we end up freeing the storage for line 0/1 twice since they have the
-			   same pointers.
-			*/
-			for (curline = RECAST(mstr *)(src_tbl + 2) + 1; 0 != entries; --entries, ++curline)
-			{
-				assert(curline->len);
-				free(curline->addr);
-			}
-			free(tabent->value);
-			/* Comment below kept intact from when UNIX also used a $TEXT hash table. [BC 9/13]
-			 *
-			 * Note that there are two possible ways to proceed here to clear this entry:
-			 *   1. Just clear the value as we do below.
-			 *   2. Use the DELETE_HTENT() macro to remove the entry entirely from the hash table.
-			 *
-			 * We choose #1 since a routine that had had its source loaded is likely to have it reloaded
-			 * and if the source load rtn has to re-add the key, it won't reuse the deleted key (if it
-			 * remained a deleted key) until all other hashtable slots have been used up (creating a long
-			 * collision chain). A deleted key may not remain a deleted key if it was reached with no
-			 * collisions but will instead be turned into an unused key and be immediately reusable.
-			 * But since it is likely to be reused, we just zero the entry but this creates a necessity
-			 * that the key be maintained. If this is a non-USBHIN platform, everything stays around
-			 * anyway so that's not an issue. However, in a USHBIN platform, the literal storage the key
-			 * is pointing to gets released. For that reason, in the USHBIN processing section below, we
-			 * update the key to point to the newly loaded module's routine name.
-			 */
-			tabent->value = NULL;
-		}
-	}
-}
diff --git a/sr_vvms/get_tpu_addr.c b/sr_vvms/get_tpu_addr.c
deleted file mode 100644
index 8b4285a..0000000
--- a/sr_vvms/get_tpu_addr.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-
-unsigned char *get_tpu_addr()
-{
-	int4 status;
-	unsigned char *fcn;
-	static readonly $DESCRIPTOR(filename,"TPUSHR");
-	static readonly $DESCRIPTOR(symnam,"TPU$TPU");
-
-	status = lib$find_image_symbol(&filename,&symnam,&fcn);
-	if ((status & 1) == 0)
-		rts_error(VARLSTCNT(1) status);
-	return fcn;
-}
diff --git a/sr_vvms/get_tpu_addr.h b/sr_vvms/get_tpu_addr.h
deleted file mode 100644
index 8614b53..0000000
--- a/sr_vvms/get_tpu_addr.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef GET_TPU_ADDR_INCLUDED
-#define GET_TPU_ADDR_INCLUDED
-
-unsigned char *get_tpu_addr(void);
-
-#endif /* GET_TPU_ADDR_INCLUDED */
diff --git a/sr_vvms/getjobnum.c b/sr_vvms/getjobnum.c
deleted file mode 100644
index 46db7cd..0000000
--- a/sr_vvms/getjobnum.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <jpidef.h>
-#include <ssdef.h>
-
-#include "repl_sp.h"
-#include "getjobnum.h"
-
-GBLREF	uint4	process_id;
-GBLREF	uint4	image_count;
-
-void getjobnum(void)
-{
-	uint4 	status;
-	int4 	item_code;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	item_code = JPI$_PID;
-	if (SS$_NORMAL !=(status = lib$getjpi(&item_code, 0, 0, &process_id, 0, 0)))
-		rts_error(VARLSTCNT(1) status);
-	get_proc_info(process_id, TADR(login_time), &image_count);
-}
diff --git a/sr_vvms/getline.com b/sr_vvms/getline.com
deleted file mode 100644
index 85aa12a..0000000
--- a/sr_vvms/getline.com
+++ /dev/null
@@ -1,66 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!      p1 - "image+offset"
-$!
-$ if (p1 .eqs. "")
-$ then
-$       write sys$output ""
-$       write sys$output "Syntax :  @gtm$tools:getline image+offset"
-$       write sys$output ""
-$       write sys$output "      e.g. @gtm$tools:getline ""GTMSHR+0001FC"""
-$       write sys$output ""
-$       exit
-$ endif
-$!
-$ define sys$output nl:
-$ define sys$error  nl:
-$!
-$ savegtmgbldir   = f$trnlnm("gtm$gbldir","LNM$PROCESS_TABLE")
-$ savegtmroutines = f$trnlnm("gtm$routines","LNM$PROCESS_TABLE")
-$!
-$ define /process gtm$gbldir   "gtm$map:mapdb.gld"
-$ define /process gtm$routines "gtm$vrt:[pct]/nosrc,gtm$map/src=(gtm$map,gtm$src,gtm$vrt:[pct])"
-$!
-$ define /process getlineinput "''p1'"
-$!
-$ deassign sys$output
-$ deassign sys$error
-$!
-$ curpriv=f$setprv("bypas")	! for writing in gtm$obj:*.lis and gtm$map:mapdb.dat
-$ gtm
-d ^mapoff($ztrnlnm("getlineinput"))
-$!
-$ curpriv=f$setprv(curpriv)
-$!
-$ define sys$output nl:
-$ define sys$error  nl:
-$!
-$ deassign /process getlineinput
-$!
-$ if (savegtmgbldir .eqs. "")
-$ then
-$ 	deassign /process gtm$gbldir
-$ else
-$ 	define /process gtm$gbldir   "''savegtmgbldir'"
-$ endif
-$!
-$ if (savegtmroutines .eqs. "")
-$ then
-$ 	deassign /process gtm$routines
-$ else
-$ 	define /process gtm$routines   "''savegtmroutines'"
-$ endif
-$!
-$ deassign sys$output
-$ deassign sys$error
-$!
diff --git a/sr_vvms/getstorage.c b/sr_vvms/getstorage.c
deleted file mode 100644
index e1ee826..0000000
--- a/sr_vvms/getstorage.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include "getstorage.h"
-
-int4	getstorage(void)
-{
-	int4 status;
-	uint4 page_count;
-	status = lib$getjpi(&JPI$_FREPTECNT,0,0,&page_count,0,0);
-	if ((status & 1) == 0)
-		rts_error(status);
-	return (int4)(page_count < (MAXPOSINT4 / OS_PAGELET_SIZE) ? (page_count * OS_PAGELET_SIZE) : MAXPOSINT4);
-}
diff --git a/sr_vvms/getzmode.c b/sr_vvms/getzmode.c
deleted file mode 100644
index e74e1f9..0000000
--- a/sr_vvms/getzmode.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include "getzmode.h"
-
-#define MAX_MODE_LEN 15
-
-void getzmode(void)
-{
-	static unsigned char mode_buf[MAX_MODE_LEN];
-	static readonly int4 jpi_code = JPI$_MODE;
-	$DESCRIPTOR(out_string,"");
-	short int out_len;
-	uint4 status;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	out_string.dsc$a_pointer = mode_buf;
-	out_string.dsc$w_length = MAX_MODE_LEN;
-	if (SS$_NORMAL != (status = lib$getjpi(&jpi_code ,0 ,0, 0, &out_string, &out_len)))	/* Intentional assignment */
-		rts_error(VARLSTCNT(1) status);
-	(TREF(dollar_zmode)).str.addr = &mode_buf[0];
-	(TREF(dollar_zmode)).mvtype = MV_STR;
-	(TREF(dollar_zmode)).str.len = out_len;
-	return;
-}
diff --git a/sr_vvms/getzprocess.c b/sr_vvms/getzprocess.c
deleted file mode 100644
index 76b4dbe..0000000
--- a/sr_vvms/getzprocess.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include "job.h"	/* for MAX_PRCNAM_LEN in jobsp.h */
-#include "getzprocess.h"
-
-GBLDEF mval 		dollar_zproc;
-static unsigned char	proc_buf[MAX_PRCNAM_LEN + 1];
-
-void getzprocess(void)
-{
-	int4 jpi_code, status;
-	short int out_len;
-	$DESCRIPTOR(out_string, proc_buf);
-	error_def(ERR_SYSCALL);
-
-	jpi_code = JPI$_PRCNAM;
-	dollar_zproc.str.addr = proc_buf;
-	dollar_zproc.mvtype = MV_STR;
-	if ((status = lib$getjpi(	 &jpi_code
-					,0
-					,0
-					,0
-					,&out_string
-					,&out_len  )) != SS$_NORMAL)
-	{
-		rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$GETJPI"), CALLFROM, status);
-	}
-	dollar_zproc.str.len = out_len;
-	return;
-}
diff --git a/sr_vvms/global_name.c b/sr_vvms/global_name.c
deleted file mode 100644
index 79ebed3..0000000
--- a/sr_vvms/global_name.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-
-#include "gdsroot.h"
-
-
-void global_name (prefix, fil, buff)
-unsigned char	prefix[4];
-gds_file_id	*fil;
-unsigned char	*buff;
-{
-	unsigned char *cp;
-	int i, j, k, n;
-
-	/* The routine MU_SEC_CLEAN decodes this algorithm.  Keep the two routines in tandem.  */
-
-	cp = buff + 1;
-	memcpy(cp, prefix, SIZEOF(prefix));
-	cp += SIZEOF(prefix);
-	i = fil->dvi[0];
-	memcpy(cp, &fil->dvi[1], i);
-	cp += i;
-	*cp++ = '$';
-	for (i = 0 ; i < SIZEOF(fil->fid) / SIZEOF(fil->fid[0]) ; i++)
-	{
-		for (k = fil->fid[i], j = 0 ; j < SIZEOF(fil->fid[0]) * 2; j++, k = k >> 4)
-		{
-			n = k & 0xf;
-			*cp++ = n + (n < 10 ? 48 : 55);
-		}
-	}
-	assert(cp - buff <= GLO_NAME_MAXLEN);
-	*buff = cp - buff - 1;
-	return;
-}
diff --git a/sr_vvms/go_load.c b/sr_vvms/go_load.c
deleted file mode 100644
index 03ecaeb..0000000
--- a/sr_vvms/go_load.c
+++ /dev/null
@@ -1,344 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-
-#include "stringpool.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "error.h"
-#include "msg.h"
-#include "muextr.h"
-#include "util.h"
-#include "mupip_exit.h"
-#include "mlkdef.h"
-#include "zshow.h"
-#include "mu_load_stat.h"
-#include "load.h"
-#include "mu_gvis.h"
-#include "mupip_put_gvdata.h"
-#include "str2gvkey.h"
-#include "gtmmsg.h"
-#include "iottdefsp.h"
-
-#define DEFAULT_MAX_REC_SIZE  3072
-
-GBLREF bool	mupip_error_occurred;
-GBLREF bool	mu_ctrly_occurred;
-GBLREF bool	mu_ctrlc_occurred;
-GBLREF gd_addr	*gd_header;
-GBLREF spdesc   stringpool;
-GBLREF gv_key	*gv_currkey;
-GBLREF gd_region *gv_cur_region;
-
-error_def(ERR_RECCNT);
-error_def(ERR_MUPIPINFO);
-error_def(ERR_PREMATEOF);
-error_def(ERR_LOADABORT);
-error_def(ERR_LOADCTRLY);
-error_def(ERR_LOADEOF);
-error_def(ERR_BEGINST);
-error_def(ERR_LOADFILERR);
-error_def(ERR_MUNOACTION);
-error_def(ERR_MUNOFINISH);
-error_def(ERR_SYSCALL);
-
-/***********************************************************************************************/
-/*				GT.M Go Format or ZWR Format                                   */
-/***********************************************************************************************/
-void go_load(uint4 begin, uint4 end, struct RAB *inrab, struct FAB *infab)
-{
-	uint4	max_data_len, max_subsc_len, max_record_size, status;
-	uint4	key_count, rec_count;
-	msgtype	msg;
-	char	*ptr;
-	int	len, keylength, keystate, fmt = MU_FMT_ZWR;
-	mstr	src, des;
-	boolean_t	keepgoing, format_error = FALSE;
-	unsigned char	*rec_buff, ch;
-
-	msg.new_opts = msg.def_opts = 1;
-	inrab->rab$w_usz = ZWR_EXP_RATIO(gd_header->max_rec_size);
-	inrab->rab$l_ubf = malloc(inrab->rab$w_usz + 8);
-	inrab->rab$l_ubf = (((int4)(inrab->rab$l_ubf) + 7) & -8);
-	max_data_len = 0;
-	max_subsc_len = 0;
-	key_count = 0;
-	rec_count = 1;
-	max_record_size = DEFAULT_MAX_REC_SIZE;
-	rec_buff = (unsigned char *)malloc(max_record_size);
-	for (; 3 > rec_count; rec_count++)
-	{
-		status = sys$get(inrab);		/* scan off header */
-		if (RMS$_EOF == status)
-		{
-			sys$close(infab);
-			mupip_exit(ERR_PREMATEOF);
-		}
-		if (RMS$_NORMAL != status)
-		{
-			gtm_putmsg(VARLSTCNT(14) ERR_LOADFILERR, 2, infab->fab$b_fns, infab->fab$l_fna,
-					ERR_SYSCALL, 5, LEN_AND_LIT("SYS$GET"), CALLFROM, status, 0, inrab->rab$l_stv);
-			sys$close(infab);
-			mupip_exit(ERR_MUNOACTION);
-		}
-		len = inrab->rab$w_rsz;
-		ptr = inrab->rab$l_rbf;
-		while (0 < len && ((ASCII_LF == *(ptr + len - 1)) || (ASCII_CR == *(ptr + len - 1))))
-			len--;
-		if (2 == rec_count)	/* the format flag appears only in the second record. */
-			fmt = (0 == memcmp(ptr + len - STR_LIT_LEN("ZWR"), "ZWR", STR_LIT_LEN("ZWR"))) ?
-				MU_FMT_ZWR : MU_FMT_GO;
-		msg.msg_number = ERR_MUPIPINFO;
-		msg.arg_cnt = 6;
-		msg.fp_cnt = 4;
-		msg.fp[0].n = len;
-		msg.fp[1].cp = ptr;
-		sys$putmsg(&msg, 0, 0, 0);
-	}
-	if (begin < 3)
-		begin = 3;
-	assert(3 == rec_count);
-	for (; rec_count < begin; rec_count++)			/* scan to begin */
-	{
-		status = sys$get(inrab);
-		if (RMS$_EOF == status)
-		{
-			sys$close(infab);
-			gtm_putmsg(VARLSTCNT(3) ERR_LOADEOF, 1, begin);
-			mupip_exit(ERR_MUNOACTION);
-		}
-		if (RMS$_NORMAL != status)
-		{
-			gtm_putmsg(VARLSTCNT(14) ERR_LOADFILERR, 2, infab->fab$b_fns, infab->fab$l_fna,
-					ERR_SYSCALL, 5, LEN_AND_LIT("SYS$GET"), CALLFROM, status, 0, inrab->rab$l_stv);
-			sys$close(infab);
-			mupip_exit(ERR_MUNOACTION);
-		}
-	}
-	msg.msg_number = ERR_BEGINST;
-	msg.arg_cnt = 4;
-	msg.fp_cnt = 2;
-	msg.fp[0].n = rec_count;
-	sys$putmsg(&msg, 0, 0, 0);
-
-	ESTABLISH(mupip_load_ch);
-	for (; ; rec_count++)
-	{
-		if (mu_ctrly_occurred || mupip_error_occurred)
-			break;
-		if (mu_ctrlc_occurred)
-		{
-			mu_load_stat(max_data_len, max_subsc_len, key_count, key_count ? (rec_count - 1) : 0, ERR_RECCNT);
-			mu_gvis();
-			util_out_print("", TRUE);
-		}
-		/* reset the stringpool for every record in order to avoid garbage collection */
-		stringpool.free = stringpool.base;
-		if (rec_count > end)
-			break;
-		if (RMS$_EOF == (status = sys$get(inrab)))
-			break;
-		if (RMS$_NORMAL != status)
-		{
-			rts_error(VARLSTCNT(14) ERR_LOADFILERR, 2, infab->fab$b_fns, infab->fab$l_fna,
-					ERR_SYSCALL, 5, LEN_AND_LIT("SYS$GET"), CALLFROM, status, 0, inrab->rab$l_stv);
-			mupip_error_occurred = TRUE;
-			break;
-		}
-		len = inrab->rab$w_rsz;
-		ptr = inrab->rab$l_rbf;
-		while (0 < len && ((ASCII_LF == *(ptr + len - 1)) || (ASCII_CR == *(ptr + len - 1))))
-			len--;
-		if (0 == len)
-			continue;
-		if (MU_FMT_ZWR == fmt)
-		{
-		        keylength = 0;
-			keystate  = 0;
-			keepgoing = TRUE;
-			while((keylength < len - 1) && keepgoing) 	/* 1 == SIZEOF(=), since ZWR allows '^x(1,2)='*/
-			{
-			        ch = *(ptr + keylength);
-				keylength++;
-				switch (keystate)
-				{
-				case 0:					/* in global name */
-				        if ('=' == ch)			/* end of key */
-					{
-					        keylength--;
-						keepgoing = FALSE;
-					}
-					else if ('(' == ch)		/* start of subscripts */
-					        keystate = 1;
-					break;
-				case 1:					/* in subscripts area, but out of quotes or $C() */
-                                        switch (ch)
-                                        {
-                                        case ')':                                       /* end of subscripts ==> end of key */
-                                                assert('=' == *(ptr + keylength));
-                                                keepgoing = FALSE;
-                                                break;
-                                        case '"':                                       /* step into "..." */
-                                                keystate = 2;
-                                                break;
-                                        case '$':                                       /* step into $C(...) */
-                                                assert(('C' == *(ptr + keylength)) || ('c' == *(ptr + keylength)));
-                                                assert('(' == *(ptr + keylength + 1));
-                                                keylength += 2;
-                                                keystate = 3;
-                                                break;
-                                        }
-                                        break;
-                                case 2:                                         /* in "..." */
-                                        if ('"' == ch)
-                                        {
-                                                switch (*(ptr + keylength))
-                                                {
-                                                case '"':                               /* "" */
-                                                        keylength++;
-                                                        break;
-                                                case '_':                               /* _$C(...) */
-                                                        assert('$' == *(ptr + keylength + 1));
-                                                        assert(('c' == *(ptr + keylength + 2)) || ('C' == *(ptr + keylength + 2)));
-                                                        assert('(' == *(ptr + keylength + 3));
-                                                        keylength += 4;
-                                                        keystate = 3;
-                                                        break;
-                                                default:                                /* step out of "..." */
-                                                        keystate = 1;
-                                                }
-                                        }
-                                        break;
-                                case 3:                                         /* in $C(...) */
-                                        if (')' == ch)
-                                        {
-                                                if ('_' == *(ptr + keylength))          /* step into "..." */
-                                                {
-                                                        assert('"' == *(ptr + keylength + 1));
-                                                        keylength += 2;
-                                                        keystate = 2;
-                                                        break;
-                                                }
-                                                else
-                                                        keystate = 1;                   /* step out of $C(...) */
-                                        }
-                                        break;
-                                default:
-                                        assert(FALSE);
-                                        break;
-                                }
-			}
-			gv_currkey->end = 0;
-			str2gvkey_gvfunc(ptr, keylength);
-			if (mupip_error_occurred)
-			{
-			        mu_gvis();
-				break;
-			}
-			assert(keylength < len - 1);
-			if (max_subsc_len < (gv_currkey->end + 1))
-				max_subsc_len = gv_currkey->end + 1;
-			src.len = len - keylength - 1;
-			src.addr = (char *)(ptr + keylength + 1);
-			des.len = 0;
-			if (src.len > max_record_size)
-			{
-			        max_record_size = src.len;
-			        free(rec_buff);
-				rec_buff = (unsigned char *)malloc(max_record_size);
-			}
-			des.addr = (char *)rec_buff;
-			if (FALSE == zwr2format(&src, &des))
-                        {
-                                util_out_print("Format error in record !8UL: !/!AD", TRUE, rec_count, src.len, src.addr);
-				format_error = TRUE;
-				continue;
-                        }
-			if (max_data_len < des.len)
-			        max_data_len = des.len;
-			mupip_put_gvdata(rec_buff, des.len);
-			if (mupip_error_occurred)
-			{
-			        mu_gvis();
-				break;
-			}
-			key_count++;
-		} else
-		{
-			gv_currkey->end = 0;
-		        str2gvkey_gvfunc(ptr, len);
-			if (mupip_error_occurred)
-			{
-			        mu_gvis();
-				break;
-			}
-			if (max_subsc_len < (gv_currkey->end + 1))
-				max_subsc_len = gv_currkey->end + 1;
-			rec_count++;
-			if (rec_count > end)
-			{
-			        rec_count--;	/* Decrement as didn't load key */
-			        break;
-			}
-			if (RMS$_EOF == (status = sys$get(inrab)))
-			        break;
-			if (RMS$_NORMAL != status)
-			{
-			        mupip_error_occurred = TRUE;
-				mu_gvis();
-				rts_error(VARLSTCNT(14) ERR_LOADFILERR, 2, infab->fab$b_fns, infab->fab$l_fna,
-						ERR_SYSCALL, 5, LEN_AND_LIT("SYS$GET"), CALLFROM, status, 0, inrab->rab$l_stv);
-				break;
-			}
-			len = inrab->rab$w_rsz;
-			ptr = inrab->rab$l_rbf;
-			while (0 < len && ((ASCII_LF == *(ptr + len - 1)) || (ASCII_CR == *(ptr + len - 1))))
-			        len--;
-			if (max_data_len < len)
-			        max_data_len = len;
-			mupip_put_gvdata(ptr, len);
-			if (mupip_error_occurred)
-			{
-			        mu_gvis();
-				break;
-			}
-			key_count++;
-		}
-	}
-	gv_cur_region = NULL;
-	REVERT;
-	status = sys$close(infab);
-	if (RMS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(14) ERR_LOADFILERR, 2, infab->fab$b_fns, infab->fab$l_fna,
-				ERR_SYSCALL, 5, LEN_AND_LIT("SYS$CLOSE"), CALLFROM, status, 0, inrab->rab$l_stv);
-		mupip_error_occurred = TRUE;
-	}
-	if (mupip_error_occurred)
-	{
-		gtm_putmsg(VARLSTCNT(3) ERR_LOADABORT, 1, rec_count);
-		mupip_exit( ERR_MUNOACTION );
-	}
-	if (mu_ctrly_occurred)
-		rts_error(VARLSTCNT(1) ERR_LOADCTRLY);
-	mu_load_stat(max_data_len, max_subsc_len, key_count, key_count ? (rec_count - 1) : 0, ERR_RECCNT);
-	free(inrab->rab$l_ubf);
-	free(rec_buff);
-	if (format_error)
-		mupip_exit(ERR_MUNOFINISH);
-}
diff --git a/sr_vvms/golevel.c b/sr_vvms/golevel.c
deleted file mode 100644
index 0a45965..0000000
--- a/sr_vvms/golevel.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2010, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-
-#include <rtnhdr.h>
-#include "stack_frame.h"
-#include "tp_frame.h"
-#include "golevel.h"
-#include "error.h"
-#include "dollar_zlevel.h"
-
-GBLREF	stack_frame	*frame_pointer;
-
-error_def(ERR_ZGOTOTOOBIG);
-error_def(ERR_ZGOTOLTZERO);
-
-void	golevel(int4 level)
-{
-        stack_frame     *fp;
-        int4            unwind, zlevel, prevlvl;
-
-	if (0 > level)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZGOTOLTZERO);
-	for (zlevel = 0, fp = frame_pointer; fp->old_frame_pointer; fp = fp->old_frame_pointer)
-	{
-		if (fp->type & SFT_COUNT)
-			zlevel++;
-	}
-	if (level > zlevel)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZGOTOTOOBIG);
-	for (unwind = 0, fp = frame_pointer; fp->old_frame_pointer; fp = fp->old_frame_pointer)
-	{
-		if ((fp->type & SFT_COUNT) && (level == zlevel--))
-			break;
-		unwind++;
-	}
-	DBGEHND_ONLY(prevlvl = dollar_zlevel());
-	GOFRAMES(unwind, FALSE, FALSE);
-	DBGEHND((stderr, "golevel: Unwound from level %d to level %d  which is %d frames ending in stackframe 0x"lvaddr" with"
-		 " type 0x%04lx\n", prevlvl, level, unwind, frame_pointer, (frame_pointer ? frame_pointer->type : 0xffff)));
-	return;
-}
diff --git a/sr_vvms/goq_load.c b/sr_vvms/goq_load.c
deleted file mode 100644
index 1e92fe7..0000000
--- a/sr_vvms/goq_load.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <rms.h>
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "efn.h"
-#include "msg.h"
-#include "mupip_exit.h"
-#include "load.h"
-
-#define MVX_BLK_SIZE 2048
-#define M11_BLK_SIZE 1024
-
-GBLREF gd_region *gv_cur_region;
-
-/***********************************************************************************************/
-/*					M/VX GOQ Format                                        */
-/***********************************************************************************************/
-void goq_load(uint4 begin, uint4 end, struct FAB *infab)
-{
-	int		status;
-	msgtype		msg;
-	unsigned char	*in_buff, *b;
-	unsigned int	n;
-	bool		is_begin;
-	uint4		rec_count;
-	unsigned short	goq_blk_size;
-	short		iosb[4];
-
-	error_def(ERR_INVMVXSZ);
-	error_def(ERR_MUPIPINFO);
-	error_def(ERR_PREMATEOF);
-	error_def(ERR_LDGOQFMT);
-	error_def(ERR_BEGINST);
-
-	rec_count = 0;
-	if (begin > 0)
-		is_begin = TRUE;
-	else
-		is_begin = FALSE;
-	goq_blk_size = MVX_BLK_SIZE;
-	infab->fab$w_mrs = goq_blk_size;
-	in_buff = malloc(goq_blk_size + 8);
-	if (is_begin)
-	{
-		status = sys$qio(efn_bg_qio_read, infab->fab$l_stv, IO$_READVBLK, &iosb[0],
-				0, 0, in_buff, goq_blk_size,
-				(rec_count * goq_blk_size / 512) + 1, 0, 0, 0);
-		if (SS$_NORMAL != status)		/* get header block */
-			rts_error(VARLSTCNT(1) status);
-		sys$synch(efn_bg_qio_read, &iosb[0]);
-		if (SS$_NORMAL != iosb[0])
-			rts_error(VARLSTCNT(1) iosb[0]);
-		if (iosb[1] != goq_blk_size)
-		{
-			if (M11_BLK_SIZE != iosb[1])
-				rts_error(VARLSTCNT(1) ERR_INVMVXSZ);
-			goq_blk_size = M11_BLK_SIZE;
-		}
-		while ((SS$_ENDOFFILE != iosb[0]) && (rec_count < begin))
-		{
-			rec_count++;
-			status = sys$qio(efn_bg_qio_read, infab->fab$l_stv, IO$_READVBLK, &iosb[0],
-					0, 0, in_buff, goq_blk_size,
-					(rec_count * goq_blk_size / 512) + 1, 0, 0, 0);
-			if (SS$_NORMAL != status)
-				rts_error(VARLSTCNT(1) status);
-			sys$synch(efn_bg_qio_read, &iosb[0]);
-			if ((SS$_NORMAL != iosb[0]) && (SS$_ENDOFFILE != iosb[0]))
-			{
-				rts_error(VARLSTCNT(1) iosb[0]);
-				mupip_exit(iosb[0]);
-			}
-		}
-		for (;rec_count < begin;)
-		{
-			status = sys$qio(efn_bg_qio_read, infab->fab$l_stv, IO$_READVBLK, &iosb[0],
-					0, 0, in_buff, goq_blk_size,
-					(rec_count * goq_blk_size / 512) + 1, 0, 0, 0);
-			if (SS$_NORMAL != status)
-				rts_error(VARLSTCNT(1) status);
-			sys$synch(efn_bg_qio_read, &iosb[0]);
-			if (SS$_ENDOFFILE == iosb[0])
-				rts_error(VARLSTCNT(1) ERR_PREMATEOF);
-			if (SS$_NORMAL != iosb[0])
-				rts_error(VARLSTCNT(1) iosb[0]);
-			rec_count++;
-		}
-		msg.msg_number = ERR_BEGINST;
-		msg.arg_cnt = 3;
-		msg.new_opts = msg.def_opts = 1;
-		msg.fp_cnt = 1;
-		msg.fp[0].n = rec_count;
-		sys$putmsg(&msg, 0, 0, 0);
-	} else
-	{
-		status = sys$qio(efn_bg_qio_read, infab->fab$l_stv, IO$_READVBLK, &iosb[0],
-				0, 0, in_buff, goq_blk_size,
-				(rec_count * goq_blk_size / 512) + 1, 0, 0, 0);
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-		sys$synch(efn_bg_qio_read, &iosb[0]);
-		if (SS$_NORMAL != iosb[0])
-		{
-			rts_error(VARLSTCNT(1) iosb[0]);
-			mupip_exit(iosb[0]);
-		}
-		if (iosb[1] != goq_blk_size)
-		{
-			if (M11_BLK_SIZE != iosb[1])
-				rts_error(VARLSTCNT(1) ERR_INVMVXSZ);
-			goq_blk_size = M11_BLK_SIZE;
-		}
-		b = in_buff;
-		while ((13 != *b++) && (b - in_buff < goq_blk_size - 28))
-			;
-		if (memcmp(b - SIZEOF("~%GOQ"), LIT_AND_LEN("~%GOQ")) || (10 != *b))
-		{
-			rts_error(VARLSTCNT(1) ERR_LDGOQFMT);
-			mupip_exit(ERR_LDGOQFMT);
-		}
-		for (n = 0;  n < 3;  n++)
-		{
-			while ((13 != *b++) && b - in_buff < goq_blk_size)
-				;
-			if (10 != *b++)
-			{
-				rts_error(VARLSTCNT(1) ERR_LDGOQFMT);
-				mupip_exit(ERR_LDGOQFMT);
-			}
-		}
-		msg.msg_number = ERR_MUPIPINFO;
-		msg.arg_cnt = 4;
-		msg.new_opts = msg.def_opts = 1;
-		msg.fp_cnt = 2;
-		msg.fp[0].n = b - in_buff - 1;
-		msg.fp[1].cp = in_buff;
-		sys$putmsg(&msg, 0, 0, 0);
-		while (SS$_ENDOFFILE != iosb[0])
-		{
-			rec_count++;
-			status = sys$qio(efn_bg_qio_read, infab->fab$l_stv, IO$_READVBLK, &iosb[0],
-					0, 0, in_buff, goq_blk_size,
-					(rec_count * goq_blk_size / 512) + 1, 0, 0, 0);
-			if (SS$_NORMAL != status)
-			{
-				rts_error(VARLSTCNT(1) status);
-				mupip_exit(status);
-			}
-			sys$synch(efn_bg_qio_read, &iosb[0]);
-			if ((SS$_NORMAL != iosb[0]) && (SS$_ENDOFFILE != iosb[0]))
-			{
-				rts_error(VARLSTCNT(1) iosb[0]);
-				mupip_exit(iosb[0]);
-			}
-		}
-	}
-	if (MVX_BLK_SIZE == goq_blk_size)
-		goq_mvx_load(infab, in_buff, rec_count, end);
-	else
-		goq_m11_load(infab, in_buff, rec_count, end);
-	/***********************************************************************************************/
-	/*					Shut Down                                              */
-	/***********************************************************************************************/
-CLOSE:
-	free(in_buff);
-	gv_cur_region = NULL;
-	status = sys$dassgn(infab->fab$l_stv);
-	if (SS$_NORMAL != status)
-	{
-		rts_error(VARLSTCNT(1) status);
-		mupip_exit(status);
-	}
-	return;
-}
diff --git a/sr_vvms/goq_m11_load.c b/sr_vvms/goq_m11_load.c
deleted file mode 100644
index df1aa60..0000000
--- a/sr_vvms/goq_m11_load.c
+++ /dev/null
@@ -1,447 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include "efn.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "msg.h"
-#include "muextr.h"
-#include "stringpool.h"
-#include "util.h"
-#include "op.h"
-#include "error.h"
-#include "mu_load_stat.h"
-#include "mvalconv.h"
-#include "mu_gvis.h"
-#include "quad2asc.h"
-#include "hashtab_mname.h"
-
-#define ODD 1
-#define NEGORZRO 1
-#define M11_ZRO 96
-#define M11_EXP 64
-#define M11_NEG 128
-#define GTM_PREC 15
-
-#define MVX_BLK_SIZE 2048
-#define M11_BLK_SIZE 1024
-
-GBLREF bool	mupip_error_occurred;
-GBLREF bool	mupip_DB_full;
-GBLREF bool	mu_ctrly_occurred;
-GBLREF bool	mu_ctrlc_occurred;
-GBLREF gd_addr	*gd_header;
-GBLREF gv_key	*gv_currkey;
-GBLREF spdesc stringpool;
-
-#define US	0
-#define THEM	1
-#define GOQ_MAX_KSIZ 512
-#define LCL_BUF_SIZE 256
-
-error_def(ERR_BLKCNT);
-error_def(ERR_CORRUPT);
-error_def(ERR_GOQPREC);
-error_def(ERR_LOADABORT);
-error_def(ERR_LOADCTRLY);
-
-void  goq_m11_load(struct FAB *infab, char *in_buff, uint4 rec_count, uint4 end)
-{
-	uint4		max_data_len, max_subsc_len, key_count, global_key_count;
-	int		status;
-	msgtype		msg;
-	char  		digit,exp, k_buff[LCL_BUF_SIZE];
-	unsigned char	*cp1, *cp2, *cp3, *dp1, *b, *btop;
-	boolean_t	mupip_precision_error, is_dec, is_end;
-	unsigned int	len, n, order;
-	unsigned short  goq_blk_size;
-	short		iosb[4];
-	struct {
-			unsigned char	cmpc;
-			unsigned char	subsc_len;
-			unsigned char	subsc[1];
-		} 	*goq_rp;
-	short int	*goq_blk_used;
-	gv_key		*goq_currkey;
-	int		goq_key_sub, goq_subsc_map[2][129];
-	mval		v, exist;
-	mname_entry	gvname;
-	gvnh_reg_t	*gvnh_reg;
-
-	if (end > 0)
-		is_end = TRUE;
-	else 	is_end = FALSE;
-
-	max_data_len = max_subsc_len = key_count = 0;
-	goq_subsc_map[0][0] = goq_subsc_map[1][0] = 0;
-
-	goq_blk_size = M11_BLK_SIZE;
-	goq_currkey = malloc (SIZEOF(gv_key) + GOQ_MAX_KSIZ - 1);
-	goq_currkey->top = GOQ_MAX_KSIZ;
-	goq_blk_used = in_buff + goq_blk_size - SIZEOF(short int);
-	gv_currkey = malloc (SIZEOF(gv_key) + GOQ_MAX_KSIZ - 1 + MAX_GVKEY_PADDING_LEN);
-	gv_currkey->top = GOQ_MAX_KSIZ;
-
-
-	lib$establish(mupip_load_ch);
-
-	for (; !mupip_DB_full ;)
-	{
-		mupip_precision_error = FALSE;
-		mupip_error_occurred = FALSE;
-		if (mu_ctrly_occurred)
-		{	break;
-		}
-		if (mu_ctrlc_occurred)
-		{
-			mu_load_stat(max_data_len, max_subsc_len, key_count, rec_count, ERR_BLKCNT);
-			mu_gvis();
-			util_out_print(0,TRUE);
-		}
-		/* reset the stringpool for every record in order to avoid garbage collection */
-		stringpool.free = stringpool.base;
-		if (is_end && (rec_count >= end))
-			break;
-		len = 0;
-		/*****************************************************************************************/
-		while (len == 0)
-		{
-			status = sys$qio(efn_bg_qio_read, infab->fab$l_stv ,IO$_READVBLK , &iosb[0],
-					   0,0,in_buff,goq_blk_size,
-					   (rec_count * goq_blk_size / 512) + 1,0,0,0);
-
-			if (status != SS$_NORMAL)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-
-			sys$synch(efn_bg_qio_read, &iosb[0]);
-			if (iosb[0] == SS$_ENDOFFILE)
-				break;
-
-			if (iosb[0] != SS$_NORMAL)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) iosb[0]);
-			rec_count++;
-			len = *goq_blk_used;
-		}
-		/*****************************************************************************************/
-		if ((is_end && rec_count >= end) || iosb[0] == SS$_ENDOFFILE)
-			break;
-		if (len >= goq_blk_size)
-		{	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,0);
-			continue;
-		}
-		goq_rp = in_buff;
-
-		btop = in_buff + len;
-		global_key_count = 1;
-		goq_key_sub = 0;
-
-		b = v.str.addr = &k_buff[0];
-		cp1 = &goq_rp->subsc[0];
-		cp2 = &goq_rp->subsc[0] + goq_rp->subsc_len;
-		cp3 = &goq_currkey->base[0];
-
-		while (*cp1 & ODD)
-		{
-			*b++ = *cp1 /2;
-			*cp3++ = *cp1++;
-		}
-		*b++ = *cp1 /2;
-		*cp3++ = *cp1++;
-		v.str.len = b - (unsigned char *) v.str.addr;
-
-		if (goq_rp->cmpc != 0 || v.str.len > goq_currkey->top)
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-			continue;
-		}
-		gvname.var_name = v.str;
-		COMPUTE_HASH_MNAME(&gvname);
-		GV_BIND_NAME_AND_ROOT_SEARCH (gd_header, &gvname, gvnh_reg);
-		assert(NULL == gvnh_reg->gvspan); /* so GV_BIND_SUBSNAME_IF_GVSPAN is not needed */
-		if (mupip_error_occurred)
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-			mu_gvis();
-			util_out_print(0,TRUE);
-			continue;
-		}
-		goq_key_sub++;
-		goq_subsc_map [US][goq_key_sub] = gv_currkey->end;
-		goq_subsc_map [THEM][goq_key_sub] = goq_currkey->end = v.str.len;
-
-		while (cp1 < cp2)
-		{
-			*cp3++ = *cp1++;
-		}
-		cp3 = &goq_currkey->base[0];
-		cp1 = cp3 + goq_currkey->end;
-		cp2 = cp3 + goq_rp->subsc_len;
-		for (;; )
-		{
-			dp1 = &goq_rp->subsc[ goq_rp->subsc_len ];
-			n = *dp1 + SIZEOF(char); /* size of data */
-
-			n += goq_rp->subsc_len + 2 * SIZEOF(char); /* size of key */
-			if ((unsigned char *) goq_rp + n > btop)
-			{
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-				mu_gvis();
-				util_out_print(0,TRUE);
-				break;
-			}
-			while (cp1 < cp2)
-			{
-				if (*cp1 == NEGORZRO)
-				{
-					cp1++;
-					exp = *cp1++;
-					if (exp < M11_EXP)
-					{
-						v.mvtype = MV_STR;
-						b = v.str.addr = &k_buff;
-						*b++ = '-';
-						*b++ = '.';
-						exp /= 2;
-						exp = M11_EXP/2 - exp - 1;
-						assert (exp < M11_EXP/2);
-
-						while (*cp1 != M11_NEG && cp1 < cp2 && !mupip_error_occurred)
-						{
-							digit = *cp1++;
-							digit /= 2;
-							switch (digit)
-							{
-								case '0': *b++ = '9';
-									break;
-								case '1': *b++ = '8';
-									break;
-								case '2': *b++ = '7';
-									break;
-								case '3': *b++ = '6';
-									break;
-								case '4': *b++ = '5';
-									break;
-								case '5': *b++ = '4';
-									break;
-								case '6': *b++ = '3';
-									break;
-								case '7': *b++ = '2';
-									break;
-								case '8': *b++ = '1';
-									break;
-								case '9': *b++ = '0';
-									break;
-								default:
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)
-										ERR_CORRUPT,2,rec_count, global_key_count);
-									 mu_gvis();
-									 util_out_print(0,TRUE);
-							}
-						}
-						if (!mupip_error_occurred)
-						{
-							if (*cp1++ != M11_NEG)
-							{
-								rts_error_csa(CSA_ARG(NULL)
-									VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-								mu_gvis();
-								util_out_print(0,TRUE);
-								break;
-							}
-							if (b - (unsigned char *) v.str.addr > GTM_PREC + 2)
-							{
-								mupip_precision_error = TRUE;
-							}
-							*b++ = 'E';
-							if (order = exp/10)
-								*b++ = order + 48;
-							*b++ = exp - order*10 + 48;
-							v.str.len = b - (unsigned char *) v.str.addr;
-							s2n(&v);
-							if (mupip_error_occurred)
-							{
-								rts_error_csa(CSA_ARG(NULL)
-									VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-								mu_gvis();
-								util_out_print(0,TRUE);
-								break;
-							}
-							else
-								v.mvtype = MV_NM;
-						}
-					} else if (M11_ZRO == exp)
-					{
-						v.mvtype = MV_NM;
-						v.m[1] = 0;
-					} else
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-						mu_gvis();
-						util_out_print(0,TRUE);
-						break;
-					}
-				}
-				else if (*cp1 > NEGORZRO && *cp1 < M11_EXP)
-				{
-					cp1++;
-					is_dec = 0;
-					v.mvtype = MV_STR;
-					b = v.str.addr = &k_buff;
-					while (*cp1 & ODD)
-					{
-						*b = *cp1++ / 2;
-
-						if (*b++ == '.')
-							is_dec = 1;
-					}
-					*b++ = *cp1++ / 2;
-					v.str.len = b - (unsigned char *) v.str.addr;
-					if (cp1 > cp2)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-						mu_gvis();
-						util_out_print(0,TRUE);
-						break;
-					}
-					if (v.str.len > GTM_PREC + is_dec)
-					{
-						mupip_precision_error = TRUE;
-					}
-					s2n(&v);
-					if (mupip_error_occurred)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-						mu_gvis();
-						util_out_print(0,TRUE);
-						break;
-					}
-					else
-						v.mvtype = MV_NM;
-				}
-				else
-				{
-					v.mvtype = MV_STR;
-					b = v.str.addr = &k_buff[0];
-					while (*cp1 & ODD)
-					{
-						*b++ = *cp1++ / 2;
-					}
-					*b++ = *cp1++ /2;
-					v.str.len = b - (unsigned char *) v.str.addr;
-					if (cp1 > cp2)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-						mu_gvis();
-						util_out_print(0,TRUE);
-						break;
-					}
-				}
-				mval2subsc(&v, gv_currkey, gvnh_reg->gd_reg->std_null_coll);
-				gv_currkey->prev = 0;
-				if (mupip_error_occurred)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-					mu_gvis();
-					util_out_print(0,TRUE);
-					break;
-				}
-				goq_key_sub++;
-				goq_subsc_map[US][goq_key_sub] = gv_currkey->end;
-				goq_subsc_map[THEM][goq_key_sub] = goq_currkey->end = cp1 - cp3;
-			}
-
-			if (mupip_error_occurred)
-				break;
-
-			v.mvtype = MV_STR; /* mval for datum */
-			v.str.len = *dp1++;
-			v.str.addr = dp1;
-
-			if (mupip_precision_error)
-			{
-				op_gvdata(&exist);
-				if (exist.m[1] != 0)
-				{
-					msg.arg_cnt = 4;
-					msg.new_opts = msg.def_opts = 1;
-					msg.msg_number = ERR_GOQPREC;
-					msg.fp_cnt = 2;
-					msg.fp[0].n = rec_count;
-					msg.fp[1].n = global_key_count;
-					sys$putmsg(&msg,0,0,0);
-					mu_gvis();
-					util_out_print(0,TRUE);
-				}
-				else
-					op_gvput(&v);
-				mupip_precision_error = FALSE;
-			}
-			else
-				op_gvput (&v);
-			if (mupip_error_occurred)
-			{
-				if (!mupip_DB_full)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-					util_out_print(0,TRUE);
-				}
-				break;
-			}
-			if (max_data_len < v.str.len)
-				max_data_len = v.str.len;
-			if (max_subsc_len < (gv_currkey->end + 1))
-				max_subsc_len = gv_currkey->end + 1;
-			key_count++;
-
-			(char *) goq_rp += n;
-			if (goq_rp < btop)
-			{
-				if (goq_rp->cmpc > goq_currkey->end)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-					break;
-				}
-				cp1 = &goq_rp->subsc[0];
-				cp2 = &goq_currkey->base[0] + goq_rp->cmpc;
-				for ( n = 0; n < goq_rp->subsc_len; n++)
-					*cp2++ = *cp1++;
-				n = goq_key_sub;
-				for (; goq_subsc_map[THEM][n] > goq_rp->cmpc; n--)
-					;
-				goq_key_sub = n;
-				cp1 = cp3 + goq_subsc_map[THEM][goq_key_sub];
-				gv_currkey->end = goq_subsc_map[US][goq_key_sub];
-				global_key_count++;
-			}
-			else
-				break;
-		}
-	}
-
-	if (mu_ctrly_occurred)
-		lib$signal(ERR_LOADCTRLY);
-
-	if (mupip_error_occurred)
-		lib$signal(ERR_LOADABORT,1,rec_count);
-	else
-		mu_load_stat(max_data_len, max_subsc_len, key_count, rec_count, ERR_BLKCNT);
-
-	free (goq_currkey);
-	free (gv_currkey);
-}
diff --git a/sr_vvms/goq_mvx_load.c b/sr_vvms/goq_mvx_load.c
deleted file mode 100644
index b59f08c..0000000
--- a/sr_vvms/goq_mvx_load.c
+++ /dev/null
@@ -1,534 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <ssdef.h>
-#include <iodef.h>
-
-#include "efn.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "msg.h"
-#include "muextr.h"
-#include "stringpool.h"
-#include "util.h"
-#include "op.h"
-#include "error.h"
-#include "mu_load_stat.h"
-#include "mvalconv.h"
-#include "mu_gvis.h"
-#include "quad2asc.h"
-#include "hashtab_mname.h"
-
-#define NEGORZRO 1
-#define MVX_ZRO 48
-#define MVX_EXP 32
-#define MVX_NEG 255
-#define GTM_PREC 15
-
-#define MVX_BLK_SIZE 2048
-#define M11_BLK_SIZE 1024
-
-GBLREF bool	mupip_error_occurred;
-GBLREF bool	mupip_DB_full;
-GBLREF bool	mu_ctrly_occurred;
-GBLREF bool	mu_ctrlc_occurred;
-GBLREF gd_addr	*gd_header;
-
-GBLREF gv_key	*gv_currkey;
-GBLREF spdesc stringpool;
-
-#define US	0
-#define THEM	1
-#define GOQ_MAX_KSIZ 512
-#define LCL_BUF_SIZE 256
-
-error_def(ERR_BLKCNT);
-error_def(ERR_CORRUPT);
-error_def(ERR_GOQPREC);
-error_def(ERR_LOADABORT);
-error_def(ERR_LOADCTRLY);
-
-void	goq_mvx_load(struct FAB *infab, char *in_buff, uint4 rec_count, uint4 end)
-{
-	uint4		max_data_len, max_subsc_len, key_count, global_key_count;
-	int		status;
-
-	static readonly unsigned char	goq_gbl_blk_hdr[] = { 0, 1, 32, 0, 0 };
-	msgtype		msg;
-	char		exp, k_buff[LCL_BUF_SIZE];
-	unsigned char	*cp1, *cp2, *cp3, *dp1, *b, *btop;
-	bool		mupip_precision_error, is_dec, is_end;
-	unsigned int	len, n, order;
-	unsigned short  goq_blk_size;
-	short		iosb[4];
-	struct {
-			unsigned char	cmpc;		/* number of initial characters in common with previous key */
-			unsigned char	subsc_len;	/* number of characters in subsc to append to those we can
-							   use from beginning of previous key */
-			unsigned char	subsc[1];	/* characters (usually representing subscripts) to be appended
-							   to characters we can use from beginning of previous key */
-		} 	*goq_rp;
-	short int	*goq_blk_used;
-	gv_key		*goq_currkey;
-	mname_entry	gvname;
-	gvnh_reg_t	*gvnh_reg;
-
-	/* goq_key_sub = number of discrete items in key to convert (i.e., global name and subscripts)
-	   goq_subsc_map = array of positions separating discrete items in key:
-			goq_subsc_map[*][0] = start of key (start of global name)
-			goq_subsc_map[*][1] = end of global name/start of first subscript
-			goq_subsc_map[*][n] = end of subscript n-1/start of subscript n
-			goq_subsc_map[US]  [*] = position in gv_currkey->base
-			goq_subsc_map[THEM][*] = position in goq_currkey->base
-	*/
-	int		goq_key_sub, goq_subsc_map[2][129];
-
-	mval		v, exist;
-
-	if (end > 0)	is_end = TRUE;
-	else 		is_end = FALSE;
-
-	max_data_len = max_subsc_len = key_count = 0;
-	goq_subsc_map[0][0] = goq_subsc_map[1][0] = 0;
-
-	goq_blk_size = MVX_BLK_SIZE;
-	goq_currkey = malloc (SIZEOF(gv_key) + GOQ_MAX_KSIZ - 1);
-	goq_currkey->top = GOQ_MAX_KSIZ;
-	goq_blk_used = in_buff + goq_blk_size - SIZEOF(short int);
-	gv_currkey = malloc (SIZEOF(gv_key) + GOQ_MAX_KSIZ - 1 + MAX_GVKEY_PADDING_LEN);
-	gv_currkey->top = GOQ_MAX_KSIZ;
-
-	lib$establish(mupip_load_ch);
-
-	for (; !mupip_DB_full ;)
-	{
-		mupip_precision_error = FALSE;
-		mupip_error_occurred = FALSE;
-		if (mu_ctrly_occurred)
-		{	break;
-		}
-		if (mu_ctrlc_occurred)
-		{
-			mu_load_stat(max_data_len, max_subsc_len, key_count, rec_count, ERR_BLKCNT);
-			mu_gvis();
-			util_out_print(0,TRUE);
-		}
-		/* reset the stringpool for every record in order to avoid garbage collection */
-		stringpool.free = stringpool.base;
-		if (is_end && (rec_count > end))
-			break;
-		len = 0;
-		/*****************************************************************************************/
-		while (len == 0)
-		{
-			status = sys$qio(efn_bg_qio_read, infab->fab$l_stv ,IO$_READVBLK , &iosb[0],
-					   0,0,in_buff,goq_blk_size,
-					   (rec_count * goq_blk_size / 512) + 1,0,0,0);
-
-			if (status != SS$_NORMAL)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-
-			sys$synch(efn_bg_qio_read, &iosb[0]);
-			if (iosb[0] == SS$_ENDOFFILE)
-				break;
-
-			if (iosb[0] != SS$_NORMAL)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) iosb[0]);
-			rec_count++;
-			len = *goq_blk_used;
-		}
-		/*****************************************************************************************/
-		if ((is_end && rec_count > end) || iosb[0] == SS$_ENDOFFILE)
-			break;
-		if (len >= goq_blk_size)
-		{	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,0);
-			continue;
-		}
-		goq_rp = in_buff;
-		if (!memcmp(goq_rp,&goq_gbl_blk_hdr,SIZEOF(goq_gbl_blk_hdr)))
-			(char *) goq_rp += SIZEOF(goq_gbl_blk_hdr);
-
-		btop = in_buff + len;
-		global_key_count = 1;
-		goq_key_sub = 0;
-
-		cp1 = &goq_rp->subsc[0];
-		cp2 = &goq_rp->subsc[0] + goq_rp->subsc_len;
-		cp3 = &goq_currkey->base[0];
-		v.str.addr = cp1;
-
-		while (cp1 < cp2 && *cp1)
-		{
-			*cp3++ = *cp1++;
-		}
-		v.str.len = cp1 - (unsigned char *) v.str.addr;
-		if (cp1 < cp2 && !*cp1)
-		{	*cp3++ = *cp1++;
-		}
-
-		if (goq_rp->cmpc != 0 || v.str.len > goq_currkey->top)
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-			continue;
-		}
-		gvname.var_name = v.str;
-		COMPUTE_HASH_MNAME(&gvname);
-		GV_BIND_NAME_AND_ROOT_SEARCH (gd_header, &gvname, gvnh_reg);
-		assert(NULL == gvnh_reg->gvspan); /* so GV_BIND_SUBSNAME_IF_GVSPAN is not needed */
-		if (mupip_error_occurred)
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-			mu_gvis();
-			util_out_print(0,TRUE);
-			continue;
-		}
-		goq_key_sub++;
-		goq_subsc_map [US][goq_key_sub] = gv_currkey->end;
-		goq_subsc_map [THEM][goq_key_sub] = goq_currkey->end = cp1 - (unsigned char *) v.str.addr;
-
-		while (cp1 < cp2)
-		{
-			*cp3++ = *cp1++;
-		}
-		cp3 = &goq_currkey->base[0];
-		cp1 = cp3 + goq_currkey->end;
-		cp2 = cp3 + goq_rp->subsc_len;
-		for (;; )
-		{
-			dp1 = &goq_rp->subsc[ goq_rp->subsc_len ];
-			n = *((unsigned short int *) dp1);
-
-			if (n == 65535)
-				n = 6;
-			else if (n > 32767)
-				n = 10;
-			else n += SIZEOF(short int);
-
-			n += goq_rp->subsc_len + 2 * SIZEOF(char);
-			if ((unsigned char *) goq_rp + n > btop)
-			{
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-				mu_gvis();
-				util_out_print(0,TRUE);
-				break;
-			}
-			while (cp1 < cp2)
-			{
-				if (*cp1 == NEGORZRO)
-				{
-					cp1++;
-					exp = *cp1++;
-					if (exp < MVX_EXP)
-					{
-						v.mvtype = MV_STR;
-						b = v.str.addr = &k_buff;
-						*b++ = '-';
-						*b++ = '.';
-						exp = -exp;		/* get exponent's two's complement */
-						exp -= 224;		/* for first 5 bits.               */
-						exp -= 1;
-						assert (exp <= 31);
-
-						while (*cp1 != MVX_NEG && cp1 < cp2 && !mupip_error_occurred)
-						{
-							switch (*cp1++)
-							{
-								case '0': *b++ = '9';
-									break;
-								case '1': *b++ = '8';
-									break;
-								case '2': *b++ = '7';
-									break;
-								case '3': *b++ = '6';
-									break;
-								case '4': *b++ = '5';
-									break;
-								case '5': *b++ = '4';
-									break;
-								case '6': *b++ = '3';
-									break;
-								case '7': *b++ = '2';
-									break;
-								case '8': *b++ = '1';
-									break;
-								case '9': *b++ = '0';
-									break;
-								default:
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)
-										ERR_CORRUPT,2,rec_count, global_key_count);
-									 mu_gvis();
-									 util_out_print(0,TRUE);
-							}
-						}
-						if (!mupip_error_occurred)
-						{
-							if (cp1 >= cp2)
-							{
-								rts_error_csa(CSA_ARG(NULL)
-									VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-								mu_gvis();
-								util_out_print(0,TRUE);
-								break;
-							} else if (*cp1++ == MVX_NEG)
- 							{
-								if (cp1 < cp2)
-								{
-									if (*cp1)
-									{
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)
-											ERR_CORRUPT,2,rec_count, global_key_count);
-										mu_gvis();
-										util_out_print(0,TRUE);
-										break;
-									}
-									else
-									{	cp1++;
-									}
-								}
-							} else
-							{
-								rts_error_csa(CSA_ARG(NULL)
-									VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-								mu_gvis();
-								util_out_print(0,TRUE);
-								break;
-							}
-							if (b - (unsigned char *) v.str.addr > GTM_PREC + 2)
-							{
-								mupip_precision_error = TRUE;
-							}
-							*b++ = 'E';
-							if (order = exp/10)
-								*b++ = order + 48;
-							*b++ = exp - order*10 + 48;
-							v.str.len = b - (unsigned char *) v.str.addr;
-							s2n(&v);
-							if (mupip_error_occurred)
-							{
-								rts_error_csa(CSA_ARG(NULL)
-									VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-								mu_gvis();
-								util_out_print(0,TRUE);
-								break;
-							}
-						}
-					} else if (exp == MVX_ZRO)
-					{
-						MV_FORCE_MVAL(&v,0) ;
-						if (cp1 < cp2)
-						{
-							if (!*cp1)
-								cp1++;
-							else
-							{
-								rts_error_csa(CSA_ARG(NULL)
-									VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-								mu_gvis();
-								util_out_print(0,TRUE);
-								break;
-							}
-						}
-					} else
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-						mu_gvis();
-						util_out_print(0,TRUE);
-						break;
-					}
-				}
-				else if (*cp1 > NEGORZRO && *cp1 < MVX_EXP)
-				{
-					cp1++;
-					is_dec = 0;
-					v.mvtype = MV_STR;
-					v.str.addr = cp1;
-					while (cp1 < cp2 && *cp1)
-					{
-						if (*cp1 == '.')
-							is_dec = 1;
-						cp1++;
-					}
-					v.str.len = cp1 - (unsigned char *) v.str.addr;
-					if (cp1 < cp2)
-					{
-						if (!*cp1)
-							cp1++;
-						else
-						{
-							rts_error_csa(CSA_ARG(NULL)
-								VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-							mu_gvis();
-							util_out_print(0,TRUE);
-							break;
-						}
-					}
-					if (v.str.len > GTM_PREC + is_dec)
-					{
-						mupip_precision_error = TRUE;
-					}
-					s2n(&v);
-					if (mupip_error_occurred)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-						mu_gvis();
-						util_out_print(0,TRUE);
-						break;
-					}
-				}
-				else
-				{
-					v.mvtype = MV_STR;
-					v.str.addr = cp1;
-					while (cp1 < cp2 && *cp1)
-					{
-						cp1++;
-					}
-					v.str.len = cp1 - (unsigned char *) v.str.addr;
-					if (cp1 < cp2)
-					{
-						if (!*cp1)
-							cp1++;
-						else
-						{
-							rts_error_csa(CSA_ARG(NULL)
-								VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-							mu_gvis();
-							util_out_print(0,TRUE);
-							break;
-						}
-					}
-				}
-				mval2subsc(&v, gv_currkey, gvnh_reg->gd_reg->std_null_coll);
-				gv_currkey->prev = 0;
-				if (mupip_error_occurred)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-					mu_gvis();
-					util_out_print(0,TRUE);
-					break;
-				}
-				goq_key_sub++;
-				goq_subsc_map[US][goq_key_sub] = gv_currkey->end;
-				goq_subsc_map[THEM][goq_key_sub] = goq_currkey->end = cp1 - cp3;
-			}
-
-			if (mupip_error_occurred)
-				break;
-
-			if (*((unsigned short int *) dp1) > 32767)
-			{
-				cp2 = dp1 + SIZEOF(short int);
-				if (*((unsigned short int *) dp1) == 65535)
-				{
-					MV_FORCE_MVAL(&v,*((int4 *) cp2)) ;
-				}
-				else
-				{
-					v.mvtype = MV_STR;
-					v.str.addr = &k_buff;
-					exp = *dp1;
-					status = quad2asc(cp2,exp,&k_buff,SIZEOF(k_buff),&v.str.len);
-					if (mupip_error_occurred)
-						break;
-				}
-			}
-			else
-			{
-				v.mvtype = MV_STR;
-				v.str.len = *((short int *) dp1)++;
-				v.str.addr = dp1;
-			}
-			if (mupip_precision_error)
-			{
-				op_gvdata(&exist);
-				if (exist.m[1] != 0)
-				{
-					msg.arg_cnt = 4;
-					msg.new_opts = msg.def_opts = 1;
-					msg.msg_number = ERR_GOQPREC;
-					msg.fp_cnt = 2;
-					msg.fp[0].n = rec_count;
-					msg.fp[1].n = global_key_count;
-					sys$putmsg(&msg,0,0,0);
-					mu_gvis();
-					util_out_print(0,TRUE);
-				}
-				else
-					op_gvput(&v);
-				mupip_precision_error = FALSE;
-			}
-			else
-				op_gvput (&v);
-			if (mupip_error_occurred)
-			{
-				if (!mupip_DB_full)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-					util_out_print(0,TRUE);
-				}
-				break;
-			}
-			if (max_data_len < v.str.len)
-				max_data_len = v.str.len;
-			if (max_subsc_len < (gv_currkey->end + 1))
-				max_subsc_len = gv_currkey->end + 1;
-			key_count++;
-
-			(char *) goq_rp += n;
-			if (goq_rp < btop)
-			{
-				if (goq_rp->cmpc > goq_currkey->end)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_CORRUPT,2,rec_count,global_key_count);
-					break;
-				}
-				cp1 = &goq_rp->subsc[0];
-				cp2 = &goq_currkey->base[0] + goq_rp->cmpc;
-				for ( n = 0; n < goq_rp->subsc_len; n++)
-					*cp2++ = *cp1++;
-				n = goq_key_sub;
-				for (; goq_subsc_map[THEM][n] > goq_rp->cmpc; n--)
-					;
-				if (n == goq_key_sub && goq_subsc_map[THEM][n] == goq_rp->cmpc)
-				{
-					if (!goq_currkey->base[ goq_subsc_map[THEM][goq_key_sub] ])
-						goq_subsc_map[THEM][goq_key_sub]++;
-					else
-						n--;
-				}
-				goq_key_sub = n;
-				cp1 = cp3 + goq_subsc_map[THEM][goq_key_sub];
-				gv_currkey->end = goq_subsc_map[US][goq_key_sub];
-				global_key_count++;
-			}
-			else
-				break;
-		}
-	}
-
-	if (mu_ctrly_occurred)
-		lib$signal(ERR_LOADCTRLY);
-
-	if (mupip_error_occurred)
-		lib$signal(ERR_LOADABORT,1,rec_count);
-	else
-		mu_load_stat(max_data_len, max_subsc_len, key_count, rec_count, ERR_BLKCNT);
-
-	free (goq_currkey);
-	free (gv_currkey);
-}
diff --git a/sr_vvms/grab_crit.c b/sr_vvms/grab_crit.c
deleted file mode 100644
index 480a57e..0000000
--- a/sr_vvms/grab_crit.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "error.h"
-#include "filestruct.h"
-#include "wcs_recover.h"
-
-GBLREF short			crash_count;
-GBLREF volatile int4		crit_count;
-GBLREF int4			exi_condition;
-GBLREF uint4			process_id;
-GBLREF sgmnt_addrs		*vms_mutex_check_csa;
-
-error_def(ERR_CRITRESET);
-error_def(ERR_DBCCERR);
-
-void	grab_crit(gd_region *reg)
-{
-	unsigned short		cycle_count, cycle;
-	ccp_action_aux_value	msg;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	node_local_ptr_t	cnl;
-	enum cdb_sc		status;
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	csd = csa->hdr;
-	cnl = csa->nl;
-
-	vms_mutex_check_csa = csa;
-	assert(!lib$ast_in_prog());
-	if (!csa->now_crit)
-	{
-		assert(0 == crit_count);
-		crit_count++;
-		if (csd->clustered)
-		{
-			/* For an explanation of the code dealing with clusters, see CCP_EXITWM_ATTEMPT.C.
-			   Please do not change this code without updating the comments in that file. */
-			cycle = cnl->ccp_cycle;
-			while (!CCP_SEGMENT_STATE(cnl, CCST_MASK_WRITE_MODE))
-			{
-				(void)ccp_sendmsg(CCTR_WRITEDB, &FILE_INFO(reg)->file_id);
-				(void)ccp_userwait(reg, CCST_MASK_WRITE_MODE, 0, cycle);
-				cycle = cnl->ccp_cycle;
-			}
-		}
-
-		if (cdb_sc_normal !=
-			(status = MUTEX_LOCKW(csa->critical, crash_count, &csa->now_crit, &csd->mutex_spin_parms)))
-		{
-			crit_count = 0;
-			switch (status)
-			{
-			case cdb_sc_critreset:
-				rts_error_csa(CSA_ARG(NULL) ERR_CRITRESET, 2, REG_LEN_STR(reg));
-			case cdb_sc_dbccerr:
-				rts_error_csa(CSA_ARG(NULL) ERR_DBCCERR, 2, REG_LEN_STR(reg));
-			default:
-				GTMASSERT;
-			}
-			return;
-		}
-
-		assert(cnl->in_crit == 0);
-		cnl->in_crit = process_id;
-
-		CRIT_TRACE(crit_ops_gw);		/* see gdsbt.h for comment on placement */
-
-		if (csd->clustered)
-		{
-			cycle = cnl->ccp_cycle;
-			if (cnl->ccp_crit_blocked)
-			{
-				msg.exreq.fid = FILE_INFO(reg)->file_id;
-				msg.exreq.cycle = cycle;
-				(void)ccp_sendmsg(CCTR_EXITWM, &msg);
-				(void)ccp_userwait(reg, ~(CCST_MASK_WRITE_MODE), 0, msg.exreq.cycle);
-				while (cnl->ccp_crit_blocked  &&  cnl->ccp_cycle == msg.exreq.cycle  ||
-				       !CCP_SEGMENT_STATE(cnl, CCST_MASK_WRITE_MODE))
-				{
-					cycle = cnl->ccp_cycle;
-					(void)ccp_sendmsg(CCTR_WRITEDB, &FILE_INFO(reg)->file_id);
-					(void)ccp_userwait(reg, CCST_MASK_WRITE_MODE, 0, cycle);
-				}
-			}
-		}
-		crit_count = 0;
-	}
-	if (cnl->wc_blocked)
-		wcs_recover(reg);
-}
diff --git a/sr_vvms/grab_crit_immediate.c b/sr_vvms/grab_crit_immediate.c
deleted file mode 100644
index 4157532..0000000
--- a/sr_vvms/grab_crit_immediate.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "error.h"
-#include "filestruct.h"
-#include "wcs_recover.h"
-
-error_def(ERR_CRITRESET);
-error_def(ERR_DBCCERR);
-
-GBLREF short			crash_count;
-GBLREF volatile int4		crit_count;
-GBLREF int4			exi_condition;
-GBLREF VSIG_ATOMIC_T		forced_exit;
-GBLREF uint4			process_id;
-GBLREF sgmnt_addrs		*vms_mutex_check_csa;
-
-/* One try to grab crit; no waiting because of possible deadlock.  Used by TP */
-
-boolean_t grab_crit_immediate(gd_region *reg)
-{
-	unsigned short		cycle_count, cycle;
-	ccp_action_aux_value	msg;
-	sgmnt_addrs		*csa;
-	enum cdb_sc		status;
-	node_local_ptr_t	cnl;
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	vms_mutex_check_csa = csa;
-	cnl = csa->nl;
-	if (!csa->now_crit)
-	{
-		assert(0 == crit_count);
-		crit_count++;
-		if (csa->hdr->clustered)
-		{
-			/* For an explanation of the code dealing with clusters, see CCP_EXITWM_ATTEMPT.C.
-			   Please do not change this code without updating the comments in that file. */
-			cycle = cnl->ccp_cycle;
-			if (!CCP_SEGMENT_STATE(cnl, CCST_MASK_WRITE_MODE))
-				return FALSE;
-		}
-		if ((status = mutex_lockwim(csa->critical, crash_count, &csa->now_crit)) != cdb_sc_normal)
-		{
-			crit_count = 0;
-			switch (status)
-			{
-			case cdb_sc_nolock:
-				return FALSE;
-			case cdb_sc_critreset:
-				rts_error_csa(CSA_ARG(NULL) ERR_CRITRESET, 2, REG_LEN_STR(reg));
-			case cdb_sc_dbccerr:
-				rts_error_csa(CSA_ARG(NULL) ERR_DBCCERR, 2, REG_LEN_STR(reg));
-			default:
-				if (forced_exit)
-					EXIT(exi_condition);
-				GTMASSERT;
-			}
-			return FALSE;
-		}
-		assert(cnl->in_crit == 0);
-		cnl->in_crit = process_id;
-		if (csa->hdr->clustered)
-		{
-			cycle = cnl->ccp_cycle;
-			if (cnl->ccp_crit_blocked)
-			{
-				msg.exreq.fid = FILE_INFO(reg)->file_id;
-				msg.exreq.cycle = cycle;
-				(void)ccp_sendmsg(CCTR_EXITWM, &msg);
-				(void)ccp_userwait(reg, ~(CCST_MASK_WRITE_MODE), 0, cycle);
-				if (cnl->ccp_crit_blocked && (cnl->ccp_cycle == cycle) ||
-				    !CCP_SEGMENT_STATE(cnl, CCST_MASK_WRITE_MODE))
-				{
-					crit_count = 0;
-					rel_crit(reg);
-					return FALSE;
-				}
-			}
-		}
-		crit_count = 0;
-	}
-	/* We can be in an AST if we are called wcs_wipchk_ast(). In that case don't do wcs_recover since it can
-	 * cause deadlocks. Let the next guy obtaining crit do it. Note also the order of the statements in the
-	 * if. wc_blocked is very rarely TRUE and hence is placed ahead of the lib$ast_in_prog check.
-	 */
-	if (cnl->wc_blocked && !lib$ast_in_prog())
-		wcs_recover(reg);
-	return TRUE;
-}
diff --git a/sr_vvms/grab_lock.c b/sr_vvms/grab_lock.c
deleted file mode 100644
index 8097657..0000000
--- a/sr_vvms/grab_lock.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "cdb_sc.h"
-
-error_def(ERR_CRITRESET);
-error_def(ERR_DBCCERR);
-
-GBLREF volatile int4		crit_count;
-GBLREF uint4			exi_condition;
-GBLREF uint4			process_id;
-GBLREF sgmnt_addrs		*vms_mutex_check_csa;
-
-boolean_t grab_lock(gd_region *reg, boolean_t dummy1, uint4 dummy2)
-{
-	enum cdb_sc	status;
-	sgmnt_addrs	*csa;
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	vms_mutex_check_csa = csa;
-	assert(!lib$ast_in_prog());
-
-	if (!csa->now_crit)
-	{
-		assert(0 == crit_count);
-		crit_count++;
-		if (cdb_sc_normal !=
-			(status = MUTEX_LOCKW(csa->critical, 0, &csa->now_crit,
-					      (mutex_spin_parms_ptr_t)((sm_uc_ptr_t)csa->critical + JNLPOOL_CRIT_SPACE))))
-		{ /* mutex spin parms structure resides at csa->critical + JNLPOOL_CRIT_SPACE, see gtmsource.h for jnlpool layout */
-			crit_count = 0;
-			switch (status)
-			{
-			case cdb_sc_critreset:
-				rts_error_csa(CSA_ARG(NULL) ERR_CRITRESET, 2, REG_LEN_STR(reg));
-			case cdb_sc_dbccerr:
-				rts_error_csa(CSA_ARG(NULL) ERR_DBCCERR, 2, REG_LEN_STR(reg));
-			default:
-				GTMASSERT;
-			}
-			return TRUE;
-		}
-		assert(csa->nl->in_crit == 0);
-		csa->nl->in_crit = process_id;
-		CRIT_TRACE(crit_ops_gw);		/* see gdsbt.h for comment on placement */
-		crit_count = 0;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/gse.mpt b/sr_vvms/gse.mpt
deleted file mode 100644
index e6b29c4..0000000
--- a/sr_vvms/gse.mpt
+++ /dev/null
@@ -1,77 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2006 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-%GSE	;GT.M %GSE utility - global search
-	;
-	n c,i,g,gn,gtmvt,m,n,p,rl,s,sl,sx,tics,x,%ZD,%ZG
-	i '$d(%zdebug) n $et s $et="zg "_$zl_":ERR^%GSE" u $p:(ctrap=$c(3):exc="zg "_$zl_":LOOP^%GSE")
-	w !,"Global Search for Every Occurrence",!
-	d base
-	q
-base	f  d  q:$l(%ZD)
-	. r !,"Output device: <terminal>: ",%ZD,!
-	. i '$l(%ZD) s %ZD=$p q
-	. i %ZD="^" q
-	. i %ZD="?" d  q
-	 . . w !!,"Select the device you want for output"
-	 . . w !,"If you wish to exit enter a carat (^)",!
-	 . . s %ZD=""
-	. i $zparse(%ZD)="" w "  no such device" s %ZD="" q
-	. o %ZD:(newversion:block=2048:record=2044:exception="g noopen"):0
-	. i '$t  w !,%ZD," is not available" s %ZD="" q
-	. q
-noopen	. w !,$p($ZS,",",2,999),! c %ZD s %ZD=""
-	q:%ZD="^"
-	i %ZD'=$p u %ZD w $zd($h,"DD-MON-YEAR 24:60:SS"),!,"Global Search for Every occurrence",! u $p
-	f  d main q:'%ZG
-	c:%ZD'=$p %ZD u $p:(ctrap="":exc="")
-	q
-main	k %ZG d CALL^%GSEL i '%ZG q
-	s gn=""
-	r "Find string: ",s,!!
-	i s="" w !,"No string to find - no search done.",! s %ZG=0 q
-	i s?.E1C.E w !,"The Find string contains control characters"
-	u %ZD s gtmvt=$$GTMVT
-	i gtmvt s sx=$c(27)_"[7m"_s_$c(27)_"[0m"
-	e  s sx=s,sl=$l(s),tics=$tr($j("",sl)," ","^")
-	f  s gn=$o(%ZG(gn)) q:gn=""  d search
-	q
-search	u %ZD w:$x>70 ! w gn,?$x\10+1*10
-	s g=gn,(m,n)=0
-	i ($d(@g)#10=1) s n=1 d:@g[s show
-	f  s g=$q(@g) q:g=""  s n=n+1 d:@g[s show
-	i m w !!,"Total ",m," matches found in ",n," nodes.",!
-	e  w !,"No matches found in ",n," nodes.",!
-	u $p
-	q
-show	s x=@g,c=$l(x,s),m=m+c-1,rl=$j("",16)
-	w !,g,?16 f i=1:1:c-1 s p=$tr($p(x,s,i),$c(9)," ") w p,sx i 'gtmvt s rl=rl_$j(tics,$l(p)+sl)
-	w $p(@g,s,c)
-	i 'gtmvt w !,rl
-	q
-	;
-GTMVT()	; true if a video
-	i $zver'["VMS" n d d  q +d ;if should be more precise
-	. s d=""
-	. i $i'=$p q
-	. zsh "d":d
-	. f  s d=$o(d("D",d)) q:d=""  i $p(d("D",d)," ")=$p s d=$p(d("D",d)," ",3) q
-	. i d["TERMINAL" s d=$tr($ztrnlnm("TERM"),"ANSIVT","ansivt") i $l(d),d["ansi"!(d["vt") s d=1
-	i @"$zgetdvi($zparse($zio,""DEVICE""),""TRM"")",@"$zgetdvi($zio,""DECCRT"")"
-	q $t
-	;
-ERR	i $d(%ZD),%ZD'=$p c %ZD
-	u $p w !,$p($zs,",",2,99),!
-	u $p:(ctrap="":exc="")
-	s $ec=""
-	q
-LOOP	i $d(%ZD),%ZD'=$p c %ZD
-	d base
-	q
diff --git a/sr_vvms/gt_timer.h b/sr_vvms/gt_timer.h
deleted file mode 100644
index 438d9bc..0000000
--- a/sr_vvms/gt_timer.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __GT_TIMER_H__
-#define __GT_TIMER_H__
-
-/*
- * -----------------------------------------------------
- * System dependent include file for gtm timer package
- * -----------------------------------------------------
- */
-
-typedef int4 TID;		/* Timer ID type */
-
-#define sighold(x)
-#define sigrelse(x)
-
-/*
- * -----------------------------------------------------
- * Gtm timer package uses ABS_TIME structure to carry
- * the time information irrelevantly of operating system
- * specifics. The time in this structure is stored as
- * absolute time - elapsed time since some major historic
- * event, or some fixed date in the past. Different
- * operating systems have different time reference points.
- * The time is converted from the OS time format to
- * a format, given in this file, and from then on, all
- * timer related calls reffer to this time.
- * -----------------------------------------------------
- */
-typedef struct tag_abs_time {
-	int4	at_sec;		/* seconds */
-	int4	at_usec;	/* and microseconds */
-} ABS_TIME;
-
-typedef	long	gtm_tv_usec_t;
-
-/*
- * -----------------------------------------------------
- * All timer request are placed into a linked list, or
- * a queue of * pending requests in a time order.
- * The first timer in this queue is currently the
- * active timer, and expires first.
- * -----------------------------------------------------
- */
-typedef struct tag_ts {
-	TID		tid;		/* Timer id */
-	ABS_TIME	expir_time;	/* Absolute Time when timer expires */
-	void		(*handler)();	/* Pointer to handler routine */
-	struct tag_ts	*next;		/* Pointer to next */
-} GT_TIMER;
-
-#define GT_WAKE			sys$wake(0,0)
-#define hiber_start_wait_any	hiber_start
-#define CANCEL_TIMERS		cancel_timer(0)
-
-int4 abs_time_comp(ABS_TIME *atp1, ABS_TIME *atp2);
-void add_int_to_abs_time(ABS_TIME *atps, int4 ival, ABS_TIME *atpd);
-void cancel_timer(TID tid);
-void hiber_start(uint4 hiber);
-void start_timer(TID tid, int4 time_to_expir, void(* handler)(), int4 data_length, void *handler_data);
-ABS_TIME sub_abs_time(ABS_TIME *atp1, ABS_TIME *atp2);
-void sys_get_curr_time(ABS_TIME *atp);
-
-#endif
diff --git a/sr_vvms/gt_timers.c b/sr_vvms/gt_timers.c
deleted file mode 100644
index c8e90bb..0000000
--- a/sr_vvms/gt_timers.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- * --------------------------------------------------------------
- * Following routines are top level, user callable
- * routines of this package:
- *
- * void sys_get_curr_time(ABS_TIME atp)
- * 	fetch absolute time into stucture
- *
- * void hiber_start(uint4 hiber)
- *      used to sleep for hiber milliseconds
- *
- * void start_timer(TID tid, int4 time_to_expir, void (*handler)(), int4 dummy_hdata_len, char *dummy_hdata)
- *	Used to start a new timer.
- *
- * void cancel_timer(TID tid)
- *	Cancel an existing timer.
- *	Cancelling timer with tid = 0, cancells all timers.
- * --------------------------------------------------------------
- */
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "efn.h"
-#include "gt_timer.h"
-#include "timedef.h"
-#include "wake.h"
-
-#define MAX_INT 4294967295.0
-
-GBLREF	int	process_exiting;
-
-/*
- * ----------------------------------------------------
- * Get current clock time in milliseconds
- *	Fill-in the structure with the absolute time
- *	of system clock.
- *
- * Arguments:
- *	atp	- pointer to structure of absolute time
- * ----------------------------------------------------
- */
-void sys_get_curr_time(ABS_TIME *atp)
-{
-	uint4		status, systim[2];
-
-	status = sys$gettim(systim);
-	if (status & 1)
-	{
-		atp->at_usec = (systim[0] / 10) % 1000000;
-		atp->at_sec = (uint4)(((((double)systim[1]) * MAX_INT) + (double)systim[0]) / 10000000.0);
-		return;
-	}
-	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-}
-
-static void hiber_start_ast(void)
-{ /* Only purpose of this function is to provide a unique identifier for hiber_start timr driven while in an AST */
-	return;
-}
-
-/*
- * ------------------------------------------------------
- * Start hibernating by starting a timer using hiber_time
- * (in msecs) and doing a pause
- * ------------------------------------------------------
- */
-void hiber_start(uint4 hiber)
-{
-	int4 	hiber_time[2];	/* don't have static since can be interrupted by an AST */
-	int	status_timr, status_wait, ast_in_prog;
-
-	if (0 == hiber)
-		return;	/* in PRO code return */
-
-	hiber_time[0] = -time_low_ms((int4)hiber);
-	hiber_time[1] = -time_high_ms((int4)hiber);
-	if (hiber_time[1] == 0)
-		hiber_time[1] -= 1;
-
-	if (0 != (ast_in_prog = lib$ast_in_prog()))
-	{	/* sleep sounder but less permanently;
-		 * note that an AST may cause an inappropriate time to be used for another hiber_start in progress,
-		 * but that risk should be statistically small, and the consequences (as far as known) are not important
-		 */
-		status_timr = sys$setimr(efn_timer_ast, hiber_time, 0, hiber_start_ast, 0);
-		assert(SS$_NORMAL == status_timr);
-		if (SS$_NORMAL == status_timr)
-		{
-			status_wait = sys$waitfr(efn_timer_ast);
-			assert(SS$_NORMAL == status_wait);
-		}
-	} else
-	{ /* timr->hiber should not be changed to timr->waitfr. The former waits for a wakeup or outofband event; whichever
-	   * happens sooner will stop the hiber while the latter does not recognize outofband events (like tp timeouts)
-	   */
-		status_timr = sys$setimr(efn_hiber_start, hiber_time, wake, hiber_start, 0);
-		assert(SS$_NORMAL == status_timr);
-		if (SS$_NORMAL == status_timr)
-		{
-			sys$hiber();
-			sys$cantim(hiber_start, 0);
-		}
-	}
-}
-
-/*
- * ----------------------------------------------------
- * System call to set timer.
- *	Time is given im msecs.
- *
- * Arguments:
- *	tid		- timer id
- *	time_to_expir	- time to expiration.
- *	handler		- address of handler routine
- * ----------------------------------------------------
- */
-void start_timer(TID tid, int4 time_to_expir, void (*handler)(), int4 dummy_hdata_len, void *dummy_hdata)
-{
-	int4	time[2];
-	int	status;
-
-	time[1] = -time_high_ms(time_to_expir) - 1;
-	time[0] = -time_low_ms(time_to_expir);
-	status = sys$setimr(efn_timer, time, handler, tid, 0);
-	assert(SS$_NORMAL == status);
-}
-
-
-/*
- * ---------------------------------------------
- * System call to cancel timer.
- * ---------------------------------------------
- */
-void cancel_timer(TID tid)
-{
-	/* An interrupt should never cancel a timer that has been started in the mainline code.
-	 * Or else it is possible the mainline code might hibernate for ever.
-	 * In VMS, interrupt is equivalent to being in an AST. Hence assert we are never in an AST if we are here.
-	 * The only exception is if we are exiting in which case we are not going to be hibernating so it is ok.
-	 */
-	assert(!lib$ast_in_prog() || process_exiting);
-	sys$cantim(tid, 0);
-}
diff --git a/sr_vvms/gtcm_spkitbld.dat b/sr_vvms/gtcm_spkitbld.dat
deleted file mode 100644
index 02b5451..0000000
--- a/sr_vvms/gtcm_spkitbld.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-SPKITBLD$KITNAME := GTCM60002
-SPKITBLD$REWIND_TAPE := N
-SPKITBLD$AUTOINIT_TAPE := 'GTM_INIT_TAPE'
-SPKITBLD$SKIP_FIRST_TAPE_READY_PROMPT := Y
-SPKITBLD$SKIP_FIRST_DISK_READY_PROMPT := Y
-SPKITBLD$SAVESET_A := GTM$VRT:[TCM]KITINSTAL.COM;,GTCMKITHLP.COM;,GTM$VRT:[PRO]GTCM_SERVER.EXE;,GTCM_STOP.EXE;,CMISHR.EXE;
diff --git a/sr_vvms/gtcmkithlp.com b/sr_vvms/gtcmkithlp.com
deleted file mode 100644
index 66db9ab..0000000
--- a/sr_vvms/gtcmkithlp.com
+++ /dev/null
@@ -1,146 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!      HELP TEXT PROCESSING FOR GT.CM KITINSTAL.COM
-$!      COPYRIGHT 1989 - 2000 Sanchez Computer Associates
-$ IF F$EXTRACT(0,5,P1) .EQS. "HELP_" THEN GOTO 'P1'
-$ EXIT VMI$_UNSUPPORTED
-$HELP_PURGE:
-$ TYPE SYS$INPUT
-  If GT.CM is previously installed,  there is no reason to keep older versions
-  of the software online, unless you wish to test before purging.
-
-$ EXIT
-$HELP_NDB_CNT:
-$ TYPE SYS$INPUT
-  The installation  inserts  this  value as the  default for  controlling the
-  GT.CM Server quotas established in GTCMSERVER.COM.  If you provide a  value
-  less than 1, the value will be set to 1.   This value can be easily changed
-  later.
-
-$ EXIT
-$HELP_RC_CNT:
-$ TYPE SYS$INPUT
-  The installation  inserts  this  value as the  default for  controlling the
-  GT.CM Server quotas established in GTCMSERVER.COM.  If you provide a  value
-  less than 1, the value will be set to 1.   This value can be easily changed
-  later.
-
-$ EXIT
-$HELP_SRV_UIC:
-$ TYPE SYS$INPUT
-  The GT.CM Server usually must have broad file access  so  running  under the
-  SYSTEM  UIC  may  make  sense.   The  recommended  alternative  is  to use a
-  distinguished UIC which has appropriate UIC or ACL based access to clustered
-  files.
-
-$ EXIT
-$HELP_STD_CNF:
-$ TYPE SYS$INPUT
-  The standard configuration performs the following:
-
-   *  Places files in SYS$COMMON:[GTM_DIST] with SYSTEM as owner
-   *  Copies the GT.CM command procedures, except GTCMAUTOSRV, to SYS$MANAGER
-   *  Adds GTCMSTART.COM to the system startup database
-   *  Sets up GTCMSTART.COM to start the GT.CM Server
-   *  Enables auto-start and disables auto-stop of the GT.CM Server
-   *  Starts GT.CM at the end of the installation
-
-  If the SYSTEM id is not set up, the installation will use [1,4].
-
-$ EXIT
-$HELP_DST_OWN:
-$ TYPE SYS$INPUT
-  Provide a UIC, normally SYSTEM, to own the files in the  GT.M  distribution.
-  The UIC can be a name, a group name and a user name separated  by  a  comma,
-  or a pair of octal codes separated by a comma which specify group and user.
-
-$ EXIT
-$HELP_SYS_DST:
-$ TYPE SYS$INPUT
-  Usual practice is to place a system component such as GT.CM  on  the  system
-  disk.   If you have  severe  space constraints,  you may need to use another
-  volume.
-
-$ EXIT
-$HELP_SYS_DIR:
-$ TYPE SYS$INPUT
-  This directory  becomes be a sub-directory of  SYS$COMMON  and   holds   the
-  distribution.   If it does not  exist,  the  installation  creates  it  with
-  WORLD=RE access.   If you  are  not  concerned  with  mixing  software  from
-  different vendors, you may wish to use SYSLIB.
-
-$ EXIT
-$HELP_DST_DEV:
-$ TYPE SYS$INPUT
-  The disk must be mounted, on-line and have adequate space to hold the  GT.CM
-  distribution.  The disk name may be physical or logical.
-
-$ EXIT
-$HELP_DST_DIR:
-$ TYPE SYS$INPUT
-  This  directory  holds  the  distribution.    If  it  does  not  exist,  the
-  installation creates it with WORLD=RE access.
-
-$ EXIT
-$HELP_STD_SRV:
-$ TYPE SYS$INPUT
-  Answering Yes  causes  the  installation  make  GTCMSTART.COM so it starts a
-  GT.CM Server.  Having the GT.CM Server running at all times makes  for  more
-  uniform response to network database access.  However, if network  access is
-  sporadic the  Server may spend much time as an idle task.
-
-$ EXIT
-$HELP_AUTO_SRV:
-  Answering Yes  causes an incoming network request to start a GT.CM Server if
-  none is currently running.   When  combined  with  the  standard  start this
-  provides resiliency for network operations.
-
-$ TYPE SYS$INPUT
-$ EXIT
-$HELP_TIMEOUT:
-  The timeout  specifies  the number of minutes  an auto-started  GT.CM Server
-  waits between incoming database access requests before shutting itself down.
-  A value of 0 inhibits auto-stops.
-
-$ TYPE SYS$INPUT
-$ EXIT
-$HELP_STARTDB:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to place GTCMSTART.COM in the  startup
-  database so the system startup automatically sets up  the  GT.CM environment
-  whenever the system boots.
-
-$ EXIT
-$HELP_MGR_COM:
-$ TYPE SYS$INPUT
-  You may prevent the installation from moving the .COM files to  SYS$MANAGER.
-  Copying the command  procedures  to  SYS$MANAGER  allows  system startup to
-  access them  through  the  VMS  startup  database  and generally simplifies
-  operations.  However, if you wish to have multiple versions of GT.M on your
-  system at the same time, you would not have multiple copies of the  command
-  procedures in SYS$MANAGER.
-
-$ EXIT
-$HELP_RUN_IVP:
-$ TYPE SYS$INPUT
-  This installation kit contains an installation verification procedure  (IVP)
-  which you can run as part of the installation to verify the  correctness  of
-  the software.   Note that if you choose this option, the  GT.M  images  must
-  already be installed before or during this installation.
-
-$ EXIT
-$HELP_START_CM:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to start GT.CM.
-
-$ EXIT
diff --git a/sr_vvms/gtcmkitinstal.com b/sr_vvms/gtcmkitinstal.com
deleted file mode 100644
index cc425d8..0000000
--- a/sr_vvms/gtcmkitinstal.com
+++ /dev/null
@@ -1,363 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!	KITINSTAL.COM PROCEDURE FOR THE GT.CM PRODUCT
-$!
-$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y
-$! ON WARNING THEN EXIT $STATUS		!! allow warning on install replace
-$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL
-$ IF P1 .EQS. "VMI$_POSTINSTALL" THEN GOTO POSTINSTALL
-$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP
-$ EXIT VMI$_UNSUPPORTED
-$!
-$INSTALL:
-$ TYPE SYS$INPUT
-
-  GT.CM  (c)  COPYRIGHT 1988, 2000  by  Sanchez Computer Associates, Inc.
-                           ALL RIGHTS RESERVED
-
-$!  the following 2 lines must be maintained
-$ GTCM$VMS_VERSION :== 072	! Minimum VMS version required
-$ GTCM$DISK_SPACE == 2000	! Minumum disk space on system disk required for install (2x result)
-$ IF F$ELEMENT(0,",",VMI$VMS_VERSION) .EQS. "RELEASED"
-$  THEN
-$   GTCM$VMS_IS == F$ELEMENT(1,",",VMI$VMS_VERSION)
-$   IF GTCM$VMS_IS .LTS. GTCM$VMS_VERSION
-$    THEN
-$     VMI$CALLBACK MESSAGE E VMSMISMATCH "This GT.CM kit requires an existing VMS''GTCM$VMS_VERSION' system."
-$     EXIT VMI$_FAILURE
-$   ENDIF
-$  ELSE
-$   GTCM$VMS_IS :==
-$   WRITE SYS$OUTPUT "  No VMS version checking performed for field test versions."
-$ ENDIF
-$ IF (GTCM$VMS_IS .GES. "052") THEN T1 = F$VERIFY(VMI$KIT_DEBUG)
-$ VMI$CALLBACK CHECK_NET_UTILIZATION GTCM$ROOM 'GTCM$DISK_SPACE'
-$ IF .NOT. GTCM$ROOM
-$  THEN
-$   VMI$CALLBACK MESSAGE E NOSPACE "There is not enough disk space -- GT.CM needs ''GTCM$DISK_SPACE' blocks."
-$   EXIT VMI$_FAILURE
-$ ENDIF
-$!  setup default answers
-$ GTCM$DOPURGE :== YES
-$ GTCM$RUN_IVP == 0	!! should be "YES", but no IVP yet
-$ GTCM$NDB_CNT == 12
-$ GTCM$RC_CNT == 30
-$ GTCM$STD_CNF :== YES
-$ GTCM$DST_OWN :== SYSTEM
-$ IF F$IDENTIFIER(GTCM$DST_OWN,"NAME_TO_NUMBER") .EQ. 0 THEN GTCM$DST_OWN :== 1,4
-$ GTCM$SRV_UIC :==
-$ GTCM$SYS_DST :== YES
-$ GTCM$DST_DIR :== GTM_DIST
-$ GTCM$DST_CRE == GTCM$DST_DIR
-$ GTCM$DST_DEV :==
-$ GTCM$STD_SRV :== YES
-$ GTCM$AUTO_SRV :== YES
-$ GTCM$TIMEOUT == 0
-$ GTCM$STARTDB :== YES
-$ GTCM$MGR_COM :== YES
-$ GTCM$START_SRV :== YES
-$!
-$ VMI$CALLBACK ASK GTCM$DOPURGE "Do you want to purge files replaced by this installation" 'GTCM$DOPURGE' B -
-  "@VMI$KWD:GTCMKITHLP HELP_PURGE"
-$ IF .NOT. GTCM$DOPURGE THEN VMI$CALLBACK SET PURGE NO
-$ VMI$CALLBACK ASK GTCM$NDB_CNT "How many networked databases will this node serve" 'GTCM$NDB_CNT' I -
-  "@VMI$KWD:GTCMKITHLP HELP_NDB_CNT"
-$ IF GTCM$NDB_CNT .LT. 1
-$  THEN
-$   GTCM$NDB_CNT == 1
-$   WRITE SYS$OUTPUT "  The installation set this value to 1 as 0 or negative values are not useful."
-$ ENDIF
-$ VMI$CALLBACK ASK GTCM$RC_CNT "How many client links will this node serve" 'GTCM$RC_CNT' I -
-  "@VMI$KWD:GTCMKITHLP HELP_RC_CNT"
-$ IF GTCM$RC_CNT .LT. 1
-$  THEN
-$   GTCM$RC_CNT == 1
-$   WRITE SYS$OUTPUT "  The installation set this value to 1 as 0 or negative values are not useful."
-$ ENDIF
-$ VMI$CALLBACK ASK GTCM$SRV_UIC "Under what UIC should the Server operate" "''GTCM$SRV_UIC'" S -
-  "@VMI$KWD:GTCMKITHLP HELP_SRV_UIC"
-$ GTCM$SRV_UIC == GTCM$SRV_UIC - "[" - "]"
-$ IF GTCM$SRV_UIC - "," .NES. GTCM$SRV_UIC THEN GTCM$SRV_UIC :== ['GTCM$SRV_UIC']
-$ VMI$CALLBACK ASK GTCM$STD_CNF "Do you want the standard GT.CM configuration" 'GTCM$STD_CNF' B -
-  "@VMI$KWD:GTCMKITHLP HELP_STD_CNF"
-$ IF GTCM$STD_CNF
-$  THEN
-$   GTCM$SYS_DST == 1
-$   GTCM$STD_SRV :== 1
-$   GTCM$AUTO_SRV :== 1
-$   GTCM$STARTDB == 1
-$   GTCM$MGR_COM == 1
-$   GTCM$START_CM == 1
-$   GTCM$DST_LOG :== SYS$COMMON:['GTCM$DST_DIR']
-$   GTCM$DIR_TYPE :== COMMON
-$   GTCM$RUN_IVP == 0	!! no IVP yet
-$  ELSE ! not standard configuration
-$   VMI$CALLBACK ASK GTCM$DST_OWN "What UIC should own the GT.CM distribution" 'GTCM$DST_OWN' S "@VMI$KWD:GTCMKITHLP HELP_DST_OWN"
-$   GTCM$DST_OWN == GTCM$DST_OWN - "[" - "]"
-$   VMI$CALLBACK ASK GTCM$SYS_DST "Do you want the GT.CM distribution to go into a System Directory" 'GTCM$SYS_DST' B -
-    "@VMI$KWD:GTCMKITHLP HELP_SYS_DST"
-$   IF GTCM$SYS_DST
-$    THEN
-$     VMI$CALLBACK ASK GTCM$DST_DIR "In what System Directory do you want to place GT.CM" 'GTCM$DST_DIR' S -
-      "@VMI$KWD:GTCMKITHLP HELP_SYS_DIR"
-$     GTCM$DST_DIR == GTCM$DST_DIR - "[" - "]"
-$     GTCM$DST_CRE == GTCM$DST_DIR
-$     GTCM$DST_LOG :== SYS$COMMON:['GTCM$DST_DIR']
-$     GTCM$DIR_TYPE :== COMMON
-$    ELSE ! not system disk
-$     VMI$CALLBACK ASK GTCM$DST_DEV "On which device do you want to place GT.CM" "''GTCM$DST_DEV'" S -
-      "@VMI$KWD:GTCMKITHLP HELP_DST_DEV"
-$     VMI$CALLBACK ASK GTCM$DST_DIR "In what directory on that device do you want to place GT.CM" 'GTCM$DST_DIR' S -
-      "@VMI$KWD:GTCMKITHLP HELP_DST_DIR"
-$     GTCM$DST_DEV == GTCM$DST_DEV - ":"
-$     GTCM$DST_DIR == GTCM$DST_DIR - "[" - "]"
-$     GTCM$DST_LOG :== 'GTCM$DST_DEV':['GTCM$DST_DIR']
-$     GTCM$DST_CRE == GTCM$DST_LOG
-$     GTCM$DIR_TYPE :== USER
-$   ENDIF ! system disk
-$   VMI$CALLBACK ASK GTCM$STD_SRV "Do you want GTCMSTART.COM to start the GT.CM Server" 'GTCM$STD_SRV' S -
-    "@VMI$KWD:GTCMKITHLP HELP_STD_SRV"
-$   VMI$CALLBACK ASK GTCM$AUTO_SRV "Do you want network requests to automatically start the GT.CM server" 'GTCM$AUTO_SRV S -
-    "@VMI$KWD:GTCMKITHLP HELP_AUTO_SRV"
-$   IF GTCM$AUTO_SRV
-$    THEN
-$     VMI$CALLBACK ASK GTCM$TIMEOUT "How many quiet minutes before the server terminates (0=>never)" 'GTCM$TIMEOUT' I -
-      "@VMI$KWD:GTCMKITHLP HELP_TIMEOUT"
-$     IF GTCM$TIMEOUT .LT. 0
-$      THEN
-$       GTCM$TIMEOUT == 0
-$       WRITE SYS$OUTPUT "  The installation set this value to 0 as negative values are not useful."
-$     ENDIF
-$   ENDIF
-$   VMI$CALLBACK ASK GTCM$STARTDB "Do you want GTCMSTART.COM in the startup database" 'GTCM$STARTDB' B -
-    "@VMI$KWD:GTCMKITHLP HELP_STARTDB"
-$   IF .NOT. GTCM$STARTDB
-$    THEN
-$     VMI$CALLBACK ASK GTCM$MGR_COM "Do you want the GT.M .COM files in SYS$MANAGER" 'GTCM$MGR_COM' B -
-      "@VMI$KWD:GTCMKITHLP HELP_MGR_COM"
-$   ENDIF
-$!! no IVP yet
-$   IF 0 THEN VMI$CALLBACK ASK GTCM$RUN_IVP "Do you want to run the IVP (requires GT.M)" 'GTCM$RUN_IVP' B -
-    "@VMI$KWD:GTCMKITHLP HELP_RUN_IVP"
-$   IF GTCM$RUN_IVP
-$    THEN
-$     GTCM$START_CCP == 1
-$    ELSE
-$     VMI$CALLBACK ASK GTCM$START_CM "Do you want to start GT.CM now" 'GTCM$START_SRV' B "@VMI$KWD:GTCMKITHLP HELP_START_CM"
-$   ENDIF
-$ ENDIF ! standard configuration
-$ IF GTCM$MGR_COM
-$  THEN
-$   WRITE SYS$OUTPUT "  The following command files are created, except for GTCMAUTOSVR,"
-$   WRITE SYS$OUTPUT "and copied to SYS$MANAGER:"
-$  ELSE
-$   WRITE SYS$OUTPUT "  The following command files are created:"
-$ ENDIF
-$ TYPE SYS$INPUT
-
-        GTCMAUTOSVR.COM
-        GTCMSERVER.COM
-	GTCMSTART.COM
-	GTCMSTOP.COM
-
-  Each file contains its own user documentation.
-
-  All the questions have been asked. Installation now proceeds without your
-  manual intervention for about 5-10 minutes.
-$ IF GTCM$RUN_IVP THEN WRITE SYS$OUTPUT "  Finally the installation verification procedure tests the installation."
-$ WRITE SYS$OUTPUT ""
-$ VMI$CALLBACK CREATE_DIRECTORY 'GTCM$DIR_TYPE' 'GTCM$DST_CRE' "/OWNER_UIC=[''GTCM$DST_OWN'] /PROTECTION=(WO:RE)"
-$ VMI$CALLBACK MESSAGE I CRECOM "Creating command files."
-$!  Create GTCMAUTOSVR.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMAUTOSVR.COM
-$ WRITE OUFILE "$!	GTCMAUTOSVR.COM acts as a network object"
-$ WRITE OUFILE "$!	 for auto-starting a GT.CM Server with an optional timeout."
-$ WRITE OUFILE "$!      P1 is the timeout"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ IF P1 .EQS. """" THEN P1 = ''GTCM$TIMEOUT'"
-$ WRITE OUFILE "$ SERVER := $''GTCM$DST_LOG'GTCM_SERVER"
-$ WRITE OUFILE "$ SERVER 'P1'"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTCMSERVER.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMSERVER.COM
-$ WRITE OUFILE "$!	GTCMSERVER.COM starts the GT.CM server with no timeout."
-$ WRITE OUFILE "$!	The invoking user requires the following privileges:"
-$ WRITE OUFILE "$!	 DETATCH, NETMBX, PSWAPM, SYSNAM and TMPMBX"
-$ WRITE OUFILE "$!	P1 is the maximum number of databases served to the network."
-$ WRITE OUFILE "$!	P2 is the maximum number of remote clients served."
-$ WRITE OUFILE "$!	P3 is the default working set size."
-$ WRITE OUFILE "$!	P4 is the priority and should be at an appropriate priority"
-$ WRITE OUFILE "$!	 to balance network response with local load"
-$ WRITE OUFILE "$!	P5 is the pagefile quota and should be large enough to"
-$ WRITE OUFILE "$!	 accommodate the global buffers for all BG database files."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""TMPMBX"")"
-$ WRITE OUFILE "$ ON CONTROL_C THEN GOTO ERROR"
-$ WRITE OUFILE "$ ON ERROR THEN GOTO ERROR"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""DETACH,NETMBX,PSWAPM,SYSNAM,TMPMBX"") + "","" + CURPRV"
-$ WRITE OUFILE "$ IF F$PRIVILEGE(""DETACH,NETMBX,PSWAPM,SYSNAM,TMPMBX"")"
-$ WRITE OUFILE "$  THEN"
-$ WRITE OUFILE "$   IF P6 .EQS. """""
-$ WRITE OUFILE "$    THEN"
-$ WRITE OUFILE "$      P6 := GTCM_SERVER"
-$ WRITE OUFILE "$      IF F$TRNLNM(""GTCMSVRNAM"",""LNM$SYSTEM_TABLE"") .NES. """""
-$ WRITE OUFILE "$       THEN"
-$ WRITE OUFILE "$         DEASSIGN /SYSTEM GTCMSVRNAM"
-$ WRITE OUFILE "$      ENDIF"
-$ WRITE OUFILE "$    ELSE"
-$ WRITE OUFILE "$      DEFINE /SYSTEM GTCMSVRNAM 'P6'"
-$ WRITE OUFILE "$   ENDIF"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""Starting the GT.CM Server as process "" + P6"
-$ WRITE OUFILE "$   IF P1 .EQS. """" THEN P1 = ''GTCM$NDB_CNT'"
-$ WRITE OUFILE "$   IF P2 .EQS. """" THEN P2 = ''GTCM$RC_CNT'"
-$ WRITE OUFILE "$   AL = ((P1 + 1) * 3) + P2"
-$ WRITE OUFILE "$   BL = (P2 + 3) * 1024"
-$ WRITE OUFILE "$   EL = (P1 + 1) * 3"
-$ WRITE OUFILE "$   FL = P1 + 3 + P2"
-$ WRITE OUFILE "$   DL = P1 * 7"
-$ WRITE OUFILE "$   TQ = (P1 + 1) * 2"
-$ WRITE OUFILE "$   IF P3 .EQS. """" THEN P3 = FL * 200"
-$ WRITE OUFILE "$   WSE = P3 + 200"
-$ WRITE OUFILE "$   IF P4 .EQS. """" THEN P4 = 5"
-$ WRITE OUFILE "$   IF P5 .EQS. """" THEN P5 = P1 * 10000"
-$ WRITE OUFILE "$   RUN/DETACHED /PROCESS='P6' /PRIV=(SYSNAM) /ERROR=SYS$MANAGER:CME.LOG -"
-$ WRITE OUFILE "     /DUMP /NOSWAPPING /UIC=''GTCM$SRV_UIC' /AST_LIMIT='AL' /ENQUEUE_LIMIT='EL' -"
-$ WRITE OUFILE "     /FILE_LIMIT='FL'/IO_BUFFERED='BL' /IO_DIRECT='DL' /QUEUE_LIMIT='TQ' -"
-$ WRITE OUFILE "     /PRIORITY='P4' /WORKING_SET='P3' /MAXIMUM_WORKING_SET='WSE' -"
-$ WRITE OUFILE "     /PAGE_FILE='P5' ''GTCM$DST_LOG'GTCM_SERVER"
-$ WRITE OUFILE "$  ELSE"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""NOT starting GT.CM Server because of inadequate privileges"""
-$ WRITE OUFILE "$ ENDIF"
-$ WRITE OUFILE "$ERROR:"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(CURPRV)"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTCMSTART.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMSTART.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTCMSTART.COM should be placed in the VMS startup database."
-$ WRITE OUFILE "$!	P1, P2, P3, P4 and P5 are passed on to GTCMSERVER."
-$ WRITE OUFILE "$!	It defines the CMISHR logical name, installs GT.CM images,"
-$ WRITE OUFILE "$!	 optionally sets up the autostart network object,"
-$ WRITE OUFILE "$!	 and optionally starts the GT.CM Server for a node."
-$ WRITE OUFILE "$!	It defines the GTM$DIST and GTMSECSHR logical names,"
-$ WRITE OUFILE "$!	 to ensure they are /SYSTEM /EXEC, which doesn't work"
-$ WRITE OUFILE "$!	 if they exist /SYSTEM /SUPER."
-$ WRITE OUFILE "$!	 In that case modify the GT.M .COM files or invocation"
-$ WRITE OUFILE "$!	 or add DEASSIGNs in this file before the DEFINEs."
-$ WRITE OUFILE "$!       If GT.M and GT.CM are stored in different places,"
-$ WRITE OUFILE "$!       delete these DEFINEs and make sure the GT.M .COM files are OK."
-$ WRITE OUFILE "$!	The invoking user requires the following privileges:"
-$ WRITE OUFILE "$!	 CMKRNL, DETATCH, OPER, NETMBX, PSWAPM, SYSNAM and TMPMBX"
-$ WRITE OUFILE "$!      GTCM_SERVER is installed with privilege SYSNAM."
-$ WRITE OUFILE "$!      CMISHR is the network interface and is installed for performance."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""TMPMBX"")"
-$ WRITE OUFILE "$ ON CONTROL_C THEN GOTO ERROR"
-$ WRITE OUFILE "$ ON ERROR THEN GOTO ERROR"
-$ WRITE OUFILE "$ MUPI*P := $''GTCM$DST_LOG'MUPIP.EXE"
-$ WRITE OUFILE "$ MUPIP RUNDOWN   ! Prepare a clean start"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""CMKRNL,OPER,NETMBX,SYSNAM"") + "","" + CURPRV"
-$ WRITE OUFILE "$ IF F$PRIVILEGE(""CMKRNL,OPER,NETMBX,SYSNAM"")"
-$ WRITE OUFILE "$  THEN"
-$ WRITE OUFILE "$   DEFINE /SYSTEM/EXEC CMISHR ''GTCM$DST_LOG'CMISHR.EXE"
-$ WRITE OUFILE "$   DEFINE /SYSTEM/EXEC GTM$DIST ''GTCM$DST_LOG'"
-$ WRITE OUFILE "$   DEFINE /SYSTEM/EXEC GTMSECSHR ''GTCM$DST_LOG'GTMSECSHR.EXE"
-$ WRITE OUFILE "$   INSTALL"
-$ WRITE OUFILE "    REPLACE  /OPEN/HEADER/PRIV=SYSNAM	''GTCM$DST_LOG'GTCM_SERVER"
-$ WRITE OUFILE "    REPLACE  /OPEN/SHARED/HEADER		CMISHR"
-$ T1 = "!"
-$ IF GTCM$AUTO_SRV THEN T1 :=
-$ WRITE OUFILE "$''T1'   NCP :== $SYS$SYSTEM:NCP"
-$ WRITE OUFILE "$''T1'   NCP SET OBJECT GTCMSVR NUMBER 0 FILE ''GTCM$DST_LOG'GTCMAUTOSVR.COM PROXY INCOMING USER ''GTCM$SRV_UIC'"
-$ T1 = "!"
-$ IF GTCM$STD_SRV THEN T1 :=
-$ WRITE OUFILE "$''T1'   @''GTCM$DST_LOG'GTCMSERVER """"'P1' """"'P2' """"'P3' """"'P4' """"'P5' 'P6'"
-$ WRITE OUFILE "$  ELSE"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""NOT starting GT.CM because of inadequate privileges"""
-$ WRITE OUFILE "$ ENDIF"
-$ WRITE OUFILE "$ERROR:"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(CURPRV)"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTCMSTOP.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMSTOP.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTCMSTOP.COM stops the GT.CM Server for a node and does MUPIP RUNDOWN"
-$ WRITE OUFILE "$!	Place an invocation or copy of this procedure in the site specific"
-$ WRITE OUFILE "$!	 shutdown: SYS$MANAGER:SYSHUTDWN to ensure all GT.M databases are"
-$ WRITE OUFILE "$!	 properly closed before VMS terminates.  GTCMSTOP should precede"
-$ WRITE OUFILE "$!	 GTCXSTOP, if used, and GTMSTOP, in any case."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ MUPIP := $''GTCM$DST_LOG'MUPIP.EXE"
-$ WRITE OUFILE "$ RUN ''GTCM$DST_LOG'GTCM_STOP.EXE"
-$ WRITE OUFILE "$ MUPIP RUNDOWN"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$ VMI$CALLBACK MESSAGE I PREINS "Preparing files for installation."
-$!  GTCMFILES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMFILES.KIT
-$ IF GTCM$MGR_COM
-$  THEN
-$   WRITE OUFILE "GTCM$ GTCMSERVER.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTCM$ GTCMSTART.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTCM$ GTCMSTOP.COM VMI$ROOT:[SYSMGR] C"
-$ ENDIF
-$ WRITE OUFILE "GTCM$ GTCMAUTOSVR.COM ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCMSERVER.COM ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCMSTART.COM ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCMSTOP.COM ''GTCM$DST_LOG'"
-$ CLOSE OUFILE
-$!  GTCMIMAGES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTCMIMAGES.KIT
-$ WRITE OUFILE "GTCM$ CMISHR.EXE ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCM_SERVER.EXE ''GTCM$DST_LOG'"
-$ WRITE OUFILE "GTCM$ GTCM_STOP.EXE ''GTCM$DST_LOG'"
-$ CLOSE OUFILE
-$!  Provide with file.KITs
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTCMFILES.KIT "" T
-$ VMI$CALLBACK PROVIDE_IMAGE "" VMI$KWD:GTCMIMAGES.KIT "" T
-$ VMI$CALLBACK MESSAGE I FININS "Finalizing the installation."
-$ IF GTCM$START_CM THEN VMI$CALLBACK SET POSTINSTALL YES
-$ IF GTCM$RUN_IVP THEN VMI$CALLBACK SET IVP YES
-$ IF GTCM$STARTDB THEN VMI$CALLBACK MODIFY_STARTUP_DB ADD GTCMSTART.COM END
-$ EXIT VMI$_SUCCESS
-$!
-$POSTINSTALL:
-$!
-$ @'GTCM$DST_LOG'GTMLOGIN
-$ SET NOON
-$ DEFINE /USER_MODE SYS$ERROR NL:
-$ DEFINE /USER_MODE SYS$OUTPUT NL:
-$ IF GTCM$MGR_COM
-$  THEN
-$   T1 := SYS$MANAGER:
-$  ELSE
-$   T1 = GTCM$DST_LOG
-$ ENDIF
-$ @'T1'GTCMSTOP
-$ SET ON
-$ @'T1'GTCMSTART
-$ EXIT VMI$_SUCCESS
-$!
-$IVP:
-$!	The real Installation Verification Procedure.
-$ TYPE SYS$INPUT
-
-  GT.CM  Installation Verification Procedure
-
-$!  Extract the IVP .COM file from the text library.
-$ LIBRARIAN /EXTRACT=GTCM$IVP /OUTPUT=GTCM$IVP.COM GTCM$IVP.TLB
-$ @GTCM$IVP
-$ EXIT $STATUS
diff --git a/sr_vvms/gtcmstop.m b/sr_vvms/gtcmstop.m
deleted file mode 100644
index 6b71a53..0000000
--- a/sr_vvms/gtcmstop.m
+++ /dev/null
@@ -1,58 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;                                                               ;
-;       Copyright 1990, 2002 Sanchez Computer Associates, Inc.   ;
-;                                                               ;
-;       This source code contains the intellectual property     ;
-;       of its copyright holder(s), and is made available       ;
-;       under a license.  If you do not know the terms of       ;
-;       the license, please stop and do not read further.       ;
-;                                                               ;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-GTCMSTOP	;GT.CM STOP utility - stops the GT.CM Server
-	; If a logical GTCMSVRNAM is defined, only the process pointed by
-	; it will be stopped (note: it is not checked whether that is a
-	; GTCM_SERVER process). If the logical GTCMSVRNAM is not defined,
-	; all processes with image name GTCM_SERVER are stopped.
-	; All processes that are being stopped will be listed.
-	;
-	n i,op,expriv,nopriv,pid,zt,$zt
-	s $zt="zg "_$zl_":ERR^GTCMSTOP" u $p:ctrap=$c(3) w !!
-	s op=$zsetprv("GROUP,WORLD"),(expriv,nopriv)=0,zt="d blindpid"
-	f i=1:1:10 d getipid(.pid) q:'pid  d
-	. i i<10 d stopem(.pid) h 2 q
-	. d killem(.pid)
-	i expriv w !,"Insufficient privileges to examine ",expriv,"process",$s(expriv>1:"es.",1:"."),!
-	i nopriv w !,"Insufficient privileges to stop ",nopriv," process",$s(nopriv>1:"es.",1:"."),!
-	s op=$zsetprv(op) u $p:ctrap=""
-	q
-getipid(t);
-	n p,$zt,found,iorp k t s $zt=zt,t=0
-	s p=$zpid(0),logname=$ztrnlnm("GTCMSVRNAM") q:'p
-	f  d  s p=$zpid(1) q:'p  d
-	. q:'p  s iname=$zparse($zgetjpi(p,"IMAGNAME"),"NAME"),pname=$zgetjpi(p,"PRCNAM"),found=0,iorp=0
-	. i logname'="" s iorp=1
-	. i iorp,pname=logname s found=1
-	. i 'iorp,iname="GTCM_SERVER" s found=1
-	. i found s t(p)=$$FUNC^%DH(p,8),t=t+1
-	q
-blindpid
-	i $zs["NOPRIV" s expriv=expriv+1
-	e  w !,$$FUNC^%DH(p,8),"  ",$p($zs,",",2,99),!
-	s p=0
-	q
-stopem(t);
-	n p s p=""
-	f  s p=$o(t(p)) q:p=""  zsystem "show system /full /id="_t(p) d msg($&FORCEX(p),t(p),"Stopping process ")
-	q
-killem(t);
-	n p s p=""
-	f  s p=$o(t(p)) q:p=""  zsystem "show system /full /id="_t(p) d msg($&DELPRC(p),t(p),"Deleting process ")
-	q
-msg(stat,prc,defmsg)
-	i stat=1 w defmsg,prc,! q
-	s stat=$zm(stat)
-	i stat["NOPRIV" s:'$d(nopriv(prc)) nopriv(prc)=1,nopriv=nopriv+1 q
-	w "Error for ",prc," : ",stat,!
-	q
-ERR	w !,$p($zs,",",2,99),! u $p:ctrap="" s:$d(op) op=$zsetprv(op)
-	q
diff --git a/sr_vvms/gtcx_spkitbld.dat b/sr_vvms/gtcx_spkitbld.dat
deleted file mode 100644
index c59d92a..0000000
--- a/sr_vvms/gtcx_spkitbld.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-SPKITBLD$KITNAME := GTCX60002
-SPKITBLD$REWIND_TAPE := N
-SPKITBLD$AUTOINIT_TAPE := 'GTM_INIT_TAPE'
-SPKITBLD$SKIP_FIRST_TAPE_READY_PROMPT := Y
-SPKITBLD$SKIP_FIRST_DISK_READY_PROMPT := Y
-SPKITBLD$SAVESET_A := GTM$VRT:[TCX]KITINSTAL.COM;,GTCXKITHLP.COM;,GTM$VRT:[PRO]CCE.EXE;,CCP.EXE;,GTM$VRT:[HLP]CCE.HLB;
diff --git a/sr_vvms/gtcxkithlp.com b/sr_vvms/gtcxkithlp.com
deleted file mode 100644
index c098292..0000000
--- a/sr_vvms/gtcxkithlp.com
+++ /dev/null
@@ -1,126 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!      HELP TEXT PROCESSING FOR GT.CX KITINSTAL.COM
-$!      COPYRIGHT 1989 - 2000 Sanchez Computer Associates
-$ IF F$EXTRACT(0,5,P1) .EQS. "HELP_" THEN GOTO 'P1'
-$ EXIT VMI$_UNSUPPORTED
-$HELP_READY:
-$ TYPE SYS$INPUT
-  If GT.CX is installed, it should not be active during an installation.
-
-$ EXIT
-$HELP_PURGE:
-$ TYPE SYS$INPUT
-  If GT.CX is previously installed,  there is no reason to keep older versions
-  of the software online, unless you wish to test before purging.
-
-$ EXIT
-$HELP_CDB_CNT:
-$ TYPE SYS$INPUT
-  The installation inserts this value as the  default for  controlling the CCP
-  quotas  established in GTCXSTART.COM.   If you  provide a value less than 1,
-  the value will be set to 1.  This value can be easily changed later.
-
-$ EXIT
-$HELP_STD_CNF:
-$ TYPE SYS$INPUT
-  The standard configuration performs the following:
-
-   *  Places files in SYS$COMMON:[GTM_DIST] with SYSTEM as owner
-   *  Copies the GT.CX command procedures to SYS$MANAGER
-   *  Adds GTCXSTART.COM to the system startup database
-   *  Leaves GT.CX help files in GTM$DIST (does not move them to SYS$HELP)
-   *  Sets up GTCXSTART.COM to start the CCP under the SYSTEM UIC
-   *  Starts the GT.CX CCP at the end of the installation
-
-  If the SYSTEM id is not set up, the installation will use [1,4].
-
-$ EXIT
-$HELP_DST_OWN:
-$ TYPE SYS$INPUT
-  Provide a UIC, normally SYSTEM, to own the files in the  GT.M  distribution.
-  The UIC can be a name, a group name and a user name separated  by  a  comma,
-  or a pair of octal codes separated by a comma which specify group and user.
-
-$ EXIT
-$HELP_SYS_DST:
-$ TYPE SYS$INPUT
-  Usual practice is to place a system component such as GT.CX  on  the  system
-  disk.   If you have  severe  space constraints,  you may need to use another
-  volume.
-
-$ EXIT
-$HELP_SYS_DIR:
-$ TYPE SYS$INPUT
-  This directory  becomes be a sub-directory of  SYS$COMMON  and   holds   the
-  distribution.   If it does not  exist,  the  installation  creates  it  with
-  WORLD=RE access.   If you  are  not  concerned  with  mixing  software  from
-  different vendors, you may wish to use SYSLIB.
-
-$ EXIT
-$HELP_DST_DEV:
-$ TYPE SYS$INPUT
-  The disk must be mounted, on-line and have adequate space to hold the  GT.CX
-  distribution.  The disk name may be physical or logical.
-
-$ EXIT
-$HELP_DST_DIR:
-$ TYPE SYS$INPUT
-  This  directory  holds  the  distribution.    If  it  does  not  exist,  the
-  installation creates it with WORLD=RE access.
-
-$ EXIT
-$HELP_CCP_OWN:
-$ TYPE SYS$INPUT
-  The CCP usually must have broad file access so running under the  SYSTEM UIC
-  may make sense.  Alternatives involve using a distinguished  UIC  which  has
-  appropriate UIC or ACL based access to clustered files.  This UIC MUST be in
-  Group 1.
-
-$ EXIT
-$HELP_STARTDB:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to place GTCXSTART.COM in the  startup
-  database so the system startup automatically sets up  the  GT.CX environment
-  whenever the system boots.
-
-$ EXIT
-$HELP_MGR_COM:
-$ TYPE SYS$INPUT
-  You may prevent the installation from moving the .COM files to  SYS$MANAGER.
-  Copying the command  procedures  to  SYS$MANAGER  allows  system startup to
-  access them  through  the  VMS  startup  database  and generally simplifies
-  operations.  However, if you wish to have multiple versions of GT.M on your
-  system at the same time, you would not have multiple copies of the  command
-  procedures in SYS$MANAGER.
-
-$ EXIT
-$HELP_HLP_DIR:
-$ TYPE SYS$INPUT
-  You may place the GT.CX help files in SYS$HELP or leave them with  the  rest
-  of the distribution.
-
-$ EXIT
-$HELP_RUN_IVP:
-$ TYPE SYS$INPUT
-  This installation kit contains an installation verification procedure  (IVP)
-  which you can run as part of the installation to verify the  correctness  of
-  the software.   Note that if you choose this option, the  GT.M  images  must
-  already be installed.
-
-$ EXIT
-$HELP_START_CCP:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to start the CCP.
-
-$ EXIT
diff --git a/sr_vvms/gtcxkitinstal.com b/sr_vvms/gtcxkitinstal.com
deleted file mode 100644
index 502f0c1..0000000
--- a/sr_vvms/gtcxkitinstal.com
+++ /dev/null
@@ -1,302 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!	KITINSTAL.COM PROCEDURE FOR THE GT.CX PRODUCT
-$!
-$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y
-$ ON WARNING THEN EXIT $STATUS
-$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL
-$ IF P1 .EQS. "VMI$_POSTINSTALL" THEN GOTO POSTINSTALL
-$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP
-$ EXIT VMI$_UNSUPPORTED
-$!
-$INSTALL:
-$ TYPE SYS$INPUT
-
-  GT.CX  (c)  COPYRIGHT 1987 - 2000  by  Sanchez Computer Associates
-                           ALL RIGHTS RESERVED
-
-
-$!  the following 2 lines must be maintained
-$ GTCX$VMS_VERSION :== 072	! Minimum VMS version required
-$ GTCX$DISK_SPACE == 3000	! Minumum disk space on system disk required for install (2x result)
-$!
-$ IF F$ELEMENT(0,",",VMI$VMS_VERSION) .EQS. "RELEASED"
-$  THEN
-$   GTCX$VMS_IS == F$ELEMENT(1,",",VMI$VMS_VERSION)
-$   IF GTCX$VMS_IS .LTS. GTCX$VMS_VERSION
-$    THEN
-$     VMI$CALLBACK MESSAGE E VMSMISMATCH "This GT.CX kit requires an existing VMS''GTCX$VMS_VERSION' system."
-$     EXIT VMI$_FAILURE
-$   ENDIF
-$  ELSE
-$   GTCX$VMS_IS :==
-$   WRITE SYS$OUTPUT "  No VMS version checking performed for field test versions."
-$ ENDIF
-$ IF (GTCX$VMS_IS .GES. "052") THEN T1 = F$VERIFY(VMI$KIT_DEBUG)
-$ VMI$CALLBACK CHECK_NET_UTILIZATION GTCX$ROOM 'GTCX$DISK_SPACE'
-$ IF .NOT. GTCX$ROOM
-$  THEN
-$   VMI$CALLBACK MESSAGE E NOSPACE "There is not enough disk space -- GT.CX needs ''GTCX$DISK_SPACE' blocks."
-$   EXIT VMI$_FAILURE
-$ ENDIF
-$!  check for running users
-$ SET NOON
-$ DEFINE SYS$ERROR NL:
-$ DEFINE SYS$OUTPUT NL:
-$ @SYS$COMMON:[GTM_DIST]:GTMLOGIN
-$ CCE :== $GTM$DIST:CCE
-$ CCE SHO CCP
-$ T1 = $SEVERITY
-$ DEASSIGN SYS$OUTPUT
-$ DEASSIGN SYS$ERROR
-$ IF T1 .EQ. 1 THEN CCE SHO CCP
-$ SET ON
-$ DELETE /SYMBOL/GLOBAL CCE
-$ VMI$CALLBACK ASK GTCX$READY "Have you verified there are no current GT.CX users" "NO" B "@VMI$KWD:GTCXKITHLP HELP_READY"
-$ IF .NOT. GTCX$READY THEN EXIT VMI$_FAILURE
-$!  setup default answers
-$ GTCX$DOPURGE :== YES
-$ GTCX$RUN_IVP == 0	!! should be "YES", but no IVP yet
-$ GTCX$CDB_CNT == 12
-$ GTCX$STD_CNF :== YES
-$ GTCX$DST_OWN :== SYSTEM
-$ IF F$IDENTIFIER(GTCX$DST_OWN,"NAME_TO_NUMBER") .EQ. 0 THEN GTCX$DST_OWN :== 1,4
-$ GTCX$CCP_UIC == GTCX$DST_OWN
-$ GTCX$SYS_DST :== YES
-$ GTCX$DST_DIR :== GTM_DIST
-$ GTCX$DST_CRE == GTCX$DST_DIR
-$ GTCX$DST_DEV :==
-$ GTCX$STARTDB :== YES
-$ GTCX$MGR_COM :== YES
-$ GTCX$HLP_DIR :== NO
-$ GTCX$START_CCP :== YES
-$!
-$ VMI$CALLBACK ASK GTCX$DOPURGE "Do you want to purge files replaced by this installation" 'GTCX$DOPURGE' B -
-  "@VMI$KWD:GTCXKITHLP HELP_PURGE"
-$ IF .NOT. GTCX$DOPURGE THEN VMI$CALLBACK SET PURGE NO
-$ VMI$CALLBACK ASK GTCX$CDB_CNT "How many clustered databases will this node access" 'GTCX$CDB_CNT' I -
-  "@VMI$KWD:GTCXKITHLP HELP_CDB_CNT"
-$ IF GTCX$CDB_CNT .LT. 1
-$  THEN
-$   GTCX$CDB_CNT == 1
-$   WRITE SYS$OUTPUT "  The installation set this value to 1 as 0 or negative values are not useful."
-$ ENDIF
-$ VMI$CALLBACK ASK GTCX$STD_CNF "Do you want the standard GT.CX configuration" 'GTCX$STD_CNF' B -
-  "@VMI$KWD:GTCXKITHLP HELP_STD_CNF"
-$ IF GTCX$STD_CNF
-$  THEN
-$   GTCX$SYS_DST == 1
-$   GTCX$STARTDB == 1
-$   GTCX$MGR_COM == 1
-$   GTCX$HLP_DIR == 0
-$   GTCX$START_CCP == 1
-$   GTCX$DST_LOG :== SYS$COMMON:['GTCX$DST_DIR']
-$   GTCX$DIR_TYPE :== COMMON
-$   GTCX$RUN_IVP == 0	!! "YES" no IVP yet
-$  ELSE ! not standard configuration
-$   VMI$CALLBACK ASK GTCX$DST_OWN "What UIC should own the GT.CX distribution" 'GTCX$DST_OWN' S "@VMI$KWD:GTCXKITHLP HELP_DST_OWN"
-$   GTCX$DST_OWN == GTCX$DST_OWN - "[" - "]"
-$   VMI$CALLBACK ASK GTCX$SYS_DST "Do you want the GT.CX distribution to go into a System Directory" 'GTCX$SYS_DST' B -
-    "@VMI$KWD:GTCXKITHLP HELP_SYS_DST"
-$   IF GTCX$SYS_DST
-$    THEN
-$     VMI$CALLBACK ASK GTCX$DST_DIR "In what System Directory do you want to place GT.CX" 'GTCX$DST_DIR' S -
-      "@VMI$KWD:GTCXKITHLP HELP_SYS_DIR"
-$     GTCX$DST_DIR == GTCX$DST_DIR - "[" - "]"
-$     GTCX$DST_CRE == GTCX$DST_DIR
-$     GTCX$DST_LOG :== SYS$COMMON:['GTCX$DST_DIR']
-$     GTCX$DIR_TYPE :== COMMON
-$    ELSE ! not system disk
-$     VMI$CALLBACK ASK GTCX$DST_DEV "On which device do you want to place GT.CX" "''GTCX$DST_DEV'" S -
-      "@VMI$KWD:GTCXKITHLP HELP_DST_DEV"
-$     VMI$CALLBACK ASK GTCX$DST_DIR "In what directory on that device do you want to place GT.CX" 'GTCX$DST_DIR' S -
-      "@VMI$KWD:GTCXKITHLP HELP_DST_DIR"
-$     GTCX$DST_DEV == GTCX$DST_DEV - ":"
-$     GTCX$DST_DIR == GTCX$DST_DIR - "[" - "]"
-$     GTCX$DST_LOG :== 'GTCX$DST_DEV':['GTCX$DST_DIR']
-$     GTCX$DST_CRE == GTCX$DST_LOG
-$     GTCX$DIR_TYPE :== USER
-$   ENDIF ! system disk
-$   VMI$CALLBACK ASK GTCX$CCP_UIC "Under what UIC should the CCP operate (must be Group 1)" 'GTCX$CCP_UIC' S -
-    "@VMI$KWD:GTCXKITHLP HELP_CCP_OWN"
-$   GTCX$CCP_UIC == GTCX$CCP_UIC - "[" - "]"
-$   IF F$ELEMENT(0,",",GTCX$CCP_UIC) .NE. 1
-$    THEN
-$     T1 = F$FAO("!%U",'F$IDENTIFIER(GTCX$CCP_UIC,"NAME_TO_NUMBER")')' -"["-"]"
-$     IF F$ELEMENT(0,",",T1) .NE. 1
-$      THEN
-$       GTCX$CCP_UIC :== SYSTEM
-$       IF F$IDENTIFIER(GTCX$CCP_UIC,"NAME_TO_NUMBER") .EQ. 0 THEN GTCX$CCP_UIC :== 1,4
-$       WRITE SYS$OUTPUT "  The installation is using the default because the Group must be 1."
-$     ENDIF
-$   ENDIF
-$   VMI$CALLBACK ASK GTCX$STARTDB "Do you want GTCXSTART.COM in the startup database" 'GTCX$STARTDB' B -
-    "@VMI$KWD:GTCXKITHLP HELP_STARTDB"
-$   IF .NOT. GTCX$STARTDB
-$    THEN
-$     VMI$CALLBACK ASK GTCX$MGR_COM "Do you want the GT.M .COM files in SYS$MANAGER" 'GTCX$MGR_COM' B -
-      "@VMI$KWD:GTCXKITHLP HELP_MGR_COM"
-$   ENDIF
-$   VMI$CALLBACK ASK GTCX$HLP_DIR "Do you want the GT.CX help files in SYS$HELP" 'GTCX$HLP_DIR' B "@VMI$KWD:GTCXKITHLP HELP_HLP_DIR"
-$!! no IVP yet
-$   IF 0 THEN VMI$CALLBACK ASK GTCX$RUN_IVP "Do you want to run the IVP (requires GT.M)" 'GTCX$RUN_IVP' B -
-    "@VMI$KWD:GTCXKITHLP HELP_RUN_IVP"
-$   IF GTCX$RUN_IVP
-$    THEN
-$     GTCX$START_CCP == 1
-$    ELSE
-$     VMI$CALLBACK ASK GTCX$START_CCP "Do you want to start a GT.CX CCP now" 'GTCX$START_CCP' B "@VMI$KWD:GTCXKITHLP HELP_START_CCP"
-$   ENDIF
-$ ENDIF ! standard configuration
-$ IF GTCX$MGR_COM
-$  THEN
-$   WRITE SYS$OUTPUT "  The following command files are created and copied to SYS$MANAGER:"
-$  ELSE
-$   WRITE SYS$OUTPUT "  The following command files are created:"
-$ ENDIF
-$ TYPE SYS$INPUT
-
-	GTCXSTART.COM
-	GTCXSTOP.COM
-
-  Each file contains its own user documentation.
-
-  All the questions have been asked. Installation now proceeds without your
-  manual intervention for about 5-10 minutes.
-$ IF GTCX$RUN_IVP THEN WRITE SYS$OUTPUT "  Finally the installation verification procedure tests the installation."
-$ WRITE SYS$OUTPUT ""
-$ VMI$CALLBACK CREATE_DIRECTORY 'GTCX$DIR_TYPE' 'GTCX$DST_CRE' "/OWNER_UIC=[''GTCX$DST_OWN'] /PROTECTION=(WO:RE)"
-$ VMI$CALLBACK MESSAGE I CRECOM "Creating command files."
-$!  Create GTCXSTART.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCXSTART.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTCXSTART.COM should be placed in the VMS startup database."
-$ WRITE OUFILE "$!	It starts the GT.CX Cluster Controller Program (CCP) for a node."
-$ WRITE OUFILE "$!	The invoking user requires the following privileges:"
-$ WRITE OUFILE "$!	 ALTPRI, DETATCH, OPER, PSWAPM, SYSLCK, SYSNAM and TMPMBX"
-$ WRITE OUFILE "$!	P1 is the number of clustered databases."
-$ WRITE OUFILE "$!	P2 is the priority and should be at or just above the highest priority"
-$ WRITE OUFILE "$!	 used by a any GT.M process which accesses clustered database files."
-$ WRITE OUFILE "$!	P3 is the default working set size."
-$ WRITE OUFILE "$!	P4 is the Page File Quota, which should be the sum for all"
-$ WRITE OUFILE "$!       clustered databases of (GLOBAL_BUFFERS*BLOCKSIZE/512+LOCKSPACE+50),"
-$ WRITE OUFILE "$!       and which this procedure approximates by defaulting to P1 * 10000."
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""TMPMBX"")"
-$ WRITE OUFILE "$ ON CONTROL_C THEN GOTO ERROR"
-$ WRITE OUFILE "$ ON ERROR THEN GOTO ERROR"
-$ WRITE OUFILE "$ CCE := $''GTCX$DST_LOG'CCE.EXE"
-$ WRITE OUFILE "$ MUPI*P := $''GTCX$DST_LOG'MUPIP.EXE"
-$ WRITE OUFILE "$ MUPIP RUNDOWN   ! Prepare a clean start"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""ALTPRI,DETACH,OPER,PSWAPM,SYSLCK,SYSNAM,TMPMBX"") + - "
-$ WRITE OUFILE "            "","" + CURPRV"
-$ WRITE OUFILE "$ IF F$PRIVILEGE(""ALTPRI,DETACH,OPER,PSWAPM,SYSLCK,SYSNAM,TMPMBX"")"
-$ WRITE OUFILE "$  THEN"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""Starting the CCP as process GT.CX_CONTROL"""
-$ WRITE OUFILE "$   IF P1 .EQS. """" THEN P1 = ''GTCX$CDB_CNT'"
-$ WRITE OUFILE "$   FL = P1 + 3"
-$ WRITE OUFILE "$   AL = FL * 4"
-$ WRITE OUFILE "$   EL = FL * 5"
-$ WRITE OUFILE "$   DL = FL * 10"
-$ WRITE OUFILE "$   TQ = FL * 3"
-$ WRITE OUFILE "$   IF P2 .EQS. """" THEN P2 = 5"
-$ WRITE OUFILE "$   IF P3 .EQS. """" THEN P3 = FL * 200"
-$ WRITE OUFILE "$   WSE = P3 + 200"
-$ WRITE OUFILE "$   IF P4 .EQS. """" THEN P4 =  P1 * 10000"
-$ WRITE OUFILE "$   RUN/DETACHED/PROC=""GT.CX_CONTROL""/PRIV=(OPER,SYSLCK,SYSNAM,TMPMBX) -"
-$ WRITE OUFILE "     /ERROR=SYS$MANAGER:CCPERR.LOG /PAGE_FILE='P4' -"
-$ WRITE OUFILE "     /DUMP/NOSWAPPING/UIC=''GTCX$CCP_UIC'/AST_LIMIT='AL'/ENQUEUE_LIMIT='EL' -"
-$ WRITE OUFILE "     /FILE_LIMIT='FL'/IO_DIRECT='DL'/QUEUE_LIMIT='TQ'/PRIORITY='P2' -"
-$ WRITE OUFILE "     /WORKING_SET='P3'/MAXIMUM_WORKING_SET='WSE' ''GTCX$DST_LOG'CCP.EXE"
-$ WRITE OUFILE "$  ELSE"
-$ WRITE OUFILE "$   WRITE SYS$OUTPUT ""NOT starting the CCP because of inadequate privileges"""
-$ WRITE OUFILE "$ ENDIF"
-$ WRITE OUFILE "$ERROR:"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(CURPRV)"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTCXSTOP.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTCXSTOP.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTCXSTOP.COM stops the GT.CX CCP for a node and does MUPIP RUNDOWN"
-$ WRITE OUFILE "$!	Place an invocation or copy of this procedure in the site specific"
-$ WRITE OUFILE "$!	 shutdown: SYS$MANAGER:SYSHUTDWN to ensure all GT.M databases are"
-$ WRITE OUFILE "$!	 properly closed before VMS terminates.  GTCXSTOP should follow"
-$ WRITE OUFILE "$!	 GTCMSTOP, if used and GTMSTOP, in any case."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ CCE := $''GTCX$DST_LOG'CCE.EXE"
-$ WRITE OUFILE "$ MUPIP := $''GTCX$DST_LOG'MUPIP.EXE"
-$ WRITE OUFILE "$ CCE STOP"
-$ WRITE OUFILE "$ MUPIP RUNDOWN"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$ VMI$CALLBACK MESSAGE I PREINS "Preparing files for installation."
-$!  GTCXFILES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTCXFILES.KIT
-$ IF GTCX$MGR_COM
-$  THEN
-$   WRITE OUFILE "GTCX$ GTCXSTART.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTCX$ GTCXSTOP.COM VMI$ROOT:[SYSMGR] C"
-$ ENDIF
-$ WRITE OUFILE "GTCX$ GTCXSTART.COM ''GTCX$DST_LOG'"
-$ WRITE OUFILE "GTCX$ GTCXSTOP.COM ''GTCX$DST_LOG'"
-$ CLOSE OUFILE
-$!  GTCXIMAGES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTCXIMAGES.KIT
-$ WRITE OUFILE "GTCX$ CCE.EXE ''GTCX$DST_LOG'"
-$ WRITE OUFILE "GTCX$ CCP.EXE ''GTCX$DST_LOG'"
-$ CLOSE OUFILE
-$!  Create GTCXHLB.KIT - don't know why this requires a separate file.
-$ GTCX$HLP_LOG == GTCX$DST_LOG
-$ IF GTCX$HLP_DIR THEN GTCX$HLP_LOG :== VMI$ROOT:[SYSHLP]
-$ OPEN /WRITE OUFILE VMI$KWD:GTCXHLB.KIT
-$ WRITE OUFILE "GTCX$ CCE.HLB ''GTCX$HLP_LOG'"
-$ CLOSE OUFILE
-$!  Provide with file.KITs
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTCXFILES.KIT "" T
-$ VMI$CALLBACK PROVIDE_IMAGE "" VMI$KWD:GTCXIMAGES.KIT "" T
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTCXHLB.KIT "" T
-$ VMI$CALLBACK MESSAGE I FININS "Finalizing the installation."
-$ IF GTCX$START_CCP THEN VMI$CALLBACK SET POSTINSTALL YES
-$ IF GTCX$RUN_IVP THEN VMI$CALLBACK SET IVP YES
-$ IF GTCX$STARTDB THEN VMI$CALLBACK MODIFY_STARTUP_DB ADD GTCXSTART.COM END
-$ EXIT VMI$_SUCCESS
-$!
-$POSTINSTALL:
-$!
-$! do a gtmlogin
-$ @'GTCX$DST_LOG'GTMLOGIN
-$ CCE := $GTM$DIST:CCE.EXE
-$ SET NOON
-$ DEFINE /USER_MODE SYS$ERROR NL:
-$ DEFINE /USER_MODE SYS$OUTPUT NL:
-$ CCE STOP
-$ SET ON
-$ IF GTCX$MGR_COM
-$  THEN
-$   T1 := SYS$MANAGER:
-$  ELSE
-$   T1 = GTM$DST_LOG
-$ ENDIF
-$ @'T1'GTCXSTART
-$ EXIT VMI$_SUCCESS
-$!
-$IVP:
-$!	The real Installation Verification Procedure.
-$ TYPE SYS$INPUT
-
-  GT.CX  Installation Verification Procedure
-
-$!  Extract the IVP .COM file from the text library.
-$ LIBRARIAN /EXTRACT=GTCX$IVP /OUTPUT=GTCX$IVP.COM GTCX$IVP.TLB
-$ @GTCX$IVP
-$ EXIT $STATUS
diff --git a/sr_vvms/gtm$ce.h b/sr_vvms/gtm$ce.h
deleted file mode 100644
index 4e6a5d3..0000000
--- a/sr_vvms/gtm$ce.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-enum	GTM$INFO_CODE
-{
-	GTCE$K_SFN,
-	GTCE$K_RTN,
-	GTCE$K_INDIR,
-	GTCE$K_ZROU,
-	GTCE$K_ZCOM,
-	GTCE$K_CMDLIN,
-	GTCE$K_P1,
-	GTCE$K_P2,
-	GTCE$K_P3,
-	GTCE$K_P4,
-	GTCE$K_P5,
-	GTCE$K_P6,
-	GTCE$K_P7,
-	GTCE$K_P8
-} ;
diff --git a/sr_vvms/gtm$ce_establish.c b/sr_vvms/gtm$ce_establish.c
deleted file mode 100644
index bf82633..0000000
--- a/sr_vvms/gtm$ce_establish.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "mdef.h"
-#include "comp_esc.h"
-
-GBLREF struct ce_sentinel_desc	*ce_def_list;
-
-
-int4 GTM$CE_ESTABLISH (user_action_routine, sentinel)
-int4			(*user_action_routine)();
-struct dsc$descriptor_s	sentinel;
-{
-	struct ce_sentinel_desc	*shp, *shp_last;
-
-
-	shp = shp_last = ce_def_list;
-	while (shp != NULL)
-	{
-		shp_last = shp;
-		shp = shp->next;
-	}
-
-	/* Create new node. */
-	shp = malloc(SIZEOF(struct ce_sentinel_desc));
-
-	shp->escape_sentinel = malloc(sentinel.dsc$w_length);
-	memcpy (shp->escape_sentinel, sentinel.dsc$a_pointer, sentinel.dsc$w_length);
-	shp->escape_length = sentinel.dsc$w_length;
-	shp->user_routine = user_action_routine;
-	shp->next = NULL;
-
-	/* Add to list. */
-	if (shp_last == NULL)
-	{
-		/* First sentinel handler, it is the list. */
-		ce_def_list = shp;
-	}
-	else
-	{
-		/* Add to end of list. */
-		shp_last->next = shp;
-	}
-
-
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/gtm$ce_getinfo.c b/sr_vvms/gtm$ce_getinfo.c
deleted file mode 100644
index 5ac2c02..0000000
--- a/sr_vvms/gtm$ce_getinfo.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "mdef.h"
-#include "svnames.h"
-#include "gtm_ce.h"
-#include "op.h"
-
-
-GBLREF unsigned short	source_name_len;
-GBLREF char		source_file_name[];
-GBLREF mident		routine_name;
-
-
-int4 GTM$CE_GETINFO(uint4 item_code, int4 *resultant_value, struct dsc$descriptor_s resultant_string, uint4 *resultant_length)
-{
-	mval	v;
-	char	*item_start, *item_string;
-	int4	copy_len, i, pc, pn;
-
-	error_def(ERR_CENOINDIR);
-	error_def(ERR_UNIMPLOP);
-
-
-	switch ((enum GTM$INFO_CODE)item_code)
-	{
-	case GTCE$K_SFN:
-		copy_len = source_name_len;
-		if (copy_len > resultant_string.dsc$w_length)
-			copy_len = resultant_string.dsc$w_length;
-		memcpy (resultant_string.dsc$a_pointer, source_file_name, copy_len);
-		*resultant_length = copy_len;
-		break;
-
-	case GTCE$K_RTN:
-		copy_len = routine_name.len;
-		if (copy_len > resultant_string.dsc$w_length)
-			copy_len = resultant_string.dsc$w_length;
-		memcpy(resultant_string.dsc$a_pointer, routine_name.addr, copy_len);
-		*resultant_length = copy_len;
-		break;
-
-	case GTCE$K_INDIR:
-		stx_error(ERR_CENOINDIR);
-		*resultant_value = 0;
-		break;
-
-	case GTCE$K_ZROU:
-		op_svget (SV_ZROUTINES, &v);
-		copy_len = v.str.len;
-		if (copy_len > resultant_string.dsc$w_length)
-			copy_len = resultant_string.dsc$w_length;
-		memcpy (resultant_string.dsc$a_pointer, v.str.addr, copy_len);
-		*resultant_length = copy_len;
-		break;
-
-	case GTCE$K_ZCOM:
-		op_svget (SV_ZCOMPILE, &v);
-		copy_len = v.str.len;
-		if (copy_len > resultant_string.dsc$w_length)
-			copy_len = resultant_string.dsc$w_length;
-		memcpy (resultant_string.dsc$a_pointer, v.str.addr, copy_len);
-		*resultant_length = copy_len;
-		break;
-
-	case GTCE$K_P1:
-	case GTCE$K_P2:
-	case GTCE$K_P3:
-	case GTCE$K_P4:
-	case GTCE$K_P5:
-	case GTCE$K_P6:
-	case GTCE$K_P7:
-	case GTCE$K_P8:
-	case GTCE$K_CMDLIN:
-		op_svget (SV_ZCMDLINE, &v);
-
-		switch ((enum GTM$INFO_CODE)item_code)
-		{
-		case GTCE$K_CMDLIN:	pn = 0; break;
-		case GTCE$K_P1:		pn = 1; break;
-		case GTCE$K_P2:		pn = 2; break;
-		case GTCE$K_P3:		pn = 3; break;
-		case GTCE$K_P4:		pn = 4; break;
-		case GTCE$K_P5:		pn = 5; break;
-		case GTCE$K_P6:		pn = 6; break;
-		case GTCE$K_P7:		pn = 7; break;
-		case GTCE$K_P8:		pn = 8; break;
-		}
-		item_string = v.str.addr;
-		if (pn == 0)
-		{
-			copy_len = v.str.len;
-			item_start = item_string;
-		}
-		else
-		{
-			pc = pn - 1;
-			i = 0;
-			while (pc > 0  &&  i++ < v.str.len  &&  *item_string++)
-			{
-				if (*item_string == ',')
-				{
-					pc--;
-					item_string++;
-					i++;
-				}
-			}
-			item_start = item_string;
-			for (copy_len = 0;  *item_string++ != ',' && i++ < v.str.len;  copy_len++) ;
-		}
-
-		if (copy_len > resultant_string.dsc$w_length)
-			copy_len = resultant_string.dsc$w_length;
-		if (copy_len > 0)
-			memcpy (resultant_string.dsc$a_pointer, item_start, copy_len);
-		*resultant_length = copy_len;
-		break;
-
-	default:
-		rts_error (VARLSTCNT(1) ERR_UNIMPLOP);
-		break;
-	}
-
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/gtm$compile.c b/sr_vvms/gtm$compile.c
deleted file mode 100644
index 3f3ee3f..0000000
--- a/sr_vvms/gtm$compile.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "gtm_inet.h"
-
-#include "stp_parms.h"
-#include "stringpool.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "cmd_qlf.h"
-#include "cryptdef.h"
-#include "ladef.h"
-#include "iosp.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "cli.h"
-#include "op.h"
-#include "io.h"
-#include "source_file.h"
-#include "lmdef.h"
-#include "ast_init.h"
-#include "comp_esc.h"
-#include "init_secshr_addrs.h"
-#include "print_exit_stats.h"
-#include "gtm_env_init.h"	/* for gtm_env_init() prototype */
-#include "gtm_threadgbl_init.h"
-#include "gtmimagename.h"
-#include "common_startup_init.h"
-
-GBLREF int			(*op_open_ptr)(mval *v, mval *p, int t, mval *mspace);
-GBLREF boolean_t		run_time;
-GBLREF command_qualifier	glb_cmd_qlf, cmd_qlf;
-GBLREF bool			licensed;
-GBLREF int4			lkid, lid;
-GBLREF spdesc			rts_stringpool, stringpool;
-
-error_def	(LP_NOCNFDB);
-error_def	(ERR_WILLEXPIRE);
-
-LITREF char	gtm_product[PROD];
-LITREF int4	gtm_product_len;
-LITREF char	gtm_version[VERS];
-LITREF int4	gtm_version_len;
-
-#define FILE_NAME_SIZE 255
-
-int gtm$compile(void)
-{
-	unsigned short	len;
-	char		source_file_string[FILE_NAME_SIZE + 1],
-			obj_file[FILE_NAME_SIZE + 1],
-			list_file[FILE_NAME_SIZE + 1],
-			ceprep_file[FILE_NAME_SIZE + 1];
-	int4		status;
-	int4		inid = 0;
-	int4		nid = 0;			/* node number		*/
-	int4		days = 128;			/* days to expiration	*/
-	int4		lic_x =	0;			/* license value	*/
-	char		*h = NULL;			/* license data base	*/
-	char		*pak = NULL;			/* pak record		*/
-	int4		mdl = 0;			/* hardw. model type	*/
-	$DESCRIPTOR	(dprd, gtm_product);
-	$DESCRIPTOR	(dver, gtm_version);
-	DCL_THREADGBL_ACCESS;
-
-	GTM_THREADGBL_INIT;			/* This is the first C routine in the VMS compiler so do init here */
-	gtm_env_init();	/* read in all environment variables before any function call (particularly malloc) */
-	common_startup_init(GTM_IMAGE);		/* While compile-only, pretending GTM_IMAGE is sufficient */
-	op_open_ptr = op_open;
-	licensed = TRUE;
-#	ifdef	NOLICENSE
-	status = SS$_NORMAL;
-	lid = 1;
-	lic_x = 32767;
-#	else
-	if (NULL == (h = la_getdb(LMDB)))		/* license db in mem	*/
-		status = LP_NOCNFDB;
-	else
-		status = SS$_NORMAL;
-	if (1 == (status & 1))				/* licensing: node + system  */
-		status = lm_mdl_nid(&mdl, &nid, &inid);
-	if (1 == (status & 1))				/* licensing: license */
-	{
-		dprd.dsc$w_length = gtm_product_len;
-		dver.dsc$w_length = gtm_version_len;
-		status = lp_licensed(h, &dprd, &dver, mdl, nid, &lid, &lic_x, &days, pak);
-	}
-#	endif
-	INVOKE_INIT_SECSHR_ADDRS;
-	if (1 == (status & 1))				/* licensing: license units  */
-		status = LP_ACQUIRE(pak, lic_x, lid, &lkid);
-	ast_init();
-	io_init(TRUE);
-	stp_init(STP_INITSIZE);
-	rts_stringpool = stringpool;
-	run_time = FALSE;
-	TREF(compile_time) = TRUE;
-#	ifdef	NOLICENSE
-	status = SS$_NORMAL;
-#	else
-	if (LP_NOCNFDB != status)
-		la_freedb(h);
-	if (1 == (status & 1))					/* licensing */
-	{
-		if (days < 14)
-			lm_putmsgu(ERR_WILLEXPIRE, 0, 0);
-	} else
-	{
-		licensed = FALSE;
-		rts_error_csa(VARLSTCNT(1) status);
-	}
-#	endif
-	glb_cmd_qlf.object_file.str.addr = obj_file;
-	glb_cmd_qlf.object_file.str.len = FILE_NAME_SIZE;
-	glb_cmd_qlf.list_file.str.addr = list_file;
-	glb_cmd_qlf.list_file.str.len = FILE_NAME_SIZE;
-	glb_cmd_qlf.ceprep_file.str.addr = ceprep_file;
-	glb_cmd_qlf.ceprep_file.str.len = FILE_NAME_SIZE;
-	get_cmd_qlf(&glb_cmd_qlf);
-	ce_init();	/* initialize compiler escape processing */
-	TREF(dollar_zcstatus) = SS$_NORMAL;
-	len = FILE_NAME_SIZE;
-	for (status = cli_get_str("INFILE", source_file_string, &len);
-		status;
-		status = cli_get_str("INFILE", source_file_string, &len))
-	{
-		compile_source_file(len, source_file_string, TRUE);
-		len = FILE_NAME_SIZE;
-	}
-	print_exit_stats();
-	io_rundown(NORMAL_RUNDOWN);
-	return TREF(dollar_zcstatus);
-}
diff --git a/sr_vvms/gtm$dmod.m b/sr_vvms/gtm$dmod.m
deleted file mode 100644
index 76181c6..0000000
--- a/sr_vvms/gtm$dmod.m
+++ /dev/null
@@ -1 +0,0 @@
-	F  B
diff --git a/sr_vvms/gtm$interrupt.c b/sr_vvms/gtm$interrupt.c
deleted file mode 100644
index a9d8291..0000000
--- a/sr_vvms/gtm$interrupt.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "outofband.h"
-#include "deferred_events.h"
-
-GBLREF io_pair 	io_std_device;
-GBLREF bool	std_dev_outbnd;
-
-void gtm$interrupt(int4 ob_char)
-{
-	uint4	mask;
-	d_tt_struct      *tt_ptr;
-
-	if (io_std_device.in->type != tt || ob_char > MAXOUTOFBAND)
-		return;
-
-	tt_ptr = (d_tt_struct *) io_std_device.in->dev_sp;
-	std_dev_outbnd = TRUE;
-	mask = 1 << ob_char;
-	if (mask & tt_ptr->enbld_outofbands.mask)
-	{	ctrap_set(ob_char);
-	}
-	else if (mask & CTRLC_MSK)
-	{	ctrlc_set(0);
-	}
-	else if (mask & CTRLY_MSK)
-	{	ctrly_set(0);
-	}
-	return;
-}
diff --git a/sr_vvms/gtm$ivp.tlb b/sr_vvms/gtm$ivp.tlb
deleted file mode 100644
index e0b2c5a..0000000
Binary files a/sr_vvms/gtm$ivp.tlb and /dev/null differ
diff --git a/sr_vvms/gtm$startup.c b/sr_vvms/gtm$startup.c
deleted file mode 100644
index 84ad838..0000000
--- a/sr_vvms/gtm$startup.c
+++ /dev/null
@@ -1,451 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <efndef.h>
-#include <descrip.h>
-#include <jpidef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-#include <starlet.h>
-#include <stsdef.h>
-
-#include "gtm_limits.h"
-#include "gtm_inet.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include <rtnhdr.h>
-#include "stack_frame.h"
-#include "stringpool.h"
-#include "stp_parms.h"
-#include "zcall.h"
-#include "cryptdef.h"
-#include "mv_stent.h"
-#include "startup.h"
-#include "ladef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "cmd_qlf.h"
-#include "gdskill.h"
-#include "filestruct.h"
-#include "error.h"		/* for EXIT_HANDLER macro used in SET_EXIT_HANDLER macro */
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "collseq.h"
-#ifndef __vax
-#  include "fnpc.h"
-#endif
-#include "desblk.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmimagename.h"
-#include "cache.h"
-#include "op.h"
-#include "patcode.h"
-#include "dpgbldir_sysops.h"	/* for dpzgbini prototype */
-#include "dfntmpmbx.h"
-#include "ast_init.h"
-#include "comp_esc.h"
-#include "repl_sp.h"
-#include "mprof.h"
-#include "init_secshr_addrs.h"
-#include "getzmode.h"
-#include "getzprocess.h"
-#include "gtmmsg.h"
-#include "tp_timeout.h"
-#include "getjobname.h"
-#include "error_trap.h"			/* for ecode_init() prototype */
-#include "zyerror_init.h"
-#include "generic_exit_handler.h"
-#include "ztrap_form_init.h"
-#include "zdate_form_init.h"
-#include "dollar_system_init.h"
-#include "gtm_env_xlate_init.h"
-#include "zco_init.h"
-#include "svnames.h"
-#include "getzdir.h"
-#include "jobinterrupt_init.h"
-#include "gtm_env_init.h"	/* for gtm_env_init() prototype */
-#include "gtm_logicals.h"	/* for DISABLE_ALIGN_STRINGS */
-#include "logical_truth_value.h"
-#include "zwrite.h"
-#include "common_startup_init.h"
-#include "gtm_threadgbl_init.h"
-
-#define FREE_RTNTBL_SPACE 	17
-#define MIN_INDIRECTION_NESTING 32
-#define MAX_INDIRECTION_NESTING 256
-#define MAX_IO_TIMER 		60000000
-#define MIN_IO_TIMER 		1000000
-
-GBLDEF zctabrtn		*zctab, *zctab_end;
-GBLDEF zcpackage	*zcpack_start, *zcpack_end;
-GBLDEF unsigned char	*gtm_main_address;	/* Save the address of gtm_main, for use by tir */
-GBLDEF bool		init_done = FALSE;
-GBLDEF uint4            trust = 0;
-GBLDEF mval		original_cwd;
-GBLDEF unsigned char	original_cwd_buff[PATH_MAX + PATH_MAX]; /* device + directory */
-
-GBLREF desblk		exi_blk;
-GBLREF void		(*tp_timeout_start_timer_ptr)(int4 tmout_sec);
-GBLREF void		(*tp_timeout_clear_ptr)(void);
-GBLREF void		(*tp_timeout_action_ptr)(void);
-GBLREF int		(*op_open_ptr)(mval *v, mval *p, int t, mval *mspace);
-GBLREF void		(*unw_prof_frame_ptr)(void);
-GBLREF rtn_tabent	*rtn_fst_table, *rtn_names, *rtn_names_top, *rtn_names_end;
-GBLREF int4		break_message_mask;
-GBLREF int4		exi_condition;
-GBLREF int4		write_filter;
-GBLREF int4		spc_inp_prc;
-GBLREF uint4		image_count;
-GBLREF stack_frame	*frame_pointer;
-GBLREF unsigned char	*stackbase, *stacktop, *stackwarn, *msp;
-GBLREF mv_stent		*mv_chain;
-GBLREF bool		undef_inhibit;
-GBLREF uint4	        iott_write_delay[2];
-GBLREF int		(* volatile xfer_table[])();
-GBLREF mval		dollar_ztrap;
-GBLREF mval		dollar_zstatus;
-GBLREF mval		dollar_zdir;
-GBLREF spdesc		stringpool;
-GBLREF spdesc		rts_stringpool;
-GBLREF command_qualifier glb_cmd_qlf, cmd_qlf;
-GBLREF int4		zdir_form;
-GBLREF int		mumps_status;
-GBLREF boolean_t	is_replicator;
-GBLREF int		dollar_truth;
-GBLREF boolean_t	mstr_native_align;
-GBLREF void             (*cache_table_relobjs)(void);   /* Function pointer to call cache_table_rebuild() */
-GBLREF symval		*curr_symval;
-GBLREF boolean_t	skip_dbtriggers;
-
-error_def(ERR_LINKVERSION);
-error_def(ERR_WILLEXPIRE);
-error_def(LP_NOCNFDB);			/* No license data base */
-error_def(ERR_COLLATIONUNDEF);
-
-static readonly mstr lnm$group   = {9,  "LNM$GROUP"};
-
-/* Licensing     */
-GBLREF bool     licensed;
-GBLREF int4	lkid, lid;
-
-LITREF char	gtm_product[PROD];
-LITREF int4	gtm_product_len;
-LITREF char	gtm_version[VERS];
-LITREF int4	gtm_version_len;
-/* End of Licensing */
-
-error_def(ERR_COLLATIONUNDEF);
-error_def(ERR_LINKVERSION);
-error_def(ERR_WILLEXPIRE);
-error_def(LP_NOCNFDB);			/* No license data base */
-
-void gtm$startup(struct startup_vector *svec, boolean_t is_dal)
-/* Note: various references to data copied from *svec could profitably be referenced directly */
-{
-	char		*mstack_ptr;
-	unsigned char	*base_address, *transfer_address;
-	void		dfnlnm$tmpmbx();
-	static readonly unsigned char init_break[1] = {'B'};
-	int4		lct;
-	int		i;
-	mstr		log_name;
-	mstr		val;
-	boolean_t	ret, is_defined;
-	char		buff[MAX_FN_LEN];
-	DCL_THREADGBL_ACCESS;
-
-	uint4           imagpriv, trust_status;
-	typedef struct {
-		short buflen;
-		short itmcode;
-		void  *buffer;
-		void  *retlen;
-	} ITMLST;
-	ITMLST item_list[2] = {
-		{ 4, JPI$_IMAGPRIV, &imagpriv, 0},
-		{ 0, 0,             0,         0} };
-
-	/* Licensing */
-	int4	status;
-	int4	inid;
-	int4	nid;				/* node number		*/
-	int4	days;				/* days to expiration	  */
-	int4	lic_x;				/* license value	  */
-	char	*h;				/* license data base	  */
-	char	*pak;				/* pak record		  */
-	int4	mdl;				/* hardw. model type	  */
-	struct dsc$descriptor_s	dprd, dver;
-	/* End of Licensing */
-
-	/* While normally gtm$startup is only called once per process, when the invocation method is through
-	 * call-ins, it is invoked on every call-in so we need to be able to handle the case that we are already
-	 * initialized. The main "flag" for this is the init_done global variable but since that flag may one day
-	 * move into the gtm_threadgbl framework (even though VMS will never be threaded), we instead test the
-	 * threadgbl base variable to see if it is initialized or not and bypass threadgbl initialization if so.
-	 */
-	if (NULL == gtm_threadgbl)
-	{
-		GTM_THREADGBL_INIT;			/* This is the first C routine in VMS so do init here */
-	}
-	cache_table_relobjs = &cache_table_rebuild;
-	/* If we get any errors signalled during initialization, don't let the process
-	 * continue under any circumstances.  This condition handler enforces that.
-	 */
-	lib$establish(lib$sig_to_stop);
-	assert(BITS_PER_UCHAR == 8);
-	/* When items are added to svec, but recompilation of a new release is not
-	 * required, appropriate "if (svec->argcnt < ?)" statements should be
-	 * added here to establish defaults.  The computed defaults may all be removed
-	 * for each release where recompilation is required.
-	 */
-	tp_timeout_start_timer_ptr = tp_start_timer;
-	tp_timeout_clear_ptr = tp_clear_timeout;
-	tp_timeout_action_ptr = tp_timeout_action;
-	op_open_ptr = op_open;
-	unw_prof_frame_ptr = unw_prof_frame;
-	if (SIZEOF(*svec) != svec->argcnt)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_LINKVERSION);
-	if (!init_done)
-	{
-		common_startup_init(GTM_IMAGE);
-		gtm_env_init();	/* read in all environment variables */
-		if ((!is_dal) && NULL != (TREF(mprof_env_gbl_name)).str.addr)
-			turn_tracing_on(TADR(mprof_env_gbl_name), TRUE, (TREF(mprof_env_gbl_name)).str.len > 0);
-		licensed = TRUE;
-		pak = NULL;
-#		ifdef	NOLICENSE
-		status = SS$_NORMAL;
-		h = NULL;
-#		else
-		if (NULL == (h = la_getdb(LMDB)))		/* license db in mem	  */
-			status = LP_NOCNFDB;
-		else
-			status = SS$_NORMAL;
-#		endif
-		/* note: for upward compatibility, missing values in the startup vector can be set to defaults */
-		get_proc_info(0, TADR(login_time), &image_count);
-		gtm_main_address = svec->gtm_main_inaddr;
-		ast_init();
-		rtn_fst_table = rtn_names = (rtn_tabent *)svec->rtn_start;
-		rtn_names_end = (rtn_tabent *)svec->rtn_end - 1;
-		rtn_names_top = (rtn_tabent *)svec->rtn_end + FREE_RTNTBL_SPACE - 1;
-		rtn_tbl_sort(rtn_names, rtn_names_end);
-		fgncal_zlinit();
-		zctab = (zctabrtn *)svec->zctable_start;
-		zctab_end = (zctabrtn *)svec->zctable_end;
-		zcpack_start = (zcpackage *)svec->zcpackage_begin;
-		zcpack_end = (zcpackage *)svec->zcpackage_end;
-		svec->xf_tab = &xfer_table[0];
-		svec->dlr_truth = &dollar_truth;
-		if (0 != svec->user_spawn_flag)
-		{
-		        if (SS$_NORMAL != (trust_status = sys$getjpiw(EFN$C_ENF, 0, 0, item_list, 0, 0, 0)))
-			        rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) trust_status);
-			else if (imagpriv & PRV$M_CMEXEC)
-			       trust = svec->user_spawn_flag;
-		}
-		if (svec->user_stack_size < 4096)
-			svec->user_stack_size = 4096;
-		if (svec->user_stack_size > 8388608)
-			svec->user_stack_size = 8388608;
-		mstack_ptr = malloc(svec->user_stack_size);
-		msp = stackbase = mstack_ptr + svec->user_stack_size - mvs_size[MVST_STORIG];
-		mv_chain = (mv_stent *)msp;
-		mv_chain->mv_st_type = MVST_STORIG;      /* Initialize first (anchor) mv_stent so doesn't do anything */
-		mv_chain->mv_st_next = 0;
-		mv_chain->mv_st_cont.mvs_storig = 0;
-		stacktop = mstack_ptr + 2 * mvs_size[MVST_NTAB];
-		stackwarn = stacktop + 1024;
-		if (!svec->labels)
-			glb_cmd_qlf.qlf &= ~CQ_LOWER_LABELS;
-		cmd_qlf.qlf = glb_cmd_qlf.qlf;
-		break_message_mask = svec->break_message_mask;
-		undef_inhibit = svec->undef_inhib;
-		TREF(lv_null_subs) = svec->lvnullsubs;
-		zdir_form = svec->zdir_form;
-		if (!IS_VALID_ZDIR_FORM(zdir_form))
-			zdir_form = ZDIR_FORM_FULLPATH;
-		write_filter = 0;
-		if (svec->user_write_filter & CHAR_FILTER)
-			write_filter |= CHAR_FILTER;
-		if (svec->user_write_filter & ESC1)
-			write_filter |= ESC1;
-		spc_inp_prc = svec->special_input;
-		if (svec->user_strpl_size < STP_INITSIZE)
-			svec->user_strpl_size = STP_INITSIZE;
-		else if (svec->user_strpl_size > STP_MAXINITSIZE)
-			svec->user_strpl_size = STP_MAXINITSIZE;
-		stp_init(svec->user_strpl_size);
-		if ((svec->user_io_timer < MAX_IO_TIMER) && (svec->user_io_timer > MIN_IO_TIMER))
-			iott_write_delay[0] = -svec->user_io_timer;
-		rts_stringpool = stringpool;
-		TREF(compile_time) = FALSE;
-		assert(run_time); /* Should have been set by common_startup_init */
-		/* Initialize alignment requirement for the runtime stringpool */
-		log_name.addr = DISABLE_ALIGN_STRINGS;
-		log_name.len = STR_LIT_LEN(DISABLE_ALIGN_STRINGS);
-		/* mstr_native_align = logical_truth_value(&log_name, FALSE, NULL) ? FALSE : TRUE; */
-		mstr_native_align = FALSE; /* TODO: remove this line and uncomment the above line */
-		getjobname();
-		DEBUG_ONLY(util_out_open(0));
-		INVOKE_INIT_SECSHR_ADDRS;
-#		ifdef	NOLICENSE
-		status = SS$_NORMAL;
-		mdl = nid = inid = 0;
-#		else
-		if (1 == (status & 1))				/* licensing: node+ system  */
-		{
-			mdl = nid = inid = 0;
-			status = lm_mdl_nid(&mdl, &nid, &inid);
-		}
-#		endif
-		dfntmpmbx(lnm$group.len, lnm$group.addr);
-		if (svec->base_addr)
-			base_address = svec->base_addr - SIZEOF(frame_pointer->rvector->jsb);
-#		ifdef	NOLICENSE
-		status = SS$_NORMAL;
-		lid = 1;
-		lic_x = 32767;
-		days = 128;
-#		else
-		if (1 == (status & 1))				/* licensing: license */
-		{
-			dprd.dsc$w_length = gtm_product_len;
-			dprd.dsc$a_pointer = gtm_product;
-			dver.dsc$w_length = gtm_version_len;
-			dver.dsc$a_pointer = gtm_version;
-			status = lp_licensed(h, &dprd, &dver, mdl, nid, &lid, &lic_x, &days, pak);
-		}
-#		endif
-		if (1 == (status & 1))				/* licensing: license units  */
-			status = LP_ACQUIRE(pak, lic_x, lid, &lkid);	/* def in cryptdef */
-#		ifdef	NOLICENSE
-		status = SS$_NORMAL;
-#		else
-		if (LP_NOCNFDB != status)
-			la_freedb(h);
-		if (1 == (status & 1))					/* licensing */
-		{
-			licensed = TRUE;
-			if (days < 14)
-				la_putmsgu(ERR_WILLEXPIRE, 0, 0);
-		} else
-		{
-			licensed = FALSE;
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		}
-#		endif
-		jobinterrupt_init();
-		getzprocess();
-		getzmode();
-		/* Now that we let users change cwd (set $zdir), we want to save cwd so that we can restore cwd at exit. */
-		/* We save cwd at startup to workaround bug (?) documented in setzdir() regarding chdir() */
-		/* We don't want to place original_cwd in the stringpool 'cos it doesn't change over the life of a process. */
-		/* By placing original_cwd in a pre-allocated buffer, we avoid making original_cwd a part of gcol passes. */
-		getzdir(); /* get current working directory at startup */
-		original_cwd = dollar_zdir;
-		original_cwd.str.addr = original_cwd_buff;
-		memcpy(original_cwd_buff, dollar_zdir.str.addr, dollar_zdir.str.len);
-		cache_init();
-		zco_init();
-		frame_pointer = msp -= SIZEOF(stack_frame) + SIZEOF(rhdtyp);
-		memset(frame_pointer, 0, SIZEOF(stack_frame) + SIZEOF(rhdtyp));
-		frame_pointer->type = SFT_COUNT;
-		frame_pointer->rvector = (rhdtyp *)((char *)frame_pointer + SIZEOF(stack_frame));
-		symbinit();
-		if (svec->base_addr)
-		{
-			base_frame(base_address);
-			jobchild_init(base_address);
-		}
-		dpzgbini();
-		svec->frm_ptr = frame_pointer;
-		io_init(svec->ctrlc_enable);
-		dollar_ztrap.mvtype = MV_STR;
-		dollar_ztrap.str.len = SIZEOF(init_break);
-		dollar_ztrap.str.addr = init_break;
-		dollar_zstatus.mvtype = MV_STR;
-		dollar_zstatus.str.len = 0;
-		dollar_zstatus.str.addr = NULL;
-		ecode_init();
-		zyerror_init();
-		ztrap_form_init();
-		zdate_form_init(svec);
-		dollar_system_init(svec);
-		gtm_env_xlate_init();
-		initialize_pattern_table();
-		/* Initialize compiler escape feature */
-		ce_init();
-		/* Initialize local collating sequence */
-		TREF(transform) = TRUE;
-		lct = find_local_colltype();
-		if (0 != lct)
-		{
-			TREF(local_collseq) = ready_collseq(lct);
-			if (!TREF(local_collseq))
-			{
-				exi_condition = ERR_COLLATIONUNDEF;
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_COLLATIONUNDEF, 1, lct);
-				op_halt();
-			}
-		} else
-			TREF(local_collseq) = NULL;
-		/* Initialize zwrite subsystem. Better to do it now when we have storage to allocate than
-		 * if we fail and storage allocation may not be possible. To that end, pretend we have
-		 * seen alias acitivity so those structures are initialized as well.
-		 */
-		assert(FALSE == curr_symval->alias_activity);
-		curr_symval->alias_activity = TRUE;
-		lvzwr_init(0, (mval *)NULL);
-		TREF(in_zwrite) = FALSE;
-		curr_symval->alias_activity = FALSE;
-		/* Initialize cache structure for $Piece function (except for Vax which does not use this) */
-		for (i = 0; FNPC_MAX > i; i++)
-		{
-			(TREF(fnpca)).fnpcs[i].pcoffmax = &(TREF(fnpca)).fnpcs[i].pstart[FNPC_ELEM_MAX];
-			(TREF(fnpca)).fnpcs[i].indx = i;
-		}
-		(TREF(fnpca)).fnpcsteal = &(TREF(fnpca)).fnpcs[0];		/* Starting place to look for cache reuse */
-		(TREF(fnpca)).fnpcmax = &(TREF(fnpca)).fnpcs[FNPC_MAX - 1];	/* The last element */
-		/* until this point all signals run down the process. That sounds reasonable since we're not executing any
-		 * of the customers code and we wouldn't know how to cope anyway.  Now we can cope so establish
-		 * the mdb_condition_handler.
-		 */
-		*svec->fp = mdb_condition_handler;
-		SET_EXIT_HANDLER(exi_blk, generic_exit_handler, exi_condition);	/* Establish exit handler */
-		init_done = TRUE;
-	} else
-	{
-		if (svec->base_addr)
-		{	base_address = svec->base_addr - SIZEOF(frame_pointer->rvector->jsb);
-			transfer_address = base_address + SIZEOF(rhdtyp);
-			svec->xf_tab = &xfer_table[0];
-			base_frame(base_address);
-			new_stack_frame(base_address, transfer_address, transfer_address);
-			svec->frm_ptr = frame_pointer;
-			*svec->fp = mdb_condition_handler;
-			mumps_status = SS$_NORMAL;
-		}
-	}
-	lib$revert();	/* from lib$sig_to_stop establish */
-	return;
-}
diff --git a/sr_vvms/gtm_bintim.c b/sr_vvms/gtm_bintim.c
deleted file mode 100644
index 15143ac..0000000
--- a/sr_vvms/gtm_bintim.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include <jpidef.h>
-#include <fab.h>
-#include <rab.h>
-#include <nam.h>
-#include <rmsdef.h>
-#include <math.h>	/* for SECOND2EPOCH_SECOND macro */
-
-#include "gtm_string.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"	/* jnl_proc_time needs this. jnl.h needs some of the above */
-#include "gtm_bintim.h"
-
-int gtm_bintim(char *toscan, jnl_proc_time *timep)
-{
-	uint4		status;
-	$DESCRIPTOR	(qual_dsc, toscan);
-	int		len = strlen(toscan);
-	jnl_proc_time	jptime;
-
-	jptime = *timep;
-	/* remove quotes */
-	while (toscan[len - 1] == '"')
-		--len;
-	while ('"' == *qual_dsc.dsc$a_pointer)
-	{
-		--len;
-		++qual_dsc.dsc$a_pointer;
-	}
-	qual_dsc.dsc$w_length = len;
-	status = sys$bintim(&qual_dsc,&jptime);
-	if (0 > jptime)
-	{	/* delta time will be a negative value */
-		jptime = MID_TIME(-(jptime));	/* convert to JNL_SHORT_TIME format */
-		jptime = -(jptime);
-	} else
-		jptime = MID_TIME(jptime);	/* convert to JNL_SHORT_TIME format */
-
-	*timep = jptime;
-	if (SS$_NORMAL == status)
-		return 0;
-	else
-		return -1;
-}
diff --git a/sr_vvms/gtm_blkast.c b/sr_vvms/gtm_blkast.c
deleted file mode 100644
index 5a3c94c..0000000
--- a/sr_vvms/gtm_blkast.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lckdef.h>
-#include <psldef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "locks.h"
-
-void	gtm_blkast(gd_region *region)
-{
-	vms_gds_info	*vbi;
-
-	if (region != NULL)
-	{
-		vbi = FILE_INFO(region);
-		gtm_deq(vbi->file_cntl_lsb.lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-		gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, &vbi->file_cntl_lsb, LCK$M_CONVERT, NULL, 0,
-			 NULL, 0, NULL, PSL$C_USER, 0);
-		/* Update the lock value block and reestablish the blocking AST */
-		vbi->file_cntl_lsb.valblk[0] = region->node;
-		gtm_enq(0, LCK$K_CRMODE, &vbi->file_cntl_lsb, LCK$M_CONVERT | LCK$M_VALBLK, NULL, 0,
-			NULL, region, gtm_blkast, PSL$C_USER, 0);
-	}
-}
diff --git a/sr_vvms/gtm_ce.h b/sr_vvms/gtm_ce.h
deleted file mode 100644
index 4e6a5d3..0000000
--- a/sr_vvms/gtm_ce.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-enum	GTM$INFO_CODE
-{
-	GTCE$K_SFN,
-	GTCE$K_RTN,
-	GTCE$K_INDIR,
-	GTCE$K_ZROU,
-	GTCE$K_ZCOM,
-	GTCE$K_CMDLIN,
-	GTCE$K_P1,
-	GTCE$K_P2,
-	GTCE$K_P3,
-	GTCE$K_P4,
-	GTCE$K_P5,
-	GTCE$K_P6,
-	GTCE$K_P7,
-	GTCE$K_P8
-} ;
diff --git a/sr_vvms/gtm_conv.c b/sr_vvms/gtm_conv.c
deleted file mode 100644
index a0b5c80..0000000
--- a/sr_vvms/gtm_conv.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *                                                              *
- *      Copyright 2006 Fidelity Information Services, Inc 	*
- *                                                              *
- *      This source code contains the intellectual property     *
- *      of its copyright holder(s), and is made available       *
- *      under a license.  If you do not know the terms of       *
- *      the license, please stop and do not read further.       *
- *                                                              *
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_conv.h"
-
-/* These are dummy routines to allow code to compile/link on VMS. These routines are not
-   used but elimination of them from the code is detremental to the clarify of the UNIX
-   codebase and since Alpha/VMS is a dead platform, these dummy routines also have a
-   limited lifespan.. 9/2006 SE
-*/
-
-LITDEF mstr		chset_names[CHSET_MAX_IDX];
-GBLDEF UConverter	*chset_desc[CHSET_MAX_IDX];
-
-UConverter* get_chset_desc(const mstr *chset)
-{
-	GTMASSERT;
-}
-
-int gtm_conv(UConverter* from, UConverter* to, mstr* src, char* dstbuff, int* bufflen)
-{
-	GTMASSERT;
-}
-
-int verify_chset(const mstr *parm)
-{
-	GTMASSERT;
-}
diff --git a/sr_vvms/gtm_conv.h b/sr_vvms/gtm_conv.h
deleted file mode 100644
index a28d6a3..0000000
--- a/sr_vvms/gtm_conv.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *                                                              *
- *      Copyright 2006 Fidelity Information Services, Inc 	*
- *                                                              *
- *      This source code contains the intellectual property     *
- *      of its copyright holder(s), and is made available       *
- *      under a license.  If you do not know the terms of       *
- *      the license, please stop and do not read further.       *
- *                                                              *
- ****************************************************************/
-
-#ifndef GTM_CONV_H
-#define GTM_CONV_H
-
-/* Define types for use by compilation in VMS in code paths that will never be
-   used. This was the preferred method of making the Unicode modified UNIX code
-   work in VMS rather than butchering it with ifdefs making maintenance more
-   difficult. 9/2006 SE
-*/
-
-typedef int UConverter;
-
-UConverter* get_chset_desc(const mstr *chset);
-int gtm_conv(UConverter* from, UConverter* to, mstr* src, char* dstbuff, int* bufflen);
-int verify_chset(const mstr *parm);
-
-#endif /* GTM_CONV_H */
diff --git a/sr_vvms/gtm_deq.c b/sr_vvms/gtm_deq.c
deleted file mode 100644
index 7077af7..0000000
--- a/sr_vvms/gtm_deq.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lkidef.h>
-#include <lckdef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gtmsecshr.h"
-#include "locks.h"
-#include "vmsdtype.h"
-
-GBLREF uint4	rundown_process_id;
-GBLREF lock_sb	vms_lock_list[MAX_VMS_LOCKS + 1];
-GBLREF int	vms_lock_tail;
-
-uint4	gtm_deq(unsigned int lkid, void *valblk, unsigned int acmode, unsigned int flags)
-{
-	struct
-	{
-		item_list_3	item[1];
-		int4		terminator;
-	} item_list;
-	unsigned short	iosb[4];
-	int		index;
-	uint4		lk_pid = 0, retlen, status;
-	uint4		prvadr[2], prvprv[2];
-
-	item_list.item[0].buffer_length = SIZEOF(lk_pid);
-	item_list.item[0].item_code = LKI$_PID;
-	item_list.item[0].buffer_address = &lk_pid;
-	item_list.item[0].return_length_address = &retlen;
-	item_list.terminator = 0;
-	if ((SS$_NORMAL == (status = sys$getlkiw(EFN$C_ENF, &lkid, &item_list, iosb, NULL, 0, 0)))
-		&& (lk_pid == rundown_process_id))
-	{
-		GTMSECSHR_SET_DBG_PRIV(PRV$M_SYSLCK, status);
-		if (SS$_NORMAL == status)
-		{
-			status = sys$deq(lkid, valblk, acmode, flags);
-			if ((status & 1) && !(flags & LCK$M_CANCEL))
-			{
-				for (index = 0;  index < vms_lock_tail;  index++)
-				{
-					if (vms_lock_list[index].lockid == lkid)
-					{
-						vms_lock_list[index].lockid = 0;
-						break;
-					}
-				}
-			}
-			GTMSECSHR_REL_DBG_PRIV;
-		}
-	}
-	return status;
-}
diff --git a/sr_vvms/gtm_enq.c b/sr_vvms/gtm_enq.c
deleted file mode 100644
index a3ae073..0000000
--- a/sr_vvms/gtm_enq.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lckdef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-
-#include "gtmsecshr.h"
-#include "locks.h"
-
-/* while this has the same interface as sys$enq, it is intended only for conversions
- * in order to record the lock in the list of locks to deq at image termination,
- * the lock must first be taken out (generally in NL mode with gtm_enqw() */
-uint4 gtm_enq(
-	unsigned int	efn,
-	unsigned int	lkmode,
-	lock_sb		*lsb,
-	unsigned int	flags,
-	void		*resnam,
-	unsigned int	parid,
-	void		*astadr,
-	unsigned int	astprm,
-	void		*blkast,
-	unsigned int	acmode,
-	unsigned int	nullarg)
-{
-	uint4		status;
-	uint4		prvadr[2], prvprv[2];
-
-	GTMSECSHR_SET_DBG_PRIV(PRV$M_SYSLCK, status);
-	if (SS$_NORMAL == status)
-	{
-		if ((flags & LCK$M_CONVERT) && lsb->lockid)
-			status = sys$enq(efn, lkmode, lsb, flags, resnam, parid, astadr, astprm, blkast, acmode, nullarg);
-		else
-			status = SS$_CVTUNGRANT;
-			/* the above is an indication to the caller that the lock was not first established in NL mode
-			 * with gtm_enqw, so that it is registered in vms_lock_list in case of process termination
-			 * if circumstances turn nasty, that condition can lead to a hang so don't permit it */
-		GTMSECSHR_REL_DBG_PRIV;
-	}
-	return status;
-}
diff --git a/sr_vvms/gtm_enqw.c b/sr_vvms/gtm_enqw.c
deleted file mode 100644
index 1dc3284..0000000
--- a/sr_vvms/gtm_enqw.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lckdef.h>
-#include <prvdef.h>
-#include <ssdef.h>
-
-#include "gtmsecshr.h"
-#include "locks.h"
-#include "probe.h"
-
-GBLDEF lock_sb 	vms_lock_list[MAX_VMS_LOCKS + 1];
-GBLDEF int	vms_lock_tail;
-
-/* see also gtm_enq */
-uint4 gtm_enqw(
-	unsigned int	efn,
-	unsigned int	lkmode,
-	lock_sb		*lsb,
-	unsigned int	flags,
-	void		*resnam,
-	unsigned int	parid,
-	void		*astadr,
-	unsigned int	astprm,
-	void		*blkast,
-	unsigned int	acmode,
-	unsigned int	nullarg)
-{
-	int		index;
-	uint4		status;
-	uint4		prvadr[2], prvprv[2];
-
-	GTMSECSHR_SET_DBG_PRIV(PRV$M_SYSLCK, status);
-	if (SS$_NORMAL == status)
-	{
-		/* send the vms_lock_list element in place of the lsb
-		 * to ensure that the list is up to date in case of a sudden loss of cabin pressure */
-		if (!GTM_PROBE(SIZEOF(*lsb), (unsigned char *)lsb, READ))
-			return SS$_ACCVIO;
-		vms_lock_list[vms_lock_tail] = *lsb;
-		status = sys$enqw(efn, lkmode, &vms_lock_list[vms_lock_tail], flags, resnam, parid,
-				astadr, astprm, blkast, acmode, nullarg);
-		*lsb = vms_lock_list[vms_lock_tail];
-		if (SS$_NORMAL == status)
-			status = lsb->cond;
-		if (SS$_NORMAL == status)
-		{
-			if (!(flags & LCK$M_CONVERT))
-			{
-				if (vms_lock_tail < MAX_VMS_LOCKS)
-					vms_lock_tail++;
-				else	/* vms_lock_tail basically sticks at MAX_VMS_LOCKS once it hits it */
-				{	/* the following looks for open slots to reuse */
-					for (index = 0;  index < vms_lock_tail;  index++)
-					{
-						if (0 == vms_lock_list[index].lockid)
-						{
-							vms_lock_list[index] = *lsb;
-							vms_lock_list[vms_lock_tail].lockid = 0;
-							break;
-						}
-					}
-					if (index >= vms_lock_tail)
-					{	/* if no open slots, release the lock */
-						(void)sys$deq(vms_lock_list[vms_lock_tail].lockid, 0, acmode, flags);
-						/* the following should be interpretted by the caller as too many database files;
-						 * borrowing the condition code avoids merrors, and "should" never happen,
-						 * as GT.M only nests sub-locks to a depth of 1 */
-						status = SS$_EXDEPTH;
-					}
-				}
-			}
-		} else
-			vms_lock_list[vms_lock_tail].lockid = 0;
-		GTMSECSHR_REL_DBG_PRIV;
-	}
-	return status;
-}
diff --git a/sr_vvms/gtm_env_init_sp.c b/sr_vvms/gtm_env_init_sp.c
deleted file mode 100644
index 1dc8e98..0000000
--- a/sr_vvms/gtm_env_init_sp.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <prtdef.h>
-#include <psldef.h>	/* for PSL$C_USER */
-#include <ssdef.h>
-
-#include "iosp.h"		/* for SS_NORMAL */
-#include "gtm_logicals.h"
-#include "trans_log_name.h"	/* for trans_log_name() prototype */
-#include "gtm_env_init.h"	/* for gtm_env_init_sp() prototype */
-#include "gtm_stdlib.h"		/* for STRTOL macro */
-#include "gtm_string.h"		/* for strlen() */
-
-GBLREF	uint4	gtm_memory_noaccess_defined;	/* count of the number of GTM_MEMORY_NOACCESS_ADDR logicals which are defined */
-GBLREF	uint4	gtm_memory_noaccess[GTM_MEMORY_NOACCESS_COUNT];
-
-void	gtm_env_init_sp(void)
-{
-	mstr			val, tn;
-	char			buf[1024], lognamebuf[1024];
-	uint4			mem_start, status, count;
-
-	/* Check if the logical GTM_MEMORY_NOACCESS_ADDR0 is defined. If so note the value down.
-	 * Continue to do this for as many environment variables as are defined with a max. limit of
-	 * 	GTM_MEMORY_NOACCESS_COUNT (currently 8) (i.e. stop at GTM_MEMORY_NOACCESS_ADDR3)
-	 * gtm_expreg() will later look at these values before expanding the virtual address space.
-	 */
-	for (count = 0; count < GTM_MEMORY_NOACCESS_COUNT; count++)
-	{
-		assert(0 == gtm_memory_noaccess[count]);
-		mem_start = 0;
-		SPRINTF(lognamebuf, "%s%d", GTM_MEMORY_NOACCESS_ADDR, count);
-		val.addr = lognamebuf;
-		val.len = (int)strlen(lognamebuf);
-		if (SS_NORMAL == (status = trans_log_name(&val, &tn, buf)))
-			mem_start = STRTOL(buf, NULL, 16);
-		if (!mem_start)
-			break;	/* break if the environment variable is not defined properly */
-		gtm_memory_noaccess[count] = mem_start;
-	}
-	gtm_memory_noaccess_defined = count;
-	assert(GTM_MEMORY_NOACCESS_COUNT >= gtm_memory_noaccess_defined);
-}
diff --git a/sr_vvms/gtm_env_translate.c b/sr_vvms/gtm_env_translate.c
deleted file mode 100644
index 1998a1b..0000000
--- a/sr_vvms/gtm_env_translate.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <stddef.h>
-#include <ssdef.h>
-#include "error.h"
-#include "gtm_env_xlate_init.h"
-
-GBLREF mstr	env_gtm_env_xlate;
-GBLREF mval	dollar_zdir;
-
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_TEXT);
-error_def(ERR_VMSMEMORY);
-error_def(ERR_XTRNRETSTR);
-error_def(ERR_XTRNRETVAL);
-error_def(ERR_XTRNTRANSDLL);
-error_def(ERR_XTRNTRANSDLL);
-error_def(ERR_XTRNTRANSERR);
-
-/* This condition handler is necessary since execution does not return to
- * gtm_env_translate if there is an error in lib$find_image_symbol otherwise */
-CONDITION_HANDLER(gtm_env_xlate_ch)
-{
-	int4    status;
-
-	START_CH(FALSE);
-	PRN_ERROR;
-	if (DUMP)
-		NEXTCH;
-	mch->CHF_MCH_SAVR0 = SIGNAL;	/* return status from lib$find_image_symbol to op_gvextnam or mlk_pvtblk_create*/
-	if ((status = sys$unwind(&mch->CHF_MCH_DEPTH, 0)) != SS$_NORMAL)
-		NEXTCH;
-}
-
-mval* gtm_env_translate(mval* val1, mval* val2, mval* val_xlated)
-{
-	int			ret_gtm_env_xlate;
-	int4			status;
-	struct dsc$descriptor	filename;
-	struct dsc$descriptor	entry_point;
-	MSTR_CONST(routine_name, GTM_ENV_XLATE_ROUTINE_NAME);
-	/* The env xlate routines expect parameters of type xc_string_t* which
-	 * is not defined on VMS. On VMS, xc_string_t is assumed to be same as
-	 * mstr. Following code is to ensure any future mstr changes are caught
-	 * sooner than later */
-	typedef struct
-	{
-		unsigned int	length;
-		char*		address;
-	} xc_string_t;	/* A replica of what mstr ought to be */
-	xc_string_t*	dummy_ptr;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	assert(offsetof(xc_string_t, length) == offsetof(mstr, len) && SIZEOF(dummy_ptr->length) == SIZEOF(val1->str.len));
-	assert(offsetof(xc_string_t, address) == offsetof(mstr, addr) && SIZEOF(dummy_ptr->address) == SIZEOF(val1->str.addr));
-	if (0 != env_gtm_env_xlate.len)
-	{
-		MV_FORCE_STR(val2);
-		if (NULL == RFPTR(gtm_env_xlate_entry))
-		{
-			entry_point.dsc$b_dtype = DSC$K_DTYPE_T;
-			entry_point.dsc$b_class = DSC$K_CLASS_S;
-			entry_point.dsc$w_length = routine_name.len;
-			entry_point.dsc$a_pointer = routine_name.addr;
-			filename.dsc$b_dtype = DSC$K_DTYPE_T;
-			filename.dsc$b_class = DSC$K_CLASS_S;
-			filename.dsc$w_length = env_gtm_env_xlate.len;
-			filename.dsc$a_pointer = env_gtm_env_xlate.addr;
-
-			ESTABLISH(gtm_env_xlate_ch);
-			status = lib$find_image_symbol(&filename, &entry_point, &RFPTR(gtm_env_xlate_entry), 0);
-			REVERT;
-			if (0 == (status & 1))
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_XTRNTRANSDLL);
-		}
-		val_xlated->str.addr = NULL;
-		ret_gtm_env_xlate = IVFPTR(gtm_env_xlate_entry)(&val1->str, &val2->str, &dollar_zdir.str, &val_xlated->str);
-		if (MAX_DBSTRLEN < val_xlated->str.len)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_XTRNRETVAL, 2, val_xlated->str.len, MAX_DBSTRLEN);
-		if (0 != ret_gtm_env_xlate)
-		{
-			if ((val_xlated->str.len) && (val_xlated->str.addr))
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_XTRNTRANSERR, 0, ERR_TEXT,  2,
-					  val_xlated->str.len, val_xlated->str.addr);
-			else
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_XTRNTRANSERR);
-		}
-		if ((NULL == val_xlated->str.addr) && (0 != val_xlated->str.len))				\
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_XTRNRETSTR);
-		val_xlated->mvtype = MV_STR;
-		val1 = val_xlated;
-	}
-	return val1;
-}
diff --git a/sr_vvms/gtm_event_log.c b/sr_vvms/gtm_event_log.c
deleted file mode 100644
index 9d2026f..0000000
--- a/sr_vvms/gtm_event_log.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-int gtm_event_log_init()
-{
-return 0;}
-
-int gtm_event_log_close()
-{
-return 0;}
-
-int gtm_event_log(int argc, char *category, char *code, char *msg)
-{
-return 0;}
diff --git a/sr_vvms/gtm_file_remove.c b/sr_vvms/gtm_file_remove.c
deleted file mode 100644
index 7e34fe8..0000000
--- a/sr_vvms/gtm_file_remove.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_fcntl.h"
-
-#include <ssdef.h>
-#include <rms.h>
-#include <devdef.h>
-#include <descrip.h>
-#include <libdtdef.h>
-#include <libdef.h>
-#include <starlet.h>
-
-#include "gtm_file_remove.h"
-#include "iosp.h"
-
-int4 gtm_file_remove(char *fn, int fn_len, uint4 *ustatus)
-{
-	unsigned char	es_buffer[MAX_FN_LEN], name_buffer[MAX_FN_LEN];
-	struct FAB 	fab;
-	struct NAM 	nam;
-	uint4		status;
-
-	*ustatus = SS_NORMAL;
-	nam = cc$rms_nam;
-	nam.nam$l_rsa = name_buffer;
-	nam.nam$b_rss = SIZEOF(name_buffer);
-	nam.nam$l_esa = es_buffer;
-	nam.nam$b_ess = SIZEOF(es_buffer);
-	nam.nam$b_nop = NAM$M_NOCONCEAL;
-	fab = cc$rms_fab;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = fn;
-	fab.fab$b_fns = fn_len;
-	status = sys$erase(&fab);
-	if (!(status & 1))
-	{
-		*ustatus = fab.fab$l_stv;
-		return status;
-	}
-	*ustatus = status;
-	return SS_NORMAL;
-}
diff --git a/sr_vvms/gtm_file_stat.c b/sr_vvms/gtm_file_stat.c
deleted file mode 100644
index 78ce48d..0000000
--- a/sr_vvms/gtm_file_stat.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include <devdef.h>
-#include <ssdef.h>
-#include "util.h"
-#include "gtmmsg.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_file_stat.h"
-
-GBLREF bool incremental;
-GBLREF bool in_backup;
-
-/* Checks the status of a file.
- * Output Parameter
- *	uint4 *status : error number
- * Returns:
- *	FILE_NOT_FOUND: if file is not presnt
- *	FILE_PRESENT:	if file is present
- *	FILE_READONLY|FILE_PRESENT: if file is readonly
- *	FILE_STAT_ERROR: if error happens during this module.
- *	Side Effect:    Except for FILE_STAT_ERROR passed "ret" will have expanded file name with path.
- *	Note: This routine now removes version info in "ret". In case caller need that we need to change this module.
- */
-int gtm_file_stat(mstr *file, mstr *def, mstr *ret, boolean_t check_prv, uint4 *status)
-{
-	char		*ptr;
-	unsigned char	es_buffer[MAX_FN_LEN], name_buffer[MAX_FN_LEN];
-	int		retstat;
-	struct FAB 	fab;
-	struct NAM 	nam;
-
-	nam = cc$rms_nam;
-	/* Note From Documentation :
-	 * 	The nam$l_esa and nam$b_ess fields must be specified (nonzero) for wildcard character processing.
-	 *      nam$l_rsa required for wildcard character processing */
-	nam.nam$l_rsa = name_buffer; 		/* Resultant string area address: specifies name, type,
-						 * 	and version of last file found */
-	nam.nam$b_rss = SIZEOF(name_buffer);	/* Buffer size for l_rsa: For sys$search */
-	nam.nam$l_esa = es_buffer;		/* Expanded String area address: specifies file name, type,
-						 *	and version of file */
-	nam.nam$b_ess = SIZEOF(es_buffer);	/* Size of Expanded String area */
-	nam.nam$b_nop = NAM$M_NOCONCEAL;	/* Indicates that when a concealed device logical name is present,
-						 * 	the concealed device logical name is to be replaced by the
-						 * 	actual physical device name in the expanded string. */
-	fab = cc$rms_fab;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = file->addr;		/* File specification string address. */
-	fab.fab$b_fns = file->len;		/* File specification string size. */
-	if (NULL != def)
-	{
-		fab.fab$l_dna = def->addr;	/* Default file specification string. */
-		fab.fab$b_dns = def->len;	/* Default file specification string size. */
-	}
-	/* sys$parse is done in order to initialize the NAM or NAML block appropriately */
-	if ((*status = sys$parse(&fab, 0, 0)) != RMS$_NORMAL)
-		return FILE_STAT_ERROR;
-	if (in_backup && !incremental && (fab.fab$l_dev & DEV$M_SQD))
-	{
-		util_out_print("MUPIP cannot backup to a magnetic tape",TRUE);
-		return FILE_NOT_FOUND;
-	}
-	*status = sys$search(&fab, 0, 0);
-	switch(*status)
-	{
-	case RMS$_NORMAL:
-		retstat = FILE_PRESENT;
-		break;
-	case RMS$_NMF:
-	case RMS$_FNF:
-		retstat = FILE_NOT_FOUND;
-		break;
-	case RMS$_PRV:
-		if (check_prv)
-		{
-			retstat = (FILE_PRESENT | FILE_READONLY);
-			break;
-		}
-	default:
-		return FILE_STAT_ERROR;
-	}
-	if (NULL != ret)
-		/* For returned length eliminate version info */
-		fncpy_nover(nam.nam$l_rsa, nam.nam$b_rsl, ret->addr, ret->len);
-	if (!check_prv || FILE_PRESENT != retstat)
-		return retstat;
-	fab.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-	fab.fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_UPD ;
-	fab.fab$l_fop = FAB$M_UFO;
-	*status = sys$open(&fab);
-	if (RMS$_PRV == *status)
-		retstat = retstat | FILE_READONLY;
-	if ((*status) & 1) /* if successful open */
-		sys$dassgn(fab.fab$l_stv);
-	else if (RMS$_PRV != *status)
-		return FILE_STAT_ERROR;
-	return retstat;
-}
diff --git a/sr_vvms/gtm_getlkiw.c b/sr_vvms/gtm_getlkiw.c
deleted file mode 100644
index 67f4428..0000000
--- a/sr_vvms/gtm_getlkiw.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <prvdef.h>
-#include <ssdef.h>
-
-#include "gtmsecshr.h"
-
-uint4 gtm_getlkiw(uint4 efn, uint4 *lkid, void *itmlst, void *iosb, void *astadr, uint4 astprm, uint4 dummy)
-{
-	uint4	status;
-	uint4	prvadr[2], prvprv[2];
-
-	GTMSECSHR_SET_DBG_PRIV(PRV$M_SYSLCK, status);
-	if (status == SS$_NORMAL)
-	{
-		status = sys$getlkiw(efn, lkid, itmlst, iosb, astadr, astprm, dummy);
-		GTMSECSHR_REL_DBG_PRIV;
-	}
-	return status;
-}
diff --git a/sr_vvms/gtm_getlkiw.h b/sr_vvms/gtm_getlkiw.h
deleted file mode 100644
index 71e61a5..0000000
--- a/sr_vvms/gtm_getlkiw.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef GTM_GETLKIW_INCLUDED
-#define GTM_GETLKIW_INCLUDED
-
-uint4 gtm_getlkiw(uint4 efn, uint4 *lkid, void *itmlst, void *iosb, void *astadr, uint4 astprm, 	 uint4 dummy);
-
-#endif /* GTM_GETLKIW_INCLUDED */
diff --git a/sr_vvms/gtm_getmsg.c b/sr_vvms/gtm_getmsg.c
deleted file mode 100644
index 88c432c..0000000
--- a/sr_vvms/gtm_getmsg.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <ssdef.h>
-
-void gtm_getmsg(msgnum, msgbuf)
-uint4 msgnum;
-mstr *msgbuf;
-{
-	int4 status;
-	unsigned short m_len;
-	$DESCRIPTOR(d_sp,"");
-
-	d_sp.dsc$a_pointer = msgbuf->addr;
-	d_sp.dsc$w_length = --msgbuf->len;	/* reserve a byte for a <NUL> terminator */
-
-	status = sys$getmsg(msgnum, &m_len, &d_sp, 0, 0);
-	if (status == SS$_NORMAL || status == SS$_BUFFEROVF)
-	{
-		assert(m_len <= msgbuf->len);
-		msgbuf->len = m_len;
-	}
-	else
-		msgbuf->len = 0;
-	*(char *)(msgbuf->addr + msgbuf->len) = 0;	/* add a null terminator */
-}
diff --git a/sr_vvms/gtm_logicals.h b/sr_vvms/gtm_logicals.h
deleted file mode 100644
index e167838..0000000
--- a/sr_vvms/gtm_logicals.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* gtm_logicals.h - Logical names used by GT.M. */
-/* within each group, the entries are in alpha order of the third column */
-/* -------------------------- Common to Unix and VMS --------------------------  */
-
-#define	GTM_DIST_LOG			"GTM$DIST"
-
-/* Database */
-#define	GTM_BLKUPGRADE_FLAG		"GTM_BLKUPGRADE_FLAG"
-#define	GTM_DBFILEXT_SYSLOG_DISABLE	"GTM_DBFILEXT_SYSLOG_DISABLE"
-#define	GTM_ENV_XLATE			"GTM_ENV_TRANSLATE"
-#define	GTM_FULLBLOCKWRITES		"GTM_FULLBLOCKWRITES"
-#define	GTM_GDSCERT			"GTM_GDSCERT"
-#define	GTM_GBLDIR			"GTM$GBLDIR"
-#define	GTM_GVDUPSETNOOP		"GTM_GVDUPSETNOOP"
-#define	GTM_GVUNDEF_FATAL		"GTM_GVUNDEF_FATAL"
-#define	GTM_POOLLIMIT			"GTM_POOLLIMIT"
-#define	GTM_TP_ALLOCATION_CLUE		"GTM_TP_ALLOCATION_CLUE"
-#define	GTM_TPNOTACIDTIME		"GTM_TPNOTACIDTIME"
-#define	GTM_TPRESTART_LOG_DELTA		"GTM_TPRESTART_LOG_DELTA"
-#define	GTM_TPRESTART_LOG_LIMIT		"GTM_TPRESTART_LOG_FIRST"
-#define	GTM_ZMAXTPTIME			"GTM_ZMAXTPTIME"
-/* 	GTM_DIRTREE_COLLHDR_ALWAYS	"GTM_DIRTREE_COLLHDR_ALWAYS"	dbg-only use in gvcst_put hence no #define for it or
-									else the D9I10002703 subtest will need changes for this.
-									*/
-
-/* White-box testing */
-#define	GTM_WHITE_BOX_TEST_CASE_COUNT	"GTM_WHITE_BOX_TEST_CASE_COUNT"
-#define	GTM_WHITE_BOX_TEST_CASE_ENABLE	"GTM_WHITE_BOX_TEST_CASE_ENABLE"
-#define	GTM_WHITE_BOX_TEST_CASE_NUMBER	"GTM_WHITE_BOX_TEST_CASE_NUMBER"
-
-/* Indirection-cache */
-#define GTM_MAX_INDRCACHE_COUNT         "GTM_MAX_INDRCACHE_COUNT"
-#define GTM_MAX_INDRCACHE_MEMORY        "GTM_MAX_INDRCACHE_MEMORY"
-
-/* MUPIP BACKUP */
-# define GTM_BAK_TEMPDIR_LOG_NAME	"GTM_BAKTMPDIR"
-
-/* Pattern match operator */
-#define	PAT_FILE			"GTM_PATTERN_FILE"
-#define	PAT_TABLE			"GTM_PATTERN_TABLE"
-
-/* Alternative Collation */
-#define	CT_PREFIX			"GTM_COLLATE_"
-#define LCT_PREFIX			"GTM_LOCAL_COLLATE"
-#define LCT_STDNULL			"GTM_LCT_STDNULL"
-
-/* GTM processing versus M standard */
-/* (see gtm_local_collate above) */
-#define GTM_STDXKILL			"GTM_STDXKILL"
-
-/* Miscellaneous */
-#define	ZCOMPILE			"GTM$COMPILE"
-#define	GTM_DEBUG_LEVEL_ENVLOG		"GTMDBGLVL"
-#define	GTM_ZROUTINES			"GTM$ROUTINES"
-#define GTM_BOOLEAN			"GTM_BOOLEAN"
-#define	DISABLE_ALIGN_STRINGS		"GTM_DISABLE_ALIGNSTR"
-#define GTM_MAX_SOCKETS			"GTM_MAX_SOCKETS"
-#define GTM_MEMORY_RESERVE		"GTM_MEMORY_RESERVE"
-#define	GTM_NOUNDEF			"GTM_NOUNDEF"
-#define	GTM_PRINCIPAL			"GTM$PRINCIPAL"
-#define	GTM_PROMPT			"GTM_PROMPT"
-#define	GTM_SIDE_EFFECT			"GTM_SIDE_EFFECTS"
-#define	SYSID				"GTM_SYSID"
-#define GTM_MPROF_TESTING		"GTM_TRACE_GBL_NAME"
-#define GTM_TRACE_GROUPS		"GTM_TRACE_GROUPS"
-#define GTM_TRACE_TABLE_SIZE		"GTM_TRACE_TABLE_SIZE"
-#define	ZDATE_FORM			"GTM_ZDATE_FORM"
-#define	GTM_ZINTERRUPT			"GTM_ZINTERRUPT"
-#define GTM_ZQUIT_ANYWAY		"GTM_ZQUIT_ANYWAY"
-#define	ZTRAP_FORM			"GTM_ZTRAP_FORM"
-#define	ZTRAP_NEW			"GTM_ZTRAP_NEW"
-#define	ZYERROR				"GTM_ZYERROR"
-#define GTM_MAX_STORALLOC		"GTM_MAX_STORALLOC"
-/* -------------------------- VMS only --------------------------  */
-
-/* Miscellaneous */
-#define	GTM_MEMORY_NOACCESS_ADDR	"GTM_MEMORY_NOACCESS_ADDR"
-#define	GTM_MEMORY_NOACCESS_COUNT	8				/* count of the above logicals which are parsed */
-
diff --git a/sr_vvms/gtm_mtio.h b/sr_vvms/gtm_mtio.h
deleted file mode 100644
index 0d9e8a5..0000000
--- a/sr_vvms/gtm_mtio.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* gtm_mtio.h VMS - include appropriate OS files for mag tape operations */
-
-
-/* not presently used */
diff --git a/sr_vvms/gtm_putmsg.c b/sr_vvms/gtm_putmsg.c
deleted file mode 100644
index 3dfcc95..0000000
--- a/sr_vvms/gtm_putmsg.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Servcies, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <stdarg.h>
-#include "msg.h"
-
-#define MAX_ERR_ARGS	64
-
-static int4 msgv[MAX_ERR_ARGS + 1];
-
-void gtm_putmsg(int4 msgid, ...)
-{
-	va_list		var;
-	short int	*sptr;
-	int4		argcnt, *lptr;
-
-	VAR_START(var, msgid);
-	va_count(argcnt);
-	if (MAX_ERR_ARGS < argcnt)
-		argcnt = MAX_ERR_ARGS;
-	sptr = (short int *)msgv;
-	*sptr= argcnt;
-	sptr++;
-	*sptr= 0;
-	assert(0 < argcnt);
-	msgv[1] = msgid;
-	argcnt--;
-	for (lptr = &msgv[2]; argcnt; *lptr++ = va_arg(var, int4), argcnt--)
-		;
-	va_end(var);
-	sys$putmsg(msgv, 0, 0, 0);
-	return;
-}
diff --git a/sr_vvms/gtm_rename.c b/sr_vvms/gtm_rename.c
deleted file mode 100644
index 1ac89f0..0000000
--- a/sr_vvms/gtm_rename.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_rename.h"
-#include "iosp.h"
-
-#include <ssdef.h>
-#include <rms.h>
-#include <devdef.h>
-#include <descrip.h>
-#include <libdtdef.h>
-#include <libdef.h>
-#include <starlet.h>
-
-
-uint4 gtm_rename(char *org_fn, int org_fn_len, char *rename_fn, int rename_len, uint4 *ustatus)
-{
-	char		es1_buffer[MAX_FN_LEN], name1_buffer[MAX_FN_LEN];
-	char		es2_buffer[MAX_FN_LEN], name2_buffer[MAX_FN_LEN];
-	struct FAB	fab1, fab2;
-	struct NAM	nam1, nam2;
-	uint4		status;
-
-	*ustatus = SS_NORMAL;
-	nam1 = cc$rms_nam;
-	nam1.nam$l_rsa = name1_buffer;
-	nam1.nam$b_rss = SIZEOF(name1_buffer);
-	nam1.nam$l_esa = es1_buffer;
-	nam1.nam$b_ess = SIZEOF(es1_buffer);
-	fab1 = cc$rms_fab;
-	fab1.fab$l_nam = &nam1;
-	fab1.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_SHRDEL | FAB$M_SHRUPD;
-	fab1.fab$l_fna = org_fn;
-	fab1.fab$b_fns = org_fn_len;
-
-	nam2 = cc$rms_nam;
-	nam2.nam$l_rsa = name2_buffer;
-	nam2.nam$b_rss = SIZEOF(name2_buffer);
-	nam2.nam$l_esa = es2_buffer;
-	nam2.nam$b_ess = SIZEOF(es2_buffer);
-	fab2 = cc$rms_fab;
-	fab2.fab$l_nam = &nam2;
-	fab2.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_SHRDEL | FAB$M_SHRUPD;
-	fab2.fab$l_fna = rename_fn;
-	fab2.fab$b_fns = rename_len;
-	status = sys$rename(&fab1, 0, 0, &fab2); /* Rename the file */
-	if (!(status & 1))
-	{
-		*ustatus = fab1.fab$l_stv;
-		return status;
-	}
-	*ustatus = status;
-	return SS_NORMAL;
-}
diff --git a/sr_vvms/gtm_snprintf.c b/sr_vvms/gtm_snprintf.c
deleted file mode 100644
index c211881..0000000
--- a/sr_vvms/gtm_snprintf.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2002, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-
-#include <stdarg.h>
-
-int gtm_snprintf(char *str, size_t size, const char *format, ...)
-{ /* hack for VMS, ignore size argument and call sprintf. When snprintf becomes available on VMS, nix this file and define SNPRINTF
-   * in gtm_stdio.h to snprintf */
-
-	va_list	printargs;
-	int	retval, rc;
-
-	va_start(printargs, format);
-	retval = VSPRINTF(str, format, printargs, rc);
-	va_end(printargs);
-	return retval;
-}
diff --git a/sr_vvms/gtm_spkitbld.dat b/sr_vvms/gtm_spkitbld.dat
deleted file mode 100644
index 7ee270c..0000000
--- a/sr_vvms/gtm_spkitbld.dat
+++ /dev/null
@@ -1,11 +0,0 @@
-SPKITBLD$KITNAME := GTM60002
-SPKITBLD$REWIND_TAPE := Y
-SPKITBLD$AUTOINIT_TAPE := 'GTM_INIT_TAPE'
-SPKITBLD$SKIP_FIRST_TAPE_READY_PROMPT := Y
-SPKITBLD$SKIP_FIRST_DISK_READY_PROMPT := Y
-SPKITBLD$SAVESET_A := GTM$VRT:[TLS]KITINSTAL.COM;,GTMKITHLP.COM;,GTMCOLLECT.OPT;,GTM$VRT:[HLP]DSE.HLB;,GDE.HLB;,LKE.HLB;,MUMPS.HLB;,MUPIP.HLB;
-SPKITBLD$NEW_MEDIA_FOR_SAVESET_A := N
-SPKITBLD$SAVESET_B := GTM$VRT:[PRO]GTMSECSHR.EXE;,GTMSHR.EXE;,DSE.EXE;,GDE.EXE;,GTM$DMOD.EXE;,LKE.EXE;,MCOMPILE.EXE;,MUPIP.EXE;,GTM$STOP.EXE;
-SPKITBLD$NEW_MEDIA_FOR_SAVESET_B := N
-SPKITBLD$SAVESET_C := GTM$VRT:[PRO]GTMCOMMANDS.CLD;,GTMZCALL.MLB;,GTMLIB.OLB;,GTMSHR.OLB;,GTM$VRT:[PCT]*.M;,GTM$VRT:[TLS]GTM$DEFAULTS.M64;,GTM$CE.H;,GTM$IVP.TLB;
-SPKITBLD$NEW_MEDIA_FOR_SAVESET_C := N
diff --git a/sr_vvms/gtm_stdio.h b/sr_vvms/gtm_stdio.h
deleted file mode 100644
index 5c5ff07..0000000
--- a/sr_vvms/gtm_stdio.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* gtm_stdio.h - gtm interface to stdio.h */
-
-#ifndef GTM_STDIOH
-#define GTM_STDIOH
-
-/* This header is split between sr_unix and sr_vvms because there are several test system and standalone modules
- * that do not #define UNIX or VMS for us to know which defines to proceed with. So now this split makes
- * that determination unnecessary.
- */
-
-#include <stdio.h>
-
-#define FDOPEN				fdopen
-#define FGETS(strg, n, strm, fgets_res)	(fgets_res = fgets(strg,n,strm))
-#define Fopen				fopen
-#define GETS(buffer, gets_res)		syntax error
-#define PERROR				perror
-#define	POPEN				popen
-#define TEMPNAM				tempnam
-
-#define	DEFAULT_GTM_TMP			P_tmpdir
-#define RENAME				rename
-#define SETVBUF				setvbuf
-
-#define FPRINTF				fprintf
-#define PRINTF				printf
-#define SCANF				scanf
-#define SSCANF				sscanf
-#define SNPRINTF			gtm_snprintf /* hack for VMS, ignore size argument and call sprintf */
-#define VPRINTF(STRING, FORMAT, VALUE, RC)		vsprintf(STRING, FORMAT, VALUE)
-#define VFPRINTF(STREAM, FORMAT, VALUE, RC)		vfprintf(STREAM, FORMAT, VALUE)
-#define VSPRINTF(STRING, FORMAT, VALUE, RC)		vsprintf(STRING, FORMAT, VALUE)
-#define VSNPRINTF(STRING, SIZE, FORMAT, VALUE, RC)	vsnprintf(STRING, SIZE, FORMAT, VALUE)
-#define VSCANF(FORMAT, POINTER, RC)			vscanf(FORMAT, POINTER)
-#define VSSCANF(STRING, FORMAT, POINTER, RC)		vsscanf(STRING, FORMAT, POINTER)
-#define VFSCANF(STREAM, FORMAT, POINTER, RC)		vfscanf(STREAM, FORMAT, POINTER)
-int	gtm_snprintf(char *str, size_t size, const char *format, ...);
-
-#endif
diff --git a/sr_vvms/gtm_utf8.c b/sr_vvms/gtm_utf8.c
deleted file mode 100644
index 9533261..0000000
--- a/sr_vvms/gtm_utf8.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *                                                              *
- *      Copyright 2006 Fidelity Information Services, Inc 	*
- *                                                              *
- *      This source code contains the intellectual property     *
- *      of its copyright holder(s), and is made available       *
- *      under a license.  If you do not know the terms of       *
- *      the license, please stop and do not read further.       *
- *                                                              *
- ****************************************************************/
-
-#include "mdef.h"
-
-/* These are dummy routines to allow code to compile/link on VMS. These routines are not
-   used but elimination of them from the code is detremental to the clarify of the UNIX
-   codebase and since Alpha/VMS is a dead platform, these dummy routines also have a
-   limited lifespan.. 9/2006 SE
-*/
-
-int     utf8_len_strict(unsigned char* ptr, int len)
-{
-	GTMASSERT;
-}
-
-void    utf8_badchar(int len, unsigned char* str, unsigned char *strtop, int chset_len, unsigned char* chset)
-{
-	GTMASSERT;
-}
diff --git a/sr_vvms/gtm_utf8.h b/sr_vvms/gtm_utf8.h
deleted file mode 100644
index 84c9e77..0000000
--- a/sr_vvms/gtm_utf8.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************
- *                                                              *
- *      Copyright 2006 Fidelity Information Services, Inc 	*
- *                                                              *
- *      This source code contains the intellectual property     *
- *      of its copyright holder(s), and is made available       *
- *      under a license.  If you do not know the terms of       *
- *      the license, please stop and do not read further.       *
- *                                                              *
- ****************************************************************/
-
-#ifndef GTM_UTF8_H
-#define GTM_UTF8_H
-
-/* Define types for use by compilation in VMS in code paths that will never be
-   used. This was the preferred method of making the Unicode modified UNIX code
-   work in VMS rather than butchering it with ifdefs making maintenance more
-   difficult. 9/2006 SE
-*/
-
-#define UTF8_VALID(mbptr, ptrend, bytelen) (bytelen = -1, FALSE)
-#define UTF16BE_VALID(mbptr, ptrend, bytelen) (bytelen = -1, FALSE)
-#define UTF16LE_VALID(mbptr, ptrend, bytelen) (bytelen = -1, FALSE)
-#define UTF8_MBFOLLOW(mbptr) (-1)
-#define UTF16BE_MBFOLLOW(mbptr, ptrend) (-1)
-#define UTF16LE_MBFOLLOW(mbptr, ptrend) (-1)
-#define UTF8_WCTOMB(codepoint, mbptr) mbptr
-#define UTF16BE_WCTOMB(codepoint, mbptr) mbptr
-#define UTF16LE_WCTOMB(codepoint, mbptr) mbptr
-#define UTF8_MBTOWC(mbptr, ptrend, codepoint) (-1)
-#define UTF16BE_MBTOWC(mbptr, ptrend, codepoint) (-1)
-#define UTF16LE_MBTOWC(mbptr, ptrend, codepoint) (-1)
-#define U_VALID_CODE(codepoint) (FALSE)
-#define UTF16BE_BOM          '\0'
-#define UTF16BE_BOM_LEN      1
-#define UTF16LE_BOM          '\0'
-#define UTF16LE_BOM_LEN      1
-#define UTF8_BOM             '\0'
-#define UTF8_BOM_LEN         1
-
-#define GTM_MB_LEN_MAX		1	/* VMS does not support unicode so no multiple byte chars */
-
-int	utf8_len_strict(unsigned char* ptr, int len);
-void    utf8_badchar(int len, unsigned char* str, unsigned char *strtop, int chset_len, unsigned char* chset);
-
-#endif /* GTM_UTF8_H */
diff --git a/sr_vvms/gtm_verify_symbols.com b/sr_vvms/gtm_verify_symbols.com
deleted file mode 100644
index 8023f17..0000000
--- a/sr_vvms/gtm_verify_symbols.com
+++ /dev/null
@@ -1,38 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! full build comes through axp_comlist.com which would have done set verify where the more output the merrier
-$! but for incremental invocations of this script, we do not want lots of output spewed so avoid logging in that case.
-$! since we cannot pass a local symbol to the caller, we set a global symbol.
-$!
-$! p1 - "set" or "unset"
-$!
-$ if (p1 .eqs. "set")
-$ then
-$	if f$environment("VERIFY_PROCEDURE")
-$	then
-$		gtm_copy    :== copy/log
-$		gtm_delete  :== delete/log
-$		gtm_library :== library/log
-$		gtm_purge   :== purge/log
-$	else
-$		gtm_copy    :== copy/nolog
-$		gtm_delete  :== delete/nolog
-$		gtm_library :== library/nolog
-$		gtm_purge   :== purge/nolog
-$	endif
-$ else
-$	gtm_del = "delete"	! in case someone has redefined "delete"
-$	gtm_del /symb/glob gtm_copy
-$	gtm_del /symb/glob gtm_delete
-$	gtm_del /symb/glob gtm_library
-$	gtm_del /symb/glob gtm_purge
-$ endif
diff --git a/sr_vvms/gtm_wake.c b/sr_vvms/gtm_wake.c
deleted file mode 100644
index 77efeb0..0000000
--- a/sr_vvms/gtm_wake.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_wake.h"
-
-void gtm_wake(int4 *pidadr,char *prcnam)
-{
-    sys$wake(pidadr, prcnam);
-    return;
-}
diff --git a/sr_vvms/gtmcollect.opt b/sr_vvms/gtmcollect.opt
deleted file mode 100644
index edbf856..0000000
--- a/sr_vvms/gtmcollect.opt
+++ /dev/null
@@ -1,41 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2002 Sanchez Computer Associates, Inc.	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!
-! gtmcollect.opt
-!
-! This is a linker options file which contains cluster commands
-! that set the pfc (page fault cluster size) to 12 for the code
-! section and 20 for the literal constants section.
-!
-! The page fault cluster size is the number of pages which are
-! transferred to memory as the result of a page fault.
-! Normally it is controlled is by a SYSGEN parameter
-! (PFCDEFAULT) for all image sections which do not otherwise
-! specify a PFC.  The default is generally set to 64 pages by
-! AUTOGEN.  64 seems to be a good size for DEC utilities but
-! it is generally significantly larger than optimal for MUMPS
-! programs in GT.M.  You may wish to experiment to find the
-! best size for you image(s).
-!
-! Exact spelling of "gtm$code" and "gtm$literals" is essential
-! as any psect name will be accepted without error.
-!
-! If you wish to use your own options just include the cluster
-! options at the FIRST appropriate opportunity, in your file,
-! and the collect options near the end.
-! Otherwise you may use this as your options file and specify
-! "gtmcollect/option" in the list of files for your link command.
-!
-cluster=code,,12,
-cluster=lits,,20,
-collect=code,gtm$code
-collect=lits,gtm$literals
-!
diff --git a/sr_vvms/gtmcommands.cldx b/sr_vvms/gtmcommands.cldx
deleted file mode 100644
index 3bee5db..0000000
--- a/sr_vvms/gtmcommands.cldx
+++ /dev/null
@@ -1,28 +0,0 @@
-DEFINE VERB MUMPS
-	IMAGE "MCOMPILE"
-	QUALIFIER DIRECT_MODE, SYNTAX=DIRECT_MODE
-	QUALIFIER CROSS_REFERENCE	PLACEMENT=POSITIONAL
-	QUALIFIER DEBUG			PLACEMENT=POSITIONAL
-	QUALIFIER LIST			VALUE(TYPE=$FILE)
-					PLACEMENT=POSITIONAL
-	QUALIFIER MACHINE_CODE		PLACEMENT=POSITIONAL
-	QUALIFIER IGNORE		PLACEMENT=POSITIONAL
-	QUALIFIER LENGTH		VALUE(REQUIRED,TYPE=$NUMBER)
-					PLACEMENT=POSITIONAL
-	QUALIFIER SPACE			VALUE(REQUIRED,TYPE=$NUMBER)
-					PLACEMENT=POSITIONAL
-	QUALIFIER OBJECT		VALUE(TYPE=$FILE)
-					PLACEMENT=POSITIONAL
-	QUALIFIER WARNINGS		PLACEMENT=POSITIONAL
-	QUALIFIER LABELS		VALUE(REQUIRED)
-					PLACEMENT=POSITIONAL
-	QUALIFIER LINE_ENTRY		PLACEMENT=POSITIONAL
-	QUALIFIER INLINE_LITERALS	PLACEMENT=POSITIONAL
-	QUALIFIER ALIGN_STRINGS		PLACEMENT=POSITIONAL
-	QUALIFIER CE_PREPROCESS		VALUE(TYPE=$FILE)
-					PLACEMENT=POSITIONAL
-	PARAMETER P1, LABEL=INFILE,PROMPT="FILE",VALUE(REQUIRED,LIST,TYPE=$FILE)
-DEFINE SYNTAX DIRECT_MODE
-	IMAGE "GTM$DMOD"
-	NOQUALIFIERS
-	NOPARAMETERS
diff --git a/sr_vvms/gtmdc_spkitbld.dat b/sr_vvms/gtmdc_spkitbld.dat
deleted file mode 100644
index 1d1f433..0000000
--- a/sr_vvms/gtmdc_spkitbld.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-SPKITBLD$KITNAME := GTDC60002
-SPKITBLD$REWIND_TAPE := N
-SPKITBLD$AUTOINIT_TAPE := 'GTM_INIT_TAPE'
-SPKITBLD$SKIP_FIRST_TAPE_READY_PROMPT := Y
-SPKITBLD$SKIP_FIRST_DISK_READY_PROMPT := Y
-SPKITBLD$SAVESET_A :=GTM$VRT:[TDC]KITINSTAL.COM;,GTMDCKITHLP.COM;,GTM$VRT:[PRO]DBCERTIFY.EXE;,GTM$VRT:[SRC]V5CBSU.M;
diff --git a/sr_vvms/gtmdckithlp.com b/sr_vvms/gtmdckithlp.com
deleted file mode 100644
index eff0f6d..0000000
--- a/sr_vvms/gtmdckithlp.com
+++ /dev/null
@@ -1,94 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2005 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!      HELP TEXT PROCESSING FOR GT.M DBCERTIFY utility KITINSTAL.COM
-$ IF F$EXTRACT(0,5,P1) .EQS. "HELP_" THEN GOTO 'P1'
-$ EXIT VMI$_UNSUPPORTED
-$HELP_PURGE:
-$ TYPE SYS$INPUT
-
-  If the GT.M DBCERTIFY utility is previously installed, there is no reason to
-  keep older versions of the software online, unless you wish to test before
-  purging.
-
-$ EXIT
-$HELP_STD_CNF:
-$ TYPE SYS$INPUT
-  The standard configuration performs the following:
-
-   *  Places files in SYS$COMMON:[GTMDBCERTIFY] with SYSTEM as owner.
-   *  Copies two GT.M DBCERTIFY utility command procedures to the
-      above directory and SYS$MANAGER:.
-   *  Uses the existing GT.M distribution from GTM$DIST:.
-   *  Builds V5CBSU.EXE using the GT.M from GTM$DIST:.
-
-  If the SYSTEM id is not set up, the installation will use [1,4].
-
-$ EXIT
-$HELP_DST_OWN:
-$ TYPE SYS$INPUT
-  Provide a UIC, normally SYSTEM, to own the files in the GT.M DBCERTIFY utility
-  distribution.  The UIC can be a name, a group name and a user name separated
-  by a comma,  or a pair of octal codes separated by a comma which specify
-  group and user.
-
-$ EXIT
-$HELP_SYS_DST:
-$ TYPE SYS$INPUT
-  Usual practice is to place a system component such as the GT.M DBCERTIFY
-  utility on the system disk.  If you have severe space constraints, you may
-  need to use another volume.
-
-$ EXIT
-$HELP_SYS_DIR:
-$ TYPE SYS$INPUT
-  This directory  becomes a sub-directory of  SYS$COMMON  and   holds   the
-  distribution.   If it does not  exist,  the installation creates it  with
-  WORLD=RE access.   If you  are  not  concerned with  mixing software from
-  different vendors, you may wish to use SYSLIB.
-
-$ EXIT
-$HELP_DST_DEV:
-$ TYPE SYS$INPUT
-  The disk must be mounted,  on-line and  have  adequate  space  to  hold  the
-  GT.M DBCERTIFY utility distribution. The disk name may be physical or logical.
-
-$ EXIT
-$HELP_DST_DIR:
-$ TYPE SYS$INPUT
-  This  directory  holds  the  distribution.    If  it  does  not  exist,  the
-  installation creates it with WORLD=RE access.
-
-$ EXIT
-$HELP_GTM_LOG:
-$ TYPE SYS$INPUT
-  The GT.M DBCERTIFY utility invokes utilities from the existing GT.M
-  distribution.  The location of the distribution may be specified as
-  a logical name or as device:[directory].  GTM$DIST is the default.
-
-$ EXIT
-$HELP_RUN_IVP:
-$ TYPE SYS$INPUT
-  This installation kit does not contain an installation verification
-  procedure  (IVP) which you can run as part of the installation to
-  verify the  correctness  of the software.
-
-$ EXIT
-$HELP_BLD_EXE:
-$ TYPE SYS$INPUT
-  The executable for V5CBSU must be built before the existing databases
-  can be prepared for upgrade for use with the new GT.M version.  This is
-  done using the GTMDCBUILD.COM procedure created by this installation.
-  Answering yes to this question will invoke this procedure at the end
-  of this installation.
-
-$ EXIT
diff --git a/sr_vvms/gtmdckitinstal.com b/sr_vvms/gtmdckitinstal.com
deleted file mode 100644
index c640519..0000000
--- a/sr_vvms/gtmdckitinstal.com
+++ /dev/null
@@ -1,229 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2005, 2010 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!	KITINSTAL.COM PROCEDURE FOR THE GT.M DBCERTIFY UTILITY
-$!
-$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y
-$! ON WARNING THEN EXIT $STATUS		!! allow warning on install replace
-$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL
-$ IF P1 .EQS. "VMI$_POSTINSTALL" THEN GOTO POSTINSTALL
-$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP
-$ EXIT VMI$_UNSUPPORTED
-$!
-$INSTALL:
-$ TYPE SYS$INPUT
-
-GT.M DBCERTIFY  (c)  COPYRIGHT 2005  by  Fidelity Information Services, Inc
-                           ALL RIGHTS RESERVED
-
-$!  the following 2 lines must be maintained
-$ GTMDC$VMS_VERSION :== 072	! Minimum VMS version required
-$ GTMDC$DISK_SPACE == 840	! Minumum disk space on system disk required for install (2x result)
-$ IF F$ELEMENT(0,",",VMI$VMS_VERSION) .EQS. "RELEASED"
-$  THEN
-$   GTMDC$VMS_IS == F$ELEMENT(1,",",VMI$VMS_VERSION)
-$   IF GTMDC$VMS_IS .LTS. GTMDC$VMS_VERSION
-$    THEN
-$     VMI$CALLBACK MESSAGE E VMSMISMATCH "This GT.M DBCERTIFY utility kit requires an existing VMS''GTMDC$VMS_VERSION' system."
-$     EXIT VMI$_FAILURE
-$   ENDIF
-$  ELSE
-$   GTMDC$VMS_IS :==
-$   WRITE SYS$OUTPUT "  No VMS version checking performed for field test versions."
-$ ENDIF
-$ IF (GTMDC$VMS_IS .GES. "052") THEN T1 = F$VERIFY(VMI$KIT_DEBUG)
-$ VMI$CALLBACK CHECK_NET_UTILIZATION GTMDC$ROOM 'GTMDC$DISK_SPACE'
-$ IF .NOT. GTMDC$ROOM
-$  THEN
-$   VMI$CALLBACK MESSAGE E NOSPACE "There is not enough disk space -- GT.M DBCERTIFY utility kit needs ''GTMDC$DISK_SPACE' blocks."
-$   EXIT VMI$_FAILURE
-$ ENDIF
-$!  setup default answers
-$ GTMDC$DOPURGE :== YES
-$ GTMDC$RUN_IVP == 0	!! should be "YES", but no IVP yet
-$ GTMDC$BLD_EXE :== YES	!! build V5CBSU.EXE in postinstall
-$ GTMDC$STD_CNF :== YES
-$ GTMDC$DST_OWN :== SYSTEM
-$ IF F$IDENTIFIER(GTMDC$DST_OWN,"NAME_TO_NUMBER") .EQ. 0 THEN GTMDC$DST_OWN :== 1,4
-$ GTMDC$SYS_DST :== YES
-$ GTMDC$DST_DIR :== GTMDBCERTIFY
-$ GTMDC$DST_CRE == GTMDC$DST_DIR
-$ GTMDC$DST_DEV :==
-$ GTMDC$MGR_COM :== YES
-$ GTMDC$GTM_LOG :== GTM$DIST:
-$!
-$ VMI$CALLBACK ASK GTMDC$DOPURGE "Do you want to purge files replaced by this installation" 'GTMDC$DOPURGE' B -
-  "@VMI$KWD:GTMDCKITHLP HELP_PURGE"
-$ IF .NOT. GTMDC$DOPURGE THEN VMI$CALLBACK SET PURGE NO
-$ VMI$CALLBACK ASK GTMDC$STD_CNF "Do you want the standard GT.M DBCERTIFY utility configuration" 'GTMDC$STD_CNF' B -
-  "@VMI$KWD:GTMDCKITHLP HELP_STD_CNF"
-$ IF GTMDC$STD_CNF
-$  THEN
-$   GTMDC$SYS_DST == 1
-$   GTMDC$MGR_COM == 1
-$   GTMDC$DST_LOG :== SYS$COMMON:['GTMDC$DST_DIR']
-$   GTMDC$DIR_TYPE :== COMMON
-$   GTMDC$GTM_LOG :== GTM$DIST:
-$   GTMDC$RUN_IVP == 0	!! no IVP yet
-$  ELSE ! not standard configuration
-$   VMI$CALLBACK ASK GTMDC$DST_OWN "What UIC should own the GT.M DBCERTIFY utility distribution" 'GTMDC$DST_OWN' S -
-    "@VMI$KWD:GTMDCKITHLP HELP_DST_OWN"
-$   GTMDC$DST_OWN == GTMDC$DST_OWN - "[" - "]"
-$   VMI$CALLBACK ASK GTMDC$SYS_DST "Do you want the GT.M DBCERTIFY utility distribution to go into a System Directory" -
-    'GTMDC$SYS_DST' B "@VMI$KWD:GTMDCKITHLP HELP_SYS_DST"
-$   IF GTMDC$SYS_DST
-$    THEN
-$     VMI$CALLBACK ASK GTMDC$DST_DIR "In what System Directory do you want to place GT.M DBCERTIFY utility" 'GTMDC$DST_DIR' S -
-      "@VMI$KWD:GTMDCKITHLP HELP_SYS_DIR"
-$     GTMDC$DST_DIR == GTMDC$DST_DIR - "[" - "]"
-$     GTMDC$DST_CRE == GTMDC$DST_DIR
-$     GTMDC$DST_LOG :== SYS$COMMON:['GTMDC$DST_DIR']
-$     GTMDC$DIR_TYPE :== COMMON
-$    ELSE ! not system disk
-$     GTMDC$MGR_COM == 0
-$     VMI$CALLBACK ASK GTMDC$DST_DEV "On which device do you want to place the GT.M DBCERTIFY utility" "" S -
-      "@VMI$KWD:GTMDCKITHLP HELP_DST_DEV"
-$     VMI$CALLBACK ASK GTMDC$DST_DIR "In what directory on that device do you want to place the GT.M DBCERTIFY utility" -
-      'GTMDC$DST_DIR' S "@VMI$KWD:GTMDCKITHLP HELP_DST_DIR"
-$     GTMDC$DST_DEV == GTMDC$DST_DEV - ":"
-$     GTMDC$DST_DIR == GTMDC$DST_DIR - "[" - "]"
-$     GTMDC$DST_LOG :== 'GTMDC$DST_DEV':['GTMDC$DST_DIR']
-$     GTMDC$DST_CRE == GTMDC$DST_LOG
-$     GTMDC$DIR_TYPE :== USER
-$     VMI$CALLBACK ASK GTMDC$GTM_LOG "Where is the existing GT.M distribution located" -
-      'GTMDC$GTM_LOG' S "@VMI$KWD:GTMDCKITHLP HELP_GTM_LOG"
-$     IF F$LOCATE(":", GTMDC$GTM_LOG) .NE. F$LENGTH(GTMDC$GTM_LOG) .AND. -
-         F$LOCATE("]", GTMDC$GTM_LOG) .NE. F$LENGTH(GTMDC$GTM_LOG)
-$     THEN
-$          GTMDC$GTM_LOG :== 'GTMDC$GTM_LOG':
-$     ENDIF
-$   ENDIF ! system disk
-$   VMI$CALLBACK ASK GTMDC$BLD_EXE "Do you want to build V5CBSU.EXE now" 'GTMDC$BLD_EXE' B -
-    "@VMI$KWD:GTMDCKITHLP HELP_BLD_EXE"
-$!! no IVP yet
-$   IF FALSE THEN VMI$CALLBACK ASK GTMDC$RUN_IVP "Do you want to run the IVP (requires GT.M)" 'GTMDC$RUN_IVP' B -
-    "@VMI$KWD:GTMDCKITHLP HELP_RUN_IVP"
-$ ENDIF ! standard configuration
-$ IF GTMDC$MGR_COM
-$  THEN
-$   WRITE SYS$OUTPUT "  The following command files are created and copied to SYS$MANAGER:"
-$  ELSE
-$   WRITE SYS$OUTPUT "  The following command files are created:"
-$ ENDIF
-$ TYPE SYS$INPUT
-
-        GTMDCBUILD.COM
-        GTMDCDEFINE.COM
-
-  Each file contains its own user documentation.
-
-  All the questions have been asked. Installation now proceeds without your
-  manual intervention for about 5-10 minutes.
-$ WRITE SYS$OUTPUT ""
-$ VMI$CALLBACK CREATE_DIRECTORY 'GTMDC$DIR_TYPE' 'GTMDC$DST_CRE' "/OWNER_UIC=[''GTMDC$DST_OWN'] /PROTECTION=(WO:RE)"
-$ VMI$CALLBACK MESSAGE I CRECOM "Creating command files."
-$!  Create GTMDCBUILD.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMDCBUILD.COM
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!                                                              !"
-$ WRITE OUFILE "$!      Copyright 2005, 2010 Fidelity Information Services, Inc !"
-$ WRITE OUFILE "$!                                                              !"
-$ WRITE OUFILE "$!      This source code contains the intellectual property     !"
-$ WRITE OUFILE "$!      of its copyright holder(s), and is made available       !"
-$ WRITE OUFILE "$!      under a license.  If you do not know the terms of       !"
-$ WRITE OUFILE "$!      the license, please stop and do not read further.       !"
-$ WRITE OUFILE "$!                                                              !"
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMDCBUILD.COM builds V5CBSU.EXE from V5CBSU.M."
-$ WRITE OUFILE "$!	It calls GTMLOGIN.COM to setup the existing GT.M environment"
-$ WRITE OUFILE "$!	 then compiles and links V5CBSU."
-$ WRITE OUFILE "$! "
-$ WRITE OUFILE "$ @''GTMDC$GTM_LOG'GTMLOGIN"
-$ WRITE OUFILE "$ SET DEFAULT ''GTMDC$DST_LOG'"
-$ WRITE OUFILE "$ SET NOON"
-$ WRITE OUFILE "$ MUMPS V5CBSU"
-$ WRITE OUFILE "$ IF $STATUS THEN LINK V5CBSU,''GTMDC$GTM_LOG'_DH,''GTMDC$GTM_LOG'_EXP,''GTMDC$GTM_LOG'_UCASE"
-$ WRITE OUFILE "$! "
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTMDCDEFINE.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMDCDEFINE.COM
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!                                                              !"
-$ WRITE OUFILE "$!      Copyright 2005, 2010 Fidelity Information Services, Inc       !"
-$ WRITE OUFILE "$!                                                              !"
-$ WRITE OUFILE "$!      This source code contains the intellectual property     !"
-$ WRITE OUFILE "$!      of its copyright holder(s), and is made available       !"
-$ WRITE OUFILE "$!      under a license.  If you do not know the terms of       !"
-$ WRITE OUFILE "$!      the license, please stop and do not read further.       !"
-$ WRITE OUFILE "$!                                                              !"
-$ WRITE OUFILE "$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMDCDEFINE.COM defines symbols for DBCERTIFY.EXE and V5CBSU.EXE."
-$ WRITE OUFILE "$!	It calls GTMLOGIN.COM to setup the existing GT.M environment"
-$ WRITE OUFILE "$!	 then defines the symbols."
-$ WRITE OUFILE "$! "
-$ WRITE OUFILE "$ @''GTMDC$GTM_LOG'GTMLOGIN"
-$ WRITE OUFILE "$ DBCERTIFY:==$''GTMDC$DST_LOG'DBCERTIFY.EXE"
-$ WRITE OUFILE "$ V5CBSU:==$''GTMDC$DST_LOG'V5CBSU.EXE"
-$ WRITE OUFILE "$! "
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$ VMI$CALLBACK MESSAGE I PREINS "Preparing files for installation."
-$!  GTMDCFILES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTMDCFILES.KIT
-$ IF GTMDC$MGR_COM
-$  THEN
-$   WRITE OUFILE "GTMDC$ GTMDCBUILD.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTMDC$ GTMDCDEFINE.COM VMI$ROOT:[SYSMGR] C"
-$ ENDIF
-$ WRITE OUFILE "GTMDC$ GTMDCBUILD.COM ''GTMDC$DST_LOG'"
-$ WRITE OUFILE "GTMDC$ GTMDCDEFINE.COM ''GTMDC$DST_LOG'"
-$ WRITE OUFILE "GTMDC$ V5CBSU.M ''GTMDC$DST_LOG'"
-$ CLOSE OUFILE
-$!  GTMDCIMAGES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTMDCIMAGES.KIT
-$ WRITE OUFILE "GTMDC$ DBCERTIFY.EXE ''GTMDC$DST_LOG'"
-$ CLOSE OUFILE
-$!  Provide with file.KITs
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTMDCFILES.KIT "" T
-$ VMI$CALLBACK PROVIDE_IMAGE "" VMI$KWD:GTMDCIMAGES.KIT "" T
-$ VMI$CALLBACK MESSAGE I FININS "Finalizing the installation."
-$ IF GTMDC$BLD_EXE THEN VMI$CALLBACK SET POSTINSTALL YES
-$ EXIT VMI$_SUCCESS
-$!
-$POSTINSTALL:
-$!
-$ TYPE SYS$INPUT
-
-  Building V5CBSU.EXE
-
-$ SET ON
-$ ON CONTROL_Y THEN EXIT VMI$_FAILURE
-$ IF GTMDC$MGR_COM
-$  THEN
-$   T1 := SYS$MANAGER:
-$  ELSE
-$   T1 = GTMDC$DST_LOG
-$ ENDIF
-$ @'T1'GTMDCBUILD
-$ ON CONTROL_Y THEN EXIT VMI$_FAILURE
-$ EXIT VMI$_SUCCESS
-$!
-$IVP:
-$!	The real Installation Verification Procedure.
-$ TYPE SYS$INPUT
-
-  There is no GT.M DBCERTIFY utility Installation Verification Procedure
-
-$ EXIT $STATUS
diff --git a/sr_vvms/gtmfi_spkitbld.dat b/sr_vvms/gtmfi_spkitbld.dat
deleted file mode 100644
index bc0d068..0000000
--- a/sr_vvms/gtmfi_spkitbld.dat
+++ /dev/null
@@ -1,6 +0,0 @@
-SPKITBLD$KITNAME := GTFI60002
-SPKITBLD$REWIND_TAPE := N
-SPKITBLD$AUTOINIT_TAPE := 'GTM_INIT_TAPE'
-SPKITBLD$SKIP_FIRST_TAPE_READY_PROMPT := Y
-SPKITBLD$SKIP_FIRST_DISK_READY_PROMPT := Y
-SPKITBLD$SAVESET_A :=GTM$VRT:[TFI]KITINSTAL.COM;,GTMFIKITHLP.COM;,GTM$VRT:[PRO]IBI_XFM.EXE;
diff --git a/sr_vvms/gtmfikithlp.com b/sr_vvms/gtmfikithlp.com
deleted file mode 100644
index b7d1875..0000000
--- a/sr_vvms/gtmfikithlp.com
+++ /dev/null
@@ -1,131 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!      HELP TEXT PROCESSING FOR GT.M FOCUS INTERFACE KITINSTAL.COM
-$!      COPYRIGHT 1989 - 2000 Sanchez Computer Associates
-$ IF F$EXTRACT(0,5,P1) .EQS. "HELP_" THEN GOTO 'P1'
-$ EXIT VMI$_UNSUPPORTED
-$HELP_PURGE:
-$ TYPE SYS$INPUT
-
-  If the GT.M FOCUS interface is previously installed, there is no  reason  to
-  keep older versions of the software online, unless you wish to  test  before
-  purging.
-
-$ EXIT
-$HELP_STD_CNF:
-$ TYPE SYS$INPUT
-  The standard configuration performs the following:
-
-   *  Places files in SYS$COMMON:[GTM_DIST] with SYSTEM as owner.
-   *  Defines the DSM_API logical name.
-   *  Defines the logical name GTMAPI$FCS$nod to GTM$DIST:FOCUS.GLD, where nod
-      is the first three characters of the node name.  This makes a connection
-      between a UCI of FCS and a volumeset of nod and the FOCUS.GLD.
-   *  Copies the GT.M FOCUS interface command procedure to SYS$MANAGER.
-   *  Adds GTMFISTART.COM to the system startup database.
-   *  Sets up the GT.M FOCUS interface at the end of the installation.
-
-  If the SYSTEM id is not set up, the installation will use [1,4].
-
-$ EXIT
-$HELP_DST_OWN:
-$ TYPE SYS$INPUT
-  Provide a UIC, normally SYSTEM, to own the files in the GT.M FOCUS interface
-  distribution.  The UIC can be a name, a group name and a user name separated
-  by a comma,  or a pair of octal codes separated by  a  comma  which  specify
-  group and user.
-
-$ EXIT
-$HELP_SYS_DST:
-$ TYPE SYS$INPUT
-  Usual practice is  to  place  a  system  component  such  as  the GT.M FOCUS
-  interface on the system disk.  If you have severe space constraints, you may
-  need to use another volume.
-
-$ EXIT
-$HELP_SYS_DIR:
-$ TYPE SYS$INPUT
-  This directory  becomes be a sub-directory of  SYS$COMMON  and   holds   the
-  distribution.   If it does not  exist,  the  installation  creates  it  with
-  WORLD=RE access.   If you  are  not  concerned  with  mixing  software  from
-  different vendors, you may wish to use SYSLIB.
-
-$ EXIT
-$HELP_DST_DEV:
-$ TYPE SYS$INPUT
-  The disk must be mounted,  on-line and  have  adequate  space  to  hold  the
-  GT.M FOCUS interface distribution. The disk name may be physical or logical.
-
-$ EXIT
-$HELP_DST_DIR:
-$ TYPE SYS$INPUT
-  This  directory  holds  the  distribution.    If  it  does  not  exist,  the
-  installation creates it with WORLD=RE access.
-
-$ EXIT
-$HELP_GBLDIR:
-$ TYPE SYS$INPUT
-  The GT.M FOCUS interface requires one or more Global Directories in order to
-  find the appropriate database files.   Each Global Directory  is  associated
-  with  a  "UCI"  "Volume-set"  pair  by  a  logical  name  in  the  form   of
-  GTMAPI$uci$vol where uci and vol are each 3  characters  long.    GTMFISTART
-  will define these logical names for you if you provide it with a list in the
-  form uci*vol*global-directory as P1.   GTMFISTART defaults this  list  to  a
-  single element where vol is the first three characters of the node-name, and
-  the uci and global directory are selected during the installation.  Remember
-  that  if  the  global  directory file-specification contains a logical name,
-  the logical must be accessible to a detached process.
-
-$ EXIT
-$HELP_UCI_NAME:
-$ TYPE SYS$INPUT
-  The GT.M FOCUS interface requires one or more Global Directories in order to
-  find the appropriate database files.   Each Global Directory  is  associated
-  with  a  "UCI"  "Volume-set"  pair  by  a  logical  name  in  the  form   of
-  GTMAPI$uci$vol where uci and vol are each 3  characters  long.    GTMFISTART
-  will define these logical names for you if you provide it with a list in the
-  form uci*vol*global-directory as P1.   GTMFISTART defaults  this  list to  a
-  single element where vol is the first three characters of the node-name, and
-  the uci and global directory are selected during the installation.
-
-$ EXIT
-$HELP_STARTDB:
-$ TYPE SYS$INPUT
-  Answering yes  causes  the  installation  to  place  GTMFISTART.COM  in  the
-  startup database so the system startup automatically sets up the  GT.M FOCUS
-  interface whenever the system boots.
-
-$ EXIT
-$HELP_MGR_COM:
-$ TYPE SYS$INPUT
-  You may prevent the installation from moving the .COM files to  SYS$MANAGER.
-  Copying the command  procedures  to  SYS$MANAGER  allows  system startup to
-  access them  through  the  VMS  startup  database  and generally simplifies
-  operations.  However, if you wish to have multiple versions of GT.M on your
-  system at the same time, you would not have multiple copies of the  command
-  procedures in SYS$MANAGER.
-
-$ EXIT
-$HELP_RUN_IVP:
-$ TYPE SYS$INPUT
-  This installation kit contains an installation verification procedure  (IVP)
-  which you can run as part of the installation to verify the  correctness  of
-  the software.   Note that if you choose this option, the  GT.M  images  must
-  already be installed.
-
-$ EXIT
-$HELP_START_GTMFI:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to set up the GT.M FOCUS interface.
-
-$ EXIT
diff --git a/sr_vvms/gtmfikitinstal.com b/sr_vvms/gtmfikitinstal.com
deleted file mode 100644
index de07201..0000000
--- a/sr_vvms/gtmfikitinstal.com
+++ /dev/null
@@ -1,239 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!	KITINSTAL.COM PROCEDURE FOR THE GT.M FOCUS INTERFACE
-$!
-$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y
-$! ON WARNING THEN EXIT $STATUS		!! allow warning on install replace
-$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL
-$ IF P1 .EQS. "VMI$_POSTINSTALL" THEN GOTO POSTINSTALL
-$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP
-$ EXIT VMI$_UNSUPPORTED
-$!
-$INSTALL:
-$ TYPE SYS$INPUT
-
-GT.M FOCUS INTERFACE  (c)  COPYRIGHT 1991-2000  by  Sanchez Computer Associates
-                           ALL RIGHTS RESERVED
-
-$!  the following 2 lines must be maintained
-$ GTMFI$VMS_VERSION :== 072	! Minimum VMS version required
-$ GTMFI$DISK_SPACE == 400	! Minumum disk space on system disk required for install (2x result)
-$ IF F$ELEMENT(0,",",VMI$VMS_VERSION) .EQS. "RELEASED"
-$  THEN
-$   GTMFI$VMS_IS == F$ELEMENT(1,",",VMI$VMS_VERSION)
-$   IF GTMFI$VMS_IS .LTS. GTMFI$VMS_VERSION
-$    THEN
-$     VMI$CALLBACK MESSAGE E VMSMISMATCH "This GT.M FOCUS interface kit requires an existing VMS''GTMFI$VMS_VERSION' system."
-$     EXIT VMI$_FAILURE
-$   ENDIF
-$  ELSE
-$   GTMFI$VMS_IS :==
-$   WRITE SYS$OUTPUT "  No VMS version checking performed for field test versions."
-$ ENDIF
-$ IF (GTMFI$VMS_IS .GES. "052") THEN T1 = F$VERIFY(VMI$KIT_DEBUG)
-$ VMI$CALLBACK CHECK_NET_UTILIZATION GTMFI$ROOM 'GTMFI$DISK_SPACE'
-$ IF .NOT. GTMFI$ROOM
-$  THEN
-$   VMI$CALLBACK MESSAGE E NOSPACE "There is not enough disk space -- GT.M FOCUS interface needs ''GTMFI$DISK_SPACE' blocks."
-$   EXIT VMI$_FAILURE
-$ ENDIF
-$!  setup default answers
-$ GTMFI$DOPURGE :== YES
-$ GTMFI$RUN_IVP == 0	!! should be "YES", but no IVP yet
-$ GTMFI$STD_CNF :== YES
-$ GTMFI$DST_OWN :== SYSTEM
-$ IF F$IDENTIFIER(GTMFI$DST_OWN,"NAME_TO_NUMBER") .EQ. 0 THEN GTMFI$DST_OWN :== 1,4
-$ GTMFI$SYS_DST :== YES
-$ GTMFI$DST_DIR :== GTM_DIST
-$ GTMFI$DST_CRE == GTMFI$DST_DIR
-$ GTMFI$DST_DEV :==
-$ GTMFI$STARTDB :== YES
-$ GTMFI$MGR_COM :== YES
-$ GTMFI$START_GTMFI :== YES
-$ GTMFI$UCI_NAME :== FCS
-$!
-$ VMI$CALLBACK ASK GTMFI$DOPURGE "Do you want to purge files replaced by this installation" 'GTMFI$DOPURGE' B -
-  "@VMI$KWD:GTMFIKITHLP HELP_PURGE"
-$ IF .NOT. GTMFI$DOPURGE THEN VMI$CALLBACK SET PURGE NO
-$ VMI$CALLBACK ASK GTMFI$STD_CNF "Do you want the standard GT.M FOCUS interface configuration" 'GTMFI$STD_CNF' B -
-  "@VMI$KWD:GTMFIKITHLP HELP_STD_CNF"
-$ IF GTMFI$STD_CNF
-$  THEN
-$   GTMFI$SYS_DST == 1
-$   GTMFI$STARTDB == 1
-$   GTMFI$MGR_COM == 1
-$   GTMFI$START_GTMFI == 1
-$   GTMFI$DST_LOG :== SYS$COMMON:['GTMFI$DST_DIR']
-$   GTMFI$DIR_TYPE :== SYSTEM
-$   GTMFI$GBLDIR == GTMFI$DST_LOG + "FOCUS.GLD"
-$   GTMFI$RUN_IVP == 0	!! no IVP yet
-$  ELSE ! not standard configuration
-$   VMI$CALLBACK ASK GTMFI$DST_OWN "What UIC should own the GT.M FOCUS interface distribution" 'GTMFI$DST_OWN' S -
-    "@VMI$KWD:GTMFIKITHLP HELP_DST_OWN"
-$   GTMFI$DST_OWN == GTMFI$DST_OWN - "[" - "]"
-$   VMI$CALLBACK ASK GTMFI$SYS_DST "Do you want the GT.M FOCUS interface distribution to go into a System Directory" -
-    'GTMFI$SYS_DST' B "@VMI$KWD:GTMFIKITHLP HELP_SYS_DST"
-$   IF GTMFI$SYS_DST
-$    THEN
-$     VMI$CALLBACK ASK GTMFI$DST_DIR "In what System Directory do you want to place GT.M FOCUS interface" 'GTMFI$DST_DIR' S -
-      "@VMI$KWD:GTMFIKITHLP HELP_SYS_DIR"
-$     GTMFI$DST_DIR == GTMFI$DST_DIR - "[" - "]"
-$     GTMFI$DST_CRE == GTMFI$DST_DIR
-$     GTMFI$DST_LOG :== SYS$COMMON:['GTMFI$DST_DIR']
-$     GTMFI$DIR_TYPE :== SYSTEM
-$     GTMFI$GBLDIR == GTMFI$DST_LOG + "FOCUS.GLD"
-$    ELSE ! not system disk
-$     VMI$CALLBACK ASK GTMFI$DST_DEV "On which device do you want to place the GT.M FOCUS interface" "''GTMFI$DST_DEV'" S -
-      "@VMI$KWD:GTMFIKITHLP HELP_DST_DEV"
-$     VMI$CALLBACK ASK GTMFI$DST_DIR "In what directory on that device do you want to place the GT.M FOCUS interface" -
-      'GTMFI$DST_DIR' S "@VMI$KWD:GTMFIKITHLP HELP_DST_DIR"
-$     GTMFI$DST_DEV == GTMFI$DST_DEV - ":"
-$     GTMFI$DST_DIR == GTMFI$DST_DIR - "[" - "]"
-$     GTMFI$DST_LOG :== 'GTMFI$DST_DEV':['GTMFI$DST_DIR']
-$     GTMFI$DST_CRE == GTMFI$DST_LOG
-$     GTMFI$DIR_TYPE :== USER
-$     GTMFI$GBLDIR == GTMFI$DST_LOG + "FOCUS.GLD"
-$   ENDIF ! system disk
-$   VMI$CALLBACK ASK GTMFI$LM_FILE "What do you want to call the configuration database file" 'GTMFI$LM_FILE' S -
-    "@VMI$KWD:GTMFIKITHLP HELP_LM_FILE"
-$   VMI$CALLBACK ASK GTMFI$GBLDIR "What file do you want as the global directory for the GT.M FOCUS interface" 'GTMFI$GBLDIR' S -
-    "@VMI$KWD:GTMFIKITHLP HELP_GBLDIR"
-$   VMI$CALLBACK ASK GTMFI$UCI_NAME "What ""UCI"" do you want to assign to the GT.M FOCUS interface" 'GTMFI$UCI_NAME' S -
-    "@VMI$KWD:GTMFIKITHLP HELP_UCI_NAME"
-$   VMI$CALLBACK ASK GTMFI$STARTDB "Do you want GTMFISTART.COM in the startup database" 'GTMFI$STARTDB' B -
-    "@VMI$KWD:GTMFIKITHLP HELP_STARTDB"
-$   IF .NOT. GTMFI$STARTDB
-$    THEN
-$     VMI$CALLBACK ASK GTMFI$MGR_COM "Do you want the GTMFISTART.COM file in SYS$MANAGER" 'GTMFI$MGR_COM' B -
-      "@VMI$KWD:GTMFIKITHLP HELP_MGR_COM"
-$   ENDIF
-$!! no IVP yet
-$   IF FALSE THEN VMI$CALLBACK ASK GTMFI$RUN_IVP "Do you want to run the IVP (requires GT.M)" 'GTMFI$RUN_IVP' B -
-    "@VMI$KWD:GTMFIKITHLP HELP_RUN_IVP"
-$   IF GTMFI$RUN_IVP
-$    THEN
-$     GTMFI$START_GTMFI == 1
-$    ELSE
-$     VMI$CALLBACK ASK GTMFI$START_GTMFI "Do you want to set up the GT.M FOCUS interface now" 'GTMFI$START_GTMFI' B -
-      "@VMI$KWD:GTMFIKITHLP HELP_START_GTMFI"
-$   ENDIF
-$ ENDIF ! standard configuration
-$ IF GTMFI$MGR_COM
-$  THEN
-$   WRITE SYS$OUTPUT "  The following command file is created and copied to SYS$MANAGER:"
-$  ELSE
-$   WRITE SYS$OUTPUT "  The following command file is created:"
-$ ENDIF
-$ TYPE SYS$INPUT
-
-        GTMFISTART.COM
-
-  The file contains its own user documentation.
-
-  All the questions have been asked. Installation now proceeds without your
-  manual intervention for about 5-10 minutes.
-$ IF GTMFI$RUN_IVP THEN WRITE SYS$OUTPUT "  Finally the installation verification procedure tests the installation."
-$ WRITE SYS$OUTPUT ""
-$!! When VMS 5.2 is required, the following line should be removed in favor of changing all GTMFI$DIR_TYPE :== SYSTEM to :== COMMON
-$ IF (GTMFI$VMS_IS .GES. "052") .AND. (GTMFI$DIR_TYPE .EQS. "SYSTEM") THEN GTMFI$DIR_TYPE :== COMMON
-$ VMI$CALLBACK CREATE_DIRECTORY 'GTMFI$DIR_TYPE' 'GTMFI$DST_CRE' "/OWNER_UIC=[''GTMFI$DST_OWN'] /PROTECTION=(WO:RE)"
-$ VMI$CALLBACK MESSAGE I CRECOM "Creating command files."
-$!  Create GTMFISTART.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMFISTART.COM
-$ WRITE OUFILE "$!	GTMFISTART.COM provides GT.M FOCUS interface for a node."
-$ WRITE OUFILE "$!	It defines the IBI_XFM logical name, and the logical names"
-$ WRITE OUFILE "$!	 relating UCIs and Volumesets to global directories the interface."
-$ WRITE OUFILE "$!	The invoking user requires the SYSNAM privilege."
-$ WRITE OUFILE "$!	P1 is a list of volume-set, UCI, file-specification triples, where "
-$ WRITE OUFILE "$!       the 3 parts are separated by asterisks (*) and the list is separated "
-$ WRITE OUFILE "$!       by commas.  The volume-set and UCI must be 3 character names, and "
-$ WRITE OUFILE "$!       the file-specification may be a logical name.  This defaults to a "
-$ WRITE OUFILE "$!       single triple consisting of the 1st 3 characters of the node name,"
-$ WRITE OUFILE "$!       the literal FCS and GTM$DIST:FOCUS.GLD.  e.g., if P1 is"
-$ WRITE OUFILE "$!       null for node MIKE - MIK*FCS*GTM$DIST:FOCUS.GLD."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(""TMPMBX"")"
-$ WRITE OUFILE "$ ON CONTROL_C THEN GOTO ERROR"
-$ WRITE OUFILE "$ ON ERROR THEN GOTO ERROR"
-$ WRITE OUFILE "$ CURPRV=F$SETPRV(""SYSNAM"")+"",""+CURPRV"
-$ WRITE OUFILE "$ IF F$PRIVILEGE(""SYSNAM"")"
-$ WRITE OUFILE "$  THEN"
-$ WRITE OUFILE "$   DEFINE /SYSTEM IBI_XFM ''GTMFI$DST_LOG'IBI_XFM.EXE"
-$ WRITE OUFILE "$   P1 = F$EDIT(P1,""COLLAPSE"")"
-$ WRITE OUFILE "$   IF P1 .EQS. """" "
-$ WRITE OUFILE "$    THEN"
-$ WRITE OUFILE "$     P1=F$EXTRACT(0,3,F$EDIT(F$GETSYI(""SCSNODE""),""TRIM"") + ""___"") + ""*''GTMFI$UCI_NAME'*''GTMFI$GBLDIR'"""
-$ WRITE OUFILE "$   ENDIF"
-$ WRITE OUFILE "$   N = 0"
-$ WRITE OUFILE "$   GOSUB UCI"
-$ WRITE OUFILE "$ ENDIF"
-$ WRITE OUFILE "$ERROR:"
-$ WRITE OUFILE "$ CURPRV = F$SETPRV(CURPRV)"
-$ WRITE OUFILE "$ EXIT"
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$UCI:"
-$ WRITE OUFILE "$ T1 = F$ELEMENT(N,"","",P1)"
-$ WRITE OUFILE "$ IF T1 .EQS. "","" THEN RETURN"
-$ WRITE OUFILE "$ VLS = F$EXTRACT(0,3,F$ELEMENT(0,""*"",T1)+""___"")"
-$ WRITE OUFILE "$ UCI = F$EXTRACT(0,3,F$ELEMENT(1,""*"",T1)+""___"")"
-$ WRITE OUFILE "$ GLD = F$ELEMENT(2,""*"",T1)"
-$ WRITE OUFILE "$ DEFINE /SYSTEM GTMAPI$'UCI'$'VLS' 'GLD'"
-$ WRITE OUFILE "$ N = N + 1"
-$ WRITE OUFILE "$ GOTO UCI"
-$ CLOSE OUFILE
-$ VMI$CALLBACK MESSAGE I PREINS "Preparing files for installation."
-$!  GTMFIFILES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTMFIFILES.KIT
-$ IF GTMFI$MGR_COM
-$  THEN
-$   WRITE OUFILE "GTMFI$ GTMFISTART.COM VMI$ROOT:[SYSMGR] C"
-$ ENDIF
-$ WRITE OUFILE "GTMFI$ GTMFISTART.COM ''GTMFI$DST_LOG'"
-$ CLOSE OUFILE
-$!  GTMFIIMAGES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTMFIIMAGES.KIT
-$ WRITE OUFILE "GTMFI$ IBI_XFM.EXE ''GTMFI$DST_LOG'"
-$ CLOSE OUFILE
-$!  Provide with file.KITs
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTMFIFILES.KIT "" T
-$ VMI$CALLBACK PROVIDE_IMAGE "" VMI$KWD:GTMFIIMAGES.KIT "" T
-$ VMI$CALLBACK MESSAGE I FININS "Finalizing the installation."
-$ IF GTMFI$START_GTMFI THEN VMI$CALLBACK SET POSTINSTALL YES
-$ IF GTMFI$RUN_IVP THEN VMI$CALLBACK SET IVP YES
-$ IF GTMFI$STARTDB THEN VMI$CALLBACK MODIFY_STARTUP_DB ADD GTMFISTART.COM END
-$ EXIT VMI$_SUCCESS
-$!
-$POSTINSTALL:
-$!
-$ SET ON
-$! do a gtmlogin
-$ @'GTMFI$DST_LOG'GTMLOGIN
-$ IF GTMFI$MGR_COM
-$  THEN
-$   T1 := SYS$MANAGER:
-$  ELSE
-$   T1 = GTMFI$DST_LOG
-$ ENDIF
-$ @'T1'GTMFISTART
-$ EXIT VMI$_SUCCESS
-$!
-$IVP:
-$!	The real Installation Verification Procedure.
-$ TYPE SYS$INPUT
-
-  GT.M FOCUS interface Installation Verification Procedure
-
-$!  Extract the IVP .COM file from the text library.
-$ LIBRARIAN /EXTRACT=GTMFI$IVP /OUTPUT=GTMFI$IVP.COM GTMFI$IVP.TLB
-$ @GTMFI$IVP
-$ EXIT $STATUS
diff --git a/sr_vvms/gtmidef.h b/sr_vvms/gtmidef.h
deleted file mode 100644
index d881367..0000000
--- a/sr_vvms/gtmidef.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
-   gtmidef.h : counterpart to the gtmi$def.mar
-
-*/
-#define GTMI$_GLOBAL    1
-#define GTMI$_NAKED     2
-#define GTMI$_EXTGBL    3
-#define GTMI$_LOCAL     4
-#define GTMI$_EXTLCL    5
-#define GTMI$_LOCK      6
-#define GTMI$_ZALLOC    7
-#define GTMI$_ZDEALLOC  8
-#define GTMI$_INCLOCK   9
-#define GTMI$_DECLOCK   10
-#define GTMI$_UNLOCK    11
diff --git a/sr_vvms/gtmio.h b/sr_vvms/gtmio.h
deleted file mode 100644
index a7dce21..0000000
--- a/sr_vvms/gtmio.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef GTMIO_Included
-#define GTMIO_Included
-
-/* Include necessary files for system calls
- * CHANNEL : The channel to read
- * OFFSET  : Disk offset in bytes. Should be divisible by DISK_BLOCK_SIZE.
- * BUFF    : Buffer to read data.
- * LEN     : Length in bytes to read.
- * STATUS1 : Status of system call
- * STATUS2 : Secondary status of system call
- */
-#define DO_FILE_READ(CHANNEL, OFFSET, READBUFF, LEN, STATUS1, STATUS2)			\
-{											\
-	off_jnl_t		start;							\
-	io_status_block_disk	iosb;							\
-											\
-	STATUS2 = SS_NORMAL;								\
-	assert(0 == (OFFSET) % DISK_BLOCK_SIZE);					\
-	start = OFFSET >> LOG2_DISK_BLOCK_SIZE;						\
-	STATUS1 = sys$qiow(EFN$C_ENF, CHANNEL, IO$_READVBLK, &iosb, NULL, 0,		\
-		 	(uchar_ptr_t)(READBUFF), LEN, start + 1, 0, 0, 0);		\
-	if (1 & STATUS1)								\
-		STATUS1 = iosb.cond;							\
-}
-
-#define DB_DO_FILE_WRITE(CHANNEL, OFFSET, WRITEBUFF, LEN, STATUS1, STATUS2)		\
-	DO_FILE_WRITE(CHANNEL, OFFSET, WRITEBUFF, LEN, STATUS1, STATUS2)
-
-#define JNL_DO_FILE_WRITE(CSA, JNL_FN, CHANNEL, OFFSET, WRITEBUFF, LEN, STATUS1, STATUS2)	\
-	DO_FILE_WRITE(CHANNEL, OFFSET, WRITEBUFF, LEN, STATUS1, STATUS2)
-
-#define DO_FILE_WRITE(CHANNEL, OFFSET, WRITEBUFF, LEN, STATUS1, STATUS2)		\
-{											\
-	off_jnl_t		start;							\
-	io_status_block_disk	iosb;							\
-											\
-	STATUS2 = SS_NORMAL;								\
-	assert(0 == (OFFSET) % DISK_BLOCK_SIZE);					\
-	start = OFFSET >> LOG2_DISK_BLOCK_SIZE;						\
-	STATUS1 = sys$qiow(EFN$C_ENF, CHANNEL, IO$_WRITEVBLK, &iosb, NULL, 0,		\
-		 	(uchar_ptr_t)(WRITEBUFF), LEN, start + 1, 0, 0, 0);		\
-	if (1 & STATUS1)								\
-		STATUS1 = iosb.cond;							\
-}
-
-#define DOREADRC(FDESC, FBUFF, FBUFF_LEN, RC) 						\
-{ 											\
-	ssize_t		gtmioStatus; 							\
-	size_t		gtmioBuffLen; 							\
-	sm_uc_ptr_t 	gtmioBuff;							\
-	gtmioBuffLen = FBUFF_LEN; 							\
-	gtmioBuff = (sm_uc_ptr_t)(FBUFF); 						\
-	for (;;) 									\
-        { 										\
-		if (-1 != (gtmioStatus = read(FDESC, gtmioBuff, gtmioBuffLen))) 	\
-	        { 									\
-			gtmioBuffLen -= gtmioStatus; 					\
-			if (0 == gtmioBuffLen || 0 == gtmioStatus) 			\
-				break; 							\
-			gtmioBuff += gtmioStatus; 					\
-	        } 									\
-		else if (EINTR != errno) 						\
-			break; 								\
-        } 										\
-	if (-1 == gtmioStatus)	    	/* Had legitimate error - return it */ 		\
-		RC = errno; 								\
-	else if (0 == gtmioBuffLen) 							\
-	        RC = 0; 								\
-	else 										\
-		RC = -1;		/* Something kept us from reading what we wanted */ \
-}
-
-/* Use CLOSEFILE for those files (or sockets) that are opened using UNIX (POSIX) system calls */
-#define CLOSEFILE(FDESC, RC)					\
-{								\
-	do							\
-	{							\
-		RC = close(FDESC);				\
-	} while(-1 == RC && EINTR == errno);			\
-	if (-1 == RC)	/* Had legitimate error - return it */	\
-		RC = errno;					\
-}
-
-/* CLOSEFILE_RESET
- * 	Loop until close succeeds for fails with other than EINTR.
- * 	At end reset channel to FD_INVALID unconditionally (even if close was not successful).
- */
-#define	CLOSEFILE_RESET(FDESC, RC)	\
-{					\
-	CLOSEFILE(FDESC, RC);		\
-	FDESC = FD_INVALID;		\
-}
-
-#endif
diff --git a/sr_vvms/gtmkithlp.com b/sr_vvms/gtmkithlp.com
deleted file mode 100644
index b8ea2c5..0000000
--- a/sr_vvms/gtmkithlp.com
+++ /dev/null
@@ -1,172 +0,0 @@
-$!
-$!      HELP TEXT PROCESSING FOR GT.M KITINSTAL.COM
-$!      COPYRIGHT 1989 - 2000 Sanchez Computer Associates
-$ IF F$EXTRACT(0,5,P1) .EQS. "HELP_" THEN GOTO 'P1'
-$ EXIT VMI$_UNSUPPORTED
-$HELP_PURGE:
-$ TYPE SYS$INPUT
-  If GT.M is previously installed,   there is no reason to keep older versions
-  of the software online, unless you wish to test before purging.
-
-$ EXIT
-$HELP_STD_CNF:
-$ TYPE SYS$INPUT
-  The standard configuration performs the following:
-
-   *  Places files in SYS$COMMON:[GTM_DIST] with SYSTEM as owner
-   *  Copies the GT.M command procedures to SYS$MANAGER
-   *  Adds GTMSTART.COM to the system startup database
-   *  Leaves GT.M help files in GTM$DIST (does not move them to SYS$HELP)
-   *  Defines DCL commands for GT.M in the system command table
-   *  Defines logical names, including LNK$LIBRARY*, in the system table
-   *  INSTALLs all the appropriate GT.M images during the installation
-   *  Defines the default global directory as MUMPS.GLD
-   *  Defines the default routine search list as "[],GTM$DIST:"
-   *  Compiles the MUMPS percent routines
-
-  If the SYSTEM id is not set up, the installation will use [1,4].
-  If you answer YES,  there are no other questions.
-
-$ EXIT
-$HELP_DST_OWN:
-$ TYPE SYS$INPUT
-  Provide a UIC,  normally SYSTEM, to own the files in the GT.M  distribution.
-  The UIC can be a name,  a group name and a user name separated by  a  comma,
-  or a pair of octal codes separated by a comma which specify group and user.
-
-$ EXIT
-$HELP_SYS_DST:
-$ TYPE SYS$INPUT
-  Usual practice is to place a language processor, such as GT.M, on the system
-  disk.   If you have severe space constraints,  you may need to  use  another
-  volume.
-
-$ EXIT
-$HELP_SYS_DIR:
-$ TYPE SYS$INPUT
-  This directory becomes a  sub-directory  of  SYS$COMMON,   and   holds   the
-  distribution.   If it does not  exist,  the  installation  creates  it  with
-  WORLD=RE access.   If you  are  not  concerned  with  mixing  software  from
-  different vendors, you may wish to use SYSLIB.
-
-$ EXIT
-$HELP_DST_DEV:
-$ TYPE SYS$INPUT
-  The disk must be mounted, on-line,  and have adequate space to hold the GT.M
-  distribution.  The disk name may be physical or logical.
-
-$ EXIT
-$HELP_DST_DIR:
-$ TYPE SYS$INPUT
-  This  directory  holds  the  distribution.    If  it  does  not  exist,  the
-  installation creates it with WORLD=RE access. 
-
-$ EXIT
-$HELP_STARTDB:
-$ TYPE SYS$INPUT
-  Answering yes causes the installation to place GTMSTART.COM in  the  startup
-  database so the system startup automatically sets up  the  GT.M  environment
-  whenever the system boots.
-
-$ EXIT
-$HELP_MGR_COM:
-$ TYPE SYS$INPUT
-  You may prevent the installation from moving the .COM files to  SYS$MANAGER.
-  Copying the command  procedures  to  SYS$MANAGER  allows  system startup  to
-  access them through  the  VMS  startup  database  and  generally  simplifies
-  operations.  However, if you wish to have multiple versions of GT.M on  your
-  system at the same time,  multiple  copies  of  the  command  procedures  in 
-  SYS$MANAGER would require intervention to provide alternative naming.
-
-$ EXIT
-$HELP_HLP_DIR:
-$ TYPE SYS$INPUT
-  You may place the GT.M help files in SYS$HELP or leave them with the rest of
-  the distribution.
-
-$ EXIT
-$HELP_DEF_DCL:
-$ TYPE SYS$INPUT
-  Common practice is (YES) to define commands in  the  system  command  tables
-  (SYS$LIBRARY:DCLTABLES.EXE).  A less efficient, but sometimes more flexible,
-  alternative, has each process define them as it starts.  Another alternative
-  uses alternate command tables.  GT.M uses the MUMPS command.
-
-$ EXIT
-$HELP_DEF_SYS:
-$ TYPE SYS$INPUT
-  Common practice is (YES) to define widely used logical  names in the  SYSTEM
-  logical  name  table.     A  less  efficient  but  sometimes  more  flexible
-  alternative has each process define them as it starts.   Other  alternatives
-  use definitions in one or more GROUP logical name  tables,  or  in a logical
-  name table other than those supplied with VMS.
-
-$ EXIT
-$HELP_LNK_LOG:
-$ TYPE SYS$INPUT
-  LNK$LIBRARYn logical names  point to  libraries  included  by  default  when
-  performing an image LINK under VMS.   GT.M links require an object  library,
-  GTMLIB.OLB,  and  a  shareable  image  library,  GTMSHR.OLB.   Adding  these
-  libraries to your list of LNK$LIBRARY logical  names  simplifies  your  LINK
-  commands for GT.M.  If you answer YES, then the installation procedure finds
-  the next two available LNK$LIBRARYn logical  names  FOR  THIS  PROCESS,  and  
-  defines them so they point to the appropriate GT.M libraries.
-
-$ EXIT
-$HELP_RUN_IVP:
-$ TYPE SYS$INPUT
-  This installation kit contains an installation verification procedure  (IVP)
-  which you can run as part of the installation to verify the  correctness  of 
-  the software.   Note that if you choose this option,  the  GT.M  images  are
-  automatically INSTALLed.
-
-$ EXIT
-$HELP_PCT_RTN:
-$ TYPE SYS$INPUT
-  The GT.M Mumps System  is  distributed  with  a  set  of  programmer  tools,
-  so-called  percent  (%) routines.   If you answer YES to this question,  the 
-  installation compiles these routines.  Note that if you choose this  option,
-  the GT.M images are automatically INSTALLed.
-
-$ EXIT
-$HELP_INSTALL:
-$ TYPE SYS$INPUT
-  In order to run GT.M,  certain images must be INSTALLed in your system  with
-  the INSTALL utility.   If you answer YES,  then these images  are  INSTALLed 
-  during  this  installation procedure.   You  may  wish  to  defer  this  for 
-  operational reasons, or until you have completed a brief evaluation.
-
-$ EXIT
-$HELP_DEF_RTN:
-$ TYPE SYS$INPUT
-  GTM$ROUTINES is a logical name for your MUMPS routine search list.   If  you
-  answer YES,  the installation adds a default definition for this search list 
-  to GTMLOGICALS.COM.
-
-$ EXIT
-$HELP_RTN_DIR:
-$ TYPE SYS$INPUT
-  The installation uses this string as the  definition  for  the  GTM$ROUTINES
-  search list.   The directories specified do not need to exist at this  time.  
-  This definition can be easily changed later.   Because GTM$ROUTINES provides
-  a string to GT.M and does not act as a VMS search list,  you  should enclose 
-  the items in the list with quotes (") when the list has more than one item.
-
-
-$ EXIT
-$HELP_DEF_GLD:
-$ TYPE SYS$INPUT
-  GTM$GBLDIR is a logical name for your global directory.  If you answer  YES,
-  the installation adds a default  definition  for  the  global  directory  to
-  GTMLOGICALS.COM.
-
-$ EXIT
-$HELP_GBL_DIR:
-$ TYPE SYS$INPUT
-  The installation uses this string  as  the  definition  for  the  GTM$GBLDIR
-  global directory name.  This file specification may be a partial or complete
-  file specification.  The file does not need to exist at this time. A partial
-  file specification is usually used for development, and a complete  one  for
-  production.  This definition can be easily changed later.
-
-$ EXIT
diff --git a/sr_vvms/gtmkitinstal.com b/sr_vvms/gtmkitinstal.com
deleted file mode 100644
index b4701ff..0000000
--- a/sr_vvms/gtmkitinstal.com
+++ /dev/null
@@ -1,443 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2011 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!
-$!	KITINSTAL.COM PROCEDURE FOR THE GT.M PRODUCT
-$!
-$ ON CONTROL_Y THEN VMI$CALLBACK CONTROL_Y
-$! ON WARNING THEN EXIT $STATUS !! allow warning errors for INSTALL REPLACE
-$ IF P1 .EQS. "VMI$_INSTALL" THEN GOTO INSTALL
-$ IF P1 .EQS. "VMI$_POSTINSTALL" THEN GOTO POSTINSTALL
-$ IF P1 .EQS. "VMI$_IVP" THEN GOTO IVP
-$ EXIT VMI$_UNSUPPORTED
-$!
-$INSTALL:
-$ TYPE SYS$INPUT
-
-  GT.M  (c)  COPYRIGHT 1985 - 2000  by  Sanchez Computer Associates
-                            ALL RIGHTS RESERVED
-
-$!  the following 2 lines must be maintained
-$ GTM$VMS_VERSION :== 072	! Minimum VMS version required
-$ ALPHA = (f$getsyi("arch_name") .eqs. "Alpha")
-$ IF ALPHA
-$  THEN
-$   GTM$DISK_SPACE == 28000	! Minumum disk space on system disk required
-$  ELSE
-$   GTM$DISK_SPACE == 16000	! Minumum disk space on system disk required
-$ ENDIF
-$ IF F$ELEMENT(0,",",VMI$VMS_VERSION) .EQS. "RELEASED"
-$  THEN
-$   GTM$VMS_IS == F$ELEMENT(1,",",VMI$VMS_VERSION)
-$   IF GTM$VMS_IS .LTS. GTM$VMS_VERSION
-$    THEN
-$     VMI$CALLBACK MESSAGE E VMSMISMATCH "This GT.M kit requires an existing VMS''GTM$VMS_VERSION' system."
-$     EXIT VMI$_FAILURE
-$   ENDIF
-$  ELSE
-$   GTM$VMS_IS :==
-$   WRITE SYS$OUTPUT "  No VMS version checking performed for field test versions."
-$ ENDIF
-$ IF (GTM$VMS_IS .GES. "052") THEN T1 = F$VERIFY(VMI$KIT_DEBUG)
-$ VMI$CALLBACK CHECK_NET_UTILIZATION GTM$ROOM 'GTM$DISK_SPACE'
-$ IF .NOT. GTM$ROOM
-$  THEN
-$   VMI$CALLBACK MESSAGE E NOSPACE "There is not enough disk space -- GT.M needs ''GTM$DISK_SPACE' blocks."
-$   EXIT VMI$_FAILURE
-$ ENDIF
-$!  setup default answers
-$ GTM$DOPURGE :== YES
-$ GTM$RUN_IVP :== YES
-$ GTM$STD_CNF :== YES
-$ GTM$DST_OWN :== SYSTEM
-$ IF F$IDENTIFIER(GTM$DST_OWN,"NAME_TO_NUMBER") .EQ. 0 THEN GTM$DST_OWN :== 1,4
-$ GTM$SYS_DST :== YES
-$ GTM$DST_DIR :== GTM_DIST
-$ GTM$DST_CRE == GTM$DST_DIR
-$ GTM$DST_DEV :==
-$ GTM$STARTDB :== YES
-$ GTM$MGR_COM :== YES
-$ GTM$HLP_DIR :== NO
-$ GTM$DEF_DCL :== YES
-$ GTM$DEF_SYS :== YES
-$ GTM$LNK_LOG :== YES
-$ GTM$INSTALL :== YES
-$ GTM$DEF_GLD :== YES
-$ GTM$GBL_DIR :== MUMPS.GLD
-$ GTM$DEF_RTN :== YES
-$ GTM$RTN_DIR :== [],GTM$DIST:
-$ GTM$PCT_RTN :== YES
-$ VMI$CALLBACK ASK GTM$DOPURGE "Do you want to purge files replaced by this installation" 'GTM$DOPURGE' B -
-  "@VMI$KWD:GTMKITHLP HELP_PURGE"
-$ IF .NOT. GTM$DOPURGE THEN VMI$CALLBACK SET PURGE NO
-$ VMI$CALLBACK ASK GTM$STD_CNF "Do you want the standard GT.M configuration (performs INSTALL)" 'GTM$STD_CNF' B -
-  "@VMI$KWD:GTMKITHLP HELP_STD_CNF"
-$ IF GTM$STD_CNF
-$  THEN
-$   GTM$SYS_DST == 1
-$   GTM$STARTDB == 1
-$   GTM$MGR_COM == 1
-$   GTM$HLP_DIR == 0
-$   GTM$DEF_DCL == 1
-$   GTM$DEF_SYS == 1
-$   GTM$INSTALL == 1
-$   GTM$LNK_LOG == 1
-$   GTM$INSTALL == 1
-$   GTM$DEF_GLD == 1
-$   GTM$DEF_RTN == 1
-$   GTM$PCT_RTN == 1
-$   GTM$DST_LOG :== SYS$COMMON:['GTM$DST_DIR']
-$   GTM$DIR_TYPE :== COMMON
-$  ELSE ! Not standard configuration
-$   VMI$CALLBACK ASK GTM$DST_OWN "What UIC should own the GT.M distribution" 'GTM$DST_OWN' S "@VMI$KWD:GTMKITHLP HELP_DST_OWN"
-$   GTM$DST_OWN == GTM$DST_OWN - "[" - "]"
-$   VMI$CALLBACK ASK GTM$SYS_DST "Do you want the GT.M distribution to go into a System Directory" 'GTM$SYS_DST' B -
-    "@VMI$KWD:GTMKITHLP HELP_SYS_DST"
-$   IF GTM$SYS_DST
-$    THEN
-$     VMI$CALLBACK ASK GTM$DST_DIR "In what System Directory do you want to place GT.M" 'GTM$DST_DIR' S -
-      "@VMI$KWD:GTMKITHLP HELP_SYS_DIR"
-$     GTM$DST_DIR == GTM$DST_DIR - "[" - "]"
-$     GTM$DST_CRE == GTM$DST_DIR
-$     GTM$DST_LOG :== SYS$COMMON:['GTM$DST_DIR']
-$     GTM$DIR_TYPE :== COMMON
-$    ELSE ! Not system disk
-$     VMI$CALLBACK ASK GTM$DST_DEV "On which device do you want to place GT.M" "''GTM$DST_DEV'" S "@VMI$KWD:GTMKITHLP HELP_DST_DEV"
-$     VMI$CALLBACK ASK GTM$DST_DIR "In what directory on that device do you want to place GT.M" 'GTM$DST_DIR' S -
-      "@VMI$KWD:GTMKITHLP HELP_DST_DIR"
-$     GTM$DST_DEV == GTM$DST_DEV - ":"
-$     GTM$DST_DIR == GTM$DST_DIR - "[" - "]"
-$     GTM$DST_LOG :== 'GTM$DST_DEV':['GTM$DST_DIR']
-$     GTM$DST_CRE == GTM$DST_LOG
-$     GTM$DIR_TYPE :== USER
-$   ENDIF ! system disk
-$   VMI$CALLBACK ASK GTM$STARTDB "Do you want GTMSTART.COM in the startup database" 'GTM$STARTDB' B -
-    "@VMI$KWD:GTMKITHLP HELP_STARTDB"
-$   IF .NOT. GTM$STARTDB
-$    THEN
-$     VMI$CALLBACK ASK GTM$MGR_COM "Do you want the GT.M .COM files in SYS$MANAGER" 'GTM$MGR_COM' B -
-      "@VMI$KWD:GTMKITHLP HELP_MGR_COM"
-$   ENDIF
-$   VMI$CALLBACK ASK GTM$HLP_DIR "Do you want the GT.M help files in SYS$HELP" 'GTM$HLP_DIR' B "@VMI$KWD:GTMKITHLP HELP_HLP_DIR"
-$   VMI$CALLBACK ASK GTM$DEF_DCL "Do you want to define GT.M commands to the system" 'GTM$DEF_DCL' B -
-    "@VMI$KWD:GTMKITHLP HELP_DEF_DCL"
-$   VMI$CALLBACK ASK GTM$DEF_SYS "Do you want to define GT.M logical names in the System Table" 'GTM$DEF_SYS' B -
-    "@VMI$KWD:GTMKITHLP HELP_DEF_SYS"
-$   VMI$CALLBACK ASK GTM$LNK_LOG "Do you want to define the LNK$LIBRARY logical names" 'GTM$LNK_LOG' B -
-    "@VMI$KWD:GTMKITHLP HELP_LNK_LOG"
-$   VMI$CALLBACK ASK GTM$RUN_IVP "Do you want to run the IVP (performs INSTALL)" 'GTM$RUN_IVP' B -
-    "@VMI$KWD:GTMKITHLP HELP_RUN_IVP"
-$   IF GTM$RUN_IVP
-$    THEN
-$     GTM$PCT_RTN == 1
-$    ELSE
-$     VMI$CALLBACK ASK GTM$PCT_RTN "Do you want to compile the GT.M percent routines (performs INSTALL)" 'GTM$PCT_RTN' B -
-      "@VMI$KWD:GTMKITHLP HELP_PCT_RTN"
-$   ENDIF
-$   IF (GTM$RUN_IVP .OR. GTM$PCT_RTN)
-$    THEN
-$     GTM$INSTALL == 1
-$    ELSE
-$     VMI$CALLBACK ASK GTM$INSTALL "Do you want to INSTALL the GT.M shareable images now" 'GTM$INSTALL' B -
-      "@VMI$KWD:GTMKITHLP HELP_INSTALL"
-$   ENDIF
-$   VMI$CALLBACK ASK GTM$DEF_RTN "Do you want to have a default definition for GTM$ROUTINES" 'GTM$DEF_RTN' B -
-    "@VMI$KWD:GTMKITHLP HELP_DEF_RTN"
-$   IF GTM$DEF_RTN
-$    THEN
-$     VMI$CALLBACK ASK GTM$RTN_DIR "What is the search specification for GTM$ROUTINES" 'GTM$RTN_DIR' S -
-      "@VMI$KWD:GTMKITHLP HELP_RTN_DIR"
-$   ENDIF
-$   VMI$CALLBACK ASK GTM$DEF_GLD "Do you want to have a default definition for GTM$GBLDIR" 'GTM$DEF_GLD' B -
-    "@VMI$KWD:GTMKITHLP HELP_DEF_GLD"
-$   IF GTM$DEF_GLD
-$    THEN
-$     VMI$CALLBACK ASK GTM$GBL_DIR "What is the file specification for GTM$GBLDIR" 'GTM$GBL_DIR' S -
-      "@VMI$KWD:GTMKITHLP HELP_GBL_DIR"
-$   ENDIF
-$ ENDIF ! standard configuration
-$!  tell them what's happening
-$ IF GTM$MGR_COM
-$  THEN
-$   WRITE SYS$OUTPUT "  The following command files are created and copied to SYS$MANAGER:"
-$  ELSE
-$   WRITE SYS$OUTPUT "  The following command files are created:"
-$ ENDIF
-$ TYPE SYS$INPUT
-
-        GTMINSTALL.COM
-        GTMLOGICALS.COM
-        GTMLOGIN.COM
-        GTMSTART.COM
-        GTMSTOP.COM
-
-  Each file contains its own user documentation.
-
-  All the questions have been asked.   Installation now proceeds  without your
-  manual intervention for about 10-15 minutes.
-$ IF GTM$RUN_IVP THEN WRITE SYS$OUTPUT "  Finally the Installation Verification Procedure tests the installation."
-$ WRITE SYS$OUTPUT ""
-$ VMI$CALLBACK CREATE_DIRECTORY 'GTM$DIR_TYPE' 'GTM$DST_CRE' "/OWNER_UIC=[''GTM$DST_OWN'] /PROTECTION=(WO:RE)"
-$ VMI$CALLBACK RESTORE_SAVESET B
-$ VMI$CALLBACK RESTORE_SAVESET C
-$ WRITE SYS$OUTPUT ""
-$ VMI$CALLBACK MESSAGE I CRECOM "Creating command files."
-$!  Create GTMINSTALL.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMINSTALL.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMINSTALL.COM installs GTMSECSHR and other GT.M images."
-$ WRITE OUFILE "$!      GTMSECSHR is a small protected image and must be installed."
-$ WRITE OUFILE "$!      GTMSHR is the run-time library and is installed for performance."
-$ WRITE OUFILE "$!      GTM$DMOD and MCOMPILE are small images frequently used in development."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ INSTALL"
-$ WRITE OUFILE "REPLACE  /OPEN/SHARED/HEADER/PROTECTED	GTMSECSHR"
-$ WRITE OUFILE "REPLACE  /OPEN/SHARED/HEADER		GTMSHR"
-$ WRITE OUFILE "REPLACE  /OPEN/SHARED/HEADER		GTM$DMOD"
-$ WRITE OUFILE "REPLACE  /OPEN/SHARED/HEADER		MCOMPILE"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTMLOGICALS.COM
-$ GTM$HLP_LOG :== GTM$DIST
-$ IF GTM$HLP_DIR THEN GTM$HLP_LOG :== SYS$HELP
-$ OPEN /WRITE OUFILE VMI$KWD:GTMLOGICALS.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMLOGICALS.COM defines the logical names required to use GT.M."
-$ WRITE OUFILE "$!	By default the definitions are placed in the PROCESS table."
-$ WRITE OUFILE "$!	Parameter 1, if supplied should be the name of a logical name table"
-$ WRITE OUFILE "$!	and/or the mode of definition."
-$ WRITE OUFILE "$!      Assignments in a ""permanent"" table reduce GT.M activation time."
-$ WRITE OUFILE "$!"
-$ IF GTM$LNK_LOG THEN WRITE OUFILE "$!	The LNK$LIBRARY names many require adjustment to your environment."
-$ IF GTM$DEF_GLD THEN WRITE OUFILE "$!	GTM$GBLDIR is defined to provide default access to a global directory."
-$ IF GTM$DEF_RTN THEN WRITE OUFILE "$!	GTM$ROUTINES is defined to provide access to the GT.M utilities."
-$ IF GTM$DEF_RTN THEN WRITE OUFILE "$!	You may wish to define a different structure for $ZROUTINES."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ IF (P1 .NES. """") .AND. (F$EXTRACT(0,1,P1) .NES. ""/"") THEN P1 := /'P1"
-$ WRITE OUFILE "$ DEFINE 'P1' GTM$DIST		''GTM$DST_LOG'"
-$ IF GTM$DEF_GLD THEN WRITE OUFILE "$ DEFINE 'P1' GTM$GBLDIR	''GTM$GBL_DIR'"
-$ IF GTM$DEF_RTN THEN WRITE OUFILE "$ DEFINE 'P1' GTM$ROUTINES	""''GTM$RTN_DIR'"""
-$ WRITE OUFILE "$ DEFINE 'P1' GTM$HELP		''GTM$HLP_LOG'"
-$ WRITE OUFILE "$ DEFINE 'P1' GTMSHR		GTM$DIST:GTMSHR.EXE"
-$ WRITE OUFILE "$ DEFINE 'P1' GTMSECSHR		GTM$DIST:GTMSECSHR.EXE"
-$ WRITE OUFILE "$ DEFINE 'P1' GTM$DMOD		GTM$DIST:GTM$DMOD.EXE"
-$ WRITE OUFILE "$ DEFINE 'P1' MCOMPILE		GTM$DIST:MCOMPILE.EXE"
-$ IF GTM$LNK_LOG
-$  THEN
-$   N1 = 0
-$   DN = 0
-$   T1 = F$TRNLNM("LNK$LIBRARY")
-$   IF  (T1 .EQS. "") .OR. (F$LOCATE("GTMLIB",T1) .NE. F$LENGTH(T1)) .OR. (F$LOCATE("GTMSHR",T1) .NE. F$LENGTH(T1))
-$    THEN
-$     WRITE OUFILE "$ DEFINE 'P1' LNK$LIBRARY	GTM$DIST:GTMLIB.OLB"
-$     DN = 1
-$    ELSE ! lnk$library is in use
-$LNK_LOOP:
-$     N1 = N1 + 1
-$     T1 = F$TRNLNM("LNK$LIBRARY_''N1'")
-$     IF  (T1 .EQS. "") .OR. (F$LOCATE("GTMLIB",T1) .NE. F$LENGTH(T1)) .OR. (F$LOCATE("GTMSHR",T1) .NE. F$LENGTH(T1))
-$      THEN
-$       WRITE OUFILE "$ DEFINE 'P1' LNK$LIBRARY_''N1'	GTM$DIST:GTMLIB.OLB"
-$       DN = 1
-$     ENDIF
-$     IF  (.NOT. DN) .AND. (N1 .LT. 998)  THEN  GOTO LNK_LOOP
-$   ENDIF ! gtmlib handling
-$   IF  DN ! placed gtmlib
-$    THEN
-$     N1 = N1 + 1
-$     WRITE OUFILE "$ DEFINE 'P1' LNK$LIBRARY_''N1'	GTM$DIST:GTMSHR.OLB"
-$    ELSE
-$     VMI$CALLBACK MESSAGE I NOLNKLOG "No LNK$LIBRARY logical names available"
-$   ENDIF
-$ ENDIF ! setting up LNK$LIBRARYs
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTMLOGIN.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMLOGIN.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMLOGIN.COM performs process specific setup for GT.M."
-$ WRITE OUFILE "$!	It calls GTMLOGICALS.COM if the logical names are not"
-$ WRITE OUFILE "$!      in the SYSTEM table."
-$ WRITE OUFILE "$!	It defines symbols to access GT.M images."
-$ WRITE OUFILE "$!	It defines GT.M commands locally if they are not defined to the system."
-$ WRITE OUFILE "$!      When the command and logical names are not defined on a process level,"
-$ WRITE OUFILE "$!      a production user may save start-up time by not using GTMLOGIN."
-$ WRITE OUFILE "$!      CCE is infrequently used, but may be defined as a foreign command."
-$ WRITE OUFILE "$!"
-$ IF .NOT. GTM$DEF_SYS
-$  THEN
-$   WRITE OUFILE "$ dir = F$ENVIRONMENT(""PROCEDURE"")"
-$   WRITE OUFILE "$ dir = F$PARSE(dir,,,""DEVICE"") + F$PARSE(dir,,,""DIRECTORY"")"
-$   WRITE OUFILE "$ @'dir'GTMLOGICALS.COM"
-$ ENDIF
-$ IF .NOT. GTM$DEF_DCL THEN WRITE OUFILE "$ SET COMMAND GTM$DIST:GTMCOMMANDS.CLD"
-$ WRITE OUFILE "$ DSE :== $GTM$DIST:DSE.EXE	! Database System Editor"
-$ WRITE OUFILE "$ GDE :== $GTM$DIST:GDE.EXE	! Global Directory Editor"
-$ WRITE OUFILE "$ GTM :== MUMPS/DIRECT		! Direct Mode MUMPS"
-$ WRITE OUFILE "$ LKE :== $GTM$DIST:LKE.EXE	! Lock Editor"
-$ WRITE OUFILE "$ MUPI*P :== $GTM$DIST:MUPIP.EXE	! MUMPS Peripheral Interchange Program"
-$ WRITE OUFILE "$ EXIT"
-$ WRITE OUFILE "$ CCE :== $GTM$DIST:CCE.EXE	! GT.CX Operator Interface Program"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTMSTART.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMSTART.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMSTART.COM should be placed in the VMS startup database."
-$ WRITE OUFILE "$!	It invokes GTMLOGICALS.COM and GTMINSTALL.COM."
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$ dir = F$ENVIRONMENT(""PROCEDURE"")"
-$ WRITE OUFILE "$ dir = F$PARSE(dir,,,""DEVICE"") + F$PARSE(dir,,,""DIRECTORY"")"
-$ IF GTM$DEF_SYS THEN WRITE OUFILE "$ IF P1 .EQS. """" .OR. (P1 .EQS. ""FULL"") THEN P1 := SYSTEM/EXEC"
-$ WRITE OUFILE "$ @'dir'GTMLOGICALS 'P1'"
-$ WRITE OUFILE "$ @'dir'GTMINSTALL"
-$ WRITE OUFILE "$ EXIT"
-$ CLOSE OUFILE
-$!  Create GTMSTOP.COM
-$ OPEN /WRITE OUFILE VMI$KWD:GTMSTOP.COM
-$ WRITE OUFILE "$!"
-$ WRITE OUFILE "$!	GTMSTOP.COM stops all the active GT.M processes and does a RUNDOWN."
-$ WRITE OUFILE "$!	Place an invocation or copy of this procedure in the site specific"
-$ WRITE OUFILE "$!	 shutdown: SYS$MANAGER:SYSHUTDWN to ensure all GT.M databases are"
-$ WRITE OUFILE "$!	 properly closed before VMS terminates.  GTMSTOP should follow"
-$ WRITE OUFILE "$!	 GTCMSTOP and precede GTCXSTOP, if they are used."
-$ WRITE OUFILE "$!	If GTMSTOP is not intended to disable subsequent use of GT.M,"
-$ WRITE OUFILE "$!	 add a comment (!) before the INSTALL REMOVE GTMSECSHR."
-$ WRITE OUFILE "$!"
-$ IF .NOT. GTM$DEF_SYS
-$  THEN
-$   WRITE OUFILE "$ dir = F$ENVIRONMENT(""PROCEDURE"")"
-$   WRITE OUFILE "$ dir = F$PARSE(dir,,,""DEVICE"") + F$PARSE(dir,,,""DIRECTORY"")"
-$   WRITE OUFILE "$ @'dir'GTMLOGICALS.COM"
-$ ENDIF
-$ WRITE OUFILE "$ MUPIP := $GTM$DIST:MUPIP.EXE"
-$ WRITE OUFILE "$ STOP := $GTM$DIST:GTM$STOP"
-$ WRITE OUFILE "$ STOP 'P1'"
-$ WRITE OUFILE "$ MUPIP RUNDOWN"
-$ WRITE OUFILE "$ INSTALL REMOVE GTMSECSHR"
-$ WRITE OUFILE "$ EXIT"
-$ IF GTM$DEF_SYS THEN WRITE OUFILE "$ IF P2 .EQS. """" THEN P2 := /SYSTEM/EXEC"
-$ WRITE OUFILE "$ DEASSIGN 'P2' GTMSECSHR"
-$ CLOSE OUFILE
-$ VMI$CALLBACK MESSAGE I PREINS "Preparing files for installation."
-$!  GTMFILES.KIT must be maintained as kit contents change
-$ GTM$HLP_LOG == GTM$DST_LOG
-$ IF GTM$HLP_DIR THEN GTM$HLP_LOG :== VMI$ROOT:[SYSHLP]
-$ OPEN /WRITE OUFILE VMI$KWD:GTMFILES.KIT
-$ IF GTM$MGR_COM
-$  THEN
-$   WRITE OUFILE "GTM$ GTMINSTALL.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTM$ GTMLOGICALS.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTM$ GTMLOGIN.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTM$ GTMSTART.COM VMI$ROOT:[SYSMGR] C"
-$   WRITE OUFILE "GTM$ GTMSTOP.COM VMI$ROOT:[SYSMGR] C"
-$ ENDIF
-$ WRITE OUFILE "GTM$ GTMINSTALL.COM ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMLOGICALS.COM ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMLOGIN.COM ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMSTART.COM ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMSTOP.COM ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ DSE.HLB ''GTM$HLP_LOG'"
-$ WRITE OUFILE "GTM$ GDE.HLB ''GTM$HLP_LOG'"
-$ WRITE OUFILE "GTM$ LKE.HLB ''GTM$HLP_LOG'"
-$ WRITE OUFILE "GTM$ MUMPS.HLB ''GTM$HLP_LOG'"
-$ WRITE OUFILE "GTM$ MUPIP.HLB ''GTM$HLP_LOG'"
-$ WRITE OUFILE "GTM$ GTMLIB.OLB ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMSHR.OLB ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMZCALL.MLB ''GTM$DST_LOG'"
-$ IF ALPHA
-$  THEN
-$   WRITE OUFILE "GTM$ GTM$DEFAULTS.M64 ''GTM$DST_LOG'"
-$  ELSE
-$   WRITE OUFILE "GTM$ GTM$DEFAULTS.MAR ''GTM$DST_LOG'"
-$ ENDIF
-$ WRITE OUFILE "GTM$ GTM$CE.H ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMCOLLECT.OPT ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMCOMMANDS.CLD ''GTM$DST_LOG' C"
-$ WRITE OUFILE "GTM$ *.M ''GTM$DST_LOG'"
-$ CLOSE OUFILE
-$!  GTMIMAGES.KIT must be maintained as kit contents change
-$ OPEN /WRITE OUFILE VMI$KWD:GTMIMAGES.KIT
-$ WRITE OUFILE "GTM$ GTMSECSHR.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTMSHR.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ DSE.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GDE.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTM$DMOD.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ LKE.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ MCOMPILE.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ MUPIP.EXE ''GTM$DST_LOG'"
-$ WRITE OUFILE "GTM$ GTM$STOP.EXE ''GTM$DST_LOG'"
-$ CLOSE OUFILE
-$!  Provide with file.KITs
-$ VMI$CALLBACK PROVIDE_FILE "" VMI$KWD:GTMFILES.KIT "" T
-$ VMI$CALLBACK PROVIDE_IMAGE "" VMI$KWD:GTMIMAGES.KIT "" T
-$ VMI$CALLBACK MESSAGE I FININS "Finalizing the installation."
-$ IF GTM$DEF_DCL THEN VMI$CALLBACK PROVIDE_DCL_COMMAND GTMCOMMANDS.CLD
-$ IF GTM$STARTDB THEN VMI$CALLBACK MODIFY_STARTUP_DB ADD GTMSTART.COM LPMAIN
-$!  GTM$INSTALL is TRUE if GTM$RUN_IVP or GTM$PCT_RTN
-$ IF GTM$INSTALL THEN VMI$CALLBACK SET POSTINSTALL YES
-$ IF GTM$RUN_IVP THEN VMI$CALLBACK SET IVP YES
-$ EXIT VMI$_SUCCESS
-$!
-$POSTINSTALL:
-$ ON CONTROL_Y THEN EXIT VMI$_FAILURE
-$! remove MUPIP from command tables for change from V2.4 to V2.5
-$ SET NOON
-$ DEFINE /USER_MODE SYS$OUTPUT NL:
-$ DEFINE /USER_MODE SYS$ERROR NL:
-$ SET COMMAND /TABLE=SYS$COMMON:[SYSLIB]DCLTABLES /OUTPUT=SYS$COMMON:[SYSLIB]DCLTABLES /DELETE=MUPIP
-$ DEFINE /USER_MODE SYS$OUTPUT NL:
-$ DEFINE /USER_MODE SYS$ERROR NL:
-$ SET COMMAND /DELETE=MUPIP
-$ SET ON
-$ IF GTM$MGR_COM
-$  THEN
-$   T1 := SYS$MANAGER:
-$  ELSE
-$   T1 = GTM$DST_LOG
-$ ENDIF
-$ @'T1'GTMSTART
-$ @'T1'GTMLOGIN
-$ ON CONTROL_Y THEN EXIT VMI$_FAILURE
-$ SET DEFAULT GTM$DIST
-$ T2 = F$ENVIRONMENT("PROTECTION")
-$ SET PROTECTION=(S=REWD,O=REWD,G=REWD,W=RE)/DEFAULT
-$ MUMPS GTM$DMOD.M
-$ IF GTM$LNK_LOG
-$  THEN
-$   T1 :=
-$  ELSE
-$   T1 :=,GTMLIB.OLB/LIB,GTMSHR.OLB/LIB
-$ ENDIF
-$ LINK GTM$DMOD.OBJ/NOTRACE'T1
-$ IF GTM$PCT_RTN
-$  THEN
-$   TYPE SYS$INPUT
-
-  Compiling the GT.M percent (%) routines.
-$   MUMPS *
-$   IF GTM$DOPURGE THEN PURGE *.*
-$   SET DEFAULT VMI$KWD
-$ ENDIF ! percent routines
-$ SET PROTECTION=('T2')/DEFAULT
-$ EXIT VMI$_SUCCESS
-$!
-$IVP:
-$!	The real Installation Verification Procedure.
-$ TYPE SYS$INPUT
-
-  GT.M  Installation Verification Procedure
-
-$!	Extract the IVP .COM file from the text library.
-$ LIBRARIAN /EXTRACT=GTM$IVP /OUTPUT=GTM$IVP.COM	GTM$IVP.TLB
-$ @GTM$IVP
-$ EXIT $STATUS
-$!
diff --git a/sr_vvms/gtmrecv.c b/sr_vvms/gtmrecv.c
deleted file mode 100644
index 15a9b4c..0000000
--- a/sr_vvms/gtmrecv.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_unistd.h"
-#include "gtm_fcntl.h"
-#include "gtm_inet.h"
-#ifdef UNIX
-#include "gtm_ipc.h"
-#include <sys/wait.h>
-#include "repl_instance.h"
-#elif defined(VMS)
-#include <ssdef.h>
-#include <descrip.h> /* Required for gtmrecv.h */
-#endif
-#include <errno.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "repl_shutdcode.h"
-#include "gtmrecv.h"
-#include "repl_log.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-#include "repl_errno.h"
-#include "gtm_event_log.h"
-#include "repl_sem.h"
-#include "repl_sp.h"
-#include "cli.h"
-#include "jnl.h"
-#include "repl_filter.h"
-#include "error.h"
-#include "eintr_wrappers.h"
-#include "util.h"
-#include "is_proc_alive.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmmsg.h"
-#include "sgtm_putmsg.h"
-#include "gt_timer.h"
-#ifdef UNIX
-#include "ftok_sems.h"
-#endif
-
-GBLDEF boolean_t		gtmrecv_fetchreysnc;
-GBLDEF boolean_t		gtmrecv_logstats = FALSE;
-GBLDEF int			gtmrecv_filter = NO_FILTER;
-GBLDEF seq_num			gtmrecv_resync_seqno;
-GBLREF void                      (*call_on_signal)();
-
-GBLREF uint4			process_id;
-GBLREF recvpool_addrs		recvpool;
-GBLREF int			recvpool_shmid;
-GBLREF gtmrecv_options_t	gtmrecv_options;
-GBLREF int			gtmrecv_log_fd;
-GBLREF FILE			*gtmrecv_log_fp;
-GBLREF boolean_t        	is_rcvr_server;
-GBLREF int			gtmrecv_srv_count;
-GBLREF uint4			log_interval;
-
-int gtmrecv(void)
-{
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	upd_helper_ctl_ptr_t	upd_helper_ctl;
-	uint4			gtmrecv_pid, channel;
-	int			semval, status, save_upd_status, upd_start_status, upd_start_attempts;
-	char			print_msg[1024];
-	recvpool_user		pool_user = GTMRECV;
-#ifdef UNIX
-	pid_t			pid, procgp;
-	int			exit_status, waitpid_res;
-	int			log_init_status;
-#elif defined(VMS)
-	uint4			pid;
-	char			proc_name[PROC_NAME_MAXLEN + 1];
-	$DESCRIPTOR(proc_name_desc, proc_name);
-#endif
-
-	error_def(ERR_RECVPOOLSETUP);
-	error_def(ERR_MUPCLIERR);
-	error_def(ERR_TEXT);
-	error_def(ERR_REPLERR);
-
-	call_on_signal = gtmrecv_sigstop;
-	ESTABLISH_RET(gtmrecv_ch, SS_NORMAL);
-
-#ifdef VMS
-	pool_user = (CLI_PRESENT == cli_present("DUMMY_START")) ? GTMRECV_CHILD : GTMRECV;
-#endif
-	memset((uchar_ptr_t)&recvpool, 0, SIZEOF(recvpool));
-	if (-1 == gtmrecv_get_opt())
-		rts_error(VARLSTCNT(1) ERR_MUPCLIERR);
-	recvpool_init(pool_user, gtmrecv_options.start && 0 != gtmrecv_options.listen_port, gtmrecv_options.start);
-	/*
-	 * When gtmrecv_options.start is TRUE, shm field recvpool.recvpool_ctl->fresh_start is updated in recvpool_init()
-	 *	recvpool.recvpool_ctl->fresh_start == TRUE ==> fresh start, and
-	 *	recvpool.recvpool_ctl->fresh_start == FALSE ==> start after a crash
-	 */
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
-	upd_helper_ctl = recvpool.upd_helper_ctl;
-	if (GTMRECV == pool_user)
-	{
-		if (gtmrecv_options.start)
-		{
-			if (0 == gtmrecv_options.listen_port /* implies (updateonly || helpers only) */
-				|| !recvpool_ctl->fresh_start)
-			{
-				if (SRV_ALIVE == (status = is_recv_srv_alive()) && 0 != gtmrecv_options.listen_port)
-				{
-					rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-					rts_error(VARLSTCNT(6) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-						  RTS_ERROR_LITERAL("Receiver Server already exists"));
-				} else if (SRV_DEAD == status && 0 == gtmrecv_options.listen_port)
-				{
-					rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-					rts_error(VARLSTCNT(6) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-						  RTS_ERROR_LITERAL("Receiver server does not exist. Start it first"));
-				} else if (SRV_ERR == status)
-				{
-					status = errno;
-					rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-					rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-						  RTS_ERROR_LITERAL("Receiver server semaphore error"), status);
-				}
-				if (gtmrecv_options.updateonly)
-				{
-					status = gtmrecv_start_updonly() - UPDPROC_STARTED;
-					rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-					gtmrecv_exit(status);
-				}
-				if (gtmrecv_options.helpers && 0 == gtmrecv_options.listen_port)
-				{ /* start helpers only */
-					status = gtmrecv_start_helpers(gtmrecv_options.n_readers, gtmrecv_options.n_writers);
-					rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-					gtmrecv_exit(status - NORMAL_SHUTDOWN);
-				}
-			}
-#ifndef REPL_DEBUG_NOBACKGROUND
-			if (SS_NORMAL == (status = repl_fork_rcvr_server(&pid, &channel)) && pid)
-			{
-				REPL_DPRINT2("Waiting for receiver child process %d to startup\n", pid);
-				while (0 == (semval = get_sem_info(RECV, RECV_SERV_COUNT_SEM, SEM_INFO_VAL)) &&
-				       is_proc_alive(pid, 0))
-				{
-					/* To take care of reassignment of PIDs, the while condition should be && with the
-					 * condition (PPID of pid == process_id)
-					 */
-					REPL_DPRINT2("Waiting for receiver child process %d to startup\n", pid);
-					SHORT_SLEEP(GTMRECV_WAIT_FOR_SRV_START);
-#ifdef UNIX
-					WAITPID(pid, &exit_status, WNOHANG, waitpid_res); /* Release defunct child if dead */
-#endif
-				}
-#ifdef VMS
-				/* Deassign the cmd mailbox channel */
-				if (SS_NORMAL != (status = sys$dassgn(channel)))
-				{
-					gtm_putmsg(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-							RTS_ERROR_LITERAL("Unable to close send-cmd mbox channel"), status);
-					gtmrecv_exit(ABNORMAL_SHUTDOWN);
-				}
-#endif
-				if (0 <= semval)
-					rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-				gtmrecv_exit(1 == semval ? SRV_ALIVE : SRV_DEAD);
-			} else if (SS_NORMAL != status)
-			{
-#ifdef UNIX
-				status = errno;
-#endif
-				rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-					  RTS_ERROR_LITERAL("Unable to fork"), status);
-			}
-#endif
-		} else if (gtmrecv_options.shut_down)
-		{
-			if (gtmrecv_options.updateonly)
-				gtmrecv_exit(gtmrecv_endupd() - NORMAL_SHUTDOWN);
-			if (gtmrecv_options.helpers)
-				gtmrecv_exit(gtmrecv_end_helpers(FALSE) - NORMAL_SHUTDOWN);
-			gtmrecv_exit(gtmrecv_shutdown(FALSE, NORMAL_SHUTDOWN) - NORMAL_SHUTDOWN);
-		} else if (gtmrecv_options.changelog)
-		{
-			gtmrecv_exit(gtmrecv_changelog() - NORMAL_SHUTDOWN);
-		} else if (gtmrecv_options.checkhealth)
-		{
-			gtmrecv_exit(gtmrecv_checkhealth() - NORMAL_SHUTDOWN);
-		} else if (gtmrecv_options.showbacklog)
-		{
-			gtmrecv_exit(gtmrecv_showbacklog() - NORMAL_SHUTDOWN);
-		} else
-		{
-			gtmrecv_exit(gtmrecv_statslog() - NORMAL_SHUTDOWN);
-		}
-	} /* (pool_user != GTMRECV) */
-	is_rcvr_server = TRUE;
-	process_id = getpid();
-	strcpy(gtmrecv_local->log_file, gtmrecv_options.log_file);
-	gtmrecv_local->log_interval = log_interval = gtmrecv_options.rcvr_log_interval;
-	upd_proc_local->log_interval = gtmrecv_options.upd_log_interval;
-	upd_helper_ctl->start_helpers = FALSE;
-	upd_helper_ctl->start_n_readers = upd_helper_ctl->start_n_writers = 0;
-#ifdef UNIX
-	log_init_status = repl_log_init(REPL_GENERAL_LOG, &gtmrecv_log_fd, NULL, gtmrecv_options.log_file, NULL);
-	assert(SS_NORMAL == log_init_status);
-	repl_log_fd2fp(&gtmrecv_log_fp, gtmrecv_log_fd);
-	if (-1 == (procgp = setsid()))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-			  RTS_ERROR_LITERAL("Receiver server error in setsid"), errno);
-#elif defined(VMS)
-	util_log_open(STR_AND_LEN(gtmrecv_options.log_file));
-	/* Get a meaningful process name */
-	proc_name_desc.dsc$w_length = get_proc_name(LIT_AND_LEN("GTMRCV"), process_id, proc_name);
-	if (SS$_NORMAL != (status = sys$setprn(&proc_name_desc)))
-	{
-		gtm_putmsg(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to change receiver server process name"), status);
-		gtmrecv_exit(ABNORMAL_SHUTDOWN);
-	}
-#else
-#error Unsupported platform
-#endif
-	gtm_event_log_init();
-	gtmrecv_local->recv_serv_pid = process_id;
-	gtmrecv_local->listen_port = gtmrecv_options.listen_port;
-	if (recvpool_ctl->fresh_start)
-		QWASSIGNDW(recvpool_ctl->jnl_seqno, 0); /* Update process will initialize this to a non-zero value */
-	else
-	{	/* Coming up after a crash, reset Update process read.  This is done by setting gtmrecv_local->restart.
-		 * This will trigger update process to reset recvpool_ctl->jnl_seqno too.
-		*/
-		gtmrecv_local->restart = GTMRECV_RCVR_RESTARTED;
-	}
-	save_upd_status = upd_proc_local->upd_proc_shutdown;
-	for (upd_start_attempts = 0;
-	     UPDPROC_START_ERR == (upd_start_status = gtmrecv_upd_proc_init(recvpool_ctl->fresh_start)) &&
-	     GTMRECV_MAX_UPDSTART_ATTEMPTS > upd_start_attempts;
-	     upd_start_attempts++)
-	{
-		if (EREPL_UPDSTART_SEMCTL == repl_errno || EREPL_UPDSTART_BADPATH == repl_errno)
-		{
-			gtmrecv_autoshutdown();
-		} else if (EREPL_UPDSTART_FORK == repl_errno)
-		{
-			/* Couldn't start up update now, can try later */
-			LONG_SLEEP(GTMRECV_WAIT_FOR_PROC_SLOTS);
-			continue;
-		} else if (EREPL_UPDSTART_EXEC == repl_errno)
-		{
-			/* In forked child, could not exec, should exit */
-			upd_proc_local->upd_proc_shutdown = save_upd_status;
-			gtmrecv_exit(ABNORMAL_SHUTDOWN);
-		}
-	}
-	if ((UPDPROC_EXISTS == upd_start_status && recvpool_ctl->fresh_start) ||
-	    (UPDPROC_START_ERR == upd_start_status && GTMRECV_MAX_UPDSTART_ATTEMPTS <= upd_start_attempts))
-	{
-		sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLERR, RTS_ERROR_LITERAL((UPDPROC_EXISTS == upd_start_status) ?
-			    "Runaway Update Process. Aborting..." :
-			    "Too many failed attempts to fork Update Process. Aborting..."));
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, print_msg);
-		gtm_event_log(GTM_EVENT_LOG_ARGC, "MUPIP", "REPLERR", print_msg);
-		gtmrecv_autoshutdown();
-	}
-	upd_proc_local->start_upd = UPDPROC_STARTED;
-	if (!recvpool_ctl->fresh_start)
-	{
-		while ((GTMRECV_RCVR_RESTARTED == gtmrecv_local->restart) && (SRV_ALIVE == is_updproc_alive()))
-		{
-			REPL_DPRINT1("Rcvr waiting for update to restart\n");
-			SHORT_SLEEP(GTMRECV_WAIT_FOR_SRV_START);
-		}
-		upd_proc_local->bad_trans = FALSE;
-		recvpool_ctl->write_wrap = recvpool_ctl->recvpool_size;
-		recvpool_ctl->write = 0;
-		recvpool_ctl->wrapped = FALSE;
-		upd_proc_local->changelog = TRUE;
-		gtmrecv_local->restart = GTMRECV_NO_RESTART; /* release the update process wait */
-	}
-	if (gtmrecv_options.helpers)
-		gtmrecv_helpers_init(gtmrecv_options.n_readers, gtmrecv_options.n_writers);
-#ifdef UNIX
-	/*
-	 * Child needs to increment receivpool lock couner semaphore.
-	 * Since we can have ftok collisions with someone else, we cannot gaurantee that current count is one.
-	 * So just increment semaphore number 1 after grabbing semaphore number 0. Then release semaphore 0.
-	 */
-	if (!ftok_sem_get(recvpool.recvpool_dummy_reg, TRUE, REPLPOOL_ID, FALSE))
-		rts_error(VARLSTCNT(1) ERR_RECVPOOLSETUP);
-	if (!ftok_sem_release(recvpool.recvpool_dummy_reg, FALSE, FALSE))
-		rts_error(VARLSTCNT(1) ERR_RECVPOOLSETUP);
-#endif
-	/* Lock the receiver server count semaphore. Its value should be atmost 1. */
-	if (0 > grab_sem_immediate(RECV, RECV_SERV_COUNT_SEM))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2, RTS_ERROR_LITERAL("Receive pool semop failure"),
-			  REPL_SEM_ERRNO);
-#ifdef REPL_DEBUG_NOBACKGROUND
-	rel_sem(RECV, RECV_SERV_OPTIONS_SEM);
-#endif
-	gtmrecv_srv_count++;
-	gtmrecv_filter = NO_FILTER;
-	if ('\0' != gtmrecv_local->filter_cmd[0])
-	{
-		if (SS_NORMAL == (status = repl_filter_init(gtmrecv_local->filter_cmd)))
-			gtmrecv_filter |= EXTERNAL_FILTER;
-		else
-		{
-			if (EREPL_FILTERSTART_EXEC == repl_errno)
-				gtmrecv_exit(ABNORMAL_SHUTDOWN);
-		}
-	}
-	gtmrecv_process(!recvpool_ctl->fresh_start);
-	return (SS_NORMAL);
-}
diff --git a/sr_vvms/gtmrecv.h b/sr_vvms/gtmrecv.h
deleted file mode 100644
index e77315c..0000000
--- a/sr_vvms/gtmrecv.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef GTMRECV_H
-#define GTMRECV_H
-
-/* Needs mdef.h, gdsfhead.h and its dependencies, and iosp.h */
-
-#define DEFAULT_RECVPOOL_SIZE		(64 * 1024 * 1024) /* bytes */
-#define DEFAULT_SHUTDOWN_TIMEOUT	30  /* seconds */
-#define	MAX_FILTER_CMD_LEN		512 /* characters */
-#define UPD_HELPERS_DELIM		','
-#define MAX_UPD_HELPERS			128 /* Max helper process (incl. readers and writers) one instance can support */
-#define MIN_UPD_HELPERS			1   /* Minimum number of helper processes, one for reading or writing */
-
-#define DEFAULT_UPD_HELPERS		8	/* If value for -HELPERS is not specified, start these many helpers. Change
-						 * DEFAULT_UPD_HELPERS_STR if you change DEFAULT_UPD_HELPERS */
-#define DEFAULT_UPD_HELP_READERS	5	/* If -HELPERS is not specified, or specified as -HELPERS=,n start these many
-						 * readers. Change DEFAULT_UPD_HELPERS_STR if you change DEFAULT_UPD_HELP_READERS */
-#define DEFAULT_UPD_HELPERS_STR		"8,5"	/* Built as "DEFAULT_UPD_HELPERS,DEFAULT_UPD_HELP_READERS". Maintain DEFAULT for
-						 * /helpers in vvms:mupip_cmd.cld in sync with DEFAULT_UPD_HELPERS_STR */
-
-#ifdef VMS
-#define MAX_GSEC_KEY_LEN		32 /* 31 is allowed + 1 for NULL terminator */
-#endif
-
-typedef enum
-{
-	GTMRECV_DUMMY_STATE = 0,
-	GTMRECV_START,
-	GTMRECV_WAITING_FOR_CONNECTION,
-	GTMRECV_RECEIVING_MSGS,
-	GTMRECV_WAITING_FOR_UPD_CRASH_RESTART,
-	GTMRECV_WAITING_FOR_UPD_SHUT_RESTART
-} gtmrecv_state_t;
-
-enum
-{
-	UPDPROC_STARTED,
-	UPDPROC_START,
-	UPDPROC_EXISTS,
-	UPDPROC_START_ERR
-};
-
-enum
-{
-	GTMRECV_NO_RESTART,
-	GTMRECV_RCVR_RESTARTED,
-	GTMRECV_UPD_RESTARTED
-};
-
-enum
-{
-	HELPER_REAP_NONE = 0,
-	HELPER_REAP_NOWAIT,
-	HELPER_REAP_WAIT
-};
-
-#define GTMRECV_WAIT_FOR_PROC_SLOTS     1 /* s */
-#define GTMRECV_WAIT_FOR_UPDSTART	(1000 - 1) /* ms */
-#define GTMRECV_WAIT_FOR_UPD_SHUTDOWN	10 /* ms */
-#define GTMRECV_MAX_UPDSTART_ATTEMPTS   16
-#define GTMRECV_WAIT_FOR_RECVSTART      (1000 - 1) /* ms */
-#define	GTMRECV_WAIT_FOR_SRV_START	10 /* ms */
-#define GTMRECV_REAP_HELPERS_INTERVAL	300 /* s */
-
-
-#define SRV_ALIVE		0x0
-#define SRV_DEAD		0x1
-#define SRV_ERR			0x2
-
-/* The exit status of checkhealth is BIT-OR of the Receiver status and the
- * Update status */
-#define	RECEIVER_SRV_ALIVE		0x00
-#define RECEIVER_SRV_DEAD		0x01
-#define RECEIVER_CHECKHEALTH_ERR	0x02
-#define UPDATE_PROC_ALIVE		0x00
-#define UPDATE_PROC_DEAD		0x04
-#define UPDATE_CHECKHEALTH_ERR		0x08
-#define RECVPOOL_SEGMENT		'R'
-#define MIN_RECVPOOL_SIZE		(1024 * 1024)
-
-#define GTMRECV_MIN_TCP_SEND_BUFSIZE	(512)		/* anything less than this, issue a warning */
-#define GTMRECV_TCP_SEND_BUFSIZE	(1024)		/* not much outbound traffic, we can live with a low limit */
-#define GTMRECV_MIN_TCP_RECV_BUFSIZE	(16   * 1024)	/* anything less than this, issue a warning */
-#define GTMRECV_TCP_RECV_BUFSIZE_INCR	(32   * 1024)	/* attempt to get a larger buffer with this increment */
-#define GTMRECV_TCP_RECV_BUFSIZE	(1024 * 1024)	/* desirable to set the buffer size to be able to receive large chunks */
-
-/* Note:  fields shared between the receiver and update processes
-	  really need to have memory barriers or other appropriate
-	  synchronization constructs to ensure changes by one
-	  process are actually seen by the other process.  Cache
-	  line spacing should also be taken into account.
-	  Adding volatile is only a start at this.
-*/
-
-typedef struct
-{
-	replpool_identifier	recvpool_id;	/* Shared memory identification */
-	volatile seq_num	start_jnl_seqno;/* The sequence number with which operations started. Initialized by recvr srvr */
-	volatile seq_num	jnl_seqno; 	/* Sequence number of the next transaction expected to be received from source
-			    	 		 * server. Updated by Receiver Server */
-	seq_num			old_jnl_seqno;	/* Stores the value of jnl_seqno before it is set to 0 when upd crash/shut */
-	boolean_t		std_null_coll;	/* Null collation setting for secondary, set by update process, used by recv srvr */
-	uint4			recvdata_base_off; 	/* Receive pool offset from where journal data starts */
-	uint4			recvpool_size; 	/* Available space for journal data in bytes */
-	volatile uint4 		write;		/* Relative offset from recvdata_base_off for for the next journal record to be
-						 * written. Updated by Receiver Server */
-	volatile uint4		write_wrap;	/* Relative offset from recvdata_base_off where write was wrapped by recvr srvr */
-	volatile uint4		wrapped;	/* Boolean, set by Receiver Server when it wraps. Reset by Update Process when it
-						 * wraps. Used for detecting space used in the receive pool */
-	uint4			initialized;	/* Boolean, has receive pool been initialized? */
-	uint4			fresh_start;	/* Boolean, fresh_start or crash_start? */
-} recvpool_ctl_struct;
-
-/*
- * The following structure contains Update Process related data items.
- * Maintaining this structure in the Receive pool provides for
- * persistence across instantiations of the Update Process (across crashes,
- * the receive pool is preserved)
- */
-
-typedef struct
-{
-	uint4		upd_proc_pid;		/* Process identification of update server */
-	uint4		upd_proc_pid_prev;      /* Save for reporting old pid if we fail */
-	volatile seq_num read_jnl_seqno;	/* Next jnl_seqno to be read; keep aligned at 8 byte boundary for performance */
-	volatile uint4	read; 			/* Relative offset from recvdata_base_off of the next journal record to be
-						 * read from the receive pool */
-	volatile uint4	upd_proc_shutdown;      /* Used to communicate shutdown related values between Receiver and Update */
-	volatile int4	upd_proc_shutdown_time; /* Time allowed for update process to shut down */
-	volatile uint4	bad_trans;		/* Boolean, set by Update Process that it received a bad transaction record */
-	volatile uint4	changelog;		/* Boolean - change the log file */
-	int4		start_upd;		/* Used to communicate upd only startup values */
-	boolean_t	updateresync;		/* Same as gtmrecv_options update resync */
-	volatile uint4	log_interval;		/* Interval (in seqnos) at which update process logs its progress */
-	char		log_file[MAX_FN_LEN + 1];
-} upd_proc_local_struct;
-
-/*
- * The following structure contains data items local to the Receiver Server,
- * but are in the Receive Pool to provide for persistence across instantiations
- * of the Receiver Server (across Receiver Server crashes, the Receive
- * Pool is preserved).
- */
-typedef struct
-{
-	uint4		recv_serv_pid;		/* Process identification of receiver server */
-	int4		lastrecvd_time;		/* unused */
-	/* Data items used in communicating action qualifiers (show statistics, shutdown) and
-	 * qualifier values (log file, shutdown time, etc). */
-	volatile uint4	statslog;		/* Boolean - detailed log on/off? */
-	volatile uint4	shutdown;		/* Used to communicate shutdown related values between process initiating shutdown
-					 	 * and Receiver Server */
-	int4		shutdown_time;		/* Time allowed for shutdown in seconds */
-	int4		listen_port;		/* Port at which the Receiver Server is listening */
-	volatile uint4	restart;		/* Used by receiver server to coordinate crash restart with update process */
-	volatile uint4	changelog;		/* Boolean - change the log file */
-	volatile uint4	log_interval;		/* Interval (in seqnos) at which receiver logs its progress */
-	char		filter_cmd[MAX_FILTER_CMD_LEN];	/* Receiver filters incoming records using this process */
-	char		log_file[MAX_FN_LEN + 1];	/* File to log receiver progress */
-	char		statslog_file[MAX_FN_LEN + 1];	/* File to log statistics */
-} gtmrecv_local_struct;
-
-#ifdef VMS
-typedef struct
-{
-	char			name[MAX_GSEC_KEY_LEN];
-	struct dsc$descriptor_s desc;
-	char			filler[3];
-} vms_shm_key;
-#endif
-
-/*
- * The following structure contains data items local to the Update Helpers,
- * but are in the Receive Pool to provide for persistence across instantiations
- * of the Helpers (the Receive Pool is preserved across helper crashes).
- */
-
-typedef struct
-{
-	uint4		helper_pid;	/* Owner of this entry. Non-zero indicates entry occupied */
-	uint4		helper_pid_prev;/* Copy of helper_pid, used to recognize helpers that are now gone and salvage entries */
-	uint4		helper_type;	/* READER or WRITER */
-	volatile uint4	helper_shutdown;/* used to communicate to the helpers to shut down */
-} upd_helper_entry_struct;
-
-typedef struct
-{
-	global_latch_t		pre_read_lock;		/* operated by pre-readers. Used to control access to next_read_offset */
-	volatile uint4		pre_read_offset;	/* updated by updproc, read-only by pre-readers */
-	volatile boolean_t	first_done;		/* pre-readers use this to elect ONE that computes where to begin/resume */
-	volatile uint4		next_read_offset;	/* offset in recvpool of the next record to be pre-read by pre-readers */
-	uint4			start_helpers;		/* TRUE: receiver to start helpers, FALSE: receiver finished helper start */
-	uint4			start_n_readers;	/* start/started these many readers */
-	uint4			start_n_writers;	/* start/started these many writers */
-	uint4			reap_helpers;		/* receiver to salvage slots vacated by dead helpers */
-	upd_helper_entry_struct	helper_list[MAX_UPD_HELPERS];	/* helper information */
-} upd_helper_ctl_struct;
-
-/*
- * Receive pool shared memory layout -
- *
- * recvpool_ctl_struct
- * upd_proc_local_struct
- * gtmrecv_local_struct
- * upd_helper_ctl_struct
- * zero or more journal records
- */
-
-#define RECVPOOL_CTL_SIZE	ROUND_UP(SIZEOF(recvpool_ctl_struct),   CACHELINE_SIZE)
-#define UPD_PROC_LOCAL_SIZE	ROUND_UP(SIZEOF(upd_proc_local_struct), CACHELINE_SIZE)
-#define GTMRECV_LOCAL_SIZE	ROUND_UP(SIZEOF(gtmrecv_local_struct),  CACHELINE_SIZE)
-#define UPD_HELPER_CTL_SIZE	ROUND_UP(SIZEOF(upd_helper_ctl_struct), CACHELINE_SIZE)
-
-#define RECVDATA_BASE_OFF	ROUND_UP(RECVPOOL_CTL_SIZE + UPD_HELPER_CTL_SIZE + GTMRECV_LOCAL_SIZE + UPD_HELPER_CTL_SIZE, \
-						JNL_REC_START_BNDRY)
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(save)
-# pragma pointer_size(long)
-#endif
-
-typedef recvpool_ctl_struct	*recvpool_ctl_ptr_t;
-typedef upd_proc_local_struct	*upd_proc_local_ptr_t;
-typedef gtmrecv_local_struct	*gtmrecv_local_ptr_t;
-typedef	upd_helper_entry_struct	*upd_helper_entry_ptr_t;
-typedef	upd_helper_ctl_struct	*upd_helper_ctl_ptr_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(restore)
-#endif
-
-typedef struct
-{
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	upd_helper_ctl_ptr_t	upd_helper_ctl;
-	sm_uc_ptr_t		recvdata_base;
-#ifdef UNIX
-	gd_region		*recvpool_dummy_reg;
-#elif VMS
-	int4			shm_range[2];
-	int4			shm_lockid;
-	vms_shm_key		vms_recvpool_key;
-#endif
-} recvpool_addrs;
-
-typedef enum
-{
-	UPDPROC,
-	UPD_HELPER_READER,
-	UPD_HELPER_WRITER,
-	GTMRECV
-#ifdef VMS
-	, GTMRECV_CHILD
-#endif
-} recvpool_user;
-
-typedef struct
-{
-	boolean_t	start;
-	boolean_t	shut_down;
-	boolean_t	checkhealth;
-	boolean_t	statslog;
-	boolean_t	showbacklog;
-	boolean_t	updateonly;
-	boolean_t	stopsourcefilter;
-	boolean_t	changelog;
-	int4		buffsize;
-	int4		shutdown_time;
-	int4		listen_port;
-	boolean_t	updateresync;
-	uint4		rcvr_log_interval;
-	uint4		upd_log_interval;
-	boolean_t	helpers;
-	int4		n_readers;
-	int4		n_writers;
-	char            log_file[MAX_FN_LEN + 1];
-	char            filter_cmd[MAX_FILTER_CMD_LEN];
-} gtmrecv_options_t;
-
-#include "gtm_inet.h"
-
-/********** Receiver server function prototypes **********/
-int	gtmrecv(void);
-int	gtmrecv_changelog(void);
-int	gtmrecv_checkhealth(void);
-int	gtmrecv_comm_init(in_port_t port);
-int	gtmrecv_end1(boolean_t auto_shutdown);
-int	gtmrecv_endupd(void);
-void	gtmrecv_end(void);
-int	gtmrecv_get_opt(void);
-int	gtmrecv_poll_actions1(int *pending_data_len, int *buff_unprocessed, unsigned char *buffp);
-int	gtmrecv_poll_actions(int pending_data_len, int buff_unprocessed, unsigned char *buffp);
-void	gtmrecv_process(boolean_t crash_restart);
-int	gtmrecv_showbacklog(void);
-int	gtmrecv_shutdown(boolean_t auto_shutdown, int exit_status);
-void	gtmrecv_sigstop(void);
-void	gtmrecv_autoshutdown(void);
-int	gtmrecv_statslog(void);
-int	gtmrecv_ipc_cleanup(boolean_t auto_shutdown, int *exit_status);
-int	gtmrecv_start_updonly(void);
-int	gtmrecv_upd_proc_init(boolean_t fresh_start);
-int	gtmrecv_wait_for_detach(void);
-void	gtmrecv_exit(int exit_status);
-int	gtmrecv_alloc_msgbuff(void);
-void	gtmrecv_free_msgbuff(void);
-int	gtmrecv_alloc_filter_buff(int bufsiz);
-void	gtmrecv_free_filter_buff(void);
-int	is_updproc_alive(void);
-int	is_srv_alive(int srv_type);
-int	is_recv_srv_alive(void);
-void	recvpool_init(recvpool_user pool_user, boolean_t gtmrecv_startup, boolean_t lock_opt_sem);
-void	gtmrecv_reinit_logseqno(void);
-int	gtmrecv_helpers_init(int n_readers, int n_writers);
-int	gtmrecv_start_helpers(int n_readers, int n_writers);
-void	gtmrecv_reap_helpers(boolean_t wait);
-int	gtmrecv_end_helpers(boolean_t is_rcvr_srvr);
-
-#endif
diff --git a/sr_vvms/gtmrecv_end.c b/sr_vvms/gtmrecv_end.c
deleted file mode 100644
index d943386..0000000
--- a/sr_vvms/gtmrecv_end.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_unistd.h"		/* for close() */
-#include "gtm_string.h"
-
-#ifdef UNIX
-#include "gtm_ipc.h"
-#include <sys/shm.h>
-#include <sys/sem.h>
-#include <sys/wait.h>
-#elif defined(VMS)
-#include <ssdef.h>
-#include <psldef.h>
-#include <descrip.h> /* Required for gtmrecv.h */
-#else
-#error Unsupported platform
-#endif
-#include <errno.h>
-#include "gtm_inet.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "repl_shutdcode.h"
-#include "gtmrecv.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "gtm_event_log.h"
-#include "eintr_wrappers.h"
-#include "jnl.h"
-#include "repl_filter.h"
-#include "repl_msg.h"
-#include "repl_sem.h"
-#ifdef VMS
-#include "repl_shm.h"
-#endif
-#include "repl_log.h"
-#include "is_proc_alive.h"
-
-GBLREF uint4			process_id;
-GBLREF recvpool_addrs		recvpool;
-GBLREF int			gtmrecv_filter;
-GBLREF boolean_t		gtmrecv_logstats;
-GBLREF int			gtmrecv_listen_sock_fd;
-GBLREF int			gtmrecv_sock_fd;
-GBLREF int			gtmrecv_log_fd;
-GBLREF FILE			*gtmrecv_log_fp;
-GBLREF qw_num                  	repl_recv_data_recvd;
-GBLREF qw_num                  	repl_recv_data_processed;
-GBLREF repl_msg_ptr_t		gtmrecv_msgp;
-GBLREF uchar_ptr_t		repl_filter_buff;
-
-int gtmrecv_endupd(void)
-{
-	VMS_ONLY(uint4	savepid;) UNIX_ONLY(pid_t savepid;)
-	int		exit_status;
-	UNIX_ONLY(pid_t	waitpid_res;)
-
-	repl_log(stdout, TRUE, TRUE, "Initiating shut down of Update Process\n");
-	recvpool.upd_proc_local->upd_proc_shutdown = SHUTDOWN;
-	/* Wait for update process to shut down */
-	while(recvpool.upd_proc_local->upd_proc_shutdown == SHUTDOWN &&
-	      (savepid = UNIX_ONLY((pid_t))recvpool.upd_proc_local->upd_proc_pid) > 0 &&
-	      is_proc_alive(savepid, 0))
-	{
-		SHORT_SLEEP(GTMRECV_WAIT_FOR_UPD_SHUTDOWN);
-		UNIX_ONLY(WAITPID(savepid, &exit_status, WNOHANG, waitpid_res);) /* Release defunct update process if dead */
-	}
-	exit_status = recvpool.upd_proc_local->upd_proc_shutdown;
-	if (SHUTDOWN == exit_status)
-	{
-		if (0 == savepid) /* No Update Process */
-			exit_status = NORMAL_SHUTDOWN;
-		else /* Update Process Crashed */
-		{
-			repl_log(stderr, TRUE, TRUE, "Update Process exited abnormally, INTEGRITY CHECK might be warranted\n");
-			exit_status = ABNORMAL_SHUTDOWN;
-		}
-	}
-	/* Wait for the Update Process to detach */
-	if (0 == grab_sem(RECV, UPD_PROC_COUNT_SEM))
-	{
-		if(0 != (errno = rel_sem(RECV, UPD_PROC_COUNT_SEM)))
-			repl_log(stderr, TRUE, TRUE, "Error releasing the Update Process Count semaphore : %s\n", REPL_SEM_ERROR);
-		repl_log(stdout, TRUE, TRUE, "Update Process exited\n");
-	} else
-	{
-		repl_log(stderr, TRUE, TRUE, "Error in update proc count semaphore : %s\n", REPL_SEM_ERROR);
-		exit_status = ABNORMAL_SHUTDOWN;
-	}
-	return (exit_status);
-}
-
-int gtmrecv_end1(boolean_t auto_shutdown)
-{
-	uint4		savepid;
-	int		exit_status;
-	seq_num		log_seqno, log_seqno1;
-	int		fclose_res;
-#ifdef VMS
-	int4		status;
-#endif
-
-	exit_status = gtmrecv_end_helpers(TRUE);
-	exit_status = gtmrecv_endupd();
-	QWASSIGN(log_seqno, recvpool.recvpool_ctl->jnl_seqno);
-	QWASSIGN(log_seqno1, recvpool.upd_proc_local->read_jnl_seqno);
-	/* Detach from receive pool */
-	recvpool.gtmrecv_local->shutdown = exit_status;
-	recvpool.gtmrecv_local->recv_serv_pid = 0;
-	UNIX_ONLY(
-		if (recvpool.recvpool_ctl && 0 > SHMDT(recvpool.recvpool_ctl))
-			repl_log(stderr, TRUE, TRUE, "Error detaching from Receive Pool : %s\n", REPL_STR_ERROR);
-	)
-	VMS_ONLY(
-		if (recvpool.recvpool_ctl)
-		{
-			if (SS$_NORMAL != (status = detach_shm(recvpool.shm_range)))
-				repl_log(stderr, TRUE, TRUE, "Error detaching from recvpool : %s\n", REPL_STR_ERROR);
-			recvpool.recvpool_ctl = NULL;
-			if (!auto_shutdown && (SS$_NORMAL != (status = signoff_from_gsec(recvpool.shm_lockid))))
-				repl_log(stderr, TRUE, TRUE, "Error dequeueing lock on recvpool global section : %s\n",
-														REPL_STR_ERROR);
-		}
-	)
-	gtmrecv_free_msgbuff();
-	gtmrecv_free_filter_buff();
-	recvpool.recvpool_ctl = NULL;
-	/* Close the connection with the Receiver */
-	if (FD_INVALID != gtmrecv_listen_sock_fd)
-		close(gtmrecv_listen_sock_fd);
-	if (FD_INVALID != gtmrecv_sock_fd)
-		close(gtmrecv_sock_fd);
-	QWDECRBYDW(log_seqno, 1);
-	QWDECRBYDW(log_seqno1, 1);
-	repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO - Last Recvd Seqno : %llu  Jnl Total : %llu  Msg Total : %llu\n",
-			log_seqno, repl_recv_data_processed, repl_recv_data_recvd);
-	repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO - Last Seqno processed by update process : %llu\n", log_seqno1);
-	gtm_event_log_close();
-	if (gtmrecv_filter & EXTERNAL_FILTER)
-		repl_stop_filter();
-	if (auto_shutdown)
-		return (exit_status);
-	else
-		gtmrecv_exit(exit_status - NORMAL_SHUTDOWN);
-}
-
-void gtmrecv_end(void)
-{
-	gtmrecv_end1(FALSE);
-}
diff --git a/sr_vvms/gtmrecv_fetchresync.c b/sr_vvms/gtmrecv_fetchresync.c
deleted file mode 100644
index b6f5a97..0000000
--- a/sr_vvms/gtmrecv_fetchresync.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include "gtm_socket.h"
-#include "gtm_netdb.h"
-#include "gtm_inet.h"
-#include "gtm_time.h" /* needed for difftime() definition */
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_string.h"
-#include <errno.h>
-#include <descrip.h> /* Required for gtmsource.h */
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "error.h"
-#include "iosp.h"
-#include "gtmrecv.h"
-#include "repl_comm.h"
-#include "repl_msg.h"
-#include "repl_errno.h"
-#include "repl_dbg.h"
-#include "gtm_logicals.h"
-#include "eintr_wrappers.h"
-#include "repl_sem.h"
-#include "repl_sp.h"
-#include "repl_log.h"
-#include "io.h"
-#include "is_file_identical.h"
-#include "trans_log_name.h"
-
-#define MAX_ATTEMPTS_FOR_FETCH_RESYNC	60 /* max-wait in seconds for source server response after connection is established */
-#define MAX_WAIT_FOR_FETCHRESYNC_CONN	60 /* max-wait in seconds to establish connection with the source server */
-#define FETCHRESYNC_PRIMARY_POLL	(MICROSEC_IN_SEC - 1) /* micro seconds, almost 1 second */
-#define GRAB_SEM_ERR_OUT 		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_RECVPOOLSETUP, 0,\
-					  ERR_TEXT, 2,\
-					  LEN_AND_LIT("Error with receive pool semaphores. Receiver Server possibly exists"))
-
-GBLREF	uint4			process_id;
-GBLREF	int			gtmrecv_listen_sock_fd, gtmrecv_sock_fd;
-GBLREF	struct addrinfo		primary_ai;
-GBLREF	struct sockaddr_storage	primary_sas;
-GBLREF	seq_num			seq_num_zero;
-GBLREF 	jnl_gbls_t		jgbl;
-GBLREF	int			repl_max_send_buffsize, repl_max_recv_buffsize;
-
-error_def(ERR_RECVPOOLSETUP);
-error_def(ERR_REPLCOMM);
-error_def(ERR_TEXT);
-
-CONDITION_HANDLER(gtmrecv_fetchresync_ch)
-{
-	START_CH(FALSE);
-	/* Remove semaphores created */
-	remove_sem_set(RECV);
-	repl_close(&gtmrecv_listen_sock_fd);
-	repl_close(&gtmrecv_sock_fd);
-	PRN_ERROR;
-	NEXTCH;
-}
-
-int gtmrecv_fetchresync(int port, seq_num *resync_seqno)
-{
-	mstr            log_nam, trans_log_nam;
-	char            trans_buff[MAX_FN_LEN+1];
-	key_t		recvpool_key;
-	repl_msg_t	msg;
-	unsigned char	*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int		tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int		torecv_len, recvd_len, recvd_this_iter;	/* needed for REPL_RECV_LOOP */
-	int		status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	fd_set		input_fds;
-	int		wait_count;
-	char		seq_num_str[32], *seq_num_ptr, err_string[1024];
-	pid_t		rollback_pid;
-	int		rollback_status;
-	int		wait_status;
-	gd_id		file_id;
-	struct dsc$descriptor_s name_dsc;
-	char			res_name[MAX_NAME_LEN + 2]; /* +1 for the terminator and another +1 for the length stored in [0]
-								by global_name() */
-	mstr			res_name_str;
-	time_t			t1, t2;
-	struct timeval	gtmrecv_fetchresync_max_wait;
-
-	recvpool_key = -1;
-	ESTABLISH(gtmrecv_fetchresync_ch);
-	QWASSIGN(*resync_seqno, seq_num_zero);
-	/* Verify that a receiver server is not already running */
-	log_nam.addr = GTM_GBLDIR;
-	log_nam.len = SIZEOF(GTM_GBLDIR) - 1;
-	if (trans_log_name(&log_nam, &trans_log_nam, trans_buff) != SS_NORMAL)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-				LEN_AND_LIT("gtmgbldir not defined"));
-	trans_buff[trans_log_nam.len] = '\0';
-	gtmrecv_fetchresync_max_wait.tv_sec = MAX_WAIT_FOR_FETCHRESYNC_CONN;
-	gtmrecv_fetchresync_max_wait.tv_usec = 0;
-	/* Get Recv. Pool Resource Name : name_dsc holds the resource name */
-	set_gdid_from_file((gd_id_ptr_t)&file_id, trans_buff, trans_log_nam.len);
-	global_name("GT$R", &file_id, res_name); /* R - Stands for Receiver Pool */
-	name_dsc.dsc$a_pointer = &res_name[1];
-        name_dsc.dsc$w_length = res_name[0];
-        name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-        name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	name_dsc.dsc$a_pointer[name_dsc.dsc$w_length] = '\0';
-	if (0 != init_sem_set_recvr(&name_dsc))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_RECVPOOLSETUP, 0,
-				       ERR_TEXT, 2, LEN_AND_LIT("Error with receiver pool sem init."), REPL_SEM_ERRNO);
-	/* Lock all access to receive pool */
-	status = grab_sem_immediate(RECV, RECV_POOL_ACCESS_SEM);
-	if (0 == status)
-		status = grab_sem_immediate(RECV, RECV_SERV_COUNT_SEM);
-	else
-		GRAB_SEM_ERR_OUT;
-	if (0 == status)
-		status = grab_sem_immediate(RECV, UPD_PROC_COUNT_SEM);
-	else
-	{
-		rel_sem(RECV, RECV_POOL_ACCESS_SEM);
-		GRAB_SEM_ERR_OUT;
-	}
-	if (0 == status)
-		status = grab_sem_immediate(RECV, RECV_SERV_OPTIONS_SEM);
-	else
-	{
-		rel_sem(RECV, RECV_POOL_ACCESS_SEM);
-		rel_sem(RECV, RECV_SERV_COUNT_SEM);
-		GRAB_SEM_ERR_OUT;
-	}
-	if (0 != status)
-	{
-		rel_sem(RECV, RECV_POOL_ACCESS_SEM);
-		rel_sem(RECV, RECV_SERV_COUNT_SEM);
-		rel_sem(RECV, UPD_PROC_COUNT_SEM);
-		GRAB_SEM_ERR_OUT;
-	}
-	/* Global section shouldn't already exist */
-	if (shm_exists(RECV, &name_dsc))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_RECVPOOLSETUP, 0,
-			ERR_TEXT, 2, LEN_AND_LIT("Receive pool exists. Receiver Server possibly exists already!"));
-	gtmrecv_comm_init(port);
-	primary_ai.ai_addr = (sockaddr_ptr)&primary_sas;
-	primary_ai.ai_addrlen = SIZEOF(primary_sas);
-	repl_log(stdout, TRUE, TRUE, "Waiting for a connection...\n");
-	assertpro(FD_SETSIZE > gtmrecv_listen_sock_fd);
-	FD_ZERO(&input_fds);
-	FD_SET(gtmrecv_listen_sock_fd, &input_fds);
-	t1 = time(NULL);
-	while ((status = select(gtmrecv_listen_sock_fd + 1, &input_fds, NULL, NULL, &gtmrecv_fetchresync_max_wait)) < 0)
-	{
-		if (errno == EINTR || errno == EAGAIN)
-		{
-			t2 = time(NULL);
-			if (0 >= (int)(gtmrecv_fetchresync_max_wait.tv_sec =
-					(MAX_WAIT_FOR_FETCHRESYNC_CONN - (int)difftime(t2, t1))))
-			{
-				status = 0;
-				break;
-			}
-			gtmrecv_fetchresync_max_wait.tv_usec = 0;
-			FD_SET(gtmrecv_listen_sock_fd, &input_fds);
-			continue;
-		} else
-		{
-			status = ERRNO;
-			SNPRINTF(err_string, SIZEOF(err_string), "Error in select on listen socket : %s", STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-		}
-	}
-	if (status == 0)
-	{
-		repl_log(stdout, TRUE, TRUE, "Waited about %d seconds for connection from primary source server\n",
-				MAX_WAIT_FOR_FETCHRESYNC_CONN);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-				LEN_AND_LIT("Waited too long to get a connection request. Check if primary is alive."));
-	}
-
-	ACCEPT_SOCKET(gtmrecv_listen_sock_fd, primary_ai.ai_addr, (sssize_t *)&primary_ai.ai_addrlen, gtmrecv_sock_fd);
-	if (gtmrecv_sock_fd < 0)
-	{
-		status = ERRNO;
-		SNPRINTF(err_string, SIZEOF(err_string), "Error accepting connection from Source Server : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-	}
-	repl_log(stdout, TRUE, TRUE, "Connection established\n");
-	repl_close(&gtmrecv_listen_sock_fd);
-	if (0 != (status = get_send_sock_buff_size(gtmrecv_sock_fd, &repl_max_send_buffsize))
-		|| 0 != (status = get_recv_sock_buff_size(gtmrecv_sock_fd, &repl_max_recv_buffsize)))
-	{
-		SNPRINTF(err_string, SIZEOF(err_string), "Error getting socket send/recv bufsizes : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-		return ERR_REPLCOMM;
-	}
-	msg.type = REPL_FETCH_RESYNC;
-	memset(&msg.msg[0], 0, MIN_REPL_MSGLEN - REPL_MSG_HDRLEN);
-	QWASSIGN(*(seq_num *)&msg.msg[0], jgbl.max_resync_seqno);
-	msg.len = MIN_REPL_MSGLEN;
-	REPL_SEND_LOOP(gtmrecv_sock_fd, &msg, msg.len, REPL_POLL_NOWAIT);
-		; /* Empty Body */
-	if (status != SS_NORMAL)
-	{
-		if (repl_errno == EREPL_SEND)
-		{
-			SNPRINTF(err_string, SIZEOF(err_string), "Error sending FETCH RESYNC message. Error in send : %s",
-				 STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-		}
-		if (repl_errno == EREPL_SELECT)
-		{
-			SNPRINTF(err_string, SIZEOF(err_string), "Error sending FETCH RESYNC message. Error in select : %s",
-				 STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-		}
-	}
-	wait_count = MAX_ATTEMPTS_FOR_FETCH_RESYNC;
-	REPL_RECV_LOOP(gtmrecv_sock_fd, &msg, MIN_REPL_MSGLEN, REPL_POLL_WAIT)
-	{
-		if (0 >= wait_count)
-			break;
-		repl_log(stdout, TRUE, TRUE, "Waiting for FETCH RESYNC\n");
-		wait_count--;
-	}
-	if (status != SS_NORMAL)
-	{
-		if (repl_errno == EREPL_RECV)
-		{
-			SNPRINTF(err_string, SIZEOF(err_string), "Error receiving RESYNC JNLSEQNO. Error in recv : %s",
-				 STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-		}
-		if (repl_errno == EREPL_SELECT)
-		{
-			SNPRINTF(err_string, SIZEOF(err_string), "Error receiving RESYNC JNLSEQNO. Error in select : %s",
-				 STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(err_string));
-		}
-	}
-	if (wait_count <= 0)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-			LEN_AND_LIT("Waited too long to get fetch resync message from primary. Check if primary is alive."));
-	REVERT;
-	QWASSIGN(*resync_seqno, *(seq_num *)&msg.msg[0]);
-	repl_log(stdout, TRUE, TRUE, "Received RESYNC SEQNO is "INT8_FMT"\n", INT8_PRINT(*resync_seqno));
-	/* Fork a child which will do the rest of the roll-back. The parent
-	 * waits till the Source server signals completion of its task on
-	 * receiving FETCH_RESYNC -- To be done on VMS. As of now it is sequential on VMS.
-	 * The functionality doesn't get affected while the performance may
-	 * suffer
-	 */
-	rel_sem_immediate(RECV, RECV_SERV_COUNT_SEM);
-	/* Wait till connection is broken or REPL_CONN_CLOSE is received */
-	REPL_RECV_LOOP(gtmrecv_sock_fd, &msg, MIN_REPL_MSGLEN, REPL_POLL_WAIT)
-	{
-		REPL_DPRINT1("FETCH_RESYNC : Waiting for source to send CLOSE_CONN or connection breakage\n");
-	}
-	repl_close(&gtmrecv_sock_fd);
-	remove_sem_set(RECV);
-	return(SS_NORMAL);
-}
-
-int gtmrecv_wait_for_detach(void)
-{	/* Wait till parent detaches from all regions and releases receiver server count lock.
-	 * Release the semaphore to protect against hang if this function is re-entered.
-	 * Releasing is ok since this semaphore has no use once the parent has detached from the regions
-	 */
-	if (0 == grab_sem(RECV, RECV_SERV_COUNT_SEM) && 0 == rel_sem(RECV, RECV_SERV_COUNT_SEM))
-		return(SS_NORMAL);
-	return(REPL_SEM_ERRNO);
-}
diff --git a/sr_vvms/gtmrecv_poll_actions.c b/sr_vvms/gtmrecv_poll_actions.c
deleted file mode 100644
index e84484f..0000000
--- a/sr_vvms/gtmrecv_poll_actions.c
+++ /dev/null
@@ -1,446 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2008, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-#include "gtm_unistd.h"
-#include "gtm_time.h"
-#include <sys/wait.h>
-#include <errno.h>
-#include "gtm_inet.h"
-#include <descrip.h> /* Required for gtmrecv.h */
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_shutdcode.h"
-
-#include "gtmrecv.h"
-#include "repl_comm.h"
-#include "repl_msg.h"
-#include "repl_dbg.h"
-#include "repl_log.h"
-#include "repl_errno.h"
-#include "iosp.h"
-#include "eintr_wrappers.h"
-#include "gt_timer.h"
-#include "gtmio.h"
-
-#include "util.h"
-#include "tp_change_reg.h"
-
-GBLREF	repl_msg_ptr_t		gtmrecv_msgp;
-GBLREF	int			gtmrecv_max_repl_msglen;
-GBLREF	int			gtmrecv_listen_sock_fd;
-GBLREF	int			gtmrecv_sock_fd;
-GBLREF	boolean_t		repl_connection_reset;
-GBLREF	recvpool_addrs		recvpool;
-GBLREF	int			gtmrecv_log_fd;
-GBLREF 	FILE			*gtmrecv_log_fp;
-GBLREF	boolean_t		gtmrecv_logstats;
-GBLREF	boolean_t		gtmrecv_wait_for_jnl_seqno;
-GBLREF	boolean_t		gtmrecv_bad_trans_sent;
-GBLREF	pid_t			updproc_pid;
-GBLREF	uint4			log_interval;
-GBLREF	volatile time_t		gtmrecv_now;
-
-error_def(ERR_REPLCOMM);
-error_def(ERR_RECVPOOLSETUP);
-error_def(ERR_TEXT);
-
-#ifdef INT8_SUPPORTED
-static	seq_num			last_ack_seqno = 0;
-#else
-static	seq_num			last_ack_seqno = {0, 0};
-#endif
-
-#define GTMRECV_NEXT_REPORT_FACTOR	2
-
-enum
-{
-	CONTINUE_POLL,
-	STOP_POLL
-};
-
-int gtmrecv_poll_actions1(int *pending_data_len, int *buff_unprocessed, unsigned char *buffp)
-{
-	static int		report_cnt = 1;
-	static int		next_report_at = 1;
-	static boolean_t	send_xoff = FALSE;
-	static boolean_t	xoff_sent = FALSE;
-	static boolean_t	log_draining_msg = FALSE;
-	static boolean_t	send_badtrans = FALSE;
-	static boolean_t	upd_shut_too_early_logged = FALSE;
-	static repl_msg_t	xoff_msg, bad_trans_msg;
- 	static time_t		last_reap_time = 0;
-
-	boolean_t		alert = FALSE, info = FALSE;
-	int			return_status;
-	gd_region       	*region_top;
-	unsigned char		*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int			tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int			torecv_len, recvd_len, recvd_this_iter;	/* needed for REPL_RECV_LOOP */
-	int			status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	int			temp_len, pending_msg_size;
-	int			upd_start_status, upd_start_attempts;
-	int			buffered_data_len;
-	int			upd_exit_status;
-	boolean_t		bad_trans_detected = FALSE;
-	uint4			jnl_status;
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
- 	upd_helper_ctl_ptr_t	upd_helper_ctl;
-
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
- 	upd_helper_ctl = recvpool.upd_helper_ctl;
-	jnl_status = 0;
-	if (SHUTDOWN == gtmrecv_local->shutdown)
-	{
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, "Shutdown signalled\n");
-		gtmrecv_end(); /* Won't return */
-	}
-	/* Reset report_cnt and next_report_at to 1 when a new upd proc is forked */
-	if (1 == report_cnt || report_cnt == next_report_at)
-	{
-		if ((alert =
-		     (NO_SHUTDOWN == upd_proc_local->upd_proc_shutdown
-		      && SRV_DEAD == is_updproc_alive() &&
-		      NO_SHUTDOWN == upd_proc_local->upd_proc_shutdown)) ||
-		    (info = ((NORMAL_SHUTDOWN == upd_proc_local->upd_proc_shutdown ||
-			     ABNORMAL_SHUTDOWN == upd_proc_local->upd_proc_shutdown)) &&
-		     	     SRV_DEAD == is_updproc_alive()))
-		{
-			if (alert)
-				repl_log(gtmrecv_log_fp, TRUE, TRUE,
-					"ALERT : Receiver Server detected that Update Process is not ALIVE\n");
-			else
-				repl_log(gtmrecv_log_fp, TRUE, TRUE,
-					"INFO : Update process not running. User initiated Update Process shutdown was done\n");
-			if (1 == report_cnt)
-			{
-				send_xoff = TRUE;
-				QWASSIGN(recvpool_ctl->old_jnl_seqno, recvpool_ctl->jnl_seqno);
-				QWASSIGNDW(recvpool_ctl->jnl_seqno, 0);
-				upd_proc_local->bad_trans = FALSE; /* No point in doing bad transaction processing */
-			}
-			gtmrecv_wait_for_jnl_seqno = TRUE;
-			REPL_DPRINT1(
-			       "gtmrecv_poll_actions : Setting gtmrecv_wait_for_jnl_seqno to TRUE because of upd crash/shutdown\n");
-			next_report_at *= GTMRECV_NEXT_REPORT_FACTOR;
-			report_cnt++;
-		}
-	} else
-		report_cnt++;
-
-	if (upd_proc_local->bad_trans && !send_badtrans)
-	{
-		send_xoff = TRUE;
-		send_badtrans = TRUE;
-		bad_trans_detected = TRUE;
-	} else if (!upd_proc_local->bad_trans && send_badtrans && 1 != report_cnt)
-	{
-		send_badtrans = FALSE;
-		bad_trans_detected = FALSE;
-	}
-	if (send_xoff && !xoff_sent && (FD_INVALID != gtmrecv_sock_fd))
-	{
-		/* Send XOFF */
-		xoff_msg.type = REPL_XOFF_ACK_ME;
-		memcpy((uchar_ptr_t)&xoff_msg.msg[0], (uchar_ptr_t)&upd_proc_local->read_jnl_seqno, SIZEOF(seq_num));
-		xoff_msg.len = MIN_REPL_MSGLEN;
-		REPL_SEND_LOOP(gtmrecv_sock_fd, &xoff_msg, xoff_msg.len, REPL_POLL_NOWAIT)
-			; /* Empty Body */
-		if (SS_NORMAL != status)
-		{
-			if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-			{
-				repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection reset while sending XOFF_ACK_ME. "
-						"Status = %d ; %s\n", status, STRERROR(status));
-				repl_close(&gtmrecv_sock_fd);
-				repl_connection_reset = TRUE;
-				xoff_sent = FALSE;
-				send_badtrans = FALSE;
-			} else if (EREPL_SEND == repl_errno)
-				rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-					LEN_AND_LIT("Error sending XOFF msg due to BAD_TRANS or UPD crash/shutdown. "
-							"Error in send"), status);
-			else if (EREPL_SELECT == repl_errno)
-				rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-					LEN_AND_LIT("Error sending XOFF msg due to BAD_TRANS or UPD crash/shutdown. "
-							"Error in select"), status);
-		} else
-		{
-			xoff_sent = TRUE;
-			log_draining_msg = TRUE;
-		}
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL_XOFF_ACK_ME sent due to upd shutdown/crash or bad trans\n");
-		send_xoff = FALSE;
-	} else if (send_xoff && !xoff_sent && repl_connection_reset)
-	{
-		send_xoff = FALSE; /* connection has been lost, no point sending XOFF */
-		send_badtrans = FALSE;
-	}
-	/* Drain pipe */
-	if (xoff_sent)
-	{
-		if (log_draining_msg)
-		{ /* avoid multiple logs per instance */
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO - Draining replication pipe due to %s\n",
-					send_badtrans ? "BAD_TRANS" : "UPD shutdown/crash");
-			log_draining_msg = FALSE;
-		}
-		if (0 != *buff_unprocessed)
-		{
-			/* Throw away the current contents of the buffer */
-			buffered_data_len = ((*pending_data_len <= *buff_unprocessed) ? *pending_data_len : *buff_unprocessed);
-			*buff_unprocessed -= buffered_data_len;
-			buffp += buffered_data_len;
-			*pending_data_len -= buffered_data_len;
-			REPL_DPRINT2("gtmrecv_poll_actions : (1) Throwing away %d bytes from old buffer while draining\n",
-					buffered_data_len);
-			while (REPL_MSG_HDRLEN <= *buff_unprocessed)
-			{
-				assert(0 == ((unsigned long)buffp & (SIZEOF(((repl_msg_ptr_t)buffp)->type) - 1)));
-				*pending_data_len = ((repl_msg_ptr_t)buffp)->len;
-				buffered_data_len = ((*pending_data_len <= *buff_unprocessed) ?
-								*pending_data_len : *buff_unprocessed);
-				*buff_unprocessed -= buffered_data_len;
-				buffp += buffered_data_len;
-				*pending_data_len -= buffered_data_len;
-				REPL_DPRINT2("gtmrecv_poll_actions : (2) Throwing away %d bytes from old buffer while draining\n",
-						buffered_data_len);
-			}
-			if (0 < *buff_unprocessed)
-			{
-				memmove((unsigned char *)gtmrecv_msgp, buffp, *buff_unprocessed);
-				REPL_DPRINT2("gtmrecv_poll_actions : Incomplete header of length %d while draining\n",
-						*buff_unprocessed);
-			}
-		}
-		status = SS_NORMAL;
-		if (0 != *buff_unprocessed || 0 == *pending_data_len)
-		{
-			/* Receive the header of a message */
-			REPL_RECV_LOOP(gtmrecv_sock_fd, ((unsigned char *)gtmrecv_msgp) + *buff_unprocessed,
-				       (REPL_MSG_HDRLEN - *buff_unprocessed), REPL_POLL_WAIT)
-				; /* Empty Body */
-
-			REPL_DPRINT3("gtmrecv_poll_actions : Received %d type of message of length %d while draining\n",
-					((repl_msg_ptr_t)gtmrecv_msgp)->type, ((repl_msg_ptr_t)gtmrecv_msgp)->len);
-		}
-		if (SS_NORMAL == status &&
-				(0 != *buff_unprocessed || 0 == *pending_data_len) && REPL_XOFF_ACK == gtmrecv_msgp->type)
-		{
-			/* The rest of the XOFF_ACK msg */
-			REPL_RECV_LOOP(gtmrecv_sock_fd, gtmrecv_msgp, (MIN_REPL_MSGLEN - REPL_MSG_HDRLEN), REPL_POLL_WAIT)
-				; /* Empty Body */
-			if (SS_NORMAL == status)
-			{
-				repl_log(gtmrecv_log_fp, TRUE, TRUE,
-						"REPL INFO - XOFF_ACK received. Drained replication pipe completely\n");
-				upd_shut_too_early_logged = FALSE;
-				xoff_sent = FALSE;
-				return_status = STOP_POLL;
-			}
-		} else if (SS_NORMAL == status)
-		{
-			/* Drain the rest of the message */
-			pending_msg_size = ((*pending_data_len > 0) ? *pending_data_len : gtmrecv_msgp->len - REPL_MSG_HDRLEN);
-			REPL_DPRINT2("gtmrecv_poll_actions : Throwing away %d bytes from pipe\n", pending_msg_size);
-			for (; SS_NORMAL == status && 0 < pending_msg_size;
-			     pending_msg_size -= gtmrecv_max_repl_msglen)
-			{
-				temp_len = (pending_msg_size < gtmrecv_max_repl_msglen)? pending_msg_size : gtmrecv_max_repl_msglen;
-				REPL_RECV_LOOP(gtmrecv_sock_fd, gtmrecv_msgp, temp_len, REPL_POLL_WAIT)
-					; /* Empty Body */
-			}
-			*buff_unprocessed = 0; *pending_data_len = 0;
-			if (SS_NORMAL == status && info && !upd_shut_too_early_logged)
-			{
-				repl_log(gtmrecv_log_fp, TRUE, TRUE, "ALERT : User initiated shutdown of Update Process done "
-						"when there was data in the replication pipe\n");
-				upd_shut_too_early_logged = TRUE;
-			}
-			return_status = CONTINUE_POLL;
-		}
-		if (SS_NORMAL != status)
-		{
-			if (EREPL_RECV == repl_errno)
-			{
-				if (REPL_CONN_RESET(status))
-				{
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection reset while receiving XOFF_ACK. "
-							"Status = %d ; %s\n", status, STRERROR(status));
-					repl_close(&gtmrecv_sock_fd);
-					repl_connection_reset = TRUE;
-					xoff_sent = FALSE;
-					send_badtrans = FALSE;
-					return_status = STOP_POLL;
-				} else
-					rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_LIT("Error while draining replication pipe. Error in recv"), status);
-			} else if (EREPL_SELECT == repl_errno)
-			{
-				rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-					LEN_AND_LIT("Error while draining replication pipe. Error in select"), status);
-			}
-		}
-	} else
-		return_status = STOP_POLL;
-
-	if (STOP_POLL == return_status && send_badtrans && (FD_INVALID != gtmrecv_sock_fd))
-	{
-		/* Send BAD_TRANS */
-		bad_trans_msg.type = REPL_BADTRANS;
-		memcpy((uchar_ptr_t)&bad_trans_msg.msg[0], (uchar_ptr_t)&upd_proc_local->read_jnl_seqno, SIZEOF(seq_num));
-		bad_trans_msg.len = MIN_REPL_MSGLEN;
-		REPL_SEND_LOOP(gtmrecv_sock_fd, &bad_trans_msg, bad_trans_msg.len, REPL_POLL_NOWAIT)
-			; /* Empty Body */
-		if (SS_NORMAL == status)
-		{
-			repl_log(gtmrecv_log_fp, TRUE, TRUE,
-					"REPL_BADTRANS sent with seqno %llu\n", upd_proc_local->read_jnl_seqno);
-		} else
-		{
-			if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-			{
-				repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection reset while sending REPL_BADTRANS. "
-						"Status = %d ; %s\n", status, STRERROR(status));
-				repl_close(&gtmrecv_sock_fd);
-				repl_connection_reset = TRUE;
-				return_status = STOP_POLL;
-			} else if (EREPL_SEND == repl_errno)
-				rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_LIT("Error sending BAD_TRANS. Error in send"), status);
-			else if (EREPL_SELECT == repl_errno)
-				rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_LIT("Error sending BAD_TRANS. Error in select"), status);
-		}
-		send_badtrans = FALSE;
-	}
-	if (upd_proc_local->bad_trans && bad_trans_detected ||
-	    UPDPROC_START == upd_proc_local->start_upd && 1 != report_cnt)
-	{
-		if (UPDPROC_START == upd_proc_local->start_upd)
-		{
-			assert(is_updproc_alive() != SRV_ALIVE);
-			upd_proc_local->upd_proc_shutdown = NO_SHUTDOWN;
-		}
-		recvpool_ctl->wrapped = FALSE;
-		recvpool_ctl->write_wrap = recvpool_ctl->recvpool_size;
-		recvpool_ctl->write = 0;
-		if (UPDPROC_START == upd_proc_local->start_upd)
-		{
-			/* Attempt starting the update process */
-			for (upd_start_attempts = 0;
-	     		     UPDPROC_START_ERR == (upd_start_status = gtmrecv_upd_proc_init(FALSE)) &&
-			     GTMRECV_MAX_UPDSTART_ATTEMPTS > upd_start_attempts;
-	     		     upd_start_attempts++)
-			{
-				if (EREPL_UPDSTART_SEMCTL == repl_errno || EREPL_UPDSTART_BADPATH == repl_errno)
-				{
-					gtmrecv_autoshutdown();
-				} else if (EREPL_UPDSTART_FORK == repl_errno)
-				{
-					/* Couldn't start up update now, can try later */
-					LONG_SLEEP(GTMRECV_WAIT_FOR_PROC_SLOTS);
-					continue;
-				} else if (EREPL_UPDSTART_EXEC == repl_errno)
-				{
-					/* In forked child, could not exec, should exit */
-					gtmrecv_exit(ABNORMAL_SHUTDOWN);
-				}
-			}
-			if (UPDPROC_STARTED == (upd_proc_local->start_upd = upd_start_status))
-			{
-				REPL_DPRINT1("gtmrecv_poll_actions : Setting gtmrecv_wait_for_jnl_seqno to TRUE because of "
-					     "upd restart\n");
-				gtmrecv_wait_for_jnl_seqno = TRUE;
-				report_cnt = next_report_at = 1;
-				if (send_xoff && (FD_INVALID == gtmrecv_sock_fd))
-				{
-					/* Update start command was issued before connection was established,
-					 * no point in sending XOFF.  */
-					send_xoff = FALSE;
-				}
-			} else
-			{
-				repl_log(gtmrecv_log_fp, TRUE, TRUE, "%d failed attempts to fork update process. Try later\n",
-					 upd_start_attempts);
-			}
-		} else
-		{
-			REPL_DPRINT1("gtmrecv_poll_actions : Setting gtmrecv_wait_for_jnl_seqno to TRUE because bad trans sent\n");
-			gtmrecv_wait_for_jnl_seqno = TRUE;/* set this to TRUE to break out and go back to a fresh "do_main_loop" */
-			gtmrecv_bad_trans_sent = TRUE;
-			QWASSIGN(recvpool_ctl->jnl_seqno, upd_proc_local->read_jnl_seqno); /* This was the bad transaction */
-			upd_proc_local->bad_trans = FALSE;
-		}
-	}
-	if (0 == *pending_data_len && 0 != gtmrecv_local->changelog)
-	{
-		if (gtmrecv_local->changelog & REPLIC_CHANGE_LOGINTERVAL)
-		{
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Changing log interval from %u to %u\n",
-					log_interval, gtmrecv_local->log_interval);
-			log_interval = gtmrecv_local->log_interval;
-			gtmrecv_reinit_logseqno(); /* will force a LOG on the first recv following the interval change */
-		}
-		if (gtmrecv_local->changelog & REPLIC_CHANGE_LOGFILE)
-		{
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Changing log file to %s\n", gtmrecv_local->log_file);
-			util_log_open(STR_AND_LEN(gtmrecv_local->log_file));
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Change log to %s successful\n",gtmrecv_local->log_file);
-		}
-		upd_proc_local->changelog = gtmrecv_local->changelog; /* Ask the update process to changelog request */
-		/* NOTE: update process and receiver each ignore any setting specific to the other (REPLIC_CHANGE_UPD_LOGINTERVAL,
-		 * REPLIC_CHANGE_LOGINTERVAL) */
-		gtmrecv_local->changelog = 0;
-	}
-	if (0 == *pending_data_len && !gtmrecv_logstats && gtmrecv_local->statslog)
-	{
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, "Stats logging not supported on VMS\n");
-	} else if (0 == *pending_data_len && gtmrecv_logstats && !gtmrecv_local->statslog)
-	{
-		gtmrecv_logstats = FALSE;
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, "End statistics logging\n");
-	}
- 	if (0 == *pending_data_len)
-  	{
- 		if (upd_helper_ctl->start_helpers)
-  		{
- 			gtmrecv_helpers_init(upd_helper_ctl->start_n_readers, upd_helper_ctl->start_n_writers);
- 			upd_helper_ctl->start_helpers = FALSE;
-  		}
- 		if (HELPER_REAP_NONE != (status = upd_helper_ctl->reap_helpers) ||
-			(double)GTMRECV_REAP_HELPERS_INTERVAL <= difftime(gtmrecv_now, last_reap_time))
- 		{
- 			gtmrecv_reap_helpers(HELPER_REAP_WAIT == status);
- 			last_reap_time = gtmrecv_now;
-  		}
-  	}
-	return (return_status);
-}
-
-int gtmrecv_poll_actions(int pending_data_len, int buff_unprocessed, unsigned char *buffp)
-{
-	while (CONTINUE_POLL == gtmrecv_poll_actions1(&pending_data_len, &buff_unprocessed, buffp));
-	return (SS_NORMAL);
-}
diff --git a/sr_vvms/gtmrecv_process.c b/sr_vvms/gtmrecv_process.c
deleted file mode 100644
index 41711df..0000000
--- a/sr_vvms/gtmrecv_process.c
+++ /dev/null
@@ -1,1111 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2014 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include "gtm_netdb.h"
-#include "gtm_time.h"
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-#include "gtm_select.h"
-
-#include <sys/time.h>
-#include <errno.h>
-#ifdef VMS
-#include <descrip.h> /* Required for gtmrecv.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gtmrecv.h"
-#include "repl_comm.h"
-#include "repl_msg.h"
-#include "repl_dbg.h"
-#include "repl_errno.h"
-#include "iosp.h"
-#include "gtm_event_log.h"
-#include "eintr_wrappers.h"
-#include "jnl.h"
-#include "repl_sp.h"
-#include "repl_filter.h"
-#include "repl_log.h"
-#include "gtmsource.h"
-#include "sgtm_putmsg.h"
-#include "gt_timer.h"
-#include "min_max.h"
-#include "error.h"
-#include "copy.h"
-#include "memcoherency.h"
-#include "replgbl.h"
-
-#define RECVBUFF_REPLMSGLEN_FACTOR 		8
-
-#define GTMRECV_WAIT_FOR_STARTJNLSEQNO		100 /* ms */
-
-#define GTMRECV_WAIT_FOR_UPD_PROGRESS		100 /* ms */
-#define GTMRECV_WAIT_FOR_UPD_PROGRESS_US	(GTMRECV_WAIT_FOR_UPD_PROGRESS * 1000) /* micro sec */
-
-/* By having different high and low watermarks, we can reduce the # of XOFF/XON exchanges */
-#define RECVPOOL_HIGH_WATERMARK_PCTG		90	/* Send XOFF when %age of receive pool space occupied goes beyond this */
-#define RECVPOOL_LOW_WATERMARK_PCTG		80	/* Send XON when %age of receive pool space occupied falls below this */
-#define RECVPOOL_XON_TRIGGER_SIZE		(1 * 1024 * 1024) /* Keep the low water mark within this amount of high water mark
-								   * so that we don't wait too long to send XON */
-
-#define GTMRECV_XOFF_LOG_CNT			100
-
-#define GTMRECV_HEARTBEAT_PERIOD		10	/* seconds, timer that goes off every this period is the time keeper for
-							 * receiver server; used to reduce calls to time related systemc calls */
-
-GBLDEF	repl_msg_ptr_t		gtmrecv_msgp;
-GBLDEF	int			gtmrecv_max_repl_msglen;
-GBLDEF	int			gtmrecv_sock_fd = FD_INVALID;
-GBLDEF	boolean_t		repl_connection_reset = FALSE;
-GBLDEF	boolean_t		gtmrecv_wait_for_jnl_seqno = FALSE;
-GBLDEF	boolean_t		gtmrecv_bad_trans_sent = FALSE;
-GBLDEF	struct addrinfo		primary_ai;
-GBLDEF	struct sockaddr_storage	primary_sas;
-
-GBLDEF	qw_num			repl_recv_data_recvd = 0;
-GBLDEF	qw_num			repl_recv_data_processed = 0;
-GBLDEF	qw_num			repl_recv_prefltr_data_procd = 0;
-GBLDEF	qw_num			repl_recv_lastlog_data_recvd = 0;
-GBLDEF	qw_num			repl_recv_lastlog_data_procd = 0;
-
-GBLDEF	time_t			repl_recv_prev_log_time;
-GBLDEF	time_t			repl_recv_this_log_time;
-GBLDEF	volatile time_t		gtmrecv_now = 0;
-
-GBLREF  gtmrecv_options_t	gtmrecv_options;
-GBLREF	int			gtmrecv_listen_sock_fd;
-GBLREF	recvpool_addrs		recvpool;
-GBLREF  boolean_t               gtmrecv_logstats;
-GBLREF	int			gtmrecv_filter;
-GBLREF	int			gtmrecv_log_fd;
-GBLREF	FILE			*gtmrecv_log_fp;
-GBLREF	seq_num			seq_num_zero, seq_num_one, seq_num_minus_one;
-GBLREF	unsigned char		jnl_ver, remote_jnl_ver;
-GBLREF	unsigned char		*repl_filter_buff;
-GBLREF	int			repl_filter_bufsiz;
-GBLREF	unsigned int		jnl_source_datalen, jnl_dest_maxdatalen;
-GBLREF	unsigned char		jnl_source_rectype, jnl_dest_maxrectype;
-GBLREF	int			repl_max_send_buffsize, repl_max_recv_buffsize;
-GBLREF	boolean_t 		primary_side_std_null_coll;
-GBLREF	boolean_t		primary_side_trigger_support;
-GBLREF	boolean_t 		secondary_side_std_null_coll;
-GBLREF	boolean_t		secondary_side_trigger_support;
-GBLREF	seq_num			lastlog_seqno;
-GBLREF	uint4			log_interval;
-GBLREF	qw_num			trans_recvd_cnt, last_log_tr_recvd_cnt;
-
-error_def(ERR_JNLNEWREC);
-error_def(ERR_JNLRECFMT);
-error_def(ERR_JNLSETDATA2LONG);
-error_def(ERR_REPLCOMM);
-error_def(ERR_REPLGBL2LONG);
-error_def(ERR_REPLTRANS2BIG);
-error_def(ERR_REPLWARN);
-error_def(ERR_TEXT);
-error_def(ERR_UNIMPLOP);
-
-static	unsigned char	*buffp, *buff_start, *msgbuff, *filterbuff;
-static	int		buff_unprocessed;
-static	int		buffered_data_len;
-static	int		max_recv_bufsiz;
-static	int		data_len;
-static 	boolean_t	xoff_sent;
-static	repl_msg_t	xon_msg, xoff_msg;
-static	int		xoff_msg_log_cnt = 0;
-static	long		recvpool_high_watermark, recvpool_low_watermark;
-static	uint4		write_loc, write_wrap;
-static  uint4		write_len, write_off,
-			pre_filter_write_len, pre_filter_write, pre_intlfilter_datalen;
-static	double		time_elapsed;
-static	int		recvpool_size;
-static	int		heartbeat_period;
-
-static void do_flow_control(uint4 write_pos)
-{
-	/* Check for overflow before writing */
-
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	long			space_used;
-	unsigned char		*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int			tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int			torecv_len, recvd_len, recvd_this_iter;	/* needed for REPL_RECV_LOOP */
-	int			status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	int			read_pos;
-	char			print_msg[1024];
-
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
-	space_used = 0;
-	if (recvpool_ctl->wrapped)
-		space_used = write_pos + recvpool_size - (read_pos = upd_proc_local->read);
-	if (!recvpool_ctl->wrapped || space_used > recvpool_size)
-		space_used = write_pos - (read_pos = upd_proc_local->read);
-	if (space_used >= recvpool_high_watermark && !xoff_sent)
-	{
-		/* Send XOFF message */
-		xoff_msg.type = REPL_XOFF;
-		memcpy((uchar_ptr_t)&xoff_msg.msg[0], (uchar_ptr_t)&upd_proc_local->read_jnl_seqno, SIZEOF(seq_num));
-		xoff_msg.len = MIN_REPL_MSGLEN;
-		REPL_SEND_LOOP(gtmrecv_sock_fd, &xoff_msg, xoff_msg.len, REPL_POLL_NOWAIT)
-		{
-			gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-			if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-				return;
-		}
-		if (SS_NORMAL != status)
-		{
-			if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-			{
-				repl_connection_reset = TRUE;
-				return;
-			}
-			if (EREPL_SEND == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error sending XOFF msg. Error in send : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-			if (EREPL_SELECT == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error sending XOFF msg. Error in select : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-		}
-		if (gtmrecv_logstats)
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Space used = %ld, High water mark = %d Low water mark = %d, "
-					"Updproc Read = %d, Recv Write = %d, Sent XOFF\n", space_used, recvpool_high_watermark,
-					recvpool_low_watermark, read_pos, write_pos);
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL_XOFF sent as receive pool has %ld bytes transaction data yet to be "
-				"processed\n", space_used);
-		xoff_sent = TRUE;
-		xoff_msg_log_cnt = 1;
-	} else if (space_used < recvpool_low_watermark && xoff_sent)
-	{
-		xon_msg.type = REPL_XON;
-		memcpy((uchar_ptr_t)&xon_msg.msg[0], (uchar_ptr_t)&upd_proc_local->read_jnl_seqno, SIZEOF(seq_num));
-		xon_msg.len = MIN_REPL_MSGLEN;
-		REPL_SEND_LOOP(gtmrecv_sock_fd, &xon_msg, xon_msg.len, REPL_POLL_NOWAIT)
-		{
-			gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-			if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-				return;
-		}
-		if (SS_NORMAL != status)
-		{
-			if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-			{
-				repl_connection_reset = TRUE;
-				return;
-			}
-			if (EREPL_SEND == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error sending XON msg. Error in send : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-			if (EREPL_SELECT == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error sending XON msg. Error in select : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-		}
-		if (gtmrecv_logstats)
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Space used now = %ld, High water mark = %d, "
-				 "Low water mark = %d, Updproc Read = %d, Recv Write = %d, Sent XON\n", space_used,
-				 recvpool_high_watermark, recvpool_low_watermark, read_pos, write_pos);
-		repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL_XON sent as receive pool has %ld bytes free space to buffer transaction "
-				"data\n", recvpool_size - space_used);
-		xoff_sent = FALSE;
-		xoff_msg_log_cnt = 0;
-	}
-	return;
-}
-
-static int gtmrecv_est_conn(void)
-{
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	fd_set			input_fds;
-	int			status;
-	const   int     	disable_keepalive = 0;
-	struct  linger  	disable_linger = {0, 0};
-	struct  timeval 	poll_interval;
-	char			print_msg[1024];
-	int			send_buffsize, recv_buffsize, tcp_r_bufsize;
-
-	/*
-	 * Wait for a connection from a Source Server.
-	 * The Receiver Server is an iterative server.
-	 */
-
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
-	primary_ai.ai_addr = (sockaddr_ptr)&primary_sas;
-
-	gtmrecv_comm_init((in_port_t)gtmrecv_local->listen_port);
-	primary_ai.ai_addrlen = SIZEOF(primary_sas);
-	repl_log(gtmrecv_log_fp, TRUE, TRUE, "Waiting for a connection...\n");
-	assertpro(FD_SETSIZE > gtmrecv_listen_sock_fd);
-	FD_ZERO(&input_fds);
-	FD_SET(gtmrecv_listen_sock_fd, &input_fds);
-	/*
-	 * Note - the following while loop checks for EINTR on the select. The
-	 * SELECT macro is not used because the FD_SET is redone before the new
-	 * call to select (after the continue).
-	 */
-	poll_interval.tv_sec = 0;
-	poll_interval.tv_usec = REPL_POLL_WAIT;
-	while (0 >= (status = select(gtmrecv_listen_sock_fd + 1, &input_fds, NULL, NULL, &poll_interval)))
-	{
-		assert(0 == poll_interval.tv_sec);
-		poll_interval.tv_usec = REPL_POLL_WAIT;
-		FD_SET(gtmrecv_listen_sock_fd, &input_fds);
-		if (0 == status)
-			gtmrecv_poll_actions(0, 0, NULL);
-		else if (EINTR == errno || EAGAIN == errno)
-			continue;
-		else
-		{
-			status = ERRNO;
-			SNPRINTF(print_msg, SIZEOF(print_msg), "Error in select on listen socket : %s", STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-		}
-	}
-	ACCEPT_SOCKET(gtmrecv_listen_sock_fd, primary_ai.ai_addr, (sssize_t *)&primary_ai.ai_addrlen, gtmrecv_sock_fd);
-	if (FD_INVALID == gtmrecv_sock_fd)
-	{
-		status = ERRNO;
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error accepting connection from Source Server : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-	/* Connection established */
-	repl_close(&gtmrecv_listen_sock_fd); /* Close the listener socket */
-	repl_connection_reset = FALSE;
-	repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection accepted. Connection socket created.\n");
-	if (-1 == setsockopt(gtmrecv_sock_fd, SOL_SOCKET, SO_LINGER, (const void *)&disable_linger, SIZEOF(disable_linger)))
-	{
-		status = ERRNO;
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error with receiver server socket disable linger : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-
-#ifdef REPL_DISABLE_KEEPALIVE
-	if (-1 == setsockopt(gtmrecv_sock_fd, SOL_SOCKET, SO_KEEPALIVE, (const void *)&disable_keepalive,
-				SIZEOF(disable_keepalive)))
-	{ /* Till SIGPIPE is handled properly */
-		status = ERRNO;
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error with receiver server socket disable keepalive : %s",
-				STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-#endif
-	if (0 != (status = get_send_sock_buff_size(gtmrecv_sock_fd, &send_buffsize)))
-	{
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error getting socket send buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-	if (send_buffsize < GTMRECV_TCP_SEND_BUFSIZE)
-	{
-		if (0 != (status = set_send_sock_buff_size(gtmrecv_sock_fd, GTMRECV_TCP_SEND_BUFSIZE)))
-		{
-			if (send_buffsize < GTMRECV_MIN_TCP_SEND_BUFSIZE)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Could not set TCP send buffer size to %d : %s",
-						GTMRECV_MIN_TCP_SEND_BUFSIZE, STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) MAKE_MSG_INFO(ERR_REPLCOMM), 0, ERR_TEXT, 2,
-						LEN_AND_STR(print_msg));
-			}
-		}
-	}
-	if (0 != (status = get_send_sock_buff_size(gtmrecv_sock_fd, &repl_max_send_buffsize))) /* may have changed */
-	{
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error getting socket send buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-	if (0 != (status = get_recv_sock_buff_size(gtmrecv_sock_fd, &recv_buffsize)))
-	{
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error getting socket recv buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-	if (recv_buffsize < GTMRECV_TCP_RECV_BUFSIZE)
-	{
-		for (tcp_r_bufsize = GTMRECV_TCP_RECV_BUFSIZE;
-		     tcp_r_bufsize >= MAX(recv_buffsize, GTMRECV_MIN_TCP_RECV_BUFSIZE)
-		     &&  0 != (status = set_recv_sock_buff_size(gtmrecv_sock_fd, tcp_r_bufsize));
-		     tcp_r_bufsize -= GTMRECV_TCP_RECV_BUFSIZE_INCR)
-			;
-		if (tcp_r_bufsize < GTMRECV_MIN_TCP_RECV_BUFSIZE)
-		{
-			SNPRINTF(print_msg, SIZEOF(print_msg), "Could not set TCP receive buffer size in range [%d, %d], last "
-					"known error : %s", GTMRECV_MIN_TCP_RECV_BUFSIZE, GTMRECV_TCP_RECV_BUFSIZE,
-					STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) MAKE_MSG_INFO(ERR_REPLCOMM), 0, ERR_TEXT, 2,
-					LEN_AND_STR(print_msg));
-		}
-	}
-	if (0 != (status = get_recv_sock_buff_size(gtmrecv_sock_fd, &repl_max_recv_buffsize))) /* may have changed */
-	{
-		SNPRINTF(print_msg, SIZEOF(print_msg), "Error getting socket recv buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-	}
-	repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection established, using TCP send buffer size %d receive buffer size %d\n",
-			repl_max_send_buffsize, repl_max_recv_buffsize);
-	return (SS_NORMAL);
-}
-
-int gtmrecv_alloc_filter_buff(int bufsiz)
-{
-	unsigned char	*old_filter_buff, *free_filter_buff;
-
-	bufsiz = ROUND_UP2(bufsiz, OS_PAGE_SIZE);
-	if (NO_FILTER != gtmrecv_filter && repl_filter_bufsiz < bufsiz)
-	{
-		REPL_DPRINT3("Expanding filter buff from %d to %d\n", repl_filter_bufsiz, bufsiz);
-		free_filter_buff = filterbuff;
-		old_filter_buff = repl_filter_buff;
-		filterbuff = (unsigned char *)malloc(bufsiz + OS_PAGE_SIZE);
-		repl_filter_buff = (uchar_ptr_t)ROUND_UP2((unsigned long)filterbuff, OS_PAGE_SIZE);
-		if (NULL != free_filter_buff)
-		{
-			assert(NULL != old_filter_buff);
-			memcpy(repl_filter_buff, old_filter_buff, repl_filter_bufsiz);
-			free(free_filter_buff);
-		}
-		repl_filter_bufsiz = bufsiz;
-	}
-	return (SS_NORMAL);
-}
-
-void gtmrecv_free_filter_buff(void)
-{
-	if (NULL != filterbuff)
-	{
-		assert(NULL != repl_filter_buff);
-		free(filterbuff);
-		filterbuff = repl_filter_buff = NULL;
-		repl_filter_bufsiz = 0;
-	}
-}
-
-int gtmrecv_alloc_msgbuff(void)
-{
-	gtmrecv_max_repl_msglen = MAX_REPL_MSGLEN + SIZEOF(gtmrecv_msgp->type); /* add SIZEOF(...) for alignment */
-	assert(NULL == gtmrecv_msgp); /* first time initialization. The receiver server doesn't need to re-allocate */
-	msgbuff = (unsigned char *)malloc(gtmrecv_max_repl_msglen + OS_PAGE_SIZE);
-	gtmrecv_msgp = (repl_msg_ptr_t)ROUND_UP2((unsigned long)msgbuff, OS_PAGE_SIZE);
-	gtmrecv_alloc_filter_buff(gtmrecv_max_repl_msglen);
-	return (SS_NORMAL);
-}
-
-void gtmrecv_free_msgbuff(void)
-{
-	if (NULL != msgbuff)
-	{
-		assert(NULL != gtmrecv_msgp);
-		free(msgbuff);
-		msgbuff = NULL;
-		gtmrecv_msgp = NULL;
-	}
-}
-
-static void process_tr_buff(void)
-{
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	seq_num			log_seqno, upd_seqno, diff_seqno;
-	uint4			future_write, in_size, out_size, out_bufsiz, tot_out_size, save_buff_unprocessed,
-				save_buffered_data_len, upd_read;
-	boolean_t		filter_pass = FALSE;
-	uchar_ptr_t		save_buffp, save_filter_buff, in_buff, out_buff;
-	int			status;
-	qw_num			msg_total;
-
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
-	do
-	{
-		if (write_loc + data_len > recvpool_size)
-		{
-#			ifdef REPL_DEBUG
-			if (recvpool_ctl->wrapped)
-				REPL_DPRINT1("Update Process too slow. Waiting for it to free up space and wrap\n");
-#			endif
-			while (recvpool_ctl->wrapped)
-			{
-				 /* Wait till the updproc wraps */
-				SHORT_SLEEP(GTMRECV_WAIT_FOR_UPD_PROGRESS);
-				gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-				if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-					return;
-			}
-			assert(recvpool_ctl->wrapped == FALSE);
-			REPL_DPRINT3("Write wrapped%sat : %d\n", (NO_FILTER != gtmrecv_filter && !filter_pass) ?
-				     " prior to filtering " : (NO_FILTER != gtmrecv_filter) ? " after filtering " : " ", write_loc);
-			recvpool_ctl->write_wrap = write_wrap = write_loc;
-			/* The update process reads (a) "recvpool_ctl->write" first. If "write" is not equal to
-			 * "upd_proc_local->read", it then reads (b) "recvpool_ctl->write_wrap" and assumes that "write_wrap"
-			 * holds a non-stale value. This is in turn used to compare "temp_read" and "write_wrap" to determine
-			 * how much of unprocessed data there is in the receive pool. If it so happens that the receiver server
-			 * sets "write_wrap" in the above line to a value that is lesser than its previous value (possible if
-			 * in the previous wrap of the pool, transactions used more portions of the pool than in the current wrap),
-			 * it is important that the update process sees the updated value of "write_wrap" as long as it sees the
-			 * corresponding update to "write". This is because it will otherwise end up processing the tail section
-			 * of the receive pool (starting from the uptodate value of "write" to the stale value of "write_wrap")
-			 * that does not contain valid journal data. For this read order dependency to hold good, the receiver
-			 * server needs to do a write memory barrier after updating "write_wrap" but before updating "write".
-			 * The update process will do a read memory barrier after reading "wrapped" but before reading "write".
-			 */
-			SHM_WRITE_MEMORY_BARRIER;
-			/* The update process looks at "recvpool_ctl->write" first and then reads (a) "recvpool_ctl->write_wrap"
-			 * AND (b) all journal data in the receive pool upto this offset. It assumes that (a) and (b) will never
-			 * hold stale values corresponding to a previous state of "recvpool_ctl->write". In order for this
-			 * assumption to hold good, the receiver server needs to do a write memory barrier after updating the
-			 * receive pool data and "write_wrap" but before updating "write". The update process will do a read
-			 * memory barrier after reading "write" but before reading "write_wrap" or the receive pool data. Not
-			 * enforcing the read order will result in the update process attempting to read/process invalid data
-			 * from the receive pool (which could end up in db out of sync situation between primary and secondary).
-			 */
-			recvpool_ctl->write = write_loc = 0;
-			SHM_WRITE_MEMORY_BARRIER;
-			recvpool_ctl->wrapped = TRUE;
-		}
-		assert(buffered_data_len <= recvpool_size);
-		do_flow_control(write_loc);
-		if (repl_connection_reset)
-		{
-			repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection reset\n");
-			repl_close(&gtmrecv_sock_fd);
-			return;
-		}
-		if (gtmrecv_wait_for_jnl_seqno)
-			return;
-		future_write = write_loc + buffered_data_len;
-		upd_read = upd_proc_local->read;
-#		ifdef REPL_DEBUG
-		if (recvpool_ctl->wrapped && (write_loc <= upd_read) && (upd_read <= future_write))
-			REPL_DPRINT1("Update Process too slow. Waiting for it to free up space\n");
-#		endif
-		while (recvpool_ctl->wrapped && (write_loc <= upd_read) && (upd_read <= future_write))
-		{	/* Write will cause overflow. Wait till there is more space available */
-			SHORT_SLEEP(GTMRECV_WAIT_FOR_UPD_PROGRESS);
-			gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-			if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-				return;
-			upd_read = upd_proc_local->read;
-		}
-		memcpy(recvpool.recvdata_base + write_loc, buffp, buffered_data_len);
-		write_loc = future_write;
-		if (write_loc > write_wrap)
-			write_wrap = write_loc;
-
-		repl_recv_data_processed += (qw_num)buffered_data_len;
-		buffp += buffered_data_len;
-		buff_unprocessed -= buffered_data_len;
-		data_len -= buffered_data_len;
-
-		if (0 == data_len)
-		{
-			write_len = ((recvpool_ctl->write != write_wrap) ?
-					(write_loc - recvpool_ctl->write) : write_loc);
-			write_off = ((recvpool_ctl->write != write_wrap) ? recvpool_ctl->write : 0);
-			if ((recvpool_ctl->jnl_seqno - lastlog_seqno >= log_interval)
-				&& (NO_FILTER == gtmrecv_filter || filter_pass))
-			{
-				log_seqno = recvpool_ctl->jnl_seqno;
-				upd_seqno = recvpool.upd_proc_local->read_jnl_seqno;
-				assert(log_seqno >= upd_seqno);
-				diff_seqno = (log_seqno - upd_seqno);
-				trans_recvd_cnt += (log_seqno - lastlog_seqno);
-				msg_total = repl_recv_data_recvd - buff_unprocessed;
-					/* Don't include data not yet processed, we'll include that count in a later log */
-				if (NO_FILTER == gtmrecv_filter)
-				{
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO - Seqno : "INT8_FMT" "INT8_FMTX
-						"  Jnl Total : "INT8_FMT" "INT8_FMTX"  Msg Total : "INT8_FMT" "INT8_FMTX
-						"  Current backlog : "INT8_FMT" "INT8_FMTX"\n",
-						log_seqno, log_seqno, repl_recv_data_processed, repl_recv_data_processed,
-						msg_total, msg_total, diff_seqno, diff_seqno);
-				} else
-				{
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO - Seqno : "INT8_FMT" "INT8_FMTX
-						"  Pre filter total : "INT8_FMT" "INT8_FMTX"  Post filter total : "
-						INT8_FMT" "INT8_FMTX"  Msg Total : "INT8_FMT" "INT8_FMTX
-						"  Current backlog : "INT8_FMT" "INT8_FMTX"\n",
-						log_seqno, log_seqno, repl_recv_prefltr_data_procd, repl_recv_prefltr_data_procd,
-						repl_recv_data_processed, repl_recv_data_processed,
-						msg_total, msg_total, diff_seqno, diff_seqno);
-				}
-				/* Approximate time with an error not more than GTMRECV_HEARTBEAT_PERIOD. We use this instead of
-				 * calling time(), and expensive system call, especially on VMS. The consequence of this choice
-				 * is that we may defer logging when we may have logged. We can live with that. Currently, the
-				 * logging interval is not changeable by users. When/if we provide means of choosing log interval,
-				 * this code may have to be re-examined.
-				 * Vinaya 2003, Sep 08
-				 */
-				assert(0 != gtmrecv_now);
-				repl_recv_this_log_time = gtmrecv_now;
-				assert(repl_recv_this_log_time >= repl_recv_prev_log_time);
-				time_elapsed = difftime(repl_recv_this_log_time, repl_recv_prev_log_time);
-				if ((double)GTMRECV_LOGSTATS_INTERVAL <= time_elapsed)
-				{
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO since last log : Time elapsed : %00.f  "
-						 "Tr recvd : "INT8_FMT"  Tr bytes : "INT8_FMT"  Msg bytes : "INT8_FMT"\n",
-						 time_elapsed, trans_recvd_cnt - last_log_tr_recvd_cnt,
-						 repl_recv_data_processed - repl_recv_lastlog_data_procd,
-						 msg_total - repl_recv_lastlog_data_recvd);
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "REPL INFO since last log : Time elapsed : %00.f  "
-						 "Tr recvd/s : %f  Tr bytes/s : %f  Msg bytes/s : %f\n", time_elapsed,
-						 (float)(trans_recvd_cnt - last_log_tr_recvd_cnt)/time_elapsed,
-						 (float)(repl_recv_data_processed - repl_recv_lastlog_data_procd)/time_elapsed,
-						 (float)(msg_total - repl_recv_lastlog_data_recvd)/time_elapsed);
-					repl_recv_lastlog_data_procd = repl_recv_data_processed;
-					repl_recv_lastlog_data_recvd = msg_total;
-					last_log_tr_recvd_cnt = trans_recvd_cnt;
-					repl_recv_prev_log_time = repl_recv_this_log_time;
-				}
-				lastlog_seqno = log_seqno;
-			}
-			if (gtmrecv_logstats && (NO_FILTER == gtmrecv_filter || filter_pass))
-			{
-				if (NO_FILTER == gtmrecv_filter)
-					repl_log(gtmrecv_log_fp, FALSE, FALSE, "Tr : "INT8_FMT"  Size : %d  Write : %d  "
-						 "Total : "INT8_FMT"\n", recvpool_ctl->jnl_seqno, write_len,
-						 write_off, repl_recv_data_processed);
-				else
-					repl_log(gtmrecv_log_fp, FALSE, FALSE, "Tr : "INT8_FMT"  Pre filter Size : %d  "
-						 "Post filter Size  : %d  Pre filter Write : %d  Post filter Write : %d  "
-						 "Pre filter Total : "INT8_FMT"  Post filter Total : "INT8_FMT"\n",
-						 recvpool_ctl->jnl_seqno, pre_filter_write_len, write_len,
-						 pre_filter_write, write_off, repl_recv_prefltr_data_procd,
-						 repl_recv_data_processed);
-			}
-			if ((NO_FILTER == gtmrecv_filter) || filter_pass)
-			{
-				recvpool_ctl->write_wrap = write_wrap;
-				QWINCRBYDW(recvpool_ctl->jnl_seqno, 1);
-				/* The update process looks at "recvpool_ctl->write" first and then reads
-				 * (a) "recvpool_ctl->write_wrap" AND (b) all journal data in the receive pool upto this offset.
-				 * It assumes that (a) and (b) will never hold stale values that reflect a corresponding previous
-				 * state of "recvpool_ctl->write". In order for this assumption to hold good, the receiver server
-				 * needs to do a write memory barrier after updating the receive pool data and "write_wrap" but
-				 * before updating "write". The update process will do a read memory barrier after reading
-				 * "write" but before reading "write_wrap" or the receive pool data. Not enforcing the read order
-				 * will result in the update process attempting to read/process invalid data from the receive pool.
-				 */
-				SHM_WRITE_MEMORY_BARRIER;
-				recvpool_ctl->write = write_loc;
-				if (filter_pass)
-				{	/* Switch buffers back */
-					buffp = save_buffp;
-					buff_unprocessed = save_buff_unprocessed;
-					buffered_data_len = save_buffered_data_len;
-					filter_pass = FALSE;
-				}
-			} else
-			{
-				pre_filter_write = write_off;
-				pre_filter_write_len = write_len;
-				repl_recv_prefltr_data_procd += (qw_num)pre_filter_write_len;
-				if (gtmrecv_filter & INTERNAL_FILTER)
-				{
-					pre_intlfilter_datalen = write_len;
-					in_buff = recvpool.recvdata_base + write_off;
-					in_size = pre_intlfilter_datalen;
-					out_buff = repl_filter_buff;
-					out_bufsiz = repl_filter_bufsiz;
-					tot_out_size = 0;
-					while (SS_NORMAL != (status =
-						repl_filter_old2cur[remote_jnl_ver - JNL_VER_EARLIEST_REPL](
-							in_buff, &in_size, out_buff, &out_size, out_bufsiz)) &&
-					       EREPL_INTLFILTER_NOSPC == repl_errno)
-					{
-						save_filter_buff = repl_filter_buff;
-						gtmrecv_alloc_filter_buff(repl_filter_bufsiz + (repl_filter_bufsiz >> 1));
-						in_buff += in_size;
-						in_size = pre_filter_write_len - (in_buff - recvpool.recvdata_base - write_off);
-						out_bufsiz = repl_filter_bufsiz - (out_buff - save_filter_buff) - out_size;
-						out_buff = repl_filter_buff + (out_buff - save_filter_buff) + out_size;
-						tot_out_size += out_size;
-					}
-					if (SS_NORMAL == status)
-						write_len = tot_out_size + out_size;
-					else
-					{
-						if (EREPL_INTLFILTER_BADREC == repl_errno)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_JNLRECFMT);
-						else if (EREPL_INTLFILTER_DATA2LONG == repl_errno)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_JNLSETDATA2LONG, 2,
-									jnl_source_datalen, jnl_dest_maxdatalen);
-						else if (EREPL_INTLFILTER_NEWREC == repl_errno)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_JNLNEWREC, 2,
-									(unsigned int)jnl_source_rectype,
-									(unsigned int)jnl_dest_maxrectype);
-						else if (EREPL_INTLFILTER_REPLGBL2LONG == repl_errno)
-								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_REPLGBL2LONG);
-						else /* (EREPL_INTLFILTER_INCMPLREC == repl_errno) */
-							assertpro(repl_errno != repl_errno);
-					}
-				} else
-				{
-					if (write_len > repl_filter_bufsiz)
-						gtmrecv_alloc_filter_buff(write_len);
-					memcpy(repl_filter_buff, recvpool.recvdata_base + write_off, write_len);
-				}
-				assert(write_len <= repl_filter_bufsiz);
-				if ((gtmrecv_filter & EXTERNAL_FILTER) &&
-				    (SS_NORMAL != (status = repl_filter(recvpool_ctl->jnl_seqno, repl_filter_buff, (int*)&write_len,
-									repl_filter_bufsiz))))
-					repl_filter_error(recvpool_ctl->jnl_seqno, status);
-				assert(write_len <= repl_filter_bufsiz);
-				if (write_len > recvpool_size)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(11) ERR_REPLTRANS2BIG, 5, &recvpool_ctl->jnl_seqno,
-						  write_len, 0, LEN_AND_LIT("Receive"), ERR_TEXT, 2,
-						  LEN_AND_LIT("Post filter tr len larger than receive pool size"));
-
-				/* Switch buffers */
-				save_buffp = buffp;
-				save_buff_unprocessed = buff_unprocessed;
-				save_buffered_data_len = buffered_data_len;
-
-				data_len = buff_unprocessed = buffered_data_len = write_len;
-				buffp = repl_filter_buff;
-				write_loc = write_off;
-				repl_recv_data_processed -= (qw_num)pre_filter_write_len;
-				filter_pass = TRUE;
-			}
-		} else
-			filter_pass = FALSE;
-	} while (NO_FILTER != gtmrecv_filter && filter_pass);
-	return;
-}
-
-static void do_main_loop(boolean_t crash_restart)
-{
-	/* The work-horse of the Receiver Server */
-
-	void		do_flow_control();
-
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	seq_num			request_from, recvd_jnl_seqno;
-	int			skip_for_alignment, msg_type, msg_len;
-	unsigned char		*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int			tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int			torecv_len, recvd_len, recvd_this_iter;	/* needed for REPL_RECV_LOOP */
-	int			status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	char			print_msg[1024];
-	repl_heartbeat_msg_t	heartbeat;
-	repl_start_reply_msg_t	*start_msg;
-	uint4			recvd_start_flags;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
-	gtmrecv_wait_for_jnl_seqno = FALSE;
-
-	if (!gtmrecv_bad_trans_sent)
-	{
-		/* Wait for the Update Process to  write start_jnl_seqno */
-		repl_log(gtmrecv_log_fp, FALSE, FALSE, "Waiting for Update Process to write jnl_seqno\n");
-		while (QWEQ(recvpool_ctl->jnl_seqno, seq_num_zero))
-		{
-			SHORT_SLEEP(GTMRECV_WAIT_FOR_STARTJNLSEQNO);
-			gtmrecv_poll_actions(0, 0, NULL);
-			if (repl_connection_reset)
-				return;
-		}
-		secondary_side_std_null_coll = recvpool_ctl->std_null_coll;
-		secondary_side_trigger_support = FALSE;
-		gtmrecv_wait_for_jnl_seqno = FALSE;
-		if (QWEQ(recvpool_ctl->start_jnl_seqno, seq_num_zero))
-			QWASSIGN(recvpool_ctl->start_jnl_seqno, recvpool_ctl->jnl_seqno);
-		repl_log(gtmrecv_log_fp, FALSE, TRUE, "Requesting transactions from JNL_SEQNO "INT8_FMT"\n",
-			recvpool_ctl->jnl_seqno);
-		QWASSIGN(request_from, recvpool_ctl->jnl_seqno);
-		/* Send (re)start JNL_SEQNO to Source Server */
-		gtmrecv_msgp->type = REPL_START_JNL_SEQNO;
-		((repl_start_msg_ptr_t)gtmrecv_msgp)->start_flags = START_FLAG_NONE;
-		((repl_start_msg_ptr_t)gtmrecv_msgp)->start_flags |=
-			(gtmrecv_options.stopsourcefilter ? START_FLAG_STOPSRCFILTER : 0);
-		((repl_start_msg_ptr_t)gtmrecv_msgp)->start_flags |= (gtmrecv_options.updateresync ? START_FLAG_UPDATERESYNC : 0);
-		((repl_start_msg_ptr_t)gtmrecv_msgp)->start_flags |= START_FLAG_HASINFO;
-		if (secondary_side_std_null_coll)
-			((repl_start_msg_ptr_t)gtmrecv_msgp)->start_flags |= START_FLAG_COLL_M;
-		((repl_start_msg_ptr_t)gtmrecv_msgp)->jnl_ver = jnl_ver;
-		QWASSIGN(*(seq_num *)&((repl_start_msg_ptr_t)gtmrecv_msgp)->start_seqno[0], request_from);
-		gtmrecv_msgp->len = MIN_REPL_MSGLEN;
-		REPL_SEND_LOOP(gtmrecv_sock_fd, gtmrecv_msgp, gtmrecv_msgp->len, REPL_POLL_NOWAIT)
-		{
-			gtmrecv_poll_actions(0, 0, NULL);
-			if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-				return;
-		}
-		if (SS_NORMAL != status)
-		{
-			if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-			{
-				repl_close(&gtmrecv_sock_fd);
-				repl_connection_reset = TRUE;
-				sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLWARN, 2, LEN_AND_LIT("Connection closed"));
-				repl_log(gtmrecv_log_fp, TRUE, TRUE, print_msg);
-				gtm_event_log(GTM_EVENT_LOG_ARGC, "MUPIP", "ERR_REPLWARN", print_msg);
-				return;
-			}
-			if (EREPL_SEND == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error sending (re)start jnlseqno. Error in send : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-			if (EREPL_SELECT == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error sending (re)start jnlseqno. Error in select : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-		}
-	}
-	gtmrecv_bad_trans_sent = FALSE;
-	request_from = recvpool_ctl->jnl_seqno;
-	assert(request_from >= seq_num_one);
-	gtmrecv_reinit_logseqno();
-
-	repl_log(gtmrecv_log_fp, FALSE, TRUE, "Waiting for WILL_START or ROLL_BACK_FIRST message\n");
-
-	/* Receive journal data and place it in the Receive Pool */
-	buff_start = (unsigned char *)gtmrecv_msgp;
-	buffp = buff_start;
-	buff_unprocessed = 0;
-	data_len = 0;
-	skip_for_alignment = 0;
-	write_loc = recvpool_ctl->write;
-	write_wrap = recvpool_ctl->write_wrap;
-
-	repl_recv_data_recvd = 0;
-	repl_recv_data_processed = 0;
-	repl_recv_prefltr_data_procd = 0;
-	repl_recv_lastlog_data_recvd = 0;
-	repl_recv_lastlog_data_procd = 0;
-
-	while (TRUE)
-	{
-		recvd_len = gtmrecv_max_repl_msglen - buff_unprocessed - skip_for_alignment;
-		while ((status = repl_recv(gtmrecv_sock_fd, (buffp + buff_unprocessed), &recvd_len, REPL_POLL_WAIT))
-			       == SS_NORMAL && recvd_len == 0)
-		{
-			recvd_len = gtmrecv_max_repl_msglen - buff_unprocessed - skip_for_alignment;
-			if (xoff_sent)
-				do_flow_control(write_loc);
-			if (xoff_sent && GTMRECV_XOFF_LOG_CNT <= xoff_msg_log_cnt)
-			{
-				/* update process is still running slow, gtmrecv_poll_interval is now 0.
-				 * Force wait before logging any message.
-				 */
-				SHORT_SLEEP(REPL_POLL_WAIT >> 10); /* approximate in ms */
-				REPL_DPRINT1("Waiting for Update Process to clear recvpool space\n");
-				xoff_msg_log_cnt = 0;
-			} else if (xoff_sent)
-				xoff_msg_log_cnt++;
-
-			if (repl_connection_reset)
-			{
-				repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection reset\n");
-				repl_close(&gtmrecv_sock_fd);
-				return;
-			}
-			if (gtmrecv_wait_for_jnl_seqno)
-				return;
-			gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-			if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-				return;
-		}
-
-		if (SS_NORMAL != status)
-		{
-			if (EREPL_RECV == repl_errno)
-			{
-				if (REPL_CONN_RESET(status))
-				{
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "Connection reset. Status = %d ; %s\n",
-							status, STRERROR(status));
-					repl_connection_reset = TRUE;
-					repl_close(&gtmrecv_sock_fd);
-					return;
-				} else
-				{
-					SNPRINTF(print_msg, SIZEOF(print_msg), "Error in receiving from source. "
-							"Error in recv : %s", STRERROR(status));
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-							LEN_AND_STR(print_msg));
-				}
-			} else if (EREPL_SELECT == repl_errno)
-			{
-				SNPRINTF(print_msg, SIZEOF(print_msg), "Error in receiving from source. Error in select : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(print_msg));
-			}
-		}
-
-		if (repl_connection_reset)
-			return;
-
-		/* Something on the replication pipe - read it */
-
-		REPL_DPRINT3("Pending data len : %d  Prev buff unprocessed : %d\n", data_len, buff_unprocessed);
-
-		buff_unprocessed += recvd_len;
-		repl_recv_data_recvd += (qw_num)recvd_len;
-
-		if (gtmrecv_logstats)
-			repl_log(gtmrecv_log_fp, FALSE, FALSE, "Recvd : %d  Total : %d\n", recvd_len, repl_recv_data_recvd);
-
-		while (REPL_MSG_HDRLEN <= buff_unprocessed)
-		{
-			if (0 == data_len)
-			{
-				assert(0 == ((unsigned long)buffp & (SIZEOF(((repl_msg_ptr_t)buffp)->type) - 1)));
-				msg_type = ((repl_msg_ptr_t)buffp)->type;
-				msg_len = data_len = ((repl_msg_ptr_t)buffp)->len - REPL_MSG_HDRLEN;
-				assert(0 == (msg_len & ((SIZEOF(((repl_msg_ptr_t)buffp)->type)) - 1)));
-				buffp += REPL_MSG_HDRLEN;
-				buff_unprocessed -= REPL_MSG_HDRLEN;
-
-				if (data_len > recvpool_size)
-				{
-					/* Too large a transaction to be
-					 * accommodated in the Receive Pool */
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_REPLTRANS2BIG, 5, &recvpool_ctl->jnl_seqno,
-						  data_len, 0, LEN_AND_LIT("Receive"));
-				}
-			}
-			buffered_data_len = ((data_len <= buff_unprocessed) ? data_len : buff_unprocessed);
-			switch(msg_type)
-			{
-				case REPL_TR_JNL_RECS:
-					process_tr_buff();
-					if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-						return;
-					break;
-
-				case REPL_HEARTBEAT:
-					buffp += buffered_data_len;
-					buff_unprocessed -= buffered_data_len;
-					data_len -= buffered_data_len;
-					if (0 == data_len)
-					{
-						/* Heartbeat msg contents start from buffp - msg_len */
-						memcpy(heartbeat.ack_seqno, buffp - msg_len, msg_len);
-						REPL_DPRINT4("HEARTBEAT received with time %ld SEQNO "INT8_FMT" at %ld\n",
-							     *(time_t *)&heartbeat.ack_time[0],
-							     (*(seq_num *)&heartbeat.ack_seqno[0]), time(NULL));
-						heartbeat.type = REPL_HEARTBEAT;
-						heartbeat.len = MIN_REPL_MSGLEN;
-						QWASSIGN(*(seq_num *)&heartbeat.ack_seqno[0], upd_proc_local->read_jnl_seqno);
-						REPL_SEND_LOOP(gtmrecv_sock_fd, &heartbeat, heartbeat.len, REPL_POLL_NOWAIT)
-						{
-							gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-							if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-								return;
-						}
-						/* Error handling for the above send_loop is not required as it'll be caught
-						 * in the next recv_loop of the receiver server */
-						REPL_DPRINT4("HEARTBEAT sent with time %ld SEQNO "INT8_FMT" at %ld\n",
-							     *(time_t *)&heartbeat.ack_time[0],
-							     (*(seq_num *)&heartbeat.ack_seqno[0]), time(NULL));
-					}
-					break;
-
-				case REPL_WILL_RESTART_WITH_INFO:
-				case REPL_ROLLBACK_FIRST:
-					buffp += buffered_data_len;
-					buff_unprocessed -= buffered_data_len;
-					data_len -= buffered_data_len;
-					if (0 == data_len)
-					{
-						assert(msg_len == MIN_REPL_MSGLEN - REPL_MSG_HDRLEN);
-						start_msg = (repl_start_reply_msg_t *)(buffp - msg_len - REPL_MSG_HDRLEN);
-						assert((unsigned long)start_msg % SIZEOF(seq_num) == 0); /* alignment check */
-						QWASSIGN(recvd_jnl_seqno, *(seq_num *)start_msg->start_seqno);
-						if (REPL_WILL_RESTART_WITH_INFO == msg_type)
-						{
-							repl_log(gtmrecv_log_fp, TRUE, TRUE, "Received WILL_START message. "
-											     "Primary acked the restart point\n");
-							remote_jnl_ver = start_msg->jnl_ver;
-							REPL_DPRINT3("Local jnl ver is octal %o, remote jnl ver is octal %o\n",
-								     jnl_ver, remote_jnl_ver);
-							repl_check_jnlver_compat();
-							/* older versions zero filler that was in place of start_msg->start_flags,
-							 * so we are okay fetching start_msg->start_flags unconditionally.
-							 */
-							GET_ULONG(recvd_start_flags, start_msg->start_flags);
-							assert(remote_jnl_ver > V15_JNL_VER || 0 == recvd_start_flags);
-							if (remote_jnl_ver <= V15_JNL_VER) /* safety in pro */
-								recvd_start_flags = 0;
-							primary_side_std_null_coll = (recvd_start_flags & START_FLAG_COLL_M) ?
-								TRUE : FALSE;
-							if (FALSE != ((TREF(replgbl)).null_subs_xform =
-									((primary_side_std_null_coll &&
-										!secondary_side_std_null_coll)
-									|| (secondary_side_std_null_coll &&
-										!primary_side_std_null_coll))))
-								(TREF(replgbl)).null_subs_xform = (primary_side_std_null_coll ?
-									STDNULL_TO_GTMNULL_COLL : GTMNULL_TO_STDNULL_COLL);
-								/* this sets null_subs_xform regardless of remote_jnl_ver */
-							primary_side_trigger_support
-								= (recvd_start_flags & START_FLAG_TRIGGER_SUPPORT) ? TRUE : FALSE;
-							if ((jnl_ver > remote_jnl_ver)
-								&& (IF_NONE != repl_filter_old2cur[remote_jnl_ver
-													- JNL_VER_EARLIEST_REPL]))
-							{
-								assert(IF_INVALID !=
-								    repl_filter_old2cur[remote_jnl_ver - JNL_VER_EARLIEST_REPL]);
-								/* reverse transformation should exist */
-								assert(IF_INVALID !=
-								    repl_filter_cur2old[remote_jnl_ver - JNL_VER_EARLIEST_REPL]);
-								assert(IF_NONE !=
-								    repl_filter_cur2old[remote_jnl_ver - JNL_VER_EARLIEST_REPL]);
-								gtmrecv_filter |= INTERNAL_FILTER;
-								gtmrecv_alloc_filter_buff(gtmrecv_max_repl_msglen);
-							} else
-							{
-								gtmrecv_filter &= ~INTERNAL_FILTER;
-								if (NO_FILTER == gtmrecv_filter)
-									gtmrecv_free_filter_buff();
-							}
-							/* Don't send any more stopsourcefilter message */
-							gtmrecv_options.stopsourcefilter = FALSE;
-							assert(QWEQ(recvd_jnl_seqno, request_from));
-							break;
-						}
-						repl_log(gtmrecv_log_fp, TRUE, FALSE, "ROLLBACK_FIRST message received. Secondary "
-							 "ahead of primary. Secondary at "INT8_FMT, request_from);
-						repl_log(gtmrecv_log_fp, FALSE, TRUE, ", primary at "INT8_FMT". "
-							 "Do ROLLBACK FIRST\n", recvd_jnl_seqno);
-						gtmrecv_autoshutdown();
-					}
-					break;
-
-				default:
-					/* Discard the message */
-					repl_log(gtmrecv_log_fp, TRUE, TRUE, "Message of unknown type (%d) received\n", msg_type);
-					assert(FALSE);
-					buffp += buffered_data_len;
-					buff_unprocessed -= buffered_data_len;
-					data_len -= buffered_data_len;
-					break;
-			}
-			if (repl_connection_reset)
-				return;
-		}
-		skip_for_alignment = (int)((unsigned long)buffp & (SIZEOF(((repl_msg_ptr_t)buffp)->type) - 1));
-		if (0 != buff_unprocessed)
-		{
-			REPL_DPRINT4("Incmpl msg hdr, moving %d bytes from %lx to %lx\n", buff_unprocessed, (caddr_t)buffp,
-				     (caddr_t)buff_start + skip_for_alignment);
-			memmove(buff_start + skip_for_alignment, buffp, buff_unprocessed);
-		}
-		buffp = buff_start + skip_for_alignment;
-
-		gtmrecv_poll_actions(data_len, buff_unprocessed, buffp);
-		if (repl_connection_reset || gtmrecv_wait_for_jnl_seqno)
-			return;
-	}
-}
-
-static void gtmrecv_heartbeat_timer(TID tid, int4 interval_len, int *interval_ptr)
-{
-	assert(0 != gtmrecv_now);
-	UNIX_ONLY(assert(*interval_ptr == heartbeat_period);)	/* interval_len and interval_ptr are dummies on VMS */
-	gtmrecv_now += heartbeat_period;
-	REPL_DPRINT2("Starting heartbeat timer with %d s\n", heartbeat_period);
-	start_timer((TID)gtmrecv_heartbeat_timer, heartbeat_period * 1000, gtmrecv_heartbeat_timer, SIZEOF(heartbeat_period),
-			&heartbeat_period); /* start_timer expects time interval in milli seconds, heartbeat_period is in seconds */
-}
-
-static void gtmrecv_main_loop(boolean_t crash_restart)
-{
-	assert(FD_INVALID == gtmrecv_sock_fd);
-	gtmrecv_poll_actions(0, 0, NULL); /* Clear any pending bad trans */
-	gtmrecv_est_conn();
-	gtmrecv_bad_trans_sent = FALSE; /* this assignment should be after gtmrecv_est_conn since gtmrecv_est_conn can
-					 * potentially call gtmrecv_poll_actions. If the timing is right,
-					 * gtmrecv_poll_actions might set this variable to TRUE if the update process sets
-					 * bad_trans in the recvpool. When we are (re)establishing connection with the
-					 * source server, there is no point in doing bad trans processing. Also, we have
-					 * to send START_JNL_SEQNO message to the source server. If not, there will be a
-					 * deadlock with the source and receiver servers waiting for each other to send
-					 * a message. */
-	repl_recv_prev_log_time = gtmrecv_now;
-	while (!repl_connection_reset)
-		do_main_loop(crash_restart);
-	return;
-}
-
-void gtmrecv_process(boolean_t crash_restart)
-{
-	recvpool_ctl_ptr_t	recvpool_ctl;
-	upd_proc_local_ptr_t	upd_proc_local;
-	gtmrecv_local_ptr_t	gtmrecv_local;
-	void 			gtmrecv_heartbeat_timer();
-
-	recvpool_ctl = recvpool.recvpool_ctl;
-	upd_proc_local = recvpool.upd_proc_local;
-	gtmrecv_local = recvpool.gtmrecv_local;
-
-	jnl_ver = JNL_VER_THIS;
-	assert(REPL_POLL_WAIT < MILLISECS_IN_SEC);
-	recvpool_size = recvpool_ctl->recvpool_size;
-	recvpool_high_watermark = (long)((float)RECVPOOL_HIGH_WATERMARK_PCTG / 100 * recvpool_size);
-	recvpool_low_watermark  = (long)((float)RECVPOOL_LOW_WATERMARK_PCTG  / 100 * recvpool_size);
-	if ((long)((float)(RECVPOOL_HIGH_WATERMARK_PCTG - RECVPOOL_LOW_WATERMARK_PCTG) / 100 * recvpool_size) >=
-			RECVPOOL_XON_TRIGGER_SIZE)
-	{ /* for large receive pools, the difference between high and low watermarks as computed above may be too large that
-	   * we may not send XON quickly enough. Limit the difference to RECVPOOL_XON_TRIGGER_SIZE */
-		recvpool_low_watermark = recvpool_high_watermark - RECVPOOL_XON_TRIGGER_SIZE;
-	}
-	REPL_DPRINT4("RECVPOOL HIGH WATERMARK is %ld, LOW WATERMARK is %ld, Receive pool size is %ld\n",
-			recvpool_high_watermark, recvpool_low_watermark, recvpool_size);
-	gtmrecv_alloc_msgbuff();
-	gtmrecv_now = time(NULL);
-	heartbeat_period = GTMRECV_HEARTBEAT_PERIOD; /* time keeper, well sorta */
-	start_timer((TID)gtmrecv_heartbeat_timer, heartbeat_period * 1000, gtmrecv_heartbeat_timer, SIZEOF(heartbeat_period),
-			&heartbeat_period); /* start_timer expects time interval in milli seconds, heartbeat_period is in seconds */
-	do
-	{
-		gtmrecv_main_loop(crash_restart);
-	} while (repl_connection_reset);
-	assertpro(FALSE); /* shouldn't reach here */
-	return;
-}
diff --git a/sr_vvms/gtmrecv_shutdown.c b/sr_vvms/gtmrecv_shutdown.c
deleted file mode 100644
index ef8c47d..0000000
--- a/sr_vvms/gtmrecv_shutdown.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_socket.h"
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_inet.h"
-#include "gtm_string.h"
-#include <descrip.h> /* Required for gtmrecv.h */
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "gtmrecv.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "is_proc_alive.h"
-#include "repl_log.h"
-#include "gt_timer.h"
-
-#define GTMRECV_WAIT_FOR_SHUTDOWN	(1000 - 1) /* ms, almost 1s */
-
-GBLREF uint4			process_id;
-GBLREF recvpool_addrs		recvpool;
-GBLREF int			recvpool_shmid;
-GBLREF gtmrecv_options_t	gtmrecv_options;
-GBLREF boolean_t		is_rcvr_server;
-GBLREF int			gtmrecv_srv_count;
-GBLREF void			(*call_on_signal)();
-
-int gtmrecv_shutdown(boolean_t auto_shutdown, int exit_status)
-{
-
-	uint4           savepid;
-	boolean_t       shut_upd_too;
-	int             status;
-
-	repl_log(stdout, TRUE, TRUE, "Initiating shut down\n");
-	call_on_signal = NULL;		/* So we don't reenter on error */
-	/* Grab the receive pool access control and receive pool option write lock */
-	status = grab_sem(RECV, RECV_POOL_ACCESS_SEM);
-	if (0 == status && (!auto_shutdown || gtmrecv_srv_count))
-	{
-		if((status = grab_sem(RECV, RECV_SERV_OPTIONS_SEM)) < 0)
-			rel_sem(RECV, RECV_POOL_ACCESS_SEM);
-	} /* else if autoshutdown, parent still holds RECV_SERV_OPTIONS_SEM and the child is exiting at startup */
-	if (0 > status)
-	{
-		repl_log(stderr, TRUE, TRUE,
-			"Error grabbing receive pool control/recvpool option write lock : %s. Shutdown not complete\n",
-			REPL_SEM_ERROR);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	shut_upd_too = FALSE;
-
-	if (!auto_shutdown)
-	{
-		/* Wait till shutdown time nears */
-		if (0 < gtmrecv_options.shutdown_time)
-		{
-			repl_log(stdout, FALSE, TRUE, "Waiting for %d seconds before signalling shutdown\n",
-				gtmrecv_options.shutdown_time);
-			LONG_SLEEP(gtmrecv_options.shutdown_time);
-		} else
-			repl_log(stdout, FALSE, TRUE, "Signalling immediate shutdown\n");
-		recvpool.gtmrecv_local->shutdown = SHUTDOWN;
-
-		/* Wait for receiver server to shut down */
-		while(recvpool.gtmrecv_local->shutdown == SHUTDOWN &&
-	      	      0 < (savepid = recvpool.gtmrecv_local->recv_serv_pid) &&
-	      	       is_proc_alive(savepid, 0))
-				SHORT_SLEEP(GTMRECV_WAIT_FOR_SHUTDOWN);
-
-		exit_status = recvpool.gtmrecv_local->shutdown;
-		if (SHUTDOWN == exit_status)
-		{
-			if (0 == savepid) /* No Receiver Process */
-				exit_status = NORMAL_SHUTDOWN;
-			else /* Receiver Server Crashed */
-			{
-				repl_log(stderr, FALSE, TRUE, "Receiver Server exited abnormally\n");
-				exit_status = ABNORMAL_SHUTDOWN;
-				shut_upd_too = TRUE;
-			}
-		}
-	}
-
-	if (shut_upd_too)
-		gtmrecv_endupd();
-
-	/*
-	 * gtmrecv_ipc_cleanup will not be successful unless receiver server has completely exited.
-	 * It relies on RECV_SERV_COUNT_SEM value.
-	 */
-	if (FALSE == gtmrecv_ipc_cleanup(auto_shutdown, &exit_status))
-	{
-		/* Release all semaphores */
-		if (!auto_shutdown)
-		{
-			rel_sem_immediate( RECV, UPD_PROC_COUNT_SEM);
-			rel_sem_immediate( RECV, RECV_SERV_COUNT_SEM);
-		}
-		rel_sem_immediate( RECV, RECV_SERV_OPTIONS_SEM);
-		rel_sem_immediate( RECV, RECV_POOL_ACCESS_SEM);
-	}
-	return (exit_status);
-}
-
-static void gtmrecv_stop(boolean_t exit)
-{
-	int status;
-
-	status = gtmrecv_shutdown(TRUE, gtmrecv_end1(TRUE)) - NORMAL_SHUTDOWN;
-	if (exit)
-		gtmrecv_exit(status);
-	return;
-}
-
-void gtmrecv_sigstop(void)
-{
-	if (is_rcvr_server)
-		gtmrecv_stop(FALSE);
-	return;
-}
-
-void gtmrecv_autoshutdown(void)
-{
-	gtmrecv_stop(TRUE);
-	return;
-}
diff --git a/sr_vvms/gtmsecshr.h b/sr_vvms/gtmsecshr.h
deleted file mode 100644
index e1d1b89..0000000
--- a/sr_vvms/gtmsecshr.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#if defined(__alpha) && defined(__vms)
-#define memmove gtm_memmove
-#endif
-#define GTMSECSHR_SET_PRIV(X, Y)	\
-{				\
-	prvadr[1] = 0;		\
-	prvadr[0] = (X);	\
-	Y = sys$setprv(TRUE, prvadr, FALSE, prvprv);	\
-}
-#define GTMSECSHR_REL_PRIV	\
-if (0 != (prvadr[0] &= ~prvprv[0]))	\
-{				\
-	sys$setprv(FALSE, prvadr, FALSE, NULL);	\
-}
-#ifdef DEBUG
-#define GTMSECSHR_SET_DBG_PRIV(X, Y)	GTMSECSHR_SET_PRIV((X), (Y))
-#define GTMSECSHR_REL_DBG_PRIV		GTMSECSHR_REL_PRIV
-#else
-/* in kernel mode - can do whatever anyway */
-#define GTMSECSHR_SET_DBG_PRIV(X, Y)	Y = TRUE
-#define GTMSECSHR_REL_DBG_PRIV
-#endif
-
diff --git a/sr_vvms/gtmsource.c b/sr_vvms/gtmsource.c
deleted file mode 100644
index e188682..0000000
--- a/sr_vvms/gtmsource.c
+++ /dev/null
@@ -1,556 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <efndef.h>
-#include "gtm_inet.h"
-#include <sys/mman.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include <errno.h>
-#include "gtm_string.h"
-
-#include <ssdef.h>
-#include <prtdef.h>
-#include <prcdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <iodef.h>
-#include <prvdef.h>
-#include <lnmdef.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "error.h"
-#include "gtm_stdio.h"
-#include "cli.h"
-#include "iosp.h"
-#include "repl_log.h"
-#include "repl_errno.h"
-#include "gtm_event_log.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "repl_sp.h"
-#include "efn.h"
-#include "vmsdtype.h"
-#include "gtm_logicals.h"
-#include "repl_filter.h"
-#include "util.h"
-#include "io.h"
-#include "is_proc_alive.h"
-#include "is_file_identical.h"
-#include "dfntmpmbx.h"
-#include "gtmmsg.h"
-#include "sgtm_putmsg.h"
-#include "trans_log_name.h"
-#include "repl_comm.h"
-
-GBLDEF boolean_t	gtmsource_logstats = FALSE, gtmsource_pool2file_transition = FALSE;
-GBLDEF int		gtmsource_filter = NO_FILTER;
-GBLDEF boolean_t	update_disable = FALSE;
-
-GBLREF gtmsource_options_t	gtmsource_options;
-GBLREF gtmsource_state_t	gtmsource_state;
-GBLREF jnlpool_addrs 	jnlpool;
-GBLREF uint4		process_id;
-GBLREF int		gtmsource_sock_fd;
-GBLREF int		gtmsource_log_fd;
-GBLREF FILE		*gtmsource_log_fp;
-GBLREF gd_addr		*gd_header;
-GBLREF void             (*call_on_signal)();
-GBLREF boolean_t        is_src_server;
-GBLREF seq_num		gtmsource_save_read_jnl_seqno, seq_num_zero;
-GBLREF gd_region	*gv_cur_region;
-GBLREF sgmnt_addrs	*cs_addrs;
-GBLREF sgmnt_data_ptr_t	cs_data;
-GBLREF repl_msg_ptr_t	gtmsource_msgp;
-GBLREF int		gtmsource_msgbufsiz;
-GBLREF unsigned char	*gtmsource_tcombuff_start;
-GBLREF uchar_ptr_t	repl_filter_buff;
-GBLREF int		repl_filter_bufsiz;
-GBLREF int		gtmsource_srv_count;
-GBLREF boolean_t	primary_side_std_null_coll;
-GBLREF boolean_t	primary_side_trigger_support;
-GBLREF uint4		log_interval;
-GBLREF unsigned char	jnl_ver;
-
-error_def(ERR_JNLPOOLSETUP);
-error_def(ERR_MUPCLIERR);
-error_def(ERR_NOTALLDBOPN);
-error_def(ERR_NULLCOLLDIFF);
-error_def(ERR_REPLCOMM);
-error_def(ERR_REPLINFO);
-error_def(ERR_REPLOFFJNLON);
-error_def(ERR_TEXT);
-
-int gtmsource()
-{
-	gd_region	        *reg, *region_top;
-	sgmnt_addrs		*csa;
-	boolean_t	        jnlpool_inited, srv_alive, all_files_open;
-	uint4		        gtmsource_pid;
-	int		        status, ef_status, retval=0, len;
-	char		        print_msg[1024];
-	uint4		        prvadr[2], prvprv[2];
-	mstr			log_nam, trans_log_nam;
-	char			proc_name[PROC_NAME_MAXLEN + 1];
-	char			cmd_str[MAX_COMMAND_LINE_LENGTH], sigmbx_name[MAX_NAME_LEN + 1], trans_buff[MAX_FN_LEN];
-	uint4			signal_channel, cmd_channel;
-	unsigned short		mbsb[4], cmd_len;
-	uint4			buff, server_pid, clus_flags_stat;
-	gds_file_id		file_id;
-	seq_num			resync_seqno;
-	char			exp_log_file_name[MAX_FN_LEN], log_file_name[MAX_FN_LEN];
-	unsigned short		log_file_len;
-	int			exp_log_file_name_len, connect_parms_index;
-	char			*ptr, qwstring[100];
-
-	$DESCRIPTOR(proc_name_desc, proc_name);
-	$DESCRIPTOR(d_signal_mbox, sigmbx_name);
-	$DESCRIPTOR(cmd_desc, cmd_str);
-
-	memset((uchar_ptr_t)&jnlpool, 0, SIZEOF(jnlpool));
-	call_on_signal = gtmsource_sigstop;
-	ESTABLISH_RET(gtmsource_ch, SS_NORMAL);
-	if (-1 == gtmsource_get_opt())
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MUPCLIERR);
-
-	if (CLI_PRESENT == cli_present("START"))
-	{	/* Generate a unique name for the signal_mbx using global_name(gbldir) and "GTMX" as prefix */
-		log_nam.addr = GTM_GBLDIR;
-		log_nam.len = STR_LIT_LEN(GTM_GBLDIR);
-		if (SS_NORMAL != (status = trans_log_name(&log_nam, &trans_log_nam, trans_buff)))
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-					RTS_ERROR_LITERAL("gtm$gbldir not defined"), status);
-			gtmsource_exit(ABNORMAL_SHUTDOWN);
-		}
-		set_gdid_from_file((gd_id_ptr_t)&file_id, trans_buff, trans_log_nam.len);
-		global_name("GTMX", &file_id, sigmbx_name);
-		STR_OF_DSC(d_signal_mbox)++;
-		LEN_OF_DSC(d_signal_mbox) = sigmbx_name[0];
-		if (CLI_PRESENT != cli_present("DUMMY_START"))
-		{	/* Get the cmd line */
-			if (0 == ((status = lib$get_foreign(&cmd_desc, 0, &cmd_len, 0)) & 1))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to read the cmd-line into a string"), status);
-				gtmsource_exit(ABNORMAL_SHUTDOWN);
-			}
-			if (0 == cmd_len)
-			{ /* Command issued on the MUPIP command line, we have to build the argument string to pass to child */
-				MEMCPY_LIT(&cmd_str[cmd_len], SOURCE_PROMPT_START_QUAL);
-				cmd_len += STR_LIT_LEN(SOURCE_PROMPT_START_QUAL);
-				if (CLI_PRESENT == cli_present("BUFFSIZE"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], BUFF_QUAL);
-					cmd_len += STR_LIT_LEN(BUFF_QUAL);
-					ptr = i2asc(qwstring, gtmsource_options.buffsize);
-					memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-					cmd_len += ptr - qwstring;
-				}
-				if (CLI_PRESENT == cli_present("CONNECTPARAMS"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], CONNECT_QUAL);
-					cmd_len += STR_LIT_LEN(CONNECT_QUAL);
-					cmd_str[cmd_len++] = '"'; /* begin quote */
-					for (connect_parms_index = GTMSOURCE_CONN_HARD_TRIES_COUNT;
-					     connect_parms_index < GTMSOURCE_CONN_PARMS_COUNT; connect_parms_index++)
-					{
-						ptr = i2asc(qwstring, gtmsource_options.connect_parms[connect_parms_index]);
-						memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-						cmd_len += ptr - qwstring;
-						cmd_str[cmd_len++] = ','; /* delimiter */
-					}
-					cmd_str[cmd_len - 1] = '"'; /* end quote, overwrite last comma */
-				}
-				if (CLI_PRESENT == cli_present("FILTER"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], FILTER_QUAL);
-					cmd_len += STR_LIT_LEN(FILTER_QUAL);
-					len = strlen(gtmsource_options.filter_cmd);
-					memcpy(&cmd_str[cmd_len], gtmsource_options.filter_cmd, len);
-					cmd_len += len;
-				}
-				if (CLI_PRESENT == cli_present("LOG"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], LOG_QUAL);
-					cmd_len += STR_LIT_LEN(LOG_QUAL);
-					len = strlen(gtmsource_options.log_file);
-					memcpy(&cmd_str[cmd_len], gtmsource_options.log_file, len);
-					cmd_len += len;
-				}
-				if (CLI_PRESENT == cli_present("LOG_INTERVAL"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], LOGINTERVAL_QUAL);
-					cmd_len += STR_LIT_LEN(LOGINTERVAL_QUAL);
-					ptr = i2asc(qwstring, gtmsource_options.src_log_interval);
-					memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-					cmd_len += ptr - qwstring;
-				}
-				if (CLI_PRESENT == cli_present("PASSIVE"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], PASSIVE_QUAL);
-					cmd_len += STR_LIT_LEN(PASSIVE_QUAL);
-				}
-				if (CLI_PRESENT == cli_present("SECONDARY"))
-				{
-					MEMCPY_LIT(&cmd_str[cmd_len], SECONDARY_QUAL);
-					cmd_len += STR_LIT_LEN(SECONDARY_QUAL);
-					len = strlen(gtmsource_options.secondary_host);
-					memcpy(&cmd_str[cmd_len], gtmsource_options.secondary_host, len);
-					cmd_len += len;
-					MEMCPY_LIT(&cmd_str[cmd_len], ":");
-					cmd_len += 1;
-					ptr = i2asc(qwstring, gtmsource_options.secondary_port);
-					memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-					cmd_len += ptr - qwstring;
-				}
-			}
-			/* Append a dummy qualifier */
-			MEMCPY_LIT(&cmd_str[cmd_len], DUMMY_START_QUAL);
-			cmd_desc.dsc$w_length = cmd_len + STR_LIT_LEN(DUMMY_START_QUAL);
-			/* Create a mailbox to wait for the source server, tobe spawned off, to get initialized */
-			status = dfntmpmbx(LEN_AND_LIT("LNM$GROUP"));
-			if (SS$_NORMAL != status && SS$_SUPERSEDE != status)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to redefine LNM$TEMPORARY_MAILBOX"), status);
-				gtmsource_exit(ABNORMAL_SHUTDOWN);
-			}
-			SET_PRIV((PRV$M_GRPNAM), status);
-			if (SS$_NORMAL != status)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to get GRPNAM privilege"), status);
-				gtmsource_exit(ABNORMAL_SHUTDOWN);
-			}
-			status = sys$crembx(0, &signal_channel, 4, 4, 0, PSL$C_USER, &d_signal_mbox);
-			REL_PRIV;
-			if (SS$_NORMAL != status)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to create source server init-wait mailbox"), status);
-				gtmsource_exit(ABNORMAL_SHUTDOWN);
-			}
-			status = dfntmpmbx(LEN_AND_LIT("LNM$JOB"));
-			if (SS$_NORMAL != status && SS$_SUPERSEDE != status)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to redefine LNM$TEMPORARY_MAILBOX"), status);
-				gtmsource_exit(ABNORMAL_SHUTDOWN);
-			}
-			/* Create detached server and write startup commands to it */
-			if (SS$_NORMAL != repl_create_server(&cmd_desc, "GTMS", "", &cmd_channel, &server_pid, ERR_JNLPOOLSETUP))
-				gtmsource_exit(ABNORMAL_SHUTDOWN);
-			/* Async. read on the mailbox, just borrowing the event flag efn_op_job */
-			status = sys$qio(efn_op_job, signal_channel, IO$_READVBLK, &mbsb[0], 0, 0,
-					&buff, SIZEOF(buff), 0, 0, 0, 0);
-			if (SS$_NORMAL != status)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0,
-							ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to read from signal-mbx"), status);
-				retval = ABNORMAL_SHUTDOWN;
-			}
-			/* wait until (server process is alive AND qio-event-flag not set) */
-			while (!retval && (srv_alive = is_proc_alive(server_pid, 0)) &&
-			      (SS$_WASCLR == (ef_status = sys$readef(efn_op_job, &clus_flags_stat))))
-				SHORT_SLEEP(GTMSOURCE_WAIT_FOR_SRV_START);
-			if (!retval && !srv_alive)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Source server died while startup"));
-				retval = ABNORMAL_SHUTDOWN;
-			}
-			if (!retval && (SS$_WASSET != ef_status))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-					RTS_ERROR_LITERAL("Source server startup completion signalling problem"), ef_status);
-				retval = ABNORMAL_SHUTDOWN;
-			}
-			/* Verify the content read from mailbox */
-			if (!retval && (SERVER_UP != buff))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Invalid message read from signalling mbox"));
-				retval = ABNORMAL_SHUTDOWN;
-			}
-			/* Deassign the send-cmd mailbox channel */
-			if (SS$_NORMAL != (status = sys$dassgn(cmd_channel)))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to close send-cmd mbox channel"), status);
-				retval = ABNORMAL_SHUTDOWN;
-			}
-			/* Deassign the signalling mailbox channel */
-			if (SS$_NORMAL != (status = sys$dassgn(signal_channel)))
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-						RTS_ERROR_LITERAL("Unable to close source server startup mbox channel"), status);
-				retval = ABNORMAL_SHUTDOWN;
-			}
-			gtmsource_exit(retval);
-		}
-		process_id = getpid(); /* pid of the source server */
-		/* Get a meaningful process name */
-		proc_name_desc.dsc$w_length = get_proc_name(LIT_AND_LEN("GTMSRC"), process_id, proc_name);
-		if (SS$_NORMAL != (status = sys$setprn(&proc_name_desc)))
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-					RTS_ERROR_LITERAL("Unable to change source server process name"), status);
-			gtmsource_exit(ABNORMAL_SHUTDOWN);
-		}
-	}
-	jnlpool_init(GTMSOURCE, gtmsource_options.start, &jnlpool_inited);
-	/* When gtmsource_options.start is TRUE,
-	 *	jnlpool_inited == TRUE ==> fresh start, and
-	 *	jnlpool_inited == FALSE ==> start after a crash
-	 */
-	if (!gtmsource_options.start)
-	{
-		if (gtmsource_options.shut_down)
-			gtmsource_exit(gtmsource_shutdown(FALSE, NORMAL_SHUTDOWN) - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.activate)
-			gtmsource_exit(gtmsource_mode_change(GTMSOURCE_MODE_ACTIVE_REQUESTED) - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.deactivate)
-			gtmsource_exit(gtmsource_mode_change(GTMSOURCE_MODE_PASSIVE_REQUESTED) - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.checkhealth)
-			gtmsource_exit(gtmsource_checkhealth() - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.changelog)
-			 gtmsource_exit(gtmsource_changelog() - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.showbacklog)
-			gtmsource_exit(gtmsource_showbacklog() - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.stopsourcefilter)
-			gtmsource_exit(gtmsource_stopfilter() - NORMAL_SHUTDOWN);
-		else if (gtmsource_options.update)
-			gtmsource_exit(gtmsource_secnd_update(FALSE) - NORMAL_SHUTDOWN);
-		else
-			gtmsource_exit(gtmsource_statslog() - NORMAL_SHUTDOWN);
-	}
-	assert(gtmsource_options.start);
-	is_src_server = TRUE;
-	strcpy(jnlpool.gtmsource_local->log_file, gtmsource_options.log_file);
-	jnlpool.gtmsource_local->log_interval = log_interval = gtmsource_options.src_log_interval;
-	jnlpool.gtmsource_local->mode = gtmsource_options.mode;
-	if (GTMSOURCE_MODE_ACTIVE == gtmsource_options.mode)
-	{
-		jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_COUNT] =
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HARD_TRIES_COUNT];
-		jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD] =
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD];
-		jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD] =
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD];
-		jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_ALERT_PERIOD] =
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_ALERT_PERIOD];
-		jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HEARTBEAT_PERIOD] =
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_PERIOD];
-		jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT] =
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT];
-	}
-	util_log_open(STR_AND_LEN(gtmsource_options.log_file));
-	/* If previous shutdown did not complete successfully and jnlpool was left lying around, do not proceed */
-	if (!jnlpool_inited && NO_SHUTDOWN != jnlpool.gtmsource_local->shutdown)
-	{
-		sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLINFO, 2,
-			RTS_ERROR_LITERAL("Previous source server did not complete shutdown. Resetting shutdown related fields\n"));
-		repl_log(gtmsource_log_fp, TRUE, TRUE, print_msg);
-		jnlpool.gtmsource_local->shutdown = NO_SHUTDOWN;
-	}
-	REPL_DPRINT1("Setting up regions\n");
-	gvinit();
-
-	/* We use the same code dse uses to open all regions but we must make sure
-	 * they are all open before proceeding.
-	 */
-	all_files_open = region_init(FALSE);
-	if (!all_files_open)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOTALLDBOPN);
-		gtmsource_autoshutdown();
-	}
-	/* Determine primary side null subscripts collation order */
-	/* Also check whether all regions have same null collation order */
-	primary_side_std_null_coll = -1;
-	for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions; reg < region_top; reg++)
-	{
-		csa = &FILE_INFO(reg)->s_addrs;
-		if (primary_side_std_null_coll != csa->hdr->std_null_coll)
-		{
-			if (-1 == primary_side_std_null_coll)
-				primary_side_std_null_coll = csa->hdr->std_null_coll;
-			else
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NULLCOLLDIFF);
-		}
-	}
-	primary_side_trigger_support = FALSE;
-	EXIT_IF_REPLOFF_JNLON(gd_header);
-	if (jnlpool_inited)
-		gtmsource_seqno_init();
-	jnlpool.gtmsource_local->gtmsource_pid = process_id;
-	rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-	rel_sem_immediate(SOURCE, JNL_POOL_ACCESS_SEM);
-	/* Indicate the start up completion to the parent mupip process through a mail box */
-	status = dfntmpmbx(LEN_AND_LIT("LNM$GROUP"));
-	if (SS$_NORMAL != status && SS$_SUPERSEDE != status)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to redefine LNM$TEMPORARY_MAILBOX"), status);
-		gtmsource_exit(ABNORMAL_SHUTDOWN);
-	}
-	SET_PRIV((PRV$M_GRPNAM), status);
-	status = sys$crembx(0, &signal_channel, 4, 4, 0, PSL$C_USER, &d_signal_mbox);
-	REL_PRIV;
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to create source server init-wait mailbox"), status);
-		gtmsource_exit(ABNORMAL_SHUTDOWN);
-	}
-	status = dfntmpmbx(LEN_AND_LIT("LNM$JOB"));
-	if (SS$_NORMAL != status && SS$_SUPERSEDE != status)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to redefine LNM$TEMPORARY_MAILBOX"), status);
-		gtmsource_exit(ABNORMAL_SHUTDOWN);
-	}
-	buff = SERVER_UP;
-	status = sys$qiow(EFN$C_ENF, signal_channel, IO$_WRITEVBLK | IO$M_NOW, &mbsb[0], 0, 0, &buff, SIZEOF(buff), 0, 0, 0, 0);
-	if (SS$_NORMAL != status)
-	{
-		if (SS$_NORMAL != (status = sys$dassgn(signal_channel)))
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to close source server startup mbox channel (child)"), status);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to write start-up completion in the source server startup mbox (child)"),
-				status);
-		gtmsource_exit(ABNORMAL_SHUTDOWN);
-	}
-	if (SS$_NORMAL != (status = sys$dassgn(signal_channel)))
-	{
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to close source server startup mbox channel (child)"), status);
-		gtmsource_exit(ABNORMAL_SHUTDOWN);
-	}
-	gtmsource_srv_count++;
-	gtmsource_secnd_update(TRUE);
-	region_top = gd_header->regions + gd_header->n_regions;
-	for (reg = gd_header->regions; reg < region_top; reg++)
-	{
-		if (reg->read_only && REPL_ALLOWED(&FILE_INFO(reg)->s_addrs))
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				   RTS_ERROR_LITERAL("Source Server does not have write permissions to one or "
-					   	     "more database files that are replicated"));
-			gtmsource_autoshutdown();
-		}
-	}
-	gtm_event_log_init();
-	if (jnlpool_inited)
-		sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLINFO, 2,
-			    RTS_ERROR_LITERAL("GTM Replication Source Server : Fresh Start"));
-	else
-		sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLINFO, 2,
-			    RTS_ERROR_LITERAL("GTM Replication Source Server : Crash Restart"));
-	repl_log(gtmsource_log_fp, TRUE, TRUE, print_msg);
-	gtm_event_log(GTM_EVENT_LOG_ARGC, "MUPIP", "REPLINFO", print_msg);
-	jnl_ver = JNL_VER_THIS;
-	do
-	{	/* If mode is passive, go to sleep. Wakeup every now and
-		 * then and check to see if I have to become active */
-		gtmsource_state = GTMSOURCE_START;
-		while (jnlpool.gtmsource_local->mode == GTMSOURCE_MODE_PASSIVE
-			&& jnlpool.gtmsource_local->shutdown == NO_SHUTDOWN)
-				SHORT_SLEEP(GTMSOURCE_WAIT_FOR_MODE_CHANGE)
-			;
-		if (GTMSOURCE_MODE_PASSIVE == jnlpool.gtmsource_local->mode)
-		{	/* Shutdown initiated */
-			assert(jnlpool.gtmsource_local->shutdown == SHUTDOWN);
-			sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLINFO, 2,
-				    RTS_ERROR_LITERAL("GTM Replication Source Server Shutdown signalled"));
-			repl_log(gtmsource_log_fp, TRUE, TRUE, print_msg);
-			gtm_event_log(GTM_EVENT_LOG_ARGC, "MUPIP", "REPLINFO", print_msg);
-			break;
-		}
-		gtmsource_poll_actions(FALSE);
-		if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-			continue;
-		if (GTMSOURCE_MODE_ACTIVE_REQUESTED == jnlpool.gtmsource_local->mode)
-			jnlpool.gtmsource_local->mode = GTMSOURCE_MODE_ACTIVE;
-		sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLINFO, 2,
-			    RTS_ERROR_LITERAL("GTM Replication Source Server now in ACTIVE mode"));
-		repl_log(gtmsource_log_fp, TRUE, TRUE, print_msg);
-		gtm_event_log(GTM_EVENT_LOG_ARGC, "MUPIP", "REPLINFO", print_msg);
-		if (SS_NORMAL != (status = gtmsource_alloc_tcombuff()))
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-				  RTS_ERROR_LITERAL("Error allocating initial tcom buffer space. Malloc error"), status);
-		gtmsource_filter = NO_FILTER;
-		if ('\0' != jnlpool.gtmsource_local->filter_cmd[0])
-		{
-			if (SS_NORMAL == (status = repl_filter_init(jnlpool.gtmsource_local->filter_cmd)))
-				gtmsource_filter |= EXTERNAL_FILTER;
-			else
-			{
-				if (EREPL_FILTERSTART_EXEC == repl_errno)
-					gtmsource_exit(ABNORMAL_SHUTDOWN);
-			}
-		}
-		grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, ASSERT_NO_ONLINE_ROLLBACK);
-		QWASSIGN(resync_seqno, seq_num_zero);
-		for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions; reg < region_top; reg++)
-		{
-			assert(reg->open);
-			csa = &FILE_INFO(reg)->s_addrs;
-			if (REPL_ALLOWED(csa->hdr))
-			{
-				if (QWLT(resync_seqno, csa->hdr->resync_seqno))
-					QWASSIGN(resync_seqno, csa->hdr->resync_seqno);
-			}
-		}
-		if (QWGT(jnlpool.gtmsource_local->read_jnl_seqno, resync_seqno))         /* source server terminated before it */
-			QWASSIGN(resync_seqno, jnlpool.gtmsource_local->read_jnl_seqno); /* set resync_seqno in the file headers */
-		QWASSIGN(jnlpool.gtmsource_local->read_jnl_seqno, resync_seqno);
-		QWASSIGN(jnlpool.gtmsource_local->read_addr, jnlpool.jnlpool_ctl->write_addr);
-		jnlpool.gtmsource_local->read = jnlpool.jnlpool_ctl->write;
-		jnlpool.gtmsource_local->read_state = READ_POOL;
-		if (QWLT(jnlpool.gtmsource_local->read_jnl_seqno, jnlpool.jnlpool_ctl->jnl_seqno))
-		{
-			jnlpool.gtmsource_local->read_state = READ_FILE;
-			QWASSIGN(gtmsource_save_read_jnl_seqno, jnlpool.jnlpool_ctl->jnl_seqno);
-			gtmsource_pool2file_transition = TRUE; /* so that we read the latest gener jnl files */
-		}
-		rel_lock(jnlpool.jnlpool_dummy_reg);
-		gtmsource_process();
-		/* gtmsource_process returns only when mode needs to be changed to PASSIVE */
-		assert(gtmsource_state == GTMSOURCE_CHANGING_MODE);
-		gtmsource_ctl_close();
-		gtmsource_free_msgbuff();
-		gtmsource_free_tcombuff();
-		gtmsource_free_filter_buff();
-		gtmsource_stop_heartbeat();
-		if (FD_INVALID != gtmsource_sock_fd)
-			repl_close(&gtmsource_sock_fd);
-		if (gtmsource_filter & EXTERNAL_FILTER)
-			repl_stop_filter();
-	} while (TRUE);
-	gtmsource_end();
-	return(SS_NORMAL);
-}
diff --git a/sr_vvms/gtmsource.h b/sr_vvms/gtmsource.h
deleted file mode 100644
index c96f5ba..0000000
--- a/sr_vvms/gtmsource.h
+++ /dev/null
@@ -1,410 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef GTMSOURCE_H
-#define GTMSOURCE_H
-
-/* for in_addr_t typedef on Linux */
-#include "gtm_inet.h"
-#include "gtm_ipv6.h"
-#include <gtm_socket.h>
-
-/* Needs mdef.h, gdsfhead.h and its dependencies */
-#define JNLPOOL_DUMMY_REG_NAME		"JNLPOOL_REG"
-#define MAX_FILTER_CMD_LEN		512
-#define MIN_JNLPOOL_SIZE		(1 * 1024 * 1024)
-
-#ifdef VMS
-#define MAX_GSEC_KEY_LEN		32 /* 31 is allowed + 1 for NULL terminator */
-#endif
-
-enum
-{
-	READ_POOL,
-	READ_FILE
-};
-
-enum
-{
-	GTMSOURCE_MODE_PASSIVE,
-	GTMSOURCE_MODE_ACTIVE,
-	GTMSOURCE_MODE_PASSIVE_REQUESTED,
-	GTMSOURCE_MODE_ACTIVE_REQUESTED
-};
-
-#define SRV_ALIVE		0x0
-#define SRV_DEAD		0x1
-#define SRV_ERR			0x2
-
-typedef enum
-{
-	GTMSOURCE_DUMMY_STATE = 0,
-	GTMSOURCE_START,
-	GTMSOURCE_WAITING_FOR_CONNECTION,
-	GTMSOURCE_WAITING_FOR_RESTART,
-	GTMSOURCE_SEARCHING_FOR_RESTART,
-	GTMSOURCE_SENDING_JNLRECS,
-	GTMSOURCE_WAITING_FOR_XON,
-	GTMSOURCE_CHANGING_MODE
-} gtmsource_state_t;
-
-#define GTMSOURCE_WAIT_FOR_RECEIVER_TO_QUIT     5 /* seconds */
-#define GTMSOURCE_WAIT_FOR_RECEIVER_CLOSE_CONN  (1000 - 1) /* ms */
-#define GTMSOURCE_WAIT_FOR_JNLOPEN              10 /* ms */
-#define GTMSOURCE_WAIT_FOR_JNL_RECS             1 /* ms */
-#define GTMSOURCE_WAIT_FOR_SRV_START		10 /* ms */
-#define GTMSOURCE_WAIT_FOR_MODE_CHANGE	(1000 - 1) /* ms, almost 1 s */
-#define GTMSOURCE_WAIT_FOR_SHUTDOWN	(1000 - 1) /* ms, almost 1 s */
-#define GTMSOURCE_WAIT_FOR_SOURCESTART	(1000 - 1) /* ms */
-
-#define GTMSOURCE_SHUTDOWN_PAD_TIME		5 /* seconds */
-
-#define GTMSOURCE_SENT_THRESHOLD_FOR_RECV	(1 * 1024 * 1024)
-#define BACKLOG_BYTES_THRESHOLD			(1 * 1024 * 1024)
-#define BACKLOG_COUNT_THRESHOLD			(10 * 1024)
-
-#define GTMSOURCE_MIN_TCP_SEND_BUFSIZE	(16   * 1024)	/* anything less than this, issue a warning */
-#define GTMSOURCE_TCP_SEND_BUFSIZE_INCR	(32   * 1024)	/* attempt to get a larger buffer with this increment */
-#define GTMSOURCE_TCP_SEND_BUFSIZE	(1024 * 1024)	/* desirable to set the buffer size to be able to send large chunks */
-#define GTMSOURCE_MIN_TCP_RECV_BUFSIZE	(512)		/* anything less than this, issue a warning */
-#define GTMSOURCE_TCP_RECV_BUFSIZE	(1024)		/* not much inbound traffic, we can live with a low limit */
-
-#define GTMSOURCE_FH_FLUSH_INTERVAL	60 /* seconds, if required, flush file header(s) every these many seconds */
-
-typedef struct
-{ /* IMPORTANT : all fields that are used by the source server reading from pool logic must be defined VOLATILE to avoid compiler
-   * optimization, forcing fresh load on every access */
-	replpool_identifier	jnlpool_id;
-	seq_num			start_jnl_seqno;	/* The sequence number with which operations started */
-	volatile seq_num 	jnl_seqno; 		/* Sequence number for transactions. Updated by GTM process */
-	uint4			jnldata_base_off;	/* Journal pool offset from where journal data starts */
-	uint4			jnlpool_size; 		/* Available space for journal data in bytes */
-	uint4			write; 			/* Relative offset from jnldata_base_off for the next journal record to
-							 * be written. Updated by GTM process. */
-	volatile uint4		lastwrite_len;  	/* The length of the last transaction written into the journal pool.
-							 * Copied to jnldata_hdr.prev_jnldata_len before writing into the pool.
-							 * Updated by GTM process. */
-	volatile qw_off_t	early_write_addr;	/* Virtual address assuming the to-be-written jnl records are already
-							 * written into the journal pool. Is equal to write_addr except in the
-							 * window when the actual write takes place. */
-	volatile qw_off_t	write_addr;		/* Virtual address of the next journal record to be written in the merged
-							 * journal file.  Note that the merged journal may not exist.
-			     	 			 * Updated by GTM process */
-	boolean_t		upd_disabled;		/* Identify whether updates are disabled or not  on the secondary */
-	volatile jnl_tm_t	prev_jnlseqno_time;	/* To ensure that time never decreases across successive jnl records
-							 * across ALL replicated regions attached to this journal pool.
-							 */
-} jnlpool_ctl_struct;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(save)
-# pragma pointer_size(long)
-#endif
-
-typedef jnlpool_ctl_struct 	*jnlpool_ctl_ptr_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(restore)
-#endif
-
-/*
- * When a GTM process writes journal data into the journal pool, it uses the
- * following layout at location write
- *
- * struct jnlpool_trans_struct
- * {
- *	jnldata_hdr_struct	jnldata_hdr; 	- jnldata_hdr.jnldata_len
- *						  is the length of journal
- *						  data of a transaction
- * 	uchar			jnldata[jnldata_len]; 	- transaction journal
- * 							  data
- * };
- */
-
-/********************** VERY IMPORTANT ********************************
- * Keep SIZEOF(jnldata_hdr_struct) == ~JNL_WRT_END_MASK + 1 and
- * jnlpool_size should be a multiple of (~JNL_WRT_END_MASK + 1).
- * This is to avoid jnldata_hdr_struct from wrapping, so that fields
- * remain contiguous.
- **********************************************************************/
-typedef struct
-{
-	uint4 		jnldata_len;	/* length of the journal data of a
-					 * a transaction in bytes */
-	uint4		prev_jnldata_len; /* length of the journal data of
-					   * the previous transaction in the
-					   * journal pool (in bytes) */
-} jnldata_hdr_struct;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(save)
-# pragma pointer_size(long)
-#endif
-
-typedef jnldata_hdr_struct 	*jnldata_hdr_ptr_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(restore)
-#endif
-
-#define REPL_CONN_HARD_TRIES_COUNT		5	/* Default number of connection hard tries */
-#define REPL_CONN_HARD_TRIES_PERIOD		500	/* msec Default connection hard try period */
-#define REPL_CONN_SOFT_TRIES_PERIOD		5	/* sec Default connection soft try period*/
-#define REPL_CONN_ALERT_ALERT_PERIOD		30	/* sec Default alert period*/
-#define REPL_CONN_HEARTBEAT_PERIOD		15	/* sec Default heartbeat period */
-#define REPL_CONN_HEARTBEAT_MAX_WAIT		60	/* sec Default heartbeat maximum waiting period */
-#define REPL_MAX_CONN_HARD_TRIES_PERIOD		1000 /* ms */
-
-#define REPL_MAX_LOG_PERIOD					150 /*sec Maximum logging period */
-
-enum
-{
-	GTMSOURCE_CONN_HARD_TRIES_COUNT = 0,
-	GTMSOURCE_CONN_HARD_TRIES_PERIOD,
-	GTMSOURCE_CONN_SOFT_TRIES_PERIOD,
-	GTMSOURCE_CONN_ALERT_PERIOD,
-	GTMSOURCE_CONN_HEARTBEAT_PERIOD,
-	GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT,
-	GTMSOURCE_CONN_PARMS_COUNT
-};
-
-#define	GTMSOURCE_CONN_PARMS_DELIM	","
-#define JNLPOOL_SEGMENT			'J'
-
-/*
- * The following structure contains data items local to the Source Server.
- * It is maintained in the journal pool to provide for persistence across
- * instantiations of the Source Server (due to crashes).
- */
-typedef struct
-{
-	uint4		gtmsource_pid;	/* Process identification of source server */
-	int4		filler1;	/* Keep read_addr 8-byte aligned */
-
- 	/* Control fields */
-	qw_off_t 	read_addr; 	/* Virtual address of the next journal record in the merged journal file to read */
-	seq_num		read_jnl_seqno; /* Next jnl_seqno to be read */
-	uint4		read; 		/* Offset relative to jnldata_base_off of the next journal record from the journal pool */
-	int4 		read_state;  	/* From where to read - pool or the file(s)? */
-	int4		mode; 		/* Active, or Passive */
-	int4		lastsent_time;	/* Currently unused, Vinaya 2005/02/08 */
-	seq_num		lastsent_jnl_seqno; /* Currently unsued, Vinaya 2005/02/08 */
-
-	/* Data items used in communicating action qualifiers (show statistics, shutdown, etc) and qualifier values
-	 * (log file, shutdown time, the identity of the secondary system, etc).
- 	 */
-
-	uint4		statslog;	/* Boolean - detailed log on/off? */
-	uint4		shutdown;	/* Use to communicate shutdown related values */
-	int4		shutdown_time;	/* Time allowed for shutdown in seconds */
-	uint4		filler4;	/* Keep secondary_inet_addr aligned */
-	union gtm_sockaddr_in46	secondary_inet_addr;	/* IP address of the secondary */
-	int			secondary_af;		/* address family of the seconary */
-	int			secondary_addrlen;	/* length of the secondary address */
-	uint4		secondary_port;	/* Port at which Receiver is listening */
-	uint4		changelog; 	/* change the log file or log interval */
-	uint4		log_interval;	/* seqno count interval at which source server prints messages about replic traffic */
-	uint4		filler2;	/* make gtmsource_local_struct size multiple of 8 bytes */
-	int4		connect_parms[GTMSOURCE_CONN_PARMS_COUNT]; /* Connect failure tries parms. Add fillers (if necessary)
-								    * based on GTMSOURCE_CONN_PARMS_COUNT */
-	uint4		filler3;	/* extra space after connect_parms */
-	char            secondary_host[MAX_HOST_NAME_LEN];
-	char		filter_cmd[MAX_FILTER_CMD_LEN];
-	char		log_file[MAX_FN_LEN + 1];
-	char		statslog_file[MAX_FN_LEN + 1];
-} gtmsource_local_struct;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(save)
-# pragma pointer_size(long)
-#endif
-
-typedef gtmsource_local_struct *gtmsource_local_ptr_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(restore)
-#endif
-
-/*
- * Journal pool shared memory layout -
- *
- * jnlpool_ctl_struct
- * mutex structure (mutex_struct) [JNLPOOL lock control]
- * NUM_CRIT_ENTRY * mutex_que_entry [JNLPOOL lock control]
- * mutex spin parms structure (mutex_spin_parms_struct) [JNLPOOL lock control]
- * node local structure (node_local) [JNLPOOL lock control]
- * gtmsource_local_struct
- * zero or more jnlpool_trans_struct
- */
-
-/*
- * Push the jnldata_base_off to be aligned
- * to (~JNL_WRT_END_MASK + 1)-byte boundary
- */
-
-#define JNLPOOL_CTL_SIZE	ROUND_UP(SIZEOF(jnlpool_ctl_struct), CACHELINE_SIZE) /* align crit semaphore at cache line */
-#define JNLDATA_BASE_OFF	((JNLPOOL_CTL_SIZE +\
-				  JNLPOOL_CRIT_SPACE +\
-				  SIZEOF(mutex_spin_parms_struct) +\
-				  SIZEOF(node_local) +\
-				  SIZEOF(gtmsource_local_struct) +\
-				  ~JNL_WRT_END_MASK) & JNL_WRT_END_MASK)
-#ifdef VMS
-typedef struct
-{
-	char			name[MAX_GSEC_KEY_LEN];
-	struct dsc$descriptor_s desc;
-} t_vms_shm_key;
-#endif
-
-typedef struct
-{
-	jnlpool_ctl_ptr_t	jnlpool_ctl;
-	gd_region		*jnlpool_dummy_reg; /* some functions need gd_region */
-	gtmsource_local_ptr_t	gtmsource_local;
-	sm_uc_ptr_t		jnldata_base;
-#ifdef VMS
-	sm_uc_ptr_t		shm_range[2];
-	t_vms_shm_key		vms_jnlpool_key;
-	int4			shm_lockid;
-#endif
-} jnlpool_addrs;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(save)
-# pragma pointer_size(long)
-#endif
-
-typedef jnlpool_addrs	*jnlpool_addrs_ptr_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(restore)
-#endif
-
-typedef enum
-{
-	GTMPROC,
-	GTMSOURCE
-} jnlpool_user;
-
-typedef struct
-{
-	boolean_t       start;
-	boolean_t	shut_down;
-	boolean_t	activate;
-	boolean_t	deactivate;
-	boolean_t       checkhealth;
-	boolean_t	statslog;
-	boolean_t	showbacklog;
-	boolean_t	changelog;
-	boolean_t	stopsourcefilter;
-	boolean_t	update; /* A new qualifier for updates on secondary */
-	int4		shutdown_time;
-	int4		buffsize;
-	int4		mode;
-	int4		secondary_port;
-	uint4		src_log_interval;
-	int4		connect_parms[GTMSOURCE_CONN_PARMS_COUNT];
-	char            filter_cmd[MAX_FILTER_CMD_LEN];
-	char            secondary_host[MAX_HOST_NAME_LEN];
-	char            log_file[MAX_FN_LEN + 1];
-} gtmsource_options_t;
-
-#define EXIT_IF_REPLOFF_JNLON(gd_header)									\
-	region_top = gd_header->regions + gd_header->n_regions;							\
-	for (reg = gd_header->regions; reg < region_top; reg++)							\
-	{													\
-		csa = &FILE_INFO(reg)->s_addrs;									\
-		if (!REPL_ALLOWED(csa) && JNL_ALLOWED(csa))							\
-		{												\
-		 	gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_REPLOFFJNLON, 2, DB_LEN_STR(reg));	\
-			gtmsource_autoshutdown();								\
-		}												\
-	}
-
-#define UPDATE_RESYNC_SEQNO(REGION, pre_update, post_update)							\
-{ /* modifies csa, was_crit; uses pre_update, post_update */							\
-	csa = &FILE_INFO(REGION)->s_addrs;									\
-	if (REPL_ALLOWED(csa->hdr))										\
-	{ /* Although csa->hdr->resync_seqno is only modified by the source					\
-	   * server and never concurrently, it is accessed by fileheader_sync() which				\
-	   * does it while in crit. To avoid the latter from reading an inconsistent				\
-	   * value (i.e. neither the pre-update nor the post-update value), which is				\
-	   * possible if the 8-byte operation is not atomic but a sequence of two				\
-	   * 4-byte operations AND if the pre-update and post-update value differ in				\
-	   * their most significant 4-bytes, we grab crit.							\
-	   *													\
-	   * For native INT8 platforms, we expect the compiler to optimize the "if" away.			\
-	   *													\
-	   * Note: the ordering of operands in the below if check is the way it is because			\
-	   * a. the more frequent case is QWCHANGE_IS_READER_CONSISTENT returning TRUE.				\
-	   * b. source server does not hold crit coming here (but we are covering the case			\
-	   *    when it may)											\
-	   */													\
-		if (!QWCHANGE_IS_READER_CONSISTENT(pre_update, post_update)					\
-				&& FALSE == (was_crit = csa->now_crit))						\
-			grab_crit(REGION);									\
-		FILE_INFO(REGION)->s_addrs.hdr->resync_seqno = post_update;					\
-		if (!QWCHANGE_IS_READER_CONSISTENT(pre_update, post_update)					\
-				&& FALSE == was_crit)								\
-			rel_crit(REGION);									\
-	}													\
-}
-
-/********** Source server function prototypes **********/
-int		gtmsource(void);
-boolean_t	gtmsource_is_heartbeat_overdue(time_t *now, repl_heartbeat_msg_t *overdue_heartbeat);
-int		gtmsource_alloc_filter_buff(int bufsiz);
-int		gtmsource_alloc_msgbuff(int maxbuffsize);
-int		gtmsource_alloc_tcombuff(void);
-void		gtmsource_free_filter_buff(void);
-void		gtmsource_free_msgbuff(void);
-void		gtmsource_free_tcombuff(void);
-int		gtmsource_changelog(void);
-int		gtmsource_checkhealth(void);
-int		gtmsource_comm_init(void);
-int		gtmsource_ctl_close(void);
-int		gtmsource_ctl_init(void);
-int		gtmsource_end1(boolean_t auto_shutdown);
-int		gtmsource_est_conn(void);
-int		gtmsource_get_jnlrecs(uchar_ptr_t buff, int *data_len, int maxbufflen, boolean_t read_multiple);
-int		gtmsource_get_opt(void);
-int		gtmsource_ipc_cleanup(boolean_t auto_shutdown, int *exit_status);
-int		gtmsource_mode_change(int to_mode);
-int		gtmsource_poll_actions(boolean_t poll_secondary);
-int		gtmsource_process(void);
-int		gtmsource_readfiles(uchar_ptr_t buff, int *data_len, int maxbufflen, boolean_t read_multiple);
-int		gtmsource_readpool(uchar_ptr_t buff, int *data_len, int maxbufflen, boolean_t read_multiple, qw_num stop_read_at);
-int		gtmsource_recv_restart(seq_num *recvd_jnl_seqno, int *msg_type, int *start_flags);
-int		gtmsource_secnd_update(boolean_t print_message);
-int		gtmsource_set_lookback(void);
-int		gtmsource_showbacklog(void);
-int		gtmsource_shutdown(boolean_t auto_shutdown, int exit_status);
-int		gtmsource_srch_restart(seq_num recvd_jnl_seqno, int recvd_start_flags);
-int		gtmsource_statslog(void);
-int		gtmsource_stopfilter(void);
-int		gtmsource_update_resync_tn(seq_num resync_seqno);
-void		gtmsource_autoshutdown(void);
-void		gtmsource_end(void);
-void		gtmsource_exit(int exit_status);
-void		gtmsource_seqno_init(void);
-void		gtmsource_sigstop(void);
-boolean_t	jnlpool_hasnt_overflowed(jnlpool_ctl_ptr_t jctl, uint4 jnlpool_size, qw_num read_addr);
-void		jnlpool_detach(void);
-void		jnlpool_init(jnlpool_user pool_user, boolean_t gtmsource_startup, boolean_t *jnlpool_initialized);
-int		gtmsource_init_heartbeat(void);
-int		gtmsource_process_heartbeat(repl_heartbeat_msg_t *heartbeat_msg);
-int		gtmsource_send_heartbeat(time_t *now);
-int		gtmsource_stop_heartbeat(void);
-void		gtmsource_flush_fh(seq_num resync_seqno);
-void		gtmsource_reinit_logseqno(void);
-
-#endif /* GTMSOURCE_H */
diff --git a/sr_vvms/gtmsource_changelog.c b/sr_vvms/gtmsource_changelog.c
deleted file mode 100644
index 7858d0f..0000000
--- a/sr_vvms/gtmsource_changelog.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_time.h"
-#include "gtm_string.h"
-#include "gtm_inet.h" /* Required for gtmsource.h */
-#include <errno.h>
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "repl_shutdcode.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "repl_sem.h"
-#include "util.h"
-#include "repl_log.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gtmsource_options_t	gtmsource_options;
-
-int gtmsource_changelog(void)
-{
-	uint4	changelog_desired = 0, changelog_accepted = 0;
-
-	if (0 > grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM))
-	{
-		util_out_print("Error grabbing jnlpool option write lock. Could not initiate change log", TRUE);
-		return (ABNORMAL_SHUTDOWN);
-	}
-	if (0 != jnlpool.gtmsource_local->changelog)
-	{
-		util_out_print("Change log is already in progress. Not initiating change in log file or log interval", TRUE);
-		rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-		return (ABNORMAL_SHUTDOWN);
-	}
-	if ('\0' != gtmsource_options.log_file[0]) /* trigger change in log file */
-	{
-		changelog_desired |= REPLIC_CHANGE_LOGFILE;
-		if (0 != strcmp(jnlpool.gtmsource_local->log_file, gtmsource_options.log_file))
-		{
-			changelog_accepted |= REPLIC_CHANGE_LOGFILE;
-			strcpy(jnlpool.gtmsource_local->log_file, gtmsource_options.log_file);
-			util_out_print("Change log initiated with file !AD", TRUE, LEN_AND_STR(gtmsource_options.log_file));
-		} else
-			util_out_print("Log file is already !AD. Not initiating change in log file", TRUE,
-					LEN_AND_STR(gtmsource_options.log_file));
-	}
-	if (0 != gtmsource_options.src_log_interval) /* trigger change in log interval */
-	{
-		changelog_desired |= REPLIC_CHANGE_LOGINTERVAL;
-		if (gtmsource_options.src_log_interval != jnlpool.gtmsource_local->log_interval)
-		{
-			changelog_accepted |= REPLIC_CHANGE_LOGINTERVAL;
-			jnlpool.gtmsource_local->log_interval = gtmsource_options.src_log_interval;
-			util_out_print("Change log initiated with interval !UL", TRUE, gtmsource_options.src_log_interval);
-		} else
-			util_out_print("Log interval is already !UL. Not initiating change in log interval", TRUE,
-					gtmsource_options.src_log_interval);
-	}
-	if (0 != changelog_accepted)
-		jnlpool.gtmsource_local->changelog = changelog_accepted;
-	else
-		util_out_print("No change to log file or log interval", TRUE);
-	rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-	return ((0 != changelog_accepted && changelog_accepted == changelog_desired) ? NORMAL_SHUTDOWN : ABNORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmsource_checkhealth.c b/sr_vvms/gtmsource_checkhealth.c
deleted file mode 100644
index 5a801d8..0000000
--- a/sr_vvms/gtmsource_checkhealth.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2007 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#include "gtm_string.h"
-#ifdef UNIX
-#include <sys/sem.h>
-#endif
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "repl_sp.h"
-#include "repl_log.h"
-#include "is_proc_alive.h"
-#include "gtmmsg.h"
-#include "sgtm_putmsg.h"
-#include "util.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gtmsource_options_t	gtmsource_options;
-GBLREF	gd_addr			*gd_header;
-
-int gtmsource_checkhealth(void)
-{
-	uint4			gtmsource_pid;
-	int			status, semval;
-	boolean_t		srv_alive, all_files_open;
-	seq_num			reg_seqno, jnlseqno;
-	gd_region		*reg, *region_top;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	char			errtxt[OUT_BUFF_SIZE];
-
-	error_def(ERR_NOTALLDBOPN);
-	error_def(ERR_REPLJNLCLOSED);
-
-	REPL_DPRINT1("Checking health of Source Server\n");
-
-	/* Grab the jnlpool option write lock */
-	if (0 > grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM))
-	{
-		repl_log(stderr, FALSE, TRUE,
-			 "Error grabbing jnlpool option write lock : %s. Could not check health of Source Server\n",
-			 REPL_SEM_ERROR);
-		return (SRV_ERR + NORMAL_SHUTDOWN);
-	}
-
-	gtmsource_pid = jnlpool.gtmsource_local->gtmsource_pid;
-	if (0 < gtmsource_pid)
-	{
-		if (srv_alive = is_proc_alive(gtmsource_pid, 0))
-			semval = get_sem_info(SOURCE, SRC_SERV_COUNT_SEM, SEM_INFO_VAL);
-		if (srv_alive && 1 == semval)
-		{
-			repl_log(stderr, FALSE, TRUE, FORMAT_STR, gtmsource_pid, "Source server", "");
-			status = SRV_ALIVE;
-		} else if (!srv_alive || 0 == semval)
-		{
-			repl_log(stderr, FALSE, TRUE, FORMAT_STR, gtmsource_pid, "Source server", " NOT");
-			if (srv_alive)
-				repl_log(stderr, FALSE, TRUE, "Another process exists with same pid");
-			status = SRV_DEAD;
-		} else
-		{
-			repl_log(stderr, FALSE, TRUE,
-				"Error in source server semval : %s. Could not check health of Source Server\n", REPL_SEM_ERROR);
-			status = SRV_ERR;
-		}
-	} else
-	{
-		if (NO_SHUTDOWN == jnlpool.gtmsource_local->shutdown)
-			repl_log(stderr, FALSE, TRUE, "Source Server crashed during journal pool initialization\n");
-		else
-			repl_log(stderr, FALSE, TRUE, "Source server crashed during shutdown\n");
-		status = SRV_DEAD;
-	}
-	rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-	/* Check that there are no regions with replication state = WAS_ON (i.e. repl_was_open). If so report that.
-	 * But to determine that, we need to attach to all the database regions.
-	 */
-	gvinit();
-	/* We use the same code dse uses to open all regions but we must make sure they are all open before proceeding. */
-	all_files_open = region_init(FALSE);
-	if (!all_files_open)
-	{
-		gtm_putmsg(VARLSTCNT(1) ERR_NOTALLDBOPN);
-		status |= SRV_ERR;
-	} else
-	{
-		for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions; reg < region_top; reg++)
-		{
-			csa = &FILE_INFO(reg)->s_addrs;
-			csd = csa->hdr;
-			if (REPL_WAS_ENABLED(csd))
-			{
-				assert(!JNL_ENABLED(csd) || REPL_ENABLED(csd));	/* || is for turning replication on concurrently */
-				reg_seqno = csd->reg_seqno;
-				jnlseqno = (NULL != jnlpool.jnlpool_ctl) ? jnlpool.jnlpool_ctl->jnl_seqno : MAX_SEQNO;
-				sgtm_putmsg(errtxt, VARLSTCNT(8) ERR_REPLJNLCLOSED, 6, DB_LEN_STR(reg),
-					&reg_seqno, &reg_seqno, &jnlseqno, &jnlseqno);
-				repl_log(stderr, FALSE, TRUE, errtxt);
-				status |= SRV_ERR;
-			}
-		}
-	}
-	return (status + NORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmsource_end.c b/sr_vvms/gtmsource_end.c
deleted file mode 100644
index 46cb74b..0000000
--- a/sr_vvms/gtmsource_end.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_unistd.h"		/* for close() */
-
-#ifdef UNIX
-#include "gtm_ipc.h"
-#include <sys/shm.h>
-#include <sys/sem.h>
-#elif defined(VMS)
-#include <ssdef.h>
-#include <psldef.h>
-#include <descrip.h> /* Required for gtmsource.h */
-#else
-#error Unsupported platform
-#endif
-#include <errno.h>
-#include "gtm_inet.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "gtm_event_log.h"
-#include "repl_shutdcode.h"
-#include "eintr_wrappers.h"
-#include "jnl.h"
-#include "repl_filter.h"
-#include "repl_sem.h"
-#ifdef VMS
-#include "repl_shm.h"
-#endif
-#ifdef UNIX
-#include "mutex.h"
-#endif
-#include "repl_log.h"
-#include "repl_comm.h"
-
-GBLREF jnlpool_addrs 	jnlpool;
-GBLREF jnlpool_ctl_ptr_t jnlpool_ctl;
-GBLREF uint4		process_id;
-GBLREF int		gtmsource_sock_fd;
-GBLREF int		gtmsource_log_fd;
-GBLREF FILE		*gtmsource_log_fp;
-GBLREF int		gtmsource_filter;
-GBLREF boolean_t	gtmsource_logstats;
-GBLREF int		gtmsource_statslog_fd;
-GBLREF FILE		*gtmsource_statslog_fp;
-GBLREF unsigned char	*gtmsource_tcombuff_start;
-GBLREF qw_num		repl_source_data_sent;
-GBLREF qw_num		repl_source_msg_sent;
-GBLREF seq_num		seq_num_zero;
-GBLREF repl_msg_ptr_t	gtmsource_msgp;
-GBLREF uchar_ptr_t	repl_filter_buff;
-GBLREF boolean_t	pool_init;
-
-int gtmsource_end1(boolean_t auto_shutdown)
-{
-	int		exit_status;
-	seq_num		log_seqno, log_seqno1, diff_seqno;
-	int		fclose_res;
-#ifdef VMS
-	int4		status;
-#endif
-
-	gtmsource_ctl_close();
-	rel_lock(jnlpool.jnlpool_dummy_reg);
-	UNIX_ONLY(mutex_cleanup(jnlpool.jnlpool_dummy_reg);)
-	exit_status = NORMAL_SHUTDOWN;
-	if (!auto_shutdown)
-		jnlpool.gtmsource_local->shutdown = NORMAL_SHUTDOWN;
-	QWASSIGN(log_seqno, jnlpool.gtmsource_local->read_jnl_seqno);
-	QWASSIGN(log_seqno1, jnlpool.jnlpool_ctl->jnl_seqno);
-	jnlpool.gtmsource_local->gtmsource_pid = 0;
-	/* Detach from journal pool */
-	UNIX_ONLY(
-		if (jnlpool.jnlpool_ctl && 0 > SHMDT(jnlpool.jnlpool_ctl))
-			repl_log(gtmsource_log_fp, FALSE, TRUE, "Error detaching from journal pool : %s\n", REPL_STR_ERROR);
-	)
-	VMS_ONLY(
-		if (jnlpool.jnlpool_ctl)
-		{
-			if (SS$_NORMAL != (status = detach_shm(jnlpool.shm_range)))
-				repl_log(stderr, TRUE, TRUE, "Error detaching from jnlpool : %s\n", REPL_STR_ERROR);
-			jnlpool.jnlpool_ctl = NULL;
-			if (!auto_shutdown && (SS$_NORMAL != (status = signoff_from_gsec(jnlpool.shm_lockid))))
-				repl_log(stderr, TRUE, TRUE, "Error dequeueing lock on jnlpool global section : %s\n",
-														REPL_STR_ERROR);
-		}
-	)
-	jnlpool.jnlpool_ctl = jnlpool_ctl = NULL;
-	pool_init = FALSE;
-	gtmsource_free_msgbuff();
-	gtmsource_free_tcombuff();
-	gtmsource_free_filter_buff();
-	gtmsource_stop_heartbeat();
-	repl_close(&gtmsource_sock_fd);
-	if (QWNE(log_seqno, seq_num_zero))
-		QWDECRBYDW(log_seqno, 1);
-	if (QWNE(log_seqno1, seq_num_zero))
-		QWDECRBYDW(log_seqno1, 1);
-	QWSUB(diff_seqno, log_seqno1, log_seqno);
-	repl_log(gtmsource_log_fp, TRUE, FALSE, "REPL INFO - Last Seqno written in jnlpool : %llu", log_seqno1);
-	repl_log(gtmsource_log_fp, FALSE, FALSE, "  Last sent seqno : %llu", log_seqno);
-	repl_log(gtmsource_log_fp, FALSE, TRUE, "  Number of unsent seqno : %llu\n", diff_seqno);
-	repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL INFO - Jnl Total : %llu  Msg Total : %llu\n",
-		 repl_source_data_sent, repl_source_msg_sent);
-	if (gtmsource_filter & EXTERNAL_FILTER)
-		repl_stop_filter();
-	gtm_event_log_close();
-	if (auto_shutdown)
-		return (exit_status);
-	else
-		gtmsource_exit(exit_status - NORMAL_SHUTDOWN);
-}
-
-void gtmsource_end(void)
-{
-	gtmsource_end1(FALSE);
-}
diff --git a/sr_vvms/gtmsource_flush_fh.c b/sr_vvms/gtmsource_flush_fh.c
deleted file mode 100644
index 71cf079..0000000
--- a/sr_vvms/gtmsource_flush_fh.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "jnl.h"
-#include "repl_dbg.h"
-
-GBLREF gd_region	*gtmsource_mru_reg;
-GBLREF gd_addr		*gd_header;
-GBLREF seq_num		gtmsource_last_flush_reg_seq, gtmsource_last_flush_resync_seq;
-
-void gtmsource_flush_fh(seq_num resync_seqno)
-{ /* Update all replicated regions' file header resync_seqno to given number
-   * Flush at least one region's file header to disk if there has been no updates since the last time we flushed. We do this to
-   *     keep the system's last exchanged seqno as current as we can. In case the system crashes, the difference between
-   *     the two systems' seqno shouldn't be too large to cause large backlog and so long resynchronization. On a system that
-   *     is contantly updated, there is a good chance that a GTM process flushes file header hence recording replication progress,
-   *     in which case the source server doesn't have to flush.
-   * We choose the most recently updated region to flush
-   */
-	seq_num		max_reg_seqno, pre_update_seqno;
-	gd_region	*reg, *region_top, *mru_reg;
-	sgmnt_addrs	*csa, *mru_reg_csa;
-	boolean_t	was_crit;
-	REPL_DEBUG_ONLY(
-		char	reg_name[MAX_RN_LEN + 1]; /* + 1 for trailing '\0' */
-	)
-
-	assert(gtmsource_last_flush_resync_seq <= resync_seqno);
-	if (gtmsource_last_flush_resync_seq == resync_seqno) /* already flushed */
-	{
-		REPL_EXTRA_DPRINT1("flush_fh: no action, returning\n");
-		return;
-	}
-	max_reg_seqno = 0;
-	for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions; reg < region_top; reg++)
-	{
-		csa = &FILE_INFO(reg)->s_addrs;
-		if (REPL_ALLOWED(csa->hdr))
-		{
-			assert(csa->hdr->resync_seqno <= resync_seqno); /* don't want to go back */
-			pre_update_seqno = csa->hdr->resync_seqno;
-			UPDATE_RESYNC_SEQNO(reg, pre_update_seqno, resync_seqno); /* updates csa (no change though) and now_crit */
-			assert(csa->hdr->resync_seqno == resync_seqno);
-			if (csa->hdr->reg_seqno > max_reg_seqno)
-			{ /* there could be multiple regions with the same max_reg_seqno; we choose the first in the list */
-				max_reg_seqno = csa->hdr->reg_seqno; /* where is the system at? */
-				mru_reg_csa = csa;
-				mru_reg = reg;
-			}
-		}
-	}
-	if (0 == max_reg_seqno) /* we are in trouble, no replicated region found */
-		GTMASSERT;
-	assert(resync_seqno  <= max_reg_seqno);
-	assert(max_reg_seqno >= gtmsource_last_flush_reg_seq);
-	assert(max_reg_seqno >= gtmsource_last_flush_resync_seq);
-	if (max_reg_seqno == gtmsource_last_flush_reg_seq)	/* no updates to the system */
-	{
-		if (FALSE == (was_crit = mru_reg_csa->now_crit))
-			grab_crit(mru_reg);
-		fileheader_sync(mru_reg);
-		if (!was_crit)
-			rel_crit(mru_reg);
-		gtmsource_last_flush_resync_seq = resync_seqno;
-	} /* else, GTM process will flush file header */
-	REPL_DEBUG_ONLY(
-		memcpy(reg_name, mru_reg->rname, mru_reg->rname_len);
-		reg_name[mru_reg->rname_len] = '\0';
-		if (max_reg_seqno == gtmsource_last_flush_reg_seq)
-			REPL_DPRINT2("flush_fh: flushed file header of %s\n", reg_name);
-		REPL_DPRINT4("flush_fh: set mru_reg to %s, last_flush_reg_seqno to %llu, last_flush_resync_seqno to %llu\n",
-			reg_name, max_reg_seqno, resync_seqno);
-	)
-	gtmsource_mru_reg = mru_reg;
-	gtmsource_last_flush_reg_seq = max_reg_seqno;
-	return;
-}
diff --git a/sr_vvms/gtmsource_get_opt.c b/sr_vvms/gtmsource_get_opt.c
deleted file mode 100644
index 30a5361..0000000
--- a/sr_vvms/gtmsource_get_opt.c
+++ /dev/null
@@ -1,349 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdlib.h"
-#include "gtm_netdb.h"
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include "gtm_string.h"
-#include "gtm_ctype.h"
-#if !defined(__MVS__) && !defined(VMS)
-#include <sys/socketvar.h>
-#endif
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-#include <errno.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "jnl.h"
-#include "gtmsource.h"
-#include "cli.h"
-#include "gtm_stdio.h"
-#include "util.h"
-#include "repl_log.h"
-
-#define MAX_SECONDARY_LEN 	(MAX_HOST_NAME_LEN + 11) /* +11 for ':' and
-							  * port number */
-
-#define DEFAULT_JNLPOOL_SIZE		(64 * 1024 * 1024)
-
-#define DEFAULT_SHUTDOWN_TIMEOUT	30
-
-#define GTMSOURCE_CONN_PARMS_LEN ((10 + 1) * GTMSOURCE_CONN_PARMS_COUNT - 1)
-
-GBLREF	gtmsource_options_t	gtmsource_options;
-GBLREF	boolean_t		update_disable;
-
-error_def(ERR_GETADDRINFO);
-error_def(ERR_GETNAMEINFO);
-error_def(ERR_TEXT);
-
-int gtmsource_get_opt(void)
-{
-	boolean_t	secondary, dotted_notation;
-	int		tries, index = 0;
-	unsigned short	secondary_len;
-	char		secondary_sys[MAX_SECONDARY_LEN], *c;
-	struct hostent	*sec_hostentry;
-	struct addrinfo *ai_ptr;
-	int		errcode;
-	char		*ip_end;
-	int		port_len;
-
-	boolean_t	log, log_interval_specified;
-	unsigned short	log_file_len;
-
-	boolean_t	buffsize_status;
-
-	boolean_t	filter;
-	unsigned short	filter_cmd_len;
-
-	int		timeout_status;
-
-	unsigned short	statslog_val_len;
-	char		statslog_val[4]; /* "ON" or "OFF" */
-
-	unsigned short	update_val_len;
-	char		update_val[SIZEOF("DISABLE")]; /* "ENABLE" or "DISABLE" */
-
-	unsigned short	connect_parms_str_len;
-	char		*connect_parms_str, tmp_connect_parms_str[GTMSOURCE_CONN_PARMS_LEN + 1];
-	char		*connect_parm_token_str, *connect_parm;
-	int		connect_parms_index;
-	boolean_t	connect_parms_badval;
-
-	memset((char *)&gtmsource_options, 0, SIZEOF(gtmsource_options));
-
-	gtmsource_options.start = (cli_present("START") == CLI_PRESENT);
-	gtmsource_options.shut_down = (cli_present("SHUTDOWN") == CLI_PRESENT);
-	gtmsource_options.activate = (cli_present("ACTIVATE") == CLI_PRESENT);
-	gtmsource_options.deactivate = (cli_present("DEACTIVATE") == CLI_PRESENT);
-	gtmsource_options.checkhealth = (cli_present("CHECKHEALTH") == CLI_PRESENT);
-	gtmsource_options.statslog = (cli_present("STATSLOG") == CLI_PRESENT);
-	gtmsource_options.showbacklog = (cli_present("SHOWBACKLOG") == CLI_PRESENT);
-	gtmsource_options.changelog = (cli_present("CHANGELOG") == CLI_PRESENT);
-	gtmsource_options.stopsourcefilter = (cli_present("STOPSOURCEFILTER") == CLI_PRESENT);
-	gtmsource_options.update = (cli_present("UPDATE") == CLI_PRESENT);
-
-	if (gtmsource_options.start || gtmsource_options.activate)
-	{
-		if (secondary = (CLI_PRESENT == cli_present("SECONDARY")))
-		{
-			secondary_len = MAX_SECONDARY_LEN;
-			if (!cli_get_str("SECONDARY", secondary_sys, &secondary_len))
-			{
-				util_out_print("Error parsing SECONDARY qualifier", TRUE);
-				return(-1);
-			}
-			/* Parse secondary_sys into secondary_host
-			 * and secondary_port */
-			c = secondary_sys;
-			dotted_notation = TRUE;
-			if ('[' == *c)
-			{
-				ip_end = strchr(++c, ']');
-				if (NULL == ip_end || 0 == (index = ip_end - c))
-				{
-					util_out_print("Invalid IP address !AD", TRUE,
-						LEN_AND_STR(secondary_sys));
-					return(-1);
-				}
-				memcpy(gtmsource_options.secondary_host, c, index);
-				gtmsource_options.secondary_host[index] = '\0';
-				c = ip_end + 1;
-			} else
-			{
-				while(*c && *c != ':')
-					gtmsource_options.secondary_host[index++] = *c++;
-				gtmsource_options.secondary_host[index] = '\0';
-			}
-			if (':' != *c)
-			{
-				util_out_print("Secondary port number should be specified", TRUE);
-				return(-1);
-			}
-			port_len = strlen(++c);
-			errno = 0;
-			if (((0 == (gtmsource_options.secondary_port = ATOI(c))) && (0 != errno))
-				|| (0 >= gtmsource_options.secondary_port))
-			{
-				util_out_print("Error parsing secondary port number !AD", TRUE, LEN_AND_STR(c));
-				return(-1);
-			}
-			assert(NI_MAXSERV > port_len);
-		}
-		if (CLI_PRESENT == cli_present("CONNECTPARAMS"))
-		{
-			connect_parms_str_len = GTMSOURCE_CONN_PARMS_LEN + 1;
-			if (!cli_get_str("CONNECTPARAMS", tmp_connect_parms_str, &connect_parms_str_len))
-			{
-				util_out_print("Error parsing CONNECTPARAMS qualifier", TRUE);
-				return(-1);
-			}
-#ifdef VMS
-			/* strip the quotes around the string. (DCL doesn't do it) */
-			assert('"' == tmp_connect_parms_str[0]);
-			assert('"' == tmp_connect_parms_str[connect_parms_str_len - 1]);
-			connect_parms_str = &tmp_connect_parms_str[1];
-			tmp_connect_parms_str[connect_parms_str_len - 1] = '\0';
-#else
-			connect_parms_str = &tmp_connect_parms_str[0];
-#endif
-			for (connect_parms_index =
-					GTMSOURCE_CONN_HARD_TRIES_COUNT,
-			     connect_parms_badval = FALSE,
-			     connect_parm_token_str = connect_parms_str;
-			     !connect_parms_badval &&
-			     connect_parms_index < GTMSOURCE_CONN_PARMS_COUNT &&
-			     (connect_parm = strtok(connect_parm_token_str,
-						    GTMSOURCE_CONN_PARMS_DELIM))
-			     		   != NULL;
-			     connect_parms_index++,
-			     connect_parm_token_str = NULL)
-
-			{
-				errno = 0;
-				if ((0 == (gtmsource_options.connect_parms[connect_parms_index] = ATOI(connect_parm))
-						&& 0 != errno) || 0 >= gtmsource_options.connect_parms[connect_parms_index])
-					connect_parms_badval = TRUE;
-			}
-			if (connect_parms_badval)
-			{
-				util_out_print("Error parsing or invalid value parameter in CONNECTPARAMS", TRUE);
-				return(-1);
-			}
-			if (GTMSOURCE_CONN_PARMS_COUNT != connect_parms_index)
-			{
-				util_out_print(
-					"All CONNECTPARAMS - HARD TRIES, HARD TRIES PERIOD, "
-					"SOFT TRIES PERIOD, "
-					"ALERT TIME, HEARTBEAT INTERVAL, "
-					"MAX HEARBEAT WAIT should be specified", TRUE);
-				return(-1);
-			}
-		} else
-		{
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HARD_TRIES_COUNT] = REPL_CONN_HARD_TRIES_COUNT;
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD] = REPL_CONN_HARD_TRIES_PERIOD;
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD] = REPL_CONN_SOFT_TRIES_PERIOD;
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_ALERT_PERIOD] = REPL_CONN_ALERT_ALERT_PERIOD;
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_PERIOD] = REPL_CONN_HEARTBEAT_PERIOD;
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT] = REPL_CONN_HEARTBEAT_MAX_WAIT;
-		}
-		if (gtmsource_options.connect_parms[GTMSOURCE_CONN_ALERT_PERIOD]<
-				gtmsource_options.connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD])
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_ALERT_PERIOD] =
-				gtmsource_options.connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD];
-		if (gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT] <
-				gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_PERIOD])
-			gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT] =
-				gtmsource_options.connect_parms[GTMSOURCE_CONN_HEARTBEAT_PERIOD];
-	}
-
-	if (gtmsource_options.start || gtmsource_options.statslog || gtmsource_options.changelog || gtmsource_options.activate ||
-	    gtmsource_options.deactivate)
-	{
-		log = (cli_present("LOG") == CLI_PRESENT);
-		log_interval_specified = (CLI_PRESENT == cli_present("LOG_INTERVAL"));
-		if (log)
-		{
-			log_file_len = MAX_FN_LEN + 1;
-			if (!cli_get_str("LOG", gtmsource_options.log_file, &log_file_len))
-			{
-				util_out_print("Error parsing LOG qualifier", TRUE);
-				return(-1);
-			}
-		} else
-			gtmsource_options.log_file[0] = '\0';
-		gtmsource_options.src_log_interval = 0;
-		if (log_interval_specified)
-		{
-			if (!cli_get_num("LOG_INTERVAL", (int4 *)&gtmsource_options.src_log_interval))
-			{
-				util_out_print("Error parsing LOG_INTERVAL qualifier", TRUE);
-				return (-1);
-			}
-		}
-		if (gtmsource_options.start && 0 == gtmsource_options.src_log_interval)
-			gtmsource_options.src_log_interval = LOGTRNUM_INTERVAL;
-		/* For changelog/activate/deactivate, interval == 0 implies don't change log interval already established */
-		/* We ignore interval specification for statslog, Vinaya 2005/02/07 */
-	}
-
-	if (gtmsource_options.start)
-	{
-		assert(secondary || CLI_PRESENT == cli_present("PASSIVE"));
-		gtmsource_options.mode = ((secondary) ? GTMSOURCE_MODE_ACTIVE : GTMSOURCE_MODE_PASSIVE);
-		if (buffsize_status = (CLI_PRESENT == cli_present("BUFFSIZE")))
-		{
-			if (!cli_get_int("BUFFSIZE", &gtmsource_options.buffsize))
-			{
-				util_out_print("Error parsing BUFFSIZE qualifier", TRUE);
-				return(-1);
-			}
-			if (MIN_JNLPOOL_SIZE > gtmsource_options.buffsize)
-				gtmsource_options.buffsize = MIN_JNLPOOL_SIZE;
-		} else
-			gtmsource_options.buffsize = DEFAULT_JNLPOOL_SIZE;
-		/* Round up buffsize to the nearest (~JNL_WRT_END_MASK + 1) multiple */
-		gtmsource_options.buffsize = ((gtmsource_options.buffsize + ~JNL_WRT_END_MASK) & JNL_WRT_END_MASK);
-		if (filter = (CLI_PRESENT == cli_present("FILTER")))
-		{
-			filter_cmd_len = MAX_FILTER_CMD_LEN;
-	    		if (!cli_get_str("FILTER", gtmsource_options.filter_cmd, &filter_cmd_len))
-			{
-				util_out_print("Error parsing FILTER qualifier", TRUE);
-				return(-1);
-			}
-		} else
-			gtmsource_options.filter_cmd[0] = '\0';
-	}
-
-	if (gtmsource_options.shut_down)
-	{
-		if ((timeout_status = cli_present("TIMEOUT")) == CLI_PRESENT)
-		{
-			if (!cli_get_int("TIMEOUT", &gtmsource_options.shutdown_time))
-			{
-				util_out_print("Error parsing TIMEOUT qualifier", TRUE);
-				return(-1);
-			}
-			if (DEFAULT_SHUTDOWN_TIMEOUT < gtmsource_options.shutdown_time || 0 > gtmsource_options.shutdown_time)
-			{
-				gtmsource_options.shutdown_time = DEFAULT_SHUTDOWN_TIMEOUT;
-				util_out_print("shutdown TIMEOUT changed to !UL", TRUE, gtmsource_options.shutdown_time);
-			}
-		} else if (CLI_NEGATED == timeout_status)
-			gtmsource_options.shutdown_time = -1;
-		else /* TIMEOUT not specified */
-			gtmsource_options.shutdown_time = DEFAULT_SHUTDOWN_TIMEOUT;
-	}
-
-	if (gtmsource_options.statslog)
-	{
-		statslog_val_len = 4; /* max(strlen("ON"), strlen("OFF")) + 1 */
-		if (!cli_get_str("STATSLOG", statslog_val, &statslog_val_len))
-		{
-			util_out_print("Error parsing STATSLOG qualifier", TRUE);
-			return(-1);
-		}
-		UNIX_ONLY(cli_strupper(statslog_val);)
-		if (0 == strcmp(statslog_val, "ON"))
-			gtmsource_options.statslog = TRUE;
-		else if (0 == strcmp(statslog_val, "OFF"))
-			gtmsource_options.statslog = FALSE;
-		else
-		{
-			util_out_print("Invalid value for STATSLOG qualifier, should be either ON or OFF", TRUE);
-			return(-1);
-		}
-	}
-
-	if (gtmsource_options.activate)
-		update_disable = FALSE;
-	if (gtmsource_options.deactivate || (gtmsource_options.start && GTMSOURCE_MODE_PASSIVE == gtmsource_options.mode))
-		update_disable = TRUE;
-
-	if (gtmsource_options.update)
-	{
-		update_val_len = SIZEOF(update_val);
-		if (!cli_get_str("UPDATE", update_val, &update_val_len))
-		{
-			util_out_print("Error parsing UPDATE qualifier", TRUE);
-			return(-1);
-		}
-		UNIX_ONLY(cli_strupper(update_val);)
-		if (strcmp(update_val, "ENABLE") == 0)
-		{
-			util_out_print("Update are now enabled", TRUE);
-			update_disable = FALSE;
-		} else if (strcmp(update_val, "DISABLE") == 0)
-		{
-			util_out_print("Update are now disabled", TRUE);
-			update_disable = TRUE;
-		} else
-		{
-			util_out_print("Invalid value for UPDATE qualifier, should be either ENABLE or DISABLE", TRUE);
-			return(-1);
-		}
-	}
-	return(0);
-}
diff --git a/sr_vvms/gtmsource_heartbeat.c b/sr_vvms/gtmsource_heartbeat.c
deleted file mode 100644
index 3c3ab02..0000000
--- a/sr_vvms/gtmsource_heartbeat.c
+++ /dev/null
@@ -1,243 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-
-#include "gtm_time.h"
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_comm.h"
-#include "repl_dbg.h"
-#include "repl_log.h"
-#include "repl_errno.h"
-#include "iosp.h"
-#include "gt_timer.h"
-#include "gtmsource_heartbeat.h"
-#include "relqop.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	int			gtmsource_sock_fd;
-GBLREF	boolean_t		gtmsource_logstats;
-GBLREF	int			gtmsource_log_fd;
-GBLREF 	FILE			*gtmsource_log_fp;
-GBLREF  gtmsource_state_t       gtmsource_state;
-
-GBLDEF	boolean_t			heartbeat_stalled = TRUE;
-GBLDEF	repl_heartbeat_que_entry_t	*repl_heartbeat_que_head = NULL;
-GBLDEF	repl_heartbeat_que_entry_t	*repl_heartbeat_free_head = NULL;
-GBLDEF	volatile time_t			gtmsource_now;
-GBLDEF	time_t				last_sent_time, earliest_sent_time;
-
-error_def(ERR_REPLCOMM);
-error_def(ERR_TEXT);
-
-static	int				heartbeat_period, heartbeat_max_wait;
-
-void gtmsource_heartbeat_timer(TID tid, int4 interval_len, int *interval_ptr)
-{
-	assert(0 != gtmsource_now);
-	UNIX_ONLY(assert(*interval_ptr == heartbeat_period);)	/* interval_len and interval_ptr are dummies on VMS */
-	gtmsource_now += heartbeat_period;			/* cannot use *interval_ptr on VMS */
-	REPL_DPRINT2("Starting heartbeat timer with %d s\n", heartbeat_period);
-	start_timer((TID)gtmsource_heartbeat_timer, heartbeat_period * 1000, gtmsource_heartbeat_timer, SIZEOF(heartbeat_period),
-			&heartbeat_period); /* start_timer expects time interval in milli seconds, heartbeat_period is in seconds */
-}
-
-int gtmsource_init_heartbeat(void)
-{
-	int				num_q_entries;
-	repl_heartbeat_que_entry_t	*heartbeat_element;
-
-	assert(NULL == repl_heartbeat_que_head);
-
-	heartbeat_period = jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HEARTBEAT_PERIOD];
-	heartbeat_max_wait = jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HEARTBEAT_MAX_WAIT];
-	num_q_entries = DIVIDE_ROUND_UP(heartbeat_max_wait, heartbeat_period) + 2;
-	REPL_DPRINT4("Initialized heartbeat, heartbeat_period = %d s, heartbeat_max_wait = %d s, num_q_entries = %d\n",
-			heartbeat_period, heartbeat_max_wait, num_q_entries);
-	if (!(repl_heartbeat_que_head = (repl_heartbeat_que_entry_t *)malloc(num_q_entries * SIZEOF(repl_heartbeat_que_entry_t))))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-			LEN_AND_LIT("Error in allocating heartbeat queue"), errno);
-
-	memset(repl_heartbeat_que_head, 0, num_q_entries * SIZEOF(repl_heartbeat_que_entry_t));
-	repl_heartbeat_free_head = repl_heartbeat_que_head + 1;
-	*(time_t *)&repl_heartbeat_que_head->heartbeat.ack_time[0] = 0;
-	*(time_t *)&repl_heartbeat_free_head->heartbeat.ack_time[0] = 0;
-	for (heartbeat_element = repl_heartbeat_free_head + 1, num_q_entries -= 2;
-	     num_q_entries > 0;
-	     num_q_entries--, heartbeat_element++)
-	{
-		insqt((que_ent_ptr_t)heartbeat_element, (que_ent_ptr_t)repl_heartbeat_free_head);
-	}
-	last_sent_time = gtmsource_now = time(NULL);
-	/* Ideally, we should use the Greatest Common Factor of heartbeat_period and GTMSOURCE_LOGSTATS_INTERVAL as the time keeper
-	 * interval. As it stands now, we may not honor GTMSOURCE_LOGSTATS_INTERVAL if user specifies a heartbeat value
-	 * larger than GTMSOURCE_LOGSTATS_INTERVAL. When we make GTMSOURCE_LOGSTATS_INTERVAL a user configurable parameter,
-	 * this code may have to be revisited. Also, modify the check in gtmsource_process (prev_now != (save_now = gtmsource_now))
-	 * to be something like (hearbeat_period < difftime((save_now = gtmsource_now), prev_now)). Vinaya 2003, Sep 08
-	 */
-	start_timer((TID)gtmsource_heartbeat_timer, heartbeat_period * 1000, gtmsource_heartbeat_timer, SIZEOF(heartbeat_period),
-			&heartbeat_period); /* start_timer expects time interval in milli seconds, heartbeat_period is in seconds */
-	heartbeat_stalled = FALSE;
-	earliest_sent_time = 0;
-	return (SS_NORMAL);
-}
-
-int gtmsource_stop_heartbeat(void)
-{
-	cancel_timer((TID)gtmsource_heartbeat_timer);
-	if (NULL != repl_heartbeat_que_head)
-		free(repl_heartbeat_que_head);
-	repl_heartbeat_que_head = NULL;
-	repl_heartbeat_free_head = NULL;
-	last_sent_time = 0;
-	earliest_sent_time = 0;
-	gtmsource_now = 0;
-	heartbeat_stalled = TRUE;
-	REPL_DPRINT1("Stopped heartbeat\n");
-	return (SS_NORMAL);
-}
-
-boolean_t gtmsource_is_heartbeat_overdue(time_t *now, repl_heartbeat_msg_t *overdue_heartbeat)
-{
-
-	repl_heartbeat_que_entry_t	*heartbeat_element;
-	double				time_elapsed;
-	unsigned char			seq_num_str[32], *seq_num_ptr;
-
-#ifndef REPL_DISABLE_HEARTBEAT
-	if (0 == earliest_sent_time ||
-	    (time_elapsed = difftime(*now, earliest_sent_time)) <= (double)heartbeat_max_wait)
-		return (FALSE);
-
-	heartbeat_element = (repl_heartbeat_que_entry_t *)remqh((que_ent_ptr_t)repl_heartbeat_que_head);
-	if (NULL == heartbeat_element)
-	{
-		assert(FALSE);
-		return (FALSE);
-	}
-
-	memcpy(overdue_heartbeat, &heartbeat_element->heartbeat, SIZEOF(repl_heartbeat_msg_t));
-
-	REPL_DPRINT5("Overdue heartbeat - SEQNO : "INT8_FMT" time : %ld now : %ld difftime : %00.f\n",
-		     INT8_PRINT(*(seq_num *)&overdue_heartbeat->ack_seqno[0]), *(time_t *)&overdue_heartbeat->ack_time[0], *now,
-		     time_elapsed);
-
-	insqt((que_ent_ptr_t)heartbeat_element, (que_ent_ptr_t)repl_heartbeat_free_head);
-
-	return (TRUE);
-#else
-	return (FALSE);
-#endif
-}
-
-int gtmsource_send_heartbeat(time_t *now)
-{
-	repl_heartbeat_que_entry_t	*heartbeat_element;
-	unsigned char			*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int				tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int				status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	unsigned char			seq_num_str[32], *seq_num_ptr;
-
-
-	heartbeat_element = (repl_heartbeat_que_entry_t *)remqh((que_ent_ptr_t)repl_heartbeat_free_head);
-	if (NULL == heartbeat_element) /* Too many pending heartbeats, send later */
-		return (SS_NORMAL);
-
-	QWASSIGN(*(seq_num *)&heartbeat_element->heartbeat.ack_seqno[0], jnlpool.jnlpool_ctl->jnl_seqno);
-	*(time_t *)&heartbeat_element->heartbeat.ack_time[0] = *now;
-
-	heartbeat_element->heartbeat.type = REPL_HEARTBEAT;
-	heartbeat_element->heartbeat.len = MIN_REPL_MSGLEN;
-	REPL_SEND_LOOP(gtmsource_sock_fd, &heartbeat_element->heartbeat, MIN_REPL_MSGLEN, REPL_POLL_NOWAIT)
-	{
-		gtmsource_poll_actions(FALSE);  /* Recursive call */
-		if (GTMSOURCE_WAITING_FOR_CONNECTION == gtmsource_state ||
-		    GTMSOURCE_CHANGING_MODE == gtmsource_state)
-			return (SS_NORMAL);
-	}
-	if (SS_NORMAL == status)
-	{
-		insqt((que_ent_ptr_t)heartbeat_element, (que_ent_ptr_t)repl_heartbeat_que_head);
-		last_sent_time = *now;
-		if (0 == earliest_sent_time)
-			earliest_sent_time = last_sent_time;
-
-		REPL_DPRINT4("HEARTBEAT sent with time %ld SEQNO "INT8_FMT" at %ld\n",
-			     *(time_t *)&heartbeat_element->heartbeat.ack_time[0],
-			     INT8_PRINT(*(seq_num *)&heartbeat_element->heartbeat.ack_seqno[0]), time(NULL));
-
-		return (SS_NORMAL);
-	}
-	if (EREPL_SEND == repl_errno && REPL_CONN_RESET(status))
-	{
-		repl_log(gtmsource_log_fp, TRUE, TRUE, "Connection reset while attempting to send heartbeat. Status = %d ; %s\n",
-				status, STRERROR(status));
-		repl_close(&gtmsource_sock_fd);
-		gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-		return (SS_NORMAL);
-	}
-	if (EREPL_SEND == repl_errno)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-			LEN_AND_LIT("Error sending HEARTBEAT message. Error in send"), status);
-	if (EREPL_SELECT == repl_errno)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-			LEN_AND_LIT("Error sending HEARTBEAT message. Error in select"), status);
-	assertpro((SS_NORMAL == status));
-}
-
-int gtmsource_process_heartbeat(repl_heartbeat_msg_t *heartbeat_msg)
-{
-	repl_heartbeat_que_entry_t	*heartbeat_element;
-	seq_num				ack_seqno;
-	gd_region			*reg, *region_top;
-	sgmnt_addrs			*csa;
-	unsigned char			seq_num_str[32], *seq_num_ptr;
-
-	QWASSIGN(ack_seqno, *(seq_num *)&heartbeat_msg->ack_seqno[0]);
-
-	REPL_DPRINT4("HEARTBEAT received with time %ld SEQNO "INT8_FMT" at %ld\n",
-		     *(time_t *)&heartbeat_msg->ack_time[0], INT8_PRINT(ack_seqno), time(NULL));
-
-	for (heartbeat_element = (repl_heartbeat_que_entry_t *)remqh((que_ent_ptr_t)repl_heartbeat_que_head);
-	     NULL !=  heartbeat_element&&
-	     *(time_t *)&heartbeat_msg->ack_time[0] >= earliest_sent_time;
-	     heartbeat_element = (repl_heartbeat_que_entry_t *)remqh((que_ent_ptr_t)repl_heartbeat_que_head))
-	{
-		insqt((que_ent_ptr_t)heartbeat_element, (que_ent_ptr_t)repl_heartbeat_free_head);
-		earliest_sent_time =
-			*(time_t *)&((repl_heartbeat_que_entry_t *)
-			((unsigned char *)repl_heartbeat_que_head + repl_heartbeat_que_head->que.fl))->heartbeat.ack_time[0];
-	}
-
-	if (NULL != heartbeat_element)
-		insqh((que_ent_ptr_t)heartbeat_element, (que_ent_ptr_t)repl_heartbeat_que_head);
-
-	return (SS_NORMAL);
-}
diff --git a/sr_vvms/gtmsource_mode_change.c b/sr_vvms/gtmsource_mode_change.c
deleted file mode 100644
index 85f79f9..0000000
--- a/sr_vvms/gtmsource_mode_change.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_time.h"
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_inet.h"
-#include "gtm_string.h"
-#include <errno.h>
-#include <descrip.h> /* Required for gtmsource.h */
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "repl_log.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gtmsource_options_t	gtmsource_options;
-GBLREF	boolean_t		update_disable;
-
-int gtmsource_mode_change(int to_mode)
-{
-	uint4		savepid;
-	int		exit_status;
-	int		status, detach_status, remove_status;
-
-	/* Grab the jnlpool jnlpool option write lock */
-	if (0 > grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM))
-	{
-		repl_log(stderr, FALSE, TRUE,
-		  "Error grabbing jnlpool access control/jnlpool option write lock : %s. Could not change mode\n", REPL_SEM_ERROR);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	if ((jnlpool.gtmsource_local->mode == GTMSOURCE_MODE_ACTIVE_REQUESTED)
-		|| (jnlpool.gtmsource_local->mode == GTMSOURCE_MODE_PASSIVE_REQUESTED))
-	{
-		repl_log(stderr, FALSE, TRUE, "Source Server %s already requested, not changing mode\n",
-				(to_mode == GTMSOURCE_MODE_ACTIVE_REQUESTED) ? "ACTIVATE" : "DEACTIVATE");
-		rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-		return (ABNORMAL_SHUTDOWN);
-	}
-	if (((GTMSOURCE_MODE_ACTIVE == jnlpool.gtmsource_local->mode) && (GTMSOURCE_MODE_ACTIVE_REQUESTED == to_mode))
-		|| ((GTMSOURCE_MODE_PASSIVE == jnlpool.gtmsource_local->mode) && (GTMSOURCE_MODE_PASSIVE_REQUESTED == to_mode)))
-	{
-		repl_log(stderr, FALSE, TRUE, "Source Server already %s, not changing mode\n",
-				(to_mode == GTMSOURCE_MODE_ACTIVE_REQUESTED) ? "ACTIVE" : "PASSIVE");
-		rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	repl_log(stdout, FALSE, FALSE, "Initiating change of mode from %s to %s\n", (GTMSOURCE_MODE_ACTIVE_REQUESTED == to_mode) ?
-			"PASSIVE" : "ACTIVE", (GTMSOURCE_MODE_ACTIVE_REQUESTED == to_mode) ? "ACTIVE" : "PASSIVE");
-
-	if (GTMSOURCE_MODE_ACTIVE_REQUESTED == to_mode)
-	{
-		jnlpool.gtmsource_local->secondary_port = gtmsource_options.secondary_port;
-		strcpy(jnlpool.gtmsource_local->secondary_host, gtmsource_options.secondary_host);
-		jnlpool.gtmsource_local->secondary_port = gtmsource_options.secondary_port;
-		memcpy(&jnlpool.gtmsource_local->connect_parms[0], &gtmsource_options.connect_parms[0],
-				SIZEOF(gtmsource_options.connect_parms));
-	}
-	if ('\0' != gtmsource_options.log_file[0] && 0 != strcmp(jnlpool.gtmsource_local->log_file, gtmsource_options.log_file))
-	{
-		repl_log(stdout, FALSE, TRUE, "Signaling change in log file from %s to %s\n",
-				jnlpool.gtmsource_local->log_file, gtmsource_options.log_file);
-		strcpy(jnlpool.gtmsource_local->log_file, gtmsource_options.log_file);
-		jnlpool.gtmsource_local->changelog |= REPLIC_CHANGE_LOGFILE;
-	}
-	if (0 != gtmsource_options.src_log_interval && jnlpool.gtmsource_local->log_interval != gtmsource_options.src_log_interval)
-	{
-		repl_log(stdout, FALSE, TRUE, "Signaling change in log interval from %u to %u\n",
-				jnlpool.gtmsource_local->log_interval, gtmsource_options.src_log_interval);
-		jnlpool.gtmsource_local->log_interval = gtmsource_options.src_log_interval;
-		jnlpool.gtmsource_local->changelog |= REPLIC_CHANGE_LOGINTERVAL;
-	}
-
-	jnlpool.gtmsource_local->mode = to_mode;
-	grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, ASSERT_NO_ONLINE_ROLLBACK);
-	if (update_disable)
-	{
-		jnlpool.jnlpool_ctl->upd_disabled = TRUE;
-		repl_log(stdout, FALSE, TRUE, "Updates are disabled now \n");
-	}
-	else
-	{
-		jnlpool.jnlpool_ctl->upd_disabled = FALSE;
-		repl_log(stdout, FALSE, TRUE, "Updates are allowed now \n");
-	}
-	rel_lock(jnlpool.jnlpool_dummy_reg);
-
-	rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-
-	REPL_DPRINT1("Change mode signalled\n");
-
-	return (NORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmsource_process.c b/sr_vvms/gtmsource_process.c
deleted file mode 100644
index e59a41f..0000000
--- a/sr_vvms/gtmsource_process.c
+++ /dev/null
@@ -1,839 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc.*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_time.h"
-#include "gtm_stat.h"
-
-#include <errno.h>
-#include <signal.h>
-#include <descrip.h> /* Required for gtmsource.h */
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_comm.h"
-#include "jnl.h"
-#include "hashtab_mname.h"    /* needed for muprec.h */
-#include "hashtab_int4.h"     /* needed for muprec.h */
-#include "hashtab_int8.h"     /* needed for muprec.h */
-#include "buddy_list.h"
-#include "muprec.h"
-#include "repl_ctl.h"
-#include "repl_errno.h"
-#include "repl_dbg.h"
-#include "iosp.h"
-#include "gt_timer.h"
-#include "gtmsource_heartbeat.h"
-#include "repl_filter.h"
-#include "repl_log.h"
-#include "min_max.h"
-#include "rel_quant.h"
-#include "copy.h"
-#include "repl_sort_tr_buff.h"
-#include "replgbl.h"
-
-#define MAX_HEXDUMP_CHARS_PER_LINE	26 /* 2 characters per byte + space, 80 column assumed */
-
-GBLDEF	seq_num			gtmsource_save_read_jnl_seqno;
-GBLDEF	gtmsource_state_t	gtmsource_state = GTMSOURCE_DUMMY_STATE;
-GBLDEF	repl_msg_ptr_t		gtmsource_msgp = NULL;
-GBLDEF	int			gtmsource_msgbufsiz = 0;
-GBLREF	uchar_ptr_t		repl_filter_buff;
-GBLREF	int			repl_filter_bufsiz;
-
-GBLDEF	qw_num			repl_source_data_sent = 0;
-GBLDEF	qw_num			repl_source_msg_sent = 0;
-GBLDEF	qw_num			repl_source_lastlog_data_sent = 0;
-GBLDEF	qw_num			repl_source_lastlog_msg_sent = 0;
-GBLDEF	time_t			repl_source_prev_log_time;
-GBLDEF  time_t			repl_source_this_log_time;
-GBLDEF	gd_region		*gtmsource_mru_reg;
-GBLDEF	time_t			gtmsource_last_flush_time;
-GBLDEF	seq_num			gtmsource_last_flush_reg_seq, gtmsource_last_flush_resync_seq;
-
-GBLREF	volatile time_t		gtmsource_now;
-GBLREF	int			gtmsource_sock_fd;
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gd_addr			*gd_header;
-GBLREF	sgmnt_addrs		*cs_addrs;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	repl_ctl_element	*repl_ctl_list;
-GBLREF	gtmsource_options_t	gtmsource_options;
-
-GBLREF	int			gtmsource_log_fd;
-GBLREF	FILE			*gtmsource_log_fp;
-GBLREF	boolean_t		gtmsource_logstats;
-GBLREF	int			gtmsource_filter;
-GBLREF	seq_num			seq_num_zero, seq_num_minus_one, seq_num_one;
-GBLREF	unsigned char		jnl_ver, remote_jnl_ver;
-GBLREF	unsigned int		jnl_source_datalen, jnl_dest_maxdatalen;
-GBLREF	unsigned char		jnl_source_rectype, jnl_dest_maxrectype;
-GBLREF	int			repl_max_send_buffsize, repl_max_recv_buffsize;
-GBLREF	boolean_t 		primary_side_std_null_coll;
-GBLREF	boolean_t 		secondary_side_std_null_coll;
-GBLREF	seq_num			lastlog_seqno;
-GBLREF	uint4			log_interval;
-GBLREF	qw_num			trans_sent_cnt, last_log_tr_sent_cnt;
-
-error_def(ERR_REPLCOMM);
-error_def(ERR_TEXT);
-error_def(ERR_REPLRECFMT);
-error_def(ERR_JNLSETDATA2LONG);
-error_def(ERR_JNLNEWREC);
-error_def(ERR_REPLGBL2LONG);
-error_def(ERR_SECNODZTRIGINTP);
-
-int gtmsource_process(void)
-{
-	/* The work-horse of the Source Server */
-
-	gtmsource_local_ptr_t	gtmsource_local;
-	jnlpool_ctl_ptr_t	jctl;
-	seq_num			recvd_seqno, sav_read_jnl_seqno;
-	seq_num			recvd_jnl_seqno, tmp_read_jnl_seqno;
-	int			data_len, srch_status, poll_time;
-	unsigned char		*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int			tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int			torecv_len, recvd_len, recvd_this_iter;	/* needed for REPL_RECV_LOOP */
-	int			status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	int			tot_tr_len, send_tr_len, remaining_len;
-	int			recvd_msg_type, recvd_start_flags;
-	repl_msg_t		xoff_ack;
-	repl_msg_ptr_t		send_msgp;
-	uchar_ptr_t		in_buff, out_buff, out_buffmsg;
-	uint4			in_buflen, in_size, out_size, tot_out_size, pre_intlfilter_datalen;
-	seq_num			log_seqno, diff_seqno, pre_read_jnl_seqno, post_read_jnl_seqno, jnl_seqno;
-	char			err_string[1024];
-	boolean_t		xon_wait_logged;
-	double			time_elapsed;
-	seq_num			resync_seqno, old_resync_seqno, curr_seqno, filter_seqno;
-	gd_region		*reg, *region_top, *gtmsource_upd_reg, *old_upd_reg;
-	sgmnt_addrs		*csa;
-	boolean_t		was_crit;
-	uint4			temp_dw, out_bufsiz, out_buflen;
-	qw_num			backlog_bytes, backlog_count;
-	long			prev_msg_sent = 0;
-	time_t			prev_now = 0, save_now;
-	int			index;
-	uint4 			temp_ulong;
-	DEBUG_ONLY(uchar_ptr_t	save_inbuff;)
-	DEBUG_ONLY(uchar_ptr_t	save_outbuff;)
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	assert(REPL_MSG_HDRLEN == SIZEOF(jnldata_hdr_struct)); /* necessary for reading multiple transactions from jnlpool in
-								* a single attempt */
-	jctl = jnlpool.jnlpool_ctl;
-	gtmsource_local = jnlpool.gtmsource_local;
-	gtmsource_msgp = NULL;
-	gtmsource_msgbufsiz = MAX_REPL_MSGLEN;
-
-	assert(REPL_POLL_WAIT < MILLISECS_IN_SEC);
-	assert(GTMSOURCE_IDLE_POLL_WAIT < REPL_POLL_WAIT);
-
-	gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-	while (TRUE)
-	{
-		gtmsource_stop_heartbeat();
-		gtmsource_reinit_logseqno();
-		if (GTMSOURCE_WAITING_FOR_CONNECTION == gtmsource_state)
-		{
-			gtmsource_est_conn();
-			if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-				return (SS_NORMAL);
-			repl_log(gtmsource_log_fp, TRUE, TRUE, "Connected to secondary, using TCP send buffer size %d "
-					"receive buffer size %d\n", repl_max_send_buffsize, repl_max_recv_buffsize);
-			repl_source_data_sent = repl_source_msg_sent = 0;
-			repl_source_lastlog_data_sent = 0;
-			repl_source_lastlog_msg_sent = 0;
-
-			gtmsource_alloc_msgbuff(MAX_REPL_MSGLEN);
-			gtmsource_state = GTMSOURCE_WAITING_FOR_RESTART;
-			repl_source_prev_log_time = time(NULL);
-		}
-		if (GTMSOURCE_WAITING_FOR_RESTART == gtmsource_state &&
-		    SS_NORMAL != (status = gtmsource_recv_restart(&recvd_seqno, &recvd_msg_type, &recvd_start_flags)))
-		{
-			if (EREPL_RECV == repl_errno)
-			{
-				if (REPL_CONN_RESET(status))
-				{
-					/* Connection reset */
-					repl_log(gtmsource_log_fp, TRUE, TRUE,
-						"Connection reset while receiving restart SEQNO. Status = %d ; %s\n",
-						status, STRERROR(status));
-					repl_close(&gtmsource_sock_fd);
-					SHORT_SLEEP(GTMSOURCE_WAIT_FOR_RECEIVER_CLOSE_CONN);
-					gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-					continue;
-				} else
-				{
-					SNPRINTF(err_string, SIZEOF(err_string),
-							"Error receiving RESTART SEQNO. Error in recv : %s", STRERROR(status));
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-							LEN_AND_STR(err_string));
-				}
-			} else if (EREPL_SEND == repl_errno)
-			{
-				if (REPL_CONN_RESET(status))
-				{
-					repl_log(gtmsource_log_fp, TRUE, TRUE,
-					       "Connection reset while sending XOFF_ACK due to possible update process shutdown. "
-					       "Status = %d ; %s\n", status, STRERROR(status));
-					repl_close(&gtmsource_sock_fd);
-					SHORT_SLEEP(GTMSOURCE_WAIT_FOR_RECEIVER_CLOSE_CONN);
-					gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-					continue;
-				}
-				SNPRINTF(err_string, SIZEOF(err_string), "Error sending XOFF_ACK_ME message. Error in send : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_STR(err_string));
-			} else if (EREPL_SELECT == repl_errno)
-			{
-				SNPRINTF(err_string, SIZEOF(err_string), "Error receiving RESTART SEQNO/sending XOFF_ACK_ME.  "
-						"Error in select : %s", STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_STR(err_string));
-			}
-		}
-		if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-			return (SS_NORMAL);
-
-		QWASSIGN(sav_read_jnl_seqno, gtmsource_local->read_jnl_seqno);
-		if (GTMSOURCE_SEARCHING_FOR_RESTART == gtmsource_state || REPL_START_JNL_SEQNO == recvd_msg_type)
-		{
-			assert(gtmsource_state == GTMSOURCE_SEARCHING_FOR_RESTART ||
-			       gtmsource_state == GTMSOURCE_WAITING_FOR_RESTART);
-			gtmsource_state = GTMSOURCE_SEARCHING_FOR_RESTART;
-			if (SS_NORMAL == (srch_status = gtmsource_srch_restart(recvd_seqno, recvd_start_flags)))
-			{
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "Sending REPL_WILL_RESTART\n");
-				memset(gtmsource_msgp, 0, MIN_REPL_MSGLEN); /* to idenitify older releases in the future */
-				gtmsource_msgp->type = REPL_WILL_RESTART_WITH_INFO;
-				((repl_start_reply_msg_ptr_t)gtmsource_msgp)->jnl_ver = jnl_ver;
-				temp_ulong = (0 == primary_side_std_null_coll) ?  START_FLAG_NONE : START_FLAG_COLL_M;
-				temp_ulong |= START_FLAG_SRCSRV_IS_VMS;
-				PUT_ULONG(((repl_start_reply_msg_ptr_t)gtmsource_msgp)->start_flags, temp_ulong);
-				recvd_start_flags = START_FLAG_NONE;
-			} else /* srch_restart returned EREPL_SEC_AHEAD */
-			{
-				assert(EREPL_SEC_AHEAD == srch_status);
-				gtmsource_msgp->type = REPL_ROLLBACK_FIRST;
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "Sending REPL_ROLLBACK_FIRST\n");
-			}
-		} else
-		{
-			/* REPL_FETCH_RESYNC received and state is WAITING_FOR_RESTART */
-			assert(GTMSOURCE_WAITING_FOR_RESTART == gtmsource_state && REPL_FETCH_RESYNC == recvd_msg_type);
-			gtmsource_msgp->type = REPL_RESYNC_SEQNO;
-		}
-
-		QWASSIGN(*(seq_num *)&((repl_start_reply_msg_ptr_t)gtmsource_msgp)->start_seqno[0],
-			 gtmsource_local->read_jnl_seqno);
-		gtmsource_msgp->len = MIN_REPL_MSGLEN;
-		REPL_SEND_LOOP(gtmsource_sock_fd, gtmsource_msgp, gtmsource_msgp->len, REPL_POLL_NOWAIT)
-		{
-			gtmsource_poll_actions(FALSE);
-			if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-				return (SS_NORMAL);
-		}
-		if (SS_NORMAL != status)
-		{
-			if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-			{
-				repl_log(gtmsource_log_fp, TRUE, TRUE,
-						"Connection reset while sending REPL_WILL_RESTART/RESYNC_SEQNO. "
-						"Status = %d ; %s\n", status, STRERROR(status));
-				repl_close(&gtmsource_sock_fd);
-				SHORT_SLEEP(GTMSOURCE_WAIT_FOR_RECEIVER_CLOSE_CONN);
-				gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-				continue;
-			}
-			if (EREPL_SEND == repl_errno)
-			{
-				SNPRINTF(err_string, SIZEOF(err_string), "Error sending ROLLBACK FIRST message. Error in send : %s",
-						STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_STR(err_string));
-			}
-			if (EREPL_SELECT == repl_errno)
-			{
-				SNPRINTF(err_string, SIZEOF(err_string), "Error sending ROLLBACK FIRST message. "
-						"Error in select : %s", STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-						LEN_AND_STR(err_string));
-			}
-		}
-		if (REPL_WILL_RESTART_WITH_INFO != gtmsource_msgp->type)
-		{
-			assert(gtmsource_msgp->type == REPL_RESYNC_SEQNO || gtmsource_msgp->type == REPL_ROLLBACK_FIRST);
-			if (REPL_RESYNC_SEQNO == gtmsource_msgp->type)
-			{
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "RESYNC_SEQNO msg sent with SEQNO "INT8_FMT"\n",
-					 (*(seq_num *)&gtmsource_msgp->msg[0]));
-				QWASSIGN(resync_seqno, recvd_seqno);
-				if (QWLE(gtmsource_local->read_jnl_seqno, resync_seqno))
-					QWASSIGN(resync_seqno, gtmsource_local->read_jnl_seqno);
-				QWASSIGN(old_resync_seqno, seq_num_zero);
-				QWASSIGN(curr_seqno, seq_num_zero);
-				region_top = gd_header->regions + gd_header->n_regions;
-				for (reg = gd_header->regions; reg < region_top; reg++)
-				{
-					csa = &FILE_INFO(reg)->s_addrs;
-					if (REPL_ALLOWED(csa->hdr))
-					{
-						if (QWLT(old_resync_seqno, csa->hdr->old_resync_seqno))
-							QWASSIGN(old_resync_seqno, csa->hdr->old_resync_seqno);
-						if (QWLT(curr_seqno, csa->hdr->reg_seqno))
-							QWASSIGN(curr_seqno, csa->hdr->reg_seqno);
-					}
-				}
-			 	assert(QWNE(old_resync_seqno, seq_num_zero));
-				REPL_DPRINT2("BEFORE FINDING RESYNC - old_resync_seqno is "INT8_FMT, old_resync_seqno);
-				REPL_DPRINT2(", curr_seqno is "INT8_FMT"\n", curr_seqno);
-				if (QWNE(old_resync_seqno, resync_seqno))
-				{
-					assert(QWGE(curr_seqno, gtmsource_local->read_jnl_seqno));
-					QWDECRBY(resync_seqno, seq_num_one);
-					gtmsource_update_resync_tn(resync_seqno);
-					region_top = gd_header->regions + gd_header->n_regions;
-					for (reg = gd_header->regions; reg < region_top; reg++)
-					{
-						csa = &FILE_INFO(reg)->s_addrs;
-						if (REPL_ALLOWED(csa->hdr))
-						{
-							REPL_DPRINT4("Assigning "INT8_FMT" to old_resyc_seqno of %s. Prev value "
-								INT8_FMT"\n", resync_seqno, reg->rname, csa->hdr->old_resync_seqno);
-							/* Although csa->hdr->old_resync_seqno is only modified by the source
-							 * server and never concurremntly, it is read by fileheader_sync() which
-							 * does it while in crit. To avoid the latter from reading an inconsistent
-							 * value (i.e. neither the pre-update nor the post-update value, which is
-							 * possible if the 8-byte operation is not atomic but a sequence of two
-							 * 4-byte operations AND if the pre-update and post-update value differ in
-							 * their most significant 4-bytes) we grab crit. We could have used the
-							 * QWCHANGE_IS_READER_CONSISTENT macro (which checks for most significant
-							 * 4-byte differences) instead to determine if it is really necessary to
-							 * grab crit. But since the update to old_resync_seqno is a rare operation,
-							 * we decide to play it safe.
-							 */
-							if (FALSE == (was_crit = csa->now_crit))
-								grab_crit(reg);
-							QWASSIGN(csa->hdr->old_resync_seqno, resync_seqno);
-							if (FALSE == was_crit)
-								rel_crit(reg);
-						}
-					}
-				}
-			}
-
-			/* Could send a REPL_CLOSE_CONN message here */
-
-			/*
-		 	 * It is expected that on receiving this msg, the
-		 	 * Receiver Server will break the connection and exit.
-		 	 */
-
-		 	repl_close(&gtmsource_sock_fd);
-		 	LONG_SLEEP(GTMSOURCE_WAIT_FOR_RECEIVER_TO_QUIT); /* may not be needed after REPL_CLOSE_CONN is sent */
-		 	gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-		 	continue;
-		}
-
-		if (QWLT(gtmsource_local->read_jnl_seqno, sav_read_jnl_seqno) && NULL != repl_ctl_list)
-		{
-			/* The journal files may have been positioned ahead of
-			 * the read_jnl_seqno for the next read. Indicate that
-			 * they have to be repositioned into the past.
-			 */
-			assert(READ_FILE == gtmsource_local->read_state);
-			gtmsource_set_lookback();
-		}
-
-		/* The variable poll_time indicates if we should wait for the receive pipe to be I/O ready and should be set to
-		 * a non-zero value ONLY if the source server has nothing to send. At this point we have data to send and so
-		 * set poll_time to no-wait.
-		 */
-		poll_time = REPL_POLL_NOWAIT;
-		gtmsource_state = GTMSOURCE_SENDING_JNLRECS;
-		gtmsource_init_heartbeat();
-
-		if ((jnl_ver >= remote_jnl_ver) && (IF_NONE != repl_filter_cur2old[remote_jnl_ver - JNL_VER_EARLIEST_REPL]))
-		{
-			assert(IF_INVALID != repl_filter_cur2old[remote_jnl_ver - JNL_VER_EARLIEST_REPL]);
-			assert(IF_INVALID != repl_filter_old2cur[remote_jnl_ver - JNL_VER_EARLIEST_REPL]);
-			/* reverse transformation should exist */
-			assert(IF_NONE != repl_filter_old2cur[remote_jnl_ver - JNL_VER_EARLIEST_REPL]);
-			if (FALSE != ((TREF(replgbl)).null_subs_xform = (primary_side_std_null_coll &&
-					!secondary_side_std_null_coll || secondary_side_std_null_coll &&
-					!primary_side_std_null_coll)))
-				(TREF(replgbl)).null_subs_xform = (primary_side_std_null_coll ?
-							STDNULL_TO_GTMNULL_COLL : GTMNULL_TO_STDNULL_COLL);
-			/* note that if jnl_ver == remote_jnl_ver and jnl_ver > V15_JNL_VER, the two sides may be running
-			 * different null collation. However, we leave the overhead of null collation transformation to
-			 * the receiver as source server is generally more loaded than the receiver
-			 */
-			gtmsource_filter |= INTERNAL_FILTER;
-			gtmsource_alloc_filter_buff(gtmsource_msgbufsiz);
-		} else
-		{
-			gtmsource_filter &= ~INTERNAL_FILTER;
-			if (NO_FILTER == gtmsource_filter)
-				gtmsource_free_filter_buff();
-		}
-		xon_wait_logged = FALSE;
-		gtmsource_upd_reg = gtmsource_mru_reg = NULL;
-		for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions; reg < region_top; reg++)
-		{
-			csa = &FILE_INFO(reg)->s_addrs;
-			if (REPL_ALLOWED(csa->hdr))
-			{
-				if (NULL == gtmsource_upd_reg)
-					gtmsource_upd_reg = gtmsource_mru_reg = reg;
-				else if (csa->hdr->reg_seqno > FILE_INFO(gtmsource_mru_reg)->s_addrs.hdr->reg_seqno)
-					gtmsource_mru_reg = reg;
-			}
-		}
-		/* source server startup and change of mode flush all regions, so we are okay to consider the current state
-		 * as completely flushed */
-		gtmsource_last_flush_time = gtmsource_now;
-		gtmsource_last_flush_reg_seq = jctl->jnl_seqno;
-		gtmsource_last_flush_resync_seq = gtmsource_local->read_jnl_seqno;
-		prev_now = gtmsource_now;
-		while (TRUE)
-		{
-			gtmsource_poll_actions(TRUE);
-			if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-				return (SS_NORMAL);
-			if (GTMSOURCE_WAITING_FOR_CONNECTION == gtmsource_state)
-				break;
-			if (prev_now != gtmsource_now)
-			{
-				prev_now = gtmsource_now;
-				if (gtmsource_msgbufsiz - MAX_REPL_MSGLEN > 2 * OS_PAGE_SIZE)
-				{	/* We have expanded the buffer by too much (could have been avoided had we sent one
-					 * transaction at a time while reading from journal files); let's revert back to our
-					 * initial buffer size. If we don't reduce our buffer, it is possible that the buffer keeps
-					 * growing (while reading * from journal file) thus making the size of sends while reading
-					 * from journal pool very large (> 1 MB).
-					 */
-					gtmsource_free_filter_buff();
-					gtmsource_free_msgbuff();
-					gtmsource_alloc_msgbuff(MAX_REPL_MSGLEN); /* will also allocate filter buffer */
-				}
-			}
-			/* Check if receiver sent us any control message. Typically, the traffic from receiver to source is very
-			 * low compared to traffic in the other direction. More often than not, there will be nothing on the pipe
-			 * to receive. Ideally, we should let TCP notify us when there is data on the pipe (async I/O on Unix and
-			 * VMS). But, we are not there yet. Since we do a select() before a recv(), we won't block if there is
-			 * nothing in the pipe. So, it shouldn't be an expensive operation even if done before every send. Also,
-			 * in doing so, we react to an XOFF sooner than later.
-			 */
-			/* Make sure we don't sleep for a longer duration if there is something to be sent across */
-			assert((GTMSOURCE_SENDING_JNLRECS != gtmsource_state)
-					|| ((0 == poll_time) || (GTMSOURCE_IDLE_POLL_WAIT == poll_time)));
-			REPL_RECV_LOOP(gtmsource_sock_fd, gtmsource_msgp, MIN_REPL_MSGLEN, poll_time)
-			{
-				if (0 == recvd_len) /* nothing received in the first attempt, let's try again later */
-					break;
-				gtmsource_poll_actions(TRUE);
-				if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-					return (SS_NORMAL);
-				if (GTMSOURCE_WAITING_FOR_CONNECTION == gtmsource_state)
-					break;
-			}
-			if ((SS_NORMAL == status) && (0 != recvd_len))
-			{	/* Process the received control message */
-				switch(gtmsource_msgp->type)
-				{
-					case REPL_XOFF:
-					case REPL_XOFF_ACK_ME:
-						gtmsource_state = GTMSOURCE_WAITING_FOR_XON;
-						poll_time = REPL_POLL_WAIT; /* because we are waiting for a REPL_XON */
-						repl_log(gtmsource_log_fp, TRUE, TRUE,
-							 "REPL_XOFF/REPL_XOFF_ACK_ME received. Send stalled...\n");
-						xon_wait_logged = FALSE;
-						if (REPL_XOFF_ACK_ME == gtmsource_msgp->type)
-						{
-							xoff_ack.type = REPL_XOFF_ACK;
-							QWASSIGN(*(seq_num *)&xoff_ack.msg[0], *(seq_num *)&gtmsource_msgp->msg[0]);
-							xoff_ack.len = MIN_REPL_MSGLEN;
-							REPL_SEND_LOOP(gtmsource_sock_fd, &xoff_ack, xoff_ack.len, REPL_POLL_NOWAIT)
-							{
-								gtmsource_poll_actions(FALSE);
-								if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-									return (SS_NORMAL);
-							}
-							if (SS_NORMAL == status)
-							{
-								repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL_XOFF_ACK sent...\n");
-							} else
-							{
-								if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-								{
-									repl_log(gtmsource_log_fp, TRUE, TRUE,
-										"Connection reset while sending REPL_XOFF_ACK. "
-										"Status = %d ; %s\n", status, STRERROR(status));
-									repl_close(&gtmsource_sock_fd);
-									gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-									break;
-								}
-								if (EREPL_SEND == repl_errno)
-								{
-									SNPRINTF(err_string, SIZEOF(err_string),
-											"Error sending REPL_XOFF_ACK_ME.  "
-											"Error in send : %s",
-											STRERROR(status));
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0,
-											ERR_TEXT, 2,
-									 		LEN_AND_STR(err_string));
-								}
-								if (EREPL_SELECT == repl_errno)
-								{
-									SNPRINTF(err_string, SIZEOF(err_string),
-											"Error sending REPL_XOFF_ACK_ME.  "
-											"Error in select : %s",
-											STRERROR(status));
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0,
-											ERR_TEXT, 2, LEN_AND_STR(err_string));
-								}
-							}
-						}
-						break;
-
-					case REPL_XON:
-						gtmsource_state = GTMSOURCE_SENDING_JNLRECS;
-						poll_time = REPL_POLL_NOWAIT; /* because we received XON and data ready for send */
-						repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL_XON received\n");
-						heartbeat_stalled = FALSE;
-						REPL_DPRINT1("Restarting HEARTBEAT\n");
-						break;
-
-					case REPL_BADTRANS:
-					case REPL_START_JNL_SEQNO:
-						QWASSIGN(recvd_seqno, *(seq_num *)&gtmsource_msgp->msg[0]);
-						gtmsource_state = GTMSOURCE_SEARCHING_FOR_RESTART;
-						if (REPL_BADTRANS == gtmsource_msgp->type)
-						{
-							repl_log(gtmsource_log_fp, TRUE, TRUE,
-							"REPL_BADTRANS received with SEQNO "INT8_FMT"\n", recvd_seqno);
-						} else
-						{
-							recvd_start_flags = ((repl_start_msg_ptr_t)gtmsource_msgp)->start_flags;
-							repl_log(gtmsource_log_fp, TRUE, TRUE,
-								 "REPL_START_JNL_SEQNO received with SEQNO "INT8_FMT". Possible "
-								 "crash of recvr/update process\n", recvd_seqno);
-						}
-						break;
-
-					case REPL_HEARTBEAT:
-						gtmsource_process_heartbeat((repl_heartbeat_msg_t *)gtmsource_msgp);
-						break;
-					default:
-						repl_log(gtmsource_log_fp, TRUE, TRUE, "Message of unknown type %d length %d"
-								"received, hex dump follows\n", gtmsource_msgp->type, recvd_len);
-						for (index = 0; index < MIN(recvd_len, gtmsource_msgbufsiz - REPL_MSG_HDRLEN); )
-						{
-							repl_log(gtmsource_log_fp, FALSE, FALSE, "%.2x ",
-									gtmsource_msgp->msg[index]);
-							if ((++index) % MAX_HEXDUMP_CHARS_PER_LINE == 0)
-								repl_log(gtmsource_log_fp, FALSE, FALSE, "\n");
-						}
-						assert(FALSE);
-						break;
-				}
-			} else if (SS_NORMAL != status)
-			{
-				if (EREPL_RECV == repl_errno)
-				{
-					if (REPL_CONN_RESET(status))
-					{
-						/* Connection reset */
-						repl_log(gtmsource_log_fp, TRUE, TRUE,
-								"Connection reset while attempting to receive from secondary. "
-								"Status = %d ; %s\n", status, STRERROR(status));
-						repl_close(&gtmsource_sock_fd);
-						SHORT_SLEEP(GTMSOURCE_WAIT_FOR_RECEIVER_CLOSE_CONN);
-						gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-						break;
-					} else
-					{
-						SNPRINTF(err_string, SIZEOF(err_string),
-								"Error receiving Control message from Receiver. Error in recv : %s",
-								STRERROR(status));
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-								LEN_AND_STR(err_string));
-					}
-				} else if (EREPL_SELECT == repl_errno)
-				{
-					SNPRINTF(err_string, SIZEOF(err_string),
-							"Error receiving Control message from Receiver. Error in select : %s",
-							STRERROR(status));
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-							LEN_AND_STR(err_string));
-				}
-			}
-			if (GTMSOURCE_WAITING_FOR_XON == gtmsource_state)
-			{
-				if (!xon_wait_logged)
-				{
-					repl_log(gtmsource_log_fp, TRUE, TRUE, "Waiting to receive XON\n");
-					heartbeat_stalled = TRUE;
-					REPL_DPRINT1("Stalling HEARTBEAT\n");
-					xon_wait_logged = TRUE;
-				}
-				continue;
-			}
-			if (GTMSOURCE_SEARCHING_FOR_RESTART  == gtmsource_state ||
-			    GTMSOURCE_WAITING_FOR_CONNECTION == gtmsource_state)
-				break;
-			assert(gtmsource_state == GTMSOURCE_SENDING_JNLRECS);
-			pre_read_jnl_seqno = gtmsource_local->read_jnl_seqno;
-			tot_tr_len = gtmsource_get_jnlrecs(&gtmsource_msgp->msg[0], &data_len,
-							   gtmsource_msgbufsiz - REPL_MSG_HDRLEN,
-							   !(gtmsource_filter & EXTERNAL_FILTER));
-			post_read_jnl_seqno = gtmsource_local->read_jnl_seqno;
-			if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-				return (SS_NORMAL);
-			if (GTMSOURCE_WAITING_FOR_CONNECTION == gtmsource_state)
-				break;
-			if (0 <= tot_tr_len)
-			{
-				if (0 < data_len)
-				{
-					APPLY_EXT_FILTER_IF_NEEDED(gtmsource_filter, gtmsource_msgp, data_len, tot_tr_len);
-					gtmsource_msgp->type = REPL_TR_JNL_RECS;
-					gtmsource_msgp->len = data_len + REPL_MSG_HDRLEN;
-					send_msgp = gtmsource_msgp;
-					send_tr_len = tot_tr_len;
-					if (gtmsource_filter & INTERNAL_FILTER)
-					{
-						in_buff = gtmsource_msgp->msg;
-						in_buflen = data_len; /* size of the first journal record in the converted buffer */
-						out_buffmsg = repl_filter_buff;
-						out_buff = out_buffmsg + REPL_MSG_HDRLEN;
-						out_bufsiz = repl_filter_bufsiz - REPL_MSG_HDRLEN;
-						remaining_len = tot_tr_len;
-						while (JREC_PREFIX_SIZE <= remaining_len)
-						{
-							filter_seqno = ((struct_jrec_null *)(in_buff))->jnl_seqno;
-							DEBUG_ONLY(
-								save_inbuff = in_buff;
-								save_outbuff = out_buff;
-							)
-							APPLY_INT_FILTER(in_buff, in_buflen, out_buff, out_buflen,
-											out_bufsiz, status);
-							/* Internal filters should not modify the incoming pointers. Assert that. */
-							assert((save_inbuff == in_buff) && (save_outbuff == out_buff));
-							if (SS_NORMAL == status)
-							{	/* adjust various pointers and book-keeping values to move to next
-								 * record.
-								 */
-								((repl_msg_ptr_t)(out_buffmsg))->type = REPL_TR_JNL_RECS;
-								((repl_msg_ptr_t)(out_buffmsg))->len = out_buflen + REPL_MSG_HDRLEN;
-								out_buffmsg = (out_buff + out_buflen);
-								remaining_len -= (in_buflen + REPL_MSG_HDRLEN);
-								assert(0 <= remaining_len);
-								if (0 >= remaining_len)
-									break;
-								in_buff += in_buflen;
-								in_buflen = ((repl_msg_ptr_t)(in_buff))->len - REPL_MSG_HDRLEN;
-								in_buff += REPL_MSG_HDRLEN;
-								out_buff = (out_buffmsg + REPL_MSG_HDRLEN);
-								out_bufsiz -= (out_buflen + REPL_MSG_HDRLEN);
-								assert(0 <= (int)out_bufsiz);
-							} else if (EREPL_INTLFILTER_NOSPC == repl_errno)
-							{
-								REALLOCATE_INT_FILTER_BUFF(out_buff, out_buffmsg, out_bufsiz);
-								/* note that in_buff and in_buflen is not changed so that we can
-								 * start from where we left
-								 */
-							} else
-							{
-								INT_FILTER_RTS_ERROR(filter_seqno);
-							}
-						}
-						assert(0 == remaining_len);
-						send_msgp = (repl_msg_ptr_t)repl_filter_buff;
-						send_tr_len = out_buffmsg - repl_filter_buff;
-					}
-					/* ensure that the head of the buffer has the correct type and len */
-					assert(REPL_TR_JNL_RECS == send_msgp->type);
-					assert(0 == (send_msgp->len % JNL_REC_START_BNDRY));
-					assert(send_tr_len && (0 == (send_tr_len % REPL_MSG_HDRLEN)));
-					/* The following loop tries to send multiple seqnos in one shot. resync_seqno gets
-					 * updated once the send is completely successful. If an error occurs in the middle
-					 * of the send, it is possible that we successfully sent a few seqnos to the other side.
-					 * In this case resync_seqno should be updated to reflect those seqnos. Not doing so
-					 * might cause the secondary to get ahead of the primary in terms of resync_seqno.
-					 * Although it is possible to determine the exact seqno where the send partially failed,
-					 * we update resync_seqno as if all seqnos were successfully sent (It is ok for the
-					 * resync_seqno on the primary side to be a little more than the actual value as long as
-					 * the secondary side has an accurate value of resync_seqno. This is because the
-					 * resync_seqno of the system is the minimum of the resync_seqno of both primary
-					 * and secondary). This is done by the call to gtmsource_flush_fh() done within the
-					 * REPL_SEND_LOOP macro as well as in the (SS_NORMAL != status) if condition below.
-					 */
-					REPL_SEND_LOOP(gtmsource_sock_fd, send_msgp, send_tr_len, REPL_POLL_WAIT)
-					{
-						gtmsource_poll_actions(FALSE);
-						if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-						{
-							gtmsource_flush_fh(post_read_jnl_seqno);
-							return (SS_NORMAL);
-						}
-					}
-					if (SS_NORMAL != status)
-					{
-						gtmsource_flush_fh(post_read_jnl_seqno);
-						if (REPL_CONN_RESET(status) && EREPL_SEND == repl_errno)
-						{
-							repl_log(gtmsource_log_fp, TRUE, TRUE,
-								"Connection reset while sending transaction data from "
-								INT8_FMT" to "INT8_FMT". Status = %d ; %s\n", pre_read_jnl_seqno,
-								post_read_jnl_seqno, status, STRERROR(status));
-							repl_close(&gtmsource_sock_fd);
-							SHORT_SLEEP(GTMSOURCE_WAIT_FOR_RECEIVER_CLOSE_CONN);
-							gtmsource_state = GTMSOURCE_WAITING_FOR_CONNECTION;
-							break;
-						}
-						if (EREPL_SEND == repl_errno)
-						{
-							SNPRINTF(err_string, SIZEOF(err_string),
-								"Error sending DATA. Error in send : %s", STRERROR(status));
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-								  LEN_AND_STR(err_string));
-						}
-						if (EREPL_SELECT == repl_errno)
-						{
-							SNPRINTF(err_string, SIZEOF(err_string),
-								"Error sending DATA. Error in select : %s", STRERROR(status));
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-								  LEN_AND_STR(err_string));
-						}
-					}
-					/* Record the "last sent seqno" in file header of most recently updated region and one
-					 * region picked in round robin order. Updating one region is sufficient since the
-					 * system's resync_seqno is computed to be the maximum of file header resync_seqno
-					 * across all regions. We choose to update multiple regions to increase the odds of
-					 * not losing information in case of a system crash
-					 */
-					UPDATE_RESYNC_SEQNO(gtmsource_mru_reg, pre_read_jnl_seqno, post_read_jnl_seqno);
-					if (gtmsource_mru_reg != gtmsource_upd_reg)
-						UPDATE_RESYNC_SEQNO(gtmsource_upd_reg, pre_read_jnl_seqno, post_read_jnl_seqno);
-					old_upd_reg = gtmsource_upd_reg;
-					do
-					{	/* select next region in round robin order */
-						gtmsource_upd_reg++;
-						if (gtmsource_upd_reg >= gd_header->regions + gd_header->n_regions)
-							gtmsource_upd_reg = gd_header->regions; /* wrap back to first region */
-					} while (gtmsource_upd_reg != old_upd_reg && /* back to the original region? */
-							!REPL_ALLOWED(FILE_INFO(gtmsource_upd_reg)->s_addrs.hdr));
-					save_now = gtmsource_now;
-					if (GTMSOURCE_FH_FLUSH_INTERVAL <= difftime(save_now, gtmsource_last_flush_time))
-					{
-						gtmsource_flush_fh(post_read_jnl_seqno);
-						gtmsource_last_flush_time = save_now;
-					}
-
-					repl_source_msg_sent += (qw_num)send_tr_len;
-					repl_source_data_sent += (qw_num)(send_tr_len) -
-								(post_read_jnl_seqno - pre_read_jnl_seqno) * REPL_MSG_HDRLEN;
-					log_seqno = post_read_jnl_seqno - 1; /* post_read_jnl_seqno is the "next" seqno to be sent,
-									      * not the last one we sent */
-					if (log_seqno - lastlog_seqno >= log_interval || gtmsource_logstats)
-					{ /* print always when STATSLOG is ON, or when the log interval has passed */
-						trans_sent_cnt += (log_seqno - lastlog_seqno);
-						/* jctl->jnl_seqno >= post_read_jnl_seqno is the most common case;
-						 * see gtmsource_readpool() for when the rare case can occur */
-						jnl_seqno = jctl->jnl_seqno;
-						assert(jnl_seqno >= post_read_jnl_seqno - 1);
-						diff_seqno = (jnl_seqno >= post_read_jnl_seqno) ?
-								(jnl_seqno - post_read_jnl_seqno) : 0;
-						repl_log(gtmsource_log_fp, TRUE, FALSE, "REPL INFO - Seqno : "INT8_FMT, log_seqno);
-						repl_log(gtmsource_log_fp, FALSE, FALSE, "  Jnl Total : "INT8_FMT"  Msg Total : "
-							INT8_FMT"  ", repl_source_data_sent, repl_source_msg_sent);
-						repl_log(gtmsource_log_fp, FALSE, TRUE, "Current backlog : "INT8_FMT"\n",
-							diff_seqno);
-						/* gtmsource_now is updated by the heartbeat protocol every heartbeat
-						 * interval. To cut down on calls to time(), we use gtmsource_now as the
-						 * time to figure out if we have to log statistics. This works well as the
-						 * logging interval generally is larger than the heartbeat interval, and that
-						 * the heartbeat protocol is running when we are sending data. The consequence
-						 * although is that we may defer logging when we would have logged. We can live
-						 * with that given the benefit of not calling time related system calls.
-						 * Currently, the logging interval is not changeable by users. When/if we provide
-						 * means of choosing log interval, this code may have to be re-examined.
-						 * Vinaya 2003, Sep 08
-						 */
-						assert(0 != gtmsource_now); /* must hold if we are sending data */
-						repl_source_this_log_time = gtmsource_now; /* approximate time, in the worst case,
-											    * behind by heartbeat interval */
-						assert(repl_source_this_log_time >= repl_source_prev_log_time);
-						time_elapsed = difftime(repl_source_this_log_time, repl_source_prev_log_time);
-						if ((double)GTMSOURCE_LOGSTATS_INTERVAL <= time_elapsed)
-						{
-							repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL INFO since last log : "
-								 "Time elapsed : %00.f  Tr sent : "INT8_FMT"  Tr bytes : "
-								 INT8_FMT"  Msg bytes : "INT8_FMT"\n",
-								  time_elapsed, trans_sent_cnt - last_log_tr_sent_cnt,
-								 repl_source_data_sent - repl_source_lastlog_data_sent,
-								 repl_source_msg_sent - repl_source_lastlog_msg_sent);
-							repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL INFO since last log : "
-								 "Time elapsed : %00.f  Tr sent/s : %f  Tr bytes/s : %f  "
-								 "Msg bytes/s : %f\n", time_elapsed,
-								 (float)(trans_sent_cnt - last_log_tr_sent_cnt)/time_elapsed,
-								 (float)(repl_source_data_sent - repl_source_lastlog_data_sent) /
-								 	time_elapsed,
-								 (float)(repl_source_msg_sent - repl_source_lastlog_msg_sent) /
-								 	time_elapsed);
-							repl_source_lastlog_data_sent = repl_source_data_sent;
-							repl_source_lastlog_msg_sent = repl_source_msg_sent;
-							last_log_tr_sent_cnt = trans_sent_cnt;
-							repl_source_prev_log_time = repl_source_this_log_time;
-						}
-						lastlog_seqno = log_seqno;
-					}
-					/* Because we sent data to the other side and there might be more to be sent across, don't
-					 * wait for the receive pipe to be ready.
-					 */
-					poll_time = REPL_POLL_NOWAIT;
-				} else /* data_len == 0 */
-				{	/* nothing to send */
-					gtmsource_flush_fh(post_read_jnl_seqno);
-					/* Sleep for a while (as part of the next REPL_RECV_LOOP) to avoid spinning when there is no
-					 * data to be sent
-					 */
-					poll_time = GTMSOURCE_IDLE_POLL_WAIT;
-				}
-			} else /* else tot_tr_len < 0, error */
-			{
-				assertpro(0 < data_len); /* Else major problems */
-				/* Insufficient buffer space, increase the buffer space */
-				gtmsource_alloc_msgbuff(data_len + REPL_MSG_HDRLEN);
-			}
-		}
-	}
-}
diff --git a/sr_vvms/gtmsource_process_ops.c b/sr_vvms/gtmsource_process_ops.c
deleted file mode 100644
index addfb52..0000000
--- a/sr_vvms/gtmsource_process_ops.c
+++ /dev/null
@@ -1,726 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include "gtm_netdb.h"
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_stat.h"
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-#include <descrip.h> /* Required for gtmsource.h */
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_comm.h"
-#include "jnl.h"
-#include "hashtab_mname.h"     /* needed for muprec.h */
-#include "hashtab_int4.h"     /* needed for muprec.h */
-#include "hashtab_int8.h"     /* needed for muprec.h */
-#include "buddy_list.h"
-#include "muprec.h"
-#include "repl_ctl.h"
-#include "repl_errno.h"
-#include "repl_dbg.h"
-#include "iosp.h"
-#include "gtm_event_log.h"
-#include "gt_timer.h"
-#include "eintr_wrappers.h"
-#include "repl_sp.h"
-#include "repl_filter.h"
-#include "repl_log.h"
-#include "sgtm_putmsg.h"
-#include "min_max.h"
-#include "error.h"
-
-GBLREF	gd_addr			*gd_header;
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	int			gtmsource_sock_fd;
-GBLREF  seq_num                 gtmsource_save_read_jnl_seqno;
-GBLREF	gtmsource_state_t	gtmsource_state;
-GBLREF	repl_msg_ptr_t		gtmsource_msgp;
-GBLREF	int			gtmsource_msgbufsiz;
-GBLREF	unsigned char		*gtmsource_tcombuff_start;
-GBLREF	unsigned char		*gtmsource_tcombuffp;
-GBLREF	int			gtmsource_log_fd;
-GBLREF	FILE			*gtmsource_log_fp;
-GBLREF	boolean_t		gtmsource_logstats;
-GBLREF	int			gtmsource_filter;
-GBLREF	seq_num			seq_num_zero;
-GBLREF	unsigned char		jnl_ver, remote_jnl_ver;
-GBLREF	uchar_ptr_t		repl_filter_buff;
-GBLREF	int			repl_filter_bufsiz;
-GBLREF	boolean_t		gtmsource_pool2file_transition;
-GBLREF  repl_ctl_element        *repl_ctl_list;
-GBLREF	int			repl_max_send_buffsize, repl_max_recv_buffsize;
-GBLREF	boolean_t		secondary_side_std_null_coll;
-GBLREF	boolean_t		secondary_side_trigger_support;
-
-error_def(ERR_REPLCOMM);
-error_def(ERR_REPLWARN);
-error_def(ERR_TEXT);
-error_def(ERR_UNIMPLOP);
-
-int gtmsource_est_conn()
-{
-	int			connection_attempts, alert_attempts, save_errno, status;
-	char			print_msg[1024], msg_str[1024];
-	gtmsource_local_ptr_t	gtmsource_local;
-	int			send_buffsize, recv_buffsize, tcp_s_bufsize;
-	int 			logging_period, logging_interval; /* logging period = soft_tries_period*logging_interval */
-	int 			logging_attempts;
-	sockaddr_ptr		secondary_sa;
-	int			secondary_addrlen;
-
-	gtmsource_local = jnlpool.gtmsource_local;
-	/* Connect to the secondary - use hard tries, soft tries ... */
-	connection_attempts = 0;
-	gtmsource_comm_init(); /* set up gtmsource_loal.secondary_ai */
-	secondary_sa = (sockaddr_ptr)(&gtmsource_local->secondary_inet_addr);
-	secondary_addrlen = gtmsource_local->secondary_addrlen;
-	repl_log(gtmsource_log_fp, TRUE, TRUE, "Connect hard tries count = %d, Connect hard tries period = %d\n",
-		 gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_COUNT],
-		 gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD]);
-	do
-	{
-		status = gtm_connect(gtmsource_sock_fd, secondary_sa, secondary_addrlen);
-		if (0 == status)
-			break;
-		repl_log(gtmsource_log_fp, FALSE, FALSE, "%d hard connection attempt failed : %s\n", connection_attempts + 1,
-			 STRERROR(ERRNO));
-		repl_close(&gtmsource_sock_fd);
-		if (REPL_MAX_CONN_HARD_TRIES_PERIOD > jnlpool.gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD])
-			SHORT_SLEEP(gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD])
-		else
-			LONG_SLEEP(gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_PERIOD] % MILLISECS_IN_SEC);
-		gtmsource_poll_actions(FALSE);
-		if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-			return (SS_NORMAL);
-		gtmsource_comm_init();
-	} while (++connection_attempts < gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_COUNT]);
-
-	gtmsource_poll_actions(FALSE);
-	if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-		return (SS_NORMAL);
-
-	if (gtmsource_local->connect_parms[GTMSOURCE_CONN_HARD_TRIES_COUNT] <= connection_attempts)
-	{	/*Initialize logging period related variables*/
-		logging_period = gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD];
-		logging_interval = 1;
-		logging_attempts = 0;
-
-		alert_attempts = DIVIDE_ROUND_DOWN(gtmsource_local->connect_parms[GTMSOURCE_CONN_ALERT_PERIOD],
-						   gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD]);
-		repl_log(gtmsource_log_fp, TRUE, TRUE, "Soft tries period = %d, Alert period = %d\n",
-			 gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD],
-			 alert_attempts * gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD]);
-		connection_attempts = 0;
-		do
-		{
-			status = gtm_connect(gtmsource_sock_fd, secondary_sa, secondary_addrlen);
-			if (0 == status)
-				break;
-			repl_close(&gtmsource_sock_fd);
-			if (0 == (connection_attempts + 1) % logging_interval)
-			{
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "%d soft connection attempt failed : %s\n",
-					 connection_attempts + 1, STRERROR(ERRNO));
-				logging_attempts++;
-			}
-			LONG_SLEEP(gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD]);
-			gtmsource_poll_actions(FALSE);
-			if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-				return (SS_NORMAL);
-			gtmsource_comm_init();
-			connection_attempts++;
-			if (0 == (connection_attempts % logging_interval) && 0 == (logging_attempts % alert_attempts))
-			{	/* Log ALERT message */
-				SNPRINTF(msg_str, SIZEOF(msg_str),
-					 "GTM Replication Source Server : Could not connect to secondary in %d seconds\n",
-					connection_attempts *
-					gtmsource_local->connect_parms[GTMSOURCE_CONN_SOFT_TRIES_PERIOD]);
-				sgtm_putmsg(print_msg, VARLSTCNT(4) ERR_REPLWARN, 2, LEN_AND_STR(msg_str));
-				repl_log(gtmsource_log_fp, TRUE, TRUE, print_msg);
-				gtm_event_log(GTM_EVENT_LOG_ARGC, "MUPIP", "REPLWARN", print_msg);
-			}
-			if (logging_period <= REPL_MAX_LOG_PERIOD)
-			{	/*the maximum real_period can reach 2*REPL_MAX_LOG_PERIOD)*/
-				if (0 == connection_attempts % logging_interval)
-				{	/* Double the logging period after every logging attempt*/
-					logging_interval = logging_interval << 1;
-					logging_period = logging_period << 1;
-				}
-			}
-		} while (TRUE);
-	}
-	if (0 != (status = get_send_sock_buff_size(gtmsource_sock_fd, &send_buffsize)))
-	{
-		SNPRINTF(msg_str, SIZEOF(msg_str), "Error getting socket send buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(msg_str));
-	}
-	if (send_buffsize < GTMSOURCE_TCP_SEND_BUFSIZE)
-	{
-		for (tcp_s_bufsize = GTMSOURCE_TCP_SEND_BUFSIZE;
-		     tcp_s_bufsize >= MAX(send_buffsize, GTMSOURCE_MIN_TCP_SEND_BUFSIZE)
-		     &&  0 != (status = set_send_sock_buff_size(gtmsource_sock_fd, tcp_s_bufsize));
-		     tcp_s_bufsize -= GTMSOURCE_TCP_SEND_BUFSIZE_INCR)
-			;
-		if (tcp_s_bufsize < GTMSOURCE_MIN_TCP_SEND_BUFSIZE)
-		{
-			SNPRINTF(msg_str, SIZEOF(msg_str), "Could not set TCP send buffer size in range [%d, %d], last "
-					"known error : %s", GTMSOURCE_MIN_TCP_SEND_BUFSIZE, GTMSOURCE_TCP_SEND_BUFSIZE,
-					STRERROR(status));
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) MAKE_MSG_INFO(ERR_REPLCOMM), 0, ERR_TEXT, 2, LEN_AND_STR(msg_str));
-		}
-	}
-	if (0 != (status = get_send_sock_buff_size(gtmsource_sock_fd, &repl_max_send_buffsize))) /* may have changed */
-	{
-		SNPRINTF(msg_str, SIZEOF(msg_str), "Error getting socket send buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(msg_str));
-	}
-	if (0 != (status = get_recv_sock_buff_size(gtmsource_sock_fd, &recv_buffsize)))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(10) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-				LEN_AND_LIT("Error getting socket recv buffsize"),
-				ERR_TEXT, 2, LEN_AND_STR(STRERROR(status)));
-	if (recv_buffsize < GTMSOURCE_TCP_RECV_BUFSIZE)
-	{
-		if (0 != (status = set_recv_sock_buff_size(gtmsource_sock_fd, GTMSOURCE_TCP_RECV_BUFSIZE)))
-		{
-			if (recv_buffsize < GTMSOURCE_MIN_TCP_RECV_BUFSIZE)
-			{
-				SNPRINTF(msg_str, SIZEOF(msg_str), "Could not set TCP recv buffer size to %d : %s",
-						GTMSOURCE_MIN_TCP_RECV_BUFSIZE, STRERROR(status));
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) MAKE_MSG_INFO(ERR_REPLCOMM), 0, ERR_TEXT, 2,
-						LEN_AND_STR(msg_str));
-			}
-		}
-	}
-	if (0 != (status = get_recv_sock_buff_size(gtmsource_sock_fd, &repl_max_recv_buffsize))) /* may have changed */
-	{
-		SNPRINTF(msg_str, SIZEOF(msg_str), "Error getting socket recv buffsize : %s", STRERROR(status));
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_REPLCOMM, 0, ERR_TEXT, 2, LEN_AND_STR(msg_str));
-	}
-	return (SS_NORMAL);
-}
-
-int gtmsource_alloc_tcombuff(void)
-{ /* Allocate buffer for TCOM, ZTCOM records */
-
-	if (NULL == gtmsource_tcombuff_start)
-	{
-		assert(NULL == gtmsource_tcombuff_start);
-		gtmsource_tcombuff_start = (unsigned char *)malloc(gd_header->n_regions * TCOM_RECLEN);
-	}
-	return (SS_NORMAL);
-}
-
-void gtmsource_free_tcombuff(void)
-{
-	if (NULL != gtmsource_tcombuff_start)
-	{
-		free(gtmsource_tcombuff_start);
-		gtmsource_tcombuff_start = NULL;
-	}
-	return;
-}
-
-int gtmsource_alloc_filter_buff(int bufsiz)
-{
-	unsigned char	*old_filter_buff;
-
-	if ((NO_FILTER != gtmsource_filter) && (bufsiz > repl_filter_bufsiz))
-	{
-		REPL_DPRINT3("Expanding filter buff from %d to %d\n", repl_filter_bufsiz, bufsiz);
-		old_filter_buff = repl_filter_buff;
-		repl_filter_buff = (unsigned char *)malloc(bufsiz);
-		if (NULL != old_filter_buff)
-		{
-			assert(NULL != old_filter_buff);
-			memcpy(repl_filter_buff, old_filter_buff, repl_filter_bufsiz);
-			free(old_filter_buff);
-		}
-		repl_filter_bufsiz = bufsiz;
-	}
-	return (SS_NORMAL);
-}
-
-void gtmsource_free_filter_buff(void)
-{
-	if (NULL != repl_filter_buff)
-	{
-		assert(NULL != repl_filter_buff);
-		free(repl_filter_buff);
-		repl_filter_buff = NULL;
-		repl_filter_bufsiz = 0;
-	}
-}
-
-int gtmsource_alloc_msgbuff(int maxbuffsize)
-{	/* Allocate message buffer */
-	repl_msg_ptr_t	oldmsgp;
-
-	assert(MIN_REPL_MSGLEN < maxbuffsize);
-	if ((maxbuffsize > gtmsource_msgbufsiz) || (NULL == gtmsource_msgp))
-	{
-		REPL_DPRINT3("Expanding message buff from %d to %d\n", gtmsource_msgbufsiz, maxbuffsize);
-		oldmsgp = gtmsource_msgp;
-		gtmsource_msgp = (repl_msg_ptr_t)malloc(maxbuffsize);
-		if (NULL != oldmsgp)
-		{	/* Copy existing data */
-			memcpy((unsigned char *)gtmsource_msgp, (unsigned char *)oldmsgp, gtmsource_msgbufsiz);
-			free(oldmsgp);
-		}
-		gtmsource_msgbufsiz = maxbuffsize;
-		gtmsource_alloc_filter_buff(gtmsource_msgbufsiz);
-	}
-	return (SS_NORMAL);
-}
-
-void gtmsource_free_msgbuff(void)
-{
-	if (NULL != gtmsource_msgp)
-	{
-		free(gtmsource_msgp);
-		gtmsource_msgp = NULL;
-		gtmsource_msgbufsiz = 0;
-	}
-}
-
-int gtmsource_recv_restart(seq_num *recvd_jnl_seqno, int *msg_type, int *start_flags)
-{
-	/* Receive jnl_seqno for (re)starting transmission */
-
-	fd_set		input_fds;
-	repl_msg_t	msg;
-	unsigned char	*msg_ptr;				/* needed for REPL_{SEND,RECV}_LOOP */
-	int		tosend_len, sent_len, sent_this_iter;	/* needed for REPL_SEND_LOOP */
-	int		torecv_len, recvd_len, recvd_this_iter;	/* needed for REPL_RECV_LOOP */
-	int		status;					/* needed for REPL_{SEND,RECV}_LOOP */
-	unsigned char	seq_num_str[32], *seq_num_ptr;
-	repl_msg_t	xoff_ack;
-	boolean_t	rcv_node_same_endianness = FALSE;
-
-	status = SS_NORMAL;
-	for (; SS_NORMAL == status;)
-	{
-		repl_log(gtmsource_log_fp, FALSE, FALSE, "Waiting for (re)start JNL_SEQNO/FETCH RESYSNC msg\n");
-		REPL_RECV_LOOP(gtmsource_sock_fd, &msg, MIN_REPL_MSGLEN, REPL_POLL_WAIT)
-		{
-			gtmsource_poll_actions(FALSE);
-			if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-				return (SS_NORMAL);
-		}
-		if (SS_NORMAL == status)
-		{
-			/* Determine endianness of other system by seeing if the msg.len is greater than
-			 * expected. If it is, convert it and see if it is now what we expect. If it is,
-			 * then the other system is of opposite endianness.
-			 * Note: We would normally use msg.type since is is effectively an enum and we
-			 * control by adding new messages. But, REPL_START_JNL_SEQNO is lucky number zero
-			 * which means it is identical on systems of either endianness.
-			 */
-			if (((unsigned)MIN_REPL_MSGLEN < (unsigned)msg.len)
-					&& ((unsigned)MIN_REPL_MSGLEN == GTM_BYTESWAP_32((unsigned)msg.len)))
-				rcv_node_same_endianness = FALSE;
-			else
-				rcv_node_same_endianness = TRUE;
-			if (!rcv_node_same_endianness)
-			{
-				msg.type = GTM_BYTESWAP_32(msg.type);
-				msg.len = GTM_BYTESWAP_32(msg.len);
-			}
-			assert(msg.type == REPL_START_JNL_SEQNO || msg.type == REPL_FETCH_RESYNC || msg.type == REPL_XOFF_ACK_ME);
-			assert(msg.len == MIN_REPL_MSGLEN);
-			*msg_type = msg.type;
-			*start_flags = START_FLAG_NONE;
-			QWASSIGN(*recvd_jnl_seqno, *(seq_num *)&msg.msg[0]);
-			if (REPL_START_JNL_SEQNO == msg.type)
-			{
-				if (!rcv_node_same_endianness)
-					*recvd_jnl_seqno = GTM_BYTESWAP_64(*recvd_jnl_seqno);
-				repl_log(gtmsource_log_fp, FALSE, FALSE, "Received (re)start JNL_SEQNO msg %d bytes. seq no "
-									 INT8_FMT"\n", recvd_len, INT8_PRINT(*recvd_jnl_seqno));
-				if (!rcv_node_same_endianness)
-					((repl_start_msg_ptr_t)&msg)->start_flags =
-						GTM_BYTESWAP_32(((repl_start_msg_ptr_t)&msg)->start_flags);
-				*start_flags = ((repl_start_msg_ptr_t)&msg)->start_flags;
-				if (*start_flags & START_FLAG_STOPSRCFILTER)
-				{
-					repl_log(gtmsource_log_fp, FALSE, FALSE,
-						 "Start JNL_SEQNO msg tagged with STOP SOURCE FILTER\n");
-					if (gtmsource_filter & EXTERNAL_FILTER)
-					{
-						repl_stop_filter();
-						gtmsource_filter &= ~EXTERNAL_FILTER;
-					} else
-						repl_log(gtmsource_log_fp, FALSE, FALSE,
-							 "Filter is not active, ignoring STOP SOURCE FILTER msg\n");
-					*msg_type = REPL_START_JNL_SEQNO;
-				}
-				assert(*start_flags & START_FLAG_HASINFO); /* V4.2+ versions have jnl ver in the start msg */
-				remote_jnl_ver = ((repl_start_msg_ptr_t)&msg)->jnl_ver;
-				REPL_DPRINT3("Local jnl ver is octal %o, remote jnl ver is octal %o\n", jnl_ver, remote_jnl_ver);
-				repl_check_jnlver_compat();
-				assert(remote_jnl_ver > V15_JNL_VER || 0 == (*start_flags & START_FLAG_COLL_M));
-				if (remote_jnl_ver <= V15_JNL_VER)
-					*start_flags &= ~START_FLAG_COLL_M; /* zap it for pro, just in case */
-				secondary_side_std_null_coll = (*start_flags & START_FLAG_COLL_M) ? TRUE : FALSE;
-				assert((remote_jnl_ver >= V19_JNL_VER) || (0 == (*start_flags & START_FLAG_TRIGGER_SUPPORT)));
-				if (remote_jnl_ver < V19_JNL_VER)
-					*start_flags &= ~START_FLAG_TRIGGER_SUPPORT; /* zap it for pro, just in case */
-				secondary_side_trigger_support = (*start_flags & START_FLAG_TRIGGER_SUPPORT) ? TRUE : FALSE;
-				return (SS_NORMAL);
-			} else if (REPL_FETCH_RESYNC == msg.type)
-			{
-				if (!rcv_node_same_endianness)
-					*recvd_jnl_seqno = GTM_BYTESWAP_64(*recvd_jnl_seqno);
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "FETCH RESYNC msg received with SEQNO "INT8_FMT"\n",
-					 INT8_PRINT(*(seq_num *)&msg.msg[0]));
-				return (SS_NORMAL);
-			} else if (REPL_XOFF_ACK_ME == msg.type)
-			{
-				repl_log(gtmsource_log_fp, FALSE, FALSE, "XOFF received when waiting for (re)start JNL_SEQNO/FETCH "
-									"RESYSNC msg. Possible crash/shutdown of update process\n");
-				/* Send XOFF_ACK */
-				xoff_ack.type = REPL_XOFF_ACK;
-				if (!rcv_node_same_endianness)
-					*recvd_jnl_seqno = GTM_BYTESWAP_64(*recvd_jnl_seqno);
-				QWASSIGN(*(seq_num *)&xoff_ack.msg[0], *recvd_jnl_seqno);
-				xoff_ack.len = MIN_REPL_MSGLEN;
-				REPL_SEND_LOOP(gtmsource_sock_fd, &xoff_ack, xoff_ack.len, REPL_POLL_NOWAIT)
-				{
-					gtmsource_poll_actions(FALSE);
-					if (GTMSOURCE_CHANGING_MODE == gtmsource_state)
-						return (SS_NORMAL);
-				}
-				if (SS_NORMAL == status)
-				{
-					repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL_XOFF_ACK sent...\n");
-				}
-			} else
-			{
-				repl_log(gtmsource_log_fp, FALSE, FALSE, "UNKNOWN msg received when waiting for (re)start "
-									 "JNL_SEQNO/FETCH RESYSNC msg. Ignoring msg\n");
-				GTMASSERT;
-			}
-		}
-	}
-	return (status);
-}
-
-int gtmsource_srch_restart(seq_num recvd_jnl_seqno, int recvd_start_flags)
-{
-	seq_num			tmp_read_jnl_seqno;
-	qw_off_t		tmp_read_addr;
-	uint4			tmp_read, prev_tmp_read, prev_tr_size, jnlpool_size;
-	int			save_lastwrite_len;
-	unsigned char		seq_num_str[32], *seq_num_ptr;
-	gd_region		*reg, *region_top;
-	sgmnt_addrs		*csa;
-	jnlpool_ctl_ptr_t	jctl;
-	gtmsource_local_ptr_t	gtmsource_local;
-
-	jctl = jnlpool.jnlpool_ctl;
-	jnlpool_size = jctl->jnlpool_size;
-	gtmsource_local = jnlpool.gtmsource_local;
-	if (recvd_start_flags & START_FLAG_UPDATERESYNC)
-	{
-		grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, ASSERT_NO_ONLINE_ROLLBACK);
-		QWASSIGN(gtmsource_local->read_jnl_seqno, jctl->jnl_seqno);
-		QWASSIGN(gtmsource_local->read_addr, jctl->write_addr);
-		gtmsource_local->read = jctl->write;
-		rel_lock(jnlpool.jnlpool_dummy_reg);
-		gtmsource_local->read_state = READ_POOL;
-		repl_log(gtmsource_log_fp, TRUE, TRUE, "Update resync received, source server now reading from journal pool\n");
-		gtmsource_ctl_close();
-		REPL_DPRINT1("Received START_FLAG_UPDATERESYNC\n");
-	}
-
-	if (QWGT(recvd_jnl_seqno, gtmsource_local->read_jnl_seqno))
-	{
-		/*
-		 * The Receiver is ahead of me though I haven't yet
-		 * sent the transactions read_jnl_seqno thru
-		 * recvd_jnl_seqno across.
-		 */
-		/* Log Warning Message */
-		repl_log(gtmsource_log_fp, TRUE, FALSE, "Receiver ahead of Source. Source at JNL_SEQNO "INT8_FMT,
-			 INT8_PRINT(gtmsource_local->read_jnl_seqno));
-		repl_log(gtmsource_log_fp, FALSE, TRUE, ", receiver at "INT8_FMT"\n", INT8_PRINT(recvd_jnl_seqno));
-		return (EREPL_SEC_AHEAD);
-	}
-
-	QWASSIGN(tmp_read_jnl_seqno, gtmsource_local->read_jnl_seqno);
-
-	if (READ_POOL == gtmsource_local->read_state)
-	{
-		/* Follow the back-chain in the Journal Pool to find whether
-	         * or not recvd_jnl_seqno is in the Pool */
-
-		/* The implementation for searching through the back chain has several inefficiences. We are deferring addressing
-		 * them to keep code changes for V4.4-003 to a minimum. We should address these in an upcoming release.
-		 * Vinaya 2003, Oct 02 */
-
-		QWASSIGN(tmp_read_addr, gtmsource_local->read_addr);
-		QWASSIGN(tmp_read_jnl_seqno, gtmsource_local->read_jnl_seqno);
-		tmp_read = gtmsource_local->read;
-
-		if (jnlpool_hasnt_overflowed(jctl, jnlpool_size, tmp_read_addr) &&
-		    QWGT(tmp_read_jnl_seqno, recvd_jnl_seqno) &&
-		    QWGT(tmp_read_jnl_seqno, jctl->start_jnl_seqno))
-		{
-			if (QWGE(jctl->early_write_addr, tmp_read_addr))
-			{
-				/* If there is no more input to be read, the previous transaction size should not be read from the
-				 * journal pool since the read pointers point to the next read. In such a case, we can find the
-				 * size of the transcation tmp_read_jnl_seqno from jctl->lastwrite_len. We should access
-				 * lastwrite_len after a memory barrier to avoid reading a stale value. We rely on the memory
-				 * barrier done in jnlpool_hasnt_overflowed */
-				save_lastwrite_len = jctl->lastwrite_len;
-				if (QWEQ(jctl->early_write_addr, tmp_read_addr))
-				{ /* GT.M is not writing any transaction, safe to rely on jctl->lastwrite_len. Note, GT.M could not
-				   * have been writing transaction tmp_read_jnl_seqno if we are here. Also, lastwrite_len cannot be
-				   * in the future w.r.t early_write_addr because of the memory barriers we do in t{p}_{t}end.c
-				   * It can be behind by atmost one transaction (tmp_read_jnl_seqno). Well, we want the length of
-				   * transaction tmp_read_jnl_seqno, not tmp_read_jnl_seqno + 1. */
-					QWDECRBYDW(tmp_read_addr, save_lastwrite_len);
-					QWDECRBYDW(tmp_read_jnl_seqno, 1);
-					prev_tmp_read = tmp_read;
-					tmp_read -= save_lastwrite_len;
-					if (tmp_read >= prev_tmp_read)
-						tmp_read += jnlpool_size;
-					assert(tmp_read == QWMODDW(tmp_read_addr, jnlpool_size));
-					REPL_DPRINT2("Srch restart : No more input in jnlpool, backing off to read_jnl_seqno : "
-						     INT8_FMT, INT8_PRINT(tmp_read_jnl_seqno));
-					REPL_DPRINT3(" read_addr : "INT8_FMT" read : %d\n", INT8_PRINT(tmp_read_addr), tmp_read);
-				}
-			}
-			if (QWEQ(tmp_read_addr, jctl->write_addr))
-			{ /* we caught a GTM process writing tmp_read_jnl_seqno + 1, we cannot rely on lastwrite_len as it
-			   * may or may not have changed. Wait until the GTM process finishes writing this transaction */
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "SEARCHING RESYNC POINT IN POOL : Waiting for GTM process "
-								       "to finish writing journal records to the pool\n");
-				while (QWEQ(tmp_read_addr, jctl->write_addr))
-				{
-					SHORT_SLEEP(GTMSOURCE_WAIT_FOR_JNL_RECS);
-					gtmsource_poll_actions(FALSE);
-				}
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "SEARCHING RESYNC POINT IN POOL : GTM process finished "
-								       "writing journal records to the pool\n");
-			}
-		}
-
-		while (jnlpool_hasnt_overflowed(jctl, jnlpool_size, tmp_read_addr) &&
-		       QWGT(tmp_read_jnl_seqno, recvd_jnl_seqno) &&
-	               QWGT(tmp_read_jnl_seqno, jctl->start_jnl_seqno))
-		{
-			assert(tmp_read + SIZEOF(jnldata_hdr_struct) <= jnlpool_size);
-			prev_tr_size = ((jnldata_hdr_ptr_t)(jnlpool.jnldata_base + tmp_read))->prev_jnldata_len;
-			if ((prev_tr_size <= tmp_read_addr) &&
-				jnlpool_hasnt_overflowed(jctl, jnlpool_size, tmp_read_addr - prev_tr_size))
-			{
-				QWDECRBYDW(tmp_read_addr, prev_tr_size);
-				prev_tmp_read = tmp_read;
-				tmp_read -= prev_tr_size;
-				if (tmp_read >= prev_tmp_read)
-					tmp_read += jnlpool_size;
-				assert(tmp_read == QWMODDW(tmp_read_addr, jnlpool_size));
-				QWDECRBYDW(tmp_read_jnl_seqno, 1);
-				REPL_DPRINT2("Srch restart : No overflow yet, backing off to read_jnl_seqno : "INT8_FMT,
-					     INT8_PRINT(tmp_read_jnl_seqno));
-				REPL_DPRINT3(" read_addr : "INT8_FMT" read : %d\n", INT8_PRINT(tmp_read_addr), tmp_read);
-				continue;
-			}
-			break;
-		}
-
-		QWASSIGN(gtmsource_local->read_addr, tmp_read_addr);
-		gtmsource_local->read = tmp_read;
-
-		if (jnlpool_hasnt_overflowed(jctl, jnlpool_size, tmp_read_addr) &&
-	            QWEQ(tmp_read_jnl_seqno, recvd_jnl_seqno) &&
-	    	    QWGE(tmp_read_jnl_seqno, jctl->start_jnl_seqno))
-		{
-			REPL_DPRINT2("Srch restart : Now in READ_POOL state read_jnl_seqno : "INT8_FMT,
-				     INT8_PRINT(tmp_read_jnl_seqno));
-			REPL_DPRINT3(" read_addr : "INT8_FMT" read : %d\n",INT8_PRINT(tmp_read_addr), tmp_read);
-		} else
-		{
-			/* Overflow, or requested seqno too far back to be in pool */
-			REPL_DPRINT2("Srch restart : Now in READ_FILE state. Changing sync point to read_jnl_seqno : "INT8_FMT,
-				     INT8_PRINT(tmp_read_jnl_seqno));
-			REPL_DPRINT3(" read_addr : "INT8_FMT" read : %d ", INT8_PRINT(tmp_read_addr), tmp_read);
-			REPL_DPRINT2("save_read_jnl_seqno : "INT8_FMT"\n", INT8_PRINT(gtmsource_save_read_jnl_seqno));
-
-			QWASSIGN(gtmsource_save_read_jnl_seqno, tmp_read_jnl_seqno);
-			if (QWLT(gtmsource_save_read_jnl_seqno, jctl->start_jnl_seqno))
-			{
-				QWASSIGN(gtmsource_save_read_jnl_seqno, jctl->start_jnl_seqno);
-				assert(QWEQ(gtmsource_local->read_addr, seq_num_zero));
-				assert(gtmsource_local->read == 0);
-				/* For pro version, force zero assignment */
-				QWASSIGN(gtmsource_local->read_addr, seq_num_zero);
-				gtmsource_local->read = 0;
-				REPL_DPRINT2("Srch restart : Sync point "INT8_FMT, INT8_PRINT(gtmsource_save_read_jnl_seqno));
-				REPL_DPRINT2(" beyond start_seqno : "INT8_FMT, INT8_PRINT(jctl->start_jnl_seqno));
-				REPL_DPRINT3(", sync point set to read_addr : "INT8_FMT" read : %d\n",
-					     INT8_PRINT(gtmsource_local->read_addr), gtmsource_local->read);
-			}
-			gtmsource_local->read_state = READ_FILE;
-
-			repl_log(gtmsource_log_fp, TRUE, TRUE, "Source server now reading from journal files; journal pool "
-					"does not contain transaction %llu\n", recvd_jnl_seqno);
-			gtmsource_pool2file_transition = TRUE;
-		}
-	} else /* read_state is READ_FILE and requesting a sequence number
-	        * less than or equal to read_jnl_seqno */
-	{
-		if (QWGT(tmp_read_jnl_seqno,  gtmsource_save_read_jnl_seqno))
-			QWASSIGN(gtmsource_save_read_jnl_seqno, tmp_read_jnl_seqno);
-		REPL_DPRINT2("Srch restart : Continuing in READ_FILE state. Retaining sync point for read_jnl_seqno : "INT8_FMT,
-			     INT8_PRINT(tmp_read_jnl_seqno));
-		REPL_DPRINT2(" at read_addr : "INT8_FMT, INT8_PRINT(gtmsource_local->read_addr));
-		REPL_DPRINT3(" read : %d corresponding to save_read_jnl_seqno : "INT8_FMT"\n", gtmsource_local->read,
-			     INT8_PRINT(gtmsource_save_read_jnl_seqno));
-		repl_log(gtmsource_log_fp, TRUE, TRUE, "Source server continuing to read from journal files at transaction %llu\n",
-				recvd_jnl_seqno);
-	}
-
-	QWASSIGN(gtmsource_local->read_jnl_seqno, recvd_jnl_seqno);
-
-	region_top = gd_header->regions + gd_header->n_regions;
-	for (reg = gd_header->regions; reg < region_top; reg++)
-	{
-		csa = &FILE_INFO(reg)->s_addrs;
-		if (REPL_ALLOWED(csa->hdr))
-		{
-#ifndef INT8_SUPPORTED
-			grab_crit(reg); /* File-header sync is done in crit, and so grab_crit here */
-#endif
-			QWASSIGN(FILE_INFO(reg)->s_addrs.hdr->resync_seqno, recvd_jnl_seqno);
-			REPL_DPRINT3("Setting resync_seqno of %s to "INT8_FMT"\n", reg->rname, INT8_PRINT(recvd_jnl_seqno));
-#ifndef INT8_SUPPORTED
-			rel_crit(reg);
-#endif
-		}
-	}
-
-	return (SS_NORMAL);
-}
-
-int gtmsource_get_jnlrecs(uchar_ptr_t buff, int *data_len, int maxbufflen, boolean_t read_multpile)
-{
-	int 			total_tr_len;
-	unsigned char		seq_num_str[32], *seq_num_ptr;
-	jnlpool_ctl_ptr_t	jctl;
-	gtmsource_local_ptr_t	gtmsource_local;
-	seq_num			jnl_seqno, read_jnl_seqno;
-	qw_num			write_addr, read_addr;
-
-	jctl = jnlpool.jnlpool_ctl;
-	gtmsource_local = jnlpool.gtmsource_local;
-	write_addr = jctl->write_addr;
-	jnl_seqno = jctl->jnl_seqno;
-	read_jnl_seqno = gtmsource_local->read_jnl_seqno;
-	read_addr = gtmsource_local->read_addr;
-	assert(read_addr <= write_addr);
-	assert((0 != write_addr) || (read_jnl_seqno <= jctl->start_jnl_seqno));
-
-#ifdef GTMSOURCE_ALWAYS_READ_FILES
-	gtmsource_local->read_state = READ_FILE;
-#endif
-	switch(gtmsource_local->read_state)
-	{
-		case READ_POOL:
-#ifndef GTMSOURCE_ALWAYS_READ_FILES_STRESS
-			if (read_addr == write_addr)
-			{/* Nothing to read. While reading pool, the comparison of read_addr against write_addr is the only
-			  * reliable indicator if there are any transactions to be read. This is due to the placement of
-			  * memory barriers in t_end/tp_tend.c. Also, since we do not issue memory barrier here, we may be reading
-			  * a stale value of write_addr in which case we may conclude that there is nothing to read. But, this will
-			  * not continue forever as the source server eventually (decided by architecture's implementation) will see
-			  * the change to write_addr.
-			  */
-				*data_len = 0;
-				return (0);
-			}
-			if (0 < (total_tr_len = gtmsource_readpool(buff, data_len, maxbufflen, read_multpile, write_addr)))
-				return (total_tr_len);
-			if (0 < *data_len)
-				return (-1);
-#endif /* for GTMSOURCE_ALWAYS_READ_FILES_STRESS, we let the source server switch back and forth between pool read and file read */
-			/* Overflow, switch to READ_FILE */
-			gtmsource_local->read_state = READ_FILE;
-			QWASSIGN(gtmsource_save_read_jnl_seqno, read_jnl_seqno);
-			gtmsource_pool2file_transition = TRUE; /* so that we read the latest gener jnl files */
-			repl_log(gtmsource_log_fp, TRUE, TRUE, "Source server now reading from journal files; journal pool "
-					"overflow detected at transaction %llu\n", gtmsource_save_read_jnl_seqno);
-
-			/* CAUTION : FALL THROUGH */
-
-		case READ_FILE:
-			if (read_jnl_seqno >= jnl_seqno)
-			{ /* Nothing to read. While reading from files, source server does not use write_addr to decide
-			   * how much to read. Also, it is possible that read_addr and write_addr are the same if the
-			   * source server came up after a crash and syncs with the latest state in jnlpool (see
-			   * gtmsource()). These reasons preclude the comparison of read_addr and write_addr (as we did for
-			   * READ_POOL case) to decide whether there are any unsent transactions. We use jnl_seqno instead.
-			   * Note though, the source server's view of jnl_seqno may be stale, and we may conclude that
-			   * we don't have anything to read as we do not do memory barrier here to fetch the latest
-			   * value of jnl_seqno. But, this will not continue forever as the source server eventually
-			   * (decided by architecture's implementation) will see the change to jnl_seqno.
-			   *
-			   * On systems that allow unordered memory access, it is possible that the value of jnl_seqno
-			   * as seen by source server is in the past compared to read_jnl_seqno - source server in
-			   * keeping up with updaters reads (from pool) and sends upto write_addr, the last transaction
-			   * of which could be jnl_seqno + 1. To cover the case, we use >= in the above comparison.
-			   * Given this, we may return with "nothing to read" even though we fell through from the READ_POOL case.
-			   */
-				*data_len = 0;
-				return 0;
-			}
-			if (gtmsource_pool2file_transition /* read_pool -> read_file transition */
-			    || NULL == repl_ctl_list) /* files not opened */
-			{
-				/* Close all the file read related structures
-				 * and start afresh. The idea here is that
-				 * most of the file read info might be stale
-				 * 'cos there is usually a long gap between
-				 * pool to file read transitions (in
-				 * production environments). So, start afresh
-				 * with the latest generation journal files.
-				 * This will also prevent opening previous
-				 * generations that may not be required.
-				 */
-				REPL_DPRINT1("Pool to File read transition. Closing all the stale file read info and starting "
-					     "afresh\n");
-				gtmsource_ctl_close();
-				gtmsource_ctl_init();
-				gtmsource_pool2file_transition = FALSE;
-			}
-			if (0 < (total_tr_len = gtmsource_readfiles(buff, data_len, maxbufflen, read_multpile)))
-				return (total_tr_len);
-			if (0 < *data_len)
-				return (-1);
-			GTMASSERT;
-	}
-}
diff --git a/sr_vvms/gtmsource_readfiles.c b/sr_vvms/gtmsource_readfiles.c
deleted file mode 100644
index f15712f..0000000
--- a/sr_vvms/gtmsource_readfiles.c
+++ /dev/null
@@ -1,1704 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <stddef.h>	/* for offsetof macro */
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include <ssdef.h>
-#include <rms.h>
-#include <devdef.h>
-#include <fab.h>
-#include <iodef.h>
-#include <nam.h>
-#include <rmsdef.h>
-#include <descrip.h> /* Required for gtmsource.h */
-#include <efndef.h>
-#include <secdef.h>
-#include "iosb_disk.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "jnl.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "repl_ctl.h"
-#include "repl_errno.h"
-#include "repl_dbg.h"
-#include "iosp.h"
-#include "gtm_stdio.h"
-#include "copy.h"
-#include "eintr_wrappers.h"
-#include "repl_sp.h"
-#include "is_file_identical.h"
-#include "repl_log.h"
-#include "min_max.h"
-#include "error.h"
-#include "repl_tr_good.h"
-
-#define LOG_WAIT_FOR_JNL_RECS_PERIOD	(10 * 1000) /* ms */
-#define LOG_WAIT_FOR_JNLOPEN_PERIOD	(10 * 1000) /* ms */
-
-#define LSEEK_ERR_STR		"Error in lseek"
-#define READ_ERR_STR		"Error in read"
-#define UNKNOWN_ERR_STR		"Error unknown"
-
-GBLREF	unsigned char		*gtmsource_tcombuff_start;
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	repl_ctl_element	*repl_ctl_list;
-GBLREF	seq_num			gtmsource_save_read_jnl_seqno;
-GBLREF	repl_msg_ptr_t		gtmsource_msgp;
-GBLREF	int			gtmsource_msgbufsiz;
-GBLREF	seq_num			seq_num_zero, seq_num_one;
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	FILE			*gtmsource_log_fp;
-
-error_def(ERR_JNLBADRECFMT);
-error_def(ERR_NOPREVLINK);
-error_def(ERR_REPLBRKNTRANS);
-error_def(ERR_REPLCOMM);
-error_def(ERR_REPLFILIOERR);
-error_def(ERR_TEXT);
-
-static	int4			num_tcom = -1;
-static	boolean_t		trans_read = FALSE;
-static	int			tot_tcom_len = 0;
-static	int			total_wait_for_jnl_recs = 0;
-static	int			total_wait_for_jnlopen = 0;
-static	unsigned char		*tcombuffp = NULL;
-
-static	int			adjust_buff_leaving_hdr(repl_buff_t *rb);
-static	tr_search_state_t	position_read(repl_ctl_element*, seq_num);
-static	int			read_regions(
-					unsigned char **buff, int *buff_avail,
-					boolean_t attempt_open_oldnew,
-					boolean_t *brkn_trans,
-					seq_num read_jnl_seqno);
-
-static	int			first_read(repl_ctl_element*);
-static	int			update_max_seqno_info(repl_ctl_element *ctl);
-static	int			scavenge_closed_jnl_files(seq_num ack_seqno);
-static	int			update_eof_addr(repl_ctl_element *ctl, int *eof_change);
-
-static	int repl_read_file(repl_buff_t *rb)
-{
-	repl_buff_desc 		*b;
-	repl_file_control_t	*fc;
-	int			nb;
-	sgmnt_addrs		*csa;
-	uint4			dskaddr;
-	uint4			read_less, status;
-	int			eof_change;
-	VMS_ONLY(
-		io_status_block_disk	iosb;
-		uint4		read_off;
-		uint4		extra_bytes;
-		sm_uc_ptr_t 	read_buff;
-		DEBUG_ONLY(unsigned char	verify_buff[DISK_BLOCK_SIZE];)
-	)
-
-	fc = rb->fc;
-	b = &rb->buff[rb->buffindex];
-	csa = &FILE_INFO(rb->backctl->reg)->s_addrs;
-	read_less = 0;
-	assert(b->readaddr >= b->recaddr);
-	assert(0 < b->buffremaining);
-	dskaddr = csa->jnl->jnl_buff->dskaddr;
-	if (!is_gdid_gdid_identical(&fc->id, JNL_GDID_PTR(csa)))
-	{
-		if (!rb->backctl->eof_addr_final)
-			update_eof_addr(rb->backctl, &eof_change); /* update possible change in end_of_data, re-read file header */
-		assert(!fc->jfh->crash);
-		dskaddr = fc->jfh->end_of_data;
-		if (0 == fc->jfh->prev_recov_end_of_data) /* file not virtually truncated by recover/rollback */
-			dskaddr += EOF_RECLEN;
-	}
-	/* Make sure we do not read beyond end of data in the journal file */
-	/* Note : This logic is always needed when journal file is pre-allocated.
-	 * With no pre-allocation, this logic is needed only when repl_read_file is called from
-	 * update_max_seqno_info -> repl_next. Specifically, this logic is needed till the existing
-	 * JRT_EOF record is completely overwritten and the file grows beyond its existing size.
-	 */
-	assert(b->readaddr <= dskaddr);
-	if (b->buffremaining > (dskaddr - b->readaddr))	/* note the ordering of the operands to take care of 4G overflow */
-	{
-		if (b->readaddr == dskaddr)
-		{
-			REPL_DPRINT3("READ FILE : Jnl file %s yet to grow from (or ends at) offset %u\n",
-					rb->backctl->jnl_fn, b->readaddr);
-			return (SS_NORMAL);
-		}
-		read_less = b->buffremaining - (dskaddr - b->readaddr);	/* explicit ordering to take care of 4G overflow */
-		REPL_DPRINT5("READ FILE : Racing with jnl file %s avoided. Read size reduced from %u to %u at offset %u\n",
-				rb->backctl->jnl_fn, b->buffremaining, b->buffremaining - read_less, b->readaddr);
-	}
-#ifdef UNIX
-	if (lseek(fc->fd, (off_t)b->readaddr, SEEK_SET) == (off_t)-1)
-	{
-		repl_errno = EREPL_JNLFILESEEK;
-		return (ERRNO);
-	}
-	READ_FILE(fc->fd, b->base + REPL_BLKSIZE(rb) - b->buffremaining, b->buffremaining - read_less, nb);
-	status = ERRNO;
-#elif defined(VMS)
-	nb = b->buffremaining - read_less; /* to be read */
-	read_off = ROUND_DOWN2(b->readaddr, DISK_BLOCK_SIZE); /* since read has to start at a disk block boundary */
-	extra_bytes = b->readaddr - read_off;
-	read_buff = b->base + REPL_BLKSIZE(rb) - b->buffremaining - extra_bytes;
-	DEBUG_ONLY(
-		if (0 != extra_bytes)
-			memcpy(verify_buff, read_buff, extra_bytes);
-		else;
-	)
-	assert(read_buff >= b->base);
-	status = sys$qiow(EFN$C_ENF, fc->fd, IO$_READVBLK, &iosb, 0, 0, read_buff, nb + extra_bytes,
-			  DIVIDE_ROUND_DOWN(read_off, DISK_BLOCK_SIZE) + 1, 0, 0, 0);
-	if (SYSCALL_SUCCESS(status) && ((SYSCALL_SUCCESS(status = iosb.cond)) || SS$_ENDOFFILE == status))
-	{
-		nb = iosb.length;	/* num bytes actually read */
-		nb -= extra_bytes;	/* that we are interested in */
-		if ((SS$_NORMAL == status && nb < b->buffremaining - read_less) || (0 >= nb))
-			GTMASSERT; /* we thought VMS wouldn't return less than what we requested for */
-		DEBUG_ONLY((0 != extra_bytes) ? assert(0 == memcmp(verify_buff, read_buff, extra_bytes)) : 0;)
-		status = SS$_NORMAL;
-	} else
-		nb = -1;
-#else
-#error Unsupported platform
-#endif
-	if (nb >= 0)
-	{
-		b->buffremaining -= nb;
-		b->readaddr += nb;
-		return (SS_NORMAL);
-	}
-	repl_errno = EREPL_JNLFILEREAD;
-	return (status);
-}
-
-static	int repl_next(repl_buff_t *rb)
-{
-	repl_buff_desc		*b;
-	int4			reclen;
-	jrec_suffix		*suffix;
-	uint4			maxreclen;
-	int			status, sav_buffremaining;
-	char			err_string[BUFSIZ];
-
-
-	b = &rb->buff[rb->buffindex];
-	b->recbuff += b->reclen; /* The next record */
-	b->recaddr += b->reclen;
-	if (b->recaddr == b->readaddr && b->buffremaining == 0)
-	{
-		/* Everything in this buffer processed */
-		b->recbuff = b->base;
-		b->reclen = 0;
-		b->buffremaining = REPL_BLKSIZE(rb);
-	}
-	if (b->recaddr == b->readaddr || b->reclen == 0)
-	{
-		sav_buffremaining = b->buffremaining;
-		if ((status = repl_read_file(rb)) == SS_NORMAL)
-		{
-			if (sav_buffremaining == b->buffremaining)
-			{
-				b->reclen = 0;
-				repl_errno = EREPL_JNLRECINCMPL;
-				return (repl_errno);
-			}
-		} else
-		{
-			if (repl_errno == EREPL_JNLFILESEEK)
-				MEMCPY_LIT(err_string, LSEEK_ERR_STR);
-			else if (repl_errno == EREPL_JNLFILEREAD)
-				MEMCPY_LIT(err_string, READ_ERR_STR);
-			else
-				MEMCPY_LIT(err_string, UNKNOWN_ERR_STR);
-			rts_error(VARLSTCNT(9) ERR_REPLFILIOERR, 2, rb->backctl->jnl_fn_len, rb->backctl->jnl_fn,
-			  	  ERR_TEXT, 2, LEN_AND_STR(err_string), status);
-		}
-	}
-	maxreclen = ((b->base + REPL_BLKSIZE(rb)) - b->recbuff) - b->buffremaining;
-	assert(maxreclen > 0);
-	if (maxreclen > JREC_PREFIX_UPTO_LEN_SIZE &&
-		(reclen = ((jrec_prefix *)b->recbuff)->forwptr) <= maxreclen &&
-		IS_VALID_JNLREC((jnl_record *)b->recbuff, rb->fc->jfh))
-	{
-		b->reclen = reclen;
-		return SS_NORMAL;
-	}
-	repl_errno = (maxreclen > JREC_PREFIX_SIZE && reclen <= maxreclen) ? EREPL_JNLRECFMT : EREPL_JNLRECINCMPL;
-	b->reclen = 0;
-	return repl_errno;
-}
-
-static int open_prev_gener(repl_ctl_element **old_ctl, repl_ctl_element *ctl, seq_num read_seqno)
-{
-
-	if (0 == ctl->repl_buff->fc->jfh->prev_jnl_file_name_length ||
-		 QWLE(ctl->repl_buff->fc->jfh->start_seqno, read_seqno))
-	{
-		/* No need to open previous generation, or no previous
-		 * generation */
-		REPL_DPRINT2("No need to open prev gener of %s or no prev gener\n", ctl->jnl_fn);
-		return (0);
-	}
-	repl_ctl_create(old_ctl, ctl->reg, ctl->repl_buff->fc->jfh->prev_jnl_file_name_length,
-			(char *)ctl->repl_buff->fc->jfh->prev_jnl_file_name, FALSE);
-	REPL_DPRINT2("Prev gener file %s opened\n", ctl->repl_buff->fc->jfh->prev_jnl_file_name);
-	(*old_ctl)->prev = ctl->prev;
-	(*old_ctl)->next = ctl;
-	(*old_ctl)->prev->next = *old_ctl;
-	(*old_ctl)->next->prev = *old_ctl;
-	first_read(*old_ctl);
-	if ((*old_ctl)->file_state == JNL_FILE_OPEN)
-	{
-		(*old_ctl)->file_state = JNL_FILE_CLOSED;
-		REPL_DPRINT2("open_prev_gener : %s jnl file marked closed\n", (*old_ctl)->jnl_fn);
-	} else if ((*old_ctl)->file_state == JNL_FILE_UNREAD)
-	{
-		(*old_ctl)->file_state = JNL_FILE_EMPTY;
-		REPL_DPRINT2("open_prev_gener :  %s jnl file marked empty\n", (*old_ctl)->jnl_fn);
-	} else
-		GTMASSERT;
-	return (1);
-}
-
-static	int open_newer_gener_jnlfiles(gd_region *reg, repl_ctl_element *reg_ctl_end)
-{
-	sgmnt_addrs		*csa;
-	repl_ctl_element	*new_ctl, *ctl;
-	ino_t			save_jnl_inode;
-	int			jnl_fn_len;
-	char			jnl_fn[JNL_NAME_SIZE];
-	int			nopen, n;
-	int			status;
-	gd_region		*r_save;
-	uint4			jnl_status;
-	boolean_t		do_jnl_ensure_open;
-	gd_id_ptr_t		reg_ctl_end_id;
-
-	/* Attempt to open newer generation journal files. Return the number of new files opened. Create new
-	 * ctl element(s) for each newer generation and attach at reg_ctl_end. Work backwards from the current journal file.
-	 */
-	jnl_status = 0;
-	nopen = 0;
-	csa = &FILE_INFO(reg)->s_addrs;
-	reg_ctl_end_id = &reg_ctl_end->repl_buff->fc->id;
-	/* Note that at this point, journaling might have been turned OFF (e.g. REPL_WAS_ON state) in which case
-	 * JNL_GDID_PTR(csa) would have been nullified by jnl_file_lost. Therefore comparing with that is not a good idea
-	 * to use the "id" to check if the journal file remains same (this was done previously). Instead use the ID of
-	 * the current reg_ctl_end and the NAME of the newly opened journal file. Because we dont have crit, we cannot
-	 * safely read the journal file name from the file header therefore we invoke repl_ctl_create unconditionally
-	 * (that has safety protections for crit) and use the new_ctl that it returns to access the journal file name
-	 * returned and use that for the ID to NAME comparison.
-	 */
-	jnl_fn_len = 0; jnl_fn[0] = '\0';
-	for (do_jnl_ensure_open = TRUE; ; do_jnl_ensure_open = FALSE)
-	{
-		repl_ctl_create(&new_ctl, reg, jnl_fn_len, jnl_fn, do_jnl_ensure_open);
-		if (do_jnl_ensure_open && is_gdid_file_identical(reg_ctl_end_id, new_ctl->jnl_fn, new_ctl->jnl_fn_len))
-		{	/* Current journal file in db file header has been ALREADY opened by source server. Return right away */
-			assert(0 == nopen);
-			repl_ctl_close(new_ctl);
-			return (nopen);
-		}
-		nopen++;
-		REPL_DPRINT2("Newer generation file %s opened\n", new_ctl->jnl_fn);
-		new_ctl->prev = reg_ctl_end;
-		new_ctl->next = reg_ctl_end->next;
-		if (new_ctl->next)
-			new_ctl->next->prev = new_ctl;
-		new_ctl->prev->next = new_ctl;
-		jnl_fn_len = new_ctl->repl_buff->fc->jfh->prev_jnl_file_name_length;
-		memcpy(jnl_fn, new_ctl->repl_buff->fc->jfh->prev_jnl_file_name, jnl_fn_len);
-		jnl_fn[jnl_fn_len] = '\0';
-		if ('\0' == jnl_fn[0])
-		{ /* prev link has been cut, can't follow path back from latest generation jnlfile to the latest we had opened */
-			rts_error(VARLSTCNT(4) ERR_NOPREVLINK, 2, new_ctl->jnl_fn_len, new_ctl->jnl_fn);
-		}
-		if (is_gdid_file_identical(&reg_ctl_end->repl_buff->fc->id, jnl_fn, jnl_fn_len))
-			break;
-	}
-	/* Name of the journal file corresponding to reg_ctl_end might have changed. Update the name.
-	 * Since inode info doesn't change when a file is renamed, it is not necessary to close and reopen the file.
-	 */
-	reg_ctl_end->jnl_fn[reg_ctl_end->jnl_fn_len] = '\0'; /* For safety */
-	jnl_fn[jnl_fn_len] = '\0';
-	if (strcmp(reg_ctl_end->jnl_fn, jnl_fn) != 0) /* Name has changed */
-	{
-		REPL_DPRINT3("Detected name change of %s to %s\n", reg_ctl_end->jnl_fn, jnl_fn);
-		reg_ctl_end->jnl_fn_len = reg_ctl_end->reg->jnl_file_len = jnl_fn_len;
-		memcpy(reg_ctl_end->jnl_fn, jnl_fn, jnl_fn_len);
-		memcpy(reg_ctl_end->reg->jnl_file_name, jnl_fn, jnl_fn_len);
-	}
-	/* Except the latest generation, mark the newly opened future generations CLOSED, or EMPTY.
-	 * We assume that when a new file is opened, the previous generation has been flushed to disk fully.
-	 */
-	for (ctl = reg_ctl_end, n = nopen; n; n--, ctl = ctl->next)
-	{
-		if (ctl->file_state == JNL_FILE_UNREAD)
-			first_read(ctl);
-		else if (ctl->file_state == JNL_FILE_OPEN)
-		{
-			if (update_max_seqno_info(ctl) != SS_NORMAL)
-			{
-				assert(repl_errno == EREPL_JNLEARLYEOF);
-				GTMASSERT; /* Program bug */
-			}
-		} else
-			GTMASSERT;
-		if (ctl->file_state == JNL_FILE_UNREAD)
-		{
-			ctl->file_state = JNL_FILE_EMPTY;
-			REPL_DPRINT2("Open_newer_gener_files : %s marked empty\n", ctl->jnl_fn);
-		} else
-		{
-			assert(ctl->file_state == JNL_FILE_OPEN);
-			ctl->file_state = JNL_FILE_CLOSED;
-			REPL_DPRINT2("Open_newer_gener_files : %s marked closed\n", ctl->jnl_fn);
-		}
-	}
-	return (nopen);
-}
-
-static	int update_eof_addr(repl_ctl_element *ctl, int *eof_change)
-{
-	repl_file_control_t	*fc;
-	uint4			prev_eof_addr, new_eof_addr;
-	int			status;
-	sgmnt_addrs		*csa;
-#ifdef VMS
-	short           	iosb[4];
-#endif
-	repl_buff_t		*rb;
-
-	assert(!ctl->eof_addr_final); /* The caller should invoke us ONLY if ctl->eof_addr_final is FALSE */
-	csa = &FILE_INFO(ctl->reg)->s_addrs;
-	rb = ctl->repl_buff;
-	fc = rb->fc;
-	prev_eof_addr = fc->eof_addr;
-	*eof_change = 0;
-	if (is_gdid_gdid_identical(&fc->id, JNL_GDID_PTR(csa)))
-	{
-		new_eof_addr = csa->jnl->jnl_buff->dskaddr;
-		REPL_DPRINT3("Update EOF : New EOF addr from SHM for %s is %u\n", ctl->jnl_fn, new_eof_addr);
-	} else
-	{
-		REPL_DPRINT2("Update EOF : New EOF addr will be found from jnl file hdr for %s\n", ctl->jnl_fn);
-		UNIX_ONLY(
-			REPL_DPRINT4("Update EOF : FC ID IS %u %d %u\n", fc->id.inode, fc->id.device, fc->id.st_gen);
-			REPL_DPRINT4("Update EOF : csa->nl->jnl_file.u (unreliable) is %u %d %u\n", csa->nl->jnl_file.u.inode,
-					csa->nl->jnl_file.u.device,  csa->nl->jnl_file.u.st_gen);
-		)
-		if (!ctl->eof_addr_final)
-		{
-			F_READ_BLK_ALIGNED(fc->fd, 0, fc->jfh, REAL_JNL_HDR_LEN, status);
-			if (SS_NORMAL != status)
-				rts_error(VARLSTCNT(9) ERR_REPLFILIOERR, 2, ctl->jnl_fn_len, ctl->jnl_fn,
-						ERR_TEXT, 2, RTS_ERROR_LITERAL("Error in reading jfh in update_eof_addr"), status);
-			REPL_DPRINT2("Update EOF : Jnl file hdr refreshed from file for %s\n", ctl->jnl_fn);
-			ctl->eof_addr_final = TRUE; /* No more updates to fc->eof_addr for this journal file */
-		}
-		new_eof_addr = fc->jfh->end_of_data + EOF_RECLEN;
-		REPL_DPRINT3("Update EOF : New EOF addr from jfh for %s is %u\n", ctl->jnl_fn, new_eof_addr);
-	}
-	/* ensure that new_eof_addr is not less than prev_eof_addr.
-	 * the only scenario where this need not be TRUE is the following case
-	 * 	(i) if new_eof_addr == (journal file header's end_of_data + size of eof record) and
-	 *	(ii) if prev_eof_addr == the next REPL_BLKSIZE boundary (since source server reads in chunks of REPL_BLKSIZE)
-	 * in the above case, source server's read of REPL_BLKSIZE bytes while trying to read at offset end_of_data would
-	 * 	have succeeded since the whole REPL_BLKSIZE block has been allocated in the journal file both in Unix and VMS.
-	 * but only the first EOF_RECLEN bytes of that block is valid data.
-	 * For the case new_eof_addr < prev_eof_addr, the assert could have been
-	 * DIVIDE_ROUND_UP(prev_eof_addr, REPL_BLKSIZE(rb)) == DIVIDE_ROUND_UP(new_eof_addr, REPL_BLKSIZE(rb)), but we use
-	 * DIVIDE_ROUND_DOWN and account for prev_eof_addr being an exact multiple of REPL_BLKSIZE(rb) to avoid 4G overflow
-	 */
-	assert((new_eof_addr >= prev_eof_addr)
-		|| (DIVIDE_ROUND_DOWN(prev_eof_addr, REPL_BLKSIZE(rb)) - ((0 == prev_eof_addr % REPL_BLKSIZE(rb)) ? 1 : 0)
-		    == DIVIDE_ROUND_DOWN(new_eof_addr, REPL_BLKSIZE(rb))));
-	fc->eof_addr = new_eof_addr;
-	/* eof_change calculated below is not used anywhere. In case it needs to be used, the below calculation
-	 * 	has to be reexamined in light of the above assert involving new_eof_addr and prev_eof_addr
-	 * although the code below is dead for now, it can be used for future performance enhancements.
-	 */
-	*eof_change = new_eof_addr > prev_eof_addr ? (int4)(new_eof_addr - prev_eof_addr) : -(int4)(prev_eof_addr - new_eof_addr);
-		/* Above computation done that way because the variables involved are unsigned */
-	return (SS_NORMAL);
-}
-
-static	int force_file_read(repl_ctl_element *ctl)
-{	/* The journal file may have grown since we last read it. A previously read EOF record may have been over-written on disk.
-	 * Reposition read pointers so that a file read is forced if the current read pointers are positioned at a EOF record.
-	 */
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	repl_file_control_t	*fc;
-	enum jnl_record_type	rectype;
-
-	rb = ctl->repl_buff;
-	b = &rb->buff[REPL_MAINBUFF];
-	fc = rb->fc;
-	if (b->reclen == 0 || b->recaddr == b->readaddr || b->buffremaining == 0 || b->buffremaining == REPL_BLKSIZE(rb))
-	{	/* A file read will be forced anyway */
-		return (SS_NORMAL);
-	}
-	/* b->recbuff points to valid record */
-	rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-	assert(rectype > JRT_BAD && rectype <= JRT_RECTYPES);
-	if (rectype != JRT_EOF) /* Can't be stale */
-		return (SS_NORMAL);
-	assert(b->reclen == EOF_RECLEN);
-	assert(b->readaddr - b->recaddr >= EOF_RECLEN);
-	b->buffremaining += (b->readaddr - b->recaddr);
-	b->readaddr = b->recaddr;
-	b->reclen = 0;
-	return (SS_NORMAL);
-}
-
-static	int update_max_seqno_info(repl_ctl_element *ctl)
-{	/* The information in ctl is outdated. The journal file has grown. Update max_seqno and its dskaddr */
-	int 			eof_change;
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	repl_file_control_t	*fc;
-	uint4			dskread, stop_at;
-	boolean_t		max_seqno_found;
-	uint4			max_seqno_addr;
-	seq_num			max_seqno, reg_seqno;
-	int			status;
-	enum jnl_record_type	rectype;
-	gd_region		*reg;
-	sgmnt_addrs		*csa;
-
-	assert(ctl->file_state == JNL_FILE_OPEN);
-
-	rb = ctl->repl_buff;
-	fc = rb->fc;
-	reg = ctl->reg;
-	csa = &FILE_INFO(reg)->s_addrs;
-	if (!ctl->eof_addr_final)
-		update_eof_addr(ctl, &eof_change);
-#	ifdef GTMSOURCE_SKIP_DSKREAD_WHEN_NO_EOF_CHANGE
-	/* This piece of code needs some more testing - Vinaya 03/11/98 */
-	if ((0 == eof_change) && ctl->first_read_done)
-	{
-		REPL_DPRINT2("UPDATE MAX SEQNO INFO: No change in EOF addr. Skipping disk read for %s\n", ctl->jnl_fn);
-		return (SS_NORMAL);
-	}
-#	endif
-	if (fc->eof_addr == JNL_FILE_FIRST_RECORD)
-	{
-		repl_errno = EREPL_JNLEARLYEOF;
-		return (repl_errno);
-	}
-	QWASSIGN(reg_seqno, csa->hdr->reg_seqno);
-	QWDECRBYDW(reg_seqno, 1);
-	assert(!ctl->max_seqno_final || ctl->eof_addr_final);
- 	if (QWGE(ctl->max_seqno, reg_seqno) || (ctl->max_seqno_final && ctl->first_read_done))
- 	{	/* have searched already */
- 		REPL_DPRINT4("UPDATE MAX SEQNO INFO : not reading file %s; max_seqno = "INT8_FMT", reg_seqno = "INT8_FMT"\n",
- 			     ctl->jnl_fn, INT8_PRINT(ctl->max_seqno), INT8_PRINT(reg_seqno));
- 		return (SS_NORMAL);
- 	}
-	rb->buffindex = REPL_SCRATCHBUFF;	/* temporarily set to scratch buffer */
-	b = &rb->buff[rb->buffindex];
-	dskread = ROUND_DOWN(fc->eof_addr, REPL_BLKSIZE(rb));
-	if (dskread == fc->eof_addr)
-		dskread -= REPL_BLKSIZE(rb);
-	QWASSIGN(max_seqno, seq_num_zero);
-	max_seqno_addr = 0;
-	max_seqno_found = FALSE;
-	do
-	{
-		/* Ignore the existing contents of scratch buffer */
-		b->buffremaining = REPL_BLKSIZE(rb);
-		b->recbuff = b->base;
-		b->reclen = 0;
-		b->readaddr = b->recaddr = JNL_BLK_DSKADDR(dskread, REPL_BLKSIZE(rb));
-		if (b->readaddr == JNL_FILE_FIRST_RECORD && adjust_buff_leaving_hdr(rb) != SS_NORMAL)
-		{
-			assert(repl_errno == EREPL_BUFFNOTFRESH);
-			GTMASSERT; /* Program bug */
-		}
-		stop_at = dskread + MIN(REPL_BLKSIZE(rb), fc->eof_addr - dskread); /* Limit search to this block */
-		/* If we don't limit the search, we may end up re-reading blocks that follow this block. The consequence of
-		 * limiting the search is that we may not find the maximum close to the current state, but some time in the past
-		 * for a file that is growing. We can live with that as we will redo the max search if necessary */
-		assert(stop_at > dskread);
-		while (b->reclen < stop_at - b->recaddr)
-		{
-			if ((status = repl_next(rb)) == SS_NORMAL)
-			{
-				rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-				if (IS_REPLICATED(rectype))
-				{
-					QWASSIGN(max_seqno, GET_JNL_SEQNO(b->recbuff));
-					max_seqno_addr = b->recaddr;
-				} else if (rectype == JRT_EOF)
-					break;
-			} else if (status == EREPL_JNLRECINCMPL)
-			{ /* it is possible to get this return value if jb->dskaddr is in the middle of a journal record */
-				break;
-			} else
-			{
-				if (status == EREPL_JNLRECFMT)
-					rts_error(VARLSTCNT(5) ERR_JNLBADRECFMT, 3, ctl->jnl_fn_len, ctl->jnl_fn, b->recaddr);
-				else
-					GTMASSERT;
-			}
-		}
-		if ((max_seqno_found = (0 != max_seqno)) || (0 == dskread))
-			break;
-		dskread -= REPL_BLKSIZE(rb);
-	} while (TRUE);
-	rb->buffindex = REPL_MAINBUFF;	/* reset back to the main buffer */
-	if (max_seqno_found)
-	{
-		QWASSIGN(ctl->max_seqno, max_seqno);
-		ctl->max_seqno_dskaddr = max_seqno_addr;
-		if (ctl->eof_addr_final)
-			ctl->max_seqno_final = TRUE; /* No more max_seqno updates as this journal file has switched */
-		return (SS_NORMAL);
-	}
-	/* dskread == 0 */
-	repl_errno = EREPL_JNLEARLYEOF;
-	return (repl_errno);
-}
-
-static 	int adjust_buff_leaving_hdr(repl_buff_t *rb)
-{	/* The first alignsize bytes to be read from jnl file. Adjust fields in rb->buff[rb->buffindex] to skip jnl file header */
-	repl_buff_desc	*b;
-
-	if (REPL_BLKSIZE(rb) <= JNL_FILE_FIRST_RECORD)
-		return (SS_NORMAL);
-	b = &rb->buff[rb->buffindex];
-	if (b->buffremaining < REPL_BLKSIZE(rb))
-	{
-		repl_errno = EREPL_BUFFNOTFRESH;
-		return (repl_errno);
-	}
-	memset(b->base, 0, JNL_FILE_FIRST_RECORD);
-	b->recbuff = b->base + JNL_FILE_FIRST_RECORD;
-	b->reclen = 0;
-	b->recaddr = b->readaddr = JNL_FILE_FIRST_RECORD;
-	b->buffremaining -= JNL_FILE_FIRST_RECORD;
-	return (SS_NORMAL);
-}
-
-static	int first_read(repl_ctl_element *ctl)
-{	/* The first read from this generation of the journal file. Find the min_seqno, max_seqno.
-	 * If EOF is found while searching for min_seqno, or, nothing could be read from this file,
-	 * this is an empty journal file, probably will be written to later.
-	 * Position the next read at min_seqno. Update the max_seqno_info.
-	 */
-
-	int 			status, eof_change;
-	enum jnl_record_type	rectype;
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	repl_file_control_t	*fc;
-	boolean_t		min_seqno_found;
-	unsigned char		seq_num_str[32], *seq_num_ptr;  /* INT8_PRINT */
-
-	rb = ctl->repl_buff;
-	assert(rb->buffindex == REPL_MAINBUFF);
-	b = &rb->buff[rb->buffindex];
-	fc = rb->fc;
-	/* Ignore the existing contents of the buffer */
-	b->buffremaining = REPL_BLKSIZE(rb);
-	b->recbuff = b->base;
-	b->reclen = 0;
-	b->readaddr = JNL_FILE_FIRST_RECORD;
-	b->recaddr = JNL_FILE_FIRST_RECORD;
-	if (adjust_buff_leaving_hdr(rb) != SS_NORMAL)
-	{
-		assert(repl_errno == EREPL_BUFFNOTFRESH);
-		GTMASSERT; /* Program bug */
-	}
-	min_seqno_found = FALSE;
-	while (!min_seqno_found)
-	{
-		if ((status = repl_next(rb)) == SS_NORMAL)
-		{
-			rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-			if (IS_REPLICATED(rectype))
-			{
-				QWASSIGN(ctl->min_seqno, GET_JNL_SEQNO(b->recbuff));
-				QWASSIGN(ctl->seqno, ctl->min_seqno);
-				ctl->tn = ((jrec_prefix *)b->recbuff)->tn;
-				QWASSIGN(ctl->max_seqno, ctl->min_seqno);
-				ctl->min_seqno_dskaddr = ctl->max_seqno_dskaddr = b->recaddr;
-				ctl->file_state = JNL_FILE_OPEN;
-				min_seqno_found = TRUE;
-			} else if (rectype == JRT_EOF)
-			{
-				ctl->first_read_done = TRUE;
-				REPL_DPRINT2("JRT_EOF read when looking for first replication record. Empty file %s\n",
-						ctl->jnl_fn);
-				return (SS_NORMAL);
-			}
-		} else if (status == EREPL_JNLRECINCMPL) /* Nothing read */
-		{
-			ctl->first_read_done = TRUE;
-			REPL_DPRINT2("Nothing read when looking for first replication record. Empty file %s\n", ctl->jnl_fn);
-			return (SS_NORMAL);
-		} else
-		{
-			if (status == EREPL_JNLRECFMT)
-				rts_error(VARLSTCNT(5) ERR_JNLBADRECFMT, 3, ctl->jnl_fn_len, ctl->jnl_fn, b->recaddr);
-		}
-	}
-	REPL_DPRINT5("FIRST READ of %s - Min seqno "INT8_FMT" min_seqno_dskaddr %u EOF addr %u\n",
-			ctl->jnl_fn, INT8_PRINT(ctl->min_seqno), ctl->min_seqno_dskaddr, ctl->repl_buff->fc->eof_addr);
-	if (update_max_seqno_info(ctl) != SS_NORMAL)
-	{
-		assert(repl_errno == EREPL_JNLEARLYEOF);
-		GTMASSERT; /* Program bug */
-	}
-	REPL_DPRINT5("FIRST READ of %s - Max seqno "INT8_FMT" max_seqno_dskaddr %u EOF addr %d\n",
-			ctl->jnl_fn, INT8_PRINT(ctl->max_seqno), ctl->max_seqno_dskaddr, ctl->repl_buff->fc->eof_addr);
-	ctl->first_read_done = TRUE;
-	return (SS_NORMAL);
-}
-
-static void increase_buffer(unsigned char **buff, int *buflen, int buffer_needed)
-{
-	int 		newbuffsize, alloc_status;
-	unsigned char	*old_msgp;
-
-	/* The tr size is not known apriori. Hence, a good guess of 1.5 times the current buffer space is used */
-	newbuffsize = gtmsource_msgbufsiz + (gtmsource_msgbufsiz >> 1);
-	if (buffer_needed > newbuffsize)
-		newbuffsize = buffer_needed;
-	REPL_DPRINT3("Buff space shortage. Attempting to increase buff space. Curr buff space %d. Attempt increase to atleast %d\n",
-		     gtmsource_msgbufsiz, newbuffsize);
-	old_msgp = (unsigned char *)gtmsource_msgp;
-	if ((alloc_status = gtmsource_alloc_msgbuff(newbuffsize)) != SS_NORMAL)
-	{
-		rts_error(VARLSTCNT(7) ERR_REPLCOMM, 0, ERR_TEXT, 2,
-			  LEN_AND_LIT("Error extending buffer space while reading files. Malloc error"), alloc_status);
-	}
-	*buff = (unsigned char *)gtmsource_msgp + (*buff - old_msgp);
-	*buflen = gtmsource_msgbufsiz - (*buff - (unsigned char *)gtmsource_msgp);
-	return;
-}
-
-static	int read_transaction(repl_ctl_element *ctl, unsigned char **buff, int *bufsiz, seq_num read_jnl_seqno)
-{	/* Read the transaction ctl->seqno into buff. Position the next read at the next seqno in the journal file.
-	 * Update max_seqno if necessary.  If read of the next seqno blocks, leave the read buffers as is.
-	 * The next time when this journal file is accessed the read will move forward.
-	 */
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	repl_file_control_t	*fc;
-	int			readlen;
-	seq_num			rec_jnl_seqno;
-	enum jnl_record_type	rectype;
-	int			status;
-	seq_num			read_seqno;
-	unsigned char		*seq_num_ptr, seq_num_str[32]; /* INT8_PRINT */
-
-	rb = ctl->repl_buff;
-	assert(rb->buffindex == REPL_MAINBUFF);
-	b = &rb->buff[rb->buffindex];
-	fc = rb->fc;
-	ctl->read_complete = FALSE;
-	readlen = 0;
-	assert(0 != b->reclen);
-	if (b->reclen > *bufsiz)
-		increase_buffer(buff, bufsiz, b->reclen);
-	assert(b->reclen <= *bufsiz);
-	memcpy(*buff, b->recbuff, b->reclen);
-	*buff += b->reclen;
-	readlen += b->reclen;
-	*bufsiz -= b->reclen;
-	rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-	assert(IS_REPLICATED(rectype));
-	rec_jnl_seqno = GET_REPL_JNL_SEQNO(b->recbuff);
-	assert(QWEQ(rec_jnl_seqno, ctl->seqno));
-	if (QWGT(rec_jnl_seqno, ctl->max_seqno))
-	{
-		QWASSIGN(ctl->max_seqno, rec_jnl_seqno);
-		ctl->max_seqno_dskaddr = b->recaddr;
-	}
-	ctl->tn = ((jrec_prefix *)b->recbuff)->tn;
-	if (!IS_FENCED(rectype) || JRT_NULL == rectype)
-	{	/* Entire transaction done */
-		ctl->read_complete = TRUE;
-		trans_read = TRUE;
-	} else
-	{
-		assert(IS_TUPD(rectype) || IS_FUPD(rectype)); /* The first record should be the beginning of a transaction */
-	}
-	/* Suggested optimisation : Instead of waiting for all records pertaining to this transaction to
-	 * be written to the journal file, read those available, mark this file BLOCKED, read other journal
-	 * files, and come back to this journal file later.
-	 */
-	while (!ctl->read_complete) /* Read the rest of the transaction */
-	{
-		if ((status = repl_next(rb)) == SS_NORMAL)
-		{
-			rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-			if (IS_REPLICATED(rectype))
-			{
-				if (b->reclen > *bufsiz)
-					increase_buffer(buff, bufsiz, b->reclen);
-				assert(b->reclen <= *bufsiz);
-				if (rectype != JRT_TCOM && rectype != JRT_ZTCOM)
-				{
-					memcpy(*buff, b->recbuff, b->reclen);
-					*buff += b->reclen;
-					readlen += b->reclen;
-				} else
-				{
-					memcpy(tcombuffp, b->recbuff, b->reclen);
-					tcombuffp += b->reclen;
-					tot_tcom_len += b->reclen;
-					/* End of transaction in this file */
-					ctl->read_complete = TRUE;
-					if (num_tcom == -1)
-						num_tcom = ((jnl_record *)b->recbuff)->jrec_tcom.num_participants;
-					num_tcom--;
-					if (num_tcom == 0) /* Read the whole trans */
-						trans_read = TRUE;
-				}
-				*bufsiz -= b->reclen;
-				QWASSIGN(rec_jnl_seqno, GET_JNL_SEQNO(b->recbuff));
-				assert(QWEQ(rec_jnl_seqno, ctl->seqno));
-				if (QWGT(rec_jnl_seqno, ctl->max_seqno))
-				{
-					QWASSIGN(ctl->max_seqno, rec_jnl_seqno);
-					ctl->max_seqno_dskaddr = b->recaddr;
-				}
-				ctl->tn = ((jrec_prefix *)b->recbuff)->tn;
-			} else if (rectype == JRT_EOF)
-				{
-					assert(FALSE);
-					rts_error(VARLSTCNT(7) ERR_REPLBRKNTRANS, 1, &read_jnl_seqno,
-						ERR_TEXT, 2, RTS_ERROR_LITERAL("Early EOF found"));
-				}
-		} else if (status == EREPL_JNLRECINCMPL)
-		{	/* Log warning message for every certain number of attempts. There might have been a crash
-			 * and the file might have been corrupted. The file possibly might never grow.
-			 * Such cases have to be detected and attempt to read such files aborted.
-			 */
-			gtmsource_poll_actions(TRUE);
-			SHORT_SLEEP(GTMSOURCE_WAIT_FOR_JNL_RECS);
-			if ((total_wait_for_jnl_recs += GTMSOURCE_WAIT_FOR_JNL_RECS) % LOG_WAIT_FOR_JNL_RECS_PERIOD == 0)
-			{
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL_WARN : Source server waited %dms for journal record(s)"
-					 " to be written to journal file %s while attempting to read transaction "INT8_FMT". "
-					 "Check for problems with journaling\n", total_wait_for_jnl_recs, ctl->jnl_fn,
-					 INT8_PRINT(ctl->seqno));
-			}
-		} else
-		{
-			if (status == EREPL_JNLRECFMT)
-				rts_error(VARLSTCNT(5) ERR_JNLBADRECFMT, 3, ctl->jnl_fn_len, ctl->jnl_fn, b->recaddr);
-			else
-				GTMASSERT;
-		}
-	}
-	/* Try positioning next read to the next seqno. Leave it as is if operation blocks (has to wait for records) */
-	QWADD(read_seqno, ctl->seqno, seq_num_one);
-	position_read(ctl, read_seqno);
-	return (readlen);
-}
-
-static	tr_search_state_t do_linear_search(repl_ctl_element *ctl, uint4 lo_addr, uint4 max_readaddr, seq_num read_seqno,
-						tr_search_status_t *srch_status)
-{
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	seq_num			rec_jnl_seqno;
-	enum jnl_record_type	rectype;
-	tr_search_state_t	found;
-	int			status;
-
-	REPL_DPRINT5("do_linear_search: file : %s lo_addr : %u max_readaddr : %u read_seqno : %llu\n",
-			ctl->jnl_fn, lo_addr, max_readaddr, read_seqno);
-	assert(lo_addr < max_readaddr);
-	rb = ctl->repl_buff;
-	assert(rb->buffindex == REPL_MAINBUFF);
-	b = &rb->buff[rb->buffindex];
-	if (lo_addr != b->recaddr)
-	{ /* Initiate a fresh read */
-		lo_addr = ROUND_DOWN(lo_addr, REPL_BLKSIZE(rb));
-		b->recaddr = b->readaddr = JNL_BLK_DSKADDR(lo_addr, REPL_BLKSIZE(rb));
-		b->recbuff = b->base;
-		b->reclen = 0;
-		b->buffremaining = REPL_BLKSIZE(rb);
-		if (b->readaddr == JNL_FILE_FIRST_RECORD && adjust_buff_leaving_hdr(rb) != SS_NORMAL)
-		{
-			assert(repl_errno == EREPL_BUFFNOTFRESH);
-			GTMASSERT;	/* Program bug */
-		}
-		REPL_DPRINT1("do_linear_search: initiating fresh read\n");
-	} else
-	{ /* use what has been read already */
-		assert(read_seqno != ctl->seqno); /* if not, we'll skip to the next transaction and declare read_seqno not found */
-	}
-	found = TR_NOT_FOUND;
-	srch_status->prev_seqno = srch_status->seqno = 0;
-	while (found == TR_NOT_FOUND && b->reclen < max_readaddr - b->recaddr)
-	{
-		if ((status = repl_next(rb)) == SS_NORMAL)
-		{
-			rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-			if (IS_REPLICATED(rectype))
-			{
-				rec_jnl_seqno = GET_JNL_SEQNO(b->recbuff);
-				if (srch_status->seqno == 0 || srch_status->seqno != rec_jnl_seqno)
-				{ /* change srch_status only when records of different transactions are encountered */
-					srch_status->prev_seqno = srch_status->seqno;
-					srch_status->seqno = rec_jnl_seqno;
-				}
-				if (QWLT(ctl->max_seqno, rec_jnl_seqno))
-				{
-					QWASSIGN(ctl->max_seqno, rec_jnl_seqno);
-					ctl->max_seqno_dskaddr = b->recaddr;
-				}
-				QWASSIGN(ctl->seqno, rec_jnl_seqno);
-				ctl->tn = ((jrec_prefix *)b->recbuff)->tn;
-				if (QWEQ(rec_jnl_seqno, read_seqno))
-					found = TR_FOUND;
-				else if (QWGT(rec_jnl_seqno, read_seqno))
-					found = TR_WILL_NOT_BE_FOUND;
-			} else if (rectype == JRT_EOF)
-				found = TR_WILL_NOT_BE_FOUND;
-		} else if (status == EREPL_JNLRECINCMPL)
-			found = TR_FIND_WOULD_BLOCK;
-		else if (status == EREPL_JNLRECFMT)
-			rts_error(VARLSTCNT(5) ERR_JNLBADRECFMT, 3, ctl->jnl_fn_len, ctl->jnl_fn, b->recaddr);
-	}
-	REPL_DPRINT2("do_linear_search: returning %s\n", (found == TR_NOT_FOUND) ? "TR_NOT_FOUND" :
-							 (found == TR_FOUND) ? "TR_FOUND" :
-							 (found == TR_WILL_NOT_BE_FOUND) ? "TR_WILL_NOT_BE_FOUND" :
-							 (found == TR_FIND_WOULD_BLOCK) ? "TR_FIND_WOULD_BLOCK" :
-							 "*UNKNOWN RETURN CODE*");
-	return (found);
-}
-
-static	tr_search_state_t do_binary_search(repl_ctl_element *ctl, uint4 lo_addr, uint4 hi_addr, seq_num read_seqno,
-						tr_search_status_t *srch_status)
-{
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	repl_file_control_t	*fc;
-	tr_search_state_t	found;
-	uint4			low, high, mid, new_mid, mid_further, stop_at;
-	uint4			srch_half_lo_addr, srch_half_hi_addr, othr_half_lo_addr, othr_half_hi_addr;
-	uint4			hi_addr_mod, hi_addr_diff, mid_mod, mid_diff;
-	uint4			willnotbefound_addr = 0, willnotbefound_stop_at = 0;
-	int			iter, max_iter;
-	enum jnl_record_type	rectype;
-	boolean_t		search_complete = FALSE;
-
-	REPL_DPRINT5("do_binary_search: file : %s lo_addr : %u hi_addr : %u read_seqno : %llu\n",
-			ctl->jnl_fn, lo_addr, hi_addr, read_seqno);
-	if (lo_addr > hi_addr)
-	{
-		REPL_DPRINT1("do_binary_search: lower limit is larger than upper limit, search not initiated\n");
-		return TR_NOT_FOUND;
-	}
-	rb = ctl->repl_buff;
-	assert(rb->buffindex == REPL_MAINBUFF);
-	b = &rb->buff[rb->buffindex];
-	fc = rb->fc;
-	assert(lo_addr <  fc->eof_addr);
-	assert(hi_addr <= fc->eof_addr);
-	assert(lo_addr <= hi_addr);
-	low = ROUND_DOWN(lo_addr, REPL_BLKSIZE(rb));
-	if (0 == (hi_addr_mod = hi_addr % REPL_BLKSIZE(rb)))
-		hi_addr_mod = REPL_BLKSIZE(rb); /* avoid including additional block if already aligned */
-	hi_addr_diff = fc->eof_addr - hi_addr;
-	high = hi_addr + MIN(REPL_BLKSIZE(rb) - hi_addr_mod, hi_addr_diff);
-	for (found = TR_NOT_FOUND, mid = ROUND_DOWN((low >> 1) + (high >> 1), REPL_BLKSIZE(rb)); ; )
-	{
-		mid_mod = mid % REPL_BLKSIZE(rb);
-		mid_diff = fc->eof_addr - mid;
-		assert(0 != mid_diff);
-		stop_at = mid + MIN(REPL_BLKSIZE(rb) - mid_mod, mid_diff);
-		/* Note that for high values of journal-alignsize (which is what REPL_BLKSIZE macro expands to), it is
-		 * possible that stop_at is GREATER than high. Since it is not necessary to search any further than high,
-		 * limit it accordingly before calling the linear search.
-		 */
-		found = do_linear_search(ctl, mid, MIN(stop_at, high), read_seqno, srch_status);
-		assert(srch_status->seqno == 0 || srch_status->seqno == ctl->seqno);
-		switch (found)
-		{
-			case TR_FOUND:
-				rectype = ((jrec_prefix *)b->recbuff)->jrec_type;
-				if (!IS_FENCED(rectype) || IS_TUPD(rectype) || IS_FUPD(rectype) || JRT_NULL == rectype)
-				{
-					REPL_DPRINT4("do_binary_search: found %llu at %u in %s\n", read_seqno, b->recaddr,
-							ctl->jnl_fn);
-					return found;
-				}
-				assert(b->recaddr >= REPL_BLKSIZE(rb)); /* cannot have trailing records of a tr in first block */
-				low = ((b->recaddr > REPL_BLKSIZE(rb)) ?
-					ROUND_DOWN(b->recaddr - REPL_BLKSIZE(rb), REPL_BLKSIZE(rb)) : 0);
-				high = ROUND_DOWN(b->recaddr, REPL_BLKSIZE(rb));
-				REPL_DPRINT5("do_binary_search: found record of type %d with seqno %llu at %u in %s\n",
-						rectype, read_seqno, b->recaddr, ctl->jnl_fn);
-				REPL_DPRINT3("do_binary_search: will back off and search for beginning of transaction, changing "
-						"low to %u high to %u\n", low, high);
-				break;
-			case TR_NOT_FOUND:
-				assert(b->readaddr == stop_at);
-				if (srch_status->seqno != 0)
-				{ /* at least one replicated record found in block */
-					assert(read_seqno > srch_status->seqno);
-					low = stop_at; /* search in the upper half */
-					REPL_DPRINT5("do_binary_search: could not find %llu in block %u, last seen replicated "
-							"record has seqno %llu changing low to %u\n", read_seqno, mid,
-							srch_status->seqno, low);
-				} else
-				{ /* no replicated record found in block */
-					assert(srch_status->prev_seqno == 0); /* must hold if no replicated record found */
-					REPL_DPRINT3("do_binary_search: could not find %llu, no replicated record in block %u, "
-							"searching lower half", read_seqno, mid);
-					if (low < mid) /* seach lower half recursively */
-						found = do_binary_search(ctl, low, mid, read_seqno, srch_status);
-					else
-					{
-						REPL_DPRINT4("do_binary_search: all blocks searched in lower half search, "
-								"seqno %llu not found, low %u high %u\n", read_seqno, low, mid);
-					}
-					if (found == TR_NOT_FOUND && stop_at < high) /* search upper half recursively */
-						found = do_binary_search(ctl, stop_at, high, read_seqno, srch_status);
-					else
-					{
-						REPL_DEBUG_ONLY(
-							if (found == TR_NOT_FOUND)
-							{
-								REPL_DPRINT4("do_binary_search: all blocks searched in upper half"
-									" search, seqno %llu not found, low %u high %u\n",
-									read_seqno, stop_at, high);
-							}
-						)
-					}
-					if (found != TR_NOT_FOUND)
-						return found;
-					search_complete = TRUE;
-				}
-				break;
-
-			case TR_WILL_NOT_BE_FOUND:
-				if (srch_status->seqno != 0 && read_seqno < srch_status->seqno)
-				{
-					if (srch_status->prev_seqno == 0)
-					{ /* first replicated record in block has larger seqno than read_seqno */
-						REPL_DPRINT5("do_binary_search: will not find %llu, first replicated record in "
-								"block %u has seqno %llu, changing high to %u\n", read_seqno, mid,
-								srch_status->seqno, mid);
-						willnotbefound_addr = mid;
-						willnotbefound_stop_at = stop_at;
-						high = mid; /* search in the lower half */
-					} else
-					{ /* at least two replicated records found, and the read_seqno is between the seqno
-					   * numbers of two records */
-						REPL_DPRINT5("do_binary_search: will not find %llu in block %u, last two seqnos are"
-								" %llu and %llu, return WILL_NOT_BE_FOUND\n", read_seqno, mid,
-								srch_status->prev_seqno, srch_status->seqno);
-						assert(srch_status->prev_seqno < read_seqno);
-						return found; /* read_seqno is not in this journal file */
-					}
-				} else
-				{ /* found EOF record, read_seqno is not in this journal file */
-					REPL_DPRINT3("do_binary_search: will not find %llu in block %u, EOF found\n", read_seqno,
-							mid);
-					return found;
-				}
-				break;
-
-			case TR_FIND_WOULD_BLOCK:
-				assert(mid == ROUND_DOWN(high, REPL_BLKSIZE(rb))); /* must be the last block for this retval */
-				assert(ctl->file_state == JNL_FILE_OPEN || /* file that is yet to grow, or truncated file */
-					ctl->file_state == JNL_FILE_CLOSED && 0 != fc->jfh->prev_recov_end_of_data);
-				if (srch_status->seqno != 0)
-				{ /* journal flush yet to be done, or truncated file's end_of_data reached, can't locate seqno */
-					assert(read_seqno > srch_status->seqno);
-					REPL_DPRINT4("do_binary_search: find of %llu would block, last seqno %llu found in block "
-							"%u\n", read_seqno, srch_status->seqno, mid);
-					return (ctl->file_state == JNL_FILE_OPEN ? found : TR_WILL_NOT_BE_FOUND);
-				}
-				/* no replicated record found in the block, search in previous block(s) */
-				high = (high > REPL_BLKSIZE(rb)) ? high - REPL_BLKSIZE(rb) : 0;
-				REPL_DPRINT4("do_binary_search: find of %llu would block, no seqno found in block %u, "
-						"change high to %u\n", read_seqno, mid, high);
-				break;
-
-			default: /* Why didn't we cover all cases? */
-				GTMASSERT;
-		} /* end switch */
-		if (!search_complete && low < high)
-		{
-			new_mid = ROUND_DOWN((low >> 1) + (high >> 1), REPL_BLKSIZE(rb));
-			mid_further = (new_mid != mid) ? 0 : REPL_BLKSIZE(rb); /* if necessary, move further to avoid repeat */
-			if (high - new_mid > mid_further)
-			{
-				mid = new_mid + mid_further;
-				continue;
-			}
-		}
-		REPL_DPRINT6("do_binary_search: all blocks searched, seqno %llu not found, low %u high %u mid %u mid_further %u\n",
-				read_seqno, low, high, mid, mid_further);
-		assert(found != TR_FOUND);
-		/* done searching all blocks between lo_addr and hi_addr */
-		if (found == TR_NOT_FOUND && 0 != willnotbefound_addr)
-		{ /* There is a block that contains a seqno larger than read_seqno; leave ctl positioned at that seqno.
-		   * If we don't do this, we may repeat binary search (wastefully) for all seqnos between read_seqno and
-		   * the least seqno larger than read_seqno in this file.
-		   */
-			found = do_linear_search(ctl, willnotbefound_addr, willnotbefound_stop_at, read_seqno, srch_status);
-			REPL_DPRINT4("do_binary_search: position at seqno %llu in block [%u, %u)\n", srch_status->seqno,
-					willnotbefound_addr, willnotbefound_stop_at);
-			assert(found == TR_WILL_NOT_BE_FOUND);
-			assert(read_seqno < ctl->seqno);
-		}
-		return found;
-	} /* end for */
-}
-
-static	tr_search_state_t position_read(repl_ctl_element *ctl, seq_num read_seqno)
-{
-	repl_buff_t		*rb;
-	repl_buff_desc		*b;
-	uint4			lo_addr, hi_addr;
-	tr_search_state_t	found, (*srch_func)();
-	tr_search_status_t	srch_status;
-	uint4			willnotbefound_addr = 0, willnotbefound_stop_at = 0;
-	int			eof_change;
-	DEBUG_ONLY(jnl_record	*jrec;)
-	DEBUG_ONLY(enum jnl_record_type	rectype;)
-
-	/* Position read pointers so that the next read should get the first journal record with JNL_SEQNO atleast read_seqno.
-	 * Do a search between min_seqno and seqno if read_seqno < ctl->seqno; else search from ctl->seqno onwards.
-	 * If ctl->seqno > ctl->max_seqno update max_seqno as you move, else search between ctl->seqno and ctl->max_seqno.
-	 * We want to do a binary search here.
-	 */
-
-	/* If the receiver disconnects while we were previously in the read-file mode and later reconnects requesting a
-	 * particular sequence number, it is possible that we can have an out-of-date fc->eof_addr as fc->eof_addr is not
-	 * frequently updated. But, now that we will be searching for the sequence number (either with binary or linear
-	 * search) update the fc->eof_addr unconditionally. This is considered okay since the update_eof_addr function
-	 * is a almost always a light weight function (with the only exception being the case when the jnl file source
-	 * server is interested in is not the latest generation file then it could end up reading the journal file header
-	 * from disk but that too it does only once per older generation journal file so it is okay)
-	 */
-	if (!ctl->eof_addr_final)
-		update_eof_addr(ctl, &eof_change);
-	/* Validate the range; if called from read_transaction(), it is possible that we are looking out of range, but
-	 * we clearly can identify such a case */
-	assert(ctl->min_seqno <= read_seqno);
-	assert(read_seqno <= ctl->max_seqno || read_seqno == ctl->seqno + 1);
-	rb = ctl->repl_buff;
-	assert(REPL_MAINBUFF == rb->buffindex);
-	b = &rb->buff[rb->buffindex];
-	/* looking up something we read already? */
-	assert(read_seqno != ctl->seqno || read_seqno == ctl->min_seqno || read_seqno == ctl->max_seqno || ctl->lookback);
-	srch_func = do_binary_search;
-	if (read_seqno > ctl->seqno)
-	{
-		if (read_seqno == ctl->seqno + 1)
-		{ /* trying to position to next seqno or the max, better to do linear search */
-			srch_func = do_linear_search;
-			lo_addr = b->recaddr;
-			hi_addr = MAXUINT4;
-		} else if (read_seqno < ctl->max_seqno)
-		{
-			lo_addr = b->recaddr;
-			hi_addr = ctl->max_seqno_dskaddr;
-			/* Since we know that read_seqno is LESSER than ctl->max_seqno, we know for sure we should not return
-			 * this function with found = TR_NOT_FOUND. If ever the binary/linear search invocation at the end of
-			 * this function returns with TR_NOT_FOUND, we have to change that to TR_WILL_NOT_BE_FOUND and also
-			 * adjust ctl->seqno to point to ctl->max_seqno that way we dont repeat binary search (wastefully) for
-			 * all seqnos between read_seqno and the least seqno larger than read_seqno in this file.
-			 */
-			willnotbefound_addr = hi_addr;
-			assert(ctl->max_seqno_dskaddr < rb->fc->eof_addr);
-			willnotbefound_stop_at = rb->fc->eof_addr;
-		} else if (read_seqno == ctl->max_seqno)
-		{	/* For read_seqno == ctl->max_seqno, do not use linear search. Remember, max_seqno_dskaddr may be the
-			 * the address of the TCOM record of a transaction, and this TCOM record may be in a different block
-			 * than the block containing the first record of the transcation. To get it right, we may have to
-			 * back off to previous blocks. Well, do_binary_search() handles this condition. So, better we use binary
-			 * search. */
-			lo_addr = b->recaddr;
-			assert(ctl->max_seqno_dskaddr < rb->fc->eof_addr);
-			hi_addr = rb->fc->eof_addr;
-		} else /* read_seqno > ctl->max_seqno */
-		{
-			lo_addr = ctl->max_seqno_dskaddr;
-			hi_addr = rb->fc->eof_addr;
-		}
-	} else /* (read_seqno <= ctl->seqno) */
-	{
-		if (read_seqno != ctl->min_seqno)
-		{
-			lo_addr = ctl->min_seqno_dskaddr;
-			hi_addr = b->recaddr + b->reclen;
-		} else
-		{ /* trying to locate min, better to do linear search */
-			srch_func = do_linear_search;
-			lo_addr = ctl->min_seqno_dskaddr;
-			hi_addr = MAXUINT4;
-			if (read_seqno == ctl->seqno) /* we are positioned where we want to be, no need for read */
-			{
-				assert(lo_addr == b->recaddr);
-				assert(MIN_JNLREC_SIZE <= b->reclen);
-				DEBUG_ONLY(jrec = (jnl_record *)b->recbuff;)
-				DEBUG_ONLY(rectype = jrec->prefix.jrec_type;)
-				assert(b->reclen == jrec->prefix.forwptr);
-				assert(IS_VALID_JNLREC(jrec, rb->fc->jfh));
-				assert(IS_REPLICATED(rectype));
-				assert(!IS_FENCED(rectype) || IS_TUPD(rectype) || IS_FUPD(rectype) || JRT_NULL == rectype);
-				REPL_DPRINT3("position_read: special case, read %llu is same as min in %s, returning TR_FOUND\n",
-						read_seqno, ctl->jnl_fn);
-				return TR_FOUND;
-			}
-		}
-	}
-#if defined(GTMSOURCE_READFILES_LINEAR_SEARCH_TEST)
-	srch_func = do_linear_search;
-	hi_addr = MAXUINT4;
-#elif defined(GTMSOURCE_READFILES_BINARY_SEARCH_TEST)
-	srch_func = do_binary_search;
-	hi_addr = rb->fc->eof_addr;
-#endif
-	REPL_DPRINT6("position_read: Using %s search to locate %llu in %s between %u and %u\n",
-			(srch_func == do_linear_search) ? "linear" : "binary", read_seqno, ctl->jnl_fn, lo_addr, hi_addr);
-	found = srch_func(ctl, lo_addr, hi_addr, read_seqno, &srch_status);
-	if ((TR_NOT_FOUND == found) && (0 != willnotbefound_addr))
-	{	/* There is a block that contains a seqno larger than read_seqno; leave ctl positioned at this higher seqno.
-		 * If we don't do this, we could end up in an infinite loop if the caller of this function is "read_regions".
-		 * That caller redoes the "position_read" function call assuming there would have been some progress in the
-		 * previous call to the same function. So not resetting ctl->seqno here will result in an infinite loop.
-		 */
-		found = do_linear_search(ctl, willnotbefound_addr, willnotbefound_stop_at, read_seqno, &srch_status);
-		REPL_DPRINT4("do_binary_search: position at seqno %llu in block [%u, %u)\n", srch_status.seqno,
-				willnotbefound_addr, willnotbefound_stop_at);
-		assert(found == TR_WILL_NOT_BE_FOUND);
-		assert(read_seqno < ctl->seqno);
-	}
-	assert(found != TR_NOT_FOUND);
-	return (found);
-}
-
-static	int read_and_merge(unsigned char *buff, int maxbufflen, seq_num read_jnl_seqno)
-{
-	int 			buff_avail, total_read, read_len, pass;
-	boolean_t		brkn_trans;
-	unsigned char		*seq_num_ptr, seq_num_str[32]; /* INT8_PRINT */
-	repl_ctl_element	*ctl;
-
-	trans_read = FALSE;
-	num_tcom = -1;
-	tot_tcom_len = 0;
-	total_read = 0;
-	total_wait_for_jnl_recs = 0;
-	total_wait_for_jnlopen = 0;
-	tcombuffp = gtmsource_tcombuff_start;
-	buff_avail = maxbufflen;
-	for (ctl = repl_ctl_list->next; ctl != NULL; ctl = ctl->next)
-		ctl->read_complete = FALSE;
-	for (pass = 1; !trans_read; pass++)
-	{
-		if (pass > 1)
-		{
-			gtmsource_poll_actions(TRUE);
-			SHORT_SLEEP(GTMSOURCE_WAIT_FOR_JNLOPEN);
-			if ((total_wait_for_jnlopen += GTMSOURCE_WAIT_FOR_JNLOPEN) % LOG_WAIT_FOR_JNLOPEN_PERIOD == 0)
-				repl_log(gtmsource_log_fp, TRUE, TRUE, "REPL_WARN : Source server waited %dms for journal file(s) "
-					 "to be opened, or updated while attempting to read transaction "INT8_FMT". Check for "
-					 "problems with journaling\n", total_wait_for_jnlopen, INT8_PRINT(read_jnl_seqno));
-		}
-		read_len = read_regions(&buff, &buff_avail, pass > 1, &brkn_trans, read_jnl_seqno);
-		if (brkn_trans)
-			rts_error(VARLSTCNT(3) ERR_REPLBRKNTRANS, 1, &read_jnl_seqno);
-		total_read += read_len;
-	}
-	if (tot_tcom_len > 0)
-	{	/* Copy all the TCOM records to the end of the buffer */
-		assert(tot_tcom_len <= ((unsigned char *)gtmsource_msgp + gtmsource_msgbufsiz - buff));
-		memcpy(buff, gtmsource_tcombuff_start, tot_tcom_len);
-		total_read += tot_tcom_len;
-	}
-	return (total_read);
-}
-
-static	int read_regions(unsigned char **buff, int *buff_avail,
-		         boolean_t attempt_open_oldnew, boolean_t *brkn_trans, seq_num read_jnl_seqno)
-{
-	repl_ctl_element	*ctl, *prev_ctl, *old_ctl;
-	gd_region		*region;
-	tr_search_state_t	found;
-	int			read_len, cumul_read;
-	int			nopen;
-	unsigned char		seq_num_str[32], *seq_num_ptr;  /* INT8_PRINT */
-	DEBUG_ONLY(static int	loopcnt;)
-	sgmnt_addrs		*csa;
-	jnlpool_ctl_ptr_t	jctl;
-	uint4			freeaddr;
-
-	cumul_read = 0;
-	*brkn_trans = TRUE;
-	assert(repl_ctl_list->next != NULL);
-	jctl = jnlpool.jnlpool_ctl;
-	/* For each region */
-	for (ctl = repl_ctl_list->next, prev_ctl = repl_ctl_list; ctl != NULL && !trans_read; prev_ctl = ctl, ctl = ctl->next)
-	{
-		found = TR_NOT_FOUND;
-		region = ctl->reg;
-		DEBUG_ONLY(loopcnt = 0;)
-		while (found == TR_NOT_FOUND)
-		{	/* Find the generation of the journal file which has read_jnl_seqno */
-			for ( ; ctl != NULL && ctl->reg == region &&
-				((ctl->file_state == JNL_FILE_CLOSED && QWGT(read_jnl_seqno, ctl->max_seqno))
-					|| (ctl->file_state == JNL_FILE_EMPTY
-						&& QWGE(read_jnl_seqno, ctl->repl_buff->fc->jfh->start_seqno)));
-					prev_ctl = ctl, ctl = ctl->next)
-				;
-			if (ctl == NULL || ctl->reg != region)
-			{	/* Hit the end of generation list for journal file */
-				if (!attempt_open_oldnew)
-				{	/* Reposition to skip prev_ctl */
-					REPL_DPRINT2("First pass...not opening newer gener file...skipping %s\n", prev_ctl->jnl_fn);
-					ctl = prev_ctl;
-					prev_ctl = ctl->prev;
-					found = TR_FIND_WOULD_BLOCK;
-					continue;
-				}
-				nopen = open_newer_gener_jnlfiles(region, prev_ctl);
-				if (nopen > 0) /* Newer gener files opened */
-				{
-					if (prev_ctl->file_state == JNL_FILE_CLOSED)
-					{	/* Recently updated journal file, search this */
-						ctl = prev_ctl;
-						prev_ctl = ctl->prev;
-						REPL_DPRINT3("Attempt search in %s. Next gener is %s\n",
-								ctl->jnl_fn, ctl->next->jnl_fn);
-					} else
-					{	/* Search next gener onwards */
-						ctl = prev_ctl->next;
-						prev_ctl = ctl->prev;
-						REPL_DPRINT3("Skipping empty gener %s. Moving to gener %s\n",
-								prev_ctl->jnl_fn, ctl->jnl_fn);
-					}
-				} else if (nopen == 0)
-				{	/* None opened, the journal file hasn't been written into.
-					 * Reposition to skip the prev_ctl.
-					 */
-					ctl = prev_ctl;
-					prev_ctl = ctl->prev;
-					if (QWLT(read_jnl_seqno, jctl->jnl_seqno))
-					{
-						csa = &FILE_INFO(ctl->reg)->s_addrs;
-						freeaddr = csa->jnl->jnl_buff->freeaddr;
-						if ((ctl->repl_buff->fc->eof_addr == freeaddr) || (!JNL_ENABLED(csa->hdr)))
-						{	/* No more pending updates in the journal file. Next update to the
-							 * journal file will take the seqno jctl->jnl_seqno which will be
-							 * greater than read_jnl_seqno
-							 */
-							found = TR_WILL_NOT_BE_FOUND;
-							continue;
-						}
-					}
-					found = TR_FIND_WOULD_BLOCK;
-				}
-			} else if (ctl->file_state == JNL_FILE_UNREAD)
-			{
-				if (!ctl->first_read_done || attempt_open_oldnew)
-					first_read(ctl);
-				if (ctl->file_state == JNL_FILE_UNREAD)
-				{
-					REPL_DPRINT2("First read of %s. Nothing yet written to this file\n", ctl->jnl_fn);
-					if (ctl->prev->reg == ctl->reg &&
-					    QWGT(ctl->repl_buff->fc->jfh->start_seqno, read_jnl_seqno))
-					{	/* Prev gener opened already. Looking for read_jnl_seqno in this gener,
-						 * but the first possible seqno in this gener is > read_jnl_seqno.
-						 */
-						found = TR_WILL_NOT_BE_FOUND;
-						continue;
-					}
-					if (ctl->prev->reg == ctl->reg)
-					{	/* Nothing yet written to the file. Attempt opening next gener. */
-						assert(QWLE(ctl->prev->repl_buff->fc->jfh->start_seqno,
-								ctl->repl_buff->fc->jfh->start_seqno));
-						prev_ctl = ctl;
-						ctl = ctl->next;
-					} else if (attempt_open_oldnew)
-					{
-						if (open_prev_gener(&old_ctl, ctl, read_jnl_seqno) == 0)
-						{
-							if (QWGT(ctl->repl_buff->fc->jfh->start_seqno, read_jnl_seqno))
-							{
-								found = TR_WILL_NOT_BE_FOUND;
-								continue;
-							}
-							/* Nothing yet written to this file. Attempt opening next gener */
-							prev_ctl = ctl;
-							ctl = ctl->next;
-						} else
-						{
-							assert(old_ctl->file_state == JNL_FILE_CLOSED ||
-									old_ctl->file_state == JNL_FILE_EMPTY);
-							if (old_ctl->file_state == JNL_FILE_EMPTY ||
-									QWGT(old_ctl->min_seqno, read_jnl_seqno))
-							{	/* Give the other regions a chance to
-								 * open their previous generations.
-								 */
-								REPL_DPRINT2("Skipping to other regions. Not reading from "
-										"previous generation file %s\n", old_ctl->jnl_fn);
-								found = TR_FIND_WOULD_BLOCK;
-								continue;
-							}
-							/* Search the prev gener and backwards */
-							ctl = old_ctl;
-							prev_ctl = old_ctl->prev;
-							REPL_DPRINT2("Attempt searching in %s and backwards\n", ctl->jnl_fn);
-						}
-					} else
-					{
-						REPL_DPRINT2("First pass...skipping UNREAD file %s\n", ctl->jnl_fn);
-						found = TR_FIND_WOULD_BLOCK;
-						continue;
-					}
-				}
-			} else if (ctl->file_state == JNL_FILE_EMPTY || QWGT(ctl->min_seqno, read_jnl_seqno))
-			{	/* May be in prev gener */
-				if (ctl->prev->reg == ctl->reg && ctl->file_state != JNL_FILE_EMPTY)
-				{	/* If prev gener is already open, and we come here, we are looking for
-					 * a seqno between prev gener's max_seqno and this gener's min_seqno.
-					 * This region is not part of the transaction. Skip to the next region.
-					 */
-					REPL_DPRINT3("Gap between %s (max seqno "INT8_FMT,
-							ctl->prev->jnl_fn, INT8_PRINT(ctl->prev->max_seqno));
-					REPL_DPRINT3(") and %s (min seqno "INT8_FMT, ctl->jnl_fn, INT8_PRINT(ctl->min_seqno));
-					REPL_DPRINT2(") found while looking for "INT8_FMT"\n", INT8_PRINT(read_jnl_seqno));
-					assert(ctl->prev->file_state == JNL_FILE_CLOSED &&
-						QWLT(ctl->prev->max_seqno, read_jnl_seqno) ||
-						ctl->prev->file_state == JNL_FILE_EMPTY);
-					found = TR_WILL_NOT_BE_FOUND;
-					continue;
-				}
-				if (ctl->prev->reg == ctl->reg)
-				{	/* Skip the empty gener */
-					REPL_DPRINT2("Skipping empty journal file %s\n", ctl->jnl_fn);
-					prev_ctl = ctl;
-					ctl = ctl->next;
-					continue;
-				}
-				if (!attempt_open_oldnew)
-				{
-					REPL_DPRINT2("First pass...not opening prev gener file...skipping %s\n", ctl->jnl_fn);
-					found = TR_FIND_WOULD_BLOCK;
-					continue;
-				}
-				/* Need to open prev gener */
-				if (open_prev_gener(&old_ctl, ctl, read_jnl_seqno) == 0)
-				{
-					if (ctl->file_state != JNL_FILE_EMPTY)
-						found = TR_WILL_NOT_BE_FOUND;
-					else
-					{	/* Skip the empty generation */
-						REPL_DPRINT2("Skipping empty journal file %s\n", ctl->jnl_fn);
-						prev_ctl = ctl;
-						ctl = ctl->next;
-					}
-					continue;
-				}
-				assert(old_ctl->file_state == JNL_FILE_CLOSED || old_ctl->file_state == JNL_FILE_EMPTY);
-				if (old_ctl->file_state == JNL_FILE_EMPTY || QWGT(old_ctl->min_seqno, read_jnl_seqno))
-				{	/* Give the other regions a chance to open their previous generations */
-					found = TR_FIND_WOULD_BLOCK;
-					REPL_DPRINT2("Skipping to other regions. Not reading from previous generation file %s\n",
-							old_ctl->jnl_fn);
-					continue;
-				}
-				/* Search the prev gener and backwards */
-				ctl = old_ctl;
-				prev_ctl = old_ctl->prev;
-				REPL_DPRINT2("Attempt searching in %s and backwards\n", ctl->jnl_fn);
-			} else
-			{
-				assert((ctl->file_state == JNL_FILE_OPEN || read_jnl_seqno <= ctl->max_seqno)
-				       && ctl->min_seqno <= read_jnl_seqno);
-				if (ctl->lookback)
-				{
-					assert(QWLE(read_jnl_seqno, ctl->seqno));
-					assert(ctl->file_state == JNL_FILE_OPEN || ctl->file_state == JNL_FILE_CLOSED);
-					REPL_DPRINT4("Looking back and attempting to position read for %s at "
-							INT8_FMT". File state is %s\n", ctl->jnl_fn, INT8_PRINT(read_jnl_seqno),
-							(ctl->file_state == JNL_FILE_OPEN) ? "OPEN" : "CLOSED");
-					position_read(ctl, read_jnl_seqno);
-					ctl->lookback = FALSE;
-				}
-				if (QWEQ(read_jnl_seqno, ctl->seqno))
-				{	/* Found it */
-					if (!ctl->read_complete)
-					{
-						if ((read_len = read_transaction(ctl, buff, buff_avail, read_jnl_seqno)) < 0)
-							assert(repl_errno == EREPL_JNLEARLYEOF);
-						cumul_read += read_len;
-					}
-					found = TR_FOUND;
-				} else if (QWLT(read_jnl_seqno, ctl->seqno))
-				{	/* This region is not involved in transaction read_jnl_seqno */
-					found = TR_WILL_NOT_BE_FOUND;
-				} else	/* QWGT(read_jnl_seqno, ctl->seqno) */
-				{
-					/* Detect infinite loop of calls to position_read() by limiting # of calls to 1024 in dbg */
-					DEBUG_ONLY(loopcnt++;)
-					assert(1024 > loopcnt);
-					if (ctl->file_state == JNL_FILE_OPEN)
-					{	/* State change from READ_FILE->READ_POOL-> READ_FILE might cause this.
-						 * The journal files have grown since the transition from READ_FILE to READ_POOL
-						 * was made. Update ctl info.
-						 */
-						if (update_max_seqno_info(ctl) != SS_NORMAL)
-						{
-							assert(repl_errno == EREPL_JNLEARLYEOF);
-							GTMASSERT; /* Program bug */
-						}
-						if (QWLE(read_jnl_seqno, ctl->max_seqno))
-						{	/* May be found in this journal file,
-							 * attempt to position next read to read_jnl_seqno
-							 */
-							force_file_read(ctl); /* Buffer might be stale with an EOF record */
-							position_read(ctl, read_jnl_seqno);
-						} else
-						{	/* Will possibly be found in next gener */
-							prev_ctl = ctl;
-							ctl = ctl->next;
-						}
-					} else if (ctl->file_state == JNL_FILE_CLOSED)
-					{	/* May be found in this jnl file, attempt to position next read to read_jnl_seqno */
-						position_read(ctl, read_jnl_seqno);
-					} else
-					{ /* Program bug - ctl->seqno should never be greater than ctl->max_seqno */
-						GTMASSERT;
-					}
-				}
-			}
-		}
-		/* Move to the next region, now that the tr has been found or will not be found */
-		*brkn_trans = (*brkn_trans && found == TR_WILL_NOT_BE_FOUND);
-		for ( ; ctl->next != NULL && ctl->next->reg == region; prev_ctl = ctl, ctl = ctl->next)
-			;
-	}
-	assert(!*brkn_trans);
-	return (cumul_read);
-}
-
-int gtmsource_readfiles(unsigned char *buff, int *data_len, int maxbufflen, boolean_t read_multiple)
-{
-
-	int4			read_size, read_state, first_tr_len, tot_tr_len;
-	unsigned char		seq_num_str[32], *seq_num_ptr;  /* INT8_PRINT */
-	jnlpool_ctl_ptr_t	jctl;
-	gtmsource_local_ptr_t	gtmsource_local;
-	seq_num			read_jnl_seqno, jnl_seqno;
-	qw_num			read_addr;
-	uint4			jnlpool_size;
-	static int4		max_tr_size = MAX_TR_BUFFSIZE; /* Will generally be less than initial gtmsource_msgbufsiz;
-								* allows for space to accommodate the last transaction */
-
-	jctl = jnlpool.jnlpool_ctl;
-	gtmsource_local = jnlpool.gtmsource_local;
-	jnlpool_size = jctl->jnlpool_size;
-	jnl_seqno = jctl->jnl_seqno;
-	read_jnl_seqno = gtmsource_local->read_jnl_seqno;
-	read_state = gtmsource_local->read_state;
-	assert(buff == (unsigned char *)gtmsource_msgp + REPL_MSG_HDRLEN); /* else increasing buffer space will not work */
-	assert(maxbufflen == gtmsource_msgbufsiz - REPL_MSG_HDRLEN);
-	tot_tr_len = 0;
-	assert(REPL_MSG_HDRLEN == SIZEOF(jnldata_hdr_struct));
-	read_addr = gtmsource_local->read_addr;
-	first_tr_len = read_size = read_and_merge(buff, maxbufflen, read_jnl_seqno++) + REPL_MSG_HDRLEN;
-	max_tr_size = MAX(max_tr_size, read_size);
-	do
-	{
-		tot_tr_len += read_size;
-		REPL_DPRINT5("File read seqno : %llu Tr len : %d Total tr len : %d Maxbufflen : %d\n", read_jnl_seqno - 1,
-				read_size - REPL_MSG_HDRLEN, tot_tr_len, maxbufflen);
-		if (gtmsource_save_read_jnl_seqno < read_jnl_seqno)
-		{
-			read_addr += read_size;
-			if (jnlpool_size >= (jctl->early_write_addr - read_addr)) /* No more overflow, switch to READ_POOL */
-			{ /* To avoid the expense of memory barrier in jnlpool_hasnt_overflowed(), we use a possibly stale
-			   * value of early_write_addr to check if we can switch back to pool. The consequence
-			   * is that we may switch back and forth between file and pool read if we are in a situation wherein a
-			   * GTM process races with source server, writing transactions into the pool right when the source server
-			   * concludes that it can read from pool. We think this condition is rare enough that the expense
-			   * of re-opening the files (due to the transition) and re-positioning read pointers is considered
-			   * living with when compared with the cost of a memory barrier. We can reduce the expense by
-			   * not clearing the file information for every transition back to pool. We can wait for a certain
-			   * period of time (say 15 minutes) before we close all files. */
-				gtmsource_local->read = read_addr % jnlpool_size;
-				gtmsource_local->read_state = read_state = READ_POOL;
-				break;
-			}
-			REPL_DPRINT3("Readfiles : after sync with pool read_seqno: %llu read_addr: %llu\n", read_jnl_seqno,
-					read_addr);
-		}
-		if (read_multiple)
-		{
-			if (tot_tr_len < max_tr_size && read_jnl_seqno < jnl_seqno)
-			{ /* Limit the read by the buffer length, or until there is no more to be read. If not limited by the
-			   * buffer length, the buffer will keep growing due to logic that expands the buffer when needed */
-				/* recompute buff and maxbufflen as buffer may have expanded during read_and_merge */
-				buff = (unsigned char *)gtmsource_msgp + tot_tr_len + REPL_MSG_HDRLEN;
-				maxbufflen = gtmsource_msgbufsiz - tot_tr_len - REPL_MSG_HDRLEN;
-				read_size = read_and_merge(buff, maxbufflen, read_jnl_seqno++) + REPL_MSG_HDRLEN;
-				max_tr_size = MAX(max_tr_size, read_size);
-				/* don't use buff to assign type and len as buffer may have expanded, use gtmsource_msgp instead */
-				((repl_msg_ptr_t)((unsigned char *)gtmsource_msgp + tot_tr_len))->type = REPL_TR_JNL_RECS;
-				((repl_msg_ptr_t)((unsigned char *)gtmsource_msgp + tot_tr_len))->len  = read_size;
-				continue;
-			}
-			REPL_DPRINT6("Readfiles : tot_tr_len %d max_tr_size %d read_jnl_seqno %llu jnl_seqno %llu "
-				     "gtmsource_msgbufsize : %d; stop multiple reads\n", tot_tr_len, max_tr_size, read_jnl_seqno,
-				     jnl_seqno, gtmsource_msgbufsiz);
-		}
-		break;
-	} while (TRUE);
-	gtmsource_local->read_addr = read_addr;
-	gtmsource_local->read_jnl_seqno = read_jnl_seqno;
-#ifdef GTMSOURCE_ALWAYS_READ_FILES
-	gtmsource_local->read_state = read_state = READ_FILE;
-#endif
-	if (read_state == READ_POOL)
-	{
-		gtmsource_ctl_close(); /* no need to keep files open now that we are going to read from pool */
-		repl_log(gtmsource_log_fp, TRUE, TRUE, "Source server now reading from journal pool at transaction %llu\n",
-				read_jnl_seqno);
-		REPL_DPRINT3("Readfiles : after switch to pool, read_addr : "INT8_FMT" read : %u\n",
-				INT8_PRINT(read_addr), gtmsource_local->read);
-	}
-	*data_len = (first_tr_len - REPL_MSG_HDRLEN);
-	return (tot_tr_len);
-}
-
-static	int scavenge_closed_jnl_files(seq_num ack_seqno)	/* currently  not used */
-{	/* Run thru the repl_ctl_list and scavenge for those journal files which are no longer required for
-	 * replication (the receiver side has acknowledged that it has successfully processed journal recs upto
-	 * and including those with JNL_SEQNO ack_seqno). Close these journal files and report to the operator
-	 * that these files are no longer needed for replication so that the operator can take these files off-line.
-	 */
-	boolean_t		scavenge;
-	repl_ctl_element	*ctl, *prev_ctl;
-
-	for (prev_ctl = repl_ctl_list, ctl = repl_ctl_list->next; ctl != NULL; prev_ctl = ctl, ctl = ctl->next)
-	{
-		if (!ctl->next || ctl->next->reg != ctl->reg)
-			open_newer_gener_jnlfiles(ctl->reg, ctl);
-		/* following two switche blocks cannot be merged as file_state could change in the first switch block */
-		switch(ctl->file_state)
-		{
-			case JNL_FILE_CLOSED :
-			case JNL_FILE_EMPTY :
-				break;
-			case JNL_FILE_OPEN :
-				if (update_max_seqno_info(ctl) != SS_NORMAL)
-				{
-					assert(repl_errno == EREPL_JNLEARLYEOF);
-					GTMASSERT; /* Program bug */
-				}
-				break;
-			case JNL_FILE_UNREAD :
-				first_read(ctl);
-				break;
-		}
-		switch(ctl->file_state)
-		{
-			case JNL_FILE_CLOSED :
-				scavenge = (QWGE(ack_seqno, ctl->max_seqno) && ctl->next && ctl->next->reg == ctl->reg);
-					/* There should exist a next generation */
-				break;
-			case JNL_FILE_EMPTY :
-				/* Previous generation should have been scavenged and the
-				 * ack_seqno should be in one of the next generations.
-				 */
-				scavenge = (ctl->prev->reg != ctl->reg && ctl->next && ctl->next->reg == ctl->reg
-						&& (ctl->next->file_state == JNL_FILE_OPEN
-							|| ctl->next->file_state == JNL_FILE_CLOSED)
-						&& QWGE(ctl->next->min_seqno, ack_seqno));
-				break;
-			default :
-				scavenge = FALSE;
-				break;
-		}
-		if (scavenge)
-		{
-			ctl->prev->next = ctl->next;
-			ctl->next->prev = ctl->prev;
-			REPL_DPRINT2("Journal file %s no longer needed for replication\n", ctl->jnl_fn);
-			repl_ctl_close(ctl);
-		}
-	}
-	return 0;
-}
-
-int gtmsource_update_resync_tn(seq_num resync_seqno)
-{
-	repl_ctl_element	*ctl, *prev_ctl;
-	gd_region		*region;
-	sgmnt_addrs		*csa;
-	int			read_size;
-	unsigned char		seq_num_str[32], *seq_num_ptr;  /* INT8_PRINT */
-
-	REPL_DPRINT2("UPDATING RESYNC TN with seqno "INT8_FMT"\n", INT8_PRINT(resync_seqno));
-	gtmsource_ctl_close();
-	gtmsource_ctl_init();
-	read_size = read_and_merge((unsigned char *)&gtmsource_msgp->msg[0], gtmsource_msgbufsiz - REPL_MSG_HDRLEN, resync_seqno);
-	for (ctl = repl_ctl_list->next, prev_ctl = repl_ctl_list; ctl != NULL; )
-	{
-		for (region = ctl->reg;
-		     ctl != NULL && ctl->reg == region && (ctl->file_state == JNL_FILE_OPEN || ctl->file_state == JNL_FILE_CLOSED);
-			prev_ctl = ctl, ctl = ctl->next)
-		     ;
-		if (ctl == NULL || ctl->reg != region || prev_ctl->reg == region)
-		{
-			csa = &FILE_INFO(region)->s_addrs;
-			csa->hdr->resync_tn = prev_ctl->tn;
-			REPL_DPRINT3("RESYNC TN for %s is %d\n", prev_ctl->jnl_fn, prev_ctl->tn);
-		} else
-		{	/* The only ctl entry for this region is empty or unread */
-			assert(FILE_INFO(region)->s_addrs.hdr->resync_tn == 1);
-		}
-		/* Move to the next region */
-		for (; ctl != NULL && ctl->reg == region;
-		       prev_ctl = ctl, ctl = ctl->next);
-	}
-	gtmsource_ctl_close(); /* close all structures now that we are done; if we have to read from journal files; we'll open
-				* the structures again */
-	return (SS_NORMAL);
-}
diff --git a/sr_vvms/gtmsource_readpool.c b/sr_vvms/gtmsource_readpool.c
deleted file mode 100644
index 73acb0b..0000000
--- a/sr_vvms/gtmsource_readpool.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_stat.h"
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "jnl.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "repl_ctl.h"
-#include "repl_errno.h"
-#include "repl_dbg.h"
-#include "memcoherency.h"
-#include "repl_tr_good.h"
-#include "min_max.h"
-
-GBLREF	jnlpool_addrs	jnlpool;
-
-int gtmsource_readpool(uchar_ptr_t buff, int *data_len, int maxbufflen, boolean_t read_multiple, qw_num stop_read_at)
-{
-
-	uint4 			jnldata_len, read_size, read, jnlpool_size, avail_data;
-	uint4			first_tr_len, num_tr_read, tr_len;
-	int4			wrap_size;
-	unsigned char   	seq_num_str[32], *seq_num_ptr;
-	uchar_ptr_t		buf_top, tr_p;
-	jnlpool_ctl_ptr_t	jctl;
-	gtmsource_local_ptr_t	gtmsource_local;
-	sm_uc_ptr_t		jnldata_base;
-	jnldata_hdr_ptr_t	jnl_header;
-	qw_num			read_addr, avail_data_qw;
-	repl_msg_ptr_t		msgp;
-	seq_num			read_jnl_seqno, jnl_seqno;
-
-	jctl = jnlpool.jnlpool_ctl;
-	jnlpool_size = jctl->jnlpool_size;
-	DEBUG_ONLY(jnl_seqno = jctl->jnl_seqno;) /* jnl_seqno is used in an assert below. jnl_seqno is a local variable for
-						  * debugging purposes since shared memory can change from the time the assert
-						  * fails to the time the core gets created
-						  */
-	jnldata_base = jnlpool.jnldata_base;
-	gtmsource_local = jnlpool.gtmsource_local;
-	read = gtmsource_local->read;
-	read_addr = gtmsource_local->read_addr;
-	read_jnl_seqno = gtmsource_local->read_jnl_seqno;
-	assert(stop_read_at > read_addr); /* there should be data to be read, if not how did we end up here? */
-	if (jnlpool_hasnt_overflowed(jctl, jnlpool_size, read_addr))
-	{ /* No overflow yet. Before we read the content (including the jnldata_len read below), we have to ensure we read
-	   * up-to-date content. We rely on the memory barrier done in jnlpool_hasnt_overflowed for this. */
-		assert(read + SIZEOF(jnldata_hdr_struct) <= jnlpool_size);
-		jnl_header = (jnldata_hdr_ptr_t)(jnldata_base + read);
-		first_tr_len = jnldata_len = jnl_header->jnldata_len;
-		if (read_multiple)
-		{
-			assert(stop_read_at >= read_addr);
-			avail_data_qw = stop_read_at - read_addr;
-			assert(maxbufflen <= MAXPOSINT4); /* to catch the case of change in type of maxbufflen */
-			avail_data = (uint4)MIN(avail_data_qw, (qw_num)maxbufflen);
-			read_multiple = (first_tr_len < avail_data);
-			if (read_multiple)
-				jnldata_len = avail_data;
-		}
-		if (SIZEOF(jnldata_hdr_struct) < jnldata_len && jnldata_len <= jnlpool_size)
-		{
-			read_size = jnldata_len - SIZEOF(jnldata_hdr_struct);
-			if (0 < read_size && read_size <= maxbufflen)
-			{
-				if (0 < (wrap_size = (int4)(read - (jnlpool_size - jnldata_len))))
-					read_size -= wrap_size;
-				memcpy(buff, (sm_uc_ptr_t)jnl_header + SIZEOF(jnldata_hdr_struct), read_size);
-				if (0 < wrap_size)
-					memcpy(buff + read_size, jnldata_base, wrap_size);
-				/* Now that we have read the content, we have to ensure that we haven't read content that may been
-				 * overwritten. We rely on the memory barrier done in jnlpool_hasnt_overflowed for this */
-				if (jnlpool_hasnt_overflowed(jctl, jnlpool_size, read_addr))
-				{ /* No overflow */
-					REPL_DEBUG_ONLY(
-						assert(repl_tr_good(buff, first_tr_len - SIZEOF(jnldata_hdr_struct),
-								read_jnl_seqno));
-					)
-					num_tr_read = 1;
-					if (read_multiple)
-					{ /* although stop_read_at - read_addr contains no partial transaction, it is possible that
-					   * stop_read_at - read_addr is more than maxbufflen, and hence we read fewer bytes
-					   * than stop_read_at - read_addr; scan what we read to figure out if the tail is an
-					   * incomplete transaction */
-						assert(first_tr_len < jnldata_len); /* must hold if multiple transactions read */
-						tr_p = buff + first_tr_len - SIZEOF(jnldata_hdr_struct);
-						buf_top = buff + jnldata_len - SIZEOF(jnldata_hdr_struct);
-						while (SIZEOF(jnldata_hdr_struct) < (buf_top - tr_p)) /* more than hdr available */
-						{
-							tr_len = ((jnldata_hdr_ptr_t)tr_p)->jnldata_len;
-							assert(0 < tr_len);
-							assert(tr_len <= jnlpool_size);
-							if (tr_len <= (buf_top - tr_p)) /* transaction completely read */
-							{ /* the message type and len assignments are a violation of layering;
-							   * ideally, this should be done in gtmsource_process(), but we choose
-							   * to do it here for performance reasons. If we have to do it in
-							   * gtmsource_process(), we have to scan the buffer again. */
-								((repl_msg_ptr_t)tr_p)->type = REPL_TR_JNL_RECS;
-								((repl_msg_ptr_t)tr_p)->len = tr_len;
-								REPL_DEBUG_ONLY(
-									assert(repl_tr_good(tr_p + REPL_MSG_HDRLEN,
-										tr_len - REPL_MSG_HDRLEN,
-										read_jnl_seqno + num_tr_read));
-								)
-								num_tr_read++;
-								tr_p += tr_len;
-							} else
-							{
-								REPL_DPRINT5("Partial transaction read since jnldata_len %llu "
-										"larger than maxbufflen %d, tr_len %d, remaining "
-										"buffer %d\n", avail_data_qw, maxbufflen,
-										tr_len, buf_top - tr_p);
-								break;
-							}
-						}
-						REPL_DEBUG_ONLY(
-							if (0 != (buf_top - tr_p))
-							{
-								REPL_DPRINT4("Partial tr header read since jnldata_len %llu "
-									"larger than maxbufflen %d, incomplete header length %d\n",
-									avail_data_qw, maxbufflen, buf_top - tr_p);
-							} else ;
-						)
-						jnldata_len = (tr_p - buff) + SIZEOF(jnldata_hdr_struct);
-						wrap_size = (int4)(read - (jnlpool_size - jnldata_len));
-					}
-					REPL_DPRINT4("Pool read seqno : "INT8_FMT" Num Tr read : %d Total Tr len : %d\n",
-					       INT8_PRINT(read_jnl_seqno), num_tr_read, jnldata_len);
-					REPL_DPRINT4("Read %u : Next read : %u : %s\n", read,
-						     (0 > wrap_size) ? read + jnldata_len : wrap_size,
-						     (0 > wrap_size) ? "" : " READ WRAPPED");
-					read = ((0 > wrap_size) ? read + jnldata_len : wrap_size);
-					read_addr += jnldata_len;
-					read_jnl_seqno += num_tr_read;
-					assert(stop_read_at >= read_addr);
-					assert(jnl_seqno >= read_jnl_seqno - 1);
-					/* In the rare case when we read the transaction read_jnl_seqno just as it becomes
-					 * available and before the GTM process that wrote it updates jctl->jnl_seqno
-					 * in t_end/tp_tend, we may return from this function with read_jnl_seqno one more than
-					 * jctl->jnl_seqno. This is such a rare case that we don't want to add a wait loop for
-					 * jctl->jnl_seqno to become equal to read_jnl_seqno. We expect that by the time we send
-					 * the just read transaction(s) using socket I/O, jctl->jnl_seqno would have been updated.
-					 * In any case, we prevent ourselves from misinterpreting this condition when
-					 * read_jnl_seqno is compared against jctl->jnl_seqno in gtmsource_process(),
-					 * gtmsource_get_jnlrecs() and gtmsource_showbacklog()
-					 */
-					assert(read == read_addr % jnlpool_size);
-					gtmsource_local->read = read;
-					gtmsource_local->read_addr = read_addr;
-					gtmsource_local->read_jnl_seqno = read_jnl_seqno;
-					*data_len = first_tr_len - SIZEOF(jnldata_hdr_struct);
-					return (jnldata_len);
-				} /* else overflow happened, or about to happen */
-			} else if (0 < read_size && jnlpool_hasnt_overflowed(jctl, jnlpool_size, read_addr))
-			{ /* Buffer cannot accommodate data */
-				*data_len = read_size;
-				return (-1);
-			} /* else
-			   * We read a corrupt (overwritten) large value, or read_size == 0, both of which imply overflow.
-			   * read_size == 0 => overflow because every transaction generates non-zero bytes of jnl data */
-		} /* else
-		   * We read a corrupt (overwritten) large value, or read 0, both of which imply overflow.
-		   * jnldata_len == 0 => overflow because every transaction generates non-zero bytes of jnl data */
-	} /* else overflow happened, or about to happen */
-	*data_len = -1;
-	return (-1); /* Error indication */
-}
diff --git a/sr_vvms/gtmsource_secnd_update.c b/sr_vvms/gtmsource_secnd_update.c
deleted file mode 100644
index c475127..0000000
--- a/sr_vvms/gtmsource_secnd_update.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#if !defined(__MVS__) && !defined(VMS)
-#include <sys/param.h>
-#endif
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_string.h"
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#ifdef UNIX
-#include <sys/sem.h>
-#endif
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "error.h"
-#include "gtm_stdio.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "util.h"
-
-GBLREF jnlpool_addrs 	jnlpool;
-GBLREF boolean_t	update_disable;
-
-int gtmsource_secnd_update(boolean_t print_message)
-{
-	if (grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM) < 0)
-	{
-		util_out_print("Error grabbing jnlpool option write lock. Could not initiate change log", TRUE);
-		return(ABNORMAL_SHUTDOWN);
-	}
-	grab_lock(jnlpool.jnlpool_dummy_reg, TRUE, ASSERT_NO_ONLINE_ROLLBACK);
-	jnlpool.jnlpool_ctl->upd_disabled = update_disable;
-	rel_lock(jnlpool.jnlpool_dummy_reg);
-	rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM);
-	if (print_message)
-		util_out_print("Updates are now !AZ", TRUE, update_disable ? "disabled" : "enabled");
-	return(NORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmsource_seqno_init.c b/sr_vvms/gtmsource_seqno_init.c
deleted file mode 100644
index 0350db0..0000000
--- a/sr_vvms/gtmsource_seqno_init.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_inet.h"
-#include "gtm_fcntl.h"
-#include <descrip.h> /* Required for gtmsource.h */
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "error.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "jnl.h"
-#include "gtmmsg.h"
-
-GBLREF	gd_addr          	*gd_header;
-GBLREF	gd_region        	*gv_cur_region;
-GBLREF	gtmsource_options_t	gtmsource_options;
-GBLREF	jnlpool_addrs 		jnlpool;
-GBLREF  seq_num                 seq_num_one, seq_num_zero;
-
-error_def(ERR_NOREPLCTDREG);
-
-void gtmsource_seqno_init(void)
-{
-	/* Find the start_jnl_seqno */
-
-	gd_region		*reg, *region_top;
-	seq_num			local_read_jsn, local_jsn;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	sm_uc_ptr_t		gld_fn;
-
-	/* Unix and VMS have different field names for now, but will both be soon changed to instname instead of gtmgbldir */
-	gld_fn = (sm_uc_ptr_t)jnlpool.jnlpool_ctl->jnlpool_id.gtmgbldir;
-	QWASSIGN(jnlpool.jnlpool_ctl->start_jnl_seqno, seq_num_zero);
-	QWASSIGN(local_read_jsn, seq_num_zero);
-	QWASSIGN(local_jsn, seq_num_zero);
-	region_top = gd_header->regions + gd_header->n_regions;
-	for (reg = gd_header->regions; reg < region_top; reg++)
-	{
-		assert(reg->open);
-		csa = &FILE_INFO(reg)->s_addrs;
-		csd = csa->hdr;
-		if (REPL_ALLOWED(csd))
-		{
-			if (QWLT(local_read_jsn, csd->resync_seqno))
-				QWASSIGN(local_read_jsn, csd->resync_seqno);
-			if (QWLT(local_jsn, csd->reg_seqno))
-				QWASSIGN(local_jsn, csd->reg_seqno);
-			/* Copy gtmgbldir into the database shared memory.
-			 * Used later to avoid updates from a different gtmgbldir to this database.
-			 */
-			assert(SIZEOF(csa->nl->replinstfilename) == SIZEOF(jnlpool.jnlpool_ctl->jnlpool_id.gtmgbldir));
-			memcpy(csa->nl->replinstfilename, gld_fn, SIZEOF(csa->nl->replinstfilename));
-		}
-	}
-	if (QWEQ(local_jsn, seq_num_zero))
-	{
-		/* No replicated region, or databases created with older version of GTM */
-		gtm_putmsg(VARLSTCNT(5) ERR_NOREPLCTDREG, 3, LEN_AND_LIT("global directory"), gld_fn);
-		/* Error, has to shutdown all regions 'cos mupip needs exclusive access to turn replication on */
-		gtmsource_autoshutdown();
-	}
-	QWASSIGN(jnlpool.jnlpool_ctl->start_jnl_seqno, local_jsn);
-	QWASSIGN(jnlpool.jnlpool_ctl->jnl_seqno, local_jsn);
-	QWASSIGN(jnlpool.gtmsource_local->read_jnl_seqno, local_read_jsn);
-}
diff --git a/sr_vvms/gtmsource_showbacklog.c b/sr_vvms/gtmsource_showbacklog.c
deleted file mode 100644
index 44d4513..0000000
--- a/sr_vvms/gtmsource_showbacklog.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#if !defined(__MVS__) && !defined(VMS)
-#include <sys/param.h>
-#endif
-#include <sys/time.h>
-#include "gtm_inet.h"
-#include <errno.h>
-#include "gtm_string.h"
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "repl_shutdcode.h"
-#include "util.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gtmsource_options_t	gtmsource_options;
-GBLREF	seq_num			seq_num_zero;
-GBLREF	seq_num			seq_num_one;
-
-int gtmsource_showbacklog(void)
-{
-	seq_num		seq_num, jnl_seqno, read_jnl_seqno;
-
-	QWASSIGN(read_jnl_seqno, jnlpool.gtmsource_local->read_jnl_seqno);
-	QWASSIGN(jnl_seqno, jnlpool.jnlpool_ctl->jnl_seqno);
-	/* jnl_seqno >= read_jnl_seqno is the most common case; see gtmsource_readpool() for when the rare case can occur */
-	seq_num = (jnl_seqno >= read_jnl_seqno) ? jnl_seqno - read_jnl_seqno : 0;
-	util_out_print("!@UQ : backlog number of transactions written to journal pool and "
-			"yet to be sent by the source server", TRUE, &seq_num);
-	QWASSIGN(seq_num, jnl_seqno);
-	if (QWNE(seq_num, seq_num_zero))
-		QWDECRBY(seq_num, seq_num_one);
-	util_out_print("!@UQ : sequence number of last transaction written to journal pool", TRUE, &seq_num);
-	QWASSIGN(seq_num, read_jnl_seqno);
-	if (QWNE(seq_num, seq_num_zero))
-		QWDECRBY(seq_num, seq_num_one);
-	util_out_print("!@UQ : sequence number of last transaction sent by source server", TRUE, &seq_num);
-	if ((jnlpool.gtmsource_local->mode == GTMSOURCE_MODE_PASSIVE)
-		|| ( jnlpool.gtmsource_local->mode == GTMSOURCE_MODE_ACTIVE_REQUESTED))
-		util_out_print("WARNING - Source Server is in passive mode, transactions are not being replicated", TRUE);
-	return (NORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmsource_shutdown.c b/sr_vvms/gtmsource_shutdown.c
deleted file mode 100644
index 9c28972..0000000
--- a/sr_vvms/gtmsource_shutdown.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <sys/mman.h>
-#if !(defined(__MVS__)) && !(defined(VMS))
-#include <sys/param.h>
-#endif
-#include "gtm_socket.h"
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#include "gtm_string.h"
-#include <descrip.h> /* Required for gtmsource.h */
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "gt_timer.h"
-#include "gtm_stdio.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "is_proc_alive.h"
-#include "repl_comm.h"
-#include "repl_log.h"
-
-#define	GTMSOURCE_WAIT_FOR_SHUTDOWN	(1000 - 1) /* ms, almost 1 s */
-
-GBLREF jnlpool_addrs 		jnlpool;
-GBLREF jnlpool_ctl_ptr_t	jnlpool_ctl;
-GBLREF uint4			process_id;
-GBLREF int			gtmsource_srv_count;
-GBLREF gtmsource_options_t	gtmsource_options;
-GBLREF int4			jnlpool_shmid;
-GBLREF boolean_t		is_src_server;
-GBLREF void                     (*call_on_signal)();
-
-int gtmsource_shutdown(boolean_t auto_shutdown, int exit_status)
-{
-	uint4		savepid;
-	int		status;
-
-	/*
-	 * Significance of shutdown field in gtmsource_local:
-	 * This field is initially set to NO_SHUTDOWN. When a command to shut
-	 * down the source server is issued, the process initiating the
-	 * shutdown sets this field to SHUTDOWN. The Source Server on sensing
-	 * that it has to shut down (reads SHUTDOWN in the shutdown field),
-	 * flushes the database regions, writes (NORMAL_SHUTDOWN + its exit
-	 * value) into this field and exits. On seeing a non SHUTDOWN value
-	 * in this field, the process which initiated the shutdown removes the
-	 * ipcs and exits with the exit value which is a combination of
-	 * gtmsource_local->shutdown and its own exit value.
-	 *
-	 * Note : Exit values should be positive for error indication,
-	 * zero for normal exit.
-	 */
-	repl_log(stdout, TRUE, TRUE, "Initiating shut down\n");
-	call_on_signal = NULL;		/* Don't reenter on error */
-	/* Grab the jnlpool access control lock and jnlpool option write lock */
-	if (!auto_shutdown || gtmsource_srv_count)
-	{
-		status = grab_sem(SOURCE, JNL_POOL_ACCESS_SEM);
-		if (0 == status)
-			if (0 > (status = grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM)))
-				rel_sem(SOURCE, JNL_POOL_ACCESS_SEM);
-	} else /* else if autoshutdown, parent is still holding the control lock, and the option lock,
-		* and the child is exiting at startup */
-		status = 0;
-
-	if (0 > status)
-	{
-		repl_log(stderr, TRUE, TRUE,
-				"Error grabbing jnlpool access control/jnlpool option write lock : %s. Shutdown not complete\n",
-				REPL_SEM_ERROR);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	if (!auto_shutdown)
-	{
-		/* Wait till shutdown time nears */
-		if (0 < gtmsource_options.shutdown_time)
-		{
-			repl_log(stdout, FALSE, TRUE, "Waiting for %d seconds before signalling shutdown\n",
-												gtmsource_options.shutdown_time);
-			LONG_SLEEP(gtmsource_options.shutdown_time);
-		} else
-			repl_log(stdout, FALSE, TRUE, "Signalling shutdown immediate\n");
-
-		jnlpool.gtmsource_local->shutdown = SHUTDOWN;
-
-		/* Wait for source server(s) to die. But release jnlpool access control and src serv options semaphore before
-		 * waiting as the concurrently running source server(s) might need these (e.g. if it is in the process of
-		 * starting up and invoking the function "gtmsource_secnd_update").
-		 */
-		if (0 != (status = rel_sem(SOURCE, SRC_SERV_OPTIONS_SEM)))
-			repl_log(stderr, TRUE, TRUE, "Error releasing the Source Server Options semaphore : %s\n", REPL_SEM_ERROR);
-		if (0 != (status = rel_sem(SOURCE, JNL_POOL_ACCESS_SEM)))
-			repl_log(stderr, TRUE, TRUE, "Error releasing the Journal Pool Access semaphore : %s\n", REPL_SEM_ERROR);
-
-		while ((SHUTDOWN == jnlpool.gtmsource_local->shutdown)
-				&& (0 < (savepid = jnlpool.gtmsource_local->gtmsource_pid))
-				&& is_proc_alive(savepid, 0))
-			SHORT_SLEEP(GTMSOURCE_WAIT_FOR_SHUTDOWN);
-
-		if (0 != (status = grab_sem(SOURCE, JNL_POOL_ACCESS_SEM)))
-		{
-			repl_log(stderr, TRUE, TRUE, "Error re-grabbing the Journal Pool Access semaphore : %s\n", REPL_SEM_ERROR);
-			return (ABNORMAL_SHUTDOWN);
-		}
-		if (0 != (status = grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM)))
-		{
-			rel_sem(SOURCE, JNL_POOL_ACCESS_SEM);
-			repl_log(stderr, TRUE, TRUE, "Error re-grabbing the Source Server Options semaphore : %s\n",
-				REPL_SEM_ERROR);
-			return (ABNORMAL_SHUTDOWN);
-		}
-		exit_status = jnlpool.gtmsource_local->shutdown;
-		if (SHUTDOWN == exit_status)
-		{
-			if (0 == savepid) /* No source server */
-				exit_status = NORMAL_SHUTDOWN;
-			else /* Source Server crashed */
-			{
-				repl_log(stderr, FALSE, TRUE,"Source Server exited abnormally. MUPIP RUNDOWN might be warranted\n");
-				exit_status = ABNORMAL_SHUTDOWN;
-			}
-		}
-	}
-
-	/*
-	 * gtmsource_ipc_cleanup will not be successful unless source server has completely exited.
-	 * It relies on SRC_SERV_COUNT_SEM value.
-	 */
-	if (FALSE == gtmsource_ipc_cleanup(auto_shutdown, &exit_status))
-	{
-		/* Release rundown, count, and option semaphores */
-		if (!auto_shutdown)
-			rel_sem_immediate(SOURCE, SRC_SERV_COUNT_SEM);
-		rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-		rel_sem_immediate(SOURCE, JNL_POOL_ACCESS_SEM);
-	}
-	return (exit_status);
-}
-
-static void gtmsource_stop(boolean_t exit)
-{
-	int	status;
-
-	status = gtmsource_shutdown(TRUE, gtmsource_end1(TRUE)) - NORMAL_SHUTDOWN;
-	if (exit)
-		gtmsource_exit(status);
-	return;
-}
-
-void gtmsource_sigstop(void)
-{
-	if (is_src_server)
-		gtmsource_stop(FALSE);
-	return;
-}
-
-void gtmsource_autoshutdown(void)
-{
-	gtmsource_stop(TRUE);
-	return;
-}
diff --git a/sr_vvms/gtmsource_statslog.c b/sr_vvms/gtmsource_statslog.c
deleted file mode 100644
index 837271b..0000000
--- a/sr_vvms/gtmsource_statslog.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#if !defined(__MVS__) && !defined(VMS)
-#include <sys/param.h>
-#endif
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_string.h"
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#ifdef UNIX
-#include <sys/sem.h>
-#endif
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "util.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gtmsource_options_t	gtmsource_options;
-
-#ifdef VMS
-error_def(ERR_UNIMPLOP);
-error_def(ERR_TEXT);
-#endif
-
-int gtmsource_statslog(void)
-{
-#ifdef VMS
-	rts_error(VARLSTCNT(6) ERR_UNIMPLOP, 0, ERR_TEXT, 2, LEN_AND_LIT("Statistics logging not supported on VMS"));
-#endif
-	/* Grab the jnlpool jnlpool option write lock */
-	if (0 > grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM))
-	{
-		util_out_print("Error grabbing jnlpool option write lock. Could not initiate stats log", TRUE);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	if (gtmsource_options.statslog == jnlpool.gtmsource_local->statslog)
-	{
-		util_out_print("STATSLOG is already !AD. Not initiating change in stats log", TRUE, gtmsource_options.statslog ?
-				strlen("ON") : strlen("OFF"), gtmsource_options.statslog ? "ON" : "OFF");
-		rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	if (!gtmsource_options.statslog)
-	{
-		jnlpool.gtmsource_local->statslog = FALSE;
-		jnlpool.gtmsource_local->statslog_file[0] = '\0';
-		util_out_print("STATSLOG turned OFF", TRUE);
-		rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-		return (NORMAL_SHUTDOWN);
-	}
-
-	jnlpool.gtmsource_local->statslog = TRUE;
-	util_out_print("Stats log turned on", TRUE);
-	rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-	return (NORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmsource_stopfilter.c b/sr_vvms/gtmsource_stopfilter.c
deleted file mode 100644
index e22ff50..0000000
--- a/sr_vvms/gtmsource_stopfilter.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#if !defined(__MVS__) && !defined(VMS)
-#include <sys/param.h>
-#endif
-#include <sys/time.h>
-#include <errno.h>
-#include "gtm_string.h"
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#ifdef UNIX
-#include <sys/sem.h>
-#endif
-#ifdef VMS
-#include <descrip.h> /* Required for gtmsource.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_dbg.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "util.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	gtmsource_options_t	gtmsource_options;
-
-int gtmsource_stopfilter(void)
-{
-	/* Grab the jnlpool jnlpool option write lock */
-	if (0 > grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM))
-	{
-		util_out_print("Error grabbing jnlpool option write lock. Could not stop filter", TRUE);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	if ('\0' == jnlpool.gtmsource_local->filter_cmd[0])
-	{
-		util_out_print("No filter currently active", TRUE);
-		rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-		return (ABNORMAL_SHUTDOWN);
-	}
-
-	jnlpool.gtmsource_local->filter_cmd[0] = '\0';
-
-	util_out_print("Stop filter initiated", TRUE);
-
-	rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-
-	return (NORMAL_SHUTDOWN);
-}
diff --git a/sr_vvms/gtmstop.m b/sr_vvms/gtmstop.m
deleted file mode 100644
index 3d8d6dd..0000000
--- a/sr_vvms/gtmstop.m
+++ /dev/null
@@ -1,47 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 1989, 2002 Sanchez Computer Associates, Inc.	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-GTMSTOP	;GT.M STOP utility - stop all GT.M processes
-	;
-	d ^%ST
-	n i,op,nopriv,pid,$zt
-	s $zt="zg "_$zl_":ERR^GTMSTOP" u $p:ctrap=$c(3) w !!
-	s op=$zsetprv("SYSLCK,GROUP,WORLD"),nopriv=0
-	i '$zpriv("SYSLCK") w !,"You need SYSLCK privilege to run this program.",!
-	e  f i=1:1:10 d getpid(.pid) q:'pid  d
-	. i i<10 d stopem(.pid) h 2 q
-	. d killem(.pid)
-	i nopriv w !,"Insufficient privileges to stop ",nopriv," process",$s(nopriv>1:"es.",1:"."),!
-	s op=$zsetprv(op) u $p:ctrap=""
-	q
-getpid(t);
-	n l,p k t s t=0
-	s l=$zlkid(0)
-	i l d   f  s l=$zlkid(1) q:'l  d
-	. i $extract($zgetlki(l,"RESNAM"),1,6)="GTM$LM" s p=$zgetlki(l,"PID"),t(p)=$$FUNC^%DH(p,8),t=t+1
-	s p=$zgetjpi(0,"pid")
-	i $d(t(p)) s t=t-1 k t(p)
-	q
-stopem(t);
-	n p s p=""
-	f  s p=$o(t(p)) q:p=""  d msg($&FORCEX(p),t(p),"Stopping process ")
-	q
-killem(t);
-	n p s p=""
-	f  s p=$o(t(p)) q:p=""  d msg($&DELPRC(p),t(p),"Deleting process ")
-	q
-msg(stat,prc,defmsg)
-	i stat=1 w defmsg,prc,! q
-	s stat=$zm(stat)
-	i stat["NOPRIV" s:'$d(nopriv(prc)) nopriv(prc)=1,nopriv=nopriv+1 q
-	i $l(stat) w "Error for ",prc," : ",stat,!
-	q
-ERR	w !,$p($zs,",",2,99),! u $p:ctrap="" s:$d(op) op=$ZSETPRV(op)
-	q
diff --git a/sr_vvms/gvcmy_open.h b/sr_vvms/gvcmy_open.h
deleted file mode 100644
index d68570b..0000000
--- a/sr_vvms/gvcmy_open.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __GVCMY_OPEN_H__
-#define __GVCMY_OPEN_H__
-
-void gvcmy_open(gd_region *reg, struct NAM *nb);
-
-#endif
diff --git a/sr_vvms/gvcst_init_sysops.c b/sr_vvms/gvcst_init_sysops.c
deleted file mode 100644
index 80d2ce8..0000000
--- a/sr_vvms/gvcst_init_sysops.c
+++ /dev/null
@@ -1,902 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <dvidef.h>
-#include <fab.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <lkidef.h>
-#include <nam.h>
-#include <psldef.h>
-#include <prvdef.h>
-#include <rmsdef.h>
-#include <secdef.h>
-#include <ssdef.h>
-#include <syidef.h>
-#include <xabfhcdef.h>
-#include <efndef.h>
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdsblk.h"
-#include "gdscc.h"
-#include "gdsblkops.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "cryptdef.h"
-#include "del_sec.h"
-#include "efn.h"
-#include "io.h"
-#include "error.h"
-#include "iottdef.h"
-#include "jnl.h"
-#include "locks.h"
-#include "min_max.h"
-#include "mlkdef.h"
-#include "vmsdtype.h"
-#include "gt_timer.h"
-#include "util.h"
-#include "mlk_shr_init.h"
-#include "dbfilop.h"
-#include "gvcst_protos.h"	/* for gvcst_init_sysops prototype */
-#include "mem_list.h"
-#include "gv_match.h"
-#include "init_sec.h"
-#include "gvcmy_open.h"
-#include "semwt2long_handler.h"
-#include "gtmmsg.h"
-#include "shmpool.h"
-#include "send_msg.h"
-#include "gtmimagename.h"
-#include "have_crit.h"
-
-#define DEF_NODE	0xFFFF
-#define MAX_SEM_WT	(1000 * 30)      /* 30 second wait before DSE errors out for access control lock */
-#define PRT$C_NA	0
-
-typedef struct {
-	item_list_3 ilist;
-	int4 terminator;
-} syistruct;
-
-OS_PAGE_SIZE_DECLARE
-
-GBLREF  boolean_t       	dse_running;
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	short			crash_count;
-GBLREF	boolean_t		gtm_fullblockwrites;	/* Do full (not partial) database block writes T/F */
-GBLREF	uint4			process_id;
-
-LITREF	char			gtm_release_name[];
-LITREF	int4			gtm_release_name_len;
-
-/* The following set of macros works around the fact that older VMS compilers do not support
- * macros with variable number of parameters (a.k.a. variadic macros) that we use to
- * implement the UNIX counterpart of PRINT_CRASH_MESSAGE in gvcst_ini_sysops.c.
- */
-#define PRINT_CRASH_MESSAGE_2_ARGS(ARG1, ARG2)						\
-	PRINT_CRASH_MESSAGE(2, ARG1, ARG2, NULL, NULL, NULL, NULL, NULL, NULL)
-
-#define PRINT_CRASH_MESSAGE_6_ARGS(ARG1, ARG2, ARG3, ARG4, ARG5, ARG6)			\
-	PRINT_CRASH_MESSAGE(6, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, NULL, NULL)
-
-#define PRINT_CRASH_MESSAGE_8_ARGS(ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8)	\
-	PRINT_CRASH_MESSAGE(8, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8)
-
-#define VARIADIC_RTS_ERROR(CNT, ERROR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8)	\
-{											\
-	if (2 == CNT)									\
-		rts_error_csa(CSA_ARG(csa) VARLSTCNT(6) ERROR, 4, DB_LEN_STR(reg),	\
-			ARG1, ARG2);							\
-	else if (6 == CNT)								\
-		rts_error_csa(CSA_ARG(csa) VARLSTCNT(10) ERROR, 4, DB_LEN_STR(reg),	\
-			ARG1, ARG2, ARG3, ARG4, ARG5, ARG6);				\
-	else if (8 == CNT)								\
-		rts_error_csa(CSA_ARG(csa) VARLSTCNT(12) ERROR, 4, DB_LEN_STR(reg),	\
-			ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);		\
-}
-
-/* Depending on whether journaling and/or replication was enabled at the time of the crash,
- * print REQRUNDOWN, REQRECOV, or REQROLLBACK error message.
- */
-#define PRINT_CRASH_MESSAGE(CNT, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8)	\
-{											\
-	if (JNL_ENABLED(tsd))								\
-	{										\
-		if (REPL_ENABLED(tsd) && tsd->jnl_before_image)				\
-		{									\
-			VARIADIC_RTS_ERROR(CNT, ERR_REQROLLBACK, 			\
-				ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);	\
-		} else									\
-		{									\
-			VARIADIC_RTS_ERROR(CNT, ERR_REQRECOV,				\
-				ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);	\
-		}									\
-	} else										\
-	{										\
-		VARIADIC_RTS_ERROR(CNT, ERR_REQRUNDOWN, 				\
-			ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8);		\
-	}										\
-}
-
-error_def(ERR_BADGBLSECVER);
-error_def(ERR_CLSTCONFLICT);
-error_def(ERR_CRITSEMFAIL);
-error_def(ERR_DBFILERR);
-error_def(ERR_DBOPNERR);
-error_def(ERR_FILEIDGBLSEC);
-error_def(ERR_GBLSECNOTGDS);
-error_def(ERR_JNLBUFFREGUPD);
-error_def(ERR_MUPRECFLLCK);
-error_def(ERR_NETDBOPNERR);
-error_def(ERR_NLMISMATCHCALC);
-error_def(ERR_REQRECOV);
-error_def(ERR_REQROLLBACK);
-error_def(ERR_REQRUNDOWN);
-error_def(ERR_SEMWT2LONG);
-error_def(ERR_SYSCALL);
-error_def(ERR_TEXT);
-error_def(ERR_VERMISMATCH);
-
-gd_region *dbfilopn(gd_region *reg)
-{
-	gd_region	*prev_reg, *sav_reg;
-	gd_segment	*seg;
-	file_control	*fc;
-	uint4		status, sub_status;
-	vms_gds_info	*gds_info;
-
-	sav_reg = gv_cur_region;
-	gv_cur_region = reg;
-	seg = reg->dyn.addr;
-	assert((dba_bg == seg->acc_meth) || (dba_mm == seg->acc_meth));
-	FILE_CNTL_INIT_IF_NULL(seg);
-	gds_info = seg->file_cntl->file_info;
-	fc = seg->file_cntl;
-	fc->file_type = seg->acc_meth;
-	fc->op = FC_OPEN;
-	if (ERR_NETDBOPNERR == (status = dbfilop(fc)))
-	{
-		gv_cur_region = sav_reg;
-		gvcmy_open(reg, gds_info->nam);
-		return -1;
-	}
-	if (SS$_NORMAL != status)
-	{
-		sub_status = gds_info->fab->fab$l_stv;
-		free(gds_info->fab);
-		free(gds_info->nam->nam$l_esa);
-		free(gds_info->nam);
-		free(gds_info->xabfhc);
-		free(gds_info->xabpro);
-		free(seg->file_cntl->file_info);
-		free(seg->file_cntl);
-		seg->file_cntl = NULL;
-		gv_cur_region = sav_reg;
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_DBOPNERR, 2, DB_LEN_STR(reg), status, sub_status);
-		GTMASSERT;
-	}
-	if (NULL != (prev_reg = gv_match(reg)))
-	{
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		free(gds_info->fab);
-		free(gds_info->nam->nam$l_esa);
-		free(gds_info->nam);
-		free(gds_info->xabfhc);
-		free(gds_info->xabpro);
-		free(seg->file_cntl->file_info);
-		free(seg->file_cntl);
-		seg->file_cntl = NULL;
-		reg = prev_reg;
-	}
-	gv_cur_region = sav_reg;
-	return reg;
-}
-
-void dbsecspc(gd_region *reg, sgmnt_data *sd, gtm_uint64_t *sec_size)
-{
-	int			section_size;
-	int4			inadr[2], inadr1[2];
-	uint4			status;
-	vms_gds_info		*gds_info;
-
-	gds_info = FILE_INFO(reg);
-	switch (reg->dyn.addr->acc_meth)
-	{
-	case dba_mm:
-		*sec_size = gds_info->xabfhc->xab$l_ebk;
-		break;
-
-	case dba_bg:
-		*sec_size = DIVIDE_ROUND_UP((LOCK_BLOCK_SIZE(sd) * OS_PAGE_SIZE) + LOCK_SPACE_SIZE(sd) + CACHE_CONTROL_SIZE(sd)
-			+ NODE_LOCAL_SPACE(sd) + JNL_SHARE_SIZE(sd) + SHMPOOL_BUFFER_SIZE, OS_PAGELET_SIZE);
-		break;
-	default:
-		GTMASSERT;
-	}
-	/* sys$expreg's first argument is expressed in pages on VAX VMS (512 bytes each), but in "pagelets" on
-	   Alpha VMS (also 512 bytes each).  Since the region will be expanded by an integral number of pages,
-	   round up sec_size to a multiple of the page size, then add two full pages for protection. */
-	section_size = ROUND_UP(*sec_size, OS_PAGE_SIZE / OS_PAGELET_SIZE);
-	status = gtm_expreg(section_size + 2 * OS_PAGE_SIZE / OS_PAGELET_SIZE, inadr, PSL$C_USER, 0);
-	if (SS$_NORMAL != status)
-	{
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DBFILERR, 2,
-			gds_info->fab->fab$b_fns, gds_info->fab->fab$l_fna, status);
-	}
-	gds_info->s_addrs.db_addrs[0] = inadr[0] + OS_PAGE_SIZE;
-	gds_info->s_addrs.db_addrs[1] = inadr[1] - OS_PAGE_SIZE;
-	assert(gds_info->s_addrs.db_addrs[1] == gds_info->s_addrs.db_addrs[0] + section_size * OS_PAGELET_SIZE - 1);
-	/* GUARD THE BEGINNING OF THE DATA BASE SEGMENT WITH ONE NOACCESS PAGE */
-	inadr1[0] = inadr1[1]
-		  = inadr[0];
-	status = sys$setprt(inadr1, NULL, 0, PRT$C_NA, 0);
-	if (SS$_NORMAL == status)
-	{
-		/* GUARD THE END OF THE DATA BASE SEGMENT WITH ONE NOACCESS PAGE */
-		inadr1[0] = inadr1[1]
-			  = gds_info->s_addrs.db_addrs[1] + 1;
-		status = sys$setprt(inadr1, NULL, PSL$C_USER, PRT$C_NA, NULL);
-	}
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DBFILERR, 2,
-			gds_info->fab->fab$b_fns, gds_info->fab->fab$l_fna, status);
-	return;
-}
-
-void db_init(gd_region *reg, sgmnt_data *tsd)
-{
-	boolean_t		clustered, cluster_member, mupip_jnl_recover, read_write, is_bg, lock_released = FALSE;
-	char			name_buff[GLO_NAME_MAXLEN], node_buff[14], nodename_buff[16], local_nodename_buff[16];
-	sgmnt_addrs		*csa;
-	sgmnt_data		*nsd;
-	file_control		*fc;
-	struct dsc$descriptor_s name_dsc, node_dsc;
-	syistruct		syi_list;
-        int             	index, dblksize, fbwsize, item_code;
-	uint4			efn_mask, flags, i, init_status, node, size, status;
-        uint4           	lk_pid = 0;
-	unsigned short		iosb[4], retlen, local_nodename_len;
-	vms_gds_info		*gds_info;
-	vms_lock_sb		*file_lksb;
-	uint4			get_lkpid(struct dsc$descriptor_s *, int, uint4);
-	struct
-	{
-		item_list_3	ilist[2];
-		int4		terminator;
-	} syi_list_2;
-	struct
-        {
-                item_list_3     item[1];
-                int4            terminator;
-        } lk_pid_list;
-	char			now_running[MAX_REL_NAME];
-	gtm_uint64_t		sec_size;
-	int			jnl_buffer_size;
-	char			s[JNLBUFFUPDAPNDX_SIZE];	/* JNLBUFFUPDAPNDX_SIZE is defined in jnl.h */
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-        ESTABLISH(dbinit_ch);
-	assert(INTRPT_IN_GVCST_INIT == intrpt_ok_state); /* we better be called from gvcst_init */
-	TREF(new_dbinit_ipc) = FALSE;	/* we did not create a new ipc resource */
-	/* ------------------------------------- gather information --------------------------------------- */
-	assert((dba_bg == tsd->acc_meth) || (dba_mm == tsd->acc_meth));
-	is_bg = (dba_bg == tsd->acc_meth);
-	clustered = (dba_bg == tsd->clustered && tsd->acc_meth);		/* ??? */
-	read_write = (FALSE == reg->read_only);
-	node = 0;
-	syi_list_2.ilist[0].item_code = SYI$_NODE_CSID;
-	syi_list_2.ilist[0].buffer_address = &node;
-	syi_list_2.ilist[0].buffer_length = SIZEOF(node);
-	syi_list_2.ilist[0].return_length_address = &retlen;
-	syi_list_2.ilist[1].item_code = SYI$_NODENAME;
-	syi_list_2.ilist[1].buffer_address = local_nodename_buff;
-	syi_list_2.ilist[1].buffer_length = SIZEOF(local_nodename_buff) - 1;
-	syi_list_2.ilist[1].return_length_address = &local_nodename_len;
-	syi_list_2.terminator = 0;
-	status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list_2, iosb, NULL, 0);
-	if (SS$_NORMAL == status)
-		status = iosb[0];
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_CLSTCONFLICT, 4, DB_LEN_STR(reg),
-			0, local_nodename_buff, status);
-	if (0 == node)
-		node = DEF_NODE;
-	if (-1 != reg->node)		/* -1 is a flag indicating that a MUPIP JOURNAL /RECOVER is in progress */
-		reg->node = node;	/* Leave it so that it goes into the value block */
-
-	/* --------------------------- grab the startup/rundown lock on file --------------------------- */
-	gds_info = FILE_INFO(reg);
-	file_lksb = &gds_info->file_cntl_lsb;
-	global_name("GT$S", &gds_info->file_id, name_buff);
-	name_dsc.dsc$a_pointer = &name_buff[1];
-	name_dsc.dsc$w_length = name_buff[0];
-	name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	/* These locks must be taken out before mapping the file to a section, and released after unmapping the section
-	 * Note:  Rather than simply taking out this lock at PW mode, we take it out at NL mode and then convert to PW.
-	 * Lock requests in the conversion queue are serviced before locks in the waiting queue;  heavy GT.CX activity
-	 * on a given database can potentially keep the conversion queue busy enough to keep new lock requests (especially
-	 * at higher lock modes like PW) bottled up on the waiting queue indefinitely.	Since NL mode lock requests are
-	 * compatible with all other lock modes, and since they don't go to the waiting queue if LCK$M_EXPEDITE is specified;
-	 * they are always granted. Then the subsequent conversion request will rapidly move to the head of the conversion
-	 * queue and ultimately be granted.
-	 */
-	assert((0 == file_lksb->lockid) || (!IS_GTM_IMAGE));
-	if (0 == file_lksb->lockid)
-	{
-		mupip_jnl_recover = FALSE;
-		/* NL mode lock is granted immediately only if LCK$M_EXPEDITE is specified. If there is a waiting queue
-		 * for this lock and LCK$M_EXPEDITE is not specified, we might not be granted this NL mode lock immediately.
-		 */
-		status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, file_lksb, LCK$M_SYSTEM | LCK$M_EXPEDITE,
-								&name_dsc, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-		{
-			if (dse_running)
-			{
-				/* try to acquire the lock synchronously without waiting */
-				status = gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, file_lksb, LCK$M_VALBLK | LCK$M_CONVERT |
-						LCK$M_NODLCKBLK | LCK$M_NOQUEUE, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-				if (SS$_NORMAL == status)
-					status = file_lksb->cond;
-				else if (SS$_NOTQUEUED == status)
-				{	/* someone else is holding the lock */
-					assert(0 != file_lksb->lockid && -1 != file_lksb->lockid);
-					status = get_lkpid(&name_dsc, LCK$K_PWMODE, &lk_pid);
-					if (SS$_NORMAL != status)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_TEXT, 2,
-							RTS_ERROR_LITERAL("Failed to get lock pid"),
-						ERR_CRITSEMFAIL, 2, DB_LEN_STR(reg), status);
-					} /* no 'else' needed, since the process wont come down after the rts_error */
-					if (lk_pid)
-						util_out_print("Access control lock for region !AD held by pid, !UL. "
-								"An attempt will be made in the next 30 seconds to grab it.",
-								TRUE, DB_LEN_STR(reg), lk_pid);
-					TREF(semwait2long) = FALSE;
-					start_timer(semwt2long_handler, MAX_SEM_WT, semwt2long_handler, 0, NULL);
-					/* do an asynchronous enq and then wait using wflor() */
-					status = gtm_enq(efn_immed_wait, LCK$K_PWMODE, file_lksb, LCK$M_VALBLK |
-						LCK$M_CONVERT | LCK$M_NODLCKBLK, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-					if (SS$_NORMAL != status)
-					{
-						cancel_timer(semwt2long_handler);
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_TEXT, 2,
-							RTS_ERROR_LITERAL("Failed to register an asynchronous enq"),
-							ERR_CRITSEMFAIL, 2, DB_LEN_STR(reg), status);
-					}
-					/* wait for the timer to expire or for the above enq() to finish */
-					efn_mask = ((SHFT_MSK << efn_timer) | (SHFT_MSK << efn_immed_wait));
-					status = sys$wflor(efn_immed_wait, efn_mask);
-					if (SS$_NORMAL != status)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_TEXT, 2,
-							RTS_ERROR_LITERAL("Wait-for-logical-or failed"), ERR_CRITSEMFAIL,
-							2, DB_LEN_STR(reg), status);
-					}
-					if (SS$_NORMAL != file_lksb->cond)
-					{
-						if (TREF(semwait2long))
-						{
-							status = get_lkpid(&name_dsc, LCK$K_PWMODE, &lk_pid);
-							if (SS$_NORMAL != status)
-							{
-								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_TEXT, 2,
-								RTS_ERROR_LITERAL("Failed to get lock pid"), ERR_CRITSEMFAIL, 2,
-								DB_LEN_STR(reg), status);
-							}
-							if (0 != lk_pid)
-								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_SEMWT2LONG, 7,
-									process_id, (MAX_SEM_WT / 1000),
-									LEN_AND_LIT("access control"), DB_LEN_STR(reg), lk_pid);
-							else
-								rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)
-									ERR_CRITSEMFAIL, 2, DB_LEN_STR(reg));
-						} else
-						{
-							cancel_timer(semwt2long_handler);
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)
-								ERR_CRITSEMFAIL, 2, DB_LEN_STR(reg));
-						}
-					} else
-					{
-						status = file_lksb->cond;
-						if (!TREF(semwait2long))
-							cancel_timer(semwt2long_handler);
-					}
-				}
-			} else
-			{
-				status = gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, file_lksb,
-					LCK$M_VALBLK | LCK$M_CONVERT | LCK$M_NODLCKBLK, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-				if (SS$_NORMAL == status)
-					status = file_lksb->cond;
-			}
-		}
-		if ((SS$_NORMAL != status) && (SS$_VALNOTVALID != status))
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), status);
-		if ((SS$_NORMAL == status) && (0 != file_lksb->valblk[0]) && (-1 != reg->node))
-		{
-			if (file_lksb->valblk[0] != node)
-			{
-				if (-1 == file_lksb->valblk[0])
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUPRECFLLCK, 2, DB_LEN_STR(reg));
-				if (FALSE == clustered)
-				{
-					syi_list.ilist.item_code = SYI$_NODENAME;
-					syi_list.ilist.buffer_address = nodename_buff;
-					syi_list.ilist.buffer_length = SIZEOF(nodename_buff) - 1;
-					syi_list.ilist.return_length_address = &retlen;
-					syi_list.terminator = 0;
-					status = sys$getsyiw(EFN$C_ENF, file_lksb->valblk, NULL, &syi_list, iosb, NULL, 0);
-					if (SS$_NORMAL == status)
-						status = iosb[0];
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_CLSTCONFLICT, 4, DB_LEN_STR(reg),
-						(SS$_NORMAL == status) ? strlen(nodename_buff) : 0, nodename_buff);
-				}
-			}
-		} else
-			file_lksb->valblk[0] = 0;
-	} else	if (IS_MUPIP_IMAGE)
-		mupip_jnl_recover = TRUE;
-
-	/* ------------------------------------ GT.CX: grab the lock on node --------------------------------------- */
-	memcpy(node_buff, "GT$N_", 5);
-	i2hex(node, &node_buff[5], 8);
-	if (TRUE == clustered)
-		node_dsc.dsc$w_length = 13;
-	else
-	{
-		node_buff[13] = read_write ? 'W' : 'R';
-		node_dsc.dsc$w_length = 14;
-	}
-	node_dsc.dsc$a_pointer = node_buff;
-	node_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	node_dsc.dsc$b_class = DSC$K_CLASS_S;
-	status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, &gds_info->cx_cntl_lsb, LCK$M_SYSTEM | LCK$M_EXPEDITE,
-			&node_dsc, file_lksb->lockid, NULL, 0, NULL, PSL$C_USER, 0);
-	if (SS$_NORMAL == status)
-	{
-		status = gtm_enqw(EFN$C_ENF, LCK$K_CRMODE, &gds_info->cx_cntl_lsb, LCK$M_CONVERT,
-				&node_dsc, file_lksb->lockid, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = gds_info->cx_cntl_lsb.cond;
-	}
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), status);
-
-	/* --------------------------- Re-read the fileheader inside the lock -------------------------------- */
-	fc = reg->dyn.addr->file_cntl;
-	fc->file_type = reg->dyn.addr->acc_meth;
-	fc->op = FC_READ;
-	fc->op_buff = (sm_uc_ptr_t)tsd;
-	fc->op_len = SIZEOF(*tsd);
-	fc->op_pos = 1;
-	status = dbfilop(fc);
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_DBFILERR, 2, DB_LEN_STR(reg), status,
-			gds_info->fab->fab$l_stv);
-
-	/* ----------------------------- init sections and establish pointers in csa --------------------- */
-	/* Since we are about to allocate new shared memory, if necessary, adjust the journal buffer size right now.
-	 * Note that if the process setting up shared memory is a read-only process, then we might not flush updated
-	 * jnl_buffer_size to the file header, which is fine because the value in shared memory is what all processes
-	 * are looking at. If necessary, the next process to initialize shared memory will repeat the process of
-	 * adjusting the jnl_buffer_size value.
-	 */
-	jnl_buffer_size = tsd->jnl_buffer_size;
-	if ((0 != jnl_buffer_size) && (jnl_buffer_size < (tsd->blk_size / DISK_BLOCK_SIZE + 1)))
-	{
-		ROUND_UP_MIN_JNL_BUFF_SIZE(tsd->jnl_buffer_size, tsd);
-		SNPRINTF(s, JNLBUFFUPDAPNDX_SIZE, JNLBUFFUPDAPNDX, JNL_BUFF_PORT_MIN(tsd), JNL_BUFFER_MAX);
-		send_msg_csa(CSA_ARG(NULL) VARLSTCNT(10) ERR_JNLBUFFREGUPD, 4, REG_LEN_STR(reg),
-			jnl_buffer_size, tsd->jnl_buffer_size, ERR_TEXT, 2, LEN_AND_STR(s));
-	}
-	/* The layout of shared memory depends on the number of mutex queue entries specified in the file header. Thus in
-	 * order to set, for example, csa->critical or csa->shmpool_buffer, we need to know this number. However, this
-	 * number can be zero if we have not yet done db_auto_upgrade. So go ahead and upgrade to the value that will
-	 * eventually be used, which is DEFAULT_NUM_CRIT_ENTRY.
-	 */
-	if (0 == NUM_CRIT_ENTRY(tsd))
-		NUM_CRIT_ENTRY(tsd) = DEFAULT_NUM_CRIT_ENTRY;
-	dbsecspc(reg, tsd, &sec_size);		/* calculate section size (filesize for MM) */
-	csa = &gds_info->s_addrs;
-	flags = SEC$M_GBL | SEC$M_SYSGBL;
-	if (is_bg)
-		flags |= SEC$M_WRT | SEC$M_PAGFIL | SEC$M_PERM;
-	else if (read_write)
-		flags |= SEC$M_WRT;
-	init_status = init_sec(csa->db_addrs, &name_dsc, gds_info->fab->fab$l_stv, sec_size, flags);
-	if ((SS$_NORMAL != init_status)
-		&& ((SS$_CREATED != init_status) || ((0 != file_lksb->valblk[0]) && (FALSE == clustered))))
-	{
-		if (SS$_CREATED == init_status)
-		{
-			del_sec(SEC$M_SYSGBL, &name_dsc, NULL);
-			rts_error_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_DBFILERR, 2, DB_LEN_STR(reg),
-				ERR_TEXT, 2, LEN_AND_LIT("Check for 'delete pending' sections - stop all accessors"));
-		} else
-		{
-			assert(FALSE);
-			rts_error_csa(CSA_ARG(csa) VARLSTCNT(9) ERR_DBFILERR, 2, DB_LEN_STR(reg),
-				ERR_TEXT, 2, LEN_AND_LIT("Error initializing shared memory"), init_status);
-		}
-	}
-	if (is_bg)
-		csa->nl = csa->db_addrs[0];
-	else
-	{
-		size = ROUND_UP(LOCK_SPACE_SIZE(tsd) + NODE_LOCAL_SPACE(tsd) + JNL_SHARE_SIZE(tsd) + SHMPOOL_BUFFER_SIZE,
-					OS_PAGE_SIZE) / OS_PAGELET_SIZE;
-		status = gtm_expreg(size, csa->lock_addrs, PSL$C_USER, 0);
-		if (SS$_NORMAL != status)
-		{
-			csa->lock_addrs[0] = NULL;
-			rts_error_csa(CSA_ARG(csa) VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), status);
-		}
-		assert(csa->lock_addrs[0] + size * OS_PAGELET_SIZE - 1 == csa->lock_addrs[1]);
-		name_buff[4] = 'L';
-		status = init_sec(csa->lock_addrs, &name_dsc, 0, size, SEC$M_PAGFIL | SEC$M_GBL | SEC$M_WRT | SEC$M_SYSGBL);
-		if ((SS$_NORMAL != status) && ((SS$_CREATED != status) || (SS$_NORMAL == init_status)))
-		{
-			if (SS$_CREATED == status)
-			{
-				del_sec(SEC$M_SYSGBL, &name_dsc, NULL);
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_DBFILERR, 2, DB_LEN_STR(reg),
-					ERR_TEXT, 2, LEN_AND_LIT("Check for 'delete pending' sections - stop all accessors"));
-			} else
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(9) ERR_DBFILERR, 2, DB_LEN_STR(reg),
-					ERR_TEXT, 2, LEN_AND_LIT("Error initializing MM non-file shared memory"), status);
-		}
-		csa->nl = csa->lock_addrs[0];
-	}
-	/* If shared memory is already initialized, do VERMISMATCH check BEFORE referencing any other fields in shared memory. */
-	if (SS$_CREATED == init_status)
-		TREF(new_dbinit_ipc) = TRUE;
-	else if (memcmp(csa->nl->now_running, gtm_release_name, gtm_release_name_len + 1))
-	{	/* Copy csa->nl->now_running into a local variable before passing to rts_error() due to the following issue.
-		 * In VMS, a call to rts_error copies only the error message and its arguments (as pointers) and
-		 *  transfers control to the topmost condition handler which is dbinit_ch() in this case. dbinit_ch()
-		 *  does a PRN_ERROR only for SUCCESS/INFO (VERMISMATCH is neither of them) and in addition
-		 *  nullifies csa->nl as part of its condition handling. It then transfers control to the next level condition
-		 *  handler which does a PRN_ERROR but at that point in time, the parameter csa->nl->now_running is no longer
-		 *  accessible and hence no parameter substitution occurs (i.e. the error message gets displayed with plain !ADs).
-		 * In UNIX, this is not an issue since the first call to rts_error() does the error message
-		 *  construction before handing control to the topmost condition handler. But it does not hurt to do the copy.
-		 */
-		assert(strlen(csa->nl->now_running) < SIZEOF(now_running));
-		memcpy(now_running, csa->nl->now_running, SIZEOF(now_running));
-		now_running[SIZEOF(now_running) - 1] = '\0';	/* protection against bad values of csa->nl->now_running */
-		rts_error_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_VERMISMATCH, 6, DB_LEN_STR(reg), gtm_release_name_len, gtm_release_name,
-			  LEN_AND_STR(now_running));
-	}
-	/* Neither the creator, nor the first-writer ==> Done with mod to shared memory ==> release the lock */
-	if ((0 != file_lksb->valblk[0]) && ((!read_write) || (csa->nl->ref_cnt > 0)))
-	{
-		if (read_write)
-		{
-			adawi(1, &csa->nl->ref_cnt);
-			assert(!csa->ref_cnt);	/* Increment shared ref_cnt before private ref_cnt increment. */
-			csa->ref_cnt++;		/* Currently journaling logic in gds_rundown() in VMS relies
-						 * 	on this order to detect last writer */
-			assert(csa->read_write);
-		}
-		if (FALSE == clustered)
-			status = gtm_enqw(EFN$C_ENF, LCK$K_CRMODE, file_lksb, LCK$M_CONVERT | LCK$M_NODLCKBLK,
-					NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		else
-			status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, file_lksb, LCK$M_CONVERT,
-					NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		lock_released = TRUE;
-		if (SS$_NORMAL == status)
-			status = file_lksb->cond;
-		if (SS$_NORMAL != status)
-			rts_error_csa(CSA_ARG(csa) VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), status);
-	}
-	csa->critical = (sm_uc_ptr_t)(csa->nl) + NODE_LOCAL_SIZE;
-	crash_count = csa->critical->crashcnt;	/* done in gvcst_init(), but needed before that for call to grab_crit() below */
-	/* Note: Here we check jnl_sate from database file and its value cannot change without standalone access.
-	 * The jnl_buff buffer should be initialized irrespective of read/write process */
-	JNL_INIT(csa, reg, tsd);
-	csa->shmpool_buffer = (shmpool_buff_hdr_ptr_t)((sm_uc_ptr_t)(csa->nl) + NODE_LOCAL_SPACE(tsd) + JNL_SHARE_SIZE(tsd));
-	csa->lock_addrs[0] = (sm_uc_ptr_t)(csa->shmpool_buffer) + SHMPOOL_BUFFER_SIZE;
-	csa->lock_addrs[1] = csa->lock_addrs[0] + LOCK_SPACE_SIZE(tsd) - 1;
-	if (is_bg)
-	{
-		nsd = csa->hdr = csa->lock_addrs[1] + 1 + CACHE_CONTROL_SIZE(tsd);
-		if (SS$_CREATED == init_status)
-		{
-			memcpy((uchar_ptr_t)nsd, (uchar_ptr_t)tsd, SIZEOF(sgmnt_data));
-			fc->file_type = dba_bg;
-			fc->op = FC_READ;
-			fc->op_buff = MM_ADDR(nsd);
-			fc->op_len = MASTER_MAP_SIZE(nsd);
-			fc->op_pos = MM_BLOCK;
-			status = dbfilop(fc);
-			if (SS$_NORMAL != status)
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(6) ERR_DBFILERR, 2, DB_LEN_STR(reg), status,
-					gds_info->fab->fab$l_stv);
-			if (nsd->owner_node)
-			{	/* Crash occurred. */
-				PRINT_CRASH_MESSAGE_2_ARGS(strlen((char *)local_nodename_buff), local_nodename_buff);
-			}
-		}
-	} else
-	{
-		nsd = csa->hdr = csa->db_addrs[0];
-		SET_MM_BASE_ADDR(csa, nsd);
-	}
-	csa->total_blks = nsd->trans_hist.total_blks;
-
-	/* ensure correct alignment */
-	assert((-(SIZEOF(int4) * 2) & (int)csa->critical) == csa->critical);
-	assert(0 == ((OS_PAGE_SIZE - 1) & (int)csa->critical));
-	assert(0 == ((OS_PAGE_SIZE - 1) & (int)csa->nl));
-	assert((!(JNL_ALLOWED(csa))) ||
-			(0 == ((OS_PAGE_SIZE - 1) & (int)((sm_uc_ptr_t)(csa->jnl->jnl_buff) - JNL_NAME_EXP_SIZE))));
-	assert(0 == ((OS_PAGE_SIZE - 1) & (int)csa->shmpool_buffer));
-	assert(0 == ((OS_PAGE_SIZE - 1) & (int)csa->lock_addrs[0]));
-	assert(0 == ((OS_PAGE_SIZE - 1) & (int)(csa->lock_addrs[1] + 1)));
-	assert(0 == ((OS_PAGE_SIZE - 1) & (int)csa->hdr));
-
-	/* ----------------------------- setup shared memory if needed -------------------------- */
-	if (SS$_CREATED == init_status)
-	{	/* initialize if new */
-		if (!clustered)
-			memset(csa->nl, 0, SIZEOF(*csa->nl));
-		if (JNL_ALLOWED(csa))
-		{	/* initialize jb->cycle to a value different from initial value of jpc->cycle (0). although this is not
-			 * necessary right now, in the future, the plan is to change jnl_ensure_open() to only do a cycle mismatch
-			 * check in order to determine whether to call jnl_file_open() or not. this is in preparation for that.
-			 */
-			csa->jnl->jnl_buff->cycle = 1;
-		}
-		memcpy(csa->nl->label, GDS_LABEL, GDS_LABEL_SZ - 1);				/* Database label */
-		assert(MAX_REL_NAME > gtm_release_name_len);
-		memcpy(csa->nl->now_running, gtm_release_name, gtm_release_name_len + 1);	/* GT.M version */
-		assert(MAX_FN_LEN > reg->dyn.addr->fname_len);
-		memcpy(csa->nl->fname, reg->dyn.addr->fname, reg->dyn.addr->fname_len);		/* file name */
-		memcpy(&csa->nl->unique_id.file_id[0], &(gds_info->file_id), SIZEOF(gds_file_id));		/* file id */
-		assert(MAX_MCNAMELEN > local_nodename_len);
-		memcpy(csa->nl->machine_name, local_nodename_buff, local_nodename_len);		/* node name */
-		csa->nl->owner_node = node;							/* node id */
-		csa->nl->wcs_staleness = -1;
-		csa->nl->wcs_timers = -1;
-		csa->nl->highest_lbm_blk_changed = -1;
-		csa->nl->nbb = BACKUP_NOT_IN_PROGRESS;
-		shmpool_buff_init(reg);
-		csa->nl->sec_size = sec_size;							/* Set the shared memory size */
-
-		/* save pointers in csa to access shared memory */
-		csa->nl->critical = (sm_off_t)((sm_uc_ptr_t)csa->critical - (sm_uc_ptr_t)csa->nl);
-		if (JNL_ALLOWED(csa))
-			csa->nl->jnl_buff = (sm_off_t)((sm_uc_ptr_t)csa->jnl->jnl_buff - (sm_uc_ptr_t)csa->nl);
-		csa->nl->shmpool_buffer = (sm_off_t)((sm_uc_ptr_t)csa->shmpool_buffer - (sm_uc_ptr_t)csa->nl);
-		if (is_bg)
-			/* In MM mode, it is possible that (eventually) shared mem and mapped mem could be > 4G apart */
-			csa->nl->hdr = (sm_off_t)((sm_uc_ptr_t)csa->hdr - (sm_uc_ptr_t)csa->nl);
-		csa->nl->lock_addrs = (sm_off_t)((sm_uc_ptr_t)csa->lock_addrs[0] - (sm_uc_ptr_t)csa->nl);
-
-		mlk_shr_init(csa->lock_addrs[0], nsd->lock_space_size, csa, read_write);
-
-		/* At this point, nsd->owner_node may indicate improper shutdown;  see if it's safe to continue */
-		if ((0 != nsd->owner_node) && (nsd->owner_node != node))
-		{
-			syi_list_2.ilist[0].item_code = SYI$_CLUSTER_MEMBER;
-			syi_list_2.ilist[0].buffer_address = &cluster_member;
-			syi_list_2.ilist[0].buffer_length = SIZEOF(cluster_member);
-			syi_list_2.ilist[0].return_length_address = &i; /* dummy - not used */
-			syi_list_2.ilist[1].item_code = SYI$_NODENAME;
-			syi_list_2.ilist[1].buffer_address = nodename_buff;
-			syi_list_2.ilist[1].buffer_length = SIZEOF(nodename_buff) - 1;
-			syi_list_2.ilist[1].return_length_address = &retlen;
-			syi_list_2.terminator = 0;
-			status = sys$getsyiw(EFN$C_ENF, &nsd->owner_node, NULL, &syi_list_2, iosb, NULL, 0);
-			if (SS$_NORMAL == status)
-				status = iosb[0];
-			if ((SS$_NORMAL != status) && (SS$_NOSUCHNODE != status))
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(7) ERR_CLSTCONFLICT, 4,
-					DB_LEN_STR(reg), LEN_AND_STR(nodename_buff), status);
-			/*** Temporarily add `&& !clustered' to the following condition,  ****
-			**** until a more specific solution to this problem is made, probably in ccp_close1 ***/
-			if ((SS$_NORMAL == status) && (TRUE == cluster_member) && (FALSE == clustered))
-			{	/* DB was improperly shutdown on another node in the cluster,
-				 * and that node is still running; force user to rundown.
-				 */
-				PRINT_CRASH_MESSAGE_2_ARGS(retlen, nodename_buff);
-			}
-			if (read_write)
-			{
-				CHECK_TN(csa, nsd, nsd->trans_hist.curr_tn + HEADER_UPDATE_COUNT); /* can issue TNTOOLARGE error */
-				nsd->trans_hist.curr_tn += HEADER_UPDATE_COUNT;
-			}
-		}
-		if (is_bg)
-		{
-			csa->nl->cache_off = -CACHE_CONTROL_SIZE(nsd);
-			db_csh_ini(csa);
-			bt_malloc(csa);
-			db_csh_ref(csa, TRUE);
-			if (0 == nsd->flush_trigger)
-				nsd->flush_trigger = FLUSH_FACTOR(nsd->n_bts);
-		}
-		if (!read_write)
-			csa->nl->remove_shm = TRUE;	/* gds_rundown can remove gblsec if first process has read-only access */
-		csa->nl->glob_sec_init = TRUE;
-		if (read_write || is_bg)
-		{	/* add current db_csh counters into the cumulative counters and reset the current counters */
-#			define TAB_DB_CSH_ACCT_REC(COUNTER, DUMMY1, DUMMY2)			\
-				csa->hdr->COUNTER.cumul_count += csa->hdr->COUNTER.curr_count;	\
-				csa->hdr->COUNTER.curr_count = 0;
-#			include "tab_db_csh_acct_rec.h"
-#			undef TAB_DB_CSH_ACCT_REC
-		}
-		gvstats_rec_csd2cnl(csa);	/* should be called before "db_auto_upgrade" */
-		db_auto_upgrade(reg);		/* should be called before "gtm_mutex_init" to ensure NUM_CRIT_ENTRY is nonzero */
-		mutex_init(csa->critical, NUM_CRIT_ENTRY(csa->hdr), FALSE);
-	} else
-	{
-		if (memcmp(csa->nl->label, GDS_LABEL, GDS_LABEL_SZ - 1))
-		{
-			name_buff[4] = 'S';
-			if (memcmp(csa->nl->label, GDS_LABEL, GDS_LABEL_SZ - 3))
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_GBLSECNOTGDS, 2, name_buff[0], &name_buff[1]);
-			else
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_BADGBLSECVER, 2, name_buff[0], &name_buff[1]);
-		}
-		if (memcmp(&csa->nl->unique_id.file_id[0], (char *)(&(gds_info->file_id)), SIZEOF(gds_file_id)))
-			rts_error_csa(CSA_ARG(csa) VARLSTCNT(4) ERR_FILEIDGBLSEC, 2, DB_LEN_STR(reg));
-		if (csa->nl->donotflush_dbjnl)
-		{
-			assert(FALSE);
-			PRINT_CRASH_MESSAGE_6_ARGS(strlen((char *)csa->nl->machine_name), csa->nl->machine_name, ERR_TEXT, 2,
-				SIZEOF("mupip recover/rollback created shared memory. Needs MUPIP RUNDOWN") - 1,
-				"mupip recover/rollback created shared memory. Needs MUPIP RUNDOWN");
-		}
-		/* verify pointers from our calculation vs. the copy in shared memory */
-		if (csa->nl->critical != (sm_off_t)((sm_uc_ptr_t)csa->critical - (sm_uc_ptr_t)csa->nl))
-		{
-			PRINT_CRASH_MESSAGE_8_ARGS(strlen((char *)csa->nl->machine_name), csa->nl->machine_name,
-				ERR_NLMISMATCHCALC, 4, SIZEOF("critical") - 1, "critical",
-				(uint4)((sm_uc_ptr_t)csa->critical - (sm_uc_ptr_t)csa->nl), (uint4)csa->nl->critical);
-		}
-		if ((JNL_ALLOWED(csa)) &&
-			(csa->nl->jnl_buff != (sm_off_t)((sm_uc_ptr_t)csa->jnl->jnl_buff - (sm_uc_ptr_t)csa->nl)))
-		{
-			PRINT_CRASH_MESSAGE_8_ARGS(strlen((char *)csa->nl->machine_name), csa->nl->machine_name,
-				ERR_NLMISMATCHCALC, 4, SIZEOF("journal buffer") - 1, "journal buffer",
-				(uint4)((sm_uc_ptr_t)csa->jnl->jnl_buff - (sm_uc_ptr_t)csa->nl), (uint4)csa->nl->jnl_buff);
-		}
-		if (csa->nl->shmpool_buffer != (sm_off_t)((sm_uc_ptr_t)csa->shmpool_buffer - (sm_uc_ptr_t)csa->nl))
-		{
-			PRINT_CRASH_MESSAGE_8_ARGS(strlen((char *)csa->nl->machine_name), csa->nl->machine_name,
-				ERR_NLMISMATCHCALC, 4, SIZEOF("backup buffer") - 1, "backup buffer",
-				(uint4)((sm_uc_ptr_t)csa->shmpool_buffer - (sm_uc_ptr_t)csa->nl), (uint4)csa->nl->shmpool_buffer);
-		}
-		if ((is_bg) && (csa->nl->hdr != (sm_off_t)((sm_uc_ptr_t)csa->hdr - (sm_uc_ptr_t)csa->nl)))
-		{
-			PRINT_CRASH_MESSAGE_8_ARGS(strlen((char *)csa->nl->machine_name), csa->nl->machine_name,
-				ERR_NLMISMATCHCALC, 4, SIZEOF("file header") - 1, "file header",
-				(uint4)((sm_uc_ptr_t)csa->hdr - (sm_uc_ptr_t)csa->nl), (uint4)csa->nl->hdr);
-		}
-		if (csa->nl->lock_addrs != (sm_off_t)((sm_uc_ptr_t)csa->lock_addrs[0] - (sm_uc_ptr_t)csa->nl))
-		{
-			PRINT_CRASH_MESSAGE_8_ARGS(strlen((char *)csa->nl->machine_name), csa->nl->machine_name,
-				ERR_NLMISMATCHCALC, 4, SIZEOF("lock address") - 1, "lock address",
-				(uint4)((sm_uc_ptr_t)csa->lock_addrs[0] - (sm_uc_ptr_t)csa->nl), (uint4)csa->nl->lock_addrs);
-		}
-		/* now_running is checked in gvcst_init, since they are portable */
-		if (is_bg)
-			db_csh_ini(csa);
-	}
-	if (gtm_fullblockwrites)
-	{	/* We have been asked to do FULL BLOCK WRITES for this database. Unlike *NIX, on VMS, we can get the
-		   underlying filsystem block/buffersize with a call to $GETDVI. This allows a full write of a block
-		   without the OS having to fetch the old block for a read/update operation. We will round the IOs
-		   (only from dsk_write() to the next filesystem blocksize if the following criteria are met:
-
-		   1) Database blocksize must be a whole multiple of the filesystem blocksize for the above
-		      mentioned reason.
-
-		   2) Filesystem blocksize must be a factor of the location of the first data block
-		      given by start_vbn.
-
-		   The saved length (if the feature is enabled) will be the filesystem blocksize and will be the
-		   length that a database IO is rounded up to prior to initiation of the IO.
-		*/
-		item_code = DVI$_DEVBUFSIZ;
-		status = lib$getdvi(&item_code, &gds_info->fab->fab$l_stv, NULL, &fbwsize, NULL, NULL);
-		if (SS$_NORMAL == status)
-		{
-			dblksize = csa->hdr->blk_size;
-			if (0 != fbwsize && (0 == dblksize % fbwsize) &&
-				(0 == ((csa->hdr->start_vbn - 1) * DISK_BLOCK_SIZE) % fbwsize))
-				csa->do_fullblockwrites = TRUE;		/* This region is fullblockwrite enabled */
-			/* Report this length in DSE even if not enabled */
-			csa->fullblockwrite_len = fbwsize;		/* Length for rounding fullblockwrite */
-		}	/* else if lib$getdvi fails.. do non-fullblockwrites */
-		else
-			send_msg_csa(CSA_ARG(csa) VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("getdvi DEVBUFSIZ"), CALLFROM, status);
-	}
-	if (!lock_released)
-	{
-		if (read_write)
-		{	/* ========= first writer =========== */
-			/* since lock_released was set based on csa->nl->ref_cnt and since the latter is not an accurate
-			 * indicator of whether we are the last writer or not, we need to be careful before modifying any
-			 * shared memory fields below, hence the grab_crit */
-			if (!csa->nl->wc_blocked)
-			{	/* if wc_blocked is TRUE and if journaling is enabled, grab_crit below will end up doing
-				 * wcs_recover which will try to open the journal file but will fail because cs_addrs
-				 * will be NULL since we have not yet opened this region (reg->open is still FALSE).
-				 * in that case we want to be safe and avoid doing the grab_crit().
-				 * this will be fixed as part of C9E01-002490.
-				 */
-				bt_init(csa);	/* needed to initialize csa->ti, csa->bt_header, csa->bt_base, csa->th_base */
-						/* used by grab_crit() and routines it invokes which are wcs_verify/wcs_recover */
-				grab_crit(reg);
-			}
-			csa->nl->remove_shm = FALSE;
-			assert(0 == csa->nl->ref_cnt);	/* ensure no other writer has incremented ref_cnt until now */
-			adawi(1, &csa->nl->ref_cnt);
-			assert(!csa->ref_cnt);	/* Increment shared ref_cnt before private ref_cnt increment. */
-			csa->ref_cnt++;		/* Currently journaling logic in gds_rundown() in VMS relies
-						 * 	on this order to detect last writer */
-			assert(csa->read_write);
-			memcpy(csa->hdr->now_running, gtm_release_name, gtm_release_name_len + 1);
-			csa->hdr->owner_node = node;
-			nsd->trans_hist.early_tn = nsd->trans_hist.curr_tn;
-			nsd->max_update_array_size = nsd->max_non_bm_update_array_size
-				= ROUND_UP2(MAX_NON_BITMAP_UPDATE_ARRAY_SIZE(nsd), UPDATE_ARRAY_ALIGN_SIZE);
-			nsd->max_update_array_size += ROUND_UP2(MAX_BITMAP_UPDATE_ARRAY_SIZE, UPDATE_ARRAY_ALIGN_SIZE);
-			assert(0 == memcmp(nsd, GDS_LABEL, GDS_LABEL_SZ - 1));
-			status = sys$qiow(EFN$C_ENF, gds_info->fab->fab$l_stv, IO$_WRITEVBLK, iosb, NULL, 0,
-				nsd, ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE), 1, 0, 0, 0);
-			if (SS$_NORMAL == status)
-				status = iosb[0];
-			if (csa->now_crit)
-				rel_crit(reg);
-			if (SS$_NORMAL != status)
-				rts_error_csa(CSA_ARG(csa) VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), status);
-		}
-		/* releasing the startup/shutdown lock */
-		file_lksb->valblk[0] = mupip_jnl_recover ? -1 : reg->node;
-		if ((FALSE == clustered) || (TRUE == mupip_jnl_recover))
-			status = gtm_enqw(EFN$C_ENF, mupip_jnl_recover ? LCK$K_EXMODE : LCK$K_CRMODE, file_lksb,
-					LCK$M_VALBLK | LCK$M_CONVERT | LCK$M_NODLCKBLK, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		else
-			status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, file_lksb, LCK$M_VALBLK | LCK$M_CONVERT,
-					NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = file_lksb->cond;
-		if (SS$_NORMAL != status)
-			rts_error_csa(CSA_ARG(csa) VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(reg), status);
-	}
-	reg->node = node;	/* In case MUPIP JOURNAL /RECOVER */
-	if ((TRUE == clustered) && (FALSE == CCP_SEGMENT_STATE(csa->nl, CCST_MASK_OPEN)))
-	{
-		ccp_sendmsg(CCTR_WRITEDB, &gds_info->file_id);
-		ccp_userwait(reg, CCST_MASK_OPEN, &nsd->ccp_response_interval, csa->nl->ccp_cycle);
-	}
-	REVERT;
-	return;
-}
diff --git a/sr_vvms/gvusr_queryget.c b/sr_vvms/gvusr_queryget.c
deleted file mode 100644
index 92c723d..0000000
--- a/sr_vvms/gvusr_queryget.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "str2gvkey.h"
-#include "gvusr.h"
-#include "gvusr_queryget.h"
-#include "stringpool.h"
-
-GBLREF gv_key	*gv_currkey;
-GBLREF gv_key	*gv_altkey;
-
-boolean_t gvusr_queryget(mval *v)
-{ /* this function logically should be in DDPGVUSR, but is now in GTMSHR because the tree of functions called from
-   * str2gvkey_nogvfunc use globals that are currently not setup in DDPGVUSR, and the number of globals makes for nasty problems
-   * in the link */
-
-	/* $Q and $G as separate steps, if $G returns "", loop until $Q returns "" or $Q and $G return non "" */
-
-	for (; ;)
-	{
-		if (gvusr_query(v))
-		{
-			str2gvkey_nogvfunc(v->str.addr, v->str.len, gv_currkey); /* setup gv_currkey from return of query */
-			if (gvusr_get(v))
-			{
-				s2pool(&v->str);
-				return TRUE;
-			}
-		} else
-			return FALSE;
-	}
-}
diff --git a/sr_vvms/ident.h b/sr_vvms/ident.h
deleted file mode 100644
index 3b32ff9..0000000
--- a/sr_vvms/ident.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define CONVERT_IDENT(to, from, len)	lower_to_upper(to, from, len)
diff --git a/sr_vvms/incr_link.h b/sr_vvms/incr_link.h
deleted file mode 100644
index 50d4fc8..0000000
--- a/sr_vvms/incr_link.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef INCR_LINK_INCLUDED
-#define INCR_LINK_INCLUDED
-
-bool incr_link(unsigned char *fab, bool libr);
-
-#endif /* INCR_LINK_INCLUDED */
diff --git a/sr_vvms/init_sec.c b/sr_vvms/init_sec.c
deleted file mode 100644
index 9f9cdd0..0000000
--- a/sr_vvms/init_sec.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <prvdef.h>
-#include <psldef.h>
-#include <secdef.h>
-#include <ssdef.h>
-
-#include "gtmsecshr.h"
-
-uint4	init_sec(uint4 *retadr, struct dsc$descriptor_s	*gsdnam, uint4 chan, uint4 pagcnt, uint4 flags)
-{
-	uint4	inadr[2], status;
-	uint4	prvadr[2], prvprv[2];
-
-	GTMSECSHR_SET_PRIV((PRV$M_SYSGBL | PRV$M_PRMGBL), status);
-	if (SS$_NORMAL == status)
-	{
-		inadr[0] = retadr[0];
-		inadr[1] = retadr[1];
-		status = sys$crmpsc(inadr, retadr, PSL$C_USER, flags, gsdnam, NULL, 0,
-				    flags & SEC$M_PAGFIL ? 0 : chan,
-				    pagcnt, 0, 0, 0);
-		GTMSECSHR_REL_PRIV;
-	}
-	return status;
-}
diff --git a/sr_vvms/init_sec.h b/sr_vvms/init_sec.h
deleted file mode 100644
index 8885b67..0000000
--- a/sr_vvms/init_sec.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef INIT_SEC_INCLUDED
-#define INIT_SEC_INCLUDED
-
-uint4 init_sec(uint4 *retadr, struct dsc$descriptor_s *gsdnam, uint4 chan, uint4 pagcnt, uint4 flags);
-
-#endif /* INIT_SEC_INCLUDED */
diff --git a/sr_vvms/interlock.h b/sr_vvms/interlock.h
deleted file mode 100644
index 0934333..0000000
--- a/sr_vvms/interlock.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef INTERLOCK_H_INCLUDED
-#define INTERLOCK_H_INCLUDED
-
-#include "lockconst.h"
-#include "compswap.h"
-#include "aswp.h"
-
-/* LATCH_{CLEAR,SET,CONFLICT} need to be in ascending order. wcs_* routines on this ordering for detecting out-of-range values */
-#define LATCH_CLEAR	-1
-#define LATCH_SET	0
-#define LATCH_CONFLICT	1
-#define	WRITE_LATCH_VAL(cr)	(cr)->interlock.semaphore	/* this can take either of the above 3 LATCH_* values */
-
-#define INTERLOCK_INIT(X) ((X)->interlock.semaphore = LATCH_CLEAR, (X)->read_in_progress = -1)
-
-#define INTERLOCK_INIT_MM(X) ((X)->interlock.semaphore = LATCH_CLEAR)
-
-#define LOCK_NEW_BUFF_FOR_UPDATE(X) ((X)->interlock.semaphore = LATCH_SET)
-#define LOCK_BUFF_FOR_UPDATE(X, Y, Z) (Y = adawi(1, &(X)->interlock.semaphore))
-#define RELEASE_BUFF_UPDATE_LOCK(X, Y, Z) (Y = adawi(-1, &(X)->interlock.semaphore))
-#define LOCK_BUFF_FOR_WRITE(X, Y) (Y = adawi(1, &(X)->interlock.semaphore))
-#define CLEAR_BUFF_UPDATE_LOCK(X) (adawi(-1, &(X)->interlock.semaphore))
-
-#define LOCK_BUFF_FOR_READ(X, Y) (Y = adawi(1, &(X)->read_in_progress))
-#define RELEASE_BUFF_READ_LOCK(X) (adawi(-1, &(X)->read_in_progress))
-
-#define WRITER_BLOCKED_BY_PROC(X) ((X) >= LATCH_SET)
-#define WRITER_OWNS_BUFF(X) ((X) > LATCH_SET)
-#define WRITER_STILL_OWNS_BUFF(X, Y) (Y = adawi(-1, &(X)->interlock.semaphore), (Y > LATCH_CLEAR))
-#define OWN_BUFF(X) ((X) < LATCH_CONFLICT)
-
-#define ADD_ENT_TO_ACTIVE_QUE_CNT(X, Y) (adawi(1, (X)))
-#define SUB_ENT_FROM_ACTIVE_QUE_CNT(X, Y) (adawi(-1, (X)))
-
-#define INCR_CNT(X, Y) (adawi(1, (X)))
-#define DECR_CNT(X, Y) (adawi(-1, (X)))
-
-#define GET_SWAPLOCK(X)			(COMPSWAP_LOCK((X), LOCK_AVAILABLE, 0, process_id, image_count))
-/* Use COMPSWAP_UNLOCK to release the lock because of the memory barrier and other-processor notification it implies. Also
- * the usage of COMPSWAP_UNLOCK allows us to check (with low cost) that we have/had the lock we are trying to release.
- * If we don't have the lock and are trying to release it, a GTMASSERT seems the logical choice as the logic is very broken
- * at that point.  If this macro is used in part of an expression, the GTMASSERT path must also return a value (to keep
- * the compiler happy) thus the construct (GTMASSERT, 0) which returns a zero (see usage with assert() on UNIX).
- */
-#define RELEASE_SWAPLOCK(X)		((COMPSWAP_UNLOCK((X), process_id, image_count, LOCK_AVAILABLE, 0)) ? 1 : (GTMASSERT, 0))
-
-#endif /* INTERLOCK_H_INCLUDED */
diff --git a/sr_vvms/io_get_fgn_driver.c b/sr_vvms/io_get_fgn_driver.c
deleted file mode 100644
index 5351b55..0000000
--- a/sr_vvms/io_get_fgn_driver.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include <descrip.h>
-#include "gtm_caseconv.h"
-
-#define MAX_DRIVER_NAME_LEN 8
-#define PROLOG "GTM$DRIVER$"
-
-struct fgn_driver_list_struct
-{
-	unsigned char name[MAX_DRIVER_NAME_LEN];
-	struct fgn_driver_list_struct *next;
-	dev_dispatch_struct disp_table;
-};
-
-static struct fgn_driver_list_struct *fgn_driver_root = 0;
-
-dev_dispatch_struct *io_get_fgn_driver(mstr *s)
-{
-	struct fgn_driver_list_struct *ptr;
-	unsigned char in_name[MAX_DRIVER_NAME_LEN], *cp;
-	unsigned char image_name[MAX_DRIVER_NAME_LEN + SIZEOF(PROLOG)];
-	int n, nmax;
-	uint4 status;
-	struct dsc$descriptor_s image_name_desc;
-	int4 (*callback)();
-
-	nmax = s->len;
-	if (nmax > MAX_DRIVER_NAME_LEN)
-		nmax = MAX_DRIVER_NAME_LEN;
-	lower_to_upper(in_name, s->addr, nmax);
-	for (n = nmax, cp = &in_name[nmax] ; n < MAX_DRIVER_NAME_LEN ; n++)
-		*cp++ = 0;
-	for (ptr = fgn_driver_root ; ptr ; ptr = ptr->next)
-	{
-		if (memcmp(in_name, ptr->name, SIZEOF(ptr->name)) == 0)
-			return &(ptr->disp_table);
-	}
-	memcpy(image_name, PROLOG, SIZEOF(PROLOG) - 1);
-	memcpy(&image_name[SIZEOF(PROLOG) - 1], in_name, nmax);
-	image_name_desc.dsc$w_length = nmax + SIZEOF(PROLOG) - 1;
-	assert(image_name_desc.dsc$w_length < SIZEOF(image_name));
-	image_name_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	image_name_desc.dsc$b_class = DSC$K_CLASS_S;
-	image_name_desc.dsc$a_pointer = image_name;
-	status = lib$find_image_symbol(&image_name_desc, & image_name_desc, &callback);
-	if ((status & 1) == 0)
-	{
-		rts_error(VARLSTCNT(1) status);
-		return 0;
-	}
-	ptr = malloc(SIZEOF(*ptr));
-	/* NOTE: SHOULD PROTECT THIS WITH CONDITION HANDLER */
-	status = (*callback)(&(ptr->disp_table));
-	if ((status & 1) == 0)
-	{
-		free(ptr);
-		rts_error(VARLSTCNT(1) status);
-		return 0;
-	}
-	memcpy(ptr->name, in_name, SIZEOF(ptr->name));
-	ptr->next = fgn_driver_root;
-	fgn_driver_root = ptr;
-	return &ptr->disp_table;
-}
diff --git a/sr_vvms/io_init_name.c b/sr_vvms/io_init_name.c
deleted file mode 100644
index 9351a56..0000000
--- a/sr_vvms/io_init_name.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "outofband.h"
-#include "io.h"
-#include "gtm_logicals.h"
-
-#define mstr_set_str(x,y) ((x)->addr = (y), (x)->len = SIZEOF(y) - 1)
-
-GBLDEF uint4	std_dev_outofband_msk;
-GBLDEF mstr		sys_input;
-GBLDEF mstr		sys_output;
-GBLDEF mstr		gtm_principal;
-
-void io_init_name(void)
-{
-	uint4   disable_mask;
-
-	disable_mask = CTRLY_MSK ;
-	lib$disable_ctrl(&disable_mask, &std_dev_outofband_msk);
-	std_dev_outofband_msk &= CTRLY_MSK;
-	mstr_set_str(&gtm_principal, GTM_PRINCIPAL);
-	mstr_set_str(&sys_input,"SYS$INPUT");
-	mstr_set_str(&sys_output ,"SYS$OUTPUT");
-}
diff --git a/sr_vvms/io_is_rm.c b/sr_vvms/io_is_rm.c
deleted file mode 100644
index b0393c1..0000000
--- a/sr_vvms/io_is_rm.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "io.h"
-
-
-bool io_is_rm(mstr *name)
-
-{
-    return(io_type(name) == rm);
-}
diff --git a/sr_vvms/io_is_sn.c b/sr_vvms/io_is_sn.c
deleted file mode 100644
index f5ad0a3..0000000
--- a/sr_vvms/io_is_sn.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <dcdef.h>
-#include <devdef.h>
-#include <dvidef.h>
-#include <descrip.h>
-#include "io.h"
-
-/* This module determines whether a vms device is NONLOCAL and therefore a network device, generally sys$net.
-In UNIX, it always returns false. */
-bool io_is_sn(mstr *tn)
-{
-	uint4	devclass;	/* device classification information */
-	uint4	devtype;	/* device type information */
-	int4	item_code;
-	uint4	stat;
-
-	$DESCRIPTOR(buf_desc,"");
-
-	item_code = DVI$_DEVCLASS;
-
-	buf_desc.dsc$a_pointer = tn->addr;
-	buf_desc.dsc$w_length = tn->len;
-	stat = lib$getdvi(&item_code
-			 ,0
-			 ,&buf_desc
-			 ,&devclass
-			 ,0 , 0);
-	if (stat == SS$_NONLOCAL)
-		return TRUE;
-	else
-		return FALSE;
-}
diff --git a/sr_vvms/io_open_try.c b/sr_vvms/io_open_try.c
deleted file mode 100644
index 7f783d2..0000000
--- a/sr_vvms/io_open_try.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "gt_timer.h"
-#include "io.h"
-#include "iotimer.h"
-#include "io_params.h"
-#include "io_dev_dispatch.h"
-#include "gtm_caseconv.h"
-#include "outofband.h"
-#include "gtmimagename.h"
-
-LITREF dev_dispatch_struct	io_dev_dispatch[];
-LITREF unsigned char		io_params_size[];
-GBLREF int4			outofband;
-GBLREF int4			write_filter;
-GBLREF io_desc			*active_device;
-
-bool io_open_try(io_log_name *naml, io_log_name *tl, mval *pp, int4 timeout, mval *mspace)
-{
-	char		buf1[MAX_TRANS_NAME_LEN];	/* buffer to hold translated name */
-	char		dev_type[MAX_DEV_TYPE_LEN];
-        int             n;
-	mstr		tn;				/* translated name */
-	uint4		stat;				/* status */
-	int		p_offset;
-	unsigned char	ch;
-	ABS_TIME	cur_time, end_time;
-	bool		out_of_time = FALSE;
-
-	if (0 == naml->iod)
-	{
-		if (0 == tl->iod)
-		{
-			tl->iod = (io_desc *)malloc(SIZEOF(io_desc));
-			memset((char*)tl->iod, 0, SIZEOF(io_desc));
-			tl->iod->pair.in  = tl->iod;
-			tl->iod->pair.out = tl->iod;
-			tl->iod->trans_name = tl;
-			p_offset = 0;
-			while (iop_eol != *(pp->str.addr + p_offset))
-			{
-				if ((iop_tmpmbx == (ch = *(pp->str.addr + p_offset++))) || (iop_prmmbx == ch))
-					tl->iod->type = mb;
-				else  if (iop_nl == ch)
-					tl->iod->type = nl;
-				p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-					(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-			}
-			if (!tl->iod->type && mspace && mspace->str.len)
-			{
-				lower_to_upper(dev_type, mspace->str.addr, mspace->str.len);
-				if (((SIZEOF("SOCKET") - 1) == mspace->str.len)
-					&& (0 == memcmp(dev_type, LIT_AND_LEN("SOCKET"))))
-					tl->iod->type = gtmsocket;
-				else
-					tl->iod->type = us;
-			}
-			if (!tl->iod->type)
-			{
-				tn.len = tl->len;
-				tn.addr = &tl->dollar_io;
-				tl->iod->type = io_type(&tn);
-			}
-		}
-		naml->iod = tl->iod;
-	}
-	tl->iod->disp_ptr = &io_dev_dispatch[tl->iod->type];
-	assert(0 != naml->iod);
-	active_device = naml->iod;
-	if (dev_never_opened == naml->iod->state)
-	{
-		naml->iod->wrap = DEFAULT_IOD_WRAP;
-		naml->iod->width = DEFAULT_IOD_WIDTH;
-		naml->iod->length = DEFAULT_IOD_LENGTH;
-		naml->iod->write_filter = write_filter;
-	}
-	if (dev_open != naml->iod->state)
-	{
-		naml->iod->dollar.x = 0;
-		naml->iod->dollar.y = 0;
-		naml->iod->dollar.za = 0;
-		naml->iod->dollar.zb[0] = 0;
-		naml->iod->dollar.zeof = FALSE;
-	}
-	if (0 == timeout)
-		stat = (naml->iod->disp_ptr->open)(naml, pp, -1, mspace, timeout);	/* ZY: add a parameter timeout */
-	else  if (NO_M_TIMEOUT == timeout)
-	{
-		while (FALSE == (stat = (naml->iod->disp_ptr->open)(naml, pp, -1, mspace, timeout)))	/* ZY: add timeout */
-		{
-			hiber_start(1000);	/* 1 second */
-			if (outofband)
-				outofband_action(FALSE);
-		}
-	} else
-	{
-		sys_get_curr_time(&cur_time);
-		add_int_to_abs_time(&cur_time, timeout * 1000, &end_time);
-		while (FALSE == (stat = (naml->iod->disp_ptr->open)(naml, pp, -1, mspace, timeout))	/* ZY: add timeout */
-			&& (!out_of_time))
-		{
-			hiber_start(1000);	/* 1 second */
-			if (outofband)
-				outofband_action(FALSE);
-			sys_get_curr_time(&cur_time);
-			if (abs_time_comp(&end_time, &cur_time) <= 0)
-				out_of_time = TRUE;
-		}
-	}
-	if (TRUE == stat)
-	{
-		naml->iod->state = dev_open;
-		if (27 == naml->iod->trans_name->dollar_io[0])
-		{
-			tn.addr = &naml->iod->trans_name->dollar_io[4];
-			n = naml->iod->trans_name->len - 4;
-			if (n < 0)
-				n = 0;
-			tn.len = n;
-			naml->iod->trans_name = get_log_name(&tn, INSERT);
-			naml->iod->trans_name->iod = naml->iod;
-		}
-	}
-	else
-	{
-		if (dev_open == naml->iod->state && (gtmsocket != naml->iod->type))
-			naml->iod->state = dev_closed;
-		else if ((gtmsocket == naml->iod->type) && naml->iod->newly_created)
-		{
-			assert(naml->iod->state != dev_open);
-			iosocket_destroy(naml->iod);
-		}
-	}
-	active_device = 0;
-	if ((NO_M_TIMEOUT != timeout) && IS_MCODE_RUNNING)
-		return (stat);
-	return FALSE;
-}
diff --git a/sr_vvms/io_type.c b/sr_vvms/io_type.c
deleted file mode 100644
index 83f920f..0000000
--- a/sr_vvms/io_type.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <dcdef.h>
-#include <devdef.h>
-#include <dvidef.h>
-#include "gtm_limits.h"
-#include "io.h"
-#include <descrip.h>
-
-enum io_dev_type io_type(mstr *tn)
-{
-	enum io_dev_type type;
-	uint4	devchar;	/* device characteristics information */
-	uint4	devclass;	/* device classification information */
-	uint4	devtype;	/* device type information */
-	int4		item_code;
-	uint4	stat;
-	error_def(ERR_INVSTRLEN);
-
-	$DESCRIPTOR(buf_desc,"");
-
-	if (SHRT_MAX < tn->len)
-		rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, tn->len, SHRT_MAX);
-	item_code = DVI$_DEVCLASS;
-	buf_desc.dsc$a_pointer = tn->addr;
-	buf_desc.dsc$w_length = tn->len;
-	stat = lib$getdvi(&item_code
-			 ,0
-			 ,&buf_desc
-			 ,&devclass
-			 ,0 , 0);
-	if (stat == SS$_NOSUCHDEV || stat == SS$_IVDEVNAM)
-	{	type = rm;
-	}
-	else if (stat == SS$_NORMAL)
-	{
-		item_code = DVI$_DEVCHAR;
-		stat = lib$getdvi(&item_code
-				 ,0
-				 ,&buf_desc
-				 ,&devchar
-				 ,0 , 0);
-		if (stat != SS$_NORMAL &&  stat != SS$_NONLOCAL)
-		{	rts_error(VARLSTCNT(1)  stat );
-		}
-		switch(devclass)
-		{
-    			case DC$_TAPE:
-				if (devchar & DEV$M_FOR)
-				{	type = mt;
-				}
-				else
-				{	type = rm;
-				}
-				break;
-			case DC$_TERM:
-				type = tt;
-				break;
-			case DC$_MAILBOX:
-				item_code = DVI$_DEVTYPE;
-				stat = lib$getdvi(&item_code
-						 ,0
-						 ,&buf_desc
-						 ,&devtype
-						 ,0 , 0);
-				if (stat != SS$_NORMAL)
-				{	rts_error(VARLSTCNT(1)  stat );
-				}
-				if (devtype == DT$_NULL)
-					type = nl;
-				else
-					type = mb;
-				break;
-			case DC$_DISK:
-			default:
-				type = rm;
-				break;
-		}
-	}
-	else if (stat == SS$_NONLOCAL)
-	{
-		type = rm;
-	}else
-	{	rts_error(VARLSTCNT(1) stat);
-	}
-	return type;
-}
diff --git a/sr_vvms/ioff_open.c b/sr_vvms/ioff_open.c
deleted file mode 100644
index d76e8ed..0000000
--- a/sr_vvms/ioff_open.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-/* STUB file for VMS */
-
-void ioff_open()
-{
-	return;
-}
diff --git a/sr_vvms/iomb_cancel_read.c b/sr_vvms/iomb_cancel_read.c
deleted file mode 100644
index f990671..0000000
--- a/sr_vvms/iomb_cancel_read.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include "efn.h"
-#include "io.h"
-#include "iombdef.h"
-
-void iomb_cancel_read(mb_ptr)
-d_mb_struct *mb_ptr;
-{
-	uint4	status;
-
-	if (!mb_ptr->stat_blk.status)
-	{
-#ifdef DEBUG
-/* this is for an assert that verifies a reliance on VMS IOSB maintenance */
-		mb_ptr->timer_on = FALSE;
-#endif
-		status = sys$cancel(mb_ptr->channel);
-		if (status  != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-	}
-	return;
-}
diff --git a/sr_vvms/iomb_close.c b/sr_vvms/iomb_close.c
deleted file mode 100644
index 2474557..0000000
--- a/sr_vvms/iomb_close.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include "io.h"
-#include "iombdef.h"
-#include "io_params.h"
-#include "stringpool.h"
-
-LITREF unsigned char io_params_size[];
-
-void iomb_close(io_desc *device, mval *pp)
-{
-	unsigned char	ch;
-	uint4		status;
-	d_mb_struct	*mb_ptr;
-	int 		p_offset;
-
-	if (device->state == dev_open)
-	{
-		p_offset = 0;
-		mb_ptr = (d_mb_struct *)device->dev_sp;
-		while ((ch = *(pp->str.addr + p_offset++)) != iop_eol)
-		{
-			if (ch == iop_delete)
-			{
-				if ((status = sys$delmbx(mb_ptr->channel)) != SS$_NORMAL)
-					rts_error(VARLSTCNT(1)  status);
-			}
-			if (ch == iop_exception)
-			{
-				device->error_handler.len = *(pp->str.addr + p_offset);
-				device->error_handler.addr = (char *)(pp->str.addr + p_offset + 1);
-				s2pool(&device->error_handler);
-			}
-			p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-				(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-		}
-		if (status = sys$dassgn(mb_ptr->channel) != SS$_NORMAL)
-			rts_error(VARLSTCNT(1)  status);
-		device->state = dev_closed;
-		if (mb_ptr->inbuf != 0)
-			free(mb_ptr->inbuf);
-	}
-	return;
-}
diff --git a/sr_vvms/iomb_dataread.c b/sr_vvms/iomb_dataread.c
deleted file mode 100644
index 860b27a..0000000
--- a/sr_vvms/iomb_dataread.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-
-#include "efn.h"
-#include "io.h"
-#include "iombdef.h"
-#include "iotimer.h"
-#include "timedef.h"
-#include "outofband.h"
-
-#define SHFT_MSK 0x00000001
-#define TIMER_FLAGS 0
-
-GBLREF io_pair	io_curr_device;
-GBLREF int4	outofband;
-
-int iomb_dataread(int4 timeout)
-{
-	bool		timed;
-	uint4		efn_mask, status, temp_read_mask, time[2];
-	io_desc		*io_ptr;
-	d_mb_struct	*mb_ptr;
-
-	error_def(ERR_MBXWRTONLY);
-	error_def(ERR_IOEOF);
-
-	io_ptr = io_curr_device.in;
-	assert(dev_open == io_ptr->state);
-	io_ptr->dollar.zeof = FALSE;
-	mb_ptr = (d_mb_struct *)io_ptr->dev_sp;
-	if (IO_SEQ_WRT == mb_ptr->promsk)
-		rts_error(VARLSTCNT(1) ERR_MBXWRTONLY);
-	mb_ptr->in_pos = mb_ptr->in_top = mb_ptr->inbuf;
-	temp_read_mask = mb_ptr->read_mask;
-#ifdef DEBUG
-/* this is for an assert that verifies a reliance on VMS IOSB maintenance */
-	mb_ptr->timer_on = TRUE;
-#endif
-	mb_ptr->stat_blk.status = 0;
-	efn_mask = (SHFT_MSK << efn_immed_wait | SHFT_MSK << efn_outofband);
-	if ((NO_M_TIMEOUT == timeout) || !timeout)
-	{
-		timed = FALSE;
-		if (!timeout)
-			temp_read_mask |= IO$M_NOW;
-	} else
-	{
-		timed = TRUE;
-		time[0] = -time_low(timeout);
-		time[1] = -time_high(timeout) - 1;
-		efn_mask |= SHFT_MSK << efn_timer;
-		status = sys$setimr(efn_timer, &time, iomb_cancel_read, mb_ptr, TIMER_FLAGS);
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-	}
-	status = sys$qio(efn_immed_wait, mb_ptr->channel
-				,temp_read_mask, &mb_ptr->stat_blk
-				,NULL, 0
-				,mb_ptr->inbuf, mb_ptr->maxmsg
-				,0, 0, 0, 0);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	status = sys$wflor(efn_immed_wait, efn_mask);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	if (timed)
-	{
-		status = sys$cantim(mb_ptr, 0);
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-	}
-	if (!mb_ptr->stat_blk.status)
-	{
-		if (outofband)
-		{
-			status = sys$dclast(iomb_cancel_read, mb_ptr, 0);
-			if (SS$_NORMAL != status)
-				rts_error(VARLSTCNT(1) status);
-		}
-		status = sys$synch(efn_immed_wait, &mb_ptr->stat_blk);
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-	}
-	if (outofband)
-	{
-		outofband_action(FALSE);
-		assert(FALSE);
-	}
-	io_ptr->dollar.za = 0;
-	switch(mb_ptr->stat_blk.status)
-	{
-	case SS$_BUFFEROVF:
-		/* io_ptr->dollar.za = 1;	* data mangled		* this error information is currently discarded */
-	case SS$_NORMAL:
-		assert(mb_ptr->stat_blk.char_ct <= mb_ptr->maxmsg);
-		if ((0 == timeout) && !mb_ptr->stat_blk.char_ct)
-			return FALSE;
-		mb_ptr->in_top = mb_ptr->inbuf + mb_ptr->stat_blk.char_ct;
-		io_ptr->dollar.za = (short)mb_ptr->stat_blk.pid;	/* $za is too small to hold the full VMS pid */
-		return TRUE;
-		break;
-	case SS$_ABORT:
-	case SS$_CANCEL:
-		assert(!mb_ptr->timer_on);
-		return FALSE;
-		break;
-	case SS$_ENDOFFILE:
-		io_ptr->dollar.za = (short)mb_ptr->stat_blk.pid;	/* $za is too small to hold the full VMS pid */
-		if (!io_ptr->dollar.za)
-			return FALSE;
-		io_ptr->dollar.zeof = TRUE;
-		if (io_ptr->error_handler.len > 0)
-			rts_error(VARLSTCNT(1) ERR_IOEOF);
-		return TRUE;
-		break;
-	default:							/* NOREADER and NOWRITER are currently unsolicited */
-		if (!mb_ptr->stat_blk.status)
-			GTMASSERT;
-		rts_error(VARLSTCNT(1)  mb_ptr->stat_blk.status);
-	}
-}
diff --git a/sr_vvms/iomb_dummy.c b/sr_vvms/iomb_dummy.c
deleted file mode 100644
index 334e611..0000000
--- a/sr_vvms/iomb_dummy.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-short iomb_dummy(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 timeout)
-{
-	return 0;
-}
diff --git a/sr_vvms/iomb_flush.c b/sr_vvms/iomb_flush.c
deleted file mode 100644
index f756204..0000000
--- a/sr_vvms/iomb_flush.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-void iomb_flush(io_desc *iod)
-{
-	return;
-}
diff --git a/sr_vvms/iomb_open.c b/sr_vvms/iomb_open.c
deleted file mode 100644
index 09e2c04..0000000
--- a/sr_vvms/iomb_open.c
+++ /dev/null
@@ -1,188 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <descrip.h>
-#include <dcdef.h>
-#include <dvidef.h>
-#include <iodef.h>
-#include <jpidef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-#include "io.h"
-#include "io_params.h"
-#include "iombdef.h"
-#include "vmsdtype.h"
-#include "stringpool.h"
-#include "trans_log_name.h"
-#include "copy.h"
-
-#define MBX_FUNC_R (IO$_READVBLK)
-#define MBX_FUNC_W (IO$_WRITEVBLK | IO$M_NOW)
-#define TERM_READ_MIN_BCOUNT 1037
-#define MBX_BCOUNT 1200
-#define	UCB$V_PRMMBX	0	/* from $UCBDEF macro */
-
-LITREF unsigned char io_params_size[];
-
-short iomb_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 timeout)
-{
-	bool		create;
-	unsigned char	buf1[MAX_TRANS_NAME_LEN];
-	short		buf_ret, cls_ret, return_length, sts_ret;
-	int4		byte_count, blocksize;
-	uint4		devbuf, devclass, devsts, status;
-	int		p_offset;
-	d_mb_struct	*mb_ptr;
-	io_desc		*ioptr;
-	io_log_name	*tl;
-	mstr		v, tn;
-	params		ch;
-	struct dsc$descriptor	lognam;
-	struct	{
-		item_list_3	item;
-		int4		terminator;
-		} getjpi_item_list = {4, JPI$_BYTCNT, &byte_count, &return_length, 0};
-	struct	{
-		item_list_3	item[3];
-		int4		terminator;
-		} getdvi_item_list = {4, DVI$_DEVSTS, &devsts, &sts_ret,
-				4, DVI$_DEVCLASS, &devclass, &cls_ret,
-				4, DVI$_DEVBUFSIZ, &devbuf, &buf_ret,
-				0};
-
-	error_def(ERR_INSFFBCNT);
-	error_def(ERR_DEVPARMNEG);
-
-	p_offset = 0;
-	ioptr = dev_name->iod;
-	if (ioptr->state == dev_never_opened)
-	{
-		ioptr->dev_sp = (d_mb_struct *)(malloc(SIZEOF(d_mb_struct)));
-		mb_ptr = (d_mb_struct *)ioptr->dev_sp;
-		mb_ptr->maxmsg = DEF_MB_MAXMSG;
-		mb_ptr->promsk = 0;
-		mb_ptr->del_on_close = FALSE;
-		mb_ptr->prmflg = 0;
-		mb_ptr->read_mask = MBX_FUNC_R;
-		mb_ptr->write_mask = MBX_FUNC_W;
-		ioptr->state = dev_closed;
-	}
-	mb_ptr = (d_mb_struct *)ioptr->dev_sp;
-	if (ioptr->state != dev_open)
-	{
-		status = sys$getjpiw(EFN$C_ENF, 0, 0, &getjpi_item_list, 0, 0, 0);
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-		if (byte_count < TERM_READ_MIN_BCOUNT + MBX_BCOUNT)
-			rts_error(VARLSTCNT(1) ERR_INSFFBCNT);
-		lognam.dsc$w_length	= (unsigned short)dev_name->len;
-		lognam.dsc$b_dtype	= DSC$K_DTYPE_T;
-		lognam.dsc$b_class	= DSC$K_CLASS_S;
-		lognam.dsc$a_pointer	= dev_name->dollar_io;
-		create = TRUE;
-		status = sys$getdviw(EFN$C_ENF, 0, &lognam, &getdvi_item_list,
-			0, 0, 0, 0);
-		if ((status == SS$_NORMAL) && (devclass == DC$_MAILBOX))
-			create = FALSE;
-		while ((ch = *(pp->str.addr + p_offset++)) != iop_eol)
-		{
-			switch(ch)
-			{
-				case iop_blocksize:
-					GET_LONG(blocksize, pp->str.addr + p_offset);
-					if (blocksize < 0)
-						rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-					mb_ptr->maxmsg = blocksize;
-					break;
-				case iop_delete:
-					mb_ptr->del_on_close = TRUE;
-					break;
-				case iop_readonly:
-					mb_ptr->promsk = IO_RD_ONLY;
-					break;
-				case iop_noreadonly:
-					mb_ptr->promsk &= ~IO_RD_ONLY;
-					break;
-				case iop_writeonly:
-					mb_ptr->promsk = IO_SEQ_WRT;
-					break;
-				case iop_nowriteonly:
-					mb_ptr->promsk &= ~IO_SEQ_WRT;
-					break;
-				case iop_prmmbx:
-					mb_ptr->prmflg = 1;
-					break;
-				case iop_tmpmbx:
-					mb_ptr->prmflg = 0;
-					break;
-				case iop_exception:
-					ioptr->error_handler.len = *(pp->str.addr + p_offset);
-					ioptr->error_handler.addr = pp->str.addr + p_offset + 1;
-					s2pool(&ioptr->error_handler);
-					break;
-				default:
-					break;
-			}
-			p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-				(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-		}
-		if (create)
-			status = sys$crembx(mb_ptr->prmflg
-				,&(mb_ptr->channel)
-				,mb_ptr->maxmsg
-				,mb_ptr->maxmsg
-				,mb_ptr->promsk
-				,0
-				,&lognam);
-		else
-		{
-			status = sys$assign(&lognam, &(mb_ptr->channel), 0, 0);
-			mb_ptr->maxmsg = devbuf;
-			mb_ptr->prmflg = (devsts >> UCB$V_PRMMBX) & 1;
-		}
-		switch(status)
-		{
-			case SS$_NORMAL:
-				v.addr = lognam.dsc$a_pointer;
-				v.len = lognam.dsc$w_length;
-				if ((status = trans_log_name(&v, &tn, buf1)) != SS$_NORMAL)
-					rts_error(VARLSTCNT(1) status);
-				tl = get_log_name(&tn, INSERT);
-				tl->iod = dev_name->iod;
-				tl->iod->trans_name = tl;
-				break;
-			case SS$_EXBYTLM:
-			case SS$_EXPORTQUOTA:
-			case SS$_INSFMEM:
-			case SS$_INTERLOCK:
-			case SS$_NOIOCHAN:
-				return FALSE;
-			default:
-				rts_error(VARLSTCNT(1)  status);
-		}
-		ioptr->width = mb_ptr->maxmsg;
-		if (mb_ptr->prmflg && mb_ptr->del_on_close)
-		{
-			if ((status = sys$delmbx(mb_ptr->channel)) != SS$_NORMAL)
-				rts_error(VARLSTCNT(1)  status);
-		}
-		mb_ptr->in_pos = mb_ptr->in_top = mb_ptr->inbuf = malloc(ioptr->width);
-		ioptr->length = DEF_MB_LENGTH;
-		ioptr->state = dev_open;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/iomb_rdone.c b/sr_vvms/iomb_rdone.c
deleted file mode 100644
index ff25d78..0000000
--- a/sr_vvms/iomb_rdone.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <iodef.h>
-#include "io.h"
-#include "iombdef.h"
-
-GBLREF		io_pair io_curr_device;
-
-int iomb_rdone(mint *v,int4 t)
-{
-	short		not_timed_out;
-	io_desc		*io_ptr;
-	d_mb_struct	*mb_ptr;
-
-	io_ptr = io_curr_device.in;
-	assert (io_ptr->state == dev_open);
-	mb_ptr = (d_mb_struct *) io_ptr->dev_sp;
-
-	if (mb_ptr->in_top == mb_ptr->in_pos)
-		not_timed_out = iomb_dataread(t);
-	else
-		not_timed_out = TRUE;
-
-	if (not_timed_out && (mb_ptr->in_top != mb_ptr->in_pos))
-	{
-		*v = *mb_ptr->in_pos++;
-		if ((++io_ptr->dollar.x > io_ptr->width) && io_ptr->wrap)
-		{
-			io_ptr->dollar.y += (io_ptr->dollar.x / io_ptr->width);
-			if(io_ptr->length)
-				io_ptr->dollar.y %= io_ptr->length;
-			io_ptr->dollar.x %= io_ptr->width;
-		}
-	} else
-	{
-		*v = -1;
-		if (io_ptr->dollar.zeof)
-		{
-			io_ptr->dollar.x = 0;
-			io_ptr->dollar.y++;
-		}
-	}
-
-	return not_timed_out;
-}
diff --git a/sr_vvms/iomb_read.c b/sr_vvms/iomb_read.c
deleted file mode 100644
index 81e45fa..0000000
--- a/sr_vvms/iomb_read.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <iodef.h>
-#include "io.h"
-#include "iombdef.h"
-#include "stringpool.h"
-
-GBLREF io_pair		io_curr_device;
-GBLREF spdesc 		stringpool;
-
-int iomb_read(mval *v, int4 t)
-{
-	short		not_timed_out;
-	io_desc		*io_ptr;
-	d_mb_struct	*mb_ptr;
-
-	io_ptr = io_curr_device.in;
-	assert (io_ptr->state == dev_open);
-	mb_ptr = (d_mb_struct *) io_ptr->dev_sp;
-
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.free <= stringpool.top);
-	ENSURE_STP_FREE_SPACE(mb_ptr->maxmsg);
-	v->str.addr = stringpool.free;
-
-	if (mb_ptr->in_top == mb_ptr->in_pos)
-		not_timed_out = iomb_dataread(t);
-	else
-		not_timed_out = TRUE;
-
-	memcpy(v->str.addr,mb_ptr->in_pos,(v->str.len = mb_ptr->in_top - mb_ptr->in_pos));
-	mb_ptr->in_pos = mb_ptr->in_top = mb_ptr->inbuf;
-
-	if (io_ptr->wrap && ((io_ptr->dollar.x += v->str.len) > io_ptr->width))
-	{
-		io_ptr->dollar.y += (io_ptr->dollar.x / io_ptr->width);
-		if(io_ptr->length)
-			io_ptr->dollar.y %= io_ptr->length;
-		io_ptr->dollar.x %= io_ptr->width;
-	}
-	io_ptr->dollar.x = 0;
-	io_ptr->dollar.y++;
-	return not_timed_out;
-}
diff --git a/sr_vvms/iomb_readfl.c b/sr_vvms/iomb_readfl.c
deleted file mode 100644
index 39c6043..0000000
--- a/sr_vvms/iomb_readfl.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <iodef.h>
-#include "io.h"
-#include "iombdef.h"
-
-GBLREF io_pair	io_curr_device;
-
-int iomb_readfl(mval *v,int4 length,int4 t)
-{
-	int		not_timed_out;
-	int		len;
-	io_desc		*io_ptr;
-	d_mb_struct	*mb_ptr;
-
-	io_ptr = io_curr_device.in;
-	assert (io_ptr->state == dev_open);
-	mb_ptr = (d_mb_struct *) io_ptr->dev_sp;
-
-	if (mb_ptr->in_top == mb_ptr->in_pos)
-		not_timed_out = iomb_dataread(t);
-	else
-		not_timed_out = TRUE;
-
-	if ((len = mb_ptr->in_top - mb_ptr->in_pos) > length)
-		len = length;
-
-	memcpy(v->str.addr,mb_ptr->in_pos,len);
-	v->str.len = len;
-	mb_ptr->in_pos += len;
-	if (io_ptr->dollar.zeof)
-	{
-		io_ptr->dollar.x = 0;
-		io_ptr->dollar.y++;
-	}else
-	{
-		if ((io_ptr->dollar.x += len) > io_ptr->width && io_ptr->wrap)
-		{
-			io_ptr->dollar.y += (io_ptr->dollar.x / io_ptr->width);
-			if(io_ptr->length)
-				io_ptr->dollar.y %= io_ptr->length;
-			io_ptr->dollar.x %= io_ptr->width;
-		}
-	}
-	return not_timed_out;
-}
diff --git a/sr_vvms/iomb_use.c b/sr_vvms/iomb_use.c
deleted file mode 100644
index 6d68499..0000000
--- a/sr_vvms/iomb_use.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "io_params.h"
-#include "iombdef.h"
-#include "compiler.h"
-#include "stringpool.h"
-#include "copy.h"
-
-LITREF unsigned char io_params_size[];
-
-void iomb_use(io_desc *iod, mval *pp)
-{
-	int4		length, width;
-	uint4		status;
-	d_mb_struct	*mb_ptr;
-	params		ch;
-	int		p_offset;
-
-	error_def(ERR_DEVPARMNEG);
-
-	p_offset = 0;
-	iomb_flush(iod);
-	mb_ptr = (d_mb_struct *)iod->dev_sp;
-	while ((ch = *(pp->str.addr + p_offset++)) != iop_eol)
-	{
-		switch (ch)
-		{
-		case iop_writeof:
-			status = sys$qiow(EFN$C_ENF, mb_ptr->channel
-					,IO$_WRITEOF | IO$M_NOW, &mb_ptr->stat_blk
-					,NULL, 0
-					,0 ,0, 0, 0, 0, 0);
-			if (status != SS$_NORMAL)
-				rts_error(VARLSTCNT(1) status);
-			break;
-		case iop_delete:
-			if (mb_ptr->prmflg && mb_ptr->del_on_close)
-			{
-				if ((status = sys$delmbx(mb_ptr->channel)) != SS$_NORMAL)
-					rts_error(VARLSTCNT(1) status);
-			}
-			break;
-		case iop_exception:
-			iod->error_handler.len = *(pp->str.addr + p_offset);
-			iod->error_handler.addr = pp->str.addr + p_offset + 1;
-			s2pool(&iod->error_handler);
-			break;
-		case iop_length:
-			GET_LONG(length, pp->str.addr + p_offset);
-			if (length < 0)
-				rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-			iod->length = length;
-			break;
-		case iop_wait:
-			mb_ptr->write_mask &= ~IO$M_NOW;
-			break;
-		case iop_nowait:
-			mb_ptr->write_mask |= IO$M_NOW;
-			break;
-		case iop_width:
-			GET_LONG(width, pp->str.addr + p_offset);
-			if (width < 0)
-				rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-			if (width == 0)
-			{
-				iod->wrap = FALSE;
-				iod->width = mb_ptr->maxmsg;
-			} else
-			{
-				iod->width = width;
-				iod->wrap = TRUE;
-			}
-			break;
-		case iop_wrap:
-			iod->wrap = TRUE;
-			break;
-		case iop_nowrap:
-			iod->wrap = FALSE;
-			break;
-		default:
-			break;
-		}
-		p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-			(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-	}
-}
diff --git a/sr_vvms/iomb_write.c b/sr_vvms/iomb_write.c
deleted file mode 100644
index 4365db0..0000000
--- a/sr_vvms/iomb_write.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include "efn.h"
-#include "io.h"
-#include "iombdef.h"
-#include "outofband.h"
-
-#define SHFT_MSK 0x00000001
-
-GBLREF int4	outofband;
-GBLREF io_pair	io_curr_device;
-
-void iomb_write(mstr *v)
-{
-	unsigned char 		*ch;
-	int			len, out_len;
-	uint4		status, efn_mask;
-	d_mb_struct 		*mb_ptr;
-	mb_iosb 		stat_blk;
-	error_def(ERR_MBXRDONLY);
-
-	mb_ptr = (d_mb_struct *)io_curr_device.out->dev_sp;
-	if (mb_ptr->promsk == IO_RD_ONLY)
-		rts_error(VARLSTCNT(1) ERR_MBXRDONLY);
-
-	efn_mask = (SHFT_MSK << efn_immed_wait | SHFT_MSK << efn_outofband);
-	for (ch = v->addr, len = v->len ; ; )
-	{	if (len > mb_ptr->maxmsg)
-			out_len = mb_ptr->maxmsg;
-		else
-			out_len = len;
-		status = sys$qio(efn_immed_wait ,mb_ptr->channel
-	  			,mb_ptr->write_mask ,&stat_blk
-				,NULL,0
-				,ch ,out_len ,0 ,0 ,0 ,0);
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-
-		status = sys$wflor(efn_immed_wait,efn_mask);
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-
-		if (outofband)
-		{
-			status = sys$cancel(mb_ptr->channel);
-			if (status != SS$_NORMAL)
-				rts_error(VARLSTCNT(1) status);
-			status = sys$synch(efn_immed_wait, &stat_blk);
-			if (status != SS$_NORMAL)
-				rts_error(VARLSTCNT(1) status);
-			assert(stat_blk.status == SS$_CANCEL || stat_blk.status == SS$_ABORT);
-			outofband_action(FALSE);
-			assert(FALSE);
-		}
-
-		if (stat_blk.status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-
-		if ((len -= out_len) == 0)
-			break;
-		ch += out_len;
-	}
-	if ((io_curr_device.out->dollar.x += v->len) > io_curr_device.out->width && io_curr_device.out->wrap)
-	{
-		io_curr_device.out->dollar.y += (io_curr_device.out->dollar.x / io_curr_device.out->width);
-		if (io_curr_device.out->length)
-			io_curr_device.out->dollar.y %= io_curr_device.out->length;
-		io_curr_device.out->dollar.x %= io_curr_device.out->width;
-	}
-}
diff --git a/sr_vvms/iomb_wteol.c b/sr_vvms/iomb_wteol.c
deleted file mode 100644
index cc80657..0000000
--- a/sr_vvms/iomb_wteol.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-void iomb_wteol(int4 v, io_desc *iod)
-{
-	mstr	temp;
-	int4	s;
-	char 	ptr[2];
-
-	temp.len = 2;
-	ptr[0] = '\15';
-	ptr[1] = '\12';
-	temp.addr = ptr;
-	for (s = 0; s++ < v ; )
-	{
-		iod->dollar.x -= 2;
-		iomb_write(&temp);
-	}
-	iod->dollar.x = 0;
-	iod->dollar.y += v;
-	if(iod->length)
-		iod->dollar.y %= iod->length;
-	return;
-}
diff --git a/sr_vvms/iomb_wtff.c b/sr_vvms/iomb_wtff.c
deleted file mode 100644
index d8b1077..0000000
--- a/sr_vvms/iomb_wtff.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-GBLREF io_pair io_curr_device;
-
-void iomb_wtff(void)
-{
-	mstr	temp;
-	char	p[1];
-
-	p[0] = '\14';
-	temp.len = 1;
-	temp.addr = p;
-	iomb_write(&temp);
-	io_curr_device.out->dollar.x = 0;
-	io_curr_device.out->dollar.y = 0;
-	return;
-}
diff --git a/sr_vvms/iombdef.h b/sr_vvms/iombdef.h
deleted file mode 100644
index d47e13c..0000000
--- a/sr_vvms/iombdef.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __IOMBDEF_H
-#define __IOMBDEF_H
-
-#define DEF_MB_MAXMSG	255
-#define DEF_MB_LENGTH	66
-
-/* *************************************************************** */
-/* ***********	structure for the mailbox driver  ***************  */
-/* *************************************************************** */
-
-typedef struct
-{	unsigned short status;
-	unsigned short char_ct;
-	uint4 pid;
-} mb_iosb;
-
-typedef struct
-{
-	unsigned short	channel;
-	uint4		maxmsg;
-	uint4		promsk;
-	unsigned char	del_on_close;
-	bool		timer_on;
-	unsigned char	prmflg;
-	uint4		read_mask;
-	uint4		write_mask;
-	unsigned char	*inbuf;
-	unsigned char	*in_pos;
-	unsigned char	*in_top;
-	mb_iosb		stat_blk;
-} d_mb_struct;
-
-void iomb_cancel_read(d_mb_struct *mb_ptr);
-
-#endif
diff --git a/sr_vvms/iomt_closesp.c b/sr_vvms/iomt_closesp.c
deleted file mode 100644
index 492e730..0000000
--- a/sr_vvms/iomt_closesp.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-void iomt_closesp(int4 channel)
-{
-    sys$dassgn(channel);
-    return;
-}
diff --git a/sr_vvms/iomt_open.c b/sr_vvms/iomt_open.c
deleted file mode 100644
index 9ef91d9..0000000
--- a/sr_vvms/iomt_open.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "io.h"
-#include "iosp.h"
-#include "iottdef.h"
-#include "iomtdef.h"
-#include "io_params.h"
-#include "nametabtyp.h"
-#include "toktyp.h"
-#include "stringpool.h"
-#include "namelook.h"
-#include "copy.h"
-
-LITDEF unsigned char LIB_AB_ASC_EBC[256] =
-{
-	0, 1, 2, 3, 55, 45, 46, 47, 22, 5, 37, 11, 12, 13, 14,
-	15, 16, 17, 18, 19, 60, 61, 50, 38, 24, 25, 63, 39, 28, 29, 30,
-	31, 64, 79, 127, 123, 91, 108, 80, 125, 77, 93, 92, 78, 107, 96, 75,
-	97, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 122, 94, 76, 126, 110,
-	111, 124, 193, 194, 195, 196, 197, 198, 199, 200, 201, 209, 210, 211, 212, 213,
-	214, 215, 216, 217, 226, 227, 228, 229, 230, 231, 232, 233, 74, 224, 90, 95,
-	109, 121, 129, 130, 131, 132, 133, 134, 135, 136, 137, 145, 146, 147, 148, 149,
-	150, 151, 152, 153, 162, 163, 164, 165, 166, 167, 168, 169, 192, 106, 208, 161,
-	7, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
-	63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 255
-};
-LITDEF unsigned char LIB_AB_EBC_ASC[256] =
-{
-	0, 1, 2, 3, 92, 9, 92, 127, 92, 92, 92, 11, 12, 13, 14,
-	15, 16, 17, 18, 19, 92, 92, 8, 92, 24, 25, 92, 92, 28, 29, 30,
-	31, 92, 92, 92, 92, 92, 10, 23, 27, 92, 92, 92, 92, 92, 5, 6,
-	7, 92, 92, 22, 92, 92, 92, 92, 4, 92, 92, 92, 92, 20, 21, 92,
-	26, 32, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 46, 60, 40, 43,
-	33, 38, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 36, 42, 41, 59,
-	94, 45, 47, 92, 92, 92, 92, 92, 92, 92, 92, 124, 44, 37, 95, 62,
-	63, 92, 92, 92, 92, 92, 92, 92, 92, 92, 96, 58, 35, 64, 39, 61,
-	34, 92, 97, 98, 99, 100, 101, 102, 103, 104, 105, 92, 92, 92, 92, 92,
-	92, 92, 106, 107, 108, 109, 110, 111, 112, 113, 114, 92, 92, 92, 92, 92,
-	92, 92, 126, 115, 116, 117, 118, 119, 120, 121, 122, 92, 92, 92, 92, 92,
-	92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
-	92, 123, 65, 66, 67, 68, 69, 70, 71, 72, 73, 92, 92, 92, 92, 92,
-	92, 125, 74, 75, 76, 77, 78, 79, 80, 81, 82, 92, 92, 92, 92, 92,
-	92, 92, 92, 83, 84, 85, 86, 87, 88, 89, 90, 92, 92, 92, 92, 92,
-	92, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 92, 92, 92, 92, 92, 255
-};
-LITREF unsigned char io_params_size[];
-
-static readonly nametabent mtlab_names[] =
-{
-	 {3, "ANS"}, {4,"ANSI"}, { 3, "DOS"}, { 5, "DOS11"}
-};
-static readonly unsigned char mtlab_index[27] =
-{
-	0, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4
-	,4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
-	,4, 4, 4
-};
-static readonly char mtlab_type[]={ MTLAB_ANSI, MTLAB_ANSI, MTLAB_DOS11, MTLAB_DOS11  };
-
-error_def(ERR_DEVPARMNEG);
-error_def(ERR_MTRECTOOBIG);
-error_def(ERR_MTRECGTRBLK);
-error_def(ERR_MTBLKTOOBIG);
-error_def(ERR_MTBLKTOOSM);
-error_def(ERR_MTFIXRECSZ);
-error_def(ERR_MTRECTOOSM);
-error_def(ERR_MTINVLAB);
-error_def(ERR_MTDOSFOR);
-error_def(ERR_MTANSIFOR);
-error_def(ERR_MTIS);
-error_def(ERR_VARRECBLKSZ);
-
-#define VREC_HDR_LEN	4
-
-short iomt_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 timeout)
-{
-	bool		do_rewind, do_erase;
-	int		lab_type;
-	unsigned char	*buff, ch, len;
-	int4		length, blocksize, recordsize;
-	uint4		status;
-	d_mt_struct	*mt, newmt;
-	iosb		io_status_blk;
-	io_desc		*ioptr;
-	char		*tab;
-	int		p_offset;
-
-	ioptr = dev_name->iod;
-	buff = 0;
-	memset(&newmt, 0, SIZEOF(newmt));		/* zero structure to start */
-	if (ioptr->state == dev_never_opened)
-		ioptr->dev_sp =(void *)(malloc(SIZEOF(d_mt_struct)));
-	mt = (d_mt_struct *)dev_name->iod->dev_sp;
-	if (ioptr->state == dev_open && mt->buffer)
-	{
-		if (mt->bufftoggle < 0)
-			buff = (mt->buffer + mt->bufftoggle);
-		else
-			buff = (mt->buffer);
-	}
-	do_rewind = do_erase = FALSE;
-	if (ioptr->state == dev_never_opened)
-	{
-		length = DEF_MT_LENGTH;
-		newmt.read_mask = IO_READLBLK;
-		newmt.write_mask = IO_WRITELBLK;
-		newmt.block_sz = MTDEF_BUF_SZ;
-		newmt.record_sz = MTDEF_REC_SZ;
-		newmt.ebcdic = FALSE;
-		newmt.labeled = FALSE;
-		newmt.fixed = FALSE;
-		newmt.stream = FALSE;
-		newmt.read_only = FALSE;
-		newmt.newversion = FALSE;
-		newmt.last_op = mt_null;
-		newmt.wrap = TRUE;
-	}
-	else
-	{
-		length = ioptr->length;
-		newmt = *mt;
-	}
-	p_offset = 0;
-	while (*(pp->str.addr + p_offset) != iop_eol)
-	{
-		switch (ch = *(pp->str.addr + p_offset++))
-		{
-		case iop_blocksize:
-			GET_LONG(blocksize, pp->str.addr + p_offset);
-			if (blocksize < 0)
-				rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-			else if (blocksize > MAX_BLK_SZ)
-				rts_error(VARLSTCNT(1) ERR_MTBLKTOOBIG);
-			else if (blocksize < MIN_BLK_SZ)
-				rts_error(VARLSTCNT(3) ERR_MTBLKTOOSM, 1, MIN_BLK_SZ);
-			newmt.block_sz = blocksize;
-			break;
-		case iop_recordsize:
-			GET_LONG(recordsize, (pp->str.addr + p_offset));
-			if (recordsize < 0)
-				rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-			if (recordsize > MAX_REC_SZ)
-				rts_error(VARLSTCNT(1) ERR_MTRECTOOBIG);
-			newmt.record_sz = recordsize;
-
-			break;
-		case iop_rewind:
-			do_rewind = TRUE;
-			break;
-		case iop_erasetape:
-			do_erase = TRUE;
-			break;
-		case iop_newversion:
-			newmt.newversion = TRUE;
-			break;
-		case iop_readonly:
-			newmt.read_only = TRUE;
-			break;
-		case iop_noreadonly:
-			newmt.read_only = FALSE;
-			break;
-		case iop_ebcdic:
-			newmt.ebcdic = TRUE;
-			break;
-		case iop_noebcdic:
-			newmt.ebcdic = FALSE;
-			break;
-		case iop_nolabel:
-			newmt.labeled = FALSE;
-			break;
-		case iop_label:
-			len = *(pp->str.addr + p_offset);
-			tab = pp->str.addr + p_offset + 1;
-			if ((lab_type = namelook(mtlab_index, mtlab_names, tab, len)) < 0)
-			{
-				rts_error(VARLSTCNT(1) ERR_MTINVLAB);
-				return FALSE;
-			}
-			newmt.labeled = mtlab_type[lab_type];
-			break;
-		case iop_fixed:
-			newmt.fixed = TRUE;
-			break;
-		case iop_nofixed:
-			newmt.fixed = FALSE;
-			break;
-		case iop_rdcheckdata:
-			newmt.read_mask |= IO_M_DATACHECK;
-			break;
-		case iop_nordcheckdata:
-			newmt.read_mask &= (~(IO_M_DATACHECK));
-			break;
-		case iop_wtcheckdata:
-			newmt.write_mask |= IO_M_DATACHECK;
-			break;
-		case iop_nowtcheckdata:
-			newmt.write_mask &= (~(IO_M_DATACHECK));
-			break;
-		case iop_inhretry:
-			newmt.write_mask |= IO_M_INHRETRY;
-			newmt.read_mask |= IO_M_INHRETRY;
-			break;
-		case iop_retry:
-			newmt.write_mask &= ~IO_M_INHRETRY;
-			newmt.read_mask &= ~IO_M_INHRETRY;
-			break;
-		case iop_inhextgap:
-			newmt.write_mask |= IO_M_INHEXTGAP;
-			break;
-		case iop_extgap:
-			newmt.write_mask &= ~IO_M_INHEXTGAP;
-			break;
-		case iop_stream:
-			newmt.stream = TRUE;
-			break;
-		case iop_nostream:
-			newmt.stream = FALSE;
-			break;
-		case iop_wrap:
-			newmt.wrap = TRUE;
-			break;
-		case iop_nowrap:
-			newmt.wrap = FALSE;
-			break;
-		case iop_length:
-			GET_LONG(length, pp->str.addr + p_offset);
-			if (length < 0)
-				rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-			break;
-		case iop_exception:
-			ioptr->error_handler.len = *(pp->str.addr + p_offset);
-			ioptr->error_handler.addr = pp->str.addr + p_offset + 1;
-			s2pool(&ioptr->error_handler);
-			break;
-		default:
-			break;
-		}
-		p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-			(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-	}
-	if (newmt.labeled == MTLAB_DOS11)
-		if (!newmt.stream)
-		{
-			rts_error(VARLSTCNT(6) ERR_MTDOSFOR, 0 ,ERR_MTIS, 2,
-				ioptr->trans_name->len, ioptr->trans_name->dollar_io);
-		}
-
-	if (newmt.labeled == MTLAB_ANSI)
-		if (newmt.stream)
-		{	rts_error(VARLSTCNT(6) ERR_MTANSIFOR, 0 ,ERR_MTIS, 2,
-				ioptr->trans_name->len, ioptr->trans_name->dollar_io);
-		}
-	if (newmt.stream)
-	{	newmt.wrap = TRUE;
-		newmt.fixed = FALSE;
-	}
-	if (newmt.fixed)
-	{
-		if (newmt.record_sz < MIN_FIXREC_SZ)
-			rts_error(VARLSTCNT(1) ERR_MTRECTOOSM);
-		if (newmt.block_sz / newmt.record_sz * newmt.record_sz != newmt.block_sz)
-			rts_error(VARLSTCNT(4) ERR_MTFIXRECSZ, 2, newmt.block_sz, newmt.record_sz);
-	}
-	else
-	{	if (newmt.record_sz > MAX_VARREC_SZ)
-			rts_error(VARLSTCNT(1) ERR_MTRECTOOBIG);
-		if (newmt.record_sz < MIN_VARREC_SZ)
-			rts_error(VARLSTCNT(1) ERR_MTRECTOOSM);
-		if (newmt.block_sz < newmt.record_sz + (newmt.stream ? 2 : VREC_HDR_LEN))
-			rts_error(VARLSTCNT(1) ERR_VARRECBLKSZ);
-	}
-	if (newmt.record_sz > newmt.block_sz)
-		rts_error(VARLSTCNT(1) ERR_MTRECGTRBLK);
-	if (ioptr->state != dev_open)
-	{
-		status = iomt_opensp(dev_name, &newmt);
-		if (status == MT_BUSY)
-			return FALSE;
-		if (status == MT_TAPERROR)
-			rts_error(VARLSTCNT(1) newmt.access_id);
-	}
-	if (newmt.fixed)
-	{
-		newmt.buffer = (unsigned char *)malloc(newmt.block_sz);
-		newmt.bufftoggle = 0;
-	} else
-	{
-		newmt.buffer = (unsigned char *)malloc(newmt.block_sz * 2);
-		newmt.bufftoggle = newmt.block_sz;
-	}
-	if (buff)
-		free(buff);
-	newmt.bufftop = newmt.buffptr = newmt.buffer;
-	newmt.last_op = mt_null;
-	ioptr->state = dev_open;
-	*mt = newmt;
-	ioptr->width = newmt.record_sz;
-	ioptr->length = length;
-	ioptr->dollar.zeof = FALSE;
-	ioptr->dollar.x = 0;
-	ioptr->dollar.y = 0;
-	if (do_erase)
-		iomt_erase(ioptr);
-	if (do_rewind)
-		iomt_rewind(ioptr);
-	if (mt->labeled)
-	{
-		status = iomt_sense(mt, &io_status_blk);
-		if (status != SS_NORMAL)
-		{
-			ioptr->dollar.za = 9;
-			rts_error(VARLSTCNT(5)  status,
-				ERR_MTIS, 2, ioptr->trans_name->len, ioptr->trans_name->dollar_io);
-		}
-		if (io_status_blk.dev_dep_info & MT_M_BOT)
-			mt->last_op = mt_rewind;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/iomt_opensp.c b/sr_vvms/iomt_opensp.c
deleted file mode 100644
index 9c2cf71..0000000
--- a/sr_vvms/iomt_opensp.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "iomtdef.h"
-#include <descrip.h>
-#include <ssdef.h>
-
-uint4  iomt_opensp(
-io_log_name  *dev_name,
-d_mt_struct *mtdef)
-{
-	uint4  status, channel;
-	$DESCRIPTOR(file_name,"");
-
-	file_name.dsc$a_pointer = dev_name->dollar_io;
-	file_name.dsc$w_length = (unsigned short) dev_name->len;
-	if ((status = sys$assign(&file_name,&channel,0,0)) == SS$_DEVALLOC
-			|| status == SS$_INSFMEM || status == SS$_NOIOCHAN)
-	{	status = MT_BUSY;
-	}
-	else if (status != SS$_NORMAL)
-	{	mtdef->access_id = status;
-		status = MT_TAPERROR;
-	}
-	else
-		mtdef->access_id = channel;
-	return status;
-}
-
diff --git a/sr_vvms/iomt_qio.c b/sr_vvms/iomt_qio.c
deleted file mode 100644
index fbecb3b..0000000
--- a/sr_vvms/iomt_qio.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "iomtdef.h"
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-void iomt_qio(io_desc *iod, uint4 mask, uint4 parm)
-{
-	uint4 status, status1;
-	iosb io_status_blk;
-	d_mt_struct   *mt_ptr;
-	error_def (ERR_MTIS);
-
-	io_status_blk.status = 0;
-	mt_ptr = (d_mt_struct *) iod->dev_sp;
-	status = sys$qiow(EFN$C_ENF,mt_ptr->access_id, mask, &io_status_blk, 0,0,parm, 0,0,0,0,0);
-
-	if ((status1 = io_status_blk.status) != SS$_NORMAL)
-	{
-		if (SS$_ENDOFTAPE == status1)
-			iod->dollar.za = 1;
-		else
-		{
-			iod->dollar.za = 9;
-			rts_error(VARLSTCNT(4) ERR_MTIS, 2, iod->trans_name->len, iod->trans_name->dollar_io);
-		}
-	} else
-		iod->dollar.za = 0;
-	return;
-}
diff --git a/sr_vvms/iomt_rdlblk.c b/sr_vvms/iomt_rdlblk.c
deleted file mode 100644
index be488d3..0000000
--- a/sr_vvms/iomt_rdlblk.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "iomtdef.h"
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-uint4 iomt_rdlblk(
-	d_mt_struct    *mt_ptr,
-	uint4		mask,
-	iosb	       *stat_blk,
-	void	       *buff,
-	int	       size)
-
-{
-    uint4 status;
-
-    mask |= IO$_READLBLK;
-    status = sys$qiow(EFN$C_ENF,mt_ptr->access_id,mask,stat_blk,0,0,
-				    buff,size,0,0,0,0);
-   return status;
-}
-
diff --git a/sr_vvms/iomt_sense.c b/sr_vvms/iomt_sense.c
deleted file mode 100644
index f27e2ee..0000000
--- a/sr_vvms/iomt_sense.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "iomtdef.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include <efndef.h>
-
-
-uint4   iomt_sense(d_mt_struct *mt, iosb *io_status_blk)
-{
-	uint4 status;
-
-	status =  sys$qiow(EFN$C_ENF,mt->access_id, IO$_SENSEMODE, io_status_blk,0,0,0,0,0,0,0,0);
-	if (status == SS$_NORMAL)
-		status = io_status_blk->status;
-	return status;
-}
diff --git a/sr_vvms/iomt_tm.c b/sr_vvms/iomt_tm.c
deleted file mode 100644
index 9ff5841..0000000
--- a/sr_vvms/iomt_tm.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "iomtdef.h"
-#include "io_params.h"
-#include <iodef.h>
-#include <ssdef.h>
-
-void iomt_tm( io_desc *dev)
-{
-	d_mt_struct  *mt_ptr;
-
-	iomt_flush(dev);
-	iomt_qio(dev, IO$_WRITEMARK, 0); /* writes eof without ext gap */
-	mt_ptr = (d_mt_struct *) dev->dev_sp;
-	mt_ptr->last_op = ((mt_ptr->last_op == mt_tm || mt_ptr->last_op == mt_tm2)
-		? mt_tm2 : mt_tm);
-	return;
-}
diff --git a/sr_vvms/iomt_wtlblk.c b/sr_vvms/iomt_wtlblk.c
deleted file mode 100644
index 78062c7..0000000
--- a/sr_vvms/iomt_wtlblk.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include <iodef.h>
-#include <efndef.h>
-
-
-uint4 iomt_wtlblk(uint4 channel, uint4 mask, iosb *stat_blk, void *buff, int size)
-{
-	return sys$qiow(EFN$C_ENF, channel, mask | IO$_WRITELBLK,stat_blk, 0,0, (char*)buff,size, 0,0,0,0 );
-}
diff --git a/sr_vvms/iomtdef.h b/sr_vvms/iomtdef.h
deleted file mode 100644
index e505a4c..0000000
--- a/sr_vvms/iomtdef.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __IOMTDEF_H__
-#define __IOMTDEF_H__
-
-/* iomtdef.h VMS - mag tape header file */
-
-#define MAX_VARREC_SZ 9995
-#define MAX_FIXREC_SZ 65535
-#define MAX_REC_SZ 65535	/* maximum value that can be specified for the RECORDSIZE device parameter */
-#define MAX_BLK_SZ 65535
-#define MIN_BLK_SZ 14
-#define MIN_VARREC_SZ 5
-#define MIN_FIXREC_SZ 1
-
-enum mt_op
-{
-        mt_null, mt_write, mt_read, mt_eof, mt_eof2, mt_rewind, mt_tm, mt_tm2
-};
-
-#define MTDEF_BUF_SZ 1024
-#define MTDEF_REC_SZ 1020
-#define MTDEF_PG_WIDTH 255
-#define DEF_MT_LENGTH 66
-
-#define MT_RECHDRSIZ 4
-
-#define MTLAB_DOS11 (1 << 0)
-#define MTLAB_ANSI (1 << 1)
-
-#define MTL_VOL1 (1 << 0)
-#define MTL_HDR1 (1 << 1)
-#define MTL_HDR2 (1 << 2)
-#define MTL_EOF1 (1 << 3)
-#define MTL_EOF2 (1 << 4)
-
-#define ANSI_LAB_LENGTH 80
-/* THESE DEFINITIONS ARE TAKEN FROM VMS SYS$LIBRARY IODEF.H	    */
-
-/*                                                                          */
-/* *** START LOGICAL I/O FUNCTION CODES ***                                 */
-/*                                                                          */
-#define IO_WRITEMARK 28                /*WRITE TAPE MARK                   */
-#define IO_WRITELBLK 32                /*WRITE LOGICAL BLOCK               */
-#define IO_READLBLK 33                 /*READ LOGICAL BLOCK                */
-#define IO_WRITEOF 40                  /*WRITE END OF FILE                 */
-#define IO_REWIND 36                   /*REWIND TAPE                       */
-#define IO_SKIPFILE 37                 /*SKIP FILES                        */
-#define IO_SKIPRECORD 38               /*SKIP RECORDS                      */
-
-/*                                                                          */
-/* FUNCTION MODIFIER BIT DEFINITIONS                                        */
-/*                                                                          */
-
-#define IO_M_DATACHECK 16384
-#define IO_M_INHRETRY 32768
-#define IO_M_INHEXTGAP 4096
-#define IO_M_ERASE 1024
-
-/* THESE DEFINITIONS ARE TAKEN FROM VMS SYS$LIBRARY MTDEF.H  */
-
-#define MT_M_BOT 65536
-#define MT_TAPERROR 666
-#define MT_BUSY 333
-
-/* *************************************************************** */
-/* *************  structure for the magtape ********************** */
-/* *************************************************************** */
-
-typedef struct
-{
-	int4		access_id;	/* channel to access magtape 	*/
-	uint4	read_mask;
-	uint4	write_mask;
-	uint4	record_sz;
-	uint4	block_sz;
-	unsigned char	*buffer;
-	unsigned char	*bufftop;
-	unsigned char	*buffptr;
-	int		bufftoggle;
-	bool		ebcdic;
-	unsigned char	labeled;
-	mstr		rec;
-	bool		last_op;
-	bool		newversion;
-	bool		read_only;
-	bool		wrap;
-	bool		fixed;
-	bool		stream;
-}d_mt_struct;
-
-uint4 iomt_rdlblk(d_mt_struct *mt_ptr, uint4 mask, iosb *stat_blk, void *buff, int size);
-uint4 iomt_wtlblk(uint4 channel, uint4 mask, iosb *stat_blk, void *buff, int size);
-uint4 iomt_sense(d_mt_struct *mt, iosb *io_status_blk);
-uint4 iomt_opensp(io_log_name *dev_name, d_mt_struct *mtdef);
-
-#endif
diff --git a/sr_vvms/iorm_close.c b/sr_vvms/iorm_close.c
deleted file mode 100644
index c24d0a3..0000000
--- a/sr_vvms/iorm_close.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <rms.h>
-#include "mdef.h"
-#include "io.h"
-#include "iormdef.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include <devdef.h>
-#include "io_params.h"
-
-LITREF unsigned char io_params_size[];
-
-void iorm_close(io_desc *iod, mval *pp)
-{
-int4		status;
-unsigned char	c;
-int		p_offset;
-d_rm_struct	*rm_ptr;
-mstr		bque= {9,"SYS$BATCH"} ; 		/* default submit queue */
-mstr		pque= {9,"SYS$PRINT"} ; 		/* default spool queue	*/
-bool		rename, submit, spool, delete;
-boolean_t	rm_destroy = TRUE;
-boolean_t	rm_rundown = FALSE;
-
-unsigned short	promask;
-struct		FAB fab;
-struct		NAM nam;
-struct		XABPRO xab;
-
-assert(iod != 0);
-assert((pp->str.addr) != 0);
-rm_ptr = (d_rm_struct *) iod->dev_sp;
-if (iod->state == dev_open)
-{
-	promask = rm_ptr->promask;
-	iorm_use(iod, pp);
-	if ((rm_ptr->f.fab$b_fac == FAB$M_GET) == 0 && rm_ptr->r.rab$l_ctx == FAB$M_PUT &&
-			rm_ptr->outbuf_pos != rm_ptr->outbuf && !iod->dollar.za)
-	{	iorm_flush(iod);
-	}
-	p_offset = 0;
-	delete = ((rm_ptr->f.fab$l_fop & FAB$M_DLT) == FAB$M_DLT) ;
-	rename = submit = spool = FALSE ;
-	if (rm_ptr->f.fab$l_dev & DEV$M_FOD)
-	{
-		while (*(pp->str.addr + p_offset) != iop_eol)
-		{
-			switch (c = *(pp->str.addr + p_offset++))
-			{
-			case iop_rename:
-				fab = rm_ptr->f;
-				fab.fab$b_fns = *(pp->str.addr + p_offset);
-				fab.fab$l_fna = (pp->str.addr + p_offset+ 1);
-				rename= TRUE ;
-				break;
-			case iop_submit:
-				rm_ptr->f.fab$l_fop &= ~FAB$M_SCF & ~FAB$M_DLT ;
-				submit= TRUE ;
-				break;
-			case iop_spool:
-				rm_ptr->f.fab$l_fop &= ~FAB$M_SPL & ~FAB$M_DLT ;
-				spool= TRUE ;
-				break;
-			case iop_destroy:
-				rm_destroy = TRUE;
-				break;
-			case iop_nodestroy:
-				rm_destroy = FALSE;
-				break;
-			case iop_rundown:
-				rm_rundown = TRUE;
-				break;
-			default:
-				break;
-			}
-			p_offset += ((IOP_VAR_SIZE == io_params_size[c]) ?
-				(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[c]);
-		}
-	}
-	if (promask != rm_ptr->promask)
-	{	xab = cc$rms_xabpro;
-		xab.xab$w_pro = rm_ptr->promask;
-		rm_ptr->f.fab$l_xab = &xab;
-	}
-	nam = *(rm_ptr->f.fab$l_nam) ;
-	status = sys$close(&rm_ptr->f);
-	rm_ptr->f.fab$l_xab = 0;
-	if (!rm_ptr->f.fab$w_ifi)
-		iod->state = dev_closed;
-	if (status != RMS$_NORMAL)
-		rts_error(VARLSTCNT(2) status, rm_ptr->f.fab$l_stv);
-	if (rename)
-	{
-		if ((status = sys$rename(&(rm_ptr->f), 0, 0, &fab)) != RMS$_NORMAL)
-			rts_error(VARLSTCNT(2) status, rm_ptr->f.fab$l_stv);
-	}
-	if (spool)
-	{
-		status= iorm_jbc(&nam, pp, &pque, delete) ;
-		if ((status & 1)==0)
-		{
-			rts_error(VARLSTCNT(1) status) ;
-		}
-	}
-	if (submit)
-	{
-		status= iorm_jbc(&nam, pp, &bque, delete) ;
-		if ((status & 1)==0)
-		{
-			rts_error(VARLSTCNT(1) status) ;
-		}
-	}
-}
-rm_ptr->r.rab$l_ctx = FAB$M_GET;
-if (rm_destroy && !rm_rundown)
-	remove_rms(iod);
-return;
-}
diff --git a/sr_vvms/iorm_flush.c b/sr_vvms/iorm_flush.c
deleted file mode 100644
index b01c873..0000000
--- a/sr_vvms/iorm_flush.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-
-#include "mdef.h"
-#include <rms.h>
-#include "io.h"
-#include "iormdef.h"
-
-void iorm_flush(io_desc *iod)
-{
-	d_rm_struct   *rm_ptr;
-
-	rm_ptr = (d_rm_struct *) iod->dev_sp;
-	if (rm_ptr->outbuf < rm_ptr->outbuf_pos)
-	{	iorm_wteol(1,iod);
-	}
-	return;
-}
-
diff --git a/sr_vvms/iorm_get.c b/sr_vvms/iorm_get.c
deleted file mode 100644
index ae4d65d..0000000
--- a/sr_vvms/iorm_get.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2004, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/****************************************************************
- *								*
- * iorm_get is a wrapper around the RMS sys$get routine to	*
- * implement the GT.M BIGRECORD file format.			*
- *								*
- * Arguments:							*
- *		iod		io_desc structure		*
- *		timeout		timeout value from M OPEN	*
- *								*
- * Return:	RMS$_NORMAL or RMS error status			*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-
-#include "io.h"
-#include "iormdef.h"
-#include "iotimer.h"
-
-int iorm_get(io_desc *iod, int4 timeout)
-{
-	d_rm_struct     *rm_ptr;
-	struct RAB	*rab;
-	int4		stat;
-	int		len, reclen, toread, expected_reclen, extra_bytes;
-	unsigned long	save_ubf;
-
-	assert(0 <= timeout);
-	rm_ptr = (d_rm_struct *)iod->dev_sp;
-	rab = &rm_ptr->r;
-	reclen = 0;	/* set to bytes read total */
-	save_ubf = rab->rab$l_ubf;
-	if (rm_ptr->largerecord)
-	{
-		if (FAB$C_FIX == rm_ptr->b_rfm)
-		{
-			if (iod->width < rm_ptr->l_mrs)
-			{
-				rab->rab$l_stv = rm_ptr->l_mrs;
-				return RMS$_RTB;
-			}
-			expected_reclen = toread = rm_ptr->l_mrs;
-		} else if (FAB$C_VAR == rm_ptr->b_rfm)
-		{
-			rab->rab$w_usz = SIZEOF(uint4);
-			rab->rab$l_ubf = &toread;
-			toread = 0;
-			rab->rab$b_tmo = (timeout <= 255) ? timeout : 255;
-			stat = sys$get(rab);
-			rab->rab$l_ubf = save_ubf;
-			if (RMS$_NORMAL != stat)
-				return stat;
-			expected_reclen = toread;
-		} else
-			GTMASSERT;
-		toread = ROUND_UP2(toread, SIZEOF(uint4));
-		extra_bytes = toread - expected_reclen;
-		rab->rab$w_usz = (unsigned short)(MAX_RMS_UDF_RECORD < toread ? MAX_RMS_UDF_RECORD : toread);
-	} else
-	{
-		rab->rab$w_usz = toread = (unsigned short)rm_ptr->l_usz;
-		extra_bytes = 0;
-	}
-	do
-	{
-		do
-		{
-			rab->rab$b_tmo = (timeout <= 255) ? timeout : 255;
-			stat = sys$get(rab);
-			if (RMS$_TMO == stat && NO_M_TIMEOUT != timeout)
-				(timeout > 255) ? (timeout -= 255) : (timeout = 0);
-		} while ((RMS$_TMO == stat) && (timeout > 0));
-		reclen += (unsigned int)rab->rab$w_rsz;
-		if (!rm_ptr->largerecord)
-			break;
-		toread -= (unsigned int)rab->rab$w_rsz;
-		rab->rab$l_ubf += (unsigned int)rab->rab$w_rsz;
-		rab->rab$w_usz = (unsigned short)(MAX_RMS_UDF_RECORD < toread ? MAX_RMS_UDF_RECORD : toread);
-	} while (RMS$_NORMAL == stat && 0 < toread);
-	rab->rab$l_ubf = save_ubf;
-	switch (stat)
-	{
-	case RMS$_NORMAL:
-		assert(!rm_ptr->largerecord || (0 == toread && reclen - expected_reclen == extra_bytes));
-		rm_ptr->l_rsz = reclen - extra_bytes;
-		break;
-	case RMS$_EOF:
-		rm_ptr->l_rsz = reclen;
-		break;
-	}
-	return stat;
-}
diff --git a/sr_vvms/iorm_jbc.c b/sr_vvms/iorm_jbc.c
deleted file mode 100644
index 0cfd9b0..0000000
--- a/sr_vvms/iorm_jbc.c
+++ /dev/null
@@ -1,206 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* iorm_jbc.c
-   used in: iorm_close.c
-*/
-#include <rms.h>
-#include "mdef.h"
-#include "io.h"
-#include <ssdef.h>
-#include <sjcdef.h>
-#include <iodef.h>
-#include <efndef.h>
-
-#include "io_params.h"
-#define	IDENDIM	 28
-LITREF unsigned char io_params_size[];
-
-int4 iorm_jbc(struct NAM *nam, mval *pp, mstr *que, bool delete)
-/* *p   :		 parameter list  */
-/* *que :		 default que	   */
-/* delete :		 delete file	   */
-{
-	int4 	sys$sndjbc(), sys$parse(), sys$search() ;
-	int4 	status  ;
-	int4	iosb[2] ;
-	int4	temp	;
-	int 	p_offset ;
-	int 	k ;
-	unsigned char c ;
-	struct  { short	bln ; short cod ; char *buf ; int4 rln ;}  itm[64] ;
-
-	itm[0].bln= IDENDIM ;
-	itm[0].cod= SJC$_FILE_IDENTIFICATION  ;
-	itm[0].buf= &(nam->nam$t_dvi) ;
-	itm[0].rln= 0 ;
-
-	itm[1].bln= que->len  ;
-	itm[1].cod= SJC$_QUEUE;
-	itm[1].buf= que->addr ;
-	itm[1].rln= 0 ;
-
-	p_offset = 0 ; k= 2 ; c = *(pp->str.addr + p_offset++) ;
-	while (c != iop_eol)
-	{
-		if (io_params_size[c]==IOP_VAR_SIZE)
-		{
-			itm[k].bln= (short) *(pp->str.addr + p_offset) ;
-			itm[k].buf= (pp->str.addr + p_offset + 1) ;
-			p_offset += (*(pp->str.addr + p_offset) + 1);
-		}
-		else
-		{
-			itm[k].bln= io_params_size[c] ;
-			itm[k].buf= pp->str.addr + p_offset;
-			p_offset += io_params_size[c];
-		}
-		itm[k].rln= 0 ;
-		switch (c)
-		{
-		case iop_after:	itm[k].cod= SJC$_AFTER_TIME ;
-				break ;
-		case iop_burst:	itm[k].cod= SJC$_FILE_BURST ;
-				break ;
-		case iop_characteristic:
-				itm[k].cod= SJC$_CHARACTERISTIC_NUMBER  ;
-				break ;
-		case iop_cli: itm[k].cod= SJC$_CLI ;
-				break ;
-		case iop_copies: itm[k].cod= SJC$_FILE_COPIES ;
-				break ;
-		case iop_cpulimit: itm[k].cod= SJC$_CPU_LIMIT ;
-				break ;
-		case iop_doublespace:	itm[k].cod= SJC$_DOUBLE_SPACE ;
-				break ;
-		case iop_firstpage: itm[k].cod= SJC$_FIRST_PAGE ;
-				break ;
-		case iop_flag:	itm[k].cod= SJC$_FILE_FLAG ;
-				break ;
-		case iop_form:	itm[k].cod= SJC$_FORM_NUMBER ;
-				break ;
-		case iop_header: itm[k].cod= SJC$_PAGE_HEADER ;
-				break ;
-		case iop_hold:	itm[k].cod= SJC$_HOLD ;
-				break ;
-		case iop_lastpage: itm[k].cod= SJC$_LAST_PAGE ;
-				break ;
-		case iop_logfile: itm[k].cod= SJC$_LOG_SPECIFICATION ;
-				break ;
-		case iop_logqueue: itm[k].cod= SJC$_LOG_QUEUE ;
-				break ;
-		case iop_lowercase: itm[k].cod= SJC$_LOWERCASE ;
-				break ;
-		case iop_name:	itm[k].cod= SJC$_JOB_NAME ;
-				break ;
-		case iop_noburst: itm[k].cod= SJC$_NO_FILE_BURST ;
-				break ;
-		case iop_nodoublespace: itm[k].cod= SJC$_NO_DOUBLE_SPACE ;
-				break ;
-		case iop_noflag: itm[k].cod= SJC$_NO_FILE_FLAG ;
-				break ;
-		case iop_noheader: itm[k].cod= SJC$_NO_PAGE_HEADER ;
-				break ;
-		case iop_nohold: itm[k].cod= SJC$_NO_HOLD ;
-				break ;
-		case iop_nolowercase: itm[k].cod= SJC$_NO_LOWERCASE  ;
-				break ;
-		case iop_nonotify: itm[k].cod= SJC$_NO_NOTIFY ;
-				break ;
-		case iop_nopage: itm[k].cod= SJC$_NO_PAGINATE ;
-				break ;
-		case iop_nopassall: itm[k].cod= SJC$_NO_PASSALL ;
-				break ;
-		case iop_noprint: itm[k].cod= SJC$_NO_LOG_SPOOL ;
-				k++ ;
-				itm[k].bln= 0 ;
-				itm[k].cod= SJC$_LOG_DELETE ;
-				itm[k].buf= 0 ;
-				itm[k].rln= 0 ;
-				break ;
-		case iop_norestart: itm[k].cod= SJC$_NO_RESTART ;
-				break ;
-		case iop_note:	itm[k].cod= SJC$_NOTE ;
-				break ;
-		case iop_notify: itm[k].cod= SJC$_NOTIFY ;
-				break ;
-		case iop_notrailer: itm[k].cod= SJC$_NO_FILE_TRAILER ;
-				break ;
-		case iop_operator: itm[k].cod= SJC$_OPERATOR_REQUEST ;
-				break ;
-		case iop_p1: itm[k].cod=SJC$_PARAMETER_1 ;
-				break ;
-		case iop_p2: itm[k].cod=SJC$_PARAMETER_2 ;
-				break ;
-		case iop_p3: itm[k].cod=SJC$_PARAMETER_3 ;
-				break ;
-		case iop_p4: itm[k].cod=SJC$_PARAMETER_4 ;
-				break ;
-		case iop_p5: itm[k].cod=SJC$_PARAMETER_5 ;
-				break ;
-		case iop_p6: itm[k].cod=SJC$_PARAMETER_6 ;
-				break ;
-		case iop_p7: itm[k].cod=SJC$_PARAMETER_7 ;
-				break ;
-		case iop_p8: itm[k].cod=SJC$_PARAMETER_8 ;
-				break ;
-		case iop_page: itm[k].cod= SJC$_PAGINATE ;
-				break ;
-		case iop_passall: itm[k].cod= SJC$_PASSALL ;
-				break ;
-		case iop_print: itm[k].cod= SJC$_LOG_SPOOL ;
-				k++ ;
-				itm[k].bln= 0 ;
-				itm[k].cod= SJC$_NO_LOG_DELETE ;
-				itm[k].buf= 0 ;
-				itm[k].rln= 0 ;
-				break ;
-		case iop_priority: itm[k].cod= SJC$_PRIORITY ;
-				break ;
-		case iop_queue: itm[1].bln= itm[k].bln ;
-				itm[1].buf= itm[k].buf ;
-				--k ;
-				break ;
-		case iop_remote: itm[k].cod= SJC$_SCSNODE_NAME ;
-				break ;
-		case iop_restart: itm[k].cod= SJC$_RESTART ;
-				break ;
-		case iop_setup:	itm[k].cod= SJC$_FILE_SETUP_MODULES ;
-				break ;
-		case iop_trailer: itm[k].cod= SJC$_FILE_TRAILER ;
-				break ;
-		case iop_uic:	itm[k].cod= SJC$_UIC ;
-				break ;
-		case iop_user:	itm[k].cod= SJC$_USERNAME ;
-				break ;
-		default: 	--k ;
-				break ;
-		}
-		k++ ;
-		c= *(pp->str.addr + p_offset++) ;
-	}
-	if (delete)
-	{
-		itm[k].bln= 0 ;
-		itm[k].cod= SJC$_DELETE_FILE ;
-		itm[k].buf= 0 ;
-		itm[k].rln= 0 ;
-		k++ ;
-	}
-	itm[k].bln = itm[k].cod = 0;
-	itm[k].buf = itm[k].rln = 0 ;
-	status= sys$sndjbcw(EFN$C_ENF,SJC$_ENTER_FILE,0,itm,iosb,0,0) ;
-	if ((status & 1)==1)
-	{
-		status= iosb[0] ;
-	}
-	return status ;
-}
diff --git a/sr_vvms/iorm_open.c b/sr_vvms/iorm_open.c
deleted file mode 100644
index e363071..0000000
--- a/sr_vvms/iorm_open.c
+++ /dev/null
@@ -1,405 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <starlet.h>
-#include <efn.h>
-#include <descrip.h>
-#include <rms.h>
-#include <dcdef.h>
-#include <devdef.h>
-#include <dvidef.h>
-#include <acedef.h>
-#include <ssdef.h>
-#include <stddef.h>
-#include "gtm_string.h"
-
-#include "vmsdtype.h"
-#include "io.h"
-#include "iormdef.h"
-#include "io_params.h"
-#include "min_max.h"
-
-#define ESC		27
-#define DFLT_FILE_EXT	".DAT"
-#define VREC_HDR_LEN	4
-#define VFC_MAX_RECLEN	(32767 - 2)	/* have to leave two bytes for the fixed control */
-
-error_def(ERR_RMWIDTHTOOBIG);
-error_def(ERR_TEXT);
-error_def(ERR_BIGNOACL);
-error_def(ERR_DEVOPENFAIL);
-error_def(ERR_VARRECBLKSZ);
-
-short iorm_open(io_log_name *iol, mval *pp, int fd, mval *mspace, int4 timeout)
-{
-	int4		status;
-	io_desc		*iod;		/* local pointer to io_curr_device */
-	d_rm_struct	*d_rm;
-	struct	XABFHC	xabfhc;
-	struct	XABPRO	xabpro;
-	struct RAB	*r;
-	struct FAB	*f;
-	struct NAM	*nam;
-	mstr		newtln;
-	struct dsc$descriptor_s devname, outname;
-	uint4		width;
-	uint4		acebin[128];	/* needs to be big enough for any other ACLs on file */
-	uint4		*acebinptr;
-	struct acedef	*aceptr;
-	char		*acetop;
-	boolean_t	acefound = FALSE, created = FALSE, isdisk = FALSE, noacl = FALSE;
-	unsigned int	devclass, devchar, devchar2, devtype, dvistat, iosb[2];
-	short		devclassret, devcharret, devchar2ret, devtyperet;
-	struct
-	{
-		item_list_3	item[4];
-		int		terminator;
-	} item_list;
-	unsigned char resultant_name[255];
-	unsigned char	tmpfdns;
-	/** unsigned char resultant_name[MAX_TRANS_NAME_LEN]; THIS WOULD BE RIGHT BUT MAX_TRANS_NAME_LEN MUST BE <= 255 **/
-
-	/* while sr_unix/iorm_open.c prefixes errors with ERR_DEVOPENFAIL and it might be nice to be consistent */
-	/* changing VMS after all this time could break user programs */
-	/* An exception is being made for the extremely unlikely problem creating a GTM ACE so it stands out */
-	iod = iol->iod;
-	assert(*(pp->str.addr) < n_iops);
-	assert(iod);
-	assert(iod->state >= 0 && iod->state < n_io_dev_states);
-	assert(rm == iod->type);
-	if (dev_never_opened == iod->state)
-	{
-		iod->dev_sp = (d_rm_struct *)(malloc(SIZEOF(d_rm_struct)));
-		d_rm = (d_rm_struct *)iod->dev_sp;
-		memset(d_rm, 0, SIZEOF(*d_rm));
-		iod->width = DEF_RM_WIDTH;
-		iod->length = DEF_RM_LENGTH;
-		r  = &d_rm->r;
-		f  = &d_rm->f;
-		*r  = cc$rms_rab;
-		*f  = cc$rms_fab;
-		r->rab$l_fab = f;
-		r->rab$w_usz = d_rm->l_usz = DEF_RM_WIDTH;
-		f->fab$w_mrs = d_rm->l_mrs = DEF_RM_WIDTH;
-		f->fab$b_rfm = d_rm->b_rfm = FAB$C_VAR;	/* default is variable record format */
-		f->fab$l_fop = FAB$M_CIF | FAB$M_SQO | FAB$M_CBT | FAB$M_NAM;
-		f->fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_TRN; /* TRN allows truncate option to be specified in RAB later */
-		f->fab$b_rat = FAB$M_CR;
-
-		f->fab$l_dna = DFLT_FILE_EXT;
-		f->fab$b_dns = SIZEOF(DFLT_FILE_EXT) - 1;
-		d_rm->f.fab$l_nam = nam = malloc(SIZEOF(*nam));
-		*nam = cc$rms_nam;
-		nam->nam$l_esa = resultant_name;
-		nam->nam$b_ess = SIZEOF(resultant_name);
-		nam->nam$b_nop = NAM$M_NOCONCEAL;
-
-		r->rab$l_rop = RAB$M_TMO | RAB$M_WBH | RAB$M_RAH;
-		d_rm->promask = 0xFFFF;
-	} else
-	{
-		d_rm = (d_rm_struct *)iod->dev_sp;
-		if (dev_closed == iod->state)
-			d_rm->f.fab$w_bls = 0; /* Reset the block size to pass the block-record check below.
-						* The FAB initialization sets the block size later so it's OK to zero it here.
-						*/
-		nam = d_rm->f.fab$l_nam;
-		nam->nam$l_esa = 0;
-		nam->nam$b_ess = 0;
-		nam->nam$b_esl = 0;
-	}
-	iorm_use(iod, pp);
-	if (dev_open != iod->state)
-	{
-		if (!d_rm->largerecord && (d_rm->f.fab$w_bls > 0) && (FAB$C_FIX != d_rm->f.fab$b_rfm)
-			&& (d_rm->f.fab$w_bls < (d_rm->r.rab$w_usz + VREC_HDR_LEN)))
-				rts_error(VARLSTCNT(1) ERR_VARRECBLKSZ);
-		d_rm->r.rab$l_ctx = FAB$M_GET;
-		d_rm->f.fab$l_fna = iol->dollar_io;
-		d_rm->f.fab$b_fns = iol->len;
-/* smw next overrides any xab set by iorm_use */
-		xabpro = cc$rms_xabpro;
-		d_rm->f.fab$l_xab = &xabpro;
-		memset(acebin, 0, SIZEOF(acebin));
-		status = sys$parse(&d_rm->f);	/* to get device for getdvi */
-		if ((1 & status))
-		{
-			devname.dsc$w_length = nam->nam$b_dev;
-			devname.dsc$a_pointer = nam->nam$l_dev;
-			devname.dsc$b_dtype = DSC$K_DTYPE_T;
-			devname.dsc$b_class = DSC$K_CLASS_S;
-			item_list.item[0].item_code = DVI$_DEVCLASS;
-			item_list.item[0].buffer_length = SIZEOF(devclass);
-			item_list.item[0].buffer_address = &devclass;
-			item_list.item[0].return_length_address = &devclassret;
-			item_list.item[1].item_code = DVI$_DEVCHAR;
-			item_list.item[1].buffer_length = SIZEOF(devchar);
-			item_list.item[1].buffer_address = &devchar;
-			item_list.item[1].return_length_address = &devcharret;
-			item_list.item[2].item_code = DVI$_DEVCHAR2;
-			item_list.item[2].buffer_length = SIZEOF(devchar2);
-			item_list.item[2].buffer_address = &devchar2;
-			item_list.item[2].return_length_address = &devchar2ret;
-			item_list.item[3].item_code = DVI$_DEVTYPE;
-			item_list.item[3].buffer_length = SIZEOF(devtype);
-			item_list.item[3].buffer_address = &devtype;
-			item_list.item[3].return_length_address = &devtyperet;
-			item_list.terminator = 0;
-			dvistat = sys$getdviw(EFN$C_ENF, NULL, &devname, &item_list, iosb, NULL, 0, 0);
-			if (SS$_NORMAL == dvistat)
-				dvistat = iosb[0];
-			if (SS$_NONLOCAL == dvistat || (SS$_NORMAL == dvistat &&
-				((DC$_DISK != devclass || (DEV$M_NET & devchar) ||
-				(DEV$M_DAP | DEV$M_DFS) & devchar2) || /* UCX NFS sets DFS */
-				(DT$_FD1 <= devtype && DT$_FD8 >= devtype) ))) /* but not tcpware so check foreign disk */
-			{	/* if not disk, dfs/nfs, or non local, create gets BADATTRIB in stv if acl buf and siz set */
-				noacl = TRUE;
-			}
-		} else /* let create/open report the problem */
-			noacl = TRUE;
-		if (DEV$M_NET & d_rm->f.fab$l_dev)
-		{	/* need to release sys$parse channel if DECnet */
-			tmpfdns = d_rm->f.fab$b_dns;
-			d_rm->f.fab$b_dns = 0;
-			assert(0 == nam->nam$l_rlf);
-			nam->nam$l_rlf = 0;
-			nam->nam$b_nop |= NAM$M_SYNCHK;
-			status = sys$parse(&d_rm->f);	/* give up channel */
-			d_rm->f.fab$b_dns = tmpfdns;	/* restore */
-			nam->nam$b_nop &= ~NAM$M_SYNCHK;
-		}
-		if (noacl)
-		{
-			if (d_rm->largerecord && MAX_RMS_RECORDSIZE < d_rm->l_mrs)
-				rts_error(VARLSTCNT(1) ERR_RMWIDTHTOOBIG);
-			d_rm->largerecord = FALSE;
-		}
-		if (d_rm->largerecord && FAB$M_GET != d_rm->f.fab$b_fac)
-		{	/* if readonly use format from existing file */
-			aceptr = acebin;
-			aceptr->ace$b_size = GTM_ACE_SIZE * SIZEOF(uint4);
-			aceptr->ace$b_type = ACE$C_INFO;
-			/* without NOPROPAGATE, new versions will get ACE,
-			   PROTECTED prevents set acl /dele unless =all */
-			aceptr->ace$w_flags = ACE$M_NOPROPAGATE | ACE$M_PROTECTED;
-/*			if HIDDEN, dir/sec does not display which may make it harder to check if problems
-			aceptr->ace$w_flags |= ACE$M_HIDDEN;
-*/
-			aceptr->ace$v_info_type = ACE$C_CUST;	/* must be after flags */
-			aceptr->ace$w_application_facility = GTM_ACE_FAC;	/* GTM error fac */
-			aceptr->ace$w_application_flags = GTM_ACE_BIGREC;
-			assert(SIZEOF(uint4) * GTM_ACE_LAB_OFF == (&aceptr->ace$t_info_start - (char *)aceptr));
-			acebin[GTM_ACE_LAB_OFF] = GTM_ACE_LABEL;
-			acebin[GTM_ACE_RFM_OFF] = d_rm->b_rfm;
-			acebin[GTM_ACE_MRS_OFF] = d_rm->l_mrs;
-			acebin[GTM_ACE_SIZE] = 0;	/* terminate */
-			d_rm->f.fab$b_rfm = FAB$C_UDF;
-			d_rm->f.fab$w_mrs = 0;
-		}
-		if (!noacl)
-		{	/* tape gets BADATTRIB in stv if acl buf and siz set */
-			xabpro.xab$l_aclbuf = acebin;
-			xabpro.xab$w_aclsiz = SIZEOF(acebin);
-		}
-		if (FAB$M_GET == d_rm->f.fab$b_fac)
-		{
-			xabfhc = cc$rms_xabfhc;
-			xabpro.xab$l_nxt = &xabfhc;
-			status = sys$open(&d_rm->f);
-		} else
-		{
-			xabpro.xab$w_pro = d_rm->promask;
-			status = sys$create(&d_rm->f);
-		}
-		nam->nam$l_esa = 0;
-		nam->nam$b_ess = 0;
-		nam->nam$b_esl = 0;
-		d_rm->f.fab$l_xab = 0;
-		switch (status)
-		{
-		case RMS$_NORMAL:
-		if (d_rm->f.fab$l_fop & FAB$M_MXV)
-			created = iod->dollar.zeof = TRUE;
-		break;
-
-		case RMS$_CRE_STM:
-		case RMS$_CREATED:
-		case RMS$_SUPERSEDE:
-		case RMS$_FILEPURGED:
-		if (d_rm->f.fab$l_dev & DEV$M_FOD)
-			created = iod->dollar.zeof = TRUE;
-		break;
-
-		case RMS$_ACT:
-		case RMS$_FLK:
-			return(FALSE);
-
-		default:
-			rts_error(VARLSTCNT(2) status, d_rm->f.fab$l_stv);
-		}
-		if (!noacl && (DEV$M_RND & d_rm->f.fab$l_dev) && !(DEV$M_NET & d_rm->f.fab$l_dev))
-			isdisk = TRUE;	/* local disk */
-		else if (created && d_rm->largerecord && MAX_RMS_RECORDSIZE < d_rm->l_mrs)
-			rts_error(VARLSTCNT(1) ERR_RMWIDTHTOOBIG);
-		/* $create does not return the ACE:  if a new file is created aclsts is IVACL            */
-		/*				     if CIF and existing file has no acl aclsts ACLEMPTY */
-		/*				     if CIF and existing file has acl aclsts is NORMAL   */
-		if (isdisk && ((created && SS$_IVACL == xabpro.xab$l_aclsts) || (0 != xabpro.xab$l_aclsts &&
-			(FAB$M_GET != d_rm->f.fab$b_fac && ((1 & xabpro.xab$l_aclsts) || SS$_ACLEMPTY != xabpro.xab$l_aclsts)))))
-		{
-			xabpro.xab$l_aclctx = 0;        /* reset context */
-			d_rm->f.fab$l_xab = &xabpro;
-			status = sys$display(&d_rm->f);
-			d_rm->f.fab$l_xab = 0;		/* prevent close error */
-			if (!(1 & status))
-				rts_error(VARLSTCNT(2) status, d_rm->f.fab$l_stv);
-			if (0 != xabpro.xab$l_aclsts && !(1 & xabpro.xab$l_aclsts) && SS$_ACLEMPTY != xabpro.xab$l_aclsts)
-				rts_error(VARLSTCNT(1) xabpro.xab$l_aclsts);
-		}
-		if (isdisk && (1 & status) && 0 != xabpro.xab$l_aclsts && !(1 & xabpro.xab$l_aclsts) &&
-				SS$_ACLEMPTY != xabpro.xab$l_aclsts)
-			rts_error(VARLSTCNT(1) xabpro.xab$l_aclsts);
-		if (isdisk && 0 != xabpro.xab$w_acllen && (1 & status))	/* acl and success */
-		{
-			if (SIZEOF(acebin) < xabpro.xab$w_acllen)
-			{	/* get a new buffer big enough */
-				xabpro.xab$l_aclbuf = malloc(xabpro.xab$w_acllen);
-				xabpro.xab$w_aclsiz = xabpro.xab$w_acllen;
-				xabpro.xab$l_aclctx = 0;	/* reset context */
-				d_rm->f.fab$l_xab = &xabpro;
-				status = sys$display(&d_rm->f);
-				d_rm->f.fab$l_xab = 0;
-				if (!(1 & status))
-					rts_error(VARLSTCNT(2) status, d_rm->f.fab$l_stv);
-				if (!(1 & xabpro.xab$l_aclsts))
-					rts_error(VARLSTCNT(1) xabpro.xab$l_aclsts);
-			}
-			acetop = (char *)xabpro.xab$l_aclbuf + xabpro.xab$w_acllen;
-			for (aceptr = xabpro.xab$l_aclbuf; aceptr < acetop; aceptr = (char *)aceptr + aceptr->ace$b_size)
-			{
-				if (0 == aceptr->ace$b_size)
-					break;
-				if (ACE$C_INFO == aceptr->ace$b_type && ACE$C_CUST == aceptr->ace$v_info_type
-					&& GTM_ACE_FAC == aceptr->ace$w_application_facility
-					&& GTM_ACE_BIGREC == aceptr->ace$w_application_flags)
-				{	/* info for large records */
-					acebinptr = aceptr;
-					assert(GTM_ACE_LABEL == acebinptr[GTM_ACE_LAB_OFF]);
-					d_rm->largerecord = TRUE;
-					d_rm->b_rfm = (unsigned char)acebinptr[GTM_ACE_RFM_OFF];
-					d_rm->l_mrs = acebinptr[GTM_ACE_MRS_OFF];
-					acefound = TRUE;
-					break;
-				}
-			}
-			if (acebin != xabpro.xab$l_aclbuf)
-			{	/* free larger buffer now */
-				free(xabpro.xab$l_aclbuf);
-				xabpro.xab$l_aclbuf = acebin;
-				xabpro.xab$w_aclsiz = SIZEOF(acebin);
-			}
-		}
-		if (!acefound)
-		{
-			if (!created)
-			{	/* copy from exisiting file */
-				if (isdisk && d_rm->largerecord && FAB$C_UDF == d_rm->f.fab$b_rfm)
-					rts_error(VARLSTCNT(1) ERR_BIGNOACL);	/* maybe lost in copy */
-				d_rm->b_rfm = d_rm->f.fab$b_rfm;
-				d_rm->l_mrs = d_rm->f.fab$w_mrs;
-			} else if (isdisk && d_rm->largerecord)
-				rts_error(VARLSTCNT(8) ERR_DEVOPENFAIL, 2, iol->len, iol->dollar_io,
-					ERR_TEXT, 2, LEN_AND_LIT("GTM ACE on new file disappeared - possible VMS problem"));
-			d_rm->largerecord = FALSE;
-		}
-/* smw does next overwriting of mrs make sense to RMS */
-		/* if not largerecord, read only, sequential, not magtape ... */
-		if (!d_rm->largerecord && (FAB$M_GET == d_rm->f.fab$b_fac) && (0 == d_rm->f.fab$w_mrs) && xabfhc.xab$w_lrl)
-			d_rm->l_mrs = d_rm->l_usz = d_rm->r.rab$w_usz = d_rm->f.fab$w_mrs = xabfhc.xab$w_lrl;
-
-		if (d_rm->largerecord)
-		{ /* guess at a good blocks per IO */
-			uint4 blocksperrec;
-			blocksperrec = DIVIDE_ROUND_UP(d_rm->l_mrs, RMS_DISK_BLOCK);
-			if (RMS_MAX_MBC <= blocksperrec * 2)
-				d_rm->r.rab$b_mbc = RMS_MAX_MBC;
-			else if (RMS_DEF_MBC < blocksperrec * 2)
-				d_rm->r.rab$b_mbc = blocksperrec * 2;
-		}
-		status = sys$connect(&d_rm->r);
-		if (RMS$_NORMAL != status)
-			rts_error(VARLSTCNT(2) status, d_rm->r.rab$l_stv);
-		if (d_rm->r.rab$l_rop & RAB$M_EOF)
-			iod->dollar.zeof = TRUE;
-		if (ESC == iod->trans_name->dollar_io[0])
-		{
-			/* process permanent file...get real name */
-			status = sys$display(&d_rm->f);
-			if (status & 1)
-			{
-				devname.dsc$w_length = nam->nam$t_dvi[0];
-				devname.dsc$b_dtype = DSC$K_DTYPE_T;
-				devname.dsc$b_class = DSC$K_CLASS_S;
-				devname.dsc$a_pointer = &nam->nam$t_dvi[1];
-				outname.dsc$w_length = SIZEOF(resultant_name);
-				outname.dsc$b_dtype = DSC$K_DTYPE_T;
-				outname.dsc$b_class = DSC$K_CLASS_S;
-				outname.dsc$a_pointer = resultant_name;
-				status = lib$fid_to_name(&devname, &nam->nam$w_fid, & outname, &newtln.len, 0, 0);
-				if ((status & 1) && (0 != newtln.len))
-				{
-					newtln.addr = resultant_name;
-					iod->trans_name = get_log_name(&newtln, INSERT);
-					iod->trans_name->iod = iod;
-				}
-			}
-		} else
-		{	/* smw since esl zeroed above this is dead code since early days */
-			if (nam->nam$b_esl && (iod->trans_name->len != nam->nam$b_esl ||
-				memcmp(&iod->trans_name->dollar_io[0], resultant_name, nam->nam$b_esl)))
-			{
-				newtln.addr = resultant_name;
-				newtln.len = nam->nam$b_esl;
-				iod->trans_name = get_log_name(&newtln, INSERT);
-				iod->trans_name->iod = iod;
-			}
-		}
-		if (0 == d_rm->l_mrs)
-			d_rm->l_mrs = iod->width;
-		iod->width = d_rm->l_usz = d_rm->l_mrs;
-		if (!d_rm->largerecord)
-		{
-			d_rm->r.rab$w_usz = d_rm->f.fab$w_mrs = d_rm->l_mrs;
-			if (FAB$C_VFC == d_rm->f.fab$b_rfm) /* have to leave two bytes for the fixed control */
-				iod->width = MIN(iod->width, VFC_MAX_RECLEN);
-		}
-		width = iod->width;
-		if (d_rm->largerecord)
-		{
-			width = ROUND_UP(width, SIZEOF(uint4));
-			if (FAB$C_VAR == d_rm->b_rfm)
-				width += SIZEOF(uint4);	/* for count */
-		}
-		d_rm->bufsize = width + 1;
-		d_rm->inbuf = (char*)malloc(width + 1);
-		d_rm->outbuf_start = (char*)malloc(width + 1);
-		d_rm->inbuf_pos = d_rm->inbuf;
-		d_rm->inbuf_top = d_rm->inbuf + iod->width;
-		d_rm->outbuf_pos = d_rm->outbuf = d_rm->outbuf_start + (d_rm->largerecord && FAB$C_VAR == d_rm->b_rfm
-							? SIZEOF(uint4) : 0);
-		d_rm->outbuf_top = d_rm->outbuf + iod->width;
-		d_rm->promask = xabpro.xab$w_pro;
-		iod->state = dev_open;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/iorm_put.c b/sr_vvms/iorm_put.c
deleted file mode 100644
index 659daea..0000000
--- a/sr_vvms/iorm_put.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2004, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/****************************************************************
- *								*
- * iorm_put is a wrapper around the RMS sys$put routine to	*
- * implement the GT.M BIGRECORD file format.			*
- *								*
- * Argument:							*
- *		iod	io_desc structure			*
- *								*
- * Return:	RMS$_NORMAL or RMS error status			*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include <devdef.h>
-#include "gtm_string.h"
-#include "io.h"
-#include "iormdef.h"
-
-int iorm_put(io_desc *iod)
-{
-	int4 stat;
-	unsigned int reclen;
-	d_rm_struct  *rm_ptr;
-
-	rm_ptr = iod->dev_sp;
-	if (rm_ptr->f.fab$b_fac == FAB$M_GET)
-		return RMS$_FAC;
-	assert(rm_ptr->outbuf == rm_ptr->r.rab$l_rbf);
-	if (!rm_ptr->largerecord)
-	{
-		rm_ptr->r.rab$w_rsz = rm_ptr->l_rsz;
-		stat = sys$put(&rm_ptr->r);
-	} else
-	{
-		if (FAB$C_VAR == rm_ptr->b_rfm)
-		{
-			rm_ptr->r.rab$l_rbf -= SIZEOF(uint4);	/* recordsize */
-			assert(rm_ptr->r.rab$l_rbf >= rm_ptr->outbuf_start);
-			*(uint4 *)rm_ptr->r.rab$l_rbf = rm_ptr->l_rsz;
-			rm_ptr->l_rsz += SIZEOF(uint4);
-		}
-		reclen = ROUND_UP2(rm_ptr->l_rsz, SIZEOF(uint4));	/* fix and var records on longword boundary */
-		if (reclen > rm_ptr->l_rsz)
-		{
-			assert((rm_ptr->r.rab$l_rbf + reclen) <= ROUND_UP((unsigned long)rm_ptr->outbuf_top, SIZEOF(uint4)));
-			memset(&rm_ptr->r.rab$l_rbf[rm_ptr->l_rsz], 0, reclen - rm_ptr->l_rsz); /* null pad */
-		}
-		do
-		{
-			rm_ptr->r.rab$w_rsz = (unsigned short)(MAX_RMS_UDF_RECORD < reclen
-				? MAX_RMS_UDF_RECORD : reclen);
-			stat = sys$put(&rm_ptr->r);
-			if (RMS$_NORMAL != stat)
-				return stat;
-			rm_ptr->r.rab$l_rbf += rm_ptr->r.rab$w_rsz;
-			reclen -= (unsigned int)rm_ptr->r.rab$w_rsz;
-		} while (0 < reclen);
-	}
-	return stat;
-}
diff --git a/sr_vvms/iorm_rdone.c b/sr_vvms/iorm_rdone.c
deleted file mode 100644
index 4d5d4d7..0000000
--- a/sr_vvms/iorm_rdone.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-
-#include "io.h"
-#include "iormdef.h"
-#include "iotimer.h"
-#include "stringpool.h"
-
-GBLREF io_pair		io_curr_device;
-#define CR 13
-
-int iorm_rdone(mint *x, int4 timeout)
-{
-	io_desc		*iod;
-	d_rm_struct	*d_rm;
-	struct RAB	*rab;
-	int4		stat;
-	int		ret;
-
-	error_def(ERR_IOEOF);
-
-	assert(timeout >= 0);
-	iod = io_curr_device.in;
-	d_rm = (d_rm_struct *)io_curr_device.in->dev_sp;
-	assert(d_rm->inbuf_pos >= d_rm->inbuf);
-	assert(d_rm->inbuf_pos <= d_rm->inbuf_top);
-	/* if write buffer not empty, and there was no error */
-	if ((FAB$M_PUT == d_rm->r.rab$l_ctx) && d_rm->outbuf != d_rm->outbuf_pos
-		&& !iod->dollar.za)
-		iorm_wteol(1, iod);
-	d_rm->r.rab$l_ctx = FAB$M_GET;
-	rab = &d_rm->r;
-	ret = TRUE;
-	if (d_rm->inbuf_pos == d_rm->inbuf_top || d_rm->inbuf_pos == d_rm->inbuf)
-	{	/* no buffered input left */
-		rab->rab$l_ubf = d_rm->inbuf;
-		d_rm->l_usz = iod->width;
-		stat = iorm_get(iod, timeout);
-		switch (stat)
-		{
-		case RMS$_NORMAL:
-			d_rm->inbuf_top = d_rm->inbuf + d_rm->l_rsz;
-			*d_rm->inbuf_top++ = CR;
-			d_rm->inbuf_pos = d_rm->inbuf;
-			*x = (mint)*(unsigned char *)d_rm->inbuf_pos++;
-			iod->dollar.x = 1;
-			iod->dollar.y++;
-			iod->dollar.za = 0;
-			break;
-		case RMS$_TMO:
-			*x = (mint)-1;
-			iod->dollar.za = 9;
-			ret = FALSE;
-			break;
-		case RMS$_EOF:
-			*x = (mint)0;
-			if (iod->dollar.zeof)
-			{
-				iod->dollar.za = 9;
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-			}
-			iod->dollar.x = 0;
-			iod->dollar.y++;
-			iod->dollar.za = 0;
-			iod->dollar.zeof = TRUE;
-			if (iod->error_handler.len > 0)
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-			break;
-		default:
-			d_rm->inbuf_pos = d_rm->inbuf;
-			iod->dollar.za = 9;
-			rts_error(VARLSTCNT(2) stat, rab->rab$l_stv);
-		}
-	} else
-	{
-		*x = (mint)*(unsigned char *)d_rm->inbuf_pos++;
-		iod->dollar.x++;
-		iod->dollar.za = 0;
-	}
-	return ret;
-}
diff --git a/sr_vvms/iorm_read.c b/sr_vvms/iorm_read.c
deleted file mode 100644
index 51649fd..0000000
--- a/sr_vvms/iorm_read.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include "gtm_string.h"
-
-#include "io.h"
-#include "iormdef.h"
-#include "iotimer.h"
-#include "stringpool.h"
-
-GBLREF spdesc		stringpool;
-GBLREF io_pair		io_curr_device;
-
-int iorm_read(mval *v, int4 timeout)
-{
-	io_desc		*iod;
-	d_rm_struct     *rm_ptr;
-	struct RAB	*rab;
-	int4		stat;
-	int		len;
-
-	error_def(ERR_IOEOF);
-
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.free <= stringpool.top);
-	assert(timeout >= 0);
-	iod = io_curr_device.in;
-	rm_ptr = (d_rm_struct *)iod->dev_sp;
-	/* if write buffer not empty, and there was no error */
-	if ((FAB$M_PUT == rm_ptr->r.rab$l_ctx) && (rm_ptr->outbuf != rm_ptr->outbuf_pos) && !iod->dollar.za)
-		iorm_wteol(1, iod);
-
-	v->mvtype = MV_STR;
-	rm_ptr->r.rab$l_ctx = FAB$M_GET;
-
-	if (rm_ptr->inbuf != rm_ptr->inbuf_pos
-		&& (0 != (len = rm_ptr->inbuf_top - rm_ptr->inbuf_pos)))
-	{
-		assert(len > 0);
-		ENSURE_STP_FREE_SPACE(len);
-		v->str.addr = stringpool.free;
-		memcpy(v->str.addr, rm_ptr->inbuf_pos, len);
-		rm_ptr->inbuf_pos = rm_ptr->inbuf;
-		v->str.len = len;
-		iod->dollar.x = 0;
-		iod->dollar.y++;
-	} else
-	{
-		/* ensure extra space for pad if not longword aligned */
-		ENSURE_STP_FREE_SPACE(iod->width + (rm_ptr->largerecord ? SIZEOF(uint4) : 0));
-		/* need to set usz and make sure width == mrs for fix */
-		rab = &rm_ptr->r;
-		rab->rab$l_ubf = stringpool.free;
-		stat = iorm_get(iod, timeout);
-		switch (stat)
-		{
-		case RMS$_NORMAL:
-			v->str.addr = stringpool.free;
-			v->str.len = rm_ptr->l_rsz;
-			iod->dollar.x = 0;
-			iod->dollar.y++;
-			iod->dollar.za = 0;
-			break;
-		case RMS$_TMO:
-			v->str.len = 0;
-			iod->dollar.za = 9;
-			return FALSE;
-		case RMS$_EOF:
-			v->str.len = 0;
-			if (iod->dollar.zeof)
-			{
-				iod->dollar.za = 9;
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-			}
-			iod->dollar.x = 0;
-			iod->dollar.za = 0;
-			iod->dollar.y++;
-			iod->dollar.zeof = TRUE;
-			if (iod->error_handler.len > 0)
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-			break;
-		default:
-			v->str.len = 0;
-			iod->dollar.za = 9;
-			rts_error(VARLSTCNT(2) stat, rab->rab$l_stv);
-		}
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/iorm_readfl.c b/sr_vvms/iorm_readfl.c
deleted file mode 100644
index c52d884..0000000
--- a/sr_vvms/iorm_readfl.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include "gtm_string.h"
-
-#include "io.h"
-#include "iormdef.h"
-#include "iotimer.h"
-#include "stringpool.h"
-
-GBLREF io_pair		io_curr_device;
-
-#define fl_copy(a, b) (a > b ? b : a)
-
-int iorm_readfl(mval *v, int4 length, int4 timeout)
-{
-	io_desc		*iod;
-	d_rm_struct	*d_rm;
-	struct RAB	*rab;
-	int4		stat;
-	uint4		len, cp_len;
-
-	error_def(ERR_IOEOF);
-
-	assert(timeout >= 0);
-	v->mvtype = MV_STR;
-	iod = io_curr_device.in;
-
-	d_rm = (d_rm_struct *)io_curr_device.in->dev_sp;
-	/* if write buffer not empty, and there was no error */
-	if ((FAB$M_PUT == d_rm->r.rab$l_ctx) && d_rm->outbuf != d_rm->outbuf_pos
-		&& !iod->dollar.za)
-		iorm_wteol(1, iod);
-	d_rm->r.rab$l_ctx = FAB$M_GET;
-	len = d_rm->inbuf_top - d_rm->inbuf_pos;
-	if ((d_rm->inbuf != d_rm->inbuf_pos) && (0 != len))
-	{
-		cp_len = fl_copy(length, len);
-		memcpy(v->str.addr, d_rm->inbuf_pos, cp_len);
-		if((d_rm->inbuf_pos += cp_len) >= d_rm->inbuf_top)
-		{
-			d_rm->inbuf_pos = d_rm->inbuf;
-			iod->dollar.y++;
-			iod->dollar.x = 0;
-		} else
-			iod->dollar.x += cp_len;
-		v->str.len = cp_len;
-	} else
-	{
-		rab = &d_rm->r;
-		rab->rab$l_ubf = d_rm->inbuf;
-		d_rm->l_usz = iod->width;
-		stat = iorm_get(iod, timeout);
-		switch (stat)
-		{
-		case RMS$_NORMAL:
-			d_rm->inbuf_top = d_rm->inbuf + d_rm->l_rsz;
-			if (length > d_rm->l_rsz)
-				length = d_rm->l_rsz;
-			v->str.len = length;
-			memcpy(v->str.addr, d_rm->inbuf, length);
-			if ((d_rm->inbuf_pos += length) >= d_rm->inbuf_top)
-			{
-				d_rm->inbuf_pos = d_rm->inbuf;
-				iod->dollar.y++;
-				iod->dollar.x = 0;
-			} else
-				iod->dollar.x += length;
-			iod->dollar.za = 0;
-			break;
-		case RMS$_TMO:
-			v->str.len = 0;
-			iod->dollar.za = 9;
-			return FALSE;
-		case RMS$_EOF:
-			v->str.len = 0;
-			if (iod->dollar.zeof)
-			{
-				iod->dollar.za = 9;
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-			}
-			iod->dollar.x = 0;
-			iod->dollar.y++;
-			iod->dollar.za = 0;
-			iod->dollar.zeof = TRUE;
-			if (iod->error_handler.len > 0)
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-			break;
-		default:
-			v->str.len = 0;
-			iod->dollar.za = 9;
-			rts_error(VARLSTCNT(2) stat, rab->rab$l_stv);
-		}
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/iorm_use.c b/sr_vvms/iorm_use.c
deleted file mode 100644
index ffb80d2..0000000
--- a/sr_vvms/iorm_use.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <devdef.h>
-#include <rms.h>
-
-#include "io.h"
-#include "iormdef.h"
-#include "io_params.h"
-#include "stringpool.h"
-#include "copy.h"
-
-typedef struct
-{
-	unsigned short mem;
-	unsigned short grp;
-} uic_struct;
-
-LITREF unsigned char io_params_size[];
-
-void iorm_use(io_desc *iod, mval *pp)
-{
-	unsigned char	c;
-	int4		width, length, blocksize;
-	int4		status;
-	d_rm_struct	*rm_ptr;
-	struct RAB	*r;
-	struct FAB	*f;
-	int 		p_offset;
-	boolean_t	shared_seen = FALSE;
-
-	error_def(ERR_DEVPARMNEG);
-	error_def(ERR_RMWIDTHPOS);
-	error_def(ERR_RMWIDTHTOOBIG);
-	error_def(ERR_RMNOBIGRECORD);
-	error_def(ERR_RMBIGSHARE);
-	error_def(ERR_MTBLKTOOBIG);
-	error_def(ERR_MTBLKTOOSM);
-
-	p_offset = 0;
-	rm_ptr = (d_rm_struct *)iod->dev_sp;
-	r  = &rm_ptr->r;
-	f  = &rm_ptr->f;
-	assert(r->rab$l_fab == f);
-	while (*(pp->str.addr + p_offset) != iop_eol)
-	{
-		assert(*(pp->str.addr + p_offset) < n_iops);
-		switch ((c = *(pp->str.addr + p_offset++)))
-		{
-		case iop_allocation:
-			if (iod->state != dev_open)
-				f->fab$l_alq = *(int4*)(pp->str.addr + p_offset);
-			break;
-		case iop_append:
-			if (iod->state != dev_open)
-				r->rab$l_rop |= RAB$M_EOF;
-			break;
-		case iop_blocksize:
-			if (iod->state != dev_open)
-			{
-				GET_LONG(blocksize, pp->str.addr + p_offset);
-				if (MAX_RMS_ANSI_BLOCK < blocksize)
-					rts_error(VARLSTCNT(1) ERR_MTBLKTOOBIG);
-				else if (MIN_RMS_ANSI_BLOCK > blocksize)
-					rts_error(VARLSTCNT(3) ERR_MTBLKTOOSM, 1, MIN_RMS_ANSI_BLOCK);
-				else
-					f->fab$w_bls = (unsigned short)blocksize;
-			}
-			break;
-		case iop_contiguous:
-			if (iod->state != dev_open)
-			{
-				f->fab$l_fop &= ~FAB$M_CBT;
-				f->fab$l_fop |= FAB$M_CTG;
-			}
-			break;
-		case iop_delete:
-			f->fab$l_fop |= FAB$M_DLT;
-			break;
-		case iop_extension:
-			GET_USHORT(f->fab$w_deq, pp->str.addr + p_offset);
-			break;
-		case iop_exception:
-			iod->error_handler.len = *(pp->str.addr + p_offset);
-			iod->error_handler.addr = pp->str.addr + p_offset + 1;
-			s2pool(&iod->error_handler);
-			break;
-		case iop_fixed:
-			if (iod->state != dev_open)
-				rm_ptr->f.fab$b_rfm = rm_ptr->b_rfm = FAB$C_FIX;
-			break;
-		case iop_length:
-			GET_LONG(length, pp->str.addr + p_offset);
-			if (length < 0)
-				rts_error(VARLSTCNT(1) ERR_DEVPARMNEG);
-			iod->length = length;
-			break;
-		case iop_newversion:
-			if (iod->state != dev_open)
-			{
-				f->fab$l_fop |= FAB$M_MXV;
-				f->fab$l_fop &= ~(FAB$M_CIF | FAB$M_SUP);
-			}
-			break;
-		case iop_nosequential:
-			break;
-		case iop_s_protection:
-			rm_ptr->promask &= ~(0x0F << XAB$V_SYS);
-			rm_ptr->promask |= ((~(unsigned char)*(pp->str.addr + p_offset) & 0x0000000F) << XAB$V_SYS);
-			break;
-		case iop_w_protection:
-			rm_ptr->promask &= ~(0x0F << XAB$V_WLD);
-			rm_ptr->promask |= ((~(unsigned char)*(pp->str.addr + p_offset) & 0x0000000F) << XAB$V_WLD);
-			break;
-		case iop_g_protection:
-			rm_ptr->promask &= ~(0x0F << XAB$V_GRP);
-			rm_ptr->promask |= ((~(unsigned char)*(pp->str.addr + p_offset) & 0x0000000F) << XAB$V_GRP);
-			break;
-		case iop_o_protection:
-			rm_ptr->promask &= ~(0x0F << XAB$V_OWN);
-			rm_ptr->promask |= ((~(unsigned char)*(pp->str.addr + p_offset) & 0x0000000F) << XAB$V_OWN);
-			break;
-		case iop_readonly:
-			if (iod->state != dev_open)
-				f->fab$b_fac = FAB$M_GET;
-			break;
-		case iop_noreadonly:
-			if (iod->state != dev_open)
-				f->fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_TRN;
-			break;
-		case iop_recordsize:
-			if (iod->state != dev_open)
-			{
-				GET_LONG(width, pp->str.addr + p_offset);
-				if (width <= 0)
-					rts_error(VARLSTCNT(1) ERR_RMWIDTHPOS);
-				iod->width = width;
-				if (MAX_RMS_RECORDSIZE >= width)
-					r->rab$w_usz = f->fab$w_mrs = (unsigned short)width;
-				else if (MAX_STRLEN < width)
-					rts_error(VARLSTCNT(1) ERR_RMWIDTHTOOBIG);
-				else if (!rm_ptr->largerecord)
-					rts_error(VARLSTCNT(1) ERR_RMNOBIGRECORD);
-				rm_ptr->l_usz = rm_ptr->l_mrs = width;
-			}
-			break;
-		case iop_shared:
-			if (iod->state != dev_open)
-				shared_seen = TRUE;
-			break;
-		case iop_spool:
-			f->fab$l_fop |= FAB$M_SPL;
-			break;
-		case iop_submit:
-			f->fab$l_fop |= FAB$M_SCF;
-			break;
-		case iop_rfa:
-			break;
-		case iop_space:
-			if (iod->state == dev_open && f->fab$l_dev & DEV$M_SQD)
-			{
-				GET_LONG(r->rab$l_bkt, pp->str.addr + p_offset);
-				if ((status = sys$space(r, 0, 0)) != RMS$_NORMAL)
-					rts_error(VARLSTCNT(1) status);
-				r->rab$l_bkt = 0;
-			}
-			break;
-		case iop_uic:
-		{
-			unsigned char	*ch, ct, *end;
-			uic_struct	uic;
-			struct XABPRO	*xabpro;
-
-			ch = pp->str.addr + p_offset;
-			ct = *ch++;
-			end = ch + ct;
-			uic.grp = uic.mem = 0;
-			xabpro = malloc(SIZEOF(struct XABPRO));
-			*xabpro = cc$rms_xabpro;
-/* g,m are octal - no matter currently since iorm_open overwrites fab xab */
-			while (*ch != ',' &&	ch < end)
-				uic.grp = (10 * uic.grp) + (*ch++ - '0');
-			if (*ch == ',')
-			{
-				while (++ch < end)
-					uic.mem = (10 * uic.mem) + (*ch - '0');
-			}
-			xabpro->xab$l_uic = *((int4 *)&uic);
-			f->fab$l_xab = xabpro;
-			break;
-		}
-		case iop_width:
-			if (iod->state == dev_open)
-			{
-				GET_LONG(width, pp->str.addr + p_offset);
-				if (width <= 0)
-					rts_error(VARLSTCNT(1) ERR_RMWIDTHPOS);
-				else  if (width <= rm_ptr->l_mrs)
-				{
-					iorm_flush(iod);
-					rm_ptr->l_usz = iod->width = width;
-					if (!rm_ptr->largerecord)
-						r->rab$w_usz = (short)width;
-					iod->wrap = TRUE;
-				}
-			}
-			break;
-		case iop_wrap:
-			iod->wrap = TRUE;
-			break;
-		case iop_nowrap:
-			iod->wrap = FALSE;
-			break;
-		case iop_convert:
-			r->rab$l_rop |= RAB$M_CVT;
-			break;
-		case iop_rewind:
-			if (iod->state == dev_open && rm_ptr->f.fab$l_dev & DEV$M_FOD)
-			{
-				if (iod->dollar.zeof && rm_ptr->outbuf_pos > rm_ptr->outbuf)
-					iorm_wteol(1, iod);
-				sys$rewind(r);
-				iod->dollar.zeof = FALSE;
-				iod->dollar.y = 0;
-				iod->dollar.x = 0;
-				rm_ptr->outbuf_pos = rm_ptr->outbuf;
-				rm_ptr->r.rab$l_ctx = FAB$M_GET;
-			}
-			break;
-		case iop_truncate:
-			r->rab$l_rop |= RAB$M_TPT;
-			break;
-		case iop_notruncate:
-			r->rab$l_rop &= ~RAB$M_TPT;
-			break;
-		case iop_bigrecord:
-			if (iod->state != dev_open)
-				rm_ptr->largerecord = TRUE;
-			break;
-		case iop_nobigrecord:
-			if (iod->state != dev_open)
-			{
-				if (MAX_RMS_RECORDSIZE < rm_ptr->l_mrs)
-					rts_error(ERR_RMNOBIGRECORD);
-				rm_ptr->largerecord = FALSE;
-			}
-			break;
-		case iop_rfm:
-			break;
-		default:
-			break;
-		}
-		p_offset += ((IOP_VAR_SIZE == io_params_size[c]) ?
-			(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[c]);
-	}
-	if (shared_seen)
-	{
-		f->fab$b_shr = FAB$M_SHRGET;
-		if (rm_ptr->largerecord)
-		{
-			if (f->fab$b_fac & FAB$M_PUT)
-			{
-				rts_error(VARLSTCNT(1) ERR_RMBIGSHARE);
-			}
-		} else if ((f->fab$b_fac & FAB$M_PUT) == FALSE)
-			f->fab$b_shr |= FAB$M_SHRPUT;
-	}
-}/* eor */
diff --git a/sr_vvms/iorm_write.c b/sr_vvms/iorm_write.c
deleted file mode 100644
index b2830a8..0000000
--- a/sr_vvms/iorm_write.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-#include "io.h"
-#include "iormdef.h"
-#include <devdef.h>
-
-GBLREF io_pair		io_curr_device;
-error_def(ERR_NOTTOEOFONPUT);
-error_def(ERR_DEVICEREADONLY);
-
-void iorm_write(mstr *v)
-{
-	unsigned char *inpt;
-	io_desc *iod;
-	int inlen, outlen, n;
-	d_rm_struct   *rm_ptr;
-
-	iod = io_curr_device.out;
-	rm_ptr = (d_rm_struct *) iod->dev_sp;
-	if (rm_ptr->f.fab$b_fac == FAB$M_GET)
-		rts_error(VARLSTCNT(1) ERR_DEVICEREADONLY);
-
-	rm_ptr->r.rab$l_ctx = FAB$M_PUT;
-	if (!iod->dollar.zeof && rm_ptr->f.fab$l_dev & DEV$M_FOD
-		&& !(rm_ptr->r.rab$l_rop & RAB$M_TPT))
-	{
-		iod->dollar.za = 9;
-		rts_error(VARLSTCNT(1) ERR_NOTTOEOFONPUT);
-	}
-	inlen = v->len;
-	outlen = iod->width - (rm_ptr->outbuf_pos - rm_ptr->outbuf);
-	if ( ! iod->wrap && inlen > outlen)
-		inlen = outlen;
-	if (!inlen)
-		return;
-	for (inpt = v->addr ; ; inpt += n)
-	{
-		n = (inlen > outlen) ? outlen : inlen;
-		memcpy(rm_ptr->outbuf_pos, inpt, n);
-		iod->dollar.x += n;
-		rm_ptr->outbuf_pos +=n;
-		if ((inlen -= n) <= 0)
-			break;
-		iorm_wteol(1, iod);
-		outlen = iod->width - (rm_ptr->outbuf_pos - rm_ptr->outbuf);
-	}
-	iod->dollar.za = 0;
-	return;
-}
diff --git a/sr_vvms/iorm_wteol.c b/sr_vvms/iorm_wteol.c
deleted file mode 100644
index 426a9d7..0000000
--- a/sr_vvms/iorm_wteol.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include <devdef.h>
-#include "gtm_string.h"
-#include "io.h"
-#include "iormdef.h"
-error_def(ERR_NOTTOEOFONPUT);
-error_def(ERR_DEVICEREADONLY);
-
-void iorm_wteol(int4 n_eol, io_desc *iod)
-{
-	struct RAB 	*r;
-	int4 		stat;
-	int 		reclen;
-	int4 		i;
-	d_rm_struct  	*rm_ptr;
-
-	rm_ptr = iod->dev_sp;
-	if (rm_ptr->f.fab$b_fac == FAB$M_GET)
-		rts_error(VARLSTCNT(1) ERR_DEVICEREADONLY);
-	r = &rm_ptr->r;
-	r->rab$l_rbf = rm_ptr->outbuf;
-	r->rab$l_ctx = FAB$M_PUT;
-	if (!iod->dollar.zeof && rm_ptr->f.fab$l_dev & DEV$M_FOD
-		&& !(rm_ptr->r.rab$l_rop & RAB$M_TPT))
-	{
-		iod->dollar.za = 9;
-		rts_error(VARLSTCNT(1) ERR_NOTTOEOFONPUT);
-	}
-
-	for (i = 0; i < n_eol; i++)
-	{
-		reclen = rm_ptr->outbuf_pos - rm_ptr->outbuf;
-		if (rm_ptr->b_rfm != FAB$C_FIX)
-			rm_ptr->l_rsz = reclen;
-		else
-		{
-			reclen = rm_ptr->l_mrs - reclen;
-			rm_ptr->l_rsz = rm_ptr->l_mrs;
-			if (reclen > 0)
-				memset(rm_ptr->outbuf_pos, SP, reclen);
-		}
-		stat = iorm_put(iod);
-		switch (stat)
-		{
-		case RMS$_NORMAL:
-			break;
-		default:
-			rm_ptr->outbuf_pos = rm_ptr->outbuf;
-			iod->dollar.za = 9;
-			rts_error(VARLSTCNT(2) stat, r->rab$l_stv);
-		}
-		rm_ptr->outbuf_pos = rm_ptr->outbuf;
-	}
-
-	iod->dollar.za = 0;
-	iod->dollar.x = 0;
-	iod->dollar.y += n_eol;
-	if (iod->length)
-		iod->dollar.y %= iod->length;
-	return;
-}
diff --git a/sr_vvms/iormdef.h b/sr_vvms/iormdef.h
deleted file mode 100644
index cea0ed9..0000000
--- a/sr_vvms/iormdef.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define DEF_RM_WIDTH		32767
-#define DEF_RM_LENGTH		66
-#define MAX_RMS_RECORDSIZE	32767
-#define MAX_RMS_UDF_RECORD	65535
-#define MAX_RMS_ANSI_BLOCK	65635
-#define MIN_RMS_ANSI_BLOCK	14
-#define RMS_DISK_BLOCK		512
-#define RMS_DEF_MBC		16
-#define RMS_MAX_MBC		127
-
-#define GTM_ACE_BIGREC		1	/* application flag */
-#define GTM_ACE_FAC		0xF6	/* application facility */
-#define GTM_ACE_LABEL		'GTMB'
-#define GTM_ACE_LAB_OFF		2	/* ACE$K_LENGTH / sizeof uint4 */
-#define GTM_ACE_RFM_OFF		3
-#define GTM_ACE_MRS_OFF		4
-#define GTM_ACE_SIZE		5
-
-/* ***************************************************** */
-/* *********** structure for RMS driver **************** */
-/* ***************************************************** */
-
-typedef struct
-{
-	struct RAB	r;
-	struct FAB	f;
-	unsigned int	l_mrs;		/* fab mrs */
-	unsigned int	l_rsz;		/* rab rsz */
-	unsigned int	l_usz;		/* rab usz */
-	boolean_t	largerecord;
-	unsigned short	promask;
-	char		b_rfm;		/* logical fab rfm */
-	uint4		bufsize;	/* size of buffers */
-	char		*outbuf_start;	/* always real start of outbuf */
-	char		*outbuf;
-	char		*outbuf_pos;
-	char		*outbuf_top;	/* smw 20031119 not used */
-	char		*inbuf;
-	char		*inbuf_pos;
-	char		*inbuf_top;
-	char		*block_buffer;	/* used for large records */
-}d_rm_struct;	/*  rms		*/
-
-int4 iorm_jbc(struct NAM *nam, mval *pp, mstr *que, bool delete);
diff --git a/sr_vvms/iosb_disk.h b/sr_vvms/iosb_disk.h
deleted file mode 100644
index 8c51a3b..0000000
--- a/sr_vvms/iosb_disk.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef IOSB_DISK_H_INCLUDED
-#define IOSB_DISK_H_INCLUDED
-
-#pragma member_alignment save
-#pragma nomember_alignment
-
-typedef struct io_status_block_disk_struct
-{
-	unsigned short	cond;
-	unsigned int	length;
-	unsigned short	devdepend;
-} io_status_block_disk;
-
-#pragma member_alignment restore
-
-#endif /* IOSB_DISK_H_INCLUDED */
diff --git a/sr_vvms/iosize.h b/sr_vvms/iosize.h
deleted file mode 100644
index 8599400..0000000
--- a/sr_vvms/iosize.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define LEGAL_IO_SIZE(X) ((((int4)X) + 7) & -8)
diff --git a/sr_vvms/iosp.h b/sr_vvms/iosp.h
deleted file mode 100644
index 478625a..0000000
--- a/sr_vvms/iosp.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-
-#define TRL_OFF 4
-
-#define SS_NORMAL  1
-#define SS_NOLOGNAM  444
-#define SS_ENDOFFILE 2160
-#define SS_ENDOFTAPE 2168
-
-/* parameters for io_rundown() */
-#define NORMAL_RUNDOWN		0
-#define RUNDOWN_EXCEPT_STD	1
-
-#define SYSCALL_SUCCESS(STATUS)		(1 & (STATUS))
-#define SYSCALL_ERROR(STATUS)		(!(1 & (STATUS)))
diff --git a/sr_vvms/iott_cancel_read.c b/sr_vvms/iott_cancel_read.c
deleted file mode 100644
index e25d656..0000000
--- a/sr_vvms/iott_cancel_read.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <iodef.h>
-#include <ssdef.h>
-#include "io.h"
-#include "iottdef.h"
-#include "efn.h"
-
-void iott_cancel_read(io_ptr)
-io_desc *io_ptr;
-
-/* This routine should always be followed by an iott_resetast, which
-includes a qiow that we would prefer not to do within the AST */
-{
-	uint4 	status;
-	d_tt_struct	*tt_ptr;
-
-	tt_ptr = (d_tt_struct*)(io_ptr->dev_sp);
-	if (!tt_ptr->stat_blk.status)
-	{
-#ifdef DEBUG
-/* this is for an assert that verifies a reliance on VMS IOSB maintenance */
-		tt_ptr->read_timer = FALSE;
-#endif
-		if ((status = sys$cancel(tt_ptr->channel)) != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-	}
-	return;
-}
diff --git a/sr_vvms/iott_clockfini.c b/sr_vvms/iott_clockfini.c
deleted file mode 100644
index 75c7d29..0000000
--- a/sr_vvms/iott_clockfini.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-
-void iott_clockfini( d_tt_struct *tt_ptr)
-{
-	tt_ptr->clock_on = FALSE;
-	iott_wtstart(tt_ptr);
-	return;
-}
diff --git a/sr_vvms/iott_close.c b/sr_vvms/iott_close.c
deleted file mode 100644
index 35af912..0000000
--- a/sr_vvms/iott_close.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-#include <efndef.h>
-
-
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include "io_params.h"
-#include "outofband.h"
-#include "stringpool.h"
-
-GBLREF short		astq_dyn_alloc;
-GBLREF short		astq_dyn_avail;
-GBLREF io_pair		io_std_device;
-GBLREF uint4		std_dev_outofband_msk;
-LITREF unsigned char	io_params_size[];
-
-void iott_close(io_desc *v, mval *pp)	/* exception is the only deviceparameter allowed */
-{
-	unsigned short		iosb[4];
-	uint4			dummy_msk, enable_msk, status;
-	d_tt_struct		*tt_ptr;
-	t_cap			s_mode;
-	params			ch;
-	int			p_offset;
-
-	assert(v->type == tt);
-	if (v->state != dev_open)
-		return;
-
-	assert((v->pair.in == v) || (v->pair.out == v));
-	tt_ptr = (d_tt_struct *)(v->dev_sp);
-
-	if (v->pair.out == v)
-	{
-		status = sys$dclast(iott_wtclose, tt_ptr, 0);
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-	}
-
-	if (v->pair.in == v && tt_ptr->term_chars_twisted)
-	{
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_SENSEMODE,
-			iosb, 0, 0, &s_mode, 12, 0, 0, 0, 0);
-		if (status == SS$_NORMAL)
-			status = iosb[0];
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-		s_mode.ext_cap &= (~TT2$M_PASTHRU & ~TT2$M_EDITING);
-		s_mode.ext_cap |= (tt_ptr->ext_cap & (TT2$M_PASTHRU | TT2$M_EDITING));
-		s_mode.term_char &= (~TT$M_ESCAPE);
-		s_mode.term_char |= (tt_ptr->term_char & TT$M_ESCAPE);
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_SETMODE,
-			iosb, 0, 0, &s_mode, 12, 0, 0, 0, 0);
-		if (status == SS$_NORMAL)
-			status = iosb[0];
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-	}
-
-	if (v->pair.in == io_std_device.in)
-	{
-		enable_msk = std_dev_outofband_msk & CTRLY_MSK;
-		if (enable_msk == CTRLY_MSK)
-			status = lib$enable_ctrl(&enable_msk, &dummy_msk);
-			if (status != SS$_NORMAL)
-				rts_error(VARLSTCNT(1) status);
-	}
-
-	status = sys$dassgn(tt_ptr->channel);
-	if (status != SS$_NORMAL)
-		rts_error(VARLSTCNT(1) status);
-
-	p_offset = 0;
-	while (*(pp->str.addr + p_offset) != iop_eol)
-	{
-		if ((ch = *(pp->str.addr + p_offset++)) == iop_exception)
-		{
-			v->error_handler.len = *(pp->str.addr + p_offset);
-			v->error_handler.addr = pp->str.addr + p_offset + 1;
-			s2pool(&v->error_handler);
-		}
-		p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-			(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-	}
-
-	v->state = dev_closed;
-	astq_dyn_alloc += TERMINAL_STATIC_ASTS;
-	astq_dyn_avail += TERMINAL_STATIC_ASTS;
-	free(tt_ptr->sb_buffer);
-	free(tt_ptr->io_buffer);
-
-	return;
-}
diff --git a/sr_vvms/iott_flush.c b/sr_vvms/iott_flush.c
deleted file mode 100644
index 5a0ec37..0000000
--- a/sr_vvms/iott_flush.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "iottdef.h"
-#include "xfer_enum.h"
-#include "deferred_events.h"
-
-GBLREF io_pair	io_curr_device;
-GBLREF io_pair	io_std_device;
-GBLREF bool	prin_out_dev_failure;
-GBLREF int	(*xfer_table[])();
-
-void iott_flush(io_desc *ioptr)
-{
-	void		op_fetchintrrpt(), op_startintrrpt(), op_forintrrpt();
-	char		*c_ptr;
-	short		iosb[4], length;
-	uint4		status;
-	d_tt_struct	*tt_ptr;
-
-	tt_ptr = (d_tt_struct*)ioptr->dev_sp;
-	sys$cantim(tt_ptr, 0);
-	tt_ptr->clock_on = FALSE;
-	if (tt_ptr->io_free != tt_ptr->io_inuse)
-	{
-		c_ptr = tt_ptr->io_inuse;
-		if (tt_ptr->io_free < tt_ptr->io_inuse)
-		{
-			length = tt_ptr->io_buftop - tt_ptr->io_inuse;
-			tt_ptr->io_inuse = tt_ptr->io_buffer;
-		} else
-		{
-			length = tt_ptr->io_free - tt_ptr->io_inuse;
-			tt_ptr->io_inuse = tt_ptr->io_free;
-		}
-		tt_ptr->io_pending = c_ptr + length;
-		if (tt_ptr->io_pending == tt_ptr->io_buftop)
-			tt_ptr->io_pending = tt_ptr->io_buffer;
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel, tt_ptr->write_mask, iosb, 0, 0, c_ptr, length, 0, 0, 0, 0);
-		if (status & 1)
-			status = iosb[0];
-		if (status & 1)
-			prin_out_dev_failure = FALSE;
-		else
-		{
-			if (io_curr_device.out == io_std_device.out)
-			{
-				if (prin_out_dev_failure)
-					sys$exit(status);
-				else
-					prin_out_dev_failure = TRUE;
-			}
-			xfer_set_handlers(tt_write_error_event, tt_write_error_set, status);
-		}
-	} else
-		while (tt_ptr->sb_free != tt_ptr->sb_pending)
-			sys$hiber();
-}
diff --git a/sr_vvms/iott_open.c b/sr_vvms/iott_open.c
deleted file mode 100644
index b5ab494..0000000
--- a/sr_vvms/iott_open.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <dcdef.h>
-#include <descrip.h>
-#include <dvidef.h>
-#include <iodef.h>
-#include <smgtrmptr.h>
-#include <ssdef.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "iotimer.h"
-#include "io_params.h"
-#include "iottdef.h"
-#include "vmsdtype.h"
-#include "stringpool.h"
-
-GBLREF short		astq_dyn_avail;
-GBLREF short		astq_dyn_alloc;
-GBLREF int4		spc_inp_prc;
-GBLREF io_log_name	*io_root_log_name;
-GBLREF io_pair		io_std_device;
-
-LITREF unsigned char	io_params_size[];
-
-error_def(ERR_TERMASTQUOTA);
-
-short iott_open(io_log_name *dev_name, mval *pp, int fd, mval *mspace, int4 timeout)
-{
-	bool		ast_get_static(int);  /* TODO; move to a header */
-	unsigned char	buf[256], ch, sensemode[8];
-	short		dummy;
-	int4		bufsz, devtype, buflen;
-	uint4		status;
-	unsigned int	req_code;
-	d_tt_struct	*tt_ptr;
-	io_desc		*ioptr;
-	iosb		dvisb;
-	t_cap		t_mode;
-	int		p_offset;
-	struct
-	{
-		item_list_3	item[1];
-		int4		terminator;
-	} item_list;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	ioptr = dev_name->iod;
-	if (dev_never_opened == ioptr->state)
-		ioptr->dev_sp = (d_tt_struct *)(malloc(SIZEOF(d_tt_struct)));
-	tt_ptr = (d_tt_struct *)ioptr->dev_sp;
-	if (dev_open != ioptr->state)
-	{
-		short channel;
-		$DESCRIPTOR(file_name, "");
-		if (FALSE == ast_get_static(TERMINAL_STATIC_ASTS))
-			rts_error(VARLSTCNT(1) ERR_TERMASTQUOTA);
-		file_name.dsc$a_pointer = dev_name->dollar_io;
-		file_name.dsc$w_length = (unsigned short)dev_name->len;
-		if (SS$_DEVALLOC == (status = sys$assign(&file_name, &channel, 0, 0))
-				|| (SS$_INSFMEM == status) || (SS$_NOIOCHAN == status))
-		{
-			astq_dyn_avail += TERMINAL_STATIC_ASTS;
-			astq_dyn_alloc += TERMINAL_STATIC_ASTS;
-			return FALSE;
-		}
-		if ((SS$_NORMAL != status) && (SS$_REMOTE != status))
-		{
-			astq_dyn_avail += TERMINAL_STATIC_ASTS;
-			rts_error(VARLSTCNT(1) status);
-		}
-		tt_ptr->channel = (int4)channel;
-		tt_ptr->io_pending = tt_ptr->io_inuse =
-			tt_ptr->io_free = tt_ptr->io_buffer = malloc(RING_BUF_SZ);
-		tt_ptr->io_buftop = tt_ptr->io_buffer + RING_BUF_SZ;
-		tt_ptr->sb_pending = tt_ptr->sb_free = tt_ptr->sb_buffer =
-					malloc(IOSB_BUF_SZ * SIZEOF(iosb_struct));
-		tt_ptr->sb_buftop = tt_ptr->sb_buffer + IOSB_BUF_SZ;
-	}
-	if (dev_never_opened == ioptr->state)
-	{
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_SENSEMODE,
-			&tt_ptr->stat_blk, 0, 0, &t_mode, 12, 0, 0, 0, 0);
-		if (SS$_NORMAL == status)
-			status = tt_ptr->stat_blk.status;
-		if (SS$_NORMAL != status)
-		{
-			astq_dyn_avail += TERMINAL_STATIC_ASTS;
-			rts_error(VARLSTCNT(1) status);
-		}
-		tt_ptr->read_mask = IO_FUNC_R;
-		tt_ptr->write_mask = IO_FUNC_W;
-		tt_ptr->clock_on = FALSE;
-		tt_ptr->term_char = t_mode.term_char;
-		tt_ptr->ext_cap = t_mode.ext_cap;
-		ioptr->width = t_mode.pg_width;
-		ioptr->length = t_mode.pg_length;
-		tt_ptr->in_buf_sz = TTDEF_BUF_SZ;
-		tt_ptr->term_chars_twisted = FALSE;
-		tt_ptr->enbld_outofbands.x = 0;
-		if ((spc_inp_prc & (SHFT_MSK << CTRL_U)) && (tt_ptr->term_char & TT$M_SCOPE)
-			&& !(tt_ptr->ext_cap & TT2$M_PASTHRU))
-			tt_ptr->ctrlu_msk = (SHFT_MSK << CTRL_U);
-		else
-			tt_ptr->ctrlu_msk = 0;
-		if (io_std_device.in)
-			/* if this is the principal device, io_std_device.in is not yet set up, therefore
-			the resetast is done later in term_setup so that it can pick the correct handler */
-			iott_resetast(ioptr);
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel
-				,IO$_SENSEMODE|IO$M_RD_MODEM
-				,&tt_ptr->stat_blk, 0, 0
-				,sensemode
-				,0, 0, 0, 0, 0);
-		/* The first time this code is called is to open the principal device
-		 * and io_root_log_name->iod will be == 0,  when that is true we do
-		 * not want to do the lat connect even if it is a lat device */
-		if ((SS$_NORMAL == status) && (SS$_NORMAL == tt_ptr->stat_blk.status) &&
-			(DT$_LAT == sensemode[0]) && (0 != io_root_log_name->iod))
-		{
-			status = sys$qiow(EFN$C_ENF, tt_ptr->channel,
-				IO$_TTY_PORT|IO$M_LT_CONNECT,
-				&tt_ptr->stat_blk, 0, 0, 0, 0, 0, 0, 0, 0);
-			/* If we try to open the principal device with a statement like
-			 * open "LTA66:" we will come through here and will get the
-			 * illegal io function error...just ignore it */
-			if (SS$_NORMAL == status)
-				status = tt_ptr->stat_blk.status;
-			if ((SS$_NORMAL != status) && (SS$_ILLIOFUNC != status))
-			{
-				astq_dyn_avail += TERMINAL_STATIC_ASTS;
-				rts_error(VARLSTCNT(1) status);
-			}
-		}
-		item_list.item[0].buffer_length		= SIZEOF(devtype);
-		item_list.item[0].item_code		= DVI$_DEVTYPE;
-		item_list.item[0].buffer_address	= &devtype;
-		item_list.item[0].return_length_address	= &dummy;
-		item_list.terminator			= 0;
-		status = sys$getdviw(EFN$C_ENF, tt_ptr->channel, 0, &item_list, &dvisb, 0, 0, 0);
-		if (SS$_NORMAL == status)
-			status = dvisb.status;
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-		status = smg$init_term_table_by_type(&devtype, &tt_ptr->term_tab_entry, 0);
-		if (!(status & 1))
-		{
-			tt_ptr->erase_to_end_line.len = 0;
-			tt_ptr->key_up_arrow.len = 0;
-			tt_ptr->key_down_arrow.len = 0;
-			tt_ptr->clearscreen.len = 0;
-		} else
-		{
-			bufsz = SIZEOF(buf);
-			req_code = SMG$K_ERASE_TO_END_LINE;
-			status = smg$get_term_data(&tt_ptr->term_tab_entry, &req_code, &bufsz, &buflen, buf, 0);
-			if (status & 1)
-			{
-				tt_ptr->erase_to_end_line.len = buflen;
-				tt_ptr->erase_to_end_line.addr = malloc(tt_ptr->erase_to_end_line.len);
-				memcpy(tt_ptr->erase_to_end_line.addr, buf, buflen);
-			} else
-				tt_ptr->erase_to_end_line.len = 0;
-			req_code = SMG$K_KEY_UP_ARROW;
-			status = smg$get_term_data(&tt_ptr->term_tab_entry, &req_code, &bufsz, &buflen, buf, 0);
-			if (status & 1)
-			{
-				tt_ptr->key_up_arrow.len = buflen;
-				tt_ptr->key_up_arrow.addr = malloc(tt_ptr->key_up_arrow.len);
-				memcpy(tt_ptr->key_up_arrow.addr, buf, buflen);
-			} else
-				tt_ptr->key_up_arrow.len = 0;
-			req_code = SMG$K_KEY_DOWN_ARROW;
-			status = smg$get_term_data(&tt_ptr->term_tab_entry, &req_code, &bufsz, &buflen, buf, 0);
-			if (status & 1)
-			{
-				tt_ptr->key_down_arrow.len = buflen;
-				tt_ptr->key_down_arrow.addr = malloc(tt_ptr->key_down_arrow.len);
-				memcpy(tt_ptr->key_down_arrow.addr, buf, buflen);
-			} else
-				tt_ptr->key_down_arrow.len = 0;
-			req_code = SMG$K_ERASE_TO_END_DISPLAY;
-			status = smg$get_term_data(&tt_ptr->term_tab_entry, &req_code, &bufsz, &buflen, buf, 0);
-			if (status & 1)
-			{
-				tt_ptr->clearscreen.len = buflen;
-				tt_ptr->clearscreen.addr = malloc(tt_ptr->clearscreen.len);
-				memcpy(tt_ptr->clearscreen.addr, buf, buflen);
-			} else
-				tt_ptr->clearscreen.len = 0;
-		}
-		tt_ptr->item_len = 3 * SIZEOF(item_list_struct);
-		tt_ptr->item_list[0].buf_len = 0;
-		tt_ptr->item_list[0].item_code = TRM$_MODIFIERS;
-		tt_ptr->item_list[0].addr = TRM$M_TM_TRMNOECHO;
-		tt_ptr->item_list[0].ret_addr = 0;
-		tt_ptr->item_list[1].buf_len = 0;
-		tt_ptr->item_list[1].item_code = TRM$_TIMEOUT;
-		tt_ptr->item_list[1].addr = NO_M_TIMEOUT;
-		tt_ptr->item_list[1].ret_addr = 0;
-		tt_ptr->item_list[2].buf_len = SIZEOF(io_termmask);
-		tt_ptr->item_list[2].item_code = TRM$_TERM;
-		tt_ptr->item_list[2].addr = malloc(SIZEOF(io_termmask));
-		memset(tt_ptr->item_list[2].addr, 0, SIZEOF(io_termmask));
-		((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] =
-			(spc_inp_prc & (SHFT_MSK << CTRL_Z)) ? (TERM_MSK | (SHFT_MSK << CTRL_Z)) : TERM_MSK;
-		tt_ptr->item_list[2].ret_addr = 0;
-		tt_ptr->item_list[3].buf_len	= 0;
-		tt_ptr->item_list[3].item_code	= TRM$_ESCTRMOVR;
-		tt_ptr->item_list[3].addr	= ESC_LEN - 1;
-		tt_ptr->item_list[3].ret_addr	= 0;
-		tt_ptr->item_list[4].buf_len	= (TREF(gtmprompt)).len;
-		tt_ptr->item_list[4].item_code	= TRM$_PROMPT;
-		tt_ptr->item_list[4].addr	= (TREF(gtmprompt)).addr;
-		tt_ptr->item_list[4].ret_addr	= 0;
-		tt_ptr->item_list[5].buf_len	= 0;
-		tt_ptr->item_list[5].item_code	= TRM$_INISTRNG;
-		tt_ptr->item_list[5].addr	= 0;
-		tt_ptr->item_list[5].ret_addr	= 0;
-
-		if (0 != (t_mode.term_char & TT$M_WRAP))
-			ioptr->wrap = TRUE;
-	}
-	ioptr->state = dev_open;
-	p_offset = 0;
-	while (iop_eol != *(pp->str.addr + p_offset))
-	{
-		if (iop_exception == (ch = *(pp->str.addr + p_offset++)))
-		{
-			ioptr->error_handler.len = *(pp->str.addr + p_offset);
-			ioptr->error_handler.addr = pp->str.addr + p_offset + 1;
-			s2pool(&ioptr->error_handler);
-			break;
-		}
-		p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-			(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/iott_rdone.c b/sr_vvms/iott_rdone.c
deleted file mode 100644
index 71130bd..0000000
--- a/sr_vvms/iott_rdone.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <iodef.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include "outofband.h"
-#include "curr_dev_outbndset.h"
-#include "std_dev_outbndset.h"
-
-#define ONE_CHAR 1
-#define ALL_CTRL 0x0ffffffff
-
-GBLREF io_pair		io_curr_device;
-GBLREF io_pair 		io_std_device;
-GBLREF bool		prin_in_dev_failure;
-GBLREF bool 		ctrlu_occurred;
-GBLREF uint4		std_dev_outofband_msk;
-GBLREF int4		outofband;
-GBLREF int4		spc_inp_prc;
-
-int iott_rdone( mint *v, int4 t)
-{
-	boolean_t	timed_out;
-	unsigned char	ch[ESC_LEN];
-	uint4		buff_len, char_msk, efn_mask, len, mask_in1, save_term_msk, status;
-	iosb		stat_blk;
-  	io_desc		*io_ptr;
-	t_cap		s_mode;
-	d_tt_struct	*tt_ptr;
-
-	error_def(ERR_IOEOF);
-
-	io_ptr = io_curr_device.in;
-	assert (io_ptr->state == dev_open);
-	tt_ptr = (d_tt_struct*) io_ptr->dev_sp;
-	if (io_curr_device.out == io_ptr)
-		iott_flush(io_curr_device.out);
-
-	if (!(tt_ptr->ext_cap & TT2$M_PASTHRU))
-	{
-		/* in order to access all characters, except <CTRL-Q> and <CTRL-S>, we go into pasthru */
-
-		status = sys$qiow(EFN$C_ENF,tt_ptr->channel,IO$_SENSEMODE,
-			&stat_blk,0,0,&s_mode,12,0,0,0,0);
-		if (status == SS$_NORMAL)
-			status = stat_blk.status;
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-		s_mode.ext_cap |= TT2$M_PASTHRU;
-		status = sys$qiow(EFN$C_ENF,tt_ptr->channel,IO$_SETMODE,
-			&stat_blk,0,0,&s_mode,12,0,0,0,0);
-		if (status == SS$_NORMAL)
-			status = stat_blk.status;
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-		tt_ptr->term_chars_twisted = TRUE;
-	}
-
-	if (tt_ptr->term_char & TT$M_ESCAPE)
-	{
-		len = 4 * (SIZEOF(item_list_struct));
-		buff_len = ESC_LEN;
-	}else
-	{
-		len = 3 * (SIZEOF(item_list_struct));
-		buff_len = ONE_CHAR;
-	}
-
-	efn_mask = (SHFT_MSK << efn_immed_wait | SHFT_MSK << efn_outofband);
-	tt_ptr->item_list[1].addr = t;
-	ch[0] = 0;
-	timed_out = FALSE;
-
-	save_term_msk = ((io_termmask *)tt_ptr->item_list[2].addr)->mask[0];
-	((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = ALL_CTRL;
-	/* the above prevents echoing of control characters, which preserves established behavior */
-
-	status = sys$qio(efn_immed_wait,tt_ptr->channel
-	  		  ,tt_ptr->read_mask ,&tt_ptr->stat_blk
-			  ,NULL ,0
-		 	  ,&ch[0] ,buff_len
-			  ,0 ,0 ,&(tt_ptr->item_list[0]) ,len);
-	if (status != SS$_NORMAL)
-	{
-		if (io_curr_device.in == io_std_device.in && io_curr_device.out == io_std_device.out)
-		{
-			if (prin_in_dev_failure)
-			{
-				((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = save_term_msk;
-				sys$exit(status);
-			}else
-				prin_in_dev_failure = TRUE;
-		}
-		rts_error(VARLSTCNT(1) status);
-	}
-
-	status = sys$wflor(efn_immed_wait,efn_mask);
-	if (status != SS$_NORMAL)
-	{
-		((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = save_term_msk;
-		rts_error(VARLSTCNT(1) status);
-        }
-
-	if (!tt_ptr->stat_blk.status)
-	{
-		if (outofband)
-		{
-			status = sys$dclast(iott_cancel_read, io_ptr, 0);
-			if (status != SS$_NORMAL)
-			{
-				((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = save_term_msk;
-				rts_error(VARLSTCNT(1) status);
-			}
-			iott_resetast(io_ptr);			/*reset ast after cancel */
-		}
-		status = sys$synch(efn_immed_wait ,&tt_ptr->stat_blk);
-		if (status != SS$_NORMAL)
-		{
-			((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = save_term_msk;
-			rts_error(VARLSTCNT(1) status);
-		}
-	}
-
-	assert(tt_ptr->stat_blk.status);
-	/* can't put this back until the read is definately finished, which is why it's repeated above for error exits */
-	((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] = save_term_msk;
-
-	if (outofband)
-	{
-		outofband_action(FALSE);
-		assert(FALSE);
-	}
-
-	if (ctrlu_occurred)
-	{
-		ctrlu_occurred = FALSE;
-		ch[0] = CTRL_U;
-	}
-
-	if (tt_ptr->stat_blk.term_length > ESC_LEN - 1)
-	{
-		tt_ptr->stat_blk.term_length = ESC_LEN - 1;
-		/* this error may be overridden by an error in the iosb */
-		io_ptr->dollar.za = 2;
-	}else
-		io_ptr->dollar.za = 0;
-
-	switch(tt_ptr->stat_blk.status)
-	{
-	case SS$_CONTROLC:
-	case SS$_CONTROLY:
-	case SS$_NORMAL:
-		break;
-	case SS$_ABORT:
-	case SS$_CANCEL:
-		assert(FALSE);				/* not planning on this, even though it should be ok */
-		iott_resetast(io_ptr);			/* reset ast after cancel */
-	case SS$_TIMEOUT:				/* CAUTION: fallthrough */
-		if (ch[0] == 0)				/* if the buffer holds a non-null character, accept it */
-		{
-			*v = -1;
-			io_ptr->dollar.za = 0;
-			io_ptr->dollar.zb[0] = '\0';
-			timed_out = TRUE;
-		}
-		break;
-	case SS$_DATACHECK:
-	case SS$_DATAOVERUN:
-	case SS$_PARITY:
-		io_ptr->dollar.za = 1; /* data mangled */
-		break;
-	case SS$_BADESCAPE:
-	case SS$_PARTESCAPE:
-		io_ptr->dollar.za = 2; /* escape mangled */
-		break;
-	case SS$_CHANINTLK:
-	case SS$_COMMHARD:
-	case SS$_CTRLERR:
-	case SS$_DEVACTIVE:
-	case SS$_DEVALLOC:
-	case SS$_DEVINACT:
-	case SS$_DEVOFFLINE:
-	case SS$_DEVREQERR:
-	case SS$_DISCONNECT:
-	case SS$_MEDOFL:
-	case SS$_OPINCOMPL:
-	case SS$_TOOMUCHDATA:
-		io_ptr->dollar.za = 3; /* hardware contention or failure */
-		break;
-	case SS$_DUPUNIT:
-	case SS$_INSFMEM:
-	case SS$_INSFMAPREG:
-	case SS$_INCOMPAT:
-		io_ptr->dollar.za = 4; /* system configuration */
-		break;
-	case SS$_EXQUOTA:
-	case SS$_NOPRIV:
-		io_ptr->dollar.za = 5; /* process limits */
-		break;
-	default:
-		io_ptr->dollar.za = 9; /* if list above is maintained, indicates an iott_ programming defect */
-	}
-
-	if (tt_ptr->term_chars_twisted)
-	{
-		if (!(tt_ptr->ext_cap & TT2$M_PASTHRU))
-			s_mode.ext_cap &= (~TT2$M_PASTHRU);
-		status = sys$qiow(EFN$C_ENF,tt_ptr->channel,
-			IO$_SETMODE,&stat_blk,0,0,&s_mode,12,0,0,0,0);
-		if (status == SS$_NORMAL)
-			status = stat_blk.status;
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-		tt_ptr->term_chars_twisted = FALSE;
-	}
-
-	if (timed_out)
-		return FALSE;
-
-	if (ch[0] < 32)
-	{
-		char_msk = SHFT_MSK << ch[0];
-		if (!(tt_ptr->ext_cap & TT2$M_PASTHRU))
-		{
-			if ((tt_ptr->enbld_outofbands.mask & char_msk)
-				|| ((io_ptr == io_std_device.in) && (std_dev_outofband_msk & char_msk & CTRLC_MSK)))
-			/* if and when <CTRL-C> and <CTRL-Y> handling is normalized the
-			CTRLC_MSK above should probably be removed; nonetheless, currently
-			<CTRL-Y> just gives gt.m a seizure and restarts the current operation - why waste the character */
-			{
-				/* pass on the outofband that was grabbed by the special pasthru */
-				status = sys$dclast(((io_ptr == io_std_device.in) ? std_dev_outbndset : curr_dev_outbndset),
-					(int4*)ch[0], 0);
-				if (status != SS$_NORMAL)
-					rts_error(VARLSTCNT(1) status);
-				outofband_action(FALSE);
-				assert(FALSE);
-			}
-
-			if (spc_inp_prc & (SHFT_MSK << CTRL_Z))
-			{
-				if ((tt_ptr->stat_blk.term_char == CTRL_Z) && (save_term_msk & char_msk))
-					io_ptr->dollar.zeof = TRUE;
-				else
-					io_ptr->dollar.zeof = FALSE;
-			}
-                }
-
-		if (tt_ptr->stat_blk.term_length && !(save_term_msk & char_msk) &&
-			((buff_len == ONE_CHAR)	/* this is a proxy for !TT$M_ESCAPE */
-			|| (ch[0] != ESC)))
-		{
-			/* demote control character terminators unless they are really enabled by the application */
-			tt_ptr->stat_blk.char_ct++;
-			tt_ptr->stat_blk.term_length--;
-		}
-	}
-	assert(tt_ptr->stat_blk.term_length < ESC_LEN);
-	*v = ch[0];
-	memcpy(io_ptr->dollar.zb, &ch[0], tt_ptr->stat_blk.term_length);
-	io_ptr->dollar.zb[tt_ptr->stat_blk.term_length] = '\0';
-
-	/* The three lines above used to be implemented by the
-	following code:
-
-	if (buff_len == ONE_CHAR)
-	{	*v = ch[0];
-		io_ptr->dollar.zb[0] = '\0';
-	}
-	else
-	{	*v = (ch[0] == ESC) ? 0 : ch[0];
-		if (tt_ptr->stat_blk.term_length > SIZEOF(io_ptr->dollar.zb) - 1)
-		{	tt_ptr->stat_blk.term_length = SIZEOF(io_ptr->dollar.zb) - 1;
-			io_ptr->dollar.za = 2;
-		}
-		memcpy(io_ptr->dollar.zb,&ch[0],tt_ptr->stat_blk.term_length);
-		io_ptr->dollar.zb[tt_ptr->stat_blk.term_length] = '\0';
-	}
-
-	This caused $zb to always be null if NOESCAPE
-	($ZB normally contains the terminator) and
-	the value to be 0 if ESCAPE and an escape sequence arrived.
-	The new behavior is to ALWAYS report the (1st) arriving
-	character and ALWAYS maintain $ZB.  Note that $x is/was not
-	increased if the (1st) arriving character is a terminator.
-	The old code has been left in case we wish to quickly return
-	to the old behavior.
-	*/
-
-	if (!((int)tt_ptr->item_list[0].addr & TRM$M_TM_NOECHO))
-	{
-		if ((io_ptr->dollar.x += tt_ptr->stat_blk.char_ct) > io_ptr->width && io_ptr->wrap)
-		{
-			io_ptr->dollar.y = ++(io_ptr->dollar.y);
-			if(io_ptr->length)
-				io_ptr->dollar.y %= io_ptr->length;
-			io_ptr->dollar.x = 0;
-		}
-	}
-	if (io_ptr->dollar.zeof && (io_ptr->error_handler.len > 0))
-		rts_error(VARLSTCNT(1) ERR_IOEOF);
-	return TRUE;
-}
diff --git a/sr_vvms/iott_read.c b/sr_vvms/iott_read.c
deleted file mode 100644
index 4eca049..0000000
--- a/sr_vvms/iott_read.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "stringpool.h"
-
-GBLREF io_pair 		io_curr_device;
-GBLREF spdesc 		stringpool;
-
-int iott_read( mval *v, int4 t)
-{
-	int4		length;
-
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.free <= stringpool.top);
-	length = ((d_tt_struct*)(io_curr_device.in->dev_sp))->in_buf_sz;
-	ENSURE_STP_FREE_SPACE(length + ESC_LEN);
-	v->str.addr = stringpool.free;
-	return iott_readfl(v,length,t);
-}
diff --git a/sr_vvms/iott_readfl.c b/sr_vvms/iott_readfl.c
deleted file mode 100644
index f77bbf7..0000000
--- a/sr_vvms/iott_readfl.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include "iotimer.h"
-#include "outofband.h"
-#include "timedef.h"
-
-#define TIMER_FLAGS 0
-
-GBLREF io_pair		io_curr_device;
-GBLREF io_pair		io_std_device;
-GBLREF bool		prin_in_dev_failure;
-GBLREF int4		outofband;
-GBLDEF bool		ctrlu_occurred;
-GBLDEF int4		spc_inp_prc;
-
-int iott_readfl(mval *v, int4 length, int4 timeout)
-{
-	int		not_timed_out;
-	boolean_t	timed;
-	uint4		efn_mask, status, time[2];
-	iosb		stat_blk;
-	io_desc		*io_ptr;
-	t_cap		s_mode;
-	d_tt_struct	*tt_ptr;
-	io_termmask	save_term_msk;
-
-	error_def(ERR_IOEOF);
-
-	io_ptr = io_curr_device.in;
-	assert(dev_open == io_ptr->state);
-	tt_ptr = (d_tt_struct *)io_ptr->dev_sp;
-	if (io_curr_device.out == io_ptr)
-		iott_flush(io_curr_device.out);
-	memset(&tt_ptr->stat_blk, 0, SIZEOF(read_iosb));
-	efn_mask = (SHFT_MSK << efn_immed_wait | SHFT_MSK << efn_outofband);
-	not_timed_out = TRUE;
-#ifdef DEBUG
-/* this is for an assert that verifies a reliance on VMS IOSB maintenance */
-		tt_ptr->read_timer = FALSE;
-#endif
-	tt_ptr->item_list[1].addr = timeout;
-	if ((NO_M_TIMEOUT == timeout) || !timeout)
-		timed = FALSE;
-	else
-	{
-		timed = TRUE;
-		time[0] = -time_low(timeout);
-		time[1] = -time_high(timeout) - 1;
-		efn_mask |= SHFT_MSK << efn_timer;
-		status = sys$setimr(efn_timer, &time, iott_cancel_read, io_ptr ,TIMER_FLAGS);
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-	}
-	for (;;)
-	{
-		status = sys$qio(efn_immed_wait ,tt_ptr->channel
-					,tt_ptr->read_mask, &tt_ptr->stat_blk
-					,NULL, 0
-					,v->str.addr, length + ESC_LEN - 1
-					,0, 0, &(tt_ptr->item_list[0]), 4 * (SIZEOF(item_list_struct)));
-		if (SS$_NORMAL != status)
-		{
-			if ((io_curr_device.in == io_std_device.in) && (io_curr_device.out == io_std_device.out))
-			{
-				if (prin_in_dev_failure)
-					sys$exit(status);
-				else
-					prin_in_dev_failure = TRUE;
-			}
-			break;
-		}
-		status = sys$wflor(efn_immed_wait, efn_mask);
-		if (SS$_NORMAL != status)
-			break;
-		if (timed)
-		{
-			status = sys$cantim(io_ptr, 0);
-			if (SS$_NORMAL != status)
-				break;
-		}
-		if (!tt_ptr->stat_blk.status)
-		{
-			if (outofband)
-			{
-				status = sys$dclast(iott_cancel_read, io_ptr, 0);
-				if (SS$_NORMAL != status)
-					break;
-				iott_resetast(io_ptr);		/* reset ast after cancel */
-			}
-			status = sys$synch(efn_immed_wait, &tt_ptr->stat_blk);
-			if (SS$_NORMAL != status)
-				break;
-		}
-		if (outofband)
-		{
-			outofband_action(FALSE);
-			assert(FALSE);
-		}
-		if (ctrlu_occurred)
-		{
-			ctrlu_occurred = FALSE;
-			iott_wtctrlu(tt_ptr->stat_blk.char_ct, io_ptr);
-			if (timed)
-			{
-				/* strictly speaking a <CTRL-U> shouldn't buy you more time, but practically, it works better */
-				status = sys$setimr(efn_timer, &time, iott_cancel_read, io_ptr, TIMER_FLAGS);
-				if (SS$_NORMAL != status)
-					break;
-			}
-			continue;
-		}
-		break;
-	}
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	if (tt_ptr->stat_blk.term_length > ESC_LEN - 1)
-	{
-		tt_ptr->stat_blk.term_length = ESC_LEN - 1;
-		/* this error may be overridden by an error in the iosb */
-		io_ptr->dollar.za = 2;
-	} else
-		io_ptr->dollar.za = 0;
-	v->str.len = tt_ptr->stat_blk.char_ct;
-	memcpy(io_ptr->dollar.zb, v->str.addr + tt_ptr->stat_blk.char_ct, tt_ptr->stat_blk.term_length);
-	io_ptr->dollar.zb[tt_ptr->stat_blk.term_length] = '\0';
-	switch (tt_ptr->stat_blk.status)
-	{
-	case SS$_CONTROLC:
-	case SS$_CONTROLY:
-		assert(0 == tt_ptr->stat_blk.term_length);
-		io_ptr->dollar.zb[0] = (SS$_CONTROLC == tt_ptr->stat_blk.status) ? CTRLC : CTRLY;
-		if (((io_termmask *)tt_ptr->item_list[2].addr)->mask[0] & (SHFT_MSK << io_ptr->dollar.zb[0]))
-			io_ptr->dollar.zb[1] = '\0';
-		else
-			io_ptr->dollar.zb[0] = '\0';
-		break;
-	case SS$_NORMAL:
-		break;
-	case SS$_ABORT:
-	case SS$_CANCEL:
-		assert(!tt_ptr->read_timer);
-		iott_resetast(io_ptr);			/* reset ast after cancel */
-	case SS$_TIMEOUT:				/* CAUTION: fallthrough */
-		not_timed_out = FALSE;
-		break;
-	case SS$_DATACHECK:
-	case SS$_DATAOVERUN:
-	case SS$_PARITY:
-		io_ptr->dollar.za = 1;	/* data mangled */
-		break;
-	case SS$_BADESCAPE:
-	case SS$_PARTESCAPE:
-		io_ptr->dollar.za = 2;	/* escape mangled */
-		break;
-	case SS$_CHANINTLK:
-	case SS$_COMMHARD:
-	case SS$_CTRLERR:
-	case SS$_DEVACTIVE:
-	case SS$_DEVALLOC:
-	case SS$_DEVINACT:
-	case SS$_DEVOFFLINE:
-	case SS$_DEVREQERR:
-	case SS$_DISCONNECT:
-	case SS$_MEDOFL:
-	case SS$_OPINCOMPL:
-	case SS$_TOOMUCHDATA:
-		io_ptr->dollar.za = 3;	/* hardware contention or failure */
-		break;
-	case SS$_DUPUNIT:
-	case SS$_INSFMEM:
-	case SS$_INSFMAPREG:
-	case SS$_INCOMPAT:
-		io_ptr->dollar.za = 4;	/* system configuration */
-		break;
-	case SS$_EXQUOTA:
-	case SS$_NOPRIV:
-		io_ptr->dollar.za = 5;	/* process limits */
-		break;
-	default:
-		io_ptr->dollar.za = 9;	/* if list above is maintained, indicates an iott_ programming defect */
-	}
-	if (!((int)tt_ptr->item_list[0].addr & TRM$M_TM_NOECHO))
-	{
-		if ((io_ptr->dollar.x += v->str.len) > io_ptr->width && io_ptr->wrap)
-		{
-			io_ptr->dollar.y += (io_ptr->dollar.x / io_ptr->width);
-			if(io_ptr->length)
-				io_ptr->dollar.y %= io_ptr->length;
-			io_ptr->dollar.x %= io_ptr->width;
-		}
-	}
-	if (spc_inp_prc & (SHFT_MSK << CTRL_Z))
-	{
-		if ((CTRL_Z == tt_ptr->stat_blk.term_char) && !(tt_ptr->ext_cap & TT2$M_PASTHRU))
-		{
-			io_ptr->dollar.zeof =  TRUE;
-			if (io_ptr->error_handler.len > 0)
-				rts_error(VARLSTCNT(1) ERR_IOEOF);
-		} else
-			io_ptr->dollar.zeof = FALSE;
-        }
-	return not_timed_out;
-}
diff --git a/sr_vvms/iott_resetast.c b/sr_vvms/iott_resetast.c
deleted file mode 100644
index 2694044..0000000
--- a/sr_vvms/iott_resetast.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "iottdef.h"
-#include "outofband.h"
-#include "curr_dev_outbndset.h"
-#include "std_dev_outbndset.h"
-
-GBLREF io_pair 		io_std_device;
-GBLREF uint4	std_dev_outofband_msk;
-
-void iott_resetast( io_desc *io_ptr)
-{
-	void		std_dev_outbndset(), curr_dev_outbndset(), (*ast_routine)();
-	short		iosb[4];
-	uint4	status;
-	d_tt_struct 	*tt_ptr;
-	io_terminator	outofbands;
-
-	tt_ptr = (d_tt_struct*) io_ptr->dev_sp;
-	outofbands.x = 0;
-	outofbands.mask = tt_ptr->enbld_outofbands.mask | tt_ptr->ctrlu_msk;
-
-	if (io_ptr == io_std_device.in)
-	{
-		/* <CTRL-Y> doesn't do anything unless it's in the enabled_outofbands.mask,
-		but we're using the std_dev_outofband_msk to hold the inital state of the CONTROL=Y;
-		this probably deserves more attention, but for now, if we mask it out,
-		the user at least gets to see evidence of disturbance e.g. that input was lost*/
-		outofbands.mask |= (std_dev_outofband_msk & (~CTRLY_MSK));
-		ast_routine = std_dev_outbndset;
-	}
-	else
-		ast_routine = curr_dev_outbndset;
-
-	status = sys$qiow(EFN$C_ENF, tt_ptr->channel
-		,(IO$_SETMODE | IO$M_OUTBAND | IO$M_TT_ABORT) ,iosb
-		,NULL ,0
-		,ast_routine ,&outofbands ,0 ,0 ,0 ,0 );
-	if (status == SS$_NORMAL)
-		status = iosb[0];
-	if (status != SS$_NORMAL)
-		rts_error(VARLSTCNT(1) status);
-}
diff --git a/sr_vvms/iott_use.c b/sr_vvms/iott_use.c
deleted file mode 100644
index c98b833..0000000
--- a/sr_vvms/iott_use.c
+++ /dev/null
@@ -1,494 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <smgtrmptr.h>
-#include <ssdef.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "io_params.h"
-#include "iottdef.h"
-#include "nametabtyp.h"
-#include "outofband.h"
-#include "stringpool.h"
-#include "namelook.h"
-#include "copy.h"
-
-LITDEF nametabent filter_names[] =
-{
-	 { 4, "CHAR*"},
-	 { 3, "ESC*"},
-	 { 6, "NOCHAR*"},
-	 { 5, "NOESC*"}
-};
-LITDEF unsigned char filter_index[27] =
-{
-	0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2
-	,2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4
-	,4, 4, 4
-};
-
-GBLREF boolean_t	ctrlc_on;
-GBLREF io_pair		io_std_device;
-GBLREF uint4		spc_inp_prc, std_dev_outofband_msk;
-
-LITREF unsigned char	io_params_size[];
-
-error_def(ERR_DEVPARMNEG);
-error_def(ERR_TTINVFILTER);
-error_def(ERR_TTWIDTHTOOBIG);
-error_def(ERR_TTLENGTHTOOBIG);
-
-void iott_use(io_desc *iod, mval *pp)
-{
-	bool		flush_input;
-	char		buf[512];
-	int		fil_type;
-	unsigned char	ch, len;
-	short		field;
-	int4		width, length;
-	uint4 		mask_in, status;
-	unsigned int	bufsz, buflen;
-	unsigned int	req_code, args[4];
-	d_tt_struct 	*out_ttptr, *in_ttptr, *tt_ptr;
-	io_desc		*d_in, *d_out;
-	io_termmask	mask_term;
-	iosb		stat_blk;
-	char		*tab;
-	t_cap		s_mode;
-	int		p_offset;
-
-	assert(iod->state == dev_open);
-	assert(iod->type == tt);
-	assert(iod->pair.in == iod || iod->pair.out == iod);
-	iott_flush(iod);
-	p_offset = 0;
-	if (*(pp->str.addr + p_offset) != iop_eol)
-	{
-		tt_ptr = (d_tt_struct *)iod->dev_sp;
-		bufsz = SIZEOF(buf);
-		flush_input = FALSE;
-		/* WARNING - the inclusion of an IOSB on this qio is NOT spurious!  Values in the IOSB
-			are used, nay, required on the subsequent SETMODE call.  RTPAD will fail the
-			SETMODE on certain circumstances when the IOSB is not present.
-		*/
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel,
-			IO$_SENSEMODE, &stat_blk, 0, 0, &s_mode, 12, 0, 0, 0, 0);
-		if (status == SS$_NORMAL)
-			status = stat_blk.status;
-		if (status != SS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		/* although it is only for safety, the following covers for
-			read * (iott_rdone) and dm_read use of pasthru et al */
-		s_mode.ext_cap &= (~TT2$M_PASTHRU);
-		s_mode.ext_cap |= (tt_ptr->ext_cap & TT2$M_PASTHRU);
-		s_mode.ext_cap &= (~TT2$M_EDITING);
-		s_mode.ext_cap |= (tt_ptr->ext_cap & TT2$M_EDITING);
-		s_mode.term_char &= (~TT$M_ESCAPE);
-		s_mode.term_char |= (tt_ptr->term_char & TT$M_ESCAPE);
-		s_mode.term_char &= (~TT$M_TTSYNC);
-		s_mode.term_char |= (tt_ptr->term_char & TT$M_TTSYNC);
-		d_in = iod->pair.in;
-		d_out = iod->pair.out;
-		in_ttptr = d_in->type == tt ? (d_tt_struct *)d_in->dev_sp : (d_tt_struct *)0;
-		out_ttptr = d_out->type == tt ? (d_tt_struct *)d_out->dev_sp : (d_tt_struct *)0;
-		if (in_ttptr)
-		{
-			in_ttptr->term_chars_twisted = FALSE; /* they were normalized above */
-			mask_in = in_ttptr->item_list[0].addr;
-			memcpy(&mask_term, in_ttptr->item_list[2].addr, SIZEOF(io_termmask));
-		}
-		while (*(pp->str.addr + p_offset) != iop_eol)
-		{
-			switch (ch = *(pp->str.addr + p_offset++))
-			{
-			case iop_canctlo:
-				if (out_ttptr)
-					out_ttptr->write_mask |= IO$M_CANCTRLO;
-				break;
-			case iop_cenable:
-				if (iod == io_std_device.in && !ctrlc_on)
-				{
-					ctrlc_on = TRUE;
-					std_dev_outofband_msk |= CTRLC_MSK;
-					iott_resetast(iod);
-				}
-				break;
-			case iop_nocenable:
-				if (iod == io_std_device.in && ctrlc_on)
-				{
-					ctrlc_on = FALSE;
-					std_dev_outofband_msk &= (~CTRLC_MSK);
-					iott_resetast(iod);
-				}
-				break;
-			case iop_clearscreen:
-				if (out_ttptr)
-				{
-					status = sys$qiow(EFN$C_ENF, out_ttptr->channel, IO$_WRITEVBLK,
-						&stat_blk, NULL, 0,
-						out_ttptr->clearscreen.addr, out_ttptr->clearscreen.len,
-						0, 0, 0, 0);
-					if (status == SS$_NORMAL)
-						status = stat_blk.status;
-					if (status != SS$_NORMAL)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
-				break;
-			case iop_convert:
-				mask_in |= TRM$M_TM_CVTLOW;
-				break;
-			case iop_noconvert:
-				mask_in &= (~TRM$M_TM_CVTLOW);
-				break;
-			case iop_ctrap:
-				if (in_ttptr)
-				{
-					in_ttptr->enbld_outofbands.mask = *((uint4 *)(pp->str.addr + p_offset));
-					iott_resetast(iod);
-				}
-				break;
-			case iop_downscroll:
-				if (out_ttptr && out_ttptr->term_tab_entry)
-				{
-					args[0] = 2;
-					args[1] = d_out->dollar.y;
-					args[2] = 1;
-					req_code = SMG$K_SET_CURSOR_ABS;
-					status = smg$get_term_data (&out_ttptr->term_tab_entry,
-						&req_code, &bufsz, &buflen, buf, args);
-					if (!(status & 1))
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					status = sys$qiow(EFN$C_ENF, out_ttptr->channel, IO$_WRITEVBLK,
-						&stat_blk, NULL, 0, buf, buflen, 0, 0, 0, 0);
-					if (status == SS$_NORMAL)
-						status = stat_blk.status;
-					if (status != SS$_NORMAL)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					if (d_out->dollar.y > 0)
-					{
-						d_out->dollar.y --;
-						if (d_out->length)
-							d_out->dollar.y %= d_out->length;
-					}
-					d_out->dollar.x = 0;
-				}
-				break;
-			case iop_echo:
-				if (in_ttptr)
-					s_mode.term_char &= (~TT$M_NOECHO);
-				break;
-			case iop_noecho:
-				if (in_ttptr)
-					s_mode.term_char |= TT$M_NOECHO;
-				break;
-			case iop_editing:
-				if (in_ttptr)
-					s_mode.ext_cap |= TT2$M_EDITING;
-				break;
-			case iop_noediting:
-				if (in_ttptr)
-					s_mode.ext_cap &= (~TT2$M_EDITING);
-				break;
-			case iop_escape:
-				if (in_ttptr)
-					s_mode.term_char |= TT$M_ESCAPE;
-				break;
-			case iop_noescape:
-				if (in_ttptr)
-					s_mode.term_char &= (~TT$M_ESCAPE);
-			default:
-				break;
-			case iop_eraseline:
-				if (out_ttptr)
-				{
-					status = sys$qiow(EFN$C_ENF, out_ttptr->channel, IO$_WRITEVBLK,
-						&stat_blk, NULL, 0,
-						out_ttptr->erase_to_end_line.addr, out_ttptr->erase_to_end_line.len,
-						0, 0, 0, 0);
-					if (status == SS$_NORMAL)
-						status = stat_blk.status;
-					if (status != SS$_NORMAL)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
-				break;
-			case iop_exception:
-				iod->error_handler.len = *(pp->str.addr + p_offset);
-				iod->error_handler.addr = pp->str.addr + p_offset + 1;
-				s2pool(&iod->error_handler);
-				break;
-			case iop_filter:
-				len = *(pp->str.addr + p_offset);
-				tab = pp->str.addr + p_offset + 1;
-				if ((fil_type = namelook(filter_index, filter_names, tab, len)) < 0)
-				{
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_TTINVFILTER);
-					return;
-				}
-				switch (fil_type)
-				{
-					case 0:
-						iod->write_filter |= CHAR_FILTER;
-						break;
-					case 1:
-						iod->write_filter |= ESC1;
-						break;
-					case 2:
-						iod->write_filter &= ~CHAR_FILTER;
-						break;
-					case 3:
-						iod->write_filter &= ~ESC1;
-						break;
-				}
-				break;
-			case iop_nofilter:
-				iod->write_filter = 0;
-				break;
-			case iop_field:
-				GET_SHORT(field, pp->str.addr + p_offset);
-				if (field < 0)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DEVPARMNEG);
-				if (in_ttptr)
-					if (field == 0)
-						in_ttptr->in_buf_sz = TTDEF_BUF_SZ;
-					else
-						in_ttptr->in_buf_sz = field;
-				break;
-			case iop_flush:
-				flush_input = TRUE;
-				break;
-			case iop_hostsync:
-				if (in_ttptr)
-					s_mode.term_char |= TT$M_HOSTSYNC;
-				break;
-			case iop_nohostsync:
-				if (in_ttptr)
-					s_mode.term_char &= (~TT$M_HOSTSYNC);
-				break;
-			case iop_insert:
-				if (in_ttptr)
-					s_mode.ext_cap |= TT2$M_INSERT;
-				break;
-			case iop_noinsert:
-				if (in_ttptr)
-					s_mode.ext_cap &= (~TT2$M_INSERT);
-				break;
-			case iop_length:
-				GET_LONG(length, pp->str.addr + p_offset);
-				if (length < 0)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DEVPARMNEG);
-				if (length > TTMAX_PG_LENGTH)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_TTLENGTHTOOBIG);
-				s_mode.pg_length = length;
-				d_out->length = length;
-				break;
-			case iop_pasthru:
-				if (in_ttptr)
-				{
-					s_mode.ext_cap |= TT2$M_PASTHRU;
-					if ((spc_inp_prc & (SHFT_MSK << CTRL_U)) && (s_mode.term_char & TT$M_SCOPE))
-					{
-						in_ttptr->ctrlu_msk =0;
-						iott_resetast(iod);
-					}
-				}
-				break;
-			case iop_nopasthru:
-				if (in_ttptr)
-				{
-					s_mode.ext_cap &= (~TT2$M_PASTHRU);
-					if ((spc_inp_prc & (SHFT_MSK << CTRL_U)) && (s_mode.term_char & TT$M_SCOPE))
-					{
-						in_ttptr->ctrlu_msk = (SHFT_MSK << CTRL_U);
-						iott_resetast(iod);
-					}
-				}
-				break;
-			case iop_readsync:
-				if (in_ttptr)
-					s_mode.term_char |= TT$M_READSYNC;
-				break;
-			case iop_noreadsync:
-				if (in_ttptr)
-					s_mode.term_char &= (~TT$M_READSYNC);
-				break;
-			case iop_terminator:
-				memcpy(&mask_term.mask[0], (pp->str.addr + p_offset), SIZEOF(io_termmask));
-				if (mask_term.mask[0] == NUL &&
-				    mask_term.mask[1] == NUL &&
-				    mask_term.mask[2] == NUL &&
-				    mask_term.mask[3] == NUL &&
-				    mask_term.mask[4] == NUL &&
-				    mask_term.mask[5] == NUL &&
-				    mask_term.mask[6] == NUL &&
-				    mask_term.mask[7] == NUL)
-					mask_term.mask[0] = TERM_MSK;
-				break;
-			case iop_noterminator:
-				memset(&mask_term.mask[0], 0, SIZEOF(io_termmask));
-				break;
-			case iop_ttsync:
-				s_mode.term_char |= TT$M_TTSYNC;
-				break;
-			case iop_nottsync:
-				s_mode.term_char &= (~TT$M_TTSYNC);
-				break;
-			case iop_typeahead:
-				if (in_ttptr)
-					s_mode.term_char &= (~TT$M_NOTYPEAHD);
-				break;
-			case iop_notypeahead:
-				if (in_ttptr)
-					s_mode.term_char |= TT$M_NOTYPEAHD;
-				break;
-			case iop_upscroll:
-				if (out_ttptr && out_ttptr->term_tab_entry)
-				{
-					args[0] = 2;
-					args[1] = d_out->dollar.y + 2;
-					args[2] = 1;
-					req_code = SMG$K_SET_CURSOR_ABS;
-					status = smg$get_term_data (&out_ttptr->term_tab_entry, &req_code,
-						&bufsz, &buflen, buf, args);
-					if (!(status & 1))
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					status = sys$qiow(EFN$C_ENF, out_ttptr->channel, IO$_WRITEVBLK,
-						&stat_blk, NULL, 0, buf, buflen, 0, 0, 0, 0);
-					if (status == SS$_NORMAL)
-						status = stat_blk.status;
-					if (status != SS$_NORMAL)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-
-					d_out->dollar.y++;
-					if (d_out->length)
-						d_out->dollar.y %= d_out->length;
-					d_out->dollar.x = 0;
-				}
-				break;
-			case iop_width:
-				GET_LONG(width, pp->str.addr + p_offset);
-				if (width < 0)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_DEVPARMNEG);
-				if (width > TTMAX_PG_WIDTH)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_TTWIDTHTOOBIG);
-				if (width == 0)
-				{
-					s_mode.term_char &= (~TT$M_WRAP);
-					d_out->wrap = FALSE;
-					s_mode.pg_width = TTDEF_PG_WIDTH;
-					d_out->width = TTDEF_PG_WIDTH;
-				} else
-				{
-		/* ******** later with a ring buffer this will change to indicate ******** */
-		/* ******** location of a carriage return on an extended write    ******** */
-					s_mode.pg_width = width;
-					d_out->width = width;
-					s_mode.term_char |= TT$M_WRAP;
-					d_out->wrap = TRUE;
-				}
-				break;
-			case iop_wrap:
-				s_mode.term_char |= TT$M_WRAP;
-				d_out->wrap = TRUE;
-				break;
-			case iop_nowrap:
-				s_mode.term_char &= (~TT$M_WRAP);
-				d_out->wrap = FALSE;
-				break;
-			case iop_x:
-				if (out_ttptr && out_ttptr->term_tab_entry)
-				{
-					GET_LONG(d_out->dollar.x, pp->str.addr + p_offset);
-					if (d_out->dollar.x < 0)
-						d_out->dollar.x = 0;
-					if (d_out->dollar.x > d_out->width && d_out->wrap)
-					{
-						d_out->dollar.y += (d_out->dollar.x / d_out->width);
-						if (d_out->length)
-							d_out->dollar.y %= d_out->length;
-						d_out->dollar.x	%= d_out->width;
-					}
-					args[0] = 2;
-					args[1] = d_out->dollar.y + 1;
-					args[2] = d_out->dollar.x + 1;
-					req_code = SMG$K_SET_CURSOR_ABS;
-					status = smg$get_term_data (&out_ttptr->term_tab_entry,
-						&req_code, &bufsz, &buflen, buf, args);
-					if (!(status & 1))
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					status = sys$qiow(EFN$C_ENF, out_ttptr->channel, IO$_WRITEVBLK,
-						&stat_blk, NULL, 0, buf, buflen, 0, 0, 0, 0);
-					if (status == SS$_NORMAL)
-						status = stat_blk.status;
-					if (status != SS$_NORMAL)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
-				break;
-			case iop_y:
-				if (out_ttptr && out_ttptr->term_tab_entry)
-				{
-					GET_LONG(d_out->dollar.y, pp->str.addr + p_offset);
-					if (d_out->dollar.y < 0)
-						d_out->dollar.y = 0;
-					if (d_out->length)
-						d_out->dollar.y %= d_out->length;
-					args[0] = 2;
-					args[1] = d_out->dollar.y + 1;
-					args[2] = d_out->dollar.x + 1;
-					req_code = SMG$K_SET_CURSOR_ABS;
-					status = smg$get_term_data (&out_ttptr->term_tab_entry,
-						&req_code, &bufsz, &buflen, buf, args);
-					if (!(status & 1))
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-					status = sys$qiow(EFN$C_ENF, out_ttptr->channel, IO$_WRITEVBLK,
-						&stat_blk, NULL, 0, buf, buflen, 0, 0, 0, 0);
-					if (status == SS$_NORMAL)
-						status = stat_blk.status;
-					if (status != SS$_NORMAL)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
-				break;
-			}
-			p_offset += ((IOP_VAR_SIZE == io_params_size[ch]) ?
-				(unsigned char)*(pp->str.addr + p_offset) + 1 : io_params_size[ch]);
-		}
-		status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_SETMODE,
-			&stat_blk, NULL, 0, &s_mode, 12, 0, 0, 0, 0);
-		if (status == SS$_NORMAL)
-			status = stat_blk.status;
-		if (status != SS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		if (in_ttptr)
-		{
-			in_ttptr->item_list[0].addr = mask_in;
-			in_ttptr->term_char = s_mode.term_char;
-			in_ttptr->ext_cap = s_mode.ext_cap;
-			memcpy(in_ttptr->item_list[2].addr, &mask_term, SIZEOF(io_termmask));
-			if (flush_input)
-			{
-				status = sys$qiow(EFN$C_ENF, in_ttptr->channel,
-			  		IO$_READVBLK | IO$M_PURGE | IO$M_TIMED | IO$M_NOECHO,
-					&stat_blk, NULL, 0, &flush_input, 1, 0, 0, 0, 0);
-				if (status == SS$_NORMAL)
-					status = stat_blk.status;
-				if ((status != SS$_NORMAL) && (status != SS$_TIMEOUT))
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-			}
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/iott_write.c b/sr_vvms/iott_write.c
deleted file mode 100644
index f8965e7..0000000
--- a/sr_vvms/iott_write.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <ssdef.h>
-
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include "timedef.h"
-#include "dollarx.h"
-
-GBLDEF uint4 iott_write_delay[2] =
-			{
-				(~(3300000) + 1),
-				0xffffffff
-			};
-GBLREF io_pair io_curr_device;
-
-void iott_write(mstr *mstr_ptr)
-{
-	d_tt_struct	*tt_ptr;
-	char		*iop, *io_in, *str;
-	uint4		status;
-	int		cpy_len, str_len, t_len;
-	io_desc		*io_ptr;
-	iosb_struct	*sb[2];
-
-	io_ptr = io_curr_device.out;
-	tt_ptr = (d_tt_struct *)io_curr_device.out->dev_sp;
-	/* pending must follow free - must be able to get pair uninterrupted with movq */
-	assert(&tt_ptr->sb_free + 1 == &tt_ptr->sb_pending);
-	str = mstr_ptr->addr;
-	str_len = mstr_ptr->len;
-	while (0 != str_len)
-	{
-		for (;  ;)
-		{
-			movq(&tt_ptr->sb_free, sb);
-			if (sb_dist(sb[0], sb[1]) < MIN_IOSB_SP)
-				sys$hiber();
-			else
-				break;
-		}
-		for (;  ;)
-		{
-			iop = tt_ptr->io_pending;
-			if (io_space(tt_ptr->io_free, (unsigned char *)iop) < MIN_RINGBUF_SP)
-				sys$hiber();
-			else
-				break;
-		}
-		assert(tt_ptr->io_free < tt_ptr->io_buftop);
-		if (tt_ptr->io_free < (iop = tt_ptr->io_pending))
-			cpy_len = ((t_len = (unsigned char *)iop - tt_ptr->io_free) <= str_len ?
-					(t_len > MAX_MEMCPY ? MAX_MEMCPY : t_len) :
-					(str_len > MAX_MEMCPY ? MAX_MEMCPY : str_len));
-		else
-			cpy_len = ((t_len = tt_ptr->io_buftop - tt_ptr->io_free) <= str_len ?
-					(t_len > MAX_MEMCPY ? MAX_MEMCPY : t_len) :
-					(str_len > MAX_MEMCPY ? MAX_MEMCPY : str_len));
-		assert(tt_ptr->io_free + cpy_len <= tt_ptr->io_buftop);
-		memcpy(tt_ptr->io_free, str, cpy_len);
-		str += cpy_len;
-		str_len -= cpy_len;
-		if ((tt_ptr->io_free += cpy_len) == tt_ptr->io_buftop)
-			tt_ptr->io_free = tt_ptr->io_buffer;
-		if (tt_ptr->io_free < tt_ptr->io_inuse)
-		{
-			if (SS$_NORMAL != (status = sys$dclast(iott_wtstart, tt_ptr, 0)))
-				rts_error(VARLSTCNT(1) status);
-		} else  if (tt_ptr->io_free - tt_ptr->io_inuse >= SPACE_INUSE)
-		{
-			if (SS$_NORMAL != (status = sys$dclast(iott_wtstart, tt_ptr, 0)))
-				rts_error(VARLSTCNT(1) status);
-		} else  if (FALSE == tt_ptr->clock_on)
-		{
-			tt_ptr->clock_on = TRUE;
-			if (SS$_NORMAL != (status = sys$setimr(efn_ignore, iott_write_delay, iott_clockfini ,tt_ptr, 0)))
-				rts_error(VARLSTCNT(1) status);
-		}
-	}
-	dollarx(io_ptr, (uchar_ptr_t)mstr_ptr->addr, (uchar_ptr_t)mstr_ptr->addr + mstr_ptr->len);
-	tt_ptr->write_mask &= (~IO$M_CANCTRLO);
-	return;
-}
diff --git a/sr_vvms/iott_wtclose.c b/sr_vvms/iott_wtclose.c
deleted file mode 100644
index 53e36f0..0000000
--- a/sr_vvms/iott_wtclose.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <dcdef.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "iottdef.h"
-
-GBLREF io_pair		io_std_device;
-
-void iott_wtclose(d_tt_struct *tt_ptr)
-{
-	uint4		status;
-	short		length;
-	unsigned char	sensemode[8];
-
-	if (tt_ptr->clock_on)
-	{
-		if (SS$_NORMAL != (status = sys$cantim(tt_ptr, 0)))
-			rts_error(VARLSTCNT(1) status);
-	}
-	if (tt_ptr->io_free < tt_ptr->io_inuse)
-		length = tt_ptr->io_buftop - tt_ptr->io_inuse;
-	else
-		length = tt_ptr->io_free - tt_ptr->io_inuse;
-	tt_ptr->sb_free->start_addr = tt_ptr->io_inuse;
-	if (SS$_NORMAL != (status = sys$qiow(EFN$C_ENF, tt_ptr->channel, tt_ptr->write_mask, &(tt_ptr->sb_free->iosb_val),
-						iott_wtfini, tt_ptr, tt_ptr->io_inuse, length, 0, 0, 0, 0)))
-		rts_error(VARLSTCNT(1) status);
-	status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_SENSEMODE | IO$M_RD_MODEM, &tt_ptr->sb_free->iosb_val, 0, 0,
-				sensemode, 0 ,0, 0, 0, 0);
-	if ((io_std_device.in->dev_sp != tt_ptr) &&
-		(io_std_device.out->dev_sp != tt_ptr) &&
-		(SS$_NORMAL == status) && (DT$_LAT == sensemode[0]))
-	{
-		if (SS$_NORMAL != (status = sys$qiow(EFN$C_ENF, tt_ptr->channel, IO$_TTY_PORT | IO$M_LT_DISCON,
-					&tt_ptr->sb_free->iosb_val, 0, 0, 0, 0, 0, 0, 0, 0)))
-			rts_error(VARLSTCNT(1) status);
-	}
-	tt_ptr->io_inuse = tt_ptr->io_free;
-	tt_ptr->sb_free++;
-	tt_ptr->sb_free = new_sbfree(tt_ptr);
-	return;
-}
diff --git a/sr_vvms/iott_wtctrlu.c b/sr_vvms/iott_wtctrlu.c
deleted file mode 100644
index 9ff3c2a..0000000
--- a/sr_vvms/iott_wtctrlu.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-#define BS 8
-
-GBLREF io_pair 		io_curr_device;
-
-#define ERASE_BUF_SZ 64
-static readonly unsigned char eraser[ERASE_BUF_SZ * 3] =
-{
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS,
-	BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS, BS,SP,BS
-};
-
-void iott_wtctrlu( short v, io_desc *iod)
-{
-mstr	temp;
-int	x, y;
-short 	s;
-
-	temp.addr = &eraser[0];
-	x = iod->dollar.x;
-	y = iod->dollar.y;
-	if (iod->wrap)
-		v %= iod->width;
-
-	if ((s = v / ERASE_BUF_SZ) != 0)
-	{
-		temp.len = ERASE_BUF_SZ * 3;
-		while (s-- != 0)
-		{
-			iott_write(&temp);
-			iod->dollar.x = x;
-			iod->dollar.y = y;
-		}
-	}
-	if ((s = v % ERASE_BUF_SZ) != 0)
-	{
-		temp.len = s * 3;
-		iott_write(&temp);
-		iod->dollar.x = x;
-		iod->dollar.y = y;
-	}
-	iott_flush(io_curr_device.out);
-	return;
-}
diff --git a/sr_vvms/iott_wtfini.c b/sr_vvms/iott_wtfini.c
deleted file mode 100644
index 341451f..0000000
--- a/sr_vvms/iott_wtfini.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "gtm_wake.h"
-
-void iott_wtfini(d_tt_struct *tt_ptr)
-{
-	tt_ptr->io_pending = tt_ptr->sb_pending->start_addr +
-					tt_ptr->sb_pending->iosb_val.char_ct;
-	if (tt_ptr->io_pending == tt_ptr->io_buftop)
-		tt_ptr->io_pending = tt_ptr->io_buffer;
-	tt_ptr->sb_pending++;
-	if (tt_ptr->sb_pending == tt_ptr->sb_buftop)
-		tt_ptr->sb_pending = tt_ptr->sb_buffer;
-	gtm_wake(0,0);
-	return;
-}
-
diff --git a/sr_vvms/iott_wtstart.c b/sr_vvms/iott_wtstart.c
deleted file mode 100644
index 710fddf..0000000
--- a/sr_vvms/iott_wtstart.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include "xfer_enum.h"
-#include "op.h"
-#include "deferred_events.h"
-
-GBLREF io_pair	io_curr_device;
-GBLREF io_pair	io_std_device;
-GBLREF bool	prin_out_dev_failure;
-GBLREF int	(*xfer_table[])();
-
-void iott_wtstart(d_tt_struct *tt_ptr)
-{
-	int	length;
-	uint4	status;
-
-	if (tt_ptr->io_free != tt_ptr->io_inuse)
-	{
-		tt_ptr->sb_free->start_addr = tt_ptr->io_inuse;
-		if (tt_ptr->io_free < tt_ptr->io_inuse)
-		{
-			length = tt_ptr->io_buftop - tt_ptr->io_inuse;
-			tt_ptr->io_inuse = tt_ptr->io_buffer;
-		} else
-		{
-			length = tt_ptr->io_free - tt_ptr->io_inuse;
-			tt_ptr->io_inuse = tt_ptr->io_free;
-		}
-		if (SS$_NORMAL == (status = sys$qio(
-					 efn_iott_write
-					,tt_ptr->channel
-					,tt_ptr->write_mask
-					,&(tt_ptr->sb_free->iosb_val)
-					,iott_wtfini
-					,tt_ptr
-					,tt_ptr->sb_free->start_addr
-					,length
-					,0
-					,0
-					,0
-					,0)))
-		{
-			prin_out_dev_failure = FALSE;
-			tt_ptr->sb_free++;
-			if (tt_ptr->sb_free == tt_ptr->sb_buftop)
-				tt_ptr->sb_free = tt_ptr->sb_buffer;
-		} else
-		{
-			if (io_curr_device.out == io_std_device.out)
-			{
-				if (prin_out_dev_failure)
-					sys$exit(status);
-				else
-					prin_out_dev_failure = TRUE;
-			}
-			xfer_set_handlers(tt_write_error_event, tt_write_error_set, status);
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/iottdef.h b/sr_vvms/iottdef.h
deleted file mode 100644
index 5294f8e..0000000
--- a/sr_vvms/iottdef.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __IOTTDEF_H__
-#define __IOTTDEF_H__
-
-#define IO_FUNC_R (IO$_READVBLK | IO$M_EXTEND)
-#define IO_FUNC_W IO$_WRITEVBLK
-#define TERM_MSK 0x00002000	/* <RET> */
-
-#define SHFT_MSK 0x00000001
-#define CTRL_B 2
-#define CTRL_U 21
-#define CTRL_Z 26
-
-#include "iottdefsp.h"
-
-#define ESC 27
-
-#define TTMAX_PG_LENGTH	255
-#define TTMAX_PG_WIDTH	511
-#define TTDEF_PG_WIDTH 	255
-#define TTDEF_BUF_SZ 	1024
-
-#define TTEOL "\015\012"
-#define TERMINAL_STATIC_ASTS 2
-#define IOSB_BUF_SZ	20
-#define RING_BUF_SZ	2048
-#define MIN_RINGBUF_SP	128
-#define MIN_IOSB_SP	3
-#define SPACE_INUSE	768
-#define MAX_MEMCPY	512
-
-#define io_space(x,y) (x >= y ? RING_BUF_SZ - (x - y) : (y - x))
-
-#define sb_dist(x,y) (x >= y ? IOSB_BUF_SZ - (x - y) : (y - x))
-
-#define new_sbfree(a) ((a)->sb_buffer + (((a)->sb_free - (a)->sb_buffer) % IOSB_BUF_SZ))
-
-/* ***************************************************** */
-/* *********** structure for terminal driver *********** */
-/* ***************************************************** */
-
-typedef struct
-{	unsigned short status;
-	unsigned short char_ct;
-	unsigned char term_char;
-	unsigned char reserved;
-	unsigned char term_length;
-	unsigned char cur_pos_eol;
-}read_iosb;
-
-
-typedef struct
-{	unsigned short	status;
-	unsigned short	char_ct;
-	uint4	dev_dep_info;
-}iosb;
-
-
-typedef struct
-{
-	read_iosb iosb_val;
-	char *start_addr;
-}iosb_struct;
-
-typedef struct
-{	uint4	mask[8];
-} io_termmask;
-
-typedef struct
-{	uint4	x;
-	uint4	mask;
-}io_terminator;
-
-typedef struct
-{
-	unsigned short buf_len;
-	unsigned short item_code;
-	char *addr;
-	char *ret_addr;
-}item_list_struct;
-
-typedef struct
-{
-
-	short 		channel;	/* channel for access to terminal */
-	unsigned char	clock_on;	/* flag for clock running or off  */
-	uint4	read_mask;	/* arg mask used in sys$qio read  */
-	uint4	write_mask;	/* arg mask for sys$qio write	  */
-	uint4	in_buf_sz;	/* size of read buffer		  */
-	/* unsigned short  pg_width;	 width of output page		  */
-	uint4	term_char;
-	uint4	ext_cap;
-	uint4	term_tab_entry;	/* SMG index for terminal type    */
-	io_terminator	enbld_outofbands; /*enabled out-of-band chars*/
-	unsigned char	read_timer;
-	item_list_struct item_list[6];
-	uint4   item_len;
-	unsigned char	*io_inuse;	/* output buffer pointer to area  */
-					/* in use but not qio'd		  */
-	unsigned char   *io_free;	/* pointer to free space in buff  */
-	unsigned char	*io_pending;	/* pointer to data already queued */
-	unsigned char 	*io_buftop;
-	unsigned char	*io_buffer;	/* the write ring buffer	  */
-	/* pending must follow free - must be able to get pair uninterrupted with movq */
-	iosb_struct	*sb_free;	/* first free position in buffer  */
-	iosb_struct	*sb_pending;	/* pointer to first iosb that 	  */
-					/* return data after qio is done  */
-
-	iosb_struct	*sb_buftop;
-	iosb_struct	*sb_buffer;	/* the iosb ring buffer		  */
-	mstr		erase_to_end_line;
-	mstr		key_up_arrow;
-	mstr		key_down_arrow;
-	mstr		clearscreen;
-	read_iosb	stat_blk;
-	bool		term_chars_twisted;
-	uint4	ctrlu_msk;
-}d_tt_struct;
-
-typedef struct
-{	unsigned char	class;
-	unsigned char	type;
-	unsigned short	pg_width;
-	unsigned int	term_char : 24;
-	unsigned int	pg_length : 8;
-	uint4	ext_cap;	/* extended terminal characteristics */
-}t_cap;	/* terminal capabilites */
-
-void iott_cancel_read(io_desc *io_ptr);
-void iott_clockfini(d_tt_struct *tt_ptr);
-void iott_resetast(io_desc *io_ptr);
-void iott_wtclose(d_tt_struct *tt_ptr);
-void iott_wtctrlu(short v, io_desc *iod);
-void iott_wtstart(d_tt_struct *tt_ptr);
-void iott_wtfini(d_tt_struct *tt_ptr);
-
-#endif
diff --git a/sr_vvms/iottdefsp.h b/sr_vvms/iottdefsp.h
deleted file mode 100644
index 0f0cc6b..0000000
--- a/sr_vvms/iottdefsp.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define ASCII_ESC 		27	/*	this ASCII value is needed on any platform	*/
-#define EBCDIC_ESC		39
-#define ASCII_CR		13
-#define EBCDIC_CR		13
-#define ASCII_LF		10
-#define EBCDIC_LF		37
-#define ASCII_FF		12
-#define EBCDIC_FF		12
-#define ASCII_BS		8
-#define EBCDIC_BS		22
-#define VT			11
-
-#define ASCII_TTEOL		"\015\012"
-#define EBCDIC_TTEOL 		"\025"
-
-#define ESC			ASCII_ESC
-#define NATIVE_ESC		ASCII_ESC
-#define NATIVE_CR		ASCII_CR
-#define NATIVE_LF		ASCII_LF
-#define NATIVE_FF		ASCII_FF
-#define NATIVE_BS		ASCII_BS
-#define NATIVE_TTEOL		((ascii != io_ptr->out_code_set) ? EBCDIC_TTEOL : ASCII_TTEOL)
-#define NATIVE_VT		VT
diff --git a/sr_vvms/ious_iocontrol.c b/sr_vvms/ious_iocontrol.c
deleted file mode 100644
index 85c0d0d..0000000
--- a/sr_vvms/ious_iocontrol.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iousdef.h"
-#include <descrip.h>
-
-GBLREF io_pair		io_curr_device;
-
-void ious_iocontrol(mstr *mn, int4 argcnt, va_list args)
-{
-	struct dsc$descriptor val;
-
-	val.dsc$w_length = mn->len;
-	val.dsc$b_dtype = DSC$K_DTYPE_T;
-	val.dsc$b_class = DSC$K_CLASS_S;
-	val.dsc$a_pointer = mn->addr;
-
-	(((d_us_struct*)(io_curr_device.out->dev_sp))->disp->iocontrol)(&val, 0, NULL);
-	return;
-}
-
-void ious_dlr_device(mstr *d)
-{
-	struct dsc$descriptor val;
-
-	val.dsc$w_length = d->len;
-	val.dsc$b_dtype = DSC$K_DTYPE_T;
-	val.dsc$b_class = DSC$K_CLASS_S;
-	val.dsc$a_pointer = d->addr;
-
-	(((d_us_struct*)(io_curr_device.out->dev_sp))->disp->dlr_device)(&val);
-	d->len = val.dsc$w_length;
-	return;
-}
-
-void ious_dlr_key(mstr *d)
-{
-	struct dsc$descriptor val;
-
-	val.dsc$w_length = d->len;
-	val.dsc$b_dtype = DSC$K_DTYPE_T;
-	val.dsc$b_class = DSC$K_CLASS_S;
-	val.dsc$a_pointer = d->addr;
-
-	(((d_us_struct*)(io_curr_device.out->dev_sp))->disp->dlr_key)(&val);
-	d->len = val.dsc$w_length;
-	return;
-}
diff --git a/sr_vvms/ious_open.c b/sr_vvms/ious_open.c
deleted file mode 100644
index 715ef5e..0000000
--- a/sr_vvms/ious_open.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "io.h"
-#include "iousdef.h"
-
-/*file_des is a dummy parameter */
-short ious_open(io_log_name *dev, mval *pp, int file_des, mval *mspace, int4 timeout)
-{
-	io_desc *iod;
-	dev_dispatch_struct *fgn_driver;
-	error_def(ERR_USRIOINIT);
-
-	iod = dev->iod;
-	if (iod->state == dev_never_opened)
-	{
-		iod->dev_sp = (void *)malloc(SIZEOF(d_us_struct));
-		memset(iod->dev_sp, 0, SIZEOF(d_us_struct));
-		iod->state = dev_closed;
-	}
-
-	if (iod->state != dev_open)
-	{
-		if (mspace && mspace->str.len)
-		{	fgn_driver = io_get_fgn_driver(&mspace->str);
-			((d_us_struct*)(iod->dev_sp))->disp = fgn_driver;
-		}
-		else if (!(((d_us_struct*)(iod->dev_sp))->disp->open))
-		{	rts_error(VARLSTCNT(1) ERR_USRIOINIT);
-			return FALSE;
-		}
-
-		((void(*)())(((d_us_struct*)(iod->dev_sp))->disp->open))();
-		iod->state = dev_open;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/ious_rdone.c b/sr_vvms/ious_rdone.c
deleted file mode 100644
index 583a2e5..0000000
--- a/sr_vvms/ious_rdone.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iousdef.h"
-#include <descrip.h>
-
-GBLREF io_pair		io_curr_device;
-
-int ious_rdone(mint *v, int4 t)
-{
-	struct dsc$descriptor dsc;
-	unsigned char	p;
-
-	p = 0;
-	dsc.dsc$w_length = 1;
-	dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc.dsc$b_class = DSC$K_CLASS_S;
-	dsc.dsc$a_pointer = &p;
-	((void(*)())(((d_us_struct*)(io_curr_device.in->dev_sp))->disp->rdone))(&dsc);
-	*v = p;
-	return TRUE;
-}
diff --git a/sr_vvms/ious_read.c b/sr_vvms/ious_read.c
deleted file mode 100644
index 2fe6030..0000000
--- a/sr_vvms/ious_read.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iousdef.h"
-#include "stringpool.h"
-#include <descrip.h>
-
-GBLREF spdesc		stringpool;
-GBLREF io_pair		io_curr_device;
-
-int ious_read(mval *v, int4 t)
-{
-	struct dsc$descriptor dsc;
-
-	ENSURE_STP_FREE_SPACE(MAX_US_READ);
-	dsc.dsc$w_length = MAX_US_READ;
-	dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc.dsc$b_class = DSC$K_CLASS_S;
-	dsc.dsc$a_pointer = stringpool.free;
-	((void(*)())(((d_us_struct*)(io_curr_device.in->dev_sp))->disp->read))(&dsc);
-	v->str.len = dsc.dsc$w_length;
-	v->str.addr = stringpool.free;
-	return TRUE;
-}
diff --git a/sr_vvms/ious_readfl.c b/sr_vvms/ious_readfl.c
deleted file mode 100644
index 5d8eb03..0000000
--- a/sr_vvms/ious_readfl.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iousdef.h"
-#include "stringpool.h"
-#include <descrip.h>
-
-GBLREF spdesc		stringpool;
-GBLREF io_pair		io_curr_device;
-
-int ious_readfl( mval *v, int4 length, int4 t)
-{
-	struct dsc$descriptor dsc;
-
-	if (length > MAX_US_READ)
-		length = MAX_US_READ;
-	ENSURE_STP_FREE_SPACE(length);
-	dsc.dsc$w_length = length;
-	dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc.dsc$b_class = DSC$K_CLASS_S;
-	dsc.dsc$a_pointer = stringpool.free;
-	((void(*)())(((d_us_struct*)(io_curr_device.in->dev_sp))->disp->readfl))(&dsc);
-	v->str.len = dsc.dsc$w_length;
-	v->str.addr = stringpool.free;
-	return TRUE;
-}
diff --git a/sr_vvms/ious_write.c b/sr_vvms/ious_write.c
deleted file mode 100644
index b117119..0000000
--- a/sr_vvms/ious_write.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iousdef.h"
-#include <descrip.h>
-
-GBLREF io_pair		io_curr_device;
-
-void ious_write(mstr *v)
-{
-	struct dsc$descriptor dsc;
-
-	dsc.dsc$w_length = v->len;
-	dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc.dsc$b_class = DSC$K_CLASS_S;
-	dsc.dsc$a_pointer = v->addr;
-	((void(*)())(((d_us_struct*)(io_curr_device.out->dev_sp))->disp->write))(&dsc);
-}
diff --git a/sr_vvms/ious_wtone.c b/sr_vvms/ious_wtone.c
deleted file mode 100644
index 7dbea40..0000000
--- a/sr_vvms/ious_wtone.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iousdef.h"
-#include <descrip.h>
-
-GBLREF io_pair		io_curr_device;
-
-void ious_wtone(int v)
-{
-	struct dsc$descriptor dsc;
-
-	dsc.dsc$w_length = 4;
-	dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-	dsc.dsc$b_class = DSC$K_CLASS_S;
-	dsc.dsc$a_pointer = &v;
-	((void(*)())(((d_us_struct*)(io_curr_device.out->dev_sp))->disp->wtone))(&dsc);
-}
diff --git a/sr_vvms/is_file_identical.c b/sr_vvms/is_file_identical.c
deleted file mode 100644
index 9be3af5..0000000
--- a/sr_vvms/is_file_identical.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <devdef.h>
-#include <ssdef.h>
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "is_file_identical.h"
-
-bool is_gdid_file_identical(gd_id_ptr_t fid, char *filename, int4 filelen)
-{
-	uint4		status;
-	struct FAB	fab;
-	struct NAM	nam;
-	char		es[MAX_FN_LEN + 1];
-	error_def (ERR_FILEPARSE);
-
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &(nam);
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = filename;
-	fab.fab$b_fns = filelen;
-	nam.nam$b_nop = NAM$M_NOCONCEAL;
-	nam.nam$l_esa = es;
-	nam.nam$b_ess = MAX_FN_LEN;
-	if (RMS$_NORMAL == (status = sys$parse(&fab,0,0)))
-		status = sys$search(&fab,0,0);
-	if (RMS$_NORMAL != status)
-	{
-		rts_error(VARLSTCNT(6) ERR_FILEPARSE, 2, filelen, filename, status, fab.fab$l_stv);
-		return FALSE;
-	}
-
-	return !(memcmp(&fid->dvi, &nam.nam$t_dvi, SIZEOF(fid->dvi)) || memcmp(&fid->fid, &nam.nam$w_fid, SIZEOF(fid->fid)));
-}
-
-/* is_file_identical()
- * 	returns TRUE	if the two files are identical,
- * 	returns FALSE	if either one of the files specified doesn't exist, or if they are different files.
- */
-
-bool is_file_identical(char *filename1, char *filename2)
-{
-	uint4           status, filelen1, filelen2;
-	struct FAB      fab1, fab2;
-	struct NAM      nam1, nam2;
-	char            es1[MAX_FN_LEN + 1], es2[MAX_FN_LEN + 1];
-	error_def (ERR_FILEPARSE);
-
-	fab1 = cc$rms_fab;
-	nam1 = cc$rms_nam;
-	fab1.fab$l_nam = &(nam1);
-	fab1.fab$l_fop = FAB$M_NAM;
-	fab1.fab$l_fna = filename1;
-	fab1.fab$b_fns = filelen1 = strlen(filename1);
-	nam1.nam$b_nop = NAM$M_NOCONCEAL;
-	nam1.nam$l_esa = es1;
-	nam1.nam$b_ess = MAX_FN_LEN;
-	if (RMS$_NORMAL == (status = sys$parse(&fab1,0,0)))
-		status = sys$search(&fab1,0,0);
-	if (RMS$_NORMAL != status)
-	{
-		if (RMS$_FNF != status)	/* do not error out if one of these files do not exist */
-			rts_error(VARLSTCNT(6) ERR_FILEPARSE, 2, filelen1, filename1, status, fab1.fab$l_stv);
-		return FALSE;
-	}
-	fab2 = cc$rms_fab;
-	nam2 = cc$rms_nam;
-	fab2.fab$l_nam = &(nam2);
-	fab2.fab$l_fop = FAB$M_NAM;
-	fab2.fab$l_fna = filename2;
-	fab2.fab$b_fns = filelen2 = strlen(filename2);
-	nam2.nam$b_nop = NAM$M_NOCONCEAL;
-	nam2.nam$l_esa = es2;
-	nam2.nam$b_ess = MAX_FN_LEN;
-	if (RMS$_NORMAL == (status = sys$parse(&fab2,0,0)))
-		status = sys$search(&fab2,0,0);
-	if (RMS$_NORMAL != status)
-	{
-		if (RMS$_FNF != status)	/* do not error out if one of these files do not exist */
-			rts_error(VARLSTCNT(6) ERR_FILEPARSE, 2, filelen2, filename2, status, fab2.fab$l_stv);
-		return FALSE;
-	}
-
-	return !(memcmp(&nam1.nam$t_dvi, &nam2.nam$t_dvi, SIZEOF(nam1.nam$t_dvi)) ||
-		memcmp(&nam1.nam$w_fid, &nam2.nam$w_fid, SIZEOF(nam1.nam$w_fid)));
-}
-
-bool is_gdid_gdid_identical(gd_id_ptr_t fid_1, gd_id_ptr_t fid_2)
-{	/* the file id (fid) is unique within a device (dvi), so the directory id (did) is redundant for uniqueness check */
-	return !(memcmp(&fid_1->dvi, &fid_2->dvi, SIZEOF(fid_1->dvi)) || memcmp(&fid_1->fid, &fid_2->fid, SIZEOF(fid_1->fid)));
-}
-
-void set_gdid_from_file(gd_id_ptr_t fileid, char *filename, int4 filelen)
-{
-	uint4		status;
-	struct FAB	fab;
-	struct NAM	nam;
-	char		es[MAX_FN_LEN + 1];
-	error_def (ERR_FILEPARSE);
-
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &(nam);
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = filename;
-	fab.fab$b_fns = filelen;
-	nam.nam$b_nop = NAM$M_NOCONCEAL;
-	nam.nam$l_esa = es;
-	nam.nam$b_ess = MAX_FN_LEN;
-	if (RMS$_NORMAL == (status = sys$parse(&fab,0,0)))
-		status = sys$search(&fab,0,0);
-	if (RMS$_NORMAL == status)
-	{
-		memcpy(&fileid->dvi, &nam.nam$t_dvi, SIZEOF(fileid->dvi));
-		memcpy(&fileid->did, &nam.nam$w_did, SIZEOF(fileid->did));
-		memcpy(&fileid->fid, &nam.nam$w_fid, SIZEOF(fileid->fid));
-	}
-	else
-		rts_error(VARLSTCNT(6) ERR_FILEPARSE, 2, filelen, filename, status, fab.fab$l_stv);
-}
diff --git a/sr_vvms/is_five_bit.c b/sr_vvms/is_five_bit.c
deleted file mode 100644
index b4128a9..0000000
--- a/sr_vvms/is_five_bit.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "is_five_bit.h"
-
-int is_five_bit(unsigned char *cp)
-{
-	unsigned char ch;
-	int i;
-
-	for (i = 0 ; i < 3 ; i++)
-	{
-		ch = *cp++;
-		if (ch > 'Z' || ch < 'A')
-			return FALSE;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/is_five_bit.h b/sr_vvms/is_five_bit.h
deleted file mode 100644
index f37ce55..0000000
--- a/sr_vvms/is_five_bit.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef IS_FIVE_BIT_INCLUDED
-#define IS_FIVE_BIT_INCLUDED
-
-int is_five_bit(unsigned char *cp);		/***type int added***/
-
-#endif /* IS_FIVE_BIT_INCLUDED */
diff --git a/sr_vvms/is_proc_alive.c b/sr_vvms/is_proc_alive.c
deleted file mode 100644
index 4a01028..0000000
--- a/sr_vvms/is_proc_alive.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* is_proc_alive(pid, imagecnt) - VMS version.
- *
- * Checks to see if a process exists.   Returns TRUE (non-zero) or FALSE (zero)
- * accordingly.
- */
-#include "mdef.h"
-
-#include <ssdef.h>
-#include "repl_sp.h"
-#include "is_proc_alive.h"
-
-bool is_proc_alive(uint4 pid, uint4 imagecnt)
-{
-	uint4 icount;
-
-	if ((get_proc_info(pid, NULL, &icount) == SS$_NONEXPR) || (imagecnt && (imagecnt != icount)))
-		return FALSE;
-	return TRUE;
-}
-
diff --git a/sr_vvms/jnl_file_extend.c b/sr_vvms/jnl_file_extend.c
deleted file mode 100644
index 655f8d8..0000000
--- a/sr_vvms/jnl_file_extend.c
+++ /dev/null
@@ -1,393 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <iodef.h>
-#include <psldef.h>
-#include <lckdef.h>
-#include <dvidef.h>
-#include <rms.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ccp.h"
-#include "efn.h"
-#include "jnl.h"
-#include "iosp.h"
-#include "vmsdtype.h"
-#include "send_msg.h"
-#include "dbfilop.h"
-#include "disk_block_available.h"
-#include "gtmmsg.h"
-#include "iosb_disk.h"
-#include "gtmio.h"
-#include "error.h"
-
-#define BLKS_PER_WRITE	64
-
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	sgmnt_addrs		*cs_addrs;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF  jnl_gbls_t              jgbl;
-GBLREF	boolean_t		in_jnl_file_autoswitch;
-
-error_def(ERR_DBFILERR);
-error_def(ERR_DSKSPACEFLOW);
-error_def(ERR_JNLNOCREATE);
-error_def(ERR_JNLEXTEND);
-error_def(ERR_JNLREADEOF);
-error_def(ERR_JNLSPACELOW);
-error_def(ERR_NEWJNLFILECREAT);
-error_def(ERR_NOSPACEEXT);
-error_def(ERR_JNLFILEXTERR);
-error_def(ERR_JNLWRERR);
-error_def(ERR_JNLRDERR);
-
-static	const	unsigned short	zero_fid[3];
-
-uint4 jnl_file_extend(jnl_private_control *jpc, uint4 total_jnl_rec_size)
-{
-	struct FAB		fab;
-	struct XABFHC		xabfhc;
-	struct NAM		nam;
-	struct RAB		rab;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	node_local_ptr_t	cnl;
-	GDS_INFO		*gds_info;
-	jnl_create_info		jnl_info;
-	jnl_file_header         header;
-	file_control		*fc;
-	boolean_t		need_extend;
-	char			*buff, jnl_file_name[JNL_NAME_SIZE], prev_jnl_fn[MAX_FN_LEN];
-	int			new_blocks, avail_blocks;
-	uint4			new_alq, status;
-	uint4			jnl_status = 0;
-	unsigned short		fn_len;
-	jnl_buffer_ptr_t     	jb;
-	uint4			aligned_tot_jrec_size, count;
-	io_status_block_disk	iosb;
-
-	switch(jpc->region->dyn.addr->acc_meth)
-	{
-	case dba_mm:
-	case dba_bg:
-		csa = &FILE_INFO(jpc->region)->s_addrs;
-		break;
-	default:
-		GTMASSERT;
-	}
-	csd = csa->hdr;
-	cnl = csa->nl;
-	assert(csa == cs_addrs && csd == cs_data);
-	assert(0 != memcmp(cnl->jnl_file.jnl_file_id.fid, zero_fid, SIZEOF(zero_fid)));
-	assert(csa->now_crit || (csd->clustered && (CCST_CLOSED == cnl->ccp_state)));
-	assert(&FILE_INFO(jpc->region)->s_addrs == csa);
-	if (!JNL_ENABLED(csa) || (NOJNL == jpc->channel) || (JNL_FILE_SWITCHED(jpc)))
-		GTMASSERT;	/* crit and messing with the journal file - how could it have vanished? */
-	if (!csd->jnl_deq)
-	{
-		assert(DIVIDE_ROUND_UP(total_jnl_rec_size, DISK_BLOCK_SIZE) <= csd->jnl_alq);
-		assert(csd->jnl_alq == csd->autoswitchlimit);
-		new_blocks = csd->jnl_alq;
-	} else
-		/* May cause extension of  csd->jnl_deq * n blocks where n > 0 */
-		new_blocks = ROUND_UP(DIVIDE_ROUND_UP(total_jnl_rec_size, DISK_BLOCK_SIZE), csd->jnl_deq);
-	jb = jpc->jnl_buff;
-	jpc->status = SS_NORMAL;
-	DEBUG_ONLY(count = 0);
-	for (need_extend = (0 != new_blocks); need_extend; )
-	{
-		DEBUG_ONLY(count++);
-		/* usually we will do the loop just once where we do the file extension.
-		 * rarely we might need to do an autoswitch instead after which again rarely
-		 * 	we might need to do an extension on the new journal to fit in the transaction's	journal requirements.
-		 * therefore we should do this loop a maximum of twice. hence the assert below.
-		 */
-		assert(count <= 2);
-		need_extend = FALSE;
-		xabfhc = cc$rms_xabfhc;
-		nam = cc$rms_nam;
-		fab = cc$rms_fab;
-		fab.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-		fab.fab$b_fac = FAB$M_BIO | FAB$M_GET | FAB$M_PUT;
-		fab.fab$l_fop = FAB$M_CBT | FAB$M_NAM;
-		fab.fab$l_xab = &xabfhc;
-		fab.fab$l_nam = &nam;
-		/* Get the file id from the header and open the journal file */
-		memcpy(&nam.nam$t_dvi, cnl->jnl_file.jnl_file_id.dvi, SIZEOF(cnl->jnl_file.jnl_file_id.dvi));
-		memcpy(&nam.nam$w_did, cnl->jnl_file.jnl_file_id.did, SIZEOF(cnl->jnl_file.jnl_file_id.did));
-		memcpy(&nam.nam$w_fid, cnl->jnl_file.jnl_file_id.fid, SIZEOF(cnl->jnl_file.jnl_file_id.fid));
-		if (SYSCALL_SUCCESS(jpc->status = sys$open(&fab)))
-		{
-			if (SYSCALL_SUCCESS((status = disk_block_available(jpc->channel, &avail_blocks))))
-			{
-				avail_blocks += xabfhc.xab$l_hbk - xabfhc.xab$l_ebk;
-				if ((new_blocks * EXTEND_WARNING_FACTOR) > avail_blocks)
-				{
-					if (new_blocks > avail_blocks)
-					{	/* if we cannot satisfy the requst, it is an error */
-						send_msg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_NOSPACEEXT, 4, JNL_LEN_STR(csd),
-							new_blocks, avail_blocks);
-						new_blocks = 0;
-						jpc->status = SS_NORMAL;
-					} else
-						send_msg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_DSKSPACEFLOW, 3, JNL_LEN_STR(csd),
-							(avail_blocks - new_blocks));
-				}
-			} else
-				send_msg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_JNLFILEXTERR, 2, JNL_LEN_STR(csd), status);
-			fab.fab$w_deq = new_blocks;
-			rab = cc$rms_rab;
-			rab.rab$l_fab = &fab;
-			rab.rab$b_mbc = BLKS_PER_WRITE;
-			rab.rab$l_rop |= RAB$M_EOF;
-			/* ensure current journal file size is well within autoswitchlimit */
-			assert(csd->autoswitchlimit >= jb->filesize);
-			if (new_blocks && (SYSCALL_SUCCESS(jpc->status = sys$connect(&rab))))
-			{
-				new_alq = jb->filesize + new_blocks;
-				if (csd->autoswitchlimit < ((new_blocks * EXTEND_WARNING_FACTOR) + jb->filesize))
-					send_msg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_JNLSPACELOW, 3, JNL_LEN_STR(csd),
-						csd->autoswitchlimit - jb->filesize);
-				/* switch journal file if the request cannot be satisfied */
-				if (csd->autoswitchlimit < new_alq)
-				{	/* Reached max, need to autoswitch */
-					/* Ensure new journal file can hold the entire current
-						transaction's journal record requirements */
-					assert(csd->autoswitchlimit >= MAX_REQD_JNL_FILE_SIZE(total_jnl_rec_size));
-					memset(&jnl_info, 0, SIZEOF(jnl_info));
-					jnl_info.prev_jnl = &prev_jnl_fn[0];
-					set_jnl_info(gv_cur_region, &jnl_info);
-					assert(!jgbl.forw_phase_recovery || (NULL != jgbl.mur_pini_addr_reset_fnptr));
-					assert(jgbl.forw_phase_recovery || (NULL == jgbl.mur_pini_addr_reset_fnptr));
-					if (NULL != jgbl.mur_pini_addr_reset_fnptr)
-						(*jgbl.mur_pini_addr_reset_fnptr)(csa);
-					jnl_status = jnl_ensure_open();
-					if (0 == jnl_status)
-					{	/* flush the cache and jnl-buffer-contents to current journal file before
-						 * switching to a new journal. Set a global variable in_jnl_file_autoswitch
-						 * so jnl_write can know not to do the padding check. But because this is a global
-						 * variable, we also need to make sure it is reset in case of errors during the
-						 * autoswitch (or else calls to jnl_write after we are out of the autoswitch logic
-						 * will continue to incorrectly not do the padding check. Hence a condition handler.
-						 */
-						in_jnl_file_autoswitch = TRUE;
-						/* Also make sure time is not changed. This way if "jnl_write" as part of writing a
-						 * journal record invokes jnl_file_extend, when the autoswitch is done and writing
-						 * of the parent jnl_write resumes, we want it to continue with the same timestamp
-						 * and not have to reset its time (non-trivial task) to reflect any changes since.
-						 */
-						assert(!jgbl.save_dont_reset_gbl_jrec_time);
-						jgbl.save_dont_reset_gbl_jrec_time = jgbl.dont_reset_gbl_jrec_time;
-						jgbl.dont_reset_gbl_jrec_time = TRUE;
-						/* Establish a condition handler so we reset a few global variables that have
-						 * temporarily been modified in case of errors inside wcs_flu/jnl_file_close.
-						 */
-						ESTABLISH_RET(jnl_file_autoswitch_ch, EXIT_ERR);
-						/* It is possible we still have not written a PINI record in this journal file
-						 * (e.g. mupip extend saw the need to do jnl_file_extend inside jnl_write while
-						 * trying to write a PINI record). Write a PINI record in that case before closing
-						 * the journal file that way the EOF record will have a non-zero pini_addr.
-						 */
-						if (0 == jpc->pini_addr)
-							jnl_put_jrt_pini(csa);
-						wcs_flu(WCSFLU_FLUSH_HDR | WCSFLU_WRITE_EPOCH);
-						jnl_file_close(gv_cur_region, TRUE, TRUE);
-						REVERT;
-						in_jnl_file_autoswitch = FALSE;
-						jgbl.dont_reset_gbl_jrec_time = jgbl.save_dont_reset_gbl_jrec_time;
-						DEBUG_ONLY(jgbl.save_dont_reset_gbl_jrec_time = FALSE);
-						gds_info = FILE_INFO(gv_cur_region);
-						assert(jnl_info.fn_len == gds_info->fab->fab$b_fns);
-						assert(0 == memcmp(jnl_info.fn, gds_info->fab->fab$l_fna, jnl_info.fn_len));
-						assert(!jnl_info.no_rename);
-						assert(!jnl_info.no_prev_link);
-						if (EXIT_NRM == cre_jnl_file(&jnl_info))
-						{
-							assert(!memcmp(csd->jnl_file_name, jnl_info.jnl, jnl_info.jnl_len));
-							assert(csd->jnl_file_name[jnl_info.jnl_len] == '\0');
-							assert(csd->jnl_file_len == jnl_info.jnl_len);
-							assert(csd->jnl_buffer_size == jnl_info.buffer);
-							assert(csd->jnl_alq == jnl_info.alloc);
-							assert(csd->jnl_deq == jnl_info.extend);
-							assert(csd->jnl_before_image == jnl_info.before_images);
-							csd->jnl_checksum = jnl_info.checksum;
-							csd->jnl_eovtn = csd->trans_hist.curr_tn;
-							fc = gv_cur_region->dyn.addr->file_cntl;
-							fc->op = FC_WRITE;	/* write needed for successful jnl_file_open() */
-							fc->op_buff = (sm_uc_ptr_t)csd;
-							fc->op_len = SGMNT_HDR_LEN;
-							fc->op_pos = 1;
-							send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4)
-									ERR_NEWJNLFILECREAT, 2, JNL_LEN_STR(csd));
-							/* Dequeue the journal lock on the current jnl generation */
-							jpc->status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-							assert(SS$_NORMAL == jpc->status);
-							jpc->jnllsb->lockid = 0;
-							if ((SS_NORMAL != (status = set_jnl_file_close(SET_JNL_FILE_CLOSE_EXTEND)))
-								|| (SS_NORMAL != (status = dbfilop(fc))))
-							{
-								send_msg_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_DBFILERR, 2,
-										DB_LEN_STR(gv_cur_region),
-										status, 0, gds_info->fab->fab$l_stv);
-								jpc->status = ERR_JNLNOCREATE;
-							} else
-							{
-								/* set_jnl_file_close() would have opened and closed
-								 * the new journal. we therefore have to reopen it now.
-								 * this code should be removed in V4.4. see comment
-								 * in sr_vvms/set_jnl_file_close.c for details
-								 * 	--- nars -- 2002/04/18
-								 */
-								jnl_status = jnl_ensure_open();	/* sets jpc->status */
-								if (jnl_status != 0)
-								{
-									if (SS_NORMAL != jpc->status2)
-									{
-										if (!(IS_RMS_ERROR(jpc->status2) ||
-												IS_SYSTEM_ERROR(jpc->status2)))
-											rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9)
-												jnl_status, 4, JNL_LEN_STR(csd),
-												DB_LEN_STR(gv_cur_region),
-												jpc->status, 0, jpc->status2);
-										else
-											rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8)
-												jnl_status, 4, JNL_LEN_STR(csd),
-												DB_LEN_STR(gv_cur_region),
-												jpc->status, jpc->status2);
-									}
-									else
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7)
-											jnl_status, 4,
-											JNL_LEN_STR(csd), DB_LEN_STR(gv_cur_region),
-											jpc->status);
-								}
-								assert(jb->filesize == csd->jnl_alq);
-								aligned_tot_jrec_size =
-									ALIGNED_ROUND_UP(MAX_REQD_JNL_FILE_SIZE(total_jnl_rec_size),
-											csd->jnl_alq, csd->jnl_deq);
-								if (aligned_tot_jrec_size > csd->jnl_alq)
-								{	/* need to extend more than initial allocation
-									 * in the new journal file to accommodate the
-									 * current transaction.
-									 */
-									new_blocks = aligned_tot_jrec_size - csd->jnl_alq;
-									assert(new_blocks);
-									assert(0 == new_blocks % csd->jnl_deq);
-									need_extend = TRUE;
-								}
-							}
-						} else
-						{
-							send_msg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_JNLNOCREATE, 2,
-									JNL_LEN_STR(csd));
-							jpc->status = ERR_JNLNOCREATE;
-						}
-					} else
-					{
-						assert(FALSE);
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) jnl_status, 4, JNL_LEN_STR(csd),
-									DB_LEN_STR(gv_cur_region));
-					}
-				} else
-				{	/* nullify extension jnl blocks */
-					buff = malloc(DISK_BLOCK_SIZE * BLKS_PER_WRITE);
-					memset(buff, 0, DISK_BLOCK_SIZE * BLKS_PER_WRITE);
-					rab.rab$w_rsz = DISK_BLOCK_SIZE * BLKS_PER_WRITE;
-					rab.rab$l_rbf = buff;
-					for (rab.rab$l_bkt = xabfhc.xab$l_ebk;
-						(SYSCALL_SUCCESS(jpc->status)) && (rab.rab$l_bkt <= new_alq);
-						rab.rab$l_bkt += BLKS_PER_WRITE)
-					{
-						if (rab.rab$l_bkt + BLKS_PER_WRITE > new_alq)
-							rab.rab$w_rsz = (new_alq + 1 - rab.rab$l_bkt) * DISK_BLOCK_SIZE;
-						jpc->status = sys$write(&rab);
-						if (SYSCALL_ERROR(jpc->status))
-						{
-							assert(FALSE);
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLWRERR, 2,
-									JNL_LEN_STR(csd), jpc->status, rab.rab$l_stv);
-						}
-					}
-					jb->filesize = new_alq;	/* Actually this is virtual file size blocks */
-					DO_FILE_READ(jpc->channel, 0, &header, REAL_JNL_HDR_LEN, jpc->status, jpc->status2);
-					if (SYSCALL_ERROR(jpc->status))
-					{
-						assert(FALSE);
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_JNLRDERR, 2,
-								JNL_LEN_STR(csd), jpc->status);
-					}
-					assert((header.virtual_size + new_blocks) == new_alq);
-					header.virtual_size = new_alq;
-					JNL_DO_FILE_WRITE(NULL, NULL, jpc->channel, 0,
-						&header, REAL_JNL_HDR_LEN, jpc->status, jpc->status2);
-					if (SYSCALL_ERROR(jpc->status))
-					{
-						assert(FALSE);
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_JNLWRERR, 2,
-								JNL_LEN_STR(csd), jpc->status);
-					}
-					assert(!need_extend);	/* ensure we won't go through the for loop again */
-					free(buff);
-				}
-			} else if (new_blocks)
-			{
-				assert(FALSE);
-				jpc->status2 = rab.rab$l_stv;
-			}
-			if ((SYSCALL_ERROR(status = sys$close(&fab))) && new_blocks && (SYSCALL_SUCCESS(jpc->status)))
-			{
-				assert(FALSE);
-				jpc->status = status;
-			}
-		} else
-		{
-			assert(FALSE);
-			assert(SYSCALL_ERROR(jpc->status));	/* ensure we will follow the call to jnl_file_lost() below */
-			jpc->status2 = fab.fab$l_stv;
-		}
-		if (SYSCALL_ERROR(jpc->status))
-			break;		/* break on error */
-	}
-	if (0 >= new_blocks)
-	{
-		assert(FALSE);
-		new_blocks = -1;
-		jpc->status = ERR_JNLREADEOF;
-	}
-	if ((SYSCALL_SUCCESS(jpc->status)) && (new_blocks > 0))
-	{
-		if (csd->clustered)
-			csa->ti->ccp_jnl_filesize = jb->filesize;	/* Need to pass new filesize to other machines */
-		INCR_GVSTATS_COUNTER(csa, cnl, n_jnl_extends, 1);
-		return EXIT_NRM;
-	}
-	/* Notify operator and terminate journalling */
-	jnl_file_lost(jpc, ERR_JNLEXTEND);
-	return EXIT_ERR;
-}
-
-CONDITION_HANDLER(jnl_file_autoswitch_ch)
-{
-	START_CH(FALSE);
-	assert(in_jnl_file_autoswitch);
-	in_jnl_file_autoswitch = FALSE;
-	jgbl.dont_reset_gbl_jrec_time = jgbl.save_dont_reset_gbl_jrec_time;
-	DEBUG_ONLY(jgbl.save_dont_reset_gbl_jrec_time = FALSE);
-	NEXTCH;
-}
diff --git a/sr_vvms/jnl_file_open.c b/sr_vvms/jnl_file_open.c
deleted file mode 100644
index 79b9b96..0000000
--- a/sr_vvms/jnl_file_open.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/***************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <fab.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <nam.h>
-#include <psldef.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <xab.h>
-#include "gtm_inet.h"
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "probe.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "locks.h"
-#include "gtmmsg.h"
-#include "send_msg.h"
-#include "iosp.h"		/* for SS_NORMAL */
-#include "gtmimagename.h"
-#include "gtmrecv.h"
-#include "repl_sp.h"		/* for F_CLOSE (used by JNL_FD_CLOSE) */
-
-#include "wbox_test_init.h"
-
-GBLREF	jnlpool_ctl_ptr_t	jnlpool_ctl;
-GBLREF	boolean_t		pool_init;
-GBLREF	boolean_t		is_src_server;
-GBLREF	boolean_t		is_updproc;
-GBLREF	boolean_t		is_updhelper;
-GBLREF	upd_helper_entry_ptr_t	helper_entry;
-GBLREF	jnl_process_vector	*prc_vec;
-GBLREF	boolean_t		forw_phase_recovery;
-
-error_def(ERR_CLSTCONFLICT);
-error_def(ERR_JNLFILOPN);
-error_def(ERR_JNLOPNERR);
-
-static	const	unsigned short	zero_fid[3];
-
-/* Called from the blocking AST routine entered to release the journal file, as a result of a MUPIP SET command */
-
-void	jnl_oper_user_ast(gd_region *reg)
-{
-	jnl_private_control	*jpc;
-	uint4			status;
-	int			close_res;
-
-	if (reg && reg->open)
-	{
-		jpc = FILE_INFO(reg)->s_addrs.jnl;
-		if (SS_NORMAL != jpc->status)
-		{
-			assert(0 != jpc->jnllsb->lockid);
-			status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-			assert(SS$_NORMAL == status);
-			jnl_send_oper(jpc, status);
-
-		}
-		if ((FALSE == jpc->qio_active) && (NOJNL != jpc->old_channel))
-		{
-			JNL_FD_CLOSE(jpc->old_channel, close_res);	/* sets csa->jnl->channel to NOJNL */
-			jpc->pini_addr = 0;
-			jpc->jnllsb->lockid = 0;
-		}
-	}
-}
-
-/* NOTE:  Because the blocking AST routine is established via a call to gtm_enqw,
-   it executes in KERNEL mode;  jnl_oper_user_ast, however, must execute in USER mode.
-   This is accomplished by using sys$dclast, explicitly specifying USER mode. */
-
-static	void	jnl_oper_krnl_ast(gd_region *reg)
-{
-	jnl_private_control	*jpc;
-
-	if (!GTM_PROBE(SIZEOF(gd_region), reg, READ)  ||  !reg->open)
-		return;
-	if (!GTM_PROBE(SIZEOF(gd_segment), reg->dyn.addr, READ))
-		return;
-	if (dba_bg != reg->dyn.addr->acc_meth  &&  dba_mm != reg->dyn.addr->acc_meth)
-		return;
-	if (!GTM_PROBE(SIZEOF(file_control), reg->dyn.addr->file_cntl, READ))
-		return;
-	if (!GTM_PROBE(SIZEOF(vms_gd_info), reg->dyn.addr->file_cntl->file_info, READ))
-		return;
-
-	jpc = FILE_INFO(reg)->s_addrs.jnl;	/* since *cs_addrs is a part of vms_gds_info, no additional probe
-							for sgmnt_addrs is needed */
-	if (!GTM_PROBE(SIZEOF(jnl_private_control), jpc, WRITE))
-		return;
-	if ((FALSE == jpc->qio_active)  &&  (NOJNL != jpc->channel))
-	{
-		jpc->old_channel = jpc->channel;
-		jpc->channel = NOJNL;
-		if (!GTM_PROBE(SIZEOF(vms_lock_sb), jpc->jnllsb, WRITE))
-			return;
-		jpc->status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-		sys$dclast(jnl_oper_user_ast, reg, PSL$C_USER);		/* if it fails, jnl_ensure_open should cleanup */
-	}
-}
-
-uint4	jnl_file_open(gd_region *reg, bool init, void	oper_ast())
-{
-	sgmnt_addrs		*csa;
-	sgmnt_data		*csd;
-	node_local_ptr_t	cnl;
-	struct FAB		fab;	/* same name as other modules help to compare code */
-	struct NAM		nam;
-	struct XABFHC		xabfhc;
-	struct XABITM		xabitm;
-	struct xab_caching_options_flags	xabitemcacheopt;
-	struct {
-		short	len,
-			cod;
-		void	*address;
-		int	*retlen;
-	} xabitemlist[2];
-	jnl_private_control	*jpc;
-	jnl_buffer		*jb;
-	jnl_file_header		header;
-	uint4			status, sts;
-	char			name_buffer[GLO_NAME_MAXLEN], es_buffer[MAX_FN_LEN];
-	boolean_t		retry;
-	$DESCRIPTOR(desc, name_buffer);
-
-	assertpro((dba_bg == reg->dyn.addr->acc_meth) || (dba_mm == reg->dyn.addr->acc_meth));
-	if (NULL == oper_ast)
-		oper_ast = jnl_oper_krnl_ast;
-	csa = &FILE_INFO(reg)->s_addrs;
-	csd = csa->hdr;
-	cnl = csa->nl;
-	jpc = csa->jnl;
-	jb = jpc->jnl_buff;
-	assert(NOJNL == jpc->channel);
-	sts = 0;
-	jpc->status = jpc->status2 = SS_NORMAL;	/* caution : SS_NORMAL not equal to 0 in VMS */
-	xabfhc = cc$rms_xabfhc;
-	nam = cc$rms_nam;
-	fab = cc$rms_fab;
-	fab.fab$l_fop = FILE_INFO(reg)->fab->fab$l_fop;
-	fab.fab$b_shr = FILE_INFO(reg)->fab->fab$b_shr;
-	fab.fab$b_fac = FILE_INFO(reg)->fab->fab$b_fac;
-	fab.fab$l_xab = &xabfhc;
-	if (csd->jnl_sync_io && (IS_GTM_IMAGE || is_updproc || (is_updhelper && helper_entry &&
-								(UPD_HELPER_WRITER == helper_entry->helper_type))))
-	{	/* setup xabitm and link in */
-		xabitemcacheopt.xab$v_file_attributes = 0;
-		xabitemcacheopt.xab$v_file_contents = XAB$K_NOCACHING;
-		xabitemcacheopt.xab$v_flush_on_close = XAB$K_FLUSH;
-		xabitemcacheopt.xab$v_cachectl_mbz = 0;
-		memset(&xabitemlist, 0, SIZEOF(xabitemlist));
-		xabitemlist[0].len = SIZEOF(struct xab_caching_options_flags);
-		xabitemlist[0].cod = XAB$_CACHING_OPTIONS;
-		xabitemlist[0].address = &xabitemcacheopt;
-		memset(&xabitm, 0, SIZEOF(xabitm));
-		xabitm.xab$b_bln = XAB$C_ITMLEN;
-		xabitm.xab$b_cod = XAB$C_ITM;
-		xabitm.xab$l_itemlist = xabitemlist;
-		xabitm.xab$b_mode = XAB$K_SETMODE;
-		xabfhc.xab$l_nxt = &xabitm;
-	}
-	fab.fab$l_nam = &nam;
-	if (init)
-	{
-		cre_jnl_file_intrpt_rename(csa);
-		nam.nam$l_esa = es_buffer;	/* Though conclealed name is not possible, we use it */
-		nam.nam$b_ess = SIZEOF(es_buffer);
-		fab.fab$l_fna = csd->jnl_file_name;
-		fab.fab$b_fns = csd->jnl_file_len;
-		/* although jnl_file_close() would have memset cnl->jnl_file.jnl_file_id to 0 and incremented cycle, it
-		 * might have got shot in the middle of executing those instructions. we redo it here just to be safe.
-		 */
-		memset(&cnl->jnl_file.jnl_file_id, 0, SIZEOF(cnl->jnl_file.jnl_file_id));
-		jb->cycle++;	/* increment shared cycle so all future callers of jnl_ensure_open recognize journal switch */
-		for (retry = TRUE;  ;)
-		{
-			status = sys$open(&fab);
-			if (0 == (status & 1))
-			{
-				jpc->status = status;
-				jpc->status2 = fab.fab$l_stv;
-				sts = ERR_JNLFILOPN;
-				if (RMS$_PRV == status)
-					break;
-			} else
-			{
-				jpc->channel = fab.fab$l_stv;
-				sts = jnl_file_open_common(reg, DISK_BLOCK_SIZE * (xabfhc.xab$l_ebk - 1));
-			}
-			if ((0 != sts) && retry)
-			{
-				assert(!is_src_server);	/* source server should only read journal files so must never reach
-							 * a situation where it has to switch journal files.
-							 */
-				sts = jnl_file_open_switch(reg, sts);
-				retry = FALSE;	/* Do not switch more than once, even if error occurs */
-				if (0 == sts)
-					continue;
-			}
-			break;
-		}
-	} else
-	{
-		ASSERT_JNLFILEID_NOT_NULL(csa);
-		/* use the file id in node-local shared memory to open the journal file */
-		memcpy(&nam.nam$t_dvi, &cnl->jnl_file.jnl_file_id.dvi, SIZEOF(cnl->jnl_file.jnl_file_id.dvi));
-		memcpy(&nam.nam$w_did, &cnl->jnl_file.jnl_file_id.did, SIZEOF(cnl->jnl_file.jnl_file_id.did));
-		memcpy(&nam.nam$w_fid, &cnl->jnl_file.jnl_file_id.fid, SIZEOF(cnl->jnl_file.jnl_file_id.fid));
-		fab.fab$l_fop |= FAB$M_NAM;
-		status = sys$open(&fab);
-		if (!(status & 1))
-		{
-			jpc->status = status;
-			jpc->status2 = fab.fab$l_stv;
-			sts = ERR_JNLFILOPN;
-		} else 	if (csd->clustered  &&  (0 == jb->size))
-		{
-			/* CCP -- not first to open */
-			jb->size = csd->jnl_buffer_size * DISK_BLOCK_SIZE;
-			jb->filesize = xabfhc.xab$l_ebk; /* Why not virtual file size ??? */
-			jb->min_write_size = JNL_MIN_WRITE;
-			jb->max_write_size = JNL_MAX_WRITE;
-		}
-	}
-	/* Clear out any previous out-of-sync values that new_dskaddr/new_dsk might have (from previous journal files) */
-	jpc->new_dskaddr = jpc->new_dsk = 0;
-	/* Also clear out the field that controls whether the above two fields are used in secshr_db_clnup */
-	jpc->dsk_update_inprog = FALSE;
-	if (0 == sts)
-	{
-		if (!is_src_server)
-		{
-			global_name("GT$J", &FILE_INFO(reg)->file_id, name_buffer);
-			desc.dsc$w_length = name_buffer[0];
-			desc.dsc$a_pointer = &name_buffer[1];
-			desc.dsc$b_dtype = DSC$K_DTYPE_T;
-			desc.dsc$b_class = DSC$K_CLASS_S;
-			memset(jpc->jnllsb, 0, SIZEOF(vms_lock_sb));
-			status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, jpc->jnllsb, LCK$M_SYSTEM | LCK$M_EXPEDITE, &desc, 0, NULL,
-					0, NULL, PSL$C_USER, 0);
-			if (SS_NORMAL == status)
-				status = jpc->jnllsb->cond;
-			if (SS_NORMAL == status)
-			{
-				status = gtm_enqw(EFN$C_ENF, LCK$K_CRMODE, jpc->jnllsb, LCK$M_CONVERT | LCK$M_NODLCKBLK,
-						NULL, 0, NULL, reg, oper_ast, PSL$C_USER, 0);
-				if (SS_NORMAL == status)
-					status = jpc->jnllsb->cond;
-			}
-			if (SS_NORMAL != status)
-			{
-				sys$dassgn(fab.fab$l_stv);
-				jpc->status = status;
-				sts = ERR_CLSTCONFLICT;
-			}
-		}
-		if (is_src_server || SS_NORMAL == status)
-		{
-			if (init)
-			{	/* deferred to ensure that the lock works - stash the file id in node-local for subsequent users */
-				memcpy(&cnl->jnl_file.jnl_file_id.dvi, &nam.nam$t_dvi, SIZEOF(cnl->jnl_file.jnl_file_id.dvi));
-				memcpy(&cnl->jnl_file.jnl_file_id.did, &nam.nam$w_did, SIZEOF(cnl->jnl_file.jnl_file_id.did));
-				memcpy(&cnl->jnl_file.jnl_file_id.fid, &nam.nam$w_fid, SIZEOF(cnl->jnl_file.jnl_file_id.fid));
-			}
-			jpc->channel = fab.fab$l_stv;
-			jpc->cycle = jb->cycle;	/* make private cycle and shared cycle in sync */
-			jpc->sync_io = csd->jnl_sync_io;
-		}
-	}
-	GTM_WHITE_BOX_TEST(WBTEST_JNL_FILE_OPEN_FAIL, sts, ERR_JNLFILOPN);
-	if (0 != sts)
-	{
-		jpc->channel = NOJNL;
-		jnl_send_oper(jpc, sts);
-	}
-	assert((0 != sts) || (NOJNL != jpc->channel));
-	return sts;
-}
diff --git a/sr_vvms/jnl_output_sp.c b/sr_vvms/jnl_output_sp.c
deleted file mode 100644
index 55b5222..0000000
--- a/sr_vvms/jnl_output_sp.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <iodef.h>
-#include <psldef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "efn.h"
-#include "locks.h"
-#include "crit_wake.h"
-#include "memcoherency.h"
-#include "wbox_test_init.h"
-
-GBLREF short	astq_dyn_avail;
-GBLREF uint4	image_count;
-GBLREF uint4	process_id;
-
-error_def(ERR_JNLACCESS);
-error_def(ERR_JNLACCESS);
-error_def(ERR_JNLWRTDEFER);
-error_def(ERR_JNLWRTNOWWRTR);
-
-uint4 jnl_qio_start(jnl_private_control *jpc)
-{
-	uint4		new_dskaddr, status;
-
-	assert(!lib$ast_in_prog());
-	/* mainline entry can't go to the ast directly to avoid being recursed upon by wcs_wtstart */
-	if (!jpc->qio_active)
-	{	/* only try the ast if this process doesn't have a write in progress */
-		new_dskaddr = jpc->new_dskaddr;
-		status = jnl_permit_ast(jpc);
-		if (SS$_NORMAL != status)
-			jnl_send_oper(jpc, ERR_JNLACCESS);
-		else if (!jpc->qio_active && jpc->jnl_buff->io_in_prog)
-			status = ERR_JNLWRTDEFER;
-	} else
-		status = ERR_JNLWRTNOWWRTR;
-	return (status);
-}
-
-uint4 jnl_permit_ast(jnl_private_control *jpc)
-{
-
-	/* this extra level exists to provide a return that may permit the ast to process, thus making status info available */
-	assert(!lib$ast_in_prog());
-	return (sys$dclast(jnl_start_ast, jpc, PSL$C_USER));
-}
-
-void jnl_start_ast(jnl_private_control *jpc)
-{
-	void			jnl_qio_end();
-	bool			bsi(), bci();
-	int			tsz;
-	int4			free;
-	uint4			status;
-	sm_uc_ptr_t		base;
-	jnl_buffer_ptr_t	jb;
-
-	assert(lib$ast_in_prog());
-	if (!jpc->qio_active && (NOJNL != jpc->channel))
-	{	/* no jnl io inprogress by this process and haven't lost the file through an operator close */
-		jb = jpc->jnl_buff;
-		if (FALSE == bsi(&jb->io_in_prog))	/* jnl writes are single threaded */
-		{	/* got jb write exclusive ownership */
-			if (jb->blocked && jb->blocked != process_id)
-			{	/* Blocking requires special handling to prevent deadlocks since ASTs can't be
-				 * nested. The process that is currently blocked knows to issue the right jnl-qio
-				 * commands (taking care that the qio gets cleaned up without deadlocking). But
-				 * if non-blocked processes are allowed to take up io_in_prog ownership, deadlocks
-				 * can occur. e.g. P1 takes up io_in_prog of region R1 and enters into a
-				 * wcs_wipchk_ast() for region R2. P2 in the meantime takes up io_in_prog for
-				 * region R2 and enters into wcs_wipchk_ast() for region R1.
-				 */
-				bci(&jb->io_in_prog);
-				return;
-			}
-			if (JNL_FILE_SWITCHED(jpc))
-			{	/* don't know how we can have an old journal file open if we have dirty data in the journal buffer,
-				 * but it is safer to handle this case by not doing the qio (D9C12-002266) so we do not corrupt
-				 * both old (because we overwrite) and current journal file (because we miss out on writing some
-				 * data). if we do not have any data left in the journal buffer to write, it is possible that we
-				 * come here if we get interrupted in jnl_file_close() (by wcs_stale() which results in a call to
-				 * jnl_qio_start()) after the increment of jb->cycle but before jpc->channel got set to NOJNL. In
-				 * this case, doing nothing is the right thing to do as all jnl data flushing has already happened.
-				 */
-				assert((jb->dskaddr == jb->freeaddr)
-					|| (gtm_white_box_test_case_enabled
-						&& (WBTEST_JNL_FILE_LOST_DSKADDR == gtm_white_box_test_case_number)));
-				jpc->fd_mismatch = TRUE;
-				bci(&jb->io_in_prog);	/* release lock and return */
-				return;
-			} else
-				jpc->fd_mismatch = FALSE;
-			/* Take a copy of the shared dsk* fields while holding the io_in_prog lock. This is used by
-			 * jnl_write_attempt to determine if there is a JNLCNTRL error with dskaddr/dsk.
-			 */
-			jpc->new_dskaddr = jb->dskaddr;
-			jpc->new_dsk = jb->dsk;
-			if ((jb->dskaddr % jb->size) != jb->dsk)
-			{	/* This is a JNLCNTRL error but since we are inside an AST we cannot return any non-zero value.
-				 * We expect caller (jnl_write_attempt) to detect this from the copy of new_dskaddr/new_dsk.
-				 */
-				bci(&jb->io_in_prog);	/* release lock and return */
-				return;
-			}
-			/* Start jnl qio */
-			jpc->qio_active = TRUE;
-			jb->image_count = image_count;
-			jb->now_writer = process_id;
-			free = jb->free;
-			/* The following barrier is to make sure that for the value of "free" that we extract (which may be
-			   slightly stale but that is not a correctness issue) we make sure we dont write out a stale version of
-			   the journal buffer contents. While it is possible that we see journal buffer contents that are more
-			   uptodate than "free", this would only mean writing out a less than optimal number of bytes but again,
-			   not a correctness issue. Secondary effect is that it also enforces a corresponding non-stale value of
-			   freeaddr is read and this is relied upon by asserts below.
-			*/
- 			SHM_READ_MEMORY_BARRIER;
-			tsz = (free < jb->dsk ? jb->size : free) - jb->dsk;
-			assert(0 <= tsz);
-			assert(jb->dskaddr + tsz <= jb->freeaddr);
-			if (tsz)
-			{	/* ensure that dsk and free are never equal and we have left space for JNL_WRT_START_MASK */
-				assert((free > jb->dsk) || (free < (jb->dsk & JNL_WRT_START_MASK(jb)))
-						|| (jb->dsk != (jb->dsk & JNL_WRT_START_MASK(jb))));
-				assert(DISK_BLOCKS_SUM(jb->dskaddr, tsz) <= jb->filesize);
-				jb->qiocnt++;
-				jb->wrtsize = tsz;
-				tsz += (jb->dsk - (jb->dsk & JNL_WRT_START_MASK(jb)));	/* back up to block boundary */
-				assert(0 == jb->buff_off);	/* buff_off should have been set to 0 in jnl_file_open_common.c */
-				base = &jb->buff[jb->dsk & JNL_WRT_START_MASK(jb)];
-				assert(tsz >= jb->wrtsize);
-				assert(base >= jb->buff);
-				assert(base < (jb->buff + jb->size));
-				tsz = (tsz + ~JNL_WRT_END_MASK) & JNL_WRT_END_MASK;	/* round-up to quad-word boundary */
-				if (tsz > jb->max_write_size)
-				{
-					tsz = jb->max_write_size;
-					jb->wrtsize = tsz - ((jb->buff + jb->dsk) - base);
-				}
-				assert((base + tsz) <= (jb->buff + jb->size));
-				if (jb->blocked != process_id)
-				{
-					status = sys$qio(efn_jnl, jpc->channel, IO$_WRITEVBLK, &jb->iosb, jnl_qio_end, jpc,
-						base, tsz, jb->dskaddr/DISK_BLOCK_SIZE + 1, 0, 0, 0);/* 1st block is designated 1 */
-					if (0 == (status & 1))
-					{	/*modify iosb so that qio_end will process the error*/
-						assert(FALSE);
-						jb->iosb.cond = status;
-						jb->iosb.length = 0;
-						jb->iosb.dev_specific = 0;
-						jnl_qio_end(jpc);
-					}
-				} else
-				{	/* Do qiow */
-					status = sys$qiow(EFN$C_ENF, jpc->channel, IO$_WRITEVBLK, &jb->iosb, NULL, 0,
-						base, tsz, jb->dskaddr/DISK_BLOCK_SIZE + 1, 0, 0, 0);
-					if (0 == (status & 1))
-					{
-						assert(FALSE);
-						jb->iosb.cond = status;
-						jb->iosb.length = 0;
-						jb->iosb.dev_specific = 0;
-					}
-					jnl_qio_end(jpc);
-				}
-			} else
-			{	/* nothing left to write */
-				jb->wrtsize = 0;
-				jb->iosb.cond = 1;
-				jnl_qio_end(jpc);		/* qio_active semaphore prevents need for dclast */
-			}
-		}	/* if got jb write exclusive ownersip */
-	}	/* if no io in progress and have a channel */
-	return;
-}
-
-void jnl_qio_end(jnl_private_control *jpc)
-{
-	bool			bci();
-	uint4			wake_pid;
-	jnl_buffer		*jb;
-	sgmnt_addrs		*csa;
-	node_local_ptr_t	cnl;
-
-	if (FALSE == jpc->qio_active)
-		return;			/* during exi_rundown, secshr_db_clnup may have effectively "cancelled" the io */
-	jb = jpc->jnl_buff;
-	assert(jb->io_in_prog);
-	csa = &FILE_INFO(jpc->region)->s_addrs;
-	if (0 == (jb->iosb.cond & 1))
-	{
-		jb->errcnt++;
-		jnl_send_oper(jpc, ERR_JNLACCESS);
-	} else
-	{
-		assert(jb->dsk <= jb->size);
-		assert(jb->freeaddr >= jb->dskaddr);
-		jpc->new_dsk = jb->dsk + jb->wrtsize;
-		if (jpc->new_dsk >= jb->size)
-			jpc->new_dsk = 0;
-		jpc->new_dskaddr = jb->dskaddr + jb->wrtsize;
-		assert(jb->freeaddr >= jpc->new_dskaddr);
-		jpc->dsk_update_inprog = TRUE;
-		jb->dsk = jpc->new_dsk;
-		jb->dskaddr = jpc->new_dskaddr;
-		jpc->dsk_update_inprog = FALSE;
-		assert(jb->freeaddr >= jb->dskaddr);
-		cnl = csa->nl;
-		INCR_GVSTATS_COUNTER(csa, cnl, n_jfile_bytes, jb->wrtsize);
-		INCR_GVSTATS_COUNTER(csa, cnl, n_jfile_writes, 1);
-	}
-	jb->iosb.cond = -2;		/* don't leave success set */
-	jb->now_writer = 0;		/* NOTE: The order of these lines is necessary for concurrency control	*/
-	jpc->qio_active = FALSE;
-	bci(&jb->io_in_prog);
-	wake_pid = jb->blocked;
-	if (0 != wake_pid)
-		crit_wake(&wake_pid);
-	/* If we dont have crit and journaling state has been turned to OFF concurrently, need to free up our journal
-	 * resources for the crit holding process (currently either switching journals or turning journaling OFF) to
-	 * proceed. If we hold crit though and free up the journal resources as part of this interrupt routine (jnl_qio_end),
-	 * it is possible that mainline code (one that is switching journals or turning journaling OFF e.g. jnl_file_lost)
-	 * will be confused about whether to do the journal resource free up depending on where in the execution flow
-	 * the jnl_qio_end AST got delivered. Therefore do not do any freeup while holding crit and in interrupt code.
-	 */
-	if (!csa->now_crit && (jnl_closed == csa->hdr->jnl_state))
-	{	/* operator close that this process needs to recognize */
-		jpc->old_channel = jpc->channel;
-		jpc->channel = NOJNL;
-		jpc->status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == jpc->status);
-		if (SS$_NORMAL == jpc->status)
-			jpc->jnllsb->lockid = 0;
-		jnl_oper_user_ast(jpc->region);		/* which should deq the lock */
-	}
-	return;
-}
-
-void jnl_mm_timer_write(gd_region *reg)
-{
-	sgmnt_addrs	*csa;
-
-	assert(lib$ast_in_prog());
-	assert(reg->open);	/* gds_rundown() should have cancelled timers for this region before setting reg->open to FALSE */
-	if (!reg->open)
-		return;
-	csa = &FILE_INFO(reg)->s_addrs;
-	if (csa->jnl)	/* cover trip during rundown */
-		jnl_start_ast(csa->jnl);
-	adawi(-1, &csa->nl->wcs_timers);
-	csa->timer = FALSE;
-	astq_dyn_avail++;
-	return;
-}
-
-void jnl_mm_timer(sgmnt_addrs *csa, gd_region *reg)
-{
-	uint4	status;
-
-	assert(reg->open);
-	if (!csa->timer && csa->nl->wcs_timers < 1)
-	{
-		if (astq_dyn_avail > 0)
-		{
-			astq_dyn_avail--;
-			csa->timer = TRUE;
-			adawi(1, &csa->nl->wcs_timers);
-			status = sys$setimr(efn_ignore, &csa->hdr->flush_time[0], jnl_mm_timer_write, reg, 0);
-			if (0 == (status & 1))
-			{
-				adawi(-1, &csa->nl->wcs_timers);
-				csa->timer = FALSE;
-				astq_dyn_avail++;
-			}
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/jnl_prc_vector.c b/sr_vvms/jnl_prc_vector.c
deleted file mode 100644
index 9df495c..0000000
--- a/sr_vvms/jnl_prc_vector.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include <syidef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "vmsdtype.h"
-
-
-void	jnl_prc_vector(pv)
-jnl_process_vector	*pv;
-{
-	struct
-	{
-		item_list_3	item[7];
-		int4		terminator;
-	}		item_list;
-	unsigned short	iosb[4];
-	uint4	mode, status, dummy;
-
-
-	memset(pv, 0, SIZEOF(jnl_process_vector));
-
-	sys$gettim(&pv->jpv_time);
-
-	item_list.item[0].buffer_length		= SIZEOF(pv->jpv_pid);
-	item_list.item[0].item_code		= JPI$_PID;
-	item_list.item[0].buffer_address	= &pv->jpv_pid;
-	item_list.item[0].return_length_address	= &dummy;
-
-	item_list.item[1].buffer_length		= SIZEOF(pv->jpv_login_time);
-	item_list.item[1].item_code		= JPI$_LOGINTIM;
-	item_list.item[1].buffer_address	= &pv->jpv_login_time;
-	item_list.item[1].return_length_address	= &dummy;
-
-	item_list.item[2].buffer_length		= SIZEOF(pv->jpv_image_count);
-	item_list.item[2].item_code		= JPI$_IMAGECOUNT;
-	item_list.item[2].buffer_address	= &pv->jpv_image_count;
-	item_list.item[2].return_length_address	= &dummy;
-
-	item_list.item[3].buffer_length		= SIZEOF(mode);
-	item_list.item[3].item_code		= JPI$_JOBTYPE;
-	item_list.item[3].buffer_address	= &mode;	/* jpv_mode set below */
-	item_list.item[3].return_length_address	= &dummy;
-
-	item_list.item[4].buffer_length		= SIZEOF(pv->jpv_user);
-	item_list.item[4].item_code		= JPI$_USERNAME;
-	item_list.item[4].buffer_address	= pv->jpv_user;
-	item_list.item[4].return_length_address	= &dummy;
-
-	item_list.item[5].buffer_length		= SIZEOF(pv->jpv_prcnam);
-	item_list.item[5].item_code		= JPI$_PRCNAM;
-	item_list.item[5].buffer_address	= pv->jpv_prcnam;
-	item_list.item[5].return_length_address	= &dummy;
-
-	item_list.item[6].buffer_length		= SIZEOF(pv->jpv_terminal);
-	item_list.item[6].item_code		= JPI$_TERMINAL;
-	item_list.item[6].buffer_address	= pv->jpv_terminal;
-	item_list.item[6].return_length_address	= &dummy;
-
-	item_list.terminator = 0;
-
-	if ((status = sys$getjpiw(EFN$C_ENF, NULL, NULL, &item_list, iosb, NULL, 0)) != SS$_NORMAL  ||
-	    (status = iosb[0]) != SS$_NORMAL)
-		rts_error(status);
-
-	pv->jpv_mode = mode;
-
-
-	item_list.item[0].buffer_length		= SIZEOF(pv->jpv_node);
-	item_list.item[0].item_code		= SYI$_NODENAME;
-	item_list.item[0].buffer_address	= pv->jpv_node;
-	item_list.item[0].return_length_address	= &dummy;
-
-	*((int4 *)&item_list.item[1]) = 0;	/* terminator */
-
-	if ((status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &item_list, iosb, NULL, 0)) != SS$_NORMAL  ||
-	    (status = iosb[0]) != SS$_NORMAL)
-		rts_error(status);
-
-}
diff --git a/sr_vvms/jnlext_write.c b/sr_vvms/jnlext_write.c
deleted file mode 100644
index 32df40b..0000000
--- a/sr_vvms/jnlext_write.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <rab.h>
-#include <rmsdef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-
-void	jnlext_write(fi_type *file_info, char *buffer, int length)
-{
-	uint4		status;
-
-	error_def	(ERR_JNLEXTR);
-
-	file_info->rab->rab$w_rsz = length - 1;
-	file_info->rab->rab$l_rbf = buffer;
-	status = sys$put(file_info->rab);
-	if (status != RMS$_NORMAL)
- 		rts_error(VARLSTCNT(5) ERR_JNLEXTR, 2, file_info->fab->fab$b_fns, file_info->fab->fab$l_fna, status);
-}
diff --git a/sr_vvms/jnlpool_init.c b/sr_vvms/jnlpool_init.c
deleted file mode 100644
index 83ad29c..0000000
--- a/sr_vvms/jnlpool_init.c
+++ /dev/null
@@ -1,384 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <prtdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <stddef.h>
-
-#include <errno.h>
-#include "gtm_inet.h" /* Required for gtmsource.h */
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_stdlib.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "repl_sem.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtm_logicals.h"
-#include "jnl.h"
-#include "repl_shm.h"
-#include "io.h"
-#include "is_file_identical.h"
-#include "trans_log_name.h"
-#include "error.h"
-#include "mutex.h"
-
-GBLREF	jnlpool_addrs		jnlpool;
-GBLREF	jnlpool_ctl_ptr_t	jnlpool_ctl;
-GBLREF	sm_uc_ptr_t		jnldata_base;
-GBLREF	int4			jnlpool_shmid;
-GBLREF	uint4			process_id;
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	jnlpool_ctl_ptr_t	temp_jnlpool_ctl;
-GBLREF	gtmsource_options_t	gtmsource_options;
-GBLREF	boolean_t		pool_init;
-GBLREF	uint4			process_id;
-
-GBLREF	seq_num			seq_num_zero;
-LITREF	char			gtm_release_name[];
-LITREF	int4			gtm_release_name_len;
-
-static	gd_region		jnlpool_dummy_reg;
-static	gd_segment		jnlpool_dummy_seg;
-static	file_control		jnlpool_dummy_fc;
-static	vms_gds_info		jnlpool_dummy_vdi;
-static	sgmnt_addrs		*jnlpool_dummy_sa;
-
-/* Keep track of which resources we have so we can release them if necessary in
-   our condition handler.
-*/
-static VSIG_ATOMIC_T	have_source_access_sem;
-static VSIG_ATOMIC_T	have_source_options_sem;
-static VSIG_ATOMIC_T	have_source_count_sem;
-static VSIG_ATOMIC_T	gsec_is_registered;
-
-#define MAX_RES_TRIES		620 		/* Also defined in gvcst_init_sysops.c */
-
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_JNLPOOLSETUP);
-error_def(ERR_REPLERR);
-error_def(ERR_REPLWARN);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_TEXT);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(jnlpool_init_ch)
-{
-	START_CH(FALSE);
-	if (!(IS_GTM_ERROR(SIGNAL)) || DUMPABLE || SEVERITY == ERROR)
-	{	/* Release resources we have aquired */
-		if (gsec_is_registered)
-		{
-			gsec_is_registered = FALSE;
-			signoff_from_gsec(jnlpool.shm_lockid);
-		}
-		if (have_source_count_sem)
-		{
-			have_source_count_sem = FALSE;
-			rel_sem_immediate(SOURCE, SRC_SERV_COUNT_SEM);
-		}
-		if (have_source_options_sem)
-		{
-			have_source_options_sem = FALSE;
-			rel_sem_immediate(SOURCE, SRC_SERV_OPTIONS_SEM);
-		}
-		if (have_source_access_sem)
-		{
-			have_source_access_sem = FALSE;
-			rel_sem_immediate(SOURCE, JNL_POOL_ACCESS_SEM);
-		}
-		NEXTCH;
-	}
-	/* warning, info, or success */
-	CONTINUE;
-}
-
-void jnlpool_init(jnlpool_user pool_user,
-		  boolean_t gtmsource_startup,
-		  boolean_t *jnlpool_initialized)
-{
-	mstr 			log_nam, trans_log_nam;
-	char		        trans_buff[MAX_FN_LEN+1];
-	int4		        status;
-	uint4			ustatus;
-	unsigned int		full_len;
-	boolean_t	        shm_created;
-	struct dsc$descriptor_s name_dsc;
-	char			res_name[MAX_NAME_LEN + 2]; /* +1 for the terminator and another +1 for the length stored in [0] by
-								global_name() */
-	gds_file_id		file_id;
-	mutex_spin_parms_ptr_t	jnlpool_mutex_spin_parms;
-
-	have_source_access_sem = FALSE;
-	have_source_options_sem = FALSE;
-	have_source_count_sem = FALSE;
-	gsec_is_registered = FALSE;
-	ESTABLISH(jnlpool_init_ch);
-	memset((uchar_ptr_t)&jnlpool, 0, SIZEOF(jnlpool_addrs));
-	memset((uchar_ptr_t)&jnlpool_dummy_reg, 0, SIZEOF(gd_region));
-	memset((uchar_ptr_t)&jnlpool_dummy_seg, 0, SIZEOF(gd_segment));
-	memset((uchar_ptr_t)&jnlpool_dummy_fc, 0, SIZEOF(file_control));
-	memset((uchar_ptr_t)&jnlpool_dummy_vdi, 0, SIZEOF(vms_gds_info));
-
-	jnlpool.jnlpool_dummy_reg = &jnlpool_dummy_reg;
-	MEMCPY_LIT(jnlpool_dummy_reg.rname, JNLPOOL_DUMMY_REG_NAME);
-	jnlpool_dummy_reg.rname_len = STR_LIT_LEN(JNLPOOL_DUMMY_REG_NAME);
-	jnlpool_dummy_reg.dyn.addr = &jnlpool_dummy_seg;
-	jnlpool_dummy_reg.dyn.addr->acc_meth = dba_bg; /* To keep tp_change_reg happy */
-	jnlpool_dummy_seg.file_cntl = &jnlpool_dummy_fc;
-	jnlpool_dummy_fc.file_info = &jnlpool_dummy_vdi;
-	jnlpool_dummy_sa = &jnlpool_dummy_vdi.s_addrs;
-
-	log_nam.addr = GTM_GBLDIR;
-	log_nam.len = SIZEOF(GTM_GBLDIR) - 1;
-
-	if (SS_NORMAL != trans_log_name(&log_nam, &trans_log_nam, trans_buff))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("gtm$gbldir not defined"));
-	trans_buff[trans_log_nam.len] = '\0';
-	full_len = trans_log_nam.len;
-	if (!get_full_path(&trans_buff, trans_log_nam.len, &trans_buff, &full_len, SIZEOF(trans_buff), &ustatus))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Failed to get full path for gtm$gbldir"), ustatus);
-	trans_log_nam.len = full_len;	/* since on vax, mstr.len is a 'short' */
-	memcpy(jnlpool_dummy_seg.fname, trans_buff, trans_log_nam.len);
-	jnlpool_dummy_seg.fname_len = trans_log_nam.len;
-	jnlpool_dummy_seg.fname[jnlpool_dummy_seg.fname_len] = '\0';
-
-	/* Get Journal Pool Resource Name : name_dsc holds the resource name */
-	set_gdid_from_file((gd_id *)&file_id, trans_buff, trans_log_nam.len);
-	global_name("GT$P", &file_id, res_name); /* P - Stands for Journal Pool */
-	name_dsc.dsc$a_pointer = &res_name[1];
-        name_dsc.dsc$w_length = res_name[0];
-        name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-        name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	name_dsc.dsc$a_pointer[name_dsc.dsc$w_length] = '\0';
-
-	/*
- 	 * We need to do some journal pool locking. The lock
-	 * to obtain is the journal pool access control lock
-	 * which is also used as the rundown lock. When one has this, no
-	 * new attaches to the journal pool are allowed. Also, a
-	 * rundown cannot occur. We will get this lock,
- 	 * then initialize the fields (if not already initialized)
-	 * before we release the access control lock.
-	 * Refer to repl_sem.h for an enumeration of semaphores in the sem-set
- 	 */
-
-	assert(NUM_SRC_SEMS == NUM_RECV_SEMS);
-	if (0 != init_sem_set_source(&name_dsc))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-			  RTS_ERROR_LITERAL("Error with journal pool sem init."), REPL_SEM_ERRNO);
-	if (0 != grab_sem(SOURCE, JNL_POOL_ACCESS_SEM))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-			  RTS_ERROR_LITERAL("Error with journal pool access semaphore"), REPL_SEM_ERRNO);
-	have_source_access_sem = TRUE;
-	if (GTMSOURCE == pool_user && gtmsource_startup)
-	{
-		/* Get the option semaphore */
-		if (0 != grab_sem(SOURCE, SRC_SERV_OPTIONS_SEM))
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0,
-				  ERR_TEXT, 2, RTS_ERROR_LITERAL("Error with journal pool option semaphore"), REPL_SEM_ERRNO);
-		}
-		have_source_options_sem = TRUE;
-		/* Get the server count semaphore, to make sure that somebody else hasn't created one already */
-		if (0 != grab_sem_immediate(SOURCE, SRC_SERV_COUNT_SEM))
-		{
-			if (REPL_SEM_NOT_GRABBED)
-			{
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLPOOLSETUP, 0,
-					  ERR_TEXT, 2, RTS_ERROR_LITERAL("Source Server already exists"));
-			} else
-			{
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-					  RTS_ERROR_LITERAL("Error with journal pool server count semaphore"), REPL_SEM_ERRNO);
-			}
-		}
-		have_source_count_sem = TRUE;
-	}
-
-	/* At this point, if (Source-serve AND Startup) all the 3 sems have been grabbed
-	   		  else JNL_POOL_ACCESS_SEM alone has been grabbed
-	 */
-
-	/* Store the jnlpool key */
-	memcpy(jnlpool.vms_jnlpool_key.name, name_dsc.dsc$a_pointer, name_dsc.dsc$w_length);
-	jnlpool.vms_jnlpool_key.desc.dsc$a_pointer = jnlpool.vms_jnlpool_key.name;
-	jnlpool.vms_jnlpool_key.desc.dsc$w_length = name_dsc.dsc$w_length;
-	jnlpool.vms_jnlpool_key.desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	jnlpool.vms_jnlpool_key.desc.dsc$b_class = DSC$K_CLASS_S;
-
-	/* Registering with the global section involves grabbing a lock on the jnlpool global section
-	 * in the ConcurrentRead mode (CR). This lock will be used when deleting the jnlpool (in signoff_from_gsec())
-	 * to make sure that nobody else is attached to the jnlpool global section when detaching from it*/
-
-	if (SS$_NORMAL != (status = register_with_gsec(&jnlpool.vms_jnlpool_key.desc, &jnlpool.shm_lockid)))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-			RTS_ERROR_LITERAL("Unable to get lock on jnlpool"), status);
-	gsec_is_registered = TRUE;
-
-	if (GTMSOURCE != pool_user || !gtmsource_startup)
-	{	/* Global section should already exist */
-		if (SS$_NORMAL != (status = map_shm(SOURCE, &name_dsc, jnlpool.shm_range)))
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Journal pool does not exist"), status);
-		}
-		shm_created = FALSE;
-	} else
-	{
-		status = create_and_map_shm(SOURCE, &name_dsc, gtmsource_options.buffsize, jnlpool.shm_range);
-		if (SS$_CREATED == status)
-			shm_created = TRUE;
-		else if (SS$_NORMAL == status)
-			shm_created = FALSE;
-		else
-		{
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_JNLPOOLSETUP, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to create or map to jnlpool global section"), status);
-		}
-	}
-
-
-	jnlpool_shmid = 1; /* A value > 0, as an indication of the existance of recvpool gsec */
-
-	/* Initialize journal pool pointers to point to appropriate shared memory locations */
-
-        jnlpool.jnlpool_ctl = ROUND_UP((unsigned long)jnlpool.shm_range[0], (2*BITS_PER_UCHAR));
-	jnlpool_dummy_sa->critical = (mutex_struct_ptr_t)((sm_uc_ptr_t)jnlpool.jnlpool_ctl + JNLPOOL_CTL_SIZE); /* secshr_db_clnup
-														 * uses this
-														 * relationship */
-	jnlpool_mutex_spin_parms = (mutex_spin_parms_ptr_t)((sm_uc_ptr_t)jnlpool_dummy_sa->critical + JNLPOOL_CRIT_SPACE);
- 	jnlpool_dummy_sa->nl = (node_local_ptr_t)((sm_uc_ptr_t)jnlpool_mutex_spin_parms + SIZEOF(mutex_spin_parms_struct));
-	if (shm_created)
-		memset(jnlpool_dummy_sa->nl, 0, SIZEOF(node_local)); /* Make jnlpool_dummy_sa->nl->glob_sec_init FALSE */
-	jnlpool_dummy_sa->now_crit = FALSE;
- 	jnlpool.gtmsource_local = (gtmsource_local_ptr_t)((sm_uc_ptr_t)jnlpool_dummy_sa->nl + SIZEOF(node_local));
-	jnldata_base = jnlpool.jnldata_base = (sm_uc_ptr_t)jnlpool.jnlpool_ctl + JNLDATA_BASE_OFF;
-	jnlpool_ctl = jnlpool.jnlpool_ctl;
-
-	if (GTMSOURCE == pool_user && gtmsource_startup)
-	{
-		jnlpool.gtmsource_local->gtmsource_pid = 0;
-		*jnlpool_initialized = FALSE;
-	}
-
-	if (!jnlpool_dummy_sa->nl->glob_sec_init) /* Shared memory is created by this process */
-	{
-		if (GTMSOURCE != pool_user || !gtmsource_startup)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_JNLPOOLSETUP, 0,
-					       ERR_TEXT, 2, RTS_ERROR_LITERAL("Journal pool has not been initialized"));
-
-		/* Initialize the shared memory fields */
-
-		/*
-		 * start_jnl_seqno (and jnl_seqno, read_jnl_seqno) need
-		 * region shared mem to be setup.
-		 */
-
-		jnlpool_ctl->jnldata_base_off = JNLDATA_BASE_OFF;
-		jnlpool_ctl->jnlpool_size = gtmsource_options.buffsize - jnlpool_ctl->jnldata_base_off;
-		assert((jnlpool_ctl->jnlpool_size & ~JNL_WRT_END_MASK) == 0);
-		assert(!(SIZEOF(replpool_identifier) % BITS_PER_UCHAR));
-		jnlpool_ctl->write = 0;
-		jnlpool_ctl->lastwrite_len = 0;
-		QWASSIGNDW(jnlpool_ctl->early_write_addr, 0);
-		QWASSIGNDW(jnlpool_ctl->write_addr, 0);
-		strcpy(jnlpool_ctl->jnlpool_id.repl_pool_key, name_dsc.dsc$a_pointer);
-		memcpy(jnlpool_ctl->jnlpool_id.gtmgbldir, jnlpool_dummy_seg.fname, jnlpool_dummy_seg.fname_len);
-		jnlpool_ctl->jnlpool_id.gtmgbldir[jnlpool_dummy_seg.fname_len] = '\0';
-		memcpy(jnlpool_ctl->jnlpool_id.label, GDS_RPL_LABEL, GDS_LABEL_SZ);         /* why -1 heree ???? */
-		memcpy(jnlpool_ctl->jnlpool_id.now_running, gtm_release_name, gtm_release_name_len + 1);
-		assert(0 == (offsetof(jnlpool_ctl_struct, start_jnl_seqno) % BITS_PER_UCHAR));
-			/* ensure that start_jnl_seqno starts at an 8 byte boundary */
-		assert(0 == offsetof(jnlpool_ctl_struct, jnlpool_id));
-			/* ensure that the pool identifier is at the top of the pool */
-		jnlpool_ctl->jnlpool_id.pool_type = JNLPOOL_SEGMENT;
-		mutex_init(jnlpool_dummy_sa->critical, DEFAULT_NUM_CRIT_ENTRY, FALSE);
-		jnlpool_mutex_spin_parms->mutex_hard_spin_count = MUTEX_HARD_SPIN_COUNT;
-		jnlpool_mutex_spin_parms->mutex_sleep_spin_count = MUTEX_SLEEP_SPIN_COUNT;
-		jnlpool_mutex_spin_parms->mutex_spin_sleep_mask = MUTEX_SPIN_SLEEP_MASK;
-		jnlpool_mutex_spin_parms->mutex_que_entry_space_size = DEFAULT_NUM_CRIT_ENTRY;
-		QWASSIGNDW(jnlpool.gtmsource_local->read_addr, 0);
-		jnlpool.gtmsource_local->read = 0;
-		jnlpool.gtmsource_local->read_state = READ_POOL;
-		jnlpool.gtmsource_local->mode = gtmsource_options.mode;
-		QWASSIGN(jnlpool.gtmsource_local->lastsent_jnl_seqno, seq_num_zero); /* 0 indicates nothing has been sent yet */
-		jnlpool.gtmsource_local->lastsent_time = -1;
-
-		jnlpool.gtmsource_local->statslog = FALSE;
-		jnlpool.gtmsource_local->shutdown = FALSE;
-		jnlpool.gtmsource_local->shutdown_time = -1;
-		jnlpool.gtmsource_local->secondary_port = gtmsource_options.secondary_port;
-		strcpy(jnlpool.gtmsource_local->secondary_host, gtmsource_options.secondary_host);
-		strcpy(jnlpool.gtmsource_local->filter_cmd, gtmsource_options.filter_cmd);
-		strcpy(jnlpool.gtmsource_local->log_file, gtmsource_options.log_file);
-		jnlpool.gtmsource_local->statslog_file[0] = '\0';
-
-		jnlpool_dummy_sa->nl->glob_sec_init = TRUE;
-		*jnlpool_initialized = TRUE;
-	}
-
-	temp_jnlpool_ctl->jnlpool_size = jnlpool_ctl->jnlpool_size;
-
-	/* Release control lockout now that it is initialized.
-	 * Source Server will release the control lockout only after
-	 * other fields shared with GTM processes are initialized */
-	if (GTMSOURCE != pool_user || !gtmsource_startup)
-	{
-		have_source_access_sem = FALSE;
-		rel_sem(SOURCE, JNL_POOL_ACCESS_SEM);
-	}
-	pool_init = TRUE; /* This is done for properly setting the updata_disable flag by active/passive
-				source server in jnl_file_open */
-	jnlpool_dummy_reg.open = TRUE;	/* this is used by t_commit_cleanup/tp_restart/mutex_deadlock_check */
-	jnlpool_dummy_reg.read_only = FALSE;	/* maintain csa->read_write simultaneously */
-	jnlpool_dummy_sa->read_write = TRUE;	/* maintain reg->read_only simultaneously */
-	REVERT;
-	return;
-}
-
-void	jnlpool_detach(void)
-{
-	int4 status;
-
-	if (TRUE == pool_init)
-	{
-		/* Delete expanded virtual address space */
-		if (SS$_NORMAL != (status = detach_shm(jnlpool.shm_range)))
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_REPLWARN, 2,
-					RTS_ERROR_LITERAL("Could not detach from journal pool"), status);
-		if (SS$_NORMAL != (status = signoff_from_gsec(jnlpool.shm_lockid)))
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_REPLERR, 0,
-					ERR_TEXT, 2, RTS_ERROR_LITERAL("Error dequeueing lock on jnlpool global section"), status);
-		jnlpool_ctl = NULL;
-		memset(&jnlpool, 0, SIZEOF(jnlpool));
-		pool_init = FALSE;
-	}
-}
diff --git a/sr_vvms/jnlsp.h b/sr_vvms/jnlsp.h
deleted file mode 100644
index ad2507a..0000000
--- a/sr_vvms/jnlsp.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef JNLSP_H_INCLUDED
-#define JNLSP_H_INCLUDED
-
-/* Start jnlsp.h - platform-specific journaling definitions.  */
-
-#ifndef SS$_NORMAL
-#include <ssdef.h>
-#endif
-
-typedef	short			fd_type;
-typedef vms_file_info		fi_type;
-
-/* in disk blocks but jnl file addresses are kept by byte so limited by uint4 for now */
-#define JNL_ALLOC_MAX		8388607
-#define JNL_BUFFER_DEF		128
-#define NOJNL			FD_INVALID_NONPOSIX
-/*
- * In VMS, time is a 64-bit quantity whose unit is in 100 nanoseconds.
- * To convert it to a unit of time that has more relevance to the user (the most desirable would be a second)
- * 	and not lose many CPU cycles in the process, we extract bits 23 thru 55 (0 is lsb, 63 is msb), a total of
- * 	33 bits. This gives us a unit (which we now refer to as an epoch-second) which is 0.8388608 of a second.
- * 	Since we want to store the extracted bits in a uint4 and since bit 55 is 1 until sometime in year 2087,
- * 	we ignore bit 55 and assume 1 in that position while maintaining whole (64 bit) time quantities.
- * 	Bit 55 toggles approximately every 41700 days (114 years). System time on VMS has crossed this
- * 	period once. So, bit 55 is 1 now. Bits 56 thru 63 are 0 now.
- */
-
-/* we'll zap 9 higher order bits and 23 lower order bits of 64 bit time */
-
-#define JNL_MIDTIME_ZEROBITS		7			/* 23 - SIZEOF(low_time) */
-#define JNL_HITIME_MASK			(short)0x007F 		/* (short)((1 << (JNL_MIDTIME_ZEROBITS)) - 1) */
-#define JNL_HITIME_ADJUST_MASK		(short)(JNL_HITIME_MASK + 1)
-#define JNL_MIDTIME_MASK		(uint4)0xFFFFFF80	/* (unsigned int)(~JNL_HITIME_MASK) */
-#define JNL_LOWTIME_MASK		(unsigned short)0x0000	/* (unsigned short)(0) */
-#define JNL_HITIME_WARN_THRESHOLD	(short)0x00FD		/* warn 980 days before our algorithm breaks */
-#define	JNL_LOTIME_ADJUST_MASK		(uint4)(1 << 22)	/* instead of filling in 0 lowtime, fill in mean value */
-
-#ifdef INT8_SUPPORTED
-
-typedef gtm_int64_t jnl_proc_time;
-
-#define JNL_SHORTTIME_MASK		0x007FFFFFFF800000ll
-	/* ((JNL_HITIME_MASK << SIZEOF(midtime)) | JNL_MIDTIME_MASK) << SIZEOF(lowtime) */
-#define MID_TIME(W)			(uint4)(((W) & JNL_SHORTTIME_MASK) >> 23) /* (masked W) >> (JNL_MIDTIME_ZEROBITS + 16) */
-#define JNL_WHOLE_FROM_SHORT_TIME(W, S)	W = (((jnl_proc_time)(S) << 23) 				\
-						| ((jnl_proc_time)(JNL_HITIME_ADJUST_MASK) << 48))
-#define JNL_FULL_HI_TIME(W)		(short)((W) >> 48) /* whole_time >> (SIZEOF(mid_time) + SIZEOF(low_time)) */
-
-#else /* ! INT8_SUPPORTED */
-
-#ifdef __ALPHA			/* We know that ALPHA is a 64 bit chip (INT8_SUPPORTED) and so is covered by the if case, but */
-# pragma member_alignment save  /* we are keeping the alignment pragma to serve as an indicator for any future platforms */
-# pragma nomember_alignment	/* As of today, only VAX is not INT8_SUPPORTED and VAX anyway guarantees nomember_alignment for */
-#endif				/* jnl_proc_time structure. Vinaya Feb 28, 2002 */
-
-typedef	struct
-{
-	unsigned short		low_time;
-	uint4			mid_time;
-	short			hi_time;
-} jnl_proc_time;
-
-#ifdef __ALPHA
-# pragma member_alignment restore
-#endif
-
-#define MID_TIME(W)		(((uint4)((W).hi_time  & JNL_HITIME_MASK)  << (32 - JNL_MIDTIME_ZEROBITS)) | \
-				 ((uint4)((W).mid_time & JNL_MIDTIME_MASK) >> JNL_MIDTIME_ZEROBITS) | \
-				 ((uint4)((W).low_time & JNL_LOWTIME_MASK))) /* to make the definition complete; compiler is
-									      * hopefully smart enough that this sub-expression
-									      * is not evaluated */
-#define JNL_WHOLE_FROM_SHORT_TIME(W, S)								\
-{												\
-	(W).hi_time  = (short)((S) >> (32 - JNL_MIDTIME_ZEROBITS)) | JNL_HITIME_ADJUST_MASK;	\
-	(W).mid_time = (uint4)((S) << JNL_MIDTIME_ZEROBITS);					\
-	(W).low_time = (unsigned short)((S) & JNL_LOWTIME_MASK);				\
-}
-#define JNL_FULL_HI_TIME(W)	((W).hi_time)
-
-#endif /* INT8_SUPPORTED */
-
-#define	JNL_SHORT_TIME(S)			\
-{						\
-	jnl_proc_time	quad_time; 		\
-	int4		status; 		\
-						\
-	status = sys$gettim(&quad_time);	\
-	assert(status & 1);			\
-	S = MID_TIME(quad_time);		\
-}
-
-#define	JNL_WHOLE_TIME(W)			\
-{						\
-	int4 status; 				\
-						\
-	status = sys$gettim(&(W));		\
-	assert(status & 1);			\
-}
-
-/* Note that the user interface for epoch-interval is in seconds both in terms of input and output. Only the internal
- * representation is different.
- */
-#define SECONDS_PER_EPOCH_SECOND	0.8388608 /* 2**64BIT_TIME_23_LSB_IGNORED * 100 ns = (2**23) * (100 * 10**-9) */
-/* the following macros need #include <math.h> for the prototypes as otherwise it will give arbitrary results */
-#define SECOND2EPOCH_SECOND(s)	(uint4)floor((double)(s) / SECONDS_PER_EPOCH_SECOND) /* int approximation will always be less than
-										      * exact, so we might write epochs more
-										      * frequently than user specified. */
-#define EPOCH_SECOND2SECOND(e)	(uint4)ceil((double)(e) * SECONDS_PER_EPOCH_SECOND) /* for values from 1 thru 32K-1, we've noticed
-										     * that conversion from seconds to epoch seconds
-										     * and back does not lose precision
-										     */
-#define JNL_EXT_DEF		".MJL"
-#define DEF_DB_EXT_NAME		"DAT"
-#define DEF_JNL_EXT_NAME	JNL_EXT_DEF
-
-#define EXTTIMEVMS(T)		EXTTIME(T)
-#define	EXTINTVMS(I)		EXTINT(I)
-#define	EXTTXTVMS(T,L)		EXTTXT(T,L)
-
-uint4	jnl_file_open(gd_region *reg, bool init, void oper_ast());
-void	jnl_mm_timer_write(gd_region *reg);
-
-#endif /* JNLSP_H_INCLUDED */
diff --git a/sr_vvms/jobchild_init.c b/sr_vvms/jobchild_init.c
deleted file mode 100644
index afb1c1a..0000000
--- a/sr_vvms/jobchild_init.c
+++ /dev/null
@@ -1,298 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "error.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include <iodef.h>
-#include <lnmdef.h>
-#include <dvidef.h>
-#include <jpidef.h>
-#include <stsdef.h>
-#include "vmsdtype.h"
-#include <rtnhdr.h>
-#include "stack_frame.h"
-#include "stringpool.h"
-#include "job.h"
-#include "efn.h"
-#include "op.h"
-#include "zbreak.h"
-#include "jobchild_init.h"
-#include "cmd_qlf.h"
-#include "lv_val.h"	/* needed for "callg.h" */
-#include "callg.h"
-
-#define	FATAL(error)	(error & STS$M_COND_ID | STS$K_SEVERE)
-
-GBLDEF unsigned short	pchan;
-
-GBLREF spdesc		stringpool;
-GBLREF stack_frame	*frame_pointer;
-
-error_def(ERR_ACK);
-error_def(ERR_ENQ);
-error_def(ERR_FMLLSTMISSING);
-error_def(ERR_JOBFAIL);
-error_def(ERR_JOBLABOFF);
-error_def(ERR_STRINGOFLOW);
-
-void jobchild_init(unsigned char *base_addr_ptr)
-{
-	unsigned	status;
-	mbx_iosb	iosb;
-	struct
-	{
-		item_list_3	item[1];
-		int4		terminator;
-	} item_list;
-	short		dummy;
-	$DESCRIPTOR	(tabnam, "LNM$PROCESS");
-	$DESCRIPTOR	(lognam, "GTM$JOB$");
-	mval		ppid;
-	char		ppidstr[MAX_PIDSTR_LEN];
-	short		ppidstrlen;
-	short		cchan;
-	int4		punit, cunit;
-	char		pmbxnam[32];
-	$DESCRIPTOR	(pmbx, &pmbxnam[0]);
-
-/* Parameters ... */
-	mstr		input, output, error, gbldir;
-
-/* Messages */
-	int4		cmaxmsg;
-	mstr		stsdsc;
-	pmsg_type	stsmsg;
-	mstr		isddsc;
-	isd_type	isd;
-	mstr		argstr;
-	int4		argcnt, i;
-	mval		*arglst;
-	mval		rt;
-
-	struct {
-		int4	callargs;
-		int4	truth;
-		int4	retval;
-		int4	mask;
-		int4	argcnt;
-		mval	*argval[1];
-		} *gcall_arg;
-/* Transfer data */
-	rhdtyp		*rt_hdr;
-	mstr		label, rtn;
-	int4		*lp;
-	DCL_THREADGBL_ACCESS;
-
-	LITDEF $DESCRIPTOR		(sys$input,  "SYS$INPUT");
-	LITDEF $DESCRIPTOR		(sys$output, "SYS$OUTPUT");
-	LITDEF $DESCRIPTOR		(sys$error,  "SYS$ERROR");
-	LITDEF $DESCRIPTOR		(gtm$gbldir, "GTM$GBLDIR");
-
-	SETUP_THREADGBL_ACCESS;
-	item_list.item[0].buffer_length		= MAX_PIDSTR_LEN;
-	item_list.item[0].item_code		= LNM$_STRING;
-	item_list.item[0].buffer_address	= &ppidstr[0];
-	item_list.item[0].return_length_address	= &ppidstrlen;
-	item_list.terminator			= 0;
-	status = sys$trnlnm(0, &tabnam, &lognam, 0, &item_list);
-	if (SS$_NOLOGNAM == status)
-	{
-		new_stack_frame(base_addr_ptr, base_addr_ptr + SIZEOF(rhdtyp), base_addr_ptr + SIZEOF(rhdtyp));
-		return;
-	}
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) FATAL(status));
-	if (MAX_PIDSTR_LEN < ppidstrlen)
-		rts_error(VARLSTCNT(1) FATAL(ERR_JOBFAIL));
-	ppid.mvtype = MV_STR;
-	ppid.str.len = ppidstrlen;
-	ppid.str.addr = &ppidstr[0];
-	s2n(&ppid);
-	status = sys$assign(&sys$input, &cchan, 0, 0);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) FATAL(status));
-	item_list.item[0].buffer_length		= SIZEOF(cmaxmsg);
-	item_list.item[0].item_code		= DVI$_DEVBUFSIZ;
-	item_list.item[0].buffer_address	= &cmaxmsg;
-	item_list.item[0].return_length_address	= &dummy;
-	item_list.terminator			= 0;
-	status = sys$getdvi(efn_immed_wait, cchan, 0, &item_list, &iosb, 0, 0, 0);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) FATAL(status));
-	sys$synch(efn_immed_wait, &iosb);
-	if (SS$_NORMAL != iosb.status)
-		rts_error(VARLSTCNT(1) FATAL(iosb.status));
-	item_list.item[0].buffer_length		= SIZEOF(punit);
-	item_list.item[0].item_code		= JPI$_TMBU;
-	item_list.item[0].buffer_address	= &punit;
-	item_list.item[0].return_length_address	= &dummy;
-	item_list.terminator			= 0;
-	status = sys$getjpi(efn_immed_wait, 0, 0, &item_list, &iosb, 0, 0);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) FATAL(status));
-	sys$synch(efn_immed_wait, &iosb);
-	if (SS$_NORMAL != iosb.status)
-		rts_error(VARLSTCNT(1) FATAL(iosb.status));
-	pmbx.dsc$w_length = ojunit_to_mba(&pmbxnam[0], punit);
-	status = sys$assign(&pmbx, &pchan, 0, 0);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) FATAL(status));
-	lib$establish(ojch);	/* now we have the mailbox, use the condition handler to send status and exit */
-	stsmsg.unused = 0;
-	stsmsg.finalsts = ERR_ENQ;
-	stsdsc.addr = &stsmsg;
-	stsdsc.len = SIZEOF(stsmsg);
-	ojmbxio(IO$_WRITEVBLK, pchan, &stsdsc, &iosb, TRUE);
-	if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-		rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-	input.len = cmaxmsg;
-	input.addr = stringpool.free;
-	ojmbxio(IO$_READVBLK, cchan, &input, &iosb, FALSE);
-	input.len = iosb.byte_count;
-	stringpool.free += input.len;
-	assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-	if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-		rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-	output.len = cmaxmsg;
-	output.addr = stringpool.free;
-	ojmbxio(IO$_READVBLK, cchan, &output, &iosb, FALSE);
-	output.len = iosb.byte_count;
-	stringpool.free += output.len;
-	assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-	if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-		rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-	error.len = cmaxmsg;
-	error.addr = stringpool.free;
-	ojmbxio(IO$_READVBLK, cchan, &error, &iosb, FALSE);
-	error.len = iosb.byte_count;
-	stringpool.free += error.len;
-	assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-	if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-		rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-	gbldir.len = cmaxmsg;
-	gbldir.addr = stringpool.free;
-	ojmbxio(IO$_READVBLK, cchan, &gbldir, &iosb, FALSE);
-	gbldir.len = iosb.byte_count;
-	stringpool.free += gbldir.len;
-	assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-	if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-		rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-	isddsc.len = SIZEOF(isd);
-	isddsc.addr = &isd;
-	ojmbxio(IO$_READVBLK, cchan, &isddsc, &iosb, FALSE);
-	assert(SIZEOF(isd) == iosb.byte_count);
-	assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-	if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-		rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-	argstr.len = SIZEOF(argcnt);
-	argstr.addr = &argcnt;
-	ojmbxio(IO$_READVBLK, cchan, &argstr, &iosb, FALSE);
-	assert(SIZEOF(argcnt) == iosb.byte_count);
-	assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-	if (argcnt)
-	{	/* process incoming parameters list */
-		arglst = malloc(argcnt * SIZEOF(mval));
-		gcall_arg = malloc(SIZEOF(*gcall_arg) + (argcnt - 1) * SIZEOF(mval *));
-		gcall_arg->callargs = argcnt + 4;
-		gcall_arg->truth = 1;
-		gcall_arg->retval = 0;
-		gcall_arg->mask = 0;
-		gcall_arg->argcnt = argcnt;
-		for (i = 0; i < argcnt; i++)
-		{
-			if (!IS_STP_SPACE_AVAILABLE(cmaxmsg))
-				rts_error(VARLSTCNT(1) ERR_STRINGOFLOW);
-			argstr.len = cmaxmsg;
-			argstr.addr = stringpool.free;
-			ojmbxio(IO$_READVBLK, cchan, &argstr, &iosb, FALSE);
-			assert(iosb.pid == (int4)MV_FORCE_INTD(&ppid));
-			argstr.len = iosb.byte_count;
-			stringpool.free += argstr.len;
-			arglst[i].mvtype = MV_STR;
-			arglst[i].str = argstr;
-			gcall_arg->argval[i] = &arglst[i];
-		}
-	}
-	status = sys$dassgn(cchan);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	stsmsg.unused = 0;
-	stsdsc.addr = &stsmsg;
-	stsdsc.len = SIZEOF(stsmsg);
-	rtn.addr = &isd.routine.c[0];
-	rtn.len = mid_len(&isd.routine);
-	if (0 == (rt_hdr = find_rtn_hdr(&rtn)))
-	{
-		rt.mvtype = MV_STR;
-		rt.str = rtn;
-		op_zlink(&rt, 0);
-		if (0 == (rt_hdr = find_rtn_hdr(&rtn)))
-			GTMASSERT;
-	}
-	base_addr_ptr = (char *)rt_hdr;
-	label.addr = &isd.label.c[0];
-	label.len = mid_len(&isd.label);
-	lp = NULL;
-	if ((rt_hdr->compiler_qlf & CQ_LINE_ENTRY) || (0 == isd.offset))
-		/* label offset with routine compiled with NOLINE_ENTRY should cause error */
-		lp = find_line_addr(rt_hdr, &label, isd.offset, NULL);
-	if (!lp)
-		rts_error(VARLSTCNT(1) ERR_JOBLABOFF);
-	if (argcnt && !(TREF(lab_proxy)).has_parms)		/* Label has no formallist, but is passed an actuallist. */
-		rts_error(VARLSTCNT(1) ERR_FMLLSTMISSING);
-	item_list.item[0].item_code		= LNM$_STRING;
-	item_list.item[0].return_length_address	= &dummy;
-	item_list.terminator			= 0;
-	item_list.item[0].buffer_length		= input.len;
-	item_list.item[0].buffer_address	= input.addr;
-	status = sys$crelnm(0, &tabnam, &sys$input, 0, &item_list);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	item_list.item[0].buffer_length		= output.len;
-	item_list.item[0].buffer_address	= output.addr;
-	status = sys$crelnm(0, &tabnam, &sys$output, 0, &item_list);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	item_list.item[0].buffer_length		= error.len;
-	item_list.item[0].buffer_address	= error.addr;
-	status = sys$crelnm(0, &tabnam, &sys$error, 0, &item_list);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	if (0 != gbldir.len)
-	{
-		item_list.item[0].buffer_length		= gbldir.len;
-		item_list.item[0].buffer_address	= gbldir.addr;
-		status = sys$crelnm(0, &tabnam, &gtm$gbldir, 0, &item_list);
-		if (!(status & 1))
-			rts_error(VARLSTCNT(1) status);
-	}
-	stsmsg.finalsts = ERR_ACK;
-	ojmbxio(IO$_WRITEVBLK, pchan, &stsdsc, &iosb, TRUE);
-	status = sys$dassgn(pchan);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	if ((0 != isd.schedule.lo) || (0 != isd.schedule.hi))
-	{
-		status = sys$schdwk(0, 0, &isd.schedule, 0);
-		if (SS$_NORMAL != status)
-			rts_error(VARLSTCNT(1) status);
-		sys$hiber();
-	}
-	new_stack_frame(base_addr_ptr, LINE_NUMBER_ADDR(rt_hdr, lp), LINE_NUMBER_ADDR(rt_hdr, lp));
-	if (argcnt)
-		callg(push_parm, (gparam_list *)gcall_arg);
-	lib$revert();
-}
diff --git a/sr_vvms/jobchild_init.h b/sr_vvms/jobchild_init.h
deleted file mode 100644
index f7dfbb2..0000000
--- a/sr_vvms/jobchild_init.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __JOBCHILD_INIT_H__
-#define __JOBCHILD_INIT_H__
-
-void jobchild_init(unsigned char *base_addr_ptr);
-
-#endif
diff --git a/sr_vvms/jobsp.h b/sr_vvms/jobsp.h
deleted file mode 100644
index c699706..0000000
--- a/sr_vvms/jobsp.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef JOBSP_H_INCLUDED
-#define JOBSP_H_INCLUDED
-
-#define MAX_JOBPAR_LEN		255
-#define MAX_FILSPC_LEN		255
-#define MAX_PIDSTR_LEN		10
-#define MAX_MBXNAM_LEN		16
-#define MAX_PRCNAM_LEN		15
-
-#define JP_NO_BASPRI		-1
-
-typedef struct
-	{
-		int4		lo;
-		int4		hi;
-	} quadword; /* date_time; */
-
-typedef	struct
-	{
-		unsigned	unused;
-		unsigned	finalsts;
-	} pmsg_type;
-
-typedef	struct
-	{
-		mident_fixed	label;
-		int4		offset;
-		mident_fixed	routine;
-		quadword	schedule;
-	} isd_type;
-
-typedef	struct
-	{
-		unsigned short	status;
-		unsigned short	byte_count;
-		uint4	pid;
-	} mbx_iosb;
-
-typedef enum
-{
-	jpdt_nul,
-	jpdt_num,
-	jpdt_str
-} jp_datatype;
-
-#define JPDEF(a,b) a
-typedef enum
-{
-#include "jobparams.h"
-} jp_type;
-
-#include <descrip.h>
-
-void ojmbxio(int4 func, short chan, mstr *msg, short *iosb, bool now);
-unsigned short ojunit_to_mba(char *targ, uint4 n);
-uint4 ojmba_to_unit(char *src);
-void ojerrcleanup(void);
-void ojastread (int expected);
-bool ojchkbytcnt(int4 cmaxmsg);
-void ojcleanup(void);
-bool ojcrembxs(uint4 *punit, struct dsc$descriptor_s *cmbx, int4 cmaxmsg, bool timed);
-void ojparams(unsigned char *p, mval *routine, bool *defprcnam, int4 *cmaxmsg, mstr *image,
-	mstr *input, mstr *output, mstr *error, struct dsc$descriptor_s *prcnam, int4 *baspri,
-	int4 *stsflg, mstr *gbldir, mstr *startup, struct dsc$descriptor_s *logfile, mstr *deffs,
-	quadword *schedule);
-void ojsetattn(int msg);
-void ojtmrinit(int4 *timeout);
-void ojdefbaspri(int4 *baspri);
-void ojdefdeffs(mstr *deffs);
-void ojdefimage(mstr *image);
-void ojdefprcnam(struct dsc$descriptor_s *prcnam);
-void ojtmrrtn(void);
-unsigned short ojhex_to_str(uint4 s, char *t);
-
-#endif /* JOBSP_H_INCLUDED */
diff --git a/sr_vvms/jpv_v10to12.c b/sr_vvms/jpv_v10to12.c
deleted file mode 100644
index 9007952..0000000
--- a/sr_vvms/jpv_v10to12.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "jpv_v10to12.h"
-
-void jpv_v10to12(char *old_jpv_ptr, jnl_process_vector *new_jpv)
-{
-	jnl_process_vector	temp_jpv;
-	v10_jnl_process_vector	*old_jpv;
-
-	memset(&temp_jpv, 0, SIZEOF(jnl_process_vector));
-	old_jpv = (v10_jnl_process_vector *) old_jpv_ptr;
-	temp_jpv.jpv_pid = old_jpv->jpv_pid;
-	temp_jpv.jpv_time = old_jpv->jpv_time;
-	temp_jpv.jpv_login_time = old_jpv->jpv_login_time;
-	temp_jpv.jpv_image_count = old_jpv->jpv_image_count;
-	temp_jpv.jpv_mode = old_jpv->jpv_mode;
-	memcpy(&temp_jpv.jpv_node, old_jpv->jpv_node, V10_JPV_LEN_NODE);
-	memcpy(&temp_jpv.jpv_user, old_jpv->jpv_user, V10_JPV_LEN_USER);
-	memcpy(&temp_jpv.jpv_prcnam, old_jpv->jpv_prcnam, V10_JPV_LEN_PRCNAM);
-	memcpy(&temp_jpv.jpv_terminal, old_jpv->jpv_terminal, V10_JPV_LEN_TERMINAL);
-	memcpy(new_jpv, &temp_jpv, SIZEOF(jnl_process_vector));
-}
diff --git a/sr_vvms/jpv_v10to12.h b/sr_vvms/jpv_v10to12.h
deleted file mode 100644
index 051b5ce..0000000
--- a/sr_vvms/jpv_v10to12.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef JPV_V10TOV12
-#define JPV_V10TOV12
-
-#define V10_JPV_LEN_NODE            15
-#define V10_JPV_LEN_USER            12
-#define V10_JPV_LEN_PRCNAM          15
-#define V10_JPV_LEN_TERMINAL        8
-
-typedef struct v10_jnl_process_vector_struct
-{
-        uint4   	jpv_pid;                        	/* Process id */
-        jnl_proc_time   jpv_time,                       /* Journal record timestamp;  also used for process termination time */
-                        jpv_login_time;                 /* Process login time;  also used for process initialization time */
-        int4            jpv_image_count;                /* Image activations [VMS only] */
-        unsigned char   jpv_mode;                       /* a la JPI$_MODE [VMS only] */
-        char            jpv_node[V10_JPV_LEN_NODE],         /* Node name */
-                        jpv_user[V10_JPV_LEN_USER],         /* User name */
-                        jpv_prcnam[V10_JPV_LEN_PRCNAM],     /* Process name */
-                        jpv_terminal[V10_JPV_LEN_TERMINAL]; /* Login terminal */
-        /* SIZEOF(jnl_process_vector) must be a multiple of SIZEOF(int4) */
-        char            jpv_padding;
-} v10_jnl_process_vector;
-
-void jpv_v10to12(char *old_jpv_ptr, jnl_process_vector *new_jpv);
-
-#endif /* JPV_V10TOV12 */
diff --git a/sr_vvms/kitprepare.com b/sr_vvms/kitprepare.com
deleted file mode 100644
index 932e67b..0000000
--- a/sr_vvms/kitprepare.com
+++ /dev/null
@@ -1,73 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2013 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$! The purpose of this script is to generate save the full directory
-$! information to dir_full.txt and record the checksum for each file.
-$
-$!	p1 - version to get kits for (e.g. V50000D)
-$
-$ if (p1 .eqs. "")
-$ then
-$	write sys$output ""
-$	write sys$output "With yeti or bgfoot as the build system of record"
-$ 	write sys$output "Syntax :  @gtm$tools:kitprepare <version>"
-$	write sys$output "      e.g. @gtm$tools:kitprepare V60002"
-$	write sys$output ""
-$ 	exit
-$ endif
-$
-$! Check if the kits we expect to see are present in GTM$VRT:[DIST]
-$ gtmverno = p1
-$ distdir = "gtm$root:[" + gtmverno + ".dist]"
-$
-$ set def gtm$root:['gtmverno]
-$ set def [.dist]
-$ purge/log *.*
-$ if (f$search("dir_full.txt") .nes. "")
-$ then
-$	delete/log dir_full.txt;
-$ endif
-$ dir/full /out=dir_full.txt
-$
-$ open/append dirlist dir_full.txt
-$
-$! the following list has to be maintained in sync with "distrib_kits_vms" defined in $cms_tools/server_list
-$ kitlist = "GTCDxxxxx.A,GTCMxxxxx.A,GTDCxxxxx.A,GTMxxxxx.A,GTMxxxxx.B,GTMxxxxx.C"
-$!
-$ numkits = f$length(kitlist)
-$ partial_list = "''kitlist'"
-$ verlength = f$length(gtmverno)
-$ kitver = f$extract(1, 5, gtmverno)
-$kitcheckloop:
-$       index = f$locate(",",partial_list)
-$	curkit = f$extract(0, index, partial_list)
-$	partial_list = f$extract(index + 1, numkits, partial_list)
-$	if (curkit .eqs. "") then goto endkitcheckloop
-$	length = f$length(curkit)
-$	xxindex = f$locate("xxxxx",curkit)
-$	kitprefix = f$extract(0, xxindex, curkit)
-$	kitsuffix = f$extract(xxindex+5, length, curkit)
-$	kitfile = distdir + kitprefix + kitver + kitsuffix
-$	if (f$search(kitfile) .eqs. "")
-$	then
-$		msg = "''kitfile' does not exist. First run @gtm$com:kitstart all ''gtmverno' user:[library.''gtmverno'.dist]"
-$		write sys$output "KITPREP-E-NOKITS : ''msg'"
-$		write dirlist "KITPREP-E-NOKITS : ''msg'"
-$		exit 0	! to signal error
-$	endif
-$	checksum 'kitfile
-$	filename = f$parse(kitfile,,,"NAME") + f$parse(kitfile,,,"TYPE")
-$	write sys$output "KITPREP-I-CHECKSUM : ''filename' : checksum = [''checksum$checksum'] "
-$	write dirlist "KITPREP-I-CHECKSUM : ''filename' : checksum = [''checksum$checksum'] "
-$	goto kitcheckloop
-$endkitcheckloop:
-$
-$ write sys$output "KITPREP-S-SUCCESS : KITPREP completed successfully"
-$ write dirlist "KITPREP-S-SUCCESS : KITPREP completed successfully"
diff --git a/sr_vvms/kitstart.com b/sr_vvms/kitstart.com
deleted file mode 100644
index 94fdebc..0000000
--- a/sr_vvms/kitstart.com
+++ /dev/null
@@ -1,153 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2013 Fidelity Information Services Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! kitstart.com p1=product p2=version, p3=destination
-$!
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ if alpha
-$  then
-$   prodlist = "GT.M\GT.CM\GT.CX\GT.DDP\GT.DC\ALL\"
-$  else
-$   prodlist = "GT.M\GT.CM\GT.CX\GTM.FI\GT.DDP\ALL\"
-$ endif
-$ pllen = f$length(prodlist)
-$ gtm_init_tape :== y
-$ say = "write sys$output"
-$ ask = "inquire"
-$ say "GT.M Distribution Kit Build"
-$ on error then goto badkit
-$ on severe then goto badkit
-$ on control_y then goto badkit
-$ prd = p1
-$ p1 = ""
-$ vno = p2
-$ p2 = ""
-$ dst = p3
-$ p3 = ""
-$ gosub getprod
-$ gosub getver
-$ gosub getdst
-$ ver 'vno' p
-$ savpriv = f$setprv("bypas,cmkrnl,log_io,sysnam,volpro,oper")
-$ if f$getdvi(outdev,"devclass") .eq. 2
-$  then
-$   init/over=(accessibility,expiration,owner)/density=1600 'outdev' gtc
-$ endif
-$! Fix the Version #s in "gtm$vrt:[t%%]*_spkitbld.dat"
-$ @gtm$tools:spkitupdate.com 'vno'
-$!
-$ if (f$locate("GT.M",prd) + f$locate("ALL",prd)) .ne. prdlen2
-$  then
-$   @sys$update:spkitbld "" 'dst' "" gtm$vrt:[tls]gtm_spkitbld.dat
-$   if $severity .ne. 1 then goto badkit
-$   prot_obj_files="(S:RE,O:RWED,G:RE,W:RE)"
-$   f="GTM$VRT:[PCT]*.obj"
-$   write sys$output "    Resetting protection on all obj files to ''prot_obj_files' ..."
-$   set security/class=file/protection='prot_obj_files' 'f'
-$   gtm_init_tape :== n
-$ endif
-$ if (f$locate("GT.CM",prd) + f$locate("ALL",prd)) .ne. prdlen2
-$  then
-$   @sys$update:spkitbld "" 'dst' "" gtm$vrt:[tcm]gtcm_spkitbld.dat
-$   if $severity .ne. 1 then goto badkit
-$   gtm_init_tape :== n
-$ endif
-$!1999/1/3 smw CX not supported if (f$locate("GT.CX",prd) + f$locate("ALL",prd)) .ne. prdlen2
-$ if (f$locate("GT.CX",prd)) .ne. f$length(prd)
-$  then
-$   @sys$update:spkitbld "" 'dst' "" gtm$vrt:[tcx]gtcx_spkitbld.dat
-$   if $severity .ne. 1 then goto badkit
-$   gtm_init_tape :== n
-$ endif
-$ if .NOT. alpha .AND. (f$locate("GTM.FI",prd) + f$locate("ALL",prd)) .ne. prdlen2
-$  then
-$   @sys$update:spkitbld "" 'dst' "" gtm$vrt:[tfi]gtmfi_spkitbld.dat
-$   if $severity .ne. 1 then goto badkit
-$   gtm_init_tape :== n
-$ endif
-$ if (f$locate("GT.DDP",prd) + f$locate("ALL",prd)) .ne. prdlen2
-$  then
-$   @sys$update:spkitbld "" 'dst' "" gtm$vrt:[tdp]ddp_spkitbld.dat
-$   if $severity .ne. 1 then goto badkit
-$   gtm_init_tape :== n
-$ endif
-$ if (f$locate("GT.DC",prd) + f$locate("ALL",prd)) .ne. prdlen2
-$  then
-$   @sys$update:spkitbld "" 'dst' "" gtm$vrt:[tdc]gtmdc_spkitbld.dat
-$   if $severity .ne. 1 then goto badkit
-$   gtm_init_tape :== n
-$ endif
-$ if f$getdvi(outdev,"DEVCLASS") .eq. 2
-$  then
-$   if .not. f$getdvi(outdev,"MNT") then mount/foreign/noassist 'outdev'
-$   dismount/unload 'outdev'
-$ endif
-$ @gtm$tools:kitprepare.com 'vno'
-$goodbye:
-$ savpriv = f$setprv(savpriv)
-$ exit
-$!
-$badkit:
-$type sys$input:
-
-	+---------------------+
-	|		      |
-	|  THIS IS A BAD KIT  |
-	|		      |
-	+---------------------+
-
-$ goto goodbye
-$!
-$getprod:
-$ prdlen2 = f$length(prd) * 2
-$ if prdlen2 .eq. 0
-$  then
-$ 	ask prd "Product"
-$ 	if f$extract(0,1,prd) .eqs. "Q" then exit
-$ 	goto getprod
-$ endif
-$ n = 0
-$prodloop:
-$ t1 = f$element(n,",",prd)
-$ if t1 .eqs. "," then return
-$ t1 = f$locate(t1,prodlist)
-$ if t1 .eq. pllen
-$  then
-$ 	say "Product not available"
-$ 	prd = ""
-$ 	goto getprod
-$ endif
-$ n = n + 1
-$ goto prodloop
-$!
-$getver:
-$ if f$search("gtm$root:["+vno+".pro]gtmshr.exe") .nes. "" then return
-$ if vno .nes. "" then say "Version Number not available"
-$ ask vno "Version Number"
-$ if f$extract(0,1,vno) .eqs. "Q" then exit
-$ goto getver
-$!
-$getdst:
-$ on warning then goto nodst
-$ outdev = f$parse(dst,,,"device")
-$ dst = f$parse(dst,"[F-O-O]",,"directory")
-$ if dst .eqs. "[F-O-O]"
-$  then
-$ 	dst = outdev
-$  else
-$ 	dst = outdev + dst
-$ endif
-$ on warning then continue
-$ return
-$nodst:
-$ ask dst "Destination"
-$ if f$extract(0,1,dst) .eqs. "Q" then exit
-$ goto getdst
diff --git a/sr_vvms/la.hlp b/sr_vvms/la.hlp
deleted file mode 100644
index 9800d73..0000000
--- a/sr_vvms/la.hlp
+++ /dev/null
@@ -1,170 +0,0 @@
-1 OVERVIEW
- O[VERVIEW]
-   The   License   Administration   (LA)   issues   the   Product
-   Authorization  Keys  (PAKs)  that  are  delivered  to  License
-   Management systems at customer sites.  The LA  is  invoked  by
-   typing:
-   LA command [/qualifier=value... [parameter...]
-   The LA is terminated by the command EXIT.
-1 INITIALIZE
- I[NITIALIZE] file name
-   The  INITIALIZE  command  creates   a   new,   empty   License
-   Administration  data  base  file.   The  command creates a new
-   version of the file when the file already  exists.   The  file
-   name has to be assigned the logical name GTM$LADB.
-1 CREATE
- C[REATE]
-   The CREATE command enters new, valid PAKs in the LA data base.
-   The command does not accept any qualifiers, all the input data
-   is prompted for.  The invalid entry fields may be edited until
-   the field data is valid.
-1 PRINT
- P[RINT]
-   The PRINT command creates the  files  PRODAUTHKEY.LIS  in  the
-   default  directory.   The  files  contain  the PAK data in the
-   format for mailing PAKs to customers.  There is one version of
-   the file above for each PAK matching the restrictions given by
-   the PRINT command qualifiers.
-   The syntax for the PRINT command is:
-   P[RINT] [/qualifier=value]
-2 /PRODUCT
- /P[RODUCT]=pattern
-   Selects all PAKs with the product name matching the pattern.
-2 /VERSION
- /VE[RSION]=pattern
-   Selects all PAKs with the product version  name  matching  the
-   pattern.
-2 /VALUE
- /V[ALUE]=dec.num
-   Selects all PAKs with the license value of "dec.num".
-2 /LICENSE_ID
- /L[ICENSE_ID]=dec.num
-   Selects all PAKs with the license ID of "dec.num".
-2 /SYSTEM_ID
- /S[YSTEM_ID]=hex.num
-   Selects all PAKs with the system ID "hex.num".  For PAKs  with
-   more  than  one  system  ID  only the first one in the list is
-   matched.
-2 /NUM_SYS
- /N[UM_SYS]=dec.num
-   Selects all PAKs with "dec.num" system IDs.
-2 /AVAILABLE
- /A[VAILABLE]=date
-   Selects all PAKs available exactly at "date".
-2 /EXPIRES
- /EX[PIRES]=date
-   Selects all PAKs expiring exactly at "date".
-2 /CREATED
- /CR[EATED]=date
-   Selects all PAKs created exactly at "date".
-2 /ENCRYPTION
- /EN[CRYPTION]=dec.num
-   Selects  all  PAKs  with  the   checksum   computed   by   the
-   "dec.num"-th encryption function.
-2 /CHECKSUM
- /CH[ECKSUM]=pattern
-   Selects all PAKs with the checksum matching the pattern.   The
-   pattern  is  a  sequence of characters, without dashes between
-   groups of four characters and without the leading digit.
-2 /OPERATOR
- /O[PERATOR]=pattern
-   Selects all PAKs created by the operator matching the pattern.
-1 LIST
- L[IST]
-   The LIST command lists  all  PAKs  matching  the  restrictions
-   given by the qualifiers to the terminal.
-   The syntax for the LIST command is:
-   L[IST] [/qualifier=value]
-2 /PRODUCT
- /P[RODUCT]=pattern
-   Selects all PAKs with the product name matching the pattern.
-2 /VERSION
- /VE[RSION]=pattern
-   Selects all PAKs with the product version  name  matching  the
-   pattern.
-2 /VALUE
- /V[ALUE]=dec.num
-   Selects all PAKs with the license value of "dec.num".
-2 /LICENSE_ID
- /L[ICENSE_ID]=dec.num
-   Selects all PAKs with the license ID of "dec.num".
-2 /SYSTEM_ID
- /S[YSTEM_ID]=hex.num
-   Selects all PAKs with the system ID "hex.num".  For PAKs  with
-   more  than  one  system  ID  only the first one in the list is
-   matched.
-2 /NUM_SYS
- /N[UM_SYS]=dec.num
-   Selects all PAKs with "dec.num" system IDs.
-2 /AVAILABLE
- /A[VAILABLE]=date
-   Selects all PAKs available exactly at "date".
-2 /EXPIRES
- /EX[PIRES]=date
-   Selects all PAKs expiring exactly at "date".
-2 /CREATED
- /CR[EATED]=date
-   Selects all PAKs created exactly at "date".
-2 /ENCRYPTION
- /EN[CRYPTION]=dec.num
-   Selects  all  PAKs  with  the   checksum   computed   by   the
-   "dec.num"-th encryption function.
-2 /CHECKSUM
- /CH[ECKSUM]=pattern
-   Selects all PAKs with the checksum matching the pattern.   The
-   pattern  is  a  sequence of characters, without dashes between
-   groups of four characters and without the leading digit.
-2 /OPERATOR
- /O[PERATOR]=pattern
-   Selects all PAKs created by the operator matching the pattern.
-1 VOID
- V[OID]
-   The VOID command marks all qualified PAKs void.   The  PAK  is
-   void    when    its   check   sum   is   replaced   with   the
-   n-0000-0000-0000-0000 string.  The encryption function  number
-   is kept.  The command invalidates PAKs created by mistake.  It
-   should not be used for valid PAKs.
-   The syntax for the VOID command is:
-   V[OID] [/qualifier=value]
-2 /PRODUCT
- /P[RODUCT]=pattern
-   Selects all PAKs with the product name matching the pattern.
-2 /VERSION
- /VE[RSION]=pattern
-   Selects all PAKs with the product version  name  matching  the
-   pattern.
-2 /VALUE
- /V[ALUE]=dec.num
-   Selects all PAKs with the license value of "dec.num".
-2 /LICENSE_ID
- /L[ICENSE_ID]=dec.num
-   Selects all PAKs with the license ID of "dec.num".
-2 /SYSTEM_ID
- /S[YSTEM_ID]=hex.num
-   Selects all PAKs with the system ID "hex.num".  For PAKs  with
-   more  than  one  system  ID  only the first one in the list is
-   matched.
-2 /NUM_SYS
- /N[UM_SYS]=dec.num
-   Selects all PAKs with "dec.num" system IDs.
-2 /AVAILABLE
- /A[VAILABLE]=date
-   Selects all PAKs available exactly at "date".
-2 /EXPIRES
- /EX[PIRES]=date
-   Selects all PAKs expiring exactly at "date".
-2 /CREATED
- /CR[EATED]=date
-   Selects all PAKs created exactly at "date".
-2 /ENCRYPTION
- /EN[CRYPTION]=dec.num
-   Selects  all  PAKs  with  the   checksum   computed   by   the
-   "dec.num"-th encryption function.
-2 /CHECKSUM
- /CH[ECKSUM]=pattern
-   Selects all PAKs with the checksum matching the pattern.   The
-   pattern  is  a  sequence of characters, without dashes between
-   groups of four characters and without the leading digit.
-2 /OPERATOR
- /O[PERATOR]=pattern
-   Selects all PAKs created by the operator matching the pattern.
diff --git a/sr_vvms/la_cmnd.cld b/sr_vvms/la_cmnd.cld
deleted file mode 100644
index 5de72f5..0000000
--- a/sr_vvms/la_cmnd.cld
+++ /dev/null
@@ -1,114 +0,0 @@
-MODULE LA_CMND
-
-DEFINE VERB exit
-	ROUTINE la_exit
-		NOQUALIFIERS
-
-DEFINE VERB help
-	ROUTINE la_help
-	PARAMETER P1 ,LABEL=topic
-		NOQUALIFIERS
- 
-DEFINE VERB initialize 
-	ROUTINE la_initial
-		NOQUALIFIERS
-
-DEFINE VERB create
-	ROUTINE la_create
-	NOPARAMETERS
-		QUALIFIER input, LABEL=io, VALUE (TYPE = $FILE,REQUIRED)
-
-DEFINE VERB void
-	ROUTINE la_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,      LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (LIST,REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
-
-DEFINE VERB list
-	ROUTINE la_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,      LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (LIST,REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
-
-DEFINE VERB print
-	ROUTINE la_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,      LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (LIST,REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (TYPE= $FILE,REQUIRED)
-
-DEFINE VERB show
-	ROUTINE la_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,      LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (LIST,REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
-
-DEFINE VERB store
-	ROUTINE la_store
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,      LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (LIST,REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
diff --git a/sr_vvms/la_convert.c b/sr_vvms/la_convert.c
deleted file mode 100644
index ec38ea1..0000000
--- a/sr_vvms/la_convert.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_convert.c : translates sequence of bits in bcs[2] to sequence of A - P char
-   used in      : la_create.c
-*/
-#include "mdef.h"
-#include "ladef.h"
-
-#define conv(byte,even)  ((even ? lo(byte):hi(byte)) + 'A')
-#define lo(x)  (x & mask)
-#define hi(x)  (x>>4)
-#define mask   15
-
-void	la_convert (
-int4	bcs[] ,
-char 	*cs )				/* result, check sum A - P form */
-{
-	unsigned char	*h   ;			/* bcs scaled in char	*/
-	int 		k,j  ;
-	bool 		even ;
-
-	h= (char *)bcs ;
-	even= TRUE ;
-	k= j= 0 ;
-	while (j!=8)
-	{
-		cs[k]= conv(h[j],even) ;
-		even= !even ;
-		cs[k+1]= conv(h[j],even) ;
-		even= !even ;
-		k += 2 ; j++ ;
-	}
-}
diff --git a/sr_vvms/la_create.c b/sr_vvms/la_create.c
deleted file mode 100644
index 7a52461..0000000
--- a/sr_vvms/la_create.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_create.c : License Administration function for creating new licenses
-   used in     : license_adm.c
-*/
-
-#include <ssdef.h>
-#include "mdef.h"
-#include <climsgdef.h>
-#include <descrip.h>
-#include "ladef.h"
-#include "lmdef.h"
-#define SAVE (rp[0]=='S' || rp[0]=='Y' )
-#define DISP (rp[0]=='D' || rp[0]==0 )
-#define QUIT (rp[0]=='Q')
-#define EDIT (rp[0]=='E')
-
-int la_create (void)
-{
-        int 	smg$create_virtual_keyboard(), toupper();
-
-	error_def(LA_NOCNFDB); 			/* No license created	*/
-	error_def(LA_NOCNF)  ;			/* No license created	*/
-	error_def(LA_NEWCNF) ;			/* New license created	*/
-	error_def(LA_SAVE) ;			/* Save Y/N ?		*/
-	error_def(LA_EMPTY) ;
-	error_def(LA_BADENCR) ;
-
-	char *h ;				/* db in main store 	*/
-	la_prolog *prol ;			/* db file prolog 	*/
-	pak  *p ;                       	/* pak record          	*/
-
-	char 	rp[32] ;			/* operator reply      	*/
-	int4	status ;
-	unsigned char 	recall= 16 ;
- 	unsigned short 	w ;
-	uint4  	kid ;			/* virt. keyboard ID    */
-	uint4	bcs[3]= {0,0,0} ;
-
-	if ((h= la_getdb(LADB))==NULL)		/* db in main storage	*/
-	{
-		lib$signal(LA_NOCNFDB) ;
-	}
-	prol= h	;
-	p= (char *)h + prol->len ;		/* place for new pak	*/
-
-	status= smg$create_virtual_keyboard(&kid,0,0,0,&recall)
-	;if (status!=SS$_NORMAL)
-	{
-		lib$signal(status) ;
-	}
-	la_initpak(prol->lastid,p) ;		/* pak initialized	*/
-	rp[0]= 'E' ;
-	while (!SAVE && !QUIT)
-	{
-		if EDIT
-		{
-			la_edit(kid,h,p) ;
-			la_puthead(p) ;
-			la_putfldr(&(p->pf)) ;
-			if(!la_encrypt(p->ph.n,&(p->pd),(p->ph.l[4] - p->ph.l[2]),bcs))
-			{
-				lib$signal(LA_BADENCR) ;
-			}
-			else
-			{
-				la_convert(p->ph.cs,bcs) ;
-			}
-		}
-		else if DISP
-		{
-			la_listpak(p) ;
-		}
-		la_putmsgu(LA_EMPTY,0,0) ;
-		rp[0]= 0 ;
-		la_getstr(kid,LA_SAVE,rp,0,1) ;
-		la_putmsgu(LA_EMPTY,0,0) ;
-		rp[0]= ( rp[0]>='a' ? rp[0]-32 : rp[0] ) ;
-	}
-	if (SAVE)
-	{
-		(prol->N)++ ;			/* count of paks ++	*/
-		prol->len += p->ph.l[0]	;	/* db file size ++	*/
-		prol->lastid = p->pd.lid ;	/* new last license ID  */
-		la_putdb (LADB,h) ;	 	/* db back to file	*/
-		lm_putmsgu (LA_NEWCNF,0,0) ;
-	}
-	else if (QUIT)				/* abort without saving	*/
-	{
-		lm_putmsgu(LA_NOCNF,0,0) ;
-	}
-	la_freedb(h) ;
-	return(status) ;
-}
diff --git a/sr_vvms/la_edit.c b/sr_vvms/la_edit.c
deleted file mode 100644
index 59d2929..0000000
--- a/sr_vvms/la_edit.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_edit.c: new license entered, inteactively with fields editting
-   used in  : la_create.c
-*/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "ladef.h"
-#define MINT 0x0FFFFFFF
-#define MUNS 0xFFFFFFFF
-#define MSHO 32767
-#define B 	 (e==SS$_NORMAL)
-#define cop(a,b) { char *y= a ;while (*b!=0) *(y++)= *(b++) ; *y= 0 ;}
-
-void la_edit   (uint4 kid,char *h,pak *p)
-/*
-uint4 	kid ;				virt. keyboard ID
-char 		*h ;			data base
-pak		*p ;            	buf. for new pak rec
-*/
-{
-	int	str$upcase() ;
-	int 	k,e,u,w ;
-	int4 	n  ;
-	bool	valid ;
-	char	buf[9*ADDR] ;			/* temporary		*/
-	int4	sid[NSYS] ;			/* temp hardw. model	*/
-	int4	mdl ;				/* hardware model	*/
-
-	int4	*psid ;				/* pak SIDs             */
-	char	*padr ;				/* pak address		*/
-	char	*pcom ;				/* pak comment 		*/
-	char	*badr ;				/* pointer to buf	*/
-	char	*top  ;
-
-	error_def(LA_PNAM) ;
-	error_def(LA_PVER) ;
-	error_def(LA_PX)   ;
-	error_def(LA_PT0)  ;
-	error_def(LA_PT1)  ;
-	error_def(LA_PLID) ;
-	error_def(LA_PL)   ;
-	error_def(LA_PSID) ;
-	error_def(LA_PCUST) ;
-	error_def(LA_PADR1) ;
-	error_def(LA_PADR2) ;
-	error_def(LA_PADR3) ;
-	error_def(LA_PADR4) ;
-	error_def(LA_PCOM) ;
-	error_def(LA_PENC) ;
-	error_def(LA_VALNAM) ;
-	error_def(LA_VALVER) ;
-	error_def(LA_INVAL) ;
-	uint4 ladr[5]= {LA_PCUST,LA_PADR1,LA_PADR2,LA_PADR3,LA_PADR4} ;
-
-	$DESCRIPTOR(dnam,p->pd.nam) ;
-	$DESCRIPTOR(dver,p->pd.ver) ;
-	$DESCRIPTOR(dbuf,buf) ;
-
-	valid= FALSE ;
-	while (!valid)
-	{
-		w= la_getstr(kid,LA_PNAM,p->pd.nam,1,PROD)   ;
-		dnam.dsc$w_length= w ;
-		e= str$upcase(&dnam,&dnam) ; if (!B) lib$signal(e) ;
-		valid= la_validate(LA_VALNAM,p->pd.nam) ;
-	}
-	valid= FALSE ;
-	while (!valid)
-	{
-		w= la_getstr(kid,LA_PVER,p->pd.ver,0,VERS)   ;
-		dver.dsc$w_length= w ;
-		e= str$upcase(&dver,&dver) ; if (!B) lib$signal(e) ;
-		valid= la_validate(LA_VALVER,p->pd.ver) ;
-	}
-	n= p->pd.x ;
-	la_getnum(kid,LA_PX,&n,0,MSHO) ; p->pd.x= n ;
-	la_getdat(kid,LA_PT0,&(p->pd.t0),0,MUNS)  ;
-	la_getdat(kid,LA_PT1,&(p->pd.t1),p->pd.t0[1],MUNS)  ;
-	valid= FALSE ;
-	while (!valid)
-	{
-	 	la_getnum(kid,LA_PLID,&(p->pd.lid),1,MINT) ;
-		valid= la_uniqlid(h,p->pd.lid) ;
-	}
-	n= p->pd.L ;
-	psid= (char *)p + SIZEOF(pak) ;
-	padr= psid + 2*n ;
-	for (k= 0;k!=n;k++)
-	{
-		sid[k]= psid[k] ;
-	}
-	for (k= n;k!=NSYS;k++)
-	{
-		sid[k]= 0 ;
-	}
-	la_getnum(kid,LA_PL,&n,1,NSYS) ; p->pd.L= n ;
-	for (k= 0;k!=n;k++)
-	{
-		w= la_mdl2nam(buf,sid[k]) ;
-		buf[w]= 0 ;
-		valid= FALSE ;
-		while (!valid)
-		{
-			w= la_getstr(kid,LA_PSID,buf,0,HWLEN) ;
-			dbuf.dsc$w_length= w ;
-			e= str$upcase(&dbuf,&dbuf) ; if (!B) lib$signal(e) ;
-			valid= la_nam2mdl(&mdl,w,buf) ;
-			if (!valid)
-			{
-				la_putmsgu(LA_INVAL,0,0) ;
-			}
-		}
-		sid[k]= mdl ;
-	}
-	badr= buf ;
-	for (k= 0;k!=5;k++)
-	{
-		cop(badr,padr) ;
-		w= la_getstr(kid,ladr[k],badr,0,ADDR) ;
-		padr++ ;
-		badr += w + 1 ;
-	}
-	cop(badr,padr) ;
-	w= la_getstr(kid,LA_PCOM,badr,0,4*ADDR) ;
-	top= badr + w + 1 ;
-	for (k= 0;k!=n;k++)
-	{
-		psid[k]= sid[k] ;
-	}
-	padr= psid + 2*n ;
-	badr= buf ;
-	while (badr!=top)
-	{
-		*(padr++)= *(badr++) ;
-	}
-	n= p->ph.n ;
-	la_getnum(kid,LA_PENC,&n,0,NCRY) ; p->ph.n= n ;
-}
diff --git a/sr_vvms/la_encrypt.c b/sr_vvms/la_encrypt.c
deleted file mode 100644
index 9b97dc5..0000000
--- a/sr_vvms/la_encrypt.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_encrypt.c : for given encryption function number, and an input sequence of bytes,
-		  the program computes the checksum of the sequence.
-   used in      : la_create.c,lp_licensed.c,lm_verify
-*/
-#include "mdef.h"
-#include <ssdef.h>
-#include "ladef.h"
-#include <descrip.h>
-#include "la_encrypt.h"
-
-bool la_encrypt (
-short 	n  ,				/* encryption function number	*/
-char 	*q , 				/* input sequence 		*/
-int 	len,				/* sequence length 		*/
-uint4 	bcs[])				/* result, binary form 		*/
-{
-	uint4	poly0[10] = { 0xEDB88320,0xA001A001,0x00008408,0x00000000,0xA001A001,1,1,1,1,1} ;
-	int4		init0[10] = { 0xFFFFFFFF,0x00000000,0x0000FFFF,0xFFFFFFFF,0x00000000,0,0,0,0,0} ;
-	uint4	poly1[10] = { 0xA001A001,0x00008408,0xEDB88320,0xEDB88320,0x0000A001,1,1,1,1,1} ;
-	int4		init1[10] = { 0x00000000,0x0000FFFF,0xFFFFFFFF,0xFFFFFFFF,0x00000000,0,0,0,0,0} ;
-	bool		status ;
-	int4 		crctbl[16] ;
-	$DESCRIPTOR	(dq,q) ;
-
-	dq.dsc$w_length = len ;
-	if (n>=5)
-	{
-		status = FALSE;
-	}
-	else
-	{
-		lib$crc_table(poly0+n,crctbl) ;
-		bcs[0] = lib$crc(crctbl,init0+n,&dq) ;
-
-		lib$crc_table(poly1+n,crctbl) ;
-		bcs[1] = lib$crc(crctbl,init1+n,&dq) ;
-		status = TRUE ;
-	}
-	return status ;
-}
diff --git a/sr_vvms/la_exit.c b/sr_vvms/la_exit.c
deleted file mode 100644
index 59b7bcd..0000000
--- a/sr_vvms/la_exit.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_exit.c : returns RMS$_EOF to terminate license adm or license man
-   used in   : license_adm.c license_man.c
- */
-
-#include "mdef.h"
-#include <rmsdef.h>
-int la_exit()
-{
-	return(RMS$_EOF) ;
-}
diff --git a/sr_vvms/la_fputmsgu.c b/sr_vvms/la_fputmsgu.c
deleted file mode 100644
index 4f08452..0000000
--- a/sr_vvms/la_fputmsgu.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_fputmsgu.c : outputs and formats message for user message code
-	  	  and user FAO arguments to a file.
- */
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <rms.h>
-#include <descrip.h>
-#include "ladef.h"
-#include "la_putline.h"
-#include "la_fputmsgu.h"
-
-#define B (e==SS$_NORMAL)
-
- void la_fputmsgu (struct RAB *rab,int4 c,int4 fao[],short n)
- {
-	int k,e;
-	struct { short argc ;           /* structure longword count */
-                 short opt   ;          /* message display options  */
-                 int4 code   ;          /* message code 	    */
-	         short count ;          /* FAO count    	    */
-	         short newopt;          /* new options  	    */
-	         int4 fao[16];          /* fao arguments	    */
-               } msgvec ;
-
-	msgvec.argc=    n+2 ;
-	msgvec.opt=     0x0001 ;
-	msgvec.code=    c ;
-	msgvec.count=   n ;
-	msgvec.newopt=  0x0001 ;
-
-	for (k= 0;k!=n;k++) msgvec.fao[k]= fao[k] ;
-
-	e= sys$putmsg(&msgvec,&la_putline,0,rab) ;
-	if (!B) lib$signal(e) ;
-
-}
diff --git a/sr_vvms/la_fputmsgu.h b/sr_vvms/la_fputmsgu.h
deleted file mode 100644
index 2e31cbe..0000000
--- a/sr_vvms/la_fputmsgu.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __LA_FPUTMSGU_H__
-#define __LA_FPUTMSGU_H__
-
-void la_fputmsgu (struct RAB *rab,int4 c,int4 fao[],short n);
-
-#endif
diff --git a/sr_vvms/la_getcli.c b/sr_vvms/la_getcli.c
deleted file mode 100644
index 4a8190d..0000000
--- a/sr_vvms/la_getcli.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-
-#include "ladef.h"
-/* la_getcli.c: retrieves values from the parsed string and fills the pak
-		pattern in.  Fills the array of qualified variables.
-   used in	: la_maint.c
-*/
-
-#define MAXLNG	0xFFFFFFFF
-#define CONST	static readonly
-
-bool la_getcli(int v_arr[], pak *pak_ptr)
-/* v_arr - qualified variables		*/
-/* pak_ptr - buff for pak pattern	*/
-{
-	bool		cli, valid;
-	char		*cptr, ret[ADDR], *vptr[16];		/* pointers to pak variables	*/
-	short		t_short;				/* return string length		*/
-	int		cnt0, cnt1;
-	int4		cli$present(), cli$getvalue();
-	int4		result;
-	uint4		cli_status, status;
-	varid		var;				/* variable identifier (enum type) */
-	CONST char	*iden[16] = { "n", "cs", "l" , "std", "oid", "L"  , "nam", "ver",
-				      "x", "t0", "t1", "lid", "sid", "nid", "adr", "com" };
-	CONST short	len[16] =   {  1, 2, 1,  3,  3,  1,  3,  3,
-				       1, 2, 2,  3,  3,  3,  3,  3};
-	CONST vtyp	type[16] =  { sho, csm, sho, dat, str, sho, str,  str,
-				      sho, dat, dat, lon, mdl, lon, list, str };
-	$DESCRIPTOR	(dent, iden);			/* CLI entity descriptor	*/
-	$DESCRIPTOR	(dret, ret);			/* CLI return value descrip	*/
-
-	dret.dsc$w_length = ADDR;
-	vptr[v_n] = &(pak_ptr->ph.n);
-	vptr[v_cs] = pak_ptr->ph.cs;
-	vptr[v_l] = pak_ptr->ph.l;
-	vptr[v_std] = pak_ptr->pf.std;
-	vptr[v_oid] = pak_ptr->pf.oid;
-	vptr[v_L] = &(pak_ptr->pd.L);
-	vptr[v_nam] = pak_ptr->pd.nam;
-	vptr[v_ver] = pak_ptr->pd.ver;
-	vptr[v_x] = &(pak_ptr->pd.x);
-	vptr[v_t0] = pak_ptr->pd.t0;
-	vptr[v_t1] = pak_ptr->pd.t1;
-	vptr[v_lid] = &(pak_ptr->pd.lid);
-	vptr[v_sid] = (char *)pak_ptr + SIZEOF(pak);
-	vptr[v_nid] = vptr[v_sid] + SIZEOF(int4);
-	cptr = vptr[v_adr] = vptr[v_nid] + SIZEOF(int4);
-	vptr[v_com] = vptr[v_adr] + 4 * ADDR + 4;
-	for (cnt0 = 0;  4 != cnt0;  cnt0++)
-		*(cptr++) = 0;
-	cli = FALSE;
-	for (var = v_cs;  var != eovar;  var++)
-	{
-		dent.dsc$a_pointer= iden[var];
-		dent.dsc$w_length = len[var];
-		cli_status = cli$present(&dent);
-		if (CLI$_PRESENT == cli_status)
-		{
-			cli = TRUE;
-			status = SS$_NORMAL;
-			dret.dsc$w_length = ADDR;
-			cli_status = cli$get_value(&dent, &dret, &t_short);
-			dret.dsc$w_length = t_short;
-			ret[t_short] = 0;
-			switch (type[var])
-			{
-			case str:	memcpy(vptr[var], ret, t_short + 1);
-					break;
-			case list:	memcpy(vptr[var], ret, t_short + 1);
-					for (cptr = vptr[var] + t_short + 1, cnt0 = 1;  (CLI$_COMMA == cli_status) && (5 != cnt0);
-						cptr += t_short + 1, cnt0++)
-					{
-						dret.dsc$w_length = ADDR;
-						cli_status = cli$get_value(&dent, &dret, &t_short);
-						dret.dsc$w_length = t_short;
-						ret[t_short] = 0;
-						memcpy(cptr, ret, t_short + 1);
-					}
-					for (;  cnt0 < 5;  cnt0++)
-						*(cptr++) = 0;
-					break;
-			case sho:	status = lib$cvt_dtb((int4)t_short, ret, &result);
-					*((short *)vptr[var]) = result;
-					break;
-			case lon:	status = lib$cvt_dtb((int4)t_short, ret, vptr[var]);
-					break;
-			case hex:	status = lib$cvt_htb((int4)t_short, ret, vptr[var]);
-					break;
-			case dat:	status = lib$convert_date_string(&dret, (date *)vptr[var]);
-					break;
-			case mdl:	valid = la_nam2mdl(vptr[var], t_short, ret);
-					if (!valid)
-						*((int4 *)vptr[var]) = MAXLNG;
-					break;
-			case csm:	if (('0' <= ret[0]) && ('9' >= ret[0]))
-					{
-						status = lib$cvt_dtb(1, ret, &result);
-						*((short *)vptr[v_n]) = result;
-						cnt0 = v_arr[v_n] = 1;
-					} else
-						cnt0 = 0;
-					for (cnt1 = 0;  (16 != cnt1) && (cnt0 != t_short);  cnt0++)
-					{
-						if ('-' != ret[cnt0])
-						{
-							*(vptr[var] + cnt1) = ret[cnt0];
-							cnt1++;
-						}
-					}
-					*(vptr[var] + cnt1) = 0;
-					break;
-			otherwise:	break;
-			}
-			if (SS$_NORMAL != status)
-				la_putmsgs(status);
-			v_arr[var] = 1;
-		} else
-			v_arr[var] = 0;
-	}
-	pak_ptr->pd.L = 1;		/* only one system allowed for matching */
-	return cli;
-}
diff --git a/sr_vvms/la_getdat.c b/sr_vvms/la_getdat.c
deleted file mode 100644
index 2f631be..0000000
--- a/sr_vvms/la_getdat.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "ladef.h"
-
-/* la_getdat.c: Prompts for a date string until correct and within range
-   used in    : la_interact.c
-*/
-
-void	la_getdat(uint4 kid, int4 code, date *date_ptr, uint4 lo, uint4 hi)
-/* kid - virt. keyb. ID		*/
-/* code - promt msg code	*/
-/* date_ptr - date/time returned	*/
-/* lo - min value of date	*/
-/* hi - max value of date	*/
-{
-	int		status;
-	bool		valid;
-	char		pro[64], res[64];
-	unsigned short	length;			/* res. string length	*/
-	int4		mlen = 32;		/* max length of result */
-	int		smg$read_string(), sys$getmsg();
-	int		sys$asctim();
-	$DESCRIPTOR(dini, res);			/* initial string	*/
-	$DESCRIPTOR(dres, res);			/* resuting string	*/
-	$DESCRIPTOR(dprm, pro);			/* prompt string	*/
-	error_def(LA_INVAL);
-
-	dprm.dsc$w_length = 64;
-	status = sys$getmsg(code, &length, &dprm, 1, 0);
-	if (SS$_NORMAL != status)
-		lib$signal(status);
-	dprm.dsc$w_length = length;
-	dres.dsc$w_length = 12;
-	if (0 == (*date_ptr)[1])
-	{	/* no initial date */
-		res[0] = 0;
-		length = 0;
-	} else
-	{
-		status = sys$asctim(&length, &dres, date_ptr, 0);
-		if (SS$_NORMAL != status)
-			lib$signal(status);
-	}
-	dres.dsc$w_length = 64;
-	valid = FALSE;
-	while ((SS$_NORMAL != status) || !valid)
-	{
-		res[length] = ' ';
-		dini.dsc$w_length = length;
-		status = smg$read_string(&kid, &dres, &dprm, &mlen, 0, 0, 0, &length, 0, 0, &dini);
-		if (SS$_NORMAL != status)
-			lib$signal(status);
-		else  if (0 == length)
-		{	/* no datstatus/time */
-			(*date_ptr)[0] = (*date_ptr)[1] = lo = 0;
-			hi = 1;
-		} else  if (0 != length)
-		{	/* date/time entered */
-			status = lib$convert_date_string(&dres, date_ptr);
-			if (SS$_NORMAL != status)
-				la_putmsgs(status);
-		}
-		valid = ((*date_ptr)[1] >= lo || (*date_ptr)[1] < hi);
-		if (!valid)
-			la_putmsgu(LA_INVAL, 0, 0);
-	}
-}
diff --git a/sr_vvms/la_getdb.c b/sr_vvms/la_getdb.c
deleted file mode 100644
index 1a625ae..0000000
--- a/sr_vvms/la_getdb.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_getdb  : entire license data base in memory
-		or file read error
-		or not enough memory allocated
-		or bad db file identifier
-   la_freedb : frees the store allocated for the data base
- */
-#include "mdef.h"
-#include <ssdef.h>
-#include <rms.h>
-#include "ladef.h"
-#include "la_io.h"
-
-GBLREF bool 	licensed;
-GBLREF int4 	lkid, lid;
-
- char * la_getdb (char *fn)
-/*
- char *fn ;                 			data base file name
-*/
-{
- 	struct 	FAB f ;				/* file access block    */
- 	struct 	RAB r ;				/* record access block  */
-	struct 	XABFHC x ;			/* file header 		*/
-	struct	NAM n;				/*  added nam block to capture file id  (js)  */
-
-	int4		status ;
-	int4 		size   ;
-	int 		k ;
-	char 		*h= NULL ;		/* db in main store 	*/
-	char 		*p ;			/* current read buffer  */
-	la_prolog	*prol ;			/* db file prolog	*/
-
-	n = cc$rms_nam;
-	status= bopen(fn,&f,&r,&x,&n);
-	if (status==SS$_NORMAL)
-	{
-		size= 512 * x.xab$l_ebk + PBUF ;
-		if ((h= (char *)malloc(size))!=NULL)
-		{
-			p= h ;
-			while (status==SS$_NORMAL && p<h+size)
-		        {
-				status= bread(&r,p,BLKS) ; p += BLKS  ;
-			}
-			if (status!=RMS$_EOF)
-			{
-				h= NULL ;
-			}
-			else
-			{
-				prol= h ;
-				if (prol->id!=DBID)	/* invalid file ID */
-				{
-					h= NULL ;
-				}
-			}
-		}
-		bclose(&f) ;
-	}
-	else
-	{
-		h= NULL ;
-	}
-	return(h) ;
-}
-
- void la_freedb (h)
- char *h ;                 		/* data base in memory  */
-{
-	if (h!=NULL)
-	{
-		free(h) ;
-	}
-}
diff --git a/sr_vvms/la_getnum.c b/sr_vvms/la_getnum.c
deleted file mode 100644
index 37ffb09..0000000
--- a/sr_vvms/la_getnum.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "ladef.h"
-#include "min_max.h"
-
-/* la_getnum.c: Prompts for a decimal input until valid.  Provides an initial value.
-   used in    : la_interact.c
-*/
-
-#define MAXLEN		16
-#define MAXDECLEN	12				/* max length of a num in decimal digits */
-
-void	la_getnum (uint4 kid, int4 code, int4 *num_ptr, int4 lo, int4 hi)
-/* kid - virt. keyb. ID		*/
-/* code - prompt code		*/
-/* num_ptr - result returned	*/
-/* lo - min value of result	*/
-/* hi - max value of result 	*/
-{
-	bool		valid;
-	char		buf[32], *ini = NULL, pro[64], *res = NULL;
-	unsigned short  length;				/* res. string length   */
-	int4		smg$read_string(), sys$getmsg();
-	int4		bin, status;
-	int4		mlen = MAXLEN;			/* max length of res	*/
-	int		cnt0;
-	$DESCRIPTOR	(dini, ini);			/* initial string 	*/
-	$DESCRIPTOR	(dres, res);			/* resulting string 	*/
-	$DESCRIPTOR	(dprm, pro);			/* prompt string	*/
-	error_def	(LA_INVAL);
-
-	bin = *num_ptr;
-	cnt0 = MAXLEN;
-	while (0 != bin)
-	{
-		cnt0--;
-		buf[cnt0] = bin % 10 + '0';
-		bin = bin / 10;
-	}
-	res = buf + cnt0;
-	dres.dsc$a_pointer = dini.dsc$a_pointer = res;
-	dres.dsc$w_length = MAXLEN;
-	dprm.dsc$w_length = SIZEOF(pro);
-	status = sys$getmsg(code, &length, &dprm, 1, 0);
-	dprm.dsc$w_length = length;
-	length = MAXLEN - cnt0;
-	valid = FALSE;
-	while ((status & 1) && !valid)
-	{
-		memset(res + length, ' ', cnt0);
-		dini.dsc$w_length = MIN(length, MAXDECLEN);
-		status = smg$read_string(&kid, &dres, &dprm, &mlen, 0, 0, 0, &length, 0, 0, &dini);
-		if (status & 1)
-		{
-			status = lib$cvt_dtb((int4)length, res, num_ptr);
-			valid = ((*num_ptr >= lo) && (*num_ptr < hi) && (SS$_NORMAL == status));
-			if (!valid)
-				la_putmsgu(LA_INVAL, 0, 0);
-		}
-	}
-	if (!(status & 1))
-		lib$signal(status);
-}
diff --git a/sr_vvms/la_getstr.c b/sr_vvms/la_getstr.c
deleted file mode 100644
index b4828eb..0000000
--- a/sr_vvms/la_getstr.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "ladef.h"
-#include "min_max.h"
-
-/* la_getstr.c: Prompts for string input until correct; provides initial
-		string
-   used in    : la_interact.c
-*/
-
-short	la_getstr(uint4 kid, int4 code, char *res, int lo, int hi)
-/* kid - virt. keyb. ID		*/
-/* code - prompt message code	*/
-/* res - result returned	*/
-/* lo - min length of result	*/
-/* hi - max length of result	*/
-{
-	boolean_t	valid;
-	char		buf[4 * ADDR], pro[80];
-	char		*ini = NULL;
-	unsigned short  w_short;		/* res. string length   */
-	int 		cnt;
-	int4		status;
-	int4		smg$read_string(), sys$getmsg();
-	$DESCRIPTOR	(dini, ini);		/* initial string 	*/
-	$DESCRIPTOR	(dbuf, buf);		/* resuting string 	*/
-	$DESCRIPTOR	(dpro, pro);		/* prompt string	*/
-	error_def	(LA_INVAL);
-
-	dpro.dsc$w_length = 80;
-	status = sys$getmsg(code, &w_short, &dpro, 1, 0);
-	if (SS$_NORMAL != status)
-		lib$signal(status);
-	dpro.dsc$w_length = w_short;
-	for (w_short = 0;  !w_short || ((0 != res[w_short]) && (hi > w_short));  w_short++)
-		buf[w_short] = res[w_short];
-	dini.dsc$a_pointer = buf;
-	dbuf.dsc$w_length = hi;
-	valid = FALSE;
-	while ((SS$_NORMAL != status) || !valid)
-	{
-		buf[w_short] = ' ';
-		dini.dsc$w_length = w_short;
-		status = smg$read_string(&kid, &dbuf, &dpro, &hi, 0, 0, 0, &w_short, 0, 0, &dini);
-		if (SS$_NORMAL != status)
-			lib$stop(status);
-		valid = ((w_short >= lo) && (w_short < hi)) || ((1 == w_short) && (1 == hi));
-		if (!valid)
-		{
-			w_short = MIN(w_short, hi - 1);
- 			la_putmsgu(LA_INVAL, 0, 0);
-		}
-	}
-	for (cnt = 0;  cnt < hi;  cnt++)
-		res[cnt] = (cnt < w_short) ? buf[cnt] : 0;
-	return w_short;
-}
diff --git a/sr_vvms/la_help.c b/sr_vvms/la_help.c
deleted file mode 100644
index b256a05..0000000
--- a/sr_vvms/la_help.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_help.c: displays the help file
-   used in  : la_cmnd.cld
-*/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include "ladef.h"
-
-int la_help ()
-{
-        int 	cli$get_getvalue();
-	int	lbr$output_help() ;
-	int e ;
-	int4 fl= 1 ;
- 	short w ;
-	char buf[256] ;
-        $DESCRIPTOR (dent,"topic");
-        $DESCRIPTOR (dbuf,buf)    ;
-        $DESCRIPTOR (dlib,LAHP)   ;
-
-        e = cli$get_value(&dent,&dbuf,&w) ;
-	if (e!=SS$_NORMAL)
-	{
-		dbuf.dsc$w_length= 0 ;
-	}
-	lbr$output_help(lib$put_output,0,&dbuf,&dlib,&fl,lib$get_input) ;
-
-	return e ;
-}
diff --git a/sr_vvms/la_initial.c b/sr_vvms/la_initial.c
deleted file mode 100644
index 8ef968b..0000000
--- a/sr_vvms/la_initial.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_initial.c: == data base file initialized
- */
-
-#include "mdef.h"
-#include <climsgdef.h>
-#include <ssdef.h>
-#include <psldef.h>
-#include <rms.h>
-#include <lnmdef.h>
-#include <descrip.h>
-#include "gtm_string.h"
-#include "ladef.h"
-#include "lmdef.h"
-#include "la_io.h"
-
-int la_initial (char *ln[])
-/*
-char	*ln[] ;					db logical name
-*/
-{
-        int4		cli$get_getvalue(),sys$trnlnm();
-	error_def	(LA_DBINIT) ; 		/* License db init. 	*/
-	error_def	(LA_DBEXIS) ; 		/* Lic. db exists allready */
-	la_prolog 	*h ;			/* data base prolog 	*/
-	int4		status ;		/* status           	*/
-	int4		fao[2] ;
-	char		res[128] ;		/* resulting file name 	*/
-	char		exp[255];		/* expanded file name	*/
-	int4		expl;			/*  ... length		*/
-	char 		buf[BLKS] ;
-	$DESCRIPTOR	(dtbp,"LNM$JOB") ;
-	$DESCRIPTOR	(dtbs,"LNM$FILE_DEV") ;
-	$DESCRIPTOR	(dlnm,ln[0]) ;
-	$DESCRIPTOR	(dres,res) ;
-	struct FAB 	fab ;
-	struct RAB 	rab ;
-	struct NAM	nam;
-	struct XABPRO 	xab;
-	int4		ctx= 0 ;
-	int4		iosb ;
-	char 		acmo= PSL$C_USER ;
-	short		w ;
-	struct
-	{
-		short bln;
-		short cod;
-		int4  bdr;
-		int4  rln;
-	} itm[3] ;
-
-	dlnm.dsc$w_length= strlen(ln[0]) ;
-	status= sys$trnlnm(0,&dtbs,&dlnm,0,0) ;
-	if (status==SS$_NOLOGNAM)
-	{
-		itm[0].bln= strlen(ln[1])	; itm[1].bln= 0 ;
-		itm[0].cod= LNM$_STRING		; itm[1].cod= 0 ;
-		itm[0].bdr= ln[1] 		; itm[1].bdr= 0 ;
-		itm[0].rln= &w 			; itm[1].rln= 0 ;
-		status= sys$crelnm(0,&dtbp,&dlnm,&acmo,itm) ;
-	}
-	if (status==SS$_NORMAL)
-	{
-		status= lib$find_file(&dlnm,&dres,&ctx,0,0,&iosb,0) ;
-		if (status==RMS$_NMF || status==RMS$_FNF)
-		{
-			status= SS$_NORMAL ;
-		}
-		else if (status==SS$_NORMAL || status==RMS$_NORMAL)
-		{
-			status= LA_DBEXIS ;
-		}
-	}
-	if (status==SS$_NORMAL)			/* file name received in f  */
-	{
-		h= buf ;			/* prolog positioned in buf */
-	        h->id= DBID ;			/* db file assigned its ID  */
-		h->N= 0 ;
-		h->len= SIZEOF(la_prolog) ;	/* prolog data filled in    */
-		nam = cc$rms_nam;
-		nam.nam$l_esa = &exp;
-		nam.nam$b_ess = SIZEOF(exp);
-		status= bcreat(ln[0],&fab,&rab,&nam,&xab,ALOC) ;
-		if (status==SS$_NORMAL)
-		{
-			status= bwrite(&rab,buf,BLKS) ;
-		}
-		bclose(&fab) ;
-	}
-	if (status==SS$_NORMAL)
-	{
-/*		fao[0]= strlen(ln[0]) ; fao[1]= ln[0] ;		*/
-		fao[0]= nam.nam$b_esl; fao[1]= &exp;
-		lm_putmsgu(LA_DBINIT,fao,2) ;
-	}
-        else
-	{
-		lib$signal(status) ;
-	}
-	return status ;
-}
diff --git a/sr_vvms/la_initpak.c b/sr_vvms/la_initpak.c
deleted file mode 100644
index 7cfa2cb..0000000
--- a/sr_vvms/la_initpak.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_initpak.c: initializes the pak record
-   used in     : la_create.c
- */
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "ladef.h"
-
-void la_initpak (llid,p)
-int4 llid ;				/* last license ID	*/
-pak *p ;                               	/* buff. for the pak rec*/
-{
-	int k ;
-	char *q ;
-
-	q= (char *)p ;
-	for (k= 0;k!=PBUF;k++)
-	{
-		*(q++) = 0 ;
-	}
-
-	p->ph.n= 0 ;
-	p->ph.cs[0]= 0 ;
-
-	p->pd.nam[0]= 0 ;
-	p->pd.ver[0]= 0 ;
-	p->pd.x= 0 ;
-	p->pd.t0[1]= 0 ;
-	p->pd.t1[1]= 0 ;
-	p->pd.lid= llid + 1 ;
-	p->pd.L= 0 ;
-
-}
diff --git a/sr_vvms/la_io.c b/sr_vvms/la_io.c
deleted file mode 100644
index 758db25..0000000
--- a/sr_vvms/la_io.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* License Adiministration I/O system */
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <ssdef.h>
-#include <rms.h>
-#include "ladef.h"
-#include "la_io.h"
-#define T  RMS$_NORMAL
-
- void bclose (struct FAB *f)
-{
-	sys$close(f) ;
-}
-
- void bdelete (struct FAB *f,struct XABPRO *x)
-{
-	int	e;
-
-	*x = cc$rms_xabpro;
-	x->xab$w_pro = 0x0000;				/* (sy:rwed,ow:rwed,gr:rwed,wo:rwed) */
-	f->fab$l_xab = x;
-
-	e = sys$close(f);
-
-	f->fab$l_fop = f->fab$l_fop | FAB$M_NAM;	/* Allow name block input	*/
-	f->fab$l_fna = 0;
-	f->fab$b_fns = 0;		/* Disable hard file name	*/
-
-	e = sys$erase(f);
-}
-
- int bcreat (
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- struct NAM *nam,
- struct XABPRO *xab,
- int n )                  /* file allocation */
-{
-	int e ;
-
-	*f= cc$rms_fab ;
-	f->fab$l_alq= n ;
-	f->fab$w_deq= n/4 ;
-	f->fab$b_fac= FAB$M_PUT ;
-	f->fab$l_fna= fn ;
-	f->fab$b_fns= strlen(fn) ;
-	f->fab$l_mrn= 0 ;
-	f->fab$l_fop= FAB$M_CBT ;
-	f->fab$w_mrs= BLKS ;
-	f->fab$b_org= FAB$C_SEQ ;
-	f->fab$b_rfm= FAB$C_FIX ;
-	f->fab$b_shr= FAB$M_NIL ;
-
-	*xab = cc$rms_xabpro;
-	xab->xab$w_pro = 0xEE88;	/*  /protection=(sy:rwe,ow:rwe,gr:r,wo:r)  */
-	f->fab$l_xab = xab;
-
-	f->fab$l_nam = nam;
-
-	e= sys$create(f) ;
-	if (e==T)
-	{
-		*r= cc$rms_rab ;
-		r->rab$l_fab= f ;
-		r->rab$b_mbc= 4;
-		e= sys$connect(r) ;
-	}
-	if (e==T) e= SS$_NORMAL ;
-        return (e) ;
-}
-
- int vcreat (
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- int n )                  /* file allocation */
-{
-	int e ;
-	*f= cc$rms_fab ;
-	f->fab$b_fac= FAB$M_PUT ;
-	f->fab$l_fna= fn ;
-	f->fab$b_fns= strlen(fn) ;
-	f->fab$l_mrn= 0 ;
-	f->fab$b_org= FAB$C_SEQ ;
-	f->fab$b_rfm= FAB$C_VAR ;
-	f->fab$b_rat= FAB$M_CR ;
-	f->fab$b_shr= FAB$M_NIL ;
-
-	e= sys$create(f) ;
-	if (e==T)
-	{
-		*r= cc$rms_rab ;
-		r->rab$l_fab= f ;
-		r->rab$b_mbc= 4;
-		e= sys$connect(r) ;
-	}
-	if (e==T) e= SS$_NORMAL ;
-        return (e) ;
-}
-
- int bopen(
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- struct XABFHC *x ,
- struct NAM *nam)
-{
-	int e ;
-	*f= cc$rms_fab ;
-	f->fab$b_fac= FAB$M_GET;
-	f->fab$l_fna= fn ;
-	f->fab$b_fns= strlen(fn) ;
-	f->fab$b_shr= FAB$M_SHRGET ;
-	f->fab$l_xab= x ;
-
-	*x= cc$rms_xabfhc ;
-	f->fab$l_nam = nam;
-
-	e= sys$open(f) ;
-	if (e==T)
-	{
-		*r= cc$rms_rab ;
-		r->rab$l_fab= f ;
-		r->rab$b_mbc= 4 ;
-		r->rab$b_rac= RAB$C_SEQ ;
-		r->rab$l_rop= RAB$M_RAH ;
-		e= sys$connect(r) ;
-	}
-	if (e==T) e= SS$_NORMAL ;
-        return (e) ;
-}
-
- int breopen(
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- struct XABFHC *x ,
- struct NAM *nam)
-{
-	int e ;
-	*f= cc$rms_fab ;
-	f->fab$b_fac= FAB$M_GET | FAB$M_DEL ;	/*  Allow also delete access	*/
-	f->fab$l_fna= fn ;
-	f->fab$b_fns= strlen(fn) ;
-/*	f->fab$b_shr= FAB$M_SHRGET ;	*/	/*  No shared get		*/
-	f->fab$l_xab= x ;
-
-	*x= cc$rms_xabfhc ;
-	f->fab$l_nam = nam;
-
-	e= sys$open(f) ;
-	if (e==T)
-	{
-		*r= cc$rms_rab ;
-		r->rab$l_fab= f ;
-		r->rab$b_mbc= 4 ;
-		r->rab$b_rac= RAB$C_SEQ ;
-		r->rab$l_rop= RAB$M_RAH ;
-		e= sys$connect(r) ;
-	}
-	if (e==T) e= SS$_NORMAL ;
-        return (e) ;
-}
-
- int bread (
- struct RAB *r ,
- char *p ,			/* user buffer address         */
- unsigned short w )		/* user buffer length in bytes */
-{
-	int e ;
-	r->rab$l_ubf= p ;
-	r->rab$w_usz= w ;
-	e= sys$get(r) ;
-	if (e==T) e= SS$_NORMAL ;
-	return(e) ;
-}
-
- int bwrite (
- struct RAB *r ,
- char *p ,
- unsigned short w )
-{
-	int e ;
-	r->rab$l_rbf= p ;
-	r->rab$w_rsz= w ;
-	if ((e= sys$put(r))==T) e= SS$_NORMAL ;
-	return(e) ;
-}
diff --git a/sr_vvms/la_io.h b/sr_vvms/la_io.h
deleted file mode 100644
index 2f5f27d..0000000
--- a/sr_vvms/la_io.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __LA_IO_H__
-#define  __LA_IO_H__
-
-#include <rms.h>
-
- void bclose (struct FAB *f);
-
- void bdelete (struct FAB *f,struct XABPRO *x);
-
- int bcreat (
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- struct NAM *nam,
- struct XABPRO *xab,
- int n );
-
- int vcreat (
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- int n );
-
- int bopen(
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- struct XABFHC *x ,
- struct NAM *nam);
-
- int breopen(
- char *fn ,
- struct FAB *f ,
- struct RAB *r ,
- struct XABFHC *x ,
- struct NAM *nam);
-
- int bread (
- struct RAB *r ,
- char *p ,			/* user buffer address         */
- unsigned short w );		/* user buffer length in bytes */
-
- int bwrite (
- struct RAB *r ,
- char *p ,
- unsigned short w );
-
-int vcreat(char *fn, struct FAB *f, struct RAB *r, int n);
-
-#endif
diff --git a/sr_vvms/la_listpak.c b/sr_vvms/la_listpak.c
deleted file mode 100644
index 55ec84e..0000000
--- a/sr_vvms/la_listpak.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_listpak.c: lists one pak record to stdout
-   used in     : la_create.c
- */
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "gtm_string.h"
-#include "ladef.h"
-
-void la_listpak (char *q)
-/* q - buffer with the pak record 	*/
-{
-
-	pak	*p ;			/* pak record 		*/
-	int4	*psid ;			/* pak SIDs             */
-	int4	*pnid ;			/* pak NIDs		*/
-	char	*padr ;			/* pak address		*/
-	char	*pcom ;			/* pak comment 		*/
-
-	int4 	fao[16] ;		/* fao arguments	*/
-	int 	k ;
-	char	buf[32] ;		/* model name buffer	*/
-	short	w ;			/* model name length	*/
-
-	error_def(LA_HEAD) ;	/* Listing header    */
-	error_def(LA_NAM) ;	/* Product           */
-	error_def(LA_VER) ;	/* Version           */
-	error_def(LA_X) ;	/* License value     */
-	error_def(LA_UNLX) ;	/* Unlimited license */
-	error_def(LA_T0) ;	/* Date available    */
-	error_def(LA_T1) ;	/* Date expires      */
-	error_def(LA_UNLT0) ;	/* Date unlimited    */
-	error_def(LA_UNLT1) ;	/* Date unlimited    */
-	error_def(LA_LID) ;	/* License ID        */
-	error_def(LA_L) ;	/* Number of systems */
-	error_def(LA_SID) ;	/* Hardware model    */
-	error_def(LA_UNSID) ;	/* Hardware no limit.*/
-	error_def(LA_CUST) ;    /* Customer name     */
-	error_def(LA_ADR) ;     /* Address line !SL  */
-	error_def(LA_COM) ;	/* Comment           */
-	error_def(LA_CS) ;	/* Check sum         */
-	error_def(LA_STD) ;	/* Creation date     */
-	error_def(LA_OID) ;	/* Operator ID       */
-
-	p= q ;
-	psid= q + p->ph.l[3] ;
-	pnid= q + p->ph.l[4] ;
-	padr= q + p->ph.l[5] ;
-	pcom= q + p->ph.l[6] ;
-
-	la_putmsgu(LA_HEAD,0,0) ;
-
-	fao[0]= strlen(p->pd.nam) ; fao[1]= (p->pd.nam) ;
-	la_putmsgu(LA_NAM,fao,2) ;
-	fao[0]= strlen(p->pd.ver) ; fao[1]= (p->pd.ver) ;
-	la_putmsgu(LA_VER,fao,2) ;
-	if (p->pd.x!=0)			/* job limited license 	*/
-	{
-		la_putmsgu(LA_X,&(p->pd.x),1) ;
-	}
-	else				/* unlimited license  	*/
-	{
-		la_putmsgu(LA_UNLX,0,0) ;
-	}
-	if (p->pd.t0[1]!=0)		/* available date given */
-	{
-	        fao[0]= &(p->pd.t0) ;
-		la_putmsgu(LA_T0,fao,1) ;
-	}
-	else				/* date not given 	*/
-	{
-		la_putmsgu(LA_UNLT0,0,0) ;
-	}
-	if (p->pd.t1[1]!=0)		/* available date given */
-	{
-	        fao[0]= &(p->pd.t1) ;
-		la_putmsgu(LA_T1,fao,1) ;
-	}
-	else				/* date not given 	*/
-	{
-		la_putmsgu(LA_UNLT1,0,0) ;
-	}
-	la_putmsgu(LA_LID,&(p->pd.lid),1) ;
-	la_putmsgu(LA_L,&(p->pd.L),1) ;
-	for (k= 0;k!=(p->pd.L);k++)
-	{
-		if (psid[k]==0)
-		{
-			fao[0]= k ;
-			la_putmsgu(LA_UNSID,fao,1) ;
-		}
-		else
-		{
-			w= la_mdl2nam(buf,psid[k]) ;
-			fao[0]= k ; fao[1]= w ; fao[2]= buf ;
-			la_putmsgu(LA_SID,fao,3) ;
-		}
-	}
-	fao[0]= strlen(padr) ; fao[1]= padr ;
-	la_putmsgu(LA_CUST,fao,2) ;
-	for (k= 1;k!=5;k++)
-	{
-		padr= padr + strlen(padr) + 1 ;
-		fao[0]= k ;
-		fao[1]= strlen(padr) ; fao[2]= padr ;
-		la_putmsgu(LA_ADR,fao,3) ;
-	}
-	fao[0]= strlen(pcom) ; fao[1]= pcom ;
-	la_putmsgu(LA_COM,fao,2) ;
-	fao[0]= p->ph.n ;
-	fao[1]= fao[3]= fao[5]= fao[7]= 4 ;
-        fao[2]= p->ph.cs ;
-        fao[4]= p->ph.cs +  4 ;
-        fao[6]= p->ph.cs +  8 ;
-        fao[8]= p->ph.cs + 12 ;
-	la_putmsgu(LA_CS,fao,9) ;
-        fao[0]= &(p->pf.std) ;
-	la_putmsgu(LA_STD,fao,1) ;
-	fao[0]= strlen(p->pf.oid) ; fao[1]= (p->pf.oid) ;
-	la_putmsgu(LA_OID,fao,2) ;
-}
diff --git a/sr_vvms/la_maint.c b/sr_vvms/la_maint.c
deleted file mode 100644
index 91da55f..0000000
--- a/sr_vvms/la_maint.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_maint.c : License Adm. function completing maintenance commands */
-
-#include "mdef.h"
-#include <climsgdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <rms.h>
-#include "ladef.h"
-#include "la_io.h"
-#include "la_writepak.h"
-
-#define B    (e==CLI$_NORMAL||e==SS$_NORMAL)
-#define OK   (rep[0]=='Y' || rep[0]=='T' || rep[0]=='1')
-#define QUIT (rep[0]=='Q')
-
-int la_maint (void)
-{
-        int4	cli$get_getvalue();
-
-	error_def(LA_NOCNFDB) ;
-	error_def(LA_VOID) ;
-	error_def(LA_VOIDED) ;
-	error_def(LA_EMPTY)  ;
-	int e ;
- 	unsigned short w ;
-	bool voi,cli;					/* a license voided */
-	char com[64] ;					/* command 	    */
-	char io[64]= "PAK.LIS" ;			/* io file name     */
-	char rep[64] ;					/* reply	    */
-
-        $DESCRIPTOR (dentv,"$VERB");
-        $DESCRIPTOR (dcom,com);
-        $DESCRIPTOR (denti,"io");
-        $DESCRIPTOR (dio,io);
-
-	uint4 kid ;				/* virt. keyb. ID  */
-
-	la_prolog *prol;				/* db prolog	     */
-	char *h	;					/* data base 	     */
-	pak  *p ;					/* pak record	     */
-	pak q[PBUF] ;					/* pak pattern       */
-	int v[32] ;					/* qualif. variables */
-	int   n,k ;					/* pak rec count     */
-	struct FAB f ;
-	struct RAB r ;
-
-	e= smg$create_virtual_keyboard(&kid) ; if (!B) lib$signal(e) ;
-        e= cli$get_value(&dentv,&dcom,&w)    ; if (!B) lib$signal(e) ;
-        com[w]= 0;
-
-	cli = la_getcli(v,q) ;
-	denti.dsc$w_length= 2 ;
-	e= cli$present(&denti) ;
-	if B
-	{
-		e= cli$get_value(&denti,&dio,&w);
-	        io[w]= 0;
-	}
-	la_puthead(q)  ;			/* pak pattern filled in  */
-	if ((h= la_getdb(LADB))==NULL)
-	{
-		lib$signal(LA_NOCNFDB) ;
-	}
-	prol= h ;
-	p= h + SIZEOF(la_prolog) ;
-
-	if ((com[0]=='S')||(com[0]=='s')) {
-	  $DESCRIPTOR (head1, "PAK #   Product  Created on  Created by    Customer name");
-	  $DESCRIPTOR (head2, "-----   -------  ----------- ------------  -------------------------------------");
-	  lib$put_output (&head1);
-	  lib$put_output (&head2);
-	}
-
-	n= 0 ;
-	voi= FALSE ;
-	rep[0]= 0 ;
-	while (n != prol->N && !QUIT)
-	{
-		if ((!cli && n==prol->N-1) || (cli && la_match(p,q,v)))
-		{
-			switch ((com[0]>='a' ? com[0]-32 : com[0]))
-			{
-			case 'L' : la_listpak(p) ;
-				   break ;
-			case 'P' : e= vcreat(io,&f,&r,0) ; if (!B) lib$signal(e) ;
-				   la_writepak(&r,p) ;
-				   bclose(&f) ;
-				   break ;
-			case 'S' : la_showpak(p);
-				   break;
-			case 'V' : la_listpak(p) ;
-				   la_putmsgu(LA_EMPTY, 0, 0);
-				   rep[0]= 0 ;
-				   la_getstr(kid,LA_VOID,rep,0,32) ;
-				   rep[0]= (rep[0]>='a' ? rep[0]-32 : rep[0]) ;
-				   if (OK)
-				   {
-					for (k= 0;k!=16;k++) p->ph.cs[k]= '0' ;
-				        la_putmsgu(LA_VOIDED,0,0) ;
-					voi= TRUE ;
-				   }
-				   break ;
-			otherwise: ;
-			}
-		}
-		n++ ;
-		p = (char *)p + p->ph.l[0] ;
-	}
-	if (voi)
-	{
-		la_putdb(LADB,h) ;
-	}
-	la_freedb(h) ;
-	return e ;
-}
diff --git a/sr_vvms/la_match.c b/sr_vvms/la_match.c
deleted file mode 100644
index 5da0ae3..0000000
--- a/sr_vvms/la_match.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <strdef.h>
-#include <descrip.h>
-
-#include "gtm_string.h"
-#include "ladef.h"
-#include "gtm_caseconv.h"
-
-/* la_match.c:	for two paks pak_ptr0, pak_ptr1 and array of qualified variables computes
-		true of "pak pak_ptr0 matches the pattern pak_ptr1" on qualified variables
-   used in   :	la_maint.c
-*/
-#define point(a, b) {	a[v_n] = &(b->ph.n); a[v_cs] = b->ph.cs; a[v_l] = b->ph.l;\
-			a[v_std] = &(b->pf.std[1]); a[v_oid] = b->pf.oid; a[v_L] = &(b->pd.L);\
-			a[v_nam] = b->pd.nam; a[v_ver] = b->pd.ver; a[v_x] =   &(b->pd.x);\
-			a[v_t0] = &(b->pd.t0[1]); a[v_t1] = &(b->pd.t1[1]); a[v_lid] = &(b->pd.lid);\
-			a[v_sid] = (char *)b + b->ph.l[3]; \
-			a[v_nid] = (char *)b + b->ph.l[4]; \
-			a[v_adr] = (char *)b + b->ph.l[5]; \
-			a[v_com] = (char *)b + b->ph.l[6]; }
-
-bool la_match(pak *pak_ptr0, pak *pak_ptr1, int v_arr[])
-/* pak_ptr0 - pak		*/
-/* pak_ptr1 - pak pattern	*/
-/* v_arr - qualified variables	*/
-{
-	bool	match;
-	char	*padr;			/* address lines		*/
-	char	*ppt[16];		/* pointers to pak variables	*/
-	char	*qpt[16];		/* pointers to pattern var	*/
-	char	*can;			/* string to match		*/
-	char	*pat = NULL;		/* match pattern		*/
-	char	buf[128];
-	short	cnt;
-	int4	str$match_wild();
-	int4	status;
-	varid	var;			/* variable ident (enum type)	*/
-	VARTYP	(type);			/* variable type - ladef	*/
-	$DESCRIPTOR(dpat, pat);
-	$DESCRIPTOR(dbuf, buf);
-
-	point(ppt, pak_ptr0);
-	point(qpt, pak_ptr1);
-	var = v_n;
-	match = ('0' != pak_ptr0->ph.cs[0]) || (1 == v_arr[v_cs]);
-	while ((var != eovar) && match)
-	{
-		if (1 == v_arr[var])
-		{
-			switch (type[var])
-			{
-				case str:	dpat.dsc$a_pointer = qpt[var];
-						dpat.dsc$w_length = (short)strlen(qpt[var]);
-						dbuf.dsc$w_length = cnt = strlen(ppt[var]);
-						lower_to_upper(buf, ppt[var], cnt);
-						match = STR$_MATCH == str$match_wild(&dbuf, &dpat);
-						break;
-				case sho:	match = *(short *)ppt[var] == *(short *)qpt[var];
-						break;
-				case lon:	match = *(int4 *)ppt[var] == *(int4 *)qpt[var];
-						break;
-				case hex:	match = *(int4 *)ppt[var] == *(int4 *)qpt[var];
-						break;
-				case dat:	match = *(uint4 *)ppt[var] >= *(uint4 *)qpt[var] || (0 == *(int4 *)ppt[var]);
-						break;
-				case lst:	match = FALSE;
-						for (cnt = 0;  !match && (cnt < pak_ptr0->pd.L);  cnt++)
-						{
-							match = *(int4 *)ppt[var] == *(int4 *)qpt[var];
-							ppt[var] += SIZEOF(int4);
-						}
-						break;
-				otherwise:	break;
-			}
-		}
-		var++;
-	}
-	return match;
-}
diff --git a/sr_vvms/la_mdl2nam.c b/sr_vvms/la_mdl2nam.c
deleted file mode 100644
index fb645da..0000000
--- a/sr_vvms/la_mdl2nam.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_mdl2nam.c : hardware model converted to hardware name
-   used in      : la_edit.c, lm_edit.c, la_listpak.c, lm_listpak.c
-*/
-#include "mdef.h"
-#include "ladef.h"
-
-#define HWSIZ 185
-typedef struct
-{
-	char	nam[HWLEN];
-} hw_model;
-
-readonly hw_model hw_name[HWSIZ] =
-	{ "\0", "V780", "V782", "V750", "V730", "V785", "VUV1", "VWS1", "VUV2", "VWS2", "VWSD", "V8600", "V8650", "V8200", "V8300",
-	"V8530", "V8550", "V8700", "V8800", "VWS2000", "VUV2000", "VWSD2000", "V009", "V8250", "V8350", "V3600", "V3600W",
-	"V3600D", "V6210", "V3820", "V3520L", "V8840", "V9RR", "VUV2_S", "VUV2_J", "VWS2_T", "VWS2_J", "VWSD_T", "VWSD_J",
-	"VUV2000_S", "VUV2000_J", "VWS2000_T", "VWS2000_J", "VWSD2000_T", "VWSD2000_J", "V3600_S", "V3600_J", "V3600W_T",
-	"V3600W_J", "V3600D_T", "V3600D_J", "V3820_S", "V3820_J", "V3820L_T", "V3520L_J", "V8250L", "V8250L_J", "VCV", "VCVWS",
-	"VCVWSD", "VCV_S", "VCV_J", "VCVWS_T", "VCVWS_J", "VCVWSD_T", "VCVWSD_J", "V8500", "V8370", "V8650P", "V6220", "V6230",
-	"V6240", "V6250", "V6260", "V6270", "V6280", "V6215", "V6225", "V6235", "V6245", "V6255", "V6265", "V6275", "V6285",
-	"V8810", "V8820", "V8830", "V3400", "V3400W", "V3400D", "V3400_S", "V3400_J", "V3400W_T", "V3400W_J", "V3400D_T",
-	"V3400D_J", "VUV2000_O", "VWS2000_O", "VWSD2000_O", "VWSK2000", "V6210_S", "V6220_S", "V6230_S", "V6240_S", "V6250_S",
-	"V6260_S", "V6270_S", "V6280_S", "V6310_S", "V6320_S", "V6330_S", "V6340_S", "V6350_S", "V6360_S", "V6370_S", "V6380_S",
-	"V6200_J", "V6300_J", "V3900", "V3900_S", "V3900D", "V3900D_T", "V3900_J", "V3900D_J", "V2000A", "V2000A_S", "V2000AW",
-	"V2000AD", "V2000AW_T", "V2000AD_T", "V2000A_J", "V2000AW_J", "V2000AD_J", "V3840", "V3840_S", "V3540L", "V3840L_T",
-	"V3860", "V3860_S", "V3560L", "V3860L_T", "V3880", "V3880_S", "V3580L", "V3880L_T", "V38A0", "V38A0_S", "VPV", "VPVWS",
-	"VPVWSD", "VPV_S", "VPV_J", "VPVWS_T", "VPVWS_J", "VPVWSD_T", "VPVWSD_J", "VTM", "VTM_S", "VTM_J", "V9RR10_T", "V9RR20_T",
-	"V9RR30_T", "V9RR40_T", "V9RR50_T", "V9RR60_T", "V9RR70_T", "V9RR80_T", "V9RR10_S", "V9RR20_S", "V9RR30_S", "V9RR40_S",
-	"V9RR50_S", "V9RR60_S", "V9RR70_S", "V9RR80_S", "V9RR10_J", "Vxxx10", "Vxxx20", "Vyyy10", "Vyyy20", "Vyyy30", "Vyyy40",
-	"V6305E_T", "V6305E_S", "V6305E_J" };
-
-short la_mdl2nam (nam,mdl)
-char	nam[] ;					/* returns - hw. name	*/
-int4	mdl ;					/* hw. model		*/
-{
-	int 	k ;
-	short 	w ;
-	static readonly char x[17] = "0123456789ABCDEF" ;
-
-	if (mdl>=HWSIZ)
-	{
-		nam[0] = '0' ; nam[1] = 'x' ;
-		k = 8 ;
-		while (k!=0)
-		{
-			k-- ;
-			nam[k+2] = x[mdl%16] ;
-			mdl = mdl>>4 ;
-		}
-		w = 10 ;
-	}
-	else
-	{
-		k = mdl;
-		w = 0 ;
-		while (hw_name[k].nam[w]!=0)
-		{
-			nam[w] = hw_name[k].nam[w] ;
-			w++ ;
-		}
-	}
-	nam[w] = 0 ;
-	return w ;
-}
diff --git a/sr_vvms/la_nam2mdl.c b/sr_vvms/la_nam2mdl.c
deleted file mode 100644
index 802d8a7..0000000
--- a/sr_vvms/la_nam2mdl.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_nam2mdl.c : hardware name converted to hardware model
-   used in      : la_edit.c, lm_edit.c
-*/
-#include "mdef.h"
-#include "ladef.h"
-
-#define HWSIZ	212
-typedef struct
-{
-	char	nam[HWLEN] ;		/* model name	  */
-	short	mdl        ;		/* hardware model */
-} hw_model ;
-readonly hw_model hw[HWSIZ]=
-       {{"\0",0},
-	{"V780",         1}, {"V782",         2}, {"V750",         3}, {"V730",         4}, {"V785",         5},
-	{"VUV1",         6}, {"VWS1",         7}, {"VUV2",         8}, {"VWS2",         9}, {"VWSD",        10},
-	{"V8600",       11}, {"V8650",       12}, {"V8200",       13}, {"V8300",       14}, {"V8530",       15},
-	{"V8550",       16}, {"V8700",       17}, {"V8800",       18}, {"VWS2000",     19}, {"VUV2000",     20},
-	{"VWSD2000",    21}, {"V009",        22}, {"V8250",       23}, {"V8350",       24}, {"V3600",       25},
-	{"V3600W",      26}, {"V3600D",      27}, {"V9CC",        28}, {"V6210_T",     28}, {"V6210",       28},
-	{"V3820",       29}, {"V3520L",      30}, {"V8PS",        31}, {"V8840",       31}, {"V9RR",        32},
-	{"VUV2_S",      33}, {"VUV2_J",      34}, {"VWS2_T",      35}, {"VWS2_J",      36}, {"VWSD_T",      37},
-	{"VWSD_J",      38}, {"VUV2000_S",   39}, {"VUV2000_J",   40}, {"VWS2000_T",   41}, {"VWS2000_J",   42},
-	{"VWSD2000_T",  43}, {"VWSD2000_J",  44}, {"V3600_S",     45}, {"V3600_J",     46}, {"V3600W_T",    47},
-	{"V3600W_J",    48}, {"V3600D_T",    49}, {"V3600D_J",    50}, {"V3820_S",     51}, {"V3820_J",     52},
-	{"V3820L_T",    53}, {"V3520L_J",    54}, {"V8250L",      55}, {"V8250L_J",    56}, {"VCV",         57},
-	{"VCVWS",       58}, {"VCVWSD",      59}, {"VCV_S",       60}, {"VCV_J",       61}, {"VCVWS_T",     62},
-	{"VCVWS_J",     63}, {"VCVWSD_T",    64}, {"VCVWSD_J",    65}, {"V8500",       66}, {"V8370",       67},
-	{"V8650P",      68}, {"V6220_T",     69}, {"V6220",       69}, {"V6230_T",     70}, {"V6230",       70},
-	{"V6240_T",     71}, {"V6240",       71}, {"V6250_T",     72}, {"V6250",       72}, {"V6260_T",     73},
- 	{"V6260",       73}, {"V6270_T",     74}, {"V6270",       74}, {"V6280_T",     75}, {"V6280",       75},
-	{"V6310_T",     76}, {"V6215",       76}, {"V6320_T",     77}, {"V6225",       77}, {"V6330_T",     78},
-	{"V6235",       78}, {"V6340_T",     79}, {"V6245",       79}, {"V6350_T",     80}, {"V6255",       80},
-	{"V6360_T",     81}, {"V6265",       81}, {"V6370_T",     82}, {"V6275",       82}, {"V6380_T",     83},
-	{"V6285",       83}, {"V8810",       84}, {"V8820",       85}, {"V8830",       86}, {"V3400",       87},
-	{"V3400W",      88}, {"V3400D",      89}, {"V3400_S",     90}, {"V3400_J",     91}, {"V3400W_T",    92},
-	{"V3400W_J",    93}, {"V3400D_T",    94}, {"V3400D_J",    95}, {"VUV2000_O",   96}, {"VWS2000_O",   97},
-	{"VWSD2000_O",  98}, {"VWSK2000",    99}, {"V6210_S",    100}, {"V6220_S",    101}, {"V6230_S",    102},
-	{"V6240_S",    103}, {"V6250_S",    104}, {"V6260_S",    105}, {"V6270_S",    106}, {"V6280_S",    107},
-	{"V6310_S",    108}, {"V6215_S",    108}, {"V6320_S",    109}, {"V6225_S",    109}, {"V6330_S",    110},
-	{"V6235_S",    110}, {"V6340_S",    111}, {"V6245_S",    111}, {"V6350_S",    112}, {"V6255_S",    112},
-	{"V6360_S",    113}, {"V6265_S",    113}, {"V6370_S",    114}, {"V6275_S",    114}, {"V6380_S",    115},
-	{"V6285_S",    115}, {"V6200_J",    116}, {"V6300_J",    117}, {"V6205_J",    117}, {"V3900",      118},
-	{"V3900_S",    119}, {"V3900D",     120}, {"V3900D_T",   121}, {"V3900_J",    122}, {"V3900D_J",   123},
-	{"V2000A",     124}, {"V2000A_S",   125}, {"V2000AW",    126}, {"V2000AD",    127}, {"V2000AW_T",  128},
-	{"V2000AD_T",  129}, {"V2000A_J",   130}, {"V2000AW_J",  131}, {"V2000AD_J",  132}, {"V3840",      133},
-	{"V3840_S",    134}, {"V3540L",     135}, {"V3840L_T",   136}, {"V3860",      137}, {"V3860_S",    138},
-	{"V3560L",     139}, {"V3860L_T",   140}, {"V3880",      141}, {"V3880_S",    142}, {"V3580L",     143},
-	{"V3880L_T",   144}, {"V38A0",      145}, {"V38A0_S",    146}, {"VPV",        147}, {"VPVWS",      148},
-	{"VPVWSD",     149}, {"VPV_S",      150}, {"VPV_J",      151}, {"VPVWS_T",    152}, {"VPVWS_J",    153},
-	{"VPVWSD_T",   154}, {"VPVWSD_J",   155}, {"VTM",        156}, {"VTM_S",      157}, {"VTM_J",      158},
-	{"V9RR10_T",   159}, {"V9RR20_T",   160}, {"V9RR30_T",   161}, {"V9RR40_T",   162}, {"V9RR50_T",   163},
-	{"V9RR60_T",   164}, {"V9RR70_T",   165}, {"V9RR80_T",   166}, {"V9RR10_S",   167}, {"V9RR20_S",   168},
-	{"V9RR30_S",   169}, {"V9RR40_S",   170}, {"V9RR50_S",   171}, {"V9RR60_S",   172}, {"V9RR70_S",   173},
-	{"V9RR80_S",   174}, {"V9RR10_J",   175}, {"Vxxx10",     176}, {"Vxxx20",     177}, {"Vyyy10",     178},
-	{"Vyyy20",     179}, {"Vyyy30",     180}, {"Vyyy40",     181}, {"V6305E_T",   182}, {"V6305E_S",   183},
-	{"V6305E_J",   184}};
-
-bool la_nam2mdl (
-int4	*mdl ,						/* returns - hw. model	*/
-short	w ,						/* nam length		*/
-char	nam[] )						/* hardware name	*/
-{
-	int 	k,j ;
-	bool	match ;
-
-	if (w>=2 && nam[0]=='0' && nam[1]=='X' )	/* name is hex number	*/
-	{
-		match = lib$cvt_htb((int4)(w-2),nam+2,mdl) ;
-	}
-	else						/* name is string V...	*/
-	{
-		match = (w==0) ; k = 1 ;
-		while (!match && k!=HWSIZ)
-		{
-			j = 0 ;
-			while (j!=w && hw[k].nam[j]==nam[j])
-			{
-				j++ ;
-			}
-			match = ((j==w) && (hw[k].nam[w]==0)) ;
-			k++ ;
-		}
-		*mdl = hw[k-1].mdl ;
-	}
-	return match ;
-}
diff --git a/sr_vvms/la_putdb.c b/sr_vvms/la_putdb.c
deleted file mode 100644
index 18ae687..0000000
--- a/sr_vvms/la_putdb.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_putdb : stores entire license data base from the main store back in db file */
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include <rms.h>
-#include "ladef.h"
-#include "la_io.h"
-
-#define B (e==SS$_NORMAL || e==RMS$_NORMAL)
-
- void la_putdb (char *fn,char *h)
-/* fn - data base file name  */
-/* h  - data base	*/
-{
- 	struct FAB f,fd ;			/* file access block    */
- 	struct RAB r,rd ;			/* record access block  */
-	struct XABFHC x ;			/* file header 		*/
-	struct NAM nam, nam2;
-	struct XABPRO xab, xab2;
-
-	int sys$erase() ;
-
-	int e,len ;
-	la_prolog *prol ;			/* data base prolog 	*/
-	char *p ;
-
-	nam2 = cc$rms_nam;
-	breopen(fn,&fd,&rd,&x,&nam2);		/* this should actually be "reopen" */
-	nam = cc$rms_nam;
-	e= bcreat(fn,&f,&r,&nam,&xab,ALOC) ; if (!B) lib$signal(e) ;
-	if B
-	{
-		p= prol= h ;
-		len= prol->len ;		/* file length in bytes */
-		while (B && len>0 )
-		{
-			e   =  bwrite(&r,p,BLKS) ;
-			p   += BLKS ;
-			len -= BLKS ;
-		}
-		bclose(&f) ;
-		if (!B)
-		{
-			lib$signal(e) ;
-		}
-		else
-		{
-#if 0
-			bdelete(&fd,&xab2,&nam2);	/* delete old config file */
-#else
-			bdelete(&fd,&xab2);	/* delete old config file */
-#endif
-		}
-	}
-	else
-	{
-		lib$signal(e) ;
-	}
-}
diff --git a/sr_vvms/la_putfldr.c b/sr_vvms/la_putfldr.c
deleted file mode 100644
index 1f0be92..0000000
--- a/sr_vvms/la_putfldr.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_putfldr.c : fills the pak folder in
-   used in      : la_create.c
-*/
-
-#include <ssdef.h>
-#include "mdef.h"
-#include <jpidef.h>
-#include "ladef.h"
-#include <descrip.h>
-#define B (e==SS$_NORMAL)
-
-void la_putfldr ( pfldr *pf )
-{
-	$DESCRIPTOR(doid,&(pf->oid))  ;
-	int sys$gettim();
-	int   e ;
-	short w ;
-	int4 item= JPI$_USERNAME ;
-
-	e= sys$gettim(&(pf->std)) ;
-	if (!B) lib$signal(e) ;
-
-	doid.dsc$w_length= 16 ;
-	e= lib$getjpi(&item,0,0,0,&doid,&w) ;
-	if B (pf->oid)[w]= 0  ;
-	else lib$signal(e)    ;
-}
diff --git a/sr_vvms/la_puthead.c b/sr_vvms/la_puthead.c
deleted file mode 100644
index 563e076..0000000
--- a/sr_vvms/la_puthead.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_puthead.c : fills pak header in
-   used in      : la_create.c
-*/
-#include "mdef.h"
-#include "gtm_string.h"
-#include "ladef.h"
-
-void la_puthead (p)
-pak *p ; 						/* pak data 	  */
-{
-	int k,u,w ;
-	char *padr ;
-
-	p->ph.l[1]= SIZEOF(phead) ;                    	/* offset to pfldr */
-	p->ph.l[2]= p->ph.l[1] + SIZEOF(pfldr) ;        /* offset to pdata */
-	p->ph.l[3]= p->ph.l[2] + SIZEOF(pdata) ;	/* offset to psid  */
-	p->ph.l[4]= p->ph.l[3] + SIZEOF(int4)*(p->pd.L);/* offset to pnid  */
-	p->ph.l[5]= p->ph.l[4] + SIZEOF(int4)*(p->pd.L);/* offset to padr  */
-
-	padr= (char*)p + p->ph.l[5] ;
-	w= u= 0 ;
-	for (k= 0;k!=5;k++)
-	{
-		u= strlen(padr) ;
-		padr += u + 1 ;
-		w += u + 1 ;
-	}
-	p->ph.l[6]= p->ph.l[5] + w ;      		/* offset to pcom  */
-	p->ph.l[0]= p->ph.l[6] + strlen(padr) ;		/* offset to next  */
-}
diff --git a/sr_vvms/la_putline.c b/sr_vvms/la_putline.c
deleted file mode 100644
index a3e035d..0000000
--- a/sr_vvms/la_putline.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_putline : writes message supplied by sys$putmsg to file given by its RAB
-   used in    : la_fputmsgu.c
- */
-
-#include "mdef.h"
-#include <rms.h>
-#include <descrip.h>
-#include "la_io.h"
-
-int la_putline (
- struct dsc$descriptor *line ,
- struct RAB *rab )
-{
-	int4 status ;
-	status=  bwrite(rab,line->dsc$a_pointer,line->dsc$w_length) ;
-	if ((status & 1)==0)
-	{
-		lib$signal(status) ;
-	}
-	return 0 ;
-}
diff --git a/sr_vvms/la_putline.h b/sr_vvms/la_putline.h
deleted file mode 100644
index 83ecfc6..0000000
--- a/sr_vvms/la_putline.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __LA_PUTLINE_H__
-#define __LA_PUTLINE_H__
-
-int la_putline ( struct dsc$descriptor *line , struct RAB *rab );
-
-#endif
diff --git a/sr_vvms/la_putmsgs.c b/sr_vvms/la_putmsgs.c
deleted file mode 100644
index a3400e5..0000000
--- a/sr_vvms/la_putmsgs.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "msg.h"
-
-/* la_putmsgs.c : outputs the message for the system status code */
-
- void la_putmsgs(c)
- int c ;
- {
-	int k,e ;
-	msgtype msgvec;
-
-	msgvec.arg_cnt = 1;
-	msgvec.def_opts = 0x000F;
-	msgvec.msg_number = c;
-	msgvec.fp_cnt = msgvec.new_opts = 0;
-	sys$putmsg(&msgvec) ;
- }
diff --git a/sr_vvms/la_putmsgu.c b/sr_vvms/la_putmsgu.c
deleted file mode 100644
index 7dd7b79..0000000
--- a/sr_vvms/la_putmsgu.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_putmsgu.c : outputs and formats message for user message code
-		  and user FAO arguments
- */
-#include "mdef.h"
-
-#include <ssdef.h>
-
-void la_putmsgu (c, fao, n)
-int4	c ;				/* message code		    */
-int4	fao[] ;				/* fao arguments	    */
-short	n ;				/* number of fao args	    */
-{
-	int	k, local_n;
-	struct { short	argc;		/* structure longword count */
-                 short	opt;		/* message display options  */
-                 int4	code;		/* message code 	    */
-	         short	count;		/* FAO count    	    */
-	         short	newopt;		/* new options  	    */
-	         int4	fao[16];	/* fao arguments	    */
-               } msgvec ;
-
-	local_n = n;
-	if (local_n < 0)
-		local_n = 0;
-	if (local_n > 15)
-		local_n = 15;
-
-	msgvec.argc   = local_n + 2;	/* number of longwords (excluding argc, opt) */
-	msgvec.opt    = 0x0001;	/* include message text; do not include mnemonic name, severity level, or facility prefix */
-	msgvec.code   = c;
-	msgvec.count  = local_n;
-	msgvec.newopt = msgvec.opt;	/* no change */
-
-	for (k = 0;  k < local_n;  k++)
-		msgvec.fao[k] = fao[k];
-	sys$putmsg(&msgvec) ;
-}
diff --git a/sr_vvms/la_showpak.c b/sr_vvms/la_showpak.c
deleted file mode 100644
index 681b046..0000000
--- a/sr_vvms/la_showpak.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_showpak.c: shows pak summary to stdout
-   js / 20-sep-1989
- */
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "gtm_string.h"
-#include "ladef.h"
-
-void la_showpak (q)
-char *q ;                               /* buffer with the pak record 	*/
-{
-	pak	*p ;			/* pak record 		*/
-	char	*padr ;			/* pak address		*/
-	$DESCRIPTOR(faoctl, "!5SL!AS  !8AD !11%D !12AD  !37AD");
-	char	line[256];
-	int4	length;
-	char	status[2] = " ";
-	$DESCRIPTOR(linedesc, line);
-	$DESCRIPTOR(dstatus, status);
-	int4	today, exday;
-
-	p= q ;
-	padr= q + p->ph.l[5] ;
-
-	if (p->pd.t1[1]!=0) {
-	  lib$day (&today, 0);
-	  lib$day (&exday, p->pd.t1);
-	  if (today > exday) status[0] = '+';
-	}
-
-	if (p->ph.cs[0]=='0')
-	  if (status[0]=='+')
-	    status[0] = '%';
-	  else
-	    status[0] = '*';
-
-	sys$fao (&faoctl, &length, &linedesc, p->pd.lid, &dstatus, LEN_AND_STR(p->pd.nam), &(p->pf.std),
-		 LEN_AND_STR(p->pf.oid), LEN_AND_STR(padr));
-	linedesc.dsc$w_length = length;
-	lib$put_output (&linedesc);
-
-	return;
-}
diff --git a/sr_vvms/la_store.c b/sr_vvms/la_store.c
deleted file mode 100644
index 45a8941..0000000
--- a/sr_vvms/la_store.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "ladef.h"
-#include "lmdef.h"
-
-#include <ssdef.h>
-#include <climsgdef.h>
-#include <descrip.h>
-
-/* la_store.c : License Administration function for creating new licenses
-		from DCL command procedures
-   used in    : license_adm.c
-*/
-
-int la_store(void)
-{
-	char		rp[32];			/* operator reply	*/
-	char		*c_ptr;			/* db in main store	*/
-	int4		status;
-	uint4		bcs[3] = {0, 0, 0};
-	int		v_arr[32];
-	int		toupper();
-	pak		*pak_ptr;			/* pak record		*/
-	la_prolog	*prol;			/* db file prolog	*/
-
-	error_def(LA_NOCNFDB);			/* No license created	*/
-	error_def(LA_NEWCNF);			/* New license created	*/
-	error_def(LA_BADENCR);
-
-	if (NULL == (c_ptr = la_getdb(LADB)))	/* db in main storage	*/
-		lib$signal(LA_NOCNFDB);
-	prol = c_ptr;
-	pak_ptr = (char *)c_ptr + prol->len;		/* place for new pak	*/
-	la_initpak(prol->lastid, pak_ptr);		/* pak initialized	*/
-	la_getcli(v_arr, pak_ptr);
-	la_puthead(pak_ptr);
-	la_putfldr(&(pak_ptr->pf));
-	if (!la_encryt(pak_ptr->ph.n, &(pak_ptr->pd), (pak_ptr->ph.l[4] - pak_ptr->ph.l[2]), bcs))
-		lib$signal(LA_BADENCR);
-	else
-		la_convert(pak_ptr->ph.cs, bcs);
-	la_listpak(pak_ptr);
-	(prol->N)++;				/* count of paks++	*/
-	prol->len += pak_ptr->ph.l[0];		/* db file size++	*/
-	prol->lastid = pak_ptr->pd.lid;		/* new last license ID	*/
-	la_putdb(LADB, c_ptr);			/* db back to file	*/
-	lm_putmsgu(LA_NEWCNF, 0, 0);
-	la_freedb(c_ptr);
-	return (SS$_NORMAL);
-}
diff --git a/sr_vvms/la_uniqlid.c b/sr_vvms/la_uniqlid.c
deleted file mode 100644
index 17f6813..0000000
--- a/sr_vvms/la_uniqlid.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_uniqlid.c : uniqlid == license ID is unique in the data base
-   used         : la_create.c
-*/
-
-#include "mdef.h"
-#include "ladef.h"
-
-bool la_uniqlid (char *h,int4 lid)
-/*
-h - data base
-id -license ID
-*/
-{
-
-	error_def(LA_NOTUNIQ) ;
-	bool unique ;
-	int n ;
-	la_prolog *prol;				/* db prolog	 */
-	pak  *p ;					/* pak record	 */
-
-	prol= h ;
-	p= h + SIZEOF(la_prolog) ;
-
-	n= 0 ;
-	unique= TRUE ;
-	while (unique && n!=prol->N)
-	{
-		unique= (p->pd.lid!=lid) ;
-		n++ ;
-		p = (char *)p + p->ph.l[0] ;
-	}
-	if (!unique)
-	{
-		la_putmsgu(LA_NOTUNIQ,0,0) ;
-	}
-	return(unique);
-}
diff --git a/sr_vvms/la_validate.c b/sr_vvms/la_validate.c
deleted file mode 100644
index cdf3c35..0000000
--- a/sr_vvms/la_validate.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_validate.c: valid == 'val is in the message string given by code'
-   used in      : la_edit.c
-*/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include "ladef.h"
-#include <descrip.h>
-#include "gtm_string.h"
-#define B (e==SS$_NORMAL)
-
-bool la_validate (int4 code,char *val)
-/*
-int4 code ;				mes. code for validation str
-char *val ;                          	validated value
-*/
-{
-	int sys$getmsg() ;
-
-	error_def(LA_CHOOSE) ;		/* Choose a value from the list	*/
-	char buf[256] ;			/* list of valid values 	*/
-	$DESCRIPTOR(dbuf,buf) ;
-
-	unsigned short w ;		/* res. string length   */
-	int e,k,n,len    ;
-	bool valid,prop  ;
-
-	dbuf.dsc$w_length= 256 ;
-	e= sys$getmsg(code,&w,&dbuf,1,0)  ; if (!B) lib$signal(e) ;
-
-	len= strlen(val) ;
-	n= 0 ; prop= TRUE ; valid= (n==len) ;
-	while(!valid && n<w)
-	{
-		if (prop)
-		{
-			k= 0 ; valid= TRUE ;
-			while(valid && n!=w && buf[n]!=',')
-			{
-				valid= (buf[n]==val[k]) ;
-				n++ ; k++ ;
-			}
-			valid= (valid && k==len) ;
-		}
-		prop= (buf[n]==',') ;
-		n++ ;
-	}
-	if (!valid)
-	{
-		la_putmsgu(LA_CHOOSE,0,0) ;
-		la_putmsgu(code,0,0) ;
-	}
-	return(valid) ;
-}
diff --git a/sr_vvms/la_writepak.c b/sr_vvms/la_writepak.c
deleted file mode 100644
index 354f8a2..0000000
--- a/sr_vvms/la_writepak.c
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* la_writepak.c: writes a pak record to a file
-   used in      : la_maint.c
- */
-
-#include "mdef.h"
-#include <rms.h>
-#include "gtm_string.h"
-#include "ladef.h"
-#include "la_fputmsgu.h"
-#include "la_writepak.h"
-
-void la_writepak (struct FAB *f,pak *p)
-/*
-struct FAB *f ;				output file
-pak *p ;                                pak record
-*/
-{
-
-	int4 *psid ;			/* pak SIDs             */
-	int4 *pnid ;			/* pak NIDs		*/
-	char *padr ;			/* pak address		*/
-	char *pcom ;			/* pak comment 		*/
-
-	int4 	fao[16] ;		/* fao arguments	*/
-	int4	mdl ;
-	int 	k, j ;
-	short	w ;
-	char	buf[32] ;
-	char	hex[8] ;		/* hex version of hw. mdl */
-	static readonly char x[17] = "0123456789ABCDEF" ;
-
-	error_def(LA_NAM) ;	/* Product           */
-	error_def(LA_VER) ;	/* Version           */
-	error_def(LA_X) ;	/* License value     */
-	error_def(LA_PX) ;	/* Unlimited license */
-	error_def(LA_T0) ;	/* Date available    */
-	error_def(LA_T1) ;	/* Date expires      */
-	error_def(LA_PT0) ;	/* Date available    */
-	error_def(LA_PT1) ;	/* Date expires      */
-	error_def(LA_LID) ;	/* License ID        */
-	error_def(LA_L) ;	/* Number of systems */
-	error_def(LA_SIDX) ;	/* Hw mdl, with hex  */
-	error_def(LA_PSID) ;	/* Hw mdl. unlimited */
-	error_def(LA_CS) ;	/* Check sum         */
-
-	error_def(LA_PAKHD) ;	/* PAK header        */
-	error_def(LA_ISSUR) ;	/* Issuer name, addr */
-	error_def(LA_ISSUE) ;	/* headings	     */
-	error_def(LA_ISSDT) ;	/* Issue date	     */
-	error_def(LA_ISADR) ;	/* Customer name,adr */
-	error_def(LA_DELIM) ;	/* page delimiter    */
-	error_def(LA_EMPTY) ;	/* empty line	     */
-
-	psid= (char *)p + p->ph.l[3] ;
-	pnid= (char *)p + p->ph.l[4] ;
-	padr= (char *)p + p->ph.l[5] ;
-
-	la_fputmsgu(f,LA_PAKHD,0,0) ;
-	la_fputmsgu(f,LA_ISSUR,0,0) ;
-	la_fputmsgu(f,LA_ISSUE,0,0) ;
-	fao[0]= 0 ;				/* outputs current time */
-	fao[0] = &(p->pf.std);
-	la_fputmsgu(f,LA_ISSDT,fao,1) ;
-
-	for (k= 0;k!=5;k++)
-	{
-		fao[0]= strlen(padr) ; fao[1]= padr ;
-		la_fputmsgu(f,LA_ISADR,fao,3) ;
-		padr= padr + strlen(padr) + 1 ;
-	}
-	la_fputmsgu(f,LA_DELIM,0,0) ;
-
-	fao[0]= strlen(p->pd.nam) ; fao[1]= (p->pd.nam) ;
-	la_fputmsgu(f,LA_NAM,fao,2) ;
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	fao[0]= strlen(p->pd.ver) ; fao[1]= (p->pd.ver) ;
-	la_fputmsgu(f,LA_VER,fao,2) ;
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	if (p->pd.x!=0)			/* job limited license 	*/
-	{
-		la_fputmsgu(f,LA_X,&(p->pd.x),1) ;
-	}
-	else				/* unlimited license  	*/
-	{
-		la_fputmsgu(f,LA_PX,0,0) ;
-	}
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	if (p->pd.t0[1]!=0)		/* available date given */
-	{
-	        fao[0]= &(p->pd.t0) ;
-		la_fputmsgu(f,LA_T0,fao,1) ;
-	}
-	else				/* date not given 	*/
-	{
-		la_fputmsgu(f,LA_PT0,0,0) ;
-	}
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	if (p->pd.t1[1]!=0)		/* available date given */
-	{
-	        fao[0]= &(p->pd.t1) ;
-		la_fputmsgu(f,LA_T1,fao,1) ;
-	}
-	else				/* date not given 	*/
-	{
-		la_fputmsgu(f,LA_PT1,0,0) ;
-	}
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	la_fputmsgu(f,LA_LID,&(p->pd.lid),1) ;
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	la_fputmsgu(f,LA_L,&(p->pd.L),1) ;
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	for (k= 0;k!=(p->pd.L);k++)
-	{
-		if (psid[k]==0)
-		{
-			fao[0] = k ;
-			la_fputmsgu(f,LA_PSID,fao,1) ;
-		}
-		else
-		{	mdl = psid[k] ;
-			w = la_mdl2nam(buf,mdl) ;
-			j = 8 ;
-			while (mdl!=0)
-			{
-				hex[--j] = x[mdl%16] ;
-				mdl >>=4 ;
-			}
-			fao[0] = k ;
-			fao[1] = w ; fao[2] = buf ;
-			fao[3] = 8 - j ; fao[4] = hex+j ;
-			la_fputmsgu(f,LA_SIDX,fao,5) ;
-		}
-	}
-	la_fputmsgu(f,LA_EMPTY,0,0) ;
-	fao[0]= p->ph.n ;
-	fao[1]= fao[3]= fao[5]= fao[7]= 4 ;
-        fao[2]= p->ph.cs ;
-        fao[4]= p->ph.cs +  4 ;
-        fao[6]= p->ph.cs +  8 ;
-        fao[8]= p->ph.cs + 12 ;
-	la_fputmsgu(f,LA_CS,fao,9) ;
-}
diff --git a/sr_vvms/la_writepak.h b/sr_vvms/la_writepak.h
deleted file mode 100644
index 6a6f47b..0000000
--- a/sr_vvms/la_writepak.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __LA_WRITEPAK_H__
-#define __LA_WRITEPAK_H__
-
-void la_writepak (struct FAB *f,pak *p);
-
-#endif
diff --git a/sr_vvms/ladef.h b/sr_vvms/ladef.h
deleted file mode 100644
index 78c85d2..0000000
--- a/sr_vvms/ladef.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* ladef.h - license administration structures */
-#include "mdef.h"
-#include <rms.h>
-
-#define DBID 0x0000FFFF		/* data base file ID		*/
-#define LADB "GTM$LADB"		/* license adm. data base name  */
-#define LMDB "GTM$CNFDB"	/* license man. data base name 	*/
-#define LAHP "GTM$HELP:LA"	/* license adm. help file	*/
-#define LMHP "GTM$HELP:LMU"	/* license man. help file	*/
-#define LMLK "GTM$LM"		/* license n. lock resource	*/
-#define LAFILE "GTM$ROOT:[CUS]LA.DAT"	/* default adm. db file */
-#define LMFILE "GTM$DIST:GTC.CNF"	/* default man. db file	*/
-#define BLKS 512		/* db file record size		*/
-#define ALOC  32		/* initial allocation in blocks */
-
-#define HWLEN 11		/* moved here from obsolete vaxmodel.h */
-
-#define FNAM  64		/* max file name size		*/
-#define PROD  16		/* max lenght of product	*/
-#define VERS  16		/* max length of version	*/
-#define ADDR  64		/* max addr line length		*/
-#define NSYS  32		/* max number of systems	*/
-#define NCRY  10		/* ecrypt. func.# < NCRY	*/
-#define CSLN  21		/* expanded checksum length 	*/
-#define PBUF  (SIZEOF(pak)+8*NSYS+9*ADDR)  /* max size of pak   */
-
-typedef int4 date[2] ;		/* date/time quadword		*/
-
-typedef struct
-{
-	int4  id ; 		/* id == DBID		      	*/
-	int4  N  ;		/* number of paks in the file 	*/
-	int4  len  ;		/* file length in bytes       	*/
-	int4  lastid ;		/* last license ID
-	int4  unused[12] ;	/* not used 		      	*/
-} la_prolog ;			/* prolog to license adm file 	*/
-
-typedef struct
-{
-	short n ;            	/* encryption function number 	*/
-	char cs[18] ;        	/* check sum                  	*/
-	short l[14] ;         	/* offsets within pak         	*/
-} phead ;
-
-typedef struct
-{
-	date std ;		/* data/time pak created      	*/
-	char oid[16] ;		/* operator "USERNAME"        	*/
-} pfldr ;
-
-typedef struct
-{
-	short L ;		/* number of systems   		*/
-	char nam[PROD] ;        /* product name        		*/
-	char ver[VERS] ;        /* version name        		*/
-	short x	;		/* license value      		*/
-	date t0 ;            	/* date available      		*/
-	date t1 ;		/* date expires        		*/
-	int4 lid ;		/* license ID	       		*/
-} pdata ;
-
-typedef struct
-{
-	phead ph ; 		/* pak header                	*/
- 	pfldr pf ;		/* pak folder                	*/
-	pdata pd ;		/* license data              	*/
-} pak ;				/* pak structure is followed 	*/
-                                /* by variable length arrays 	*/
-				/* sid,nid,adr,com           	*/
-
-
-typedef enum			/* variable type		*/
-{
-	str,sho,lon,hex,dat,lst,csm,mdl,list,emp
-} vtyp ;
-
-typedef enum			/* variables identification	*/
-{
-	v_n,v_cs,v_l,v_std,v_oid,v_L,v_nam,v_ver,v_x,v_t0,v_t1,v_lid,v_sid,v_nid,v_adr,v_com,eovar
-} varid ;
-
-#define VARTYP(t) vtyp const t[17]= \
-{	sho,str ,sho,dat  ,str  ,sho,str  ,str  ,sho,dat ,dat ,lon  ,lst  ,lst  ,str  ,str  ,emp	}
-
-bool la_getcli(int v_arr[], pak *pak_ptr);
-bool la_match(pak *pak_ptr0, pak *pak_ptr1, int v_arr[]);
-bool la_nam2mdl(int4 *mdl, short w, char nam[]);
-bool la_uniqlid(char *h, int4 lid);
-bool la_validate(int4 code, char *val);
-char * la_getdb(char *fn);
-char *la_getdb(char *fn);
-short la_getstr(uint4 kid, int4 code, char *res, int lo, int hi);
-short la_mdl2nam(char nam[], int4 mdl);
-void la_convert(int4 bcs[], char *cs);
-void la_edit(uint4 kid, char *h, pak *p);
-void la_freedb(char *h);
-void la_getdat(uint4 kid, int4 code, date *date_ptr, uint4 lo, uint4 hi);
-void la_getnum(uint4 kid, int4 code, int4 *num_ptr, int4 lo, int4 hi);
-void la_initpak(int4 llid, pak *p);
-void la_listpak(char *q);
-void la_putdb(char *fn, char *h);
-void la_putfldr(pfldr *pf);
-void la_puthead(pak *p);
- void la_putmsgs(int c);
-void la_putmsgs(int c);
-void la_putmsgu(int4 c, int4 fao[], short n);
-void la_showpak(char *q);
-void la_writepak(struct FAB *f, pak *p);
-int la_create (void);
-int la_maint (void);
-int la_store(void);
-
-#include <descrip.h>
-
-int4 lp_acquire(pak *p, int4 lval, int4 lid, int4 *lkid);
-int4 lp_confirm(int4 lid, uint4 lkid);
-int4 lp_licensed(char *h, struct dsc$descriptor *prd, struct dsc$descriptor *ver,
-	int4 mdl, int4 nid,int4 *lid, int4 *x, int4 *days, pak *p);
-int4 lp_licensed(char *h, struct dsc$descriptor *prd, struct dsc$descriptor *ver, int4 mdl, int4 nid,
-	int4 *lid, int4 *x, int4 *days, pak *p);
-uint4 lp_id(uint4 *lkid);
-
diff --git a/sr_vvms/laerrors.msg b/sr_vvms/laerrors.msg
deleted file mode 100644
index 103160b..0000000
--- a/sr_vvms/laerrors.msg
+++ /dev/null
@@ -1,89 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001 Sanchez Computer Associates, Inc.	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-	.FACILITY	LMU,240/PREFIX=LA_
-	.TITLE	LAERRORS	 Messages for LMU, VMS EDITION
-DBEXIS  <The configuration database already exists>/fao=1/warning
-NOCNFDB <Invalid or missing configuration database>/fao=0/fatal
-DBINIT	<Configuration database !AD successfully created>/fao=1/success
-INVAL	<                       ^ Invalid value, reenter>/fao=0/warning
-NOTUNIQ <                       ^ Configuration ID not unique>/fao=0/warning
-NOSYS   <Node !AD not available, Please enter the node number - if known>/fao=1/info
-HEAD	<!/*** Product Authorization Key ***!/>/fao=0/info
-NOCNF   <No configuration created>/fao=0/info
-BADENCR	<Bad check sum number>/fao=0/error
-BADCS   <The configuration data is not correct>/fao=0/error
-
-NAM	<* Product             :!AD>/fao=1/info
-VER	<* Version             :!AD>/fao=1/info
-X 	<* Configuration value :!SW>/fao=1/info
-UNLX 	<* Configuration value :Unlimited jobs>/fao=0/info
-T0	<* Activation date     :!11%D>/fao=1/info
-T1	<* Expiration date     :!11%D>/fao=1/info
-UNLT0	<* Activation date     :Not limited>/fao=1/info
-UNLT1	<* Expiration date     :Not limited>/fao=1/info
-LID	<* Configuration ID    :!SL>/fao=1/info
-NID	<* Node number !SL       :!SL>/fao=2/info
-L	<* Number of systems   :!SW>/fao=1/info
-SID    	<* Hardware model !SL    :!AD>/fao=2/info
-SIDX	<* Hardware model !SL    :!AD!2(_)(0x!AD)>/fao=5/info
-UNSID	<* Hardware model !SL    :Not limited >/fao=1/info
-CUST	<* Customer name       :!AD>/fao=1/info
-ADR	<* Address line !SL      :!AD>/fao=2/info
-COM	<* Comment             :!AD>/fao=1/info
-CS	<* Check sum           :!SL-!AD-!AD-!AD-!AD>/fao=5/info
-STD	<* Creation date       :!17%D>/fao=1/info
-OID	<* Operator ID         :!AD>/fao=1/info
-
-PNAM	<* Product             :>/fao=0/info
-PVER	<* Version             :>/fao=0/info
-PX 	<* Configuration value :>/fao=0/info
-PT0	<* Activation date     :>/fao=0/info
-PT1	<* Expiration date     :>/fao=0/info
-PLID	<* Configuration ID    :>/fao=0/info
-PNID	<* Node number    [dec]:>/fao=0/info
-PL	<* Number of systems   :>/fao=0/info
-PSID    <* Hardware model      :>/fao=0/info
-PCUST	<* Customer name       :>/fao=0/info
-PADR1	<* Address line 1      :>/fao=0/info
-PADR2	<* Address line 2      :>/fao=0/info
-PADR3	<* Address line 3      :>/fao=0/info
-PADR4	<* Address line 4      :>/fao=0/info
-PCOM	<* Comment             :>/fao=0/info
-PENC	<* Security function # :>/fao=0/info
-PCS	<* Check sum           :>/fao=0/info
-
-SAVE    <Do you want to save, display again, edit or quit S/D/E/Q [D] ?:>/fao=0/info
-MODCNF	<Configuration modified>/fao=0/success
-NEWCNF	<New configuration stored in database>/fao=0/success
-VOID    <Do you want to void Y/N , or quit Q [N] ?:>/fao=0/info
-VOIDED  <Configuration voided>/fao=0/success
-PAKHD	<!1(/)!3(_)GT.M PRODUCT AUTHORIZATION KEY!2(/)>/fao=0/info
-ISSUR	<Sanchez Computer Associates!/Malvern, PA  19355>/fao=0/info
-ISSUE  	<!2(/)Issued to:!7(_)Issue Date:!/>/fao=0/info
-ISSDT	<!8(_)!11%D>/fao=1/info
-ISADR 	<!_!AD>/fao=1/info
-DELIM   <!3(/)!75**!/>/fao=0/info
-EMPTY	<!_ >/fao=0/info
-
-CHOOSE  <Choose a value from the list:>/fao=0/info
-VALNAM  <GT.M,GT.CM,GT.CX,TEST>/fao=0/info
-VALVER  <V1.0,V1.2,V2.3,V2.4,V2.5,V3.0>/fao=0/info
-
-DESTR   <Delete, Next or Quit D/N/Q [N] ?:>/fao=0/info
-MOD     <Modify, Next or Quit M/N/Q [M] ?:>/fao=0/info
-DELETE	<Configuration deleted>/fao=0/success
-
-CNFOK  <Configuration !SL is valid for local node>/fao=1/success
-
-HEADCL <Node name!2(_)Node number!2(_) Hardware model>/fao=0/info
-DELICL <---------!2(_)-----------!2(_) -------------->/fao=0/info
-SHOWCL "!15<!AD!>!3(_)!UL!2(_)  !15<!AD!>"/fao=3/info
-	.END
diff --git a/sr_vvms/lastchance1.c b/sr_vvms/lastchance1.c
deleted file mode 100644
index 14df25d..0000000
--- a/sr_vvms/lastchance1.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_unistd.h"
-
-#include "io.h"
-#include "iosp.h"
-#include "error.h"
-#include "gv_rundown.h"
-#include "util.h"
-#ifdef GTM_CRYPT
-# include "gtmcrypt.h"
-#endif
-
-GBLREF int4		exi_condition;
-GBLREF boolean_t	created_core;
-GBLREF boolean_t	dont_want_core;
-
-error_def(ERR_ASSERT);
-error_def(ERR_FORCEDHALT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_LKRUNDOWN);
-error_def(ERR_MEMORY);
-error_def(ERR_OUTOFSPACE);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(lastchance1)
-{
-	int4		actual_exi_condition;
-
-	actual_exi_condition = exi_condition;
-	PRN_ERROR;
-	dec_err(VARLSTCNT(1) ERR_LKRUNDOWN);
-	ESTABLISH(lastchance2);
-	gv_rundown();
-	REVERT;
-	ESTABLISH(lastchance3);
-	io_rundown(NORMAL_RUNDOWN);
-	GTMCRYPT_ONLY(GTMCRYPT_CLOSE;)
-	REVERT;
-	if (DUMPABLE && !SUPPRESS_DUMP)
-		DUMP_CORE;
-	PROCDIE(actual_exi_condition);
-}
diff --git a/sr_vvms/lastchance2.c b/sr_vvms/lastchance2.c
deleted file mode 100644
index 689ba51..0000000
--- a/sr_vvms/lastchance2.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_unistd.h"
-
-#ifdef VMS
-#include <lckdef.h>
-#include <psldef.h>
-#endif
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "error.h"
-#include "filestruct.h"
-#include "io.h"
-#include "iosp.h"
-#include "jnl.h"
-#include "util.h"
-
-GBLREF	gd_region	*gv_cur_region;
-GBLREF	int4		exi_condition;
-GBLREF	boolean_t	created_core;
-GBLREF	boolean_t	dont_want_core;
-
-static	const	unsigned short	zero_fid[3];
-
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_GVRUNDOWN);
-error_def(ERR_MEMORY);
-error_def(ERR_OUTOFSPACE);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(lastchance2)
-{
-	int4		actual_exi_condition;
-
-	actual_exi_condition = (EXIT_NRM != exi_condition ? exi_condition : EXIT_ERR);
-	PRN_ERROR;
-	dec_err(VARLSTCNT(1) ERR_GVRUNDOWN);
-	ESTABLISH(lastchance3);
-	io_rundown(NORMAL_RUNDOWN);
-	REVERT;
-	if (DUMPABLE && !SUPPRESS_DUMP)
-		DUMP_CORE;
-	PROCDIE(actual_exi_condition);
-}
diff --git a/sr_vvms/lastchance3.c b/sr_vvms/lastchance3.c
deleted file mode 100644
index d53ea9c..0000000
--- a/sr_vvms/lastchance3.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_unistd.h"
-
-#include "error.h"
-#include "io.h"
-#include "util.h"
-
-GBLREF	int4		exi_condition;
-GBLREF	boolean_t	created_core;
-GBLREF	boolean_t	dont_want_core;
-
-error_def(ERR_ASSERT);
-error_def(ERR_FORCEDHALT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_IORUNDOWN);
-error_def(ERR_MEMORY);
-error_def(ERR_OUTOFSPACE);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(lastchance3)
-{
-
-	START_CH(TRUE);
-	ESTABLISH(terminate_ch);
-	if (DUMPABLE)
-	{
-		PRN_ERROR;
-		dec_err(VARLSTCNT(1) ERR_IORUNDOWN);
-		if (!SUPPRESS_DUMP)
-			DUMP_CORE;
-		PROCDIE(exi_condition);
-	}
-	REVERT;
-	UNWIND(NULL, NULL);
-}
diff --git a/sr_vvms/lbrdef.h b/sr_vvms/lbrdef.h
deleted file mode 100644
index bc3e100..0000000
--- a/sr_vvms/lbrdef.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define LBR$C_CTLTBLID	203
-#define LBR$M_LOCATE	1
-#define LBR$M_OPEN	2
-#define LBR$K_LENGTH	30
-#define LBR$C_LENGTH	30
-#define LBR$S_LBRCTLTBL	30
-#define LBR$B_ID	0
-#define LBR$B_TBLSIZ	1
-#define LBR$B_TYPE	2
-#define LBR$B_FUNC	3
-#define LBR$R_USRFLG_OVERLAY	6
-#define LBR$L_USRFLG	6
-#define LBR$R_USRFLG_BITS	6
-#define LBR$V_LOCATE	0
-#define LBR$V_OPEN	1
-#define LBR$L_HDRPTR	10
-#define LBR$L_CTXPTR	14
-#define LBR$L_CURIDX	18
-#define LBR$L_USRNAM	22
-#define LBR$L_OLDHDRPTR	26
-#define LBR$C_TYP_UNK	0
-#define LBR$C_TYP_OBJ	1
-#define LBR$C_TYP_MLB	2
-#define LBR$C_TYP_HLP	3
-#define LBR$C_TYP_TXT	4
-#define LBR$C_TYP_SHSTB	5
-#define LBR$C_TYP_DECMX	5
-#define LBR$C_TYP_RDEC	127
-#define LBR$C_TYP_USRLW	128
-#define LBR$C_TYP_USRHI	255
-#define LBR$C_FLUSHDATA	1
-#define LBR$C_FLUSHALL	0
-#define LBR$C_MAXRECSIZ	2048
-#define LBR$C_PAGESIZE	512
-#define LBR$C_HASHSIZE	512
-#define LBR$C_TEXTPAGE	508
-#define LBR$C_DEXTQ	50
-#define LBR$C_MAXCTL	16
-#define LBR$C_MAXHDRSIZ	128
-#define LBR$C_DEFENTALL	300
-#define LBR$C_RETRYOPEN	30
-#define LBR$C_RETRYWAIT	1
-#define LBR$C_MINREAD	2
-#define LBR$C_MAXREAD	50
-#define LBR$C_MEMXTRA	50
-#define LBR$C_PUTBUFSIZ	30
-#define LBR$C_FLSHBFSIZ	1
-#define LBR$C_MAXIDXRD	20
-#define LBR$C_MAXKEYLEN	128
-#define LBR$C_MAXLUHREC	32768
-#define LBR$C_CREATE	0
-#define LBR$C_READ	1
-#define LBR$C_UPDATE	2
-#define LBR$C_MAXFUNC	2
-#define LBR$S_LBRDEF	16
-#define LBR$L_IC_CTLTBL	4
-#define LBR$L_IC_FUNC	8
-#define LBR$L_IC_TYPE	12
-#define LBR$S_LBRDEF1	32
-#define LBR$L_OP_CTLTBL	4
-#define LBR$L_OP_FNS	8
-#define LBR$L_OP_CREOPT	12
-#define LBR$L_OP_DNS	16
-#define LBR$L_OP_RLFNA	20
-#define LBR$L_OP_RNS	24
-#define LBR$L_OP_RNSLEN	28
-#define LBR$S_LBRDEF2	8
-#define LBR$L_CL_CTLTBL	4
-#define LBR$S_LBRDEF3	12
-#define LBR$L_GH_CTLTBL	4
-#define LBR$L_GH_RETARY	8
-#define LBR$S_LBRDEF4	12
-#define LBR$L_SI_CTLTBL	4
-#define LBR$L_SI_IDXNUM	8
-#define LBR$S_LBRDEF5	16
-#define LBR$L_LK_CTLTBL	4
-#define LBR$L_LK_KEYNAM	8
-#define LBR$L_LK_TXTRFA	12
-#define LBR$S_LBRDEF6	16
-#define LBR$L_IK_CTLTBL	4
-#define LBR$L_IK_KEYNAM	8
-#define LBR$L_IK_TXTRFA	12
-#define LBR$S_LBRDEF7	20
-#define LBR$L_RK_CTLTBL	4
-#define LBR$L_RK_KEYNAM	8
-#define LBR$L_RK_OLDRFA	12
-#define LBR$L_RK_NEWRFA	16
-#define LBR$S_LBRDEF8	12
-#define LBR$L_DK_CTLTBL	4
-#define LBR$L_DK_KEYNAM	8
-#define LBR$S_LBRDEF9	12
-#define LBR$L_DD_CTLTBL	4
-#define LBR$L_DD_TXTRFA	8
-#define LBR$S_LBRDEF10	16
-#define LBR$L_GR_CTLTBL	4
-#define LBR$L_GR_BUFDES	8
-#define LBR$L_GR_BUFLEN	12
-#define LBR$S_LBRDEF11	16
-#define LBR$L_PR_CTLTBL	4
-#define LBR$L_PR_BUFDES	8
-#define LBR$L_PR_TXTRFA	12
-#define LBR$S_LBRDEF12	8
-#define LBR$L_PE_CTLTBL	4
-#define LBR$S_LBRDEF13	20
-#define LBR$L_SR_CTLTBL	4
-#define LBR$L_SR_IDXNUM	8
-#define LBR$L_SR_RFA	12
-#define LBR$L_SR_USRTN	16
-#define LBR$S_LBRDEF14	12
-#define LBR$L_SU_KEYDES	4
-#define LBR$L_SU_TXTRFA	8
-#define LBR$S_LBRDEF15	16
-#define LBR$L_GI_CTLTBL	4
-#define LBR$L_GI_IDXNUM	8
-#define LBR$L_GI_USRTN	12
-#define LBR$S_LBRDEF16	12
-#define LBR$L_GU_KEYADR	4
-#define LBR$L_GU_TXTRFA	8
-#define LBR$C_ADDMOD	1
-#define LBR$C_DELMOD	2
-#define LBR$C_REPMOD	3
-#define LBR$S_LBRDEF17	16
-#define LBR$L_AU_CTLTBL	4
-#define LBR$L_AU_FLAGS	8
-#define LBR$L_AU_KEYNAM	12
-#define LBR$S_LBRDEF18	12
-#define LBR$L_GU_CTLTBL	4
-#define LBR$L_GU_USRTN	8
-#define LBR$S_LBRDEF19	8
-#define LBR$L_UU_UPDESC	4
-
-#define LBR$_HDRTRUNC 0x00268800
diff --git a/sr_vvms/license_adm.c b/sr_vvms/license_adm.c
deleted file mode 100644
index 0904cbc..0000000
--- a/sr_vvms/license_adm.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* license_adm.c : License Administration main program */
-
-#include "mdef.h"
-#include <climsgdef.h>
-#include <descrip.h>
-#include <ssdef.h>
-#include <rmsdef.h>
-#include "ladef.h"
-extern int la_cmnd() ;                        /* CLD command definition table */
-
-license_adm()
-{
-        int 	cli$dispatch() ;
-	int4 	stat0 ;
-	int4 	stat1 ;
-	int4	fl= 0 ;
-	char	*ln[2]= { LADB,LAFILE } ;
-        char 	buf[256] ;
-        unsigned short len ;
-	bool	rep;
-        $DESCRIPTOR (prompt,"LMA> ") ;
-        $DESCRIPTOR (dbuf,buf) ;
-
-	stat0= lib$get_foreign(&dbuf,0,&len,&fl);
-	rep = (len==0);
-	do {
-		stat1= cli$dcl_parse(&dbuf,&la_cmnd,&lib$get_input,&lib$get_input,&prompt);
-	        if (stat1==CLI$_NORMAL)
-			stat0= cli$dispatch(ln);
-		if (stat0!=RMS$_EOF && rep)
-			stat0= lib$get_foreign(&dbuf,&prompt,&len,&fl);
-	} while (stat0!=RMS$_EOF && rep);
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/linkshr.com b/sr_vvms/linkshr.com
deleted file mode 100644
index ffa3dd1..0000000
--- a/sr_vvms/linkshr.com
+++ /dev/null
@@ -1,28 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! linkshr - link a shareable image
-$! parameters:
-$!	p1 = target directory
-$!	p2 = object library directory
-$!	p3 = link options
-$!	P4 = link command suffix
-$!
-$ set def 'p1'
-$ if p4 .nes. "" then $ p4 = ","+p4
-$ alpha = (f$getsyi("arch_name") .eqs. "Alpha")
-$ xtra :=
-$ if .not. alpha then $ xtra := objlib/include=gtmvector,
-$ define/user objlib 'p2'mumps.olb
-$ define/user target 'p1'
-$ gtmshrlink = "gtmshrlink." + f$element(alpha,",","vax,axp")
-$ link 'p3' 'xtra' objlib/include=(cmerrors,cmierrors),gtm$tools:'gtmshrlink'/opt,sys$input/opt,target:secshrlink.opt/opt,target:release_name.opt/opt 'p4'
-name = GTMSHR.EXE
diff --git a/sr_vvms/list_file.c b/sr_vvms/list_file.c
deleted file mode 100644
index 85e0cc6..0000000
--- a/sr_vvms/list_file.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-#include <rms.h>
-
-#include "io.h"
-#include "io_params.h"
-#include "cmd_qlf.h"
-#include "list_file.h"
-#include "op.h"
-
-#define LISTEXT ".LIS"
-
-GBLREF int			(*op_open_ptr)(mval *v, mval *p, int t, mval *mspace);
-GBLREF command_qualifier  	cmd_qlf;
-GBLREF mident			module_name;
-GBLREF io_pair			io_curr_device;
-GBLREF list_params 		lst_param;
-
-static char print_time_buf[20];
-static io_pair dev_in_use;
-
-void open_list_file(void)
-{
-	char charspace;
-	uint4 status;
-	unsigned char	list_name[MAX_MIDENT_LEN + STR_LIT_LEN(LISTEXT)], fname[255];
-	struct FAB	fab;
-	struct NAM	nam;
-
-#ifdef __ALPHA
-# pragma member_alignment save
-# pragma nomember_alignment
-#endif
-	static readonly struct{
-	unsigned char	newversion;
-	unsigned char	wrap;
-	unsigned char	width;
-	int4		v_width;
-	unsigned char	eol;
-	}open_params_list = {
-	(unsigned char)iop_newversion,	(unsigned char)iop_wrap,
-	(unsigned char)iop_recordsize,	(int4)132,
-	(unsigned char)iop_eol
-	};
-#ifdef __ALPHA
-# pragma member_alignment restore
-#endif
-
-	mval params;
-	mval file;
-	struct dsc$descriptor_s print_time_d
-		= { SIZEOF(print_time_buf), DSC$K_DTYPE_T, DSC$K_CLASS_S, print_time_buf };
-
-	lst_param.list_line = 1;
-	lst_param.page = 0;
-
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_dna = &list_name[0];
-	assert(module_name.len <= MAX_MIDENT_LEN);
-	fab.fab$b_dns = module_name.len;
-	memcpy(&list_name[0], module_name.addr, fab.fab$b_dns);
-	MEMCPY_LIT(&list_name[fab.fab$b_dns], LISTEXT);
-	fab.fab$b_dns += STR_LIT_LEN(LISTEXT);
-	if (MV_DEFINED(&cmd_qlf.list_file))
-	{
-		fab.fab$b_fns = cmd_qlf.list_file.str.len;
-		fab.fab$l_fna = cmd_qlf.list_file.str.addr;
-	}
-	nam.nam$l_esa = &fname[0];
-	nam.nam$b_ess = SIZEOF(fname);
-	nam.nam$b_nop = (NAM$M_SYNCHK);
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fop = FAB$M_NAM;
-	if ((status = sys$parse(&fab,0,0)) != RMS$_NORMAL)
-	{	rts_error(VARLSTCNT(1) status);
-	}
-
-	file.mvtype = params.mvtype = MV_STR;
-	file.str.len = nam.nam$b_esl;
-	file.str.addr = &fname[0];
-	params.str.len = SIZEOF(open_params_list);
-	params.str.addr = &open_params_list;
-	(*op_open_ptr)(&file, &params, 30, 0);
-	params.str.len = 1;
-	charspace = (char) iop_eol;
-	params.str.addr = &charspace;
-	dev_in_use = io_curr_device;
-	op_use(&file,&params);
-	lib$date_time(&print_time_d);
-	list_head(0);
-	return;
-}
-
-void close_list_file(void)
-{
-	mval param,list_file;
-	unsigned char charspace;
-
-	param.str.len = 1;
-	charspace = (char) iop_eol;
-	param.str.addr = &charspace;
-	list_file.mvtype = param.mvtype = MV_STR;
-	list_file.str.len = io_curr_device.in->trans_name->len;
-	list_file.str.addr = &io_curr_device.in->trans_name->dollar_io[0];
-	op_close(&list_file, &param);
-	io_curr_device = dev_in_use;
-}
-
-
-void list_cmd(void)
-{
-	unsigned short cmd_len;
-	unsigned char cmd_line[256];
-	static readonly unsigned char command_line[] =		"COMMAND LINE";
-	static readonly unsigned char command_line_under[] =	"-----------------";
-	$DESCRIPTOR(d_cmd,cmd_line);
-
-	if (lib$get_foreign(&d_cmd, 0, &cmd_len) == SS$_NORMAL)
-	{
-		list_line(command_line);
-		list_line(command_line_under);
-		cmd_line[cmd_len]='\0';
-		list_line(cmd_line);
-	}
-}
-
-
-LITREF char gtm_release_name[];
-LITREF int4 gtm_release_name_len;
-
-GBLREF char source_file_name[];
-GBLREF unsigned short source_name_len;
-GBLREF char rev_time_buf[];
-
-void list_head(bool newpage)
-{
-	short col_2 = 70;
-	static readonly unsigned char page_lit[] = "page ";
-	unsigned char page_no_buf[10];
-	mval head;
-
-	if (newpage)
-		op_wtff();
-
-	head.mvtype = MV_STR;
-	head.str.addr = &gtm_release_name[0];
-	head.str.len = gtm_release_name_len;
-	op_write (&head);
-
-	op_wttab(col_2);
-	head.str.addr = print_time_buf;
-	head.str.len = 20;
-	op_write(&head);
-
-	op_wttab(100);
-	lst_param.page++;
-	head.str.addr = page_lit;
-	head.str.len = SIZEOF(page_lit) - 1;
-	op_write(&head);
-
-	head.str.addr = page_no_buf;
-	head.str.len = i2asc(page_no_buf, lst_param.page) - page_no_buf;
-	op_write(&head);
-	op_wteol(1);
-
-	head.str.addr = source_file_name;
-	head.str.len = source_name_len;
-	op_write(&head);
-	if (source_name_len >= col_2)
-		op_wteol(1);
-	op_wttab(col_2);
-	head.str.addr = rev_time_buf;
-	head.str.len = 20;
-	op_write(&head);
-	op_wteol(3);
-}
-
-
-#define BIG_PG 32
-#define BIG_PG_BOT_SP 10
-#define SMALL_PG_BOT_SP 3
-
-void list_line(char *c)
-{
-	short n, c_len, space_avail;
-	mval out;
-
-	if (io_curr_device.out->dollar.y >= lst_param.lines_per_page -
-	 ((lst_param.lines_per_page < BIG_PG) ? SMALL_PG_BOT_SP : BIG_PG_BOT_SP))
-		list_head(1);
-
-	out.mvtype = MV_STR;
-	c_len = (short)strlen(c);
-
-	while(c_len > 0)
-	{
-		if (c_len < (space_avail = PG_WID - io_curr_device.out->dollar.x))
-			space_avail = c_len;
-		out.str.len = space_avail;
-		out.str.addr = c;
-		op_write(&out);
-		c_len -= space_avail;
-		c += space_avail;
-		if (c_len > 0)
-		{
-			assert(io_curr_device.out->dollar.x != 0);
-			op_wteol(1);
-		}
-	}
-
-	if ((n = lst_param.lines_per_page - io_curr_device.out->dollar.y) <
-	    lst_param.space)
-	{
-		assert(n > 0);
-		op_wteol(n);
-	}
-	else
-		op_wteol(lst_param.space);
-}
-
-void list_line_number(void)
-{
-	void op_write();
-	unsigned char buf[8];
-	int n,m, i, q;
-	unsigned char *pt;
-	mval out;
-
-	assert(cmd_qlf.qlf & CQ_LIST);
-	if (io_curr_device.out->dollar.y >= lst_param.lines_per_page -
-	 ((lst_param.lines_per_page < BIG_PG) ? SMALL_PG_BOT_SP : BIG_PG_BOT_SP))
-		list_head(1);
-
-	n = lst_param.list_line++;
-	pt = &buf[5];
-	memset(&buf[0],SP,SIZEOF(buf));
-	do
-	{
-		i = n / 10;
-		q = n - (i * 10);
-		*--pt = q  + '0';
-		n = i;
-	} while(i > 0);
-	out.mvtype = MV_STR;
-	out.str.addr = buf;
-	out.str.len = SIZEOF(buf);
-	op_write(&out);
-}
-
-
-void list_chkpage(void)
-{
-	if (io_curr_device.out->dollar.y >= lst_param.lines_per_page -
-	 ((lst_param.lines_per_page < BIG_PG) ? SMALL_PG_BOT_SP : BIG_PG_BOT_SP))
-		list_head(1);
-}
-
-
-void list_tab(void)
-{
-	op_wttab(LISTTAB);
-	return;
-}
diff --git a/sr_vvms/lke.c b/sr_vvms/lke.c
deleted file mode 100644
index fb87a5b..0000000
--- a/sr_vvms/lke.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-
-#include "gtm_inet.h"
-
-#include "mlkdef.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "filestruct.h"
-#include "error.h"		/* for EXIT_HANDLER macro used in SET_EXIT_HANDLER macro */
-#include "cli.h"
-#include "jnl.h"
-#include "stp_parms.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "stringpool.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmimagename.h"
-#include "desblk.h"		/* for desblk structure */
-#include "util.h"
-#include "lke.h"
-#include "getjobname.h"
-#include "generic_exit_handler.h"
-#include "ladef.h"
-#include "ast_init.h"
-#include "init_secshr_addrs.h"
-#include "gtm_env_init.h"	/* for gtm_env_init() prototype */
-#include "patcode.h"
-#include "common_startup_init.h"
-#include "gtm_threadgbl_init.h"
-
-GBLREF desblk		exi_blk;
-GBLREF int4 		lkid;
-GBLREF int4		exi_condition;
-GBLREF spdesc		rts_stringpool, stringpool;
-
-extern int		lke_cmd();
-extern int		CLI$DCL_PARSE();
-extern int		CLI$DISPATCH();
-
-$DESCRIPTOR		(output_qualifier, "OUTPUT");
-
-static void lke_process(void);
-
-void lke(void)
-{
-	char		buff[MAX_LINE];
-	$DESCRIPTOR	(command, buff);
-	uint4		status;
-	short		len;
-	bool		dcl;
-	DCL_THREADGBL_ACCESS;
-
-	GTM_THREADGBL_INIT;
-	common_startup_init(LKE_IMAGE);
-	gtm_env_init();	/* read in all environment variables */
-	util_out_open(0);
-	SET_EXIT_HANDLER(exi_blk, generic_exit_handler, exi_condition);	/* Establish exit handler */
-	ESTABLISH(util_base_ch);
-	status =lp_id(&lkid);
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	stp_init(STP_INITSIZE);
-	rts_stringpool = stringpool;
-	getjobname();
-	INVOKE_INIT_SECSHR_ADDRS;
-	ast_init();
-	initialize_pattern_table();
-	gvinit();
-	region_init(TRUE);
-	status = lib$get_foreign(&command, 0, &len, 0);
-	if ((status & 1) && len > 0)
-	{
-		command.dsc$w_length = len;
-		status = CLI$DCL_PARSE(&command, &lke_cmd, &lib$get_input, 0, 0);
-		if (CLI$_NORMAL == status)
-		{
-			util_out_open(&output_qualifier);
-			CLI$DISPATCH();
-			util_out_close();
-		}
-		lke_exit();
-	}
-	for (;;)
-		lke_process();
-}
-
-static void lke_process(void)
-{
-	uint4		status;
-	$DESCRIPTOR	(prompt, "LKE> ");
-
-	ESTABLISH(util_ch);
-	status = CLI$DCL_PARSE(0, &lke_cmd, &lib$get_input, &lib$get_input, &prompt);
-	if (RMS$_EOF == status)
-		lke_exit();
-	else if (CLI$_NORMAL == status)
-	{
-		util_out_open(&output_qualifier);
-		CLI$DISPATCH();
-		util_out_close();
-	}
-}
diff --git a/sr_vvms/lke.hlp b/sr_vvms/lke.hlp
deleted file mode 100644
index 80ef13f..0000000
--- a/sr_vvms/lke.hlp
+++ /dev/null
@@ -1,305 +0,0 @@
-
-1 Overview
-  The MUMPS LOCK Utility
-   The GT.M LOCK Utility, LKE, provides a tool  for  examining  and  changing
-   the GT.M LOCK environment. In MUMPS, the  LOCK  command  reserves  one  or
-   more resource names. Only one process at a time  can  reserve  a  resource
-   name. No other process  sharing  the  same  environment  can  successfully
-   LOCK that resource name  at  the  same  time.  MUMPS  code  commonly  uses
-   LOCKs as flags  controlling  access  to  global  data.  Generally  a  LOCK
-   specifies the same as the  name  of  the  global  variable  that  requires
-   protected access. However, this is only  a  convention.  A  LOCK  argument
-   may contain any  subscripted  or  unsubscripted  MUMPS  name  including  a
-   name with no preceding caret (^). Because  they  have  the  appearance  of
-   local variable names, resource names  with  no  preceding  caret  (^)  are
-   commonly referred to as "local LOCKs."
-
-   The  ZALLOCATE  and   ZDEALLOCATE   commands   provide   an   alternative,
-   non-standard, mechanism for managing LOCKs.
-
-2 Functions
-  Functions
-   The two primary functions of the MUMPS LOCK Utility (LKE) are:
-
-   o   SHOW all or specified LOCKs currently active on the system
-
-   o   CLEAR all or specified LOCKs currently active on the system
-
-   When debugging a MUMPS application, you may  use  LKE  to  identify  and
-   clear a  possible  deadlock  situation,  i.e.,  two  or  more  processes
-   have LOCKs  and  are  waiting  to  add  resource  names  LOCKed  by  the
-   other(s).
-
-   When  used  with  GT.CX  and/or  GT.CM,  LKE  may  display  and   change
-   information on other nodes of a distributed database system.
-
-2 LOCK_database
-  MUMPS LOCKs and Global Directories
-   GT.M  distributes  the  LOCK   database   among   the   database   files
-   identified  by  the  Global  Directory  (GD).   The   Global   Directory
-   Editor (GDE) creates and maintains Global Directories.
-
-   GT.M maps LOCKs of resource names starting  with  a  caret  (^)  to  the
-   database file  used  to  map  variables  with  the  same  name.  If  the
-   Global Directory maps the name A to file  A.DAT,  GT.M  maps  all  LOCKs
-   on resource name ^A to file A.DAT.
-
-   GT.M maps  LOCKs  on  names  not  starting  with  a  caret  (^)  to  the
-   region of the database specified with  the  GDE  command  LOCK  /REGION.
-   By default, GDE  creates  Global  Directories  mapping  local  LOCKs  to
-   the region $DEFAULT.
-
-   These two factors result in the following:
-
-   o   ^ LOCKs automatically intersect for  all  users  of  the  same  data
-       in any database file,  because  GT.M  stores  the  ^  LOCKs  in  the
-       same file as the data
-
-   o   "local"  LOCKs  intersect  dependent  on   the   Global   Directory,
-       because users may  access  the  database  through  different  Global
-       Directories.
-
-2 Global_Directories
-  Establishing a Global Directory
-   GDE and LKE use the logical  name  GTM$GBLDIR  to  identify  which  file
-   to use for  the  Global  Directory.  Define  GTM$GBLDIR  using  the  DCL
-   command DEFINE. The system manager may  define  GTM$GBLDIR  in  a  GROUP
-   or SYSTEM  logical  name  table,  allowing  many  users  access  to  the
-   logical name. Individual users  define  GTM$GBLDIR  in  their  LOGIN.COM
-   or other command files.
-
-   Example
-
-   $ DEFINE GTM$GBLDIR PROD.GLD
-
-   When a process  invokes  a  GT.M  image,  GT.M  identifies  the  current
-   Global Directory by the  logical  name  GTM$GBLDIR.  Within  MUMPS,  SET
-   $ZGBLDIR=expr changes the Global Directory. $ZGBLDIR is an
-   intrinsic  special  variable.   An   individual   LOCK,   ZALLOCATE   or
-   ZDEALLOCATE  argument  may  specify  a   Global   Directory   with   the
-   extended global syntax.
-
-1 CLEAR
-  C[LEAR]
-   The  CLEAR  command  removes  active  LOCKs.  The  format  of  the   CLEAR
-   command is:
-
-   C[LEAR] [/qualifier...]
-
-   The optional CLEAR command qualifiers are:
-
-   /A[LL]
-   /I[NTERACTIVE]
-   /O[UTPUT]=file-spec
-   /P[ID]=pid
-   /R[EGION]=region-name
-
-   By default, CLEAR operates interactively (/INTERACTIVE).
-
-2 Qualifiers
-/ALL
-  /A[LL]
-   Specifies  the  removal  of  all  current  LOCKs.  If  used  with  the
-   /REGION qualifier /ALL removes  all  LOCKs  in  the  region.  Issue  a
-   CLEAR /ALL  only  when  there  are  no  active  GT.M  processes  using
-   LOCKs or when you can predict the effect on the application.
-
-   The   /ALL   qualifier   is   incompatible   with   the   /INTERACTIVE
-   qualifier.
-
-/INTERACTIVE
-  /I[NTERACTIVE]
-   Clears  one  LOCK  at  a  time  interactively.   LKE   displays   each
-   current LOCK with the  PID  of  the  owner  process  and  prompts  for
-   verification  that  the  LOCK  should  be  cleared.  LKE  retains  the
-   LOCK for any response other than Y[ES].
-
-   The   /INTERACTIVE   qualifier   is   incompatible   with   the   /ALL
-   qualifier.
-
-   By default, CLEAR operates interactively (/INTERACTIVE).
-
-/OUTPUT
-  /OUTPUT=file-spec
-   Directs the  reporting  of  all  cleared  LOCKs.  If  you  specify  an
-   existing file, LKE creates a new version of that file.
-
-   The /OUTPUT qualifier is compatible with all other qualifiers.
-
-   By default, CLEAR sends its messages to SYS$OUTPUT.
-
-/PID
-  /P[ID]=pid
-   Clears   all   LOCKs   associated   with   the    specified    process
-   identification  number.  LKE  interprets  the  PID  as  a  hexadecimal
-   number.  This  command  provides  a  means  for  directing  CLEAR   to
-   LOCKs held by a process that is behaving abnormally.
-
-   The /PID qualifier is compatible with all other qualifiers.
-
-/REGION
-  /R[EGION]=region-name
-   Clears LOCKs mapped by  the  current  Global  Directory  to  a  region
-   specified by the region-name.
-
-   The /REGION qualifier is compatible with all other qualifiers.
-
-   By     default,     CLEAR     /REGION=     operates      interactively
-   (/INTERACTIVE).
-
-1 EXIT
-  E[XIT]
-   The EXIT command ends an LKE session.  The  format  of  the  EXIT  command
-   is:
-
-   E[XIT]
-
-1 HELP
-  H[ELP]
-   The HELP command explains LKE commands. The format  of  the  HELP  command
-   is:
-
-   H[ELP] [options...]
-
-   The  HELP  command  uses  similar  conventions   to   the   VAX/VMS   help
-   facility. Enter the LKE command for which  you  want  information  at  the
-   Topic prompt(s). Use <RETURN> or <CTRL Z> to return to the LKE prompt.
-
-   Example
-
-   LKE> HELP SHOW
-
-   This command displays help for the SHOW command.
-
-
-1 SHOW
-  SH[OW]
-   The SHOW command provides a  status  report  on  the  LOCK  mechanism  and
-   the LOCK database. The format of the SHOW command is:
-
-   SH[OW] [/qualifier...]
-
-   By default, SHOW displays /ALL.
-
-   The  SHOW  command  reports  active  LOCKs.  Information  displayed  about
-   specific  LOCKs  includes  the  LOCK  resource  name   and   the   process
-   identification (PID) of the LOCK owner. The  VMS  privileges  of  the  LKE
-   process  determine  whether  LKE  can  display  the  state  of  any  other
-   process. The results of a SHOW may  be  immediately  "outdated"  by  MUMPS
-   LOCK activity.
-
-   When LKE encounters a LOCK  held  by  a  process  on  another  node  in  a
-   VAXcluster, it displays a  message  identifying  the  name  of  the  node,
-   however it does not display the  process  state.  When  LKE  displays  the
-   message identifying the LOCK as belonging to a  process  on  a  node  with
-   no name, it means  a  process  abandoned  the  LOCK  due  to  an  abnormal
-   termination,  and  the  node  that  held  that  process  no  longer  holds
-   active membership in the VAXcluster  or  has  been  assigned  a  new  node
-   identifier during a reboot.
-
-2 Qualifiers
-/ALL
-  /A[LL]
-   Specifies  a  display  of  all  current  LOCKs  in  all  regions   and
-   information about the state  of  processes  owning  these  LOCKs.  The
-   /ALL  qualifier  is  compatible  with  all  other   qualifiers.   SHOW
-   /ALL /WAIT displays both /ALL and /WAIT information.
-
-   By default, SHOW displays /ALL.
-
-/OUTPUT
-  /OUTPUT=file-spec
-   Directs the reporting  of  the  current  LOCKs.  When  you  specify  a
-   file, LKE overwrites that file.
-
-   The /OUTPUT qualifier is compatible with all other qualifiers.
-
-   By default, SHOW directs all messages to SYS$OUTPUT.
-
-/PID
-  /P[ID]=process-identification
-   Displays all LOCKs owned by the specified PID.
-
-   The /PID qualifier is compatible with all other qualifiers.
-
-   By default, SHOW displays the LOCKs for all PIDs.
-
-/REGION
-  /R[EGION]=region-name
-   Displays LOCKs for the specified region.
-
-   The /REGION qualifier is compatible with all other qualifiers.
-
-   By default, SHOW displays the LOCKs for all regions.
-
-/WAIT
-  /W[AIT]
-   Displays   the   LOCK   resource   name   and   the   process    state
-   information of all processes waiting  for  the  LOCK  to  be  granted.
-   LKE  does  not  display  the  owner  of  the  LOCK.  SHOW  /ALL  /WAIT
-   displays both /ALL and /WAIT information.
-
-2 process_status
-  Some VMS Process Status Codes
-   When you use the SHOW command  to  display  all  LOCKs  on  the  system,
-   LKE also displays  the  status  of  the  process  that  owns  the  LOCK.
-   The  common  VMS  process  status  codes  and  their  meanings  are   as
-   follows:
-
-   CUR - VMS  process  status  indicating  that  the  LOCK  is  held  by  a
-   "current" process.
-
-   COM - VMS  process  status  indicating  that  the  LOCK  is  held  by  a
-   process ready to use the processor.
-
-   HIB - VMS  process  status  indicating  that  the  LOCK  is  held  by  a
-   process in "hibernation" (i.e.,  waiting  for  time  to  pass).  Such  a
-   process may be waiting to LOCK  a  resource  name  presently  LOCKed  by
-   another process.
-
-   LEF - VMS  process  status  indicating  that  the  LOCK  is  held  by  a
-   process waiting for  an  asynchronous  event  ("local  event  flag").  A
-   process waiting for terminal input waits in a LEF state.
-
-   A nonexistent process  -  the  process  that  set  the  LOCK  no  longer
-   exists.
-
-   A process on a remote node -  the  LOCK  exists  on  a  remote  node  so
-   the system is unable to determine its exact status.
-
-   A process on a cluster node  -  the  LOCK  exists  on  another  node  in
-   the  VAXcluster  so  the  system  is  unable  to  determine  its   exact
-   status.
-
-   A GT.CM server - the LOCK was set on behalf  of  a  process  on  another
-   node via the GT.CM software.
-
-   No  privilege  -  you  do  not  have  the  appropriate   VMS   privilege
-   required to view the status.
-
-   For additional  information  on  these  and  other  VMS  process  status
-   categories, refer to the VMS Monitor Utility Manual.
-
-1 SPAWN
-  SP[AWN]
-   The SPAWN command creates a sub-process for access  to  VMS  CLI  (usually
-   DCL) without terminating  the  current  LKE  environment.  Use  the  SPAWN
-   command to suspend a session and issue  DCL  commands  such  as  DIRECTORY
-   or SHOW LOGICAL. The SPAWN command  accepts  an  optional  command  string
-   for execution by  the  spawned  sub-process.  If  the  SPAWN  has  command
-   string  parameter,  the  created  sub-process  prompts  and  accepts   any
-   legal CLI command.  To  terminate  the  sub-process  use  the  LOGOUT  DCL
-   command.
-
-   The format of the SPAWN command is:
-
-   SP[AWN] [DCL command]
-
-   Example
-
-   LKE> SPAWN "DIR *.DAT"
-
-   This command  invokes  a  VMS  directory  listing  of  all  files  in  the
-   current  default  directory  with  a  .DAT  extension.   The   sub-process
-   terminates when the directory listing completes.
-
diff --git a/sr_vvms/lke_cmd.cld b/sr_vvms/lke_cmd.cld
deleted file mode 100644
index 664e9ae..0000000
--- a/sr_vvms/lke_cmd.cld
+++ /dev/null
@@ -1,46 +0,0 @@
-MODULE LKE_CMD
-
-DEFINE VERB spawn
-	ROUTINE util_spawn
-	PARAMETER P1, LABEL=COMMAND, VALUE(DEFAULT="")
-	QUALIFIER output		NONNEGATABLE	VALUE(REQUIRED,TYPE=$FILE)
-
-DEFINE VERB exit
-	ROUTINE lke_exit
-	QUALIFIER output		NONNEGATABLE	VALUE(REQUIRED,TYPE=$FILE)
-
-DEFINE VERB help
-	ROUTINE lke_help
-	PARAMETER P1, LABEL=QUERY
-	QUALIFIER output		NONNEGATABLE	VALUE(REQUIRED,TYPE=$FILE)
-
-DEFINE VERB _setgld
-	ROUTINE lke_setgdr
-	PARAMETER P1, LABEL=GLD, VALUE(REQUIRED)
-	QUALIFIER output		NONNEGATABLE	VALUE(REQUIRED,TYPE=$FILE)
-
-DEFINE VERB show
-	ROUTINE lke_show
-	QUALIFIER all			NONNEGATABLE
-	QUALIFIER crit			NEGATABLE
-	QUALIFIER lock			NONNEGATABLE	VALUE(REQUIRED,TYPE=$QUOTED_STRING)
-	QUALIFIER memory		NONNEGATABLE
-	QUALIFIER node			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER output		NONNEGATABLE	VALUE(REQUIRED,TYPE=$FILE)
-	QUALIFIER pid			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER region		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER wait			NONNEGATABLE
-
-DEFINE VERB clear
-	ROUTINE lke_clear
-	QUALIFIER all			NONNEGATABLE
-	QUALIFIER exact			NEGATABLE
-	QUALIFIER interactive  		NEGATABLE
-	QUALIFIER lock 			NONNEGATABLE	VALUE(REQUIRED,TYPE=$QUOTED_STRING)
-        QUALIFIER node			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER output 		NONNEGATABLE	VALUE(REQUIRED,TYPE=$FILE)
-	QUALIFIER pid			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER region		NONNEGATABLE	VALUE(REQUIRED)
-
-	DISALLOW ANY2(INTERACTIVE,ALL)
-	DISALLOW EXACT AND NOT LOCK
diff --git a/sr_vvms/lke_getansw.c b/sr_vvms/lke_getansw.c
deleted file mode 100644
index 07d39c9..0000000
--- a/sr_vvms/lke_getansw.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-
-#include "gtm_ctype.h"
-#include "gtm_stdio.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "iosp.h"
-#include "mlkdef.h"
-#include "lke.h"
-
-/*
- * -----------------------------------------------
- * Read terminal input, displaying a prompt string
- *
- * Return:
- *	TRUE - the answer was 'Y'
- *	FALSE - answer is 'N'
- * -----------------------------------------------
- */
-bool lke_get_answ(char *prompt)
-{
-	char		res[8] ;
-	$DESCRIPTOR	(dres,res) ;
-	short unsigned int len;
-	struct	dsc$descriptor_s dprm;
-
-	dprm.dsc$b_dtype = DSC$K_DTYPE_T;
-	dprm.dsc$b_class = DSC$K_CLASS_S;
-	dprm.dsc$a_pointer = prompt;
-	for (dprm.dsc$w_length = 0 ; *prompt++ ; dprm.dsc$w_length++)
-		;
-	lib$get_input(&dres,&dprm,&len);
-	if (len < 1)
-		return FALSE;
-	else
-		return ((res[0]=='y' || res[0]=='Y'));
-}
-
diff --git a/sr_vvms/lke_help.c b/sr_vvms/lke_help.c
deleted file mode 100644
index beb7b76..0000000
--- a/sr_vvms/lke_help.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <climsgdef.h>
-#include <descrip.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "iosp.h"
-#include "mlkdef.h"
-#include "lke.h"
-
-#define HLP$M_PROMPT 1
-#define HELP_LIBRARY "GTM$HELP:LKE"
-
-void lke_help(void)
-{
-
-	uint4 flags;
-	char buff[256];
-	$DESCRIPTOR(line, buff);
-	$DESCRIPTOR(libr, HELP_LIBRARY);
-	$DESCRIPTOR(ent, "QUERY");
-
-	if (CLI$PRESENT(&ent) != CLI$_PRESENT || CLI$GET_VALUE(&ent,&line) != SS$_NORMAL)
-		line.dsc$w_length = 0;
-	flags = HLP$M_PROMPT;
-	lbr$output_help(lib$put_output,0,&line,&libr,&flags,lib$get_input);
-	return;
-
-}
diff --git a/sr_vvms/lke_setgdr.c b/sr_vvms/lke_setgdr.c
deleted file mode 100644
index 11ca7ab..0000000
--- a/sr_vvms/lke_setgdr.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <descrip.h>
-#include <climsgdef.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gds_rundown.h"
-#include "dpgbldir.h"
-#include "gvcmy_rundown.h"
-#include "mlkdef.h"
-#include "lke.h"
-#include "tp_change_reg.h"
-
-GBLREF gd_region 	*gv_cur_region;
-GBLREF sgmnt_data	*cs_data;
-GBLREF sgmnt_addrs	*cs_addrs;
-GBLREF gd_addr		*gd_header;
-
-void lke_setgdr(void)
-{
-	int4		cli$present(), cli$get_value();
-	gd_region 	*r_top;
-	mval		reset;
-	bool		def;
-	short		len;
-	char		buf[256];
-	$DESCRIPTOR	(dbuf,buf);
-	static readonly $DESCRIPTOR(dent,"GLD");
-	static readonly unsigned char init_gdr[] = "GTM$GBLDIR";
-
-	gvcmy_rundown();
-	for (gv_cur_region = gd_header->regions, r_top = gv_cur_region + gd_header->n_regions; gv_cur_region < r_top;
-			gv_cur_region++)
-	{
-		tp_change_reg();
-		gds_rundown();
-	}
-	if (cli$present(&dent)==CLI$_PRESENT)
-	{
-		cli$get_value(&dent,&dbuf,&len);
-		def = FALSE;
-		reset.mvtype = MV_STR;
-		reset.str.len = len;
-		reset.str.addr = &buf;
-	}
-	else
-	{
-		reset.mvtype = MV_STR;
-		reset.str.len = sizeof (init_gdr) - 1;
-		reset.str.addr = &init_gdr;
-	}
-	zgbldir(&reset);
-	cs_addrs = 0;
-	cs_data = 0;
-	region_init(TRUE) ;
-}
diff --git a/sr_vvms/lm_cmnd.cld b/sr_vvms/lm_cmnd.cld
deleted file mode 100644
index 24c2d01..0000000
--- a/sr_vvms/lm_cmnd.cld
+++ /dev/null
@@ -1,82 +0,0 @@
-MODULE LM_CMND
-DEFINE TYPE subj KEYWORD system
-
-DEFINE VERB exit
-	ROUTINE la_exit
-		NOQUALIFIERS
-
-DEFINE VERB help
-	ROUTINE lm_help
-	PARAMETER P1 ,LABEL=topic
-		NOQUALIFIERS
-
-DEFINE VERB show
-	ROUTINE lm_showcl
-	PARAMETER P1 ,LABEL=subject, VALUE(REQUIRED, TYPE=subj)
-		NOQUALIFIERS
- 
-DEFINE VERB initialize 
-	ROUTINE la_initial
-		NOQUALIFIERS
-
-DEFINE VERB register
-	ROUTINE lm_register
-	NOPARAMETERS
-		QUALIFIER input, LABEL=io, VALUE (TYPE = $FILE,REQUIRED)
-
-DEFINE VERB delete
-	ROUTINE lm_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model, LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
-
-DEFINE VERB modify
-	ROUTINE lm_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,   LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
-
-DEFINE VERB list
-	ROUTINE lm_maint
-	NOPARAMETERS
-	QUALIFIER checksum,   LABEL=cs,    VALUE (REQUIRED)
-	QUALIFIER num_sys,    LABEL=L,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER product,    LABEL=nam,  VALUE (REQUIRED)
-	QUALIFIER version,    LABEL=ver,  VALUE (REQUIRED)
-	QUALIFIER value,      LABEL=x,    VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER activation,  LABEL=t0,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER expiration,    LABEL=t1,   VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER configuration_id, LABEL=lid,  VALUE (TYPE = $NUMBER,REQUIRED)
-	QUALIFIER hardware_model,LABEL=sid,  VALUE (REQUIRED)
-	QUALIFIER node_num,    LABEL=nid,  VALUE (REQUIRED)
-	QUALIFIER creation,    LABEL=std,  VALUE (TYPE = $DATETIME,REQUIRED)
-	QUALIFIER operator,   LABEL=oid,  VALUE (REQUIRED)
-	QUALIFIER customer,   LABEL=adr,  VALUE (REQUIRED)
-	QUALIFIER comment,    LABEL=com,  VALUE (REQUIRED)
-	QUALIFIER output,     LABEL=io,   VALUE (DEFAULT=LICENSE.LIS,TYPE = $FILE)
diff --git a/sr_vvms/lm_convert.c b/sr_vvms/lm_convert.c
deleted file mode 100644
index d41def2..0000000
--- a/sr_vvms/lm_convert.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_convert.c : translates a sequence of A - P char to sequence of bits
-   used in      : lm_verify, lp_licensed
-*/
-#include "mdef.h"
-
-#define lo(x)  (x & mask)
-#define hi(x)  (x<<4)
-#define mask   15
-
-void	lm_convert (cs,bcs)
-int4	bcs[] ;					/* result - binary form */
-char 	*cs ;					/* check sum A - P form */
-{
-	unsigned char	*h ;			/* bcs scaled in char	*/
-	int 		k  ;
-
-	h= (char *)bcs ;
-	k= 0 ;
-	while (k!=8)
-	{
-		h[k] =  lo(*(cs++)-'A') ;
-		h[k] |= hi(*(cs++)-'A') ;
-		k++ ;
-	}
-}
diff --git a/sr_vvms/lm_edit.c b/sr_vvms/lm_edit.c
deleted file mode 100644
index fc0009a..0000000
--- a/sr_vvms/lm_edit.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_edit.c: new license entered interactively, with editing
-   used in  : lm_register.c ,lm_maint.c
-*/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "ladef.h"
-#include "lmdef.h"
-#define MINT 0x0FFFFFFF
-#define MUNS 0xFFFFFFFF
-#define MSHO 32767
-#define B (e==SS$_NORMAL)
-
-void lm_edit (int4 kid,char *h,pak *p,int4 lo,int4 hi)
-/*
-int4	kid ;				virt. keyboard ID
-char 	*h ;				data base
-pak	*p ;    			returns - pak record
-int4 	lo ;				min num. of systems
-int4	hi ;				max num. of systems
-*/
-{
-	int4 	str$upcase() ;
-	int 	k,e,w ;
-	char 	buf[32] ;
-	int4 	n ;
-	bool	valid ;
-
-	int4 	*psid ;				/* pak SIDs             */
-	int4	*pnid ;				/* pak NIDs		*/
-	char	mbuf[HWLEN+1] ;			/* buf for hardw. model */
-	int4	mdl ;				/* hardware model	*/
-
-	error_def(LA_PNAM) ;
-	error_def(LA_PVER) ;
-	error_def(LA_PX)   ;
-	error_def(LA_PT0)  ;
-	error_def(LA_PT1)  ;
-	error_def(LA_PLID) ;
-	error_def(LA_PL)   ;
-	error_def(LA_PSID) ;
-	error_def(LA_PCS)  ;
-	error_def(LA_INVAL);
-
-	$DESCRIPTOR(dnam,p->pd.nam) ;
-	$DESCRIPTOR(dver,p->pd.ver) ;
-	$DESCRIPTOR(dcsm,p->ph.cs) ;
-	$DESCRIPTOR(dbuf,mbuf) ;
-
-	dnam.dsc$w_length= la_getstr(kid,LA_PNAM,p->pd.nam,1,PROD) ;
-	dver.dsc$w_length= la_getstr(kid,LA_PVER,p->pd.ver,0,VERS) ;
-	e= str$upcase(&dnam,&dnam) ; if (!B) lib$signal(e) ;
-	e= str$upcase(&dver,&dver) ; if (!B) lib$signal(e) ;
-
-	n= p->pd.x ;
-	la_getnum(kid,LA_PX,&n,0,MSHO) ; p->pd.x= n ;
-	la_getdat(kid,LA_PT0,&(p->pd.t0),0,MUNS)  ;
-	la_getdat(kid,LA_PT1,&(p->pd.t1),p->pd.t0[1],MUNS)  ;
-	la_getnum(kid,LA_PLID,&(p->pd.lid),1,MINT) ;
-
-	n= p->pd.L ;
-	la_getnum(kid,LA_PL,&n,lo,hi) ; p->pd.L= n ;
-	psid= (char *)p + SIZEOF(pak) ;
-	for (k= 0;k!=n;k++)
-	{
-		w= la_mdl2nam(mbuf,psid[k]) ;
-		mbuf[w]= 0 ;
-		valid= FALSE ;
-		while (!valid)
-		{
-			w= la_getstr(kid,LA_PSID,mbuf,0,HWLEN) ;
-			dbuf.dsc$w_length= w ;
-			e= str$upcase(&dbuf,&dbuf) ; if (!B) lib$signal(e) ;
-			valid= la_nam2mdl(&mdl,w,mbuf) ;
-			if (!valid)
-			{
-				la_putmsgu(LA_INVAL,0,0) ;
-			}
-		}
-		psid[k]= mdl ;
-	}
-	pnid= psid + n ;
-	lm_getnid(kid,pnid,psid,n) ;
-	buf[0]= p->ph.n+'0' ; buf[1]= '-' ;
-	for (k=0;k!=4;k++)
-	{
-		buf[k+2]=  p->ph.cs[k]   ; buf[6]= '-' ;
-		buf[k+7]=  p->ph.cs[k+4] ; buf[11]= '-';
-		buf[k+12]= p->ph.cs[k+8] ; buf[16]= '-';
-		buf[k+17]= p->ph.cs[k+12];
-	}
-	buf[CSLN]= 0 ;
-	la_getstr(kid,LA_PCS,buf,CSLN,CSLN+1) ;
-	p->ph.n= buf[0]-'0' ;
-	for (k=0;k!=4;k++)
-	{
-		p->ph.cs[k]=    buf[k+2] ;
-		p->ph.cs[k+4]=  buf[k+7] ;
-		p->ph.cs[k+8]=  buf[k+12] ;
-		p->ph.cs[k+12]= buf[k+17] ;
-	}
-	e= str$upcase(&dcsm,&dcsm) ; if (!B) lib$signal(e) ;
-}
diff --git a/sr_vvms/lm_getnid.c b/sr_vvms/lm_getnid.c
deleted file mode 100644
index 39abe24..0000000
--- a/sr_vvms/lm_getnid.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_getnid.c: assigns a unique node IDs for each hardware model in the list.
-		The nodes are selected to match the hardware models.
-		The computed value can be overwritten interactively.
-		For standalone machines nid[k]==0
-   used in    : lm_edit.c
-*/
-#include "mdef.h"
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-#include "ladef.h"
-#include "lmdef.h"
-#define MINT	0x0FFFFFFF
-#define LAST	(status==SS$_NOMORENODE)
-#define PROPER(e) if (e!=SS$_NORMAL && !LAST) { la_putmsgs(e) ; }
-
-void lm_getnid (uint4 kid,int4 nid[],int4 sid[],int4 n)
-/*
-uint4	kid ;					virt. keyb. ID
-int4		nid[] ;				array of node IDs
-int4		sid[] ;				array of hw. models
-int4		n ; 				array size
-*/
-{
-	int4	sys$getsyiw() ;
-	error_def(LA_PNID) ;
-	error_def(LA_NOSYS) ;
-	int4	mdl= 0 ;				/* hw. model		*/
-	int4	nd= 0 ;					/* node ID 		*/
-	int4	inid ;					/* initial node id	*/
-	int 	i,k ;
-	int4 	iosb[2],status ;
-	bool	valid ;
-	char	buf[32] ;
-	int4	fao[2] ;
-	int4	tmp[16] ;
-	short	w ;
-	unsigned char cmem ;
-	struct
-	{	short blen ;			/* buffer length 	*/
-		short code ;			/* item code		*/
-		char  *buf ;			/* return buffer	*/
-		short *len ;			/* return length	*/
-	} itm[4] ;
-
-	itm[0].blen= 1        	   	 ; itm[1].blen= 0 ;
-	itm[0].code= SYI$_CLUSTER_MEMBER ; itm[1].code= 0 ;
-	itm[0].buf = &cmem		 ; itm[1].buf = 0 ;
-	itm[0].len = &w    		 ; itm[1].len = 0 ;
-
-	status= sys$getsyiw(EFN$C_ENF,0,0,itm,iosb,0,0) ;
-	if (( cmem & 1 )==0)
-	{
-		inid = 0 ;
-		status= lm_mdl_nid(&mdl,&nd,&inid) ;
-		inid = -1 ;
-	}
-	else
-	{
-		inid= -1 ;
-		status= lm_mdl_nid(&mdl,&nd,&inid) ;
-	}
-	for ( k = 0 ; k!=n ; k++ )
-	{
-		tmp[k] = nid[k] ; nid[k] = 0 ;
-	}
-	k= 0 ;
-	while ( k!=n && status!=SS$_NOMORENODE )
-	{
-		i = 0 ;
-		while (((sid[i]!=mdl && sid[i]!=0) || nid[i]!=0) && i!=n) i++ ;
-		if (i!=n)
-		{
-			nid[i] = nd ;
-		}
-		status= lm_mdl_nid(&mdl,&nd,&inid) ;
-		PROPER(status) ;
-		k++ ;
-	}
-	k = 0 ;
-	while (k!=n)
-	{
-		if (nid[k]==0 && tmp[k]==0)
-		{
-			fao[0]= la_mdl2nam(buf,sid[k]) ; fao[1]= buf ;
-			lm_putmsgu(LA_NOSYS,fao,2) ;
-		}
-		else if (nid[k]==0)
-		{
-			nid[k] = tmp[k] ;
-		}
-		la_getnum(kid,LA_PNID,(nid+k),0,MINT) ;
-		k++ ;
-	}
-}
diff --git a/sr_vvms/lm_help.c b/sr_vvms/lm_help.c
deleted file mode 100644
index a2dc164..0000000
--- a/sr_vvms/lm_help.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_help.c: displays the help file
-   used in  : lm_cmnd.cld
-*/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include "ladef.h"
-
-int lm_help ()
-{
-        int 	cli$get_getvalue();
-	int 	lbr$output_help() ;
-	int4	status ;
-	int4 fl= 1 ;
- 	short w ;
-	char buf[256] ;
-        $DESCRIPTOR (dent,"topic");
-        $DESCRIPTOR (dbuf,buf)    ;
-        $DESCRIPTOR (dlib,LMHP)   ;
-
-        status= cli$get_value(&dent,&dbuf,&w) ;
-	if (status!=SS$_NORMAL)
-	{
-		dbuf.dsc$w_length= 0 ;
-	}
-	lbr$output_help(lib$put_output,0,&dbuf,&dlib,&fl,lib$get_input) ;
-
-	return status ;
-}
diff --git a/sr_vvms/lm_listpak.c b/sr_vvms/lm_listpak.c
deleted file mode 100644
index 3cb62f4..0000000
--- a/sr_vvms/lm_listpak.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_listpak.c: lists one pak record to stdout
-   used in     : lm_register.c,lm_maint.c
- */
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "gtm_string.h"
-#include "ladef.h"
-#include "lmdef.h"
-
-void lm_listpak (pak *p)
-/*
-pak	*p ;                               	buffer with the pak record
-*/
-{
-
-	int4	*psid ;				/* pak SIDs             */
-	int4	*pnid ;				/* pak NIDs		*/
-
-	int4	fao[16] ;			/* fao arguments	*/
-	char	buf[32] ;
-	int	k ;
-	short	w ;
-
-	error_def(LA_HEAD) ;	/* Listing header    */
-	error_def(LA_NAM) ;	/* Product           */
-	error_def(LA_VER) ;	/* Version           */
-	error_def(LA_X) ;	/* License value     */
-	error_def(LA_UNLX) ;	/* Unlimited license */
-	error_def(LA_T0) ;	/* Date available    */
-	error_def(LA_T1) ;	/* Date expires      */
-	error_def(LA_UNLT0) ;	/* Date unlimited    */
-	error_def(LA_UNLT1) ;	/* Date unlimited    */
-	error_def(LA_LID) ;	/* License ID        */
-	error_def(LA_L) ;	/* Number of systems */
-	error_def(LA_SID) ;	/* Hardware model    */
-	error_def(LA_UNSID) ;	/* Unlimited hw.     */
-	error_def(LA_NID) ;	/* Node ID           */
-	error_def(LA_CS) ;	/* Check sum         */
-	error_def(LA_STD) ;	/* Creation date     */
-	error_def(LA_OID) ;	/* Operator ID       */
-
-	psid= (char*)p + p->ph.l[3] ;
-	pnid= (char*)p + p->ph.l[4] ;
-
-	la_putmsgu(LA_HEAD,0,0) ;
-
-	fao[0]= strlen(p->pd.nam) ; fao[1]= (p->pd.nam) ;
-	la_putmsgu(LA_NAM,fao,2) ;
-	fao[0]= strlen(p->pd.ver) ; fao[1]= (p->pd.ver) ;
-	la_putmsgu(LA_VER,fao,2) ;
-	if (p->pd.x!=0)			/* job limited license 	*/
-	{
-		la_putmsgu(LA_X,&(p->pd.x),1) ;
-	}
-	else				/* unlimited license  	*/
-	{
-		la_putmsgu(LA_UNLX,0,0) ;
-	}
-	if (p->pd.t0[1]!=0)		/* available date given */
-	{
-	        fao[0]= &(p->pd.t0) ;
-		la_putmsgu(LA_T0,fao,1) ;
-	}
-	else				/* date not given 	*/
-	{
-		la_putmsgu(LA_UNLT0,0,0) ;
-	}
-	if (p->pd.t1[1]!=0)		/* available date given */
-	{
-	        fao[0]= &(p->pd.t1) ;
-		la_putmsgu(LA_T1,fao,1) ;
-	}
-	else				/* date not given 	*/
-	{
-		la_putmsgu(LA_UNLT1,0,0) ;
-	}
-	la_putmsgu(LA_LID,&(p->pd.lid),1) ;
-	la_putmsgu(LA_L,&(p->pd.L),1) ;
-	for (k= 0;k!=(p->pd.L);k++)
-	{
-		if (psid[k]==0)
-		{
-			fao[0]= k ;
-			la_putmsgu(LA_UNSID,fao,1) ;
-		}
-		else
-		{
-			w= la_mdl2nam(buf,psid[k]) ;
-			fao[0]= k ; fao[1]= w ; fao[2]= buf ;
-			la_putmsgu(LA_SID,fao,3) ;
-		}
-	}
-	for (k= 0;k!=(p->pd.L);k++)
-	{
-		fao[0]= k ; fao[1]= pnid[k] ;
-		la_putmsgu(LA_NID,fao,2) ;
-	}
-
-	fao[0]= p->ph.n ;
-	fao[1]= fao[3]= fao[5]= fao[7]= 4 ;
-        fao[2]= p->ph.cs ;
-        fao[4]= p->ph.cs +  4 ;
-        fao[6]= p->ph.cs +  8 ;
-        fao[8]= p->ph.cs + 12 ;
-	la_putmsgu(LA_CS,fao,9) ;
-        fao[0]= &(p->pf.std) ;
-	la_putmsgu(LA_STD,fao,1) ;
-	fao[0]= strlen(p->pf.oid) ; fao[1]= (p->pf.oid) ;
-	la_putmsgu(LA_OID,fao,2) ;
-}
diff --git a/sr_vvms/lm_maint.c b/sr_vvms/lm_maint.c
deleted file mode 100644
index 8e85ca4..0000000
--- a/sr_vvms/lm_maint.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_maint.c : License Man. function completing maintenance commands */
-
-#include "mdef.h"
-#include <climsgdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <rms.h>
-#include "ladef.h"
-#include "lmdef.h"
-#include "la_io.h"
-#define DELETE (rp[0]=='D' || rp[0]=='Y' )
-#define MODIFY (rp[0]=='M' || rp[0]=='Y' || rp[0]==0 )
-#define QUIT   (rp[0]=='Q')
-#define PROPER(status) { if ((status & 1)==0) lib$signal(status) ;}
-
-int lm_maint (void)
-{
-        int 	cli$get_getvalue();
-
-	error_def	(LA_NOCNFDB);
-	error_def	(LA_DESTR)  ;
-	error_def	(LA_DELETE) ;
-	error_def	(LA_EMPTY)  ;
-	error_def	(LA_MOD)    ;
-	error_def	(LA_MODCNF) ;
-	int4 		status ;
- 	unsigned short 	w ;
-	char 		com[64] ;			/* command 	    */
-	char 		rp[32] ;			/* reply	    */
-        $DESCRIPTOR 	(dentv,"$VERB");
-        $DESCRIPTOR 	(dcom,com);
-	uint4 	kid ;				/* virt. keyb. ID    */
-	la_prolog 	*prol;				/* db prolog	     */
-	char 		*h ;				/* data base 	     */
-	pak  		*p ;				/* pak record	     */
-	pak 		q[PBUF] ;			/* pak pattern       */
-	int 		v[32] ;				/* qualif. variables */
-	int 		n,k ;				/* pak rec count     */
-	char 		*x,*y,*z ;			/* temp pointers for */
-	bool 		update,next ;
-	int4		fao[1] ;
-	struct FAB 	f ;
-	struct RAB 	r ;
-
-	status= smg$create_virtual_keyboard(&kid) ;
-        PROPER(status) ;
-        status= cli$get_value(&dentv,&dcom,&w)    ;
-	PROPER(status) ;
-	com[0]= (com[0]>='a' ? com[0]-32 : com[0]) ; com[w]= 0 ;
-
-	la_getcli(v,q) ;
-	la_puthead(q)  ;			/* pak pattern filled in  */
-	h= la_getdb(LMDB) ;
-	if (h==NULL)
-	{
-		lib$signal(LA_NOCNFDB) ;
-	}
-	prol= h ;
-	p= h + SIZEOF(la_prolog) ;
-	n= 0 ;
-	update= FALSE ;
-	rp[0]= 0 ;
-	while (n != prol->N && !QUIT)
-	{
-		next= TRUE ;
-		if (la_match(p,q,v))
-		{
-			switch (com[0])
-			{
-			case 'L' : lm_listpak(p) ;
-				   break ;
-			case 'D' : lm_listpak(p) ;
-				   la_putmsgu(LA_EMPTY, 0, 0);
-				   rp[0]= 0 ;
-				   la_getstr(kid,LA_DESTR,rp,0,1) ;
-				   rp[0]= (rp[0]>='a' ? rp[0]-32 : rp[0]) ;
-				   if DELETE
-				   {
-					prol->N-- ;
-					prol->len -= p->ph.l[0] ;
-					x= p ; y= (char *)p + p->ph.l[0] ; z= h + prol->len ;
-					while (x!=z)
-					{
-						*(x++) = *(y++) ;
-					}
-				        lm_putmsgu(LA_DELETE,0,0) ;
-					next= FALSE;
-					update= TRUE ;
-				   }
-				   break ;
-			case 'M' : lm_listpak(p) ;
-				   la_putmsgu(LA_EMPTY, 0, 0);
-				   rp[0]= 0 ;
-				   la_getstr(kid,LA_MOD,rp,0,1) ;
-				   rp[0]= (rp[0]>='a' ? rp[0]-32 : rp[0]) ;
-			  	   if MODIFY
-				   {
-					la_putmsgu(LA_EMPTY, 0, 0);
-					lm_edit(kid,h,p,p->pd.L,p->pd.L+1) ;
-					la_putfldr(&(p->pf)) ;
-					update= TRUE ;
-					lm_putmsgu (LA_MODCNF,0,0) ;
-				   }
-				   break ;
-#ifdef VERIFY
-			case 'V' : status= lm_verify(p) ;
-				   fao[0]= p->pd.lid ;
-				   lm_putmsgu(status,fao,1) ;
-				   break ;
-#endif
-			otherwise: break ;
-			}
-		}
-		if (next)
-		{
-			n++ ;
-			p = (char *)p + p->ph.l[0] ;
-		}
-	}
-        la_putmsgu(LA_EMPTY, 0, 0);
-	if (update)
-	{
-		la_putdb(LMDB,h) ;
-	}
-	la_freedb(h) ;
-	return status ;
-}
diff --git a/sr_vvms/lm_mdl_nid.c b/sr_vvms/lm_mdl_nid.c
deleted file mode 100644
index 5a860e9..0000000
--- a/sr_vvms/lm_mdl_nid.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_mdl_nid.c: given is csid.
-		 csid>0    mdl,nid are returned for specific csid.
-		 csid==-1, mdl,nid are returned for all systems
-		 in the cluster - one pair per call
-		 csid==0   mdl,nid are returned for local system
-		 when the system is standalone nid==0
-   used in     : lm_getnid.c
-*/
-#include "mdef.h"
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-#include "ladef.h"
-
-int4	lm_mdl_nid (mdl,nid,csid)
-int4	*mdl ;					/* returns - hardware model */
-int4 	*nid ;					/* returns - node number    */
-int4 	*csid ;					/* cluster system ID	    */
-{
-	int4	sys$getsyiw() ;
-	struct
-	{
-		short blen ;			/* buffer length 	*/
-		short code ;			/* item code		*/
-		char  *buf ;			/* return buffer	*/
-		short *len ;			/* return length	*/
-	} itm[4] ;
-
-	int4 		iosb[2],status ;
-	short		w,u ;
-
-	itm[0].blen= 2            ; itm[1].blen= 4        	   ; itm[2].blen= 0 ;
-	itm[0].code= SYI$_HW_MODEL; itm[1].code= SYI$_NODE_NUMBER  ; itm[2].code= 0 ;
-	itm[0].buf = mdl          ; itm[1].buf=  nid	  	   ; itm[2].buf = 0 ;
-	itm[0].len = &w           ; itm[1].len=  &u       	   ; itm[2].len = 0 ;
-
-	status= sys$getsyiw(EFN$C_ENF,csid,0,itm,iosb,0,0) ;
-	return status ;
-}
diff --git a/sr_vvms/lm_putmsgu.c b/sr_vvms/lm_putmsgu.c
deleted file mode 100644
index c38c244..0000000
--- a/sr_vvms/lm_putmsgu.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_putmsgu.c : outputs and formats message for user message code
-		  and user FAO arguments; includes all prefixes.
- */
-#include "mdef.h"
-
-#include <ssdef.h>
-
- void lm_putmsgu (c,fao,n)
- int4 c ;				/* message code		    */
- int4 fao[] ;				/* fao arguments	    */
- short n ;				/* number of fao arg.s	    */
- {
-	int k;
-	struct { short argc ;           /* structure longword count */
-                 short opt   ;          /* message display options  */
-                 int4 code   ;          /* message code 	    */
-	         short count ;          /* FAO count    	    */
-	         short newopt;          /* new options  	    */
-	         int4 fao[16];          /* fao arguments	    */
-               } msgvec ;
-
-	msgvec.argc=    n+2 ;
-	msgvec.opt=     0x0001 ;
-	msgvec.code=    c ;
-	msgvec.count=   n ;
-	msgvec.newopt=  0x000F ;
-
-	for (k= 0;k!=n;k++) msgvec.fao[k]= fao[k] ;
-	sys$putmsg(&msgvec) ;
-}
diff --git a/sr_vvms/lm_register.c b/sr_vvms/lm_register.c
deleted file mode 100644
index d46824f..0000000
--- a/sr_vvms/lm_register.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_register.c : == new license registered
-   used in       : license_man.c
-*/
-
-#include <ssdef.h>
-#include "mdef.h"
-#include <descrip.h>
-#include "ladef.h"
-#include "lmdef.h"
-
-#define TOUPPER(C) ((C) >= 'b' && (C) <='z' ? ((C) - ('a' - 'A')) : (C))
-#define SAVE (rp[0]=='S' || rp[0]=='Y' )
-#define DISP (rp[0]=='D' || w==0 )
-#define QUIT (rp[0]=='Q')
-#define EDIT (rp[0]=='E')
-
-int lm_register (void)
-{
-        int4		smg$create_virtual_keyboard() ;
-	error_def	(LA_NOCNF)  ;		/* No license created	*/
-	error_def	(LA_NOCNFDB);		/* No license created	*/
-	error_def	(LA_NEWCNF) ;		/* New license created	*/
-	error_def	(LA_SAVE) ;		/* Save Y/N ?		*/
-	error_def	(LA_EMPTY) ;
-
-	la_prolog 	*prol ;			/* db file prolog 	*/
-	char 		*h ;			/* db in main store 	*/
-	pak  		*p ; 			/* pak record          	*/
-
-	char 		rp[8] ;			/* operator reply      	*/
-	char 		buf[32] ;		/* buffer for checksum  */
-	int4 		status ;
-	int 		k ;
-	unsigned char	recall= 16 ;
- 	unsigned short	w ;
-	uint4	kid ;			/* virt. keyboard ID    */
-	bool		valid ;
-	int4		fao[1];
-	int4		stat  ;
-
-	if ((h= la_getdb(LMDB))==NULL) 		/* db in main storage	*/
-	{
-		lib$signal(LA_NOCNFDB) ;
-	}
-	prol= h	;
-	p= (char *)h + prol->len ;		/* place for new pak	*/
-
-	status= smg$create_virtual_keyboard(&kid,0,0,0,&recall) ;
-	if ((status & 1)==0)
-	{
-		la_freedb(h) ;
-		lib$signal(status) ;
-	}
-	la_initpak(-1,p) ;		/* pak initialized	*/
-	rp[0]= 'E' ;
-	valid= FALSE ;
-	while (!SAVE && !QUIT)
-	{
-		if EDIT
-		{
-			lm_edit(kid,h,p,1,NSYS) ;
-			la_puthead(p) ;
-			la_putfldr(&(p->pf)) ;
-		}
-		else if DISP
-		{
-			lm_listpak(p) ;
-		}
-		la_putmsgu(LA_EMPTY,0,0) ;
-		rp[0]= 0 ;
-		w= la_getstr(kid,LA_SAVE,rp,0,1) ;
-		la_putmsgu(LA_EMPTY,0,0) ;
-		rp[0]= (char)TOUPPER(rp[0]) ;
-	}
-	if (SAVE)
-	{
-		(prol->N)++ ;			/* count of paks ++	*/
-		prol->len += p->ph.l[0]	;	/* db file size ++	*/
-		la_putdb (LMDB,h) ;	 	/* db back to file	*/
-		lm_putmsgu (LA_NEWCNF,0,0) ;
-	}
-	else if (QUIT)				/* abort without saving	*/
-	{
-		lm_putmsgu(LA_NOCNF,0,0) ;
-	}
-	la_freedb(h) ;
-	return status ;
-}
diff --git a/sr_vvms/lm_showcl.c b/sr_vvms/lm_showcl.c
deleted file mode 100644
index 59753c0..0000000
--- a/sr_vvms/lm_showcl.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lm_showcl : displays node name, node number and hw. model for all systems
-	       in the cluster
-   used in   : lmu
-*/
-#include "mdef.h"
-#include <ssdef.h>
-#include <syidef.h>
-#include <efndef.h>
-
-#include "ladef.h"
-#include "lmdef.h"
-#define NAML	15
-
-int4	lm_showcl(void)
-{
-	int 	sys$getsyiw() ;
-	error_def(LA_SHOWCL) ;
-	error_def(LA_HEADCL) ;
-	error_def(LA_DELICL) ;
-	char	nam[32] ;
-	char	buf[15] ;
-	short	mdl = 0 ;
-	int4	nid ;
-	int4	csid ;
-	char	snam[] = "Standalone" ;
-	struct
-	{
-		short blen ;			/* buffer length 	*/
-		short code ;			/* item code		*/
-		char  *buf ;			/* return buffer	*/
-		short *len ;			/* return length	*/
-	} itm[4] ;
-
-	int4 		iosb[2],status ;
-	int4		fao[5] ;
-	short		w0,w1,w2 ;
-	unsigned char	cmem = 0 ;
-
-	la_putmsgu(LA_HEADCL,0,0) ;
-	la_putmsgu(LA_DELICL,0,0) ;
-
-	itm[0].blen= 2 		   ; itm[1].blen= 1          	   ;  itm[2].blen= 0 ;
-	itm[0].code= SYI$_HW_MODEL ; itm[1].code= SYI$_CLUSTER_MEMBER;itm[2].code= 0 ;
-	itm[0].buf = &mdl          ; itm[1].buf= &cmem		   ;  itm[2].buf = 0 ;
-	itm[0].len = &w0           ; itm[1].len=  &w1       	   ;  itm[2].len = 0 ;
-
-	status= sys$getsyiw(EFN$C_ENF,0,0,itm,iosb,0,0) ;
-	if (status==SS$_NORMAL && (cmem & 1)==0)
-	{
-		itm[0].blen= 4        		; itm[1].blen= 0 ;
-		itm[0].code= SYI$_NODE_NUMBER   ; itm[1].code= 0 ;
-		itm[0].buf= &nid		; itm[1].buf=  0 ;
-		itm[0].len=  &w1       		; itm[1].len=  0 ;
-		status= sys$getsyiw(EFN$C_ENF,0,0,itm,iosb,0,0) ;
-		if (status!=SS$_NORMAL)
-		{
-			nid= 0 ;
-			status= SS$_NORMAL ;
-		}
-		w0= la_mdl2nam(buf,(int4)mdl) ;
-		fao[0]= SIZEOF(snam)-1 ; fao[1]= snam ; fao[2]= nid ; fao[3]= w0 ; fao[4]= buf ;
-		la_putmsgu(LA_SHOWCL,fao,5) ;
-	}
-	else if ((cmem & 1)==1)
-	{
-		itm[1].blen= 4        		; itm[2].blen= 15  	     ; itm[3].blen= 0 ;
-		itm[1].code= SYI$_NODE_NUMBER   ; itm[2].code= SYI$_NODENAME ; itm[3].code= 0 ;
-		itm[1].buf= &nid		; itm[2].buf=  nam	     ; itm[3].buf = 0 ;
-		itm[1].len=  &w1       		; itm[2].len=  &w2           ; itm[3].len = 0 ;
-		csid= -1 ;
-		status= sys$getsyiw(EFN$C_ENF,&csid,0,itm,iosb,0,0) ;
-		while (status==SS$_NORMAL)
-		{
-			w0= la_mdl2nam(buf,(int4)mdl) ;
-			fao[0]= w2 ; fao[1]= nam ; fao[2]= nid ; fao[3]= w0 ; fao[4]= buf ;
-			la_putmsgu(LA_SHOWCL,fao,5) ;
-			status= sys$getsyiw(EFN$C_ENF,&csid,0,itm,iosb,0,0) ;
-		}
-	}
-	return ( status==SS$_NOMORENODE ? SS$_NORMAL : status ) ;
-}
diff --git a/sr_vvms/lmdef.h b/sr_vvms/lmdef.h
deleted file mode 100644
index 482015b..0000000
--- a/sr_vvms/lmdef.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __LMDEF_H__
-#define __LMDEF_H__
-
-int4 lm_mdl_nid(int4 *mdl, int4 *nid, int4 *csid);
-void lm_edit(int4 kid, char *h, pak *p, int4 lo, int4 hi);
-void lm_getnid(uint4 kid, int4 nid[], int4 sid[], int4 n);
-void lm_listpak(pak *p);
-void lm_putmsgu(int4 c, int4 fao[], short n);
-int lm_maint (void);
-int lm_register (void);
-int lm_showcl (void);
-
-#endif
diff --git a/sr_vvms/lmu.c b/sr_vvms/lmu.c
deleted file mode 100644
index b560b8a..0000000
--- a/sr_vvms/lmu.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lmu : License Management main program */
-
-#include "mdef.h"
-#include <climsgdef.h>
-#include <descrip.h>
-#include <ssdef.h>
-#include <rmsdef.h>
-#include "ladef.h"
-extern int lm_cmnd() ;
-
-lmu ()
-{
-        int 	cli$dispatch() ;
-	int4 	stat0 ;
-	int4 	stat1 ;
-	int4	fl= 0 ;
-        char 	buf[256] ;
-	char	*ln[2]= { LMDB,LMFILE } ;
-        short 	len ;
-	bool	rep ;
-        $DESCRIPTOR (prompt,"LMU> ") ;
-        $DESCRIPTOR (dbuf,buf) ;
-
-	stat0= lib$get_foreign(&dbuf,0,&len,&fl) ;
-	rep  = (len==0) ;
-	do {
-		stat1= cli$dcl_parse(&dbuf,&lm_cmnd,&lib$get_input,&lib$get_input,&prompt) ;
-	        if (stat1==CLI$_NORMAL)
-		{
-			stat0= cli$dispatch(ln) ;
-		}
-		if (stat0!=RMS$_EOF && rep)
-		{
-			stat0= lib$get_foreign(&dbuf,&prompt,&len,&fl) ;
-		}
-	} while (stat0!=RMS$_EOF && rep) ;
-	return  (stat0==RMS$_EOF ? SS$_NORMAL : stat0) ;
-}
diff --git a/sr_vvms/lmu.hlp b/sr_vvms/lmu.hlp
deleted file mode 100644
index a124a9a..0000000
--- a/sr_vvms/lmu.hlp
+++ /dev/null
@@ -1,589 +0,0 @@
-
-1 Overview
-  LMU Overview
-   Greystone products are sold under license. A  license  permits  the  legal
-   operation  of  a  Greystone  product  on  one  or  more   machines.   When
-   entering into a software license  agreement  with  Greystone  you  receive
-   an  installation  kit  containing  the  software  and  a  unique  set   of
-   information  called  a  Product  Authorization  Key  (PAK).  Although  the
-   software license gives you the legal right to  use  the  software,  it  is
-   the PAK which mechanically enables you  to  use  the  software.  You  must
-   enter this PAK information  into  your  system  before  you  can  actually
-   use  the  licensed  software.  The  License   Management   Utility   (LMU)
-   provides  the  commands  needed   to   enter   and   maintain   this   PAK
-   information. LMU is supplied with all  Greystone  products  which  require
-   a PAK.
-
-2 Acquiring_PAKs
-      Acquiring     your     Product     Authorization     Key      (PAK)
-   A Product Authorization Key (PAK)  is  a  set  of  information  provided
-   by   Greystone   which   identifies   and   authorizes   your   licensed
-   configuration.  The  PAK  includes  those  configuration  details  which
-   are required by LMU to permit normal  operation  of  the  product.  PAKs
-   may  be  communicated  in  hardcopy,  orally  or  via  electronic  mail.
-   Handle your PAK  information  with  care.  Inappropriate  disclosure  of
-   PAKs could place  your  organization  in  violation  of  your  Greystone
-   license agreement(s).
-
-   If you have  just  received  new  PAK  information  you  need  to  enter
-   this  information  into  your  system  using  LMU   and   the   REGISTER
-   command.
-
-2 PAK_Info
-  PAK Information
-   When REGISTERing a PAK be sure to  enter  the  information  on  the  PAK
-   exactly. PAKs contain the following fields  of  information.  If  a  PAK
-   field is left blank the default listed  appears  when  you  display  the
-   PAK information again.
-
-3 Product
-  Product
-   o  Product - the name, for example GT.M
-
-3 Version
-  Version
-   o  Version   -   if   not   specified   the   configuration   is   not
-      restricted  to  a  particular  version.  Version  identifiers   are
-      in  the  format  Vm.n-p  where  m  is  a  major  release,  n  is  a
-      maintenance release, and  p  is  a  patch  level.  The  default  is
-      blank.
-
-3 Configuration
-  Configuration
-   o  Configuration  value  -  identifies  the  type  of  license  (user-
-      based or machine-based) and  if  user-based,  how  many  users.  If
-      no value is specified  the  configuration  does  not  restrict  the
-      number of  users,  indicating  a  machine-based  license.  A  value
-      corresponds  numerically  to  the  maximum  number  of   concurrent
-      users  licensed  for  the   product   (user-based   license).   The
-      default is "Unlimited jobs."
-
-3 Activation
-  Activation
-   o  Activation date  -  if  no  time  is  specified  the  configuration
-      is  already  valid.  Times   are   specified   in   [d]d-mon-[yy]yy
-      format. The default is "Not limited."
-
-3 Expiration
-  Expiration
-   o  Expiration date -  if  no  value  is  specified  the  configuration
-      does not expire.  If  a  PAK  has  no  expiration  date,  that  PAK
-      can  continue  in  use  until  some  event  such  as  an   operator
-      action or a CPU change makes  the  PAK  obsolete.  The  default  is
-      "Not limited."
-
-3 Configuration_ID
-  Configuration_ID
-   o  Configuration  ID  -  an  integer  which  uniquely  identifies  the
-      configuration. This field is required.
-
-3 Number-of-systems
-  Number-of-systems
-   o  Number of Systems -  how  many  separate  computers  share  in  the
-      configuration. Multiprocessor machines  such  as  a  VAX  6420  are
-      considered a single computer. This field is required.
-
-3 Hardware_Model
-  Hardware_Model
-   o  Hardware Model(s)  -  a  mnemonic  or  hexadecimal  identifier  for
-      the  computers  covered  by  the  configuration.  Hardware   models
-      are  included  even  in  PAKs  for  user-based  licenses.  Hardware
-      model  identifications  may  be  examined  using  the  SHOW  SYSTEM
-      command.
-
-3 Check_Sum
-  Check_Sum
-   o  Checksum - a 1 digit integer field followed by 4 fields each
-      of  4  alpha   characters   with   dashes   between   fields,   for
-      example:   0-AFFF-CEDC-EDCF-BDDD.   The   checksum   is   used   to
-      validate  that  the  fixed  portions  of  the  configuration   have
-      been correctly entered. This field is required.
-
-3 Creation
-  Creation
-   o  Creation date -  the  system  date  and  time  when  this  PAK  was
-      entered. This is automatically  generated  and  filled  in  by  the
-      system.
-
-3 Operator_ID
-  Operator_ID
-   o  Operator ID - the  Username  of  the  account  used  when  the  PAK
-      information  was  entered.  This  is  automatically  generated  and
-      filled in by the system.
-
-2 Configuration_files
-  Configuration Database Files
-   LMU  stores  the  PAK  information  in  one  or  more  files  which  are
-   referred to as  the  configuration  database.  Because  an  LMU  session
-   deals  with  a  single   file,   user   configuration   activities   are
-   generally  simplified  and  minimized  when  a  single  file  holds  all
-   licenses in  a  system.  This  is  particularly  true  in  a  VAXcluster
-   when multiple licenses for the same  product  may  exist  for  different
-   cluster  members.  However,  you  may  use  multiple  files  to   manage
-   configurations.
-
-   Note: The  system  automatically  sets  up  the  configuration  database
-   if you use the standard installation procedures.  If  you  do  not,  the
-   following provides information you may need.
-
-   Products access the configuration  database  through  the  logical  name
-   GTM$CNFDB.  The  default  specification  for  a  configuration  file  is
-   GTM$DIST:GTC.CNF.
-
-2 VMS_Locks
-     VMS     Locks     Used     by     the     Configuration     Facility
-   Greystone products  use  VMS  locks  to  verify  a  properly  configured
-   operation.  Each  process  actively  using   one   or   more   Greystone
-   configured  product(s)   requires   three   locks   per   product.   For
-   example, if there  are  5  programmers  using  the  GT.M  product,  they
-   are accessing 15 locks.
-
-   Make sure your system can  accommodate  the  number  of  locks  required
-   for your new software. Systems  with  large  numbers  of  processes  may
-   require adjustments  to  the  LOCKIDTBL  and  the  LOCKIDTBL_MAX  SYSGEN
-   parameters.
-
-2 License_types
-  License Types
-   To  prepare  the  appropriate  PAK  for  your  installation   you   must
-   determine  which  type  of  license  you  need.  Licenses   are   either
-   machine-based or user-based.
-
-3 Machine-based
-  Machine-based Licenses
-   A  machine-based  license  permits  any   number   of   processes   to
-   concurrently  use  a  Greystone  product  on  a  particular   machine.
-   Machine-based licenses are  usually  purchased  when  a  computer  has
-   a  potentially  large  number  of  concurrent  users.  The  advantages
-   of machine-based licenses are:
-
-   o  They  reward  an  efficient  time-sharing  environment.   If   your
-      application(s) supports many  users  per  VAX  Unit  of  Processing
-      (VUP), you are not penalized for your efficiency.
-
-   o  They  are  frequently   appropriate   for   the   dedicated   MUMPS
-      environment.
-
-   o  They   may   reduce   administrative    costs    in    a    growing
-      environment.  As  the  number  of  users  increases  no  action  is
-      required.  There  is  a  single  justification  cycle  rather  than
-      multiple cycles.
-
-3 User-based
-  User-based Licenses
-
-   A  user-based  license  places  a  maximum  limit  on  the  number  of
-   processes in a system  which  can  concurrently  use  a  product.  All
-   types   of   jobs   count   toward   the   user    limit    including:
-   interactive,  batch,   detached,   spawned   and   remote   processes.
-   User-based  licenses  are  generally  purchased  when  the  number  of
-   concurrent  users  is  small  relative  to   the   capacity   of   the
-   system. A user-based license  can  be  converted  to  a  machine-based
-   license.
-
-   The advantages of user-based licenses are:
-
-   o  They  reward  the  environment  where  jobs  tend  to  be   massive
-      rather than distributed.
-
-   o  They  permit  the  use  of  a  few  MUMPS  processes  in  a   large
-      general purpose system.
-
-   o  They permit a  "pay-as-you-go"  approach  to  the  introduction  of
-      MUMPS. Additional users  may  be  added  to  a  user-based  license
-      in increments of 4.
-
-
-1 DELETE
-  D[ELETE]
-   The DELETE command  removes  one  or  more  PAKs  from  the  configuration
-   database.
-
-   The format of the DELETE command is:
-
-   D[ELETE] [/qualifier=value]
-
-   Qualifiers to the DELETE command select the  PAKs  on  which  the  command
-   operates. If multiple qualifiers are used on a  DELETE,  only  PAKs  which
-   satisfy  the  values  for  all  qualifiers  are  presented  for  deletion.
-   After the PAK is presented, LMU presents the prompt:
-
-   Delete, Next or Quit D/N/Q [N]:
-
-   Example
-
-   LMU> DELETE/CON=135975
-
-
-1 EXIT
-  E[XIT]
-   The EXIT command terminates an LMU session.
-
-   The format of the EXIT command is:
-
-   E[XIT]
-
-   Example
-
-   LMU> EXIT
-   $
-
-1 HELP
-  H[ELP]
-   The HELP command  displays  online  information  about  LMU  commands  and
-   qualifiers,  using  the  VMS  help  facility.  HELP  takes   an   optional
-   parameter which specifies a topic on which  you  desire  help.  Exit  from
-   HELP by entering <RET> enough times to  leave  all  nested  levels  or  by
-   entering <CTRL Z>.
-
-   The format of the HELP command is:
-
-   H[ELP] [topic]
-
-   Example
-
-   LMU> HELP MODIFY
-
-   This command displays help on the MODIFY command.
-
-1 INITIALIZE
-  I[NITIALIZE]
-   The INITIALIZE command creates  and  formats  a  new  configuration  file.
-   If the file previously exists, INITIALIZE  displays  a  warning  and  does
-   not create the file. If you need  to  replace  an  existing  configuration
-   file, use the DCL DELETE command  to  remove  the  existing  copy  of  the
-   file before initiating the LMU session.
-
-   The format of the INITIALIZE command is:
-
-   I[NITIALIZE]
-
-   Example
-
-   LMU> INITIALIZE
-
-   Caution:  If  you  have   a   cluster   which   should   have   a   common
-   configuration  database,  define  GTM$CNFDB  to  GTC.CNF  or  some   other
-   appropriate file in a common directory  before  invoking  LMU  to  perform
-   an INITIALIZE.
-
-1 LIST
-  L[IST]
-   The LIST  command  displays  one  or  more  PAKs  from  the  configuration
-   database.
-
-   The format of the LIST command is:
-
-   L[IST] [/qualifier=value]
-
-   Qualifiers to the LIST command  select  the  PAKs  on  which  the  command
-   operates. If you use multiple  qualifiers  on  a  LIST,  only  PAKs  which
-   satisfy the values for all the qualifiers display.
-
-   For  more  detailed  information  and   examples,   refer   to   the   LMU
-   qualifiers description.
-
-   Example
-
-   LMU> LIST
-
-   This command LISTs  the  entire  contents  of  the  current  configuration
-   file.
-
-1 MODIFY
-  M[ODIFY]
-   The  MODIFY  command  changes  one  or  more  PAKs  in  the  configuration
-   database. Use the MODIFY command  to  reflect  any  changes  in  the  node
-   specific  information,   or   to   correct   discrepancies   between   the
-   information  entered  with  a  prior  REGISTER  or  MODIFY  and  the   PAK
-   information.
-
-   If your current configuration does not contain  all  the  nodes  specified
-   in  the  PAK,  LMU  is  not  able  to  fill  in   the   node   information
-   automatically. In this case, enter the information  if  it  is  available.
-   Otherwise, leave it blank and MODIFY  the  configuration  again  when  the
-   node becomes available.
-
-   The format of the MODIFY command is:
-
-   M[ODIFY] [/qualifier=value]
-
-   Qualifiers to the MODIFY command select the  PAKs  on  which  the  command
-   operates. If you use multiple qualifiers on  a  MODIFY,  only  PAKs  which
-   satisfy  the  values  for   all   the   qualifiers   are   presented   for
-   modification.
-
-1 REGISTER
-  R[EGISTER]
-   The  REGISTER  command  inserts   the   PAK   information   describing   a
-   configuration into a configuration  file.  Once  you  accurately  REGISTER
-   an appropriate PAK, the system configures  the  product  for  full  normal
-   operation.
-
-   The format of the REGISTER command is:
-
-   R[EGISTER]
-
-   REGISTER prompts for all fields. REGISTER does  not  verify  the  accuracy
-   of the configuration. However,  the  configuration  is  verified  whenever
-   a  process  uses  the  product.  Be  sure   to   enter   all   information
-   accurately  and  exactly,  as  an  incomplete  or  incorrect  PAK   cannot
-   provide normal product operation.
-
-   Warning: when LMU prompts to save  the  license,  it  acts  on  the  first
-   character of the response and does not wait for a <RET>.
-
-   If your current configuration does not contain  all  the  nodes  specified
-   in  the  PAK,  LMU  is  not  able  to  fill  in   the   node   information
-   automatically. In this case, enter the information  if  it  is  available.
-   Otherwise, leave it blank and  MODIFY  the  configuration  when  the  node
-   becomes available.
-
-1 SHOW
-  S[HOW] S[YSTEM]
-   The SHOW SYSTEM  command  presents  the  details  required  to  complement
-   the information supplied by the PAK to REGISTER a configuration.
-
-   The format of the SHOW SYSTEM command is:
-
-   S[HOW] S[YSTEM]
-
-   The SHOW SYSTEM command displays the following information:
-
-   o  Node name
-
-   o  Node id
-
-   o  Hardware Model mnemonic or hexadecimal identifier
-
-   In a VAXcluster, the  display  shows  a  line  for  each  machine.  In  an
-   unclustered   system,   SHOW   SYSTEM   displays   the   node   name    as
-   "stand-alone." The model mnemonic  displays  if  it  is  known,  otherwise
-   the hexadecimal id displays.
-
-1 Qualifiers
-  Qualifiers
-   LMU qualifiers are used with LMU  commands  to  direct  the  system  to  a
-   specific license or PAK.
-
-   The  INITIALIZE,  REGISTER  and  SHOW  SYSTEM  commands  do   not   accept
-   qualifiers. The LIST, MODIFY and DELETE commands  may  act  on  more  than
-   one PAK and take the same selecting  qualifiers.  If  multiple  qualifiers
-   are specified, only PAKs which  satisfy  the  values  for  all  qualifiers
-   are treated as objects of the command.  In  other  words,  the  effect  of
-   multiple qualifiers on the same command works as if there were ANDs.
-
-   LMU qualifiers  may  be  abbreviated  using  enough  characters  from  the
-   beginning of  the  qualifier  to  unambiguously  identify  the  qualifier.
-   LMU qualifiers can always be  abbreviated  to  four  characters  or  less.
-   Greystone  recommends  using  four   characters   or   more   in   command
-   procedure  files  so  commands  introduced  in  future  versions  do   not
-   necessitate  coding  changes.   The   description   for   each   qualifier
-   identifies the  current  minimum  abbreviation  by  showing  the  optional
-   part of the qualifier in square brackets ([]).
-
-   All of the LMU qualifiers  take  arguments.  The  qualifier  is  delimited
-   by an equal sign (=) which is followed by the argument.
-
-2 /ACTIVATION
-  /A[CTIVATION]
-   The  /ACTIVATION  qualifier   selects   PAKs   which   activate   on   a
-   particular date.
-
-   The format for the ACTIVATION qualifier is:
-
-   A[CTIVATION]=date
-
-   The  date  is  of  the   form   [d]d-mon-[yy]yy   and   cannot   contain
-   wildcards.  The  keywords  YESTERDAY,  TODAY  and  TOMORROW   are   also
-   accepted.
-
-   Example
-
-   LMU> LIST/ACTIV=31-oct-1985
-
-   This command LISTs all PAKs  with  an  availability  date  matching  the
-   31st of October, 1985.
-
-2 /CHECKSUM
-  /CH[ECKSUM]
-   The /CHECKSUM qualifier selects all  PAKs  with  checksums  which  match
-   the specified pattern.
-
-   The format for the CHECKSUM qualifier is:
-
-   /CH[ECKSUM]=pattern
-
-   Example
-
-   LMU> MODIFY/CHECKSUM=0-FDCI-AL*
-
-   This  command  selects   any   PAKs   with   checksums   starting   with
-   0-FDCI-AL for modification.
-
-2 /CONFIGURATION_ID
-  /CO[NFIGURATION_ID]
-   The /CONFIGURATION_ID  qualifier  selects  a  particular  PAK  based  on
-   its identifier.
-
-   The format for the CONFIGURATION_ID qualifier is:
-
-   /CO[NFIGURATION_ID]=integer
-
-   Example
-
-   LMU> LIST/CONFIG=1345
-
-   This command LISTs the PAK with the ID 1345.
-
-2 /CREATION
-  /CR[EATION]
-   The  /CREATION  qualifier  selects  PAKs  which  were  REGISTERed  on  a
-   particular date.
-
-   The format for the CREATION qualifier is:
-
-   /CR[EATION]=date
-
-   The  date  is  of  the   form   [d]d-mon-[yy]yy   and   cannot   contain
-   wildcards.  The  keywords  YESTERDAY,  TODAY  and  TOMORROW   are   also
-   accepted.
-
-   Example
-
-   LMU> MODIFY/CREATION=today
-
-   This command presents for modification all PAKs created today.
-
-2 /EXPIRATION
-  /E[XPIRATION]
-   The  /EXPIRATION  qualifier  selects  PAKs  which  have   a   particular
-   EXPIRATION date.
-
-   The format for the EXPIRATION qualifier is:
-
-   /E[XPIRATION]=date
-
-   The  date  is  of  the   form   [d]d-mon-[yy]yy   and   cannot   contain
-   wildcards.  The  keywords  YESTERDAY,  TODAY  and  TOMORROW   are   also
-   accepted.
-
-   Example
-
-   LMU> DELETE/EXPIR=yesterday
-
-   This  command   presents   for   deletion   all   PAKs   which   expired
-   yesterday.
-
-2 /HARDWARE_MODEL
-  /H[ARDWARE_MODEL]
-   The  /HARDWARE_MODEL  qualifier   selects   PAKs   which   configure   a
-   computer of a particular model.
-
-   The format for the HARDWARE_MODEL qualifier is:
-
-   /H[ARDWARE_MODEL]=hexadecimal-integer or mnemonic
-
-   Example
-
-   LMU> DELETE/HARDWARE=VUV2
-
-   or
-
-   LMU> DELETE/HARDWARE=0x8
-   
-   These commands display for possible deletion  all  PAKs  which  cover  a
-   MicroVAX II.
-
-2 /NODE_NUM
-  /NO[DE_NUM]
-   The /NODE_NUM qualifier  selects  PAKs  for  a  computer  based  on  the
-   node number.
-
-   The format for the NODE_NUM qualifier is:
-
-   /NO[DE_NUM]=integer
-
-   Example
-
-   LMU> LIST/NODE=57
-
-   This command LISTs all PAKs which configure node 57.
-
-2 /NUM_SYS
-  /NU[M_SYS]
-   The /NUM_SYS qualifier selects PAKs  which  cover  a  particular  number
-   of computers.
-
-   The format for the NUM_SYS qualifier is:
-
-   /NU[M_SYS]=integer
-
-   Example
-
-   DELETE/NUM_SYS=2
-
-   This  command  presents  for  deletion  all  PAKs   for   configurations
-   which cover two computers.
-
-2 /OPERATOR
-  /O[PERATOR]
-   The /OPERATOR qualifier  selects  PAKs  which  were  REGISTERed  by  VMS
-   user account(s) which match a pattern.
-
-   The format for the OPERATOR qualifier is:
-
-   /O[PERATOR]=pattern
-
-   Example
-
-   LMU> LIST/OPER=SMITH_C
-
-   This command LISTs all PAKs which had been REGISTERed by SMITH_C.
-
-2 /PRODUCT
-  /P[RODUCT]
-   The /PRODUCT qualifier  selects  PAKs  which  configure  products  which
-   match a pattern.
-
-   The format for the PRODUCT qualifier is:
-
-   /P[RODUCT]=pattern
-
-   Example
-
-   LMU> MODIFY/PROD=GT.CX
-
-   This  command  presents  for  modification  all  PAKs  for   the   GT.CX
-   product.
-
-2 /VALUE
-  /VA[LUE]
-   The  /VALUE  qualifier  selects  PAKs  which  authorize   a   particular
-   number of concurrent processes.
-
-   The format for the VALUE qualifier is:
-
-   /VA[LUE]=integer
-
-   Example
-
-   LMU> LIST/VALUE=20
-
-   This command LISTs all PAKs which configure 20 users.
-
-2 /VERSION
-  /VE[RSION]
-   The  /VERSION   qualifier   selects   PAKs   which   authorize   product
-   versions which match a pattern.
-
-   The format for the VERSION qualifier is:
-
-   /VE[RSION]=pattern
-
-   Example
-
-   LMU> MODIFY/VERSION=V2*
-
-   This  command  presents  for  modification  all  PAKs  with  a   version
-   starting with V2.
diff --git a/sr_vvms/load.h b/sr_vvms/load.h
deleted file mode 100644
index 22dad5e..0000000
--- a/sr_vvms/load.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef LOAD_INCLUDED
-#define LOAD_INCLUDED
-
-void bin_load(uint4 begin, uint4 end, struct RAB *inrab, struct FAB *infab);
-void go_load(uint4 begin, uint4 end, struct RAB *inrab, struct FAB *infab);
-void goq_load(uint4 begin, uint4 end, struct FAB *infab);
-void goq_m11_load(struct FAB *infab, char *in_buff, uint4 rec_count, uint4 end);
-void goq_mvx_load(struct FAB *infab, char *in_buff, uint4 rec_count, uint4 end);
-
-#endif /* LOAD_INCLUDED */
diff --git a/sr_vvms/lockdefs.h b/sr_vvms/lockdefs.h
deleted file mode 100644
index 9ed3211..0000000
--- a/sr_vvms/lockdefs.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define MLK_LOGIN(x) ( x->login_time = TAREF1(login_time, 0), x->image_count = image_count)
-#define BLOCKING_PROC_ALIVE(w,x,y,z) (z = get_proc_info(w->blocked->owner,x,&y), ((z == SS$_NONEXPR) || \
-	((z == SS$_NORMAL) && ((x[0] != w->blocked->login_time) || (y != w->blocked->image_count)))))
-#define PROC_ALIVE(w,x,y,z) (z = get_proc_info(w->owner,x,&y), ((z == SS$_NONEXPR) || \
-	((z == SS$_NORMAL) && ((x[0] != w->login_time) || (y != w->image_count)))))
-#define PENDING_PROC_ALIVE(w,x,y,z) (z = get_proc_info(w->process_id,x,&y), (z == SS$_NONEXPR))
diff --git a/sr_vvms/locks.h b/sr_vvms/locks.h
deleted file mode 100644
index a234a94..0000000
--- a/sr_vvms/locks.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* Lock status block declaration.  */
-/* WARNING: be certain any changes in this structure declaration are reflected in gtm_enq and gtm_enqw.  */
-typedef struct {
-	short	cond;
-	short	reserved;
-	uint4	lockid;
-	uint4	valblk[4];
-} lock_sb;
-
-#define MAX_VMS_LOCKS 1024
-
-uint4 gtm_deq(unsigned int lkid, void *valblk, unsigned int acmode, unsigned int flags);
-uint4 gtm_enq(unsigned int efn, unsigned int lkmode, lock_sb *lsb, unsigned int flags,
-	void *resnam, unsigned int parid, void *astadr, unsigned int astprm,
-	void *blkast, unsigned int acmode, unsigned int nullarg);
-uint4 gtm_enqw(unsigned int efn, unsigned int lkmode, lock_sb *lsb, unsigned int flags,
-	void *resnam, unsigned int parid, void *astadr, unsigned int astprm, void *blkast,
-	unsigned int acmode, unsigned int nullarg);
-uint4 ccp_enq(unsigned int efn, unsigned int lkmode, lock_sb *lksb, unsigned int flags,
-	void *resnam, unsigned int parid, void *astadr, unsigned int astprm,
-	void *blkast, unsigned int acmode, unsigned int nullarg);
-uint4 ccp_enqw(unsigned int efn, unsigned int lkmode, lock_sb *lksb, unsigned int flags,
-	void *resnam, unsigned int parid, void *astadr, unsigned int astprm,
-	void *blkast, unsigned int acmode, unsigned int nullarg);
diff --git a/sr_vvms/lp_acquire.c b/sr_vvms/lp_acquire.c
deleted file mode 100644
index f81ab2b..0000000
--- a/sr_vvms/lp_acquire.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <lckdef.h>
-#include <lkidef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "ladef.h"
-#include "vmsdtype.h"
-#include "locks.h"
-#include "gtm_getlkiw.h"
-
-/*
-   lp_acquire.c : lp_acquire = SS$_NORMAL && (lkid, lid) already acquired
-		  lp_acquire = SS$_NORMAL && 0 != lkid && units available
-		  lp_acquire = LP_JOBLIM  && 0 == lkid && no units available
-		  lp_acquire = system call error
-   used in      : Licensed products
- */
-
-GBLREF	int4		process_id;
-
-error_def		(LP_JOBLIM);	/* Job limit exceeded	*/
-
-
-static	const	int4	mode[] = { LCK$K_CWMODE, LCK$K_CWMODE, LCK$K_EXMODE };
-
-int4	lp_acquire(pak *p, int4 lval, int4 lid, int4 *lkid)
-	/* *p => pak record [NOTE: not used!] */
-	/* lval => license value */
-	/* lid -> license ID */
-	/* returns:  lkid => lock ID */
-{
-	unsigned short		iosb[4];
-	uint4			status;
-	int4			i, rsbrefcnt, retlen;
-	vms_lock_sb		lksb[3];
-	struct dsc$descriptor_s	dres[] =
-	{
-		{ SIZEOF(LMLK) - 1, DSC$K_DTYPE_T, DSC$K_CLASS_S, LMLK },
-		{ SIZEOF(int4), DSC$K_DTYPE_T, DSC$K_CLASS_S, &lid },
-		{ SIZEOF(int4), DSC$K_DTYPE_T, DSC$K_CLASS_S, &process_id }
-	};
-	struct
-	{
-		item_list_3	ilist;
-		int4		terminator;
-	} item_list =
-	{
-		{ SIZEOF(int4), LKI$_RSBREFCNT, &rsbrefcnt, &retlen },
-		0
-	};
-
-
-	status = lp_confirm(lid, *lkid);
-	if (SS$_NORMAL != status)
-	{
-		*lkid = 0;
-		if (0 == lid)
-			return LP_JOBLIM;
-
-		for (i = 0;  i < 3;  ++i)
-		{
-			status = gtm_enqw(EFN$C_ENF, mode[i], &lksb[i], LCK$M_SYSTEM, &dres[i], *lkid,
-						NULL, 0, NULL, PSL$C_USER, 0);
-			if (SS$_NORMAL == status)
-				status = lksb[i].cond;
-			if (SS$_NORMAL != status)
-				return status;
-			*lkid = lksb[i].lockid;
-		}
-
-		status = gtm_getlkiw(EFN$C_ENF, &lksb[1].lockid, &item_list, iosb, NULL, 0, 0);
-		if (SS$_NORMAL == status)
-			status = iosb[0];
-		if ((SS$_NORMAL == status) && (rsbrefcnt > lval))
-			status = LP_JOBLIM;
-	}
-
-	return status;
-}
diff --git a/sr_vvms/lp_confirm.c b/sr_vvms/lp_confirm.c
deleted file mode 100644
index 1d78f4f..0000000
--- a/sr_vvms/lp_confirm.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lp_confirm.c : lp_confirm == SS$_NORMAL when the product acquired license
-		  units
-   used in      : Licensed products
- */
-#include "mdef.h"
-#include <ssdef.h>
-#include <lkidef.h>
-#include <efndef.h>
-#include "ladef.h"
-
-#define PROPER(stat) { if (stat==SS$_IVLOCKID) return LP_NOTACQ ;\
-		       else if ((stat & 1)==0) return stat ;}
-
-GBLREF int4	process_id ;
-
-int4 lp_confirm (int4 lid, uint4 lkid)
-/*
-int4	 lid  ;			        license ID
-uint4	 lkid ;				lock ID
-*/
-{
-	error_def	(LP_NOTACQ) ;
-	struct { short bln ; short cod ; char *buf ; int4 *rln ;} itm[3] ;
-	int4 		status ;
-	int4 		iosb[2] ;
-	int4 		parid,len,len1 ;
-	int4		res ;			/* parent lock resource name */
-
-	itm[0].bln= 4 ; itm[0].cod= LKI$_PARENT ; itm[0].buf= &parid ; itm[0].rln= &len ;
-	itm[1].bln= 4 ; itm[1].cod= LKI$_RESNAM ; itm[1].buf= &res   ; itm[1].rln= &len1 ;
-	itm[2].bln = itm[2].cod = 0; itm[2].buf = itm[2].rln = 0;
-
-	if (lkid!=0 && lid!=0)
-	{
-		status= gtm_getlkiw(EFN$C_ENF,&lkid,itm,iosb,0,0,0) ;
-		PROPER(status) ;
-		if (parid!=0 && process_id==res)
-		{
-			status= gtm_getlkiw(EFN$C_ENF,&parid,&itm[1],iosb,0,0,0) ;
-			PROPER(status) ;
-			status= ( lid==res ? SS$_NORMAL : LP_NOTACQ ) ;
-		}
-		else
-		{
-			status= LP_NOTACQ ;
-		}
-	}
-	else
-	{
-		status= LP_NOTACQ ;
-	}
-	return status ;
-}
diff --git a/sr_vvms/lp_id.c b/sr_vvms/lp_id.c
deleted file mode 100644
index 02d39d2..0000000
--- a/sr_vvms/lp_id.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-#include <psldef.h>
-#include <syidef.h>
-#include <lckdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "ladef.h"
-#include "vmsdtype.h"
-#include "locks.h"
-
-uint4	lp_id(uint4 *lkid)
-{
-	struct
-	{
-		item_list_3	ilist[1];
-		int4		terminator;
-	}			syi_list_1;
-	struct dsc$descriptor_s node_dsc;
-	vms_lock_sb		lksb;
-	uint4			node, status;
-	unsigned short		iosb[4], retlen, local_nodename_len;
-	char			node_buff[SIZEOF(LMLK) + 2 * SIZEOF(long)];
-
-	node = 0;
-	syi_list_1.ilist[0].item_code = SYI$_NODE_CSID;
-	syi_list_1.ilist[0].buffer_address = &node;
-	syi_list_1.ilist[0].buffer_length = SIZEOF(node);
-	syi_list_1.ilist[0].return_length_address = &retlen;
-	syi_list_1.terminator = 0;
-	status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list_1, iosb, NULL, 0);
-	if (SS$_NORMAL == status)
-		status = iosb[0];
-	if (SS$_NORMAL == status)
-	{
-		memcpy(node_buff, LMLK, SIZEOF(LMLK) - 1);
-		node_buff[SIZEOF(LMLK) - 1] = '_';
-		i2hex(node, &node_buff[SIZEOF(LMLK)], 2 * SIZEOF(long));
-		node_dsc.dsc$w_length = SIZEOF(LMLK) + 2 * SIZEOF(long);
-		node_dsc.dsc$a_pointer = node_buff;
-		node_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-		node_dsc.dsc$b_class = DSC$K_CLASS_S;
-		status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, &lksb, LCK$M_SYSTEM, &node_dsc, *lkid, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = lksb.cond;
-		if (SS$_NORMAL == status)
-			*lkid = lksb.lockid;
-	}
-	return status;
-}
diff --git a/sr_vvms/lp_licensed.c b/sr_vvms/lp_licensed.c
deleted file mode 100644
index 7fb404b..0000000
--- a/sr_vvms/lp_licensed.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* lp_licensed.c = SS$_NORMAL : product is licensed
-	         = LP_LEXPIR  : license has expired
-		 = LP_NOAVAL  : license not yet available
-		 = LP_INVCSM  : invalid checksum
-   used in       : licensed products
-*/
-#include "mdef.h"
-#include "ladef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "la_encrypt.h"
-#define MAXSHO 32767
-
-int4 lp_licensed(char *h, struct dsc$descriptor *prd, struct dsc$descriptor *ver, int4 mdl, int4 nid,
-		int4 *lid, int4 *x, int4 *days, pak *p)
-/* h is a pointer to the data base */
-/* prd is a pointer to a descriptor that in turn points to the product name */
-/* ver is a pointer to a descriptor that in turn points to the version	*/
-/* mdl is a hardware model id */
-/* nid is a cluster node ID */
-/* lid is a pointer to a license ID (returned) */
-/* x is a pointer to a license value (returned) */
-/* days is a pointer to a number of days until expiration (returned) */
-/* p is a pointer to a pak record (returned) */
-{
-	int4	memcmp() ;
-	void	lm_convert() ;
-	error_def(LP_LEXPIR) ;
-	error_def(LP_NOAVAL) ;
-	error_def(LP_NOCONF) ;
-	error_def(LP_INVCSM) ;
-	la_prolog *prol;				/* db prolog	     */
-	int4 	*psid ;
-	int4 	*pnid ;
-	int	k,j ;
-	int4 	status;
-	short 	offset  ;
-	int4 	d0,dd,d1;
-	bool 	match,pmat,vmat,nmat,valid ;
-	int4	bcs[3]= {0,0,0} ;
-	int4	pcs[3]= {0,0,0} ;
-
-	*lid= *x= *days= 0 ;
-	prol= h ;
-	p= h ;
-	offset= SIZEOF(la_prolog) ;
-	match= FALSE ;
-	j= 0 ;
-	while (!match && j != prol->N)
-	{
-		p = (char *)p + offset ;
-		pmat = (p->pd.nam[prd->dsc$w_length]==0) && (memcmp(prd->dsc$a_pointer,p->pd.nam,prd->dsc$w_length)==0) ;
-		vmat = (p->pd.ver[0]==0) || (memcmp(ver->dsc$a_pointer,p->pd.ver,ver->dsc$w_length)==0) ;
-		if  (pmat && vmat)
-		{
-			psid= (char *)p + p->ph.l[3] ;
-			pnid= (char *)p + p->ph.l[4] ;
-			pcs[0]= pcs[1]= 0 ;
-			lm_convert(p->ph.cs,pcs) ;
-			k= 0 ;
-			nmat= FALSE ;
-			while (!nmat && k!=p->pd.L)
-			{
-				nmat= (nid==pnid[k] && (mdl==psid[k] || psid[k]==0));
-				k++ ;
-			}
-		}
-		match= pmat && vmat && nmat ;
-		offset= p->ph.l[0] ;
-		j++ ;
-	}
-	if (match)
-	{
-		*lid= p->pd.lid ;
-		*x= (p->pd.x==0 ? MAXSHO : p->pd.x) ;
-		valid= la_encrypt(p->ph.n,&(p->pd),(p->ph.l[4] - p->ph.l[2]),bcs) ;
-		valid= valid && (bcs[0]==pcs[0]) && (bcs[1]==pcs[1]) ;
-		if (valid)
-		{
-			if (p->pd.t1[1]==0)			/* Unlimited License */
-			{
-				*days= MAXSHO ;
-				status= SS$_NORMAL ;
-			}
-			else
-			{
-				lib$day(&dd,0)	;		/* Current days    */
-				lib$day(&d1,p->pd.t1) ;		/* Expiration days */
-				if (p->pd.t0[1])		/* Available days  */
-					lib$day(&d0, p->pd.t0) ;
-				else
-					d0 = 0;
-				*days= d1 - dd ;
-				status = ( dd<d0 ? LP_NOAVAL : ( dd<d1 ? SS$_NORMAL : LP_LEXPIR )) ;
-			}
-		}
-		else
-		{
-			status= LP_INVCSM ;
-		}
-	}
-	else
-	{
-		status= LP_NOCONF ;
-	}
-	return status;
-}
diff --git a/sr_vvms/lperrors.msg b/sr_vvms/lperrors.msg
deleted file mode 100644
index 1c573fc..0000000
--- a/sr_vvms/lperrors.msg
+++ /dev/null
@@ -1,22 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2001 Sanchez Computer Associates, Inc.	!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-	.FACILITY	GTLP,240/PREFIX=LP_
-	.TITLE	LPERRORS	 Messages for GTLP, VMS EDITION
-NOCNFDB <No configuration data base>/fao=0/fatal
-NOCONF <No configuration for the product>/fao=1/fatal
-NOVERS <No configuration for the product version>/fao=0/fatal
-LEXPIR <The configuration has expired>/fao=0/fatal
-NOAVAL <The configuration is not yet available>/fao=0/fatal
-INVCSM <Invalid configuration>/fao=0/fatal
-NOTACQ <No configuration units acquired>/fao=0/fatal
-BADRES <Bad resource>/fao=0/fatal
-JOBLIM <Job limit exceeded>/fao=0/fatal
-	.END
diff --git a/sr_vvms/m_recall.c b/sr_vvms/m_recall.c
deleted file mode 100644
index a2a482d..0000000
--- a/sr_vvms/m_recall.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "comline.h"
-#include "gtm_caseconv.h"
-#include "m_recall.h"
-
-#define DEF_BUF_SZ		1024	/* from IOTT_OPEN.C */
-#define	CCPROMPT 		0x00010000
-#define ERR_RECBADNUM		"Recall error: bad numeric argument format"
-#define ERR_RECNOTFND		"Recall error: command not found"
-#define ERR_RECOUTOFRANGE	"Recall error: numeric argument out of range"
-
-GBLREF mstr		*comline_base;
-GBLREF int		comline_index;
-
-int m_recall (short len, char *addr, int4 *index, short tt_channel)
-{
-	unsigned char	*cp, *cp_top;
-	unsigned char	recbuf[8];
-	unsigned char	faobuf[DEF_BUF_SZ];
-	unsigned short	reclen, arglen, iosb[4];
-	unsigned short	faolen;
- 	unsigned int	n, cl;
-	$DESCRIPTOR	(faodsc, faobuf);
-	static readonly $DESCRIPTOR	(ctrstr, "!2SL !AD");
-
-	cp = addr; cp_top = cp + len;
-	while (cp < cp_top && *cp != SP && *cp != '\t')
-		cp++;
-	reclen = (char *) cp - addr;
-	if (reclen != 3 && reclen != 6)
-		return FALSE;
-
-	lower_to_upper (recbuf, addr, reclen);
-	if (memcmp (recbuf, "RECALL", reclen))
-		return FALSE;
-
-	while (cp < cp_top && (*cp == SP || *cp == '\t'))
-		cp++;
-	if (cp == cp_top)
-	{
-		flush_pio ();
-		cl = comline_index;
-		n = 1;
-		do
-		{
-			cl = clmod (cl - 1);
-			if (!comline_base[cl].len)
-				break;
-			sys$fao(&ctrstr, &faolen, &faodsc, n++, comline_base[cl].len, comline_base[cl].addr);
-
-			/* don't do status on terminal qiow'w in this module,
-			as errors should be unlikely and would cause messy exit from dm_read
-			if you don't like it revise the interface between the routines */
-
- 			sys$qiow(EFN$C_ENF, tt_channel, IO$_WRITEVBLK, &iosb, 0, 0, faobuf, faolen, 0, CCPROMPT, 0, 0);
-		} while (cl != comline_index);
-		assert (!comline_base[cl].len || (n == MAX_RECALL + 1 && cl == comline_index));
-		*index = 0;
-		return TRUE;
-	}
-	/* cp now points to beginning of arg */
-
-	/* throw away trailing whitespace */
-	while (*--cp_top == SP || *cp_top == '\t')
-		assert(cp < cp_top);
-	cp_top++;
-	arglen = cp_top - cp;
-
-	if ('0' <= *cp && *cp <= '9')	/* numeric argument */
-	{
-		n = 0;
-		while (cp < cp_top && *cp != SP && *cp != '\t')
-		{
-			n *= 10;
-			if ('0' <= *cp && *cp <= '9')
-				n += (*cp++ - '0');
-			else
-			{
-				sys$qiow(EFN$C_ENF, tt_channel, IO$_WRITEVBLK, &iosb, 0, 0,
-					ERR_RECBADNUM, sizeof ERR_RECBADNUM - 1, 0, CCPROMPT, 0, 0);
-				*index = -1;
-				return TRUE;
-			}
-		}
-		if (n <= 0 || n > MAX_RECALL)
-		{
-			sys$qiow(EFN$C_ENF, tt_channel, IO$_WRITEVBLK, &iosb, 0, 0,
-				ERR_RECOUTOFRANGE, sizeof ERR_RECOUTOFRANGE - 1, 0, CCPROMPT, 0, 0);
-			*index = -1;
-			return TRUE;
-		}
-		assert (arglen == 1 || arglen == 2);
-	}
-	else				/* string argument */
-	{
-		cl = comline_index;
-		n = 1;
-		do
-		{
-			cl = clmod (cl - 1);
-			if (!comline_base[cl].len) break;
-			if (!memcmp (comline_base[cl].addr, cp, arglen))
-				break;
-			n++;
-		} while (cl != comline_index);
-		if (!comline_base[cl].len || cl == comline_index)
-		{
-			sys$qiow(EFN$C_ENF, tt_channel, IO$_WRITEVBLK, &iosb, 0, 0,
-				ERR_RECNOTFND, sizeof ERR_RECNOTFND - 1, 0, CCPROMPT, 0, 0);
-			*index = -1;
-			return TRUE;
-		}
-	}
-	assert (0 < n && n <= MAX_RECALL);
-	*index = n;
-	return TRUE;
-}
diff --git a/sr_vvms/m_recall.h b/sr_vvms/m_recall.h
deleted file mode 100644
index f55205a..0000000
--- a/sr_vvms/m_recall.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef M_RECALL_INCLUDED
-#define M_RECALL_INCLUDED
-
-int m_recall(short len, char *addr, int4 *index, short tt_channel);
-
-#endif /* M_RECALL_INCLUDED */
diff --git a/sr_vvms/map_sym.c b/sr_vvms/map_sym.c
deleted file mode 100644
index 2544f07..0000000
--- a/sr_vvms/map_sym.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* map_sym.c VMS - load function from shared library for various collation symbols */
-/* Return TRUE/FALSE based on mapping success */
-
-#include <descrip.h>
-#include <ssdef.h>
-
-#include "mdef.h"
-#include "error.h"
-#include "collseq.h"
-#include "gtmmsg.h"
-
-#define CHECK_ERR_STAT		\
-{				\
-	REVERT;			\
-	return 	FALSE;		\
-}
-
-STATICFNDCL CONDITION_HANDLER(map_sym_ch);
-
-error_def(ERR_ASSERT);
-error_def(ERR_COLLFNMISSING);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_VMSMEMORY);
-
-boolean_t map_collseq(mstr *fspec, collseq *ret_collseq)
-{
-	struct dsc$descriptor	fspec_desc;
-	struct dsc$descriptor	symbol_desc;
-	int			status;
-	boolean_t		coll_lib_found = FALSE;
-	ch_ret_type		map_sym_ch();
-        static MSTR_CONST(xform_sym_1, "gtm_ac_xform_1");
-        static MSTR_CONST(xback_sym_1, "gtm_ac_xback_1");
-        static MSTR_CONST(xform_sym, "gtm_ac_xform");
-        static MSTR_CONST(xback_sym, "gtm_ac_xback");
-        static MSTR_CONST(verify_sym, "gtm_ac_verify");
-        static MSTR_CONST(version_sym, "gtm_ac_version");
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	ESTABLISH(map_sym_ch);
-	fspec_desc.dsc$w_length = fspec->len;
-	fspec_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	fspec_desc.dsc$b_class = DSC$K_CLASS_S;
-	fspec_desc.dsc$a_pointer = fspec->addr;
-	symbol_desc.dsc$w_length = xform_sym_1.len;
-	symbol_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	symbol_desc.dsc$b_class = DSC$K_CLASS_S;
-	symbol_desc.dsc$a_pointer = xform_sym_1.addr;
-	status = lib$find_image_symbol(&fspec_desc, &symbol_desc, &(ret_collseq->xform), 0);
-	if (status & 1)
-	{
-		symbol_desc.dsc$w_length = xback_sym_1.len;
-		symbol_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-		symbol_desc.dsc$b_class = DSC$K_CLASS_S;
-		symbol_desc.dsc$a_pointer = xback_sym_1.addr;
-		status = lib$find_image_symbol(&fspec_desc, &symbol_desc, &(ret_collseq->xback), 0);
-		if (status & 1)
-		{
-			coll_lib_found = TRUE;
-			ret_collseq->argtype = 1;
-		} else
-		{
-			if (!TREF(skip_gtm_putmsg))
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_COLLFNMISSING, 3,
-						LEN_AND_LIT("gtm_ac_xback_1()"), ret_collseq->act);
-			CHECK_ERR_STAT;
-		}
-	}
-	if (FALSE == coll_lib_found)
-	{
-		symbol_desc.dsc$w_length = xform_sym.len;
-		symbol_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-		symbol_desc.dsc$b_class = DSC$K_CLASS_S;
-		symbol_desc.dsc$a_pointer = xform_sym.addr;
-		status = lib$find_image_symbol(&fspec_desc, &symbol_desc, &(ret_collseq->xform), 0);
-		if (status & 1)
-		{
-			symbol_desc.dsc$w_length = xback_sym.len;
-			symbol_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-			symbol_desc.dsc$b_class = DSC$K_CLASS_S;
-			symbol_desc.dsc$a_pointer = xback_sym.addr;
-			status = lib$find_image_symbol(&fspec_desc, &symbol_desc, &(ret_collseq->xback), 0);
-			if (status & 1)
-			{
-				coll_lib_found = TRUE;
-				ret_collseq->argtype = 0;
-			} else
-			{
-				if (!TREF(skip_gtm_putmsg))
-					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_COLLFNMISSING, 3,
-							LEN_AND_LIT("gtm_ac_xback()"), ret_collseq->act);
-				CHECK_ERR_STAT;
-			}
-		} else /* Neither xform_1 or xform is found */
-			CHECK_ERR_STAT;
-	}
-	assert(TRUE == coll_lib_found);
-	symbol_desc.dsc$w_length = verify_sym.len;
-	symbol_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	symbol_desc.dsc$b_class = DSC$K_CLASS_S;
-	symbol_desc.dsc$a_pointer = verify_sym.addr;
-	status = lib$find_image_symbol(&fspec_desc, &symbol_desc, &(ret_collseq->verify), 0);
-	if (!(status & 1))
-		CHECK_ERR_STAT;
-
-	symbol_desc.dsc$w_length = version_sym.len;
-	symbol_desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	symbol_desc.dsc$b_class = DSC$K_CLASS_S;
-	symbol_desc.dsc$a_pointer = version_sym.addr;
-	status = lib$find_image_symbol(&fspec_desc, &symbol_desc, &(ret_collseq->version), 0);
-	if (!(status & 1))
-		CHECK_ERR_STAT;
-	REVERT;
-	return TRUE;
-}
-
-STATICFNDEF CONDITION_HANDLER(map_sym_ch)
-{
-	int4 	status;
-
-	START_CH(FALSE);
-
-	if (DUMP)
-		NEXTCH;
-	mch->CHF_MCH_SAVR0 = SIGNAL;	/* return status from lib$find_image_symbol to map_sym */
-	if ((status = sys$unwind(&mch->CHF_MCH_DEPTH, 0)) != SS$_NORMAL)
-		NEXTCH;
-}
diff --git a/sr_vvms/mapdb.awk b/sr_vvms/mapdb.awk
deleted file mode 100644
index dacde4b..0000000
--- a/sr_vvms/mapdb.awk
+++ /dev/null
@@ -1,74 +0,0 @@
-BEGIN	{
-		dontprint = 0;
-		start = 0;
-		module = ""
-		endoffset = "";
-	}
-$4 == "Synopsis"					{ synopsis_section = $2; dontprint += 3; }
-$1 == "
"						{ dontprint = 6; }
-$1 == "$CODE$"						{ dontprint = 1; }
-dontprint						{ dontprint--; next; }
-synopsis_section == "Object"	{
-					if ($2 == "")
-					{
-						module = $1;
-						next;
-					} else if (module == "")
-					{
-						module = $1;
-						precreator = $6;
-						creator = $7;
-					} else
-					{
-						precreator = $5;
-						creator = $6;
-					}
-					if (creator == "Message")
-						filext[module] = ".MSG";
-					else if (precreator == "MACRO-64")
-						filext[module] = ".M64";
-					else if (creator == "AMAC")
-						filext[module] = ".MAR";
-					else
-						filext[module] = ".C";
-					module = "";
-					next;
-				}
-$1 == "$CODE"			{ start = 1; }
-$1 == "$BSS$"			{ start = 0; }
-$1 == "$DATA$"			{ start = 0; }
-$1 == "$LITERAL$"		{ start = 0; }
-$1 == "$READONLY$"		{ start = 0; }
-$1 == "$READONLY_ADDR$"		{ start = 0; }
-$NF == "MOD"			{ next; }		# e.g. lines starting with $LINKAGE, $SYMVECT, _AMAC$LINKAGE, etc.
-start		{
-			if ($1 != "" && $2 == "")
-			{
-				module = $1;
-			} else
-			{
-				if (module == "")
-				{
-					module = $1;
-					begin = $2;
-					end = $3;
-					octa_field = $7;
-				} else
-				{
-					begin = $1;
-					end = $2;
-					octa_field = $6;
-				}
-				if (octa_field == "OCTA")
-				{
-					gsub("_", "", image);
-					printf "\tset ^%s(\"%s\")=\"%s%s\"\n", image, begin, module, filext[module];
-					endoffset = end;
-				}
-				module = "";
-			}
-		}
-END	{
-		if (endoffset != "")
-			printf "\tset ^%s(\"%s\")=\"%s%s\"\n", image, endoffset, "IMAGE", ".END";
-	}
diff --git a/sr_vvms/mapoff.m b/sr_vvms/mapoff.m
deleted file mode 100644
index eae2505..0000000
--- a/sr_vvms/mapoff.m
+++ /dev/null
@@ -1,115 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2013 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-mapoff(imgoff); get module corresponding to img+offset and print it out
-	;
-	; ---------- print null string and return if input is null ---------------
-	i imgoff="" write ""  quit
-	;
-	; ---------- get image and offset ------------
-	set image=$piece(imgoff,"+",1)
-	if (image'=imgoff) set offset=$piece(imgoff,"+",2)
-	else  set offset=""
-	set image=$tr(image," ","")	; remove blank space
-	;
-	; ---------- find out if image is part of standard image list -------------
-	set imagelst="CMISHR|CRASHANDBURN|DDPGVUSR|DDPSERVER|DSE|GDE|GTCMDDPSTOP|GTCM_SERVER|GTCM_STOP|GTMSECSHR|GTMSHR|LKE|MUPIP"
-	set index=0
-	for i=1:1:$length(imagelst,"|") quit:index'=0  do
-	.	if $piece(imagelst,"|",i)=image set index=i
-	;
-	; ---------- print imgoff as it was input if image could not be found in imagelst -------
-	if index=0 write imgoff  quit
-	;
-	; ---------- extract module from image map database and print it out ----------
-	set image=$tr(image,"_","")
-	set str="^"_image
-	if (0=$d(str)) write "Error : gtm$map:mapdb.dat not built. Run @gtm$tools:buildmapdb.com first. Exiting...",!  quit
-	set offset=$j(offset,8)
-	set offset=$tr(offset,"abcdefghijklmnopqrstuvwxyz ","ABCDEFGHIJKLMNOPQRSTUVWXYZ0")
-	;
-	s endoffset=$order(@str@(""),-1)
-	s dendoffset=$$FUNC^%HD(endoffset)
-	set doffset=$$FUNC^%HD(offset)
-	if doffset>dendoffset write imgoff,!  quit ;
-	if (0'=$d(@str@(offset))) set boffset=offset
-	else  set boffset=$order(@str@(offset),-1)
-	if boffset="" write imgoff,!  quit  ;
-	set bdoffset=$$FUNC^%HD(boffset)
-	set deltaoff=doffset-bdoffset
-	set delta=$$FUNC^%DH(deltaoff)
-	set delta=$j(delta,8)
-	set delta=$tr(delta,"abcdefghijklmnopqrstuvwxyz ","ABCDEFGHIJKLMNOPQRSTUVWXYZ0")
-	set module=@str@(boffset)
-	set modulestr=$j(module,20)
-	set extension=$piece(module,".",2)
-	set extension=$tr(extension,"abcdefghijklmnopqrstuvwxyz ","ABCDEFGHIJKLMNOPQRSTUVWXYZ0")
-	if extension'="C" write imgoff,modulestr,!  quit
-	if $d(^offset(module))=0  d initoff(module)
-	if $d(^offset(module))=0  write "Error creating ^offset(",module,") using initoff^mapoff(",module,")",!  quit
-	set origdelta=$extract(delta,5,8)
-	if (0=$d(^offset(module,delta))) set delta=$order(^offset(module,delta),-1)
-	s sdelta=$extract(delta,5,8)
-	write imgoff,modulestr," : line ",$j(^offset(module,delta,0),3)," : ",boffset,"+",origdelta
-	write "   [listline ",$j(^offset(module,delta,1),4)," : ",boffset,"+",sdelta,"]",!
-	q
-	;
-initoff(module)
-	set dev="nl:"
-	open dev
-	use dev
-	set head=$piece(module,".")
-	set name="m"_$e($j,$length($j)-6,$length($j))
-	set outfile="gtm$map:"_name_".com"
-	open outfile:newversion
-	use outfile
-	; It is important that NO warnings are issued by the compiler as otherwise this tool's line# mapping scheme fails.
-	; Hence the /nowarn below.
-	write "$ common_options := /standard=vaxc/share/assume=nowrit/"
-	write "float=g_float/inc=(here:,gtm$src:,decw$include,tcpip$examples:)/nowarn",!
-	write "$ ccdbg := cc'common_options'/define=(debug,nolicense)/debug/nooptimize",!
-	write "$ ccpro := cc'common_options'",!
-	write "$    ",!
-	write "$ image = f$trnlnm(""gtm$exe"")",!
-	write "$ if ((image .nes. ""GTM$PRO"") .and. (image .nes. ""GTM$DBG""))",!
-	write "$ then",!
-	write "$       write sys$output ""gtm$exe should be either gtm$pro or gtm$dbg. Exiting...""",!
-	write "$       exit",!
-	write "$ endif ",!
-	write "$ set def gtm$obj",!
-	write "$ if (image .eqs. ""GTM$PRO"")",!
-	write "$ then",!
-	write "$        ccpro/machine/list/noobj gtm$src:"_module,!
-	write "$ endif ",!
-	write "$ if (image .eqs. ""GTM$DBG"")",!
-	write "$ then",!
-	write "$       ccdbg/machine/list/noobj gtm$src:"_module,!
-	write "$ endif ",!
-	write "$",!
-	write "$ gawk -v module="""_module_""" -f gtm$tools:mapoffset.awk gtm$obj:"_head_".lis >gtm$map:"_name_".m",!
-	write "$ gtm",!
-	write "if $e($zv,6,9)]""V4.0"" d ^"_name_"  quit",!
-	write "; versions <= V4.0 complain mapdb.m has too many literals. so we xecute all contents of mapdb.m instead",!
-	write "set file=""gtm$map:"_name_".m"" open file use file read str",!
-	write "for  quit:str=""""  xecute str  read str",!
-	write "$ ",!
-	close outfile
-	use $principal
-	set zsystr="zsy ""@gtm$map:"_name_""""
-	;write zsystr,!
-	xecute zsystr
-	zsy "delete/nolog gtm$map:"_name_".com.,"_name_".m."
-	if $e($zv,6,9)]"V4.0" zsy "delete/nolog gtm$map:"_name_".obj."
-	;
-	;write $j(module,24)," ",offset," ",boffset," ",delta,!
-	;
-	use $p
-	close dev
-	quit
diff --git a/sr_vvms/mapoffset.awk b/sr_vvms/mapoffset.awk
deleted file mode 100644
index 08658ab..0000000
--- a/sr_vvms/mapoffset.awk
+++ /dev/null
@@ -1,32 +0,0 @@
-BEGIN	{
-		dontprint = 0; insrclist = 1; cursrcline = 1; listline = 0;
-	}
-$1 == ""						{ dontprint = 1; }
-$1 == "
"						{ dontprint = 1; }
-$1 == "Routine" && $2 == "Size:"			{ dontprint = 1; }
-$1 == "Source" && $2 == "Listing"			{ dontprint = 3; }
-$1 == "Machine" && $2 == "Code" && $3 == "Listing"	{ dontprint = 3; }
-$1 == ".PSECT" && $2 == "$LINK$,"			{ exit; }
-$1 == ".PSECT"  					{ insrclist = 0; next; }
-dontprint						{ dontprint--; next; }
-insrclist	{
-			sub("^[ 0-9][ 0-9][ 0-9][ 0-9][ 0-9][ 0-9][ 0-9][X\t]","",$0);
-			if (srcline[$1] == "")
-				srcline[$1] = cursrcline++;
-			next;
-		}
-!insrclist	{
-			sub("^\t","        ",$0);	# replace tabs with spaces at the beginning
-			offset = substr($0, 10, 8);
-			gsub(" ", "0", offset);
-			lastbutone = NF - 1;
-			# do not consider usages like "; R28" as a listing line number
-			if (($lastbutone == ";") && (substr($NF, 1, 1) != "R"))
-			{
-				listline = +$NF;	# the "+" is to typecast $NF into a number (instead of a string)
-				printf "\tset ^offset(\"%s\",\"%s\",0)=%d\n", module, offset, srcline[listline];
-				printf "\tset ^offset(\"%s\",\"%s\",1)=%d\n", module, offset, listline;
-			}
-		}
-END	{
-	}
diff --git a/sr_vvms/mcompile.c b/sr_vvms/mcompile.c
deleted file mode 100644
index cb37ac5..0000000
--- a/sr_vvms/mcompile.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* DO NOT INCLUDE MDEF, IN ORDER TO AVOID UNDEF ERR_ASSERT */
-mcompile()
-{
-	void	gtm$compile();
-
-	gtm$compile();
-}
diff --git a/sr_vvms/mdefsa.h b/sr_vvms/mdefsa.h
deleted file mode 100644
index 4cdf71c..0000000
--- a/sr_vvms/mdefsa.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MDEFSA_included
-#define MDEFSA_included
-#include "iosb_disk.h"
-
-/* # define SHORT_SLEEP(x) hiber_start(x); */
-/* Macros on struct dsc$descriptor_s */
-#define LEN_STR_OF_DSC(d)	((d).dsc$w_length), ((d).dsc$a_pointer)
-#define STR_LEN_OF_DSC(d)	((d).dsc$a_pointer), ((d).dsc$w_length)
-#define STR_OF_DSC(d)		((d).dsc$a_pointer)
-#define LEN_OF_DSC(d)		((d).dsc$w_length)
-#define	DSC_CPY(to, from)	memcpy(STR_OF_DSC(to), STR_OF_DSC(from), LEN_OF_DSC(from));			\
-				LEN_OF_DSC(to) = LEN_OF_DSC(from)
-#define DSC_APND_LIT(d, lit)	memcpy(STR_OF_DSC(d) + LEN_OF_DSC(d), lit, SIZEOF(lit) - 1);			\
-				LEN_OF_DSC(d) += SIZEOF(lit) - 1
-#define DSC_APND_STR(d, str)	memcpy(STR_OF_DSC(d) + LEN_OF_DSC(d), str, strlen(str));			\
-				LEN_OF_DSC(d) += strlen(str)
-#define DSC_APND_DSC(d, dsc)	memcpy(STR_OF_DSC(d) + LEN_OF_DSC(d), STR_OF_DSC(dsc), LEN_OF_DSC(dsc));	\
-				LEN_OF_DSC(d) += LEN_OF_DSC(dsc)
-#define MVAL_TO_DSC(v, d)	(d).dsc$a_pointer = (v)->str.addr, (d).dsc$w_length = (v)->str.len
-#define DSC_TO_MVAL(d, v)	(v)->str.addr = (d).dsc$a_pointer, (v)->str.len = (d).dsc$w_length
-
-/* DSK_WRITE macro needs "efn.h" to be included. Use this flavor if
-   writing from the cache. Note that it is possible that the sys$synch()
-   call follows a sys$qiow in dsk_write if in compabitility mode and
-   no reformat buffers were available (SE 04/2005 V5.0)
-*/
-#define	DSK_WRITE(reg, blk, cr, status)				\
-{								\
-	io_status_block_disk	iosb;				\
-								\
-	status = dsk_write(reg, blk, cr, 0, 0, &iosb);		\
-	if (status & 1)						\
-	{							\
-		status = sys$synch(efn_bg_qio_write, &iosb);	\
-		if (SS$_NORMAL == status)			\
-			status = iosb.cond;			\
-	}							\
-}
-/* Use this flavor if writing direct from storage (not cache buffer).
-   Note that dsk_write_nocache() always does a synchronous write.
-*/
-#define	DSK_WRITE_NOCACHE(reg, blk, ptr, odv, status)			\
-{									\
-	io_status_block_disk	iosb;					\
-								        \
-	status = dsk_write_nocache(reg, blk, ptr, odv, 0, 0, &iosb);	\
-	if (status & 1)							\
-		status = iosb.cond;					\
-}
-
-#define CHECK_CHANNEL_STATUS(stat, chan_id)			\
-{								\
-	GBLREF	uint4	gtmDebugLevel;				\
-	GBLREF	uint4	check_channel_status;			\
-	GBLREF	uint4	check_channel_id;			\
-								\
-	if ((SS$_IVCHAN == stat) || (SS$_IVIDENT == stat))	\
-	{							\
-		check_channel_status = stat;			\
-		check_channel_id = chan_id;			\
-		if (gtmDebugLevel)				\
-			verifyAllocatedStorage();		\
-		GTMASSERT;					\
-	}							\
-}
-
-#define DOTM                    ".M"
-#define DOTOBJ                  ".OBJ"
-#define	GTM_DIST		"GTM$DIST"
-
-#endif /* MDEFSA_included */
diff --git a/sr_vvms/mem_access.c b/sr_vvms/mem_access.c
deleted file mode 100644
index 216849e..0000000
--- a/sr_vvms/mem_access.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "mem_access.h"
-
-#define	PRT$C_NA	0
-
-/* Set a region of memory to be inaccessable */
-void set_noaccess(unsigned char *na_page[2], unsigned char *prvprt)
-/*
-unsigned char *na_page[2];		array of addresses: the low and high addresses to be protected
-unsigned char *prvprt;			A place to save the previous protection, should the caller later
-					   wish to restore the protection
-*/
-{
-	unsigned	status;
-	status = sys$setprt (na_page, 0, 0, PRT$C_NA, prvprt);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	return;
-}
-
-/* Return memory protection to the state of affairs which existed prior to a call to set_noaccess */
-void reset_access(unsigned char *na_page[2], unsigned char oldprt)
-/*
-unsigned char *na_page[2];		array of addresses: the low and high addresses to be protected
-unsigned char oldprt;			A place to save the previous protection, should the caller later
-					   wish to restore the protection
-*/
-{
-	unsigned	status;
-	status = sys$setprt (na_page, 0, 0, oldprt, 0);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	return;
-}
diff --git a/sr_vvms/mem_list.c b/sr_vvms/mem_list.c
deleted file mode 100644
index f1696d7..0000000
--- a/sr_vvms/mem_list.c
+++ /dev/null
@@ -1,328 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>	/* for SS$_NORMAL */
-#include <jpidef.h>
-#include <psldef.h>	/* for PSL$C_USER */
-#include <prtdef.h>	/* for PRT$C_NA   */
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "ccp.h"
-#include "vmsdtype.h"
-#include "mem_list.h"
-#include "gtm_logicals.h"
-
-GBLREF mem_list *mem_list_head;
-GBLREF uint4	process_id;
-GBLREF uint4	gtm_memory_noaccess_defined;	/* count of the number of GTM_MEMORY_NOACCESS_ADDR logicals which are defined */
-GBLREF uint4	gtm_memory_noaccess[GTM_MEMORY_NOACCESS_COUNT];	/* see VMS gtm_env_init_sp.c */
-
-OS_PAGE_SIZE_DECLARE
-
-error_def(ERR_SHRMEMEXHAUSTED);
-
-/* forward declarations */
-
-mem_list *coalesce_prev(mem_list *ml_ptr);
-void coalesce_next(mem_list *ml_ptr);
-mem_list *check_avail(int4 req_pages);
-
-/*-----------------------------------------------------------------------
-  coalesce this block with the previous block if it is free and adjacent
-  to the current block's address space.
-  Return the pointer to the previous link, if it got coalesced
-  ----------------------------------------------------------------------*/
-
-mem_list *coalesce_prev(mem_list *ml_ptr)
-{
-	mem_list *ml_prev = ml_ptr->prev;
-
-	assert(ml_ptr->free);
-	if (NULL != ml_prev && ml_prev->free &&
-		(ml_prev->addr == ml_ptr->addr - (ml_prev->pages * OS_PAGELET_SIZE)))
-	{
-		ml_prev->next = ml_ptr->next;
-		if (ml_prev->next)
-			ml_prev->next->prev = ml_prev;
-		ml_prev->pages += ml_ptr->pages;
-		free(ml_ptr);
-		return ml_prev;
-	}
-	return ml_ptr;
-}
-
-/*-----------------------------------------------------------------------
-  coalesce next block with this block if it is free and adjacent to the
-  current block's address space.
-  ----------------------------------------------------------------------*/
-
-void coalesce_next(mem_list *ml_ptr)
-{
-	mem_list *ml_next = ml_ptr->next;
-	if (NULL != ml_next && ml_next->free &&
-		(ml_next->addr == ml_ptr->addr + (ml_ptr->pages * OS_PAGELET_SIZE)))
-	{
-		ml_ptr->next = ml_next->next;
-		if(ml_ptr->next)
-			ml_ptr->next->prev = ml_ptr;
-		ml_ptr->pages += ml_next->pages;
-		free(ml_next);
-	}
-}
-
-/*-----------------------------------------------------------------------
-  add a link at the end of doubly linked list,
-  ----------------------------------------------------------------------*/
-
-void add_link(int4 size, int4 inadr)
-{
-	mem_list *ml_ptr, *ml_prev;
-
-        for (ml_prev = NULL, ml_ptr = mem_list_head;
-             ml_ptr != NULL;
-             ml_prev = ml_ptr, ml_ptr = ml_ptr->next)
-		;
-
-	ml_ptr = (mem_list *)malloc(SIZEOF(mem_list));
-	ml_ptr->prev = ml_prev;
-	ml_ptr->next = NULL;
-	if (mem_list_head)
-		ml_prev->next = ml_ptr;
-	else
-		mem_list_head = ml_ptr;
-	ml_ptr->pages = size;
-	ml_ptr->free = FALSE;
-	ml_ptr->addr = inadr;
-
-}
-
-/*-----------------------------------------------------------------------
-  check mem_list, to see if an exact sized chunk is available.
-  Return pointer to the appropriate link if space is available, or NULL
-  ----------------------------------------------------------------------*/
-
-mem_list *check_avail(int4 req_pages)
-{
-	mem_list *ml_ptr;
-
-        for (ml_ptr = mem_list_head; ml_ptr != NULL; ml_ptr = ml_ptr->next)
-	{
-                if (ml_ptr->free  &&  ml_ptr->pages == req_pages)
-                        break;
-	}
-	return ml_ptr;
-}
-
-/*-----------------------------------------------------------------------
-  check the state of a particular chunk of va. If the required chunk is
-  in the list and it is free, it returns TRUE and FALSE otherwise.
-  ----------------------------------------------------------------------*/
-
-boolean_t is_va_free(uint4 outaddrs)
-{
-	mem_list *ml_ptr;
-
-        for (ml_ptr = mem_list_head; ml_ptr; ml_ptr = ml_ptr->next)
-                if (outaddrs == ml_ptr->addr)
-                        break;
-	return(NULL != ml_ptr && TRUE == ml_ptr->free);
-}
-
-/*-----------------------------------------------------------------------
-  expand the address space. If an exactly enough free chunk is already available
-  from previous activities, reuse it,
-  ----------------------------------------------------------------------*/
-
-uint4 gtm_expreg(uint4 size, uint4 *inadr, uint4 acmode, uint4 region)
-{
-	uint4		status;
-	mem_list	*ml_ptr;
-
-	ml_ptr = check_avail(size);
-	if (ml_ptr == NULL)     /* not enough free space found or the list is empty */
-        {
-		status = gtm_expreg_noaccess_check(size, inadr, acmode, region);
-		if (status == SS$_NORMAL)
-			add_link(size, inadr[0]);
-		else if ((SS$_ILLPAGCNT == status) && ((signed int)size > 0))
-			status = ERR_SHRMEMEXHAUSTED;
-		return status;
-	}else
-	{
-		assert (size == ml_ptr->pages);
-		ml_ptr->free = FALSE;
-                inadr[0] = ml_ptr->addr;
-                inadr[1] = ml_ptr->addr + ml_ptr->pages * OS_PAGELET_SIZE - 1;
-        }
-	return SS$_NORMAL;
-}
-
-uint4 gtm_expreg_noaccess_check(uint4 size, uint4 *inadr, uint4 acmode, uint4 region)
-{
-	uint4	status, count, retadr[2];
-	DEBUG_ONLY(static uint4	numiters = 0;)
-
-	do
-	{	/* allocate memory using sys$expreg, but after that check if the memory range falls within the
-		 * noaccess memory specified by gtm_memory_noaccess. if so, we need to do extra processing.
-		 */
-		status = sys$expreg(size, inadr, acmode, region);
-		if ((SS$_NORMAL != status) || !gtm_memory_noaccess_defined)
-			return status;
-		/* check if allocated memory range intersects with the noaccess range */
-		for (count = 0; count < gtm_memory_noaccess_defined; count++)
-		{
-			if ((inadr[0] <= gtm_memory_noaccess[count]) && (inadr[1] > gtm_memory_noaccess[count]))
-				break;	/* found an intersecting memory address */
-		}
-		if (count == gtm_memory_noaccess_defined)	/* could not find any intersections */
-			return status;				/* return right away */
-		/* free the memory allocated just now using sys$deltva and allocate memory specifically at the noaccess
-		 * address using sys$cretva, set its protection to be no-access using sys$setprt and then redo the sys$expreg.
-		 * this way we will create a small inaccessible hole in the virtual address space. if some function tries
-		 * to access this address we will ACCVIO and hopefully find the culprit causing the corruption.
-		 */
-		status = sys$deltva(inadr, retadr, PSL$C_USER);
-		assert(SS$_NORMAL == status);
-		/* now create virtual pages at fixed address using sys$cretva
-		 *
-		 * there are two system calls that allocate memory for a process' virtual address space in VMS.
-		 * one is SYS$EXPREG and another is SYS$CRETVA. The former satisfies a request for n-bytes at an
-		 * arbitrary address while the latter does it at a fixed address. It is the former that is used
-		 * throughout GT.M code (for e.g. attaching to database shared memory). The latter is not advisable
-		 * unless there is a real reason. in this case we want to protect a particular memory location
-		 * from any access to identify if anything is trying to read/write to that location. hence the cretva.
-		 *
-		 * the virtual address space of a process in VMS has 4 parts, P0, P1, P2, P3. The last two are
-		 * system space and not user accessible. P0 is the user's heap and P1 is the user's stack space.
-		 * Given a total of 4Gb of addressible space (2**32), P0 and P1 are each 1Gb. Any memory allocation
-		 * occurs in the P0 region. sys$expreg maintains a notion of the current end of the P0 region's
-		 * virtual address space. all requests for memory are given from the current end and the current end
-		 * is updated accordingly. any frees (using sys$deltva) that occur in the middle of the allocated
-		 * space do not decrease the current end. only freeup of memory just before the current end also
-		 * update the current end. for example, let us say current end is 0. if two allocations of 4M each
-		 * is done, the current end becomes 8M. If the first allocation is freed, the current end stays at 8M.
-		 * but when the second allocation is freed, the current end is taken back to 0 (not 4M). this is
-		 * because the free logic will coalesce as many of the free address space as possible and decrease
-		 * the current end by that amount.
-		 *
-		 * some problems with doing sys$cretva at a specific address is that sys$expreg will consider
-		 * this to be the current end of the process virtual address space. all future sys$expreg()
-		 * calls will get virtual addresses higher than the return from the sys$cretva call. it is quite
-		 * possible that we will get a virtual-address-space-full (VASFULL) error when we would not have got
-		 * it if we had not done the sys$cretva. This is because although the sys$cretva creates only one
-		 * inaccessible OS_PAGE_SIZE hole, the virtual address space between the current end (before the sys$cretva)
-		 * and the specific address (that we allocated using sys$cretva) is effectively a hole because of the
-		 * inherent limitation of sys$expreg call (because of its simple approach of maintaining only the current
-		 * end instead of some fancy data structure) to not recognize that space as usable anymore.
-		 */
-		inadr[0] = gtm_memory_noaccess[count] & ~(OS_PAGE_SIZE - 1);
-		inadr[1] = inadr[0] + OS_PAGE_SIZE - 1;
-		status = sys$cretva(inadr, NULL, PSL$C_USER);
-		assert(SS$_NORMAL == status);
-		/* GUARD the above created page for no access using sys$setprt */
-		status = sys$setprt(inadr, NULL, (uint4)PSL$C_USER, (uint4)PRT$C_NA, NULL);
-		/* at the maximum, we might need to do one iteration for each noaccess memory address. there are at most
-		 * gtm_memory_noaccess_defined such addresses. ensure we do not perform more than that number of iterations.
-		 */
-		DEBUG_ONLY(numiters++;)
-		assert(gtm_memory_noaccess_defined >= numiters);
-	} while (TRUE);
-}
-
-/*-----------------------------------------------------------------------
-   Delete the chunk if it is at the end of virtual address space.
-   While doing so, coalesce with any other previous adjacent free blocks
-   of address space.
-   If the given address space is not at the end of the address space,
-   just mark it free and do NOT coalesce with any other previous/next
-   adjacent free blocks, since we might get into trouble setting protection
-   on reuse of coalesced blocks.
-  ----------------------------------------------------------------------*/
-
-uint4 gtm_deltva(uint4 *outaddrs, uint4 *retadr, uint4 acmode)
-{
-	mem_list *ml_ptr, *ml_ptr_new;
-	uint4 next_free_va, status;
-        unsigned short retlen;
-        unsigned short iosb[4];
-        struct
-        {
-                item_list_3     item;
-                int4            terminator;
-        } item_list;
-
-        for (ml_ptr = mem_list_head; ml_ptr; ml_ptr = ml_ptr->next)
-                if (outaddrs[0] == ml_ptr->addr)
-                        break;
-
-	/* assert(ml_ptr);
-		 some regions may be deleted using gtm_deltva() that are
-                 not allocated by gtm_expreg(), so may not be present in the
-                 list. For example, in mu_cre_file(), we allocate using
-                 sys$crmpsc() which wont make into this list but deleted
-                 using gtm_deltva()  */
-
-	if (NULL == ml_ptr)	/* "not in list" case, delete it */
-	{
-#ifdef DEBUG
-	/* To catch the callers supplying incorrect arguments */
-        for (ml_ptr = mem_list_head; ml_ptr; ml_ptr = ml_ptr->next)
-                if ((outaddrs[0] - OS_PAGE_SIZE) == ml_ptr->addr)
-                        break;
-	if (ml_ptr)
-		assert(FALSE);
-#endif
-		status = sys$deltva(outaddrs, retadr, acmode);
-		return status;
-	}
-
-	assert (FALSE == ml_ptr->free);
-
-	if (ml_ptr->next == NULL)
-	{
-		/* check if the chunk is at the end of va, so we can delete it */
-                item_list.item.buffer_length         = 4;
-                item_list.item.item_code             = JPI$_FREP0VA;
-                item_list.item.buffer_address        = &next_free_va;
-                item_list.item.return_length_address = &retlen;
-		item_list.terminator 		     = 0;
-		status = sys$getjpiw(EFN$C_ENF, &process_id, NULL, &item_list, iosb, NULL, 0);
-
-		if (SS$_NORMAL == status && next_free_va == outaddrs[1] + 1)
-		{
-			ml_ptr->free = TRUE;
-			for (;;)		/* coalesce all the adjacent free blocks */
-			{
-				ml_ptr_new = coalesce_prev(ml_ptr);
-				if (ml_ptr == ml_ptr_new)
-					break;
-				else
-					ml_ptr = ml_ptr_new;
-			}
-			outaddrs[0] = ml_ptr_new->addr;
-
-			if (ml_ptr_new->prev == NULL)
-				mem_list_head = NULL;
-			else
-				ml_ptr_new->prev->next = NULL;
-			free(ml_ptr_new);
-
-			status = sys$deltva(outaddrs, retadr, acmode);
-			return status;
-		}
-	}
-	ml_ptr->free = TRUE;
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/mem_list.h b/sr_vvms/mem_list.h
deleted file mode 100644
index cb5e6b7..0000000
--- a/sr_vvms/mem_list.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __MEM_LIST_H__
-#define __MEM_LIST_H__
-
-void	add_link(int4 size, int4 inadr);
-boolean_t is_va_free(uint4 outaddrs);
-uint4	gtm_expreg(uint4 size, uint4 *inadr, uint4 acmode, uint4 region);
-uint4	gtm_expreg_noaccess_check(uint4 size, uint4 *inadr, uint4 acmode, uint4 region);
-uint4	gtm_deltva(uint4 *outaddrs, uint4 *retadr, uint4 acmode);
-
-#endif
diff --git a/sr_vvms/movempt.com b/sr_vvms/movempt.com
deleted file mode 100644
index 4f639b2..0000000
--- a/sr_vvms/movempt.com
+++ /dev/null
@@ -1,63 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! movempt.com - Move .mpt files from gtm$src to gtm$pct with a _ prefix
-$!
-$ if p1 .eqs. ""
-$ then
-$	write sys$output "Must supply a version"
-$	exit
-$ endif
-$!
-$ @gtm$tools:gtm_verify_symbols "set"	! sets the global symbols gtm_copy, gtm_delete, gtm_library, gtm_purge
-$ @gtm$tools:build_print_stage "movempt" "begin"
-$!
-$ @gtm$tools:setactive_silent 'p1'
-$ @gtm$tools:build_print_stage "Copying .mpt files to gtm$pct" "middle"
-$
-$ define/nolog gtm$pct gtm$root:['p1'.pct]
-$ x = f$search("gtm$src:*.mpt")
-$ if x .eqs. "" then $ goto nompt
-$
-$ set noon
-$ gtm_delete gtm$pct:_*.m.*
-$ set on
-$
-$ loop:
-$	gtm_copy/prot=(s=re,o=rwed,g=re,w=re) 'x' gtm$pct:_'f$parse(x,,,"NAME")'.m
-$	x = f$search("gtm$src:*.mpt")
-$	if x .nes. "" then $ goto loop
-$
-$nompt:
-$ if f$search("gtm$src:gtm$dmod.m") .nes. ""
-$  then
-$   gtm_copy/prot=(s=re,o=rwed,g=re,w=re) gtm$src:gtm$dmod.m gtm$pct:
-$   gtm_purge gtm$pct:gtm$dmod.m
-$ endif
-$
-$ if f$search("gtm$pct:*.obj") .nes. ""
-$  then
-$   set noon
-$   set file/prot=(w=rwed) gtm$pct:*.obj
-$   set on
-$ endif
-$
-$ set command gtm$src:GTMCOMMANDS.CLDX	! define MUMPS command if .cldx file present
-$ mumps/obj=gtm$pct: gtm$pct:*.m
-$ gtm_purge gtm$pct:*.*
-$
-$ set noon
-$ set file/prot=(s=re,w=re) gtm$pct:*.obj
-$ set on
-$!
-$ @gtm$tools:build_print_stage "movempt" "end"
-$ @gtm$tools:gtm_verify_symbols "unset"	! unsets the global symbols gtm_copy, gtm_delete gtm_library, gtm_purge
-$ exit
diff --git a/sr_vvms/msg.h b/sr_vvms/msg.h
deleted file mode 100644
index 8750b6b..0000000
--- a/sr_vvms/msg.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define DEF_MSG_ARGS 16
-
-typedef	struct msgstruct
-{
-	unsigned short	arg_cnt;	/* argument count (# longwords) */
-	unsigned short	def_opts;	/* default message options	*/
-	unsigned	msg_number;	/* message number		*/
-	unsigned short	fp_cnt;		/* number of fao parameters	*/
-	unsigned short	new_opts;	/* new message options		*/
-	union
-	{
-		unsigned char	*cp;
-		unsigned 	n;
-	} fp[DEF_MSG_ARGS];			/* fao parameter		*/
-} msgtype;
-
-#define SHORT_MSG_SIZE (SIZEOF(msgtype) / SIZEOF(int4) - 5)
-#define LONG_MSG_SIZE (SIZEOF(msgtype) / SIZEOF(int4) - 1)
-#define MID_MSG_SIZE (SIZEOF(msgtype) / SIZEOF(int4) - 3)
-#define FAO_ARG SIZEOF(int4)
-#define MSG_PRINT(ARG_CNT, OPTS, NUM, FP_CNT, FP2, FP3, FP4, FP5)	\
-{									\
-	msg->arg_cnt = (ARG_CNT);					\
-	msg->new_opts = msg->def_opts = (OPTS);				\
-	msg->msg_number = (NUM);					\
-	msg->fp_cnt = (FP_CNT);						\
-	msg->fp[0].n = SIZEOF(gt_lit) - 1;				\
-	msg->fp[1].cp = gt_lit;						\
-	msg->fp[2].n = (FP2);						\
-	msg->fp[3].n = (FP3);						\
-	msg->fp[4].n = (FP4);						\
-	msg->fp[5].n = (FP5);						\
-	sys$putmsg(msg, 0, 0, 0);					\
-}
diff --git a/sr_vvms/mu_cre_file.c b/sr_vvms/mu_cre_file.c
deleted file mode 100644
index e06c2a9..0000000
--- a/sr_vvms/mu_cre_file.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <fab.h>
-#include <rab.h>
-#include <nam.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <psldef.h>
-#include <secdef.h>
-#include <syidef.h>
-#include <efndef.h>
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "mlkdef.h"
-#include "efn.h"
-#include "sleep_cnt.h"
-#include "util.h"
-#include "send_msg.h"
-#include "del_sec.h"
-#include "mem_list.h"
-#include "disk_block_available.h"
-#include "init_sec.h"
-#include "mucregini.h"
-#include "mu_cre_file.h"
-#include "mu_cre_vms_structs.h"
-#include "gtmmsg.h"
-#include "wcs_sleep.h"
-#include "iosb_disk.h"
-#include "iosp.h"
-#include "iormdef.h"
-#include "shmpool.h"	/* Needed for the shmpool structures */
-
-GBLREF gd_region 	*gv_cur_region;
-GBLREF sgmnt_data_ptr_t cs_data;
-GBLREF sgmnt_addrs 	*cs_addrs;
-
-#define MAX_GBL_NAME_LEN 15
-#define BLK_SIZE (((gd_segment*)gv_cur_region->dyn.addr)->blk_size)
-
-error_def(ERR_BADACCMTHD);
-error_def(ERR_DBFILERR);
-error_def(ERR_MUNOSTRMBKUP);
-error_def(ERR_LOWSPACECRE);
-
-unsigned char mu_cre_file(void)
-{
-	unsigned char		*inadr[2], *c, exit_stat;
-	enum db_acc_method	temp_acc_meth;
-	uint4			lcnt, retadr[2];
-	int4			blk_init_size, initial_alq, free_blocks;
-	gtm_uint64_t		free_blocks_ll, blocks_for_extension;
-	char			buff[GLO_NAME_MAXLEN], fn_buff[MAX_FN_LEN];
-	unsigned int		status;
-	int			free_space;
-	struct FAB		*fcb;
-	struct NAM		nam;
-	gds_file_id		new_id;
-	io_status_block_disk	iosb;
-	char			node[16];
-	short			len;
-	struct {
-		short	blen;
-		short	code;
-		char	*buf;
-		short	*len;
-		int4	terminator;
-	} item = {15, SYI$_NODENAME, &node, &len, 0};
-	$DESCRIPTOR(desc, buff);
-
-	exit_stat = EXIT_NRM;
-/* The following calculations should duplicate the BT_SIZE macro from GDSBT and the LOCK_BLOCK macro from GDSFHEAD.H,
- * but without using a sgmnt_data which is not yet set up at this point
- */
-
-#ifdef GT_CX_DEF
-	/* This section needs serious chnages for the fileheader changes in V5 if it is ever resurrected */
-	over_head = DIVIDE_ROUND_UP(SIZEOF_FILE_HDR_DFLT
-			+ (WC_MAX_BUFFS + getprime(WC_MAX_BUFFS) + 1) * SIZEOF(bt_rec), DISK_BLOCK_SIZE);
-	if (gv_cur_region->dyn.addr->acc_meth == dba_bg)
-	{
-		free_space = over_head - DIVIDE_ROUND_UP(SIZEOF_FILE_HDR_DFLT
-			+ (gv_cur_region->dyn.addr->global_buffers + getprime(gv_cur_region->dyn.addr->global_buffers) + 1)
-				* SIZEOF(bt_rec), DISK_BLOCK_SIZE);
-		over_head += gv_cur_region->dyn.addr->lock_space ? gv_cur_region->dyn.addr->lock_space
-								 : DEF_LOCK_SIZE / OS_PAGELET_SIZE;
-	} else if (gv_cur_region->dyn.addr->acc_meth == dba_mm)
-	{
-		free_space = over_head - DIVIDE_ROUND_UP(SIZEOF_FILE_HDR_DFLT, DISK_BLOCK_SIZE);
-		if (gv_cur_region->dyn.addr->lock_space)
-		{
-			over_head += gv_cur_region->dyn.addr->lock_space;
-			free_space += gv_cur_region->dyn.addr->lock_space;
-		} else
-		{
-			over_head += DEF_LOCK_SIZE / OS_PAGELET_SIZE;
-			free_space += DEF_LOCK_SIZE / OS_PAGELET_SIZE;
-		}
-	}
-	free_space *= DISK_BLOCK_SIZE;
-#else
-	assert(START_VBN_CURRENT > DIVIDE_ROUND_UP(SIZEOF_FILE_HDR_DFLT, DISK_BLOCK_SIZE));
-	free_space = ((START_VBN_CURRENT - 1) * DISK_BLOCK_SIZE) - SIZEOF_FILE_HDR_DFLT;
-#endif
-	switch (gv_cur_region->dyn.addr->acc_meth)
-	{
-		case dba_bg:
-		case dba_mm:
-			mu_cre_vms_structs(gv_cur_region);
-			fcb = ((vms_gds_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fab;
-			cs_addrs = &((vms_gds_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->s_addrs;
-
-			fcb->fab$b_shr &= FAB$M_NIL;	/* No access to this file while it is created */
-			fcb->fab$l_nam = &nam;
-			nam = cc$rms_nam;
-			/* There are (bplmap - 1) non-bitmap blocks per bitmap, so add (bplmap - 2) to number of non-bitmap blocks
-			 * and divide by (bplmap - 1) to get total number of bitmaps for expanded database. (must round up in this
-			 * manner as every non-bitmap block must have an associated bitmap)
-			*/
-			fcb->fab$l_alq += DIVIDE_ROUND_UP(fcb->fab$l_alq, BLKS_PER_LMAP - 1);	/* Bitmaps */
-			blk_init_size = fcb->fab$l_alq;
-			fcb->fab$l_alq *= BLK_SIZE / DISK_BLOCK_SIZE;
-			fcb->fab$l_alq += START_VBN_CURRENT - 1;
-			initial_alq = fcb->fab$l_alq;
-			fcb->fab$w_mrs = 512;				/* no longer a relevent field to us */
-			break;
-		case dba_usr:
-			util_out_print("Database file for region !AD not created; access method is not GDS.", TRUE,
-				REG_LEN_STR(gv_cur_region));
-			return EXIT_WRN;
-		default:
-			gtm_putmsg(VARLSTCNT(1) ERR_BADACCMTHD);
-			return EXIT_ERR;
-	}
-	nam.nam$b_ess = SIZEOF(fn_buff);
-	nam.nam$l_esa = fn_buff;
-	nam.nam$b_nop |= NAM$M_SYNCHK;
-	status = sys$parse(fcb, 0, 0);
-	if (RMS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(8) ERR_DBFILERR, 2, fcb->fab$b_fns, fcb->fab$l_fna, status, 0, fcb->fab$l_stv, 0);
-		return EXIT_ERR;
-	}
-	if (nam.nam$b_node != 0)
-	{
-		status = sys$getsyiw(EFN$C_ENF, 0, 0, &item, &iosb, 0, 0);
-		if (SS$_NORMAL == status)
-			status = iosb.cond;
-		if (SS$_NORMAL == status)
-		{
-			if (len == nam.nam$b_node-2 && !memcmp(nam.nam$l_esa, node, len))
-			{
-				fcb->fab$l_fna = nam.nam$l_esa + nam.nam$b_node;
-				fcb->fab$b_fns = nam.nam$b_esl - nam.nam$b_node;
-			}
-		} else
-		{
-			util_out_print("Could not get node for !AD.", TRUE, REG_LEN_STR(gv_cur_region));
-			exit_stat = EXIT_WRN;
-		}
-	}
-	assert(gv_cur_region->dyn.addr->acc_meth == dba_bg || gv_cur_region->dyn.addr->acc_meth == dba_mm);
-	nam.nam$l_esa = NULL;
-	nam.nam$b_esl = 0;
-	status = sys$create(fcb);
-	if (status != RMS$_CREATED && status != RMS$_FILEPURGED)
-	{
-		switch(status)
-		{
-			case RMS$_FLK:
-		 		util_out_print("Database file for region !AD not created; currently locked by another user.", TRUE,
-					REG_LEN_STR(gv_cur_region));
-				exit_stat = EXIT_INF;
-				break;
-			case RMS$_NORMAL:
-		 		util_out_print("Database file for region !AD not created; already exists.", TRUE,
-					REG_LEN_STR(gv_cur_region));
-				exit_stat = EXIT_INF;
-				break;
-			case RMS$_SUPPORT:
-				util_out_print("Database file for region !AD not created; cannot create across network.", TRUE,
-					REG_LEN_STR(gv_cur_region));
-				exit_stat = EXIT_WRN;
-				break;
-			case RMS$_FUL:
-				send_msg(VARLSTCNT(8) ERR_DBFILERR, 2, fcb->fab$b_fns, fcb->fab$l_fna,
-					status, 0, fcb->fab$l_stv, 0);
-				/* intentionally falling through */
-			default:
-				gtm_putmsg(VARLSTCNT(8) ERR_DBFILERR, 2, fcb->fab$b_fns, fcb->fab$l_fna,
-					status, 0, fcb->fab$l_stv, 0);
-				exit_stat = EXIT_ERR;
-		}
-		sys$dassgn(fcb->fab$l_stv);
-		return exit_stat;
-	}
-
-	memcpy(new_id.dvi, nam.nam$t_dvi, SIZEOF(nam.nam$t_dvi));
-	memcpy(new_id.did, nam.nam$w_did, SIZEOF(nam.nam$w_did));
-	memcpy(new_id.fid, nam.nam$w_fid, SIZEOF(nam.nam$w_fid));
-	global_name("GT$S", &new_id, buff);		/* 2nd parm is actually a gds_file_id * in global_name */
-	desc.dsc$w_length = buff[0];			/* By definition, a gds_file_id is dvi,fid,did from nam */
-	desc.dsc$a_pointer = &buff[1];
-	cs_addrs->db_addrs[0] = cs_addrs->db_addrs[1] = inadr[0] = inadr[1] = inadr;	/* used to determine p0 or p1 allocation */
-	status = init_sec(cs_addrs->db_addrs, &desc, fcb->fab$l_stv, (START_VBN_CURRENT - 1),
-			  SEC$M_DZRO|SEC$M_GBL|SEC$M_WRT|SEC$M_EXPREG);
-	if ((SS$_CREATED != status) && (SS$_NORMAL != status))
-	{
-		gtm_putmsg(VARLSTCNT(8) ERR_DBFILERR, 2, fcb->fab$b_fns, fcb->fab$l_fna, status, 0, fcb->fab$l_stv, 0);
-		sys$dassgn(fcb->fab$l_stv);
-		return EXIT_ERR;
-	}
-	cs_data = (sgmnt_data *)cs_addrs->db_addrs[0];
-	memset(cs_data, 0, SIZEOF_FILE_HDR_DFLT);
-	cs_data->createinprogress = TRUE;
-	cs_data->trans_hist.total_blks = (initial_alq - (START_VBN_CURRENT - 1)) / (BLK_SIZE / DISK_BLOCK_SIZE);
-	/* assert that total_blks stored in file-header = non-bitmap blocks (initial allocation) + bitmap blocks */
-	assert(cs_data->trans_hist.total_blks == gv_cur_region->dyn.addr->allocation +
-				DIVIDE_ROUND_UP(gv_cur_region->dyn.addr->allocation, BLKS_PER_LMAP - 1));
-	cs_data->start_vbn = START_VBN_CURRENT;
-	temp_acc_meth = gv_cur_region->dyn.addr->acc_meth;
-	cs_data->acc_meth = gv_cur_region->dyn.addr->acc_meth = dba_bg;
-	cs_data->extension_size = gv_cur_region->dyn.addr->ext_blk_count;
-	mucregini(blk_init_size);
-	cs_addrs->hdr->free_space = free_space;
-#ifndef GT_CX_DEF
-	cs_addrs->hdr->unbacked_cache = TRUE;
-#endif
-	cs_data->acc_meth = gv_cur_region->dyn.addr->acc_meth = temp_acc_meth;
-	cs_data->createinprogress = FALSE;
-	if (SS$_NORMAL == (status = disk_block_available(fcb->fab$l_stv, &free_blocks)))
-	{
-		blocks_for_extension = (cs_data->blk_size / DISK_BLOCK_SIZE *
-				  (DIVIDE_ROUND_UP(EXTEND_WARNING_FACTOR * (gtm_uint64_t)cs_data->extension_size, BLKS_PER_LMAP - 1)
-					 + EXTEND_WARNING_FACTOR * (gtm_uint64_t)cs_data->extension_size));
-		if ((gtm_uint64_t)free_blocks < blocks_for_extension)
-		{
-			free_blocks_ll = (gtm_uint64_t)free_blocks;
-			gtm_putmsg(VARLSTCNT(8) ERR_LOWSPACECRE, 6, fcb->fab$b_fns, fcb->fab$l_fna, EXTEND_WARNING_FACTOR,
-					&blocks_for_extension, DISK_BLOCK_SIZE, &free_blocks_ll);
-			send_msg(VARLSTCNT(8) ERR_LOWSPACECRE, 6, fcb->fab$b_fns, fcb->fab$l_fna, EXTEND_WARNING_FACTOR,
-					&blocks_for_extension, DISK_BLOCK_SIZE, &free_blocks_ll);
-		}
-	}
-	if (SS$_NORMAL == (status = sys$updsec(((vms_gds_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->s_addrs.db_addrs,
-			NULL, PSL$C_USER, 0, efn_immed_wait, &iosb, NULL, 0)))
-	{
-		status = sys$synch(efn_immed_wait, &iosb);
-		if (SS$_NORMAL == status)
-			status = iosb.cond;
-	} else  if (SS$_NOTMODIFIED == status)
-		status = SS$_NORMAL;
-	if (SS$_NORMAL == status)
-		status = del_sec(SEC$M_GBL, &desc, 0);
-	if (SS$_NORMAL == status)
-		status = sys$deltva(cs_addrs->db_addrs, retadr, PSL$C_USER);
-	if (SS$_NORMAL == status)
-		status = sys$dassgn(fcb->fab$l_stv);
-	if (SS$_NORMAL == status)
-	{
-	 	util_out_print("Database file for region !AD created.", TRUE, REG_LEN_STR(gv_cur_region));
-		/* the open and close are an attempt to ensure that the file is available, not under the control of an ACP,
-		 * before MUPIP exits */
-		fcb->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-		fcb->fab$l_fop = 0;
-		for (lcnt = 1;  (60 * MAX_OPEN_RETRY) >= lcnt;  lcnt++)
-		{	/* per VMS engineering a delay is expected.  We will wait up to an hour as a
-			 * Delete Global Section operation is essentially and inherently asynchronous in nature
-			 * and could take an arbitrary amount of time.
-			 */
-			if (RMS$_FLK != (status = sys$open(fcb, NULL, NULL)))
-				break;
-			wcs_sleep(lcnt);
-		}
-		assert(RMS$_NORMAL == status);
-		if (RMS$_NORMAL == status)
-		{
-			status = sys$close(fcb);
-			assert(RMS$_NORMAL == status);
-		}
-		if (RMS$_NORMAL != status)
-			exit_stat = EXIT_WRN;
-	} else
-		exit_stat = EXIT_ERR;
-	if (RMS$_NORMAL != status)
-		gtm_putmsg(VARLSTCNT(8) ERR_DBFILERR, 2, fcb->fab$b_fns, fcb->fab$l_fna, status, 0, fcb->fab$l_stv, 0);
-	if ((MAX_RMS_RECORDSIZE - SIZEOF(shmpool_blk_hdr)) < cs_data->blk_size)
-		gtm_putmsg(VARLSTCNT(5) ERR_MUNOSTRMBKUP, 3, fcb->fab$b_fns, fcb->fab$l_fna, 32 * 1024 - DISK_BLOCK_SIZE);
-	return exit_stat;
-}
diff --git a/sr_vvms/mu_cre_vms_structs.c b/sr_vvms/mu_cre_vms_structs.c
deleted file mode 100644
index 5401172..0000000
--- a/sr_vvms/mu_cre_vms_structs.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include <rmsdef.h>
-#include <fab.h>
-#include <nam.h>
-#include "filestruct.h"
-#include "mu_cre_vms_structs.h"
-
-void mu_cre_vms_structs(gd_region *reg)
-{
-	vms_gds_info	*mm_info;
-	gd_segment	*seg;
-
-	assert(reg->dyn.addr->acc_meth == dba_bg || reg->dyn.addr->acc_meth == dba_mm);
-	seg = reg->dyn.addr;
-	seg->file_cntl = malloc(SIZEOF(file_control));
-	switch (reg->dyn.addr->acc_meth)
-	{
-		case dba_mm:
-		case dba_bg:
-			seg->file_cntl->file_info = malloc(SIZEOF(vms_gds_info));
-			memset(seg->file_cntl->file_info,0,SIZEOF(vms_gds_info));
-			mm_info = seg->file_cntl->file_info;
-			mm_info->fab = malloc(SIZEOF(struct FAB));
-			mm_info->nam = malloc(SIZEOF(struct NAM));
-			*mm_info->fab = cc$rms_fab;
-			*mm_info->nam = cc$rms_nam;
-			mm_info->fab->fab$l_nam = mm_info->nam;
-			mm_info->fab->fab$l_alq = seg->allocation;
-			mm_info->fab->fab$l_fna = seg->fname;
-			mm_info->fab->fab$l_dna = seg->defext;
-			mm_info->fab->fab$b_fns = seg->fname_len;
-			mm_info->fab->fab$b_dns = SIZEOF(seg->defext);
-			mm_info->fab->fab$w_mrs = reg->max_rec_size;
-			mm_info->fab->fab$w_bls = reg->max_rec_size;
-			mm_info->fab->fab$w_deq = seg->ext_blk_count;
-			mm_info->fab->fab$b_org = FAB$C_SEQ;
-			mm_info->fab->fab$b_rfm = FAB$C_FIX;
-			mm_info->fab->fab$l_fop = FAB$M_UFO | FAB$M_CIF | FAB$M_CBT;
-			mm_info->fab->fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_BIO;
-			mm_info->fab->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-			break;
-	}
-	return;
-}
diff --git a/sr_vvms/mu_cre_vms_structs.h b/sr_vvms/mu_cre_vms_structs.h
deleted file mode 100644
index f46a128..0000000
--- a/sr_vvms/mu_cre_vms_structs.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MU_CRE_VMS_STRUCTS_INCLUDED
-#define MU_CRE_VMS_STRUCTS_INCLUDED
-
-void mu_cre_vms_structs(gd_region *reg);
-
-#endif /* MU_CRE_VMS_STRUCTS_INCLUDED */
diff --git a/sr_vvms/mu_extract.c b/sr_vvms/mu_extract.c
deleted file mode 100644
index 03545c5..0000000
--- a/sr_vvms/mu_extract.c
+++ /dev/null
@@ -1,388 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <descrip.h>
-#include <ssdef.h>
-#include <devdef.h>
-#include <dvidef.h>
-#include <climsgdef.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "muextr.h"
-#include "stp_parms.h"
-#include "stringpool.h"
-#include "cli.h"
-#include "util.h"
-#include "op.h"
-#include "mupip_exit.h"
-#include "gv_select.h"
-#include "mu_outofband_setup.h"
-#include "gtmmsg.h"
-#include "mvalconv.h"
-#include "hashtab_mname.h"
-#include "change_reg.h"		/* for DO_OP_GVNAME macro */
-
-error_def(ERR_DBRDONLY);
-error_def(ERR_EXTRACTCTRLY);
-error_def(ERR_EXTRACTFILERR);
-error_def(ERR_EXTRCLOSEERR);
-error_def(ERR_EXTRFMT);
-error_def(ERR_EXTRIOERR);
-error_def(ERR_FREEZE);
-error_def(ERR_MUNOACTION);
-error_def(ERR_MUNOFINISH);
-error_def(ERR_MUPCLIERR);
-error_def(ERR_NOSELECT);
-error_def(ERR_NULLCOLLDIFF);
-error_def(ERR_RECORDSTAT);
-error_def(ERR_SELECTSYNTAX);
-
-GBLREF bool		mu_ctrlc_occurred;
-GBLREF bool		mu_ctrly_occurred;
-GBLREF spdesc		stringpool;
-GBLREF gd_region	*gv_cur_region;
-GBLREF sgmnt_data	*cs_data;
-GBLREF sgmnt_addrs	*cs_addrs;
-GBLREF gd_addr		*gd_header;
-GBLREF gv_namehead      *gv_target;
-
-#define	RMS_MAX_RECORD_SIZE	((1 << 16) - 1)
-
-#define	WRITE_NUMERIC(nmfield)						\
-{									\
-	MV_FORCE_MVAL(&val, nmfield);					\
-	stringpool.free = stringpool.base;				\
-	n2s(&val);							\
-	assertpro(!(val.mvtype & MV_NUM_APPROX));			\
-	assertpro(BIN_HEADER_NUMSZ >= val.str.len);			\
-	for (iter = val.str.len;  iter < BIN_HEADER_NUMSZ;  iter++)	\
-		*outptr++ = '0';					\
-	memcpy(outptr, val.str.addr, val.str.len);			\
-	outptr += val.str.len;						\
-}
-
-LITDEF mval	mu_bin_datefmt	= DEFINE_MVAL_LITERAL(MV_STR, 0, 0, SIZEOF(BIN_HEADER_DATEFMT) - 1, BIN_HEADER_DATEFMT, 0, 0);	/* BYPASSOK */
-GBLDEF struct FAB	mu_outfab;
-GBLDEF struct RAB 	mu_outrab;
-
-void mu_extract(void)
-{
-	int				reg_max_rec, reg_max_key, reg_max_blk, max_extract_rec_len, status,len, i, format;
-	int				reg_std_null_coll, iter;
-	unsigned char                  	cli_buff[MAX_LINE];
-	boolean_t			logqualifier, freeze = FALSE, success, success2;
-	mval				val;
-	char				format_buffer[FORMAT_STR_MAX_SIZE];
-	glist				gl_head, *gl_ptr, *next_gl_ptr;
-	gd_region			*reg, *region_top;
-	mu_extr_stats			global_total, grand_total, spangbl_total;
-	uint4			        item_code, devbufsiz, maxfield;
-	unsigned char			outfilename[256];
-	unsigned short			label_len, n_len;
-	static readonly unsigned char	datefmt_txt[] = "DD-MON-YEAR  24:60:SS";
-	static readonly unsigned char	label_text[] = "LABEL";
-	static readonly unsigned char	select_text[] = "SELECT";
-	static readonly unsigned char	log_text[] = "LOG";
-	static readonly mval		datefmt = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, SIZEOF(datefmt_txt) - 1,
-							(char *)datefmt_txt, 0, 0);
-	static readonly mval		null_str = DEFINE_MVAL_LITERAL(MV_STR, 0, 0, 0, 0, 0, 0);
-	unsigned char			*outbuf, *outptr;
-	static readonly $DESCRIPTOR(label_str,label_text);
-	static readonly $DESCRIPTOR(log_str,log_text);
-	struct dsc$descriptor_s label_buff;
-	$DESCRIPTOR(dir, "");
-	coll_hdr        		extr_collhdr;
-	gvnh_reg_t			*gvnh_reg;
-	gvnh_spanreg_t			*gvspan, *last_gvspan;
-
-	mu_outofband_setup();
-
-	logqualifier = (CLI$PRESENT(&log_str) != CLI$_NEGATED);
-	if (cli_present("FREEZE") == CLI_PRESENT)
-		freeze = TRUE;
-	n_len = SIZEOF(format_buffer);
-	if (cli_get_str("FORMAT", format_buffer, &n_len) == FALSE)
-	{
-		n_len = SIZEOF("ZWR") - 1;
-		MEMCPY_LIT(format_buffer, "ZWR");
-	}
-	if (memcmp(format_buffer, "ZWR", n_len) == 0)
-		format = MU_FMT_ZWR;
-	else if (memcmp(format_buffer, "GO", n_len) == 0)
-		format = MU_FMT_GO;
-	else if (memcmp(format_buffer, "BINARY", n_len) == 0)
-		format = MU_FMT_BINARY;
-	else
-	{
-		util_out_print("Extract error: bad format type",TRUE);
-		mupip_exit (ERR_EXTRFMT);
-	}
-
-	n_len = 0;
-	memset(cli_buff, 0, SIZEOF(cli_buff));
-	if (FALSE == CLI_GET_STR_ALL(select_text, cli_buff, &n_len))
-	{
-		cli_buff[0] = '*';
-		n_len = 1;
-	}
-	MU_EXTR_STATS_INIT(grand_total);
-	MU_EXTR_STATS_INIT(global_total);
-	/* gv_select will select globals */
-	gv_select(cli_buff, n_len, freeze, select_text, &gl_head, &reg_max_rec, &reg_max_key, &reg_max_blk, FALSE);
-	if (!gl_head.next)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NOSELECT);
-		mupip_exit(ERR_MUNOACTION);
-	}
-	/* For binary format, check whether all regions have same null collation order */
-	if (MU_FMT_BINARY == format)
-	{
-		for (reg = gd_header->regions, region_top = gd_header->regions + gd_header->n_regions, reg_std_null_coll = -1;
-			reg < region_top ; reg++)
-		{
-			if (reg->open)
-			{
-				if (reg_std_null_coll != reg->std_null_coll)
-				{
-					if (reg_std_null_coll == -1)
-						reg_std_null_coll = reg->std_null_coll;
-					else
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_NULLCOLLDIFF);
-						mupip_exit(ERR_NULLCOLLDIFF);
-					}
-				}
-			}
-		}
-		assert(-1 != reg_std_null_coll);
-	}
-	n_len = SIZEOF(outfilename);
-	mu_outfab = cc$rms_fab;
-	mu_outrab = cc$rms_rab;
-	mu_outrab.rab$l_fab = &mu_outfab;
-	mu_outrab.rab$l_rop = RAB$M_WBH;
-	mu_outfab.fab$l_fna = &outfilename;
-	if (cli_get_str("FILE", outfilename, &n_len) == FALSE) /* should be gtmassert */
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MUPCLIERR);
-		mupip_exit(ERR_MUNOACTION);
-	}
-	if (format == MU_FMT_BINARY)
-		max_extract_rec_len = reg_max_blk;
-	else
-		max_extract_rec_len = ZWR_EXP_RATIO(reg_max_rec);
-	if (max_extract_rec_len > RMS_MAX_RECORD_SIZE)
-		max_extract_rec_len = RMS_MAX_RECORD_SIZE;
-	mu_outfab.fab$w_mrs = max_extract_rec_len;
-	mu_outfab.fab$b_fns = n_len;
-	mu_outfab.fab$b_rat = FAB$M_CR;
-	mu_outfab.fab$l_fop = FAB$M_CBT | FAB$M_MXV | FAB$M_TEF;  /* contig best try - max version - trunc at close */
-	mu_outfab.fab$b_fac = FAB$M_PUT;
-	mu_outfab.fab$l_alq = 1000; /* initial allocation */
-	mu_outfab.fab$w_deq = 1000; /* def extend quant */
-
-	status = sys$create(&mu_outfab);
-	switch (status)
-	{
-	case RMS$_NORMAL:
-	case RMS$_CRE_STM:
-	case RMS$_CREATED:
-	case RMS$_SUPERSEDE:
-	case RMS$_FILEPURGED:
-		break;
-	default:
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRACTFILERR, 2, mu_outfab.fab$b_fns, mu_outfab.fab$l_fna,
-			       status, 0, mu_outfab.fab$l_stv, 0);
-		mupip_exit(ERR_MUNOACTION);
-	}
-	status = sys$connect(&mu_outrab);
-	if (status != RMS$_NORMAL)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRACTFILERR, 2, mu_outfab.fab$b_fns, mu_outfab.fab$l_fna,
-			       status, 0, mu_outfab.fab$l_stv, 0);
-		mupip_exit(ERR_MUNOACTION);
-	}
-	if (mu_outfab.fab$l_dev & DEV$M_SQD)
-	{
-		if (format == MU_FMT_BINARY)
-			maxfield = reg_max_blk;
-		else if (format == MU_FMT_ZWR)
-			maxfield = reg_max_rec*7 + reg_max_key + 1;
-		else
-			maxfield = reg_max_rec > reg_max_key ? reg_max_rec : reg_max_key;
-		item_code = DVI$_DEVBUFSIZ;
-		dir.dsc$a_pointer = mu_outfab.fab$l_fna;
-		dir.dsc$w_length =  n_len;
-		devbufsiz = 0;
-		lib$getdvi(&item_code, 0, &dir, &devbufsiz, 0, 0);
-		if (devbufsiz < maxfield + 8)
-		{
-			util_out_print("!/Buffer size !UL may not accomodate maximum field size of !UL.",
-				FALSE, devbufsiz, maxfield);
-			util_out_print("!/8 bytes/tape block overhead required for device.",
-				TRUE);
-			sys$close(&mu_outfab);
-			mupip_exit(ERR_MUNOACTION);
-		}
-	}
-	label_buff.dsc$a_pointer = malloc(128);
-	label_buff.dsc$w_length = 128;
-	label_buff.dsc$b_dtype = DSC$K_DTYPE_T;
-	label_buff.dsc$b_class = DSC$K_CLASS_S;
-	if (format == MU_FMT_BINARY)
-	{
-		/* binary header label format:
-		 *	fixed length text, fixed length date & time,
-		 *	fixed length max blk size, fixed length max rec size, fixed length max key size,
-		 *	fixed length reg_std_null_coll,
-		 *	32-byte padded user-supplied string
-		 */
-		outbuf = malloc(SIZEOF(BIN_HEADER_LABEL) - 1 + SIZEOF(BIN_HEADER_DATEFMT) - 1 + 4 * BIN_HEADER_NUMSZ
-				+ BIN_HEADER_LABELSZ);
-		outptr = outbuf;
-		MEMCPY_LIT(outptr, BIN_HEADER_LABEL);
-		outptr += SIZEOF(BIN_HEADER_LABEL) - 1;
-		stringpool.free = stringpool.base;
-		op_horolog (&val);
-		stringpool.free = stringpool.base;
-		op_fnzdate (&val, &mu_bin_datefmt, &null_str, &null_str, &val);
-		memcpy (outptr, val.str.addr, val.str.len);
-		outptr += val.str.len;
-
-		WRITE_NUMERIC(reg_max_blk);
-		WRITE_NUMERIC(reg_max_rec);
-		WRITE_NUMERIC(reg_max_key);
-		WRITE_NUMERIC(reg_std_null_coll);
-
-		CLI$GET_VALUE (&label_str, &label_buff, &label_len);
-		memcpy (outptr, label_buff.dsc$a_pointer, BIN_HEADER_LABELSZ);
-		if (label_len < BIN_HEADER_LABELSZ)
-		{
-			outptr += label_len;
-			for (i = label_len; i < BIN_HEADER_LABELSZ; i++)
-				*outptr++ = ' ';
-		}
-		else
-			outptr += BIN_HEADER_LABELSZ;
-
-		mu_outrab.rab$w_rsz = outptr - outbuf;
-		mu_outrab.rab$l_rbf = outbuf;
-		status = sys$put (&mu_outrab);
-		if (RMS$_NORMAL != status)
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRIOERR, 2, mu_outfab.fab$b_fns, mu_outfab.fab$l_fna,
-				       status, 0, mu_outrab.rab$l_stv, 0);
-			mupip_exit(ERR_MUNOACTION);
-		}
-	}
-	else
-	{
-		assert ((MU_FMT_GO == format) || (MU_FMT_ZWR == format));
-		CLI$GET_VALUE(&label_str, &label_buff, &mu_outrab.rab$w_rsz);
-		mu_outrab.rab$l_rbf = label_buff.dsc$a_pointer;
-		status = sys$put(&mu_outrab);
-		if (RMS$_NORMAL != status)
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRIOERR, 2, mu_outfab.fab$b_fns, mu_outfab.fab$l_fna,
-				       status, 0, mu_outrab.rab$l_stv, 0);
-			mupip_exit(ERR_MUNOACTION);
-		}
-		stringpool.free = stringpool.base;
-		op_horolog(&val);
-		stringpool.free = stringpool.base;
-		op_fnzdate(&val, &datefmt, &null_str, &null_str, &val);
-		if (MU_FMT_ZWR == format)
-		{
-			memcpy(val.str.addr + val.str.len, " ZWR", 4);
-			val.str.len += 4;
-		}
-		mu_outrab.rab$l_rbf = val.str.addr;
-		mu_outrab.rab$w_rsz = val.str.len;
-		status = sys$put(&mu_outrab);
-		if (RMS$_NORMAL != status)
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRIOERR, 2, mu_outfab.fab$b_fns, mu_outfab.fab$l_fna,
-				       status, 0, mu_outrab.rab$l_stv, 0);
-			mupip_exit(ERR_MUNOACTION);
-		}
-	}
-	success = TRUE;
-	gvspan = NULL;
-	for (gl_ptr = gl_head.next; gl_ptr; gl_ptr = next_gl_ptr)
-	{
-		if (mu_ctrly_occurred)
-			break;
-		DO_OP_GVNAME(gl_ptr);
-			/* sets gv_target/gv_currkey/gv_cur_region/cs_addrs/cs_data to correspond to <globalname,reg> in gl_ptr */
-                if (MU_FMT_BINARY == format)
-                {
-                       	extr_collhdr.act = gv_target->act;
-                        extr_collhdr.nct = gv_target->nct;
-                        extr_collhdr.ver = gv_target->ver;
-			mu_outrab.rab$l_rbf = (char *)(&extr_collhdr);
-			mu_outrab.rab$w_rsz = SIZEOF(extr_collhdr);
-			status = sys$put(&mu_outrab);
-			if (RMS$_NORMAL != status)
-			{
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRIOERR, 2,
-					mu_outfab.fab$b_fns, mu_outfab.fab$l_fna, status,
-					0, mu_outrab.rab$l_stv, 0);
-				mupip_exit(ERR_MUNOACTION);
-			}
-		}
-		success2 = mu_extr_gblout(gl_ptr, &mu_outrab, &global_total, format);
-		success = success2 && success;
-		gvnh_reg = gl_ptr->gvnh_reg;
-		last_gvspan = gvspan;
-		gvspan = gvnh_reg->gvspan;
-		if (NULL != gvspan)
-		{	/* this global spans more than one region. aggregate stats across all regions */
-			if (last_gvspan != gvspan)
-				MU_EXTR_STATS_INIT(spangbl_total); /* this is the FIRST spanned region. initialize spangbl_total */
-			MU_EXTR_STATS_ADD(spangbl_total, global_total);	/* add global_total to grand_total */
-		}
-		next_gl_ptr = gl_ptr->next;
-		if (logqualifier || mu_ctrlc_occurred)
-		{
-			ISSUE_RECORDSTAT_MSG(gl_ptr, global_total, PRINT_REG_TRUE);
-			if ((NULL != gvspan) && ((NULL == next_gl_ptr) || (next_gl_ptr->gvnh_reg != gvnh_reg)))
-			{	/* this is the LAST spanned region. Display summary line across all spanned regions */
-				ISSUE_RECORDSTAT_MSG(gl_ptr, spangbl_total, PRINT_REG_FALSE);
-			}
-			mu_ctrlc_occurred = FALSE;
-		}
-		MU_EXTR_STATS_ADD(grand_total, global_total);	/* add global_total to grand_total */
-	}
-	status = sys$close(&mu_outfab);
-	if (status != RMS$_NORMAL)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_EXTRCLOSEERR, 2,
-			mu_outfab.fab$b_fns, mu_outfab.fab$l_fna, status,
-				0, mu_outfab.fab$l_stv, 0);
-		mupip_exit(ERR_MUNOACTION);
-	}
-	if (mu_ctrly_occurred)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_EXTRACTCTRLY);
-		mupip_exit(ERR_MUNOFINISH);
-	}
-	gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_RECORDSTAT, 6, LEN_AND_LIT("TOTAL"),
-		&grand_total.recknt, grand_total.keylen, grand_total.datalen, grand_total.reclen);
-	mupip_exit(success ? SS$_NORMAL : ERR_MUNOFINISH);
-}
diff --git a/sr_vvms/mu_getlst.c b/sr_vvms/mu_getlst.c
deleted file mode 100644
index add8c7f..0000000
--- a/sr_vvms/mu_getlst.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- * mu_getlst.c
- *
- * Description:	constructs the list that is specified by "name" from cli, size of each item
- *		of the list is "size", if anything wrong happened, set error_mupip.
- *		If we are in backup, we also parse the file spec for the list.
- *
- * Input:	char *name		-- specifies cli value to get
- *		int4 size		-- specifies the size of a list item
- *		bool in_backup		-- specifies whether we need to parse file specs for the list.
- * Output:	tp_region *grlist	-- head of the list constructed
- *		error_mupip		-- set, if something wrong happened
- */
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_limits.h"
-
-#include <descrip.h>
-#include <climsgdef.h>
-#include <strdef.h>
-#include <rms.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "mupipbckup.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "util.h"
-#include "mu_getlst.h"
-#include "gtmmsg.h"
-
-GBLREF  bool 		error_mupip;
-GBLREF  bool		in_backup;
-GBLREF  bool		is_directory;
-GBLREF	tp_region	*grlist;
-GBLREF	gd_addr		*gd_header;
-GBLREF	boolean_t	mu_star_specified;
-
-void mu_getlst(char *name, int4 size)
-{
-	unsigned char	regspec_buffer[GTM_PATH_MAX], filspec_buffer[GTM_PATH_MAX];
-	unsigned short	ret_len, ct;
-	gd_region	*reg;
-	tp_region	*list;
-	uint4		status;
-	boolean_t	matched;
-
-	$DESCRIPTOR(regspec, regspec_buffer);
-	$DESCRIPTOR(filspec, filspec_buffer);
-	$DESCRIPTOR(cand_str, "");
-	$DESCRIPTOR(fili,"DIRECTORY");
-	$DESCRIPTOR(regi, "");
-	error_def(ERR_FILEPARSE);
-	error_def(ERR_TEXT);
-
-	regi.dsc$a_pointer = name;
-	regi.dsc$w_length = strlen(name);
-
-	assert(size > 0);
-	mu_star_specified = FALSE;
-
-	is_directory = FALSE;
-	for (; CLI$_ABSENT != CLI$GET_VALUE(&regi, &regspec, &ret_len); regspec.dsc$w_length = MAX_FN_LEN + 1)
-	{
-		if ((1 == ret_len) && ('*' == *regspec.dsc$a_pointer))
-			mu_star_specified = TRUE;
-		regspec.dsc$w_length = ret_len;
-		reg = (gd_region *)gd_header->regions;
-		for (matched = FALSE, ct = 0 ; ct < gd_header->n_regions ; reg++, ct++)
-		{
-			cand_str.dsc$a_pointer = &(reg->rname[0]);
-			cand_str.dsc$w_length = strlen(reg->rname);
-			if(STR$_MATCH == str$match_wild(&cand_str, &regspec))
-			{
-				matched = TRUE;
-				if (NULL == (list = insert_region(reg, &(grlist), NULL, size)))
-				{
-                               		error_mupip = TRUE;
-					rts_error(VARLSTCNT(4) ERR_TEXT, 2, RTS_ERROR_STRING("Region not found"));
-					continue;
-				}
-				if ((FALSE == in_backup) || (0 != ((backup_reg_list *)list)->backup_file.len))
-					continue;
-				if (TRUE == is_directory)
-				{
-					assert(NULL != grlist->fPtr);
-					mubexpfilnam((backup_reg_list *)list);
-					if (error_mupip)
-						return;
-				}
-				else
-				{
-					/* get a file spec for this reg spec */
-					status = CLI$GET_VALUE(&fili, &filspec, &ret_len);
-					if ((SS$_NORMAL != status) && (CLI$_COMMA != status))
-					{
-						gtm_putmsg(VARLSTCNT(1) status);
-						error_mupip = TRUE;
-					        return;
-					}
-					if (FALSE == mubgetfil((backup_reg_list *)list,
-								filspec.dsc$a_pointer,
-								ret_len))
-					{
-						gtm_putmsg(VARLSTCNT(4) ERR_FILEPARSE, 2,
-							ret_len, filspec.dsc$a_pointer);
-						error_mupip = TRUE;
-					        return;
-					}
-					if ((FALSE == is_directory) && (SS$_NORMAL == status))
-						break;
-				}
-       	        	}
-		} /* foreach region in gd_header */
-		if (FALSE == matched)
-		{
-			util_out_print("Region !AD not found.", TRUE, regspec.dsc$w_length, regspec.dsc$a_pointer);
-			error_mupip = TRUE;
-			return;
-		}
-	} /* foreach reg spec */
-
-	return;
-}
diff --git a/sr_vvms/mu_gvis.c b/sr_vvms/mu_gvis.c
deleted file mode 100644
index f43337e..0000000
--- a/sr_vvms/mu_gvis.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "msg.h"
-#include "format_targ_key.h"
-#include "mu_gvis.h"
-
-GBLREF gv_key	*gv_currkey;
-
-void mu_gvis(void)
-{
-	char		key_buff[MAX_ZWR_KEY_SZ], *key_end;
-	msgtype		msg;
-
-	error_def(ERR_GVIS);
-
-	msg.arg_cnt = 4;
-	msg.new_opts = msg.def_opts = 1;
-	msg.msg_number = ERR_GVIS;
-	msg.fp_cnt = 2;
-	if (gv_currkey->end)
-	{
-		if ((key_end = format_targ_key(&key_buff[0], MAX_ZWR_KEY_SZ, gv_currkey, TRUE)) == 0)
-			key_end = &key_buff[MAX_ZWR_KEY_SZ - 1];
-	} else
-		key_end = &key_buff[0];
-	msg.fp[0].n = key_end - key_buff;
-	msg.fp[1].cp = &key_buff[0];
-	sys$putmsg(&msg,0,0,0);
-}
diff --git a/sr_vvms/mu_load_stat.c b/sr_vvms/mu_load_stat.c
deleted file mode 100644
index 9e4736e..0000000
--- a/sr_vvms/mu_load_stat.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "msg.h"
-#include "mu_load_stat.h"
-
-GBLREF bool mu_ctrlc_occurred;
-
-mu_load_stat(uint4 max_data_len, uint4 max_subsc_len, uint4 key_count, uint4 rec_count, uint4 stat_type)
-{
-	static readonly unsigned char gt_lit[] = "LOAD TOTAL";
-	msgtype		*msg;
-	error_def(ERR_STATCNT);
-
-	msg = malloc(SIZEOF(msgtype) + FAO_ARG);
-	msg->arg_cnt = 7;
-	msg->new_opts = msg->def_opts = 1;
-	msg->msg_number = ERR_STATCNT;
-	msg->fp_cnt = 5;
-	msg->fp[0].n = SIZEOF(gt_lit) - 1;
-	msg->fp[1].cp = gt_lit;
-	msg->fp[2].n = key_count;
-	msg->fp[3].n = max_subsc_len;
-	msg->fp[4].n = max_data_len;
-	sys$putmsg(msg,0,0,0);
-
-	msg->msg_number = stat_type;
-	msg->arg_cnt = 3;
-	msg->fp_cnt = 1;
-	msg->fp[0].n = rec_count;
-	sys$putmsg(msg,0,0,0);
-
-	mu_ctrlc_occurred = FALSE;
-	free (msg);
-}
diff --git a/sr_vvms/mu_load_stat.h b/sr_vvms/mu_load_stat.h
deleted file mode 100644
index a958f7f..0000000
--- a/sr_vvms/mu_load_stat.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MU_LOAD_STAT_INCLUDED
-#define MU_LOAD_STAT_INCLUDED
-
-int mu_load_stat(uint4 max_data_len, uint4 max_subsc_len, uint4 key_count, uint4 rec_count,
-	uint4 stat_type);
-
-#endif /* MU_LOAD_STAT_INCLUDED */
diff --git a/sr_vvms/mu_outofband_setup.c b/sr_vvms/mu_outofband_setup.c
deleted file mode 100644
index 9ada142..0000000
--- a/sr_vvms/mu_outofband_setup.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include <iodef.h>
-#include <dvidef.h>
-#include <dcdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <efndef.h>
-#include "mupip_ctrl.h"
-
-
-#define OUTOFBAND_MSK 0x02000008
-
-GBLREF bool			mu_ctrly_occurred;
-GBLREF bool			mu_ctrlc_occurred;
-
-void mu_outofband_setup(void)
-{	int4		status, channel, item_code, event;
-	uint4	devclass;
-	io_terminator	mu_outofband_msk;
-	$DESCRIPTOR(sys_input,"SYS$INPUT");
-
-	if ((status = sys$assign(&sys_input,&channel,0,0)) != SS$_NORMAL)
-		rts_error(VARLSTCNT(1) status);
-	item_code = DVI$_DEVCLASS;
-	lib$getdvi(&item_code, &channel, 0, &devclass, 0, 0);
-	if (devclass == DC$_TERM)
-	{
-		mu_outofband_msk.x = 0;
-		mu_outofband_msk.mask = OUTOFBAND_MSK;
-		if ((status = sys$qiow(EFN$C_ENF,channel
-				,(IO$_SETMODE | IO$M_OUTBAND | IO$M_TT_ABORT)
-				,0 ,0 ,0
-				,mupip_ctrl
-				,&mu_outofband_msk
-				,0 ,0 ,0 ,0 )) != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(1) status);
-		}
-		event = efn_outofband;
-		status = sys$clref(event);
-		if (status != SS$_WASSET && status != SS$_WASCLR)
-		{
-			GTMASSERT;
-		}
-	}
-	mu_ctrly_occurred = mu_ctrlc_occurred = FALSE;
-	return;
-}
diff --git a/sr_vvms/mu_rndwn_file.c b/sr_vvms/mu_rndwn_file.c
deleted file mode 100644
index b9b7daf..0000000
--- a/sr_vvms/mu_rndwn_file.c
+++ /dev/null
@@ -1,607 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <efndef.h>
-#include <descrip.h>
-#include <fab.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <nam.h>
-#include <psldef.h>
-#include <rmsdef.h>
-#include <secdef.h>
-#include <ssdef.h>
-#include <syidef.h>
-
-#include "gtm_string.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "efn.h"
-#include "error.h"
-#include "jnl.h"
-#include "timedef.h"
-#include "vmsdtype.h"
-#include "sleep_cnt.h"
-#include "locks.h"
-#include "mlk_shr_init.h"
-#include "mu_rndwn_file.h"
-#include "dbfilop.h"
-#include "gvcst_protos.h"	/* for gvcst_init_sysops prototype */
-#include "del_sec.h"
-#include "mem_list.h"
-#include "gds_rundown.h"
-#include "init_sec.h"
-#include "gtmmsg.h"
-#include "wcs_sleep.h"
-#include "wcs_flu.h"
-#include "shmpool.h"	/* Needed for the shmpool structures */
-
-#define DEF_NODE	0xFFFF
-
-GBLREF	sgmnt_addrs	*cs_addrs;
-GBLREF	sgmnt_data	*cs_data;
-GBLREF	gd_region	*gv_cur_region;
-GBLREF	jnl_gbls_t	jgbl;
-#ifdef DEBUG
-GBLREF	boolean_t	in_mu_rndwn_file;
-#endif
-
-LITREF	char		gtm_release_name[];
-LITREF	int4		gtm_release_name_len;
-
-error_def(ERR_BADDBVER);
-error_def(ERR_BADGBLSECVER);
-error_def(ERR_CLSTCONFLICT);
-error_def(ERR_DBFILERR);
-error_def(ERR_DBNOTGDS);
-error_def(ERR_FILEIDGBLSEC);
-error_def(ERR_GBLSECNOTGDS);
-error_def(ERR_TEXT);
-error_def(ERR_VERMISMATCH);
-
-OS_PAGE_SIZE_DECLARE
-
-int	mu_rndwn_file(bool standalone)			/* operates on gv_cur_region */
-{
-	sgmnt_data		*temp_cs_data;
-	jnl_private_control	*jpc;
-	vms_gds_info		*gds_info;
-	vms_lock_sb		*file_lksb;
-	file_control		*fc;
-	struct dsc$descriptor_s	section;
-	uint4			flags, lcnt, size, status, dbfop_status, owner_node, node, init_status, outaddrs[2];
-	boolean_t		clustered, read_write, is_bg;
-	char			name_buff[GLO_NAME_MAXLEN], now_running[MAX_REL_NAME], node_buff[9];
-	typedef struct
-        {
-                item_list_3     ilist;
-                int4            terminator;
-        } syistruct;
-	syistruct		syi_list;
-	unsigned short		retlen, iosb[4];
-	boolean_t		mu_rndwn_status;
-	node_local_ptr_t	cnl;
-	gtm_uint64_t		sec_size;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	mu_rndwn_status = FALSE;
-	node = 0;
-	fc = gv_cur_region->dyn.addr->file_cntl;
-	fc->op = FC_OPEN;
-	fc->file_type = dba_bg;	/* note that the file_type here does not imply the access method of the database (csd->acc_meth).
-				 *	instead this is just an indication that database file I/O is done through sys$qiow() calls
-				 *	and not sys$updsec() calls to dbfilop() which in turn require a fc->file_type of dba_bg
-				 * later if gvcst_init() is attempted on the same database, this gets reset appropriately.
-				 */
-	dbfop_status = dbfilop(fc);
-	if (SS$_NORMAL != dbfop_status)
-	{
-		gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-		gtm_putmsg(VARLSTCNT(1) dbfop_status);
-		return mu_rndwn_status;
-	}
-	gds_info = FILE_INFO(gv_cur_region);
-	read_write = (FALSE == gv_cur_region->read_only);
-	syi_list.ilist.item_code = SYI$_NODE_CSID;
-        syi_list.ilist.buffer_address = &node;
-        syi_list.ilist.buffer_length = SIZEOF(node);
-        syi_list.ilist.return_length_address = &retlen;
-        syi_list.terminator = 0;
-        status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &syi_list, iosb, NULL, 0);
-	if (SS$_NORMAL == status)
-                status = iosb[0];
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(1) status);
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		return mu_rndwn_status;
-	}
-	if (0 == node)
-		node = DEF_NODE;
-	gv_cur_region->node = node;		/* Leave it so that it goes into the value block */
-	cs_addrs = &gds_info->s_addrs;
-	cs_addrs->hdr = NULL;
-        cs_addrs->nl = NULL;
-        cs_addrs->jnl = NULL;
-	cs_addrs->db_addrs[0] = cs_addrs->db_addrs[1] = NULL;
-	cs_addrs->lock_addrs[0] = cs_addrs->lock_addrs[1] = NULL;
-	ESTABLISH_RET(gds_rundown_ch, FALSE);
-	global_name("GT$S", &gds_info->file_id, name_buff);
-	section.dsc$a_pointer = &name_buff[1];
-	section.dsc$w_length = name_buff[0];
-	section.dsc$b_dtype = DSC$K_DTYPE_T;
-	section.dsc$b_class = DSC$K_CLASS_S;
-	file_lksb = &gds_info->file_cntl_lsb;
-	file_lksb->valblk[0] = gv_cur_region->node;
-	/* These locks must be taken out before mapping the file to a section, and released after unmapping the section */
-	/* Note:  Rather than simply taking out this lock at PW mode, we take it out at NL mode and then convert to EX.
-	 * Lock requests in the conversion queue are serviced before locks in the waiting queue;  heavy GT.CX activity
-	 * on a given database can potentially keep the conversion queue busy enough to keep new lock requests (especially
-	 * at higher lock modes like EX) bottled up on the waiting queue indefinitely.  Since NL mode lock requests are
-	 * compatible with all other lock modes, they don't go on the waiting queue;  they are always granted.  Then the
-	 * compatible with all other lock modes, and since they don't go to the waiting queue if LCK$M_EXPEDITE is specified;
-	 * they are always granted. Then the subsequent conversion request will rapidly move to the head of the conversion
-	 * queue and ultimately be granted.
-	 */
-	status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, file_lksb, LCK$M_SYSTEM | LCK$M_EXPEDITE,
-							&section, 0, NULL, 0, NULL, PSL$C_USER, 0);
-	if (SS$_NORMAL == status)
-		status = file_lksb->cond;
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-		gtm_putmsg(VARLSTCNT(1) status);
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		return mu_rndwn_status;
-	}
-	for (lcnt = 1; lcnt <= MAX_LCK_TRIES; lcnt++)
-	{	/* until the following lock is available, there's a transition going on */
-		status = gtm_enq(efn_immed_wait, LCK$K_PWMODE, file_lksb, LCK$M_CONVERT | LCK$M_NOQUEUE | LCK$M_NODLCKWT,
-					NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = file_lksb->cond;
-		if (SS$_NOTQUEUED != status)
-			break;
-		wcs_sleep(lcnt);
-	}
-	assert(MAX_LCK_TRIES > lcnt);
-	if (SS$_NORMAL == status)
-	{
-		status = gtm_enqw(EFN$C_ENF, LCK$K_EXMODE, file_lksb,
-				LCK$M_CONVERT | LCK$M_NOQUEUE | LCK$M_NODLCKWT, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = file_lksb->cond;
-	}
-	if (SS$_NORMAL == status)
-	{	/* convert the lock from EX to PW in order to update the value of the lsb */
-		status = gtm_enqw(EFN$C_ENF, LCK$K_PWMODE, file_lksb, LCK$M_VALBLK | LCK$M_CONVERT | LCK$M_NODLCKBLK,
-				NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = file_lksb->cond;
-	}
-	if (SS$_NORMAL != status)
-	{
-		if (SS$_NOTQUEUED == status)
-			status = RMS$_FLK;
-		gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-		gtm_putmsg(VARLSTCNT(1) status);
-		status = gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		file_lksb->lockid = 0;
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		return mu_rndwn_status;
-	}
-	/* -------------- From this point on, I should have standalone access db_init() might be pending ----------------- */
-	/* Allocate temporary storage for the database file header and read it in */
-	/* We only need to read SIZEOF(sgmnt_data) here */
-	temp_cs_data = malloc(ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE));
-	fc->op = FC_READ;
-	fc->op_buff = temp_cs_data;
-	fc->op_len = SGMNT_HDR_LEN;
-	fc->op_pos = 1;
-	dbfop_status = dbfilop(fc);
-	if (SS$_NORMAL != dbfop_status)
-	{
-		gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-		gtm_putmsg(VARLSTCNT(1) dbfop_status);
-		status = gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		file_lksb->lockid = 0;
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		return mu_rndwn_status;
-	}
-	if ((gv_cur_region->dyn.addr->acc_meth != temp_cs_data->acc_meth)
-		&& ((dba_mm == temp_cs_data->acc_meth) || (dba_bg == temp_cs_data->acc_meth)))
-	{	/* Note that it is possible that temp_cs_data->acc_meth is not MM or BG and yet is a valid global section.
-		 * This is possible if that global section was created by a version of GT.M with a different database format.
-		 * We will issue BADDBVER error for such sections later but until then let us work with BG access method.
-		 */
-		assert(dba_cm != gv_cur_region->dyn.addr->acc_meth);
-		gv_cur_region->dyn.addr->acc_meth = temp_cs_data->acc_meth;
-	}
-	dbsecspc(gv_cur_region, temp_cs_data, &sec_size);
-	flags = SEC$M_GBL | SEC$M_SYSGBL;
-        if (is_bg = (dba_bg == temp_cs_data->acc_meth))
-                flags |= SEC$M_WRT | SEC$M_PAGFIL | SEC$M_PERM;
-        else if (read_write)
-                flags |= SEC$M_WRT;
-	status = init_status = init_sec(cs_addrs->db_addrs, &section, gds_info->fab->fab$l_stv, sec_size, flags);
-	if ((SS$_NORMAL == init_status) || (SS$_CREATED == init_status))
-	{
-		if (!gv_cur_region->dyn.addr->fname_len)
-		{	/* coming in from MUPIP RUNDOWN with no arguments. fill in filename from the global section */
-			assert(SS$_NORMAL == init_status);
-			cnl = cs_addrs->db_addrs[0];
-			assert(SIZEOF(cnl->fname) <= SIZEOF(gv_cur_region->dyn.addr->fname));
-			memcpy(gv_cur_region->dyn.addr->fname, cnl->fname, SIZEOF(cnl->fname));
-			gv_cur_region->dyn.addr->fname[SIZEOF(cnl->fname) - 1] = '\0';
-			gv_cur_region->dyn.addr->fname_len = strlen(gv_cur_region->dyn.addr->fname);
-		}
-		if (memcmp(temp_cs_data->label, GDS_LABEL, GDS_LABEL_SZ - 3))
-			status = ERR_DBNOTGDS;
-		else if (MEMCMP_LIT(temp_cs_data->label, GDS_LABEL))
-			status = ERR_BADDBVER;
-		/*	the following conditions should also be reported
-		 * 	else if (temp_cs_data->createinprogress)
-		 * 	else if (temp_cs_data->trans_hist.curr_tn > cs_data->trans_hist.curr_tn)
-		 */
-		if (SS$_NORMAL == status)
-		{
-			memcpy(now_running, temp_cs_data->now_running, MAX_REL_NAME);
-			/* issue VERMISMATCH error if now_running in node_local does not match that of the file-header.
-			 * there is one exception and that is to see if now_running in the file-header is the NULL string.
-			 * 	(this is currently possible if the last process to detach from global section had read-only
-			 * 	access to the database and was abnormally terminated leaving the global section orphaned).
-			 * in this case, we do not want to issue a VERMISMATCH error.
-			 */
-			if (memcmp(now_running, gtm_release_name, gtm_release_name_len + 1) && (now_running[0]))
-				status = ERR_VERMISMATCH;
-		}
-		/* similar to the VERMISMATCH error exception above, we need to except the case owner_node is ZERO.
-		 * this needs to be reworked in a much better way for V4.3-001D --- nars -- 2002/09/11
-		 */
-		if ((init_status == status) && (owner_node = temp_cs_data->owner_node))
-		{
-			if ((SS$_NORMAL == status) && (node != owner_node))
-			{
-				status = ERR_CLSTCONFLICT;
-				i2hex(owner_node, node_buff, 8);
-			} else if ((SS$_CREATED == status) && read_write)
-			{
-				memset(temp_cs_data->machine_name, 0, MAX_MCNAMELEN);
-				temp_cs_data->owner_node = 0;
-				temp_cs_data->freeze = 0;
-				fc->op = FC_WRITE;
-				fc->op_len = SGMNT_HDR_LEN;
-				fc->op_pos = 1;
-				dbfop_status = dbfilop(fc);
-				if (SS$_NORMAL != dbfop_status)
-				{
-					gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-					gtm_putmsg(VARLSTCNT(1) dbfop_status);
-					status = gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-					assert(SS$_NORMAL == status);
-					file_lksb->lockid = 0;
-					sys$dassgn(gds_info->fab->fab$l_stv);
-					free(temp_cs_data);
-					return mu_rndwn_status;
-				}
-			}
-		}
-	}
-	if (SS$_NORMAL != status)
-	{	/* Note:  this includes the successful condition SS$_CREATED */
-		REVERT;
-		outaddrs[0] = cs_addrs->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-		outaddrs[1] = cs_addrs->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-		if (FALSE == is_va_free(outaddrs[0]))
-			gtm_deltva(outaddrs, NULL, PSL$C_USER);
-		/* Don't delete the global section if VERMISMATCH/CLSTCONFLICT/DBNOTGDS/BADDBVER error on an existing section */
-		if (ERR_CLSTCONFLICT != status && ERR_VERMISMATCH != status && ERR_DBNOTGDS != status && ERR_BADDBVER != status)
-			del_sec(SEC$M_SYSGBL, &section, NULL);
-		free(temp_cs_data);
-		if ((FALSE == standalone) || (SS$_CREATED != status))
-		{
-			gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-			file_lksb->lockid = 0;
-		}
-		if (SS$_CREATED == status)
-		{
-			mu_rndwn_status = TRUE;
-			file_lksb->valblk[0] = 0;	/* reset to 0 since section has been deleted */
-			sys$dassgn(gds_info->fab->fab$l_stv);
-			return mu_rndwn_status;
-		}
-		if (ERR_VERMISMATCH == status)
-			gtm_putmsg(VARLSTCNT(8) ERR_VERMISMATCH, 6, DB_LEN_STR(gv_cur_region),
-				gtm_release_name_len, gtm_release_name, LEN_AND_STR(now_running));
-		else if (ERR_CLSTCONFLICT == status)
-			gtm_putmsg(VARLSTCNT(6) ERR_CLSTCONFLICT, 4, DB_LEN_STR(gv_cur_region), SIZEOF(node_buff), node_buff);
-		else if ((ERR_DBNOTGDS == status) || (ERR_BADDBVER == status))
-		{
-			gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-			gtm_putmsg(VARLSTCNT(4) status, 2, GDS_LABEL_SZ - 1, GDS_LABEL);
-		} else
-		{
-			gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-			gtm_putmsg(VARLSTCNT(1) status);
-		}
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		return mu_rndwn_status;
-	}
-	/* The database file is valid and up-to-date with respect to the file header;
-	 * map global sections and establish pointers to shared memory
-	 */
-        if (is_bg)
-                cs_addrs->nl = cs_addrs->db_addrs[0];
-        else
-        {
-		name_buff[4] = 'L';
-                size = ROUND_UP(LOCK_SPACE_SIZE(temp_cs_data) + NODE_LOCAL_SPACE(temp_cs_data) + JNL_SHARE_SIZE(temp_cs_data)
-				+ SHMPOOL_BUFFER_SIZE, OS_PAGE_SIZE) / OS_PAGELET_SIZE;
-                status = gtm_expreg(size, cs_addrs->lock_addrs, PSL$C_USER, 0);
-		assert(cs_addrs->lock_addrs[0] + size * OS_PAGELET_SIZE - 1 == cs_addrs->lock_addrs[1]);
-		if (SS$_NORMAL == status)
-			status = init_sec(cs_addrs->lock_addrs, &section, 0, size,
-						SEC$M_PAGFIL | SEC$M_GBL | SEC$M_WRT | SEC$M_SYSGBL);
-		if ((SS$_NORMAL != status) && (SS$_CREATED != status))
-                {
-                        cs_addrs->lock_addrs[0] = NULL;
-			gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-			file_lksb->lockid = 0;
-                        gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-			gtm_putmsg(VARLSTCNT(1) status);
-			sys$dassgn(gds_info->fab->fab$l_stv);
-			free(temp_cs_data);
-			return mu_rndwn_status;
-                }
-                cs_addrs->nl = cs_addrs->lock_addrs[0];
-        }
-	/* The handling of shared memory rundown differs between Unix and VMS in the following areas. The VMS checks above
-	 * for GDS_LABEL and now_running are using the file header, whereas Unix uses shared memory. In VMS, running down
-	 * an older version's partially initialized shared memory will not issue a VERMISMATCH error since now_running[0]
-	 * would be 0 -- it is treated the same as the case where the last process to detach had read-only access to the
-	 * database. In both cases, the Unix approach seems better.
-	 */
-	if (cs_addrs->nl->glob_sec_init)
-	{
-		cs_addrs->critical = (sm_uc_ptr_t)(cs_addrs->nl) + NODE_LOCAL_SIZE;
-		/* Note: Here we check jnl_sate from database file and
-		 * its value cannot change without standalone access.
-		 * In other words it is not necessary to read shared memory for the test (jnl_state != jnl_notallowed)
-		 * The jnl_buff buffer should be initialized irrespective of read/write process */
-		JNL_INIT(cs_addrs, gv_cur_region, temp_cs_data);
-		cs_addrs->shmpool_buffer = (shmpool_buff_hdr_ptr_t)((sm_uc_ptr_t)(cs_addrs->nl) + NODE_LOCAL_SPACE(temp_cs_data)
-								    + JNL_SHARE_SIZE(temp_cs_data));
-		cs_addrs->lock_addrs[0] = (sm_uc_ptr_t)(cs_addrs->shmpool_buffer) + SHMPOOL_BUFFER_SIZE;
-		cs_addrs->lock_addrs[1] = cs_addrs->lock_addrs[0] + LOCK_SPACE_SIZE(temp_cs_data) - 1;
-		cs_data = cs_addrs->hdr = is_bg ? (cs_addrs->lock_addrs[1] + 1 + CACHE_CONTROL_SIZE(temp_cs_data))
-						: cs_addrs->db_addrs[0];
-		assert(cs_data->acc_meth == temp_cs_data->acc_meth);
-		assert((-(SIZEOF(uint4) * 2) & (uint4)cs_addrs->critical) == (uint4)cs_addrs->critical);
-		assert(0 == ((OS_PAGE_SIZE - 1) & (int)cs_addrs->critical));
-		assert(0 == ((OS_PAGE_SIZE - 1) & (int)cs_addrs->nl));
-		assert((!(JNL_ALLOWED(cs_data)))
-		       || (0 == ((OS_PAGE_SIZE - 1) & (int)((char_ptr_t)cs_addrs->jnl->jnl_buff - JNL_NAME_EXP_SIZE))));
-		assert(0 == ((OS_PAGE_SIZE - 1) & (int)cs_addrs->shmpool_buffer));
-		assert(0 == ((OS_PAGE_SIZE - 1) & (int)cs_addrs->lock_addrs[0]));
-		assert(0 == ((OS_PAGE_SIZE - 1) & (int)(cs_addrs->lock_addrs[1] + 1)));
-		assert(0 == ((OS_PAGE_SIZE - 1) & (int)cs_addrs->hdr));
-		/* -------- verify pointers from our calculation vs. the copy in shared memory ---------- */
-		assert((sm_off_t)((sm_uc_ptr_t)cs_addrs->critical - (sm_uc_ptr_t)cs_addrs->nl) == cs_addrs->nl->critical);
-		assert((!(JNL_ALLOWED(cs_data))) ||
-		       ((sm_off_t)((sm_uc_ptr_t)cs_addrs->jnl->jnl_buff - (sm_uc_ptr_t)cs_addrs->nl)) == cs_addrs->nl->jnl_buff);
-		assert((sm_off_t)((sm_uc_ptr_t)cs_addrs->shmpool_buffer - (sm_uc_ptr_t)cs_addrs->nl)
-			== cs_addrs->nl->shmpool_buffer);
-		assert(!is_bg || (sm_off_t)((sm_uc_ptr_t)cs_addrs->hdr - (sm_uc_ptr_t)cs_addrs->nl) == cs_addrs->nl->hdr);
-		assert((sm_off_t)((sm_uc_ptr_t)cs_addrs->lock_addrs[0] - (sm_uc_ptr_t)cs_addrs->nl) == cs_addrs->nl->lock_addrs);
-		status = SS$_NORMAL;
-		if (memcmp(cs_addrs->nl->label, GDS_LABEL, GDS_LABEL_SZ - 1))
-		{
-			name_buff[4] = 'S';
-			if (memcmp(cs_addrs->nl->label, GDS_LABEL, GDS_LABEL_SZ - 3))
-				status = ERR_GBLSECNOTGDS;
-			else
-				status = ERR_BADGBLSECVER;
-		}
-		if (SS$_NORMAL == status)
-		{	/* missing the file_id.did since it came from fid_from_sec, and it's not needed for uniqueness anyway */
-			memcpy(gds_info->file_id.did, &cs_addrs->nl->unique_id.file_id[SIZEOF(gds_info->file_id.dvi)],
-			       SIZEOF(gds_info->file_id.did));
-			if (memcmp(&cs_addrs->nl->unique_id.file_id[0], (char *)(&(gds_info->file_id)), SIZEOF(gds_file_id)))
-				status = ERR_FILEIDGBLSEC;
-		}
-		if (SS$_NORMAL != status)
-		{
-			cs_addrs->lock_addrs[0] = NULL;
-			gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-			file_lksb->lockid = 0;
-			if (ERR_FILEIDGBLSEC == status)
-				gtm_putmsg(VARLSTCNT(4) ERR_FILEIDGBLSEC, 2, DB_LEN_STR(gv_cur_region));
-			else
-				gtm_putmsg(VARLSTCNT(4) status, 2, name_buff[0], &name_buff[1]);
-			sys$dassgn(gds_info->fab->fab$l_stv);
-			free(temp_cs_data);
-			return mu_rndwn_status;
-		}
-		/* Check to see that the fileheader in the shared segment is valid, so we won't endup flushing garbage to db file */
-		if (memcmp(cs_data->label, GDS_LABEL, GDS_LABEL_SZ - 1))
-		{
-			cs_addrs->lock_addrs[0] = NULL;
-			gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-			file_lksb->lockid = 0;
-			if (memcmp(cs_data->label, GDS_LABEL, GDS_LABEL_SZ - 3))
-			{
-				status = ERR_DBNOTGDS;
-				outaddrs[0] = cs_addrs->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-				outaddrs[1] = cs_addrs->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-				if (FALSE == is_va_free(outaddrs[0]))
-					gtm_deltva(outaddrs, NULL, PSL$C_USER);
-				del_sec(SEC$M_SYSGBL, &section, NULL);
-			} else
-				status = ERR_BADDBVER;
-			gtm_putmsg(VARLSTCNT(8) status, 2, DB_LEN_STR(gv_cur_region),
-				   ERR_TEXT, 2, RTS_ERROR_LITERAL("File header in the shared segment seems corrupt"));
-			sys$dassgn(gds_info->fab->fab$l_stv);
-			free(temp_cs_data);
-			return mu_rndwn_status;
-		}
-		/* ------------------------- shared memory is OK --------------------------------- */
-		assert(JNL_ALLOWED(cs_data) == JNL_ALLOWED(temp_cs_data));
-		free(temp_cs_data);
-		if (is_bg)
-			db_csh_ini(cs_addrs);
-		else
-			SET_MM_BASE_ADDR(cs_addrs, cs_data);
-		cs_addrs->nl->in_crit = 0;
-		clustered = cs_data->clustered;
-		cs_data->clustered = FALSE;
-		db_common_init(gv_cur_region, cs_addrs, cs_data);  /* do initialization common to db_init() and mu_rndwn_file() */
-		mlk_shr_init(cs_addrs->lock_addrs[0], cs_data->lock_space_size, cs_addrs, read_write);
-		mutex_init(cs_addrs->critical, NUM_CRIT_ENTRY(cs_data), FALSE);
-		gv_cur_region->open = TRUE;
-		DEBUG_ONLY(in_mu_rndwn_file = TRUE);
-		TREF(donot_write_inctn_in_wcs_recover) = TRUE;
-		/* If csa->nl->donotflush_dbjnl is set, it means mupip recover/rollback was interrupted and therefore we should
-		 * 	not flush shared memory contents to disk as they might be in an inconsistent state.
-		 * In this case, we will go ahead and remove shared memory (without flushing the contents) in this routine.
-		 * A reissue of the recover/rollback command will restore the database to a consistent state.
-		 */
-		if (!cs_addrs->nl->donotflush_dbjnl)
-		{
-			/* At this point we are holding standalone access and are about to invoke wcs_flu/wcs_recover. If
-			 * one or more GT.M processes were at the midst of phase 2 commit, wcs_recover/wcs_flu invokes
-			 * wcs_phase2_commit_wait to wait for the processes to complete the phase 2 commit. But, if we have
-			 * standalone access, there is NO point waiting for the phase 2 commits to complete as the processes
-			 * might have been killed. So, set wcs_phase2_commit_pidcnt to 0 so wcs_recover/wcs_flu skips
-			 * invoking wcs_phase2_commit_wait
-			 */
-			cs_addrs->nl->wcs_phase2_commit_pidcnt = 0;
-			if (is_bg)
-			{	/* No WCSFLU_*_EPOCH is passed here, as we aren't sure of the state, so no EPOCHs are written.
-				 * If we write an EPOCH record, recover may get confused
-				 * Note that for journaling we do not call jnl_file_close() with TRUE for second parameter.
-				 * As a result journal file might not have an EOF record.
-				 * So, a new process will switch the journal file and cut the journal file link,
-				 * though it might be a good journal without an EOF
-				 */
-				wcs_flu(read_write ? WCSFLU_FLUSH_HDR : WCSFLU_NONE);
-			}
-			jpc = cs_addrs->jnl;
-			if (NULL != jpc)
-			{
-				grab_crit(gv_cur_region);
-				if (NOJNL != jpc->channel)
-					jnl_file_close(gv_cur_region, FALSE, FALSE);
-				/* release the journal file lock if we have a non-zero jnllsb->lockid */
-				if (0 != jpc->jnllsb->lockid)
-				{
-					status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-					assert(SS$_NORMAL == status);
-					jpc->jnllsb->lockid = 0;
-				}
-				if (NULL != jpc->jnllsb)
-					free(jpc->jnllsb);
-				free(jpc);
-				cs_addrs->jnl = NULL;
-				rel_crit(gv_cur_region);
-			}
-		}
-		DEBUG_ONLY(in_mu_rndwn_file = FALSE);
-		TREF(donot_write_inctn_in_wcs_recover) = FALSE;
-		gv_cur_region->open = FALSE;
-		if (read_write)
-		{
-			memset(cs_data->now_running, 0, SIZEOF(cs_data->now_running));
-			cs_data->owner_node = 0;
-			cs_data->freeze = 0;
-			fc->op = FC_WRITE;
-			fc->op_buff = cs_data;
-			fc->op_len = SIZEOF_FILE_HDR(cs_data);  /* include master map */
-			fc->op_pos = 1;
-			dbfop_status = dbfilop(fc);
-			if (SS$_NORMAL != dbfop_status)
-			{
-				gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-				gtm_putmsg(VARLSTCNT(1) dbfop_status);
-				status = gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-				assert(SS$_NORMAL == status);
-				file_lksb->lockid = 0;
-				sys$dassgn(gds_info->fab->fab$l_stv);
-				return mu_rndwn_status;
-			}
-		}
-		if (cs_data->clustered = clustered)		/* Note embedded assignment */
-		{
-			fc->op = FC_WRITE;
-			fc->op_buff = cs_addrs->lock_addrs[0];
-			fc->op_len = cs_data->lock_space_size;
-			fc->op_pos = LOCK_BLOCK(cs_data) + 1;
-			dbfop_status = dbfilop(fc);
-			if (SS$_NORMAL != dbfop_status)
-			{
-				gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-				gtm_putmsg(VARLSTCNT(1) dbfop_status);
-				status = gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-				assert(SS$_NORMAL == status);
-				file_lksb->lockid = 0;
-				sys$dassgn(gds_info->fab->fab$l_stv);
-				return mu_rndwn_status;
-			}
-		}
-	} else
-		free(temp_cs_data);
-
-	REVERT;
-	if (!is_bg)
-	{
-		cs_addrs->lock_addrs[0] = (sm_uc_ptr_t)cs_addrs->nl;
-		cs_addrs->lock_addrs[1] = cs_addrs->lock_addrs[0] + ROUND_UP(LOCK_SPACE_SIZE(cs_data) + NODE_LOCAL_SPACE(cs_data)
-						+ JNL_SHARE_SIZE(cs_data) + SHMPOOL_BUFFER_SIZE, OS_PAGE_SIZE) - 1;
-		gtm_deltva(cs_addrs->lock_addrs, NULL, PSL$C_USER);
-		name_buff[4] = 'L';
-		status = del_sec(SEC$M_SYSGBL, &section, NULL);
-	}
-	if (SS$_NORMAL == status)
-	{
-		outaddrs[0] = cs_addrs->db_addrs[0] - OS_PAGE_SIZE;	/* header no access page */
-		outaddrs[1] = cs_addrs->db_addrs[1] + OS_PAGE_SIZE;	/* trailer no access page */
-		if (FALSE == is_va_free(outaddrs[0]))
-			gtm_deltva(outaddrs, NULL, PSL$C_USER);
-		name_buff[4] = 'S';
-		status = del_sec(SEC$M_SYSGBL, &section, NULL);
-	}
-	if (SS$_NORMAL != status)
-	{
-		gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-		file_lksb->lockid = 0;
-		gtm_putmsg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region));
-		gtm_putmsg(VARLSTCNT(1) status);
-		sys$dassgn(gds_info->fab->fab$l_stv);
-		return mu_rndwn_status;
-	}
-	if (FALSE == standalone)
-	{
-		gtm_deq(file_lksb->lockid, NULL, PSL$C_USER, 0);
-		file_lksb->lockid = 0;
-	} else
-		file_lksb->valblk[0] = 0;	/* reset to 0 since section has been deleted */
-	mu_rndwn_status = TRUE;
-	sys$dassgn(gds_info->fab->fab$l_stv);
-	return mu_rndwn_status;
-}
diff --git a/sr_vvms/mu_rndwn_file.h b/sr_vvms/mu_rndwn_file.h
deleted file mode 100644
index 2f673e5..0000000
--- a/sr_vvms/mu_rndwn_file.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MU_RNDWN_FILE_INCLUDED
-#define MU_RNDWN_FILE_INCLUDED
-
-int mu_rndwn_file(bool standalone);
-
-#endif /* MU_RNDWN_FILE_INCLUDED */
diff --git a/sr_vvms/mu_rndwn_replpool.c b/sr_vvms/mu_rndwn_replpool.c
deleted file mode 100644
index a8de3ea..0000000
--- a/sr_vvms/mu_rndwn_replpool.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <prtdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_inet.h" /* Required for gtmsource.h */
-#include <stddef.h>
-#include "gtm_stdlib.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "repl_sem.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmrecv.h"
-#include "gtm_logicals.h"
-#include "jnl.h"
-#include "repl_shm.h"
-#include "mu_rndwn_replpool.h"
-#include "gtmmsg.h"
-
-LITREF char	gtm_release_name[];
-LITREF int4	gtm_release_name_len;
-
-error_def(ERR_VERMISMATCH);
-error_def(ERR_MUREPLPOOL);
-error_def(ERR_TEXT);
-
-#define MU_RNDWN_REPLPOOL_RETURN(RETVAL)	\
-{						\
-	detach_shm(shm_range);			\
-	signoff_from_gsec(shm_lockid);		\
-	return RETVAL;				\
-}
-
-/* runsdown the shared segment identified by replpool_id */
-
-boolean_t mu_rndwn_replpool(replpool_identifier *replpool_id, boolean_t rndwn_all, boolean_t *segment_found)
-{
-	int			which_pool;
-	int4		        status;
-	int4                    shm_lockid;
-	sm_uc_ptr_t		shm_range[2];
-	replpool_id_ptr_t	rp_id_ptr;
-	struct dsc$descriptor_s name_dsc;
-
-	/* name_dsc holds the resource name */
-	*segment_found = FALSE;
-	name_dsc.dsc$a_pointer = replpool_id->repl_pool_key;
-        name_dsc.dsc$w_length = strlen(replpool_id->repl_pool_key);
-        name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-        name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	name_dsc.dsc$a_pointer[name_dsc.dsc$w_length] = '\0';
-
-	assert(JNLPOOL_SEGMENT == replpool_id->pool_type || RECVPOOL_SEGMENT == replpool_id->pool_type);
-	which_pool = (JNLPOOL_SEGMENT == replpool_id->pool_type)? SOURCE : RECV;
-
-	if (!shm_exists(which_pool, &name_dsc))
-		return TRUE;
-	*segment_found = TRUE;
-	if (SS$_NORMAL != (status = register_with_gsec(&name_dsc, &shm_lockid)))
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-			ERR_TEXT, 2, RTS_ERROR_LITERAL("Failed to register with replpool"), status);
-		return FALSE;
-	}
-	status = map_shm(which_pool, &name_dsc, shm_range);
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-			ERR_TEXT, 2, RTS_ERROR_LITERAL("Failed to map replpool segment"), status);
-		signoff_from_gsec(shm_lockid);
-		return FALSE;
-	}
-	/* assert that the replpool identifier is at the top of replpool control structure */
-	assert(0 == offsetof(jnlpool_ctl_struct, jnlpool_id));
-	assert(0 == offsetof(recvpool_ctl_struct, recvpool_id));
-
-	rp_id_ptr = (replpool_identifier *)shm_range[0];
-	if (memcmp(rp_id_ptr->label, GDS_RPL_LABEL, GDS_LABEL_SZ - 1))
-	{
-		if (!memcmp(rp_id_ptr->label, GDS_RPL_LABEL, GDS_LABEL_SZ - 3))
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Incorrect version for the replpool segment."));
-		else
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Incorrect replpool format for the segment."));
-		MU_RNDWN_REPLPOOL_RETURN(FALSE);
-	}
-	if (memcmp(rp_id_ptr->now_running, gtm_release_name, gtm_release_name_len + 1))
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(12) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-			ERR_VERMISMATCH, 6, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-			gtm_release_name_len, gtm_release_name, LEN_AND_STR(rp_id_ptr->now_running));
-		MU_RNDWN_REPLPOOL_RETURN(FALSE);
-	}
-	if (rndwn_all)
-		memcpy(replpool_id->gtmgbldir, rp_id_ptr->gtmgbldir, MAX_FN_LEN + 1);
-	else if	(strcmp(replpool_id->gtmgbldir, rp_id_ptr->gtmgbldir))
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-			ERR_TEXT, 2, RTS_ERROR_LITERAL("Global directory name does not match that in the replpool segment."));
-		MU_RNDWN_REPLPOOL_RETURN(FALSE);
-	}
-	if (SS$_NORMAL != (status = lastuser_of_gsec(shm_lockid)))
-	{
-		if (SS$_NOTQUEUED == status)
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Replpool segment is in use by another process."));
-		} else
-		{
-			gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Failed to get last_user status for replpool segment."), status);
-		}
-		MU_RNDWN_REPLPOOL_RETURN(FALSE);
-	}
-	if (SS$_NORMAL != (status = delete_shm(&name_dsc)))
-	{
-		gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_MUREPLPOOL, 2, name_dsc.dsc$w_length, name_dsc.dsc$a_pointer,
-			ERR_TEXT, 2, RTS_ERROR_LITERAL("Failed to delete replpool segment."), status);
-		MU_RNDWN_REPLPOOL_RETURN(FALSE);
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/mu_rndwn_replpool.h b/sr_vvms/mu_rndwn_replpool.h
deleted file mode 100644
index 4e6f918..0000000
--- a/sr_vvms/mu_rndwn_replpool.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MU_RNDWN_REPLPOOL_INCLUDED
-#define MU_RNDWN_REPLPOOL_INCLUDED
-
-boolean_t mu_rndwn_replpool(replpool_identifier *replpool_id, boolean_t rndwn_all,
-	boolean_t *segment_found);
-
-#endif /* MU_RNDWN_REPLPOOL_INCLUDED */
diff --git a/sr_vvms/mu_signal_process.c b/sr_vvms/mu_signal_process.c
deleted file mode 100644
index 177d88a..0000000
--- a/sr_vvms/mu_signal_process.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <climsgdef.h>
-#include <ssdef.h>
-#include <jpidef.h>
-#include <signal.h>
-#include "gtm_string.h"
-#include "cli.h"
-#include "util.h"
-#include "mu_signal_process.h"
-#include "send_msg.h"
-
-static	int 	send_signal(int, int);
-GBLREF	uint4	process_id;
-
-#define SENDMSG_OUTPUT(mpname, mpid) 								 \
-{												 \
-	error_def(ERR_MUPIPSIG);								 \
-	if (!MEMCMP_LIT(command, STOP_STR))							 \
-		send_msg(VARLSTCNT(9) ERR_MUPIPSIG, 7, LEN_AND_STR(command), signal, process_id, \
-			process_id, mpid, mpid); 						 \
-	util_out_print("!AD issued to process !AD: (PID=!XL)",  FLUSH, LEN_AND_STR(command), 	 \
-		LEN_AND_STR(mpname), mpid);							 \
-}
-
-static int send_signal(int pid, int signal)
-{
-	int status;
-
-	if (SIGUSR1 == signal)
-	{	/* Currently only type of posix signal used */
-		status = kill(pid, signal);
-		if (-1 == status)
-		{
-			perror("Job Interrupt request failed: ");
-			status = SS$_BADPARAM;
-		} else
-			status = SS$_NORMAL;
-	} else
-	{	/* Default signal but only ERR_FORCEDHALT currently sent */
-		status = sys$forcex(&pid, 0, signal);
-		if (status != SS$_NORMAL)
-			rts_error(VARLSTCNT(1) status);
-	}
-	return status;
-}
-
-void mu_signal_process(char *command, int signal)
-{
-	boolean_t	pid_present, name_present;
-	int4		pid, length, status, item, outv;
-	char		prc_nam[20];
-	unsigned short	name_len;
-	$DESCRIPTOR(d_prc_nam,"");
-
-	memset(prc_nam, 0, SIZEOF(prc_nam));
-	pid_present = name_present = FALSE;
-	if (cli_present("id") == CLI_PRESENT)
-	{
-		if(!cli_get_hex("id", &pid))
-			return;
-		pid_present = TRUE;
-	}
-	if (cli_present("name") == CLI_PRESENT)
-	{
-		name_len = 20;
-		if (!cli_get_str("name", prc_nam, &name_len))
-			return;
-		if (prc_nam[name_len-1] == '"')
-			name_len--;
-		if (prc_nam[0] == '"')
-		{
-			d_prc_nam.dsc$a_pointer = &prc_nam[1];
-			name_len--;
-		} else
-			d_prc_nam.dsc$a_pointer = &prc_nam;
-		d_prc_nam.dsc$w_length = name_len;
-		name_present = TRUE;
-	}
-	if (!name_present)
-	{
-		if (SS$_NORMAL == send_signal(pid, signal))
-			SENDMSG_OUTPUT("", pid);
-		return;
-	}
-	item = JPI$_PID;
-	status = lib$getjpi(&item, 0, &d_prc_nam, &outv, 0, 0);
-	if (SS$_NORMAL != status)
-	{
-		rts_error(VARLSTCNT(1) status);
-		return;
-	}
-	if (!pid_present)
-	{
-		if (SS$_NORMAL == send_signal(outv, signal))
-			SENDMSG_OUTPUT(&prc_nam, outv);
-		return;
-	}
-	if (outv != pid)
-	{
-		util_out_print("ID !XL and NAME !AD are not the same process", FLUSH, pid, LEN_AND_STR(&prc_nam));
-		return;
-	}
-	if (SS$_NORMAL == send_signal(pid, signal))
-		SENDMSG_OUTPUT(&prc_nam, pid);
-	return;
-}
diff --git a/sr_vvms/mu_upgrd_outofband.c b/sr_vvms/mu_upgrd_outofband.c
deleted file mode 100644
index 9eea0ff..0000000
--- a/sr_vvms/mu_upgrd_outofband.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "efn.h"
-#include "io.h"
-#include "iottdef.h"
-#include <iodef.h>
-#include <dvidef.h>
-#include <dcdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <efndef.h>
-#include "mupip_ctrl.h"
-
-
-#define OUTOFBAND_MSK 0x02000008
-
-
-void mu_upgrd_outofband(void)
-{	int4		status, channel, item_code, event;
-	uint4	devclass;
-	io_terminator	mu_outofband_msk;
-	$DESCRIPTOR(sys_input,"SYS$INPUT");
-
-	if ((status = sys$assign(&sys_input,&channel,0,0)) != SS$_NORMAL)
-		rts_error(VARLSTCNT(1) status);
-	item_code = DVI$_DEVCLASS;
-	lib$getdvi(&item_code, &channel, 0, &devclass, 0, 0);
-	if (devclass == DC$_TERM)
-	{
-		mu_outofband_msk.x = 0;
-		mu_outofband_msk.mask = OUTOFBAND_MSK;
-		if ((status = sys$qiow(EFN$C_ENF,channel
-				,(IO$_SETMODE | IO$M_OUTBAND)
-				,0 ,0 ,0
-				,mupip_ctrl
-				,&mu_outofband_msk
-				,0 ,0 ,0 ,0 )) != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(1) status);
-		}
-		event = efn_outofband;
-		status = sys$clref(event);
-		if (status != SS$_WASSET && status != SS$_WASCLR)
-		{	rts_error(VARLSTCNT(1) );
-		}
-	}
-	return;
-}
-
diff --git a/sr_vvms/mubchkfs.c b/sr_vvms/mubchkfs.c
deleted file mode 100644
index 9808400..0000000
--- a/sr_vvms/mubchkfs.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include <ssdef.h>
-#include <descrip>
-#include <dvidef>
-#include <dcdef>
-#include "util.h"
-#include "gtmmsg.h"
-
-#define DOTINC ".INC"
-#define DOTDAT ".DAT"
-
-GBLREF bool incremental;
-GBLDEF bool mubtomag=FALSE;
-
-mstr *mubchkfs (mstr *file)
-{
-	unsigned char esa[MAX_FN_LEN];
-	uint4 status, devclass;
-	struct FAB fab;
-	struct NAM nam;
-	mstr *ret;
-	$DESCRIPTOR(dir,"");
-	int4 item_code;
-
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &(nam);
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = file->addr;
-	fab.fab$b_fns = file->len;
-	if (incremental)
-	{	fab.fab$l_dna = DOTINC;
-		fab.fab$b_dns = SIZEOF(DOTINC) - 1;
-	}else
-	{	fab.fab$l_dna = DOTDAT;
-		fab.fab$b_dns = SIZEOF(DOTDAT) - 1;
-	}
-	nam.nam$l_esa = esa;
-	nam.nam$b_ess = MAX_FN_LEN;
-	nam.nam$b_nop = NAM$M_SYNCHK;
-	if ((status = sys$parse(&fab,0,0)) != RMS$_NORMAL)
-	{	gtm_putmsg(VARLSTCNT(1) status);
-		return NULL;
-	}else
-	{	item_code = DVI$_DEVCLASS;
-		dir.dsc$a_pointer = nam.nam$l_esa;
-		dir.dsc$w_length =  nam.nam$b_esl;
-		if ((status = lib$getdvi(&item_code, 0, &dir, &devclass, 0, 0)) != SS$_NORMAL)
-		{	gtm_putmsg(status);
-			return NULL;
-		}
-		if (devclass == DC$_TAPE)
-		{	if (!incremental)
-			{	util_out_print("MUPIP cannot backup to a magnetic tape",TRUE);
-				return NULL;
-			}else
-			{	mubtomag = TRUE;
-			}
-		}
-		ret = malloc(SIZEOF(mstr));
-		if (nam.nam$b_name != 0)
-			ret->len = nam.nam$b_esl;
-		else
-			ret->len = nam.nam$b_esl - nam.nam$b_type - nam.nam$b_ver;
-		ret->addr = malloc(ret->len + 1);
-		memcpy(ret->addr,nam.nam$l_esa,ret->len);
-		*(ret->addr + ret->len) = 0;
-	}
-	return ret;
-}
diff --git a/sr_vvms/mubexpfilnam.c b/sr_vvms/mubexpfilnam.c
deleted file mode 100644
index 015beca..0000000
--- a/sr_vvms/mubexpfilnam.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- * mubexpfilnam.c
- *
- * Description:	expand the filename with the global mstr directory, save the result in list->backup_file
- *		and set list->backup_to to backup_to_file.
- *
- * Input:	directory		-- where directory name is kept.
- *		list->reg		-- used in the call to mupfndfil() to get the filename
- *		is_directory		-- must have already been set, don't even bother to check
- * Output:	list->backup_to		-- should be set to backup_to_file
- *		list->backup_file	-- should have directory + name of the database file
- */
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "mupipbckup.h"
-
-GBLREF	mstr	directory;
-GBLREF	bool	error_mupip;
-
-void mubexpfilnam (backup_reg_list *list)
-{
-	int		status, len;
-	struct FAB	fab;
-	struct NAM	nam;
-	unsigned char	es[MAX_FN_LEN];
-	mstr		file;
-	char		*ptr, filename[MAX_FN_LEN];
-
-	file.len = MAX_FN_LEN;
-	file.addr = filename;
-	if (!mupfndfil(list->reg, &file)) /* mupfndfil prints the error message for non-runtime */
-	{
-		error_mupip = TRUE;
-		return;
-	}
-	*(file.addr + file.len) = ';';
-	file.len++;
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fna = file.addr;
-	fab.fab$b_fns = file.len;
-	nam.nam$b_nop = NAM$M_SYNCHK;
-	nam.nam$l_esa = es;
-	nam.nam$b_ess = SIZEOF(es);
-	status = sys$parse(&fab);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	list->backup_to = backup_to_file;
-	len = nam.nam$l_ver + 1 - nam.nam$l_name;
-	list->backup_file.len = directory.len + len;
-	list->backup_file.addr = malloc(list->backup_file.len+1);
-	memcpy (list->backup_file.addr, directory.addr, directory.len);
-	memcpy (list->backup_file.addr + directory.len, nam.nam$l_name, len);
-	return;
-}
diff --git a/sr_vvms/mubfilcpy.c b/sr_vvms/mubfilcpy.c
deleted file mode 100644
index ec16585..0000000
--- a/sr_vvms/mubfilcpy.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <ssdef.h>
-#include <climsgdef.h>
-#include <iodef.h>
-#include <descrip.h>
-#include <errno.h>
-#include <errnodef.h>
-#include <efndef.h>
-#include "gtm_stdio.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "mupipbckup.h"
-#include "sleep_cnt.h"
-#include "util.h"
-#include "setfileprot.h"
-#include "gtmmsg.h"
-#include "wcs_sleep.h"
-#include "gtm_tempnam.h"
-#include "gds_blk_downgrade.h"
-#include "shmpool.h"
-#include "min_max.h"
-#include "iormdef.h"
-#include "wcs_phase2_commit_wait.h"
-
-#define MAX_TEMPFILE_TRY	16
-#define	BACKUP_E_OPENOUT	0x10A38012
-#define	BACKUP_W_ACCONFLICT	0x10A38410
-
-#define	DELETE_BAD_BACKUP(A)												\
-{															\
-	if (SS$_NORMAL == (status = sys$dassgn((A).fab$l_stv)))								\
-		status = sys$erase(&(A));										\
-	if (RMS$_NORMAL != status) 											\
-	{														\
-		gtm_putmsg(VARLSTCNT(1) status);									\
-		util_out_print("Cannot delete the unsuccessful backup file !AD", TRUE, (A).fab$b_fns, (A).fab$l_fna); 	\
-	}														\
-}
-
-GBLREF	bool			online;
-GBLREF	bool			record;
-GBLREF	bool			file_backed_up;
-GBLREF	bool			mu_ctrly_occurred;
-GBLREF	bool			mu_ctrlc_occurred;
-GBLREF	boolean_t		debug_mupip;
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	sgmnt_addrs		*cs_addrs;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF	unsigned char		*mubbuf;
-GBLREF	uint4			process_id;
-
-bool mubfilcpy(backup_reg_list *list)
-{
-	mstr			*file;
-	char			*errptr, *temp_ptr, tempfilename[MAX_FN_LEN + 1], tempdir[MAX_FN_LEN], prefix[MAX_FN_LEN];
-	char			backup_ign[] = "BACKUP/IGNORE=INTERLOCK ", rename[] = "RENAME ";
-	char                    command_buff[SIZEOF(backup_ign)+2*MAX_FN_LEN+1]; /*= SIZEOF(backup_ign)-1+2(filenames)+2(spaces)*/
-	unsigned short 		wt_iosb[4];
-	uint4 			status, lcnt, backup_status, vbn;
-	int4 			size, tempfilelen, command_len, errlen, read_size, read_len;
-	off_t			filesize_tobe, filesize_curr;
-	struct FAB 		*fcb, fab, temp_fab;
-	struct RAB		temp_rab;
-	unsigned short		old_perm;
-	sgmnt_addrs             *csa;
-	sgmnt_data              *header;
-	struct XABFHC 		xabfhc;
-	shmpool_blk_hdr_ptr_t	sblkh_p;
-	sm_uc_ptr_t		read_ptr, inbuf;
-	block_id		blk_num;
-
-	$DESCRIPTOR(command, command_buff);
-	$DESCRIPTOR(nl, "nl:");
-
-	error_def(ERR_BACKUPCTRL);
-	error_def(ERR_BCKUPBUFLUSH);
-	error_def(ERR_COMMITWAITSTUCK);
-	error_def(ERR_DBCCERR);
-	error_def(ERR_ERRCALL);
-	error_def(ERR_TEXT);
-	error_def(ERR_TRUNCATEFAIL);
-
-	/* ============================================ initialization =================================================== */
-	file = &(list->backup_file);
-	header = list->backup_hdr;
-	fcb = ((vms_gds_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fab;
-
-	/* ======= construct temporary filename in destination directory with region name and process id as prefix ======= */
-	temp_ptr = file->addr + file->len - 1;
-	while ((']' != *temp_ptr) && (temp_ptr > file->addr))
-		temp_ptr--;
-	if (temp_ptr > file->addr)
-	{
-		memcpy(tempdir, file->addr, temp_ptr - file->addr + 1);
-		tempdir[temp_ptr - file->addr + 1] = '\0';
-	} else
-	{
-		assert(FALSE);
-		tempdir[0] = '\0';
-	}
-	memset(prefix, 0, MAX_FN_LEN);
-	memcpy(prefix, gv_cur_region->rname, gv_cur_region->rname_len);
-	SPRINTF(&prefix[gv_cur_region->rname_len], "_%x", process_id);
-	gtm_tempnam(tempdir, prefix, tempfilename);
-	tempfilelen = strlen(tempfilename);
-
-	/* ================= construct the command to backup the database to the temporary file ========================== */
-	MEMCPY_LIT(command_buff, backup_ign);
-	command_len = SIZEOF(backup_ign) - 1;
-	memcpy(&command_buff[command_len], fcb->fab$l_fna, fcb->fab$b_fns);
-	command_len += fcb->fab$b_fns;
-	command_buff[command_len++] = ' ';
-	memcpy(&command_buff[command_len], tempfilename, tempfilelen);
-	command_len += tempfilelen;
-	command_buff[command_len] = '\0';
-	command.dsc$w_length = command_len;
-
-	/* ============================ Issue the command and check the return status ==================================== */
-	lcnt = 0;
-	do
-	{
-		if (debug_mupip)
-			util_out_print("!/MUPIP INFO:	!AD", TRUE, command_len, command_buff);
-		if (SS$_NORMAL != (status = lib$spawn(&command, 0, &nl, 0, 0, 0, &backup_status, 0, 0, 0, 0, 0, 0)))
-		{
-			gtm_putmsg(VARLSTCNT(1) status);
-			util_out_print("Unable to spawn the command: 	!AD", TRUE, command_len, command_buff);
-			return FALSE;
-		}
-		if ((backup_status & 1) || (BACKUP_W_ACCONFLICT == backup_status))
-			break;
-		else if ((BACKUP_E_OPENOUT == backup_status) && (lcnt++ < MAX_TEMPFILE_TRY))
-		{
-			command_len -= tempfilelen;
-			gtm_tempnam(tempdir, prefix, tempfilename);
-			tempfilelen = strlen(tempfilename);
-			memcpy(&command_buff[command_len], tempfilename, tempfilelen);
-			command_len += tempfilelen;
-			command_buff[command_len] = '\0';
-			command.dsc$w_length = command_len;
-		}
-		else
-		{
-			gtm_putmsg(VARLSTCNT(1) backup_status);
-			util_out_print("Execution of command:	!AD failed.", TRUE, command_len, command_buff);
-			assert(FALSE);
-			return FALSE;
-		}
-	} while (TRUE);
-
-	/* ==================== we need to apply header and for online backup, tempfile then rename =================== */
-	if (online)
-		cs_addrs->nl->nbb = BACKUP_NOT_IN_PROGRESS; /* stop everyone from writing to tempfile */
-
-	/* -------------------------- open the temp copy of the backup file ---------------------- */
-	fab = cc$rms_fab;
-	xabfhc = cc$rms_xabfhc;
-	fab.fab$b_fac = FAB$M_BIO | FAB$M_PUT;
-	fab.fab$l_fop = FAB$M_UFO;
-	fab.fab$l_fna = tempfilename;
-	fab.fab$b_fns = tempfilelen;
-	fab.fab$l_xab = &xabfhc;			/* to obtain the filesize info */
-	if (!(1 & (status = sys$open(&fab))))
-	{
-		gtm_putmsg(VARLSTCNT(1) status);
-		util_out_print("ERROR: Cannot open temporary backup file !AD.", TRUE,
-			       fab.fab$b_fns, fab.fab$l_fna);
-		util_out_print("Please delete it manually.", TRUE);
-		return FALSE;
-	}
-
-	if (online)
-	{
-		/* ---------------------- calculate the to-be filesize ----------------------------------- */
-		filesize_tobe = header->start_vbn +
-			(off_t)header->blk_size / DISK_BLOCK_SIZE * header->trans_hist.total_blks;
-		filesize_curr = xabfhc.xab$l_ebk;
-		/* By getting crit here, we ensure that there is no process still in transaction logic that sees
-		   (nbb != BACKUP_NOT_IN_PRORESS). After rel_crit(), any process that enters transaction logic will
-		   see (nbb == BACKUP_NOT_IN_PRORESS) because we just set it to that value. At this point, backup
-		   buffer is complete and there will not be any more new entries in the backup buffer until the next
-		   backup.
-		*/
-		grab_crit(gv_cur_region);
-		assert(cs_data == cs_addrs->hdr);
-		if (dba_bg == cs_data->acc_meth)
-		{	/* Now that we have crit, wait for any pending phase2 updates to finish. Since phase2 updates happen
-			 * outside of crit, we dont want them to keep writing to the backup temporary file even after the
-			 * backup is complete and the temporary file has been deleted.
-			 */
-			if (cs_addrs->nl->wcs_phase2_commit_pidcnt && !wcs_phase2_commit_wait(cs_addrs, NULL))
-			{
-				gtm_putmsg(VARLSTCNT(7) ERR_COMMITWAITSTUCK, 5, process_id, 1,
-					cs_addrs->nl->wcs_phase2_commit_pidcnt, DB_LEN_STR(gv_cur_region));
-				rel_crit(gv_cur_region);
-				DELETE_BAD_BACKUP(fab);
-				return FALSE;
-			}
-		}
-		if (debug_mupip)
-		{
-			util_out_print("MUPIP INFO:   Current Transaction # at end of backup is 0x!16 at XQ", TRUE,
-				&cs_data->trans_hist.curr_tn);
-		}
-		rel_crit(gv_cur_region);
-		/* ------------------------------- write saved blocks ------------------------------------ */
-		lcnt = 0;
-		while ((0 != cs_addrs->shmpool_buffer->backup_cnt) && (0 == cs_addrs->shmpool_buffer->failed))
-		{
-			if (0 != cs_addrs->shmpool_buffer->failed)
-				break;
-			backup_buffer_flush(gv_cur_region);
-			if (++lcnt > MAX_BACKUP_FLUSH_TRY)
-			{
-				gtm_putmsg(VARLSTCNT(1) ERR_BCKUPBUFLUSH);
-				DELETE_BAD_BACKUP(fab);
-				return FALSE;
-			}
-			if (lcnt & 0xF)
-				wcs_sleep(lcnt);
-			else
-			{	/* Force recovery every few retries - this should not be happening */
-				if (FALSE == shmpool_lock_hdr(gv_cur_region))
-				{
-					assert(FALSE);
-					gtm_putmsg(VARLSTCNT(9) ERR_DBCCERR, 2, REG_LEN_STR(gv_cur_region),
-						   ERR_ERRCALL, 3, CALLFROM);
-					DELETE_BAD_BACKUP(fab);
-					return FALSE;
-				}
-				shmpool_abandoned_blk_chk(gv_cur_region, TRUE);
-				shmpool_unlock_hdr(gv_cur_region);
-			}
-		}
-
-		/* --- Verify that no errors from M processes during the backup --- */
-		if (0 != cs_addrs->shmpool_buffer->failed)
-		{
-			util_out_print("Process !XL encountered the following error.", TRUE,
-				       cs_addrs->shmpool_buffer->failed);
-			if (0 != cs_addrs->shmpool_buffer->backup_errno)
-				gtm_putmsg(VARLSTCNT(1) cs_addrs->shmpool_buffer->backup_errno);
-			DELETE_BAD_BACKUP(fab);
-			return FALSE;
-		}
-
-		/* --- Open the temporary file (identical to mubinccpy.c) --- */
-		temp_fab                = cc$rms_fab;
-		temp_fab.fab$b_fac      = FAB$M_GET;
-		temp_fab.fab$l_fna      = list->backup_tempfile;
-		temp_fab.fab$b_fns      = strlen(list->backup_tempfile); /* double check here */
-		temp_rab                = cc$rms_rab;
-		temp_rab.rab$l_fab      = &temp_fab;
-
-		for (lcnt = 1;  MAX_OPEN_RETRY >= lcnt;  lcnt++)
-		{
-			if (RMS$_FLK != (status = sys$open(&temp_fab, NULL, NULL)))
-				break;
-			wcs_sleep(lcnt);
-		}
-		if ((RMS$_NORMAL != status) || (RMS$_NORMAL != (status = sys$connect(&temp_rab))))
-		{
-			gtm_putmsg(VARLSTCNT(1) status);
-			util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-			DELETE_BAD_BACKUP(fab);
-			return FALSE;
-		}
-
-		/* --- read and write every record in the temporary file (different from mubinccpy.c) --- */
-		sblkh_p = (shmpool_blk_hdr_ptr_t)mubbuf;
-		inbuf = (sm_uc_ptr_t)(sblkh_p + 1);
-		while (TRUE)
-		{	/* Due to RMS restrictions we may have to do more than one read to pull in entire record/blk */
-			read_size = SIZEOF(*sblkh_p) + header->blk_size;
-			read_ptr = mubbuf;
-			while (read_size)
-			{
-				read_len = MIN(MAX_RMS_RECORDSIZE, read_size);
-				temp_rab.rab$w_usz = read_len;
-				temp_rab.rab$l_ubf = read_ptr;
-				status = sys$get(&temp_rab);
-				if (RMS$_NORMAL != status)
-				{
-					if (RMS$_EOF == status)
-						break;
-					else
-					{
-						gtm_putmsg(VARLSTCNT(1) status);
-						util_out_print("WARNING:  DB file !AD backup aborted.", TRUE,
-							       fcb->fab$b_fns, fcb->fab$l_fna);
-						DELETE_BAD_BACKUP(fab);
-						return FALSE;
-					}
-				}
-				read_ptr += read_len;
-				read_size -= read_len;
-			}
-			if (RMS$_EOF == status)
-				break;
-			/* Update block in database backup if it exists */
-			blk_num = sblkh_p->blkid;
-			if (header->trans_hist.total_blks <= blk_num)
-				/* Ignore block outside of db range at time of backup initiation */
-				continue;
-			if (debug_mupip)
-				util_out_print("MUPIP INFO:	Restoring block 0x!XL from temporary file.",
-					       TRUE, blk_num);
-			vbn = header->start_vbn + blk_num * (header->blk_size / DISK_BLOCK_SIZE);
-			/* If the incoming block has an ondisk version of V4, convert it back to that
-			   version before writing it out so it is the same as the block in the original
-			   database.
-			*/
-			if (GDSV4 == sblkh_p->use.bkup.ondsk_blkver)
-			{	/* Need to downgrade this block back to a previous format. Downgrade in place. */
-				gds_blk_downgrade((v15_blk_hdr_ptr_t)inbuf, (blk_hdr_ptr_t)inbuf);
-				size = (((v15_blk_hdr_ptr_t)inbuf)->bsiz + 1) & ~1;
-			} else
-				size = (((blk_hdr_ptr_t)inbuf)->bsiz + 1) & ~1;
-
-			if (cs_addrs->do_fullblockwrites)
-				size = ROUND_UP(size, cs_addrs->fullblockwrite_len);
-			assert(cs_addrs->hdr->blk_size >= size);
-			if (SS$_NORMAL != (status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_WRITEVBLK, &wt_iosb[0], 0, 0,
-							     inbuf, size, vbn,0,0,0))
-			    || SS$_NORMAL != (status = wt_iosb[0]))
-			{
-				gtm_putmsg(VARLSTCNT(1) status);
-				util_out_print("ERROR: Failed writing data to backup file !AD.", TRUE,
-					       fab.fab$b_fns, fab.fab$l_fna);
-				DELETE_BAD_BACKUP(fab);
-				return FALSE;
-			}
-			if (wt_iosb[1] != size)
-			{
-				util_out_print("ERROR: !UL bytes, instead of !UL bytes, were written to !AD.", TRUE,
-					       wt_iosb[1], size, fab.fab$b_fns, fab.fab$l_fna);
-				DELETE_BAD_BACKUP(fab);
-				return FALSE;
-			}
-			if (mu_ctrly_occurred || mu_ctrlc_occurred)
-			{
-				gtm_putmsg(VARLSTCNT(1) ERR_BACKUPCTRL);
-				util_out_print("WARNING:  DB file !AD backup aborted.", TRUE,
-					       fcb->fab$b_fns, fcb->fab$l_fna);
-				DELETE_BAD_BACKUP(fab);
-				return FALSE;
-			}
-		}
-
-		/* --- close the temporary file (identical to mubinccpy.c) --- */
-		if (RMS$_NORMAL != (status = sys$close(&temp_fab)))
-		{
-			gtm_putmsg(VARLSTCNT(1) status);
-			util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-			DELETE_BAD_BACKUP(fab);
-			return FALSE;
-		}
-	} /* if (online) */
-
-	/* -------------------------------- write header ----------------------------------------- */
-	size = ROUND_UP(SIZEOF_FILE_HDR(header), DISK_BLOCK_SIZE);
-	assert(size <= 64 * 1024);	/* Max we can write testing "short" iosb fields */
-	status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_WRITEVBLK, &wt_iosb[0], 0, 0, header, size, 1, 0, 0, 0);
-	if (SS$_NORMAL != status || SS$_NORMAL != (status = wt_iosb[0]))
-	{
-		gtm_putmsg(VARLSTCNT(1) status);
-		util_out_print("ERROR: Failed writing database header to backup file !AD.", TRUE,
-			       fab.fab$b_fns, fab.fab$l_fna);
-		DELETE_BAD_BACKUP(fab);
-		return FALSE;
-	}
-	if (wt_iosb[1] != size)
-	{
-		util_out_print("ERROR: !UL bytes, instead of !UL bytes, were written to !AD.", TRUE,
-			       wt_iosb[1], size, fab.fab$b_fns, fab.fab$l_fna);
-		DELETE_BAD_BACKUP(fab);
-		return FALSE;
-	}
-	if (mu_ctrly_occurred || mu_ctrlc_occurred)
-	{
-		gtm_putmsg(VARLSTCNT(1) ERR_BACKUPCTRL);
-		util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-		DELETE_BAD_BACKUP(fab);
-		return FALSE;
-	}
-
-	/* --------------- close the temp copy of the backup file ---------------------------------------------- */
-	if (SS$_NORMAL != (status = sys$dassgn(fab.fab$l_stv)))
-	{
-		gtm_putmsg(VARLSTCNT(1) status);
-		util_out_print("ERROR: System Service SYS$DASSGN() failed.", TRUE);
-		return FALSE;
-	}
-
-	/* ---------- if file has extended since backup started, truncate it ------------------------------------ */
-	if (online && (filesize_tobe != filesize_curr))
-	{
-		/* truncate it */
-		assert(filesize_tobe < filesize_curr);
-		if (0 != truncate(tempfilename, (off_t)(filesize_tobe - 1) * DISK_BLOCK_SIZE))
-		{
-			errptr = (char *)strerror(errno);
-			errlen = strlen(errptr);
-			gtm_putmsg(VARLSTCNT(6) ERR_TRUNCATEFAIL, 4, tempfilelen, tempfilename,
-				   filesize_curr, filesize_tobe - 1);
-			gtm_putmsg(VARLSTCNT(4) ERR_TEXT, 2, errlen, errptr);
-			return FALSE;
-		}
-	}
-
-	/* ======================= rename the tempfilename to the real backup filename ========================== */
-
-	/* --- if we don't have delete permission on the temporary file, give it --- */
-	old_perm = ((vms_gds_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->xabpro->xab$w_pro;
-	if (0x0080 & old_perm)
-	{
-		if (FALSE == setfileprot(tempfilename, tempfilelen,
-					 (old_perm & (~((XAB$M_NODEL << XAB$V_SYS) | (XAB$M_NODEL << XAB$V_OWN))))))
-		{
-			util_out_print("Failed to set protection mask of !AD, to 0x!4XW", TRUE, tempfilelen, tempfilename,
-				       (~((XAB$M_NODEL << XAB$V_SYS) | (XAB$M_NODEL << XAB$V_OWN))) & old_perm);
-			return FALSE;
-		}
-	}
-
-	/* --- construct and issue the command to rename the temporary file to backup file --- */
-	MEMCPY_LIT(command_buff, rename);
-	command_len = SIZEOF(rename) - 1;
-	memcpy(&command_buff[command_len], tempfilename, tempfilelen);
-	command_len += tempfilelen;
-	command_buff[command_len++] = ' ';
-	memcpy(&command_buff[command_len], file->addr, file->len);
-	command_len += file->len;
-	command_buff[command_len] = '\0';
-	command.dsc$w_length = command_len;
-
-	if (debug_mupip)
-		util_out_print("MUPIP INFO:	!AD", TRUE, command_len, command_buff);
-	if ((SS$_NORMAL != (status = lib$spawn(&command, 0, &nl, 0, 0, 0, &backup_status, 0, 0, 0, 0, 0, 0)))
-	    || (!((status = backup_status) & 1)))
-	{
-		gtm_putmsg(VARLSTCNT(1) status);
-		util_out_print("Command:        !AD not executed successfully.", TRUE, command_len, command_buff);
-		return FALSE;
-	}
-
-	/* --- if the original database doesn't have delete permission, neither should the backup copy --- */
-	if (0x0080 & old_perm)
-	{
-		if (FALSE == setfileprot(file->addr, file->len, old_perm))
-		{
-			util_out_print("Failed to set protection mask of !AD, to 0x!4XW", TRUE,
-				       file->addr, file->len, old_perm);
-			return FALSE;
-		}
-	}
-
-	/* =============================== Output Information =================================================== */
-	util_out_print("DB file !AD backed up in file !AD", TRUE,
-		       fcb->fab$b_fns, fcb->fab$l_fna, file->len, file->addr);
-	util_out_print("Transactions up to 0x!16 at XQ are backed up.", TRUE, &header->trans_hist.curr_tn);
-	cs_addrs->hdr->last_com_backup = header->trans_hist.curr_tn;
-	cs_addrs->hdr->last_com_bkup_last_blk = header->trans_hist.total_blks;
-	if (record)
-	{
-		cs_addrs->hdr->last_rec_backup = header->trans_hist.curr_tn;
-		cs_addrs->hdr->last_rec_bkup_last_blk = header->trans_hist.total_blks;
-	}
-	file_backed_up = TRUE;
-
-	return TRUE;
-}
diff --git a/sr_vvms/mubgetfil.c b/sr_vvms/mubgetfil.c
deleted file mode 100644
index 263895f..0000000
--- a/sr_vvms/mubgetfil.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- * mubgetfil.c
- *
- * Description: parse the file spec and determines whether it is backup to file, exec or tcpip.
- *		if it is to file, then determines whether it is a directory and sets "directory"
- *		and "is_directory" correspondingly.
- *
- * Input:       char *name		-- specifies the file spec
- *		ushort len		-- specifies the file spec
- * Output:      backup_reg_list *list	-- parsing result will be put to the backup_to and backup_file fields of list
- *		directory		-- if backup to file and it is a directory, this will be set
- *		is_directory		-- if backup to file, this will be set to reflect whether it is a directory.
- */
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "mupipbckup.h"
-#include "gtm_caseconv.h"
-
-GBLDEF mstr		directory;
-GBLDEF boolean_t	is_directory;
-
-boolean_t mubgetfil(backup_reg_list *list, char *name, unsigned short len)
-{
-	char            tcp[5];
-	mstr 		*mubchkfs(), *temp, file;
-	uint4 		status;
-
-	if (0 == len)
-		return FALSE;
-	if ('|' == *name)
-	{
-		len -= 1;
-		list->backup_to = backup_to_exec;
-		list->backup_file.len = len;
-		list->backup_file.addr = (char *)malloc(len + 1);
-		memcpy(list->backup_file.addr, name + 1, len);
-		return TRUE;
-	}
-	if (len > 5)
-	{
-		lower_to_upper(tcp, name, 5);
-		if (0 == memcmp(tcp, "TCP:/", 5))
-		{
-			list->backup_to = backup_to_tcp;
-			len -= 5;
-			name += 5;
-			while ('/' == *name)
-			{
-				len--;
-				name++;
-			}
-			list->backup_file.len = len;
-			list->backup_file.addr = (char *)malloc(len + 1);
-			memcpy(list->backup_file.addr, name, len);
-			*(list->backup_file.addr + len) = 0;
-			return TRUE;
-		}
-	}
-	file.addr = name;
-	file.len = len;
-	if (NULL == (temp = mubchkfs(&file))) /* mubchkfs is responsible for error message if NULL, and allocate space otherwise */
-		return FALSE;
-	if (']' == *(temp->addr + temp->len - 1))
-	{
-		is_directory = TRUE;
-		directory = *temp;
-		mubexpfilnam(list);
-	} else
-	{
-		is_directory = FALSE;
-		list->backup_file = *temp;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/mubinccpy.c b/sr_vvms/mubinccpy.c
deleted file mode 100644
index 80d65f3..0000000
--- a/sr_vvms/mubinccpy.c
+++ /dev/null
@@ -1,747 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-#include "eintr_wrappers.h"
-
-#include <rms.h>
-#include <ssdef.h>
-#include <iodef.h>
-#include <errno.h>
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include "gtm_netdb.h"
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gdsblk.h"
-#include "gdsbml.h"
-#include "stringpool.h"
-#include "muextr.h"
-#include "murest.h"
-#include "mupipbckup.h"
-#include "sleep_cnt.h"
-#include "util.h"
-#include "cli.h"
-#include "op.h"
-#include "io.h"
-#include "gtmmsg.h"
-#include "wcs_sleep.h"
-#include "gds_blk_upgrade.h"
-#include "shmpool.h"
-#include "iormdef.h"
-#include "iosp.h"
-#include "min_max.h"
-#include "gvcst_lbm_check.h"
-#include "wcs_phase2_commit_wait.h"
-
-#define	MAX_TCP_SEND_RETRY	5
-
-GBLREF 	bool 			record;
-GBLREF 	bool			online;
-GBLREF 	bool			incremental;
-GBLREF 	bool 			file_backed_up;
-GBLREF	bool			error_mupip;
-GBLREF 	bool 			mu_ctrly_occurred;
-GBLREF	bool			mu_ctrlc_occurred;
-GBLREF  bool                    mubtomag;
-GBLREF 	int4 			mubmaxblk;
-GBLREF  spdesc                  stringpool;
-GBLREF  gd_region               *gv_cur_region;
-GBLREF 	sgmnt_addrs		*cs_addrs;
-GBLREF	sgmnt_data_ptr_t	cs_data;
-GBLREF 	unsigned char 		*mubbuf;
-GBLREF  int4                    backup_write_errno;
-GBLREF	int4			backup_close_errno;
-GBLREF	boolean_t		debug_mupip;
-GBLREF	uint4			process_id;
-
-#define COMMON_CLOSE(A)		{					\
-					(*common_close)(A);		\
-					if (0 != backup_close_errno)	\
-						return FALSE;		\
-				}
-
-#define COMMON_WRITE(A, B, C)   {                                       \
-					(*common_write)(A, B, C);       \
-					if (0 != backup_write_errno)    \
-						return FALSE;           \
-				}
-
-/* VMS-only code, which never uses CSA_ARG(). Using GTM_PUTMSG avoids cosmetic warnings. */
-#define GTM_PUTMSG		gtm_putmsg
-
-LITREF	mval		mu_bin_datefmt;
-
-/* forward declarations */
-static void file_write(char *temp, char *buf, int nbytes);
-static void file_close(char *temp);
-static void tcp_write(char *temp, char *buf, int nbytes);
-static void tcp_close(char *temp);
-
-error_def(ERR_BCKUPBUFLUSH);
-error_def(ERR_COMMITWAITSTUCK);
-error_def(ERR_DBCCERR);
-error_def(ERR_ERRCALL);
-
-bool mubinccpy(backup_reg_list *list)
-{
-	static readonly mval	null_str = {MV_STR, 0, 0 , 0 , 0, 0};
-
-	int			backup_socket;
-	int4                    size, size1, bsize, bm_num, hint, lmsize, save_blks, rsize, match, timeout, outsize;
-	uint4                   status, total_blks, bplmap, gds_ratio, blks_per_buff, counter, i, lcnt, read_size;
-	uchar_ptr_t		bm_blk_buff, ptr1, ptr1_top, ptr, ptr_top;
-	char_ptr_t		outptr, data_ptr;
-	unsigned short		rd_iosb[4], port;
-	enum db_acc_method	access;
-	blk_hdr			*bp, *bptr;
-	struct FAB		*fcb, temp_fab, mubincfab;
-	struct RAB		temp_rab, mubincrab;
-	inc_header		*outbuf;
-	mval			val;
-	mstr                    *file;
-	sgmnt_data_ptr_t        header;
-	char			*common, addr[SA_MAXLEN + 1];
-	void			(*common_write)();
-	void			(*common_close)();
-	muinc_blk_hdr_ptr_t	sblkh_p;
-	trans_num		blk_tn;
-	block_id		blk_num_base, blk_num;
-	boolean_t		is_bitmap_blk, backup_this_blk;
-	enum db_ver		dummy_odbv;
-	int4			blk_bsiz;
-
-	assert(list->reg == gv_cur_region);
-	assert(incremental);
-	/* Make sure inc_header  can be same size on all platforms. Some platforms pad 8 byte aligned structures
-	   that end on a 4 byte boundary and some do not. It is critical that this structure is the same size on
-	   all platforms as it is sent across TCP connections when doing TCP backup.
-	*/
-	assert(0 == (SIZEOF(inc_header) % 8));
-
-	/* ================= Initialization and some checks ======================== */
-
-	header  =       list->backup_hdr;
-	file    =       &(list->backup_file);
-
-	if (!mubtomag)
-		mubmaxblk = BACKUP_TEMPFILE_BUFF_SIZE;
-	fcb = ((vms_gds_info *)(gv_cur_region->dyn.addr->file_cntl->file_info))->fab;
-	if (list->tn >= header->trans_hist.curr_tn)
-	{
-		util_out_print("!/TRANSACTION number is greater than or equal to current transaction,", TRUE);
-		util_out_print("No blocks backed up from database !AD", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-		return TRUE;
-	}
-
-	/* =========== open backup destination and define common_write ================= */
-	backup_write_errno = 0;
-	backup_close_errno = 0;
-	switch(list->backup_to)
-	{
-		case backup_to_file:
-			/* open the file and define the common_write function */
-			mubincfab = cc$rms_fab;
-			mubincfab.fab$b_fac = FAB$M_PUT;
-			mubincfab.fab$l_fop = FAB$M_CBT | FAB$M_MXV | FAB$M_TEF | FAB$M_POS & (~FAB$M_RWC) & (~FAB$M_RWO);
-			mubincfab.fab$l_fna = file->addr;
-			mubincfab.fab$b_fns = file->len;
-			mubincfab.fab$l_alq = cs_addrs->hdr->start_vbn +
-				STARTING_BLOCKS * cs_addrs->hdr->blk_size / DISK_BLOCK_SIZE;
-			mubincfab.fab$w_mrs = mubmaxblk;
-			mubincfab.fab$w_deq = EXTEND_SIZE;
-			switch (status = sys$create(&mubincfab))
-			{
-				case RMS$_NORMAL:
-				case RMS$_CREATED:
-				case RMS$_SUPERSEDE:
-				case RMS$_FILEPURGED:
-					break;
-				default:
-					GTM_PUTMSG(status, 0, mubincfab.fab$l_stv);
-					util_out_print("Error: Cannot create backup file !AD.",
-						       TRUE, mubincfab.fab$b_fns, mubincfab.fab$l_fna);
-					return FALSE;
-			}
-
-			mubincrab = cc$rms_rab;
-			mubincrab.rab$l_fab = &mubincfab;
-			mubincrab.rab$l_rop = RAB$M_WBH;
-			if (RMS$_NORMAL != (status = sys$connect(&mubincrab)))
-			{
-				GTM_PUTMSG(status, 0, mubincrab.rab$l_stv);
-				util_out_print("Error: Cannot connect to backup file !AD.",
-					       TRUE, mubincfab.fab$b_fns, mubincfab.fab$l_fna);
-				mubincfab.fab$l_fop |= FAB$M_DLT;
-				sys$close(&mubincfab);
-				return FALSE;
-			}
-			common = (char *)(&mubincrab);
-			common_write = file_write;
-			common_close = file_close;
-			break;
-		case backup_to_exec:
-			util_out_print("Error: Backup to pipe is yet to be implemented.", TRUE);
-			util_out_print("Error: Your request to backup database !AD to !AD is currently not valid.", TRUE,
-				       fcb->fab$b_fns, fcb->fab$l_fna, file->len, file->addr);
-			return FALSE;
-		case backup_to_tcp:
-			/* parse it first */
-			switch (match = SSCANF(file->addr, "%[^:]:%hu", addr, &port))
-			{
-				case 1 :
-					port = DEFAULT_BKRS_PORT;
-				case 2 :
-					break;
-				default :
-					util_out_print("ERROR: A hostname has to be specified to backup through a TCP connection.",
-						       TRUE);
-					return FALSE;
-			}
-			if ((0 == cli_get_int("NETTIMEOUT", &timeout)) || (0 > timeout))
-				timeout = DEFAULT_BKRS_TIMEOUT;
-			if (0 > (backup_socket = tcp_open(addr, port, timeout, FALSE)))
-			{
-				util_out_print("ERROR: Cannot open tcp connection due to the above error.", TRUE);
-				return FALSE;
-			}
-			common_write = tcp_write;
-			common_close = tcp_close;
-			common = (char *)(&backup_socket);
-			break;
-		default :
-			util_out_print("ERROR: Backup format !UL not supported.", TRUE, list->backup_to);
-			util_out_print("Error: Your request to backup database !AD to !AD is not valid.", TRUE,
-				       fcb->fab$b_fns, fcb->fab$l_fna, file->len, file->addr);
-			return FALSE;
-	}
-
-	/* ============================= write inc_header =========================================== */
-
-	outptr = malloc(SIZEOF(inc_header));
-	outbuf = (inc_header *)outptr;
-	MEMCPY_LIT(&outbuf->label[0], INC_HEADER_LABEL);
-	stringpool.free = stringpool.base;
-	op_horolog(&val);
-	stringpool.free = stringpool.base;
-	op_fnzdate(&val, &mu_bin_datefmt, &null_str, &null_str, &val);
-	memcpy(&outbuf->date[0], val.str.addr, val.str.len);
-	memcpy(&outbuf->reg[0], gv_cur_region->rname, MAX_RN_LEN);
-	outbuf->start_tn = list->tn;
-	outbuf->end_tn = header->trans_hist.curr_tn;
-	outbuf->db_total_blks = header->trans_hist.total_blks;
-	outbuf->blk_size = header->blk_size;
-	outbuf->blks_to_upgrd = header->blks_to_upgrd;
-	COMMON_WRITE(common, outptr, SIZEOF(inc_header));
-	free(outptr);
-
-	if (mu_ctrly_occurred || mu_ctrlc_occurred)
-	{
-		error_mupip = TRUE;
-		COMMON_CLOSE(common);
-		util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-		return FALSE;
-	}
-
-	/* ============================ read/write appropriate blocks =============================== */
-
-	bsize		= header->blk_size;
-	gds_ratio	= bsize / DISK_BLOCK_SIZE;
-	blks_per_buff	= BACKUP_READ_SIZE / bsize;
-	read_size	= blks_per_buff * bsize;
-	outsize		= SIZEOF(muinc_blk_hdr) + bsize;
-	outptr		= (char_ptr_t)malloc(MAX(outsize, mubmaxblk));
-	sblkh_p		= (muinc_blk_hdr_ptr_t)outptr;
-	data_ptr	= (char_ptr_t)(sblkh_p + 1);
-	bp		= (blk_hdr_ptr_t)mubbuf;
-	bm_blk_buff	= (uchar_ptr_t)malloc(SIZEOF(blk_hdr) + (BLKS_PER_LMAP * BML_BITS_PER_BLK / BITS_PER_UCHAR));
-	mubincrab.rab$l_rbf = outptr;
-	save_blks	= 0;
-	access = header->acc_meth;
-	memset(sblkh_p, 0, SIZEOF(*sblkh_p));
-
-	if (access == dba_bg)
-		bp = mubbuf;
-	else
-	{
-		ptr = cs_addrs->db_addrs[0] + (cs_addrs->hdr->start_vbn - 1) * DISK_BLOCK_SIZE;
-		ptr_top = cs_addrs->db_addrs[1] + 1;
-	}
-
-	sblkh_p->use.bkup.ondsk_blkver = GDSNOVER;
-	for (blk_num_base = 0; blk_num_base < header->trans_hist.total_blks; blk_num_base += blks_per_buff)
-	{
-		if (online && (0 != cs_addrs->shmpool_buffer->failed))
-			break;
-		if (header->trans_hist.total_blks - blk_num_base < blks_per_buff)
-		{
-			blks_per_buff = header->trans_hist.total_blks - blk_num_base;
-			read_size = blks_per_buff * bsize;
-		}
-
-		if (access == dba_bg)
-		{
-			if ((SS$_NORMAL != (status = sys$qiow(EFN$C_ENF, fcb->fab$l_stv, IO$_READVBLK, &rd_iosb, 0, 0, bp,
-							      read_size, cs_addrs->hdr->start_vbn + (gds_ratio * blk_num_base),
-							      0, 0, 0)))
-			    || (SS$_NORMAL != (status = rd_iosb[0])))
-			{
-				GTM_PUTMSG(VARLSTCNT(1) status);
-				util_out_print("Error reading data from database !AD.", TRUE,
-					       fcb->fab$b_fns, fcb->fab$l_fna);
-				free(outptr);
-				free(bm_blk_buff);
-				error_mupip = TRUE;
-				COMMON_CLOSE(common);
-				return FALSE;
-			}
-		} else
-		{
-			assert(dba_mm == access);
-			bp = ptr + blk_num_base * bsize;
-		}
-
-		bptr = (blk_hdr *)bp;
-		/* The blocks we back up will be whatever version they are. There is no implicit conversion in this
-		   part of the backup/restore. Since we aren't even looking at the blocks (and indeed some of these blocks
-		   could potentially contain unintialized garbage data), we set the block version to GDSNOVER to signal
-		   that the block version is unknown. The above applies to "regular" blocks but not to bitmap blocks which
-		   we know are initialized. Because we have to read the bitmap blocks, they will be converted as necessary.
-		*/
-		for (i = 0;
-		     i < blks_per_buff && ((blk_num_base + i) < header->trans_hist.total_blks);
-		     i++, bptr = (blk_hdr *)((char *)bptr + bsize))
-		{
-			blk_num = blk_num_base + i;
-			if (mu_ctrly_occurred  ||  mu_ctrlc_occurred)
-			{
-				free(outptr);
-				free(bm_blk_buff);
-				error_mupip = TRUE;
-				COMMON_CLOSE(common);
-				util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-				return FALSE;
-			}
-			/* Before we check if this block needs backing up, check if this is a new bitmap block or not. If it is,
-			   we can fall through and back it up as normal. But if this is NOT a bitmap block, use the
-			   existing bitmap to determine if this block has ever been allocated or not. If not, we don't want to
-			   even look at this block. It could be uninitialized which will just make things run slower if we
-			   go to read it and back it up.
-			*/
-			if (0 != ((BLKS_PER_LMAP - 1) & blk_num))
-			{	/* Not a local bitmap block */
-				if (!gvcst_blk_ever_allocated(bm_blk_buff + SIZEOF(blk_hdr),
-							      ((blk_num * BML_BITS_PER_BLK)
-							       % (BLKS_PER_LMAP * BML_BITS_PER_BLK))))
-					continue;		/* Bypass never-set blocks to avoid conversion problems */
-				is_bitmap_blk = FALSE;
-				if (SIZEOF(v15_blk_hdr) <= (blk_bsiz = ((v15_blk_hdr_ptr_t)bptr)->bsiz))
-				{	/* We have either a V4 block or uninitialized garbage */
-					if (blk_bsiz > bsize)
-						/* This is not a valid V4 block so ignore it */
-						continue;
-					blk_tn = ((v15_blk_hdr_ptr_t)bptr)->tn;
-				} else
-				{	/* Assume V5 block */
-					if ((blk_bsiz = bptr->bsiz) > bsize)
-						/* Not a valid V5 block either */
-						continue;
-					blk_tn = bptr->tn;
-				}
-			} else
-			{	/* This is a bitmap block so save it into our bitmap block buffer. It is used as the
-				   basis of whether or not we have to process a given block or not. We process allocated and
-				   recycled blocks leaving free (never used) blocks alone as they have no data worth saving.
-				   But after saving it, upgrade it to the current format if necessary.
-				*/
-				is_bitmap_blk = TRUE;
-				memcpy(bm_blk_buff, bptr, BM_SIZE(header->bplmap));
-				if (SIZEOF(v15_blk_hdr) <= ((v15_blk_hdr_ptr_t)bm_blk_buff)->bsiz)
-				{	/* This is a V4 format block -- needs upgrading */
-					status = gds_blk_upgrade(bm_blk_buff, bm_blk_buff, bsize, &dummy_odbv);
-					if (SS_NORMAL != status)
-					{
-						free(outptr);
-						free(bm_blk_buff);
-						error_mupip = TRUE;
-						COMMON_CLOSE(common);
-						util_out_print("Error: Block 0x!XL is too large for automatic upgrade", TRUE,
-							       sblkh_p->blkid);
-						return FALSE;
-					}
-				}
-				assert(BM_SIZE(header->bplmap) == ((blk_hdr_ptr_t)bm_blk_buff)->bsiz);
-				assert(LCL_MAP_LEVL == ((blk_hdr_ptr_t)bm_blk_buff)->levl);
-				assert(gvcst_blk_is_allocated(bm_blk_buff + SIZEOF(blk_hdr),
-							      ((blk_num * BML_BITS_PER_BLK)
-							       % (BLKS_PER_LMAP * BML_BITS_PER_BLK))));
-				blk_bsiz = BM_SIZE(header->bplmap);
-				blk_tn = ((blk_hdr_ptr_t)bm_blk_buff)->tn;
-			}
-			/* The conditions for backing up a block or ignoring it (in order of evaluation):
-
-			   1) If blk is larger than size of db at time backup was initiated, we ignore the block.
-			   2) Always backup blocks 0, 1, and 2 as these are the only blocks that can contain data
-			      and still have a transaction number of 0.
-			   3) For bitmap blocks, if blks_to_upgrd != 0 and the TN is 0 and the block number >=
-			      last_blk_at_last_bkup, then backup the block. This way we get the correct version of
-			      the bitmap block in the restore (otherwise have no clue what version to create them in
-			      as bitmaps are created with a TN of 0 when before image journaling is enabled).
-			   4) If the block TN is below our TN threshold, ignore the block.
-			   5) Else if none of the above conditions, backup the block.
-			*/
-			if (online && (header->trans_hist.curr_tn <= blk_tn))
-				backup_this_blk = FALSE;
-			else if (3 > blk_num || (is_bitmap_blk && 0 != header->blks_to_upgrd && (trans_num)0 == blk_tn
-						 && blk_num >= list->last_blk_at_last_bkup))
-				backup_this_blk = TRUE;
-			else if ((blk_tn < list->tn))
-				backup_this_blk = FALSE;
-			else
-				backup_this_blk = TRUE;
-			if (!backup_this_blk)
-			{
-				if (online)
-					cs_addrs->nl->nbb = blk_num;
-				continue; /* not applicable */
-			}
-			sblkh_p->blkid = blk_num;
-			memcpy(data_ptr, bptr, blk_bsiz);
-			sblkh_p->valid_data = TRUE;	/* Validation marker */
-			COMMON_WRITE(common, outptr, outsize);
-			if (online)
-			{
-				if (0 != cs_addrs->shmpool_buffer->failed)
-					break;
-				cs_addrs->nl->nbb = blk_num;
-			}
-			save_blks++;
-		}
-	}
-
-	/* ============================= write saved information for online backup ========================== */
-
-	if (online && (0 == cs_addrs->shmpool_buffer->failed))
-	{
-		/* -------- make sure everyone involved finishes -------- */
-		cs_addrs->nl->nbb = BACKUP_NOT_IN_PROGRESS;
-		/* By getting crit here, we ensure that there is no process still in transaction logic that sees
-		   (nbb != BACKUP_NOT_IN_PRORESS). After rel_crit(), any process that enters transaction logic will
-		   see (nbb == BACKUP_NOT_IN_PRORESS) because we just set it to that value. At this point, backup
-		   buffer is complete and there will not be any more new entries in the backup buffer until the next
-		   backup.
-		*/
-		grab_crit(gv_cur_region);
-		assert(cs_data == cs_addrs->hdr);
-		if (dba_bg == cs_data->acc_meth)
-		{	/* Now that we have crit, wait for any pending phase2 updates to finish. Since phase2 updates happen
-			 * outside of crit, we dont want them to keep writing to the backup temporary file even after the
-			 * backup is complete and the temporary file has been deleted.
-			 */
-			if (cs_addrs->nl->wcs_phase2_commit_pidcnt && !wcs_phase2_commit_wait(cs_addrs, NULL))
-			{
-				GTM_PUTMSG(VARLSTCNT(7) ERR_COMMITWAITSTUCK, 5, process_id, 1,
-					cs_addrs->nl->wcs_phase2_commit_pidcnt, DB_LEN_STR(gv_cur_region));
-				rel_crit(gv_cur_region);
-				free(outptr);
-				free(bm_blk_buff);
-				error_mupip = TRUE;
-				COMMON_CLOSE(common);
-				return FALSE;
-			}
-		}
-		if (debug_mupip)
-		{
-			util_out_print("MUPIP INFO:   Current Transaction # at end of backup is 0x!16 at XQ", TRUE,
-				&cs_data->trans_hist.curr_tn);
-		}
-		rel_crit(gv_cur_region);
-		counter = 0;
-		while (0 != cs_addrs->shmpool_buffer->backup_cnt)
-		{
-			if (0 != cs_addrs->shmpool_buffer->failed)
-			{
-				util_out_print("Process !UL encountered the following error.", TRUE,
-					       cs_addrs->shmpool_buffer->failed);
-				if (0 != cs_addrs->shmpool_buffer->backup_errno)
-					GTM_PUTMSG(VARLSTCNT(1) cs_addrs->shmpool_buffer->backup_errno);
-				free(outptr);
-				free(bm_blk_buff);
-				error_mupip = TRUE;
-				COMMON_CLOSE(common);
-				return FALSE;
-			}
-			backup_buffer_flush(gv_cur_region);
-			if (++counter > MAX_BACKUP_FLUSH_TRY)
-			{
-				GTM_PUTMSG(VARLSTCNT(1) ERR_BCKUPBUFLUSH);
-				free(outptr);
-				free(bm_blk_buff);
-				error_mupip = TRUE;
-				COMMON_CLOSE(common);
-				return FALSE;
-			}
-			if (counter & 0xF)
-				wcs_sleep(counter);
-			else
-			{	/* Force shmpool recovery to see if it can find the lost blocks */
-				if (!shmpool_lock_hdr(gv_cur_region))
-				{
-					GTM_PUTMSG(VARLSTCNT(9) ERR_DBCCERR, 2, REG_LEN_STR(gv_cur_region),
-						   ERR_ERRCALL, 3, CALLFROM);
-					free(outptr);
-					free(bm_blk_buff);
-					error_mupip = TRUE;
-					COMMON_CLOSE(common);
-					assert(FALSE);
-					return FALSE;;
-				}
-				shmpool_abandoned_blk_chk(gv_cur_region, TRUE);
-				shmpool_unlock_hdr(gv_cur_region);
-			}
-		}
-
-		/* -------- Open the temporary file -------- */
-		temp_fab = cc$rms_fab;
-		temp_fab.fab$b_fac = FAB$M_GET;
-		temp_fab.fab$l_fna = list->backup_tempfile;
-		temp_fab.fab$b_fns = strlen(list->backup_tempfile);
-		temp_rab = cc$rms_rab;
-		temp_rab.rab$l_fab = &temp_fab;
-
-		for (lcnt = 1;  MAX_OPEN_RETRY >= lcnt;  lcnt++)
-		{
-			if (RMS$_FLK != (status = sys$open(&temp_fab, NULL, NULL)))
-				break;
-			wcs_sleep(lcnt);
-		}
-
-		if (RMS$_NORMAL != status)
-		{
-			GTM_PUTMSG(status, 0, temp_fab.fab$l_stv);
-			util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-			free(outptr);
-			free(bm_blk_buff);
-			error_mupip = TRUE;
-			COMMON_CLOSE(common);
-			return FALSE;
-		}
-
-		if (RMS$_NORMAL != (status = sys$connect(&temp_rab)))
-		{
-			GTM_PUTMSG(status, 0, temp_rab.rab$l_stv);
-			util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-			free(outptr);
-			free(bm_blk_buff);
-			error_mupip = TRUE;
-			COMMON_CLOSE(common);
-			return FALSE;
-		}
-
-		/* -------- read and write every record in the temporary file -------- */
-		while (1)
-		{
-			temp_rab.rab$w_usz = outsize;
-			temp_rab.rab$l_ubf = outptr;
-			status = sys$get(&temp_rab);
-			if (RMS$_NORMAL != status)
-			{
-				if (RMS$_EOF == status)
-					status = RMS$_NORMAL;
-				break;
-			}
-			assert(outsize == temp_rab.rab$w_rsz);
-			/* Still validly sized blk? */
-			assert((outsize - SIZEOF(shmpool_blk_hdr)) >= ((blk_hdr_ptr_t)(outptr + SIZEOF(shmpool_blk_hdr)))->bsiz);
-			COMMON_WRITE(common, outptr, temp_rab.rab$w_rsz);
-		}
-
-		if (RMS$_NORMAL != status)
-		{
-			GTM_PUTMSG(status, 0, temp_rab.rab$l_stv);
-			util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-			free(outptr);
-			free(bm_blk_buff);
-			error_mupip = TRUE;
-			COMMON_CLOSE(common);
-			return FALSE;
-		}
-
-		/* ---------------- Close the temporary file ----------------------- */
-		if (RMS$_NORMAL != (status = sys$close(&temp_fab)))
-		{
-			GTM_PUTMSG(status, 0, temp_fab.fab$l_stv);
-			util_out_print("WARNING:  DB file !AD backup aborted.", TRUE, fcb->fab$b_fns, fcb->fab$l_fna);
-			free(outptr);
-			free(bm_blk_buff);
-			error_mupip = TRUE;
-			COMMON_CLOSE(common);
-			return FALSE;
-		}
-	}
-
-	/* ============================= write end_msg and fileheader ======================================= */
-
-	if ((!online) || (0 == cs_addrs->shmpool_buffer->failed))
-	{
-		MEMCPY_LIT(outptr, END_MSG);
-		/* Although the write only need be of length SIZEOF(END_MSG) - 1 for file IO, if the write is going
-		   to TCP we have to write all these records with common length so just write the "regular" sized
-		   buffer. The extra garbage left over from the last write will be ignored as we key only on the
-		   this end text.
-		*/
-		COMMON_WRITE(common, outptr, outsize);
-
-		ptr1 = header;
-		size1 = ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE);
-		ptr1_top = ptr1 + size1;
-		for (;ptr1 < ptr1_top ; ptr1 += size1)
-		{
-			if ((size1 = ptr1_top - ptr1) > mubmaxblk)
-				size1 = (mubmaxblk / DISK_BLOCK_SIZE) * DISK_BLOCK_SIZE;
-			COMMON_WRITE(common, ptr1, size1);
-		}
-
-		MEMCPY_LIT(outptr, HDR_MSG);
-		COMMON_WRITE(common, outptr, SIZEOF(HDR_MSG));
-		ptr1 = MM_ADDR(header);
-		size1 = ROUND_UP(MASTER_MAP_SIZE(header), DISK_BLOCK_SIZE);
-		ptr1_top = ptr1 + size1;
-		for (;ptr1 < ptr1_top ; ptr1 += size1)
-		{
-			if ((size1 = ptr1_top - ptr1) > mubmaxblk)
-				size1 = (mubmaxblk / DISK_BLOCK_SIZE) * DISK_BLOCK_SIZE;
-			COMMON_WRITE(common, ptr1, size1);
-		}
-
-		MEMCPY_LIT(outptr, MAP_MSG);
-		COMMON_WRITE(common, outptr, SIZEOF(MAP_MSG));
-	}
-
-
-	/* ================== close backup destination, output and return ================================== */
-
-	if (online && (0 != cs_addrs->shmpool_buffer->failed))
-	{
-		util_out_print("Process !UL encountered the following error.", TRUE,
-			       cs_addrs->shmpool_buffer->failed);
-		if (0 != cs_addrs->shmpool_buffer->backup_errno)
-			GTM_PUTMSG(VARLSTCNT(1) cs_addrs->shmpool_buffer->backup_errno);
-		free(outptr);
-		free(bm_blk_buff);
-		error_mupip = TRUE;
-		COMMON_CLOSE(common);
-		return FALSE;
-	}
-
-	COMMON_CLOSE(common);
-	free(outptr);
-	free(bm_blk_buff);
-
-	util_out_print("DB file !AD incrementally backed up in !AD", TRUE,
-		       fcb->fab$b_fns, fcb->fab$l_fna, file->len, file->addr);
-	util_out_print("!UL blocks saved.", TRUE, save_blks);
-	util_out_print("Transactions from 0x!16 at XQ to 0x!16 at XQ are backed up.", TRUE,
-		       &cs_addrs->shmpool_buffer->inc_backup_tn, &header->trans_hist.curr_tn);
-	cs_addrs->hdr->last_inc_backup = header->trans_hist.curr_tn;
-	if (record)
-		cs_addrs->hdr->last_rec_backup = header->trans_hist.curr_tn;
-	file_backed_up = TRUE;
-	return TRUE;
-}
-
-static void tcp_write(char *temp, char *buf, int nbytes)
-{
-	int 	socket, nwritten, iostatus, send_retry;
-
-	socket = *(int *)(temp);
-
-	nwritten = 0;
-	send_retry = MAX_TCP_SEND_RETRY;
-
-	do
-	{
-		SEND(socket, buf + nwritten, nbytes - nwritten, 0, iostatus);
-		if (-1 != iostatus)
-		{
-			nwritten += iostatus;
-			if (nwritten == nbytes)
-				break;
-		} else if (EINTR != errno)
-			break;
-	} while (0 < send_retry--);
-
-	if ((nwritten != nbytes) && (-1 == iostatus))
-	{
-		GTM_PUTMSG(VARLSTCNT(1) errno);
-		close(socket);
-		backup_write_errno = errno;
-	}
-
-	return;
-}
-
-static void tcp_close(char *temp)
-{
-	int 	socket;
-
-	socket = *((int *)(temp));
-	close(socket);
-
-	return;
-}
-
-static void file_write(char *temp, char *buf, int nbytes)
-{
-	uint4		status;
-	struct RAB	*rab;
-
-	assert(nbytes > 4);
-	rab = (struct RAB *)(temp);
-	rab->rab$w_rsz = nbytes;
-	rab->rab$l_rbf = buf;
-	if (RMS$_NORMAL != (status = sys$put(rab)))
-	{
-		backup_write_errno = status;
-		GTM_PUTMSG(status, 0, rab->rab$l_stv);
-		(rab->rab$l_fab)->fab$l_fop |= FAB$M_DLT;
-		sys$close(rab->rab$l_fab);
-	}
-
-	return;
-}
-
-static void file_close(char *temp)
-{
-	uint4		status;
-	struct RAB	*rab;
-
-	rab = (struct RAB *)(temp);
-	if (error_mupip)
-		rab->rab$l_fab->fab$l_fop |= FAB$M_DLT;
-	status = sys$close(rab->rab$l_fab);
-	if (status != RMS$_NORMAL)
-	{
-		backup_close_errno = status;
-		GTM_PUTMSG(status);
-		util_out_print("FATAL ERROR: System Service failure.",TRUE);
-	}
-
-	return;
-}
diff --git a/sr_vvms/mucblkini.c b/sr_vvms/mucblkini.c
deleted file mode 100644
index 71758e3..0000000
--- a/sr_vvms/mucblkini.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "gdsblk.h"
-#include "efn.h"
-#include "gdsbml.h"
-#include "mucblkini.h"
-#include "iosb_disk.h"
-#include "iosp.h"
-
-#define DIR_ROOT 1
-#define DIR_DATA 2
-
-GBLREF gd_region *gv_cur_region;
-GBLREF sgmnt_addrs *cs_addrs;
-
-void mucblkini(void)
-{
-	unsigned char		*c, *bmp;
-	blk_hdr			*bp1, *bp2;
-	rec_hdr			*rp;
-	uint4			status;
-
-	/* get space for directory tree root and 1st directory tree data block */
-	bp1 = malloc(cs_addrs->hdr->blk_size);
-	bp2 = malloc(cs_addrs->hdr->blk_size);
-	bmp = malloc(cs_addrs->hdr->blk_size);
-	status = dsk_read(0, bmp, NULL, FALSE);
-	if (SS$_NORMAL != status)
-		rts_error(VARLSTCNT(1) status);
-	bml_busy(DIR_ROOT, bmp + SIZEOF(blk_hdr));
-	bml_busy(DIR_DATA, bmp + SIZEOF(blk_hdr));
-
-	DSK_WRITE_NOCACHE(gv_cur_region, 0, bmp, cs_addrs->hdr->desired_db_format, status);
-	if (SS$_NORMAL != status)
-		sys$exit((int4)status);
-
-	rp = (char*)bp1 + SIZEOF(blk_hdr);
-	BSTAR_REC(rp);
-	c = CST_BOK(rp);
-	*(block_id*)c = (block_id)DIR_DATA;
-	bp1->bver = GDSVCURR;
-	bp1->levl = 1;
-	bp1->bsiz = BSTAR_REC_SIZE + SIZEOF(blk_hdr);
-	bp1->tn = 0;
-	bp2->bver = GDSVCURR;
-	bp2->levl = 0;
-	bp2->bsiz = SIZEOF(blk_hdr);
-	bp2->tn = 0;
-
-	DSK_WRITE_NOCACHE(gv_cur_region, DIR_ROOT, bp1, cs_addrs->hdr->desired_db_format, status);
-	if (SS$_NORMAL != status)
-		sys$exit((int4)status);
-
-	DSK_WRITE_NOCACHE(gv_cur_region, DIR_DATA, bp2, cs_addrs->hdr->desired_db_format, status);
-	if (SS$_NORMAL != status)
-		sys$exit((int4)status);
-}
diff --git a/sr_vvms/mumps.hlp b/sr_vvms/mumps.hlp
deleted file mode 100644
index ec724a0..0000000
--- a/sr_vvms/mumps.hlp
+++ /dev/null
@@ -1,19589 +0,0 @@
-1 About_GTM
-   GT.M Version 4.4
-
-   VMS Edition
-
-   October 2003
-
-   The information in this manual is subject to change without notice and
-   should not be construed as a commitment by Sanchez Computer Associates.
-   The software described in this manual is furnished under a license and
-   may be used or copied only in accordance  with  the  terms  of  such  a
-   license.
-
-   Copyright 1987 - 2003
-
-   Sanchez Computer Associates
-
-   All rights reserved
-
-   GT.M, and GT.CM are trademarks  of  Sanchez  Computer  Associates.  All
-   other company and product names may be  trademarks  of  the  respective
-   companies with which they are associated.
-
-1 Prog_Dev_Cycle
-   Program Development Cycle
-
-   In contrast to M environments that interpret M code,  GT.M  compiles  M
-   code from source files into the object files. These object files can be
-   directly linked into an image, permanently or dynamically. Source files
-   and object files are independent of one  another.  Since  GT.M  permits
-   access to source and object files in multiple directories. they may be
-   managed independently or all placed together in a specific directory.
-
-   GT.M databases are RMS files identified by a small file called a Global
-   Directory. Global Directories allow management of the database files to
-   be independent of the placement of  files  containing  M  routines.  By
-   changing the Global Directory, you can use the same programs to access
-   different databases.
-
-   Program development may utilize both GT.M and  VMS  development  tools.
-   The development methodology and environment  chosen  for  a  particular
-   installation, and tailored  by  the  individual  user,  determines  the
-   actual mix of tools. These tools  may  vary  from  entirely  GT.M  with
-   little VMS, to mostly VMS with a modest use of GT.M.
-
-   Direct Mode serves as an interactive interface  to  the  GT.M  run-time
-   environment and the  compiler.  In  Direct  Mode,  the  user  enters  M
-   commands at the  GT.M  prompt,  and  GT.M  compiles  and  executes  the
-   command. This feature provides immediate turnaround for  rapid  program
-   development and maintenance.
-
-2 Comm_Symbols
-   Commands and Symbols
-
-   GT.M components are invoked with commands and symbols. Users who do not
-   perform programming or operational tasks do not need direct  access  to
-   GT.M components. They access the GT.M  run-time  libraries,  indirectly
-   through their production images.
-
-   GT.M provides  the  MUMPS  command  with  two  fundamental  variations.
-   Generally  the  MUMPS  command  invokes  the  GT.M  compiler.
-   MUMPS/DIRECT_MODE invokes a simple M routine that enters Direct Mode by
-   executing an M BREAK command. This routine has a name  that  is  not  a
-   legal M name and therefore can never conflict with one of your program
-   names.
-
-   The system manager may load the GT.M commands into the  system  command
-   tables. When the GT.M commands are not in the  system  command  tables,
-   users must  place  them  in  their  process  command  tables  with  the
-   following command.
-
-   $ SET COMMAND GTM$DIST:GTMCOMMANDS
-
-   Other GT.M components may be invoked with the DCL RUN command  or  with
-   symbols. The general form of the RUN command is:
-
-   $ RUN GTM$DIST:utility-name
-
-        For more information on commonly established GT.M symbols refer to
-        the GT.M Programmer's Guide.
-
-2 Prep_the_DB
-   Preparing the Database
-
-   GT.M databases consist of one or more RMS files.  Most  database  files
-   have a RMS file structure externally  and  a  GT.M  Database  Structure
-   (GDS) internally. Management of the GDS  files  by  the  GT.M  run-time
-   system assures high performance and integrity. GT.M database files are
-   coordinated by a Global  Directory.  The  Global  Directory  identifies
-   which global names belong in which files, and  specifies  the  creation
-   characteristics for each file. To specify access to a database, each M
-   process must define  the  GTM$GBLDIR  logical  name  to  point  to  the
-   associated Global Directory.
-
-   To define and maintain a Global Directory,  use  the  Global  Directory
-   Editor (
-   GDE) utility.The MUPIP  command  CREATE  uses  the  characteristics  as
-   defined in the Global Directory to create the associated database. In a
-   production environment, the system manager typically  maintains  Global
-   Directories.
-
-   For more information on GDE and MUPIP refer to  the  "Global  Directory
-   Editor" and "MUPIP" chapters in the GT.M Administration and Operations
-   Guide .
-
-   Example:
-
-   This example is a sequence of events that illustrate  steps  you  might
-   typically perform in creating a new global directory,  in  our  example
-   PAYROLL.GLD. To assist you in following the sequence, each actual step
-   appears in typewriter font, as you might see on your  terminal  screen,
-   followed by an explanation in normal text font.
-
-   To explain the program development cycle, a sample routine  is  created
-   and used in each subsequent section  to  illustrate  the  functionality
-   being described. A routine named PAYROLL calls  parts  of  the  routine
-   TAXES with the M commands "DO STATE^TAXES" and "DO FEDERAL^TAXES." Both
-   the PAYROLL and TAXES routines call the general-purpose routines LOOKUP
-   and SUM.
-
-   For the purposes of the example, assume we have  already  compiled  and
-   debugged the LOOKUP and SUM routines.
-
-
-   $ DIR PAYROLL.*
-
-   %DIRECT-W-NOFILES, no files found
-
-   The DIRECTORY command checks to see that there are  no  existing  files
-   with the name PAYROLL.
-
-
-   $ DEFINE GTM$GBLDIR PAYROLL.GLD
-
-   $ GDE
-
-   %GDE-I-GDUSEDEFS, Using defaults for Global Directory
-
-   USER:[EXAMPLE]PAYROLL.GLD
-
-   The DEFINE command establishes the current value of  the  logical  name
-   GTM$GBLDIR as PAYROLL.GLD. GT.M uses the  logical  name  GTM$GBLDIR  to
-   identify the current Global Directory. Because we  defined  it  in  the
-   process logical table, GTM$GBLDIR maintains the defined value only for
-   the current login session. The next time we log into VMS, we must again
-   define the value of as GTM$GBLDIR as  PAYROLL.GLD  to  use  it  as  the
-   current Global Directory. If you use  a  Global  Directory  frequently,
-   DEFINE the GTM$GBLDIR to that Global Directory in a LOGIN.COM file. The
-   system manager may include such a definition in the system login file,
-   or in a system or group logical name table.
-
-   This example defines GTM$GBLDIR without a directory specification. The
-   logical name points to the PAYROLL.GLD file in the current RMS default
-   directory. Therefore if the default directory changes, GT.M attempts to
-   locate the Global Directory in the new default directory and cannot use
-   the  original  file.  If  you  intend  for  the  Global  Directory  to
-   consistently point to this file, even if the default directory changes,
-   use a full file-specification for GTM$GBLDIR.
-
-   This invokes the Global Directory Editor by entering  GDE  at  the  DCL
-   prompt. Refer to the "Program Development Cycle" in  GT.M  Programmer's
-   Guide for more details.
-
-   Example:
-
-
-   $ MUPIP LOAD PAYROLL.GLO
-
-   GT.M MUPIP EXTRACT
-
-   09-OCT-2001 11:26:44
-   %MUPIP-I-KEYCNT, LOAD TOTAL:
-
-   keycnt: 100 max subsc len:12 max data len: 3
-
-   %MUPIP-I-RECCNT, Last record number: 202
-
-   This uses the MUPIP LOAD command to load a  sequential  file  into  the
-   database. (The LOAD TOTAL statistics  appear  on  more  than  one  line
-   because of typesetting constraints.)
-
-   Because MUPIP uses the logical  name  GTM$GBLDIR  to  locate  a  Global
-   Directory (which identifies the database  file(s)),  the  LOAD  command
-   does not require any information about the target database. Most of the
-   GT.M utilities work this way, with few exceptions.
-
-2 Cre_Edt_Source_Prog
-   Creating and Editing a Source Program
-
-   The first step in developing a GT.M program is to create a source file.
-   In most cases, the user can create  and  modify  GT.M  source  programs
-   using VMS text editors. You can create and edit a source  program  from
-   either GT.M or DCL.
-
-   When the program is very simple (and its lines  do  not  need  revision
-   after they are entered), you can use DCL command  CREATE  and  redirect
-   the output to your M source file. For more information on CREATE, refer
-   to the VMS DCL Dictionary.
-
-3 Edit_from_GTM
-   Editing from GT.M
-
-   To create and edit a source program in GT.M, invoke  Direct  Mode.  The
-   method you customarily use to invoke  Direct  Mode  depends  upon  your
-   programming environment. However, in most cases, you can invoke Direct
-   Mode by entering either GTM or MUMPS/DIRECT_MODE at the DCL prompt. GTM
-   is a VMS symbol, which by default is defined to be  MUMPS/DIRECT.  Once
-   you are at the  GTM>  prompt,  invoke  the  editor  by  entering  ZEDIT
-   "filename". ZEDIT invokes a TPU-based editor selected  by  the  logical
-   name TPU$SECTION.
-
-   You can create your own customized executable images and set the symbol
-   GTM to invoke your image. For more detailed information about TPU-based
-   editors refer to the VMS Guide to Text Processing. For instructions for
-   customizing an editor to meet specific standards or needs, refer to the
-   VMS TPU Reference Manual.
-
-   Invoke Direct Mode to create and edit a source program in GT.M. At the
-   GTM> prompt, invoke the editor by typing:
-
-   ZEDIT <filename>
-
-   The TPU editor invoked by ZEDIT creates a separate RMS file for each M
-   source module. When you make changes to an existing  routine  file  and
-   save them, the editor creates a new version of the  routine  file.  The
-   system manager typically controls the number of versions of a file that
-   may be stored on disk. The version limit ranges from one to unlimited.
-   The ability to save previous versions of a routine serves as a valuable
-   tool in managing application development and maintenance.
-
-   The GT.M environment works more efficiently if the file  has  the  same
-   name as the M routine it contains, and if it has a  file  type  of  .M.
-   Because ZEDIT  automatically  defaults  to  the  file  type  .M,  ZEDIT
-   commands generally do not specify the file type. If you use other file
-   types, you must specify the type with every reference to of the file.
-
-3 Edit_from_DCL
-   Editing from DCL
-
-   To create and edit a source program from DCL, invoke any VMS editor at
-   the DCL prompt, specifying  an  RMS  file  for  the  source.  The  GT.M
-   environment works best when you give a file the name of the  M  routine
-   that it contains, and a type of .M.
-
-   The Guide to VMS Text Processing describes in more detail  how  to  use
-   VMS editors. The  default  editor  for  VMS  is  EDT.  For  a  complete
-   description of all the EDT commands, refer to  the  VMS  EDT  Reference
-   Manual.
-
-   Example
-
-   $ EDIT PAYROLL.M
-
-   The EDIT command initiates an editing session for  PAYROLL.M  from  the
-   DCL prompt. If PAYROLL.M does not already exist, EDT creates it.
-
-   Example:
-
-   $ EDIT/TPU PAYROLL.M
-
-   This EDIT/TPU command initiates an editing session for PAYROLL.M. Your
-   installation may have more than one TPU based editor. The logical name
-   TPU$SECTION specifies the default TPU editor. Again, if PAYROLL.M does
-   not already exist, TPU creates it.
-
-   Because these examples use VMS rather than GT.M tools, in both cases we
-   must specify the .M file extension.
-
-2 Comp_Source_Prog
-   Compiling a Source Program
-
-   GT.M compiles M  source  code  files  and  produces  object  files  for
-   complete  integration  into  the  VMS  environment  consisting  of  VMS
-   standard object language. The object modules have the same name as the
-   compiled M source file with a .OBJ  file  extension,  unless  otherwise
-   specified.  The  VMS  standard  object  language  contains  machine
-   instructions and information necessary  to  connect  the  routine  with
-   other routines, and map it into memory. An M routine source  file  must
-   be compiled after it is created  or  modified.  Within  GT.M,  you  can
-   compile explicitly with the ZLINK or ZCOMPILE commands,  or  implicitly
-   with auto-ZLINK. At the DCL command line, compile by issuing the MUMPS
-   command.
-
-   The compiler checks  M  code  for  syntax  errors  and  displays  error
-   messages on the terminal,  when  processing  is  complete.  Each  error
-   message provides the source line in error with an indicator pointing to
-   the place on the line where the error is  occurring.  For  a  list  and
-   description of the compiler error messages, refer to the  GT.M  Message
-   and Recovery Procedures Reference Manual.
-
-   You can also generate a listing file  containing  the  results  of  the
-   compile, by including the /LIST qualifier as a modifier to the argument
-   to the ZLINK command in Direct  Mode  or  on  the  MUMPS  command  when
-   compiling from the DCL command  line.  The  explanation  of  the  MUMPS
-   command in the section "Compiling from DCL" describes /LIST  and  other
-   valid qualifiers for the MUMPS and ZLINK commands.
-
-   The compiler stops processing a routine line when it detects  an  error
-   on that line. Under most conditions the compiler  continues  processing
-   the remaining routine lines. This allows the compiler to produce a more
-   complete error analysis of the routine and to generate  code  that  may
-   have valid executable paths. The  compiler  does  not  report  multiple
-   syntax errors on the same line. When it detects more  than  127  syntax
-   errors in a source file, the compiler ceases to process the file.
-
-3 Comp_from_GTM
-   Compiling from GT.M
-
-   In Direct Mode, GT.M provides access to the compiler explicitly through
-   the ZLINK and  ZCOMPILE  commands,  and  implicitly  through  automatic
-   invocation of ZLINK functionality (auto-ZLINK) to add required routines
-   to the image. ZCOMPILE  is  a  GT.M  routine  compilation  command,  it
-   compiles the routine and creates a new object module. The primary task
-   of ZLINK is to place the object code in memory and  "connect"  it  with
-   other routines. However, under certain circumstances, ZLINK  may  first
-   use the GT.M compiler to create a new object module.
-
-   The difference between ZCOMPILE and ZLINK is that  ZCOMPILE  creates  a
-   new object module on compiling, whereas the  ZLINK  command  links  the
-   object module with other routines and places the object code in memory.
-
-
-   ZLINK compiles under these circumstances:
-
-   o    ZLINK cannot locate a copy of the object module but  can  locate  a
-        copy of the source module.
-
-   o    ZLINK can locate both object  and  source  module,  and  finds  the
-        object module to be older than the source module.
-
-   o    The file-specification portion of the ZLINK  argument  includes  an
-        explicit file type of .M.
-
-   Auto-ZLINK compiles under the first two circumstances,  but  can  never
-   encounter the last one.
-
-   When a command refers to an M routine that is not part of  the  current
-   image, GT.M automatically attempts to ZLINK and, if necessary, compile
-   that routine. In Direct Mode, the most  common  method  to  invoke  the
-   compiler through an auto-ZLINK is to enter DO ^routinename at the GTM>
-   prompt. When the current image does not contain the routine, GT.M does
-   the following:
-
-   o    Locates the source and object
-
-   o    Determines whether the source has been edited  since  it  was  last
-        compiled
-
-   o    Compiles the routine, if appropriate
-
-   o    Adds the object to the image
-
-   By using the DO command, you implicitly instruct GT.M to compile, link,
-   and execute the program. With this method, you can  test  your  routine
-   interactively.
-
-   For complete descriptions of ZCOMPILE, ZLINK and auto-ZLINK,  refer  to
-   the "Commands" chapter in GT.M Programmer's Guide.
-
-   Example:
-
-
-   GTM>DO ^PAYROLL
-
-   GTM>DO ^TAXES
-
-   This uses the M DO command to invoke the GT.M compiler implicitly from
-   the GTM> prompt if the routine  requires  new  object  code.  When  the
-   compiler runs, it produces two object  module  files,  PAYROLL.OBJ  and
-   TAXES.OBJ.
-
-   If you receive error messages from the compilation, you  may  fix  them
-   immediately by returning to the editor and correcting  the  source.  By
-   default, the GT.M compiler operates in "compile-as-written"  mode,  and
-   produces object code even when a routine contains syntax  errors.  This
-   code includes all lines that are correct and all  commands  on  a  line
-   with an error, up to the error. Therefore, you may decide to tailor the
-   debugging cycle by running the  program  without  removing  the  syntax
-   errors.
-
-3 Comp_from_DCL
-   Compiling from DCL
-
-   In DCL, invoke the compiler by entering  MUMPS  file-spec  at  the  DCL
-   prompt.
-
-   Example:
-
-
-   $ MUMPS PAYROLL
-
-   $ MUMPS TAXES
-
-   This uses the MUMPS command to invoke the GT.M compiler  from  the  DCL
-   prompt.
-
-   Use the MUMPS command at the DCL prompt to:
-
-   o    Check the syntax of a newly entered program.
-
-   o    Optionally, get a formatted listing of the program.
-
-   o    Ensure that all object code is up to date before linking.
-
-   The MUMPS command invokes the compiler to translate an  M  source  file
-   into object code. Various qualifiers to this command control the output
-   of the compiler. Most of these qualifiers affect the  type  of  listing
-   produced by the compiler.
-
-   The format for the MUMPS command is:
-
-
-   MUMPS [/qualifier[...]] file-spec
-
-   o    By default, GT.M assumes source programs have an extension of .M
-
-   o    Each file-specification identifies an M source program to compile.
-
-   o    Qualifiers determine characteristics of the compiler output.
-
-   o    Qualifiers may be applied globally by placing  them  on  the  MUMPS
-        command or locally by placing them on a file-specification  in  the
-        parameter list; local qualifiers override global qualifiers.
-
-   o    GT.M allows the VMS * and % wildcards in a file-specification.
-
-   The * wildcard accepts any legal combination of numbers and characters
-   including a null, in the position the wildcard holds.
-   The % wildcard accepts exactly one legal character in its position.
-
-   For example,  MUMPS  *  compiles  all  files  in  the  current  default
-   directory with a .M extension. MUMPS *pay% compiles any .M  files  with
-   names that contain any characters followed by "pay,"  followed  by  one
-   character.
-
-
-
-1 Opr_Dbg_Dir_Mode
-   Operating and Debugging in Direct Mode
-
-   Direct Mode is an important tool in  GT.M  because  it  allows  you  to
-   interactively debug, modify, and execute M routines. Direct Mode  is  a
-   DCL that immediately compiles and executes GT.M commands  providing  an
-   interpretive-like interface. M simplifies debugging by using  the  same
-   commands for debugging that are used for programming.
-
-   The focus of this chapter is  to  describe  the  debugging  process  in
-   Direct Mode, and  to  illustrate  the  GT.M  language  extensions  that
-   enhance the process. Command functionality is described only in enough
-   detail to illustrate why a particular command is useful for a debugging
-   activity being described. If you have specific functionality questions
-   about a command or variable, refer to the  "Commands",  "Functions"  or
-   "Intrinsic Special Variables" chapters in GT.M Programmer's Guide.
-
-2 Opr_Dir_Mode
-   Operating in Direct Mode
-
-   This section provides an overview of the  following  basic  operational
-   issues in Direct Mode:
-
-   o    Entering Direct Mode
-
-   o    Available functionality
-
-   o    Exiting Direct Mode
-
-3 Entr_Dir_Mode
-   Entering Direct Mode
-
-   To enter Direct Mode, type MUMPS/DIRECT or GTM at the DCL prompt.
-
-   Example:
-
-
-   $ SHOW SYMBOL GTM
-
-   GTM=="MUMPS/DIRECT"
-
-   The SHOW SYMBOL command entered at the DCL prompt shows that the symbol
-   GTM is equivalent to MUMPS/DIRECT.  Your  site  may  have  a  different
-   definition for GTM in order to provide additional debugging tools. The
-   effect of using the symbol should be generally the same.
-
-3 Func_in_Dir_Mode
-   Functionality Available in Direct Mode
-
-   This section provides an overview of basic functionality  and  concepts
-   that enhance your use of Direct Mode.
-
-4 Comm_Recall
-   Command Recall
-
-   Direct Mode includes a line command recall function similar to the DCL
-   recall function, which displays previously entered command  lines.  Use
-   the Up Arrow key at the GTM> prompt  to  scroll  back  through  command
-   lines. Usethe Down Arrow key to  scroll  forward  through  the  command
-   lines. GT.M displays one command line at a time. Once you have recalled
-   a command, you can edit it if you wish and then reissue it.
-
-   The RECALL command is another way to access previously  entered  Direct
-   Mode command lines. RECALL is only valid in Direct Mode and  causes  an
-   error if it appears in other M code.
-
-   The format of the
-   RECALL command is:
-
-
-   REC[ALL] [intlit|strlit]
-
-   o    The optional integer literal specifies a previously entered command
-        by the counting back from the present.
-
-   o    The optional string literal specifies  the  most  recently  entered
-        command  line  that  starts  with  characters  matching  the
-        (case-sensitive) literal.
-
-   o    When the RECALL command has  no  argument,  it  displays  up  to  a
-        maximum of 99 available past Direct Mode entries.
-
-   If the Direct Mode session has just started, you may not  have  entered
-   99 lines for GT.M to save and therefore you will not have 99  lines  to
-   look at. The most recently entered GT.M command line has the number one
-   (1), older lines have higher numbers. GT.M does not include the RECALL
-   command in the listing. If the RECALL command is issued from a location
-   other than the Direct Mode prompt, GT.M issues a run-time error.
-
-   Example:
-
-
-   GTM>WRITE $ZGBLDIR
-
-   M.GLD
-
-   GTM>SET $ZGBLDIR TEST.GLD
-
-   GTM>SET A=10
-
-   GTM>SET B=A
-
-   GTM>REC
-
-   1 SET B=A
-   2 SET A=10
-   3 SET $ZGBLDIR TEST.GLD
-   4 WRITE $ZGBLDIR
-   This REC[ALL] command displays the previously entered commands.
-
-   You can also display a selected command by entering RECALL and the line
-   number of the command you want to retrieve.
-
-   Example:
-
-
-   GTM>REC 2
-
-   GTM>SET A=10
-
-   This RECALLs the line number two (2).
-
-   If the RE[CALL] command includes a text parameter,  GT.M  displays  the
-   most recent command matching the text after the RE[CALL] command.
-
-   Example:
-
-
-   GTM>REC WRITE
-
-   GTM>WRITE $ZGBLDIR
-
-   MUMPS.GLD
-
-   This RECALLs "WRITE", the command most  recently  beginning  with  this
-   text. Note that the RECALL command text is case sensitive.  The  RECALL
-   command with a text argument treats WRITE and write  differently,  that
-   is, it treats them case  sensitively.  If  you  first  type  the  WRITE
-   command in lower-case and then type WRITE in upper-case to  recall  it,
-   the RECALL command does not find a match.
-
-4 Line_Editing
-   Line Editing
-
-   GT.M permits the use of the VMS command line editor at the Direct Mode
-   prompt and during M READs from a terminal. The VMS line  editor  allows
-   cursor positioning using the <CTRL> key, edit keypad and function keys.
-   Also, it allows toggling  between  insert  and  overstrike  modes.  The
-   command line editing feature is optional; by default  VMS  has  command
-   line editing turned on.
-
-   For more information regarding the VMS command line  editor,  refer  to
-   the VMS Guide to Using VMS.
-
-4 M_Invo_Stack
-   The M Invocation Stack
-
-   The ANSI M Standard describes certain M operations in terms  of  how  a
-   stack-based virtual machine would operate. A stack is a repository for
-   tracking temporary information on a "last-in/first-out" (LIFO) basis. M
-   program behavior can be understood using a stack-based model. However,
-   the standard is not explicit in defining  how  an  implementation  must
-   maintain a stack or even whether it must use one at all.
-
-   The stack model provides a trail of routines currently in progress that
-   shows  the  location  of  all  the  M  operations  that  performed  the
-   invocations leading to the current point.
-
-3 Exit_Dir_Mode
-   Exiting Direct Mode
-
-   Four M commands terminate a Direct Mode session:
-
-   o    HALT
-
-   o    ZCONTINUE
-
-   o    GOTO
-
-   o    ZGOTO
-
-   The
-   HALT command, or a <CTRL-Z> exits Direct  Mode  and  terminates  the  M
-   process.
-
-   The
-   ZCONTINUE command instructs GT.M to exit Direct Mode and resume routine
-   execution at the current point in the M invocation stack. This  may  be
-   the point where GT.M interrupted execution  and  entered  Direct  Mode.
-   However, when the Direct Mode interaction includes a QUIT  command,  it
-   modifies the invocation stack and causes ZCONTINUE to resume execution
-   at another point.
-
-   The
-   GOTO and
-   ZGOTO commands instruct GT.M to leave Direct Mode, and transfer control
-   to a specified entry reference.
-
-2 Debug_Rtn_Dir_Mode
-   Debugging a Routine in Direct Mode
-
-   To begin a debugging session on a specific routine, type the following
-   command at the GTM prompt:
-
-
-   GTM>DO ^routinename
-
-   You can also begin a  debugging  session  by  pressing  <CTRL-C>  after
-   running an M application packaged as an executable image from  DCL.  To
-   invoke  Direct  Mode  by  pressing  <CTRL-C>,  process  must  have  the
-   Principal Device in the CENABLE state and not have the  device  set  to
-   CTRAP=$C(3).
-
-   When GT.M receives a <CTRL-C> command from  the  principal  device,  it
-   invokes Direct Mode at  the  next  opportunity,  (usually  at  a  point
-   corresponding to the beginning of the next source line). GT.M can also
-   interrupt at a FOR loop iteration or during a command of indeterminate
-   duration such as  JOB,  LOCK,  OPEN  or  READ.  The  GT.M  USE  command
-   enables/disables  the  <CTRL-C>  interrupt  with  the  [NO]CENABLE
-   deviceparameter.  The  default  setting  for  <CTRL-C>  handling  is
-   controlled by GTM$DEFAULTS.M64  and  is  enabled  in  the  distribution
-   version of that file.
-
-   GT.M displays the GTM> prompt on  the  principal  device.  Direct  Mode
-   accepts commands from, and reports errors  to,  the  principal  device.
-   GT.M uses the current device for all other I/O. If the  current  device
-   does not match the principal device when GT.M enters Direct Mode, GT.M
-   issues a warning message on the principal device. A USE command changes
-   the current device. For more information on the USE command,  refer  to
-   the "Input/Output Processing" chapter.
-
-   The default "compile-as-written" mode of the GT.M compiler lets you run
-   a program with errors as part of the debugging cycle. The  object  code
-   produced includes all lines that are correct and all commands on a line
-   with an error, up to the error.  When  GT.M  encounters  an  error,  it
-   XECUTEs non empty  values  of  $ETRAP  or  $ZTRAP.  By  default  $ZTRAP
-   contains a BREAK command, so GT.M enters Direct Mode.
-
-   The rest of the chapter illustrates the debugging capabilities of GT.M
-   by taking a sample routine, dmex, through the debugging  process.  dmex
-   is intended to read and edit a name, print the last and first name, and
-   terminate if the name is an upper-case or lower-case "Q".
-
-   Each of the remaining sections of the chapter uses dmex  to  illustrate
-   an aspect of the debugging process in GT.M.
-
-3 Creat_Display_M_Rtn
-   Creating and Displaying M Routines
-
-   To create or edit a routine, use the
-   ZEDIT command. ZEDIT invokes the Text Processing Utility (TPU) section
-   file for GT.M and opens the specified file. dmex.m, for editing.
-
-   Example:
-
-
-   GTM>ZEDIT "dmex"
-
-   Once in the editor, use the arrow keys to move between lines  of  text.
-   When you finish editing, press <CTRL-Z>  to  save  the  changes,  which
-   returns you to Direct Mode.
-
-        For further details and examples, refer to  the  GT.M  Programmer's
-        Guide.
-
-3 Exec_M_Rtn_Inter
-   Executing M Routines Interactively
-
-   To  execute  an  M  routine  interactively,  it  is  not  necessary  to
-   explicitly compile and link your  program.  When  you  refer  to  an  M
-   routine that is not part  of  the  current  image,  GT.M  automatically
-   attempts to compile and
-   ZLINK the program.
-
-   Example:
-
-
-   GTM>DO ^dmex
-
-   Name: Revere, Paul
-
-   %GTM-E-UNDEF, Undefined local variable: bame
-
-   At M source location name+3^DMEX
-
-   GTM>
-
-   In this example GT.M places you in Direct Mode, but also cites an error
-   found in the program with a run-time error message. In this example, it
-   was a reference to bame, which is undefined.
-
-   To see additional information about the error message, examine the
-   $ECODE or
-   $ZSTATUS special variables.
-
-   $ECODE is read-write intrinsic special variable that maintains  a  list
-   of comma delimited codes that describe a history of past errors  -  the
-   most recent ones appear at the end of the  list.  In  $ECODE,  standard
-   errors are prefixed with an "M", user defined errors with  a  "U",  and
-   GT.M errors with a "Z". A GT.M code always follows a standard code.
-
-   $ZSTATUS is a read-write intrinsic special variable  that  maintains  a
-   string containing the error condition code and  location  of  the  last
-   exception  condition  occurring  during  routine  execution.  $ZSTATUS
-   information always contains all components of  the  VMS  error  message
-   format (message number, facility, error  severity,  identification  and
-   text). GT.M updates $ZSTATUS only for errors found in routines and not
-   for errors entered at the Direct Mode prompt.
-
-        For further details and examples, refer to  the  GT.M  Programmer's
-        Guide.
-
-3 Proc_with_Runtime_Syn_Err
-   Processing with Run-time and Syntax Errors
-
-   When GT.M encounters a run-time or syntax error, it stops executing and
-   displays an error message. GT.M reports the error in  the  message.  In
-   this case, GT.M reports an undefined local variable  and  the  line  in
-   error, name+3^DMEX. Note that GT.M re-displays the GTM> prompt so that
-   debugging may continue.
-
-   To re-display the line and identify the error, use the
-   ZPRINT command.
-
-   Example:
-
-
-   GTM>ZPRINT, name+3
-
-   %GTM-E-SPOREOL, Either a space or an end-of-line was expected  but  not
-   found
-   ZP, name+3
-
-   ^_____
-
-   GTM>
-
-   This example shows the result of incorrectly entering a ZPRINT command
-   in Direct Mode. GT.M reports the location of the syntax  error  in  the
-   command line with an arrow. $ECODE and $ZSTATUS do  not  maintain  this
-   error message because GT.M did not produce the message  during  routine
-   execution. Enter the  correct  syntax,  (i.e.,  remove  the  comma)  to
-   re-display the routine line in error.
-
-   Example:
-
-
-   GTM>WRITE $ZPOS
-
-   name+3^DMEX
-
-   This example writes the current line position.
-
-   $ZPOSITION is a read-only GT.M special variable that  provides  another
-   tool for locating and displaying the  current  line.  It  contains  the
-   current  entry  reference  as  a  character  string  in  the  format
-   label+offset^routine, where the label is the closest  preceding  label.
-   The current entry reference appears at the top of the
-   M invocation stack, which can also be displayed with a
-   ZSHOW "S" command.
-
-   To display the current value of every local variable defined, use the
-   ZWRITE command with no arguments.
-
-   Example:
-
-
-   GTM>ZWRITE
-
-   ln=12
-
-   name="Revere, Paul"
-
-   This ZWRITE displays a listing of all  the  local  variables  currently
-   defined.
-
-        ZWRITE displays the variable name. ZWRITE does not display a value
-        for bame, confirming that it is not defined.
-
-3 Correcting_Errors
-   Correcting Errors
-
-   Use the
-   ZBREAK command to establish  a  temporary  breakpoint  and  specify  an
-   action. ZBREAK sets or clears  routine-transparent  breakpoints  during
-   debugging. This command simplifies debugging by interrupting execution
-   at a specific point to examine variables, execute commands, or to start
-   using
-   ZSTEP to execute the routine line by line.
-
-   GT.M suspends execution  during  execution  when  the  entry  reference
-   specified by ZBREAK is encountered. If the ZBREAK does not  specify  an
-   expression "action", the process uses the default,
-   BREAK, and puts GT.M into Direct Mode. If the ZBREAK  does  specify  an
-   expression "action", the process XECUTEs the  value  of  "action",  and
-   does not enter Direct Mode unless the  action  includes  a  BREAK.  The
-   action serves as a "trace-point". The trace-point is silent unless the
-   action specifies terminal output.
-
-   Example:
-
-
-   GTM>ZBREAK name+3^dmex:"set bame=name"
-
-   This uses a ZBREAK with an action that SETs the variable bame equal to
-   name.
-
-3 Stepping_Thru_Rtn
-   Stepping Through a Routine
-
-   The
-   ZSTEP command provides a powerful tool to direct GT.M  execution.  When
-   you issue a ZSTEP from Direct Mode, GT.M executes the  program  to  the
-   beginning of the next target line and performs the ZSTEP action.
-
-   The optional keyword portion of the argument  specifies  the  class  of
-   lines where ZSTEP pauses its execution, and XECUTEs  the  ZSTEP  action
-   specified by the optional action portion of the ZSTEP argument. If the
-   action is specified, it must be an expression that evaluates  to  valid
-   GT.M code. If no action is specified, ZSTEP XECUTEs the code specified
-   by the $ZSTEP intrinsic special variable; by  default  $ZSTEP  has  the
-   value "B", which causes GT.M to enter Direct Mode.
-
-   ZSTEP actions, that include commands followed by a BREAK,  perform  the
-   specified action, then enter Direct Mode. ZSTEP  actions  that  do  not
-   include a BREAK perform the command action and continue execution. Use
-   ZSTEP actions that issue conditional BREAKs and  subsequent  ZSTEPs  to
-   perform tasks such as test for changes in the value of a variable.
-
-   Use ZSTEP to incrementally execute a routine or a series  of  routines.
-   Execute any GT.M command from Direct Mode at any ZSTEP pause. To resume
-   normal execution, use ZCONTINUE. Note that ZSTEP arguments are keywords
-   rather than expressions, and they do not allow indirection.
-
-   Example:
-
-
-   GTM>ZSTEP INTO
-
-   %GTM-I-BREAKZST, Break instruction encountered during ZSTEP action
-
-   At M source location print^DMEX
-
-   GTM>ZSTEP OUTOF
-
-   Paul Revere
-
-   Name: Q
-
-   %GTM-I-BREAKZST, Break instruction encountered during ZSTEP action
-
-   At M source location name^DMEX
-
-   GTM>ZSTEP OVER
-
-   %GTM-I-BREAKZST, Break instruction encountered during ZSTEP action
-
-   At M source location name+1^DMEX
-
-   This shows using the ZSTEP command to step  through  the  routine  DMEX
-   starting where execution was  interrupted  by  the  undefined  variable
-   error. The ZSTEP INTO command executes line name+3 and then interrupts
-   execution at the beginning of line "print".
-
-   The ZSTEP OUTOF continues execution until line name.  The  ZSTEP  OVER,
-   which is the default, executes until it encounters  the  next  line  at
-   this level on the M invocation stack. In this case, the  next  line  is
-   name+1. The ZSTEP OVER could be replaced with a ZSTEP with no argument
-   because they do the same thing.
-
-3 Cont_Exec_Frm_Breakpt
-   Continuing Execution From a Breakpoint
-
-   Use the
-   ZCONTINUE command to continue execution from the breakpoint.
-
-   Example:
-
-
-   GTM>ZCONTINUE
-
-   Paul Revere
-
-   Name: q
-
-   Name: QUIT
-
-   Name: ?
-
-   Please use last-name, first name middle-initial
-
-   or 'Q' to Quit.
-
-   Name:
-
-   This uses a ZCONTINUE command to resume execution from the point where
-   it was interrupted. As a result of the ZBREAK action, bame  is  defined
-   and the error does not  occur  again.  Because  the  process  does  not
-   terminate as intended when the name read has q as a value, we  need  to
-   continue debugging.
-
-3 Interr_Execution
-   Interruption Execution
-
-   Press <CTRL-C> to interrupt execution, and return to the GTM prompt to
-   continue debugging the program.
-
-   Example:
-
-
-   %GTM-I-CTRLC, CTRLC_C encountered.
-
-   GTM>
-
-   This invokes direct mode with a <CTRL-C>.
-
-3 Using_Invoc_Stac_in_Debug
-   Using the Invocation Stack in Debugging
-
-   M DOs, XECUTEs, and extrinsics add a level  to  the  invocation  stack.
-   Matching QUITs take a level off the stack. When GT.M executes either of
-   these  commands,  an  extrinsic  function,  or  an  extrinsic  special
-   variable, it "pushes" information about  the  new  environment  on  the
-   stack. When GT.M executes the
-   QUIT, it "pops" the information about the discarded environment off the
-   stack. It then reinstates the invoking routine  information  using  the
-   entries that have now arrived at the active end of the stack.
-
-        In the M stack model, a
-        FOR command does not add a stack frame, and a QUIT that terminates
-        a FOR loop does not remove a stack frame.
-
-4 Deter_Levels_of_Nest
-   Determining Levels of Nesting
-
-   $STACK contains an integer value  indicating  the  "level  of  nesting"
-   caused by DO commands, XECUTE commands, and extrinsic functions in the
-   M virtual stack.
-
-   $STACK has an initial value of zero (0), and  increments  by  one  with
-   each DO,  XECUTE,  or  extrinsic  function.  Any  QUIT  that  does  not
-   terminate a FOR  loop  or  any  ZGOTO  command  decrements  $STACK.  In
-   accordance with the M standard, a FOR command does not increase $STACK.
-   M routines cannot modify $STACK with the SET or KILL commands.
-
-   Example:
-
-
-   GTM>WRITE $STACK
-
-   2
-   GTM>WRITE $ZLEVEL
-
-   3
-   GTM>
-
-   This example shows the current values for
-   $STACK and
-   $ZLEVEL. $ZLEVEL is like  $STACK  except  that  uses  one  (1)  as  the
-   starting level for the M stack, which $STACK uses zero (0), which means
-   that $ZLEVEL is always one more than $STACK.  Using  $ZLEVEL  with  "Z"
-   commands and functions, and $STACK with standard functions  avoids  the
-   need to calculate the adjustment.
-
-4 Look_Invoc_Stack
-   Looking at the Invocation Stack
-
-   The $STACK intrinsic special variable and the $STACK() function provide
-   a mechanism to access M stack context information.
-
-   Example:
-
-
-   GTM>WRITE $STACK
-
-   2
-   GTM>WRITE $STACK(2,"ecode")
-
-   ,M6,Z150373850,
-
-   GTM>WRITE $STACK(2,"place")
-
-   name+3^DMEX
-
-   GTM>WRITE $STACK(2,"mcode")
-
-   if ln<30,bame?1.a.1"-".a1","1" "1a.ap do print q
-
-   GTM>
-
-   This example gets the value of $STACK and then uses that value  to  get
-   various types of information about that stack level using the
-   $STACK() function. The "ecode" value of the error information for level
-   two, "place" is similar to
-   $ZPOSITION, "mcode" is the code for the level.
-
-   In addition to the $STACK intrinsic special  variable,  which  provides
-   the current stack level, $STACK(-1) gives the highest level  for  which
-   $STACK() can return valid information. Until there is an  error  $STACK
-   and $STACK(-1) are the same, but once
-   $ECODE shows that there is an "current" error, the information returned
-   by $STACK() is frozen to capture the state at the time of the error; it
-   unfreezes after a SET $ECODE="".
-
-   Example:
-
-
-   GTM>WRITE $STACK
-
-   2
-   GTM>WRITE $STACK(-1)
-
-   2
-   GTM>
-
-   This example shows that under the  conditions  created  (in  the  above
-   example), $STACK and $STACK(-1) have the same value.
-
-   The $STACK() can return information about lower levels.
-
-   Example:
-
-
-   +1^GTM$DMOD
-
-   GTM>WRITE $STACK(1,"ecode")
-
-
-   GTM>WRITE $STACK(1,"place")
-
-   beg^DMEX
-
-   GTM>WRITE $STACK(1,"mcode")
-
-   beg for read !,"Name:",namde do name
-
-   GTM>
-
-   This example shows that there was no error at $STACK level one, as well
-   as the "place" and "mcode" information for that level.
-
-4 Using_ZSHOW_Ex_Context_Info
-   Using ZSHOW to Examine Context Information
-
-   The ZSHOW command displays information about the M environment.
-
-   Example:
-
-
-   GTM>ZSHOW "*"
-
-   $DEVICE=""
-
-   $ECODE=",M6,Z150373850,"
-
-   $ESTACK=2
-
-   $ETRAP=""
-
-   $HOROLOG="59149,36200"
-
-   $IO="_TNA215"
-
-   $JOB=501063439
-
-   $KEY=""
-
-   $PRINCIPAL="_TNA215"
-
-   $QUIT=0
-
-   $REFERENCE=""
-
-   $STACK=2
-
-   $STORAGE=2147483647
-
-   $SYSTEM="47,gtm_sysid"
-
-   $TEST=1
-
-   $TLEVEL=0
-
-   $TRESTART=0
-
-   $X=0
-
-   $Y=23
-
-   $ZA=0
-
-   $ZB=$C(13)
-
-   $ZCMDLINE=""
-
-   $ZCOMPILE=""
-
-   $ZCSTATUS=0
-
-   $ZDIRECTORY="DISK1:[home]"
-
-   $ZEDITOR=0
-
-   $ZEOF=0
-
-   $ZERROR="Unprocessed $ZERROR, see $ZSTATUS"
-
-   $ZGBLDIR="mumps.gld"
-
-   $ZININTERRUPT=0
-
-   $ZINTERRUPT="IF $ZJOBEXAM()"
-
-   $ZIO="_TNA215"
-
-   $ZJOB=0
-
-   $ZLEVEL=3
-
-   $ZMODE="INTERACTIVE"
-
-   $ZPOSITION="name+3^DMEX"
-
-   $ZPROCESS=""
-
-   $ZPROMPT="GTM>"
-
-   $ZROUTINES="[],GTM$DIST"
-
-   $ZSOURCE=""
-
-   $ZSTATUS="150373850,name+3^DMEX,%GTM-E-UNDEF, Undefined local variable:
-   bame"
-   $ZSYSTEM=0
-
-   $ZTRAP="B"
-
-   $ZVERSION="GT.M V4.3-001D VMS AXP"
-
-   $ZYERROR=""
-
-   bame="?"
-
-   ln=12
-
-   name=""
-
-_TNA219: OPEN TERMINAL EDIT NOESCA HOST NOINSE NOPAST NOREADS TTSY TYPE WIDTH=80 LENG=24
-   name+3^DMEX ($ZTRAP)
-
-   (Direct mode)
-
-   beg^DMEX
-
-   ^GTM$DMOD (Direct mode)
-
-
-   GTM>
-
-   This example uses the asterisk (*) argument  to  show  all  information
-   that ZSHOW offers in this context.  First  are  the  Intrinsic  Special
-   Variables ($DEVICE-$ZYERROR, also available with ZSHOW "I"),  then  the
-   local variables (bame, ln and name, also  available  with  ZSHOW  "V"),
-   then the ZBREAK locations (name+3^DMEX, also available with ZSHOW "B"),
-   then the device information (also available with ZSHOW "D"), then the M
-   stack (also available with ZSHOW "S"). ZSHOW "S"  is  the  default  for
-   ZSHOW with no arguments.
-
-   Context information that does not exist  in  this  example  includes  M
-   LOCKs of this process (
-   ZSHOW "L"), and available external calls (ZSHOW "C").
-
-   In addition to directing its output to the current  device,  ZSHOW  can
-   place its output  in  a  local  or  global  variable  array.  For  more
-   information, refer to the ZSHOW section of the  "Commands"  chapter  in
-   GT.M Programmer's Guide.
-
-        ZSHOW "V" produces the same output as ZWRITE with no arguments, but
-        ZSHOW "V" can be directed to a variable as well as a device.
-
-3 Transf_Rtn_Control
-   Transferring Routine Control
-
-   The
-   ZGOTO command transfers  control  from  one  part  of  the  routine  to
-   another, or from one routine to  another,  using  the  specified  entry
-   reference. The ZGOTO command takes an optional integer expression that
-   indicates the M stack level reached by performing  the  ZGOTO,  and  an
-   optional  entry  reference  specifying  the  location  to  where  ZGOTO
-   transfers control. A ZGOTO command, with an entry reference, performs a
-   function similar to the GOTO command with the additional capability of
-   reducing the M stack level. In a single operation, the process executes
-   $ZLEVEL-intexpr, implicit QUITs from DO or extrinsic operations, and a
-   GOTO operation transferring control to the named entry reference.
-
-   The ZGOTO command leaves the invocation stack at the level of the value
-   of the integer expression. GT.M implicitly terminates  any  intervening
-   FOR  loops  and  unstacks  variables  stacked  with  NEW  commands,  as
-   appropriate.
-
-   ZGOTO $ZLEVEL:LABEL^ROUTINE takes the same action as GO LABEL^ROUTINE.
-
-   ZGOTO  $ZLEVEL-1  produces  the  same  result  as  QUIT  (followed  by
-   ZCONTINUE, if in Direct Mode).
-
-   If the integer expression evaluates to a value greater than the current
-   value of $ZLEVEL, or less than zero (0), GT.M issues a run-time error.
-
-   If ZGOTO has no entry reference, it performs some  number  of  implicit
-   QUITs and transfers control to the next command at the specified level.
-   When no argument is specified, ZGOTO 1 is  the  result,  and  operation
-   resumes at the lowest level M routine as displayed by ZSHOW "S". In the
-   image invoked by MUMPS/DIRECT, or a  similar  image,  a  ZGOTO  without
-   arguments returns the process to Direct Mode.
-
-3 Disp_Source_code
-   Displaying Source Code
-
-   Use the
-   ZPRINT command to display source code lines selected by  its  argument.
-   ZPRINT allows you to display the source for the current routine and any
-   other related routines. Use the ZPRINT command to display the last call
-   level.
-
-   Example:
-
-
-   GTM>ZPRINT beg
-
-   beg for read !,"Name: ",name do name
-
-   This example uses a ZPRINT command to print the line indicated  as  the
-   call at the top of the stack. Notice that the routine has an  error  in
-   logic. The line starting with the label beg has  a  FOR  loop  with  no
-   control variable, no QUIT, and no GOTO. There is no way out of the FOR
-   loop.
-
-3 Correct_Errs_in_M_Rtn
-   Correcting Errors in an M Routine
-
-   Now that the routine errors have been identified, correct them in the M
-   source file. Use
-   ZEDIT to invoke the editor and open the file for editing.  Correct  the
-   errors previously identified and enter <CTRL-Z> to exit the editor.
-
-   Example:
-
-
-   GTM>ZEDIT "dmex"
-
-   dmex ;dmex - Direct Mode example
-
-   ;
-
-   beg for read !,"Name: ",name do name q:name="Q"
-
-   quit
-
-   name set ln=$l(name)
-
-   if ln,$e("QUIT",1,ln)=$tr(name,"quit","QUIT") d q
-
-   . s name="Q"
-
-   if ln<30,name?1.a.1"-".a1","1" "1a.ap do print q
-
-   write !,"Please use last-name, "
-
-   write "first-name middle-initial or 'Q' to Quit."
-
-   quit
-
-   print write !,$p(name,", ",2)," ",$p(name,", ")
-
-   quit
-
-   GTM>
-
-   This example shows the final state of a ZEDIT session of  dmex.m.  Note
-   that the infinite FOR loop at line beg is corrected.
-
-3 Relink_Edited_Rtn
-   Relinking the Edited Routine
-
-   Use the ZLINK command to add the edited routine to the  current  image.
-   ZLINK automatically recompiles and relinks the routine. If the routine
-   was the most recent one ZEDITed or ZLINKed, you do not have to specify
-   the routine name with the ZLINK command.
-
-        You may have to issue a ZGOTO or  a  QUIT  command  to  remove  the
-        unedited version of the routine from the M invocation stack before
-        ZLINKing the edited version.
-
-   Example:
-
-
-   GTM>ZLINK
-
-   %GTM-E-LOADRUNNING, Cannot ZLINK an active routine
-
-   This illustrates a GT.M error report caused by an attempt  to  ZLINK  a
-   routine that is part of the current invocation stack.
-
-   To ZLINK the routine, remove any invocation levels for the routine off
-   of the call stack. You may use the ZSHOW "S"  command  to  display  the
-   current state of the call stack. Use the QUIT  command  to  remove  one
-   level at a time from the call stack. Use the ZGOTO  command  to  remove
-   multiple levels off of the call stack.
-
-        For further details and examples, refer to  the  GT.M  Programmer's
-        Guide.
-
-3 Reexec_the_Rtn
-   Re-executing the Routine
-
-   Re-display the DO command using the RECALL command.
-
-   Execute the routine using the DO command.
-
-   Example:
-
-
-   GTM>rec d
-
-   GTM>D ^dmex
-
-
-   Name: Revere, Paul
-
-   Paul Revere
-
-   Name: q
-
-   This example illustrates a successful execution of dmex.
-
-3 Using_Spawned_Proc
-   Using Spawned Processes
-
-   The ZSYSTEM command creates a subprocess of the current  process  in  a
-   fashion analogous to the DCL SPAWN command.
-
-   The
-   ZSYSTEM command creates a new process called  the  child  process,  and
-   passes its argument to a Command Language Interpreter  (generally  DCL)
-   for execution. The new process executes in the same  directory  as  the
-   initiating process. The new process has the same VMS  enviroment,  such
-   as logical names and input/output devices, as the  initiating  process.
-   The initiating process pauses until the new  process  completes  before
-   continuing execution.
-
-   Example:
-
-
-   GTM>ZSYSTEM
-
-   $ DIRECTORY dmex.*
-
-   Directory USER: [SMITH]
-
-   DMEX.M;6 DMEX.M;5 DMEX.M;4 DMEX.M;3
-
-   DMEX.M;2 DMEX.M;1 DMEX.OBJ;3 DMEX.OBJ;2 DMEX.OBJ;1
-
-   Total of 9 files
-
-   $ SHOW PROCESS/SUB
-
-   There are 2 processes in this job:
-
-   SMITH
-
-   SMITH_1(*)
-
-   $ATTACH
-
-_Process: SMITH
-   GTM>
-
-   This uses ZSYSTEM to create a subprocess called SMITH_1. Note that the
-   asterisk (*) following SMITH_1  identifies  the  currently  active  sub
-   process. Notice that the results of the DIRECTORY command  at  the  DCL
-   prompt shows source (indicated by a  .M  extension)  and  object  files
-   (indicated by  a  .OBJ  extension)  for  the  routine  dmex.  The  SHOW
-   PROCESS/SUB command shows the main process SMITH, and the newly created
-   subprocess SMITH_1(*). The ATTACH command passes execution  control  to
-   the process named SMITH and leaves the SMITH_1 subprocess in existence;
-   a LOGOUT  command  would  also  return  control  to  SMITH,  but  would
-   terminate SMITH_1.
-
-1 Lang_Features_M
-   General Language Features of M
-
-   MUMPS is a general purpose language with an embedded  database  system.
-   This section of the help file describes the features  of  the  language
-   that are not covered  as  Commands,  Functions,  or  Intrinsic  Special
-   Variables.
-
-2 Data_Types
-   Data Types
-
-   M operates with a single basic data type, string. However, M evaluates
-   data using methods that vary according to context.
-
-3 Num_Expressions
-   Numeric Expressions
-
-   When M syntax specifies a numexpr, M evaluates the data as  a  sequence
-   of ASCII characters that specify a number. M stops the  evaluation  and
-   provides the result generated from  successfully  evaluated  characters
-   when it encounters any character that is not the following:
-
-   o    A digit 0-9
-
-   o    A plus sign (+) or minus sign (-) and also the first  character  in
-        the string
-
-   o    The first decimal point (.) in the string
-
-3 Num_Accuracy
-   Numeric Accuracy
-
-   GT.M provides 18 digits of accuracy, independent of the  decimal  point
-   (.) placement, and a numeric range from 10**(-43) to (10**47). Numbers
-   with three digits or fewer to  the  right  of  the  decimal  point  are
-   precise.
-
-3 Int_Expressions
-   Integer Expressions
-
-   When M syntax specifies an intexpr, M evaluates the data as it would a
-   numexpr except that it  stops  the  evaluation  at  any  decimal  point
-   including the first.
-
-3 Truth_valued_Expr
-   Truth-valued Expressions
-
-   When M syntax specifies a tvexpr, M evaluates the data  as  a  numeric.
-   However, it stops the evaluation and returns a true value (1)  as  soon
-   as it encounters a non-zero digit, otherwise it returns a  false  value
-   (0). In other words, M treats expressions that have a non-zero numeric
-   value as true, and expressions that have a zero numeric value as false.
-   The sign  and/or  decimal  have  no  affect  on  the  evaluation  of  a
-   truth-valued expression.
-
-2 M_Names
-   M Names
-
-   M uses names for variables, LOCK command arguments,  labels  on  lines,
-   and routine names. M names are alphanumeric  and  must  start  with  an
-   alphabetic character or a percent sign (%).
-
-   The percent sign can only appear as the first character in a  name.  By
-   convention,  names  starting  with  percent  signs  are  generally
-   application-independent or distinguished in some similar way.
-
-   M does not reserve any names. That is, M always distinguishes keywords
-   by context. Therefore, M permits a variable or a label called SET even
-   though the language has a command called SET.
-
-   M names are case sensitive. That is, M treats ABC, Abc, ABc,  AbC  ABC,
-   and abc as six different names.  GT.M  relies  on  RMS  files  to  hold
-   routines and, in certain circumstances, on the  VMS  Linker  to  manage
-   routines. Because these VMS facilities are  not  case  sensitive,  GT.M
-   makes an exception for routine names and always treats  them  as  upper
-   case.
-
-   M does not restrict the length  of  names  in  the  main  body  of  the
-   standard. However, the portability section of the  standard  recommends
-   limiting names to a maximum of eight (8) characters.  GT.M  effectively
-   limits names to eight characters by ignoring any characters  after  the
-   first eight.
-
-2 Variables
-   Variables
-
-   M does not require predefinition of variable type or size. M variables
-   are either local or  global.  Any  variable  may  be  unsubscripted  or
-   subscripted.
-
-3 Arrays_Subscripts
-   Arrays and Subscripts
-
-   In M, subscripted variables identify elements in sparse arrays. Sparse
-   arrays comprise existing subscripts  and  data  nodes  -  no  space  is
-   reserved  for  potential  data  nodes.  These  arrays  generally  serve
-   logical, rather than mathematical, purposes.
-
-   M array subscripts are expressions, and are not restricted  to  numeric
-   values.
-
-   The format for an M global or local variable is:
-
-   [^]name[(expr1[,...])]
-   o    The optional leading caret symbol (^) designates a global variable.
-
-   o    The name specifies a particular array.
-
-   o    The optional expressions specify the subscripts
-   o    and must be enclosed in parentheses and separated by commas (,).
-
-   The body of the M standard places no restrictions  on  variable  names.
-   However, the portability section of the standard does suggest limits on
-   the length of an individual subscript  expression,  and  on  the  total
-   length of a variable name. The measurement  for  the  length  of  names
-   includes the length of the global variable name itself, the sum of the
-   lengths of all the  evaluated  subscripts,  and  an  allowance  for  an
-   overhead of two (2) times the number of subscripts. The total must not
-   exceed 237. For globals, GT.M permits this total to  be  modified  with
-   GDE up to 255.  For  locals,  GT.M  limits  the  length  of  individual
-   subscripts to the maximum string length of 32,767. GT.M  restricts  the
-   number of subscripts for local or global variables to 32.
-
-3 M_Collation_Seq
-   M Collation Sequences
-
-   M  collates  all  canonic  numeric  subscripts  ahead  of  all  string
-   subscripts, including strings such as those  with  leading  zeros  that
-   represent non-canonic numbers. Numeric subscripts collate from negative
-   to  positive  in  value  order.  String  subscripts  collate  in  ASCII
-   sequence. In addition, GT.M allows the empty string subscript  in  most
-   contexts, (the null, or empty, string collates  ahead  of  all  canonic
-   numeric subscripts).
-
-   GT.M allows definition of alternative collation sequences. For complete
-   information  on  enabling  this  functionality,  refer  to  the
-   "Internationalization" chapter in GT.M Programmer's Guide.
-
-3 Local_Variables
-   Local Variables
-
-   A local variable in M refers to a variable used solely within the scope
-   of a single process. Local variable names have no leading delimiter.
-
-   M makes a local variable available and subject to modification  by  all
-   routines executed within a process from the time that variable is first
-   SET until it is  KILLed,  or  until  the  process  stops  executing  M.
-   However, M "protects" a local variable after that variable  appears  as
-   an argument to a NEW command, or after it appears as an  element  in  a
-   formalist used in parameter passing. When M protects a local variable,
-   it saves a copy  of  the  variable's  value  and  makes  that  variable
-   undefined. M restores the variable to its saved value during execution
-   of the QUIT that terminates the process stack level associated with the
-   "protecting" NEW or formalist. For more information on  NEW  and  QUIT,
-   refer to the "Commands" chapter in GT.M Programmer's Guide.
-
-   M restricts the following uses of variables to local variables:
-
-   o    FOR command control variables.
-
-   o    Elements within the parentheses of an "exclusive" KILL.
-
-   o    TSTART [with local variables list].
-
-   o    A KILL with no arguments removes all current local variables.
-
-   o    NEW command arguments.
-
-	Actualnames used by pass-by-reference parameter passing.
-
-3 Glob_Var_Resrc_Nam_Env
-   Global Variables and Resource Name Environments
-
-   M recognizes an optional environment specification in global  names  or
-   in the LOCK resource names (nrefs), which have analogous syntax. Global
-   variable names have a leading caret symbol (^) as a delimiter.
-
-   M makes a global variable available, and subject to modification by all
-   routines executed within all processes in an environment, from the time
-   that variable is first SET until it is KILLed.
-
-4 Naked_References
-   Naked References
-
-   M accepts an abbreviation of the global name under some circumstances.
-   When the  leading  caret  symbol  (^)  immediately  precedes  the  left
-   parenthesis delimiting subscripts, the  global  variable  reference  is
-   called a naked reference. M evaluates a naked  reference  by  prefixing
-   the last used global variable name, except for its last  subscript,  to
-   the list of subscripts specified by the naked reference.  The  prefixed
-   portion is known as the naked indicator. An  attempt  to  use  a  naked
-   reference when the prior global reference does not exist,  or  did  not
-   contain a subscript, generates an error.
-
-   Because M has only one process-wide naked indicator which it maintains
-   as a side affect of every evaluation of a global  variable,  using  the
-   naked reference requires an understanding of M  execution  sequence.  M
-   execution generally proceeds from left to right within a line, subject
-   to commands that change the flow of control. However, M  evaluates  the
-   portion of a SET command argument to the right side of the  equal  sign
-   before the left side. Also, M does not evaluate any  further  $SELECT()
-   arguments within the function after  it  encounters  a  true  selection
-   argument.
-
-   In general, using naked references only in very  limited  circumstances
-   prevents problems associated with the naked indicator.
-
-4 Glob_Var_Name_Env
-   Global Variable Name Environments
-
-   M recognizes an optional environment specification in global names. The
-   environment specification designates one of  some  set  of  alternative
-   database files.
-
-   The syntax for  global  variable  names  that  include  an  environment
-   specification is:
-
-   ^|expr|name[(subscript[,...])]
-
-   In GT.M, the expression identifies the Global Directory for mapping the
-   global variable.
-
-   Environment specifications permit easy access to  global  variables  in
-   alternative databases, including other "copies" of active variables in
-   the current database. Environment specifications are sometimes referred
-   to as extended global syntax or extended value syntax.
-
-   GT.M also allows:
-
-   ^|expr1,expr2|name[(subscript[,...])]
-
-   Where the first expression identifies  the  Global  Directory  and  the
-   second expression is accepted but ignored by GT.M.
-
-   To improve compatibility with some other M implementations,  GT.M  also
-   accepts another non-standard syntax. In this syntax,  the  leading  and
-   trailing up-bar (|) are respectively replaced by a left square-bracket
-   ([)  and  a  right  square-bracket  (]).  This  syntax  also  requires
-   expratoms, rather than expressions.
-
-   The formats for this non-standard syntax are:
-
-   ^[expratom1]name[(subscript...)]
-
-   or
-
-   ^[expratom1,expratom2]name[(subscript...)]
-
-   Where expratom1 identifies the Global  Directory  and  expratom2  is  a
-   dummy variable. Note that the first set of brackets in each  format  is
-   part of the syntax. The second set of square brackets is  part  of  the
-   meta-language identifying an optional element.
-
-   Example:
-
-
-   $ DEFINE GTM$GBLDIR TEST.GLD
-
-   $ MUMPS/DIR
-
-   GTM>WRITE $ZGBLDIR
-
-   TEST.GLD
-
-   GTM>WRITE ^A
-
-   THIS IS ^A IN DATABASE RED
-
-   GTM>WRITE ^|"M1.GLD"|A
-
-   THIS IS ^A IN DATABASE WHITE
-
-   GTM>WRITE $ZGBLDIR
-
-   TEST.GLD
-
-   GTM>HALT
-
-   $ SHOW LOGICAL GTM$GBLDIR
-
-   TEST.GLD
-
-   The statement WRITE ^|"M1.GLD"|A writes variable ^A  using  the  Global
-   Directory, M1.GLD, but does not change the current Global Directory.
-
-   Example:
-
-
-   GTM>WRITE $ZGBLDIR
-
-   M1.GLD
-
-   GTM>WRITE ^A
-
-   THIS IS ^A IN DATABASE WHITE
-
-   GTM>WRITE ^|"M1.GLD"|A
-
-   THIS IS ^A IN DATABASE WHITE
-
-   The statement WRITE ^|"M1.GLD"|A is equivalent to WRITE ^A.
-
-   Specifying separate Global Directories does  not  always  translate  to
-   using separate databases.
-
-   Example:
-
-
-   GTM>WRITE ^|"M1.GLD"|A,!,^|"M2.GLD"|A,!,^|"M3.GLD"
-
-|A,!
-   THIS IS ^A IN DATABASE WHITE
-
-   THIS IS ^A IN DATABASE BLUE
-
-   THIS IS ^A IN DATABASE WHITE
-
-   In this example, the WRITE does not display ^A from three GT.M database
-   files.  Mapping  specified  by  the  Global  Directory  Editor  (GDE)
-   determines the database file to which a Global Directory points.
-
-   This result could have occurred under the following mapping:
-
-
-   ^|"M1.GLD"|A --> REGIONA --> SEGMENTA --> FILE1.DAT
-
-   ^|"M2.GLD"|A --> REGIONA --> SEGMENT1 --> FILE2.DAT
-
-   ^|"M3.GLD"|A --> REGION3 --> SEGMENT3 --> FILE1.DAT
-
-   For more information  on  Global  Directories,  refer  to  the  "Global
-   Directory Editor" chapter of the  GT.M  Administration  and  Operations
-   Guide.
-
-4 Opt_GTM_Env_Trans_Facility
-   Optional GT.M Environment Translation Facility
-
-   For users who wish to dynamically  (at  run-time)  determine  a  global
-   directory from non-global directory information (typically UCI and VOL)
-   in the environment specification, GT.M provides an interface to add an
-   appropriate translation.
-
-   Using this facility impacts the performance of every global access that
-   uses environment specification. Make sure you use it only  when  static
-   determination of the global directory is not feasible. When used, make
-   every effort to keep the translation routines very efficient.
-
-   The use of this facility is enabled by the definition  of  the  logical
-   GTM_ENV_TRANSLATE, which contains the path of a sharable image with the
-   following entry point:
-
-5 gtm_env_xlate
-   gtm_env_xlate
-
-   If the shared object is not  accessible  or  the  entry  point  is  not
-   accessible, GT.M reports an error.
-
-   The gtm_env_xlate() routine has the following C prototype:
-
-
-   int gtm_env_xlate(xc_string_t *in1, xc_string_t *in2,  xc_string  *in3,
-   xc_string_t *out)
-   where xc_string_t is a structure defined in gtmxc_types.h as follows:
-
-
-   typedef struct
-
-   {
-
-   int length;
-
-   char *address;
-
-   } xc_string_t;
-
-   The purpose of the function is to use  its  three  input  arguments  to
-   derive and return an output argument that can be used as an environment
-   specification by GT.M. Note that the input values passed (in1, in2 and
-   in3) are the result of M evaluation and must not be modified. The first
-   two arguments are the expressions passed within the up-bars  "|  |"  or
-   the square-brackets "[ ]",  and  the  third  argument  is  the  current
-   working directory as described by $ZDIRECTORY.
-
-   A return value other than zero (0) indicates an error  in  translation,
-   and is reported by a GT.M error
-
-   If the length of the  output  argument  is  non-zero,  GT.M  appends  a
-   secondary message of GTM-I-TEXT,  containing  the  text  found  at  the
-   address of the output structure.
-
-   GT.M does not do any memory management related to the output argument -
-   space for the output should be allocated by the external  routine.  The
-   routine must  place  the  returned  environment  specification  at  the
-   address it has allocated  and  adjust  the  length  accordingly.  On  a
-   successful return, the return value should be zero. If the translation
-   routine must communicate an error to GT.M, it must  return  a  non-zero
-   value, and if it is to communicate additional error information, place
-   the error text at the address where the environment would  normally  go
-   and adjust the length to match the length of the error text.
-
-   Length of the return value  may  range  from  0-32767,  otherwise  GT.M
-   reports an error.
-
-   A zero-length (empty) string specifies the current value  of  $ZGBLDIR.
-   Non-zero  lengths  must  represent  the  actual  length  of  the  file
-   specification pointed to by address, excluding any <NUL> terminator. If
-   the address field of the output argument is NULL, GT.M issues an error.
-
-
-   The file specification may be absolute or relative and  may  contain  a
-   logical name. If the file specified is not  accessible,  or  is  not  a
-   valid global directory, GT.M reports errors in the same way it does for
-   any invalid global directory.
-
-   It is possible to write this routine in  M  (as  a  call-in),  however,
-   global variables in such a routine would change  the  naked  indicator,
-   which  environment  references  normally  do  not.  Depending  on  the
-   conventions of the application, there  might  be  difficult  name-space
-   management issues such as protecting the local variables used by the M
-   routine.
-
-   While it is possible for  this  routine  to  take  any  form  that  the
-   application designer  finds  appropriate  within  the  given  interface
-   definition, the following paragraphs make some recommendations based on
-   the expectation that a routine invoked for any more than a  handful  of
-   global references should be efficient.
-
-   It is expected that the routine loads one or  more  tables,  either  at
-   compilation or the first time it is invoked. The logic of  the  routine
-   performs a look up on the entry in the set of tables. The lookup might
-   be based on the length of the strings and some unique set of characters
-   in the names, or a hash, with collision provisions as appropriate.
-
-   The routine may have to deal with a case  where  one  or  both  of  the
-   inputs have zero length. A subset of these cases  may  have  the  first
-   string holding a comma limited string that needs to  be  re-interpreted
-   as being equivalent to two input strings (note that the  input  strings
-   must never be modified). The routine may  also  have  to  handle  cases
-   where a value (most likely the first) is accidentally or intentionally,
-   already a global directory specification.
-
-   Example:
-
-
-> type gtm_env_translate.c
-   #include <stdio.h>
-
-   #include <string.h>
-
-   #include "gtmxc_types.h"
-
-
-   static int init = 0;
-
-   typedef struct
-
-   {
-
-   xc_string_t field1, field2, ret;
-
-   } line_entry ;
-
-
-   static line_entry table[5], *line, linetmp;
-
-        /* Since these errors may occur before setup is complete, they are
-        statics */
-   static  char  *errorstring1  =  "Error  in  function  initialization,
-   environment  variable  GTM_CALLIN_START  not  defined.  Environment
-   translation failed.";
-   static char *errorstring2 = "Error in function initialization, function
-   pointers could not be determined. Envrironment translation failed.";
-   void copy_string(char **loc1, char *loc2, int length)
-
-   {
-
-   char *ptr;
-
-   ptr = (char *) gtm_malloc(length);
-
-   strncpy( ptr, loc2, length);
-
-   *loc1 = ptr;
-
-   }
-
-
-   int init_table(xc_string_t *ptr)
-
-   {
-
-   int i = 0;
-
-   char buf[100];
-
-   char *buf1, *buf2;
-
-   FILE *tablefile;
-
-   char *space = " ";
-
-   char *errorstr1 = "Error opening table file table.dat";
-
-   char *errorstr2 = "UNDETERMINED ERROR FROM GTM_ENV_XLATE";
-
-
-   if ((tablefile = fopen("table.dat","r")) == (FILE *)NULL)
-
-   {
-
-   ptr->length = strlen(errorstr1);
-
-   copy_string(&(ptr->address), errorstr1, strlen(errorstr1));
-
-   return 1;
-
-   }
-
-   while (fgets(buf, (int)SIZEOF(buf), tablefile) != (char *)NULL)
-
-   {
-
-   line= &table[i++];
-
-   buf1 = buf;
-
-   buf2 =strstr(buf1, space);
-
-   line->field1.length = buf2 - buf1;
-
-   copy_string( &(line->field1.address), buf1, line->field1.length);
-
-   buf1 = buf2+1;
-
-   buf2 = strstr(buf1, space);
-
-   line->field2.length = buf2-buf1;
-
-   copy_string( &(line->field2.address), buf1, line->field2.length);
-
-   buf1 = buf2+1;
-
-   line->ret.length = strlen(buf1) - 1;
-
-   copy_string( &(line->ret.address), buf1, line->ret.length);
-
-   }
-
-   fclose(tablefile);
-
-        /* In this example, the last entry in the table is the error string
-        */
-   line = &table[4];
-
-   copy_string( &(line->ret.address), errorstr2, strlen(errorstr2));
-
-   line->ret.length = strlen(errorstr2);
-
-   return 0;
-
-   }
-
-
-   int cmp_string(xc_string_t str1, xc_string_t str2)
-
-   {
-
-   if (str1.length == str2.length)
-
-   return strncmp(str1.address, str2.address, (int) str1.length);
-
-   else
-
-   return str1.length - str2.length;
-
-   }
-
-
-   int cmp_line(line_entry *line1, line_entry *line2)
-
-   {
-
-   return  (((cmp_string(line1->field1,
-   line2->field1))||(cmp_string(line1->field2, line2->field2))));
-   }
-
-
-   int look_up_table(line_entry *aline, xc_string_t *ret_ptr)
-
-   {
-
-   int i;
-
-   int ret_v;
-
-
-   for(i=0;i<4;i++)
-
-   {
-
-   line = &table[i];
-
-   ret_v = cmp_line( aline, line);
-
-   if (!ret_v)
-
-   {
-
-   ret_ptr->length = line->ret.length;
-
-   ret_ptr->address = line->ret.address;
-
-   return 0;
-
-   }
-
-   }
-
-        /*ERROR OUT*/
-   line = &table[4];
-
-   ret_ptr->length= line->ret.length;
-
-   ret_ptr->address = line->ret.address;
-
-   return 1;
-
-
-   }
-
-
-   int gtm_env_xlate(xc_string_t  *ptr1,  xc_string_t  *ptr2,  xc_string_t
-   *ptr_zdir, xc_string_t *ret_ptr)
-   {
-
-
-   int return_val, return_val_init;
-
-   if (!init)
-
-   {
-
-   return_val_init = init_functable(ret_ptr);
-
-   if (return_val_init) return return_val_init;
-
-   return_val_init = init_table(ret_ptr);
-
-   if (return_val_init) return return_val_init;
-
-   init = 1;
-
-   }
-
-   linetmp.field1.length= ptr1->length;
-
-   linetmp.field1.address= ptr1->address;
-
-   linetmp.field2.length= ptr2->length;
-
-   linetmp.field2.address= ptr2->address;
-
-
-   return_val = look_up_table(&linetmp, ret_ptr);
-
-   return return_val;
-
-   }
-
-
-> type table.dat
-   day1 week1 mumps
-
-   day2 week1 a
-
-   day3 week2 b
-
-   day4 week2 c.gld
-
-   This example demonstrates the mechanism. A table is set  up  the  first
-   time for proper memory management, and  for  each  reference,  a  table
-   lookup is performed. Note that for the purpose of simplicity, no error
-   checking is done, so table.dat is assumed to be in the correct format,
-   and have exactly four entries.
-
-2 Literals
-   Literals
-
-   M has both string and numeric literals.
-
-3 String_Literals
-   String Literals
-
-   String literals (strlit) are enclosed in quotation marks (" ") and must
-   only contain graphic characters. In  other  words,  control  characters
-   (ASCII 0-31 and 127) cannot appear in  a  strlit.  M  attempts  to  use
-   character text  that  appears  outside  of  quotation  mark  delimiters
-   according to context, which generally means as a local variable name.
-
-   To include a quotation mark (") within a  strlit,  use  a  set  of  two
-   quotation marks ("" "").
-
-   Example:
-
-
-   GTM>WRITE """"
-
-   "
-
-   GTM>
-
-   The WRITE displays a single quotation mark because the first quotation
-   mark delimits the  beginning  of  the  string  literal,  the  next  two
-   quotation marks denote a single quote within the string, and  the  last
-   quotation mark delimits the end of the string literal.
-
-   Use the $CHAR  function  and  the  concatenation  operator  to  include
-   control characters within a string.
-
-   Example:
-
-
-   GTM>WRITE "A"_$CHAR(9)_"B"
-
-   A B
-
-   GTM>
-
-   The WRITE displays an "A," followed by a tab (<HT>), followed by a "B"
-   using $CHAR(), to introduce the non-graphic character.
-
-3 Numeric_Literals
-   Numeric Literals
-
-   In  M,  numeric  literals  (numlit)  are  entered  without  surrounding
-   delimiters.
-
-   Example:
-
-
-   GTM>WRITE 1
-
-   1
-   GTM> WRITE 1.1
-
-   1.1
-   These display numeric literals that are integer and decimal.
-
-   M also accepts numeric literals in  the  form  of  a  mantissa  and  an
-   exponent, separated by a delimiter of "E" in  uppercase.  The  mantissa
-   may be an integer or a decimal fraction. The integer exponent may have
-   an optional leading minus sign (-).
-
-   Example:
-
-
-   GTM>WRITE 8E6
-
-   8000000
-   GTM> WRITE 8E-6
-
-   .000008
-   GTM>
-
-2 Expressions
-   Expressions
-
-   The following  items  are  legal  M  expression  atoms  (expratom).  An
-   expression atom is a component of an M expression.
-
-   o    Local variables
-
-   o    Global variables
-
-   o    Intrinsic special variables
-
-   o    Intrinsic functions
-
-   o    Extrinsic functions
-
-   o    Extrinsic special variables
-
-   o    Numeric literals
-
-   o    String literals
-
-   o    An expression enclosed in parentheses
-
-   o    Any of the above preceded by a unary operator
-
-   In addition, any of these items may be combined with a binary operator
-   and another expression atom.
-
-2 Operators
-   Operators
-
-   M has both unary and binary operators.
-
-3 Precedence
-   Precedence
-
-   All unary operations have right to left precedence.
-
-   All M binary operations have strict  left  to  right  precedence.  This
-   includes all arithmetic, string, and logical operations. Hierarchies of
-   operations  require  explicit  establishment  of  precedence  using
-   parentheses (). Although this rule is counterintuitive, it is  easy  to
-   remember and has no exceptions.
-
-3 Arithmetic_Operators
-   Arithmetic Operators
-
-   All arithmetic operators force M to evaluate the expressions  to  which
-   they apply as numeric. The arithmetic operators are:
-
-        + as a unary operator simply forces M to  evaluate  the  expression
-        following as numeric; as a binary operator it causes M  to  perform
-        addition.
-        - as a unary operator causes M to negate the expression following;
-        as a binary operator it causes M to perform subtraction.
-        * binary operator for multiplication.
-        ** binary operator for exponentiation.
-        / binary operator for fractional division.
-        \ binary operator for integer division.
-        # binary operator for modulo, that is,  causes  M  to  produce  the
-        remainder from integer  division  of  the  first  argument  by  the
-        second.
-   Remember that precedence is left to right for all arithmetic operators.
-
-   Example:
-
-
-   GTM>WRITE 1+1
-
-   2
-   GTM>WRITE 2-1
-
-   1
-   GTM>WRITE 2*2
-
-   4
-   GTM>WRITE 3**2
-
-   9
-   GTM>WRITE 4/2
-
-   2
-   GTM>WRITE 7
-
-   2
-   GTM>WRITE 7#3
-
-   1
-   GTM>
-
-   This simple example demonstrates how each arithmetic  binary  operation
-   uses numeric literals.
-
-   Example:
-
-
-   GTM>WRITE +"12ABC"
-
-   12
-   GTM>WRITE --"-3-4"
-
-   -3
-
-   GTM>
-
-   The first WRITE shows the unary plus sign  (+)  operation  forcing  the
-   numeric evaluation of a string literal. The second  WRITE  demonstrates
-   the unary minus sign (-). Note the second minus sign within the string
-   literal does not cause subtraction, but rather, terminates the numeric
-   evaluation with the result of negative three (-3). Each of the leading
-   minus signs causes one negation and therefore, the result  is  negative
-   three (-3).
-
-3 Logical_Operators
-   Logical Operators
-
-   M logical operators always produce a result that is TRUE (1)  or  FALSE
-   (0). All logical operators force M to evaluate the expressions to which
-   they apply as truth-valued. The logical operators are:
-
-        '  unary  NOT  operator  negates  current  truth-value;  M  accepts
-        placement of the NOT operator next to a  relational  operator,  for
-        example, A'=B as meaning '(A=B).
-        & binary AND operator produces a true result only if  both  of  the
-        expressions are true.
-        ! binary OR operator produces  a  true  result  if  either  of  the
-        expressions is true.
-   Remember that precedence is always left  to  right,  and  that  logical
-   operators have the same precedence as all other operators.
-
-   Example:
-
-
-   GTM>WRITE '0
-
-   1
-   GTM>WRITE '1
-
-   0
-   GTM>WRITE '5689
-
-   0
-   GTM>WRITE '-1
-
-   0
-   GTM>WRITE '"ABC"
-
-   1
-   GTM>
-
-   The above example demonstrates the unary NOT operation. Note  that  any
-   non-zero numeric value is true and has a false negation.
-
-   Example:
-
-
-   GTM>WRITE 0&0
-
-   0
-   GTM>WRITE 1&0
-
-   0
-   GTM>WRITE 0&1
-
-   0
-   GTM>WRITE 1&1
-
-   1
-   GTM>WRITE 2&1
-
-   1
-   GTM>WRITE 0!0
-
-   0
-   GTM>WRITE 1!0
-
-   1
-   GTM>WRITE 0!1
-
-   1
-   GTM>WRITE 1!1
-
-   1
-   GTM>WRITE 2!1
-
-   1
-   GTM>
-
-   The above example demonstrates all cases covered by the binary logical
-   operators.
-
-3 String_Operators
-   String Operators
-
-   All string operators force M to evaluate the expressions to which they
-   apply as strings. The string operator is:
-
-        _ binary operator causes M to  concatenate  the  second  expression
-        with the first expresion
-   Example:
-
-
-   GTM>WRITE "B"_"A"
-
-   BA
-
-   GTM>WRITE "A"_1
-
-   A1
-
-   GTM>
-
-   The above example demonstrates M concatenation.
-
-3 Num_Relational_Operators
-   Numeric Relational Operators
-
-   M relational operators always generate a result of TRUE  (1)  or  FALSE
-   (0).  All  numeric  relational  operators  force  M  to  evaluate  the
-   expressions to which they apply  as  numeric.  The  numeric  relational
-   operators are:
-
-        > binary arithmetic greater than
-        < binary arithmetic less than
-   The equal sign (=) does not force numeric  evaluation,  and  should  be
-   viewed as a string  operator.  However,  the  equal  sign  between  two
-   numeric values tests for numeric equality.
-
-   Other numeric relations are  formed  using  the  logical  NOT  operator
-   apostrophe (') as follows:
-
-        '> not greater than, that is, less than or equal to
-        '< not less than, that is, greater than or equal to
-        '= not equal, numeric or string operation
-   Example:
-
-
-   GTM>WRITE 1>2
-
-   0
-   GTM>WRITE 1<2
-
-   1
-   GTM>
-
-   The  above  example  demonstrates  the  basic  arithmetic  relational
-   operations.
-
-   Example:
-
-
-   GTM>WRITE 1'<2
-
-   0
-   GTM>WRITE 2'<1
-
-   1
-   GTM>
-
-   The above example demonstrates combinations of  arithmetic,  relational
-   operators with the logical NOT operator.
-
-3 Str_Relational_Operators
-   String Relational Operators
-
-   M relational operators always generate a result of TRUE  (1)  or  FALSE
-   (0).  All  string  relational  operators  force  M  to  evaluate  the
-   expressions to which they  apply  as  strings.  The  string  relational
-   operators are:
-
-        = binary operator causes M to produce a TRUE if the expressions are
-        equal.
-        [ binary  operator  causes  M  to  produce  a  TRUE  if  the  first
-        expression contains the  ordered  sequence  of  characters  in  the
-        second expression.
-        ] binary  operator  causes  M  to  produce  a  TRUE  if  the  first
-        expression lexically follows the second expression in the character
-        encoding sequence, which by default is ASCII.
-        ]] binary operator  causes  M  to  produce  a  TRUE  if  the  first
-        expression lexically sorts  after  the  second  expression  in  the
-        subscript collation sequence.
-   Note that all non-empty strings lexically follow the empty string, and
-   every string contains the empty string.
-
-   Other string relations  are  formed  using  the  logical  NOT  operator
-   apostrophe (') as follows:
-
-        '[ does not contain.
-        '] does not follow, that is, lexically less than or equal to.
-        ']] does not sort after, that is, lexically less than or  equal  to
-        in the subscript collation sequence.
-        '= not equal, numeric or string operation.
-   Example:
-
-
-   GTM>WRITE "A"="B"
-
-   0
-   GTM>WRITE "C"="C"
-
-   1
-   GTM>WRITE "A"["B"
-
-   0
-   GTM>WRITE "ABC"["C"
-
-   1
-   GTM>WRITE "A"]"B"
-
-   0
-   GTM>WRITE "B"]"A"
-
-   1
-   GTM>WRITE "A"]]"B"
-
-   0
-   GTM>WRITE "B"]]"A"
-
-   1
-   These examples demonstrate the string relational operators using string
-   literals.
-
-   Example:
-
-
-   GTM>WRITE 2]10
-
-   1
-   GTM>WRITE 2]]10
-
-   0
-   GTM>WRITE 0]"$"
-
-   1
-   GTM>WRITE 0]]"$"
-
-   0
-   These examples illustrate that when using the primary  ASCII  character
-   set, the  main  difference  in  the  "follows"  (])  operator  and  the
-   "sorts-after" (]]) operator is the way they treat numbers.
-
-   Example:
-
-
-   GTM>WRITE 1=1
-
-   1
-   GTM>WRITE 1=2
-
-   0
-   GTM>WRITE 1="1"
-
-   1
-   GTM>WRITE 1=01
-
-   1
-   GTM>WRITE 1="01"
-
-   0
-   GTM>WRITE 1=+"01"
-
-   1
-   GTM>
-
-   These examples illustrate the dual nature of the equal  sign  operator.
-   If both expressions are string or numeric,  the  results  are  straight
-   forward. However, when the expressions are  mixed,  the  native  string
-   data type prevails.
-
-   Example:
-
-
-   GTM>WRITE "a"'="A"
-
-   1
-   GTM>WRITE "FRED"'["RED"
-
-   0
-   GTM>WRITE "ABC"']""
-
-   0
-   These  examples  demonstrate  combinations  of  the  string  relational
-   operators with the NOT operator.
-
-3 Pat_Match_Operator
-   Pattern Match Operator
-
-   The pattern match operator (?)  causes  M  to  return  a  TRUE  if  the
-   expression ahead of the operator matches the characteristics described
-   by  the  pattern  following  the  operator.  The  pattern  is  not  an
-   expression.
-
-   Patterns are made up of two elements:
-
-   o    A repetition count
-
-   o    A pattern code, a string literal or an alternation list
-
-   The element following the pattern match  operator  may  consist  of  an
-   indirection operator, followed  by  an  element  that  evaluates  to  a
-   legitimate pattern.
-
-   The repetition count consists of either a single integer literal  or  a
-   period  (.)  delimiter  with  optional  leading  and  trailing  integer
-   literals. A single integer literal specifies an exact repetition count.
-   The period syntax specifies a range of repetitions  where  the  leading
-   number is a minimum and the trailing number  is  a  maximum.  When  the
-   repetition count is missing the leading number, M assumes there  is  no
-   minimum, (i.e., a minimum  of  zero).  When  the  repetition  count  is
-   missing the trailing number, M does not place a maximum on  the  number
-   of repetitions.
-
-   The pattern codes are:
-
-        A alphabetic characters upper or lower case
-        C control characters ASCII 0-31 and 127
-        E any character; used to pass all characters  in  portions  of  the
-        string where the pattern is not restricted
-        L lower-case alphabetic characters, ASCII 97-122
-        N digits 0-9, ASCII 48-57
-        P punctuation, ASCII 32-47, 58-64, 91-96, 123-126
-        U upper-case alphabetic characters, ASCII 65-90
-   Pattern codes may be upper or lower case and may  be  replaced  with  a
-   string literal. GT.M allows the M pattern match definition of patcodes
-   A, C, N, U, L, and P to be extended or changed, (A can only be modified
-   implicitly by modifying L or U) and new patcodes  added.  For  detailed
-   information  on  enabling  this  functionality,  refer  to  the
-   "Internationalization" chapter in GT.M Programmer's Guide.
-
-        The GT.M compiler accepts pattern codes other than those explicitly
-        defined above. If, at run-time, the pattern codes come into use and
-        no pattern definitions are available, GT.M issues a run-time error
-        (PATNOTFOUND). GT.M does not currently implement a mechanism for Y
-        and Z patterns and continues to treat those as compile-time syntax
-        errors.
-
-   Example:
-
-
-   GTM>WRITE "ABC"?3U
-
-   1
-   GTM>WRITE "123-45-6789"?3N1"-"2N1"-"4N
-
-   1
-   The first WRITE has a simple one-element pattern while the  second  has
-   multiple elements including both codes and  string  literals.  All  the
-   repetition counts are fixed.
-
-   Example:
-
-
-   I x?.E1C.E W !,"Must not contain a control character" Q
-
-   This example uses a pattern match to test for control characters.
-
-   Example:
-
-
-   I acn?1U.20A1","1U.10A D
-
-   .S acn=$G((^ACX($P(acn,","),$P(acn,",",2)))
-
-   This example uses a pattern match with implicit minimums  to  determine
-   that an "account number" is actually a name, and to trigger  a  look-up
-   of the corresponding account number in the ^ACX cross index.
-
-   The pattern match operator accepts the  alteration  syntax.  Alteration
-   consists of a repeat  count  followed  by  a  comma-delimited  list  of
-   patatoms enclosed in parentheses "()". The semantic is that the pattern
-   matches if any of the listed patterns matches the operand  string.  For
-   example, ?1(2N1"-"7N,3N1"-"2N1"-"4N).1U might be a way to match either
-   a social security number or a taxpayer ID. Since alternation is defined
-   as one of the ways of constructing a patatom, alternation can nest (be
-   used recursively).
-
-        Complex pattern matches may not be efficient to evaluate, so every
-        effort should be made to simplify any commonly used pattern and to
-        determine  if  more  efficient  alternative  logic  would  be  more
-        appropriate.
-
-2 Gen_M_Comm
-   General M Commands
-
-   M commands may be abbreviated to a defined prefix. Most  commands  have
-   arguments. However, some commands have either optional arguments or no
-   arguments. When a command has no  argument  and  is  followed  by  more
-   commands on the same line, at least two spaces (<SP>) must  follow  the
-   command without arguments. Commands  that  accept  arguments  generally
-   accept multiple arguments  on  the  same  command.  M  treats  multiple
-   arguments the same as multiple occurrences of the  same  command,  each
-   with its own argument.
-
-3 Postconditionals
-   Postconditionals
-
-   M provides postconditionals as a tool for placing a  condition  on  the
-   execution of a single command and, in  some  cases,  a  single  command
-   argument. A postconditional consists of a colon (:) delimiter followed
-   by a truth-valued expression. When the expression evaluates to true, M
-   executes the command  occurrence.  When  the  expression  evaluates  to
-   false, M does not execute the command occurrence.
-
-4 Comm_Postconditionals
-   Command Postconditionals
-
-   Command postconditionals appear immediately  following  a  command  and
-   apply to all arguments for the command when it has multiple arguments.
-   All commands except commands that themselves have a conditional aspect
-   accept a command postconditional. Among the M standard commands, ELSE,
-   FOR, and IF do  not  accept  command  postconditionals.  All  the  GT.M
-   command extensions accept command postconditionals.
-
-4 Arg_Postconditionals
-   Argument Postconditionals
-
-   Commands that affect the flow of control may accept postconditionals on
-   individual  command  arguments.  Because  multiple  arguments  act  as
-   multiple commands, this is a straight-forward application of  the  same
-   principal as command postconditional. The only M standard commands that
-   accept argument postconditionals are DO, GOTO,  and  XECUTE.  The  GT.M
-   command extensions that accept  argument  postconditionals  are  BREAK,
-   ZGOTO, and ZSYSTEM.
-
-3 Timeouts
-   Timeouts
-
-   M provides timeouts as a tool to retain program control  over  commands
-   of indefinite duration. A timeout consists of a colon (:) delimiter on
-   an argument, followed by a numeric expression specifying the number of
-   seconds for M to attempt to execute the command. When  the  timeout  is
-   zero (0), M makes a single attempt to complete the command.
-
-   When a command has a timeout, M maintains the $TEST  intrinsic  special
-   variable  as  the  command  completes.  If  the  command  completes
-   successfully, M sets $TEST to TRUE (1). If the command times out before
-   successful completion, M sets  $TEST  to  FALSE  (0).  When  a  command
-   argument does not specify a timeout, M does not maintain $TEST.
-
-   The following commands accept timeouts:
-
-   o    LOCK
-
-   o    JOB
-
-   o    OPEN
-
-   o    READ
-
-   o    ZALLOCATE
-
-   When a READ times out, M  returns  any  characters  that  have  arrived
-   between the start of the command and the timeout. M  does  not  produce
-   any partial results for any of the other timed commands.
-
-2 Gen_M_Intrin_Func
-   General M Intrinsic Functions
-
-   M Intrinsic Functions start with a single dollar sign ($) and have one
-   or more arguments enclosed in parentheses () and  separated  by  commas
-   (,). These functions provide an expression result by performing actions
-   that would be impossible or difficult to perform using M  commands.  It
-   is now possible to invoke a C function in a package  via  the  external
-   call mechanism.
-
-2 Gen_M_Intr_Spec_Var
-   General M Intrinsic Special Variables
-
-   M Intrinsic Special Variables start with a single dollar sign ($). GT.M
-   provides such variables for program examination.  In  some  cases,  the
-   Intrinsic Special Variables may be SET to modify the corresponding part
-   of the environment.
-
-2 Routines
-   Routines
-
-   M routines have a name and consist of lines  of  code  followed  by  an
-   end-of-record which is a carriage return, formfeed (<CR><FF>) sequence.
-   M separates the name of a routine from the body of the routine with an
-   end-of-line which is a carriage-return, line-feed (<CR><LF>) sequence.
-
-   GT.M stores routine sources in RMS files and  implicitly  supplies  the
-   end-of-record and end-of-line character sequences.
-
-   In M, a routine has no particular impact on variable management and may
-   include code that is invoked at different  times  and  has  no  logical
-   intersection.
-
-3 Lines
-   Lines
-
-   A line of M code consists of the following elements  in  the  following
-   order:
-
-   o    An optional label.
-
-   o    A  line-start  delimiter.  The  standard  defines  the  line-start
-        delimiter as a space (<SP>) character. In order to enhance routine
-        readability, GT.M extends M by accepting one  or  more  tab  (<HT>)
-        characters as line-start delimiters.
-
-   o    Zero or more level indicators, which are  periods  (.).  The  level
-        indicators show the level of nesting for argumentless DO commands:
-        the more periods, the deeper the  nesting.  M  ignores  lines  that
-        contain  level  indicators  unless  they  directly  follow  an
-        argumentless DO command with a matching level of nesting.
-
-   o    Zero or more commands  and  their  arguments.  M  accepts  multiple
-        commands on a line. The argument(s) of one  command  are  separated
-        from the next command by a command-start delimiter,  consisting  of
-        one or more spaces (<SP>).
-
-   o    A terminating end-of-line, which is a carriage  return,  line  feed
-        (<CR><LF>) sequence.
-
-4 Labels
-   Labels
-
-   In addition to labels that follow the rules  for  M  names,  M  accepts
-   labels consisting only of digits. In a label consisting only of digits,
-   leading zeros are considered significant. For example, labels 1 and 01
-   are different. Formalists may immediately follow a label. A Formalists
-   consists of one or more names enclosed in  parentheses  ().  Formalists
-   identify local variables that "receive" passed values  in  M  parameter
-   passing.
-
-   In GT.M, a colon (:) delimiter may be  appended  to  the  label,  which
-   causes the label to be treated as "local." Within the routine in which
-   they appear, they perform exactly as they would  without  the  trailing
-   colon but they are inaccessible to other routines. Using  local  labels
-   reduces object size and linking  overhead,  for  both  ZLINK  and  host
-   linking.
-
-4 Comments
-   Comments
-
-   In addition to commands, a line may also contain a comment that starts
-   with a leading semi-colon (;) delimiter. The scope of a comment is the
-   remainder of the line. In other words, M ignores anything to the right
-   of the comment delimiter. The standard defines  the  comment  delimiter
-   (;) as it would a command, and therefore requires that it always appear
-   after a linestart. GT.M extends the  standard  to  permit  comments  to
-   start at the first character of a line or in an argument position.
-
-3 Entry_Ref
-   Entry References
-
-   M entryrefs provide a generalized target for referring to a line within
-   a routine. An entryref may contain some  combination  of  a  label,  an
-   offset, and a routine name (in that order). The offset is delimited by
-   a plus sign (+) and the routinename is delimited by a caret symbol(^).
-   When an entryref does not contain a label, M assumes the offset is from
-   the beginning of the routine. When an  entryref  does  not  contain  an
-   offset, M uses an offset of zero (0). When an entryref does not contain
-   a routine name, M assumes the routine that is currently executing.
-
-   M permits every  element  in  an  entryref  to  have  the  form  of  an
-   indirection operator, followed  by  an  element  that  evaluates  to  a
-   legitimate occurrence of that portion of the entryref.
-
-        While  most  commands  and  functions  that  use  entryrefs  permit
-        argument indirection, M does not accept indirection  that  resolves
-        to a combination of label and offset or offset and routine name.
-
-   Offsets provide an extremely useful tool for debugging. However, avoid
-   their use in production code because they generally produce maintenance
-   problems.
-
-3 Label_Ref
-   Label References
-
-   M labelrefs are a subset of entryrefs that exclude offsets and separate
-   indirection. Labelrefs are used with parameter passing.
-
-2 Indirection
-   Indirection
-
-   M provides indirection as a means to defer definition  of  elements  of
-   the code until run-time. Indirection names a  variable  that  holds  or
-   "points" to the element. The indirection operator is  the  "at"  symbol
-   (@).
-
-3 Arg_Indirection
-   Argument Indirection
-
-   Most commands accept indirection of their entire argument.
-
-   Example:
-
-
-   GTM>SET x="^INDER"
-
-   GTM>DO @x
-
-   This example is equivalent to DO ^INDER.
-
-3 Atomic_Indirection
-   Atomic Indirection
-
-   Any expratom or any local or global variable name may  be  replaced  by
-   indirection.
-
-   Example:
-
-
-   GTM>SET x="HOOP",b="x"
-
-   GTM>WRITE a="HULA "__ at b
-
-   HULA HOOP
-
-   GTM>
-
-   This example uses indirection within a concatenation operation.
-
-3 Entryref_Indirection
-   Entryref Indirection
-
-   Any element of an entryref may be replaced by indirection.
-
-   Example:
-
-
-   GTM>SET lab="START",routine="PROG"
-
-   GTM>DO @lab^@routine
-
-   This example is equivalent to DO START^PROG.
-
-3 Patt_Code_Indirection
-   Pattern Code Indirection
-
-   A pattern code may be replaced by indirection.
-
-   Example:
-
-
-   GTM>FOR p="1U.20A1"",""1U.20A",5N IF x?@p QUIT
-
-   GTM>ELSE WRITE !,"Incorrect format" QUIT
-
-   This example uses pattern code indirection to test x for either a name
-   or a number.
-
-3 Name_Indirection
-   Name Indirection
-
-   Indirection may replace the prefix of a  subscripted  global  or  local
-   variable  name.  This  "name"  indirection  requires  two  indirection
-   operators,  a  leading  operator  similar  to  the  other  forms  of
-   indirection, and a trailing operator marking the  transition  to  those
-   subscripts that are not specified by indirection.
-
-   Example:
-
-
-   GTM>SET from="B",to="^A(15),x=""
-
-   GTM>FOR SET x=$O(@from@(x)) Q:x="" S @to@(x)=@from@(x)
-
-   This example uses name indirection to copy  the  level  contents  of  a
-   local array to a part of a global array. The example assumes  that  all
-   existing first level nodes of variable B have data.
-
-3 Indirection_Concerns
-   Indirection Concerns
-
-   M indirection provides  a  very  powerful  tool  for  allowing  program
-   abstraction. However, because indirection is frequently unnecessary and
-   has some disadvantages, use it carefully.
-
-   Because routines that use indirection  in  some  ways  do  not  contain
-   adequate information for easy reading, such routines tend  to  be  more
-   difficult to debug and maintain.
-
-   To improve run-time performance, GT.M tends to move work from run-time
-   to compile-time.  Indirection  forces  compiler  actions  to  occur  at
-   run-time, which minimizes the benefits of compilation.
-
-   M allows most forms of indirection to be recursive.  However,  in  real
-   applications, recursive indirection typically makes  the  code  obscure
-   and slow.
-
-   There are circumstances where indirection serves a worthwhile purpose.
-   For instance, certain utility functions with a general  nature  may  be
-   clearly abstracted and coded using indirection. Because M has no "CASE"
-   command, DO (or  GOTO)  with  argument  indirection  provides  a  clear
-   solution to the problem of providing complex branching.
-
-   Some M users prototype with indirection and  then  replace  indirection
-   with generated code that reduces run-time overhead. In any case, always
-   consider whether indirection can be replaced with  a  clearer  or  more
-   efficient approach.
-
-2 Param_Passing
-   Parameter Passing
-
-   Parameter passing provides a way of explicitly controlling some or all
-   of the variable context transferred between M routines.
-
-   M uses parameter passing for:
-
-   o    A DO command with parameters
-
-   o    Extrinsic functions and special variables
-
-   Parameter passing is optional on DO commands.
-
-   Parameter  passing  uses  two  argument  lists:  the  actuallist  that
-   specifies the parameters that M passes to an invoked routine,  and  the
-   formalist that specifies the local variables to  receive  or  associate
-   with the parameters.
-
-3 Actuallists
-   Actuallists
-
-   An actuallist specifies the parameters M passes to the invoked routine.
-   The actuallist contains a list of zero or more parameters  enclosed  in
-   parentheses, immediately following a DO or extrinsic function.
-
-   An actuallist:
-
-   o    Is made up of items separated by commas
-
-   o    Contains expressions and/or actualnames. Items may be missing, that
-        is, two commas may appear next to each other, with nothing between
-        them.
-
-   o    Must be used in an invocation of a label with a formallist, except
-        in the case of extrinsic special variables.
-
-   o    Must not contain undefined variables.
-
-   o    Must not have more items than a formallist with which it is used.
-
-   o    May contain the same item in more than one position.
-
-   Example:
-
-
-   GTM>DO MULT(3,X,.RESULT)
-
-   This example illustrates a DO with parameters. The actuallist contains:
-
-   o    3 - a numeric literal
-
-   o    X - a local variable
-
-   o    .RESULT - an actualname
-
-3 Actualnames
-   Actualnames
-
-   An actualname starts with a leading period (.) delimiter,  followed  by
-   an unsubscripted local variable name.  Actualnames  identify  variables
-   that are passed by reference, as described  in  a  subsequent  section.
-   While expressions in  an  actualname  are  evaluated  when  control  is
-   transferred to a formallabel, the variables identified  by  actualnames
-   are not; therefore, they do not need to be defined at the time control
-   is transferred.
-
-3 Formallists
-   Formallists
-
-   A formallist specifies the variables M uses to hold  passed  values.  A
-   formallist contains a list of  zero  or  more  parameters  enclosed  in
-   parentheses, immediately following a label.
-
-   A formallist:
-
-   o    Is made up of items separated by commas.
-
-   o    Contains unsubscripted local variable names.
-
-   o    Must be used and only used with a label invoked with an actuallist
-        or an extrinsic.
-
-   o    May contain undefined variables.
-
-   o    May have more items than an actuallist with which it is used.
-
-   o    Must not contain the same item in more than one position.
-
-   o    Must contain at least as many items as the actuallist with which it
-        is used.
-
-   Example:
-
-
-   MULT(MP,MC,RES)
-
-   SET RES=MP*MC
-
-   QUIT RES
-
-   In this example,  illustrating  a  simple  parameterized  routine,  the
-   formallist contains the following items:
-
-   o    MP
-
-   o    MC
-
-   o    RES
-
-   An example in the section describing "Actuallists" shows an invocation
-   that matches this routine.
-
-3 Formallabel
-   Formallabel
-
-   A label followed by a formallist is called a formallabel.
-
-3 Param_Pass_Operation
-   Parameter Passing Operation
-
-   M performs an implicit NEW on the formallist  names  and  replaces  the
-   formallist items with the actuallist items.
-
-   M provides the actuallist values to the  invoked  procedure  by  giving
-   each element in the formallist the value or reference provided  by  the
-   corresponding element in the actuallist. M associates the first name in
-   the formallist with the first item in the actuallist, the  second  name
-   in the formallist with the second item in the actuallist and so on. If
-   the actuallist is shorter than  the  formallist,  M  ensures  that  the
-   formallist items with no corresponding value are in  effect  NEWed.  If
-   the formallist  item  has  no  corresponding  item  in  the  actuallist
-   (indicated by two adjacent commas in the actuallist), that item in the
-   formallist becomes undefined.
-
-   If  the  actuallist  item  is  an  expression  and  the  corresponding
-   formallist variable is an array, parameter passing does not affect the
-   subscripted elements of the array. If an actualname  corresponds  to  a
-   formallist variable, M reflects  array  operations  on  the  formallist
-   variable, by reference, in the variable specified by the actualname.
-
-   M treats variables that are not part of the formallist as if parameter
-   passing did not exist (i.e., M makes  them  available  to  the  invoked
-   routine).
-
-   M initiates execution at the first command following the formallabel.
-
-   A QUIT command terminates execution of the invoked routine. At the time
-   of the QUIT, M restores the formallist items to the values they had at
-   the invocation of the routine.
-
-        In the case where a variable name appears as an actualname  in  the
-        actuallist, and also as a variable in the formallist, the restored
-        value reflects any change made by reference.
-
-   A QUIT from a DO does not take  an  argument,  while  a  QUIT  from  an
-   extrinsic must have an argument. This represents one of the  two  major
-   differences between the DO command with parameters and the extrinsics.
-   M returns the value of the QUIT command argument as the  value  of  the
-   extrinsic function or special variable. The other difference is that M
-   stacks $TEST for extrinsics.
-
-   Example:
-
-   SET X=30,Z="Hello"
-
-   DO WRTSQR(X)
-
-   ZWRITE
-
-   QUIT
-
-   WRTSQR(Z)
-
-   SET Z=Z*Z
-
-   WRITE Z,!
-
-   QUIT
-
-   Produces:
-
-
-   900
-   X=30
-
-   Z="Hello"
-
-3 Param_Pass_Mechanism
-   Parameter Passing Mechanisms
-
-   M passes the  actuallist  values  to  the  invoked  routine  using  two
-   parameter-passing mechanisms:
-
-   o    Call-by-Value - where expressions appear
-
-   o    Call-by-Reference - where actualnames appear
-
-   A call-by-value passes a copy of the value of the actuallist expression
-   to the invoked routine by assigning the copy to a formallist variable.
-   If the parameter is a variable, the invoked  routine  may  change  that
-   variable. However, because M constructs that variable to hold the copy,
-   it deletes the variable holding the copy when  the  QUIT  restores  the
-   prior formallist values. This also means that changes to  the  variable
-   by the invoked routine do not affect the value of the variable  in  the
-   invoking routine.
-
-   Example:
-
-
-   SET X=30
-
-   DO SQR(X)
-
-   ZWRITE
-
-   QUIT
-
-   SQR(Z) SET Z=Z*Z
-
-   QUIT
-
-   Produces:
-
-
-   X=30
-
-   A period followed by a name  identifies  an  actualname  and  causes  a
-   call-by-reference.
-
-   A call-by-reference passes a pointer to the  variable  of  the  invoked
-   routine so operations on the assigned formallist variable also  act  on
-   the actualname variable. Changes, including  KILLs  to  the  formallist
-   variable,  immediately  have  the  same  affect  on  the  corresponding
-   actualname variable. This means that M  passes  changes  to  formallist
-   variables in the invoked  routine  back  to  the  invoking  routine  as
-   changes in actualname variables.
-
-   Example:
-
-
-   SET X=30
-
-   DO SQR(.X)
-
-   ZWRITE
-
-   QUIT
-
-   SQR(Z) SET Z=Z*Z
-
-   QUIT
-
-   Produces:
-
-
-   X=900
-
-3 GTM_Param_Pass_Extn
-   GT.M Parameter Passing Extensions
-
-   The standard does not provide for indirection of a labelref because the
-   syntax has an ambiguity.
-
-   Example:
-
-
-   DO @X(1)
-
-   This example could be:
-
-   o    An invocation of the label specified by X with a parameter of 1.
-
-   o    An invocation of the label specified  by  X(1)  with  no  parameter
-        list.
-
-   GT.M  processes  the  latter  interpretation  as  illustrated  in  the
-   following example.
-
-   Example:
-
-   The syntax:
-
-
-   SET A(1)="CUBE",X=5
-
-   DO @A(1)(.X)
-
-   WRITE X,!
-
-   QUIT
-
-   CUBE(C) ;cube a variable
-
-   SET C=C*C*C
-
-   QUIT
-
-   Produces the result:
-
-   125
-   GT.M follows analogous syntax for routine indirection:
-
-   DO ^@X(A) invokes the routine specified by X(A).
-
-   DO ^@(X)(A) invokes the routine specified by X and passes the parameter
-   A.
-
-   DO ^@X(A)(A) invokes the routine  specified  by  X(A)  and  passes  the
-   parameter A.
-
-2 Ext_Calls
-   External Calls
-
-   GT.M supports the MDC Type A external call syntax.  The  external  call
-   syntax  provides  an  externref  that  specifies  a  destination  for
-   subroutine invocation. The format for an externref is:
-
-&[packagename.]name[^name]
-   The externref is a two-part identification of a  program  entry  point.
-   The entry point can be in any language, including M. The packagename is
-   a name following M rules that identifies a name-space within which the
-   remainder of the externref, after the delimiting period (.), is unique.
-   The portion of the externref after  the  delimiting  period  may  be  a
-   single M name or two M names separated by a caret (^).
-
-   Example:
-
-
-   SET X=$&MATH.NATRLOG(.Y)
-
-   This invokes the NATRLOG function in the MATH package  and  passes  the
-   value of Y by reference.
-
-   GT.M supports external calls to any  language  that  supports  the  VAX
-   calling  standard.  GT.M  provides  external  call  (ZCALL)  tables  to
-   interface between the typeless data of M and the typed  data  supported
-   by the VAX calling standard. ZCALL tables associate  packagenames  with
-   groups  of  external  routine  definitions.  Each  external  routine
-   definition associates the name(s) within the  package  with  an  actual
-   routine, and any parameters passed to or from  the  routine  with  data
-   typing information. External routine definitions also permit reordering
-   parameters from their presentation in M to the order used in the actual
-   external routine call.
-
-   GT.M supports calls to M from  an  external  routine  that  was  itself
-   called from M.
-
-   DO commands may specify  an  externref  in  place  of  an  M  entryref.
-   Extrinsic functions and extrinsic  special  variables  may  specify  an
-   externref in place of a labelref.
-
-   The  MDC  Type  A  external  call  syntax  replaces  ZCALL,  GT.M's
-   implementation-specific method for making external calls. However, GT.M
-   continues to support the ZCALL syntax.
-
-2 Extrinsic_Func
-   Extrinsic Functions
-
-   An extrinsic function is an M subroutine that  another  M  routine  can
-   invoke to return a value.
-
-   The format for extrinsic functions is:
-
-
-   $$[label][^routinename]([expr|.lname[,...]])
-
-   o    The optional label and optional routinename make up the formallabel
-        that specifies the name of the subroutine performing the extrinsic
-        function. The formallabel must contain at least one of its optional
-        components.
-
-   o    The optional expressions and actualnames  make  up  the  actuallist
-        that specifies the list  of  actual  parameters  M  passes  to  the
-        invoked routine.
-
-   M stacks $TEST for extrinsic functions. This is one of  the  two  major
-   differences between the DO command with parameters and  extrinsics.  On
-   return from an extrinsic function, M restores the  value  of  $TEST  to
-   what it was before the extrinsic function, regardless  of  the  actions
-   executed by the invoked routine.
-
-   M requires a routine that implements an extrinsic function to terminate
-   with an explicit QUIT command which has  an  argument.  M  returns  the
-   value of the QUIT command  argument  as  the  value  of  the  extrinsic
-   function. This is the other major difference  between  the  DO  command
-   with parameters and extrinsics. It  is  now  possible  to  invoke  a  C
-   function in a package via the external call mechanism.
-
-   Example:
-
-
-   GTM>ZPRINT ^POWER
-
-   POWER(V,X,S,T) ;extrinsic to raise to a power
-
-   ;ignores fractional powers
-
-   SET T=1,S=0
-
-   IF X<0 SET X=-X,S=1
-
-   FOR X=1:1:X S T=T*V
-
-   QUIT $S(S:1/T,1:T)
-
-   GTM> WRITE $$^POWER(3,4)
-
-   81
-   GTM>
-
-        The POWER routine  uses  a  formallist  that  is  longer  than  the
-        "expected" actuallist to  protect  local  working  variables.  Such
-        practice may be encouraged or  discouraged  by  your  institution's
-        standards.
-
-2 Extrinsic_Spc_Vars
-   Extrinsic Special Variables
-
-   An extrinsic special variable  is  a  user-written  M  subroutine  that
-   another M routine can invoke to return a value.
-
-   The format for extrinsic special variables is:
-
-   $$[label][^routinename]
-
-   o    The  optional  label  and  optional  routinename  make  up  the
-        formallabel, which specifies the name of the subroutine performing
-        the extrinsic function. The formallabel must contain at  least  one
-        of its optional component.
-
-   An extrinsic special  variable  can  be  thought  of  as  an  extrinsic
-   function without input parameters. $$x is equivalent  in  operation  to
-   $$x(). Extrinsic special variables are the only case  where  invocation
-   of a formallabel does not require an actuallist.  M  stacks  $TEST  for
-   extrinsic special variables.
-
-   M requires that a routine that implements an extrinsic special variable
-   terminate with an explicit  QUIT  command  which  has  an  argument.  M
-   returns the value of the QUIT command argument  as  the  value  of  the
-   extrinsic special variable.
-
-   Example:
-
-
-   GTM>ZPRINT ^DAYOWEEK
-
-   DAYOWEEK() ;extrinsic special variable to
-
-   ;provide the day of the week
-
-   QUIT $ZD($H,"DAY")
-
-   GTM>WRITE $$DAYOWEEK^DAYOWEEK
-
-   MON
-
-2 Trans_Processing
-   Transaction Processing
-
-   Transaction Processing (TP) provides a way for M programs  to  organize
-   database updates into logical groups  that  occur  as  a  single  event
-   (i.e., either all the database updates in a transaction occur, or none
-   of them occur). No other process may  behave  as  if  it  observed  any
-   intermediate state.
-
-   Transaction  processing  has  been  designed  to  improve  output  and
-   eliminate "live lock" conditions. The number of  attempts  to  complete
-   the transaction is limited to four. The fourth attempt is made inside a
-   "critical section" with all other processes temporarily locked  out  of
-   the database. Between the second and third  tries,  GT.M  waits  for  a
-   random interval between 0 and 500 milliseconds.
-
-3 TP_Def
-   TP Definitions
-
-   In M, a transaction is a sequence of commands that begins with a TSTART
-   command, ends with a TCOMMIT command, and is not within  the  scope  of
-   another transaction.
-
-   A successful transaction ends with a COMMIT that is  triggered  by  the
-   TCOMMIT command at the end of the transaction. A COMMIT causes all the
-   database updates performed within the transaction to  become  available
-   to other processes.
-
-   An unsuccessful transaction ends with a ROLLBACK. ROLLBACK  is  invoked
-   explicitly by  the  TROLLBACK  command,  or  implicitly  at  a  process
-   termination that occurs during a  transaction  in  progress.  An  error
-   within a transaction does not cause an implicit  ROLLBACK.  A  ROLLBACK
-   removes any database updates performed within  the  transaction  before
-   they are made available to other processes. ROLLBACK also releases all
-   resources LOCKed since the start of  the  transaction,  and  makes  the
-   naked reference undefined.
-
-   A RESTART is a transfer of control to the TSTART at  the  beginning  of
-   the  transaction.  RESTART  implicitly  includes  a  ROLLBACK  and  may
-   optionally restore local variables to the  values  they  had  when  the
-   initial TSTART was originally executed. A RESTART always restores $TEST
-   and the naked reference to the values they had when the initial TSTART
-   was executed. RESTART does  not  manage  device  state  information.  A
-   RESTART is invoked by the TRESTART command or by M if it is determined
-   that the transaction  is  in  conflict  with  other  database  updates.
-   RESTART can only successfully occur if the initial TSTART  includes  an
-   argument that enables RESTART.
-
-3 TP_Characteristics
-   TP Characteristics
-
-   Most transaction processing systems try to have transactions  meet  the
-   "ACID" test-Atomic, Consistent, Isolated, and Durable. To conform with
-   the M approach of providing maximum  flexibility  and,  when  possible,
-   backwards  compatibility  with  older  versions  of  the  standard,  M
-   transaction processing requires the use of programming conventions that
-   meet the ACID test.
-
-   For example, some effects of the BREAK, CLOSE,  JOB,  OPEN,  READ,  USE
-   WRITE, and ZSYSTEM commands may be observed by parties to  the  system.
-   Because the effects of these commands might cause an observing process
-   or person to conclude that a transaction executing them was in progress
-   and  perhapsfinished,  they  violate,  in  theory,  the  principle  of
-   Isolation.
-
-   The LOCK command is another example. A program may  attempt  to  use  a
-   LOCK to determine if another process has a transaction in progress. The
-   answer would depend on the management  of  LOCKs  within  transactions,
-   which is implementation-specific. This would therefore clearly violate
-   the principle of Isolation. The LOCK command is discussed later in this
-   section.
-
-   The simplest way to construct a transaction that meets the ACID test is
-   not to use any commands within  a  transaction  whose  affects  may  be
-   immediately "visible" outside the transaction. Unfortunately, because M
-   applications  are  highly  interactive,  this  is  not  entirely
-   straightforward.  When  a  user  interaction  relies  on  database
-   information, one solution is for the program to save the initial values
-   of any global values that could affect the outcome, in local variables.
-   Then, once the  interaction  is  over  and  the  transaction  has  been
-   initiated,  the  program  checks  the  saved  values  against  the
-   corresponding global variables. If they are the same, it  proceeds.  If
-   they differ, some other update has changed  the  information,  and  the
-   program must issue a TROLLBACK, and initiate another interaction  as  a
-   replacement.
-
-   Even when the "visible" commands appear  within  a  transaction,  an  M
-   application may provide wholesome operation by  relying  on  additional
-   programming or operating conventions.
-
-   A program using LOCKs to achieve  serializability  relies  on  properly
-   designed  and  universally  followed  LOCKing  conventions  to  achieve
-   Isolation with respect to database operations. LOCKs placed outside the
-   transaction (usually a LOCK immediately before the TSTART and an unlock
-   immediately after the  TCOMMIT)  achieve  serializability  by  actually
-   serializing any  approximately  concurrent  transaction.  LOCKs  placed
-   inside the transaction (frequently a LOCK immediately after the TSTART
-   and an unlock immediately before the TCOMMIT) signal M to  ensure  that
-   no operations  using  the  same  LOCK  resource(s)  overlap.  Within  a
-   transaction, an M implementation may defer both LOCKing  and  unlocking
-   to achieve its goal of serializability. A program  using  TSTARTs  with
-   the SERIAL keyword replaces the convention with a guarantee from M that
-   all the  database  activity  of  the  transaction  meets  the  test  of
-   Isolation with respect to database activity.
-
-   In GT.M the Durability aspect of the  ACID  properties  relies  on  the
-   journaling  feature.  When  journaling  is  on,  every  transaction  is
-   recorded in the journal file as well as in the  database.  The  journal
-   file constitutes a serial record of database actions and states. It is
-   always written before the database updates and is  designed  to  permit
-   recovery of the database if the database should be damaged. By default
-   when a process commits a transaction, it does not return control to the
-   application code until the transaction has reached  the  journal  file.
-   The  exception  to  this  is  that  when  the  TSTART  specifies
-   TRANSACTIONID="BATCH" the process resumes application execution without
-   waiting for the file system to confirm  the  successful  write  of  the
-   journal record. The  idea  of  the  TRANSACTIONID="BATCH"  has  nothing
-   inherently to do with "batch" processing -  it  is  to  permit  maximum
-   throughput  for  transactions  where  the  application  has  its  own
-   check-pointing mechanism, or method of recreating  the  transaction  in
-   case of a failure. The real durability of transactions is a function of
-   the durability of the journal files. Putting journal files on reliable
-   devices (RAID with UPS protection) and  eliminating  common  points  of
-   failure with the path to the  database  (separate  drives,  controllers
-   cabling) improve durability. The use of  the  replication  feature  can
-   also improve durability by moving the data to a separate site  in  real
-   time.
-
-   Attempting to QUIT (implicitly or explicitly) from code  invoked  by  a
-   DO, XECUTE, or extrinsic after  that  code  issued  a  TSTART  not  yet
-   matched by a TCOMMIT, produces an error. Although this is a consequence
-   of the RESTART capability, it is true  even  when  that  capability  is
-   disabled. For example, this means that  an  XECUTE  containing  only  a
-   TSTART fails, while an XECUTE  that  performs  a  complete  transaction
-   succeeds.
-
-3 TP_Performance
-   TP Performance
-
-   To achieve the best GT.M performance, transactions should:
-
-   o    be as short as possible
-
-   o    consist, as much as possible, only of global updates
-
-   o    be SERIAL with no associated LOCKs
-
-   o    have RESTART enabled with a minimum of local variables protected by
-        a restart portion of the TSTART argument.
-
-   Large concurrent transactions using TCOMMIT may result in repeated and
-   inefficient attempts by competing processes to  capture  needed  scarce
-   resources, resulting in poor performance.
-
-   Example:
-
-
-   TSTART ():SERIAL
-
-   SET (ACCT,^M(0))=^M(0)+1
-
-   SET ^M(ACCT)=PREC,^PN(NAM)=ACCT
-
-   TCOMMIT
-
-   This transaction encapsulates these two SETs. The first increments the
-   tally of patients registered, storing the number in local variable ACCT
-   for faster access in the current program, and in global variable ^M(0).
-   The second SET stores a patient record by account number and the third
-   cross-references the account number with the patient name. Placing the
-   SETs within a single  transaction  ensures  that  the  database  always
-   receive either all of  the  SETs  or  none  of  them,  thus  protecting
-   database  integrity  against  process  or  system  failure.  Similarly,
-   another concurrent process, whether using transactions  or  not,  never
-   finds one of the SETs in place without also finding the other one.
-
-   Example:
-
-   TSTART ():SERIAL
-
-   IF $TRESTART>3 DO QUIT
-
-   .TROLLBACK
-
-   .WRITE !,"Too many RESTARTs"
-
-   .QUIT
-
-   SET (NEXT,^ID(0))=^ID(0)+1
-
-   SET ^ID(NEXT)=RECORD,^XID(ZIP,NEXT)=""
-
-   TCOMMIT
-
-   This transaction will automatically restart if it cannot serialize the
-   SETs to the database, and will terminate with a TROLLBACK if more than
-   3 RESTARTs occur.
-
-   GT.M provides a way to monitor transaction restarts by  reporting  them
-   to  the  operator  logging  facility.  If  the  logical  name
-   TPRESTART_SYSLOG_DELTA is defined, GT.M reports every Nth restart where
-   N is the numeric evaluation of the value of TPRESTART_SYSLOG_DELTA. If
-   the  logical  name  TPRESTART_SYSLOG_LIMIT  is  defined,  the  restart
-   reporting begins after the number of restarts specified by the value of
-   TPRESTART_SYSLOG_LIMIT. For example, defining both the logical name to
-   the  value  1,  causes  all  TP  restarts  to  be  logged.  When
-   TPRESTART_SYSLOG_DELTA  is  defined,  leaving  TPRESTART_SYSLOG_LIMIT
-   undefined is equivalent to giving it the value 1.
-
-        For more information on  enhancements  related  to  TP  performance
-        refer to the "NOISOLATION" section under VIEW command topic in the
-        "Commands" chapter in GT.M Programmer's Guide.
-
-3 TP_Example
-   TP Example
-
-   Here is a transaction processing example that  lets  you  exercise  the
-   concept. If you  use  this  example,  be  mindful  that  the  functions
-   "holdit" and "trestart" are included as tools to allow  you  access  to
-   information within a transaction which would normally  be  hidden  from
-   users. These types of functions would not normally appear in production
-   code. Comments have been inserted into the code to explain the function
-   of various segments.
-
-
-   trans
-
-   ;This sets up the program constants
-
-   ;for doit and trestart
-
-   n
-
-   s $p(peekon,"V",51)=""
-
-   s $p(peekon,"V",25)="Peeking inside Job "_$j
-
-   s $p(peekoff,"^",51)=""
-
-   s $p(peekoff,"^",25)="Leaving peeking Job "_$j
-
-   ;This establishes the main loop
-
-   s CNFLTMSG="Conflict, please reenter"
-
-   f r !,"Name: ",nam q:'$l(nam) d
-
-   .i nam="?" d q
-   ..w !,"Current data in ^trans:",! d:$d(^trans) q
-   ...zwrite ^trans
-   .f s ok=1 d q:ok w !,$C(7),CNFLTMSG,$C(7),!
-   ..s old=$g(^trans(nam),"?")
-   ..i old="?" w !,"Not on file" d q
-   ...;This is the code to add a new name
-   ...f d q:data'="?"
-   ....r !,"Enter any info using '#' delimiter: ",!,data
-   ...i data="" w !,"No entry made for ",nam q
-   ...TSTART ():SERIAL i $$trestart ;$$trestart for demo
-   ...i $d(^trans(nam)) s ok=^trans(nam)=data TRO q
-   ...s ^trans(nam)=data
-   ...TCOMMIT:$$doit ;$$doit for demo
-   ..;This is the beginning of the change and delete loop
-   ..f d q:fld=+fld!'$l(fld) w " must be numeric"
-   ...w !,"Current data: ",!,old
-   ...r !,"Piece no. (negative to delete record) : ",fld
-   ..i 'fld w !,"no change made" q
-   ..;This is the code to delete a new name
-   ..i fld<0 d q ; delete record
-   ...f d q:"YyNn"[x
-   ....w !,"Ok to delete ",nam," Y(es) or N(o) <N>? "
-   ....r x s x=$e(x)
-   ...i "Yy"'[x!'$l(x) w !,"No change made" q
-   ...TSTART ():SERIAL i $$trestart ;$$trestart for demo
-   ...i $g(^trans(nam),"?")'=old TROLLBACK s ok=0 q
-   ...kill ^trans(nam)
-   ...TCOMMIT:$$doit; $$doit for demo
-   ..;This is the code to change a field
-   ..f r !,"Data: ",data q:data'="?"&(data'["#") d
-   ...w " must not be a single '?' or contain any '#'"
-   ..TSTART ():SERIAL i $$trestart ;$$trestart for demo
-   ..i '$d(^trans(nam)) s ok=0 TROLLBACK q
-   ..i $p(^trans(nam),"#",fld)=$p(old,"#",fld) d q
-   ...s ok=$p(^trans(nam),"#",fld)=data TROLLBACK
-   ..s $p(^trans(nam),"#",fld)=data
-   ..TCOMMIT:$$doit; $$doit for demo
-   q
-
-
-   doit()
-
-   ;This inserts delay and an optional
-
-   ;rollback only to show how it works
-
-   w !!,peekon d disp
-
-   f d q:"CR"[act
-
-   .r !,"C(ommit), R(ollback), or W(ait) <C>? ",act
-   .s act=$tr($e(act),"cr","CR")
-   .i act="?" d disp
-   i act="R" TROLLBACK w !,"User requested DISCARD"
-
-   w !,peekoff,!
-
-   q $TLEVEL
-
-
-   trestart()
-
-   ;This is only to show what is happening
-
-   i $TRESTART d
-
-   .w !!,peekon,!,">>>RESTART<<<",! d disp w !,peekoff,!
-   q 1
-
-
-   disp
-
-   w !,"Name: ",nam
-
-   w !,"Original data: ",!,old,!,"Current data: "
-
-   w !,$g(^trans(nam),"KILLED!")
-
-   q
-
-   Generally, this type of program would be receiving data  from  multiple
-   sessions into the same global.
-
-1 BREAK
-   Break
-
-   The BREAK command pauses execution of the  code  and  initiates  Direct
-   Mode.
-
-   The format of the BREAK command is:
-
-
-   B[REAK][:tvexpr] [expr[:tvexpr][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional expression contains a fragment of GT.M code to XECUTE
-        before the process enters Direct Mode.
-
-   o    The BREAK command without an argument causes a pause  in  execution
-        of the routine code and immediately initiates Direct Mode. In this
-        case, at least two (2) spaces must follow the BREAK to separate it
-        from the next command on the line.
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        expression is the argument postconditional  that  controls  whether
-        GT.M XECUTEs  the  argument.  If  present  and  true,  the  process
-        executes the code before  entering  Direct  Mode.  If  present  and
-        false, the process does not execute the code before entering Direct
-        Mode.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more BREAK arguments form a legal argument for a BREAK.
-
-   Issuing a BREAK command inside a transaction destroys the Isolation of
-   that transaction. Beacuse of the way that GT.M  implements  transaction
-   processing, a BREAK within  a  transaction  may  suffer  an  indefinite
-   number of restarts ("live lock").
-
-   Generally, programs in production  must  not  include  BREAK  commands.
-   Therefore, GT.M provides the ZBREAK and ZSTEP  commands,  which  insert
-   temporary breakpoints in the image rather than the source code. BREAKs
-   inserted with ZBREAK only exist until the  image  terminates  or  until
-   explicitly removed  by  another  ZBREAK  command.  ZSTEP  also  inserts
-   temporary BREAKs in the image that only exist for the execution of the
-   ZSTEP command. In the GT.M debugging environment,  ZBREAKs  and  ZSTEPs
-   that insert BREAKs provide a more flexible and less  error-prone  means
-   of setting breakpoints than coding BREAKs directly into a routine. For
-   more information on ZBREAK  and  ZSTEP,  refer  to  the  sections  that
-   describe those commands.
-
-   To resume execution of  the  interrupted  program,  use  the  ZCONTINUE
-   command.
-
-   GT.M displays messages identifying the source of a BREAK as:
-
-   o    The body of a program
-
-   o    A
-   o    ZBREAK action
-
-   o    A device EXCEPTION
-
-   o    A ZSTEP action
-
-   The  VIEW  "BREAKMSG"  mask  selectively  enables  or  disables  these
-   messages. See the section on "VIEW" for an explanation of the mask. By
-   default, a process executing a GT.M image displays all BREAK messages.
-
-   LINKing a GT.M image with a modified GTM$DEFAULTS can alter the default
-   for that image.
-
-   When a process encounters a BREAK,  it  displays  a  prompt  indicating
-   readiness to process commands in Direct Mode. By default,  Direct  Mode
-   displays the  GTM>  prompt.  SETting  the  $ZPROMPT  intrinsic  special
-   variable alters the prompt.
-
-2 Ex_of_Break
-   Examples of BREAK
-
-   Example:
-
-
-   LOOP0 F S act=$O(^act(act)) Q:act="" B:debug D LOOP1
-
-   This FOR loop contains a BREAK with a command postconditional.
-
-   Example:
-
-
-   B:$D(x) "W !,""OK""":x,"W !,""Wrong again""":'x
-
-   This uses a BREAK with both command and argument postconditionals. The
-   actions display debugging messages.
-
-1 CLOSE
-   Close
-
-   The CLOSE command breaks the connection between a process and a device.
-
-   The format of the CLOSE command is:
-
-
-   C[LOSE][:tvexpr] expr[:(keyword[=expr][:...])][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies the device to CLOSE.
-
-   o    The optional keywords specify device parameters that control device
-        behavior; some device parameters take  arguments  delimited  by  an
-        equal sign (=). If there  is  only  one  keyword,  the  surrounding
-        parentheses are optional.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more CLOSE arguments form a legal argument for a CLOSE.
-
-1 DO
-   Do
-
-   The DO command  makes  an  entry  in  the  GT.M  invocation  stack  and
-   transfers execution to the location specified by the entryref.
-
-   The format of the DO command is:
-
-
-   D[O][:tvexpr] [entryref[(expr|.lvn[,...])][:tvexpr][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional entryref specifies a location (with  some  combination
-        of label, offset, and routinename)  at  which  execution  continues
-        immediately following the DO.
-
-   o    A DO command without an argument (that is, a DO followed by two (2)
-        spaces) transfers execution to the next line in the routine if that
-        line contains a number of periods (.) after the optional label and
-        before the required linestart. These periods indicate  the  current
-        level of "immediate" nesting caused by  argumentless  DOs.  If  the
-        line following the DO contains too many periods,  GT.M  reports  an
-        error; if the line following the DO contains too few periods, GT.M
-        ignores the DO command.
-
-   o    A DO command without an argument stacks the current value of $TEST,
-        in contrast to a DO with an argument, which does  not  protect  the
-        current value of $TEST.
-
-   o    The optional parameter list enclosed in parentheses  (  )  contains
-        parameters to pass to the routine entry point.
-
-   o    If the DO specifies a parameter list, the  entryref  location  must
-        start with a label and an argument list (that  is,  GT.M  prohibits
-        entryrefs with offsets during parameter passing).
-
-   o    If an element in the  parameter  list  starts  with  a  period,  it
-        specifies an unsubscripted local variable name and  the  DO  passes
-        that variable by reference. Otherwise,  the  element  specifies  an
-        expression that the DO evaluates and passes as a value.
-
-   o    The optional truth-valued expression following the parameter list,
-        or the  entryref  if  the  argument  contains  no  parameter  list,
-        specifies the argument postconditional and  controls  whether  GT.M
-        performs a DO with that argument.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more DO arguments form a legal argument for a DO.
-
-   An explicit or implicit QUIT within the scope of the DO, but not within
-   the scope of any other DO, FOR, XECUTE, or extrinsic, returns execution
-   to the instruction following the calling point. This point may  be  the
-   next DO argument or another command. At the end of a  routine,  or  the
-   end of a nesting level created by an argumentless DO, GT.M performs an
-   implicit QUIT. Any line that reduces the current level  of  nesting  by
-   changing the number of leading periods (.)  causes  an  implicit  QUIT,
-   even if that line only contains a comment.
-
-   Terminating the image and execution of ZGOTO commands are the only ways
-   to avoid eventually returning execution to  the  calling  point.  A  DO
-   command may optionally pass parameters to the invoked subroutine.
-
-2 Ex_of_Do
-   Examples of DO
-
-   Example:
-
-
-   GTM>DO ^%RD
-
-   This example invokes the routine directory utility program  (%RD)  from
-   Direct Mode. The caret symbol (^) specifies that the DO command invokes
-   %RD as an external routine.
-
-   Example:
-
-
-   GTM>DO A(3)
-
-   This example invokes the subroutine at label A and passes the  value  3
-   as a parameter. Because the DO argument does not have  a  caret  symbol
-   (^), it identifies A as a label in the current routine.
-
-   Example:
-
-
-   Label A;
-
-   SET di="" U outfile
-
-   FOR SET di=$O(^div(di)) Q:di="" D PREP D D POST
-
-   .SET de="",(nr,gr)=0
-
-   .WRITE "Division ",di,! F S de=$O(^de(di,de)) Q:de="" D
-
-   ..WRITE "Department ",de," Gross Rev: ",^grev(di,de),!
-
-   ..WRITE "Department ",de," Net Rev: ",^nrev(di,de),!
-
-   ..SET gr=gr+^grev(di,de),nr=nr+^nrev(di,de)
-
-   .W "Division Gross Rev: ",gr,!,"Division Net Rev: ",nr,!
-
-   DO PRINT^OUTPUT(outfile)
-
-   QUIT
-
-   This routine first uses a DO with a label argument (PREP)  to  do  some
-   pre-processing. Then, it uses an argumentless DO to loop  through  each
-   division of a company to format a report. Within the first argumentless
-   DO, a second argumentless DO (line 4) loops through  and  formats  each
-   department within a division. After the processing of all departments,
-   control returns to the first argumentless DO, which prints a summary of
-   the division. Following processing of all divisions, a DO with a label
-   argument (POST) does some post-processing. Finally, at the next-to-last
-   line, the routine uses a DO  that  invokes  a  subroutine  at  a  label
-   (PRINT) in an external routine  (^OUTPUT),  passing  the  name  of  the
-   output file (outfile) as a parameter.
-
-1 ELSE
-   Else
-
-   GT.M executes the remainder of the line after  the  ELSE  if  $TEST  is
-   FALSE (0). GT.M does not execute the rest of the line if $TEST is TRUE
-   (1).
-
-   The format of the ELSE command is:
-
-   E[LSE]
-
-   o    Because ELSE is a  conditional  command,  it  does  not  support  a
-        command postconditional.
-
-   o    The scope of the ELSE is the remainder of the line.
-
-   o    Because the ELSE has no argument, at  least  two  (2)  spaces  must
-        follow the command to separate it from  the  next  command  on  the
-        line.
-
-   Because the scopes of both the IF and the ELSE commands extend  to  the
-   rest of the GT.M line,  placing  an  ELSE  on  the  same  line  as  the
-   corresponding IF cannot achieve the desired result.  If  an  ELSE  were
-   placed on the same line as its corresponding IF,  then  the  expression
-   tested by the IF would be either TRUE or FALSE.  If  the  condition  is
-   TRUE, the code following  the  ELSE  would  not  be  executed.  If  the
-   condition is FALSE, the ELSE and everything following it would  not  be
-   executed.
-
-   ELSE is analogous to IF '$TEST, except the  latter  statement  switches
-   $TEST to its complement and ELSE never alters $TEST.
-
-   The scope of an ELSE can be extended with DO or XECUTE commands.
-
-2 Ex_of_Else
-   Examples of Else
-
-   Example:
-
-
-   IF x=+x SET x=x+y
-
-   ELSE WRITE !,x
-
-   The IF command evaluates  the  conditional  expression  x=+x  and  sets
-   $TEST. If $TEST=1 (TRUE), GT.M executes the commands following the IF.
-   The ELSE on the following line specifies an alternative action to take
-   if the expression is false.
-
-   Example:
-
-
-   IF x=+x DO ^GOFISH
-
-   ELSE SET x=x_"^"_y
-
-   The DO with an argument after the IF raises the  possibility  that  the
-   routine ^GOFISH changes the value of $TEST, thus making it possible to
-   execute both the commands following the IF and the  commands  following
-   the ELSE.
-
-   Example:
-
-
-   OPEN dev::0 ELSE WRITE !,"Device unavailable" QUIT
-
-   This ELSE depends on the result of the timeout on the OPEN command. If
-   the OPEN succeeds, it sets $TEST to one (1) and GT.M skips the rest of
-   the line after the ELSE. If the OPEN fails, it sets $TEST to zero (0),
-   and GT.M executes the remainder of the line after the ELSE.
-
-1 FOR
-   For
-
-   The FOR command provides a looping mechanism in  GT.M.  A  FOR  command
-   does not generate an additional level on the GT.M invocation stack.
-
-   The format of the FOR command is:
-
-
-   F[OR][lvn=expr[:numexpr1[:numexpr2]][,...]]]
-
-   o    Because FOR is a conditional command, it does not support a command
-        postconditional.
-
-   o    The scope of the FOR is the remainder of the line.
-
-   o    When the FOR has no argument, at least two (2) spaces  must  follow
-        the command to separate it from the next command on the line. This
-        specifies a loop that must be terminated by a QUIT, HALT, GOTO, or
-        ZGOTO.
-
-   o    The optional local variable name specifies a loop control variable
-        delimited by an equal sign (=). A FOR command has only one control
-        variable, even when it has multiple arguments.
-
-   o    When initiating the FOR, GT.M assigns the loop control variable the
-        value of the expression. When only an initial value  appears,  GT.M
-        executes the remainder of the line once for that  argument  without
-        forcing the control variable to be numeric.
-
-   o    If  the  argument  includes  an  increment  and,  optionally,  a
-        terminator, GT.M treats the initial expression as a number.
-
-   o    The optional numeric expression after the first colon (:) delimiter
-        specifies the increment for each iteration. The  FOR  command  does
-        not increment the control variable on the first iteration.
-
-   o    The  optional  numeric  expression  after  the  second  colon  (:)
-        delimiter specifies the limiting value for  the  control  variable.
-        This expression is evaluated only  when  the  control  variable  is
-        initialized to the corresponding initial value, then used  for  all
-        subsequent iterations.
-
-   o    GT.M does not execute the commands on the same line  following  the
-        FOR if:
-
-   The increment is non-negative and the  initial  value  of  the  control
-   variable is greater than the limiting value.
-   The increment is negative and the initial value of the control variable
-   is less than the limiting value.
-   o    After the first iteration, GT.M does not alter the control variable
-        and ceases execution under the control of the FOR if:
-
-   The increment is non-negative, and altering the control variable by the
-   increment would cause the control  variable  to  be  greater  than  the
-   limiting value.
-   The increment is negative, and altering the  control  variable  by  the
-   increment would cause the control variable to be less than the limiting
-   value.
-   o    When the FOR has multiple arguments,  each  one  affects  the  loop
-        control variable in sequence. For an argument to gain  control,  no
-        prior argument to the FOR can have an increment without a limit.
-
-   Increments and limits may be  positive,  negative,  an  integer,  or  a
-   fraction. GT.M never increments a control variable  "beyond"  a  limit.
-   Other commands may alter a control variable within the  extended  scope
-   of a FOR that it controls. When the argument  includes  a  limit,  such
-   modification can cause the FOR argument to yield control at  the  start
-   of the next iteration.
-
-   The scope of a FOR can be extended with DO or XECUTE commands.
-
-   GT.M terminates the execution of a FOR when  it  executes  an  explicit
-   QUIT or a GOTO (or ZGOTO in GT.M) that appears on the  line  after  the
-   FOR. FOR commands with arguments that have  increments  without  limits
-   and argumentless FORs can be infinite loops. Such FORs  must  terminate
-   with a QUIT or a GOTO within the immediate scope of the FOR. Also, such
-   FORs can, but seldom, terminate by a HALT within the scope of  the  FOR
-   as extended by DOs, XECUTEs, and extrinsics. FORs  terminated  by  such
-   commands act as "while" or "until" control mechanisms.
-
-2 Ex_of_For
-   Examples of FOR
-
-   Example:
-
-
-   GTM>KILL i FOR i=1:1:5 WRITE !,i
-
-   1
-   2
-   3
-   4
-   5
-   GTM>WRITE i
-
-   5
-   GTM>
-
-   This FOR loop has a control variable, i, which has the value one (1) on
-   the first iteration, then the value two (2), and so on,  until  in  the
-   last iteration i has the value five (5).  The  FOR  terminates  because
-   incrementing i would cause it to exceed the limit. Notice that i is not
-   incremented beyond the limit.
-
-   Example:
-
-
-   GTM>FOR x="hello",2,"goodbye" WRITE !,x
-
-   hello
-
-   2
-   goodbye
-
-   GTM>
-
-   This FOR loop uses the control variable x and  a  series  of  arguments
-   that have no increments or limits. Notice that the control variable may
-   have a string value.
-
-   Example:
-
-
-   GTM>FOR x="hello":1:-1 WRITE !,x
-
-   GTM>ZWRITE x
-
-   x=0
-
-   GTM>
-
-   Because the argument has an increment, the FOR initializes the control
-   variable x to the numeric evaluation of "hello" (0). Then,  GT.M  never
-   executes the remainder of the line because the increment  is  positive,
-   and the value of the control variable (0) is greater than the limiting
-   value (-1).
-
-   Example:
-
-
-   GTM>FOR y=-1:-3:-6,y:4:y+10,"end" WRITE !,y
-
-   -1
-
-   -4
-
-   -4
-
-   0
-   4
-   end
-
-   GTM>
-
-   This FOR uses two limited loop arguments and one  value  argument.  The
-   first argument initializes y to negative one (-1), then increments y to
-   negative four (-4). Because another increment would cause y to be less
-   than the limit (-6), the first argument  terminates  with  y  equal  to
-   negative four (-4). The second argument initializes  the  loop  control
-   variable to its current value and establishes a limit of six (6=-4+10).
-   After two iterations, incrementing y again would cause it to be greater
-   than the limit (6), so the second argument terminates with y  equal  to
-   four (4). Because the final argument has no increment, the FOR  sets  y
-   to the value of the argument, and GT.M executes the commands following
-   the FOR one more time.
-
-   Example:
-
-
-   GTM>S x="" F S x=$O(ar(x)) Q:x="" W !,x
-
-   This example shows an argumentless FOR used to examine all first level
-   subscripts of the local array ar. When $ORDER indicates that this level
-   contains  no  more  subscripts,  the  QUIT  with  the  postconditional
-   terminates the loop.
-
-1 GOTO
-   Goto
-
-   The GOTO command transfers execution to a  location  specified  by  its
-   argument.
-
-   The format of the GOTO command is:
-
-
-   G[OTO][:tvexpr] entryref
-
-   [:tvexpr][,...]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required entryref specifies the target location for the control
-        transfer.
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        entryref  specifies  the  argument  postconditional,  and  controls
-        whether GT.M performs a GOTO with that argument.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more GOTO arguments form a legal argument to a GOTO.
-
-   A GOTO command within a line following a FOR  command  terminates  that
-   FOR command.
-
-2 Ex_of_Goto
-   Examples of GOTO
-
-   Example:
-
-
-   GTM>GOTO TIME+4
-
-   This GOTO command transfers control from Direct Mode to the  line  that
-   is four (4) lines after the line labeled TIME (in the currently active
-   routine). Using an offset is typically a debugging technique and rarely
-   used in production code.
-
-   Example:
-
-
-   GOTO A:x<0,^A:x=0,A^B
-
-   This GOTO command transfers control to label A in the current routine,
-   if x is less than zero (0), to routine ^A if x is equal to zero (0), or
-   to label A in routine ^B. Once any of the transfers occurs, the rest of
-   the arguments have no effect.
-
-1 HALT
-   Halt
-
-   The HALT command stops GT.M program execution and causes GT.M to return
-   control to the VMS environment that invoked the GT.M image.
-
-   The format of the HALT command is:
-
-
-   H[ALT][:tvexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional  that  controls  whether  GT.M
-        executes the command.
-
-   o    Because the HALT command has no argument, at least two  (2)  spaces
-        must follow the command to separate it from the next command on the
-        line. Note that additional commands do not serve any purpose unless
-        the HALT has a postconditional.
-
-   A HALT releases all shared resources  held  by  the  process,  such  as
-   devices OPENed in GT.M, databases, and GT.M  LOCKs.  If  the  value  of
-   $TLEVEL is greater than zero (0), a ROLLBACK is performed.
-
-   Because  HALT  and  HANG  share  the  same  abbreviation  (H),  GT.M
-   differentiates them based on whether an argument follows the command.
-
-   Example:
-
-
-   $ gtm
-
-   %GTM-I-BREAK, Break instruction encountered
-
-   At M source location +1^GTM$DMOD
-
-   GTM>HALT
-
-   $
-
-   Because we invoke this GT.M image interactively,  the  HALT  in  Direct
-   Mode leaves the process at the DCL prompt.
-
-1 HANG
-   Hang
-
-   The HANG command suspends GT.M program execution for a period  of  time
-   specified by the command argument.
-
-   The format of the HANG command is:
-
-
-   H[ANG][:tvexpr] numexpr[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The numeric expression specifies the  time  in  seconds  to  elapse
-        before resuming execution; actual elapsed time  may  vary  slightly
-        from the specified time. If the  numeric  expression  is  negative,
-        HANG  has  no  effect.  Portability  requirements  for  GT.M  only
-        guarantee accuracy to the nearest second.  However,  more  accuracy
-        can be found on VMS systems.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more HANG arguments form a legal argument to a HANG.
-
-   A process that repeatedly tests  for  some  event,  such  as  a  device
-   becoming available or another process modifying a global variable, may
-   use a HANG to limit its consumption of computing resources.
-
-   Because  HALT  and  HANG  share  the  same  abbreviation  (H),  GT.M
-   differentiates them based on whether an argument follows the command.
-
-2 Ex_of_Hang
-   Examples of HANG
-
-   Example:
-
-
-   FOR QUIT:$D(^CTRL(1)) HANG 30
-
-   This FOR loop repeatedly tests  for  the  existence  of  ^CTRL(1),  and
-   terminates when that global  variable  exists.  Otherwise  the  routine
-   HANGs for 30 seconds and tests again.
-
-   Example:
-
-
-   SET t=1 F Q:$D(^CTRL(1)) H t I t<30 S t=t+1
-
-   This is similar to  the  previous  example,  except  that  it  uses  an
-   adaptive time that lengthens from 1 second to a limit of 30 seconds if
-   the routine stays in the loop.
-
-1 IF
-   IF
-
-   The IF command provides conditional execution of the remaining commands
-   on the line. When IF has an argument, it updates $TEST with  the  truth
-   value of its evaluated argument. GT.M executes the remainder of a line
-   after an IF statement when $TEST is 1 (TRUE). When $TEST is 0 (FALSE),
-   GT.M does not execute the rest of the line.
-
-   The format of the IF command is:
-
-
-   I[F] [tvexpr[,...]]
-
-   o    Because IF is a conditional command, it does not support a command
-        postconditional.
-
-   o    The scope of the IF is the remainder of the line.
-
-   o    The action of IF is controlled by the value of the  expression  and
-        by $TEST, if there is no expression.
-
-   o    IF with no argument acts on the existing value of $TEST  (which  it
-        does not change); in this case, at least two (2) spaces must follow
-        the IF to separate it from the next command on the line.
-
-   o    An indirection operator, and an expression  atom  evaluating  to  a
-        list of one or more IF arguments form a legal argument to IF.
-
-   Example:
-
-   IF A,B ...
-
-   is equivalent to
-
-   IF A IF B
-
-   An IF with more than one argument behaves as if  those  arguments  were
-   logically "ANDed." However, execution  of  the  line  ceases  with  the
-   evaluation of the first false argument.  For  IF  argument  expressions
-   containing the "AND" operator (&),  execution  still  ceases  with  the
-   evaluation of the first false argument. Any  global  references  within
-   the expression act in sequence to maintain the naked reference.
-
-   Postconditionals perform a function similar to IF; however, their scope
-   is limited to a single command or argument,  and  they  do  not  modify
-   $TEST. For more information on postconditionals.
-
-2 Ex_of_IF
-   Examples of IF
-
-   Example:
-
-
-   IF x=+x!(x="") DO BAL
-
-   In this example, the DO executes if x  contains  a  number  or  a  null
-   string.
-
-   Example:
-
-
-   WRITE !,?50,BAL IF 'BAL WRITE "****"
-
-   IF S EMPTY(acct)=""
-
-   The IF in the first line changes the value of  $TEST,  determining  the
-   execution of the code following the argumentless IF in the second line.
-   Such argumentless IFs may serve as a form of line continuation.
-
-   Example:
-
-
-   GTM>SET X=1,Y=1,Z=2 KILL UNDEF
-
-   GTM>IF X=1,Y=1,Z=3,UNDEF=0 W "HI"
-
-   GTM>
-
-   The IF command causes  GT.M  to  cease  executing  the  line  after  it
-   determines Z is not equal to three (3). Therefore, GT.M never evaluates
-   the reference to the undefined variable and never generates an error.
-
-   Example:
-
-
-   GTM>SET X=1 KILL UNDEF
-
-   GTM>IF X=1!(UNDEF=3) WRITE "HI"
-
-   HI
-
-   GTM>
-
-   Because GT.M  recognizes  that  the  X=1  fulfills  the  IF,  it  skips
-   evaluation of the UNDEF variable and executes this IF  command  without
-   generating an error. Because GT.M does not require  such  optimizations
-   and in fact discourages them by requiring that  all  global  references
-   maintain the naked indicator, other  implementations  may  generate  an
-   error.
-
-1 JOB
-   Job
-
-   The JOB command creates another process, activates the current image or
-   another specified GT.M executable image, and executes a named routine.
-
-   $ZJOB is set to the pid of the process created by the JOB command. For
-   details  refer  to  the  "$ZJOB"  section  in  the  "Intrinsic  Special
-   Variable" chapter of GT.M Programmer's Guide.
-
-   The format of the JOB command is:
-
-
-   J[OB][:tvexpr] entryref
-
-   [(expr[,...])]
-   [:[(keyword[=value][:...])][:numexpr]][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required entryref specifies a location at which the new process
-        starts.
-
-   o    The optional parameter list enclosed  in  parentheses  ()  contains
-        parameters to pass to the routine entry point.
-
-   o    If the JOB specifies a parameter list, the entryref  location  must
-        start with a label and a formallist. GT.M prohibits entryrefs with
-        offsets during parameter passing.
-
-   o    The optional elements in the  parameter  list  specify  expressions
-        that the JOB evaluates and passes as values.
-
-   o    The  keywords  specify  optional  processparameters  that  control
-        aspects of the environment for the new process.
-
-   o    If the JOB command has only one processparameter,  the  surrounding
-        parentheses are optional.
-
-   o    Some keywords take numeric or string literals delimited by an equal
-        sign (=) as arguments. Because the values  are  constants,  strings
-        must be enclosed in quotation marks (" "), and  variable  arguments
-        require that the entire  argument  be  constructed  and  referenced
-        using indirection.
-
-   o    The optional numeric expression specifies a time in  seconds  after
-        which the command should timeout if unsuccessful; 0  results  in  a
-        single attempt.
-
-   o    When a JOB command contains  no  processparameters,  double  colons
-        (::) separate the time-out numeric expression from the entryref.
-
-   o    An indirection operator and an expression  atom,  evaluating  to  a
-        list of one or more JOB command arguments, form  a  legal  argument
-        for a JOB command.
-
-   o    The maximum command-line length from a JOB command is 8192 bytes.
-
-   The resultant process can be  detached  or  spawned.  VMS  deletes  the
-   resultant process when the image completes execution.  If  the  job  is
-   spawned, VMS deletes the image when the parent  process  terminates.  A
-   detached job can continue after the parent process terminates.
-
-   By default, the new process uses the same  base  image  as  the  parent
-   process. The IMAGE processparameter specifies an alternative image. If
-   the routine specified by the entryref is not in the linked  image,  the
-   created process attempts to auto-ZLINK the missing routine.
-
-   If a JOB command specifies a timeout, and GT.M  creates  the  resultant
-   process before the timeout elapses, JOB sets $TEST to true (1). If GT.M
-   cannot create the process within the specified timeout, JOB sets $TEST
-   to false (0). If  a  JOB  command  does  not  specify  a  timeout,  the
-   execution of the command does not affect $TEST.
-
-   If GT.M cannot create the process because of something that is unlikely
-   to change during the timeout interval, such as insufficient privileges
-   or failure to find the specified image, the  JOB  command  generates  a
-   run-time error. If the command does  not  specify  a  timeout  and  the
-   environment does not provide  adequate  resources,  the  process  waits
-   until resources become available to create the resultant process.
-
-   The resultant process executes asynchronously with the current process.
-   Once GT.M starts the resultant process, the current process continues,
-   regardless of whether the JOB is detached or spawned.
-
-2 The_JOB_Env
-   The JOB Environment
-
-   When the JOB is spawned,  VMS  creates  the  environment  for  the  new
-   process by copying the environment  of  the  process  issuing  the  JOB
-   command and making a few minor modifications.
-
-   When the JOB is DETACHED, as it is by default, GT.M creates a  new  VMS
-   job by running LOGINOUT.EXE. LOGINOUT.EXE performs the same  tasks  for
-   the new job as it does for an interactive login session, except that it
-   assigns the process-permanent  logical  names  for  I/O  based  on  the
-   processparameters. If the JOB command does not explicitly specify these
-   processparameters, GT.M provides default values.
-
-3 JOB_Impl_Logi_Name
-   JOB Implications for Logical Names
-
-   If the resultant process is DETACHED, the  DETACHED  process  does  not
-   have access to the process or job logical name tables of the initiating
-   process. In this case, the resultant job can acquire logical  names  as
-   follows:
-
-   o    By receiving any assignments made  in  SYS$LOGIN:LOGIN.COM  of  the
-        initiating process.
-
-   o    By receiving any assignments made in  the  file  specified  by  the
-        optional STARTUP parameter.
-
-   o    By processparameters specifying values for I/O and GTM$GBLDIR.
-
-   When multiple sources  specify  GTM$GBLDIR,  the  last  source  in  the
-   previous list overrides the prior sources. When a JOB is  DETACHED,  as
-   it is  by  default,  take  care  to  provide  the  proper  environment,
-   particularly logical names for the JOBbed process.
-
-3 JOB_Impl_for_Dir
-   JOB Implications for Directories
-
-   By default, GT.M uses the  current  default  directory  of  the  parent
-   process for the default directory of the initiated process.
-
-   DCL commands in the login  files  of  the  resultant  process  and  the
-   DEFAULT processparameter can modify the default. If the files specified
-   by processparameters, except LOGFILE, do not exist, and GT.M  does  not
-   have permission to create them, the JOBed process terminates. When the
-   corresponding files are in the current default  directory,  the  IMAGE,
-   OUTPUT, INPUT, and  ERROR  processparameters  do  not  require  a  full
-   file-specification.
-
-   If the file-specification for LOGFILE does  not  contain  a  directory,
-   GT.M defaults to the login directory of the parent process.
-
-   A detached JOB executes the LOGIN.COM in the  login  directory  of  the
-   initiating process.
-
-3 JOB_Impl_VMS_Priv
-   JOB Implications for VMS Privileges
-
-   Certain options associated with the JOB command require privileges. The
-   sections describing each JOB  command  processparameter  give  the  VMS
-   privileges required to  use  the  parameter.  If  you  need  additional
-   privileges, contact your system manager.
-
-2 JOB_ProcParam
-   JOB Processparameters
-
-   The following sections describe the processparameters available for the
-   JOB command in GT.M.
-
-3 ACCOUNTING
-   [NO]ACC[OUNTING]
-
-   Enables or disables VMS accounting records for the  resultant  job.  To
-   disable accounting, the process issuing the  JOB  must  have  the  ACNT
-   privilege.
-
-   By default, JOB provides ACCOUNTING.
-
-3 DEFAULT
-   DEF[AULT]=strlit
-
-   The string literal specifies the default directory.
-
-   The maximum directory length is 255 characters.
-
-   If the JOB command does not specify a DEFAULT directory, GT.M uses the
-   current default directory of the parent process.
-
-3 DETACHED
-   [NO]DET[ACHED]
-
-   DETACHED specifies creation of a detached process.
-
-   NODETACHED specifies creation of a spawned job within the same process.
-   A spawned job shares process limits with other jobs in the process and
-   the logical names of the parent process.
-
-   VMS security mechanisms prevent  a  captive  account  from  creating  a
-   DETACHED job.
-
-   The MAXDETACH quota in  the  user  authorization  file  determines  the
-   maximum number of detached processes a user may create.
-
-   By default, JOBs are DETACHED.
-
-3 ERROR
-   ERR[OR]=strlit
-
-   The string literal specifies a value for SYS$ERROR.
-
-   The maximum string length is 255 characters.
-
-   By default,  JOB  constructs  the  error  file-specification  from  the
-   ROUTINENAME using a file extension of .MJE and the current directory of
-   the process created by the JOB command.
-
-3 GBLDIR
-   GBL[DIR]=strlit
-
-   The string literal specifies a value for the logical name GTM$GBLDIR.
-
-   The maximum length of the value permitted is 255 characters.
-
-   By default, the job uses the same specification for GTM$GBLDIR as that
-   defined for the process using the JOB command.
-
-3 IMAGE
-   IM[AGE]=strlit
-
-   The string literal specifies the file-specification of  the  image  for
-   the resultant job to activate.
-
-   GT.M does not supply a default file type. Image files generally have a
-   .EXE extension. A JOB command requires  a  GT.M  image  that  has  been
-   linked under a compatible version of GT.M.
-
-   The maximum string length is 255 characters.
-
-   By default, JOB provides the executing current image.
-
-3 INPUT
-   IN[PUT]=strlit
-
-   The string literal specifies a value for the logical name SYS$INPUT.
-
-   GT.M does not supply a default file type. Input files generally have a
-   .COM extension.
-
-   The maximum string length is 255 characters.
-
-   By default, the job takes its input from the null device.
-
-3 LOGFILE
-   LOG[FILE]=strlit
-
-   The string literal specifies the log file for all  I/O  operations  not
-   handled by INPUT, OUTPUT and ERROR.
-
-   GT.M does not supply a default file type. Log files  generally  have  a
-   .LOG extension. The log file is analogous to the log file generated by
-   a batch job.
-
-   The maximum string length is 255 characters.
-
-   By default, the job sends the log to the null device.
-
-3 OUTPUT
-   OUT[PUT]=strlit
-
-   The string literal specifies a value for the logical name SYS$OUTPUT.
-
-   The maximum string length is 255 characters.
-
-   By default, JOB  constructs  the  output  file-specification  from  the
-   ROUTINENAME using a file extension of  .MJO  and  the  current  default
-   directory of the process created by the JOB command.
-
-3 PRIORITY
-   PRI[ORITY]=intlit
-
-   The integer literal specifies the base priority at which the resultant
-   job executes.
-
-   For the JOB command to raise the  PRIORITY  of  the  resultant  process
-   above the PRIORITY of the parent process, the parent process must have
-   the ALTPRI privilege.
-
-   The lowest priority is one (1). The highest priority is 31.
-
-   By default, the job has the current priority of the parent process.
-
-3 PROCESS_NAME
-   PRO[CESS_NAME]=strlit
-
-   The string literal specifies the VMS process  name  for  the  resultant
-   job. If PROCESS attempts to assign a name that is currently in  use  by
-   another process of the same GROUP, GT.M suspends the JOB command until
-   the other process stops, or a timeout occurs for the JOB command.
-
-   The maximum string length is 15 alphanumeric characters.
-
-   By default, JOB constructs a name in the form <USER>_<PID>J<cnt>, where
-   <USER> is the username for the parent process  truncated  to  three  or
-   four characters, <PID> is the process identification  of  that  process
-   and <cnt> is a decimal number from one (1) to 99. If the  process  name
-   is longer than 15 characters, GT.M truncates the  rightmost  characters
-   of the user name.  For  example,  if  a  process  with  the  user  name
-   MacDonald and a PID  of  hexadecimal  21802227  issues  its  first  JOB
-   command, GT.M assigns the name MACD_21802227J1 to the new process.
-
-3 SCHEDULE
-   SCH[EDULE]=strlit
-
-   The string literal specifies  the  absolute  or  delta  time  when  the
-   resultant process should begin running. The  process  hibernates  until
-   that time. The date and time are separated by a space (not a colon).
-
-   By default, GT.M starts the job immediately.
-
-3 STARTUP
-   STA[RTUP]=strlit
-
-   The string literal specifies a command  file  that  the  resultant  job
-   executes before executing the GT.M routine. The command line may invoke
-   a DCL script or other images.
-
-   If the file-specification for the  startup  file  does  not  include  a
-   directory name, GT.M searches for  the  file  in  the  current  default
-   directory. GT.M does not supply a default file type. If the JOB command
-   does not specify a startup file, VMS executes only the "normal" command
-   procedures.
-
-3 SWAPPING
-   [NO]SWA[PPING]
-
-   Enables or disables swapping  of  the  resultant  job  in  and  out  of
-   physical memory when the job is in a wait state.
-
-   For the JOB command to disable swapping of the resultant  process,  the
-   process issuing the JOB must have the PSWAPM privilege.
-
-   By default, JOB enables SWAPPING.
-
-2 Ex_of_JOB
-   Examples of JOB
-
-   Example:
-
-
-   GTM>JOB ^TEST
-
-   This creates a detached job that starts doing the routine ^TEST in the
-   image TEST1.EXE in the current default directory. If ^TEST  is  not  in
-   the image TEST1 (or in the  default  image,  if  there  were  no  IMAGE
-   processparameter), GT.M attempts to auto-ZLINK  the  routine  based  on
-   $ZROUTINES. GT.M initializes  $ZROUTINES  to  the  translation  of  the
-   logical name GTM$ROUTINES, typically  as  defined  in  the  login  file
-   (SYS$MANAGER:SYLOGIN.COM or SYS$LOGIN:LOGIN.COM) of the account.
-
-   Example:
-
-
-   JOB PRINTLABELS(TYPE,PRNTR,WAITIM):(IMAGE="BACKGRND")
-
-   This passes three values (TYPE, PRNTR, and  WAITIM)  to  the  new  job,
-   which starts at the label PRINTLABELS of the current routine.
-
-   Example:
-
-
-   SET j=prog_":(STARTUP="""_setup_""":PROCESS_NAME="""
-
-_pname_""")"
-   JOB @(j_":30") ELSE WRITE !,"Print Daemon Already Started"
-
-   This JOB command uses indirection to handle  variable  job  parameters.
-   The new DETACHED process uses the same image as the process issuing the
-   command.  It  executes  the  command  procedure  specified  by  the
-   file-specification in the variable setup  and  uses  the  process  name
-   specified in the variable pname. The timeout of 30 seconds  deals  with
-   the case where a job with the same name  already  exists  for  the  VMS
-   group of the user issuing the JOB.
-
-1 KILL
-   Kill
-
-   The KILL command deletes local or global variables and their descendant
-   nodes.
-
-   The format of the KILL command is:
-
-
-   K[ILL][:tvexpr] [glvn|[(]lvn[,...][)][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional global or local variable name specifies  the  variable
-        to delete; KILL deletes not only  the  variable  specified  in  the
-        argument, but also all variables descended from that variable, that
-        is, those starting with the identical key-prefix.
-
-   o    KILLing a variable that does not currently exist has no effect.
-
-   o    The KILL command without an argument deletes all currently existing
-        local variables; in this case, at least two (2) spaces must follow
-        the KILL to separate it from the next command on the line.
-
-   o    When a KILL argument is enclosed in parentheses,  that  "exclusive"
-        KILL deletes  all  local  variables  except  those  listed  in  the
-        argument.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more KILL arguments
-   o    form a legal argument for a KILL.
-
-   KILL does not affect copies of local variables that have been "stacked"
-   by NEW or parameter passing.
-
-   Because a KILL can have a major impact, use KILL with caution.
-
-2 Ex_of_Kill
-   Examples of KILL
-
-   Example:
-
-
-   GTM>KILL SET a=0,a(1)=1,a(1,1)="under" KILL a(1) ZWR
-
-   a=0
-
-   GTM>
-
-   This uses an argumentless KILL to get a "fresh start" by  deleting  all
-   existing local variables. After SETting a, a(1), and a(1,1),  the  KILL
-   deletes a(1) and its descendants. The ZWRITE shows only a remaining.
-
-   Example:
-
-
-   GTM>KILL (a,b),^AB(a,b)
-
-   The first argument (an exclusive KILL)  specifies  to  KILL  all  local
-   variables except a and b. The second argument deletes ^AB(a,b) and any
-   descendants of that global variable node.
-
-1 LOCK
-   Lock
-
-   The LOCK command  is  used  to  reserve  and  release  resource  names,
-   providing a semaphore capability for GT.M  processes.  This  capability
-   can be used for interprocess synchronization and signaling.
-
-   Assigning a LOCK does not specify any explicit control  over  variables
-   and does not directly effect either read or write access to global (or
-   local) data. However, an application that adheres  to  clearly  defined
-   conventions of LOCKing before any access can indirectly achieve such an
-   effect.
-
-   The format of the LOCK command is:
-
-
-   L[OCK][:tvexpr] [[-|+]nref|(nref[,...])[:numexpr]
-
-   [,...]]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The nref argument specifies a resource name in the  format  of  the
-        GT.M name, with  or  without  subscripts  and  with  or  without  a
-        preceding caret (^). An nref can  optionally  have  an  environment
-        specification, including one without a preceding caret (^).
-
-   o    Outside of transactions, only one process in an environment can own
-        a particular LOCK at any given time.
-
-   o    Because the data storage in GT.M uses hierarchical  sparse  arrays,
-        and LOCK frequently serves to protect that data from inappropriate
-        "simultaneous" access by multiple processes, LOCK  treats  resource
-        names in a hierarchical fashion; a LOCK protects not only the named
-        resource, but also its ancestors and descendants.
-
-   o    When one or  more  nrefs  are  enclosed  in  parentheses  (),  LOCK
-        reserves all the  enclosed  names  "simultaneously,"  that  is,  it
-        reserves none of them until all become available.
-
-   o    A LOCK with no  argument  or  an  argument  with  no  leading  sign
-        releases all names currently reserved with previous  LOCK  commands
-        by the process; when a LOCK has  no  argument,  at  least  two  (2)
-        spaces must follow the LOCK to separate it from the next command on
-        the line.
-
-   o    A LOCK argument with a leading plus sign  (+)  acquires  the  named
-        resources without releasing currently held resources; if the named
-        resource is already LOCKed, such a LOCK  "counts  up"  the  process
-        interest in the resource.
-
-   o    A LOCK argument with a leading minus sign  (-)  "counts  down"  the
-        process interest in a named resource; if the count on a particular
-        lock reaches zero (0), GT.M releases the lock without releasing any
-        other currently held locks; a LOCK that releases a  named  resource
-        not currently owned by the process has no effect.
-
-   o    The optional numeric expression specifies a time in  seconds  after
-        which the command should timeout  if  unsuccessful;  0  provides  a
-        single attempt.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more LOCK arguments form a legal argument for a LOCK.
-
-   GT.M records LOCK and ZALLOCATE information  in  the  "lock  database."
-   GT.M distributes  the  lock  database  in  space  associated  with  the
-   database identified by the current Global Directory. However, the lock
-   database does not overlap or coincide with the  body  of  the  database
-   files holding the global data. Only the LOCK, ZALLOCATE and ZDEALLOCATE
-   commands, and the LKE utility program access the lock database.
-
-   GT.M maps reservations of names starting with ^ to  the  database  file
-   used to map global variables of the same name. If the Global Directory
-   maps the name A to file A.DAT, GT.M maps all reservations on ^A to file
-   space associated with A.DAT.
-
-   GT.M maps reservations on names not starting with ^ to  the  region  of
-   the database specified with the GDE command LOCK /REGION=. By default,
-   when GDE creates a Global Directory any reservations of local names are
-   mapped to the region $DEFAULT.
-
-   These two factors  effect  the  following  result  in  the  programming
-   environment:
-
-   o    ^ reservations automatically intersect for all users  of  the  same
-        data in any database  file  independent  of  the  Global  Directory
-        mapping that file.
-
-   o    reservations without a leading ^ intersect in an arbitrary pattern
-        dependent on the Global Directory and  therefore  controlled  by  a
-        design decision made independently of application code design.
-
-   Since GT.M uses  resource  names  as  semaphores  for  signaling  among
-   multiple processes in a database environment, they interlock in a tree
-   structured fashion. When  LOCK  or  ZALLOCATE  reserves  a  subscripted
-   resource name such as ^D(1), other users of the database mapped by the
-   LOCKing (or ZALLOCATEing) process  cannot  reserve  ancestors  of  that
-   name, such as ^D, or  descendants,  such  as  ^D(1,2),  until  LOCK  or
-   ZDEALLOCATE releases that name.
-
-   Execution of the LOCK command does not affect the value or the state of
-   a variable. LOCK tests each argument to determine whether  the  process
-   can claim the name space. If another GT.M process has a  LOCK  on  that
-   name space, GT.M suspends the current process until the  other  process
-   releases the name space. To prevent the potential "infinite" suspension
-   of a routine execution, specify a timeout for the LOCK command.
-
-   LOCK with a leading plus (+) or minus (-)  sign  (incremental  LOCKing)
-   allows the acquisition of locks without releasing currently held locks.
-   This can lead to deadlocks.
-
-   To avoid deadlocks, use LOCK without a leading  +  or  -  sign  on  its
-   arguments  because  such  a  command  releases  all  previously  LOCKed
-   resources; or use a timeout with the LOCK command.
-
-   If a LOCK command specifies a timeout, and GT.M acquires  ownership  of
-   the named resource before the timeout elapses, LOCK
-   sets $TEST to TRUE (1). If GT.M cannot acquire ownership of  the  named
-   resource within the specified timeout, LOCK sets $TEST to FALSE (0). If
-   a LOCK command does not specify a timeout, the execution of the command
-   does not affect $TEST. If a LOCK with  an  argument  having  a  leading
-   minus sign (-) specifies a timeout, the command always  sets  $TEST  to
-   TRUE (1).
-
-   If a process issues  a  LOCK  command  for  a  named  resource  already
-   ZALLOCATEd by that process, the resource is both ZALLOCATEd and LOCKed.
-   LOCK does not release ZALLOCATEd resources. To  release  such  a  named
-   resource, the process must both ZDEALLOCATE and  unLOCK  the  resource.
-   For more information on ZALLOCATE, refer to the "ZALLOCATE".
-
-2 Locks_within_Trans
-   Using Locks within Transactions
-
-   Within transactions LOCKs are used by GT.M to  ensure  the  ability  to
-   serialize. There is no  guarantee,  however,  that  attempts  by  other
-   processes to examine LOCKs held with a  transaction  will  produce  the
-   same results as when LOCKs are  outside  of  a  transaction.  In  other
-   words, LOCKs  within  transactions  should  never  be  used  as  simple
-   semaphores.
-
-   The LOCK command locks a specified resource name that controls  a  tree
-   structured name space. Outside of transactions when one process  in  an
-   environment acquires a LOCK or a ZALLOCATE  on  a  named  resource,  no
-   other GT.M process in that environment can  LOCK  a  resource  with  an
-   "overlapping" name until the first process releases the  LOCK  that  it
-   holds.
-
-2 Ex_of_Lock
-   Examples of LOCK
-
-   Example:
-
-
-   LOCK A,^B, at C
-
-   LOCK (A,B, at C)
-
-   The first LOCK command LOCKs A and unLOCKs A before  LOCKing  ^B,  then
-   unLOCKs ^B before locking the name specified by  the  variable  C.  The
-   second LOCK command acquires all three resources at  once.  GT.M  waits
-   until all the named resources in the  argument  list  become  available
-   before  LOCKing  all  the  resources.  For  example,  if  the  resource
-   specified by the variable C is not available for  LOCKing,  GT.M  waits
-   until that resource becomes available before LOCKing A and ^B.
-
-   Example:
-
-
-   LOCK (A,B)
-
-   LOCK +C
-
-   LOCK -B
-
-   This LOCKs A and B, then incrementally LOCKs C. Finally it releases the
-   LOCK on B, while retaining the LOCKs on A and C.
-
-   Example:
-
-
-   LOCK (A,B,C)
-
-   LOCK +(B,C)
-
-   LOCK -(B)
-
-   This LOCKs A, B and C together. It then increments the lock "counts" of
-   B and C. The last LOCK command removes one "count" of  B,  leaving  one
-   count of A and B and two counts of C.
-
-   Example:
-
-
-   LOCK ^D:5
-
-   This command attempts to LOCK ^D with a timeout  of  five  seconds.  If
-   LOCK acquires the named resource before the timeout elapses, GT.M sets
-   $TEST to 1 (TRUE). If LOCK fails to acquire the named  resource  before
-   the timeout elapses, GT.M sets $TEST to 0 (FALSE).
-
-1 MERGE
-   Merge
-
-   The MERGE command copies  a  variable  and  all  its  descendants  into
-   another variable. MERGE does not delete the destination  variable,  nor
-   any of its descendants.
-
-   The format of MERGE command is:
-
-
-   M[ERGE][:tvexpr] glvn1=glvn2[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command post conditional that controls whether or not
-        GT.M executes the command.
-
-   o    When both glvn1 and glvn2 are local variables, the naked indicator
-        is not changed.
-
-   o    If glvn2 is a global variable and glvn1 is a local  variable,  then
-        the naked indicator references glvn2.
-
-   o    When both are global variables, the state of the naked indicator is
-        unchanged if glvn2 is undefined ($DATA(glvn2)=0).
-
-   o    In all other cases including $DATA(glvn2)=10, the  naked  indicator
-        takes the same value that it would have if the SET command replaced
-        the MERGE command and glvn2 had a value.
-
-   o    If glvn1 is a descendant of glvn2, or if glvn2 is a  descendant  of
-        glvn1; GT.M generates an error.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more MERGE arguments form a legal argument for a MERGE.
-
-   MERGE simplifies the copying  of  a  sub-tree  of  a  local  or  global
-   variable to another local or global variable. A sub-tree is all global
-   or local variables that are descendants of an specified variable. MERGE
-   offers a one-command alternative to the  current  technique  for  doing
-   sub-tree  copy  (that  is,  a  series  of  SET  commands  with  $ORDER
-   references).
-
-        GT.M may permit certain syntax or actions that are described by the
-        standard as in error. For example, a MERGE command  that  specifies
-        an  operation  where  the  source  and  destination  overlap  but
-        $DATA(source)=0 does not produce an error (which is equivalent to a
-        no-operation).
-
-2 Ex_of_Merge
-   Examples of MERGE
-
-   Example:
-
-
-   GTM>SET ^gbl1="one"
-
-   GTM>SET ^gbl1(1,1)="oneone"
-
-   GTM>SET ^gbl1(1,1,3)="oneonethree"
-
-   GTM>SET ^gbl1(1,2,4)="onetwofour"
-
-   GTM>SET ^gbl2(2)="gbl2_2"
-
-   GTM>SET ^gbl2(2,1,3)="gbl2_2_1_3"
-
-   GTM>SET ^gbl2(2,1,4,5)="gbl2_2_1_4_5"
-
-   GTM>MERGE ^gbl1(1)=^gbl2(2)
-
-   GTM>WRITE $REFERENCE
-
-   ^gbl1(1)
-
-   GTM>ZWRITE ^gbl1
-
-   ^gbl1="one"
-
-   ^gbl1(1)="gbl2_2"
-
-   ^gbl1(1,1)="oneone"
-
-   ^gbl1(1,1,3)="gbl2_2_1_3"
-
-   ^gbl1(1,1,4,5)="gbl2_2_1_4_5"
-
-   ^gbl1(1,2,4)="onetwofour"
-
-   GTM>ZWRITE ^gbl2
-
-   ^gbl2(2)="gbl2_2"
-
-   ^gbl2(2,1,3)="gbl2_2_1_3"
-
-   ^gbl2(2,1,4,5)="gbl2_2_1_4_5"
-
-   GTM>
-
-   The example illustrates how MERGE copies a sub-tree of one global into
-   another. The nodes in the sub-tree of ^gbl(2), for which $DATA() value
-   is 1 or 11, are copied to sub-tree of ^gbl1(1) as follows:
-
-   ^gbl1(1) is updated with value of ^gbl2(2)
-
-   ^gbl1(1,1,3) is updated with value of ^gbl2(2,1,3)
-
-   ^gbl1(1,1,4,5) is updated with value of ^gbl2(2,1,4,5)
-
-   Since ^gbl1(2,1) and ^gbl2(2,2,4) do not have values  ($DATA()=0),  the
-   corresponding nodes ^gbl1(1,1) and ^gbl(1,2,4)  respectively  are  left
-   unchanged. The naked indicator  takes  the  value  ^gbl(1)  as  if  SET
-   replaced MERGE. Notice that the MERGE command does not change ^gbl2(2)
-   or its descendants. Ancestor nodes of ^gbl(1) are also left unchanged.
-
-   Example:
-
-
-   GTM>KILL
-
-   GTM>SET ^gbl(1,2)="1,2"
-
-   GTM>MERGE lcl(3,4)=^gbl(1)
-
-   GTM>SET ^("naked")=2
-
-   GTM>ZWRITE ^gbl
-
-   ^gbl(1,2)="1,2"
-
-   ^gbl("naked")=2
-
-   GTM>ZWRITE lcl
-
-   lcl(3,4,2)="1,2"
-
-   GTM>
-
-   The example illustrates how MERGE creates a sub-tree of a variable when
-   the variable does not exist. Also, notice how the  naked  indicator  is
-   set when the source of the MERGE is a  global  and  the  destination  a
-   local.
-
-1 NEW
-   New
-
-   The NEW command "stacks" copies of local  variables  and  reinitializes
-   the variables. An explicit or  implicit  QUIT  from  a  DO,  XECUTE  or
-   extrinsic function "unstacks" the NEWed variables,  that  is,  restores
-   the variable to the stacked value. A NEW lasts  only  for  the  current
-   scope of execution.
-
-   The format of the NEW command is:
-
-
-   N[EW][:tvexpr] [[(]lvn[,...][)][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    NEW arguments are unsubscripted local variable names;  NEW  affects
-        not only the variable specified  in  the  argument,  but  also  all
-        variables descended from that variable.
-
-   o    When an undefined variable is NEWed, the fact that it is undefined
-        is "stacked", and when leaving the current  scope,  it  returns  to
-        being undefined, that is, the variable is KILLed.
-
-   o    Without  an  argument  GT.M  NEWs  all  currently  existing  local
-        variables; in this case, at least two (2) spaces  must  follow  the
-        NEW to separate it from the next command on the line.
-
-   o    When a NEW  argument  is  enclosed  in  parentheses,  that  NEW  is
-        considered "exclusive" and the variables inside the parentheses are
-        excluded from the effect of the NEW.
-
-   o    When the flow of execution leaves the scope of an  argumentless  or
-        an exclusive NEW, GT.M restores  all  stacked  variables  to  their
-        previous values, and deletes all other local variables.
-
-   o    The intrinsic special  variables  $ESTACK,  $ETRAP,  $ZGBLDIR,  and
-        $ZYERROR can be an explicit argument of a NEW.
-
-   o    The intrinsic special variable  $ZTRAP  can  also  be  an  explicit
-        argument of a NEW; this stacks the  current  value  of  $ZTRAP  and
-        assigns $ZTRAP a null value ($ZTRAP="").
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more NEW arguments form a legal argument for a NEW.
-
-   The NEW command provides a  means  of  confining  the  scope  of  local
-   variables. NEW operates only on unsubscripted local names and  acts  on
-   the entire named array.
-
-2 Ex_of_New
-   Examples of NEW
-
-   Example:
-
-
-   SET A(1)=1,B=4,C=5
-
-   WRITE !,"VARIABLES BEFORE NEW:",!
-
-   ZWRITE
-
-   DO LABEL
-
-   WRITE !,"VARIABLES AFTER RETURN:",!
-
-   ZWRITE
-
-   QUIT
-
-   LABEL NEW A SET C=7
-
-   WRITE !,"VARIABLES AFTER NEW:",!
-
-   ZWRITE
-
-   QUIT
-
-   Produces the results:
-
-
-   VARIABLES BEFORE NEW:
-
-   A(1)=1
-
-   B=4
-
-   C=5
-
-   VARIABLES AFTER NEW:
-
-   B=4
-
-   C=7
-
-   VARIABLES AFTER RETURN:
-
-   A(1)=1
-
-   B=4
-
-   C=7
-
-   Example:
-
-
-   SET (A,B,C,D)="TEST"
-
-   DO LABEL
-
-   WRITE !,"VARIABLES AFTER RETURN:",!
-
-   ZWRITE
-
-   QUIT
-
-   LABEL NEW (B,C) SET (A,B,Z)="NEW"
-
-   WRITE !,"VARIABLES AFTER EXCLUSIVE NEW:",!
-
-   ZWRITE
-
-   QUIT
-
-   Produces the results:
-
-
-   VARIABLES AFTER EXCLUSIVE NEW:
-
-   A="NEW"
-
-   B="NEW"
-
-   C="TEST"
-
-   Z="NEW"
-
-   VARIABLES AFTER RETURN:
-
-   A="TEST"
-
-   B="NEW"
-
-   C="TEST"
-
-   D="TEST"
-
-1 OPEN
-   Open
-
-   The OPEN command creates a connection between  a  GT.M  process  and  a
-   device.
-
-   The format of the OPEN command is:
-
-
-   O[PEN][:tvexpr] expr[:[(keyword[=expr][:...])]
-
-   [:numexpr]][,...]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies the device to OPEN.
-
-   o    The optional keywords specify deviceparameters that control device
-        behavior; some deviceparameters  take  arguments  delimited  by  an
-        equal sign (=); if the argument only contains one deviceparameter,
-        the surrounding parentheses are optional.
-
-   o    The optional numeric expression specifies a time in  seconds  after
-        which the  command  should  timeout  if  unsuccessful;  choosing  0
-        results in a single attempt to open the device.
-
-   o    When  an  OPEN  command  specifying  a  timeout  contains  no
-        deviceparameters, double colons (::) separate the  timeout  numeric
-        expression from the device expression.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more OPEN arguments form a legal argument for an OPEN.
-
-1 QUIT
-   Quit
-
-   Except when a QUIT appears on a line after  a  FOR,  the  QUIT  command
-   terminates  execution  of  the  current  GT.M  invocation  stack  level
-   initiated by a DO, XECUTE, extrinsic function or special variable, and
-   returns control to the next "lower" level. In this case, QUIT restores
-   any values stacked at  the  current  level  by  NEWs  or  by  parameter
-   passing. When a QUIT appears on the line following a FOR, it terminates
-   execution of the FOR.
-
-   The format of the QUIT command is:
-
-
-   Q[UIT][:tvexpr] [expr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    When a QUIT terminates an  extrinsic  function,  it  must  have  an
-        argument that supplies the value returned by the function;  in  all
-        other cases, QUIT must not have an argument and must be followed by
-        at least two (2) spaces to separate it from the next command on the
-        line.
-
-   o    An indirection operator and an expression atom evaluating to a QUIT
-        argument form a legal argument for a QUIT.
-
-   The QUIT performs two similar, but different,  functions  depending  on
-   its context. Because FORs do not add  levels  to  the  GT.M  invocation
-   stack, QUITs inside FOR loops simply terminate  the  loop.  QUITs  that
-   terminate DOs, XECUTEs and extrinsics remove a  GT.M  invocation  stack
-   level and therefore may adjust the local variable environment resulting
-   from previous NEWs or parameter passing. A QUIT from an extrinsic or a
-   frame created by an argumentless  DO  restores  $TEST  to  its  stacked
-   value.
-
-   Attempting to QUIT (implicitly or explicitly) from code  invoked  by  a
-   DO, XECUTE or extrinsic after that code issued a TSTART not yet matched
-   by a TCOMMIT, produces an error.
-
-2 Ex_of_Quit
-   Examples of QUIT
-
-   Example:
-
-
-   DO A
-
-   QUIT
-
-   A WRITE !,"This is label A"
-
-   The explicit QUIT at the line preceding the label  A  prevents  line  A
-   from executing twice. The sub-routine at line  A  terminates  with  the
-   implicit QUIT at the end of the routine.
-
-   Example:
-
-
-   WRITE $$ESV
-
-   QUIT
-
-   ESV()
-
-   QUIT "value of this Extrinsic Special Variable"
-
-   Because the label ESV has an argument list (which is empty),  GT.M  can
-   only legally reach that label with a extrinsic invocation. The QUIT on
-   the second line prevents execution from erroneously  "falling  through"
-   to the line labelled ESV. Because  ESV  identifies  a  subroutine  that
-   implements an extrinsic special variable, the QUIT on  the  line  after
-   ESV has an argument to provide the value of the extrinsic.
-
-   Example:
-
-
-   SET x="" F S x=$O(^BAL(x)) Q:x]]"AR5999"!'$L(x) D STF
-
-   The postconditional QUIT terminates the FOR loop.
-
-1 READ
-   Read
-
-   The READ command transfers input from the current device to a global or
-   local variable specified as a READ argument. For convenience, READ also
-   accepts arguments that perform limited output to the current device.
-
-   The format of the READ command is:
-
-
-   R[EAD][:tvexpr] (glvn|*glvn|glvn#intexpr)[:numexpr]|strlit|fcc[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    A subscripted  or  unsubscripted  global  or  local  variable  name
-        specifies a variable into which to store the  input;  the  variable
-        does not have to exist prior to the  READ;  if  the  variable  does
-        exist prior to the READ, the READ replaces its old value.
-
-   o    When an asterisk (*) immediately precedes the variable  name,  READ
-        accepts one character of input and places the ASCII code  for  that
-        character into the variable.
-
-   o    When  a  number-sign  (#)  and  a  non-zero  integer  expression
-        immediately  follow  the  variable  name,  the  integer  expression
-        determines the maximum number of characters accepted  as  input  to
-        the read; such reads  terminate  when  GT.M  reads  the  number  of
-        characters specified by the  integer  expression  or  a  terminator
-        character in the input stream, whichever occurs first.
-
-   o    The optional numeric expression specifies  a  time  in  seconds  at
-        most, for which the command waits for input to be terminated. When
-        a timeout is specified, if the input has been terminated before the
-        timeout expires, $TEST is set to 1 (true), otherwise, $TEST is set
-        to 0 (false).
-
-   o    To provide a concise means of issuing prompts,  GT.M  sends  string
-        literal and format control character (!,?intexpr,#) arguments of a
-        READ to the current device as if they were arguments of a WRITE.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more READ arguments form a legal argument for a READ.
-
-1 SET
-   Set
-
-   SET assigns values to variables or to a selected portion of a variable.
-
-   The format of the SET command is:
-
-
-   S[ET][:tvexpr] glvn|$EXTRACT()|$PIECE()|(glvn[,...])=expr[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    A subscripted or unsubscripted local or global variable name on the
-        left of the equal-sign (=) specifies a variable in which  to  store
-        the expression found on the  right  side  of  the  equal-sign;  the
-        variable need not exist prior to the SET; if  the  variable  exists
-        prior to the SET, the SET replaces its old value.
-
-   o    During a SET, GT.M evaluates the  right  side  of  the  equal  sign
-        before the left; this is an exception to the left-to-right order of
-        evaluation  in  GT.M  and  means  that  GT.M  maintains  the  naked
-        indicator using the expression on the right-hand side of the equal
-        sign (=) before setting the variable.
-
-   o    When the portion of the argument to the left of the  equal-sign  is
-        in the form of a list of variables  enclosed  in  parentheses,  SET
-        assigns the value of the expression on the right of the equal sign
-        to all the variables.
-
-   o    When the portion of the argument to the left of the equal  sign  is
-        in the form of a $PIECE function, SET replaces the specified piece
-        or pieces of the variable (specified as the first argument  to  the
-        $PIECE() form) with the value of the expression on the  right  side
-        of the equal-sign; if the variable did not exist prior to  the  SET
-        or does not currently contain the pieces identified by the optional
-        third  and  fourth  arguments  to  the  $PIECE()  form,  SET  adds
-        sufficient leading delimiters, as specified by the second argument
-        to the $PIECE form, to make the assignment fit the  $PIECE()  form.
-        Note that if the fourth argument exceeds the  third  argument,  the
-        target glvn is not changed and the  naked  indicator  is  also  not
-        modifed.
-
-   o    When the portion of the argument to the left of the equal  sign  is
-        in the form of a $EXTRACT  function,  SET  replaces  the  specified
-        character or characters of the variable  (specified  as  the  first
-        argument to the $EXTRACT() form) with the value of  the  expression
-        on the right side of the equal-sign; if the variable did not exist
-        prior to the SET or does not contain the characters  identified  by
-        the optional second and third arguments to the $EXTRACT() form, SET
-        adds sufficient leading spaces  to  make  the  assignment  fit  the
-        $EXTRACT() form. Note that if the third argument exceeds the second
-        argument, the target glvn is not changed and the naked indicator is
-        also not modifed.
-
-   o    The left-hand side of the equal-sign may also contain  any  of  the
-        following Intrinsic Special Variables:
-
-$ECODE
-$ETRAP
-$X
-$Y
-$ZCOMPILE
-$ZDIRECTORY
-$ZERROR
-$ZGBLDIR
-$ZINTERRUPT
-$ZMAXTPTIME
-$ZPROMPT
-$ZROUTINES
-$ZSOURCE
-$ZSTATUS
-$ZSTEP
-$ZTRAP
-$ZYERROR
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more SET arguments form a legal argument for a SET.
-
-   Because GT.M does not require predeclaration or typing of variables, a
-   SET with proper syntax always succeeds regardless of the prior state or
-   value of the variable, as long as GT.M can evaluate the  expression  to
-   the right of the equal sign (=).
-
-2 Ex_of_Set
-   Examples of SET
-
-   Example:
-
-
-   GTM>KILL SET a="x",(b,c)=1, at a="hello" ZWRITE
-
-   a=x
-
-   b=1
-
-   c=1
-
-   x="hello"
-
-   GTM>
-
-   The KILL command deletes any previously defined  local  variables.  The
-   SET command has three  arguments.  The  first  shows  a  simple  direct
-   assignment. The second shows the form that assigns the  same  value  to
-   multiple variables. The third shows atomic indirection on the  left  of
-   the equal  sign.  The  ZWRITE  command  displays  the  results  of  the
-   assignments.
-
-   Example:
-
-
-   GTM>SET ^(3,4)=^X(1,2)
-
-   Because GT.M evaluates the right-hand side of the equal sign before the
-   left-hand  side  within  a  SET  argument,  the  right-hand  expression
-   determines the
-   naked reference indicator prior to evaluation of  the  left-hand  side.
-   Therefore, this example assigns ^X(1,3,4) the value of ^X(1,2).
-
-   Example:
-
-
-   GTM>KILL x SET $P(x,"^",3)="piece 2" ZWRITE x
-
-   x="^^piece 2"
-
-   GTM>
-
-   This SET demonstrates a "setpiece" and shows how SET generates missing
-   delimiters when required.
-
-   Example:
-
-
-   GTM>SET x="I love hotdogs"
-
-   GTM>SET $EXTRACT(x,3,6)="want"
-
-   GTM>WRITE x
-
-   I want hotdogs
-
-   GTM>SET $EXTRACT(x,7)=" many "
-
-   GTM>WRITE x
-
-   I want many hotdogs
-
-   GTM>
-
-   The SET $EXTRACT command replaces and extracts the specified characters
-   with the value of  the  expression  on  the  right  hand  side  of  the
-   equal-sign (=).
-
-1 TCOMMIT
-   TCommit
-
-   The TCOMMIT command marks the end of a transaction  or  sub-transaction
-   and decrements $TLEVEL. If TCOMMIT  marks  the  end  of  a  transaction
-   (decrements $TLEVEL to zero), it invokes  a  COMMIT,  which  makes  the
-   database updates performed by the transaction  generally  available.  A
-   TCOMMIT issued when no transaction is in progress ($TLEVEL=0) produces
-   an error.
-
-   The format of the TCOMMIT command is:
-
-
-   TC[OMMIT][:tvexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    Because TCOMMIT has no argument,  at  least  two  (2)  spaces  must
-        follow the command to separate it from  the  next  command  on  the
-        line.
-
-   For an example of the use of the TCOMMIT command, refer to the chapter
-   on General Language Features of M in GT.M Programmer's Guide.
-
-1 TRESTART
-   TREstart
-
-   The TRESTART command attempts to RESTART  the  current  transaction.  A
-   RESTART transfers control back to the initial TSTART and restores much
-   of the process state to what it was  when  that  TSTART  was  executed.
-   Errors are produced if a TRESTART is used when  no  transaction  is  in
-   progress ($TLEVEL=0) and when the transaction  does  not  have  RESTART
-   enabled.
-
-   The format for the TRESTART command is:
-
-
-   TRE[START][:tvexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    Because TRESTART has no argument, at  least  two  (2)  spaces  must
-        follow the command to separate it from  the  next  command  on  the
-        line.
-
-   TRESTARTs (and implicit RESTARTs) do not  restore  any  device  states;
-   they do restore the following to the state they had when GT.M executed
-   the initial TSTART:
-
-   o    $TEST
-
-   o    The naked indicator
-
-   o    LOCKs held by the process
-
-   They also restore any local variables  named  by  one  or  more  active
-   TSTARTs to the values they had when they were first named.
-
-   For an example of the use of the TRESTART command, refer to the chapter
-   on "General Language Features of M" in the GT.M Programmer's Guide.
-
-1 TROLLBACK
-   TROllback
-
-   The TROLLBACK command terminates a transaction by causing  a  ROLLBACK,
-   which removes all database  updates  performed  within  a  transaction.
-   TROLLBACK also sets $TLEVEL  and  $TRESTART  to  zero  (0).  Issuing  a
-   TROLLBACK when no transaction is in progress  ($TLEVEL=0)  produces  an
-   error.
-
-   The format of the TROLLBACK command is:
-
-
-   TRO[LLBACK][:tvexpr] [intexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional integer expression indicates  an  argument  specifying
-        incremental rollback. If the value of the  argument  expression  is
-        greater than zero, it specifies the value of $TLEVEL to be achieved
-        by the rollback. If the value of the expression is less than zero,
-        the result is the number of levels to  rollback.  For  example;  -1
-        means rollback one level. If the argument expression is  zero,  the
-        effect is same as not specifying the argument, that is, the entire
-        GT.M transaction is rolled back.
-
-   Attempting  to  rollback  more  than  $TLEVEL  levels  (the  outermost
-   transaction) generates an error.
-
-   o    When the TROLLBACK has no argument, at least two  (2)  spaces  must
-        follow the command to separate it from  the  next  command  on  the
-        line.
-
-   In order to allow for  error  recovery  and/or  access  to  the  global
-   context of the  error,  errors  do  not  initiate  implicit  ROLLBACKs.
-   Therefore, the code for  handling  errors  during  transactions  should
-   generally include a TROLLBACK. Because the TROLLBACK releases resources
-   held by the transaction, it should appear as early as possible  in  the
-   error handling code.
-
-        A TROLLBACK does not cause a transfer of control but  is  typically
-        associated with one such as a QUIT or GOTO.
-
-   For an example of the use  of  the  TROLLBACK  command,  refer  to  the
-   chapter on "General Language Features of M" in  the  GT.M  Programmer's
-   Guide.
-
-1 TSTART
-   TStart
-
-   A  TSTART  command  marks  the  beginning  of  a  transaction  or
-   sub-transaction and increments $TLEVEL. When TSTART marks the beginning
-   of a transaction  ($TLEVEL=1),  its  arguments  determine  whether  the
-   transaction may RESTART and whether serializability is enforced.  If  a
-   transaction may RESTART, the TSTART  arguments  determine  which  local
-   variables are restored during a RESTART. Serializability is enforced by
-   LOCK commands or, if the SERIAL keyword is specified, by GT.M.
-
-   The format of the TSTART command is:
-
-
-   TS[TART][:tvexpr] [([lvn...])|lvn|*|][:keyword|(keyword...)]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    If $TLEVEL is 0 before the TSTART, the TSTART starts a transaction;
-        otherwise it starts a sub-transaction.
-
-   o    If the TSTART initiates  a  transaction  and  the  portion  of  the
-        argument before the colon (:) delimiter is empty,  the  transaction
-        is not eligible for RESTART. If the  TSTART  starts  a  transaction
-        ($TLEVEL=0) and the portion of the argument before the colon is not
-        empty, the transaction is eligible for RESTART. If  the  TSTART  is
-        nested (starts a sub-transaction), its arguments have no effect on
-        whether the transaction is eligible for RESTART.
-
-   o    If the portion of the argument before the colon is an asterisk (*),
-        any subsequent RESTART restores all local variables  to  the  value
-        they had when the TSTART was executed.
-
-   o    If the portion of the argument before the colon is an unsubscripted
-        local  variable  name  or  a  list  of  such  names  enclosed  in
-        parentheses, a RESTART restores the named variables  to  the  value
-        they had when the TSTART was executed.
-
-   o    If the portion of the argument before the colon is a set  of  empty
-        parentheses (), a RESTART does not restore any local variables.
-
-   o    The optional portion of the argument after the colon is  a  keyword
-        or a colon-separated list  of  keywords  enclosed  in  parentheses,
-        where the keywords specify transaction characteristics.
-
-   o    An indirection operator and an  expression  atom  evaluating  to  a
-        TSTART argument form a legal argument for a TSTART.
-
-   A TSTART within a transaction starts a sub-transaction. The argument to
-   such a TSTART has no effect on whether  the  existing  transaction  may
-   RESTART or whether serializability of the transaction is enforced. This
-   type of TSTART may add local variables to be restored in a transaction
-   that has RESTART enabled.
-
-   It is good coding  practice  to  synchronize  enabling  of  RESTART  on
-   TSTARTs at all levels of a transaction. A nested TSTART that  does  not
-   permit RESTART where  the  transaction  does,  may  indicate  that  the
-   sub-transaction has not been coded to properly handle RESTART.
-
-   Sub-transactions cannot COMMIT independently from the transaction, nor
-   can they RESTART independently. Sub-transactions  exist  largely  as  a
-   programming convenience to allow flexibility in organizing  code  in  a
-   modular fashion, and in addition to allow incremental ROLLBACKs.
-
-   When journaling, a transaction with  an  initial  TSTART  that  has  an
-   argument specifying TRANSACTIONID=expr, where  expr  is  an  expression
-   that evaluates to the keyword (case insensitive) BA[TCH], does not wait
-   for the journal update to be written before returning  control  to  the
-   application after a successful TCOMMIT. The goal of this feature is to
-   permit application control over any performance impact of journaling on
-   any subset of transactions that can be recreated or recovered by means
-   other than journaling.
-
-   For an example of the use of the TSTART command, refer to  the  chapter
-   on "General Language Features of M" in the GT.M Programmer's Guide.
-
-   The following keywords may appear in a TSTART argument:
-
-2 SERIAL
-   S[ERIAL]
-
-   The SERIAL keyword indicates that GT.M must ensure the serializability
-   of the transaction. When the SERIAL keyword is absent, the GT.M program
-   must ensure serializability by proper use of LOCK commands. On a nested
-   TSTART, this portion of the argument is ignored.
-
-2 TRANSACTIONID
-   T[RANSACTIONID]=expr
-
-   The  TRANSACTIONID  keyword  declares  an  arbitrary  transaction
-   identification.
-
-   If TRANSACTIONID="BATCH" or "BA" at transaction completion, the process
-   immediately continues  execution.  When  a  process  issues  a  [final]
-   TCOMMIT for a transaction and journaling  is  active,  by  default  the
-   process waits until the entire transaction is written  to  the  journal
-   file(s) before executing the next  command.  This  ensures  that  every
-   transaction is durable before the process moves on to the next step.
-
-   Transactions  flagged  as  "BATCH"  have  lower  latency  and  higher
-   throughput, but a lower guarantee of durability. Normally this flag is
-   used when operational procedures (such as a backup) or application code
-   (such as a checkpoint algorithm)  provides  an  acceptable  alternative
-   means of ensuring durability.
-
-1 USE
-   Use
-
-   The USE command selects the current device for READs (input) and WRITEs
-   (output).
-
-   The format of the USE command is:
-
-
-   U[SE][:tvexpr] expr[:(keyword[=expr][:...])][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies the device to  make  the  current
-        device.
-
-   o    A USE that selects a device not currently  OPENed  by  the  process
-        causes a run-time error.
-
-   o    The optional keywords specify deviceparameters that control device
-        behavior; some deviceparameters  take  arguments  delimited  by  an
-        equal sign (=); if the argument only contains one deviceparameter,
-        the surrounding parentheses are optional.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more USE arguments form a legal argument for a USE.
-
-   For more information on USE, devices and deviceparameters, refer to the
-   "Input/Output Processing" chapter in the GT.M Programmer's Guide.
-
-1 VIEW
-   View
-
-   The VIEW command adjusts an environmental factor selected by a keyword
-   argument.  For  example,  VIEW  controls  journal  buffer  flushing,
-   determines whether GT.M reports undefined variables as errors or treats
-   them as null,  and  determines  which  BREAK  commands  should  display
-   messages.
-
-   The format of the VIEW command is:
-
-
-   V[IEW][:tvexpr] keyword[:expr2[:...]][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The keyword specifies the environmental factor to change.
-
-   o    The optional expression following the keyword specifies the nature
-        of the change to the environmental factor.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more VIEW arguments form a legal argument for a VIEW
-
-2 Key_Words_View
-   Key Words in VIEW Command
-
-   The following sections describe the keywords  available  for  the  VIEW
-   command in GT.M.
-
-3 BREAKMSG
-   "BREAKMSG":value
-
-
-   Sets the value of the BREAK message mask. When GT.M processes  a  BREAK
-   command, the BREAK message mask controls whether to display  a  message
-   describing the source of the BREAK.
-
-   The mask uses the following four values  that  are  added  together  to
-   provide the BREAKMSG value.
-
-   1 - BREAKs within the body of a program
-   2 - BREAKs within a ZBREAK action
-   4 - BREAKs within a device EXCEPTION
-   8 - BREAKs within a ZSTEP action
-   By default GT.M displays all BREAK messages. LINKing a GT.M image with
-   a modified GTM$DEFAULTS alters the default for that image.
-
-   Example:
-
-   GTM>VIEW "BREAKMSG":5
-
-   In this example the BREAKMSG value is 5, representing the sum of 1 and
-   4. This enables BREAKS within the body of a program (value 1) and for a
-   device EXCEPTION (value 4).
-
-3 GDSCERT
-   "GDSCERT":value
-
-
-   Enables (value=1) or disables (value=0) database block certification.
-
-   Database  block  certification  causes  GT.M  to  check  the  internal
-   integrity of every block as it writes the  block.  Block  certification
-   degrades performance and exists primarily as a tool for use by Sanchez.
-   The default is GDSCERT:0.
-
-3 JNLFLUSH
-   "JNLFLUSH"[:region]
-
-
-   Writes or flushes journaling buffers associated with the  given  region
-   to permanent storage, for example, to disk. If the VIEW "JNLFLUSH" does
-   not specify the optional region, GT.M flushes all active regions of the
-   current Global Directory.
-
-   Normally GT.M writes journal buffers when it fills the  journal  buffer
-   pool or when some period of time passes with no journal activity.
-
-   For more information on journaling,  refer  to  the  "GT.M  Journaling"
-   chapter in the GT.M Administration and Operations Guide.
-
-3 JNLWAIT
-   "JNLWAIT"
-
-
-   Causes a process to  pause  until  its  journaling  buffers  have  been
-   written. JNLWAIT ensures that GT.M successfully transfers all database
-   updates issued by the process to the journal file  before  the  process
-   continues. Normally, GT.M performs journal buffer writes asynchronously
-   while the process continues execution.
-
-   For more information on journaling,  refer  to  the  "GT.M  Journaling"
-   chapter in the GT.M Administration and Operations Guide.
-
-3 JOBPID
-   "JOBPID":"value"
-
-
-   Enables (value=1) or disables  (value=0)  the  addition  of  the  child
-   process ID to the output and  error  filenames  generated  by  the  JOB
-   command.
-
-   This option prevents output files generated by  the  JOB  command  from
-   being overwritten each time a new job is spawned from the  GT.M  source
-   file.
-
-3 LABELS
-   "LABELS":"value"
-
-
-   Enables (value="LOWER") or disables  (value="UPPER")  case  sensitivity
-   for labels within routines.
-
-   It is important to have the same  case  handling  at  compile-time  and
-   run-time.
-
-   Because GT.M stores routines in RMS files  and  RMS  does  not  support
-   lower-case file names, GT.M always treats routine names as upper-case.
-
-   By default, GT.M handles labels as case sensitive. LINKing a GT.M image
-   with a modified GTM$DEFAULTS alters the default for that image.
-
-3 LVNULLSUBS
-   "[NO]LVNULLSUBS"
-
-
-   Allows or disallows local arrays to have null subscripts.  The  default
-   is LVNULLSUBS. LINKing a GT.M image with a modified GTM$DEFAULTS alters
-   the default for that image.
-
-3 NOISOLATION
-   "NOISOLATION":<expr>
-
-
-   where expr must evaluate to one of the following forms
-
-   o    "", that is, empty string : turn off the feature  for  all  globals
-        for which it has previously been turned on
-
-   o    "^gvn1,^gvn2,..." : turn on the feature  for  the  globals  in  the
-        list, turning it off for globals for which it has  previously  been
-        turned on
-
-   o    "+^gvn1,^gvn2,..." : add these globals to the list of globals that
-        have this feature turned on
-
-   o    "-^gvn1,^gvn2,..." : turn off the feature for these globals leaving
-        the status for other globals unchanged
-
-   GT.M transaction processing permits the application to specify a set of
-   globals that do not require GT.M to  preserve  Isolation,  one  of  the
-   "ACID" properties of TP. This shifts the responsibility  for  Isolation
-   from GT.M to the application logic, and permits GT.M to  relax  its  TP
-   Isolation  rules.  This  avoids  TP  restarts  in  certain  cases  thus
-   improving the performance of the application. For example, if a global
-   variable includes $JOB as a subscript, the application may  be  written
-   and scheduled in such a way that no more than one process uses  a  node
-   of that  global  at  any  given  time.  Specifying  such  a  global  as
-   "NOISOLATED" avoids transaction  restarts  that  occur  when  different
-   processes concurrently update and access nodes that share the same GDS
-   block.
-
-   The  rules  for  enforcement  by  GT.M  of  Isolation,  and  therefore
-   potentially Consistency, are relaxed for  application-specified  global
-   variables in order to allow the application to manage these properties.
-   GT.M is responsible for  Atomicity  and  Durability,  as  well  as  for
-   database integrity for all variables, and for Isolation and Consistency
-   for any global variables for which  the  application  does  not  accept
-   responsibility.
-
-   Note that if an  application  incorrectly  specifies  a  global  to  be
-   NOISOLATED, severe, and possibly intermittent and difficult to diagnose
-   damage to application-level integrity is likely to result.  A  thorough
-   understanding of the application is necessary before declaring a global
-   to be noisolated. GT.M preserves database integrity (accessibility) for
-   NOISOLATED, as well as ISOLATED global variables.
-
-   GT.M ignores attempts to turn on (or off) the feature for globals that
-   already have the feature turned on (or off). It is an error  to  modify
-   the isolation-status of a global variable within a  transaction  across
-   different  references  (either  reads  or  writes)  of  that  global
-   variable.The VIEW command by itself is not considered to be a reference
-   of the global variable. While  not  recommended  programming  practice,
-   this means that a process can change a global's isolation-status within
-   a transaction as long as it hasn't referenced it yet.
-
-   Any reads on a NOISOLATION global are validated at the time of the read
-   and not re-validated at TCOMMIT time. This means that if the value that
-   was read changed after the read but before the TCOMMIT, the transaction
-   would still be committed. Therefore it is important that any reads on a
-   NOISOLATED global (if any) should be of data that does not change with
-   time. Sanchez has not identified applications where this  could  be  an
-   issue.
-
-3 PATCODE
-   "PATCODE":"tablename"
-
-
-   Identifies the alternative table of unique patterns for  use  with  the
-   "?" operator to  be  loaded  from  the  pattern  definition  file.  For
-   additional information refer to the "Internationalization"  chapter  in
-   the GT.M Programmer's Guide.
-
-3 PATLOAD
-   "PATLOAD":"file-specification"
-
-
-   Identifies the file containing definitions of unique patterns  for  use
-   with the "?" operator. These pattern definitions can be used  in  place
-   of, or in addition to, the standard C, N, U, L, and P.
-
-3 UNDEF
-   "[NO]UNDEF"
-
-
-   Enables or disables handling of undefined  variables  as  errors.  With
-   UNDEF, GT.M  handles  all  references  to  undefined  local  or  global
-   variables as errors. With  NOUNDEF,  GT.M  handles  all  references  to
-   undefined local or global variables as if the variable had a  value  of
-   the null string. In other words, GT.M treats all variables appearing in
-   expressions as if they were the argument of an implicit  $GET().  UNDEF
-   is the default.
-
-3 TRACE
-   "TRACE":value<expr>
-
-
-   Traces GT.M program execution and generates profiling information about
-   the lines and functions executed;  with  low  impact  on  the  run-time
-   performance.
-
-   The feature turns on (value=1) or turns off (value=0)  tracing.  <expr>
-   must evaluate to  a  string  containing  the  name  of  a  GT.M  global
-   variable. The global may also have subscripts; however  the  subscripts
-   must be literals or the special variable $JOB.
-
-        The <expr> is optional when turning tracing off, if it  exists,  it
-        overrides the global variable set when tracing was turned on.
-
-   GT.M-tracing uses a technique called Basic Block Counting  where  calls
-   are made to special  profiling  functions  at  key  points  in  a  GT.M
-   program. A trace consists of the following run-time data as output for
-   each GT.M function, as well as for each GT.M statement:
-
-   o    The number of times it is executed.
-
-   o    The total CPU time spent across all invocations for  each  function
-        and each GT.M statement as a single value.
-
-   Instead of modifying the generated code as  done  by  common  profiling
-   tools, such as gprof, GT.M tracing operates entirely  within  the  GT.M
-   run-time system; therefore, this feature does  not  require  a  special
-   compilation,  has  no  effect  on  code  size  and  minimizes  run-time
-   overhead.
-
-   When the feature is turned on, it  gathers  profiling  information  for
-   each line and GT.M function invocation. The reported time  for  a  GT.M
-   line is the time spent in generated code for that line,  and  does  not
-   include time spent in entreyrefs called from that line. When profiling
-   is turned off, the  accumulated  statistics  are  loaded  into  a  GT.M
-   global. GT.M profiling accumulates and provides the data; the user may
-   choose tools and techniques to analyze the data.
-
-   The trace information is  stored  in  the  variable  in  the  following
-   format:
-
-   o    If <expr> is a global variable  without  subscripts  name  such  as
-        "^foo",  the  trace  information  is  stored  in  the  nodes
-        ^foo(<routine>,<label>) and ^foo(<routine>,<label>,<offset>), each
-        of which has a value in the form "<count>:<time>" on VMS.
-
-   o    If <expr> has a  value  such  as  "^foo("MYTRACE",$J)",  the  trace
-        information  is  stored  in  the  nodes
-        ^foo("MYTRACE",<pid>,<routine>,<label>)  and
-        ^foo("MYTRACE",<pid>,<routine>,<label>,<offset>), each of which has
-        a value in the form "<count>,<time>" on VMS as described above.
-
-   o    For FOR loops, information for each level of the loop is stored in
-        the nodes as described above, with the extra subscipts "FOR_LOOP".
-        <for_level> is the value of the number of iterations at that level
-        of the FOR loop.
-
-   Thus, if the GT.M program lv1.m is:
-
-
-   lv1 f i=1:1:10 d
-
-   .s l(i)=i
-
-   .d bar
-
-   for i=1:1:5 for j=1:1:4 s lij(i,j)=i+j
-
-   q
-
-   bar s l(-i)=-i
-
-   q
-
-
-   And the program lv2.m is:
-
-   lv2 VIEW "TRACE":1:"^lvtr"
-
-   d ^lv1
-
-   VIEW "TRACE":0:"^lvtr"
-
-   zwr ^lvtr
-
-   q
-
-   On executing lv2, the output looks like this (times in the example were
-   chose for clarity of illustration and are not typical):
-
-
-   ^lvtr("lv1","bar")="10:8"
-
-   ^lvtr("lv1","bar",0)="10:5"
-
-   ^lvtr("lv1","bar",1)="10:3"
-
-   ^lvtr("lv1","lv1")="1:37"
-
-   ^lvtr("lv1","lv1",0)="1:8"
-
-   ^lvtr("lv1","lv1",0,"FOR_LOOP",1)=10
-
-   ^lvtr("lv1","lv1",1)="10:3"
-
-   ^lvtr("lv1","lv1",2)="10:19"
-
-   ^lvtr("lv1","lv1",3)="1:15"
-
-   ^lvtr("lv1","lv1",3,"FOR_LOOP",1)=5
-
-   ^lvtr("lv1","lv1",3,"FOR_LOOP",2)=20
-
-   ^lvtr("lv1","lv1",4)="1:0"
-
-   ^lvtr("lv2","lv2",1)="1:47"
-
-   In this case, ^lvtr("lv1","bar",0)="10:5" means that the statement bar
-   s l(-i)=-i was executed 10 times, with a total  of  5  microseconds  of
-   time. ^lvtr("lv1","lv1")="1:37" means that 37 microseconds of time was
-   spent within that GT.M frame (lv1^lv1), and does not include time spent
-   in  routines  called  from  it  (such  as  bar^lv1),  whereas
-   ^lvtr("lv1","lv1",3)= "1:15" includes the time spent at bar^lv1.
-
-   Note  that  there  is  no  data  in  ^lvtr("lv2","lv2",0)  or  for
-   ^lvtr("lv2","lv2",2) because the execution of the lines containing the
-   VIEW commands that turn profiling on and off are not profiled.
-
-   Because of the underlying timers provided  by  the  operating  systems,
-   times of less than a microsecond are measured as zero. Therefore, even
-   if a statement executes one million times, it may report zero  time  if
-   it took less than a microsecond each time.
-
-   GT.M profiling cannot handle more than 1024 levels. If  the  GT.M  code
-   executed has  more  than  1024  levels,  frame  information  cannot  be
-   recorded, and frame information upto the first point where  this  limit
-   is reached is reported with a note (":INCOMPLETE DATA: MAXTRACELEVEL" )
-   appended to the data.
-
-3 ZDIR_FORM
-   "ZDIR_FORM":"value"
-
-
-   Includes (value=0) or excludes (value=1) the  device  specification  in
-   the special variable $ZDIRECTORY. By default, GT.M includes the device
-   specification in $ZDIRECTORY.
-
-   Note that the value of ZDIR_FORM does not affect  the  value  to  which
-   $ZDIRECTORY is SET. ZDIR_FORM only  modifies  the  way  $ZDIRECTORY  is
-   presented. Regardless of the value of ZDIR_FORM, $ZDIRECTORY can be SET
-   to a path that may or may not include device specification.
-
-   LINKing a GT.M image with a modified GTM$DEFAULTS  alters  the  default
-   for that image.
-
-2 Ex_of_View
-   Examples of VIEW
-
-   Example 1:
-
-
-   GTM>KILL A
-
-   GTM>VIEW "NOUNDEF"
-
-   GTM>WRITE A,?10,$L(A)
-
-   0
-
-   GTM>
-
-   This demonstrates how a VIEW that specifies NOUNDEF prevents UNDEFined
-   errors.
-
-   Example 2:
-
-
-   GTM>ZL "NOSENSE"
-
-   %GTM-E-LABELMISSING Label referenced but
-
-   not defined:lab
-
-   %GTM-I-SRCNAM in source module USR.[WORK]NOSENSE.m
-
-   GTM>
-
-   GTM>ZPRINT ^NOSENSE
-
-
-   NOSENSE;
-
-   DO lab
-
-   QUIT
-
-   LAB WRITE !,"THIS IS NOSENSE"
-
-   QUIT
-
-
-   GTM>VIEW "LABELS":"UPPER"
-
-   GTM>ZLINK "NOSENSE.M"
-
-   GTM>DO ^NOSENSE
-
-   THIS IS NOSENSE
-
-   GTM>
-
-   This demonstrates use of VIEW "LABELS"  to  make  label  handling  case
-   insensitive. Notice that the routine was ZLINKed with a type of  .M  to
-   force a recompile and ensure that the  object  code  and  the  run-time
-   handling of labels is the same.
-
-   Example:
-
-
-   GTM>WRITE $ZDIR
-
-   USER:[WORK.TEMP]
-
-   GTM>VIEW "ZDIR_FORM":1
-
-   GTM>WRITE $ZDIR
-
-   [WORK.TEMP]
-   GTM>SET $ZDIR="OTHER:[DATA.JOURNAL]"
-
-   GTM>WRITE $ZDIR
-
-   [DATA.JOURNAL]
-   This example demonstrates use of VIEW  "ZDIR_FORM"  to  exclude  device
-   specification from $ZDIR.
-
-1 WRITE
-   Write
-
-   The WRITE  command  transfers  a  character  stream  specified  by  its
-   arguments to the current device.
-
-   The format of the WRITE command is:
-
-
-   W[RITE][:tvexpr] expr|*intexpr|fcc[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    An expression argument supplies the text of a WRITE.
-
-   o    When a WRITE argument consists of a leading asterisk  (*)  followed
-        by  an  integer  expression,  WRITE  outputs  one  ASCII  character
-        associated with the ASCII code specified by the integer evaluation
-        of the expression.
-
-   o    WRITE arguments may  also  be  format  control  characters;  format
-        control characters modify the position  of  a  virtual  cursor:  an
-        exclamation point (!)  produces  a  new  line,  a  number-sign  (#)
-        produces a  new  page  and  a  question-mark  (?)  followed  by  an
-        expression moves the virtual cursor to the column specified by the
-        integer evaluation of the  expression  provided  that  the  virtual
-        cursor is to the "left" of the specified  column;  if  the  virtual
-        cursor is not to the left of the specified column, then the text is
-        printed at the current cursor position.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more WRITE arguments form a legal argument for a WRITE.
-
-   For more information  on  WRITE,  devices,  input,  output  and  format
-   control characters, refer to the "Input/Output Processing"  chapter  in
-   GT.M Programmer's Guide.
-
-1 XECUTE
-   Xecute
-
-   The XECUTE command makes an entry in  the  GT.M  invocation  stack  and
-   executes the argument as GT.M code.
-
-   The format of the XECUTE command is:
-
-
-   X[ECUTE]:tvexpr expr[:tvexpr][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies a fragment of GT.M source code.
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        argument expression  specifies  the  argument  postconditional  and
-        controls whether GT.M performs an XECUTE with that argument.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more XECUTE  arguments  form  a  legal  argument  for  an
-        XECUTE.
-
-   An explicit or implicit QUIT within the scope of the  XECUTE,  but  not
-   within the scope of any other DO, FOR,  XECUTE  or  extrinsic,  returns
-   execution to the instruction following the calling point. This  may  be
-   the next XECUTE argument or another command. At the  end  of  the  code
-   specified by the XECUTE argument expression, GT.M performs an implicit
-   QUIT.
-
-   Because XECUTE causes run-time compilation  in  GT.M,  and  because  it
-   tends to obscure code, use XECUTE only when other approaches clearly do
-   not meet your particular requirement.
-
-2 Ex_of_Xecute
-   Examples of XECUTE
-
-   Example:
-
-
-   GTM>SET A="HELLO" XECUTE "WRITE A"
-
-   HELLO
-
-   GTM>
-
-   This demonstrates a simple use of XECUTE.
-
-   Example:
-
-
-   SET x="" F S x=$O(^%x(x)) Q:x="" X x
-
-   This $ORDER() loop XECUTEs code out of the first level  of  the  global
-   array ^%x. Note that, in most cases, having the code in a  GT.M  source
-   file, for example TMPX.M, and using a DO ^TMPX improves efficiency.
-
-1 ZALLOCATE
-   ZAllocate
-
-   The ZALLOCATE command reserves the  specified  name  without  releasing
-   previously reserved names. Other  GT.M  processes  cannot  reserve  the
-   ZALLOCATEd name with a ZALLOCATE or LOCK command.
-
-   The ZALLOCATE command  provides  compatibility  with  some  other  GT.M
-   implementations. The M Development Committee chose to add the +  and  -
-   delimiters to the LOCK command (incremental locking) rather than adopt
-   the ZALLOCATE  and  ZDEALLOCATE  approach.  Therefore,  when  a  design
-   requires an incremental lock mechanism, LOCK +/- has the advantage over
-   ZALLOCATE / ZDEALLOCATE of being part of the M standard. LOCK +/- also
-   has the advantage of working symmetrically when  routines  using  LOCKs
-   are nested. That is, a ZALLOCATE command issued  by  a  process  for  a
-   named resource already ZALLOCATEd by that process results in no change
-   of state. This means that routines that  do  ZALLOCATE  followed  by  a
-   ZDEALLOCATE on a named resource that is already ZALLOCATEd by the same
-   process (at routine entry time), will end up ZDEALLOCATEing  the  named
-   resource (which might not be desired). On the  other  hand,  a  LOCK  +
-   command issued by a process for a named resource already LOCKed by that
-   process causes the LEVEL of the LOCK to be incremented (as  seen  in  a
-   ZSHOW "L" output). Every LOCK - command on that named  resource  causes
-   the LEVEL to be decremented.  When  the  LEVEL  becomes  0,  the  named
-   resource is no longer LOCKed.
-
-   For more information  on  troubleshooting  LOCKs  with  the  GT.M  Lock
-   Utility  (LKE),  refer  to  the  appropriate  chapter  of  the  GT.M
-   Administration and Operations Guide.
-
-   The format of the ZALLOCATE command is:
-
-
-   ZA[LLOCATE][:tvexpr] [(]nref[,...][)][:intexpr][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The nref argument specifies a name in the format  of  a  GT.M  name
-        with or without subscripts, and with or without a  preceding  caret
-        (^).
-
-   o    Outside of transactions, only one process  in  an  environment  can
-        ZALLOCATE (or LOCK) a particular resource name at any given time.
-
-   o    Because the data storage in GT.M uses  hierarchical  sparse  arrays
-        and ZALLOCATE may serve to protect  that  data  from  inappropriate
-        "simultaneous"  access  by  multiple  processes,  ZALLOCATE  treats
-        resource names in a hierarchical fashion; a ZALLOCATE protects not
-        only the named resource, but also its ancestors and descendants.
-
-   o    When one or more nrefs are enclosed in  parentheses  (),  ZALLOCATE
-        reserves all the  enclosed  names  "simultaneously,"  that  is,  it
-        reserves none of them until all become available.
-
-   o    The optional numeric expression specifies a time in  seconds  after
-        which the  command  should  timeout  if  unsuccessful;  choosing  0
-        results in a single attempt.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZALLOCATE arguments form  a  legal  argument  for  a
-        ZALLOCATE.
-
-   For an explanation of the LOCK command see the "LOCK" section in the M
-   LOCK Utility chapter of GT.M Administration and Operations Guide.
-
-   If a ZALLOCATE command specifies a timeout, and GT.M acquires ownership
-   of the named resource before the timeout elapses, ZALLOCATE sets $TEST
-   to TRUE (1). If GT.M cannot acquire ownership  of  the  named  resource
-   within the specified timeout, ZALLOCATE sets $TEST to FALSE (0).  If  a
-   ZALLOCATE command does not specify a  timeout,  the  execution  of  the
-   command does not affect $TEST.
-
-   When given a list of nrefs, ZALLOCATE tries to reserve each  nref  from
-   left to right in the order specified taking into  account  the  timeout
-   specified for each. If the timeout elapses before  reserving  an  nref,
-   GT.M terminates the ZALLOCATE command. Any nrefs  already  acquired  as
-   part of the current ZALLOCATE command stay acquired.
-
-2 Ex_of_ZAllocate
-   Examples of ZALLOCATE
-
-   Examples:
-
-
-   ZALLOCATE A
-
-   ZALLOCATE ^A
-
-   ZALLOCATE ^A(1)
-
-   ZALLOCATE (^B("smith"),^C("jones"))
-
-   ZALLOCATE @A
-
-   The first command ZALLOCATEs A; the second, ^A; the  third,  ^A(1)  and
-   the fourth, both ^B("smith") and ^C("jones") simultaneously.  The  last
-   command ZALLOCATEs the resources named by the value of the variable A.
-
-   Example:
-
-
-   ZALLOCATE A,^B, at C
-
-   ZALLOCATE (A,B,C)
-
-   If ZALLOCATE arguments are enclosed in parentheses, the  command  waits
-   until all names in the argument list become available before reserving
-   any of the names. For example, in the  statement  ZA  (A,B,C),  if  the
-   resource named C is not available,  ZALLOCATE  waits  until  C  becomes
-   available before reserving A and B. Using the format illustrated in the
-   first line above, can cause deadlocks because the  resource  names  are
-   reserved as they come available.
-
-   When a process attempts to ZALLOCATE a  name  currently  ZALLOCATEd  or
-   LOCKed (with the LOCK command) by  another  process,  the  ZALLOCATEing
-   process hangs until the other process releases the name. In  the  event
-   that names remain unavailable for significant periods of time, timeouts
-   allow the process issuing a ZALLOCATE to regain program control.
-
-   Example:
-
-
-   ZALLOCATE ^D:5
-
-   This example specifies a timeout of five seconds. If GT.M  reserves  ^D
-   before the five seconds elapses, ZALLOCATE sets $TEST to TRUE. If GT.M
-   cannot reserve ^D within the five second timeout, ZALLOCATE sets $TEST
-   to FALSE.
-
-   When you ZALLOCATE a name, no names previously reserved with ZALLOCATE
-   or the LOCK command are released (similarly, LOCKing a  name  does  not
-   release  names  that  have  been  ZALLOCATEd).  For  example,  after
-   ZALLOCATEing A and LOCKing  B,  LOCKing  B  does  not  release  A,  and
-   ZALLOCATEing C does not release A or B.
-
-   To  release  a  ZALLOCATEd  name,  use  the  ZDEALLOCATE  command.  The
-   ZDEALLOCATE command can only release previously ZALLOCATEd (not LOCKed)
-   names.
-
-   Resource name arguments for LOCKs and ZALLOCATEs intersect. That is, if
-   one process holds a LOCK or ZALLOCATE, another process can neither LOCK
-   nor ZALLOCATE any name falling in the hierarchy of  the  resource  name
-   held by the first process. When a process holds a  LOCK  or  ZALLOCATE,
-   that same process may also LOCK or ZALLOCATE resource names falling in
-   the hierarchy of the  currently  held  resource  name.  When  a  single
-   process holds both LOCKs and ZALLOCATEs, a LOCK does  not  release  the
-   ZALLOCATEd resource(s) and a ZDEALLOCATE does not  release  the  LOCKed
-   resource(s).
-
-   Example:
-
-
-   L ^AR(PNT)
-
-   .
-   .
-   .
-   ZALLOCATE ^AR(PNT,SUB)
-
-   .
-   .
-   .
-   L ^TOT(TDT)
-
-   .
-   .
-   .
-   ZDEALLOCATE ^AR(PNT,SUB)
-
-
-   This LOCKs ^AR(PNT), then, after performing some unspecified commands,
-   it ZALLOCATEs ^AR(PNT,SUB). Because ZALLOCATE does not imply any change
-   to LOCKs or existing ZALLOCATEd resource names, the  LOCK  of  ^AR(PNT)
-   remains in effect. Assuming the routine does not  modify  the  variable
-   PNT, ^AR(PNT,SUB) is already protected by the LOCK.  Next,  because  an
-   unsigned LOCK releases all  resource  names  currently  LOCKed  by  the
-   process, the routine releases ^AR(PNT) with the LOCK of ^TOT(TDT). This
-   leaves the  ZALLOCATE  of  ^AR(PNT,SUB).  The  name  ^AR  and  all  its
-   subscripts except for  those  that  begin  with  ^AR(PNT,SUB)  are  now
-   available for LOCKing by other processes. Finally the routine releases
-   ^AR(PNT,SUB) with a  ZDEALLOCATE  command.  The  ZDEALLOCATE  does  not
-   affect the LOCK on ^TOT(TDT). Note that this example was constructed to
-   illustrate the interaction between LOCK, ZALLOCATE and ZDEALLOCATE, and
-   not to illustrate sound programming practice.
-
-1 ZBREAK
-   ZBreak
-
-   The ZBREAK command sets or clears routine breakpoints during debugging.
-
-   The format of the ZBREAK command is:
-
-
-   ZB[REAK][:tvexpr] [-]entryref[:[expr][:intexpr]]
-
-   [,...]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required entryref specifies a  location  within  a  routine  at
-        which to set or remove a breakpoint.
-
-   o    The optional minus  sign  (-)  specifies  that  ZBREAK  remove  the
-        breakpoint; -* means remove all breakpoints.
-
-   o    The optional expression specifies a fragment of GT.M code to XECUTE
-        when GT.M  execution  encounters  the  breakpoint;  if  the  ZBREAK
-        argument does not specify an action, the default action is "BREAK".
-
-   o    The  optional  integer  expression  immediately  following  the
-        expression specifies  a  count  of  process  transits  through  the
-        breakpoint before the breakpoint action  takes  effect;  once  GT.M
-        exhausts the count and the action takes effect, the  action  occurs
-        every time the process encounters the  breakpoint.  If  the  action
-        expression is omitted, the  optional  integer  expression  must  be
-        separated from the entryref by two adjacent colons (::).
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZBREAK arguments form a legal argument for a ZBREAK.
-
-   When GT.M encounters the  entryref,  GT.M  suspends  execution  of  the
-   routine code and XECUTEs the breakpoint action before executing any of
-   the commands on the line.
-
-   When the optional  integer  expression  is  used,  GT.M  activates  the
-   breakpoint on the intexpr-th time the process encounters the breakpoint
-   during routine execution. Once  GT.M  activates  the  breakpoint,  that
-   breakpoint remains active for the process until explicitly replaced or
-   removed, or until the process terminates.
-
-2 Ex_of_ZBreak
-   Examples of ZBREAK
-
-   Example:
-
-
-   GTM>ZPRINT ^ZBTEST
-
-   ZBTEST;
-
-   DO SUB
-
-   QUIT
-
-   SUB WRITE !,"This is ZBTEST"
-
-   QUIT
-
-   GTM>ZBREAK SUB^ZBTEST
-
-   GTM>DO ^ZBTEST
-
-   %GTM-I-BREAKZBA, Break instruction encountered
-
-   during ZBREAK action
-
-   At M source location SUB^ZBTEST
-
-   GTM>
-
-   ZSHOW "B"
-
-   SUB^ZBTEST
-
-   This inserts a ZBREAK with a default action at SUB^ZBTEST.  After  GT.M
-   encounters the BREAK, the ZSHOW "B" displays this as the only ZBREAK in
-   the image.
-
-   Example:
-
-
-   GTM>ZBREAK -*
-
-   GTM>ZGOTO
-
-   GTM>ZBREAK SUB^ZBTEST:"W !,""Trace"""
-
-   GTM>DO ^ZBTEST
-
-   Trace
-
-   This is ZBTEST
-
-   GTM>
-
-   This removes all existing ZBREAKs with a ZBREAK -*. Note that it is not
-   necessary to remove ZBREAKs before modifying them. It also  clears  the
-   process invocation stack with an argumentless ZGOTO.  Then  it  uses  a
-   ZBREAK to insert a trace-point. Every time GT.M executes  the  line  to
-   where ZBREAK has established a trace-point, it performs  the  specified
-   action without entering Direct Mode.
-
-   Example:
-
-
-   ZBREAK PRINT^TIME::5
-
-   This BREAKs execution at line PRINT in routine just  before  the  fifth
-   time the line is executed.
-
-   Example:
-
-
-   ZBREAK PRINT^TIME:"WRITE AVE BREAK":3
-
-   This inserts a ZBREAK action of WRITE AVE and BREAK  before  the  third
-   execution of PRINT^TIME.
-
-1 ZCOMPILE
-   ZCOMpile
-
-   The ZCOMPILE command invokes the GT.M compiler  from  within  the  GT.M
-   run-time environment.
-
-   Within GT.M itself, ZCOMPILE provides the functionality  of  the  MUMPS
-   command, except for MUMPS/DIRECT.
-
-   The format of the ZCOMPILE command is:
-
-
-   ZCOM[PILE][:tvexpr] expr[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The expression argument specifies one or  more  file-specifications
-        filenames, (in which wildcards  are  acceptable)  and,  optionally,
-        qualifiers valid for a MUMPS command.  If  the  file  specification
-        does not include an extension, a default file extension of ".M" is
-        assumed.
-
-   The $ZCSTATUS intrinsic special variable holds the value of the status
-   code for the compilation performed by a ZCOMPILE command.
-
-2 Ex_of_ZCOMpile
-   Examples of ZCOMPILE
-
-   ZCOMPILE "EXAMPLE"
-
-   This compiles EXAMPLE.M in the current default directory.
-
-   Example:
-
-
-   ZCOMPILE "A*/LIST"
-
-   This compiles all files starting with a [capital] A and an extension of
-   .M in the current default directory. This also produces source program
-   listing file.
-
-1 ZCONTINUE
-   ZContinue
-
-   The ZCONTINUE command continues routine execution after a BREAK command
-   or a <CTRL-C>.
-
-   The format of the ZCONTINUE command is:
-
-
-   ZC[ONTINUE][:tvexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    Because ZCONTINUE changes the flow of execution away  from  control
-        of the principal device back to the current routine, it is usually
-        the final command on a line; however, if it  is  not,  because  the
-        ZCONTINUE has no argument, at least two (2) spaces must follow the
-        command to separate it from the next command on the line.
-
-   o    If the process is not in Direct Mode, ZCONTINUE has no effect.
-
-1 ZDEALLOCATE
-   ZDeallocate
-
-   The ZDEALLOCATE command releases a specified  resource  name  or  names
-   previously reserved by the ZALLOCATE command. The  ZDEALLOCATE  command
-   releases only the  specified  name(s)  without  releasing  other  names
-   previously reserved with the ZALLOCATE or LOCK command.
-
-   The ZDEALLOCATE command provides compatibility  with  some  other  GT.M
-   implementations. The M Development Committee choose to add the + and -
-   delimiters to the LOCK command rather  than  adopt  the  ZALLOCATE  and
-   ZDEALLOCATE approach. Therefore, when a design requires an incremental
-   lock mechanism, LOCK +/- has the advantage  of  being  part  of  the  M
-   standard. LOCK +/- also has the advantage of working symmetrically when
-   routines using LOCKs are nested.
-
-   The format of the ZDEALLOCATE command is:
-
-
-   ZD[EALLOCATE][:tvexpr] [nref[,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command
-
-   o    The nref argument specifies a name in the format  of  a  GT.M  name
-        with or without subscripts and with or without a leading caret (^).
-
-   o    A  ZDEALLOCATE  with  no  argument  releases  all  names  currently
-        reserved with ZALLOCATE by the process; in this case, at least two
-        (2) spaces must follow the ZDEALLOCATE to separate it from the next
-        command on the line.
-
-   o    ZDEALLOCATEing a named resource that is not currently owned by the
-        process has no effect.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZDEALLOCATE arguments form a legal  argument  for  a
-        ZDEALLOCATE.
-
-1 ZEDIT
-   ZEDit
-
-   The ZEDIT command invokes the OpenVMS  Text  Processing  Utility  (TPU)
-   section file for GT.M and opens the specified file for editing.
-
-   By default, ZEDIT puts a new file into the first  source  directory  in
-   $ZROUTINES. Previously, it used the current working directory. The old
-   behavior can be obtained by specifying the  current  working  directory
-   explicitly in the argument to the ZEDIT command:
-
-   o    ZEDIT "[]file"
-
-   The format of the ZEDIT command is:
-
-
-   ZED[IT][:tvexpr] [expr1[:expr2][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional first expression specifies the RMS file-specification
-        of a file to edit; note the argument is an expression rather than a
-        routinename; ZEDIT rejects arguments of file type .OBJ as illegal.
-
-   o    If ZEDIT has an argument, it not only invokes the editor, but also
-        sets $ZSOURCE=expr1.
-
-   o    If ZEDIT has no argument or expr1="", the command acts as  a  ZEDIT
-        $ZSOURCE; at least two (2) spaces must follow a ZEDIT command with
-        no argument to separate it from the next command on the line.
-
-   o    GT.M stores source code in files  with  standard  operating  system
-        format; generally the file name is the same as the GT.M routinename
-        with a default type of .M.
-
-   o    The optional second  expression  specifies  a  string  holding  TPU
-        qualifiers, each delimited by a slash (/); the  qualifiers  control
-        special TPU processing options
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZEDIT arguments form a legal argument for a ZEDIT
-
-   If the expression  includes  a  directory,  ZEDIT  searches  only  that
-   directory. If $ZROUTINES is not null, a ZEDIT  command  that  does  not
-   specify a directory uses $ZROUTINES to locate files. If  $ZROUTINES  is
-   null, ZEDIT edits a new file in the first source directory specified in
-   $ZROUTINES.
-
-   When the argument to a ZEDIT includes  a  file-specification,  $ZSOURCE
-   maintains that as a default for ZEDIT and
-   ZLINK.
-
-   The  /READONLY  qualifier  instructs  TPU  to  make  the  buffer
-   non-modifiable. The  /MODIFIABLE  qualifier  in  conjunction  with  the
-   /READONLY qualifier makes the  buffer  modifiable,  but  TPU  does  not
-   automatically write the buffer to disk when it exits  the  session.  By
-   default, /NOREADONLY, TPU maintains a journal file of the session.
-
-   The /RECOVER qualifier instructs TPU to read a specified  journal  file
-   at the beginning of the editing session and to restore all commands in
-   that journal file. /RECOVER restores edits after a system interruption.
-   To recover a session, set all terminal  characteristics  such  as  page
-   width or length to the same state as they  had  at  the  start  of  the
-   editing session being recovered. By default, ZEDIT starts a new session
-   rather than a /RECOVER.
-
-   For more information on these and other TPU edit qualifiers,  refer  to
-   the VMS Text Processing Utility Reference Manual.
-
-   You may wish to customize your editor.  The  logical  name  TPU$SECTION
-   specifies the TPU image invoked by ZEDIT. The logical name TPU$COMMAND
-   specifies a file containing TPU commands that customize  your  standard
-   editor by adding to the TPU image at invocation. You may place commands
-   to tailor EVE, the default TPU editor, in the file EVE$INIT.EVE in your
-   login  directory.  Alternatively,  you  can  define  the  logical  name
-   EVE$INIT to specify a file used at invocation to tailor EVE.  For  more
-   information on TPU, refer to the VMS Text Processing Utility Reference
-   Manual.
-
-2 Ex_of_ZEDit
-   Examples of ZEDIT
-
-   Example:
-
-
-   $ CREATE EVE$INIT.EVE
-
-   SET KEYPAD EDT
-
-   SET CURSOR BOUND
-
-   SET RIGHT MARGIN 132
-
-   SET WIDTH 132
-
-   <CTRL Z>
-
-   $ DEFINE EVE$INIT SYS$LOGIN:EVE$INIT.EVE
-
-   This creates an EVE$INIT file that sets the EVE keypad  and  cursor  to
-   emulate EDT and assigns the appropriate logical name to the  file.  The
-   last two commands in the file put the editor and the  terminal  in  132
-   column mode.
-
-   Example:
-
-
-   GTM>ZEDIT "BAL"
-
-   This invokes the editor for a file with a name of BAL and an extension
-   of .M. Notice that BAL is a string literal.
-
-   Example:
-
-
-   GTM>SET prog="BAL"
-
-   GTM>ZEDIT prog
-
-   This is similar to the first example except that  it  uses  a  variable
-   argument rather than a string literal.
-
-   Example:
-
-
-   GTM>ZEDIT "LOGIN.COM"
-
-   This invokes the editor for a file with the name LOGIN and an extension
-   of .COM. In this case the file is not a GT.M file.
-
-1 ZGOTO
-   ZGoto
-
-   The ZGOTO command transfers control  to  various  levels  in  the  GT.M
-   invocation stack. It also can transfer control from  one  part  of  the
-   routine to another or from one routine to another using  the  specified
-   entryref.
-
-   The format of the ZGOTO command is:
-
-
-   ZG[OTO][:tvexpr] [[intexpr][:entryref
-
-   [:tvexpr]],...]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional integer expression specifies the stack  frame  nesting
-        level reached by performing the ZGOTO.
-
-   o    A ZGOTO with no argument returns control to the next command at the
-        bottom of the stack (level 1); in  this  case,  at  least  two  (2)
-        spaces must follow the command to separate it from the next command
-        on the line.
-
-   o    The optional entryref specifies a location to which ZGOTO transfers
-        control.
-
-   o    If ZGOTO specifies no entryref, it  returns  control  to  the  next
-        command at the level specified by the integer expression.
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        entryref  specifies  the  argument  postconditional  and  controls
-        whether GT.M uses the argument.
-
-   o    If the ZGOTO includes the level and  the  argument  postconditional
-        but  not  the  entryref,  two  colons  (::)  separate  the  integer
-        expression from the truth-valued expression.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZGOTO arguments form a legal argument for a ZGOTO.
-
-   A ZGOTO command with an entryref performs a  similar  function  to  the
-   GOTO command, with the additional capability of reducing the GT.M stack
-   level. In a  single  operation,  ZGOTO  executes  ($ZLEVEL  -  intexpr)
-   implicit QUITs and a GOTO operation, transferring control to the named
-   entryref.
-
-   The ZGOTO command leaves the invocation stack at the level specified by
-   the integer expression. GT.M implicitly terminates any intervening FOR
-   loops and unstacks variables stacked with NEW commands as appropriate.
-
-   Using ZGOTO results in an exit from the current GT.M invocation. ZGOTO
-   resembles HALT (and not QUIT) in that it causes an exit  regardless  of
-   the number of active levels in the current invocation. ZGOTO resembles
-   QUIT (and not HALT) in that it destroys the GT.M context and terminates
-   the process only if the current GT.M invocation is at the base  of  the
-   process. Understanding the difference between ZGOTO  and  HALT  has  an
-   impact only in an environment where  GT.M  is  invoked  recursively  by
-   means of the external calling syntax or from other languages.
-
-   ZGOTO  $ZLEVEL:LABEL^ROUTINE  produces  identical  results  to  GOTO
-   LABEL^ROUTINE. ZGOTO  $ZLEVEL-1  responds  like  a  QUIT  (followed  by
-   ZCONTINUE, if in Direct Mode). If the integer expression evaluates to a
-   value greater than the current value of $ZLEVEL or less than zero (0),
-   GT.M issues a run-time error.
-
-   If ZGOTO has no entryref, it performs some number of implicit QUITs and
-   transfers control to the next command at the specified level. If ZGOTO
-   has no argument, it behaves like ZGOTO 1, which  resumes  operation  of
-   the lowest level GT.M routine as displayed by ZSHOW "S". In  the  image
-   invoked by MUMPS/DIRECT or a similar image, a ZGOTO  without  arguments
-   returns the process to Direct Mode.
-
-   ZGOTO provides a useful debugging tool in Direct Mode. However, because
-   ZGOTO is not conducive to structured coding, it is best to restrict its
-   use in production programs to error handling.For  more  information  on
-   error handling,  refer  to  the  "Error  Processing"  chapter  in  GT.M
-   Programmer's Guide.
-
-2 Ex_of_ZGOTO
-   Examples of ZGOTO
-
-   Example:
-
-
-   GTM>ZGOTO
-
-   %GTM-I-BREAK, Break instruction encountered
-
-   At M source location +1^GTM$DMOD
-
-   GTM>ZSHOW
-
-
-   +1^GTM$DMOD (Direct mode)
-
-   GTM>
-
-   This uses ZGOTO to clear all levels of the GT.M invocation stack. ZSHOW
-   with no arguments displays the stack.
-
-   Example:
-
-
-   SET $ZTRAP="ZGOTO "_$ZLEVEL_":^ERROR"
-
-   This SETs $ZTRAP to contain a ZGOTO, so if  an  error  causes  GT.M  to
-   XECUTE $ZTRAP, the routine ERROR executes at the same level as the SET
-   command shown in the example.
-
-1 ZHELP
-   ZHelp
-
-   The ZHELP command provides access to help information from the GTM help
-   library or from any help library specified in the command argument.
-
-   The format of the ZHELP command is:
-
-
-   ZH[ELP][:tvexpr] [expr1[:expr2],...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional first expression specifies the help topic.
-
-   o    If ZHELP has no argument or  expr1="",  ZHELP  invokes  base  level
-        help; at least two (2) spaces must follow a ZHELP command  with  no
-        argument to separate it from the next command on the line.
-
-   o    The optional second expression specifies the help  file  containing
-        ^HELP.
-
-   o    If  ZHELP  does  not  specify  the  second  expression,  the  help
-        file-specification defaults to GTM$HELP:M.HLB.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZHELP arguments form a legal argument for a ZHELP
-
-2 Ex_of_ZHelp
-   Examples of ZHELP
-
-   Example:
-
-
-   GTM>zhelp "func $data"
-
-   This lists the  help  for  function  $DATA,  which  is  a  subtopic  of
-   functions topic.
-
-   Example:
-
-
-   GTM>ZHELP "lexical":"SYS$HELP:HELPLIB"
-
-   This uses ZHELP to invoke the standard VMS help library, looking up the
-   topic "lexical" in that library.
-
-   Example:
-
-
-   $ DEFINE GTM$HELP LAB:[TEST]
-
-   $ GTM
-
-   GTM>ZHELP "":"APPL.HLB"
-
-   This uses the DCL command DEFINE to  point  GTM$HELP  to  a  user  help
-   library directory. The ZHELP command then invokes the base  level  help
-   in the library APPL.HLB.
-
-1 ZLINK
-   ZLink
-
-   If the current image does not contain a copy of a  routine,  the  ZLINK
-   command adds an executable GT.M routine to the current  image.  If  the
-   current image contains a copy of a  routine  and  the  routine  is  not
-   active, the ZLINK command replaces the current  routine  image  with  a
-   "new" version. If necessary, the ZLINK  command  compiles  the  routine
-   prior to integrating it with the image.
-
-   The format of the ZLINK command is:
-
-
-   ZL[INK][:tvexpr] [expr1[:expr2][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional first expression specifies the file-specification of a
-        routine to ZLINK; if ZLINK has an argument, it not  only  adds  the
-        routine to the image, but also sets $ZSOURCE=expr.
-
-   o    If ZLINK has no argument, or expr1="", it uses value of $ZSOURCE as
-        the routine; at least two (2) spaces must follow  a  ZLINK  command
-        with no argument to separate it from the next command on the line.
-
-   o    The optional second expression specifies  a  string  holding  MUMPS
-        command qualifiers delimited by a slash (/); the qualifiers control
-        compile options when the current ZLINK requires a compile; if ZLINK
-        omits  the  second  expression,  the  command  uses  the  $ZCOMPILE
-        intrinsic special variable to determine the compile qualifiers.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZLINK arguments form a legal argument for a ZLINK.
-
-   ZLINK cannot change a routine that  GT.M  is  currently  executing.  An
-   attempt to ZLINK an active routine results in a run-time error because
-   changing a routine in progress could have unpredictable results. Before
-   ZLINKing the routine, use the ZSHOW command to  display  the  currently
-   active routines, then remove it from the GT.M stack using ZGOTO, or the
-   appropriate number of QUITs.
-
-   When the ZLINK command specifies a file, GT.M  sets  $ZSOURCE  to  that
-   file-specification. By default, ZLINK and  ZEDIT  use  $ZSOURCE  for  a
-   specification when they have a missing or null argument.  A  subsequent
-   ZLINK without an argument is equivalent to ZLINK $ZSOURCE.
-
-   Because RMS does not permit the percent sign (%) in a file name, use an
-   underscore (_) in place of the percent in the ZLINK file-specification
-   for routines beginning with a percent sign.
-
-   If the expression includes an explicit directory, ZLINK  searches  only
-   that directory. Otherwise, if $ZROUTINES is not null, a  ZLINK  command
-   uses $ZROUTINES to locate files. If $ZROUTINES is null, ZLINK uses the
-   current directory.
-
-   If the file-specification contains an explicit file  type  (extension),
-   ZLINK processes the file according to the type, object (.OBJ) or source
-   (usually .M.). If the file-specification does not specify a file type,
-   ZLINK attempts to find and match both  the  object  and  source  for  a
-   routine.
-
-2 ZLINK_Compilation
-   ZLINK Compilation
-
-   If ZLINK compiles  a  routine  and  the  /OBJECT=  qualifier  does  not
-   redirect the output,  it  places  the  resulting  object  file  in  the
-   directory indicated by the search criteria. ZLINK incorporates the new
-   object file into the image, regardless of its directory placement.
-
-   If the command does not specify compile  qualifiers  (with  expr2)  and
-   $ZCOMPILE is null, GT.M uses the default M command qualifiers, /IGNORE,
-   /LABELS=LOWER, /NOLIST, and /OBJECT. For more information on $ZCOMPILE,
-   refer to the appropriate section in the "Intrinsic Special Variables".
-
-   For information on producing object files, but not adding them  to  the
-   current image, refer to ZCOMPILE.
-
-2 Ex_of_ZLink
-   Examples of ZLINK
-
-   Example:
-
-
-   GTM>ZLINK "test"
-
-   If ZLINK finds test.M or test.OBJ, it adds the routine  "test"  to  the
-   current image. If ZLINK does not find test.OBJ, or finds that test.OBJ
-   is older than test.M, GT.M compiles test.M to produce a  new  test.OBJ,
-   and adds the contents of the new object file to the image.
-
-   Example:
-
-
-   GTM>
-
-   ZLINK "test.m":"/noobject/list"
-
-   This compiles the routine "test" and produces a listing but  no  object
-   file. Because the example produces no object file, it does  not  change
-   the current image.
-
-   Example:
-
-
-   GTM>ZLINK "[smith]mode.M":"/obj=[]"
-
-   This compiles mode.M, in the directory [smith], to produce mode.OBJ in
-   the current default directory, and then includes the new object file in
-   the current image.
-
-2 Auto_ZLink
-   Auto-ZLINK
-
-   If a GT.M routine refers to a routine that is not linked  to  the  GT.M
-   image, GT.M automatically attempts to ZLINK that routine. An auto-ZLINK
-   is functionally equivalent to an explicit ZLINK of a routine without a
-   specified directory or file extension.
-
-   The following GT.M commands and functions can initiate auto-ZLINKing:
-
-   DO
-
-   GOTO
-
-   ZBREAK
-
-   ZGOTO
-
-   ZPRINT
-
-   $TEXT()
-
-   GT.M auto-ZLINKs the routine if the following conditions are met:
-
-   o    ZLINK can locate and process the routine file, as indicated in the
-        previous ZLINK Operation Summary table
-
-   o    The name of the routine is the same as the name of the source file;
-        the only exception is  in  cases  where  GT.M  converts  a  leading
-        percent sign (%) in a file name to an underscore (_)
-
-   o    For DO, GOTO and ZGOTO, the reference must be through code added to
-        the  image  by  GT.M,  that  is,  previously  ZLINKed,  XECUTEd  or
-        referenced through indirection; in other  words,  explicit  routine
-        references using these commands that are not resolved  by  the  VMS
-        LINKER can not be auto-ZLINKed; this restriction does not apply for
-        ZBREAK, ZPRINT, and $TEXT()
-
-2 ZL_AutoZL_and_Rtn_Nam
-   ZLINK, Auto-ZLINK and Routine Names
-
-   In GT.M, the name of the source file determines the name  of  the  GT.M
-   routine. The file-specification of the object file is not  required  to
-   match the name of the  routine.  Linking  the  object  file  makes  the
-   internal routine name (derived from the source  file)  known  to  GT.M.
-   This can lead to potential confusion, however,  since  both  ZLINK  and
-   auto-ZLINK use the name of the object file to find  the  routine.  When
-   the object file name differs from the name of the  routine,  auto-ZLINK
-   generates a run-time error.
-
-   Example:
-
-
-   $ TYPE DM.M
-
-
-   $ TYPE NAME.M
-
-   WRITE "This is routine NAME.",!
-
-   $ M NAME/OBJ=NAME1,DM
-
-   $ GTM
-
-
-   GTM>DO ^NAME1
-
-   %GTM-E-ZLINKFILE, Error while zlinking "NAME1"
-
-   -GTM-E-ZLMODULE, Object file name does not match
-
-   module name: NAME
-
-   GTM>DO ^NAME
-
-   This is routine NAME.
-
-   GTM>HALT
-
-
-   $ LINK DM,NAME1
-
-   $ RUN DM
-
-
-   GTM>DO ^NAME
-
-   This is routine NAME.
-
-   GTM>DO ^NAME1
-
-   %GTM-E-ZLINKFILE, Error while zlinking "NAME1"
-
-   -GTM-E-ZLMODULE, Object file name does not match
-
-   module name: NAME
-
-   GTM>HALT
-
-   Note that, in the above example, auto-ZLINK does link the  object  file
-   to the image, even though it  raises  an  error.  The  routine  becomes
-   available under the internal routine name.
-
-1 ZKILL
-   ZKill
-
-   The ZKILL command KILLs the data value  for  a  variable  name  without
-   affecting the nodes descended from that node.
-
-   The format of the ZKILL command is:
-
-
-   ZK[ILL][:tvexpr] glvn
-
-   The  functionality  of  ZKILL  is  identical  to  ZWITHDRAW.  For  a
-   comprehensive description of the format and usage, refer to  the  entry
-   for ZWITHDRAW.
-
-1 ZMESSAGE
-   ZMessage
-
-   The ZMESSAGE command signals a specified condition.
-
-   The format of the ZMESSAGE command is:
-
-
-   ZM[ESSAGE][:tvexpr] intexpr
-
-   [:expr...][,...]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required integer expression specifies the  exception  condition
-        to signal.
-
-   o    The additional expressions specify one or more  strings  passed  as
-        ASCII text to the VMS message formatter by  means  of  descriptors;
-        for example, if the message associated with the condition contains
-        a corresponding FAO !AD directive,  the  message  facility  inserts
-        each text string in the message. $ZMESSAGE() function  returns  the
-        message text with the substitution directives for a  given  message
-        number.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZMESSAGE arguments  form  a  legal  argument  for  a
-        ZMESSAGE.
-
-   For more information  on  Format  ASCII  Output  (FAO),  refer  to  the
-   description of the F$FAO lexical function in the VMS DCL Dictionary.
-
-2 Ex_of_ZMessage
-   Examples of ZMESSAGE
-
-   All of the following examples issue ZMESSAGE  from  Direct  Mode  where
-   exception conditions do not invoke $ZTRAP. ZMESSAGE allows you to feed
-   an undefined message number back into GT.M to  try  and  determine  the
-   message and/or mnemonic associated with it.
-
-   Example:
-
-
-   GTM>ZMESSAGE 340
-
-   %SYSTEM-F-IVLOGNAM, invalid logical name
-
-   This ZMESSAGE does not specify substitution text and the  message  does
-   not include any FAO directives.
-
-   Example:
-
-
-   GTM>ZMESSAGE 150372994
-
-   %GTM-E-GVUNDEF, Global Variable undefined:
-
-   The message  specified  by  this  ZMESSAGE  command  includes  FAO  !AD
-   directive but the command does not supply any text.
-
-   Example:
-
-
-   GTM>ZMESSAGE 150373850:"x"
-
-   %GTM-E-GVUNDEF, Undefined local variable: x
-
-   This ZMESSAGE command supplies the substitution text for the message.
-
-   VMS  treats  odd-numbered  conditions  as  "successful."  GT.M  handles
-   successful  conditions  by  displaying  the  associated  message  and
-   continuing execution. VMS treats even-numbered conditions as failures.
-   GT.M handles failure conditions by storing  the  error  information  in
-   $ZSTATUS and XECUTEing $ZTRAP or by terminating if $ZTRAP="". In Direct
-   Mode, GT.M only reports failure conditions to the principal device and
-   does not XECUTE $ZTRAP or set $ZSTATUS. For more information  on  error
-   handling, refer to the "Error Processing" chapter in GT.M Programmer's
-   Guide.
-
-1 ZPRINT
-   ZPrint
-
-   The ZPRINT command displays source code lines selected by its argument.
-
-   The format of the ZPRINT command is:
-
-
-   ZP[RINT][:tvexpr][entryref
-
-   [:label[+intexpr]][,...]]
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    A ZPRINT with no argument prints the entire current routine, which
-        is the routine closest to  the  top  of  an  invocation  stack,  as
-        displayed by a ZSHOW "S"; in this case, at  least  two  (2)  spaces
-        must follow the command to separate it from the next command on the
-        line.
-
-   o    The optional entryref specifies the location in a routine at which
-        to start printing; the entryref can include either a routinename or
-        a label plus a  routinename  in  the  format  LABEL^ROUTINENAME  or
-        LABEL+OFFSET^ROUTINENAME;  if  the  entryref  does  not  contain  a
-        routinename, ZPRINT defaults to the current routine.
-
-   o    The optional label following the entryref identifies a location at
-        which to stop printing; the optional integer  expression  specifies
-        an offset from  the  label;  the  label  and  offset  together  are
-        referred to as a lineref and this lineref identifies the last line
-        to print; if the offset is specified without the label, the offset
-        in the optional lineref is always counted from the beginning of the
-        routine, even when the entryref specifies a label.
-
-   o    If the ZPRINT argument includes the colon (:) delimiter,  then  the
-        argument must also include at least one component of  the  optional
-        lineref.
-
-   o    If  the  ZPRINT  argument  contains  only  the  entryref,  with  no
-        components of the optional lineref  and  the  entryref  contains  a
-        label or offset, ZPRINT displays only the one line that  occurs  at
-        that entryref.
-
-   o    If the entryref contains only a routinename,  ZPRINT  displays  the
-        entire routine.
-
-   o    If the entryref  contains  only  a  routinename  and  the  argument
-        includes the optional lineref, ZPRINT starts  the  display  at  the
-        beginning of the routine.
-
-   o    If the optional lineref specifies  a  line  prior  to  the  lineref
-        specified within the entryref, ZPRINT does not display any lines.
-
-   o    If the offset in the optional lineref specifies a line  beyond  the
-        end of the routine, ZPRINT displays the remainder of the routine.
-
-   o    If ZPRINT cannot locate the routine or if either of the labels does
-        not appear in the routine, ZPRINT issues an error.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZPRINT arguments form a legal argument for a ZPRINT.
-
-   Note that  the  routinename  may  only  appear  before  the  colon  (:)
-   delimiter. The integer expression offsets may be positive or negative,
-   but they must always be delimited by a plus sign (+).
-
-2 Ex_of_ZPrint
-   Examples of ZPRINT
-
-   Example:
-
-
-   GTM>ZPRINT X^RTN
-
-   This example displays the line  beginning  with  the  label  X  in  the
-   routine RTN.
-
-   Example:
-
-
-   GTM>ZPRINT X^RTN:X+5
-
-   GTM>ZPRINT X+-5^RTN:X
-
-   GTM>ZPRINT X^RTN:X+-5^RTN
-
-   The first line displays the line beginning with the  label  X  and  the
-   next 5 lines in routine RTN. The  second  line  displays  the  5  lines
-   preceding label X in the same routine and the line beginning with label
-   X. The third line generates a run-time error because the  routine  name
-   must appear only before the colon in the argument.
-
-1 ZSHOW
-   ZSHow
-
-   The  ZSHOW  command  displays  information  about  the  current  GT.M
-   environment.
-
-   The format of the ZSHOW command is:
-
-
-   ZSH[OW][:tvexpr][expr[:glvn][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional expression specifies one or more codes determining the
-        nature of the information displayed.
-
-   o    A ZSHOW with no argument defaults to ZSHOW "S"; in  this  case,  at
-        least two (2) spaces must follow the ZSHOW to separate it from the
-        next command on the line.
-
-   o    The  optional  global  or  local  variable  name  specifies  the
-        destination for the ZSHOW output; if the ZSHOW  argument  does  not
-        contain a global or local variable name, ZSHOW directs its display
-        to the current device ($IO).
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZSHOW arguments form a legal argument for a ZSHOW.
-
-2 ZSH_Info_Codes
-   ZSHOW Information Codes
-
-   A ZSHOW argument is an expression containing  codes  selecting  one  or
-   more types of information.
-
-        B displays active ZBREAK breakpoints
-        C displays available external call table entry names
-        D displays device information
-        I displays the current values of all intrinsic special variables
-        L displays GT.M LOCKs and ZALLOCATEs held by the process
-        S displays the GT.M invocation stack
-        V displays local variables
-        * displays all possible types of ZSHOW information
-   Codes may be upper- or lower-case. Invalid  codes  produce  a  run-time
-   error. Multiple occurrences of the same code in one ZSHOW argument only
-   produce one output instance of the corresponding information. The order
-   of the first appearance of the codes in  the  argument  determines  the
-   order of the corresponding output instances.
-
-        If you are using a local variable  destination  and  place  another
-        code ahead of "V", the effect is to have the results of the earlier
-        code also appear in the results of the "V" code.
-
-   If the wildcard (*) occurs in the list, ZSHOW uses the default order:
-
-   o    intrinsic special variables
-
-   o    $ZCALL table entry names
-
-   o    local variables
-
-   o    ZBREAK information
-
-   o    device information
-
-   o    LOCK and ZALLOCATE information
-
-   o    the GT.M stack
-
-2 Ex_of_ZSHow
-   Examples of ZSHOW
-
-   Example:
-
-
-   GTM>ZSHOW "db"
-
-   This command displays  all  devices  with  deviceparameters  reflecting
-   their current characteristics followed by any current ZBREAK locations
-   with their corresponding actions.
-
-   Example:
-
-
-   GTM>ZSHOW "dbd"
-
-   This command displays the same output as the previous example.
-
-   Example:
-
-
-   GTM>ZSHOW "ax"
-
-   This command generates a run-time error.
-
-   Example:
-
-
-   LAB1 DO LAB2
-
-   QUIT
-
-   LAB2 DO LAB3
-
-   QUIT
-
-   LAB3 ZSHOW
-
-   QUIT
-
-   Produces the results:
-
-
-   LAB3^RTN
-
-   LAB2^RTN
-
-   LAB1^RTN
-
-2 ZSH_Destination_Vars
-   ZSHOW Destination Variables
-
-   ZSHOW may specify an  unsubscripted  or  subscripted  global  or  local
-   variable name (glvn)  into  which  ZSHOW  places  its  output.  If  the
-   argument does not include  a  global  or  local  variable  name,  ZSHOW
-   directs its output to the current device.
-
-   When ZSHOW directs its output to a variable,  it  adds  two  levels  of
-   descendants to that variable. The  first  level  subscript  contains  a
-   one-character string from the set of  upper-case  ZSHOW  action  codes,
-   identifying  the  type  of  information.  ZSHOW  implicitly  KILLs  all
-   descendants of the first level nodes. ZSHOW stores information elements
-   at the second level using ascending integers, starting at 1.
-
-   When a ZSHOW "V" directs its output to  a  local  variable  (lvn),  the
-   result does not contain a copy of the descendants of the resulting "V"
-   node.
-
-   Example:
-
-
-   GTM>KILL ZSHOW "s":a ZWRITE
-
-   a("S",1)="+1^GTM$DMOD (Direct Mode) "
-
-   GTM>
-
-   This ZSHOW stores the base level M/DIRECT stack in the  local  variable
-   a.
-
-   Example:
-
-
-   GTM>KILL SET b(1,"two")="test" ZSHOW "v":a ZWR
-
-   a("V",1)="b(1,""two"")=""test"""
-
-   b(1,"two")="test"
-
-   GTM>
-
-   This ZSHOW stores all local variables in the  local  variable  a.  Note
-   that ZSHOW does not replicate a("V") and a("V",1).
-
-   Example:
-
-
-   GTM>KILL SET a(1,"D",3,5)="stuff",a(1,"X",2)="",a(1)=1
-
-   GTM>ZSH "d":a(1)
-
-   GTM>ZWRITE
-
-   a(1)=1
-
-   a(1,"D",1)="_TNA7341: OPEN TERMINAL EDIT NOESCA HOST IN NOPAST NOREADS
-   TTSY TYPE WIDTH=80 LENG=24"
-   a(1,"X",2)=""
-
-   GTM>
-
-   This ZSHOW stores the  current  open  device  information  under  a(1).
-   Notice how the ZSHOW deletes a(1,"D",3,5).
-
-   Example:
-
-
-   GTM>KILL ^ZSHOW
-
-   GTM>ZB -*,lab^rout ZSH "B":^ZSHOW
-
-   GTM>ZWRITE ^ZSHOW
-
-   ^ZSHOW("B",1)="LAB^ROUT"
-
-   GTM>
-
-   This ZSHOW stores the  current  ZBREAK  information  under  the  global
-   variable ^ZSHOW.
-
-2 Use_of_ZSHow
-   Use of ZSHOW
-
-   Use ZSHOW as
-
-   o    a debugging tool to display information on the environment.
-
-   o    an error-handling tool to  capture  context  information  after  an
-        unpredictable error with output directed to a sequential file or a
-        global.
-
-   o    part of a context-switching mechanism in a server program that must
-        manage multiple contexts.
-
-   o    a development tool to determine the ZCALL table  entries  available
-        from the current image.
-
-   To prevent confusing data interactions, avoid  directing  ZSHOW  output
-   into variables holding other kinds of information and  directing  ZSHOW
-   "V" output into local variables. For a  comparison  of  ZSHOW  "V"  and
-   ZWRITE, refer to the ZWRITE section in the "Commands" chapter  in  GT.M
-   Programmer's Guide.
-
-1 ZSTEP
-   ZSTep
-
-   The ZSTEP command provides the ability to control GT.M execution. When
-   a ZSTEP  is  issued  from  Direct  Mode,  execution  continues  to  the
-   beginning of the next target line  and  then  GT.M  XECUTEs  the  ZSTEP
-   action. The keyword in the optional ZSTEP argument determines the class
-   of eligible target lines.
-
-   The format of the ZSTEP command is:
-
-
-   ZST[EP][:tvexpr] [keyword[:expr]][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional keyword specifies the nature of the step; the keywords
-        are INTO, OVER, and OUTOF.
-
-   o    A ZSTEP with no argument performs the default action OVER; in this
-        case, at least two (2) spaces must follow the ZSTEP to separate it
-        from the next command on the line, which will be ignored.
-
-   o    The optional expression specifies GT.M  code  to  XECUTE  when  the
-        ZSTEP arrives at its destination.
-
-   o    If the ZSTEP argument does  not  contain  an  expression  argument,
-        ZSTEP defaults the action to the value of $ZSTEP, which defaults to
-        "BREAK."
-
-   The ZSTEP argument keywords are not  expressions  and  ZSTEP  does  not
-   accept argument indirection.
-
-   In Direct Mode, ZSTEP performs an implicit ZCONTINUE and therefore GT.M
-   ignores all commands on the Direct Mode command line after the ZSTEP.
-
-   The keyword arguments define the class of lines where ZSTEP next pauses
-   execution to XECUTE the ZSTEP action. When a ZSTEP command has multiple
-   arguments, it ignores all arguments except the last.
-
-2 ZSTEP_Into
-   ZSTEP Into
-
-   ZSTEP INTO pauses at the beginning of  the  next  line,  regardless  of
-   transfers of control. When the ZSTEPed line invokes another routine or
-   a subroutine in the current routine, ZSTEP INTO  pauses  at  the  first
-   line of code associated with the new GT.M stack level.
-
-2 ZSTEP_OUtof
-   ZSTEP OUtof
-
-   ZSTEP OUTOF pauses at the beginning of the next line executed after an
-   explicit or implicit QUIT from the current GT.M invocation stack level.
-   A ZSTEP OUTOF does not pause at lines associated with the current GT.M
-   stack level or with levels invoked from the current level.
-
-2 ZSTEP_OVer
-   ZSTEP OVer
-
-   ZSTEP OVER pauses at the  beginning  of  the  next  line  in  the  code
-   associated with either the current GT.M stack level or a previous GT.M
-   stack level if the ZSTEPed line contains an explicit or  implicit  QUIT
-   from the current level. A ZSTEP OVER does not pause  at  lines  invoked
-   from the current line by DOs, XECUTEs or extrinsics.
-
-2 ZSTEP_Actions
-   ZSTEP Actions
-
-   The optional action parameter of a ZSTEP  must  contain  an  expression
-   evaluating to valid GT.M code. By default,  ZSTEP  uses  the  value  of
-   $ZSTEP, which defaults to "B" ("BREAK"), and enters Direct Mode. When a
-   ZSTEP command specifies an action, the process does  not  enter  Direct
-   Mode unless the action explicitly includes a BREAK command.
-
-2 ZSTEP_Interact
-   ZSTEP Interactions
-
-   ZSTEP currently interacts with  certain  other  elements  in  the  GT.M
-   environment.
-
-   o    If a <CTRL-C> or a CTRAP character arrives  at  certain  points  in
-        ZSTEP processing, there is a  small  chance  GT.M  may  ignore  the
-        <CTRL-C> or CTRAP; in a later release,  <CTRL-C>  and  CTRAPs  will
-        always have priority over ZSTEP.
-
-   o    If GT.CM reports an asynchronous network error, a ZSTEP  may  cause
-        the  network  error  to  go  unreported;  the  chance  of  such  an
-        occurrence is small and the chance the error would subsequently be
-        reported is high; in a later release, network errors will always be
-        given priority over ZSTEP.
-
-2 Use_of_ZSTEP
-   Use of ZSTEP
-
-   Use ZSTEP to incrementally execute a routine  or  series  of  routines.
-   Execute any GT.M command from Direct Mode at any ZSTEP pause. To resume
-   normal execution, use ZCONTINUE.
-
-   Note that ZSTEP arguments are keywords rather than expressions. They do
-   not allow indirection, and argument lists have no utility.
-
-   ZSTEP actions that include commands followed by a  BREAK  perform  some
-   action before entering Direct Mode. ZSTEP actions that do not include a
-   BREAK perform the command action  and  continue  execution.  Use  ZSTEP
-   actions that issue conditional BREAKs and subsequent ZSTEPs to do such
-   things as test for changes in the value of a variable.
-
-2 Ex_of_ZSTEP
-   Examples of ZSTEP
-
-   Example:
-
-
-   GTM>ZSTEP INTO:"W ! ZP @
-
-   $ZPOS W !"
-
-   This ZSTEP resumes execution of the current routine. At  the  beginning
-   of the next line executed, the ZSTEP action ZPRINTs the source code for
-   that line. Because the  specified  action  does  not  contain  a  BREAK
-   command, execution continues to the next line and all subsequent lines
-   in the program flow.
-
-   Example:
-
-
-   GTM>S curx=$g(x),zact="ZST:curx=$g(x) I:zact B:curx'=$g(x)"
-
-   GTM>ZSTEP INTO:zact
-
-   This sequence uses ZSTEP to invoke Direct Mode at the beginning of the
-   first line after the line that alters the value of x.
-
-1 ZSYSTEM
-   ZSYstem
-
-   The ZSYSTEM command creates a subprocess of the current  process  in  a
-   fashion analogous to the DCL SPAWN command.
-
-   The format of the ZSYSTEM command is:
-
-
-   ZSY[STEM][:tvexpr] [expr[:tvexpr][,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional expression specifies the command passed to the Command
-        Language Interpreter  (CLI),  usually  DCL;  after  processing  the
-        command, CLI returns control to GT.M.
-
-   o    If ZSYSTEM has no argument or expr="", the CLI  prompts  for  input
-        until provided with an exit command; at least two (2)  spaces  must
-        follow a ZSYSTEM command with no argument to separate it  from  the
-        next command on the line.
-
-   o    The  optional  truth-valued  expression  following  the  argument
-        expression specifies  the  argument  postconditional  and  controls
-        whether ZSYSTEM processes that argument.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZSYSTEM  arguments  form  a  legal  argument  for  a
-        ZSYSTEM.
-
-   The ZSYSTEM command creates a new process and passes its argument to a
-   Command Language Interpreter (generally DCL)  for  execution.  The  new
-   process executes in the same directory as the initiating  process.  The
-   new process has the same operating system environment, such as logical
-   names  and  input/output  devices,  as  the  initiating  process.  The
-   initiating process  pauses  until  the  new  process  completes  before
-   continuing execution. The return  status  of  the  spawned  process  is
-   reflected in $ZSYSTEM.
-
-   Note that, like any other VMS-spawned process,  a  process  created  by
-   ZSYSTEM acquires the privileges currently held by its parent process at
-   the time of its creation.
-
-   If a ZSYSTEM command has multiple arguments, it starts  a  new  process
-   for each argument, one at a time. ZSYSTEM  waits  for  one  process  to
-   complete before starting the next one.
-
-   A ZSYSTEM with a null argument causes CLI to prompt on SYS$OUTPUT, and
-   accept commands from SYS$INPUT, until it receives a DCL LOGOUT command
-   or other input terminator. For an interactive process, both SYS$OUTPUT
-   and SYS$INPUT generally translate to the  user's  terminal.  A  ZSYSTEM
-   with no arguments is equivalent to a ZSYSTEM with a single null string
-   argument.
-
-   If a command postconditional  is  false,  GT.M  does  not  process  the
-   ZSYSTEM command. If an argument postconditional is false, GT.M does not
-   process that argument.
-
-   Issuing a ZSYSTEM command inside a transaction destroys  the  Isolation
-   of  that  transaction.  Because  of  the  way  that  GT.M  implements
-   transaction processing, a ZSYSTEM within a transaction  may  suffer  an
-   indefinite number of restarts ("live lock").
-
-   The flags arguments used by GT.M to call the OpenVMS function LIB$SPAWN
-   to implement the ZSYSTEM command can be set in GTM$DEFAULTS.MAR with a
-   GTM$USER_SPAWN_FLAG == n line, where the  bits  in  n  specify  various
-   properties as below. Since the exact values are subject  to  change  by
-   Hewlett-Packard, please validate your  choice  using  the  OpenVMS  RTL
-   Library Manual and the  include  files  in  SYS$LIBRARY.  In  order  to
-   prevent unauthorized subversion of OpenVMS security, the default value
-   (0), will be used unless both GTMSHR.EXE and the application image are
-   installed with the CMEXEC privilege.
-
-        NOWAIT 1
-        NOCLISYM 2
-        NOLOGNAM 4
-        NOKEYPAD 8
-        NOTIFY 16
-        NOCONTROL 32
-        TRUSTED 64
-        AUTHPRIV 128
-        SUBSYSTEM 256
-2 Ex_of_ZSYSTEM
-   Examples of ZSYstem
-
-   Example:
-
-
-   GTM>ZSYSTEM "DIR *.M"
-
-   This uses ZSYSTEM to spawn a process that then performs the DCL command
-   files with a type for GT.M source files. Once  the  command  completes,
-   the spawned process terminates.
-
-   Example:
-
-
-   GTM>ZSYSTEM
-
-   $
-
-   This ZSYSTEM has no argument so the spawned process prompts for input.
-
-1 ZTCOMMIT
-   ZTCommit
-
-   The ZTCOMMIT command marks the end of a logical  transaction  within  a
-   GT.M program. ZTCOMMIT used with ZTSTART  "fences"  transactions  (that
-   is, marks the end and beginning). Fencing transactions allows the MUPIP
-   JOURNAL  facility  to  prevent  incomplete  application  transactions
-   consisting of multiple  global  updates  from  affecting  the  database
-   during a database recovery.
-
-   The format of the ZTCOMMIT command is:
-
-
-   ZTC[OMMIT][:tvexpr] [intexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional integer expression specifies the number  of  currently
-        open ZTSTARTs for the ZTCOMMIT to close.
-
-   o    A ZTCOMMIT with no argument closes one ZTSTART; in  this  case,  at
-        least two (2) spaces must follow the command to  separate  it  from
-        the next command on the line;  with  an  argument  of  0,  ZTCOMMIT
-        closes all open ZTSTARTs.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZTCOMMIT arguments  form  a  legal  argument  for  a
-        ZTCOMMIT.
-
-   When an application requires sub-transactions, it may nest ZTSTARTs and
-   ZTCOMMITs to a maximum depth of 255. However, a ZTCOMMIT  must  "close"
-   the outer-most ZTSTART  before  journaling  accepts  any  part  of  the
-   "transaction" as complete.
-
-2 Ex_of_ZTCommit
-   Examples of ZTCOMMIT
-
-   Example:
-
-
-   GTM>ZTCOMMIT 0
-
-   This ZTCOMMIT issued from Direct Mode would close any open ZTSTARTs.
-
-   Example:
-
-1 ZTSTART
-   ZTStart
-
-   The ZTSTART command marks the beginning of a logical transaction within
-   a GT.M program. ZTSTART and ZTCOMMIT  "fence"  transactions  (that  is,
-   mark the beginning and end).  Fenced  transactions  prevent  the  MUPIP
-   JOURNAL facility from recovering incomplete transactions. All ZTSTARTs
-   must be matched with ZTCOMMITs before the journal  processing  facility
-   recognizes the transaction as complete.
-
-   The format of the ZTSTART command is:
-
-
-   ZTS[TART][:tvexpr]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    Because ZTSTART has no argument,  at  least  two  (2)  spaces  must
-        follow the command to separate it from  the  next  command  on  the
-        line.
-
-   For more information on Journaling and transaction  fencing,  refer  to
-   the section on ZTCOMMIT and the "GT.M Journaling" chapter in  the  GT.M
-   Administration and Operations Guide.
-
-2 Ex_of_ZTStart
-   Examples of ZTSTART
-
-   Example:
-
-
-   LOCK ^P(t)
-
-   ZTSTART
-
-   SET ^P(t)=prec,^($H)=$G(^P(t,+$H))+1,^(+$H,s)=hrec
-
-   ZTCOMMIT
-
-   LOCK
-
-   This uses a LOCK on ^P(t) to serialize  the  transaction.  The  logical
-   transaction consists of three global sets that are  enclosed  within  a
-   ZTSTART and a ZTCOMMIT.
-
-   Example:
-
-
-   BASE DO WORK
-
-   QUIT
-
-   GRP LOCK ^FAM(prn)
-
-   SET b=^FAM(prn)
-
-   ZTSTART
-
-   FOR i=1:1:$L(b,"|") D GET,WORK
-
-   ZTCOMMIT
-
-   LOCK
-
-   QUIT
-
-   WORK LOCK +^ACT(acct)
-
-   ZTSTART
-
-   SET ^ACT(acct)=actrec
-
-   SET ^ACTX(lname,fname,acct)=""
-
-   ZTCOMMIT
-
-   LOCK -^ACT(acct)
-
-   This has a sub-routine  WORK,  which  BASE  invokes  directly  and  GRP
-   invokes to perform a sub-transaction.
-
-1 ZWITHDRAW
-   ZWIthdraw
-
-   The ZWITHDRAW command KILLs the data value for a variable name without
-   affecting the nodes descended from that node.
-
-   The format of the ZWITHDRAW command is:
-
-
-   ZWI[THDRAW][:tvexpr] glvn
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The global or local variable name identifies the variable for which
-        ZWITHDRAW removes the data value.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZWITHDRAW arguments form  a  legal  argument  for  a
-        ZWITHDRAW.
-
-   ZWITHDRAW provides a tool to quickly restore a node to a state where it
-   has descendants and no value-that is, where $DATA for  that  node  will
-   have a value of 10-for the case where such a  state  has  some  control
-   meaning. GT.M also  provides  the  ZKILL  command,  with  functionality
-   identical to ZWITHDRAW.
-
-2 Ex_of_ZWIthdraw
-   Examples of ZWITHDRAW
-
-   Example:
-
-
-   KILL A
-
-   SET A="A",A(1)=1,A(1,1)=1
-
-   WRITE $D(A(1)),!
-
-   ZWITHDRAW A(1)
-
-   WRITE $D(A(1)),!
-
-   ZWRITE A
-
-   QUIT
-
-   produces the result:
-
-
-   11
-   10
-   A="A"
-
-   A(1,1)=1
-
-   This sets up local variables A and A(1) and A(1,1). It then deletes the
-   data for A(1) with ZWITHDRAW. The ZWRITE command shows ZWITHDRAW KILLed
-   A(1) but left A and A(1,1).
-
-1 ZWRITE
-   ZWRite
-
-   The ZWRITE command displays the current value of one or more  local  or
-   global variables. ZWRITE formats its output so that each  item  in  the
-   display forms a valid argument to a SET @ command.  This  means  ZWRITE
-   encloses string values in quotes and represents  non-graphic  (control)
-   characters in $CHAR() syntax.
-
-   The format of the ZWRITE command is:
-
-
-   ZWR[ITE][:tvexpr] [zwrglvn[,...]]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The optional global or local variable name specifies  the  variable
-        for ZWRITE to display.
-
-   o    ZWRITE accepts several alternative syntaxes in place of subscripts;
-        ZWRITE  also  accepts  arguments  specifying  naked  references  to
-        globals. Because ZWRITE is primarily a debugging tool, ZWRITE does
-        not affect the naked indicator.
-
-   o    ZWRITE accepts null subscripts in its  arguments,  when  these  are
-        allowed, and reports array nodes that have null subscripts.
-
-   o    A ZWRITE with no arguments displays  all  the  currently  available
-        local variables; in this case, at least two (2) spaces must follow
-        the command to separate it from the next command on the line.
-
-   o    If the global or  local  variable  name  is  unsubscripted,  ZWRITE
-        displays  the  unsubscripted  variable  and  all  subscripted
-        descendants.
-
-   o    If an asterisk (*) appears in the space normally  occupied  by  the
-        last subscript in a subscripted variable name, ZWRITE displays all
-        variable nodes descended from the previously specified subscripts.
-
-   o    ZWRITE accepts GT.M pattern-match syntax in place of both variable
-        names and subscripts.
-
-   o    ZWRITE <name>(), where <name> is a local or a global is treated as
-        a synonym for ZWRITE <name>.
-
-   o    A colon acts as a  range  operator  for  subscript  values;  ZWRITE
-        displays all subscripts of the variable starting with the value on
-        the left side of the colon and ending with the value on  the  right
-        side of the colon; if the range delimiter has no  left-hand  value,
-        or has the empty string as the left-hand value, the display begins
-        at the first subscript; if the range delimiter  has  no  right-hand
-        value or has the empty string as the right-hand value, the display
-        ends at the last subscript at that level; if  the  range  delimiter
-        has no values or empty strings on either side, ZWRITE displays all
-        subscripts at that level; an empty subscript  level  also  displays
-        all subscripts at that level.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more ZWRITE arguments form a legal argument for a ZWRITE.
-
-   o    Long ZWRITE format records can be loaded.
-
-2 Ex_of_ZWRite
-   Examples of ZWRITE
-
-   Example:
-
-
-   GTM>ZWRITE ^?1"%"2U(0:":",)
-
-   This command displays the descendants of all subscripts between  0  and
-   ":" of all global names starting with a "%" and having two  upper  case
-   letters-for example, "%AB".
-
-   Example:
-
-
-   GTM>ZWRITE A(,:,3)
-
-   This command displays all of the third level nodes with a subscript of
-   3 for local variable A.
-
-   Example:
-
-
-   ZWRITE ?1"A".E(?1"X"3N)
-
-   This would display data for any  local  variables  starting  with  "A",
-   optionally followed  by  any  characters,  and  having  any  subscripts
-   starting with "X" followed by three numerics.
-
-1 Functions
-   Functions
-
-   M Intrinsic Functions start with a single dollar sign ($) and have one
-   or more arguments enclosed in parentheses () and  separated  by  commas
-   (,). These functions provide expression results by  performing  actions
-   that are impossible or difficult to perform using M commands.
-
-2 $ASCII()
-   $ASCII()
-
-   The $ASCII function returns the integer ASCII code for a character in a
-   string.
-
-   The format for the $ASCII function is:
-
-   $A[SCII](expr[,intexpr])
-
-   o    The expression acts  as  the  source  string  from  which  $ASCII()
-        extracts the character it decodes.
-
-   o    The optional integer expression contains the  position  within  the
-        expression of the character that $ASCII() decodes. If this argument
-        is missing, $ASCII() returns a result based on the first character
-        position. $ASCII() starts numbering character positions at one (1),
-        (i.e., the first character of a string is at position one (1)).
-
-   o    If the explicit or implicit position is  before  the  beginning  or
-        after the end of  the  expression,  $ASCII()  returns  a  value  of
-        negative one (-1).
-
-   $ASCII() provides a means of  examining  non-graphic  characters  in  a
-   string. Used with $CHAR(), $ASCII() also provides a  means  to  perform
-   arithmetic operations on the codes associated with characters.
-
-3 Ex_of_$ASCII()
-   Examples of $ASCII()
-
-   Example 1:
-
-
-   GTM> FOR i=0:1:3 WRITE !,$A("HI",i)
-
-   -1
-
-   72
-   73
-   -1
-
-   GTM>
-
-   This loop displays  the  result  of  $ASCII()  specifying  a  character
-   position before, first and second positions, and after the string.
-
-   Example 2:
-
-
-   FOR i=1:1:$LENGTH($ZB) WRITE !,$A($ZB,i)
-
-   This loop displays the ASCII codes of the terminator in  the  Intrinsic
-   Special Variable, $ZB. Generally this is 13, for  <CR>,  or  an  escape
-   sequence.
-
-2 $Char()
-   $CHAR()
-
-   The  $CHAR  function  returns  a  string  of  one  or  more  characters
-   corresponding to integer ASCII codes specified in its argument(s).
-
-   The format for the $CHAR function is:
-
-
-   $C[HAR](intexpr[,...])
-
-   o    The  integer  expression(s)  specify  the  ASCII  codes  of  the
-        character(s) $CHAR() returns.
-
-   The M standard does not restrict the number of  arguments  to  $CHAR().
-   However, GT.M does limit the number of arguments to a maximum  of  254.
-   $CHAR() provides a means of producing non-graphic characters,  as  such
-   characters cannot appear directly within an M string literal. Used with
-   $ASCII(), $CHAR() can also perform arithmetic operations on  the  codes
-   associated with characters.
-
-3 Ex_of_$CHAR()
-   Examples of $CHAR()
-
-   Example:
-
-
-   GTM> WRITE $CHAR(77,85,77,80,83,7)
-
-   MUMPS
-
-   GTM>
-
-   This example uses $CHAR() to  WRITE  the  word  MUMPS  and  signal  the
-   terminal "bell."
-
-   Example:
-
-
-   SET nam=$E(nam,1,$L(nam)-1)_$C($A(nam,$L(nam))-1))
-
-   This example uses $CHAR() and $ASCII() to set the  variable  nam  to  a
-   value that immediately precedes  its  previous  value  in  the  set  of
-   strings of the same length as nam.
-
-2 $Data()
-   $Data()
-
-   The $DATA function returns an integer code  describing  the  value  and
-   descendent status of a local or variable.
-
-   The format for the $DATA function is:
-
-
-   $D[ATA](glvn)
-
-   o    The subscripted or unsubscripted  global  or  local  variable  name
-        specifies the target node.
-
-   o    If the variable is undefined, $DATA() returns 0.
-
-   o    If the variable has a value but no descendants, $DATA() returns 1.
-
-   o    If the variable has descendants but no value, $DATA() returns 10.
-
-   o    If the variable has a value and descendants, $DATA() returns 11.
-
-3 Ex_of_$Data()
-   Examples of $DATA()
-
-   Example:
-
-
-   GTM> KILL WRITE $DATA(a)
-
-   0
-   GTM> SET a(1)=1 WRITE $DATA(a(1))
-
-   1
-   GTM> WRITE $DATA(a)
-
-   10
-   GTM> SET a=0 WRITE $DATA(a)
-
-   11
-   GTM>
-
-   This uses $DATA to display all possible $DATA() results.
-
-   Example:
-
-   L ^ACCT(0)
-
-   I '$D(^ACCT(0)) S ^ACCT(0)=0
-
-   S (ACCT,^ACCT(0))=^ACCT(0)+1
-
-   L
-
-   This  uses  $DATA()  to  determine  whether  a  global  node  requires
-   initialization.
-
-   Example:
-
-   FOR SET cus=$O(^cus(cus)) Q:cus="" I $D(^(cus))>1 D WORK
-
-   This uses $DATA() to determine whether a global  node  has  descendants
-   and requires additional processing.
-
-2 $Extract()
-   $EXTRACT()
-
-   The $EXTRACT function returns a substring of a given string.
-
-   The format for the $EXTRACT function is:
-
-
-   $E[XTRACT](expr[,intexpr1[,intexpr2]])
-
-   o    The expression specifies a string from which $EXTRACT()  derives  a
-        substring.
-
-   o    The first optional integer expression (second  argument)  specifies
-        the starting character position in the string expr of the substring
-        result.  If  the  starting  position  is  beyond  the  end  of  the
-        expression, $EXTRACT() returns the null  string.  If  the  starting
-        position is zero (0) or negative, $EXTRACT() starts  at  the  first
-        position in the expression; if this argument is omitted, $EXTRACT()
-        returns the first character of the expression.  $EXTRACT()  numbers
-        character positions starting at one (1) (i.e., the first character
-        of a string is at position one (1)).
-
-   o    The second optional integer expression (third  argument)  specifies
-        the ending  character  position  for  the  result.  If  the  ending
-        position is beyond the end of the expression, $EXTRACT() stops with
-        the last character  of  the  expression.  If  the  ending  position
-        precedes the starting position, $EXTRACT() returns the null string.
-        If this argument is omitted, $EXTRACT() returns  one  character  at
-        most.
-
-   $EXTRACT() provides a tool for manipulating strings based on character
-   positions.
-
-   A SET command argument can have something that  has  the  format  of  a
-   $EXTRACT() on the left-hand side of its equal sign (=). This construct
-   permits easy maintenance of individual pieces within a string.  It  can
-   also be used to right justify a value padded with blank characters. For
-   more information on SET $EXTRACT(), refer  to  SET  in  the  "Commands"
-   chapter.
-
-3 Ex_of_$Extract()
-   Examples of $EXTRACT()
-
-   Example:
-
-
-   GTM> FOR i=0:1:3 WRITE !,$EXTRACT("HI",i),"<"
-
-<
-   H<
-
-   I<
-
-<
-   GTM>
-
-   This loop displays the  result  of  $EXTRACT(),  specifying  no  ending
-   character position and a beginning character position "before, " first
-   and second positions, and "after" the string.
-
-   Example:
-
-
-   GTM> FOR i=0:1:3 WRITE !,$E("HI",1,i),"<"
-
-<
-   H<
-
-   HI<
-
-   HI<
-
-   GTM>
-
-   This loop displays the result  of  $EXTRACT()  specifying  a  beginning
-   character position of 1 and an ending  character  position  "before,  "
-   first and second positions, and "after" the string.
-
-   Example:
-
-
-   TRIM(x)
-
-   NEW i,j
-
-   FOR j=$L(x):-1:0 S nx=$E(x,1,j) Q:$EXTRACT(x,j)'=" "
-
-   FOR i=1:1:j S fx=$E(nx,i,$L(x)) Q:$EXTRACT(x,i)'=" "
-
-   QUIT fx
-
-
-   GTM>SET str=" MUMPS "
-
-
-   GTM>WRITE $LENGTH(str)
-
-   7
-   GTM>WRITE $LENGTH($$TRIM^trim(str))
-
-   5
-   This extrinsic function uses $EXTRACT() to  remove  extra  leading  and
-   trailing spaces from its argument.
-
-2 $Find()
-   $FIND()
-
-   The $FIND function returns an integer character position  that  locates
-   the occurrence of a substring within a string.
-
-   The format for the $FIND function is:
-
-
-   $F[IND](expr1,expr2[,intexpr])
-
-   o    The first expression specifies the string in which $FIND() searches
-        for the substring.
-
-   o    The second expression specifies the  substring  for  which  $FIND()
-        searches.
-
-   o    The optional integer expression identifies  the  starting  position
-        for the $FIND() search. If this argument is missing, zero  (0),  or
-        negative, $FIND() begins its search in the first  position  of  the
-        string.
-
-   o    If $FIND() locates the substring, it returns the position after the
-        last character of the  substring.  If  the  end  of  the  substring
-        coincides with the end of the string (expr1), it returns an integer
-        equal to the length of the string plus one ($L(expr1)+1).
-
-   o    If $FIND() does not locate the substring, it returns zero (0).
-
-   $FIND() provides a tool to locate characters. The ( [  )  operator  and
-   the  two-argument  $LENGTH()  are  other  tools  that  provide  related
-   functionality.
-
-3 Ex_of_$Find()
-   Examples of $FIND()
-
-   Example:
-
-
-   GTM> WRITE $FIND("HIFI","I")
-
-   3
-   GTM>
-
-   This example uses $FIND() to WRITE the position of the first occurrence
-   of the character "I." The return of 3  gives  the  position  after  the
-   "found" substring.
-
-   Example:
-
-
-   GTM> WRITE $FIND("HIFI","I",3)
-
-   5
-   GTM>
-
-   This example uses $FIND() to WRITE the position of the next occurrence
-   of the character "I" starting in character position three.
-
-   Example:
-
-
-   GTM> SET t=1 FOR SET t=$FIND("BANANA","AN",t) Q:'t W !,t
-
-   4
-   6
-   GTM>
-
-   This example uses a loop with $FIND() to locate all occurrences of "AN"
-   in "BANANA". The $FIND() returns 4 and 6 giving the positions after the
-   two occurrences of "AN".
-
-   Example:
-
-
-   GTM> SET str="MUMPS databases are hierarchical"
-
-
-   GTM>WRITE $FIND(str," ")
-
-   7
-
-   GTM>WRITE $FIND(str,"Z")
-
-   0
-
-   GTM>WRITE $FIND(str,"d",1)
-
-   8
-
-   GTM>WRITE $FIND(str,"d",10)
-
-   0
-   The above example searches a string for a sub string,  and  returns  an
-   integer value which corresponds to the next  character  position  after
-   locating the sub string.
-
-2 $FNumber()
-   $FNumber()
-
-   The $FNUMBER function returns a string containing a formatted number.
-
-   The format for the $FNUMBER function is:
-
-   $FN[UMBER](numexpr,expr[,intexpr])
-
-   o    The  numeric  expression  specifies  the  number  that  $FNUMBER()
-        formats.
-
-   o    The expression (second argument)  specifies  zero  or  more  single
-        character format control codes;  if  the  expression  contains  any
-        character other than the  defined  codes,  $FNUMBER()  generates  a
-        run-time error.
-
-   o    The optional integer  expression  (third  argument)  specifies  the
-        number of digits after the decimal point. If the numeric expression
-        has more digits than specified by this argument, $FNUMBER() rounds
-        to obtain the result. If the numeric expression  has  fewer  digits
-        than specified by this argument, $FNUMBER()  zero-fills  to  obtain
-        the result.
-
-   o    When the  optional  third  argument  is  specified  and  the  first
-        argument evaluates to a  fraction  between  -1  and  1,  $FNUMBER()
-        returns a number with a leading zero (0) before the  decimal  point
-        (.).
-
-   $FNUMBER() formats or edits numbers, usually for  reporting.  For  more
-   information on rounding performed by $FNUMBER(), refer to  the  section
-   on $JUSTIFY().
-
-   The formatting codes are:
-
-        + Forces a "+" on positive values.
-        - Suppresses the "-" on negative values.
-        , Inserts commas every third position to the left  of  the  decimal
-        within the number.
-        T Represents the number with a  trailing,  rather  than  a  leading
-        sign; positive numbers have a trailing space unless the expression
-        includes a plus sign (+).
-        P Represents negative values in parentheses, positive values with a
-        space on either side; combining with any other  code  except  comma
-        (,) causes a run-time error.
-   M accepts both lower-case and upper-case alphabetic codes. The order of
-   the codes does not affect the result.
-
-3 Ex_of_$FNumber()
-   Examples of $FNUMBER()
-
-   Example:
-
-
-   SET X=-100000,Y=2000
-
-   WRITE "SUPPRESS NEGATIVE SIGN:",?35,$FNUMBER(X,"-"),!
-
-   WRITE "TRAILING SIGN:",?35,$FNUMBER(X,"T"),!
-
-   WRITE "NEGATIVE NUMBERS IN ():",?35,$FNUMBER(X,"P"),!
-
-   WRITE "COMMAS IN NUMBER:",?35,$FNUMBER(X,","),!
-
-   WRITE "NUMBER WITH FRACTION:",?35,$FNUMBER(X,"",2),!
-
-   WRITE "FORCE + SIGN IF POSITIVE:",?35,$FNUMBER(Y,"+"),!
-
-   Produces the results:
-
-
-   SUPPRESS NEGATIVE SIGN: 100000
-
-   TRAILING SIGN: 100000-
-
-   NEGATIVE NUMBERS IN (): (100000)
-
-   COMMAS IN NUMBER: -100,000
-
-   NUMBER WITH FRACTION: -100000.00
-
-   FORCE + SIGN IF POSITIVE: +2000
-
-   Example:
-
-
-   SET x=$FNUMBER(x,"-")
-
-   This example uses $FNUMBER() to SET x equal to its absolute value.
-
-2 $Get()
-   $Get()
-
-   The $GET function returns the value of a local or  global  variable  if
-   the variable has a value. If the variable has no  value,  the  function
-   returns a value specified by an optional second argument, and otherwise
-   returns a null string.
-
-   The format for the $GET function is:
-
-   $G[ET](glvn[,expr])
-
-   o    The subscripted or unsubscripted  global  or  local  variable  name
-        specifies the node for which $GET() returns a value.
-
-   o    If the global or local variable has a data  value,  $GET()  returns
-        the value of the variable.
-
-   o    If the global or local variable has no data value,  $GET()  returns
-        the value of the optional expression (second argument), or  a  null
-        string if the expression is not specified.
-
-   M defines $GET(x,y) as equivalent to:
-
-
-   $SELECT($DATA(x)[0:y,1:x)
-
-   and $GET(x) as equivalent to:
-
-   $GET(x,"")
-
-   $GET()  provides  a  tool  to  eliminate  separate  initialization  of
-   variables. This technique may provide performance benefits when used to
-   increase the density of a sparse global array by eliminating nodes that
-   would otherwise hold absent optional information. On  the  other  hand,
-   some uses of one argument $GET() can mask logic problems.
-
-   GT.M has a "NOUNDEF" mode  of  operation,  which  treats  all  variable
-   references as if they were arguments to a one argument $GET(). The VIEW
-   command and GTM$DEFAULTS controls "NOUNDEF" mode.
-
-3 Ex_of_$Get()
-   Examples of $GET()
-
-   Example:
-
-
-   I '$D(^PNT(NAME,TSTR)) S STATUS="NEW TEST"
-
-   E I ^PNT(NAME,TSTR)="" S STATUS="WAITING FOR RESULT"
-
-   E S STATUS=^PNT(NAME ,TSTR)
-
-   This example can be reduced to two lines of code by using $GET(), shown
-   in the following example. However, by using $GET() in its one-argument
-   form, the distinction between an undefined variable and one with a null
-   value is lost:
-
-
-   S STATUS=$G(^PNT(NAME,TSTR))
-
-   I STATUS="" S STATUS="WAITING FOR RESULT"
-
-   This is solved by using the two-argument form of $GET():
-
-
-   S STATUS=$G(^PNT(NAME,TSTR),"NEW TEST")
-
-   I STATUS="" S STATUS="WAITING FOR RESULT"
-
-2 $Justify()
-   $Justify()
-
-   The $JUSTIFY function returns a formatted string.
-
-   The format for the $JUSTIFY function is:
-
-
-   $J[USTIFY](expr,intexpr1[,intexpr2])
-
-   o    The expression specifies the string formatted by $JUSTIFY().
-
-   o    The  first  integer  expression  (second  argument)  specifies  the
-        minimum  size  of  the  resulting  string.  If  the  first  integer
-        expression is larger than the length of the expression, $JUSTIFY()
-        right justifies the expression to a string of the specified length
-        by  adding  leading  spaces.  Otherwise,  $JUSTIFY()  returns  the
-        expression  unmodified  unless  specified  by  the  second  integer
-        argument.
-
-   o    The optional second integer expression (third  argument)  specifies
-        the number of digits to follow the decimal point in the result, and
-        forces $JUSTIFY() to evaluate the expression  as  numeric.  If  the
-        numeric expression has more digits than  this  argument  specifies,
-        $JUSTIFY() rounds to obtain the result. If the expression had fewer
-        digits than  this  argument  specifies,  $JUSTIFY()  zero-fills  to
-        obtain the result.
-
-   o    When the second  argument  is  specified  and  the  first  argument
-        evaluates to a fraction between -1  and  1,  $JUSTIFY()  returns  a
-        number with a leading zero (0) before the decimal point (.).
-
-   $JUSTIFY() fills expressions to create fixed length values. However, if
-   the length of the specified  expression  exceeds  the  specified  field
-   size, $JUSTIFY() does not truncate the result (although  it  may  still
-   round based on the third argument). When required, $EXTRACT() performs
-   truncation.
-
-   $JUSTIFY() optionally rounds  the  portion  of  the  result  after  the
-   decimal point. In the absence of the third  argument,  $JUSTIFY()  does
-   not restrict the evaluation of the expression. In the presence  of  the
-   third (rounding) argument, $JUSTIFY() evaluates  the  expression  as  a
-   numeric value. The rounding algorithm can be understood as follows:
-
-   o    If necessary, the rounding algorithm extends the expression to the
-        right with 0s  (zeros)  to  have  at  least  one  more  digit  than
-        specified by the rounding argument.
-
-   o    Then, it adds 5 (five)  to  the  digit  position  after  the  digit
-        specified by the rounding argument.
-
-   o    Finally, it truncates the result to the specified number of digits.
-        The algorithm rounds up when excess digits specify a half  or  more
-        of the last retained digit and rounds down when they  specify  less
-        than a half.
-
-3 Ex_of_$Justify()
-   Examples of $JUSTIFY()
-
-   Example:
-
-
-   GTM> WRITE $JUSTIFY("HELLO",10),!,$JUSTIFY("GOODBYE",5)
-
-   HELLO
-
-   GOODBYE
-
-   GTM>
-
-   This uses $JUSTIFY() to display "HELLO" in a field  of  10  spaces  and
-   "GOODBYE" in a field of 5  spaces.  Because  the  length  of  "GOODBYE"
-   exceeds five spaces, the result overflows the specification.
-
-   Example:
-
-
-   GTM> WRITE "1234567890",!,$JUSTIFY(10.545,10,2)
-
-   1234567890
-   10.55
-
-   GTM>
-
-   This uses $JUSTIFY() to WRITE a rounded  value  right  justified  in  a
-   field of 10 spaces. Notice that the result has been rounded up.
-
-   Example:
-
-
-   GTM> WRITE "1234567890",!,$JUSTIFY(10.544,10,2)
-
-   1234567890
-   10.54
-
-   GTM>
-
-   Again, this uses $JUSTIFY() to WRITE a rounded value right justified in
-   a field of 10 spaces. Notice that the result has been rounded down.
-
-   Example:
-
-
-   GTM> WRITE "1234567890",!,$JUSTIFY(10.5,10,2)
-
-   1234567890
-   10.50
-
-   GTM>
-
-   Once again, this  uses  $JUSTIFY()  to  WRITE  a  rounded  value  right
-   justified in a field of 10 spaces. Notice  that  the  result  has  been
-   zero-filled to 2 places.
-
-   Example:
-
-
-   GTM> WRITE $JUSTIFY(.34,0,2)
-
-   0.34
-   GTM>
-
-   This example uses $JUSTIFY to ensure that the fraction  has  a  leading
-   zero. Note the use of a second  argument  of  zero  in  the  case  that
-   rounding is the only function that $JUSTIFY is to perform.
-
-2 $Length()
-   $Length()
-
-   The $LENGTH function  returns  the  length  of  a  string  measured  in
-   characters, or in "pieces" separated by a delimiter specified by one of
-   its arguments.
-
-   The format for the $LENGTH function is:
-
-
-   $L[ENGTH](expr1[,expr2])
-
-   o    The  first  expression  specifies  the  string  that  $LENGTH()
-        "measures."
-
-   o    The optional second expression specifies the delimiter that defines
-        the measure; if this argument is  missing,  $LENGTH()  returns  the
-        number of characters in the string.
-
-   o    If the second argument is present and not a  null  string,  $LENGTH
-        returns one more than the count of the number of occurrences of the
-        second string in the first string; if the second argument is a null
-        string, the M standard specifies that $LENGTH() returns a zero (0).
-
-   $LENGTH() provides a tool for determining the lengths of strings in two
-   ways, characters and pieces. The two  argument  $LENGTH()  returns  the
-   number of existing pieces, while the one argument returns the number of
-   characters.
-
-3 Ex_of_$Length()
-   Examples of $LENGTH()
-
-   Example:
-
-
-   GTM> WRITE $LENGTH("KINGSTON")
-
-   8
-   GTM>
-
-   This uses $LENGTH() to WRITE the length in  characters  of  the  string
-   "KINGSTON".
-
-   Example:
-
-
-   GTM> SET x="Smith/John/M/124 Main Street/Ourtown/KA/USA"
-
-   GTM> WRITE $LENGTH(x,"/")
-
-   7
-   GTM>
-
-   This uses $LENGTH() to WRITE the number  of  pieces  in  a  string,  as
-   delimited by /.
-
-   Example:
-
-
-   GTM> WRITE $LENGTH("/2/3/","/")
-
-   4
-   GTM>
-
-   This also uses $LENGTH() to WRITE the number of pieces in a string, as
-   delimited by /. Notice that GT.M. adds one count to the final number of
-   pieces (in this case 3), in the string (displays 4).
-
-2 $NAme()
-   $NAme()
-
-   The $NAME function returns an evaluated representation of some  or  all
-   of a local or global variable name.
-
-   The format for the $NAME function is:
-
-
-   $NA[ME](glvn[,intexpr])
-
-   o    The subscripted or unsubscripted global  or  local  variable  name,
-        including naked references, specifies the name  for  which  $NAME()
-        returns an evaluated representation.
-
-   o    The optional integer expression  (second  argument)  specifies  the
-        maximum number of subscript levels in the  representation.  If  the
-        integer expression is not provided or exceeds the actual number of
-        subscript levels, $NAME() returns a  representation  of  the  whole
-        name. If the integer expression is zero (0), $NAME()  returns  only
-        the name. A negative integer expression produces a run-time error.
-
-3 Ex_of_$Name()
-   Examples of $NAME()
-
-   Example:
-
-
-   GTM> SET X="A""B",^Y(1,X,"B",4)=""
-
-   GTM> WRITE $NAME(^(3),3)
-
-   ^Y(1,"A""B","B")
-
-   GTM>
-
-   This example sets up a naked reference and then uses $NAME() to display
-   the first three levels of that four-level reference.
-
-   Example:
-
-
-   GTM> WRITE $NAME(^(3),0)
-
-   ^Y
-
-   GTM>
-
-   This example shows the name level for the same naked reference.
-
-2 $Next()
-   $Next()
-
-   The $NEXT  function  returns  the  next  subscripted  local  or  global
-   variable name in collation sequence within the array level specified by
-   its argument.
-
-   $NEXT() has been replaced by $ORDER(). $NEXT has been retained  in  the
-   current standard only for compatibility with earlier  versions  of  the
-   standard. $NEXT() is similar to  $ORDER().  However,  $NEXT()  has  the
-   deficiency that when it encounters negative one (-1) as a subscript, it
-   returns the same result as when it finds no other data  at  the  level.
-   This deficiency is particularly disruptive because  it  occurs  in  the
-   middle of the M collating sequence.
-
-        As $NEXT() has been removed from  the  standard  in  the  MDC,  you
-        should use $ORDER.
-
-   The format for the $NEXT function is:
-
-
-   $N[EXT](glvn)
-
-   o    The subscripted global or local variable name  specifies  the  node
-        following which $NEXT() searches for the next node with data and/or
-        descendants; the number of subscripts  contained  in  the  argument
-        implicitly defines the array level.
-
-   o    If $NEXT() finds no node at the specified level after the specified
-        global or local variable, it returns negative one (-1).
-
-   o    If the last subscript in a subscripted  global  or  local  variable
-        name is null or negative one (-1), $NEXT() returns the  first  node
-        at the specified level.
-
-2 $Order()
-   $Order()
-
-   The $ORDER function returns the subscript of the next or prior local or
-   global variable name in  collation  sequence  within  the  array  level
-   specified by its first argument. In doing so, it moves in the direction
-   specified by the  second  argument.  In  GT.M,  when  $ORDER()  has  an
-   unsubscripted argument, it returns the next or  previous  unsubscripted
-   local or global variable name in collating sequence.
-
-   The format for the $ORDER function is:
-
-
-   $O[RDER](glvn[,expr])
-
-   o    The subscripted global or local variable name  specifies  the  node
-        from which $ORDER() searches for the next or previous node that has
-        data and/or descendants. The number of subscripts contained in the
-        argument implicitly defines the array level.
-
-   o    The optional expression (second argument) specifies  the  direction
-        for the $ORDER(); 1 specifies forward operation  and  -1  specifies
-        reverse operation. Any other values for the expression  will  cause
-        an error.
-
-   o    GT.M extends the M standard to allow unsubscripted names.  In  this
-        case, $ORDER() returns the next or previous unsubscripted name.
-
-   o    If $ORDER() finds no node (or name) at the  specified  level  after
-        (or before) the specified global or local variable,  it  returns  a
-        null string (" ").
-
-   o    If the last subscript in the subscripted global or  local  variable
-        name is null, $ORDER() returns the first  (or  last)  node  at  the
-        specified level.
-
-   $ORDER() provides a tool for retrieving data from M sparse arrays in an
-   ordered fashion, independent of the order in which it was  entered.  In
-   M,  routines  generally  sort  by  SETting  data  into  an  array  with
-   appropriate  subscripts  and  then  retrieving  the  information  with
-   $ORDER().
-
-   $ORDER() returns subscripts, not data values, and does not discriminate
-   between nodes that have data values and nodes  that  have  descendants.
-   Once  $ORDER()  provides  the  subscript,  the  routine  must  use  the
-   subscript to access the data  value,  if  appropriate.  Using  $ORDER()
-   maintains the naked reference indicator, even  if  $ORDER()  returns  a
-   null.
-
-   GT.M optionally permits the use of null  subscripts.  This  feature  is
-   enabled via the VIEW command for local variables and a REGION qualifier
-   in GDE for global variables. When an application uses null subscripts,
-   they are "invisible" in a $ORDER() loop so the  application  must  test
-   for them as a special case, perhaps using $DATA().
-
-3 Ex_of_$Order()
-   Examples of $ORDER()
-
-   Example:
-
-
-   GTM>K S (a(1),a(2000),a("CAT"),a("cat"),a("ALF"), a(12))=1
-
-   GTM>S x="" F S x=$O(a(x)) Q:x="" W !,x
-
-   1
-   12
-   2000
-   ALF
-
-   CAT
-
-   cat
-
-   GTM>K a("CAT") SET a(5,10)="woolworths",a("cat")="last"
-
-   GTM> S x="" F S x=$O(a(x),-1) Q:x="" W !,x
-
-   cat
-
-   ALF
-
-   2000
-   12
-   5
-   1
-   GTM>
-
-   This example uses a $ORDER() loop to display all the subscripts at the
-   first level of local variable a, make  some  changes  in  a,  and  then
-   display all the subscripts  in  reverse  order.  Notice  that  $ORDER()
-   returns only the existing subscripts in the sparse  array  and  returns
-   them in M collation sequence, regardless of the  order  in  which  they
-   were entered. Also, $ORDER() does not differentiate between node A(5),
-   which has only descendants (no data value), and the other nodes, which
-   have data values.
-
-   Example:
-
-
-   GTM>k s (%(1),tiva(2),A(3),tiv(4),Q(5),%a(6))=""
-
-   GTM>s x="%"
-
-   GTM>w:$d(@x) !,x f s x=$order(@x) q:x="" w !,x
-
-   %
-
-   %a
-
-   A
-
-   Q
-
-   tiv
-
-   tiva
-
-   x
-
-   GTM>s x="zzzzzzzz"
-
-   GTM>w:$d(@x) !,x f s x=$order(@x,-1) q:x="" w !,x
-
-   x
-
-   tiva
-
-   tiv
-
-   Q
-
-   A
-
-   %a
-
-   %
-
-   GTM>
-
-   This loop uses $ORDER() to display the current local variable names in
-   both forward and reverse order. Notice that the first ([^]%)  and  last
-   ([^]zzzzzzzz) names require handling as special  cases  and  require  a
-   $DATA() function.
-
-   Example:
-
-
-   SET acct="",cntt=""
-
-   FOR SET acct=$OREDER(^acct(acct)) QUIT:acct="" DO
-
-   . F SET cntt=$ORDER(^acct(acct,cntt)) DO WORK
-
-   QUIT
-
-   This uses two nested $ORDER() loops to cycle through the  ^acct  global
-   array and perform some action for each second level node.
-
-2 $Piece()
-   $Piece()
-
-   The $PIECE function returns a substring delimited by a specified string
-   delimiter made up of one or more characters. In M, $PIECE()  returns  a
-   logical field from a logical record.
-
-   The format for the $PIECE function is:
-
-
-   $P[IECE](expr1,expr2[,intexpr1[,intexpr2]])
-
-   o    The first expression specifies the string from which $PIECE() takes
-        its result.
-
-   o    The  second  expression  specifies  the  delimiting  string  that
-        determines the piece "boundaries";  if  this  argument  is  a  null
-        string, $PIECE() returns a null string.
-
-   o    If the second expression does not  appear  anywhere  in  the  first
-        expression, $PIECE() returns the entire  first  expression  (unless
-        forced to return a null string by the second integer expression).
-
-   o    The optional first integer expression  (third  argument)  specifies
-        the beginning  piece  to  return;  if  this  argument  is  missing,
-        $PIECE() returns the first piece.
-
-   o    The optional second integer expression (fourth argument) specifies
-        the last piece to return. If this  argument  is  missing,  $PIECE()
-        returns only one piece unless the first integer expression is zero
-        (0) or negative, in which case it returns a null  string.  If  this
-        argument is  less  than  the  first  integer  expression,  $PIECE()
-        returns a null string.
-
-   o    If the second integer  expression  exceeds  the  actual  number  of
-        pieces in  the  first  expression,  $PIECE()  returns  all  of  the
-        expression after  the  delimiter  selected  by  the  first  integer
-        expression.
-
-   o    The  $PIECE()  result  never  includes  the  "outside"  delimiters;
-        however,  when  the  second  integer  argument  specifies  multiple
-        pieces,  the  result  contains  the  "inside"  occurrences  of  the
-        delimiter.
-
-   $PIECE() provides a tool for  efficiently  using  values  that  contain
-   multiple elements or fields, each of which may be variable in length.
-
-   Applications typically use a single character for a $PIECE() delimiter
-   (second argument) to minimize storage overhead, and increase efficiency
-   at run-time. The delimiter must be chosen  so  the  data  values  never
-   contain the delimiter. Failure to enforce  this  convention  with  edit
-   checks may result in unanticipated changes in the  position  of  pieces
-   within the data value. The caret symbol (^), backward  slash  (\),  and
-   asterisk (*) characters are examples  of  popular  visible  delimiters.
-   Multiple character delimiters may reduce  the  likelihood  of  conflict
-   with field contents. However, they decrease storage efficiency, and are
-   processed with less efficiency than single character  delimiters.  Some
-   applications use control characters, which reduce the  chances  of  the
-   delimiter appearing in the data but sacrifice the readability provided
-   by visible delimiters.
-
-   A SET command argument can have something that  has  the  format  of  a
-   $PIECE() on the left-hand side of its equal sign  (=).  This  construct
-   permits easy maintenance of individual pieces within a string. It also
-   can be used to generate a string of delimiters. For more information on
-   SET $PIECE(), refer to SET in the "Commands" chapter.
-
-3 Ex_of_$Piece()
-   Examples of $PIECE()
-
-   Example:
-
-
-   GTM> FOR i=0:1:3 WRITE !,$PIECE("1 2"," ",i),"<"
-
-<
-   1<
-   2<
-<
-   GTM>
-
-   This loop displays the result of $PIECE(),  specifying  a  space  as  a
-   delimiter, a piece position "before," first and second, and "after" the
-   string.
-
-   Example:
-
-
-   GTM> FOR i=-1:1:3 WRITE !,$PIECE("1 2"," ",i,i+1),"<"
-
-<
-   1<
-   1 2<
-   2<
-<
-   GTM>
-
-   This example is similar to the previous example except that it displays
-   two pieces on each iteration. Notice the delimiter  (a  space)  in  the
-   middle of the output for  the  third  iteration,  which  displays  both
-   pieces.
-
-   Example:
-
-
-   F p=1:1:$L(x,"/") W ?p-1*10,$piece(x,"/",p)
-
-   This loop uses $LENGTH() and $PIECE() to display all the pieces of x in
-   columnar format.
-
-   Example:
-
-
-   GTM> s $P(x,".",25)="" W x
-
-   ........................
-   This SETs the 25th piece of the variable x to null, with a delimiter of
-   a period. This produces a string of 24 periods preceding the null.
-
-2 $Qlength()
-   $Qlength()
-
-   The $QLENGTH function returns the number of subscripts  in  a  variable
-   name. The format is:
-
-
-   $QL[ENGTH] (namevalue)
-
-   o    The  namevalue  has  the  form  of  an  evaluated  subscripted  or
-        unsubscripted global variable (which yields a length of  zero,  and
-        which may have an environment -  not  counted)  or  local  variable
-        name.
-
-   o    The form returns a  value  which  is  derived  from  namevalue.  If
-        namevalue has the form NAME(s1, s2,..., sn), considering  n  to  be
-        zero, if there are no subscripts, then the function returns n.
-
-   o    This function only affects the naked indicator  if  the  string  in
-        question is stored in a global variable.
-
-3 Ex_of_$Qlength()
-   Examples of $Qlength()
-
-   Example:
-
-
-   WRITE $DATA(^|"XXX"|ABC(1,2,3,4))
-
-
-   GTM>0
-
-
-   SET X=$NAME(^(5,6))
-
-   WRITE $QLENGTH(X)
-
-   GTM>5
-
-   Refer to $NAme() section earlier in this chapter for  an  understanding
-   of the $NAME function.
-
-2 $Qsubscript()
-   $Qsubscript()
-
-   The $QSUBSCRIPT function returns a component of a variable name.
-
-   The format of the $QSUBSCRIPT function is:
-
-
-   $QS[UBSCRIPT](namevalue, intexpr)
-
-   o    The  namevalue  has  the  form  of  an  evaluated  subscripted  or
-        unsubscripted global or local variable name.
-
-   o    The intexpr selects the component of the name as follows:
-
-   -2 is reserved but may be "error",
-
-   -1 for environment,
-
-   0 for the unsubscripted name,
-   1 for the first subscript,
-   2 for the second subscript, and so on.
-   If the second argument selects a component that  is  not  part  of  the
-   specified name, $QSUBSCRIPT() returns an empty string ("").
-
-3 Ex_of_$Qsubscript()
-   Examples of $Qsubscript()
-
-   Example:
-
-   Assume that X is defined as in the "Examples of $Qlength()" earlier in
-   this chapter;
-
-
-   $QLENGTH (X="^|""XXX""|ABC(1,2,3,5,6)")
-
-
-   WRITE $QSUBSCRIPT(X,-2)
-
-   GTM>error
-
-
-   WRITE $QSUBSCRIPT(X,-1)
-
-   GTM>XXX
-
-
-   WRITE $QSUBSCRIPT(X,0)
-
-   GTM>^ABC
-
-
-   WRITE $QSUBSCRIPT(X,1)
-
-   GTM>1
-
-
-   WRITE $QSUBSCRIPT(X,4)
-
-   GTM>5
-
-
-   WRITE $QSUBSCRIPT(X,7)
-
-   GTM>""
-
-2 $Query()
-   $Query()
-
-   The $QUERY function  returns  the  next  subscripted  local  or  global
-   variable node name,  independent  of  level,  which  follows  the  node
-   specified by its argument in M collating sequence and has a data value.
-
-   The format for the $QUERY function is:
-
-
-   $Q[UERY](glvn)
-
-   o    The subscripted or unsubscripted  global  or  local  variable  name
-        specifies the starting node from which $QUERY() searches for a node
-        with a data value.
-
-   o    If $QUERY() finds no node  after  the  specified  global  or  local
-        variable, it returns a null string.
-
-   $QUERY() provides a tool for scanning an entire array  for  nodes  that
-   have data values. Because $QUERY() can return  a  result  specifying  a
-   different level than its argument, the result provides a full variable
-   name. This contrasts with $ORDER(), which returns a subscript value. To
-   access the data value at a node, a $ORDER() return can  be  used  as  a
-   subscript; however, a $QUERY() return must be  used  with  indirection.
-   Because arrays tend to have homogeneous values within a level  but  not
-   between levels, $QUERY() is more useful as a tool in  utility  programs
-   than in application programs. The $QUERY() is useful in avoiding nested
-   $ORDER loops.
-
-   Note that the standard does not unambiguously define the state  of  the
-   naked reference  indicator  after  a  $QUERY().  While  in  GT.M  after
-   $QUERY(), the naked reference indicator reflects the $QUERY() argument,
-   NOT its result.
-
-3 Ex_of_$Query()
-   Examples of $QUERY()
-
-   Example:
-
-
-   SET ^X(1,2,3)="123"
-
-   SET ^X(1,2,3,7)="1237"
-
-   SET ^X(1,2,4)="124"
-
-   SET ^X(1,2,5,9)="1259"
-
-   SET ^X(1,6)="16"
-
-   SET ^X("B",1)="AB"
-
-   The following routine:
-
-
-   SET y="^X"
-
-   FOR SET y=$QUERY(@y) QUIT:y="" WRITE !,y,"=", at y
-
-   produces the results:
-
-
-   ^X(1,2,3)=123
-
-   ^X(1,2,3,7)=1237
-
-   ^X(1,2,4)=124
-
-   ^X(1,2,5,9)=1259
-
-   ^X(1,6)=16
-
-   ^X("B",1)=AB
-
-2 $Random()
-   $Random()
-
-   The $RANDOM function returns a random integer from a range specified by
-   its argument.
-
-   The format for the $RANDOM function is:
-
-
-   $R[ANDOM](intexpr)
-
-   o    The integer expression specifies the upper  exclusive  limit  of  a
-        range of integers from which $RANDOM() may pick a result; $RANDOM()
-        never returns a number less than zero (0).
-
-   o    If $RANDOM() has an argument less than  one  (1),  it  generates  a
-        run-time error.
-
-   o    $RANDOM can generate numbers up to 2147483646 (that is 2GB - 2).
-
-   $RANDOM() provides a tool for generating pseudo-random patterns useful
-   in testing or statistical calculations. $RANDOM() results fall between
-   zero (0) and one less than the argument.
-
-   Random number generators use factors from  the  environment  to  create
-   sequences of numbers. True random number generation requires  a  source
-   of what is known as noise. Pseudo-random  numbers  appear  to  have  no
-   pattern, but are developed using interactions between factors that vary
-   in ways not guaranteed to be entirely random. In accordance with the M
-   standard, the GT.M implementation of $RANDOM()  produces  pseudo-random
-   numbers.
-
-3 Ex_of_$Random()
-   Examples of $RANDOM()
-
-   Example:
-
-
-   GTM> FOR i=1:1:10 WRITE $RANDOM(1)
-
-   0000000000
-   GTM>
-
-   This shows that when $RANDOM() has an argument of one (1),  the  result
-   is too confined to be random.
-
-   Example:
-
-
-   SET x=$RANDOM(100)+1*.01
-
-   This $RANDOM() example produces a number between 0 and 99. The example
-   then shifts with addition, and scales with multiplication to  create  a
-   value between .01 and 1.
-
-2 $Reverse()
-   $Reverse()
-
-   The $REVERSE function returns a  string  with  the  characters  in  the
-   reverse order from that of its argument.
-
-   The format for the $REVERSE function is:
-
-
-   $RE[VERSE](expr)
-
-   o    The expr in the syntax is the string to be reversed.
-
-3 Ex_of_$Reverse()
-   Examples of $REVERSE()
-
-   Example:
-
-
-   WRITE $REVERSE(123)
-
-   GTM>321
-
-
-   WRITE $REVERSE("AbCDe")
-
-   GTM>"eDCbA"
-
-2 $Select()
-   $Select()
-
-   The $SELECT function returns a value associated  with  the  first  true
-   truth-valued expression in a list of paired expression arguments.
-
-   The format for the $SELECT function is:
-
-
-   $S[ELECT](tvexpr:expr[,...])
-
-   o    $SELECT() evaluates expressions from left to right.
-
-   o    If a truth-valued expression is TRUE  (1),  $SELECT()  returns  the
-        corresponding expression after the colon (:) delimiter.
-
-   o    Once $SELECT() finds a TRUE, the  function  does  not  process  any
-        remaining arguments.
-
-   o    If $SELECT() finds no TRUE truth-value in its  list  of  arguments,
-        the function generates a run-time error.
-
-   $SELECT() is  one  of  a  limited  set  of  functions  that  permit  an
-   indefinite number of arguments. $SELECT() provides a means of selecting
-   from a list of alternatives.
-
-   Generally, the last $SELECT() argument has numeric literal one (1) for
-   a truth-value to prevent run-time errors, and to  provide  a  "default"
-   value.
-
-3 Ex_of_$Select()
-   Examples of $SELECT()
-
-   Example:
-
-
-   GTM> F i=3:-1:0 W !,$S(i=1:"here",i=2:"come",i=3: "Watson")
-
-   Watson
-
-   come
-
-   here
-
-   %GTM-E-SELECTFALSE, No argument to $SELECT was true
-
-   GTM>
-
-   This loop uses $SELECT() to WRITE a series of strings. Because there is
-   no true argument on the fourth iteration, when i=0, $SELECT() produces
-   an error.
-
-   Example:
-
-
-   SET name=$S(sex="M":"Mr. ",sex="F":"Ms. ",1:"")_name
-
-   This example uses $SELECT() to add a prefix to the name based on a sex
-   code held in the variable sex. Notice that the default handles the case
-   of a missing or incorrect code.
-
-   Example:
-
-
-   IF $S(x=+x:x,x="":0,"JANAPRJULOCT"[x:1,1:0) D THING
-
-   This uses $SELECT()  to  perform  complex  logic  as  the  truth-valued
-   expression argument to an IF command.
-
-2 $Stack()
-   $Stack()
-
-   The $STACK function returns strings describing aspects of the execution
-   environment.
-
-   The format for the $STACK function is:
-
-
-   $ST[ACK](intexpr[,expr])
-
-   o    The intexpr identifies  the  M  virtual  machine  stack  level  (as
-        described by the standard), on which the  function  is  to  provide
-        information.
-
-   o    The optional  second  argument  is  evaluated  as  a  keyword  that
-        specifies a type of information to be returned as follows: "PLACE"
-        for position in the code (for which,  GT.M.  due  to  its  compiled
-        nature, has  no  information),  "MCODE"  for  the  source  code  if
-        available, or "ECODE" for the  $ECODE  value  associated  with  the
-        stack level.
-
-   o    When  $STACK  has  only  one  argument,  values  corresponding  to
-        available stack levels specify a return value  that  indicates  how
-        the level was created, as follows:
-
-   o    If intexpr is zero (0), the function  returns  information  on  how
-        GT.M was invoked.
-
-   o    If intexpr is minus one (-1),  the  function  returns  the  highest
-        level for which  $STACK  can  return  information.  Note  that,  if
-        $ECODE="", $STACK(-1) returns the same value as $STACK.
-
-   o    If intexpr is greater than zero (0)  and  less  than  or  equal  to
-        $STACK (-1), indicates how this level of process stack was created
-        ("DO", "XECUTE", or "$$". "$$" being for an extrinsic function).
-
-   o    If intexpr is greater than $STACK (-1),  the  function  returns  an
-        empty string.
-
-   o    For any integer value of "level" between 0 and max (inclusive), the
-        function $STACK(level, type) provides the following information:
-
-        Type Information
-        "MCODE" the line of code that was executed
-        "PLACE" the address of the above line of  code  or  the  symbol  at
-        ("@") to indicate code executed from a string value
-        "ECODE" either an empty string, or the error code(s) that was added
-        at this execution level.
-3 Ex_of_$Stack()
-   Examples of $STACK()
-
-   Example:
-
-
-   WRITE !,$STACK
-
-   XECUTE "WRITE !,$STACK"
-
-   DO Label
-
-   WRITE !,$$ELabel
-
-   WRITE !,$STACK
-
-   QUIT
-
-
-   Label
-
-   WRITE !,$STACK
-
-   DO DLabel
-
-   QUIT
-
-
-   ELabel()
-
-   QUIT $STACK
-
-
-   DLabel
-
-   WRITE !,$STACK
-
-   QUIT
-
-   The above example when executed displays the current M stack level. The
-   result of the execution is:
-
-
-   GTM>0
-
-   1
-   1
-   2
-   1
-   0
-   Example for error processing:
-
-
-   For i=$STACK(-1):-1:1 DO
-
-   . WRITE !,$STACK(i,"PLACE"),":"
-   . WRITE $STACK(i,"MCODE")
-   . QUIT
-   The above example can be used to display a trace of the code path that
-   led to an error.
-
-2 $Text()
-   $Text()
-
-   The $TEXT function returns source text for the line  specified  by  its
-   argument.
-
-   The format for the $TEXT function is:
-
-
-   $T[EXT](entryref)
-
-   o    The entryref specifies the label, offset, and routine of the source
-        line that $TEXT() returns.
-
-   o    If the label+offset combination do not  fall  within  the  routine,
-        $TEXT returns a null string.
-
-   o    If the entryref explicitly or implicitly  specifies  an  offset  of
-        zero (0) from the beginning of the  routine,  $TEXT()  returns  the
-        routine name.
-
-   o    If the entryref does  not  specify  a  routine,  GT.M  assumes  the
-        current routine, that is, the routine at the top of a ZSHOW "S."
-
-   o    A GT.M extension to  $TEXT()  permits  negative  offsets;  however,
-        every offset must still be preceded by a plus sign  (+)  delimiter,
-        (for example, LABEL+-3). If a negative  offset  points  to  a  line
-        prior to the zero line, $TEXT() generates a run-time error.
-
-   $TEXT() provides a tool for examining routine source code and the name
-   of the current routine. $TEXT() assists, along with the ZPRINT command,
-   in debugging programs. $TEXT()  also  allows  the  insertion  of  small
-   tables of driver information into a routine.  Because  $TEXT()  is  not
-   very efficient and the table-driven technique is generally best suited
-   to minimal program changes, this approach is best used for prototyping
-   and the tables should reside in global variables for production.
-
-   If $TEXT() cannot access the source file for the current object, either
-   because it is not in the location from which it was compiled or because
-   the process does not have access to some  piece  of  the  path  to  the
-   source, or if the located source does not match the object currently in
-   use by the process, $TEXT() returns the empty string.
-
-3 Ex_of_$Text()
-   Examples of $TEXT()
-
-   Example:
-
-
-   F i=1:1 S x=$T(+i) Q:x="" W !,x
-
-   This loop uses $TEXT() to write out the entire source for  the  current
-   routine.
-
-   Example:
-
-
-   GTM> WRITE $TEXT(+0)
-
-   GTM$DMOD
-
-   GTM> WRITE $TEXT(+1)
-
-   GTM>
-
-   This uses $TEXT() to WRITE the name of the  current  routine,  then  it
-   tries to access the source and returns an  empty  string.  This  occurs
-   because the default Direct  Mode  image  is  compiled  by  Sanchez  and
-   delivered without source. The exact failure message may vary.
-
-2 $TRanslate()
-   $TRanslate()
-
-   The $TRANSLATE function returns a string that results from replacing or
-   dropping characters in the first of its arguments as specified  by  the
-   patterns of its other arguments.
-
-   The format for the $TRANSLATE function is:
-
-
-   $TR[ANSLATE](expr1[,expr2[,expr3]])
-
-   o    The first expression specifies the  string  on  which  $TRANSLATE()
-        operates. If the other arguments are omitted, $TRANSLATE() returns
-        this expression.
-
-   o    The  optional  second  expression  specifies  the  characters  for
-        $TRANSLATE() to replace. If a character occurs more  than  once  in
-        the  second  expression,  the  first  occurrence  controls  the
-        translation, and $TRANSLATE() ignores  subsequent  occurrences.  If
-        this argument is omitted, $TRANSLATE() returns the first expression
-        without modification.
-
-   o    The optional third expression specifies the replacement characters
-        for the second expression that corresponds  by  position.  If  this
-        argument  is  omitted  or  shorter  than  the  second  expression,
-        $TRANSLATE() drops all occurrences  of  characters  in  the  second
-        expression that have no replacement in the  corresponding  position
-        of the third expression.
-
-   $TRANSLATE() provides a tool for tasks such as changing case and doing
-   encryption. For examples of case translation, refer to the ^%LCASE and
-   ^%UCASE utility routines.
-
-   The $TRANSLATE() algorithm can be understood as follows:
-
-   o    $TRANSLATE() evaluates each  character  in  the  first  expression,
-        comparing it  character  by  character  to  the  second  expression
-        looking for a match. If there is no match in the second expression,
-        the  resulting  expression  contains  the  character  without
-        modification.
-
-   o    When it locates a character match, $TRANSLATE() uses  the  position
-        of the match in the second expression to identify  the  appropriate
-        replacement for the original expression. If the  second  expression
-        has  more  characters  than  the  third  expression,  $TRANSLATE()
-        replaces the original character with a null,  thereby  deleting  it
-        from the result. By extension  of  this  principle,  if  the  third
-        expression is missing, $TRANSLATE() deletes all characters from the
-        first expression that occur in the second expression.
-
-3 Ex_of_$TRanslate()
-   Examples of $TRANSLATE()
-
-   Example:
-
-
-   GTM> WRITE $TR("ABC","CB","1")
-
-   A1
-
-   GTM>
-
-   o    First, $TRANSLATE() searches for "A" (the first  character  in  the
-        first expression, "ABC") within the second expression ("CB"). Since
-        "A" does not exist in the second expression, it  appears  unchanged
-        in the result.
-
-   o    Next, $TRANSLATE() searches for "B" (the second  character  in  the
-        first expression) within the second expression ("CB"). Because "B"
-        holds  the  second  position  in  the  second  expression  ("CB"),
-        $TRANSLATE() searches for the character holding the second position
-        in the third expression. Since there is no second character in the
-        third  expression,  $TRANSLATE()  replaces  "B"  with  a  null,
-        effectively deleting it from the result.
-
-   o    Finally, $TRANSLATE() searches for "C" (the third character in the
-        first expression) within the second expression ("CB"), finds it in
-        the first position, and replaces it with the number 1, which is in
-        the first position of the third expression. The  translated  result
-        is "A1."
-
-   Example:
-
-
-   GTM> WRITE $TR("A","AA","BC")
-
-   B
-
-   GTM>
-
-   This $TRANSLATE() example finds the first  occurrence  of  "A"  in  the
-   second expression,  which  holds  the  first  character  position,  and
-   substitutes  the  character  in  the  first  position  of  the  third
-   expression.
-
-   Example:
-
-
-   GTM> WRITE $TR("BACKUP","AEIOU")
-
-   BCKP
-
-   GTM>
-
-   Because the $TRANSLATE() has only two parameters in  this  example,  it
-   finds the characters in the first expression that  also  exist  in  the
-   second expression and deletes them from the result.
-
-2 $View()
-   $View()
-
-   The $VIEW function returns information about  an  environmental  factor
-   selected by the arguments. In  GT.M,  the  first  argument  contains  a
-   keyword identifying the environmental factor  and,  where  appropriate,
-   subsequent arguments select among multiple possible occurrences of that
-   factor.
-
-   The format for the $VIEW() function is:
-
-
-   $V[IEW](expr1[,expr2])
-
-   o    The first expression specifies a  keyword  identifying  the  target
-        factor for $VIEW() to examine.
-
-   o    The second  expression  differentiates  between  multiple  possible
-        targets for some keywords. $VIEW() requires the  second  expression
-        for some keywords and does not permit it for others.
-
-   The $VIEW function returns 1 (true) if the region is frozen by MUPIP or
-   DSE and returns 0 (false) otherwise.
-
-3 Arg_Key_of_$View()
-   Argument Keywords of $VIEW()
-
-   $VIEW() provides a means of accessing GT.M  environmental  information.
-   $VIEW() is similar in purpose to Intrinsic Special Variables. When GT.M
-   permits modification of the factors accessible with $VIEW(),  the  VIEW
-   command generally provides the tool for performing the change.
-
-3 Ex_of_$View()
-   Examples of $VIEW()
-
-   Example:
-
-
-   S len=$L(name)
-
-   S be4=$EXTRACT(name,1,len-1)_$CHAR($ASCII(name,len)-1)
-
-   I $V("RTNNEXT",be4_$E("ZZZZZZZ",1,8-len))=name D
-
-   . ZLINK name
-   Given a routine name this uses $VIEW() to determine whether  the  image
-   contains the routine. If the routine already exists the ZLINK replaces
-   it. Otherwise, auto-ZLINK will bring in a new copy.
-
-2 $ZBIT_Func
-   $ZBIT Functions
-
-   A series of functions beginning with $ZBIT  let  you  manipulate  bits.
-   Each function is described in its own section, and an  example  at  the
-   end of the last section illustrates the use of several of the functions
-   in context.
-
-3 $ZBITAND()
-   $ZBITAND()
-
-   The $ZBITAND function performs an AND function on two bit  strings  and
-   returns a bit string  equal  in  length  to  the  shorter  of  the  two
-   arguments (containing set bits in those positions  where  both  of  the
-   input strings have set  bits).  Positions  corresponding  to  positions
-   where either of the input strings have a cleared bit, also have cleared
-   bits in the resulting string.
-
-   The format for the $ZBITAND() function is:
-
-
-   $ZBITAND(expr1,expr2)
-
-   o    The first expression specifies one of the bit strings that is input
-        to the AND operation.
-
-   o    The second expression specifies the other bit string that is input
-        to the AND operation.
-
-3 $ZBITCOUNT()
-   $ZBITCOUNT()
-
-   The $ZBITCOUNT function returns the number of ON bits in a bit string.
-
-   The format for the $ZBITCOUNT function is:
-
-
-   $ZBITCOUNT(expr)
-
-   o    The expression specifies the bit string to examine.
-
-3 $ZBITFIND()
-   $ZBITFIND()
-
-   The $ZBITFIND function performs the analog of the $FIND function  on  a
-   bit string. It returns an integer that identifies  the  position  after
-   the first position equal to a truth-valued expression that  occurs  at,
-   or after, the specified starting position.
-
-   The format for the $ZBITFIND function is:
-
-
-   $ZBITFIND(expr,tvexpr[,intexpr])
-
-   o    The expression specifies the bit string to examine.
-
-   o    The truth-valued expression  specifies  the  bit  value  for  which
-        $ZBITFIND() searches (1 or 0).
-
-   o    The optional integer argument specifies the  starting  position  at
-        which to begin the search. If this argument is missing, $ZBITFIND()
-        begins searching  at  the  first  position  of  the  string.  $ZBIT
-        functions count the first bit as position one (1).
-
-   If the optional integer argument exceeds the length of the  string,  or
-   if the function finds no  further  bits,  $ZBITFIND()  returns  a  zero
-   value.
-
-3 $ZBITGET()
-   $ZBITGET()
-
-   The $ZBITGET function returns the value of a specified position in the
-   bit string.
-
-   The format for the $ZBITGET function is:
-
-
-   $ZBITGET(expr,intexpr)
-
-   o    The expression specifies the bit string to examine.
-
-   o    The integer argument specifies the position in the string for which
-        the value is requested. If the integer argument is negative, zero,
-        or exceeds the length of the bit string,  it  is  rejected  with  a
-        run-time error. $ZBIT functions count the first bit as position one
-        (1).
-
-3 $ZBITLEN()
-   $ZBITLEN()
-
-   The $ZBITLEN function returns the length of a bit string, in bits.
-
-   The format for the $ZBITLEN function is:
-
-
-   $ZBITLEN(expr)
-
-   o    The expression specifies the bit string to examine.
-
-3 $ZBITNOT()
-   $ZBITNOT()
-
-   The $ZBITNOT function returns a copy of the bit string with each input
-   bit position inverted.
-
-   The format for the $ZBITNOT function is:
-
-
-   $ZBITNOT(expr)
-
-   o    The expression specifies the bit string whose inverted bit pattern
-        becomes the result of the function.
-
-3 $ZBITOR()
-   $ZBITOR()
-
-   The $ZBITOR function performs a bitwise OR  on  two  bit  strings,  and
-   returns a bit string equal in length to the longer of the two arguments
-   (containing set bits in those positions where either  or  both  of  the
-   input strings have set bits). Positions that  correspond  to  positions
-   where neither input string has a set  bit  have  cleared  bits  in  the
-   resulting string.
-
-   The format for the $ZBITOR function is:
-
-   $ZBITOR(expr1,expr2)
-
-   o    The first expression specifies one of the bit strings that is input
-        to the OR operation.
-
-   o    The second expression specifies the other bit string that is input
-        to the OR operation.
-
-3 $ZBITSET()
-   $ZBITSET()
-
-   The $ZBITSET function returns an edited copy of the  input  bit  string
-   with a specified bit set to the value of the truth-valued expression.
-
-   The format for the $ZBITSET function is:
-
-
-   $ZBITSET(expr,intexpr,tvexpr)
-
-   o    The expression specifies the input bit string.
-
-   o    The integer  expression  specifies  the  position  of  the  bit  to
-        manipulate. Arguments that are negative, zero, or exceed the length
-        of the bit string produce a run-time error. $ZBIT  functions  count
-        the first bit as position one (1).
-
-   o    The truth-valued expression specifies the value to which to set the
-        specified bit (0 or 1).
-
-3 $ZBITSTR()
-   $ZBITSTR()
-
-   The $ZBITSTR function returns a bit string of a specified  length  with
-   all bit positions initially set to either zero or one.
-
-   The format for the $ZBITSTR function is:
-
-
-   $ZBITSTR(intexpr[,tvexpr])
-
-   o    The integer expression specifies the length of the  bit  string  to
-        return; arguments that exceed the maximum length of 253,952 produce
-        a run-time error.
-
-   o    The optional truth-valued expression specifies the value  to  which
-        all bit positions should  initially  be  set  (0  or  1).  If  this
-        argument is missing, the bits are set to zero.
-
-3 $ZBITXOR()
-   $ZBITXOR()
-
-   The $ZBITXOR performs a bitwise exclusive OR on two  bit  strings,  and
-   returns a bit string  equal  in  length  to  the  shorter  of  the  two
-   arguments (containing set bits in those position where either  but  not
-   both of the input strings have set bits). Positions that correspond to
-   positions where neither or both input string has a set bit have cleared
-   bits in the resulting string.
-
-   The format for the $ZBITXOR function is:
-
-
-   $ZBITXOR(expr1,expr2)
-
-   o    The first expression specifies one of the bit strings that is input
-        to the XOR operation.
-
-   o    The second expression specifies the other bit string that is input
-        to the XOR operation.
-
-3 Ex_of_$ZBIT_Func
-   Examples of $ZBIT Functions
-
-   Example:
-
-
-   ZCRC(X)
-
-   NEW R,I,J,B,X1,K
-
-   SET R=$ZBITSTR(8,0)
-
-   FOR I=1:1:$L(X) S R=$ZBITXOR(R,$$BITIN($A(X,I)))
-
-   QUIT $$BITOUT(R)
-
-   ;CONVERT A BYTE TO A BIT STRING
-
-
-   BITIN(X)
-
-   SET X1=$ZBITSTR(8,0)
-
-   FOR J=1:1:8 S B=X#2,X=X\2 i B s X1=$ZBITSET(X1,J,1)
-
-   QUIT X1
-
-   ; CONVERT A BITSTRING TO A NUMBER
-
-
-   BITOUT(X)
-
-   SET X1=0
-
-   FOR K=1:1:8 I $ZBITGET(X,K) S X1=X1+(2**(K-1))
-
-   QUIT X1
-
-   This uses several $ZBIT functions to turn a character into a bit stream
-   and return a coded value.
-
-   While this  example  illustrates  the  use  of  several  of  the  $ZBIT
-   functions, the following example produces identical results if you need
-   to code the function illustrated above for production.
-
-
-   ZCRC(X)
-
-   NEW R,I,J,B,X1,K
-
-   SET R=$ZBITSTR(8,0)
-
-   FOR I=1:1:$L(X) S R=$ZBITXOR(R,$C(0)_$E(X,I))
-
-   QUIT $A(R,2)
-
-   This example illustrates the use of $C to specify the number of invalid
-   bits that exist at the end of the character string. In this case there
-   are zero invalid bits.
-
-2 $Zcall()
-   $Zcall()
-
-   The $ZCALL function returns a value supplied  by  an  external  routine
-   written in another programming language. For more  information  on  the
-   $ZCALL function, refer to the "Integrating External  Routines"  chapter
-   in GT.M Programmer's Guide.
-
-2 $ZDate()
-   $ZDate()
-
-   The $ZDATE function returns a date and/or time formatted as text based
-   on an argument formatted in the manner of $HOROLOG. For information on
-   the format of $HOROLOG, refer  to  the  "Intrinsic  Special  Variables"
-   chapter in this manual.
-
-   The format for the $ZDATE function is:
-
-
-   $ZD[ATE](expr1[,expr2[,expr3[,expr4]]]])
-
-   o    The first expression specifies in $HOROLOG format the  date  and/or
-        time that $ZDATE() returns in text format. If the  output  requires
-        only the date or the time, the other piece of the argument that is
-        delimited by a comma (,) may be null.
-
-   o    The  optional  second  expression  specifies  a  string  providing
-        $ZDATE() with a "picture" of the desired  output  format.  If  this
-        argument is missing or  null,  $ZDATE()  uses  the  default  format
-        string "MM/DD/YY". If the optional  second  expression  exceeds  64
-        characters, $ZDATE() generates a run-time error.
-
-   o    The optional third expression specifies a list of 12  month  codes,
-        separated by commas (,), that  $ZDATE()  uses  in  formatting  text
-        months called for by the "MON"  picture,  (i.e.,  $ZDATE()  outputs
-        $PIECE(expr3,",",month-number) when "MON"  appears  in  the  second
-        expression). If this argument is missing  or  null,  $ZDATE()  uses
-        three-character English abbreviations for months.
-
-   o    The optional fourth expression specifies a list of seven day codes,
-        separated by commas (,), which $ZDATE()  uses  in  formatting  text
-        days of the week called for by the "DAY" picture, $ZDATE() outputs
-        $PIECE (expr4,",",day-of-week-number) when  "DAY"  appears  in  the
-        second expression; if this argument is missing  or  null,  $ZDATE()
-        uses three-character English abbreviations for days of the week.
-
-   $ZDATE() provides an easy and flexible  tool  for  putting  M  internal
-   date/time ($HOROLOG) formats into more user-friendly formats.
-
-   The Intrinsic Special Variable $ZDATEFORM determines the output format
-   for years. The default value is zero (0), in which case  $ZDATE()  with
-   one argument (no format specification) uses a "YY" (two  digit)  format
-   for all years. If $ZDATEFORM is one (1), a "YYYY" (four  digit)  format
-   is used for years later than 1999. For all other values of $ZDATEFORM,
-   "YYYY" (four digit) format is used for all years. $ZDATEFORM  does  not
-   affect $ZDATE() when the format argument is specified.
-
-3 $ZDate_Form_Spec_Ele
-   $ZDATE Format Specification Elements
-
-   This section lists the $ZDATE() format specification elements. $ZDATE()
-   format specifications must appear in upper case.  When  any  alphabetic
-   characters  in  format  specifications  are  in  lower  case,  $ZDATE()
-   generates a run-time error.
-
-        YY Outputs the rightmost two digits of the year.
-        YEAR Outputs the year as a four-digit number.
-        MM Outputs the month as a two-digit zero-filled number  between  01
-        and 12.
-        MON Outputs the month as  a  three-letter  abbreviation.  (You  can
-        modify the output further using expr3).
-        DD Outputs the day of the month as a two-digit  zero-filled  number
-        between 01 and 31.
-        DAY Outputs the day of the week  as  a  three-letter  abbreviation.
-        (You can modify the output further using expr4).
-        24 Outputs the hour of the day as a zero-filled number  between  00
-        and 23.
-        12 Outputs the hour of the day as a zero-filled number  between  01
-        and 12.
-        60 Outputs the minute of the hour as a zero-filled  number  between
-        00 and 59.
-        SS Outputs the second of the minute as a zero-filled number between
-        00 and 59.
-        AM Outputs the letters AM and PM depending on the time.
-        + Inserts a plus sign (+) in the output string
-        - Inserts a minus sign (-) in the output string.
-        . Inserts a period (.) in the output string.
-        , Inserts a comma (,)in the output string.
-        / Inserts a slash (/) in the output string.
-        : Inserts a colon (:) in the output string.
-        ; Inserts a semi-colon (;) in the output string.
-        * Inserts an asterisk (*) in the output string.
-        A blank space inserts a blank space in the output string.
-
-3 Ex_of_$ZDate()
-   Examples of $ZDATE()
-
-   Example:
-
-
-   GTM> WRITE $H,!,$ZDATE($H)
-
-   55243,43223
-   04/01/2002
-   GTM>
-
-   This displays $HOROLOG and then uses $ZDATE() to display today's date.
-   The output shown would appear if today were the first of April, 2002.
-
-   Example:
-
-
-   GTM> W $ZDATE($H,"DD-MON-YEAR")
-
-   01-APR-2002
-   GTM>
-
-   This uses the second argument to specify a text format  different  from
-   the default.
-
-   Example:
-
-
-   GTM> SET m="Januar,Februar,Marz,April,Mai,Juni,Juli,August,"
-
-   GTM> SET m=m_"September,October,November,Dezember"
-
-   GTM> WRITE $ZDATE($H,"DD-MON-YEAR",m)
-
-   01-April-2002
-   GTM>
-
-   This is similar to  the  prior  example,  however  it  uses  the  third
-   argument to specify the months in German.
-
-   Example:
-
-
-   GTM> SET d="Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi,Samedi"
-
-   GTM> WRITE $ZD($H,"DAY, DD/MM/YY","",d)
-
-   Mercredi, 01/04/2002
-
-   GTM>
-
-   This example displays the first of April, however it  uses  the  fourth
-   argument to specify the days of the week in French.
-
-   Example:
-
-
-   GTM> WRITE !,$ZDATE($H,"12:60:55 AM")
-
-   10:35:51 PM
-   GTM>
-
-   This example shows hours, minutes, and seconds in a 12 hour clock with
-   an AM/PM indicator.
-
-   Example:
-
-
-   GTM> WRITE !,$ZDATE(",36524","24-60")
-
-   10-08
-   GTM>
-
-   This example shows hours and minutes on a 24 hour  clock.  Notice  that
-   the first argument must provide the time in the second comma delimiter
-   piece to match $HOROLOG format.
-
-   Example:
-
-
-   GTM>WRITE $ZDATEFORM
-
-   0
-   GTM>WRITE $ZDATE($H)
-
-   11/15/02
-   GTM>SET $ZDATEFORM=1
-
-   GTM>WRITE $ZDATE($H)
-
-   11/15/2002
-   GTM>WRITE $ZDATE($H,"MM/DD/YY")
-
-   11/15/02
-   This example converts the output format  for  years  from  the  default
-   ("YY") format to the four digit format  ("YYYY")  using  the  Intrinsic
-   Special Variable $ZDATEFORM.
-
-2 $ZFILEattributes()
-   $ZFILEattributes()
-
-   The $ZFILEATTRIBUTES function returns an item of  information  about  a
-   specified file. The $ZFILEATTRIBUTES function is analogous to  the  DCL
-   Lexical function F$FILE_ATTRIBUTES.
-
-   The format for the $ZFILEATTRIBUTES function is:
-
-
-   $ZFILE[ATTRIBUTES](expr1,expr2)
-
-   o    The first expression specifies the target file
-
-   o    The second expression specifies the item  keyword  identifying  the
-        information for  $ZFILEATTRIBUTES()  to  return;  keywords  may  be
-        upper-, lower-, or mixed-case
-
-   $ZFILEATTRIBUTES()  provides  a  tool  for  examining  the  RMS
-   characteristics of a file from GT.M.
-
-3 Ex_of_$ZFILE
-   Examples of $$ZFILEATTRIBUTES()
-
-   Example 1:
-
-
-   GTM> WRITE $ZFILEATTRIBUTES("GTMSHR","PRO")
-
-   RWED,RWED,RE,RE
-
-   GTM>
-
-   This uses $ZFILEATTRIBUTES() to display the  UIC  protection  mask  for
-   GTMSHR.EXE.
-
-   Example 2:
-
-
-   GTM> WRITE $ZFILE("M.DAT","deq")
-
-   100
-   GTM>
-
-   This uses $ZFILEATTRIBUTES() to examine the default extension size for
-   M.DAT.
-
-2 $ZGETDVI()
-   $ZGETDVI()
-
-   The $ZGETDVI function returns an item of information about a specified
-   device. The $ZGETDVI function is analogous to the DCL Lexical function
-   F$GETDVI.
-
-   The format for the $ZGETDVI function is:
-
-
-   $ZGETDVI(expr1,expr2)
-
-   o    The first expression specifies the target device
-
-   o    The second expression specifies the item  keyword  identifying  the
-        type of information returned; keywords may be  upper-,  lower-,  or
-        mixed-case
-
-   $ZGETDVI() provides a tool for examining the characteristics of devices
-   in the VMS environment from within GT.M. There are three instances when
-   the values returned by F$GETDVI and $ZGETDVI are not identical.
-
-3 Ex_of_$ZGETDVI()
-   Examples of $ZGETDVI()
-
-   Example:
-
-
-   GTM> W $ZGETDVI($ZPARSE("cus.dat","device"),"freeblocks")
-
-   296697
-   GTM>
-
-   This uses $ZGETDVI() and $ZPARSE() to display the number  of  free  RMS
-   blocks on the disk drive that holds the CUS.DAT file.
-
-   Example:
-
-
-   IF $ZGETDVI($IO,"PRINTER") WRITE clrtop
-
-   This uses $ZGETDVI() as the argument to an IF command,  such  that  the
-   WRITE command executes only if  the  current  device  has  an  attached
-   printer port.
-
-2 $ZGETJPI()
-   $ZGETJPI()
-
-   The $ZGETJPI function returns an item of  job  or  process  information
-   about a specified process. The $ZGETJPI function is  analogous  to  the
-   DCL F$GETJPI lexical function.
-
-   The format for the $ZGETJPI function is:
-
-
-   $ZGETJPI(expr1,expr2)
-
-   o    The first expression identifies the PID of the target job, if this
-        argument is a null  string  (""),  $ZGETJPI()  returns  information
-        about the current process.
-
-   o    The second expression specifies the item  keyword  identifying  the
-        type of information returned; keywords may be  upper-,  lower-,  or
-        mixed-case.
-
-   $ZGETJPI() provides a tool for examining the characteristics of  a  VMS
-   process and the job in which it operates. Accessing  information  about
-   processes belonging to other users  requires  certain  VMS  privileges.
-   Consult  your  system  manager  if  you  feel  you  require  additional
-   privileges.
-
-   The function $ZGETJPI($J,"TERMINAL") returns  the  output  device  only
-   when the process is the first (master) process with  a  job.  Within  a
-   spawned process, the VMS system service used by $ZGETJPI returns a null
-   string for  the  item  TERMINAL.  However,  the  following  alternative
-   acquires the PID of the primary process and uses that to  in  turn  get
-   the terminal.
-
-
-   $ZGETJPI($ZGETJPI($J,"MASTER_PID"),"TERMINAL")
-
-3 Ex_of_$ZGETJPI()
-   Examples of $ZGETJPI()
-
-   Example 1:
-
-
-   GTM> WRITE $ZGETJPI("","IMAGECOUNT")
-
-   12
-   GTM>
-
-   This uses $ZGETJPI() to determine how many images the process has used,
-   not including the current image, to arrive at the current point.
-
-   Example 2:
-
-
-   GTM> SET t=$ZGETJPI("","cputim")
-
-   GTM> DO BENCH WRITE $ZGETJPI("","cputim")-t
-
-   1738
-   GTM>
-
-   This uses $ZGETJPI() to  measure  the  actual  CPU  time,  measured  in
-   hundredths of a second, consumed by performing the BENCH sub-routine.
-
-2 $ZGETLKI()
-   $ZGETLKI()
-
-   The $ZGETLKI function returns an item of information about a VMS lock.
-
-   The format for the $ZGETLKI() function is:
-
-
-   $ZGETLKI(expr1,expr2)
-
-   o    The first expression specifies a lock-id identifying the target VMS
-        lock.
-
-   o    The second expression specifies the item  keyword  identifying  the
-        type of information returned; keywords may be in upper-, lower-, or
-        mixed-case.
-
-   $ZGETLKI() provides a tool for examining VMS lock characteristics from
-   within M. Accessing information about locks belonging  to  other  users
-   requires WORLD or SYSLCK privileges. Note that VMS locks  and  M  LOCKs
-   are not at all the same, even though they serve corresponding purposes
-   in their respective environments.  For  information  about  VMS  locks,
-   refer to the VMS Introduction to System Services.
-
-3 Ex_of_$ZGETLKI()
-   Examples of $ZGETLKI()
-
-   Example 1:
-
-
-   GTM> WRITE $ZGETLKI(lk,"RESNAM")
-
-   GTM$LM
-
-   GTM>
-
-   This uses $ZGETLKI() to examine a VMS lock resource name.
-
-   Example 2:
-
-   IF $ZGETLKI(lk,"PID")=$JOB WRITE lk,!,?10,"is mine"
-
-   This uses $ZGETLKI() as the argument to an IF  command  such  that  the
-   write only executes when the process owns the VMS lock,  identified  by
-   lk. This depends on the fact that GT.M uses the VMS PID for  the  value
-   of the $JOB Intrinsic Special Variable.
-
-2 $ZGETSYI()
-   $ZGETSYI()
-
-   The $ZGETSYI function returns  an  item  of  information  about  a  VMS
-   system. The $ZGETSYI function is analogous to the DCL lexical function
-   F$GETSYI.
-
-   The format for the $ZGETSYI() function is:
-
-
-   $ZGETSYI(expr1[,expr2])
-
-   o    The first expression specifies the  item  keyword  identifying  the
-        type of information $ZGETSYI() returns;  keywords  may  be  upper-,
-        lower-, or mixed-case.
-
-   o    The optional second expression specifies the target node;  if  this
-        argument is missing or null, $ZGETSYI() returns  information  about
-        the current host system.
-
-   $ZGETSYI() provides a tool for examining  operating  system  parameters
-   from within GT.M.
-
-3 Ex_of_$ZGETSYI()
-   Examples of $ZGETSYI()
-
-   Example 1:
-
-
-   GTM> WRITE $ZGETSYI("CLUSTER_NODES")
-
-   3
-   GTM>
-
-   This uses $ZGETSYI() to display the number of nodes in the VMS cluster,
-   in this case 3.
-
-   Example 2:
-
-
-   FOR node="MIKE","IKE" D
-
-   .F item="node_swtype","version" W !,$ZGETSYI(item,node)
-   QUIT
-
-   This uses nested FOR loops with $ZGETSYI()  to  display  the  operating
-   system type for the nodes "MIKE" and "IKE". Note that because "VERSION"
-   is only available for the local node, the  attempt  to  also  show  the
-   operating system version displays a blank line, except when the current
-   node is MIKE or IKE.
-
-2 $ZJOBEXAM()
-   $ZJOBEXAM()
-
-   The $ZJOBEXAM function returns the full specification of the file into
-   which the function places a ZSHOW "*". The return value serves as a way
-   to save, to notify others of the exact location of the  output,  or  to
-   open the file for further processing. GT.M reports each $ZJOBEXAM() to
-   the operator log facility with its file specification.
-
-   The  optional  expression  argument  is  a  template  output  device
-   specification. It can be a device, a file directory, or  a  file  name.
-   The template is an expression that is pre-processed to  create  a  file
-   specification as  the  target  for  the  ZSHOW.  The  preprocessing  is
-   equivalent to $ZPARSE(), as illustrated by the following M code:
-
-
-   Set deffn="GTM_JOBEXAMINE.ZSHOW_DMP_"_$JOB_"_"_<cntr>
-
-   Set filespec=$ZPARSE(expr1,,deffn,,NO_CONCEAL)
-
-   The $ZJOBEXAM()does not trigger error processing except when there is a
-   problem storing its return value,  so  no  error  is  reported  to  the
-   process until after any dump is complete. In the  event  of  any  error
-   encountered during the $ZJOBEXAM(), GT.M sends an  appropriate  message
-   to operator log facility and returns control to the caller.  Note  that
-   this special error handling applies only to the $ZJOBEXAM(), and is not
-   a property of the $ZINTERRUPT interrupt handler, which uses $ZJOBEXAM()
-   by default.
-
-   $ZJOBEXAM() dump files contain the context of a process at the time the
-   function executes. Placement  and  management  of  these  files  should
-   consider their potential size and security implications.
-
-3 Ex_of_$ZJOBEXAM()
-   Examples of $ZJOBEXAM()
-
-   Example:
-
-
-   GTM>Set x=$zjobexam("TESTEXAM")
-
-   GTM>zwr x
-
-   x="ASGARD$DKB100:[LIBRARY.V999.PRO]TESTEXAM.ZSHOW_DMP_539119331_1;"
-
-   GTM>
-
-   This example shows the fully qualified name of the dump file  that  was
-   created by $ZJOBEXAM
-
-2 $ZLKID()
-   $ZLKID()
-
-   The $ZLKID function returns the identification number of the  first  or
-   next lock in the VMS distributed lock environment.
-
-   The syntax of the $ZLKID function is:
-
-
-   $ZLKID(tvexpr)
-
-   o    If the truth-valued expression is false (0), $ZLKID()  returns  the
-        first accessible, currently active lock in the VMS distributed lock
-        environment; if the truth-valued  expression  is  true  (non-zero),
-        $ZLKID() returns the "next" lock, with respect to the last call to
-        $ZLKID(); if $ZLKID() has a non-zero argument before it  has  a  ()
-        argument, the function generates a run-time error.
-
-   o    If the last prior  lock  returned  is  the  last  lock  accessible,
-        $ZLKID() returns a null string.
-
-   $ZLKID() provides a tool for identifying VMS locks  from  within  GT.M.
-   Accessing information about locks belonging  to  other  users  requires
-   WORLD or SYSLCK privileges. Consult your system manager if you feel you
-   require additional privileges.
-
-3 Ex_of_$ZLKID()
-   Examples of $ZLKID()
-
-   Example 1:
-
-
-   SET x=$ZLKID(0) F cnt=0:1 Q:x="" S x=$ZLKID(1)
-
-   This uses $ZLKID() to count the  number  of  currently  accessible  VMS
-   locks.
-
-   Example 2:
-
-
-   SET L=$ZLKID(0)
-
-   FOR Q:L="" D
-
-   .I $ZGETLKI(L,"RESNAM")="GTM$LM" SHWJOB($ZGETLKI(L,"PID"))
-   D
-
-   .SET L=$ZLKID(1)
-   QUIT
-
-   This uses $ZLKID() and $ZGETLKI() to identify GT.M processes  based  on
-   whether they hold a VMS lock with the resource name "GTM$LM". Once the
-   routine has identified a process,  it  invokes  the  subroutine  SHWJOB
-   passing the VMS PID. For a more extensive  example,  refer  to  the  "M
-   Utility Routines" chapter in GT.M Programmer's Guide.
-
-2 $ZMessage()
-   $ZMessage()
-
-   The $ZMESSAGE function returns  a  message  string  associated  with  a
-   specified status code in the standard VMS  error  message  format.  The
-   $ZMESSAGE function is analogous to the DCL F$MESSAGE lexical function.
-
-   The format for the $ZMESSAGE function is:
-
-
-   $ZM[ESSAGE](intexpr)
-
-   o    The  integer  expression  specifies  the  status  code  for  which
-        $ZMESSAGE() returns error message textin  the  standard  VMS  error
-        message format.
-
-   $ZMESSAGE() provides a tool for examining the message associated with a
-   particular message code as reported in $ZSTATUS.
-
-   The standard VMS error message format is:
-
-
-   %FACILITY-S-IDENT, TEXT
-
-   Where:
-
-        % Identifies the first message issued for a given error.  A  hyphen
-        (-) prefaces subsequent messages for the same error.
-        FACILITY Identifies the source of the error.
-        S Indicates one of five severity level indicators.
-   The indicators and their meanings are:
-
-        S Successful completion
-        I Information
-        W Warning
-        E Error
-        F Fatal or severe error
-        IDENT Represents an abbreviation of the message text.
-        TEXT Explains the message
-   The DCL command SET MESSAGE controls which message  fields  $ZMESSAGE()
-   returns. By default, the VMS message facility returns all four fields.
-
-   The $ZSTATUS Intrinsic Special Variable holds the message code and the
-   message of the last non-Direct Mode GT.M error. For more information on
-   $ZSTATUS, refer to the "Intrinsic Special Variables"  chapter  in  GT.M
-   Programmer's Guide.
-
-3 Ex_of_$ZMessage()
-   Examples of $ZMESSAGE()
-
-   Example 1:
-
-
-   GTM> WRITE $ZMESSAGE(36)
-
-   %SYSTEM-F-NOPRIV, no privilege for attempted operation
-
-   GTM>
-
-   This uses $ZMESSAGE() to display the message  string  corresponding  to
-   code 36. Note that the display might vary depending on DCL SET MESSAGE
-   commands issued prior to invoking GT.M.
-
-   Example 2:
-
-
-   GTM> FOR i=32:1:36 WRITE !,$ZMESSAGE(i)
-
-   This FOR loop uses $ZMESSAGE() to display all severities of the NOPRIV
-   error.
-
-2 $ZPARSE()
-   $ZPARSE()
-
-   The $ZPARSE function expands a file name to a  full  file-specification
-   and then returns the full  file-specification  or  one  of  its  fields
-   (node, device, directory, name, type, or version). The $ZPARSE function
-   is analogous to the DCL F$PARSE lexical  function.  The  order  of  the
-   operands differs from the DCL F$PARSE function.
-
-   The format for the $ZPARSE function is:
-
-
-   $ZPARSE(expr1[,expr2[,expr3[,expr4[,expr5]]]])
-
-   o    The first expression specifies the file-specification to parse; if
-        the file-specification is  not  valid,  $ZPARSE()  returns  a  null
-        string; if the file-specification contains a VMS wildcard (* and/or
-        %),  $ZPARSE()  returns  a  file-specification  containing  the
-        wildcard(s).
-
-   o    The  optional  second  expression  specifies  the  field  of  the
-        file-specification that $ZPARSE()  returns;  if  this  argument  is
-        missing  or  null,  $ZPARSE()  returns  a  full  file-specification
-        constructed using default values in place of any fields missing for
-        node, directory, file, type, and version.
-
-   o    The optional third and fourth expressions specify default values to
-        use during file name expansion for missing  fields  (node,  device,
-        directory, name, type, or version), if any, in  the  original  file
-        name. For any field missing in the original file name specified in
-        expr1, $ZPARSE() will attempt to substitute the corresponding field
-        from expr3; if that field is not present in expr3,  $ZPARSE()  will
-        attempt to use the corresponding field from expr4.
-
-   o    If the file name, type, or version is missing  from  all  three  of
-        expr1, expr3, and expr4, $ZPARSE() will return a  null  string  for
-        the corresponding field. If the file node, device, or directory is
-        missing from all three of expr1, expr3, and expr4,  $ZPARSE()  will
-        substitute the information from your current default directory.
-
-   o    The optional fifth expression specifies the mode or type  of  parse
-        that $ZPARSE() performs.
-
-   $ZPARSE() provides a tool for verifying that  a  file-specification  is
-   syntactically  correct,  for  examining  specific  fields  of  a
-   file-specification, and for filling in  missing  pieces  in  a  partial
-   specification based on a hierarchy of defaults. For  information  about
-   determining  whether  a  file  exists,  refer  to  the  description  of
-   $ZSEARCH().
-
-   $ZPARSE() arguments, after the first, are optional. If you use no other
-   arguments, a  single  argument  is  sufficient.  However,  if  you  use
-   selected arguments $ZPARSE() requires that null strings ("") be filled
-   in for the unspecified arguments.
-
-   The acceptable keywords for the second argument are:
-
-        "NODE" Node name
-        "DEVICE" Device name
-        "DIRECTORY" Directory name
-        "NAME" File name (excluding file extension)
-        "TYPE" File typeextension
-        "VERSION" File version number
-   The keywords may be entered in either upper or  lower  case.  Variables
-   that evaluate to these  strings  and  indirection  are  acceptable  for
-   argument two. When the keywords themselves appear as  string  literals,
-   they must be enclosed in quotation marks (" ").
-
-   The keywords for the fifth argument $ZPARSE() are:
-
-        NULL ("") Returns a full file-specification or device
-        "SYNTAX_ONLY"
-        Disables checking for the existence of the directory or device.
-        "NO_CONCEAL"
-        Disables the "conceal" attribute  in  the  translation  of  logical
-        names in a file-specification.
-   The mode names may be upper or lower case but cannot be abbreviated.
-
-3 Ex_of_$ZPARSE()
-   Examples of $ZPARSE()
-
-   Example:
-
-
-   GTM> WRITE $ZPARSE("TEST","",";3","DUST.LIS")
-
-   SYS$:[THOMPSON.WORK]TEST.LIS;3
-
-   GTM>
-
-   This uses $ZPARSE() to  demonstrate  defaulting  using  the  third  and
-   fourth arguments. The result gets the device and directory  field  from
-   the  process  current  default  directory,  the  name  from  the  first
-   expression, the type from the fourth extension, and  the  version  from
-   the third expression.
-
-
-   $ SET DEF[WORK.NEW]
-
-   $ GTM
-
-   GTM>WRITE $ZPARSE("TEST","","X.LIS","Y.C")
-
-   USER:[WORK.NEW]TEST.LIS;
-
-   GTM>WRITE $ZPARSE("test","","[WORK.NEW]","Y.C")
-
-   USER:[WORK.NEW]TEST.C;
-
-   GTM>
-
-   This example illustrates the use of the third and fourth  arguments  to
-   $ZPARSE(). In the first statement, the first argument has no directory
-   or extension fields, so $ZPARSE() substitutes the extension field from
-   the third  argument.  Since  neither  the  third  nor  fourth  argument
-   specifies  a  directory,  $ZPARSE()  substitutes  the  current  working
-   directory, and because the fourth argument does not contain any fields
-   that are not present in the third argument, the fourth argument is not
-   used.
-
-   In the second statement, the  first  argument  to  $ZPARSE()  is  again
-   missing both the directory and extension. In this  instance,  $ZPARSE()
-   uses the directory specified in the third argument and, because neither
-   the first nor third argument specifies a file extension, $ZPARSE() uses
-   the file extension from the fourth argument.
-
-
-   GTM> W $ZPARSE("GTM$DIST","DIRECTORY","","","NO_CONCEAL")
-
-   [SYS1.SYSCOMMON.][GTM_DIST]
-   GTM>
-
-   This uses $ZPARSE() to display the directory structure for the logical
-   name GTM$DIST. The "NO_CONCEAL" keyword in the  fifth  argument  causes
-   the function to return information about  the  concealed  logical  name
-   SYS$COMMON. Note the top level system directory  may  be  different  on
-   your system and other parts of the path may vary if your  shop  uses  a
-   non-standard GT.M installation.
-
-2 $ZPID()
-   $ZPID()
-
-   The $ZPID function returns the process identification number  (PID)  of
-   the first or next currently  accessible  process  in  the  system.  The
-   $ZPID() function is similar to the DCL lexical  function  F$PID  except
-   that M represents the resulting PIDs in decimal.
-
-   The format for the $ZPID function is:
-
-   $ZPID(tvexpr)
-
-   o    If the truth-valued expression is  false  (0),  $ZPID  returns  the
-        first accessible, currently active PID in the VMS  system;  if  the
-        truth-valued expression  is  true  (non-zero),  $ZPID  returns  the
-        "next" PID, with respect to the last call to $ZPID; if $ZPID() has
-        a non-zero argument before it has a zero (0) argument, the function
-        generates a run-time error.
-
-   o    If the last prior PID returned is the last PID accessible, $ZPID()
-        returns a null string.
-
-   $ZPID()  provides  a  tool  for  identifying  processes  in  the  VMS
-   environment from within GT.M.  Accessing  information  about  processes
-   belonging to other users requires certain VMS privileges. Consult your
-   system manager if you feel you require additional privileges.
-
-3 Ex_of_$ZPID()
-   Examples of $ZPID()
-
-   The examples in this section illustrate the previous verbal description
-   of $ZPID().
-
-   Example 1:
-
-
-   $ GTM
-
-   GTM> WRITE $ZPID(1)
-
-   %GTM-E-ZPIDBADARG,
-
-   The tvexpr must be FALSE if the last ZPID not found
-
-   GTM>
-
-   This $ZPID() attempts to get the next PID without getting the first PID
-   and, therefore, generates an error.
-
-   Example 2:
-
-
-   S pid=$ZPID(0) F Q:pid="" D SHWPRC(pid) S pid=$ZPID(1)
-
-   This uses a $ZPID() loop to examine all accessible processes. The logic
-   is analogous to that in a $ORDER() loop. If this routine  runs  without
-   the VMS WORLD privilege, it may not "see" all processes.
-
-2 $ZPrevious()
-   $ZPrevious()
-
-   The $ZPREVIOUS function returns the subscript of the previous local or
-   global variable name in  collation  sequence  within  the  array  level
-   specified by its  argument.  When  $ZPREVIOUS()  has  an  unsubscripted
-   argument,  it  returns  the  previous  unsubscripted  local  or  global
-   variable name in collating sequence.
-
-   The $ZPREVIOUS  function  provides  compatibility  with  some  other  M
-   implementations. The M Development Committee chose  to  implement  this
-   functionality  with  the  optional  second  -1  argument  of  $ORDER().
-   Therefore, when a design requires this functionality $ORDER()  has  the
-   advantage over $ZPREVIOUS of being part of the M standard.
-
-   The format for the $ZPREVIOUS function is:
-
-
-   $ZP[REVIOUS](glvn)
-
-   o    The subscripted or unsubscripted  global  or  local  variable  name
-        specifies the node prior to which $ZPREVIOUS()  searches  backwards
-        for a defined node with data  and/or  descendants.  The  number  of
-        subscripts contained in the argument implicitly defines  the  array
-        level.
-
-   o    If $ZPREVIOUS() finds no node at the  specified  level  before  the
-        specified global or local variable, it returns a null string.
-
-   o    If the last subscript in the subscripted global or  local  variable
-        name is null, $ZPREVIOUS() returns the last node at  the  specified
-        level.
-
-   $ZPREVIOUS() is equivalent to $ORDER() with a second argument of -1.
-
-2 $ZPRIVilege()
-   $ZPRIVilege()
-
-   The $ZPRIVILEGE function returns a boolean value depending  on  whether
-   the current process privileges include all  privileges  listed  in  the
-   $ZPRIVILEGE argument. The $ZPRIVILEGE function is analogous to the DCL
-   lexical function F$PRIVILEGE.
-
-   The format for the $ZPRIVILEGE function is:
-
-
-   $ZPRIV[ILEGE](expr)
-
-   o    The expression specifies a VMS privilege or a  list  of  privileges
-        separated by commas.
-
-   o    If the process currently  has  all  of  the  specified  privileges,
-        $ZPRIVILEGE() returns a true (1).
-
-   o    If  the  process  currently  lacks  any  one  of  the  privileges,
-        $ZPRIVILEGE() returns a false (0).
-
-   $ZPRIVILEGE() provides a tool for determining within GT.M  whether  the
-   current process privileges are adequate for some task. For information
-   about adjusting privileges and a list of VMS privileges, refer  to  the
-   section on $ZSETPRV() in the "Functions" chapter in  GT.M  Programmer's
-   Guide
-
-3 Ex_of_$ZPRIVilege()
-   Examples of $ZPRIVILEGE()
-
-   Example 1:
-
-
-   GTM> WRITE $ZPRIVILEGE("NETMBX,TMPMBX")
-
-   1
-   GTM> WRITE $ZPRIVILEGE("BYPASS")
-
-   0
-   GTM>
-
-   This uses $ZPRIVILEGE() to show that the process  has  the  NETMBX  and
-   TMPMBX privileges, but not the BYPASS privilege.
-
-   Example 2:
-
-
-   IF $ZPRIVILEGE("SYSLCK") DO WORK
-
-   This loop uses $ZPRIVILEGE() as the argument to an IF command such that
-   DO WORK only executes if the process has SYSLCK privileges.
-
-2 $ZQGBLMOD()
-   $ZQGBLMOD()
-
-   The $ZQGBLMOD function enables an application to determine  whether  it
-   can safely apply a lost transaction to the database. A lost transaction
-   is a transaction that  must  be  rolled  off  a  database  to  maintain
-   dual-site consistency.
-
-   The format for the $ZQGBLMOD function is:
-
-
-   $ZQGBLMOD(gvn)
-
-   o    The subscripted  or  non-subscripted  global  variable  name  (gvn)
-        specifies the target node.
-
-   o    A return value of zero (0) means the value of the  global  variable
-        has not changed since the last synchronization of the  primary  and
-        secondary.
-
-   o    A return value of one (1) means the value of  the  global  variable
-        may have changed since the last synchronization of the primary and
-        secondary.
-
-   $ZQGBLMOD function produces an error if you submit an argument that is
-   not a global variable name.
-
-   Internally, $ZQGBLMOD (gvn) compares the GT.M transaction number in the
-   database block in which the global variable name  is  stored  with  the
-   value in the resync_tn field stored in the database file header.
-
-   For example, if x is the transaction number  of  the  level-0  database
-   block in which gvn resides, and y is the value of resync_tn  of  region
-   reg containing gvn, then the following is true:
-
-   o    If x £ y, no transaction modified the level-0 database block z in
-        which gvn resides since the  databases  at  primary  and  secondary
-        became synchronized with each other.  $ZQGBLMOD()  returns  a  zero
-        (0).
-
-   o    If x > y, some transaction modified z, but not necessarily
-❇❖■
-, after the primary and secondary system databases synchronized  with  each
-, after the primary and secondary system databases synchronized with each
-, after the primary and secondary system databases synchronized with each
-, after the primary and secondary system databases synchronized with each
-, after the primary and secondary system databases synchronized with each
-, after the primary and secondary system databases synchronized with each
-, after the primary and secondary system databases synchronized with each
-, after the primary and secondary system databases synchronized with each
-
-   If a transaction is a lost transaction that has been rolled back and it
-   is determined that for  all  the  M  globals  set  and  killed  in  the
-   transaction $ZQGBLMOD() is zero (0), it is probably safe to  apply  the
-   updates automatically. However, this determination of safety  can  only
-   be made by the application designer and not by GT.M. If the $ZQGBLMOD()
-   is one (1) for any set or kill in the transaction, it is  not  safe  to
-   apply the update.
-
-        The  test  of  $ZQGBLMOD()  and  applying  the  updates  must  be
-        encapsulated inside a GT.M transaction.
-
-   Another approach to handling lost transactions would be to store in the
-   database the initial message sent by a client, as well as  the  outcome
-   and the response, and to reprocess the  message  with  normal  business
-   logic. If the outcome is  the  same,  the  transaction  can  be  safely
-   applied.
-
-        If  restartable  batch  operations  are  implemented,  lost  batch
-        transactions can be ignored since a subsequent batch  restart  will
-        process them correctly.
-
-2 $ZSEARCH()
-   $ZSEARCH()
-
-   The $ZSEARCH function returns the full file-specification of a located
-   RMS file. The  $ZSEARCH  function  is  analogous  to  the  DCL  Lexical
-   function  F$SEARCH.  However,  $ZSEARCH(),  consistent  with  $ORDER(),
-   always returns a null after returning  the  last  file  even  when  the
-   function finds only one matching file, while the  DCL  lexical  returns
-   the sole file-specification every time.
-
-   The format for the $ZSEARCH function is:
-
-
-   $ZSEARCH(expr[,intexpr])
-
-   o    The expression contains a file-specification, with or  without  VMS
-        wildcards, for which $ZSEARCH() attempts to locate a matching file.
-        Repeating $ZSEARCH with the same filename uses the same context and
-        return a sequence of matching  files  when  they  exist;  when  the
-        sequence is exhausted, $ZSEARCH() returns an empty string (""). Any
-        change to the file name starts a new context.
-
-   o    If  the  expression  does  not  specify  a  device  and  directory,
-        $ZSEARCH() uses the process current default directory.
-
-   o    If the argument omits  the  version  number,  $ZSEARCH()  uses  the
-        latest version of the file.
-
-   o    The optional integer expression specifies a "stream" number from 0
-        to 255 for each search; streams provide a means of having up to 256
-        $ZSEARCH() contexts simultaneously in progress.
-
-   o    If a $ZSEARCH() stream has never been used  or  if  the  expression
-        differs from the argument to the last $ZSEARCH() of the stream, the
-        function  resets  the  context  and  returns  the  first
-        file-specification matching the expression; otherwise,  it  returns
-        the next matching file in collating sequence;  if  the  last  prior
-        file-specification returned for the same expression and same stream
-        was the last one matching the argument, $ZSEARCH() returns  a  null
-        string.
-
-   $ZSEARCH() provides a tool  for  verifying  that  a  file-specification
-   exists and for finding all  files  that  match  a  specificationa  file
-   exists.  For  information  to  help  determine  the  validity  of  a
-   file-specification  and  about  specifying  directories  and  file
-   extensions,file name, refer to the section on $ZPARSE().
-
-3 Ex_of_$ZSEARCH()
-   Examples of $ZSEARCH()
-
-   Example:
-
-
-   GTM> WRITE $ZSEARCH("DATA.DAT")
-
-   PROJK:[TEST]DATA.DAT;6
-
-   GTM>
-
-   This uses $ZSEARCH() to display the full RMS file-specification of the
-   current version of "DATA.DAT" in the process current default directory.
-
-   Example:
-
-
-   GTM>SET x=$ZSEARCH("*.M")
-
-   GTM>FOR S x=$ZSEARCH("*.M") Q:x="" W !,$ZPARSE(x,"NAME")
-
-   This FOR loop uses $ZSEARCH() and $ZPARSE() to display  M  source  file
-   names in the process current default  directory.  To  ensure  that  the
-   search starts at the beginning, the example resets the context by first
-   searching with a different argument.
-
-2 $ZSETPRV()
-   $ZSETPRV()
-
-   The $ZSETPRV function enables or disables privileges  for  the  process
-   and returns prior states for the  specified  privileges.  The  $ZSETPRV
-   function is analogous to the DCL Lexical function F$SETPRV.
-
-   The format for the $ZSETPRV function is:
-
-
-   $ZSETPRV(expr)
-
-   o    The expression specifies a VMS privilege or a list  of  privileges,
-        separated by commas, which $ZSETPRV() enables or, if  they  have  a
-        prefix of "NO", disables.
-
-   o    $ZSETPRV() returns a list similar to its argument with a prefix of
-        "NO" on any privilege that was previously disabled.
-
-   o    $ZSETPRV() can always disable privileges; however, it cannot enable
-        privileges to which the account does not have access.
-
-   $ZSETPRV() provides a tool for adjusting  VMS  privileges  from  within
-   GT.M. Because the $ZSETPRV() return provides the  prior  state  of  the
-   privileges in the same format as the function input,  the  program  can
-   subsequently use $ZSETPRV() to restore the prior state. For information
-   on passive  determination  of  privileges,  refer  to  the  section  on
-   $ZPRIVILEGE() in the "Functions" chapter in GT.M Programmer's Guide.
-
-3 Ex_of_$ZSETPRV()
-   Examples of $ZSETPRV()
-
-   Example 1:
-
-
-   GTM> WRITE $ZSETPRV("TMPMBX")
-
-   TMPMBX
-
-   GTM>
-
-   This uses $ZSETPRV() to (attempt to) enable the TMPMBX  privilege.  The
-   display from the WRITE command shows that  the  privilege  was  already
-   enabled when the function executed.
-
-   Example 2:
-
-
-   SET savprv=$ZSETPRV("SYSLCK")
-
-   IF '$ZPRIVILEGE("SYSLCK") WRITE !,"Inadequate Privileges"
-
-   ELSE DO ^%ST
-
-   SET savprv=$ZSETPRV(savprv)
-
-   This uses $ZSETPRV() to attempt to enable the  SYSLCK  privilege.  Then
-   $ZPRIVILEGE() checks to determine if the privilege  was  granted.  This
-   controls whether to issue a message or run  the  %ST  utility  program.
-   Finally,  the  routine  restores  the  original  state  of  the  SYSLCK
-   privilege that was stored in savprv by again using $ZSETPRV().
-
-2 $ZTRNLNM()
-   $ZTRNLNM()
-
-   The $ZTRNLNM function returns information about an  equivalence  stored
-   in the VMS logical name tables. The $ZTRNLNM function is  analogous  to
-   the DCL Lexical function F$TRNLNM. $ZTRNLNM() optionally does iterative
-   translation, while the DCL  lexical  does  not.  This  difference  only
-   manifests itself when a logical  name  translates  to  another  logical
-   name.
-
-   The format for the $ZTRNLNM function is:
-
-
-   $ZTRNLNM(expr1[,expr2[,expr3[,expr4[,expr5[,expr6]]]]])
-
-   o    The first expression specifies the target logical name.
-
-   o    The second optional expression specifies the logical name table(s)
-        for $ZTRNLNM()  to  use;  if  the  argument  is  missing  or  null,
-        $ZTRNLNM() uses the tables  identified  by  LNM$DCL_LOGICAL,  which
-        usually uses LNM$FILE_DEV to specify searching  the  process,  job,
-        group and system tables in that order.
-
-   o    The third optional expression specifies the index (numbered from 0)
-        that $ZTRNLNM uses if the look-up encounters a search list; if the
-        argument is missing or null, $ZTRNLNM() uses the first  element  of
-        the search list.
-
-   o    The fourth optional expression specifies the initial  mode  of  the
-        look-up; if this argument is missing or null, $ZTRNLNM() starts the
-        look-up in USER mode (alternatives are SUPERVISOR and EXECUTIVE).
-
-   o    The  optional  fifth  expression  specifies  a  keyword  indicating
-        whether the look-up is CASE_SENSITIVE (the alternative and default
-        is CASE_BLIND).
-
-   o    The optional sixth argument specifies the item  keyword  indicating
-        the item of information that $ZTRNLNM() returns; if the argument is
-        missing or null, $ZTRNLNM() returns the "VALUE" of  the  translated
-        equivalence name.
-
-   $ZTRNLNM() provides a tool for examining VMS logical names environment
-   variables from within GT.M.
-
-   If the (third) index argument is  specified  in  conjunction  with  the
-   (sixth) item argument of "FULL", the $ZTRNLNM() uses  the  index  value
-   throughout the iterative translation, and terminates with a null result
-   when it encounters no equivalence name at the  specified  index  within
-   each iteration.
-
-   Only the first argument is required, but missing arguments  before  the
-   last argument specified, must be filled with null strings ("").
-
-3 Ex_of_$ZTRNLNM()
-   Examples of ZTRNLNM()
-
-   Example 1:
-
-
-   GTM> WRITE $ZTRNLNM("GTM$DIST")
-
-   SYS$COMMON:[GTM_DIST]
-
-   GTM>
-
-   This uses $ZTRNLNM() to display the translation value for GTM$DIST.
-
-   Example 2:
-
-
-   SET x=$ZTRNLNM("blotto","","","","CASE_SENSITIVE")
-
-   This uses the case argument to find the translation value for "blotto".
-   The example holds the place of the three unused optional  arguments  to
-   the left of that with null strings ("").
-
-1 Intr_Spe_Vars
-   Intrinsic Special Variables
-
-   M Intrinsic Special Variables start with a single dollar sign ($). GT.M
-   provides such variables for program examination.  In  some  cases,  the
-   Intrinsic Special Variables may be set to modify the corresponding part
-   of the environment.
-
-        None of the Intrinsic Special Variables can be KILLed.  SETting  or
-        NEWing is generally not allowed, but is specifically noted  in  the
-        descriptions of those that do.
-
-2 $Device
-   $Device
-
-   $D[EVICE] reflects the status of the current device. If the  status  of
-   the device does not reflect any error-condition, the value of $DEVICE,
-   when interpreted as a truth-value is 0 (FALSE). If the  status  of  the
-   device  reflect  any  error-condition,  the  value  of  $DEVICE,  when
-   interpreted as a truth-value is 1 (TRUE).
-
-        The initial value of $DEVICE is implementation dependant. However,
-        if the initial value of $IO is the empty string, then  the  initial
-        value of $DEVICE is also empty string.
-
-   $DEVICE gives status code and meaning, in one access:
-
-   Example:
-
-   1,Connection reset by peer
-   The above message is displayed on  the  server  side  when  the  socket
-   device is closed on the client side.
-
-2 $ECode
-   $ECode
-
-   $EC[ODE] contains a list of error codes for "active" errors -the error
-   conditions which are not yet resolved. If there are no  active  errors,
-   $ECODE contains the empty string. Whenever an error occurs, a code for
-   that error is appended to the value of $ECODE in such a  way  that  the
-   value of $ECODE always starts and ends with a comma.
-
-   The value of $ECODE can be SET, and when it is set to a non-NULL value,
-   error processing starts.
-
-   List of codes for $ECODE start with comma seperated by commas.  A  code
-   starts with "M", "U", or "Z", with rest numeric. "M" codes are assigned
-   by MDC (MUMPS Development Committee), "U" by application (programmers),
-   and "Z" codes by MUMPS implementors (in this case GT.M).
-
-   An error always has a GT.M specified code and many errors also have an
-   ANSI Standard code. The complete list of standardized error  codes  can
-   be referenced from  GT.M  Message  and  Recovery  Procedures  Reference
-   Manual version 4.3 and onwards.
-
-
-   IF $ECODE[",M61," WRITE "Undefined local variable"
-
-        The leftmost character of the value of $ECODE is  always  a  comma.
-        This means that every error  code  that  is  stored  in  $ECODE  is
-        surrounded by commas. If $ECODE was  to  contains  the  error  code
-        without the commas (that is, "M61"), the variable would  check  for
-        subset "M6" as well. Thus, it is recommended that you  include  the
-        commas in the value to check. For  example;  check  whether  $ECODE
-        contains ",M61,".
-
-   $ECODE can be SET but not NEW'd. When $ECODE is set to the empty string
-   (" "), error handling becomes "inactive" and therefore  QUIT  does  not
-   trigger additional error handling.
-
-   When $ECODE is not set to the empty string, M error handling is active,
-   which also affects behaviour in some aspects of $STACK.
-
-2 $EStack
-   $EStack
-
-   $ES[TACK] contains an integer count of the number of M virtual machine
-   stack levels that have been activated and not removed  since  the  last
-   time $ESTACK was NEW'd.
-
-   A NEW $ESTACK saves the value of current  $ESTACK  and  then  sets  its
-   value to zero (0). If  $ESTACK  has  not  been  NEW'd  in  the  current
-   execution path, $ESTACK=$STACK.
-
-
-   SET $ETRAP="QUIT:$ESTACK GOTO LABEL^ROUTINE"
-
-   $ESTACK maybe used as  a  flag  to  indicate  error  traps  invoked  in
-   particular stack levels needed to  perform  some  different  action(s).
-   $ESTACK can be most useful in  setting  up  a  layered  error  trapping
-   mechanism.
-
-        GT.M does not permit $ESTACK to be  SET,  however  $ESTACK  can  be
-        NEWed.
-
-2 $ETrap
-   $ETrap
-
-   $ET[RAP] contains a string value that GT.M invokes when an error occurs
-   during routine execution. When a process is initiated, but  before  any
-   commands are processed, the value of $ETRAP is empty string.
-
-   The value of this variable is the M[UMPS] code that gets executed when
-   an error occurs.
-
-
-   SET $ETRAP="QUIT:$ESTACK GOTO LABEL^ROUTINE"
-
-   The value of $ETRAP is changed with the SET command. Changing the value
-   of $ETRAP with the SET command initiates a new trap; it does  not  save
-   the old trap.
-
-   For more examples of the  use  of  special  variable  $ETRAP,  see  the
-   function $STACK().
-
-2 $Horolog
-   $Horolog
-
-   $H[OROLOG] contains a string value specifying the number of days since
-   "31 December, 1840," and the number of seconds since  midnight  of  the
-   current day, separated by a comma (,).
-
-   At midnight, the piece of the string following the comma resets to zero
-   (0) and the piece preceding the comma increments by one (1). GT.M does
-   not permit the SET command to modify $HOROLOG.
-
-   Example:
-
-
-   GTM> WRITE $HOROLOG
-
-   Produces the result 58883,55555 at 3:25:55 pm on 20 March, 2002.
-
-   For further information on formatting $HOROLOG for  external  use,  see
-   the section on $ZDATE().
-
-2 $Io
-   $IO
-
-   $I[O] contains the name of the current device specified by the last USE
-   command. The M standard does not permit the SET command to modify $IO.
-   USE 0 produces the  same  $IO  as  USE  $P[RINCIPAL],  but  $P  is  the
-   preferred construct.
-
-2 $Job
-   $Job
-
-   $J[OB] contains an  integer  value  uniquely  identifying  the  process
-   within the system environment.
-
-   GT.M uses the decimal representation  of  the  VMS  process  identifier
-   (PID) for the value of $JOB. $JOB is guaranteed to be unique for every
-   concurrently operating process on a system. However, operating systems
-   reuse PIDs over time. GT.M does not permit the SET  command  to  modify
-   $JOB.
-
-   Example:
-
-
-   LOOP0 FOR SET itm=$O(^tmp($J,itm)) Q:itm="" DO LOOP1
-
-   This uses $J as the first subscript in a  temporary  global  to  insure
-   that every process uses separate data space in the global ^tmp.
-
-2 $Key
-   $Key
-
-   $K[EY] contains the string that terminated the most recent READ command
-   from the current device  (including  any  introducing  and  terminating
-   characters). If no READ command s issued to the current device or if no
-   terminator is used, the value of $KEY is an empty string. However, when
-   input is terminated by typing a function key,  the  value  of  $KEY  is
-   equal to the string of characters that is transmitted by that function
-   key.
-
-   The effect of a READ *glvn on $KEY is unspecified.
-
-   If a Character Set Profile input-transform is in effect, then  this  is
-   also applied to the value stored in $KEY.
-
-2 $Principal
-   $Principal
-
-   $P[RINCIPAL] contains the name of the principal (initial  $IO)  device.
-   GT.M  establishes  $PRINCIPAL  as  a  fully  expanded  VMS  device
-   specification. $PRINCIPAL is an MDC Type A enhancement to standard M.
-
-   Input and output for a process may  come  from  separate  devices.  VMS
-   designates these  devices  with  the  process-permanent  logical  names
-   SYS$INPUT and SYS$OUTPUT. However, the M  I/O  model  allows  only  one
-   device to be USEd (or active) at a time. When  an  image  starts,  GT.M
-   implicitly OPENs the devices(s) identified by SYS$INPUT and SYS$OUTPUT
-   and assigns the device(s) to $PRINCIPAL. For USE  deviceparameters,  it
-   is the standard input that determines the device type.
-
-   For an image invoked interactively, $PRINCIPAL is the user's terminal.
-   For a batch job, $PRINCIPAL is the command file for input and  the  log
-   file for output. For an image invoked from a terminal  by  means  of  a
-   command file, $PRINCIPAL is the command file for input and the terminal
-   for output,  unless  the  command  file  redefines  the  logical  names
-   SYS$INPUT and/or SYS$OUTPUT.  Generally  an  interactive  command  file
-   contains the following command immediately  before  it  starts  a  GT.M
-   image.
-
-   Example:
-
-
-   $ DEFINE SYS$INPUT 'F$TRNLNM("SYS$COMMAND")'
-
-   This redirects the input for the process to come from the terminal.
-
-   GT.M provides a mechanism for the user to create a name for $PRINCIPAL
-   in DCL before invoking GT.M.  The  logical  GTM$PRINCIPAL,  if  defined
-   becomes a synonym for the actual device and the value  for  $PRINCIPAL.
-   $IO holds the same value as $PRINCIPAL. $ZIO in this  case,  holds  the
-   fully expanded name of the actual device. Refer to $ZIO section in this
-   chapter for an example of its usage.
-
-   GT.M ignores a CLOSE specifying the principal  device.  GT.M  does  not
-   permit the SET command to modify $PRINCIPAL.
-
-2 $Quit
-   $Quit
-
-   $Q[UIT] indicates whether the current block of code was  called  as  an
-   extrinsic function or as a subroutine.
-
-   If $Q[UIT] contains 1 (when the current process-stack frame is invoked
-   by  an  extrinsic  function),  the  QUIT  would  therefore  require  an
-   argument.
-
-        When a process is initiated, but before any commands are processed,
-        the value of $Q[UIT] is zero (0).
-
-   This special variable is mainly used in error-trapping conditions. Its
-   value tells whether the current DO level was  reached  by  means  of  a
-   subroutine call (DO xxx) or by a function call (SET variable=$$xxx).
-
-   A typical way of exiting from an error trap is:
-
-   QUIT:$QUIT "" QUIT
-
-        GT.M does not permit $QUIT to be SET or NEWed.
-
-2 $Reference
-   $Reference
-
-   $R[EFERENCE] contains the last global reference. Until the first global
-   reference is made by an M program, $REFERENCE contains the empty string
-   (""). This way it is useful in determining if  the  usage  of  a  naked
-   reference is valid.
-
-   A typical way of using this is:
-
-
-   IF $REFERENCE="" QUIT "<undefined>"
-
-        $R[EFERENCE] being a read-only variable cannot be SET or NEW'd.
-
-2 $STack
-   $STack
-
-   $ST[ACK] contains an integer value of zero (0)  or  greater  indicating
-   the current level of M execution stack depth.
-
-   When a process is initiated but before any  command  is  executed,  the
-   value of $STACK is zero (0).
-
-        The difference between $STACK  and  $ESTACK  is  that  $ESTACK  may
-        appear as an argument of the NEW command. NEWing $ESTACK resets its
-        value to zero (0), and can be useful to  set  up  a  layered  error
-        trapping mechanism.
-
-   The value of $STACK is "absolute" since the start of a  GT.M.  process,
-   whereas  the  value  of  $ESTACK  is  "relative"  to  the  most  recent
-   "anchoring point".
-
-   For examples on the use of special variable $STACK, refer  to  $STACK()
-   in the "Functions" chapter in this manual.
-
-2 $Storage
-   $Storage
-
-   $S[TORAGE] contains an integer value  specifying  the  number  of  free
-   bytes of address space remaining between  the  memory  currently  under
-   management by the process and the theoretical maximum available to the
-   process.
-
-   GT.M uses memory for code (instructions) and data.  If  the  amount  of
-   virtual memory available to the process exceeds 2,147,483,647 bytes, it
-   is reported as 2,147,483,647 bytes.
-
-   Instruction space starts out with the original LINKed executable image.
-   However, GT.M may  expand  instruction  space  by  ZLINKing  additional
-   routines.
-
-   Data space starts out with stack space that  never  expands,  and  pool
-   space which may expand. GTM$DEFAULTS controls  the  initial  sizes  for
-   both elements of data space. Operations such as opening a  database  or
-   creating a local variable may cause an expansion in  pool  space.  GT.M
-   expands pool space in fairly large increments. Therefore, SETs of local
-   variables may not affect $STORAGE at all or  may  cause  an  apparently
-   disproportionate drop in its value.
-
-   Once a GT.M process adds either instruction or  data  space,  it  never
-   releases that space.  However,  GT.M  does  reuse  process  space  made
-   available by actions such as KILLs of  local  variables.  $STORAGE  can
-   neither be SET or NEWed.
-
-2 $SYstem
-   $SYstem
-
-   $SY[STEM] contains a string that identifies the executing  M  instance.
-   The value of $SYSTEM is a string that starts with a unique numeric code
-   that identifies the manufacturer. Codes are assigned by the MDC (MUMPS
-   Development Committee).
-
-   $SYSTEM in GT.M starts with "47" followed by a comma and the evaluation
-   of the logical name gtm_sysid. If the name has no evaluation, the value
-   after the comma is gtm_sysid.
-
-2 $Test
-   $Test
-
-   $T[EST] contains a truth value specifying the evaluation of the last IF
-   argument or the result of the last operation with timeout. If the last
-   timed operation timed out, $TEST  contains  FALSE  (0);  otherwise,  it
-   contains TRUE (1).
-
-   $TEST  serves  as  the  implicit  argument  for  ELSE  commands  and
-   argumentless IF commands.
-
-   M  stacks  $TEST  when  invoking  an  extrinsic  and  performing  an
-   argumentless DO. After these operations complete with  an  implicit  or
-   explicit QUIT, M restores the  corresponding  stacked  value.  Because,
-   with these two exceptions, $TEST  reflects  the  last  IF  argument  or
-   timeout result on a process wide basis. Use  $TEST  only  in  immediate
-   proximity to the operation that last updated it.
-
-   M routines cannot modify $TEST with the SET command.
-
-   Example:
-
-
-   IF x=+x DO ^WORK
-
-   ELSE SET x=0
-
-   The ELSE statement causes M to use the  value  of  $TEST  to  determine
-   whether to execute the rest of the line. Because the  code  in  routine
-   WORK may use IFs and timeouts, this use of $TEST is not recommended.
-
-   Example:
-
-
-   SET MYFLG=x=+x
-
-   IF MYFLG DO ^WORK
-
-   IF 'MYFLG SET x=0
-
-   This example introduces a local variable flag to address  the  problems
-   of the prior example. Note that its behavior results  in  the  opposite
-   $TEST value from the prior example.
-
-   Example:
-
-
-   IF x=+x DO ^WORK IF 1
-
-   ELSE SET x=0
-
-   This example uses the IF 1 to ensure that the ELSE works counter to the
-   IF.
-
-2 $TLevel
-   $TLevel
-
-   $TL[EVEL] contains a count  of  executed  TSTARTs  that  are  currently
-   unmatched by TCOMMITs. $TLEVEL is zero (0) when there is no TRANSACTION
-   in progress. When $TLEVEL is greater than one (>1), it  indicates  that
-   there are nested sub-transactions  in  progress.  Sub-transactions  are
-   always subject to the completion of the main TRANSACTION and cannot be
-   independently acted upon by COMMIT, ROLLBACK, or RESTART.
-
-   $TLEVEL can be used to determine whether  there  is  a  TRANSACTION  in
-   progress and to determine the level of nesting of sub-transactions.
-
-   M routines cannot modify $TLEVEL with SET.
-
-   Example:
-
-
-   IF $TLEVEL TROLLBACK
-
-   This example performs a TROLLBACK if a transaction is  in  progress.  A
-   statement like this should  appear  in  any  error  handler  used  with
-   transaction processing. For more information on transaction processing
-   refer  to  the  "General  Language  Features  of  M"  chapter  in  GT.M
-   Programmer's Guide.
-
-2 $TRestart
-   $TRestart
-
-   $TR[ESTART] contains a  count  of  the  number  of  times  the  current
-   TRANSACTION has been RESTARTed. A RESTART can be explicit (specified in
-   M as a TRESTART) or implicit (initiated by GT.M as part of its internal
-   concurrency  control  mechanism).  When  there  is  no  TRANSACTION  in
-   progress, $TRESTART is zero (0).
-
-   $TRESTART can be used  by  the  application  to  limit  the  number  of
-   RESTARTs, or to cause a routine to perform different actions  during  a
-   RESTART than during the initial execution.
-
-        GT.M does not permit the SET command to modify $TRESTART.
-
-   Example:
-
-
-   TRANS TSTART ():SERIAL
-
-   IF $TRESTART>2 WRITE !;"Access Conflict" QUIT
-
-   This example terminates the sub-routine with a message if the number of
-   RESTARTs exceeds 2.
-
-   For more information on transaction processing, refer to the section on
-   that topic in the "General Language Features  of  M"  chapter  in  GT.M
-   Programmer's Guide.
-
-2 $X
-   $X
-
-   $X contains an integer value ranging from 0 to 65,535,  specifying  the
-   horizontal position of a virtual cursor in the current  output  record.
-   $X=0 represents the left-most position of a record or row.
-
-   Every OPEN device has a $X. However, M only accesses $X of the current
-   device.  Therefore,  exercise  care  in  sequencing  USE  commands  and
-   references to $X.
-
-   Generally, GT.M increments $X for every character written to  and  read
-   from the current device. M format control characters, write filtering,
-   and the device WIDTH also have an effect on $X.
-
-   $X never equals or exceeds the value of the device WIDTH.  Whenever  it
-   reaches the value equal to the device WIDTH, it gets reset to zero (0).
-
-   GT.M follows the MDC Type A recommendation and permits an M routine to
-   SET $X. However, SET $X does not automatically issue device commands or
-   escape sequences to reposition the physical cursor.
-
-   For more information on $X,  refer  to  the  "Input/Output  Processing"
-   chapter in GT.M Programmer's Guide.
-
-2 $Y
-   $Y
-
-   $Y contains an integer value ranging from 0 to  65,535  specifying  the
-   vertical position of a virtual cursor in the current output page. $Y=0
-   represents the top row or line.
-
-   Every OPEN device has a $Y. However, M only accesses $Y of the current
-   device.  Therefore,  exercise  care  in  sequencing  USE  commands  and
-   references to $Y.
-
-   When GT.M  finishes  the  logical  record  in  progress,  it  generally
-   increments $Y. GT.M recognizes the end of  a  logical  record  when  it
-   processes certain M format  control  characters,  or  when  the  record
-   reaches its maximum size, as determined by the device  WIDTH,  and  the
-   device is set to WRAP. The definition of "logical record"  varies  from
-   device to device. For an exact definition, see  the  sections  on  each
-   device type. Write filtering and the device LENGTH also have an effect
-   on $Y.
-
-   $Y never equals or exceeds the value of the device LENGTH. Whenever it
-   reaches the value equal to the device LENGTH, it gets reset to zero (0)
-
-   GT.M permits an  M  routine  to  SET  $Y.  However,  SET  $Y  does  not
-   automatically issue device commands or escape sequences  to  reposition
-   the physical cursor.
-
-   For more information on $Y,  refer  to  the  "Input/Output  Processing"
-   chapter in GT.M Programmer's Guide.
-
-2 $ZA
-   $ZA
-
-   $ZA contains a status determined by the last read on  the  device.  The
-   value is a decimal integer with a meaning determined by the  device  as
-   follows:
-
-   For Terminal I/O:
-
-        0 Indicating normal termination of a read operation
-        1 Indicating a parity error
-        2 Indicating that the terminator sequence was too long
-        3 Indicating a hardware contention or failure
-        4 Indicating a system configuration issue
-        5 Indicating a process limit/quota being exceeded
-        9 Indicating a default for all other errors
-   For Sequential Disk Files I/O:
-
-        0 Indicating normal termination of a read operation
-        9 Indicating a failure of a read operation
-   For Mailbox I/O:
-
-   Decimal representing $JOB (identifier) of the process  that  wrote  the
-   last message the current process read
-   $ZA refers to the status of the  current  device.  Therefore,  exercise
-   care in sequencing USE commands and references to $ZA.
-
-   GT.M does not permit the SET command to modify $ZA.
-
-   For more information on $ZA, refer  to  the  "Input/Output  Processing"
-   chapter in GT.M Programmer's Guide.
-
-2 $ZB
-   $ZB
-
-   $ZB contains a string specifying the  input  terminator  for  the  last
-   terminal READ. $ZB contains null and  is  not  maintained  for  devices
-   other than terminals. $ZB may contain any legal input terminator, such
-   as <CR> (ASCII 13) or an escape sequence  starting  with  <ESC>  (ASCII
-   27), from zero (0) to 15 bytes in length. $ZB  contains  null  for  any
-   READ terminated by a timeout or any  fixed-length  READ  terminated  by
-   input reaching the maximum length.
-
-   $ZB contains the actual character string, not  a  sequence  of  numeric
-   ASCII codes.
-
-   Example:
-
-
-   SET zb=$ZB FOR i=1:1:$L(zb) WRITE !,i,?5,$A(zb,i)
-
-   This displays the series of ASCII codes for the characters in $ZB.
-
-   $ZB  refers  to  the  last  READ  terminator  of  the  current  device.
-   Therefore, exercise care in sequencing USE commands and  references  to
-   $ZB.
-
-   GT.M does not permit the SET command to modify $ZB.
-
-   For more information on $ZB, refer  to  the  "Input/Output  Processing"
-   chapter in GT.M Programmer's Guide.
-
-2 $ZCMdline
-   $ZCMdline
-
-   $ZCM[DLINE] contains a string value specifying the "excess" portion of
-   the command line that invoked the GT.M process. By  "excess"  is  meant
-   the portion of the command line excluding the first argument  (the  VMS
-   command that corresponds to an image).When  the  VMS  Command  Language
-   Interpreter (CLI) invokes an image with a foreign command, it does not
-   process the "excess" of the command line. GT.M places this part of the
-   command line in $ZCMDLINE. $ZCMDLINE gives the M routine access to any
-   user DCL command line input. The DCL Shell interpretation of the input
-   removes one level of quotes. By default, if the input is  not  enclosed
-   in quotes (""), the CLI parser  forces  the  input  to  upper  case.  M
-   routines cannot modify $ZCMDLINE.
-
-   Example:
-
-
-   $ create test.M
-
-   write $ZCMDLINE
-
-   halt
-
-   $ mumps test
-
-   $ link test
-
-   $ test == "$" + f$parse("TEST.EXE;")
-
-   $ test other information
-
-   OTHER INFORMATION
-
-   $
-
-   This creates the program  test.M,  then  compiles  and  links  it.  The
-   example then assigns the symbol "test" and invokes "test" as a foreign
-   command. The M program writes out the remaining text from the invoking
-   DCL command line.
-
-   Example:
-
-
-   $ DCL2M :== $'f$parse("BASE.EXE;")
-
-   $ DCL2M PRINT^RPT2
-
-   This assigns the symbol DCL2M a value that is used to  invoke  BASE.EXE
-   as a foreign command. Then the example uses DCL2M with the "parameter"
-   PRINT^RPT2. Assuming BASE is a GT.M image, when  the  image  activates,
-   $ZCMDLINE contains PRINT^RPT2.
-
-   Example:
-
-
-   BASE  SET  XECSTR="SET  LEN=$LENGTH($T("_$ZCMDLINE_"))"  X  XECSTR  IF
-   $L($ZCMDLINE),LEN DO @$ZCMDLINE
-   If $TEXT() can locate the entryref, this dispatches to a (sub-)routine
-   specified in $ZCMDLINE.
-
-2 $ZCOmpile
-   $ZCOmpile
-
-   $ZCO[MPILE] contains a string value composed of one or more qualifiers
-   that control the GT.M compiler. Explicit  ZLINKs  and  auto-ZLINKs  use
-   these qualifiers as defaults for any compilations that they perform.
-
-   $ZCOMPILE is a read-write Intrinsic Special Variable, that is,  it  can
-   appear on the left side of the equal sign (=) in the  argument  to  the
-   SET command. A $ZCOMPILE value has the form of  a  list  of  M  command
-   qualifiers, separated with a slash (/).
-
-   When  the  logical  name  GTM$COMPILE  is  defined,  GT.M  initializes
-   $ZCOMPILE  to  the  translation  of  GTM$COMPILE.  Otherwise,  GT.M
-   initializes $ZCOMPILE to null. Changes to the value of $ZCOMPILE during
-   a GT.M invocation only last for  the  current  invocation  and  do  not
-   change the value of GTM$COMPILE.
-
-   When $ZCOMPILE is null, GT.M uses  the  default  M  command  qualifiers
-   /IGNORE, /LABEL=LOWER, /NOLIST and /OBJECT. For  detailed  descriptions
-   of the M command qualifiers, refer to the "Program  Development  Cycle"
-   chapter in GT.M Programmer's Guide.
-
-   Example:
-
-
-   $ DEFINE GTM$COMPILE "/LIST/LENGTH=56/SPACE=2"
-
-   $ GTM
-
-   GTM> WRITE $ZCOMPILE
-
-   /LIST/LENGTH=56/SPACE=2
-
-   GTM> SET $ZCOMPILE="/LIST/NOIGNORE"
-
-   GTM> WRITE $ZCOMPILE
-
-   /LIST/NOIGNORE
-
-   GTM> ZLINK "A.M"
-
-   GTM> HALT
-
-   $ SHOW LOGICAL GTM$COMPILE
-
-   "GTM$COMPILE" = "/LIST/LENGTH=56/SPACE=2"
-
-   This uses the logical name GTM$COMPILE to set  up  $ZCOMPILE.  Then  it
-   modifies $ZCOMPILE with an M SET command. The ZLINK argument specifies
-   a file with a .M extension (type), which forces a compile. The compile
-   produces a listing for routine A.M  and  does  not  produce  an  object
-   module if ^A contains errors. After GT.M terminates,  the  DCL  command
-   SHOW LOGICAL demonstrates that the M SET command  did  not  change  the
-   logical name equivalence.
-
-2 $ZCstatus
-   $ZCstatus
-
-   $ZC[STATUS] holds the value of the status code for the last compilation
-   performed by a ZCOMPILE command.
-
-   GT.M does not permit the SET command to modify $ZSTATUS.
-
-2 $ZDAteform
-   $ZDAteform
-
-   $ZDA[TEFORM] contains an integer  value,  specifying  the  output  year
-   format of $ZDATE(). $ZDATEFORM can be modified using the  SET  command.
-   GT.M initializes $ZDATEFORM to the  translation  of  the  logical  name
-   gtm_zdate_form. If gtm_zdate_form  is  not  defined,  GT.M  initializes
-   $ZDATEFORM to zero (0).
-
-   Refer  to  "Functions"  and  "M  utility  Routines"  chapter  in  GT.M
-   Programmer's Guide for more details.
-
-   Example:
-
-
-   GTM>WRITE $ZDATEFROM
-
-   0
-   GTM>WRITE $ZDATE($H)
-
-   11/15/02
-   GTM>SET $ZDATEFORM=1
-
-   GTM>WRITE $ZDATE($H)
-
-   11/15/2002
-2 $ZDirectory
-   $ZDirectory
-
-   $ZD[IRECTORY] contains the string value of the full path of the current
-   directory. Initially $ZDIRECTORY contains the default/current directory
-   from which the GT.M image/process was activated.
-
-   GT.M supports  different  forms  for  the  intrinsic  special  variable
-   $ZDIRECTORY. The symbol GTM$ZDIR_FORM in GTM$DEFAULTS controls the form
-   of $ZDIRECTORY. By default, $ZDIRECTORY contains the full path  of  the
-   default directory, including the device  and  directory  specification.
-   The default form corresponds to GTM$ZDIR_FORM holding  the  value  zero
-   (0). The other possible value for GTM$ZDIR_FORM is one (1). This value
-   causes  $ZDIRECTORY  to  contain  only  the  directory  specification,
-   excluding the device specification.
-
-   If  the  application  would  like  to  use  the  non-default  form  of
-   $ZDIRECTORY, one can modify the value for GTM$ZDIR_FORM in GTM$DEFAULTS
-   appropriately before creating a linked image of the application.
-
-   Example:
-
-
-   GTM>WRITE $ZDIR
-
-   DISK$USER11:[PROD.AP.ROUTINES]
-
-   GTM>SET $ZDIR="[-]"
-
-   GTM>WRITE $ZDIR
-
-   DISK$USER11:[PROD.AP]
-
-   This example displays the current default directory in the default form
-   of  ZDIRECTORY  which  includes  both  the  device  and  the  directory
-   specification. It also changes  $ZDIRECTORY  to  point  to  the  parent
-   directory.
-
-   $ZDIRECTORY is a read-write Intrinsic Special Variable, that is, it can
-   appear on the left side of the equal sign (=) in the argument to a SET
-   command. If an attempt is made to set  $ZDIRECTORY  to  a  non-existent
-   directory specification, GT.M issues an error and keeps  the  value  of
-   $ZDIRECTORY unchanged.
-
-   At image exit, GT.M restores the working  directory  to  the  directory
-   that was the default when GT.M was invoked. The only exception to this
-   is in case the directory does  not  exist  and  GT.M  had  successfully
-   modified its default directory using SET $ZDIR at least once.  In  such
-   cases, the default directory at image exit is  the  last  directory  to
-   which GT.M successfully changed its default directory using SET $ZDIR.
-
-2 $ZEDit
-   $ZEDit
-
-   $ZED[IT] holds the value of the status code for the last  edit  session
-   invoked by a ZEDIT command.
-
-   GT.M does not permit the SET or NEW command to modify $ZEDIT.
-
-2 $ZEOf
-   $ZEOf
-
-   $ZEO[F] contains a truth-valued expression indicating whether the last
-   READ operation reached the end-of-file. $ZEOF equals TRUE  (1)  at  EOF
-   and FALSE (0) at other positions.
-
-   GT.M does not maintain $ZEOF for terminal devices.
-
-   $ZEOF  refers  to  the  end-of-file  status  of  the  current  device.
-   Therefore, exercise care in sequencing USE commands and  references  to
-   $ZEOF.
-
-   GT.M does not permit the SET or NEW command to modify $ZEOF.
-
-   For more information on $ZEOF, refer to the  "Input/Output  Processing"
-   chapter.
-
-2 $ZError
-   $ZError
-
-   $ZE[RROR] is  supposed  to  hold  the  application-specific  error-code
-   corresponding to the GT.M error-code stored in  $ECODE/$ZSTATUS  (refer
-   to their description in this chapter).
-
-   $ZERROR contains a default value of "Unprocessed $ZERROR, see $ZSTATUS"
-   at process startup.
-
-   $ZERROR can be SET but not NEWed.
-
-   The mapping of a GT.M error-code to the application-specific error-code
-   is  achieved  as  follows.  Whenever  GT.M  encounters  an  error,
-   $ECODE/$ZSTATUS gets set first. It then invokes the code that $ZYERROR
-   (see description later in this chapter) points to if it is not null. It
-   is intended that the code invoked by $ZYERROR use the value of $ZSTATUS
-   to select or construct a value to which it SETs $ZERROR. If an error is
-   encountered by the attempt to execute the code specified  in  $ZYERROR,
-   GT.M sets $ZERROR to the error status encountered. If $ZYERROR is null,
-   GT.M does not change the value of $ZERROR. In all cases, GT.M proceeds
-   to return control to the code  specified  by  $ZTRAP/$ETRAP  or  device
-   EXCEPTION whichever is applicable.
-
-2 $ZGbldir
-   $ZGbldir
-
-   $ZG[BLDIR] contains the value of the current Global Directory filename.
-   When $ZGBLDIR specifies an invalid or inaccessible  file,  GT.M  cannot
-   successfully perform database operations.
-
-   GT.M initializes $ZGBLDIR  to  the  translation  of  the  logical  name
-   GTM$GBLDIR. If GTM$GBLDIR is not defined, GTM initializes  $ZGBLDIR  to
-   null. When $ZGBLDIR is null, GT.M constructs a  file-specification  for
-   the Global Directory using the name GTM$GBLDIR and the  extension  .GLD
-   in the process current default directory. A $ZGBLDIR value has the form
-   of an RMS file-specification, which may include a  logical  name.  GT.M
-   handles  logical  names  that  translate  to  other  logical  names  by
-   performing iterative translations according to VMS  conventions.  If  a
-   logical name translates to a VMS search list, GT.M uses only the first
-   name in the list.
-
-   $ZGBLDIR is a read-write Intrinsic Special Variable, that  is,  it  can
-   appear on the left side of the equal sign (=) in the  argument  to  the
-   SET command. SET $ZGBLDIR="" causes GT.M  to  assign  $ZGBLDIR  to  the
-   translation  of  GTM$GBLDIR,  if  that  logical  name  is  defined.  If
-   GTM$GBLDIR is not defined, then SET $ZGBLDIR="" causes GT.M  to  assign
-   the  string  "GTM$GBLDIR"  to  $ZGBLDIR.  This  specifies  the  file
-   GTM$GBLDIR.GLD in the current directory. GT.M permits  $ZGBLDIR  to  be
-   NEW'd.
-
-   SETting $ZGBLDIR also causes GT.M to  attempt  to  open  the  specified
-   file. If the file name is invalid or the  file  is  inaccessible,  GT.M
-   triggers an error without changing the value of $ZGBLDIR.
-
-   To establish a value for $ZGBLDIR outside of  M,  use  the  DCL  DEFINE
-   command to assign a  translation  to  GTM$GBLDIR.  Defining  GTM$GBLDIR
-   provides a convenient way to use the same  Global  Directory  during  a
-   session where you repeatedly invoke and leave GT.M.
-
-   Frequently,  a  system  manager  provides  a  default  definition  of
-   GTM$GBLDIR in the system logical name table or  in  the  login  command
-   files. You can override such a definition by (re)defining GTM$GBLDIR in
-   your process logical name table.
-
-   Changes to the value of $ZGBLDIR during a GT.M invocation only last for
-   the current invocation and do not change the value of GTM$GBLDIR.
-
-   Example:
-
-
-   $ DEFINE GTM$GBLDIR TEST.GLD
-
-   $ GTM
-
-   GTM> WRITE $ZGBLDIR
-
-   TEST.GLD
-
-   GTM> SET $ZGBLDIR="MUMPS.GLD"
-
-   GTM> WRITE $ZGBLDIR
-
-   MUMPS.GLD
-
-   GTM> HALT
-
-   $ SHOW LOGICAL GTM$GBLDIR
-
-   TEST.GLD
-
-   This defines  the  logical  name,  GTM$GBLDIR.  In  GT.M  Direct  Mode,
-   $ZGBLDIR has the value supplied by GTM$GBLDIR. The SET command changes
-   the value. After the  GT.M  image  terminates,  the  DCL  command  SHOW
-   LOGICAL demonstrates that GTM$GBLDIR was not  modified  by  the  M  SET
-   command.
-
-   Example:
-
-
-   $ DIR TEST.GLD
-
-   %DIRECT-W-NOFILES, no files found
-
-   $ GTM
-
-   GTM> WRITE $ZGBLDIR
-
-   MUMPS.GLD
-
-   GTM> SET $ZGBLDIR="TEST.GLD"
-
-   %GTM-E-ZGBLDIRACC, Cannot access global
-
-   directory "TEST.GLD". Continuing with "MUMPS.GLD
-
-   %RMS-E-FNF, file not found
-
-   GTM> WRITE $ZGBLDIR
-
-   MUMPS.GLD
-
-   GTM> HALT
-
-   $
-
-   The SET command attempts to change the value of $ZGBLDIR  to  TEST.GLD,
-   but because the file does not exist, GT.M reports an error and does not
-   change the value of $ZGBLDIR.
-
-        Attempting to restore an inaccessible initial Global Directory that
-        has been NEW'd, can cause an error.
-
-2 $ZINTerrupt
-   $ZINTerrupt
-
-   $ZINT[ERRUPT] specifies the code to be XECUTE'd when an interrupt (for
-   example, through a MUPIP INTRPT)  is  processed.  While  a  $ZINTERRUPT
-   action is in process, any additional interrupt signals  are  discarded.
-   When an interrupt handler is invoked, the current values of $REFERENCE
-   is saved and restored when the interrupt handler returns.  The  current
-   device ($IO) is neither saved nor restored.
-
-   GT.M permits the SET command to modify the value of $ZINTERRUPT.
-
-   If an interrupt handler changes the current IO device (via USE), it is
-   the responsibility of the interrupt handler to restore the  current  IO
-   device before returning. There are sufficient legitimate possibilities
-   why an interrupt routine would want to change  the  current  IO  device
-   (for example; daily log switching),  that  this  part  of  the  process
-   context is not saved and restored automatically.
-
-   The initial value for $ZINTERRUPT is taken from the  VMS  logical  name
-   GTM_ZINTERRUPT if  it  is  specified,  otherwise  it  defaults  to  the
-   following string:
-
-   IF $ZJOBEXAM()
-
-   The IF  statement  executes  the  $ZJOBEXAM  function  but  effectively
-   discards the return value.
-
-        If the default value for $ZINTERRUPT is  modified,  no  $ZJOBEXAM()
-        will occur unless the  replacement  value  directly  or  indirectly
-        invokes that function. In other words, while $ZJOBEXAM() is part of
-        the interrupt handling by default, it is not an  implicit  part  of
-        the interrupt handling.
-
-3 Inter_Handl_GTM
-   Interrupt Handling in GT.M
-
-   The interrupt handler is executed by GT.M when on a statement boundary
-   or on an appropriate boundary in a potentially long running COMMAND (in
-   the same place as <CTRL>-C is recognized). If a GT.M process  is  in  a
-   long running external call (for example; waiting in  a  message  queue)
-   the interrupt handler  cannot  be  driven  immediately.  The  interrupt
-   request is recognized and the handler is driven after the external call
-   returns to GT.M and an appropriate execution boundary is reached.
-
-   Since  sending  an  interrupt  signal  requires  the  sender  to  have
-   appropriate permissions from VMS, the use  of  the  interrupt  facility
-   itself does not present any inherent security  exposures.  Nonetheless,
-   because the dump files created by the default action contain the values
-   of every local variable in the context  at  the  time  they  are  made,
-   inappropriate access to the dump  files  would  constitute  a  security
-   exposure. Make sure the design  and  implementation  of  any  interrupt
-   logic includes careful consideration to security issues.
-
-   If an error occurs while compiling the  $ZINTERRUPT  code,  the  action
-   taken depends on the process  state  at  the  time  the  interrupt  was
-   received and the error handler is not invoked  (the  error  handler  is
-   invoked if an error occurs while executing the  $ZINTERRUPT  code).  If
-   the GT.M process is at a direct mode prompt or is  executing  a  direct
-   mode command (for example, a FOR loop), the error message  is  sent  to
-   the user console along with the GTM-ERRWZINTR error (refer to the GT.M
-   Error and Message Recovery  Manual).  In  addition,  the  GTM-ERRWZINTR
-   error is also sent to the operator log facility. IF the process is not
-   at a direct mode  prompt  or  executing  a  direct  mode  command,  the
-   GTM-ERRWZINTR message and the compiler error message are  sent  to  the
-   operator log facility and nothing is displayed on the  user's  console.
-   In both cases, the interrupted process resumes execution.
-
-   If an error occurs during execution of the  interrupt  handler's  stack
-   frame (before it calls anything),  that  error  is  prefixed  with  the
-   GTM-ERRWZINTR error. The  error  handler  then  executes  normal  error
-   processing associated with the module that was interrupted.  Any  other
-   errors that occur in code called by the interrupt handler  are  handled
-   by normal error handling.
-
-        The interrupt handler does not  operate  "outside"  the  current  M
-        environment but rather within the environment of the process.
-
-   If a TP transaction is in progress (0<$TLEVEL), updates to globals are
-   not safe since a TP restart can be signaled at any time  prior  to  the
-   transaction being committed - even after the interrupt handler returns.
-   A TP restart reverses all global updates and unwinds the M stack so it
-   is as if the interrupt never occurred. The  interrupt  handler  is  not
-   redriven as  part  of  a  transaction  restart.  Referencing  (reading)
-   globals inside an interrupt handler can  trigger  a  TP  restart  if  a
-   transaction is active.  When  programming  interrupt  handling,  either
-   discard interrupts when 0<$TLEVEL (forcing the  interrupting  party  to
-   try again), or use local variables that are not restored by a TRESTART
-   to defer the interrupt action until after the final TCOMMIT.
-
-   Note that it is possible for the interrupt handler to be executed while
-   the process executing the M routine is holding the critical section for
-   one or more regions. Use of this feature may create temporary hangs or
-   pauses while the interrupt handler executes. For the default case where
-   the interrupt handler uses $ZJOBEXAM() to  create  a  dump,  the  pause
-   duration depends on the number of local variables in the process at the
-   time of the dump and on the speed of the disk  being  written  to.  The
-   dumps are slower on a network-mounted disk  than  on  a  disk  directly
-   connected to the local system. Any  interrupt  driven  code  should  be
-   designed to account for this issue.
-
-2 $ZINInterrupt
-   $ZINInterrupt
-
-   $ZINI[NTERRUPT] evaluates to 1 (TRUE) when a process is executing code
-   initiated by the interrupt mechanism, and otherwise 0 (FALSE).
-
-   GT.M does not permit the SET or NEW commands to modify $ZININTERRUPT.
-
-2 $ZIO
-   $ZIO
-
-   $ZIO contains the translated name of the current device, in contrast to
-   $IO, which contains the name as specified by the USE command.
-
-   GT.M does not permit the SET or NEW command to modify $ZIO.
-
-   An example where $ZIO contains a value different from  $IO  is  if  the
-   logical GTM$PRINCIPAL is defined.
-
-   Example:
-
-
-   $ define gtm$principal foo
-
-   GTM>WRITE $IO
-
-   FOO
-
-   GTM>WRITE $ZIO
-
-_TNA275:
-   Notice that $ZIO contains the actual terminal  device  name  while  $IO
-   contains the string pointed to by the logical GTM$PRINCIPAL.
-
-2 $ZJob
-   $ZJob
-
-   $ZJ[OB] holds the pid of the process created by the  last  JOB  command
-   performed by the current process.
-
-   GT.M initializes $ZJOB to zero (0)  at  process  startup.  If  the  JOB
-   command fails to spawn a new job, GT.M sets $ZJOB  to  zero  (0).  Note
-   that because of the left to right evaluation order of M, using $ZJOB in
-   the jobparameter string results in using the value created by the last,
-   rather than the current JOB command,  which  is  not  likely  to  match
-   common coding practice.
-
-   GT.M does not permit the SET or NEW command to modify $ZJOB.
-
-2 $ZLevel
-   $ZLevel
-
-   $ZL[EVEL] contains an integer value indicating the "level  of  nesting"
-   caused by DO commands, XECUTE commands, and extrinsic functions in the
-   M invocation stack.
-
-   $ZLEVEL has an initial value of one (1) and increments by one with each
-   DO, XECUTE or extrinsic function. Any QUIT that does  not  terminate  a
-   FOR  loop  decrements  $ZLEVEL.  ZGOTO  may  also  reduce  $ZLEVEL.  In
-   accordance with the  M  standard,  a  FOR  command  does  not  increase
-   $ZLEVEL. M routines cannot modify $ZLEVEL with the SET or NEW commands.
-
-   Use $ZLEVEL in debugging or in an error-handling mechanism to capture a
-   level for later use in a ZGOTO argument.
-
-   Example:
-
-
-   GTM>ZPRINT ^ZLEV
-
-   A DO B
-
-   WRITE X,!
-
-   QUIT
-
-   B GOTO C
-
-   QUIT
-
-   C DO D
-
-   QUIT
-
-   D SET X=$ZLEVEL
-
-   QUIT
-
-   GTM>DO ^ZLEV
-
-   4
-   This program, executed from Direct Mode, produces  a  value  of  4  for
-   $ZLEVEL. Note that if we RUN this program from the DCL level the value
-   of $ZLEVEL is three (3).
-
-2 $ZMAXTPTIme
-   $ZMAXTPTIme
-
-   $ZMAXTPTI[ME] contains an integer value indicating  the  time  duration
-   GT.M should wait for the completion of all  activities  fenced  by  the
-   current transaction's outermost TSTART/TCOMMIT pair.
-
-   $ZMAXTPTIME can be SET but cannot be NEWed.
-
-   The initial value of $ZMAXTPTIME is zero (0) seconds,  which  indicates
-   "no  timeout"  (unlimited  time).  The  value  of  $ZMAXTPTIME  when  a
-   transaction's  outermost  TSTART  operation  executes  determines  the
-   timeout setting for that transaction.
-
-   When a $ZMAXTPTIME expires, GT.M executes the  $ETRAP/$ZTRAP  exception
-   handler currently in effect.
-
-        Negative values of $ZMAXTPTIME are also treated  as  "no  timeout".
-        Timeouts  apply  only  to  the  outermost  transaction,  that  is,
-        $ZMAXTPTIME has no effect when  TSTART  is  nested  within  another
-        transaction.
-
-   Example:
-
-
-   Test ;testing TP timeouts
-
-   set $ZMAXTPTIME=6,^X=0,^Y=0,^Z=0
-
-   write "Start with $ZMAXTPTIME=",$ZMAXTPTIME,":",!
-
-   for sleep=3:2:9 do
-
-   . set retlvl=$zl
-
-   . do longtran ;ztrap on longtran
-
-   ;continues execution
-
-   ;on next line
-
-   . write "(^X,^Y)=(",^X,",",^Y,")",!
-
-   write !,"Done TP Timeout test.",!
-
-   quit
-
-   longtran ;I/O in TP doesn't get rolled back
-
-   set newzt="set $ZT="""" ";avoid recursive ZTRAP
-
-   set $ZT=newzt_" goto err"
-
-   tstart ():serial ;plain tstart works as well
-
-   set ^X=1+^X
-
-   write !,"^X=",^X,",will set ^Y to ",sleep
-
-   write " in ",sleep," seconds..."
-
-   hang sleep
-
-   set ^Y=sleep
-
-   write "^Y=",^Y
-
-   tcommit
-
-   write "...committed.",!
-
-   quit
-
-   err ;
-
-   set $ZT=""
-
-   write !,"In $ZTRAP handler. Error was: "
-
-   write !," ",$zstatus
-
-   if $TLEVEL do ;test allows handler use outside of TP
-
-   . trollback
-
-   . write "Rolled back transaction."
-
-   write !
-
-   zgoto retlvl
-
-
-   Results:
-
-
-   Start with $ZMAXTPTIME=6:
-
-
-   ^X=1,will set ^Y to 3 in 3 seconds...^Y=3...committed.
-
-
-   ^X=2,will set ^Y to 5 in 5 seconds...^Y=5...committed.
-
-
-   ^X=3,will set ^Y to 7 in 7 seconds...
-
-   In $ZTRAP handler. Error was:
-
-   150377322,longtran+7^tptime,%GTM-E-TPTIMEOUT, Transaction timeoutRolled
-   back transaction.
-
-   ^X=3,will set ^Y to 9 in 9 seconds...
-
-   In $ZTRAP handler. Error was:
-
-   150377322,longtran+7^tptime,%GTM-E-TPTIMEOUT, Transaction timeoutRolled
-   back transaction.
-
-   Done TP Timeout test.
-
-2 $ZMOde
-   $ZMOde
-
-   $ZMO[DE] contains a string value indicating the process execution mode.
-
-   The mode can be:
-
-   o    INTERACTIVE
-
-   o    BATCH
-
-   o    NETWORK
-
-   o    OTHER
-
-   M routines cannot modify $ZMODE.
-
-   Example:
-
-
-   GTM> WRITE $ZMODE
-
-   INTERACTIVE
-
-   This displays the process mode.
-
-2 $ZPOSition
-   $ZPOSition
-
-   $ZPOS[ITION] contains a string value specifying the  current  entryref,
-   where entryref is [label][+offset]^routine, and the offset is evaluated
-   from the closest preceding label.
-
-   GT.M does not permit the SET or NEW commands to modify $ZPOSITION.
-
-   Example:
-
-   GTM>WRITE !,$ZPOS,! ZPRINT @$ZPOS
-
-   This example displays the current location followed by the source code
-   for that line.
-
-2 $ZPROCess
-   $ZPROCess
-
-   $ZPROC[ESS] contains the string value of the current process name.
-
-   M routines cannot modify $ZPROCESS.
-
-   Example:
-
-
-   GTM> WRITE $ZPROCESS
-
-   JONES_SUSAN_1
-
-   This displays the process name.
-
-2 $ZPROMpt
-   $ZPROMpt
-
-   $ZPROM[PT] contains a string value specifying the current  Direct  Mode
-   prompt. By default, GTM> is the Direct  Mode  prompt.  M  routines  can
-   modify $ZPROMPT by means of a SET command. $ZPROMPT  cannot  exceed  16
-   characters. If an attempt is  made  to  assign  $ZPROMPT  to  a  longer
-   string, only the first 16 characters will be taken.
-
-   Example:
-
-
-   GTM>SET $ZPROMPT="NEWZPROMPT>"
-
-   NEWZPROMPT>
-
-   This example changes the GT.M prompt to be NEWZPROMPT
-
-2 $ZROutines
-   $ZROutines
-
-   $ZRO[UTINES] contains a string value  specifying  a  VMS  directory  or
-   object library, or list of VMS  directories  and/or  object  libraries,
-   containing object  files.  Each  object  directory  may  also  have  an
-   associated  directory,  or  list  of  directories,  containing  the
-   corresponding source files. These directory lists are used  by  certain
-   GT.M functions, primarily  auto-ZLINK,  to  locate  object  and  source
-   files. The order in which directories appear in a given list determines
-   the order in which they are searched for the appropriate item.
-
-   Searches that use $ZROUTINES treat files as  either  object  or  source
-   files. GT.M treats files with a type of .OBJ  or  files  in  an  object
-   library as object files and all  other  files  as  source  files.  GT.M
-   always assumes source files have a type of .M unless an explicit ZLINK,
-   $ZSOURCE  or  the  source  file  pointer  in  an  object  file  specify
-   otherwise.
-
-3 Est_Val_frm_GTM$ROUTINES
-   Establishing the Value from GTM$ROUTINES
-
-   When  the  logical  name  GTM$ROUTINES  is  defined,  GT.M  initializes
-   $ZROUTINES to the value of GTM$ROUTINES.  Otherwise,  GT.M  initializes
-   $ZROUTINES to null. When $ZROUTINES is null, GT.M  attempts  to  locate
-   all source and object files in the process current  default  directory.
-   $ZROUTINES="" is equivalent to $ZROUTINES="[]".
-
-   Commands or functions such as DO,  GOTO,  ZGOTO,  ZBREAK,  ZPRINT,  and
-   $TEXT may auto-ZLINK and thereby indirectly use  $ZROUTINES.  If  their
-   argument does not specify a directory, ZEDIT  and  explicit  ZLINK  use
-   $ZROUTINES. ZPRINT and $TEXT use $ZROUTINES to locate a source file if
-   GT.M cannot find the source file pointed to by  the  object  file.  For
-   more information  on  ZLINK  and  auto-ZLINK,  refer  to  the  "Program
-   Development Cycle" and "Commands" chapters in GT.M Programmer's Guide.
-
-   $ZROUTINES is a read-write Intrinsic Special Variable, which M can also
-   SET the value. A $ZROUTINES value must have the form of a list  of  RMS
-   directory and/or file-specifications delimited by commas (,).
-
-3 Set_Val_for_$ZRO
-   Setting a Value for $ZROUTINES
-
-   By default, each directory entry in $ZROUTINES is  assumed  to  contain
-   both object and source files. However, each object directory  may  have
-   an associated directory or list of directories in which to  search  for
-   the  corresponding  source  files.  This  is  done  with  the
-   /SRC=directory-list  qualifier.  If  /SRC=  specifies  more  than  one
-   directory, the directories must be separated by commas, and the entire
-   list must be enclosed in parentheses ().
-
-   If a directory has a /SRC= qualifier, and it  should  be  searched  for
-   source, the argument for  the  /SRC  must  include  the  name  of  that
-   directory,  usually  as  the  first  element  in  the  list.
-   Directory-specifications may also have a  /NOSRC  qualifier,  directing
-   GT.M to proceed as if no source files exist for objects located in the
-   qualified directory.
-
-   File-specifications in $ZROUTINES indicate  object  libraries.  If  you
-   specify file-specifications, indicating object-libraries,  rather  than
-   specifying  object  directories,  the  command  assumes  the  /NOSRC
-   qualifier. You  may  not  specify  source  directories  for  an  object
-   library.
-
-   Because /NOSRC  directories  and  object  libraries  prevent  automatic
-   recompilation of the objects they contain, use them with caution  in  a
-   development environment.
-
-   To set $ZROUTINES outside of M, use the DCL command DEFINE to assign a
-   translation to GTM$ROUTINES. Because GTM$ROUTINES is not a  VMS  search
-   list, but rather a piece of data, usually containing one or more commas
-   (,), that is passed to a GT.M process, enclose the equivalent parameter
-   to the DEFINE or ASSIGN command in quotes  ("  ").  If  the  definition
-   contains commas and is not enclosed in quotes, VMS treats it as  a  VMS
-   search list and the GT.M process subsequently  receives  an  improperly
-   formatted $ZROUTINES.
-
-   Frequently  a  system  manager  provides  a  default  definition  of
-   GTM$ROUTINES in the system logical name table or in the  login  command
-   files. You can override such a definition by (re)defining GTM$ROUTINES
-   in your process logical name table. Changes to the value of $ZROUTINES
-   during a GT.M invocation only last for the current  invocation  and  do
-   not change the value of GTM$ROUTINES.
-
-   Either directory- or file-specifications may include  a  logical  name.
-   GT.M handles logical names that translate to  other  logical  names  by
-   performing iterative translations according to VMS  conventions.  If  a
-   logical name translates to a VMS search list, GT.M uses only the first
-   name in the list. If the directory or file exists on a  different  node
-   or device, the list element must specify the node and/or  device.  When
-   GT.M SETs $ZROUTINES, it translates all logical names and verifies the
-   syntax and the existence of all specified directories and libraries. If
-   $ZROUTINES is set to an invalid value, GT.M generates a run-time error
-   and does not change the value of $ZROUTINES. Because the logical names
-   are translated when $ZROUTINES is set, any changes to their definition
-   have no effect until $ZROUTINES is next set.
-
-3 $ZRO_Examples
-   $ZROUTINES Examples
-
-   Example:
-
-
-   $ DEFINE GTM$ROUTINES "[JONES],[SMITH]"
-
-   $ GTM
-
-   GTM> WRITE $ZROUTINES
-
-   "[JONES],[SMITH]"
-
-   GTM> SET $ZRO="[JONES.UTL],[SMITH.UTL]"
-
-   GTM> WRITE $ZRO
-
-   [JONES.UTL],[SMITH.UTL]
-   GTM> HALT
-
-   $ SHOW LOGICAL GTM$ROUTINES
-
-   "GTM$ROUTINES" = "[JONES],[SMITH]"(LNM$PROCESS_TABLE)
-
-   This defines the logical name, GTM$ROUTINES. Upon entering GT.M Direct
-   Mode $ZROUTINES has the value supplied by GTM$ROUTINES. The SET command
-   changes the value. When the GT.M image terminates, the DCL command SHOW
-   demonstrates that GTM$ROUTINES has not  been  modified  by  the  M  SET
-   command.
-
-   Example:
-
-
-   GTM> SET $ZRO="[],[SMITH],MYLIB.OLB"
-
-   This sets $ZROUTINES to a list containing two directories and an object
-   library in the process current default directory.
-
-   Example:
-
-
-   GTM> SET $ZRO="[SMITH]/SRC=([SMITH.TAX],[SMITH.FICA])"
-
-   This specifies that GT.M should search the directory [SMITH] for object
-   files and the  directories  [SMITH.TAX]  and  [SMITH.FICA]  for  source
-   files. Note that in this example, GT.M  does  not  search  [SMITH]  for
-   source files.
-
-   Example:
-
-   GTM> SET $ZRO="[SMITH]/SRC=([SMITH],[SMITH.TAX],[SMITH.FICA])"
-
-   This specifies that GT.M should search the directory [SMITH] for object
-   files and the  directories  [SMITH.TAX]  and  [SMITH.FICA]  for  source
-   files. Note that the difference between this example and  the  previous
-   one is that in this example GT.M searches [SMITH] for both  object  and
-   source files.
-
-   Example:
-
-
-   GTM> SET $ZRO="[SMITH],[SMITH.TAX]/NOSRC,
-
-   [SMITH.FICA]"
-   This specifies that GT.M should search  [SMITH]  and  [SMITH.FICA]  for
-   object  and  source  files.  However,  because  the  /NOSRC  qualifier
-   indicates directories searched only for object  files,  GT.M  does  not
-   search [SMITH.TAX] for source files.
-
-   Omission of  the  /SRC=  and  /NOSRC  indicates  GT.M  can  search  the
-   directory for both source and  object  files.  $ZROUTINES="[SMITH]"  is
-   equivalent to $ZROUTINES="[SMITH]/SRC=[SMITH]".
-
-3 $ZRO_Search_Types
-   $ZROUTINES Search Types
-
-   GT.M uses $ZRO[UTINES] to perform three types of searches:
-
-   o    Object-only when the command or function using $ZROUTINES requires
-        a .OBJ file extension.
-
-   o    Source-only when the command or function using $ZROUTINES requires
-        a file extension other than .OBJ.
-
-   o    Object-source match when the command or function  using  $ZROUTINES
-        does not specify a file extension.
-
-   An explicit ZLINK that specifies a non .OBJ extension is considered as
-   a function that has not  specified  a  file  extension  for  the  above
-   searching purposes.
-
-   All searches proceed from left to right through $ZROUTINES. By default,
-   GT.M searches directories  for  both  source  and  object  files.  GT.M
-   searches /NOSRC directories and object libraries only for object files.
-   GT.M searches directories listed in a /SRC= qualifier only  for  source
-   files.
-
-   Once an object-matching search  locates  an  object  file,  the  source
-   search becomes limited. If the directory containing the object file has
-   a /SRC= qualifier, GT.M only searches the directories in  the  attached
-   list for matching source files. If the directory containing the object
-   files has no qualifier, GT.M restricts the search for  matching  source
-   files to the same directory. If the  object  module  is  in  an  object
-   library, or a directory qualified by /NOSRC, GT.M  cannot  perform  any
-   operation that references the source file.
-
-3 $ZRO_Search_Ex
-   $ZROUTINES Search Examples
-
-   This section describes a model for understanding $ZROUTINES operations
-   and the illustrating examples, which may assist  you  if  you  wish  to
-   examine the topic closely.
-
-   You may think of $ZROUTINES as supplying a two  dimensional  matrix  of
-   places to look for files. The matrix has one or more  rows.  The  first
-   row in the matrix contains places to look for object and the second and
-   following  rows  contain  places  to  look  for  source.  Each  column
-   represents the set of places that contain information  related  to  the
-   object modules in the first row of the column.
-
-   Example:
-
-
-   GTM> s $zro="[],[smi.utl]/nosrc,[jon.utl]
-
-   /src=([jon.utl.so],[smi.utl)"
-
-2 $ZSOurce
-   $ZSOurce
-
-   $ZSO[URCE]  contains  a  string  value  specifying  the  default
-   file-specification for the ZEDIT and ZLINK  commands.  ZEDIT  or  ZLINK
-   without an argument is equivalent to ZEDIT/ZLINK $ZSOURCE.
-
-   $ZSOURCE initially contains the  null  string.  When  ZEDIT  and  ZLINK
-   commands have an argument, they implicitly set $ZSOURCE  to  a  partial
-   file-specification  derived  from  their  argument.  The  partial
-   specification consists of a device name, a directory path  and  a  file
-   name. The file-specification may contain a file type without a version
-   number. ZEDIT or ZLINK without an argument is equivalent to ZEDIT/ZLINK
-   $ZSOURCE.
-
-        $ZSOURCE never contains the ".M" or ".OBJ" file types.
-
-   $ZSOURCE is a read-write Intrinsic  Special  Variable,  (i.e.,  it  can
-   appear on the left side of the equal sign (=) in the  argument  to  the
-   SET  command).  A  $ZSOURCE  value  has  the  form  of  an  RMS
-   file-specification, which may include  a  logical  name.  GT.M  handles
-   logical names that translate  to  other  logical  names  by  performing
-   iterative translations according to VMS conventions. If a logical name
-   translates to a VMS search list, GT.M uses only the first name  in  the
-   list.
-
-   Example:
-
-
-   GTM> ZEDIT "SUBR.M"
-
-   .
-
-   .
-
-   GTM> WRITE $ZSOURCE
-
-   SUBR
-
-   Example:
-
-   GTM> ZEDIT "TEST"
-
-   .
-
-   .
-
-   .
-
-   GTM> WRITE $ZSOURCE
-
-   TEST
-
-   Example:
-
-
-   GTM> ZEDIT "[USER.SMITH]REPORT.TXT"
-
-   .
-
-   .
-
-   .
-
-   GTM> WRITE $ZSOURCE
-
-   [USER.SMITH]REPORT.TXT
-   Example:
-
-   GTM> ZLINK "BASE.OBJ"
-
-   .
-
-   .
-
-   .
-
-   GTM> WRITE $ZSOURCE
-
-   BASE
-
-2 $ZStatus
-   $ZStatus
-
-   $ZS[TATUS] contains a string value specifying the error condition code
-   and location of the  last  exception  condition  that  occurred  during
-   routine execution.
-
-   GT.M maintains $ZSTATUS  as  a  string  consisting  of  three  or  more
-   substrings. The string consists of the following:
-
-   o    An error message number as the first substring.
-
-   o    The entryref of the line in error as the second substring; a comma
-        (,) separates the first and second substrings.
-
-   o    The message detail as the third substring. The format of this is a
-        percent sign (%) identifying the message  facility,  a  hyphen  (-)
-        identifying the error  severity,  another  hyphen  identifying  the
-        message identification followed by a comma (,), which  is  followed
-        by the message text if any:
-
-   Format: %<FAC>-<SEV>-<ID>, <TEXT>
-
-   Example: %GTM-E-DIVZERO, Attempt to divide by zero
-
-   The DCL command SET MESSAGE does not affect the format of the $ZSTATUS
-   string. $ZSTATUS always  contains  all  components  of  the  VMS  error
-   message  format  (message  number,  facility,  error  severity,
-   identification and text).GT.M sets $ZSTATUS when it  encounters  errors
-   during program execution, but not when it encounters errors in a Direct
-   Mode command.
-
-   When a VMS system component such as RMS detects  an  error,  the  error
-   message number is a VMS condition code. When a  GT.M  system  component
-   detects an error, the message number is a GT.M condition code. You can
-   establish your own condition codes using the VMS  MESSAGE  utility  and
-   invoke them using the GT.M ZMESSAGE command. For  more  information  on
-   GT.M condition codes, refer to the "GT.M Messages &  Recovery  Manual".
-   For more information on the VMS message  facility,  refer  to  the  VMS
-   Message Utility Manual.
-
-   $ZSTATUS is a read-write Intrinsic  Special  Variable,  (i.e.,  it  can
-   occur on the left side of the equal sign (=) in the argument to the SET
-   command). While it will accept any string, Sanchez Computer Associates
-   recommends setting it to null. M routines cannot modify  $ZSTATUS  with
-   the NEW command.
-
-   Example:
-
-
-   GTM> WRITE $ZSTATUS
-
-   1212,+1^GTM$DMOD,%SYSTEM-F-FLTDIV_F,
-   arithmetic fault, floating
-
-   divide by zero at PC=00080C01, PSL=03C00000
-
-   This example displays the status generated by a divide by zero (0).
-
-2 $ZSTep
-   $ZSTep
-
-   $ZST[EP] contains a string value specifying the default action for the
-   ZSTEP command. $ZSTEP provides the ZSTEP action  only  when  the  ZSTEP
-   command does not specify an action.
-
-   $ZSTEP initially contains the string "B" to enter direct  mode.  $ZSTEP
-   is a read-write Intrinsic Special Variable, (i.e., it can appear on the
-   left side of the equal sign (=) in the argument to the SET command).
-
-   Example:
-
-   GTM> WRITE $ZSTEP
-
-   B
-
-   GTM>
-
-   This example displays  the  current  value  of  $ZSTEP,  which  is  the
-   default.
-
-   Example:
-
-
-   GTM> SET $ZSTEP="ZP @$ZPOS B"
-
-   This example sets $ZSTEP to code that displays the contents of the next
-   line to execute, and then enters Direct Mode.
-
-2 $ZSYstem
-   $ZSYstem
-
-   $ZSY[STEM] holds the value of the status code for the  last  subprocess
-   invoked with the ZSYSTEM command.
-
-2 $ZTExit
-   $ZTExit
-
-   $ZTE[XIT] contains a string value  that  controls  the  GT.M  interrupt
-   facility at the transaction  commit  or  rollback.  At  each  outermost
-   TCOMMIT or TROLLBACK, If +$ZTEXIT evaluates to  non-zero  (TRUE),  then
-   $ZINTERRUPT is XECUTEd after completing the commit or rollback.
-
-   $ZTEXIT is a read-write ISV, that is, it can appear on the left side of
-   the equal sign (=) in the argument  to  the  SET  command.  M  routines
-   cannot NEW $ZTEXIT. GT.M initializes $ZTEXIT to  null  at  the  process
-   startup. Note that the changes to the value of $ZTEXIT  during  a  GT.M
-   invocation last for the entire duration of the process, so  it  is  the
-   application’s responsibility to reset $ZTEXIT  after  $ZINTERRUPT  is
-   delivered in order to turn off redelivering the  interrupt  each  every
-   subsequent transaction commit or rollback.
-
-   Example:
-
-   ztran.m
-
-   foo ;
-
-   set $zte=1
-
-   set $zint="d ^throwint"
-
-   tstart ()
-
-   for i=1:1:10 do
-
-   . set ^ACN(i,"bal")=i*100
-
-   tstart ()
-
-   do ^throwint
-
-   do ^proc
-
-   tcommit:$tlevel=2
-
-   for i=1:1:10 do
-
-   . set ^ACN(i,"int")=i*0.05
-
-   do ^srv
-
-   if $tlevel trollback
-
-   do ^exc
-
-   set $zte="",$zint=""
-
-   quit
-
-   bar ;
-
-   write "Begin Transaction",!
-
-   set $zte=1
-
-   tstart ()
-
-   i '$zsigproc($j,$ztrnlnm("sigusrval")) w "interrupt sent...",!!
-
-   for i=1:1:4 set ^B(i)=i*i
-
-   tcommit
-
-   write "End Transaction",!
-
-   do ^srv
-
-   quit
-
-
-   throwint.m
-
-   thrint
-
-   set  $zint="write  !,""interrupt  occurred  at  :
-   "",$stack($stack-1,""PLACE""),! set $zte=1"
-   if  '$zsigproc($j,$ztrnlnm("sigusrval"))  write  "interrupt  sent  to
-   process"
-   write "***************************************",!!
-
-   quit
-
-   Example:
-
-
-   GTM>d foo^ztran
-
-   interrupt sent to process
-
-   interrupt occurred at : thrint+3^throwint
-
-***************************************
-
-
-   interrupt occurred at : foo+13^ztran
-
-
-   GTM>
-
-   In the above call to foo^ztran, the interrupt handler is a user-defined
-   routine,  throwint.  The  process  is  sent  a  signal  (SIGUSR1),  and
-   $ZINTERRUPT is executed. At the outermost trollback, the  interrupt  is
-   rethrown, causing $ZINTERRUPT to be executed again.
-
-   Example:
-
-
-   GTM>w $zint
-
-   IF $ZJOBEXAM()
-
-   GTM>f s x=$zsearch("GTM_JOBEXAM.*") q:x="" w !,x
-
-
-   GTM>d bar^ztran
-
-   Begin Transaction
-
-   interrupt sent...
-
-
-   End Transaction
-
-
-   GTM>f s x=$zsearch("GTM_JOBEXAM.*") q:x="" w !,x
-
-
-   DISK$TESTAREA3:[V967.ZTE]GTM_JOBEXAM.ZSHOW_DMP_541068433_1;1
-
-   DISK$TESTAREA3:[V967.ZTE]GTM_JOBEXAM.ZSHOW_DMP_541068433_2;1
-
-
-   GTM>
-
-
-   This uses the default value of $ZINTERRUPT to service interrupts issued
-   to the process. The $ZJOBEXAM function executes a ZSHOW "*", and stores
-   the output in each GTM_ZJOBEXAM_ZSHOW_DMP for  the  initial  interrupt,
-   and at tcommit when the interrupt is rethrown.
-
-2 $ZTrap
-   $ZTrap
-
-   $ZT[RAP] contains a string value that GT.M XECUTEs when an error occurs
-   during routine execution.
-
-        The following discussion assumes  that  $ETRAP  error  handling  is
-        simultaneously not in effect (that is, $ETRAP="").
-
-   When the $ZTRAP variable is not  null,  GT.M  executes  $ZTRAP  at  the
-   current level. The $ZTRAP variable has the initial value  of  "B,"  and
-   puts the process in Direct Mode when an error condition occurs. If the
-   value of $ZTRAP is null (""), an exception causes the image to run-down
-   with the condition  code  associated  with  the  exception.  If  $ZTRAP
-   contains invalid source code, GT.M displays an error message  and  puts
-   the process into Direct Mode.
-
-   $ZTRAP is a read-write Intrinsic Special Variable, (i.e., it can appear
-   on the left side of the equal sign (=)  in  the  argument  to  the  SET
-   command).
-
-   $ZTRAP may also appear as an argument to an inclusive NEW command. NEW
-   $ZTRAP causes GT.M to set $ZTRAP to null ($ZTRAP="") and to  stack  the
-   old value of $ZTRAP. When the program QUITs from the  invocation  level
-   where the NEW occurred, GT.M restores the value previously  stacked  by
-   the NEW. NEW $ZTRAP  provides  nesting  of  $ZTRAP.  Because  $ZTRAP=""
-   terminates the image  when  an  error  occurs,  SET  $ZTRAP=  generally
-   follows immediately after NEW $ZTRAP. You may  use  this  technique  to
-   construct error handling strategies corresponding  to  the  nesting  of
-   your programs. If the logical name gtm_ztrap_new evaluates  to  boolean
-   TRUE (case insensitive string "TRUE", or case insensitive string "YES",
-   or a non-zero number), $ZTRAP is NEWed when $ZTRAP  is  SET;  otherwise
-   $ZTRAP is not stacked when it is SET.
-
-        QUIT from a $ZTRAP terminates the level at  which  the  $ZTRAP  was
-        activated.
-
-   Keep $ZTRAP simple and put complicated logic in another routine. If the
-   action specified by $ZTRAP results in  another  run-time  error  before
-   changing the value of $ZTRAP, GT.M invokes $ZTRAP until it exhausts the
-   process stack space, terminating the image. Carefully  debug  exception
-   handling.
-
-   Example:
-
-
-   GTM> S $ZTRAP="ZP @$ZPOS B"
-
-   This example modifies $ZTRAP to display source code for the line where
-   GT.M encounters an error before entering Direct Mode.
-
-   There are four accepted behavioural forms of $ZTRAP controlled  by  the
-   VMS logical name gtm_ztrap_form. If gtm_ztrap_form is defined to "code"
-   (or not defined to one of the subsequently described values), then GT.M
-   treats $ZTRAP as code and handles it as  previously  described  in  the
-   documentation.
-
-   The four different behavioural forms of gtm_ztrap_form are:
-
-   o    entryref - If gtm_ztrap_form evaluates  to  "entryref"  then  GT.M
-        treats it as an entryref argument to an implicit GOTO command.
-
-   o    adaptive - If  gtm_ztrap_form  evaluates  to  "adaptive"  then  if
-        $ZTRAP does not compile to valid M code, then $ZTRAP is treated as
-        just described for "entryref." Since  there  is  little  ambiguity,
-        code and entryref forms of $ZTRAP can be  intermixed  in  the  same
-        application.
-
-   Note that GT.M attempts to compile $ZTRAP before evaluating  $ZTRAP  as
-   an entryref. Since GT.M allows commands without arguments such as QUIT,
-   ZGOTO, or HANG as valid labels, be careful not to use such keywords as
-   labels for error handling code in "adaptive" mode.
-
-   o    pope[ntryref] / popa[daptive] -  If  gtm_ztrap_form  evaluates  to
-        "POPE[NTRYREF]" or "POPA[DAPTIVE]" (case  insensitive)  and  $ZTRAP
-        value is in the form of entryref, GT.M unwinds the M stack from the
-        level at which an error occurred to (but not including)  the  level
-        at which $ZTRAP was last SET. Then, GT.M transfers control  to  the
-        entryref in $ZTRAP at the level where the $ZTRAP value was SET. If
-        the VMS logical name gtm_zyerror is defined to  a  valid  entryref,
-        GT.M transfers control to the  entryref  specified  by  GTM_ZYERROR
-        (with  an  implicit  DO)  after  unwinding  the  stack  and  before
-        transferring control to the entyref specified in $ZTRAP.
-
-2 $ZVersion
-   $ZVersion
-
-   $ZV[ERSION] contains a string value specifying the currently installed
-   GT.M.  $ZV[ERSION]  is  a  space-delimited  string  with  four  pieces
-   described below:
-
-   o    The M product name, for example "GT.M".
-
-   o    The M product version identifier; the format is: the capital letter
-        "V" followed by the  major  version  number,  then  a  period  (.),
-        followed by the minor version number, then a patch number.
-
-   o    The host operating system name  and  optional  version  identifier;
-        this identifier is only included if different versions  of  the  OS
-        support different, compatible versions of the M product.
-
-   o    The host hardware designation and optional chipset identifier; this
-        identifier is only included if different versions of  the  hardware
-        support different compatible versions of the M product.
-
-   M routines cannot modify $ZVERSION.
-
-   Example:
-
-
-   GTM> WRITE $ZVERSION
-
-   GT.M V4.3-001B VMS AXP
-
-   This example displays the current version identifier for GT.M.
-
-2 $ZYERror
-   $ZYERror
-
-   $ZYER[ROR] is a read/write ISV that contains a string value pointing to
-   an entryref. After GT.M encounters an  error,  if  $ZYERROR  is  set  a
-   non-null value, GT.M invokes the routine at the entryref  specified  by
-   $ZYERROR with an implicit DO. It is intended that the code  invoked  by
-   $ZYERROR use the value of $ZSTATUS to select or construct  a  value  to
-   which it SETs $ZERROR. If $ZYERROR is not a valid  entryref  or  if  an
-   error occurs while executing the entryref specified by  $ZYERROR,  GT.M
-   SETs $ZERROR to the error status encountered. GT.M then returns control
-   to the M code specified by $ETRAP/$ZTRAP or device EXCEPTION.
-
-   $ZYERROR is implicitly NEWed on  entry  to  the  routine  specified  by
-   $ZYERROR. However, if GT.M fails to compile,  GT.M  does  not  transfer
-   control to the entryref specified by $ZYERROR.
-
-   GT.M permits $ZYERROR to be modified by the SET and NEW commands.
-
-1 In_Out_Processing
-   Input Output Processing
-
-   OPEN, USE,  and  CLOSE  commands  accept  deviceparameters,  which  are
-   keywords that permit an GT.M process to control the device state. Some
-   deviceparameters accept arguments, and some require them.  The  current
-   ANSI standard for GT.M does not define  the  deviceparameters  for  all
-   devices.
-
-2 IO_ISV
-   I/O Intrinsic Special Variables
-
-   GT.M intrinsic special  variables  provide  a  means  of  communication
-   between a device  and  its  device  driver  and  GT.M  routines.  These
-   variables allow a GT.M routine to manage  the  I/O  with  a  particular
-   device.
-
-3 Device_Nam_Var
-   Device Name Variables
-
-   GT.M provides three intrinsic special variables that identify devices.
-
-4 $IO
-   $IO
-
-   $I[O] contains the name of the current device specified by the last USE
-   command. The M standard does not permit a SET command  to  modify  $IO.
-   USE produces the same $IO as USE $PRINCIPAL, but $P  is  the  preferred
-   construct.
-
-4 $Principal
-   $Principal
-
-   $P[RINCIPAL] contains the name of the principal (initial  $IO)  device.
-   GT.M  establishes  $PRINCIPAL  as  a  fully  expanded  VMS  device
-   specification.
-
-   Input and output for a process may  come  from  separate  devices.  VMS
-   designates these  devices  with  the  process-permanent  logical  names
-   SYS$INPUT and SYS$OUTPUT. However, the GT.M I/O model allows  only  one
-   device to be USEd (or active) at a time. When  an  image  starts,  GT.M
-   implicitly OPENs the devices identified by SYS$INPUT and SYS$OUTPUT and
-   assigns the device(s) to $PRINCIPAL. For USE  deviceparameters,  it  is
-   the standard input that determines the device type.
-
-   For an image invoked interactively, $PRINCIPAL is the user's terminal.
-   For a batch job, $PRINCIPAL is the command file for input and  the  log
-   file for output. For an image invoked from a terminal  by  means  of  a
-   command file, $PRINCIPAL is the command file for input and the terminal
-   for output,  unless  the  command  file  redefines  the  logical  names
-   SYS$INPUT and/or SYS$OUTPUT.  Generally  an  interactive  command  file
-   contains the following command immediately  before  it  starts  a  GT.M
-   image.
-
-   Example:
-
-   $ DEFINE SYS$INPUT 'F$TRNLNM("SYS$COMMAND")'
-
-   This redirects the input for the process to  come  from  the  terminal.
-   GT.M ignores a CLOSE command specifying the principal device.
-
-   GT.M does not permit a SET command to modify $PRINCIPAL.
-
-4 $ZIO
-   $ZIO
-
-   $ZIO contains the translated name of the current device, in contrast to
-   $IO, which contains the name as specified by the USE command.
-
-3 Cur_Position_Var
-   Cursor Position Variables
-
-   GT.M provides two  intrinsic  special  variables  for  determining  the
-   virtual cursor position. $X refers to  the  current  column,  while  $Y
-   refers to the current row.
-
-4 $X
-   $X
-
-   $X contains an integer value ranging from 0 to 65,535,  specifying  the
-   horizontal position of a virtual cursor in the current  output  record.
-   $X=0 represents the left-most position of a record or row.
-
-   Every OPENed device has a $X. However, GT.M only has access  to  $X  of
-   the current device. Therefore, be careful when sequencing USE commands
-   and references to $X.
-
-   Generally, GT.M increments $X for every character written to  and  read
-   from the current device. GT.M format control  characters,  FILTER,  and
-   the device WIDTH and WRAP also have an effect on $X.
-
-   SET $X does not automatically issue device commands or escape sequences
-   to reposition the physical cursor.
-
-4 $Y
-   $Y
-
-   $Y contains an integer value ranging from 0 to 65,535,  specifying  the
-   vertical position of a virtual cursor in  the  current  output  record.
-   $Y=0 represents the top row or line.
-
-   Every OPEN device has a $Y. However,  GT.M  only  accesses  $Y  of  the
-   current device. Therefore, be careful when sequencing USE commands and
-   references to $Y.
-
-   When GT.M  finishes  the  logical  record  in  progress,  it  generally
-   increments $Y. GT.M recognizes the end of  a  logical  record  when  it
-   processes certain GT.M format control characters, or  when  the  record
-   reaches its maximum size, as determined by the device  WIDTH,  and  the
-   device is set to WRAP. The definition of "logical record"  varies  from
-   device to device. For an exact definition, see  the  sections  on  each
-   device type. FILTER and the device LENGTH also have an effect on $Y.
-
-   SET $Y does not automatically issue device commands or escape sequences
-   to reposition the physical cursor.
-
-4 Maint_of_$X_and_&Y
-   Maintenance of $X and $Y
-
-   In GT.M, the following factors affect the maintenance  of  the  virtual
-   cursor position ($X and $Y):
-
-   o    The bounds of the virtual "page"
-
-   o    GT.M format control characters
-
-   o    GT.M character filtering
-
-   Each device has a WIDTH and a LENGTH that define  the  virtual  "page."
-   The WIDTH determines the maximum size of a record for a  device,  while
-   the LENGTH determines how many records fit on a page. GT.M starts a new
-   record when the current record size ($X) reaches the maximum WIDTH and
-   the device has WRAP enabled. When the current  line  ($Y)  reaches  the
-   maximum LENGTH, GT.M starts a new page.
-
-   GT.M has several format control characters that allow the manipulation
-   of the virtual cursor. For all I/O devices,  the  GT.M  format  control
-   characters do the following:
-
-        ! Sets $X to zero (0) and increments $Y, and terminates the logical
-        record in progress. The definition of "logical record" varies from
-        device to device, and is discussed in each device section.
-        # Sets $X and $Y to zero (0), and terminates the logical record in
-        progress.
-        ?n If n is greater than $X,  writes  n-$X  spaces  to  the  device,
-        bringing $X to n. If n is less than or  equal  to  $X,  ?n  has  no
-        effect. When WRAP is enabled and n exceeds the WIDTH of  the  line,
-        WRITE ?n increments $Y and sets $X equal to n#WIDTH, where # is the
-        GT.M modulo operator.
-   GT.M provides two modes  of  character  filtering.  When  filtering  is
-   enabled, certain <CTRL> characters and/or escape sequences have special
-   effects on the cursor position (e.g., <BS> (ASCII 8) may decrement $X,
-   if $X is non-zero). For more information on write filtering,  refer  to
-   the section on the [NO]FILTER deviceparameter.
-
-3 Status_Var
-   Status Variables
-
-   GT.M provides several I/O  status  variables  that  convey  information
-   about the status of individual operations.
-
-4 $ZA
-   $ZA
-
-   $ZA contains a status determined by the last read on  the  device.  The
-   value is a decimal integer with a meaning determined by the  device  as
-   follows:
-
-   For Terminal I/O:
-
-        0 Indicating normal termination of a read operation
-        1 Indicating a parity error
-        2 Indicating the terminator sequence was malformed or too long
-        3 Indicating hardware contention or failure
-        4 Indicating a system configuration problem
-        5 Indicating a process limit was exceeded or the process  does  not
-        have a required privilege
-        9 Indicating a default for all other errors
-   For Sequential Disk Files I/O:
-
-        0 Indicating normal termination of a read operation
-        9 Indicating a failure of a read operation
-   For Mailbox I/O:
-
-        A decimal integer Indicating $JOB (VMS PID)  of  the  process  that
-        wrote the last message the current process read
-   For socket:
-
-        0 Indicating normal termination or time out
-        9 Indicating failure of a read operation
-   $ZA refers to the status of the  current  device.  Therefore,  exercise
-   care in sequencing USE commands and references to $ZA.
-
-4 $ZB
-   $ZB
-
-   $ZB contains a string specifying the  input  terminator  for  the  last
-   terminal READ. $ZB is null, and it is not maintained for devices other
-   than terminals. $ZB may contain any legal  input  terminator,  such  as
-   <CR> (ASCII 13) or an escape sequence starting with <ESC>  (ASCII  27),
-   from zero (0) to  15  bytes  in  length.  $ZB  is  null  for  any  READ
-   terminated by a timeout or any fixed-length READ  terminated  by  input
-   reaching the maximum length.
-
-   $ZB contains the actual character string, not  a  sequence  of  numeric
-   ASCII codes.
-
-   Example:
-
-   SET zb=$ZB FOR i=1:1:$LENGTH(zb) WRITE !,i,?5,$A(zb,i)
-
-   This example displays the series of ASCII codes for the  characters  in
-   $ZB.
-
-   $ZB  refers  to  the  last  READ  terminator  of  the  current  device.
-   Therefore, be careful when sequencing USE commands  and  references  to
-   $ZB.
-
-4 $ZEOF
-   $ZEOF
-
-   $ZEOF contains a truth-valued expression indicating  whether  the  last
-   READ operation reached the end-of-file. $ZEOF is  TRUE(1)  at  EOF  and
-   FALSE (0) at other positions. GT.M does not maintain $ZEOF for terminal
-   devices.
-
-   $ZEOF  refers  to  the  end-of-file  status  of  the  current  device.
-   Therefore, be careful when sequencing USE commands  and  references  to
-   $ZEOF.
-
-2 IO_Devices
-   I/O Devices
-
-   Each device type supported by GT.M responds to a particular  subset  of
-   deviceparameters, while ignoring others. Devices may be programmed in a
-   device-specific  manner,  or  in  a  device-independent  manner.
-   Device-specific I/O routines are intended for use with only one type of
-   device.  Device-independent  I/O  routines  contain  appropriate
-   deviceparameters for all devices to be supported by  the  function,  so
-   the user can redirect to a different device output while using the same
-   program.
-
-   GT.M supports the following I/O device types:
-
-   o    Terminals and Printers
-
-   o    Sequential Disk RMS Files
-
-   o    VMS Mailboxes
-
-   o    Null Devices
-
-   o    Socket Devices
-
-3 IO_Devi_Recog
-   I/O Device Recognition
-
-   GT.M  OPEN,  USE,  and  CLOSE  commands  have  an  argument  expression
-   specifying a device name. In the OpenVMS environment, a device  may  be
-   referred to either by its physical name or by a logical name  to  which
-   its physical name has  been  assigned.  Because  logical  names  permit
-   program coding independent of hardware configuration, logical names are
-   more common than physical names.
-
-   During an OPEN, GT.M attempts to resolve the specified device names to
-   physical names. When GT.M successfully resolves  a  device  name  to  a
-   physical device, that device becomes the target of the OPEN.  When  the
-   device name does not  resolve  to  a  physical  device,  GT.M  attempts
-   logical name translation;  the  result  becomes  the  name  of  an  RMS
-   sequential disk file. The TMPMBX and PRMMBX deviceparameters on an OPEN
-   command override the default mechanism, and specify that the device is
-   a VMS mailbox.
-
-   Once a device is OPEN,  GT.M  establishes  an  internal  correspondence
-   between a name and the device or file. Therefore, while the  device  is
-   OPEN, changing  the  translation  of  a  logical  name  in  the  device
-   specification does not change the device.
-
-   The following names identify the original $IO for the process:
-
-   o    $PRINCIPAL
-
-   0
-
-   o    "SYS$INPUT"
-
-   o    "SYS$OUTPUT"
-
-   Some versions of GT.M also treat the empty string  as  identifying  $P.
-   However, Sanchez recommends using the empty string to identify  a  null
-   device, so it would be wise to avoid or eliminate this behavior.
-
-3 Devi_Spec_Defaults
-   Device Specification Defaults
-
-   GT.M uses standard OpenVMS file-specifications for device specifiers.
-
-   The complete format for a file-specification is:
-
-   node::device:[directory]file.filetype;version
-
-   If the expression specifying a  device  does  not  contain  a  complete
-   file-specification, the expression may start with a logical  name  that
-   translates to one or more leading components of the file-specification.
-   GT.M applies default values for the missing components.
-
-   The GT.M file-specification defaults are the following:
-
-        Node Current user node
-        Device Current default OpenVMS device
-        Directory Current default OpenVMS directory
-        Filetype .DAT for the file extension
-        Version Latest version number
-3 How_IO_DeviParam_Work
-   How I/O Deviceparameters Work
-
-   I/O deviceparameters either perform actions that cause the device to do
-   something (for example, CLEARSCREEN), or specify  characteristics  that
-   modify  the  way  the  device  subsequently  behaves  (for  example,
-   RECORDSIZE, ALLOCATION).  When  an  I/O  command  has  multiple  action
-   deviceparameters, GT.M  performs  the  actions  in  the  order  of  the
-   deviceparameters within  the  command  argument.  When  a  command  has
-   characteristic deviceparameters, the last occurrence of a  repeated  or
-   conflicting deviceparameter determines the characteristic.
-
-   Deviceparameters often relate to a specific device type.  GT.M  ignores
-   any deviceparameters that do not  apply  to  the  type  of  the  device
-   specified by the command argument. Specified device characteristics are
-   in force for the duration of the GT.M image, or until  modified  by  an
-   OPEN, USE, or CLOSE command.
-
-   When reopening a device that  it  previously  closed,  a  GT.M  process
-   restores all characteristics not specified on the OPEN  to  the  values
-   the device had when it was last CLOSEd.  GT.M  treats  sequential  disk
-   files differently and uses defaults  for  unspecified  sequential  disk
-   file characteristics on every OPEN  (that  is,  GT.M  does  not  retain
-   sequential disk file characteristics on a CLOSE).
-
-   The ZSHOW  command  with  an  argument  of  "D"  displays  the  current
-   characteristics for all devices OPENed by the process. ZSHOW can direct
-   its output into a GT.M variable.
-
-3 Abbv_DeviParam
-   Abbreviating Deviceparameters
-
-   GT.M  deviceparameters  do  not  have  predefined  abbreviations.  GT.M
-   recognizes  deviceparameters  using  a  minimum  recognizable  prefix
-   technique. Most deviceparameters can be  represented  by  four  leading
-   characters, except ERASELINE, READSYNC, all  deviceparameters  starting
-   with WRITE,  and  Z*  deviceparameters  in  a  mnemonicspace  (such  as
-   SOCKET). The four  leading  characters  recognized  do  not  include  a
-   leading NO for negation.
-
-   For compatibility with previous versions, GT.M  may  recognize  certain
-   deviceparameters by abbreviations shorter than the minimum. While it is
-   convenient  in  Direct  Mode  to  use  shorter  abbreviations,  Sanchez
-   Computer Associates may add additional deviceparameters, and therefore,
-   recommends all programs use at  least  four  characters.  Because  GT.M
-   compiles the code, spelling  out  deviceparameters  completely  has  no
-   performance penalty, except  when  used  with  indirection  or  XECUTEd
-   arguments.
-
-
-3 Devi_Independent_Prog
-   Device-Independent Programming
-
-   When a user may choose a device for I/O, GT.M routines can take one of
-   two basic programming approaches.
-
-   o    The  user  selection  directs  the  program  into  different  code
-        branches, each of which handles a different device type.
-
-   o    The user selection identifies the device. There is  a  single  code
-        path written with a full complement of deviceparameters  to  handle
-        all selectable device types.
-
-   The latter approach is called device-independent programming. To permit
-   device independent programming, GT.M uses the same deviceparameter for
-   all  devices  that  have  an  equivalent  facility,  and  ignores
-   deviceparameters applied  to  a  device  that  does  not  support  that
-   facility.
-
-   Example:
-
-   OPEN dev:(EXCE=exc:REWIND:VARIABLE:NEWVERSION:WRITEONLY)
-
-   This  OPENs  a  device  with  deviceparameters  that  affect  different
-   devices. Only the EXCEPTION has an effect for all  device  types.  When
-   dev  is  a  terminal  or  a  null  device,  GT.M  ignores  the  other
-   deviceparameters. When dev is an RMS file on disk,  GT.M  uses  REWIND,
-   VARIABLE, and NEWVERSION.  When  dev  is  a  mailbox,  GT.M  only  uses
-   WRITEONLY. This command performs a valid OPEN  for  all  the  different
-   device types.
-
-        A file that has been previously  created  and  contains  data  that
-        should be retained can also be opened  with  the  device  parameter
-        APPEND.
-
-2 Terminals
-   Using Terminals
-
-   A typical GT.M application is largely interactive  and  uses  terminals
-   extensively. By default, a GT.M process directs  its  terminal  I/O  to
-   $PRINCIPAL. $PRINCIPAL identifies the terminal  that  the  user  signed
-   onto in VMS.
-
-   While all terminals support the CTRAP deviceparameter, which optionally
-   allows  terminal  input  to  optionally  redirect  program  flow,  only
-   $PRINCIPAL supports CENABLE, which optionally allows the terminal user
-   to invoke the Direct Mode shell.
-
-   Directly  connected  printers  often  appear  to  GT.M  as  a  terminal
-   (although printers  generally  do  not  provide  input)  regardless  of
-   whether the printer is connected to the Open  VMS  with  a  high  speed
-   parallel interface, or an asynchronous terminal controller.
-
-3 Set_Terminal_Char
-   Setting Terminal Characteristics
-
-   GT.M does not isolate its handling of terminal characteristics from the
-   VMS  environment  at  large.  GT.M  inherits  the  VMS  terminal
-   characteristics in effect at  the  time  the  GT.M  image  is  invoked.
-   Therefore, DCL SET TERMINAL commands that precede invocation of a GT.M
-   image  affect  the  way  the  terminal  behaves  initially.  For  more
-   information on setting  terminal  characteristics,  refer  to  the  SET
-   TERMINAL command in the OpenVMS DCL Dictionary.
-
-   However, if the process temporarily leaves the GT.M environment with a
-   ZSYSTEM command or a $ZCALL() function, GT.M  does  not  recognize  any
-   changes  to  the  terminal  characteristics  left  by  the  external
-   environment. This may cause disparities between the  physical  behavior
-   of the terminal, and the perceived behavior by GT.M.
-
-   VMS enforces standard device security for explicit OPENs  of  terminals
-   other than the sign-in terminal (SYS$COMMAND). If  you  are  unable  to
-   OPEN a terminal, contact your system manager.
-
-   Most terminal characteristics respond to deviceparameters  on  the  USE
-   command.  Many  $PRINCIPAL  terminal  characteristics  modified  by
-   deviceparameters in GT.M persist after the GT.M image terminates.
-
-   USE of a terminal causes the device driver to flush the output buffer.
-   This feature of the USE  command  provides  routine  control  over  the
-   timing of output, which is  occasionally  required.  However,  it  also
-   means that redundant USE commands may induce an unnecessary performance
-   penalty. Therefore, Sanchez Computer Associates recommends restricting
-   USE  commands  to  redirecting  I/O,  modifying  deviceparameters,  and
-   initiating specifically required flushes.
-
-3 Logical_Rec_for_Term
-   Logical Records for Terminals
-
-   A logical record for a terminal equates  to  a  line  on  the  physical
-   screen. The WIDTH device characteristic  specifies  the  width  of  the
-   screen, while the LENGTH device characteristic specifies the number of
-   lines on the screen.
-
-3 Terminating_Term_READ
-   Terminating a Terminal READ
-
-   To terminate a READ command for terminals with anything  other  than  a
-   carriage return  (<CR>)  or  an  escape  (<ESC>),  use  the  TERMINATOR
-   deviceparameter with the USE command. By default,  terminals  recognize
-   the terminators <CR> (ASCII 13) and <ESC> (ASCII 27).
-
-   A successful READ  operation  sets  $ZB  to  the  input  terminator  or
-   terminating escape sequence. For example, if a READ terminates  with  a
-   <CR>, $ZB equals $C(13). If the READ times out or the input exceeds the
-   maximum length, the terminal device driver sets $ZB to null.
-
-3 READ_Comm_for_Term
-   READ* Command for Terminals
-
-   If the terminal has ESCAPE sequencing enabled, and the input contains a
-   valid escape sequence or a terminator character,  the  terminal  device
-   driver stores  the  entire  sequence  in  $ZB  and  returns  the  ASCII
-   representation of the first character.
-
-   Example:
-
-   GTM> KILL
-
-   GTM> USE $P:ESCAPE
-
-   GTM> READ *X SET ZB=$ZB ZWRITE
-
-   (Press the F11 key on the VT220 terminal keyboard)
-   x=27
-
-   zb=$C(27)_"[23~"
-
-   This enters an escape sequence in response to a  READ  *.  The  READ  *
-   assigns the code for <ESC> to the  variable  X.  The  terminal  handler
-   places  the  entire  escape  sequence  in  $ZB.  Because  some  of  the
-   characters are not graphic, that is, visible on a terminal, the example
-   transfers the contents of $ZB to the  local  variable  ZB  and  uses  a
-   ZWRITE so that the non-graphic characters appear in $CHAR() format.
-
-   The READ * command for  terminals  does  not  affect  $ZB  when  escape
-   sequencing is not  enabled.  If  the  input  contains  a  valid  escape
-   sequence and escape sequencing is not enabled,  the  variable  for  the
-   READ * command returns the first character of the escape sequence, for
-   example, ASCII 27. The terminal  device  driver  stores  the  remaining
-   characters of the escape sequence in the read buffer.  A  READ  command
-   following a READ * command returns  the  remaining  characters  of  the
-   escape sequence.  An  application  that  operates  with  NOESCAPE  must
-   provide successive READ *  commands  to  remove  the  remaining  escape
-   characters from the buffer.
-
-   Example:
-
-   GTM> KILL
-
-   GTM> USE $P:(NOESCAPE:TERM=$C(13))
-
-   GTM> READ *X SET ZB=$ZB READ Y:0 ZWRITE
-
-   (Press the F11 key on the terminal keyboard)
-   [23~i=5
-   x=27
-
-   y="[23~"
-
-   zb=""
-
-   GTM> USE $P:NOECHO READ *X S ZB=$ZB READ Y:0 USE $P:ECHO ZW
-
-   i=5
-
-   x=27
-
-   y="[23~"
-
-   zb=""
-
-   GTM> READ *X SET ZB=$ZB USE $P:FLUSH READ Y:0 ZWRITE
-
-   i=5
-
-   x=27
-
-   y=""
-
-   zb=""
-
-   While the first  READ  Y:0  picks  up  the  sequence  after  the  first
-   character, notice how the graphic portion of the  sequence  appears  on
-   the terminal - this  is  because  the  READ  *X  separated  the  escape
-   character from the  rest  of  the  sequence  thus  preventing  the  VMS
-   terminal  driver  logic  from  recognizing  it  as  a  sequence,  and
-   suppressing its echo. The explicit suppression  of  echo  removes  this
-   visual artifact. In the case of the final READ *X, the FLUSH clears the
-   input buffer so that it is empty by the time of the READ Y:0.
-
-3 READmaxlen_Comm_for_Term
-   READ X#maxlen Command for Terminals
-
-   Generally, GT.M performs  the  same  maintenance  on  $ZB  for  a  READ
-   X#maxlen as for a  READ.  However,  if  the  READ  X#maxlen  terminates
-   because the input has reached the maximum  length,  GT.M  sets  $ZB  to
-   null. When the terminal has ESCAPE sequencing enabled,  and  the  input
-   contains an escape sequence that does not fit in the read buffer, GT.M
-   sets $ZB to contain the escape sequence.
-
-3 Term_Examples
-   Terminal Examples
-
-   This section contains examples of GT.M terminal handling.
-
-   Example:
-
-   USE $PIECE:(ctrap=$c(3):exception="zg "_$zl_":C^MENU")
-
-   This example USEs the  principal  device,  and  sets  up  an  EXCEPTION
-   handler. If the device is a terminal, the USE also sets up a  trap  for
-   <CTRL-C>. When an EXCEPTION occurs, it transfers control to label C in
-   the routine ^MENU at the process stack level where  the  EXCEPTION  was
-   established.
-
-   Example:
-
-   USE $PIECE:(X=0:Y=0:CLEARSCREEN)
-
-   This example positions the cursor to the  upper  left-hand  corner  and
-   clears the entire screen.
-
-   Example:
-
-   USE $PIECE:(NOECHO:WIDTH=132:WRAP)
-
-   This example disables ECHOing, enables automatic WRAPping, and sets the
-   line width to 132 characters.
-
-   Example:
-
-   USE $PIECE:NOCENABLE
-
-   This example disables <CTRL-C>.
-
-   Example:
-
-   USE $PIECE:(PASTHRU:ESCAPE) R *X U $P:(NOPASTHRU)
-
-   WRITE !,X,?5 I $L($ZB) W $A($ZB) F i=2:1:$L($ZB) W ",",$A
-
-   ($ZB,i)
-   This USEs the principal device and, if  it  is  a  terminal,  turns  on
-   PASTHRU and ESCAPE sequence processing. The READ  *X  places  an  ASCII
-   code in X corresponding to the character read. The second USE turns off
-   PASTHRU. The second line displays the resulting value  for  X  and  the
-   ASCII codes in $ZB. $ZB holds the  terminator,  if  any.  This  routine
-   examines the input from all keys and key combinations on  the  keyboard
-   except <CTRL-Q> and <CTRL-S>.
-
-2 Sequential_Files
-   Using Sequential (RMS) Files
-
-   GT.M provides access to sequential files both on disk. These files use
-   the Files-11  RMS  format,  which  allows  linear  access  to  records.
-   Sequential files are used to create programs,  store  reports,  and  to
-   communicate with facilities outside of GT.M.
-
-3 Setting_Seq_File_Charc
-   Setting Sequential File Characteristics
-
-   The ANSI standard specifies that when a process CLOSEs and then reOPENs
-   a device, GT.M restores any characteristics  not  explicitly  specified
-   with deviceparameters to the values they had prior to the  last  CLOSE.
-   However, because it is difficult for a large menu-driven application to
-   ensure the previous OPEN state, GT.M always sets unspecified sequential
-   file characteristics to their default value on OPEN. This approach also
-   reduces potential memory overhead imposed by  OPENing  and  CLOSEing  a
-   large number of sequential files during the life of a process.
-
-   GT.M does not restrict multiple OPEN commands. However, if  a  file  is
-   already open, GT.M ignores attempts  to  modify  sequential  file  OPEN
-   characteristics, except for RECORDSIZE and  for  deviceparameters  that
-   also exist for USE.
-
-   Sequential files can be  READONLY,  or  read/write  (NOREADONLY).  Disk
-   files can also be  SHARED  or  exclusive.  A  file  OPENed  SHARED  can
-   accommodate a theoretically unlimited number of readers  and  a  single
-   writer. OPENing a file SHARED  complicates  access  to  the  file,  and
-   therefore significantly reduces the performance of I/O to that file.
-
-   Sequential files can be composed of either FIXED or VARIABLE (NOFIXED)
-   length records. By default, records have VARIABLE length.  A  BLOCKSIZE
-   for VARIABLE length records must specify at least four bytes more than
-   the maximum record length. In order to use FIXED  length  records,  the
-   command must explicitly include the FIXED deviceparameter. Changing the
-   RECORDSIZE for FIXED length record files produces subsequent errors on
-   READ or WRITE.
-
-   VMS enforces its standard security when GT.M OPENs a Files-11 RMS file.
-   This includes any directory access required to  locate  or  create  the
-   file. If you are unable to OPEN a file, contact your system manager.
-
-3 Logi_Rec_for_SeqFiles
-   Logical Records for Sequential Files
-
-   GT.M views a record in a  sequential  file  in  the  same  way  as  the
-   operating system does. The RECORDSIZE deviceparameter sets the maximum
-   size of the record,  while  the  FIXED  and  VARIABLE  deviceparameters
-   specify the format of the record in the file.
-
-3 SeqFile_Pointers
-   Sequential File Pointers
-
-   Sequential file (RMS) I/O operations use  a  construct  called  a  file
-   pointer. The file pointer logically identifies the next record to read
-   or write. OPEN commands position the file pointer at the  beginning  of
-   the file  (REWIND)  or  at  the  end-of-file  (APPEND).  APPEND  cannot
-   reposition a file currently open. Because the position of  each  record
-   depends on the  previous  record,  a  WRITE  destroys  the  ability  to
-   reliably position the file pointer to subsequent  records  in  a  file.
-   Therefore, by default (NOTRUNCATE), GT.M permits WRITEs only  when  the
-   file pointer is positioned at the end of the file.
-
-   If a device has TRUNCATE enabled, a WRITE issued when the file pointer
-   is not at the end of the file causes all  contents  after  the  current
-   file pointer to be discarded. This effectively moves  the  end  of  the
-   file to the current position and permits the WRITE.
-
-3 SPOOL_SUBMIT_for_SeqFile
-   SPOOL or SUBMIT for Sequential Files
-
-   CLOSE  may  send  sequential  files  to  the  VMS  queue  manager  for
-   processing. The CLOSE command provides deviceparameters that SPOOL the
-   file for printing on a printer or terminal, or SUBMIT the file to batch
-   for execution. Many of the CLOSE deviceparameters for sequential files
-   control queue  behavior  for  either  SPOOL  or  SUBMIT  or  both,  and
-   therefore must be used with SPOOL and/or SUBMIT to have any effect.
-
-3 SeqFile_Examples
-   Sequential File Examples
-
-   This section contains a few brief  examples  of  GT.M  sequential  file
-   handling.
-
-   Example:
-
-   READ "File > ",sd
-
-   OPEN sd:(readonly:exception="G BADOPEN")
-
-   USE sd:exception="G EOF"
-
-   FOR USE sd READ x USE $PRINCIPAL WRITE x,!
-
-   EOf IF '$ZEOF ZM +$ZS
-
-   CLOSE sd
-
-   QUIT
-
-   BADOPEN IF $ZS["-FNF," DO QUIT
-
-   . WRITE !,"The file ",sd," does not exist."
-
-   IF $ZS["-PRV," DO QUIT
-
-   . WRITE !,"The file ",sd," is not accessible."
-
-   ZM +$ZS
-
-   QUIT
-
-   This example OPENs a file READONLY  and  specifies  an  EXCEPTION.  The
-   exception  handler  for  the  OPEN  deals  with  file-not-found  and
-   file-access errors, and reissues all other  errors  with  the  ZMESSAGE
-   command. The first USE sets the EXCEPTION to  handle  end-of-file.  The
-   FOR loop reads the file one record at a time and transfers each record
-   to the principal device. The GOTO in the EXCEPTION terminates  the  FOR
-   loop. At label EOF, if $ZEOF is false, the code reissues the error that
-   triggered the exception. Otherwise, the CLOSE releases the file.
-
-   Example:
-
-   SET sd="temp.dat",acct=""
-
-   OPEN sd:newversion U sd:width=132
-
-   FOR SET acct=$O(^ACCT(acct)) QUIT:acct="" DO
-
-   . SET rec=$$FORMAT(acct)
-
-   . WRITE:$Y>55 #,hdr W !,rec
-
-   CLOSE sd:(spool:delete)
-
-   This OPENs a NEWVERSION of file TEMP.DAT. The USE sets the  line  width
-   to 132 characters.  The  FOR  loop  cycles  through  the  ^ACCT  global
-   formatting (not shown in this code fragment) lines and writing them to
-   the file. The FOR loop uses the argumentless DO construct  to  break  a
-   long line of code for greater readability. The program writes a header
-   record (set up in initialization not,  shown  in  this  code  fragment)
-   every 55 lines, because that is the application page  length,  allowing
-   for top and bottom margins. Finally the CLOSE releases the file to the
-   VMS spooler for printing on the default print queue SYS$PRINT and also
-   for deletion when the printing finishes.
-
-2 Mailboxes
-   Using Mailboxes
-
-   A mailbox is a VMS facility that uses  shared  system  memory  to  pass
-   messages from one process to another. Because they use  shared  memory,
-   mailboxes can only be used for communication  between  process  on  the
-   same computer. They cannot be used to pass messages between machines in
-   a VMSCluster. A GT.M image can use mailboxes to  communicate  with  any
-   process on the  same  system,  including  non-GT.M  processes.  Mailbox
-   device names have the format MBA<number>:. VMS creates  mailboxes  with
-   associated logical names, which translates to  the  device  name.  When
-   GT.M creates a mailbox, it uses the device name argument  of  the  OPEN
-   command and creates a logical  name  that  translates  to  the  mailbox
-   specification. Because of VMS conventions, logical names for mailboxes
-   are not case sensitive and cannot have a leading undescore(_).
-
-        If the OPEN specifies a device name in the form  MBA<number>:,  and
-        the mailbox does not exist, OPEN creates a new mailbox and uses the
-        OPEN argument to create a  logical  name  translating  to  the  new
-        mailbox.
-
-   VMS provides permanent and temporary mailboxes, requiring respectively
-   the PRMMBX and TMPMBX priviliges for  creation.  Because,  by  default,
-   permanent mailbox names are  translated  in  the  SYSTEM  logical  name
-   table, their creation also nornamlly requires the SYSNAM privilege. To
-   allow the  possibility  of  using  temporary  mailboxes  for  inter-job
-   communication, GT.M uses the GROUP  logical  name  table  to  translate
-   temporary mailbox names, and so requires the GRPNAM privilege to create
-   temporary mailboxes.
-
-   Accessing an existing mailbox does not require any VMS privileges. The
-   system manager typically creates permanent mailboxes, usually at system
-   startup. Therefore, permanent mailboxes serve to limit  the  number  of
-   accounts  requiring  VMS  privileges.  The  last  process  to  CLOSE  a
-   temporary mailbox deletes  it.  Using  temporary  mailboxes  for  short
-   infrequent communications tends to conserve system memory. Because VMS
-   uses  temporary  mailboxes  primarily  for  communication  between
-   subprocesses of a single job, VMS uses the JOB table as the VMS default
-   lofical name table for translating mailbox names.
-
-   GT.M ignores all deviceparameters on an  OPEN  command  issued  for  an
-   already open mailbox.
-
-3 Logi_Rec_for_Mailb
-   Logical Records for Mailboxes
-
-   GT.M does not buffer mailbox output into logical  records  but  instead
-   sends all characters directly to the mailbox. When a  process  attempts
-   to WRITE to a mailbox that does not have room to receive  the  message,
-   VMS places the process in  a  resource  wait  state.  A  process  in  a
-   resource wait state does not respond to <CTRL-C>. For such a process to
-   resume processing, another process must READ one or more messages from
-   the full mailbox.
-
-   Only GT.M format  control  characters  manipulate  the  virtual  cursor
-   position. Mailboxes do not recognize the WRAP deviceparameter, nor are
-   they subject to character filtering.  WRITE  increments  $X  for  every
-   character sent to a mailbox. READ* and fixed length READs increments $X
-   for every character read from a mailbox. A normal READ sets $X to zero
-   and increments $Y.
-
-   GT.M format  control  characters  send  ASCII  representations  of  the
-   function to the mailbox (for example W !  sends  the  ASCII  characters
-   <CR> <LF> to the mailbox).
-
-3 Mailb_Examples
-   Mailbox Examples
-
-   This section contains a few brief examples of GT.M mailbox handling.
-
-   Example:
-
-   SET mb="FASTREPORT" O mb:PRMMBX u mb
-
-   FOR READ msg QUIT:msg="$STOP$" DO print(msg)
-
-   QUIT
-
-   This OPENs "FASTREPORT" as a permanent  mailbox.  "FASTREPORT"  is  the
-   logical name that translates to the  mailbox  specification.  Generally
-   the system manager  creates  permanent  mailboxes  as  part  of  system
-   start-up. If this is not the case,  the  process  running  our  example
-   requires PRMMBX and SYSNAM privileges.
-
-   Example:
-
-   SET mb="SYNC" OPEN mb:(TMPMBX:WRITEONLY) USE mb:WAIT
-
-   SET x="" WRITE "$START$",$J
-
-   FOR SET x=$O(^tmp($J,x)) q:x="" WRITE ^(x)
-
-   WRITE "$END$"
-
-   CLOSE mb
-
-   This OPENs "SYNC" as a temporary mailbox  for  synchronous  writes.  If
-   "SYNC" does not exist as a temporary mailbox in the GROUP logical name
-   table of our process, GT.M creates a mailbox and places "SYNC"  in  the
-   GROUP table. Creating "SYNC" requires TMPMBX and GRPNAM privileges. The
-   process executing the example waits for another process to read each of
-   its writes. If no other process reads from  the  mailbox,  the  process
-   hangs indefinitely.
-
-2 NULL_Devices
-   Using NULL Devices
-
-   In VMS, null  devices  have  the  names  "NL:",  "_NL:",  "NLA0:",  and
-   "_NLA0:". A null device fulfills every input  request  by  returning  a
-   null string and setting $ZEOF. A null device discards all output. GT.M
-   maintains a virtual cursor position for null devices  as  it  does  for
-   terminals. Use null devices for program testing and debugging,  or  for
-   jobs that permit I/O to be discarded under certain  circumstances.  For
-   example, JOB processes must have input and  output  devices  associated
-   with them, even though they do not  use  them.  Null  devices  are  low
-   overhead never-fail alternatives.
-
-3 Null_Dev_Ex
-   Null Device Examples
-
-   Example:
-
-   SET dev="nl:"
-
-   OPEN dev USE dev
-
-   SET x="" WRITE hdr,!,$ZDATE($h),?30,$J,!
-
-   FOR SET x=$O(^tmp($J,x)) q:x="" DO REPORT
-
-   CLOSE dev
-
-   This program produces a report derived  from  the  information  in  the
-   global variable ^tmp. The unspecified routine  REPORT  may  potentially
-   contain a large amount of code. To see that the basic program functions
-   without error, the programmer may wish to  simply  discard  the  output
-   involved in  favor  of  watching  the  function.  To  run  the  program
-   normally, the programmer simply has to change the variable dev to name
-   another device.
-
-   Example:
-
-   JOB ^X:(INPUT="NL:":OUTPUT="NL:"ERROR="ERROR.LOG"
-
-   This issues an M JOB command to  execute  the  routine  ^X  in  another
-   process. This  routine  simply  processes  a  large  number  of  global
-   variables and produces no output. In the example,  the  JOBbed  process
-   takes its INPUT from a null device (it  shouldn't  ask  for  any),  and
-   sends its OUTPUT to a null device (it shouldn't produce  any).  If  the
-   JOBbed process encounters an error, it directs  the  error  message  to
-   ERROR.LOG.
-
-2 Socket_Devices
-   Using Socket Devices
-
-   SOCKET devices are used to access  and  manipulate  sockets.  A  SOCKET
-   device can have from zero (0) to 64 associated sockets.  At  any  time,
-   only one socket from the collection can be the current socket. If there
-   is no current socket, an attempt to READ from, or WRITE to the device,
-   generates an error.
-
-   Sockets can be attached and detached from  the  collection  of  sockets
-   associated with a device. Detached sockets belong  to  a  pseudo-device
-   called the "socketpool". A process can detach a socket  from  a  device
-   and later attach it to the same device or another device.
-
-        The GT.M socket device interface does not have the ability to pass
-        sockets between related or  unrelated  processes.  Currently  error
-        trapping operates on a device, rather than on a socket.
-
-3 Msg_Mgmt
-   Message Management
-
-   From an application perspective, the transport layers used by a socket
-   device are stream-oriented  media,  with  no  provisions  for  implicit
-   application messages. Therefore, the following are two common protocols
-   used to segment application messages.
-
-   o    One method is to use  a,  typically  small,  fixed  length  message
-        containing the length of the next,  variable  length,  message.  In
-        GT.M a simplistic writer might be:
-
-   Write $Justify($Length(x),4),x
-
-   A corresponding simplistic reader might be:
-
-   Read len#4,x#len
-
-   The advantage of this approach is that the message content  (the  value
-   of x in the code  fragments  above)  can  contain  any  character.  The
-   disadvantage  is  that  detecting  that  the  protocol  has  become
-   desynchronized is a problem.
-   o    The other common method  is  to  place  a  delimiter  between  each
-        application message. The protocol breaks if a message ever includes
-        a delimiter as part of its content.
-
-   The SOCKET device has  the  capability  to  handle  delimiters  because
-   parsing messages for delimiters is cumbersome.
-
-3 Msg_Delimi
-   Message Delimiters
-
-   Each device can have from zero (0) to 64 delimiters associated with it.
-   Each delimiter can be from one (1) to 64 characters. All the delimiters
-   declared for a device are  valid  for  any  READ  from  any  associated
-   socket, which means, any of the defined delimiters terminate the READ.
-   The actual terminating delimiter is available in $KEY.  A  WRITE  to  a
-   socket associated with a device with one or more delimiters inserts the
-   first of the delimiters for any WRITE ! format.
-
-3 Read_Comm
-   READ Command
-
-   The READ  command  may  be  used  to  obtain  data  from  a  socket.  A
-   non-fixed-length read, with no timeout and  no  delimiters  requires  a
-   complex implementation of sequence of READs  to  ensure  a  predictable
-   result. This is because the transport layer stream fragments delivered
-   to the reader has only accidental correspondence  with  the  operations
-   performed by the writer. For example, the following
-
-   Write "Message 1","Message 2"
-
-   is presented to the reader as the stream "Message1Message2" but it can
-   take from one (1) to 18 READ commands to retrieve the entire stream.
-
-3 Write_Comm
-   WRITE Command
-
-   The WRITE command sends data to a socket.
-
-   The WRITE command for SOCKET devices accepts following controlmnemonics
-   on a bound socket:
-
-
-   /L[ISTEN][(numexpr)]
-
-   Where numexpr is in the range 1-5 and specifies the listen queue depth.
-
-
-   /W[AIT][(timeout)]
-
-   Where timeout is a "numexpr" that specifies how long a server waits for
-   a connect before returning control to the GT.M routine.
-
-   "WRITE !" inserts the character(s) of the first I/O delimiter (if any)
-   to the sending  buffer.  If  "ZFF=expr"  has  been  used  to  define  a
-   delimiter,  "WRITE  #"  inserts  the  characters  of  that  delimiter.
-   Otherwise WRITE # has no effect on the  stream  content.  WRITE  !  and
-   WRITE # always maintain $X and $Y in a fashion that emulates a terminal
-   cursor position.
-
-3 Socket_Devi_Ops
-   Socket Device Operation
-
-   Each socket may be in one of the following states:
-
-   o    Created - indicates that the socket exists.
-
-   o    Bound - indicates that the socket exists and is bound to a port; a
-        "Bound socket" needs a listen  queue  which  currently  requires  a
-        WRITE /LISTEN [after a USE].
-
-   o    Connected - indicates that the socket exists and has a connection.
-
-   A server socket used for accepting new  connections  goes  through  the
-   first two states in one step with a single OPEN or in two steps with an
-   OPEN and a USE. When a server does a WRITE /WAIT on a Bound  socket,  a
-   client can establish a connection which Creates another  server  socket
-   that is Connected. In server operation, $KEY supplies  the  port  value
-   when a socket is bound (important when port 0 is specified to  get  the
-   system to choose the port), and a socket id when a Connected socket is
-   created. A client socket goes through the first and third states with a
-   single OPEN or in two steps with an OPEN and a USE.
-
-3 Socket_Devi_Ex
-   Socket Device Examples
-
-   This section contains examples on Socket Device usage.
-
-
-   ;server.m
-
-   Set portno=6321,delim=$c(13)
-
-   Set tcpdev="server$"_$j,timeout=30
-
-   Open tcpdev:(ZLISTEN=portno_":TCP":attach="server"):timeout:"SOCKET"
-
-   Use tcpdev
-
-   Write /listen(1)
-
-   Write /wait(timeout)
-
-   ;
-   ;dialogue with the client
-
-   ;
-   ;client.m
-
-   Set host="orlando"
-   Set portno=6321
-   Set delim=$c(13)
-   Set tcpdev="client$"_$j,timeout=30
-   O
-   tcpdev:(connect=host_":"_portno_":TCP":attach="client"):timeout:"SOCKET"
-   Use tcpdev
-   ;
-   ;dialogue with the server
-
-   ;
-2 IO_Comm
-   I/O Commands
-
-   This section describes the following GT.M I/O commands:
-
-   o    OPEN establishes a connection from a GT.M process to a device.
-
-   o    USE  declares  a  device  as  the  current  source  of  input  and
-        destination for output.
-
-   o    READ accepts characters from the current device into  a  global  or
-        local variable.
-
-   o    WRITE sends characters to the current device.
-
-   o    CLOSE breaks the connection between a GT.M process and a device.
-
-2 Open
-   Open
-
-   The OPEN command establishes a connection from  a  GT.M  process  to  a
-   device.
-
-   The format of the OPEN command is:
-
-   O[PEN][:tvexpr] expr[:[(keyword[=expr][:...])][:numexpr][:expr]][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies the device to OPEN.
-
-   o    The optional keywords specify deviceparameters that control device
-        behavior; some deviceparameters  take  arguments  delimited  by  an
-        equal sign (=); if the argument only contains one deviceparameter,
-        the surrounding parentheses are optional.
-
-   o    The optional numeric expression specifies a time in  seconds  after
-        which the command should timeout  if  unsuccessful;  0  provides  a
-        single attempt to open the device.
-
-   o    When  an  OPEN  command  specifying  a  timeout  contains  no
-        deviceparameters, double colons (::) separate the  timeout  numeric
-        expression from the device expression.
-
-   o    The optional expression specifies a mnemonicspace  that  selects  a
-        device binding. The only mnemonicspace that GT.M currently accepts
-        is SOCKET.
-
-   o    When an OPEN command specifies a  mnemonicspace  with  no  timeout,
-        double colons separate the mnemonicspace string expression from the
-        deviceparameters;  if  there  are  neither  a  timeout  nor
-        deviceparameters, triple colons separate the mnemonicspace from the
-        device expression.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more OPEN arguments form a legal argument for an OPEN.
-
-   With the exception of mailboxes, spooled devices and SHARED sequential
-   disk files, VMS device access is exclusive.  READONLY  sequential  disk
-   files may be shared among many readers, but no writers. Spooled devices
-   are devices,  usually  printers,  which  buffer  output  from  multiple
-   sources, processing it after  the  writing  process  CLOSEs  the  file.
-   Spooled devices appear to GT.M as a  terminal  type  device.  For  more
-   information on spooled devices, refer to the OpenVMS System Manager’s
-   Manual. When one process successfully OPENs a  device  exclusively,  no
-   other process can access that device until  the  first  process  CLOSEs
-   that device.
-
-   By default, when  a  device  is  unavailable,  GT.M  retries  the  OPEN
-   indefinitely  at  approximately  one  second  intervals.  A  device  is
-   unavailable when another process is using it exclusively, or  when  the
-   OPENing process does not have the resources left to open the device.
-
-   All other errors on OPEN raise an error condition and interrupt program
-   flow. A timeout is a tool that  lets  a  GT.M  routine  regain  program
-   control when a device remains unavailable. When the  OPEN  specifies  a
-   timeout, GT.M keeps retrying until either  the  OPEN  succeeds  or  the
-   timeout expires.
-
-   If OPEN establishes a connection  with  a  device  before  the  timeout
-   expires, GT.M sets $TEST to TRUE (1). If the timeout expires, GT.M sets
-   $TEST to FALSE (0). If an OPEN command does not specify a timeout, the
-   execution of the command does not affect $TEST.
-
-   If a process has not previously OPENed a device within the  context  of
-   an image, any deviceparameters not supplied  on  the  OPEN  take  their
-   default values. When reOPENing a device that it  previously  closed,  a
-   GT.M process restores all characteristics not specified on the OPEN to
-   the values the  device  had  when  it  was  last  CLOSEd,  except  with
-   sequential disk files. If you have a menu-driven application that OPENs
-   and CLOSEs devices based on user selections, take care that every OPEN
-   explicitly includes all deviceparameters important to the application.
-
-   GT.M treats sequential disk files differently  and  uses  defaults  for
-   unspecified sequential disk file characteristics on every  OPEN  (i.e.,
-   GT.M does not retain sequential disk file characteristics on a CLOSE).
-
-   VMS does not permit the alteration of certain characteristics once the
-   device or file has been OPENed. If a  process  OPENs  an  already  OPEN
-   device, GT.M modifies any characteristics that accept  changes  when  a
-   device is OPEN to reflect any new deviceparameter specifications.
-
-3 Ex_of_Open
-   Examples of OPEN
-
-   Example:
-
-   SET sd="report.dat" OPEN sd:NEWVERSION
-
-   This OPENs a NEWVERSION of a sequential disk  file  named  "report.dat"
-   for both read and write access. The process  has  sole  access  to  the
-   file.
-
-   SET mb="sync1" OPEN mb:(PRMMBX:WRITEONLY)
-
-   This OPENs a permanent mailbox restricted to writing.
-
-3 Open_DeviParam
-   OPEN Deviceparameters
-
-4 ALLOCATION
-   ALLOCATION=intexpr Applies to: Sequential Files
-
-   Specifies the initial  size  of  the  file  in  RMS  512  byte  blocks.
-   ALLOCATION  accepts  an  integer  argument  in  the  range  of  0  to
-   4,294,967,295. An argument of zero (0) does not allocate any space for
-   the file at file creation. When a WRITE requires space in a  file  that
-   is full, RMS extends the file by the amount specified in the EXTENSION
-   deviceparameter.
-
-   By default, new files have an ALLOCATION of zero (0).
-
-4 APPEND
-   APPEND Applies to: Sequential Files
-
-   Positions the file pointer at  the  end-of-file.  This  deviceparameter
-   only affects the device  on  the  first  OPEN  command.  Re-OPENing  an
-   already OPEN device with this deviceparameter has no effect.
-
-   By default, OPEN sets the file pointer to the beginning-of-file.
-
-4 ATTACH
-   Attach=expr Applies to: Socket Device
-
-   When ATTACH is used and one of ZLISTEN and CONNECT is specified at the
-   same time, the value of  expr  becomes  the  identifier  of  the  newly
-   created socket. If neither ZLISTEN nor CONNECT is specified, ATTACH is
-   ignored.
-
-4 BLOCKSIZE
-   BLOCKSIZE=intexpr Applies to: Terminals and Printers and VMS Mailboxes
-
-   Specifies the size in bytes of the maximum single read or write for the
-   specified device.
-
-4 CONNECT
-   CONNECT=expr Applies to: Socket Device
-
-   Enables a client connection with a server,  which  is  located  by  the
-   information provided by expr. A new socket is allocated for the client
-   connection and is made the  current  socket  for  the  device,  if  the
-   operation is successful.
-
-   expr  specifies  the  protocol  and  protocol  specific  information.
-   Currently, TCP/IP is the only protocol GT.M supports. expr should be of
-   the format "<host>:<port>:TCP", where host is either an IP address or a
-   hostname like server.sanchez.com.
-
-        CONNECT is not compatible with ZLISTEN.
-
-4 CONTIGUOUS
-   CONTIGUOUS Applies to: Sequential Files
-
-   Specifies that RMS must allocate physically contiguous (adjacent) disk
-   space for a new file. If the disk cannot supply the required amount of
-   contiguous space, the OPEN fails.
-
-   By  default,  RMS  the  operating  system  uses  a  contiguous-best-try
-   algorithm. The algorithm uses contiguous space if available; otherwise,
-   it pieces the file together out of the largest available extents.
-
-4 DELIMITER
-   [NO]DELIMITER=expr Applies to: Socket Device
-
-   DELIMITER establishes or replaces the list of delimiters  used  by  the
-   sockets associated with the device. The default for on a  command  that
-   first  OPENs  a  device  is  NODELIMITER.  The  delimiter  list  on  a
-   preexisting device remains the same until it is explicitly replaced or
-   deleted.
-
-   expr must be a string of the following format:
-
-   ':'  is  used  to  separate  delimiters  (it  is  the  delimiter  for
-   delimiters).
-
-   '/' serves as an escape character.
-
-   expr "ab:/:://:bc" is interpreted as four delimiters, which  are  "ab",
-   ":", "/", and "bc". One  socket  can  have  0-64  delimiters  and  each
-   delimiter can contain 1-64 characters.
-
-4 EXCEPTION
-   EXCEPTION=expr Applies to: All devices
-
-   Defines an error handler for an I/O device. The expression must contain
-   a fragment of GT.M code (for example, GOTO ERRFILE) that  GT.M  XECUTEs
-   when the driver for the device detects an  error,  or  an  entryref  to
-   which  GT.M  transfers  control,  as  appropriate  for  the  current
-   gtm_ztrap_form.
-
-   For more information on error handling, refer to the "Error Processing"
-   chapter in GT.M Programmer's Guide.
-
-4 EXTENSION
-   EXTENSION=intexpr Applies to: Sequential Files
-
-   Specifies the number of 512 byte blocks for RMS to extend the file when
-   the original ALLOCATION is exhausted. If integer expression equals zero
-   (0), the default  for  the  disk  volume,  which  is  generally  small,
-   determines the extension size.
-
-   By default, RMS uses an EXTENSION of zero (0).
-
-4 FIXED
-   [NO]FIXED Applies to: Sequential Files
-
-   Selects a fixed record length format for sequential disk  files.  FIXED
-   does not specify the actual length  of  a  record.  Use  RECORDSIZE  to
-   specify the record length.
-
-   NOFIXED specifies a variable length record format for  sequential  disk
-   files. NOFIXED is a synonym for VARIABLE. FIXED  is  incompatible  with
-   VARIABLE.
-
-   By default, records have VARIABLE length.
-
-4 GROUP
-   GROUP=expr Applies to: Sequential Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on an OPEN of a new file, any
-   user category (OWNER, SYSTEM, WORLD) that is not  explicitly  specified
-   is given the default mask.  When  any  one  of  these  deviceparameters
-   appears on an OPEN of an existing device, any user category that is not
-   explicitly specified remains unchanged.
-
-   In order to modify file security, the user who  issues  the  OPEN  must
-   have control access.
-
-   By default, OPEN does not modify the UIC-based security on an existing
-   file. Unless otherwise specified, when OPEN  creates  a  new  file,  it
-   establishes security using standard defaulting rules.
-
-4 IOERROR
-   IOERROR=expr Applies to: Socket Device
-
-   Enables exception handling in socket devices. expr  specifies  the  I/O
-   error trapping mode. A value equal to "TRAP" specifies that I/O errors
-   on a device raise error conditions. A value equal to "NOTRAP", or when
-   IOERROR is not specified, indicates that I/O error on a device does not
-   raise error conditions.
-
-        GT.M currently handles exception handling at device  level  instead
-        of socket level.
-
-4 NEWVERSION
-   NEWVERSION Applies to: Sequential Files
-
-   The NEWVERSION deviceparameter creates a new version of the file.
-
-   By default, if any version  of  the  file  exists,  OPEN  accesses  the
-   current version. Otherwise, if no version  of  the  file  exists,  OPEN
-   without READONLY creates a new file.
-
-4 OWNER
-   OWNER=expr Applies to: Sequential Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on an OPEN of a new file, any
-   user category that is not explicitly specified  is  given  the  default
-   mask. When any one of these deviceparameters appears on an OPEN  of  an
-   existing file, any user category (GROUP, SYSTEM,  WORLD)  that  is  not
-   explicitly specified remains unchanged.
-
-   To modify file security, the user who issues the OPEN must have control
-   access.
-
-   By default, OPEN does not modify the UIC-based security on an existing
-   file. Unless  otherwise  specified,  OPEN  establishes  security  using
-   standard defaulting rules when it creates a new file.
-
-4 PRMMBX
-   PRMMBX Applies to: VMS Mailboxes
-
-   Specifies that the argument of the OPEN is a permanent mailbox name. If
-   the mailbox does not exist and the  process  has  adequate  privileges,
-   GT.M creates the mailbox. If the mailbox does not exist and the process
-   does not have adequate privileges, the  process  generates  a  run-time
-   error. A process does not require any privileges to  OPEN  an  existing
-   mailbox. See the Using  Mailboxes  section  for  a  discussion  of  the
-   required privileges.
-
-   By default, OPEN translates its device argument as a logical  name  and
-   uses the result as the  actual  device/file-specification.  This  means
-   that if the result is not an existing device or file, OPEN attempts to
-   create an RMS sequential disk file with that name.
-
-4 READONLY
-   [NO]READONLY Applies to: Sequential Files and VMS Mailboxes
-
-   OPENs a device for reading  only  (READONLY)  or  reading  and  writing
-   (NOREADONLY).
-
-   To open a sequential file using the READONLY parameter, the  file  must
-   exist on the disk. If it does not, GT.M issues a run-time error.
-
-   When GT.M encounters a WRITE directed  to  a  file  or  mailbox  OPENed
-   READONLY, GT.M issues a run-time error.
-
-   By default, OPEN accesses the device or file NOREADONLY (read-write).
-
-4 RECORDSIZE
-   RECORDSIZE=intexpr Applies to: Sequential Files
-
-   Overrides the default record size for a  disk  and  specifies  the  new
-   maximum record size in bytes.
-
-   For mailboxes, BLOCKSIZE controls both block-size and record-size, and
-   RECORDSIZE is ignored.
-
-4 REWIND
-   REWIND Applies to: Sequential Files
-
-   REWIND positions the file pointer of a sequential  disk  to  the  first
-   record.
-
-   By default, OPEN does not REWIND.
-
-4 SHARED
-   SHARED Applies to: Sequential Files
-
-   Allows more than one user to access the same disk file. A  file  OPENed
-   SHARED can accommodate a theoretically unlimited number of readers and
-   a single writer. Any attempt to OPEN a file that  is  already  OPEN  by
-   another process causes a run-time error unless all processes  OPEN  the
-   file SHARED or READONLY. OPENing a file SHARED prevents RMS from using
-   most  of  its  algorithms  for  optimizing  access  and  therefore
-   significantly reduces the performance of I/O to that file.
-
-   By default, OPEN accesses the file or device exclusively (not SHARED).
-
-4 SYSTEM
-   SYSTEM=expr Applies to: Sequential Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on an OPEN of a new file, any
-   user category that is not explicitly specified  is  given  the  default
-   mask. When any one of these deviceparameters appears on an OPEN  of  an
-   existing file, any user category (OWNER, GROUP,  WORLD),  that  is  not
-   explicitly specified remains unchanged.
-
-   In order to modify file security, the user who issues the OPEN or CLOSE
-   must have control access ownership.
-
-   By default, OPEN does not modify the UIC-based security permissions on
-   an existing file. Unless otherwise specified, when OPEN creates  a  new
-   file, it establishes security using standard defaulting rules.
-
-4 TMPMBX
-   TMPMBX Applies to: VMS Mailboxes
-
-   Specifies that the argument of the OPEN is a temporary mailbox name. If
-   the mailbox does not exist, and the process  has  adequate  privileges,
-   GT.M creates the mailbox. If the mailbox does not exist and the process
-   does not have adequate privileges, the  process  generates  a  run-time
-   error. A process does not require any privileges to  OPEN  an  existing
-   mailbox. See the Using  Mailboxes  section  for  a  discussion  of  the
-   required privileges.
-
-   By default, OPEN translates its device argument as a logical  name  and
-   uses the result as the  actual  device/file-specification.  This  means
-   that if the result is not an existing device or file, OPEN attempts to
-   create an RMS sequential disk file with that name.
-
-4 TRUNCATE
-   [NO]TRUNCATE Applies to: Sequential Files
-
-   Enables or disables overwriting of existing data in Files-11 RMS files.
-   Because the position of each record depends  on  the  prior  record,  a
-   WRITE destroys the ability to position reliably to  subsequent  records
-   in a file. Therefore, by default (NOTRUNCATE), GT.M permits WRITEs only
-   when the file pointer is positioned at the end-of-file. When  a  device
-   has TRUNCATE enabled, a WRITE issued when the file pointer  is  not  at
-   end-of-file truncates the file by destroying all  data  from  the  file
-   pointer to the end-of-file.
-
-   By default, OPEN accesses the file NOTRUNCATE,  which  does  not  allow
-   overwriting of Files-11 RMS files.
-
-4 VARIABLE
-   VARIABLE Applies to: Sequential Files
-
-   Specifies the VARIABLE record length format for sequential disk files.
-
-   VARIABLE is a synonym for NOFIXED.  VARIABLE  length  records  on  disk
-   start with two bytes of overhead for the device driver  that  hold  the
-   actual record-length represented as a two's complement  binary  number.
-   VARIABLE length tape records start with four  bytes  of  overhead,  and
-   represent the length as ASCII digits. A BLOCKSIZE for  VARIABLE  length
-   tape records must specify at least four bytes  more  than  the  maximum
-   record length. VARIABLE is incompatible with FIXED.
-
-   By default, records have VARIABLE length.
-
-4 WORLD
-   WORLD=expr Applies to: Sequential Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on an OPEN of a new file, any
-   user category that is not explicitly specified  is  given  the  default
-   mask. When any one of these deviceparameters appears on an OPEN  of  an
-   existing file, any user category (OWNER, GROUP, SYSTEM),  that  is  not
-   explicitly specified remains unchanged.
-
-   To modify file security, the user who issues the OPEN must have control
-   access.
-
-   By default, OPEN and CLOSE do not modify the UIC-based security  on  an
-   existing file. Unless otherwise specified,  when  OPEN  creates  a  new
-   file, it establishes security using standard defaulting rules.
-
-4 WRAP
-   [Z][NO]WRAP Applies to: NULL Devices, Sequential  Devices,  and  Socket
-   Device
-
-   Enables or disables automatic  record  termination.  When  the  current
-   record size ($X) reaches the maximum WIDTH  and  the  device  has  WRAP
-   enabled, GT.M starts a new record, as if the routine had issued a WRITE
-   ! command.
-
-   NOWRAP causes GT.M to require a WRITE ! to terminate the record. NOWRAP
-   allows $X to become greater than the device  WIDTH  for  terminals  and
-   null devices. Sequential files  discard  any  portion  of  the  current
-   output record over the device width
-
-   By default, records WRAP.
-
-4 WRITEONLY
-   [NO]WRITEONLY Applies to: VMS Mailboxes
-
-   OPENs a mailbox for writing only (WRITEONLY)  or  reading  and  writing
-   (NOWRITEONLY).
-
-   By default, OPEN creates new mailboxes NOWRITEONLY (read-write).
-
-4 ZBFSIZE
-   ZBFSIZE Applies to: Socket Devices
-
-   Allocates a buffer used by GT.M when reading from a socket. The ZBFSIZE
-   deviceparameter should be at  least  as  big  as  the  largest  message
-   expected.
-
-   By default, the size of ZBFSIZE is 1024 and the maximum it  can  be  is
-   1048576.
-
-4 ZDELAY
-   Z[NO]DELAY Applies to: Socket Devices
-
-   Controls buffering of data packets by the system TCP  stack  using  the
-   TCP_NODELAY option to the SETSOCKOPT  system  call.  This  behavior  is
-   sometimes known as the Nagle algorithm. The  default  is  ZDELAY.  This
-   delays sending additional packets until either  an  acknowledgement  of
-   previous packets is received or an interval passes. If several packets
-   are sent from one end of a connection before the  other  end  responds,
-   setting ZNODELAY may be desirable though  at  the  cost  of  additional
-   packets being transmitted over the  network.  ZNODELAY  must  be  fully
-   spelled out.
-
-4 ZFF
-   Z[NO]FF=expr Applies to: Socket Device
-
-   expr specifies a string of characters, typically in $CHAR()  format  to
-   send to socket device, whenever a routine issues a  WRITE  #.  When  no
-   string is specified or when ZFF="", then no characters  are  sent.  The
-   default in GT.M is ZNOFF.
-
-4 ZIBFSIZE
-   ZIBFSIZE Applies to: Socket Device
-
-   Sets  the  buffer  size  used  by  the  network  software  (setsockopt
-   SO_RCVBUF).
-
-   The default and the maximum values depend on the platform and/or system
-   parameters.
-
-4 ZLISTEN
-   ZLISTEN=expr Applies to: Socket Device
-
-   A new socket is allocated to listen for a connection. It  is  made  the
-   current socket for the device, if the  operation  is  successful.  Upon
-   successful completion, $KEY is set to the format of
-   "BOUND|<socket handle>|<port number>"
-
-   otherwise, $KEY is assigned the empty string.
-
-   expr  specifies  the  protocol  and  protocol  specific  information.
-   Currently, TCP/IP is the only protocol GT.M supports. expr must  be  of
-   the format "<port>:TCP", where port specifies the port number at which
-   the socket is waiting for a connection.
-
-        ZLISTEN is not compatible  with  ATTACH  in  the  USE  command  and
-        CONNECT in both USE and OPEN commands.
-
-2 Use
-   Use Command
-
-   The USE command selects the current device for READs (input) and WRITEs
-   (output).
-
-   The format of the USE command is:
-
-   U[SE][:tvexpr] expr[:(keyword[=expr][:...])][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies the device to  make  the  current
-        device.
-
-   o    A USE that selects a device not currently  OPENed  by  the  process
-        causes a run-time error.
-
-   o    The optional keywords specify deviceparameters that control device
-        behavior; some deviceparameters  take  arguments  delimited  by  an
-        equal  sign  (=).  If  there  is  only  one  deviceparameter,  the
-        surrounding parentheses are optional.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more USE arguments form a legal argument for a USE.
-
-   The intrinsic special variable $IO identifies the  current  device,  so
-   GT.M directs all READs and WRITEs to $IO. When  a  GT.M  image  starts,
-   $PRINCIPAL is implicitly OPENed and USEd. Once the GT.M  image  USEs  a
-   device, $IO holds the name of that device until the next USE command.
-
-   A  USE  command  modifies  the  device  in  accordance  with  the
-   deviceparameters that apply to the device type and ignores  those  that
-   do not apply. Characteristics set  with  USE  deviceparameters  persist
-   until  another  USE  for  the  same  device  with  the  corresponding
-   deviceparameter. Characteristics persist through USEs of other devices
-   and, except for Files-11 RMS devices, through a  subsequent  CLOSE  and
-   re-OPEN.
-
-   Example:
-
-   USE $P:(X=0:Y=$Y-1:NOECHO)
-
-   This example USEs the principal device. If that device is  a  terminal,
-   the deviceparameters turn off echo  and  position  the  cursor  to  the
-   beginning of the previous line.
-
-3 Use_DeviParam
-   Use Deviceparameters
-
-4 ATTACH
-   ATTACH=expr Applies to: Socket Device
-
-   When ATTACH is used and one of ZLISTEN and CONNECT is specified at the
-   same time, the value of  expr  becomes  the  identifier  of  the  newly
-   created socket. If neither  ZLISTEN  nor  CONNECT  is  specified,  expr
-   specifies the socket to be moved from  the  socketpool  to  the  socket
-   device argument of USE.
-
-4 CENABLE
-   [NO]CENABLE Applies to: Terminals and Printers
-
-   Enables or disables the ability to  force  GT.M  into  Direct  Mode  by
-   entering <CTRL-C> at $PRINCIPAL.
-
-   [NO]CENABLE is subordinate to a CTRAP that includes <CTRL-C> ($C(3)).
-
-   By default, images have CENABLEd. Linking the image with a GTM$DEFAULTS
-   that has parameter GTM$CTRLC_ENABLE==0  changes  the  default  for  the
-   image.
-
-4 CLEARSCREEN
-   CLEARSCREEN Applies to: Terminals and Printers
-
-   Clears the terminal screen from the  present  cursor  position  to  the
-   bottom of the screen. The CLEARSCREEN deviceparameter does  not  change
-   the cursor position or the $X and $Y variables.
-
-   Example:
-
-   U $P:(X=0:Y=0:CLEAR)
-
-   This example positions the cursor to "home" in the upper left corner of
-   a VDT and clears the entire current screen "page."
-
-4 CONNECT
-   CONNECT=expr Applies to: Socket Device
-
-   Enables a client connection with a server,  which  is  located  by  the
-   information provided by expr. A new socket is allocated for the client
-   connection and is made the  current  socket  for  the  device,  if  the
-   operation is successful.
-
-   expr  specifies  the  protocol  and  protocol  specific  information.
-   Currently, TCP/IP is the only protocol GT.M supports. expr should be of
-   the format "<host>:<port>:TCP", where host is either an IP address or a
-   hostname like server.sanchez.com.
-
-        CONNECT is not compatible with ZLISTEN.
-
-4 CONVERT
-   [NO]CONVERT Applies to: Terminals and Printers
-
-   Enables  or  disables  the  terminal  device  driver  from  converting
-   lowercase input to uppercase during READs.
-
-   By default, the VMS terminal device driver operates NOCONVERT.
-
-4 CTRAP
-   CTRAP=expr Applies to: Terminals and Printers
-
-   Establishes the <CTRL> characters in the expression as trap characters
-   for the current device. When the terminal device driver receives a trap
-   character in the input from a device, GT.M issues a run-time exception.
-   The device does not have to be the current device, that is $IO.
-
-   The <CTRL> characters are ASCII 0 though 31.
-
-   For example, the command U $P:CTRAP=$C(26,30,7,19) sets a trap for the
-   ASCII characters <SUB>, <RS>, <BEL> and <DC3>.
-
-   Specifying CTRAP completely replaces the previous CTRAP  list.  Setting
-   CTRAP to the null string ("") disables character trapping.
-
-   A trap character  enabled  by  CTRAP  produces  one  of  the  following
-   actions:
-
-   o    If an EXCEPTION deviceparameter has been issued for the device, the
-        process executes the EXCEPTION argument.
-
-   o    Otherwise, if $ETRAP is not the empty string, execute $ETRAP.
-
-   o    Otherwise, if $ZTRAP is not the empty string, the process executes
-        $ZTRAP.
-
-   o    Otherwise, the GT.M image terminates.
-
-   For more information on error handling, refer to the "Error Processing"
-   chapter in GT.M Programmer's Guide.
-
-   When CTRAP includes <CTRL-C>,  [NO]CENABLE  has  no  effect.  CTRAPping
-   <CTRL-C> also takes precedence over CENABLE.
-
-4 DELIMITER
-   [NO]DELIMITER Applies to: Socket Device
-
-   DELIMITER establishes or replaces the list of delimiters  used  by  the
-   sockets associated with the device. The default when the socket device
-   is first OPENed is NODELIMITER. The delimiter  list  on  a  preexisting
-   device remains the same until it is explicitly replaced or deleted.
-
-   expr must be a string of the following format:
-
-   ':'  is  used  to  separate  delimiters  (it  is  the  delimiter  for
-   delimiters).
-
-   '/' serves as an escape character.
-
-   expr "ab:/:://:bc" is interpreted as four delimiters, which  are  "ab",
-   ":", "/", and "bc". One  socket  can  have  0-64  delimiters  and  each
-   delimiter can contain 1-64 characters.
-
-4 DETACH
-   DETACH=expr Applies to: Socket Device
-
-   Removes the socket identified by expr from the current  socket  device,
-   without affecting any existing connection of that socket.  The  removed
-   socket is placed in the socketpool  and  may  be  attached  to  another
-   socket device. If the socket being removed is the current socket, then
-   GT.M does the following:
-
-   o    The socket ATTACHed prior to the removed socket, is  made  current,
-        if one such exists.
-
-   o    The socket ATTACHed after the removed socket, is made  current,  if
-        the removed one was the first socket.
-
-   o    $PRINCIPAL is made the current device ($IO), if the removed socket
-        was the only one in the current socket device.
-
-4 DOWNSCROLL
-   DOWNSCROLL Applies to: Terminals and Printers
-
-   If $Y=0, DOWNSCROLL  does  nothing.  Otherwise,  DOWNSCROLL  moves  the
-   cursor up one line on the terminal screen and  decrements  $Y  by  one.
-   DOWNSCROLL does not change the column position  or  $X.  Some  terminal
-   hardware may not support DOWNSCROLL.
-
-4 ECHO
-   [NO]ECHO Applies to: Terminals and Printers
-
-   Enables or disables terminal device driver echo of input.
-
-   By default, VMS terminal device drivers ECHO.
-
-4 EDITING
-   [NO]EDITING Applies to: Terminals and Printers
-
-   Enables or disables the VMS terminal line editor. The VMS  line  editor
-   allows the use of the left and right  cursor  movement  keys,  function
-   keys 11 through 14 and certain  <CTRL>  characters,  in  modifying  the
-   current  input  line.  Note  that  this  is  analogous  to  the
-   /[NO]LINE_EDITING qualifier of the DCL SET TERMINAL  command,  not  the
-   /[NO]EDIT_MODE qualifier.
-
-   By default, the VMS terminal device driver supports EDITING.
-
-4 ERASELINE
-   ERASELINE Applies to: Terminals and Printers
-
-   Clears the current line from the physical cursor position to the end of
-   the line. ERASELINE does not affect the physical cursor position, or $X
-   and $Y.
-
-4 ESCAPE
-   [NO]ESCAPE Applies to: Terminals and Printers
-
-   Enables  or  disables  terminal  device  driver  processing  of  escape
-   sequences.
-
-   The following events result  when  a  terminal  has  ESCAPE  sequencing
-   enabled. When an <ESC> or <CSI> arrives  in  the  terminal  input,  the
-   device driver verifies the sequence that follows as a valid ANSI escape
-   sequence, terminates the READ, and  sets  $ZB  to  contain  the  entire
-   escape sequence. In this case, if the sequence starts  with  an  <ESC>,
-   READ * returns the decimal ASCII representation for  the  character  of
-   the escape introducer.
-
-   When escape processing is disabled, READ *x returns  27  in  x  for  an
-   <ESC>. If the escape introducer is also a TERMINATOR, $ZB has a string
-   of length one (1), and a value of the $ASCII()  representation  of  the
-   escape introducer; otherwise, $ZB holds the empty  string.  For  single
-   character and short fixed reads  with  NOESCAPE,  the  terminal  device
-   driver places the remaining characters of the escape  sequence  in  the
-   input buffer for subsequent READs, regardless of [NO]TYPEAHEAD."
-
-   Since  most  escape  sequences  have  special  VMS  interpretations,
-   particularly for VMS line editing, escape sequence processing does not
-   terminate READs, except for single character READs, unless the terminal
-   has NOEDITING or PASTHRU set to turn  off  VMS  interpretation  of  the
-   sequences.
-
-   By default, the VMS terminal device driver performs ESCAPE sequencing.
-
-4 EXCEPTION
-   EXCEPTION=expr Applies to: All devices
-
-   Defines an error handler for an I/O device. The expression must contain
-   a fragment of GT.M code (e.g., GOTO ERRFILE) that GT.M XECUTEs when the
-   driver for the device detects an error, or an entryref  to  which  GT.M
-   transfers control, as appropriate for the current gtm_ztrap_form.
-
-   For more information on error handling, refer to the "Error Processing"
-   chapter in GT.M Programmer's Guide.
-
-4 FIELD
-   FIELD=intexpr Applies to: Terminals and Printers
-
-   FIELD sets the maximum length of a single terminal READ  operation.  By
-   default, the terminal device driver uses a FIELD size  of  1024  bytes.
-   Specifying an integer expression of zero (0) resets the FIELD  size  to
-   1024 bytes.
-
-   Every READ which is not a READ * or an explicit fixed-length  READ,  is
-   treated as a READ x# FIELD.
-
-4 FILTER
-   [NO]FILTER[=expr] Applies to: Terminals and  Printers,  Socket  Device,
-   and NULL Device
-
-   Specifies  character  filtering  for  valid  filtering  expressions.
-   Filtering requires character by character examination of all output and
-   reduces I/O performance.
-
-   Each FILTER  deviceparameter  can  have  only  one  argument.  However,
-   multiple FILTER deviceparameters can appear in a  single  USE  command,
-   each with different arguments.
-
-   The valid values for expr:
-
-   [NO]CHARACTERS enables or disables maintenance of $X and  $Y  according
-   to the M ANSI standard for the characters <BS>, <LF>,  <CR>  and  <FF>.
-   CHARACTERS causes the device driver to examine all output for the above
-   characters, and to adjust $X  and  $Y  accordingly.  By  default,  GT.M
-   performs special maintenance on $X and $Y only  for  M  format  control
-   characters, WRAPped records, and certain action deviceparameters.
-
-   [NO]ESCAPE alters the effect of ANSI escape sequences  on  $X  and  $Y.
-   ESCAPE causes GT.M to filter the  output,  searching  for  ANSI  escape
-   sequences and preventing them from updating $X and $Y. By default, GT.M
-   does not screen output for escape sequences.
-
-   By default, GT.M  does  not  perform  output  filtering.  For  GT.M  to
-   maintain $X for non-graphic characters as described  by  the  standard,
-   FILTER="CHARACTERS" must be enabled. Output filtering  adds  additional
-   overhead to I/O processing. Linking the image with a GTM$DEFAULTS that
-   has a modified GTM$USER_WRITE_FILTER parameter changes the default for
-   the image. A value of 0x80 specifies CHARACTER filtering,  a  value  of
-   0x01 specifies ESCAPE filtering, and a value of 0x81 specifies both.
-
-4 FLUSH
-   FLUSH Applies to: Terminals and Printers
-
-   Discards the contents of the type-ahead buffer. When a terminal has no
-   outstanding READ and has TYPEAHEAD enabled, the  device  driver  stores
-   arriving input entered in a type-ahead buffer. The device  driver  uses
-   data from the type-ahead buffer for subsequent READs.
-
-   The FLUSH deviceparameter can be useful for application error recovery.
-   An application may be designed to detect an error and write  a  message
-   to the terminal followed by a request  for  operator  action.  In  this
-   case, a USE $P:FLUSH  preceding  the  READ  eliminates  type-ahead  and
-   prevents the type-ahead from being inappropriately  used  during  error
-   recovery.
-
-4 HOSTSYNC
-   [NO]HOSTSYNC Applies to: Terminals and Printers
-
-   Enables or disables the use of XON/XOFF by the host to  throttle  input
-   and  prevent  impending  buffer  overruns  for  a  terminal.  This
-   deviceparameter  provides  a  control  mechanism  for  the  host  over
-   asynchronous  communication  lines  to  help  prevent  data  loss  when
-   hardware is slow and/or processing load is high.
-
-   By default, the VMS device driver operates HOSTSYNC.
-
-4 INSERT
-   [NO]INSERT Applies to: Terminals and Printers
-
-   Enables or disables insert mode for a terminal.  When  a  terminal  has
-   INSERT mode enabled, the device driver inserts input characters at the
-   logical position in the input stream designated  by  the  cursor,  .for
-   example in the middle of the line/record. When a  terminal  has  INSERT
-   mode disabled, the device driver overwrites existing characters in the
-   input stream at the logical position designated by the cursor.
-
-   By default, the VMS terminal driver operates NOINSERT (OVERSTRIKE).
-
-4 IOERROR
-   IOERROR=expr Applies to: Socket Device
-
-   Enables exception handling in socket devices. expr  specifies  the  I/O
-   error trapping mode. A value equal to "TRAP" specifies that I/O errors
-   on a device raise error conditions. A value equal to "NOTRAP", or when
-   IOERROR is not specified, indicates that I/O error on a device does not
-   raise error conditions.
-
-        GT.M currently handles exception handling at device  level  instead
-        of socket level.
-
-4 LENGTH
-   [Z]LENGTH=intexpr Applies to: Terminals and  Printers,  VMS  Mailboxes,
-   Socket Device, and NULL Device.
-
-   Sets the  virtual  page  length  for  an  I/O  device  to  the  integer
-   expression. The page length controls the  point  at  which  the  device
-   driver automatically resets $Y to 0.
-
-   By  default,  GT.M  uses  the  LENGTH  specified  by  the  VMS  device
-   characteristics at image activation. Sequential files, socket devices,
-   mailboxes and null devices have a default of 66. The  terminal  default
-   depends on the type of terminal.
-
-4 OVERSTRIKE
-   OVERSTRIKE Applies to: Terminals and Printers
-
-   Disables INSERT mode for  a  terminal.  OVERSTRIKE  is  a  synonym  for
-   NOINSERT.
-
-   By default, the VMS terminal driver operates OVERSTRIKE (NOINSERT).
-
-4 PASTHRU
-   [NO]PASTHRU Applies to: Terminals and Printers
-
-   Enables  or  disables  operating  system  interpretation  of  <CTRL>
-   characters for a terminal. When a terminal  has  PASTHRU  enabled,  the
-   operating system passes the characters that it normally uses to control
-   terminal interaction through to the application program.
-
-   PASTHRU supersedes line editing.
-
-   Exercise caution with PASTHRU in debugging,  because  using  a  PASTHRU
-   terminal in Direct Mode is somewhat awkward.
-
-   [NO]TTSYNC must be used with [NO]PASTHRU to control XON/XOFF handling.
-
-   By default, the VMS device driver operates NOPASTHRU.
-
-4 READSYNC
-   [NO]READSYNC Applies to: Terminals and Printers
-
-   Enables or disables automatic output of <XON> before a READ and <XOFF>
-   after a READ.
-
-   By default, the VMS terminal drivers operate NOREADSYNC.
-
-4 REWIND
-   REWIND Applies to: Sequential Files
-
-   REWIND for a disk file is a logical rather than a physical operation.
-
-   By default, USE does not REWIND.
-
-4 SOCKET
-   SOCKET=expr Applies to: Socket Device
-
-   The socket specified in expr is made the current socket.  Specifying  a
-   socket that has not been previously OPENed generates an error.
-
-        SOCKET is compatible with DELIMITER only.
-
-4 TERMINATOR
-   [NO]TERMINATOR[=expr] Applies to: Terminals and Printers
-
-   Specifies which of the 256  ASCII  characters  terminate  a  READ.  For
-   example, TERMINATOR=$C(0) makes <NUL> the terminator.
-
-   When [NO]ESCAPE is in effect, TERMINATOR controls whether or not <ESC>
-   or <CSI> are treated as terminators, however, when ESCAPE processing is
-   enabled,  the  entire  escape  sequence  is  treated  as  a  terminator
-   regardless of the TERMINATOR specification.
-
-   NOTERMINATOR eliminates  all  terminators.  When  a  terminal  has  all
-   terminators disabled, fixed length READ and READ * terminate on receipt
-   of some number of characters, and a timed READ terminates  on  timeout,
-   but any other READ only terminates when the input  fills  the  terminal
-   read buffer.
-
-   By default, terminals recognize <CR> and <ESC> as  terminators,  (i.e.,
-   TERMINATOR=$C(13,27)). TERMINATOR=""  restores  the  default.  However,
-   unless the terminal has PASTHRU  or  NOEDITING,  the  operating  system
-   interprets some escape sequences rather than passing them to the READ.
-
-   Example:
-
-   GTM> USE $P:TERM=$C(26,13,11,7)
-
-   This example enables the ASCII characters <SUB>, <CR>, <VT>  and  <BEL>
-   as READ terminators.
-
-4 TRUNCATE
-   [NO]TRUNCATE Applies to: Sequential Files
-
-   Enables or disables overwriting of existing data in  sequential  files.
-   Because the position of each record depends  on  the  prior  record,  a
-   WRITE destroys the ability to reliably position to  subsequent  records
-   in a file. Therefore, by default (NOTRUNCATE), GT.M permits WRITEs only
-   when the file pointer is positioned at the end-of-file. When  a  device
-   has TRUNCATE enabled, a WRITE issued when the file pointer  is  not  at
-   end-of-file truncates the file by destroying all  data  from  the  file
-   pointer to the end-of-file.
-
-   By default, OPEN  accesses  files  NOTRUNCATE,  which  does  not  allow
-   overwriting of sequential files.
-
-4 TTSYNC
-   [NO]TTSYNC Applies to: Terminals and Printers
-
-        Enables or disables recognition of XON/XOFF  for  terminal  output.
-        When a terminal has PASTHRU and  NOTTSYNC  in  effect,  the  device
-        driver passes <XON> and <XOFF> on to the GT.M application programs.
-        When a terminal does not have PASTHRU enabled,  [NO]TTSYNC  has  no
-        effect on the GT.M process. A terminal may have its own handling of
-        XON/XOFF, controlled by  a  set-up  mode  or  by  switches.  If  an
-        application requires program recognition of <CTRL-S> and <CTRL-Q>,
-        the terminals may require reconfiguration.
-
-   By default, the VMS terminal device driver operates TTSYNC.
-
-4 TYPEAHEAD
-   [NO]TYPEAHEAD Applies to: Terminals and Printers
-
-   Enables  or  disables  type-ahead  buffering  for  a  terminal.  With
-   NOTYPEAHEAD  and  no  outstanding  READ,  the  terminal  device  driver
-   discards  input  entered  at  the  terminal.  With  TYPEAHEAD  and  no
-   outstanding READ,  the  device  driver  stores  input  entered  at  the
-   terminal in a type-ahead buffer. The device driver uses data  from  the
-   type-ahead buffer for subsequent READs.
-
-   The size of the type-ahead buffer limits the amount of data entered at
-   the terminal that the device driver can store in anticipation of future
-   READs. When the type-ahead buffer is full, the device  driver  sends  a
-   warning <BEL> character to the terminal and discards input  that  would
-   overflow the buffer.
-
-   FLUSH discards the contents of the type-ahead buffer.
-
-   By default, the VMS terminal device driver accepts TYPEAHEAD.
-
-4 UPSCROLL
-   UPSCROLL Applies to: Terminals and Printers
-
-   Moves the cursor down one line on the terminal screen. If $Y=LENGTH-1,
-   UPSCROLL sets $Y=0. Otherwise UPSCROLL increments $Y  by  one.  If  the
-   cursor is physically at the bottom of the page, the screen  scrolls  up
-   one line. UPSCROLL does not change the column position or $X.
-
-4 WAIT
-   [NO]WAIT Applies to: VMS Mailboxes
-
-   Enables or disables synchronization of mailbox WRITEs.
-
-   A synchronized WRITE does not return control to the application program
-   until some other process READs the written message. Such mailbox WRITEs
-   serve as a tool for synchronizing two processes. Because GT.M does not
-   have a timeout on the WRITE command, there is no way, other than a READ
-   of the mailbox by another process or a <CTRL-C> on $PRINCIPAL, for the
-   writing program to regain control of its process.
-
-   NOWAIT provides asynchronous WRITEs analogous to those always used for
-   other device types.
-
-   By default, WRITE to a mailbox operates NOWAIT.
-
-4 WIDTH
-   [Z]WIDTH=intexpr Applies to: Terminals  and  Printers,  Socket  Device,
-   NULL Device, and Sequential Files
-
-   Sets the device's logical record size and enables WRAP.
-
-   NOWRAP and WIDTH supersede each other. When  WIDTH  and  NOWRAP  appear
-   together on the same USE command, the final  one  controls  the  device
-   behavior. For a terminal,  WIDTH=0  is  equivalent  to  WIDTH=n:NOWRAP,
-   where n is the default length of a logical record on that terminal.
-
-   By default, disks have a WIDTH of 1024, and sockets  have  a  WIDTH  of
-   255. Terminals inherit their default WIDTH in GT.M  from  the  invoking
-   VMS environment.
-
-   The default WIDTH for null and socket device is 255.
-
-4 WRAP
-   [Z][NO]WRAP Applies to: Terminals and  Printers,  Socket  Device,  NULL
-   Device, and Sequential Files
-
-   Enables or disables automatic  record  termination.  When  the  current
-   record size ($X) reaches the maximum WIDTH  and  the  device  has  WRAP
-   enabled, GT.M starts a new record, as if the routine had issued a WRITE
-   ! command.
-
-   NOWRAP causes GT.M to require a WRITE ! to terminate the record. NOWRAP
-   allows $X to become greater than the device  WIDTH  for  terminals  and
-   null devices. Sequential files  discard  any  portion  of  the  current
-   output record over the device width.
-
-   By default, WIDTH sets WRAP. When WIDTH and NOWRAP appear  together  on
-   the same USE command, the last one controls the device behavior.
-
-   By default, records WRAP.
-
-4 WRITEOF
-   WRITEOF Applies to: VMS Mailboxes
-
-   Writes an end-of-file (EOF) message to a mailbox device. GT.M fulfills
-   the corresponding READ by returning a null string and setting $ZEOF to
-   true.
-
-4 X
-   X=intexpr Applies to: Terminals and Printers
-
-   $X positions the cursor to a vertical column on the terminal. If NOWRAP
-   is  enabled  or  intexpr<WIDTH,  the  terminal  device  driver  sets
-   $X=intexpr.  If  WRAP  is  enabled  and  intexpr>WIDTH,  GT.M  sets
-   $X=intexpr#WIDTH, where # is the GT.M modulo operator. The resulting $X
-   determines the actual physical position.
-
-   To ensure that $Y and $X  match  what  is  occurring  visually  on  the
-   terminal, the GT.M deviceparameters and the VMS device characteristics
-   must match at all times. For example, if a process spawns out  of  GT.M
-   and changes the terminal wrap setting from NOWRAP, to WRAP with the DCL
-   SET TERMINAL/WRAP command, GT.M returns to the  NOWRAP  condition  when
-   the subprocess completes, and wraps on the terminal do not  reflect  in
-   the values of $X and $Y.
-
-   The terminal hardware may affect physical  cursor  positioning.  The  X
-   deviceparameter does not change the cursor row or update $Y.
-
-4 Y
-   Y=intexpr Applies to: Terminals and Printers, and NULL Device
-
-   Positions the cursor to a horizontal row on the terminal.
-
-   The terminal device driver sets $Y=intexpr#LENGTH, where # is the GT.M
-   modulo operator. If intexpr<LENGTH, the  resulting  $Y  determines  the
-   physical position. If intexpr>LENGTH, the cursor is positioned so that
-   $Y=intexpr#LENGTH, where # is the GT.M module  operator.  The  terminal
-   hardware may affect physical cursor positioning.
-
-   To ensure that $Y and $X  match  what  is  occurring  visually  on  the
-   terminal, the GT.M deviceparameters and the VMS device characteristics
-   must match at all times. For example, if a process spawns out  of  GT.M
-   and changes the terminal wrap setting from NOWRAP, previously set with
-   the GT.M USE command to WRAP with the DCL  SET  TERMINAL/WRAP  command,
-   GT.M does  not  reflect  the  change  when  the  subprocess  completes.
-   Therefore, wraps on the terminal do not reflect in the values of $X and
-   $Y.
-
-   The Y deviceparameter does not change the cursor column or update $X.
-
-4 ZBFSIZE
-   ZBFSIZE Applies to: Socket Device
-
-   Allocates a buffer used by GT.M when reading from a socket. The ZBFSIZE
-   deviceparameter should be at  least  as  big  as  the  largest  message
-   expected.
-
-   By default, the size of ZBFSIZE is 1024 and the maximum it  can  be  is
-   1048576.
-
-4 ZDELAY
-   Z[NO]DELAY Applies to: Socket Device
-
-   Controls buffering of data packets by the system TCP  stack  using  the
-   TCP_NODELAY option to the SETSOCKOPT  system  call.  This  behavior  is
-   sometimes known as the Nagle algorithm. The  default  is  ZDELAY.  This
-   delays sending additional packets until either  an  acknowledgement  of
-   previous packets is received or an interval passes. If several packets
-   are sent from one end of a connection before the  other  end  responds,
-   setting ZNODELAY may be desirable though  at  the  cost  of  additional
-   packets being transmitted over the  network.  ZNODELAY  must  be  fully
-   spelled out.
-
-4 ZFF
-   Z[NO]FF=expr Applies to: Socket Device
-
-   expr specifies a string of characters, typically in $CHAR()  format  to
-   send to socket device, whenever a routine issues a  WRITE  #.  When  no
-   string is specified or when ZFF="", then no characters  are  sent.  The
-   default in GT.M is ZNOFF.
-
-4 ZIBFSIZE
-   ZIBFSIZE Applies to: Socket Device
-
-   Sets  the  buffer  size  used  by  the  network  software  (setsockopt
-   SO_RCVBUF).
-
-   The default and the maximum values depend on the platform and/or system
-   parameters.
-
-4 ZLISTEN
-   ZLISTEN=expr Applies to: Socket Device
-
-   A new socket is allocated to listen for a connection. It  is  made  the
-   current socket for the device, if the  operation  is  successful.  Upon
-   successful completion, $KEY is set to the format of
-   "BOUND|<socket handle>|<port number>"
-
-   otherwise, $KEY is assigned the empty string.
-
-   expr  specifies  the  protocol  and  protocol  specific  information.
-   Currently, TCP/IP is the only protocol GT.M supports. expr must  be  of
-   the format "<port>:TCP", where port specifies the port number at which
-   the socket is waiting for a connection.
-
-2 Read
-   Read
-
-   The READ command transfers input from the current device to a global or
-   local variable specified as a READ argument. For convenience, READ also
-   accepts arguments that perform limited output to the current device.
-
-   The format of the READ command is:
-
-   R[EAD][:tvexpr] glvn|*glvn|glvn#intexpr|strlit|fcc[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    A subscripted  or  unsubscripted  global  or  local  variable  name
-        specifies a variable into which to store the  input;  the  variable
-        does not have to exist prior to the  READ;  if  the  variable  does
-        exist prior to the READ, the READ replaces its old value.
-
-   o    When an asterisk (*) immediately precedes the variable  name,  READ
-        accepts one character of input and places the ASCII code  for  that
-        character in the variable.
-
-   o    When  a  number  sign  (#)  and  a  non-zero  integer  expression
-        immediately  follow  the  variable  name,  the  integer  expression
-        determines the maximum number of characters accepted  as  input  to
-        the read; such reads  terminate  when  GT.M  reads  the  number  of
-        characters specified by the integer expression or a  terminator  in
-        the input stream, whichever occurs first.
-
-   o    To provide a concise means of issuing prompts,  GT.M  sends  string
-        literal and format control character (!,?intexpr,#) arguments of a
-        READ to the current device as if they were arguments of a WRITE.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more READ arguments form a legal argument for a READ.
-
-   The maximum length of the input string is the  smaller  of  the  device
-   buffer size limitation  or  the  GT.M  maximum  string  length  (32,767
-   characters). If a record is longer than the maximum record length, GT.M
-   returns the record piece by piece during sequential reads, for devices
-   that allow it.
-
-   When a string literal appears as an argument to a READ,  M  writes  the
-   literal to the current device. String literals appear as READ arguments
-   to serve  as  prompts  for  input.  GT.M  does  not  permit  expression
-   arguments on a READ to act as prompts. Variable prompts must appear as
-   arguments to a WRITE. If a variable appears as an argument to  a  READ,
-   GT.M always interprets it as input, never as output. This  facility  is
-   used mostly with terminal I/O.
-
-   The READ commands adjust $X and $Y, based on the length  of  the  input
-   read.
-
-3 Read_Comm
-   READ * Command
-
-   The READ * command reads one character  from  the  current  device  and
-   returns the decimal ASCII representation of  that  character  into  the
-   variable specified  for  the  READ  *  command.  READ  *  appears  most
-   frequently in communication protocols, or in interactive programs where
-   single character answers are appropriate.
-
-   The following example reads the value  "A",  and  returns  the  decimal
-   ASCII representation of "A" in the variable X.
-
-   Example:
-
-   GTM> READ *X
-
-   A
-
-   GTM> WRITE X
-
-   65
-   If a timeout occurs before GT.M reads a character, the READ * returns a
-   negative one (-1) in the variable.
-
-3 Read_maxlen_Comm
-   READ X#maxlen Command
-
-   The READ X#maxlen command limits the maximum size of  the  input  to  a
-   maximum of "maxlen" characters, where maxlen is an integer expression.
-
-   If a READ follows  a  READ  X#maxlen  command,  the  READ  returns  the
-   remainder of the current record.
-
-   If a terminator arrives before maxlen characters are received the READ
-   X#maxlen terminates.
-
-2 Write
-   Write
-
-   The WRITE  command  transfers  a  character  stream  specified  by  its
-   arguments to the current device.
-
-   The format of the WRITE command is:
-
-   W[RITE][:tvexpr] expr|*intexpr|fcc[,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    An expression argument supplies the text of a WRITE.
-
-   o    When a WRITE argument consists of a leading asterisk  (*)  followed
-        by an integer expression, WRITE outputs  one  character  associated
-        with the ASCII code specified by  the  integer  evaluation  of  the
-        expression.
-
-   o    WRITE also accepts format control characters as  arguments;  format
-        control characters modify the position  of  a  virtual  cursor:  an
-        exclamation  point  (!)  produces  the  device  specific  record
-        terminator (for example, new line for a terminal),  a  number  sign
-        (#) produces device specific page  terminator  (for  example,  form
-        feed for a terminal)  and  a  question  mark  (?)  followed  by  an
-        expression moves the virtual cursor to the column specified by the
-        integer evaluation of the expression if the virtual  cursor  is  to
-        the "left" of the specified column.
-
-   o    When directed to a device bound  to  a  mnemonicspace,  WRITE  also
-        accepts  controlmnemonics,  which  are  keywords  specific  to  the
-        binding - they are delimited by a slash (/) prefix  and  optionally
-        followed by a parenthetical list of arguments. The  parentheses  "(
-        )" are optional when there are no arguments, but must  appear  even
-        if there is a single argument
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more WRITE arguments form a legal argument for a WRITE.
-
-   GT.M can write up to 32,767 bytes (the GT.M maximum string length) as a
-   result of a single WRITE argument. GT.M buffers output into a "logical
-   record"  for  all  devices  except  mailboxes  and  sockets  without
-   DELIMITERs. The WRITE command appends a string to the current record of
-   the current device. GT.M does not write to the output device until the
-   buffer is full, a GT.M format control character forces a write,  a  USE
-   command, a CLOSE command, or, for terminals, the buffer  becomes  stale
-   (the terminal staleness timer is adjustable through GTM$DEFAULTS).
-
-   Each device has a WIDTH and a LENGTH that define  the  virtual  "page".
-   The WIDTH determines the maximum size of a record for a  device,  while
-   the LENGTH determines how many records fit on a page. When the current
-   record size ($X) reaches the maximum WIDTH  and  the  device  has  WRAP
-   enabled, GT.M starts a new record. When the current line  ($Y)  reaches
-   the maximum LENGTH, GT.M starts a new page.
-
-   A WRITE with an asterisk preceding the argument, which it would expect
-   to  be  a  decimal  ASCII  representation,  writes  the  character
-   corresponding to the ASCII representation. The WRITE command  also  has
-   several format control characters that allow the  manipulation  of  the
-   virtual cursor. For all I/O devices, the GT.M format control characters
-   do the following:
-
-        WRITE ! Clears $X and increments  $Y  and  terminates  the  logical
-        record in progress. The definition of "logical record" varies from
-        device to device, and is discussed in each device section.
-        WRITE # Clears $X and $Y  and  terminates  the  logical  record  in
-        progress.
-        WRITE ?n If n is greater than $X, writes n-$X spaces to the device,
-        bringing $X to n. If n is less than or equal to $X, WRITE ?n has no
-        effect. When WRAP is enabled and n exceeds the LENGTH of the line,
-        WRITE ?n increments $Y.
-   For more information, refer to the sections on specific I/O devices.
-
-2 Close
-   Close
-
-   The CLOSE command breaks the connection between a process and a device.
-
-   The format of the CLOSE command is:
-
-   C[LOSE][:tvexpr] expr[:(keyword[=expr][:...])][,...]
-
-   o    The optional  truth-valued  expression  immediately  following  the
-        command is a command postconditional that controls whether  or  not
-        GT.M executes the command.
-
-   o    The required expression specifies the device to CLOSE.
-
-   o    The optional keywords specify deviceparameters that control device
-        behavior; some deviceparameters  take  arguments  delimited  by  an
-        equal sign (=); if there  is  only  one  keyword,  the  surrounding
-        parentheses are optional.
-
-   o    An indirection operator and an expression atom evaluating to a list
-        of one or more CLOSE arguments form a legal argument for a CLOSE.
-
-   When a CLOSE is issued, GT.M flushes all pending output to the device,
-   and processes any deviceparameters. CLOSEing  a  device  not  currently
-   OPEN has no effect.
-
-   If the device is a temporary  mailbox  and  the  process  is  the  only
-   process accessing the mailbox, the device driver deletes the mailbox.
-
-   GT.M retains the characteristics of all device types, except a Files-11
-   RMS, for use in case  of  subsequent  re-OPENs.  If  the  device  is  a
-   Files-11 RMS, characteristics controlled by deviceparameters  are  lost
-   after the CLOSE.
-
-   CLOSE  may  send  sequential  files  to  the  VMS  queue  manager  for
-   processing. The CLOSE command provides deviceparameters that SPOOL the
-   file for printing on a printer or terminal, or SUBMIT the file to batch
-   for execution. Many of the CLOSE deviceparameters for sequential files
-   control queue  behavior  for  either  SPOOL  or  SUBMIT  or  both,  and
-   therefore must be used with SPOOL and/or SUBMIT to have any effect.
-
-   If the device being CLOSEd is $IO,  GT.M  implicitly  USEs  $PRINCIPAL.
-   GT.M ignores CLOSE $PRINCIPAL.
-
-   Example:
-
-   CLOSE sd:(SPOOL:QUEUE=que:DELETE)
-
-   This CLOSEs the device, and if it is an RMS file on disk, it spools the
-   file for printing on the QUEUE specified by the variable que. The CLOSE
-   also marks the file for deletion after printing.
-
-   Example:
-
-   CLOSE SD:RENAME=SD_".SAV"
-
-   This closes the device and, if it is a disk file, renames  it  to  have
-   the type .SAV.
-
-3 Close_DeviParam
-   CLOSE Deviceparamenter
-
-4 AFTER
-   AFTER=expr Applies to: Sequential Disk Files
-
-   Specifies a time when a SPOOLed or  SUBMITted  job  should  start.  The
-   expression provides a value for the time in DCL absolute or delta time
-   format.
-
-   By default, the VMS job controller starts  processing  a  SUBMITted  or
-   SPOOLed file as soon as system resources permit.
-
-4 BURST
-   [NO]BURST Applies to: Sequential Disk Files when used with SPOOL
-
-   Enables or disables printing burst flags on a SPOOLed file.
-
-   By default, the queue controls whether to print burst flags.
-
-4 CHARACTERISTIC
-   CHARACTERISTIC=intexpr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies a characteristic required  of  the  queue  for  processing  a
-   SUBMITted  or  SPOOLed  job.  The  expression  supplies  a  single
-   characteristic number. To specify  multiple  characteristics,  use  the
-   CHARACTERISTIC deviceparameter more than once on the CLOSE.
-
-   The  VMS  system  manager  assigns  queue  CHARACTERISTICs.  VMS  gives
-   CHARACTERISTICs both names and  numbers.  However,  the  CHARACTERISTIC
-   deviceparameter only accepts numeric identifications.
-
-   By  default,  CLOSE  does  not  limit  the  queue  selection  with
-   characteristics.
-
-   Example:
-
-   CLOSE sd:(SUBMIT:CHARACTERISTIC=4:CHAR=5)
-
-   This CLOSEs the device, and if the device is an RMS file,  SUBMITs  the
-   file to batch, restricting the VMS job controller to execute the job in
-   a queue with CHARACTERISTICs numbers 4 and 5.
-
-4 CLI
-   CLI=expr Applies to: Sequential Files when used with SUBMIT
-
-   Specifies a command language for a SUBMITted job. The  expression  must
-   name an available CLI.
-
-   By default, VMS uses the CLI identified by the account under which the
-   job was SUBMITted, generally DCL.
-
-4 COPIES
-   COPIES=intexp Applies to: Sequential Files when used with SPOOL
-
-   Specifies the number of copies of a SPOOLed file to print. The integer
-   expression supplies a number of copies.
-
-   By default, the spooler prints one copy.
-
-4 CPULIMIT
-   CPULIMIT=intexpr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the maximum CPU time a SPOOLed or SUBMITted job  can  consume
-   before VMS terminates it. The integer expression supplies a time  as  a
-   number of 10 millisecond increments. CPULIMIT=0 requests unlimited CPU
-   time. This is analogous to the /CPUTIME qualifier  on  the  DCL  SUBMIT
-   command.
-
-   By default, the account and/or the queue control the maximum CPU time.
-
-4 DELETE
-   DELETE Applies to: Sequential Files, and VMS Mailboxes
-
-   Instructs GT.M to delete the mailbox or the current version of the disk
-   file after GT.M closes it. When the file is SPOOLed or  SUBMITted,  VMS
-   deletes the file after processing it.
-
-4 DOUBLESPACE
-   [NO]DOUBLESPACE Applies to: Sequential Files when used with SPOOL
-
-   Enables or disables double spacing of a SPOOLed file.
-
-   By default, the spooler prints files single spaced.
-
-4 EXCEPTION
-   EXCEPTION=expr Applies to: All devices
-
-   Defines an error handler for an I/O device. The expression must contain
-   a fragment of GT.M code (for example, GOTO ERRFILE) that  GT.M  XECUTEs
-   when the driver for the device detects an  error,  or  an  entryref  to
-   which  GT.M  transfers  control,  as  appropriate  for  the  current
-   gtm_ztrap_form.
-
-   For more information on error handling, refer to the "Error Processing"
-   chapter in GT.M Programmer's Guide.
-
-4 FIRSTPAGE
-   FIRSTPAGE=intexpr Applies to: Sequential Files when used with SPOOL
-
-   Specifies the page number at which to start printing  a  SPOOLed  file.
-   This is analogous to the first argument to the /PAGE qualifier  on  the
-   DCL PRINT command.
-
-   By default, the spooler starts printing at the beginning of a file.
-
-4 FLAG
-   [NO]FLAG Applies to: Sequential Files when used with SPOOL
-
-   Enables or disables printing a flag page before a SPOOLed file.
-
-   By default, the queue controls whether to print a flag page.
-
-4 FORM
-   FORM=intexpr Applies to: Sequential Files when used with SPOOL
-
-   Specifies a predefined form number to  use  while  printing  a  SPOOLed
-   file.
-
-   The VMS system manager sets up queue FORMs. VMS gives FORMs both names
-   and numbers. However, the FORM  deviceparameter  only  accepts  numeric
-   identifications.
-
-   By default, the spooler prints files on the default form.
-
-4 GROUP
-   GROUP=expr Applies to: Sequential Disk Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on a CLOSE, any user category
-   (OWNER, SYSTEM,  WORLD),  that  is  not  explicitly  specified  remains
-   unchanged.
-
-   In order to modify file security, the user who issues  the  CLOSE  must
-   have control access.
-
-   By default, CLOSE does not modify the UIC-based security on an existing
-   file.
-
-4 HEADER
-   [NO]HEADER Applies to: Sequential Files when used with SPOOL
-
-   Enables or disables printing a VMS header on the top of each page of a
-   SPOOLed file. This header includes the file specification and the time
-   and date. When using this header, ensure that the form size is 2 lines
-   larger than the page size of material in the file. Otherwise, printing
-   intended for a single page may overflow onto 2 pages.
-
-   By default, the spooler does not print a VMS header.
-
-4 HOLD
-   [NO]HOLD Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Enables or disables holding the SPOOLed or SUBMITted job for release by
-   an operator.
-
-   By default, The VMS job controller starts processing the  SUBMITted  or
-   SPOOLed file as soon as system resources permit.
-
-4 LASTPAGE
-   LASTPAGE=intexpr Applies to: Sequential Files when used with SPOOL
-
-   Specifies the page number at which to stop  printing  a  SPOOLed  file.
-   This is analogous to the second argument to the /PAGE qualifier on the
-   DCL PRINT command.
-
-   By default, the spooler stops printing at the end-of-file.
-
-4 LOGFILE
-   LOGFILE=expr Applies to: Sequential Files when used with SUBMIT
-
-   Specifies the file into which a SUBMITted job should  log  its  output.
-   The expression supplies an RMS file specification. This is analogous to
-   the /LOG_FILE qualifier on the DCL SUBMIT command.
-
-   By default, the VMS job controller logs a job into the login directory
-   of the account under which the job runs, with a file  name  constructed
-   from the job name and a file type of .LOG.
-
-4 LOGQUEUE
-   LOGQUEUE=expr Applies to: Sequential Files when used with SUBMIT
-
-   Specifies the queue used to print the log file of a SUBMITted job. The
-   expression supplies a queue name.
-
-   By default, the VMS job controller uses the SYS$PRINT queue.
-
-4 LOWERCASE
-   [NO]LOWERCASE Applies to: Sequential Files when used with SPOOL
-
-   Specifies whether a SPOOLed file prints on a queue supporting a device
-   that can print lower-case characters.
-
-   By default, CLOSE does not restrict printing based on this capability.
-
-4 NAME
-   NAME=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the name of  a  SPOOLed  or  SUBMITted  job.  The  expression
-   supplies a name from one to 39 characters in length.
-
-   By default, a job takes the name of the SPOOLed or SUBMITted file.
-
-4 NOTE
-   NOTE=expr Applies to: Sequential Files when used with SPOOL
-
-   Specifies a note to print on the flag  pages  of  a  SPOOLed  job.  The
-   expression specifies the text of a note. NOTE performs no  function  if
-   neither the job nor the queue specify BURST and/or FLAG and/or TRAILER.
-
-   By default, the spooler does not print the note on flag pages.
-
-4 NOTIFY
-   [NO]NOTIFY Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies whether the process receives notification when a  SPOOLed  or
-   SUBMITted job completes, in the form of a broadcast mailbox message.
-
-   By default, when a job completes,  the  VMS  job  controller  does  not
-   notify the other active processes belonging to the  same  user  as  the
-   job.
-
-4 OPERATOR
-   OPERATOR=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Pauses the queue and notifies  the  operator  to  take  action  when  a
-   SPOOLed or  SUBMITted  job  is  ready  for  execution.  The  expression
-   contains a message, which the VMS job controller sends to the operator
-   console(s).
-
-   By default, The VMS job controller does  not  require  operator  action
-   before a SPOOLed job prints or a SUBMITted job runs.
-
-4 OWNER
-   OWNER=expr Applies to: Sequential Disk Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on a CLOSE, any user category
-   (GROUP, SYSTEM,  WORLD),  that  is  not  explicitly  specified  remains
-   unchanged.
-
-   In order to modify file security, the user who issues  the  CLOSE  must
-   have control access.
-
-   By default, CLOSE does not modify the UIC-based security on an existing
-   file.
-
-4 P1_to_P8
-   P1=expr to P8=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the parameters supplied to a SPOOLed or SUBMITted  job.  Each
-   expression supplies a parameter value.  The  CLOSE  must  specify  each
-   parameter  with  a  separate  Pn  deviceparameter.  VMS  assigns  every
-   parameter value to a DCL symbol of the same (Pn) name in the job. This
-   is analogous to the /PARAMETER qualifier on the DCL  PRINT  and  SUBMIT
-   commands.
-
-   By default, P1 to P8 have null values.
-
-   Example:
-
-   CLOSE sd:(SUBMIT:P1=p1:P2=5:P3="INIT")
-
-   This CLOSEs the device, and if the device is an RMS file, SUBMITs it to
-   batch with three parameters that are respectively:  the  value  of  the
-   variable p1 , the integer 5 and the string "INIT".
-
-4 PAGINATE
-   [NO]PAGINATE Applies to: Sequential Files when used with SPOOL
-
-   Instructs the spooler whether to insert  appropriate  carriage  control
-   characters whenever output exceeds the form length. This  is  analogous
-   to the /[NO]FEED qualifier on the DCL PRINT command.
-
-   By default, the spooler adds its own pagination.
-
-4 PASSALL
-   [NO]PASSALL Applies to: Sequential Files when used with SPOOL
-
-   Enables  or  disables  spooler  suppression  of  non-graphic  character
-   sequences in a SPOOLed file. Non-graphic characters should be PASSALLed
-   when they control printer behavior.
-
-   By default, the spooler does not  send  non-graphic  sequences  to  the
-   printer.
-
-4 PRINT
-   [NO]PRINT Applies to: Sequential Files when used with SUBMIT
-
-   Specifies whether to print and delete, or not print and retain, the log
-   file generated by a SUBMITted job. This is analogous to  a  combination
-   of the /KEEP and /PRINT qualifiers on the DCL SUBMIT command.
-
-   By default, the VMS job controller prints and deletes the log file.
-
-4 PRIORITY
-   PRIORITY=intexpr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the priority of a SPOOLed or SUBMITted job. Attempts to raise
-   priority above a SYSGEN established maximum (MAXQUEPRI) only succeed if
-   the user has appropriate VMS privileges (OPER or ALTPRI).
-
-   By default, a SYSGEN parameter (DEFQUEPRI)  and  the  priority  of  the
-   submitting process control the priority of a SPOOLed or SUBMITted job.
-
-4 QUEUE
-   QUEUE=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the queue for a SPOOLed  or  SUBMITted  job.  The  expression
-   supplies a queue name.
-
-   By default, SPOOLed jobs go to  SYS$PRINT  and  SUBMITted  jobs  go  to
-   SYS$BATCH.
-
-4 REMOTE
-   REMOTE=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the node on the network where  a  SPOOLed  or  SUBMITted  job
-   executes. The expression supplies the node name of the  target  system.
-   Within a VMSCluster,  a  shared  queue  management  system  may  direct
-   SPOOLed or SUBMITted jobs to other members of the cluster  without  use
-   of the REMOTE parameter.
-
-   By default, the VMS job controller executes a job on  the  system  from
-   which it is SPOOLed or SUBMITted. However, by default, in a VMSCluster
-   with a shared queue management system, the VMS job controller executes
-   a job on the cluster member with the largest current supply of required
-   resources.
-
-4 RENAME
-   RENAME=expr Applies to: Sequential Disk Files
-
-   Changes the file name to the name contained  in  the  argument  string.
-   When  the  expression  omits  part  of  the  file  specification,  GT.M
-   constructs  the  full  file  specification  by  applying  the  defaults
-   discussed in the section on device specifications.
-
-   If the process has sufficient access permissions, it may use RENAME to
-   specify a different directory as well as file name, type  and  version.
-   RENAME cannot move a file to a different device.
-
-4 RESTART
-   [NO]RESTART Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Enables or disables automatic restart on reboot after a system failure
-   for a SPOOLed or SUBMITted job.
-
-   By default, the VMS job controller requires  operator  intervention  to
-   restart jobs running at the time of a system failure.
-
-4 SETUP
-   SETUP=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies one or more setup modules to  copy  to  the  printing  device
-   before the contents of a SPOOLed file. The expression supplies  a  list
-   of setup module names separated by commas (,). VMS stores setup modules
-   in a device control library and the spooler uses them to initialize or
-   download programmable printers.
-
-   By default, the spooler sends no setup modules to the printer ahead of
-   a SPOOLed file.
-
-4 SOCKET
-   SOCKET=expr Applies to: Socket Device
-
-   The socket specified in expr is closed. Specifying a  socket  that  has
-   not  been  previously  OPENed  generates  an  error.  If  no  SOCKET
-   deviceparameter is specified on a CLOSE for a socket device, the socket
-   device and all sockets associated with it are closed.
-
-4 SPOOL
-   SPOOL Applies to: Sequential Disk Files
-
-   Sends the sequential file to the default  print  queue  SYS$PRINT.  The
-   deviceparameter QUEUE provides  a  means  to  specify  different  print
-   queues.
-
-4 SUBMIT
-   SUBMIT Applies to: Sequential Disk Files
-
-   Submits the named sequential file to the default batch queue SYS$BATCH.
-   The deviceparameter QUEUE provides a means to specify  different  print
-   queues.
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on a CLOSE, any user category
-   that is not explicitly specified remains unchanged.
-
-4 SYSTEM
-   SYSTEM=expr Applies to: Sequential Disk Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on an OPEN of a new file, any
-   user category that is not explicitly specified  is  given  the  default
-   mask. When any one of these deviceparameters appears on an OPEN  of  an
-   existing file, any user category (OWNER, GROUP,  WORLD),  that  is  not
-   explicitly specified remains unchanged.
-
-   In order to modify file security, the user who issues the OPEN or CLOSE
-   must have control access ownership.
-
-   By default, CLOSE does not modify the UIC-based security on an existing
-   file.
-
-4 TRAILER
-   [NO]TRAILER Applies to: Sequential Files when used with SPOOL
-
-   Enables and disables printing a flag page after a SPOOLed file.
-
-   By default, the queue controls printing of trailing flag pages.
-
-4 USER
-   USER=expr Applies to: SPOOL or SUBMIT for Sequential Files
-
-   Specifies the user name under which a SPOOLed or  SUBMITted  job  runs.
-   The expression supplies a currently valid  one  to  12  character  user
-   name. USER requires the VMS CMKRNL privilege.
-
-   By default, the VMS job controller runs the job under  the  account  of
-   the process by which it was SPOOLed or SUBMITted.
-
-4 WORLD
-   WORLD=expr Applies to: Sequential Disk Files
-
-   Specifies UIC-based security on RMS files. The  expression  is  a  mask
-   evaluating  to  null  or  to  any  combination  of  the  letters  REWD,
-   indicating respectively READ, EXECUTE, WRITE, and DELETE  access.  When
-   any one of these deviceparameters appears on a CLOSE, any user category
-   (OWNER, GROUP,  SYSTEM),  that  is  not  explicitly  specified  remains
-   unchanged.
-
-   In order to modify file security, the user who issues  the  CLOSE  must
-   have control access.
-
-   By default, CLOSE and CLOSE do not modify the UIC-based security on an
-   existing file. Unless otherwise specified, when  CLOSE  creates  a  new
-   file, it establishes security using standard defaulting rules.
-
-   In order to modify file security, the user who issues  the  CLOSE  must
-   have control access.
-
-   By default, CLOSE does not modify the UIC-based security on an existing
-   file.
-
-1 M_Utility_Rtns
-   M Utility Routines
-
-   GT.M provides library utilities to perform frequently used  tasks,  and
-   to access frequently used information. Most of the  utilities  are  for
-   GT.M programmers, but some provide tools for system administration and
-   operation.
-
-   The GT.M utilities fall into the following general categories:
-
-   o    Date and time utilities
-
-   o    Conversion utilities
-
-   o    Mathematic utilities
-
-   o    Global utilities
-
-   o    Routine utilities
-
-   o    Internationalization utilities
-
-   o    System Management utilities
-
-   The GT.M distribution includes the source files  for  these  utilities.
-   The default installation compiles them to produce object modules in the
-   GTM$DIST distribution library.
-
-   The default installation also defines the logical name GTM$ROUTINES to
-   include GTM$DIST so the $ZROUTINES search list gives GT.M users access
-   to both  the  source  and  object  files.  If  you  cannot  locate  the
-   utilities, consult your system manager.
-
-   You may wish to examine the utilities and include some of them in your
-   programs if the programs access the function frequently or you may want
-   to modify the utilities to better fit your  particular  needs.  If  you
-   modify a utility, store your copy in a directory that precedes GTM$DIST
-   in the search list $ZROUTINES to prevent a new  release  of  GT.M  from
-   overlaying your copy.
-
-2 Using_Util
-   Using the Utilities
-
-   You can either use a utility in Direct Mode or include it in  a  source
-   application  program  with  one  or  more  of  the  following  formats.
-   Italicized items are to be supplied by the user:
-
-   o    DO ^%UTILITYNAME
-
-   o    DO LABEL^%UTILITYNAME
-
-   o    $$FUNC^%UTILITYNAME[(para1,...)]
-
-   Many utilities contain labels  that  invoke  variations  of  the  basic
-   utility functionality. Some also provide the label FUNC  to  invoke  an
-   extrinsic function with optional or required parameters.
-
-   GT.M passes input to non-extrinsic forms of the utilities interactively
-   or by using "input" variables. GT.M passes  output  from  non-extrinsic
-   forms of the utilities using "output" variables.  For  extrinsic  entry
-   points, the utilities receive input as parameters and  pass  output  as
-   the returned result. For  other  entry  points,  GT.M  uses  predefined
-   "input" and "output" variables  to  pass  information.  Some  utilities
-   interactively request user  inputs  and  display  their  results.  Each
-   utility is described individually in  this  chapter  where  appropriate
-   labels, input, and output variables are identified.
-
-   By convention, the utilities  use  upper-case  variables  for  external
-   input and output. Since M is case-sensitive, when an invocation uses a
-   lower-case or misspelled variable name, the routine does not output the
-   expected information. Instead it  supplies  a  default  value,  if  one
-   exists, or produces an error message.
-
-   Example:
-
-
-   GTM>SET %ds="11/22/2002"
-
-   GTM>DO INT^%DATE
-
-   GTM>ZWRITE
-
-   %DN=59123
-
-   %ds="11/22/2002"
-
-   This example sets the lowercase variable %ds to  the  date  11/22/2002.
-   Since the %DATE routine  expects  the  input  to  be  provided  in  the
-   uppercase %DS variable, it  returns  a  default  value  in  the  output
-   variable $DN. The default is the $HOROLOG format of the  current  date,
-   which is 11/15/2002 in the example.
-
-2 Date_Time_Util
-   Date and Time Utilities
-
-   The date and time utilities are:
-
-        %D Displays the current date using the [d]d-mmm-[yy]yy format.
-        %DATE Converts input date to the $HOROLOG format.
-        %H Converts date and time to and from $HOROLOG format.
-        %T Displays the current time in [h]h:mm AM/PM format.
-        %TI Converts time to $HOROLOG format.
-        %TO Converts the current time from $HOROLOG format to [h]h:mm AM/PM
-        format.
-        For details and examples, refer to the GT.M Programmer's Guide.
-
-   The  "%"  sign  has  been  removed  from  the  topic  headings  below,
-   intentionally.
-
-3 D_
-   %D
-
-
-   The %D utility displays the  current  date  using  the  [d]d-mmm-[yy]yy
-   format. If a routine uses this function repetitively, put  the  utility
-   code directly into the M program.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Sets variable %DAT to current date.
-        FUNC[()] Invokes an extrinsic function returning today's date.
-4 Output_Vars
-   Output Variables
-
-        %DAT Contains the current date.
-4 Ex_of_D
-   Examples of %D
-
-        For the following examples, $ZDATEFORM is assumed to be one (1).
-
-   Example:
-
-
-   GTM>DO ^%D
-
-   22-NOV-2002
-   This example invokes %D in Direct Mode. Then %D  displays  the  current
-   date.
-
-   Example:
-
-
-   GTM>DO INT^%D
-
-   GTM>ZWRITE
-
-   %DAT="22-NOV-2002"
-
-   This example invokes %D with the label INT (INT^%D). The variable %DAT
-   contains the current date. ZWRITE displays the contents of  the  output
-   variable.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%D
-
-   22-NOV-2002
-   This example invokes %D as an extrinsic function with the  label  FUNC.
-   $$FUNC^%D returns today's date.
-
-3 DATE
-   %DATE
-
-
-   The %DATE utility converts an input date to the  $HOROLOG  format.  The
-   $HOROLOG format represents time as the number of  days  since  December
-   31,  1840.  The  routine  has  entry  points  for  interactive  or
-   non-interactive use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts %DS input non-interactively, if defined, otherwise the
-        current date.
-        FUNC(t) Invokes an extrinsic function returning $HOROLOG format of
-        the argument.
-4 Prompts
-   Prompts
-
-        Date: Interactively requests a  date  for  conversion  to  $HOROLOG
-        format.
-4 Input_Vars
-   Input Variables
-
-        %DS Contains input date; refer to %DATE Input Formats table.
-4 Output_Vars
-   Output Variables
-
-        %DN Contains output date in $HOROLOG format
-4 Ex_of_DATE
-   Examples of %DATE
-
-   Example:
-
-
-   GTM>DO ^%DATE
-
-   Date:
-
-   GTM>ZWRITE
-
-   %DN=59105
-
-   This example invokes %DATE at the GTM> prompt. After pressing <RETURN>
-   at  the  Date:  prompt,  %DATE  converts  today's  date  (for  example,
-   10/28/2002) to the $HOROLOG format. ZWRITE displays the contents of the
-   output variable.
-
-   Example:
-
-
-   GTM>DO INT^%DATE
-
-   GTM>ZWRITE
-
-   %DN=59105
-
-   This  example  invokes  INT^%DATE,  which  converts  the  current  date
-   non-interactively into $HOROLOG format. ZWRITE displays the contents of
-   the output variable.
-
-   Example:
-
-
-   GTM>SET %DS="10/20/2002"
-
-   GTM>DO INT^%DATE
-
-   GTM>ZWRITE
-
-   %DN=59097
-
-   %DS="10/20/2002"
-
-   This example sets the input variable %DS prior to  invoking  INT^%DATE,
-   which converts that date non-interactively to $HOROLOG format.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%DATE("10/20/2002")
-
-   59097
-   This example invokes %DATE with the label FUNC as an extrinsic function
-   to convert an input date to $HOROLOG. If the invocation does not supply
-   a date for $$FUNC^%DATE, FUNC converts the current date.
-
-   Example:
-
-
-   GTM>WRITE $ZDATEFORM
-
-   1975
-   GTM>WRITE $$FUNC^%DATE("10/20/80")
-
-   51062
-   GTM>WRITE $ZDATE(51062)
-
-   10/20/1980
-   GTM>WRITE $$FUNC^%DATE("10/20/10")
-
-   62019
-   GTM>WRITE $ZDATE(62019)
-
-   10/20/2010
-   This example shows the use of a year limit  in  $ZDATEFORM.  Two  digit
-   years are  interpreted  to  be  in  the  interval  (1975,  2074)  since
-   $ZDATEFORM is 1975; the input year "80"  is  interpreted  as  the  year
-   "1980" and "10" is interpreted as the year "2010". The example invokes
-   FUNC^%DATE to convert the input date to $HOROLOG  format.  $ZDATE()  is
-   used to convert the $HOROLOG format date to mm/dd/yyyy format.
-
-3 H
-   %H
-
-
-   The %H utility converts date and time to and from $HOROLOG format.
-
-4 Util_Labels
-   Utility Labels
-
-        %CDS Converts %DT $HOROLOG input date to mm/dd/yyyy format.
-        %CTS Converts %TM $HOROLOG input time to external format.
-        %CDN Converts %DT input date to $HOROLOG format.
-        %CTN Converts %TM input time to $HOROLOG format.
-        CDS(dt) Extrinsic entry that  converts  the  $HOROLOG  argument  to
-        external date format.
-        CTS(tm) Extrinsic entry that  converts  the  $HOROLOG  argument  to
-        external time format.
-        CDN(dt) Extrinsic entry that  converts  the  argument  to  $HOROLOG
-        format.
-        CTN(tm) Extrinsic entry that  converts  the  argument  to  $HOROLOG
-        format.
-4 Input_Vars
-   Input Variables
-
-        %DT Contains input date in either $HOROLOG or mm/dd/[yy]yy format,
-        depending on the format expected by the utility entry point.
-        %TM Contains input time in either $HOROLOG  or  [h]h:mm:ss  format,
-        depending on the format expected by the utility entry point.
-4 Output_Vars
-   Output Variables
-
-        %DAT Contains converted output date,
-        %TIM Contains converted output time,
-4 Ex_of_H
-   Examples of %H
-
-   Example:
-
-
-   GTM>SET %DT=+$H DO %CDS^%H
-
-   GTM>ZWRITE
-
-   %DAT="10/20/2002"
-
-   %DT=59097
-
-   This example sets %DT to  the  current  date  in  $HOROLOG  format  and
-   converts it to mm/dd/yyyy format by invoking %H at the label  %CDS.  %H
-   returns the converted date in the variable %DAT.  ZWRITE  displays  the
-   contents of the variables.
-
-   Example:
-
-
-   GTM>SET %DT="10/20/2002" DO %CDN^%H
-
-   GTM>ZWRITE
-
-   %DAT=59097
-
-   %DT="10/20/2002"
-
-   This example sets the variable %DT to a date in mm/dd/yyyy  format  and
-   invokes %H at the label %CDN. %H returns  the  converted  date  in  the
-   variable %DAT. ZWRITE displays the contents of the variables.
-
-   Example:
-
-
-   GTM>SET %TM=$P($H,",",2) DO %CTS^%H
-
-   GTM>ZWRITE
-
-   %TIM="17:41:18"
-
-   %TM=63678
-
-   This example sets the variable %TM to  the  current  time  in  $HOROLOG
-   format using a $PIECE() function to return only  those  digits  of  the
-   $HOROLOG string that represent the time. The example then invokes %H at
-   the label %CTS. %H returns the converted time  in  the  variable  %TIM.
-   ZWRITE displays the contents of the variables.
-
-   Example:
-
-
-   GTM>SET %TM="17:41:18" DO %CTN^%H
-
-   GTM>ZWRITE
-
-   %TIM=63678
-
-   %TM="17:41:18"
-
-   This example sets the variable %TM to a time in  hh:mm:ss  format,  and
-   invokes %H at the label %CTN. %H returns  the  converted  time  in  the
-   variable %TIM. ZWRITE displays the contents of the variables.
-
-   Example:
-
-
-   GTM>WRITE $$CDS^%H(59130)
-
-   11/22/2002
-   This invokes CDS^%H as an extrinsic function to  convert  the  external
-   argument to external date format.
-
-   Example:
-
-
-   GTM>WRITE $ZDATEFORM
-
-   1980
-   GTM>WRITE $$CDN^%H("10/20/02")
-
-   59097
-   GTM>WRITE $ZDATE(59097)
-
-   10/20/2002
-   GTM>WRITE $$CDN^%H("10/20/92")
-
-   55445
-   GTM>WRITE $ZDATE(55445)
-
-   10/20/1992
-   This example shows the use of a year limit  in  $ZDATEFORM.  Two  digit
-   years are interpreted to be in the  interval  of  1980  -  2079;  since
-   $ZDATEFORM is 1980, the input year "02" is interpreted  as  "2002"  and
-   "92" is interpreted as "1992". This example invokes CDN^%H  to  convert
-   the argument in mm/dd/yy format to $HOROLOG format. $ZDATE() is used to
-   conver the $HOROLOG format date to mm/dd/yyyy format.
-
-3 T_
-   %T
-
-
-   The %T utility displays the current time in [h]h:mm AM/PM. If a routine
-   uses this function repetitively, put the utility code directly into the
-   M program.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Sets %TIM to current time in [h]h:mm AM/PM format.
-        FUNC[()] Invokes an extrinsic function returning the current time.
-4 Output_Vars
-   Output Variables
-
-   %TIM Contains current time in [h]h:mm AM/PM format.
-
-
-4 Ex_of_T
-   Examples of %T
-
-   Example:
-
-
-   GTM>DO ^%T
-
-   8:30 AM
-   This example invokes %T, which prints the current time and does not set
-   %TIM.
-
-   Example:
-
-
-   GTM>DO INT^%T
-
-   GTM>ZWRITE
-
-   %TIM="8:30 AM"
-
-   This example invokes INT^%T,  which  sets  the  variable  %TIM  to  the
-   current time. ZWRITE displays the contents of the variable.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%T
-
-   8:30 AM
-   This example invokes FUNC as an extrinsic function, which  returns  the
-   current time.
-
-3 TI
-   %TI
-
-
-   The %TI utility converts time to $HOROLOG format. The  $HOROLOG  format
-   represents time as the number of seconds since  midnight.  %TI  returns
-   the converted time in the variable %TN. The routine  has  entry  points
-   for interactive or non-interactive use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Non-interactively converts %TS to $HOROLOG format;  if  %TS  is
-        not defined, then current time is converted.
-        FUNC[(ts)] Invokes an extrinsic function returning $HOROLOG format
-        of the argument, or if no argument,  the  $HOROLOG  format  of  the
-        current time.
-4 Prompts
-   Prompts
-
-        Time: Requests time in [h]h:mm:ss format  to  convert  to  $HOROLOG
-        format.
-4 Input_Vars
-   Input Variables
-
-        %TS Contains input time.
-4 Output_Vars
-   Output Variables
-
-        %TN Contains output time in $HOROLOG format
-4 Ex_of_TI
-   Examples of %TI
-
-   Example:
-
-
-   GTM>DO ^%TI
-
-   Time: 4:02 PM
-
-   GTM>ZWRITE
-
-   %TN=57720
-
-   This example invokes %TI,  which  prompts  for  an  input  time.  Press
-   <RETURN> to convert the current time. ZWRITE displays the  contents  of
-   the output variable.
-
-   Example:
-
-
-   GTM>ZWRITE
-
-   GTM>DO INT^%TI
-
-   GTM>ZWRITE
-
-   %TN=40954
-
-   This  example  invokes  INT^%TI  to  convert  the  current  time
-   non-interactively. ZWRITE displays the contents of the output variable
-   %TN.
-
-   Example:
-
-
-   GTM>SET %TS="8:30AM"
-
-   GTM>DO INT^%TI
-
-   GTM>ZWRITE
-
-   %TN=30600
-
-   %TS="8:30AM"
-
-   This example sets the variable %TS prior to invoking INT^%TI. %TI uses
-   %TS as the input time. ZWRITE displays the contents of the variables.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%TI("8:30AM")
-
-   30600
-   This example invokes %TI  as  an  extrinsic  function  to  convert  the
-   supplied time to $HOROLOG  format.  If  there  is  no  argument  (i.e.,
-   $$FUNC^%TI), %TI converts the current time.
-
-3 TO
-   %TO
-
-
-   The %TO utility converts the input time from $HOROLOG format to [h]h:mm
-   AM/PM format. Put the utility code directly into the M program  if  the
-   routine uses this function repetitively.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts non-interactively %TS, or if %TS is  not  defined  the
-        current time to [h]h:mm AM/PM format.
-4 Input_Vars
-   Input Variables
-
-        %TN Contains input time in $HOROLOG format.
-4 Output_Vars
-   Output Variables
-
-        %TS Contains output time in [h]h:mm AM/PM format.
-4 Ex_of_TO
-   Examples of %TO
-
-   Example:
-
-
-   GTM>DO INT^%TI,^%TO
-
-   GTM>ZWRITE
-
-   %TN=62074
-
-   %TS="5:14 PM"
-
-   This example invokes INT^%TI to set %TN to the current time and invokes
-   %TO to convert the time contained in %TN to the [h]h:mm  AM/PM  format.
-   %TO returns the converted time in the variable %TS. ZWRITE displays the
-   contents of the variables.
-
-2 Conversion_Util
-   Conversion Utilities
-
-   The conversion utilities are:
-
-        %DH Decimal to hexadecimal conversion.
-        %DO Decimal to octal conversion.
-        %HD Hexadecimal to decimal conversion.
-        %HO Hexadecimal to octal conversion.
-        %LCASE Converts a string to all lower case.
-        %OD Octal to decimal conversion.
-        %OH Octal to hexadecimal conversion.
-        %UCASE Converts a string to all upper case.
-   The conversion utilities can be invoked as extrinsic functions.
-
-   Some of these conversions may be  performed  by  VMS  run-time  library
-   routines. If you  need  to  use  the  numeric  utilities  as  extrinsic
-   functions  frequently,  consider  calling  the  VMS  run-time  library
-   routines using the GT.M  $ZCALL  function.  Refer  to  the  "Functions"
-   chapter in GT.M Programmer's Guide for further information on $ZCALL().
-
-
-   The  "%"  sign  has  been  removed  from  the  topic  headings  below,
-   intentionally.
-
-3 DH
-   %DH
-
-
-   The %DH utility converts numeric values from  decimal  to  hexadecimal.
-   %DH defaults the length of its output  to  eight  digits.  However  the
-   input variable %DL overrides the default and controls the length of the
-   output. The routine has entry points for interactive or non-interactive
-   use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts interactively entered decimal  number  to  hexadecimal
-        number with the number of digits specified.
-        FUNC(d[,l]) Invokes %DH as  an  extrinsic  function  returning  the
-        hexadecimal equivalent of the argument.
-4 Input_Vars
-   Input Variables
-
-        %DH As input, contains input decimal number.
-        %DL Specifies how many digits appear in  the  output,  defaults  to
-        eight.
-4 Prompts
-   Prompts
-
-        Decimal: Requests a decimal number for conversion to hexadecimal.
-        Digits: Requests the length of  the  output  in  digits;  eight  by
-        default.
-4 Output_Vars
-   Output Variables
-
-        %DH As output, contains the converted number in hexadecimal.
-4 Ex_of_DH
-   Examples of %DH
-
-   Example:
-
-
-   GTM>DO INT^%DH
-
-   Decimal: 12
-
-   Digits: 1
-
-   GTM>ZWRITE
-
-   %DH="C"
-
-   This example invokes %DH interactively with INT^%DH. %DH prompts for a
-   decimal number and output  length,  then  returns  the  result  in  the
-   variable %DH. ZWRITE displays the contents of the variables.
-
-   Example:
-
-
-   GTM>SET %DH=12
-
-   GTM>DO ^%DH
-
-   GTM>ZWRITE
-
-   %DH="0000000C"
-
-   %DL=8
-
-   This example sets the read-write variable %DH to 12 and invokes %DH to
-   convert the number to a  hexadecimal  number.  Because  the  number  of
-   digits was not specified, %DH used the default of 8 digits. Set %DL to
-   specify the number of output digits.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%DH(12,4)
-
-   000C
-   This example invokes %DH as an extrinsic function using the FUNC label.
-   The first argument specifies the input decimal number and the optional,
-   second argument specifies the number of output digits. If the extrinsic
-   does not have a second argument, the length of the output  defaults  to
-   eight characters.
-
-3 DO
-   %DO
-
-
-   The %DO utility converts numeric values  from  decimal  to  octal.  The
-   default length of its output is 12 digits. The value  assigned  to  the
-   input variable %DL overrides the default and controls the length of the
-   output. The routine has entry points for interactive or non-interactive
-   use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts the specified decimal number to an octal  number  with
-        the specified number of digits, interactively.
-        FUNC(d[,ln]) Invokes %DO as an extrinsic  function,  returning  the
-        octal equivalent of the argument.
-4 Prompts
-   Prompts
-
-        Decimal: Requests a decimal number for conversion to octal.
-        Digits: Requests the length of the output in digits; 12 by default.
-4 Input_Vars
-   Input Variables
-
-        %DO As input, contains input decimal number.
-        %DL Specifies the number of digits in the output, defaults to 12.
-4 Output_Vars
-   Output Variables
-
-        %DO As output, contains the converted number in octal.
-4 Ex_of_DO
-   Examples of %DO
-
-   Example:
-
-
-   GTM>DO INT^%DO
-
-   Decimal: 12
-
-   Digits: 4
-
-   GTM>ZWRITE
-
-   %DO="0014"
-
-   This example invokes %DO interactively with INT^%DO. %DO prompts for a
-   decimal number and an output length. If the output  value  of  %DO  has
-   leading zeros, the value is a string. ZWRITE displays the  contents  of
-   the variables.
-
-   Example:
-
-
-   GTM>SET %DO=12
-
-   GTM>DO ^%DO
-
-   GTM>ZWRITE
-
-   %DO="000000000014"
-
-   This example sets the read-write variable %DO to 12 and invokes %DO to
-   convert the number non-interactively. Because the number of digits was
-   not specified, %DO used the default of 12 digits. Set  %DL  to  specify
-   the number of output  digits.  ZWRITE  displays  the  contents  of  the
-   variables.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%DO(12,7)
-
-   0000014
-   This example invokes %DO as an extrinsic function with the label FUNC.
-   The first argument  specifies  the  number  to  be  converted  and  the
-   optional, second argument specifies the number of output digits. If the
-   second argument is not specified, %DO uses the default of 12 digits.
-
-3 HD
-   %HD
-
-
-   The %HD utility converts numeric values from  hexadecimal  to  decimal.
-   %HD returns the decimal number in  the  read-write  variable  %HD.  %HD
-   rejects input numbers beginning with a minus (-) sign and returns null
-   (""). The routine has entry points for interactive  or  non-interactive
-   use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts hexadecimal number entered  interactively  to  decimal
-        number.
-        FUNC(h) Invokes %HD as an extrinsic function returning the decimal
-        equivalent of the argument.
-4 Prompts
-   Prompts
-
-        Hexadecimal:  Requests  a  hexadecimal  number  for  conversion  to
-        decimal.
-4 Input_Vars
-   Input Variables
-
-        %HD As input, contains input hexadecimal number.
-4 Output_Vars
-   Output Variables
-
-        %HD As output, contains the converted number in decimal.
-4 Ex_of_HD
-   Examples of %HD
-
-   Example:
-
-
-   GTM>DO INT^%HD
-
-   Hexadecimal:E
-
-   GTM>ZWRITE
-
-   %HD=14
-
-   This example invokes %HD in interactive mode with INT^%HD. %HD prompts
-   for a hexadecimal number, then returns  the  converted  number  in  the
-   variable %HD. ZWRITE displays the contents of the variable.
-
-   Example:
-
-
-   GTM>SET %HD="E"
-
-   GTM>DO ^%HD
-
-   GTM>ZWRITE
-
-   %HD=14
-
-   This example sets the read-write variable %HD to "E" and invokes %HD to
-   convert non-interactively the value of %HD to  a  decimal  number.  %HD
-   places the converted value into the read-write variable %HD.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%HD("E")
-
-   14
-   This example invokes %HD as an extrinsic function with the  label  FUNC
-   and writes the results.
-
-3 HO
-   %HO
-
-
-   The %HO utility converts numeric values from hexadecimal to octal. %HO
-   returns the octal number in the read-write variable  %HO.  %HO  rejects
-   input numbers beginning with a minus (-) sign and  returns  null  ("").
-   The routine has entry points for interactive or non-interactive use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts hexadecimal  number  entered  interactively  to  octal
-        number.
-        FUNC(h) Invokes %HO as an extrinsic function  returning  the  octal
-        equivalent of the argument.
-4 Prompts
-   Prompts
-
-        Hexadecimal: Requests a hexadecimal number for conversion to octal.
-4 Input_Vars
-   Input Variables
-
-        %HO As input, contains input hexadecimal number.
-4 Output_Vars
-   Output Variables
-
-        %HO As output, contains the converted number in octal.
-4 Ex_of_HO
-   Examples pf %HO
-
-   Example:
-
-
-   GTM>DO INT^%HO
-
-   Hexadecimal:C3
-
-   GTM>ZWRITE
-
-   %HO=303
-
-   This example invokes %HO in interactive mode using INT^%HO. %HO prompts
-   for a hexadecimal number that it converts to an  octal  number.  ZWRITE
-   displays the contents of the variable.
-
-   Example:
-
-
-   GTM>SET %HO="C3"
-
-   GTM>DO ^%HO
-
-   GTM>ZWRITE
-
-   %HO=303
-
-   This example sets the read-write variable %HO to "C3" and  invokes  %HO
-   to convert the value of  %HO  non-interactively.  ZWRITE  displays  the
-   contents of the variable.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%HO("C3")
-
-   303
-   This example invokes %HO as an extrinsic function with the FUNC label.
-
-3 LCASE
-   %LCASE
-
-
-   The %LCASE utility converts a string to all lower-case  letters.  If  a
-   routine uses this function repetitively, put the utility code directly
-   into the M program.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts interactively a string to lower-case.
-        FUNC(s) Invokes %LCASE  as  an  extrinsic  function  returning  the
-        lower-case form of the argument.
-4 Prompts
-   Prompts
-
-        String: Requests a string for conversion to lower case.
-4 Input_Vars
-   Input Variables
-
-        %S As input, contains string to be converted to lower case.
-4 Output_Vars
-   Output Variables
-
-        %S As output, contains the converted string in lower case.
-4 Ex_of_LCASE
-   Examples of %LCASE
-
-   Example:
-
-
-   GTM>DO INT^%LCASE
-
-   String: LABEL
-
-   Lower: label
-
-   This example invokes  %LCASE  in  interactive  mode  using  INT^%LCASE.
-   %LCASE prompts for a string that it converts to all lower case.
-
-   Example:
-
-
-   GTM>SET %S="Hello"
-
-   GTM>do ^%LCASE
-
-   GTM>zwrite
-
-   %S="hello"
-
-   This example sets the variable %S to the  string  "Hello"  and  invokes
-   %LCASE non-interactively to convert the string.
-
-   Example:
-
-
-   GTM>SET ^X="Hello"
-
-   GTM>WRITE $$FUNC^%LCASE(^X)
-
-   hello
-
-   This example sets the variable ^X to the  string  "Hello"  and  invokes
-   %LCASE as an extrinsic function that returns "hello" in lower case.
-
-3 OD
-   %OD
-
-
-   The %OD utility converts numeric values  from  octal  to  decimal.  %OD
-   returns the decimal number in the read-write variable %OD. %OD rejects
-   input numbers beginning with a minus (-) sign and  returns  null  ("").
-   The routine has entry points for interactive or non-interactive use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts octal number entered interactively to decimal number.
-        FUNC(oct) Invokes  %OD  as  an  extrinsic  function  returning  the
-        decimal equivalent of the argument.
-4 Prompts
-   Prompts
-
-        Octal: Requests an octal number for conversion to decimal.
-4 Input_Vars
-   Input Variables
-
-        %OD As input, contains input octal number.
-4 Output_Vars
-   Output Variables
-
-        %OD As output, contains the converted number in decimal.
-4 Ex_of_OD
-   Examples of %OD
-
-   Example:
-
-
-   GTM>DO INT^%OD
-
-   Octal:14
-
-   GTM>ZWRITE
-
-   %OD=12
-
-   This example invokes INT^%OD to interactively convert the octal number
-   entered. %OD prompts for an octal number that it converts to a decimal.
-   %OD returns the converted value in the variable %OD.
-
-   Example:
-
-
-   GTM>SET %OD=14
-
-   GTM>DO ^%OD
-
-   GTM>ZWRITE
-
-   %OD=12
-
-   This example sets the read-write variable %OD to 14 and invokes %OD to
-   convert the number non-interactively. ZWRITE displays the  contents  of
-   the variables.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%OD(14)
-
-   12
-   This example invokes %OD as an extrinsic function with the FUNC label.
-   The argument specifies the number to be converted.
-
-3 OH
-   %OH
-
-
-   The %OH utility converts numeric values from octal to hexadecimal. %OH
-   returns the hexadecimal number in  the  read-write  variable  %OH.  %OH
-   rejects input numbers beginning with a minus (-) sign. The routine has
-   entry points for interactive or  non-interactive  use.  In  interactive
-   mode, %OH rejects non-octal numbers with the following message, "Input
-   must be an octal number". In non-interactive mode, %OH returns  a  null
-   string ("") upon encountering a non-octal number.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts interactively  octal  number  entered  to  hexadecimal
-        number.
-        FUNC(oct) Invokes  %OH  as  an  extrinsic  function  returning  the
-        hexadecimal equivalent of the argument.
-4 Prompts
-   Prompts
-
-        Octal: Requests an octal number for conversion to hexadecimal.
-4 Input_Vars
-   Input Variables
-
-        %OH As input, contains input octal number.
-4 Output_Vars
-   Output Variables
-
-        %OH As output, contains the converted number in hexadecimal.
-4 Ex_of_OH
-   Examples of %OH
-
-   Example:
-
-
-   GTM>DO INT^%OH
-
-   Octal:16
-
-   GTM>ZWRITE
-
-   %OH="E"
-
-   This example invokes %OH in interactive mode using INT^%OH. %OH prompts
-   for an octal number that it converts to a  hexadecimal  number.  ZWRITE
-   displays the contents of the variable.
-
-   Example:
-
-
-   GTM>SET %OH=16
-
-   GTM>DO ^%OH
-
-   GTM>ZWRITE
-
-   %OH="E"
-
-   This example sets the read-write variable %OH to 16 and invokes %OH to
-   convert  the  value  of  %OH  non-interactively.  ZWRITE  displays  the
-   contents of the variable.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%OH(16)
-
-   E
-
-   This example invokes %OH as an extrinsic function with the FUNC label.
-
-3 UCASE
-   %UCASE
-
-
-   The %UCASE utility converts a string to all upper-case  letters.  If  a
-   routine uses this function repetitively, put the utility code directly
-   into the M program.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Converts a string to upper case interactively.
-        FUNC(s) Invokes %UCASE as  an  extrinsic  function,  returning  the
-        upper-case form of the argument.
-4 Prompts
-   Prompts
-
-        String: Requests a string for conversion to upper case.
-4 Input_Vars
-   Input Variables
-
-        %S As input, contains string to be converted to upper case.
-4 Output_Vars
-   Output Variables
-
-        %S As output, contains the converted string in upper case.
-4 Ex_of_UCASE
-   Examples of %UCASE
-
-   Example:
-
-
-   GTM>DO INT^%UCASE
-
-   String: test
-
-   Upper: TEST
-
-   This example invokes  %UCASE  in  interactive  mode  using  INT^%UCASE.
-   %UCASE prompts for a string that it converts to all upper case.
-
-   Example:
-
-
-   GTM>SET ^X="hello"
-
-   GTM>WRITE $$FUNC^%UCASE(^X)
-
-   HELLO
-
-   This example sets the variable X to  the  string  "hello"  and  invokes
-   %UCASE as an extrinsic function that returns "HELLO" in upper case.
-
-2 Math_Util
-   Mathematic Utilities
-
-   The mathematic utilities are:
-
-        %EXP Raises one number to the power of another number.
-        %SQROOT Calculates the square root of a number.
-   The mathematic utilities can be invoked as extrinsic functions.
-
-   These mathematic routines may be  performed  by  VMS  run-time  library
-   routines. If  you  often  need  to  use  the  mathematic  utilities  as
-   extrinsic  functions,  consider  calling  the  VMS  run-time  library
-   routines, using the GT.M $ZCALL function. For information on $ZCALL(),
-   refer to the "Functions" chapter in GT.M Programmer's Guide.
-
-   The  "%"  sign  has  been  removed  from  the  topic  headings  below,
-   intentionally.
-
-3 EXP
-   %EXP
-
-
-   The %EXP utility raises one number provided to  the  power  of  another
-   number provided. While this utility provides an  interactive  interface
-   for exponential calculations, most production code would perform inline
-   calculation with the "**" operator. The routine has  entry  points  for
-   interactive or non-interactive use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT  Calculates  a  number  to  the  power  of  another  number
-        interactively.
-        FUNC(i,j) Invokes %EXP as an extrinsic function returning the first
-        argument raised to the power of the second argument.
-4 Prompts
-   Prompts
-
-        Power: Requests an exponent or power.
-        Number: Requests a base number to raise by the power.
-4 Input_Vars
-   Input Variables
-
-        %I As input, contains number to be raised to a power.
-        %J Contains exponential power by which to raise %I.
-4 Output_Vars
-   Output Variables
-
-        %I As output, contains the result of the exponential calculation.
-4 Ex_of_EXP
-   Examples of %EXP
-
-   Example:
-
-
-   GTM>DO INT^%EXP
-
-   Power: 3
-
-   Number: 12
-
-   12 raised to 3 is 1728
-   This example invokes %EXP in  interactive  mode  using  INT^%EXP.  %EXP
-   prompts for an exponent (power) and a base number.
-
-   Example:
-
-
-   GTM>SET %I=2,%J=9
-
-   GTM>DO ^%EXP
-
-   GTM>ZWRITE
-
-   %I=512
-
-   %J=9
-
-   This example sets the read-write variable %I to 2, variable  %J  to  9,
-   and invokes %EXP to calculate the result. ZWRITE displays the contents
-   of the variables. %I contains the result.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%EXP(2,9)
-
-   512
-   This example invokes %EXP as an extrinsic function with the label FUNC.
-
-
-3 SQROOT
-   %SQROOT
-
-
-   The %SQROOT utility calculates the square root of  a  number  provided.
-   While this utility provides an interactive interface for taking square
-   roots, most production code would perform inline calculation by raising
-   a number to the .5 power (n**.5). The  routine  has  entry  points  for
-   interactive or non-interactive use.
-
-4 Util_Labels
-   Utility Labels
-
-        INT Calculates the square root of a number interactively.
-        FUNC(s) Invokes %SQROOT as  an  extrinsic  function  returning  the
-        square root of the argument.
-4 Prompts
-   Prompts
-
-        The square root of: Requests a number.
-4 Input_Vars
-   Input Variables
-
-        %X Contains the number for which to calculate the square root.
-4 Output_Vars
-   Output Variables
-
-        %Y Contains the square root of %X.
-4 Ex_of_SQROOT
-   Examples of %SQROOT
-
-   Example:
-
-
-   GTM>SET %X=81
-
-   GTM>DO ^%SQROOT
-
-   GTM>ZWRITE
-
-   %X=81
-
-   %Y=9
-
-   This example sets  the  variable  %X  to  81  and  invokes  %SQROOT  to
-   calculate  the  square  root  non-interactively.  ZWRITE  displays  the
-   contents of the variables.
-
-   Example:
-
-
-   GTM>DO INT^%SQROOT
-
-   The square root of: 81 is: 9
-
-   The square root of: <RETURN>
-
-   GTM>
-
-   This example invokes  INT^%SQROOT  interactively  that  prompts  for  a
-   number. The square root of the number appears on the same line. %SQROOT
-   then prompts for another number. Press <RETURN> to exit.
-
-   Example:
-
-
-   GTM>WRITE $$FUNC^%SQROOT(81)
-
-   9
-   This example invokes %SQROOT as an extrinsic function  with  the  label
-   FUNC.
-
-2 Glob_Util
-   Global Utilities
-
-   The Global utilities are:
-
-        %G Displays global variables and their values.
-        %GC Copies a global or global sub-tree.
-        %GCE Replaces a specified value or part of a  value  in  a  set  of
-        variables.
-        %GD Displays existing  globals  in  the  current  global  directory
-        without displaying their values or descendants.
-        %GED Provides full-screen editing capabilities for global variables
-        and values.
-        %GI Loads global data from a sequential file into a GT.M database.
-        %GO Extracts global data from a GT.M  database  into  a  sequential
-        file.
-        %GSE Displays global variables and their  values  when  the  values
-        contain a specified string or number.
-        %GSEL Selects globals.
-   The  "%"  sign  has  been  removed  from  the  topic  headings  below,
-   intentionally.
-
-3 G_
-   %G
-
-
-   The %G utility  displays  names,  descendants  and  values  of  globals
-   currently existing in the database. Use %G to examine global variables
-   and their values. Enter a question mark (?) at any  prompt  to  display
-   help information.
-
-4 Prompts
-   Prompts
-
-        Output Device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-        List ^ Requests the name, in ZWRITE format, of a global to display.
-4 Ex_of_G
-   Examples of %G
-
-   Example:
-
-
-   GTM>do ^%G
-
-   Output Device: <terminal>: <RETURN>
-
-   List ^C
-
-   ^C="CLASS"
-
-   ^C(1)="MARY"
-
-   ^C(1,2)="MATH"
-
-   ^C(1,2,1)=80
-
-   ^C(1,3)="BIO"
-
-   ^C(1,3,1)=90
-
-   ^C(2)="JOHN"
-
-   ^C(3)="PETER"
-
-   List ^ <RETURN>
-
-   GTM>
-
-   This example lists the nodes of global ^C. %G displays the  global  and
-   its descendants and values, if the node exists.
-
-   Example:
-
-
-   GTM>do ^%G
-
-   Output Device: <terminal>: <RETURN>
-
-   List ^C(1)
-
-   ^C(1)="MARY"
-
-   This example lists only the node entered and its value.
-
-   Example:
-
-
-   GTM>do ^%G
-
-   Output Device: <terminal>: <RETURN>
-
-   List ^C(1,*)
-
-   ^C(1)="MARY"
-
-   ^C(1,2)="MATH"
-
-   ^C(1,2,1)=80
-
-   ^C(1,3)="BIO"
-
-   ^C(1,3,1)=90
-
-   List ^ <RETURN>
-
-   GTM>
-
-   This example uses the asterisk (*) wildcard to  list  node  ^C(1),  its
-   descendants and values.
-
-   Example:
-
-
-   GTM>do ^%G
-
-   Output Device: <terminal>: <RETURN>
-
-   List ^?D
-
-   Global Directory
-
-   Global ^ <RETURN>
-
-   ^C ^D ^S ^Y ^a
-
-   Total of 5 globals.
-
-   List ^
-
-   GTM>
-
-   This example specifies "?D" as the global that invokes the %GD utility.
-   %GD displays existing globals in the current global  directory  without
-   displaying their values or descendants.
-
-3 GC_
-   %GC
-
-
-   The %GC utility copies values of globals from one global to another. It
-   is useful for testing and for moving misfiled data.
-
-4 Prompts
-   Prompts
-
-        Show copied nodes <Yes>?
-        Asks whether to display the "source nodes" on the principal device.
-        From global ^ Requests a global variable name from  which  to  copy
-        variable and descendants.
-        To global ^ Request a global variable name to receive the copy.
-4 Ex_of_GC
-   Example:
-
-
-   GTM>do ^%GC
-
-   Global copy
-
-   Show copied nodes <Yes>? <RETURN>
-
-   From global ^b
-
-   To global ^g
-
-   ^g(1)=1
-
-   ^g(2)=2
-
-   ^g(3)=3
-
-   Total 3 nodes copied.
-
-   From global ^<RETURN>
-
-   GTM>
-
-   This example makes a copy of the nodes  and  values  of  global  ^b  to
-   global ^g.
-
-3 GCE
-   %GCE
-
-
-   The %GCE utility changes every occurrence of a string within  the  data
-   of selected global nodes to a replacement  string.  ^%GCE  changes  the
-   string in each place it occurs, even if  it  forms  part  of  a  longer
-   string. For example, changing the string 12 to 55 changes 312 to 355.
-
-4 Prompts
-   Prompts
-
-        Global ^ Requests (using %GSEL)  the  name(s)  of  the  globals  to
-        change; <RETURN> ends selection.
-        Old string: Requests an existing string to find.
-        New string: Requests the replacement string.
-        Show changed nodes <Yes>?
-        Asks whether to display the before and after versions  of  modified
-        nodes on the current device.
-        Output Device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-4 Ex_of_GCE
-   Examples of %GCE
-
-   Example:
-
-
-   GTM>DO ^%GCE
-
-   Global Change Every occurrence
-
-   Global ^a:^b
-
-   ^a ^b
-
-   Current total of 2 globals.
-
-   Global ^ <RETURN>
-
-   Old String: hello
-
-   New String: good-bye
-
-   Show changed nodes <Yes>?: <RETURN>
-
-   Output Device: <terminal>: <RETURN>
-
-   ^a
-
-   No changes made in total 1 nodes.
-
-   ^b
-
-   ^b(10)
-
-   Was : hello Adam
-
-   Now : good-bye Adam
-
-   1 changes made in total 25 nodes.
-   Global ^ <RETURN>
-
-   GTM>
-
-   This example searches a range of globals and  its  nodes  for  the  old
-   string value entered.  GT.M  searches  each  global  and  displays  the
-   changes and number of nodes changed and checked.
-
-   Example:
-
-
-   GTM>set ^b(12)=12
-
-   GTM>set ^b(122)=122
-
-   GTM>set ^b(30)=656
-
-   GTM>set ^b(45)=344
-
-   GTM>set ^b(1212)=012212
-
-   GTM>DO ^%GCE
-
-   Global Change Every occurrence
-
-   Global ^b
-
-   Current total of 1 global.
-
-   Global ^ <RETURN>
-
-   Old String: 12
-
-   New String: 35
-
-   Show changed nodes <Yes>?: <RETURN>
-
-   Output Device: <terminal>: <RETURN>
-
-   ^b(12)
-
-   Was : 12
-
-   Now : 35
-
-   ^b(122)
-
-   Was : 122
-
-   Now : 352
-
-   ^b(1212)
-
-   Was : 12212
-
-   Now : 35235
-
-   5 changes made in total 5 nodes
-   Global ^ <RETURN>
-
-   GTM>DO ^%G
-
-   Output device: <terminal>: <RETURN>
-
-   List ^b
-
-   ^b(12)=35
-
-   ^b(30)=656
-
-   ^b(45)=344
-
-   ^b(122)=352
-
-   ^b(1212)=35235
-
-   This example shows that executing %GCE replaces all occurrences of "12"
-   in the data stored in the global ^b with "35" and displays the affected
-   nodes before and after the change. Then the %G demonstrates  that  "12"
-   as data was changed, while "12" in the subscripts remained untouched.
-
-3 GD
-   %GD
-
-
-   The %GD  utility  displays  existing  globals  in  the  current  global
-   directory without displaying their values or descendants.
-
-   %GD prompts for a global name and redisplays the name  if  that  global
-   exists.
-
-   %GD allows the wildcard characters asterisk (*) and percent  sign  (%).
-   The  wildcards  carry  their  DCL  meanings  with  one  exception.  %GD
-   interprets a percent sign (%) in the first position of  a  global  name
-   literally.
-
-   A colon (:)  between  two  globals  specifies  a  range.  %GD  displays
-   existing globals within that range.
-
-   After each selection %GD reports the number of globals selected by the
-   input.
-
-   A question mark (?) entered at  a  prompt  displays  help  information.
-   Pressing <RETURN> exits %GD.
-
-4 Prompts
-   Prompts
-
-        Global ^  Requests  (using  %GSEL)  a  global  name  with  optional
-        wildcards or a range of names; <RETURN> terminates %GD.
-4 Ex_of_GD
-   Exampels of %GD
-
-   Example:
-
-
-   GTM>DO ^%GD
-
-   Global directory
-
-   Global ^k
-
-   ^k
-
-   Total of 1 global.
-
-   Global ^ <RETURN>
-
-   GTM>
-
-   This example verifies that ^k exists in the global directory.
-
-   Example:
-
-
-   GTM>DO ^%GD
-
-   Global directory
-
-   Global ^C:S
-
-   ^C ^D ^S
-
-   Total of 3 globals
-
-   Global ^ <RETURN>
-
-   GTM>
-
-   This example displays a range of globals that exist from ^C to ^S.
-
-   Example:
-
-
-   GTM>DO ^%GD Global directory
-
-   Global ^*
-
-   ^C ^D ^S ^Y ^a
-
-   Total of 5 globals
-
-   Global ^ <RETURN>
-
-   GTM>
-
-   The asterisk (*) wildcard at the Global ^ prompt displays  all  globals
-   in the global directory.
-
-3 GED
-   %GED
-
-
-   The %GED utility enables you to  edit  the  globals  in  a  full-screen
-   editor environment. %GED invokes your  default  TPU  editor.  When  you
-   finish the edit, use <CTRL-Z> or an EXIT command to exit.
-
-4 Prompts
-   Prompts
-
-        Edit ^ Requests the name, in ZWRITE format, of a global to edit.
-   Only one global can be edited at  a  time  with  %GED,  refer  to  GT.M
-   Programmer's Guide for descriptions of valid input for subscripts.
-
-4 Ex_of_GED
-   Examples of %GED
-
-   Example:
-
-
-   GTM>DO ^%GED
-
-   Edit ^b
-
-   Beginning screen:
-
-   ^b(1)="melons"
-
-   ^b(2)="oranges"
-
-   ^b(3)="bananas"
-
-<End of File>
-   Screen with a change to  ^b(1),  elimination  of  ^b(3),  and  two  new
-   entries ^b(4) and ^b(5):
-
-   ^b(1)="apples"
-
-   ^b(2)="oranges"
-
-   ^b(4)=pears
-
-   ^b(5)="grapes"
-
-<End of File>
-
-   %GED responds:
-
-
-   Invalid syntax: b(4)=pears
-
-   return to continue:
-
-   After screen:
-
-   ^b(1)="apples"
-
-   ^b(2)="oranges"
-
-   ^b(4)="pears"
-
-   ^b(5)="grapes"
-
-<End of File>
-   %GED responds:
-
-
-   node : ^b
-
-   selected : 3
-
-   changed : 1
-
-   added : 2
-
-   killed : 1
-
-   Edit ^ <RETURN>
-
-   GTM>
-
-   This example shows the use of the full-screen editor  to  change,  add,
-   and delete (kill) nodes. When you exit from the editor, %GED checks the
-   syntax and reports any problems. By pressing <RETURN>,  return  to  the
-   full-screen editor to fix the error. At the end of  the  session,  %GED
-   reports how many nodes were selected, changed, killed, and added.
-
-3 GI
-   %GI
-
-
-   %GI loads global variable names and  their  corresponding  data  values
-   into a GT.M database from  a  sequential  file.  %GI  uses  the  global
-   directory to determine which database files to  use.  %GI  may  operate
-   concurrently with normal GT.M database access. However, a %GI does not
-   use M LOCKs and may produce application-level integrity problems if run
-   concurrently with many applications.
-
-   The %GI utility corresponds to MUPIP LOAD. The format of the input file
-   (GO or ZWRITE) is automatically detected.
-
-4 Prompts
-   Prompts
-
-        Enter input file:
-        Requests name of a file; file should be in standard  Global  Output
-        (GO) format or Zwrite (ZWR) format .
-        OK <Yes>?: Asks for confirmation.
-4 Ex_of_GI
-   Examples of %GI
-
-   Example:
-
-
-   GTM>DO ^%GI
-
-   Global Input Utility
-
-   Input device <terminal>: DATA.GBL
-
-   Saved from user's development area
-
-   GT.M 07-MAY-2002 14:14:09
-
-   OK <Yes>? <RETURN>
-
-   ^IB ^INFO
-
-   Restored 10 nodes in 2 globals
-
-   GTM>
-
-3 GO
-   %GO
-
-
-   %GO copies specified globals from the current database to a sequential
-   output file in either GO or ZWR format. Use %GO  to  back  up  specific
-   globals or when extracting data from the database for  use  by  another
-   system. %GO uses the global directory to determine which database files
-   to use. %GO may operate concurrently with normal GT.M database access.
-   To ensure that a %GO reflects a consistent application  state,  suspend
-   database updates to all regions involved in the extract.
-
-   The %GO utility corresponds to MUPIP EXTRACT (FORMAT=GO or FORMAT=ZWR).
-
-4 Prompts
-   Prompts
-
-        Global ^ Requests (using %GSEL)  the  name(s)  of  the  globals  to
-        search; <RETURN> ends selection.
-        Header label: Requests text describing contents of extract file.
-        Output Format: GO or ZWR:
-        Requests the format to output the data. Defaults to ZWR.
-        Output Device: <terminal>:
-        Requests destination device, which may be any legal filename.
-4 Ex_of_GO
-   Examples of %GO
-
-   Example:
-
-
-   GTM>DO ^%GO
-
-   Global Output Utility
-
-   Global ^A
-
-   ^A
-
-   Current total of 1 global
-
-   Global ^<RETURN>
-
-   Header label: Revenues May, 2002
-
-   Output Format: GO or ZWR: ZWR
-
-   Output device: DEV$:[USER]OUT.GO
-
-   ^A
-
-   Total of 1 node in 1 global.
-
-   GTM>
-
-3 GSE_
-   %GSE
-
-
-   The %GSE utility finds occurrences of a string within the  data  values
-   for selected global nodes and displays the variable name and data on a
-   specified output device.
-
-4 Prompts
-   Prompts
-
-        Output Device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-        Global ^ Requests (using %GSEL)  the  name(s)  of  the  globals  to
-        search; <RETURN> ends selection.
-        String: Requests a search string.
-4 Ex_of_GSE
-   Examples of %GSE
-
-   Example:
-
-
-   GTM>do ^%GSE
-
-   Global Search For Every Occurence
-
-   Output device: <terminal>: Test.dat
-
-   Global ^a <RETURN>
-
-   ^a
-
-   Current total of 1 global.
-
-   Global ^ <RETURN>
-
-   String: Hello
-
-   ^a
-
-   ^a(10) Hello Adam
-
-   Total 1 matches found in 25 nodes.
-
-   Global ^ <RETURN>
-
-   GTM>
-
-   This example searches global ^a for the string "Hello" and displays all
-   nodes that contain that string.
-
-3 GSEL
-   %GSEL
-
-
-   The %GSEL utility selects globals. %GSEL creates a variable %ZG that is
-   a local array of the  selected  globals.  After  each  selection  %GSEL
-   displays the number of globals in %ZG.
-
-   %GSEL accepts the wildcard characters asterisk (*),  percent  sign  (%)
-   and question mark (?). The wildcards carry their DCL meanings, with one
-   exception. The wildcards question mark (?) and percent  sign  (%)  lose
-   their meanings when in the first  position  of  a  global  name.  %GSEL
-   interprets a percent sign (%) in the first position of  a  global  name
-   literally.
-
-   A colon (:) between two globals specifies a range.
-
-   A minus sign (-) or quotation mark (') preceding a global name removes
-   that global from the %ZG array. A question  mark  (?)  provides  online
-   help, and "?D" displays global names currently in the array.
-
-4 Util_Labels
-   Utility Labels
-
-        CALL Runs %GSEL without reinitializing %ZG.
-4 Output_Vars
-   Output Variables
-
-        %ZG Contains array of all globals selected.
-4 Prompts
-   Prompts
-
-        Global ^ Requests a global name with optional wildcards or a range
-        of names.
-4 Ex_of_GSEL
-   Examples of %GSEL
-
-   Example:
-
-
-   GTM>DO ^%GSEL
-
-   Global ^C
-
-   ^C
-
-   Current total of 1 global
-
-   Global ^*
-
-   ^S ^Y ^c ^class
-
-   Current total of 5 globals
-
-   Global ^-S
-
-   ^S
-
-   Current total of 4 globals
-
-   Global ^'Y
-
-   ^Y
-
-   Current total of 3 globals
-
-   Global ^?D
-
-   ^C ^c ^class
-
-   Current total of 3 globals
-
-   Global ^ <RETURN>
-
-   GTM>ZWRITE
-
-   %ZG=3
-
-   %ZG("^C")=""
-
-   %ZG("^c")=""
-
-   %ZG("^class")=""
-
-   GTM>
-
-   This example adds and subtracts  globals  from  the  list  of  selected
-   globals. "?D"  displays  all  globals  selected.  ZWRITE  displays  the
-   contents of the %ZG array.
-
-   Example:
-
-
-   GTM>DO ^%GSEL
-
-   Global ^a
-
-   ^a
-
-   Current total of 1 global.
-
-   Global ^<RETURN>
-
-   GTM>ZWRITE
-
-   %ZG=1
-
-   %ZG("^a")=""
-
-   GTM>DO CALL^%GSEL
-
-   Global ^?d
-
-   ^a
-
-   Global ^iv
-
-   ^iv
-
-   Current total of 2 globals.
-
-   Global ^<RETURN>
-
-   GTM>ZWRITE
-
-   %ZG=2
-
-   %ZG("^a")=""
-
-   %ZG("^iv")=""
-
-   GTM>
-
-   This example uses CALL^%GSEL  to  add  to  an  existing  %ZG  array  of
-   selected globals.
-
-2 Rtn_Util
-   Routine Utilities
-
-   The routine utilities are:
-
-        %FL Lists the comment lines at the beginning of source programs.
-        %RCE Replaces every occurrence of a text string with  another  text
-        string in a routine or a list of routines.
-        %RD Lists routine names available through $ZROUTINES.
-        %RI Loads routines from RO file to *.M files in GT.M format.
-        %RO Writes M source code for one or more routines to  a  sequential
-        device such as a terminal, or a disk file.
-        %RSE Searches for every occurrence of a text string in a routine or
-        a list of routines.
-        %RSEL Selects M routines and places their directories and names in
-        a local array.
-   The  "%"  sign  has  been  removed  from  the  topic  headings  below,
-   intentionally.
-
-3 FL
-   %FL
-
-
-   The %FL utility lists the comment lines  at  the  beginning  of  source
-   programs.  %FL  writes  the  routines  in  alphabetical  order  to  the
-   specified device. If the output device is not the principal device, %FL
-   displays the name of each routine on the principal device as it writes
-   the routine to the output device.
-
-   %FL uses %RSEL to select routines. For more information, refer  to  the
-   section on %RSEL in this chapter.
-
-4 Prompts
-   Prompts
-
-        Routine: Requests  the  name(s)  of  the  routines  (using  %RSEL);
-        <RETURN> ends the selection.
-        Output Device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-4 Ex_of_FL
-   Examples of %FL
-
-   Example:
-
-
-   GTM>DO ^%FL
-
-   First Line Lister
-
-   Routine: %D
-
-   %D
-
-   Current total of 1 routine.
-
-   Routine: %GS*
-
-   %GSE %GSEL
-
-   Current total of 3 routines.
-
-   Routine: - %D
-
-   %D
-
-   Current total of 2 routines.
-
-   Routine: ?D
-
-   %GSE %GSEL
-
-   Routine: <RETURN>
-
-   Output Device: <RETURN>
-
-   Routine First Line Lister Utility
-
-   GT.M 21-MAR-2002 16:44:09
-
-   %GSE
-
-   %GSE ;GT.M %GSE utility - global search
-
-   ;
-
-   %GSEL ;
-
-   %GSEL ;GT.M %GSEL utility - global select into a local array
-
-   ;
-
-   ;invoke ^%GSEL to create %ZG -  a  local  array  of  existing  globals,
-   interactively
-   ;
-
-   Total 5 lines in of 2 routines.
-
-   GTM>
-
-   This example selects %D, then selects %GSE and %GSEL and deselects %D.
-   Because the example enters <RETURN> at the Output  Device:  <terminal>:
-   prompt, the output goes to the principal device.
-
-3 RCE
-   %RCE
-
-
-   The %RCE utility replaces  every  occurrence  of  a  text  string  with
-   another text string in a routine or a list of routines.
-
-   %RCE uses %RSEL to select routines. For more information, refer to the
-   section on %RSEL in this chapter.
-
-   %RCE prompts for a text string to replace  and  its  replacement.  %RCE
-   searches for text strings in a case-sensitive  manner.  %RCE  issues  a
-   warning message if you specify a control character such as a  <TAB>  in
-   the text string or its replacement. %RCE  confirms  your  selection  by
-   displaying the text string and its replacement between a left and right
-   arrow. The arrows highlight  any  blank  spaces  that  you  might  have
-   included in the text string or its replacement.
-
-   If the output device is a file name with no  extension,  %RCE  defaults
-   the extension to .DAT. Regardless of whether you select  a  display  of
-   every change, %RCE displays the name of each routine as it is processed
-   and completes processing with a  count  of  replacements  and  routines
-   changed.
-
-4 Prompts
-   Prompts
-
-        Routine: Requests (using %RSEL) the  name(s)  of  the  routines  to
-        change; <RETURN> ends the selection.
-        Old string: Requests string to be replaced.
-        New string: Requests replacement string.
-        Show changed lines <Yes>?:
-        Asks whether to display  the  before  and  after  versions  of  the
-        modified lines on an output device.
-        Output Device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-4 Util_Labels
-   Utility Labels
-
-        CALL Works without user interaction unless %ZR is not defined.
-4 Input_Vars
-   Input Variable
-
-   The  following  input  variables  are  only  applicable  when  invoking
-   CALL^%RCE.
-
-        %ZR Contains an array of routines provided or generated with %RSEL.
-        %ZF Contains string to find.
-        %ZN Contains a replacement string.
-        %ZD Identifies the device to display the change trail, defaults to
-        principal device. Make sure you open the device if  the  device  is
-        not the principal device.
-        %ZC Truth-value indicating whether to  display  the  change  trail,
-        defaults to 0 (no).
-4 Ex_of_RCE
-   Examples of %RCE
-
-   Example:
-
-
-   GTM>DO ^%RCE
-
-   Routine Change Every occurrence
-
-   Routine: BES*
-
-   BEST BEST2 BEST3 BEST4
-
-   Current total of 4 routines
-
-   Routine: <RETURN>
-
-   Old string:^NAME
-
-   New string:^STUDENT
-
-   Replace all occurrences of:
-
->^NAME<
-   With
-
->^STUDENT<
-   Show changed lines <Yes>?: <RETURN>
-
-   Output Device: <RETURN>
-
-   USER:[SMITH.WORK]BEST.M
-
-   Was: S ^NAME=SMITH
-
-   Now: S ^STUDENT=SMITH
-
-   Was: S ^NAME(1)=JOHN
-
-   Now: S ^STUDENT(1)=JOHN
-
-   USER:[SMITH.WORK] BEST2.M
-
-   USER:[SMITH.WORK]BEST3.M
-
-   Was: S ^NAME=X
-
-   Now: S ^STUDENT=X
-
-   Was: W ^NAME
-
-   Now: W ^STUDENT
-
-   USER:[SMITH.WORK]BEST4.M
-
-   Total of 4 routines parsed.
-
-   4 occurrences changed in 2 routines.
-   GTM>
-
-   This example selects a list of routines that change the string "^NAME"
-   to the string "^STUDENT," and displays a trail of the changes.
-
-   Example:
-
-
-   GTM>DO ^%RCE
-
-   Routine Change Every occurrence
-
-   Routine: BES*
-
-   BEST BEST2 BEST3 BEST4
-
-   Current total of 4 routines
-
-   Routine: <RETURN>
-
-   Old String:<TAB>
-
-   The find string contains control characters
-
-   New string: <RETURN>
-
-   Replace all occurrences of:
-
-><TAB><
-   With:
-
-><
-   Show changed lines <Yes>?: N
-
-   BEST BEST2 BEST3 BEST4
-
-   Total 4 routines parsed.
-
-   4 occurrences changed in 2 routines.
-   GTM>
-
-   This example removes all occurrences of the <TAB>  key  from  specified
-   routines and suppresses the display trail of changes.
-
-3 RD
-   %RD
-
-
-   The %RD utility lists routine  names  accessible  through  the  current
-   $ZROUTINES. %RD  calls  %RSEL  and  displays  any  routines  accessible
-   through %RSEL. Use %RD to locate routines.
-
-   %RD accepts the wildcard characters asterisk (*) and percent sign (%).
-   The wildcards carry their  DCL  meanings,  with  one  exception.  %GSEL
-   interprets a percent sign (%) in the first position of a  routine  name
-   literally.
-
-   A colon (:) between two routine names specifies a  range  of  routines.
-   %RD displays only those routine names accessible  through  the  current
-   $ZROUTINES.
-
-   After each selection %RD displays the total number of routines listed.
-
-   Pressing <RETURN> exits %RD.
-
-4 Prompts
-   Prompts
-
-        Routine: Requests (using %RSEL) the  name(s)  of  the  routines  to
-        list; <RETURN> ends the selection.
-4 Util_Labels
-   Utility Labels
-
-        OBJ Lists object modules accessible through the current $ZROUTINES.
-        LIB Lists percent  (%)  routines  accessible  through  the  current
-        $ZROUTINES.
-        SRC  Lists  the  source  modules  accessible  through  the  current
-        $ZROUTINES (same as %RD).
-4 Ex_of_RD
-   Examples of %RD
-
-   Example:
-
-
-   GTM>DO ^%RD
-
-   Routine directory
-
-   Routine: TAXES
-
-   TAXES
-
-   Total of 1 routine
-
-   Routine:*
-
-   EMP FICA PAYROLL TAXES YTD
-
-   Total of 5 Routines
-
-   Routine: <RETURN>
-
-   GTM>
-
-   This example invokes  %RD  that  prompts  for  routine  TAXES  and  the
-   wildcard (*). %RD lists five routines accessible  through  the  current
-   $ZROUTINES.
-
-   Example:
-
-
-   GTM>DO OBJ^%RD
-
-   Routine directory
-
-   Routine:*
-
-   EMP FICA
-
-   Total of 2 routines
-
-   Routine: <RETURN>
-
-   GTM>
-
-   This example invokes %RD with the label  OBJ  that  lists  only  object
-   modules accessible through the current $ZROUTINES.
-
-   Example:
-
-
-   GTM>DO LIB^%RD
-
-   Routine directory
-
-   %D %DATE %DH %G %GD %GSEL
-
-   GTM>
-
-   This example invokes %RD with the  LIB  label  that  lists  all  the  %
-   routines accessible through the current $ZROUTINES.
-
-   Example:
-
-
-   GTM>DO SRC^%RD
-
-   Routine directory
-
-   Routine:*
-
-   DATACHG
-
-   Total of 1 routines
-
-   Routine: <RETURN>
-
-   GTM>
-
-   This example invokes %RD with the label  SRC  that  lists  only  source
-   modules accessible through the current $ZROUTINES.
-
-3 RI
-   %RI
-
-
-   %RI transforms M routines in the sequential  format  described  in  the
-   ANSI standard into individual .M files in GT.M format. Use %RI to make
-   M RO format accessible as GT.M routines.
-
-4 Prompts
-   Prompts
-
-        Formfeed delimited <No>?
-        Requests whether lines should be delimited by  formfeed  characters
-        rather than carriage returns.
-        Input Device: <terminal>:
-        Requests name of RO file containing M routines.
-        Output Directory:
-        Requests name of directory to output M routines.
-   The %RI utility corresponds to the MUPIP CONVERT command.
-
-4 Ex_of_RI
-   Examples of %RI
-
-   Example:
-
-
-   GTM>DO ^%RI
-
-   Routine Input utility - Converts RO file to *.m files
-
-   Formfeed delimited <No>? <RETURN>
-
-   Input device: <terminal>: file.ro
-
-   Files saved from FILEMAN directory
-
-   GT.M 07-MAY-2002 15:17:54
-
-   Output directory: USER:[SMITH.WORK]
-
-   DI DIA DIAO DIAI DIB DIBI
-
-   Restored 753 lines in 6 routines.
-
-   GTM>
-
-3 RO
-   %RO
-
-
-   The %RO utility writes M source code for one  or  more  routines  to  a
-   sequential device such as a disk file or a printer. %RO writes M source
-   code in a format that can be used as input to the  GT.M  utility  MUPIP
-   CONVERT.
-
-   %RO uses %RSEL to select routines. For more information, refer  to  the
-   section on %RSEL in this chapter.
-
-   %RO writes the routines in alphabetical order to the specified device.
-   %RO displays the name of each routine as it writes the routine  to  the
-   device.
-
-4 Prompts
-   Prompts
-
-        Routine: Requests (using %RSEL) the  name(s)  of  the  routines  to
-        output; <RETURN> ends selection.
-        Output device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-        Header label: Requests text to place in the first of the two header
-        records.
-        Strip comments <No>?:
-        Asks whether to remove all comment  lines  except  those  with  two
-        adjacent semicolons.
-4 Util_Labels
-   Utility Labels
-
-        CALL Works without user interaction unless %ZR is not defined.
-4 Input_Vars
-   Input Variables
-
-   The  following  input  variables  are  only  applicable  when  invoking
-   CALL^%RO.
-
-        %ZR Contains an array of routines provided or generated with %RSEL.
-        %ZD Identifies the device to display output, defaults to principal
-        device.
-4 Ex_of_RO
-   Examples of %RO
-
-   Example:
-
-
-   GTM>DO ^%RO
-
-   Routine Output - Save selected routines into RO file.
-
-   Routine: %D
-
-   %D
-
-   Current total of 1 routines.
-
-   Routine: -%D
-
-   %D
-
-   Current total of 0 routines.
-
-   Routine: BEST*
-
-   BEST BEST1 BEST2
-
-   Current total of 3 routines.
-
-   Routine: ?D
-
-   BEST BEST1 BEST2
-
-   Routine: <RETURN>
-
-   Output Device: <terminal>: $PRINTER
-
-   Header Label: Source code for the BEST modules.
-
-   Strip comments <No>?:<RETURN>
-
-   BEST BEST1 BEST2
-
-   Total of 53 lines in 3 routines
-
-   GTM>
-
-   This example adds and subtracts %D from the selection,  then  adds  all
-   routines starting with "BEST" and confirms the current  selection.  The
-   example sends output to $PRINTER, which sends the output to the system
-   printer. %RO displays the label at the beginning of  the  output  file.
-   The first record of the header label is the text entered at the prompt.
-   The second record of the header label consists of the word  "GT.M"  and
-   the current date and time.
-
-3 RSE_
-   %RSE
-
-
-   The %RSE utility searches for every occurrence of a text  string  in  a
-   routine or a list of routines.
-
-   %RSE uses %RSEL to select routines. For more information, refer to the
-   section on %RSEL in this chapter.
-
-   %RSE searches for  text  strings  are  case-sensitive.  %RSE  issues  a
-   warning message if you specify a control character such as a  <TAB>  in
-   the text string. %RSE confirms your selection by  displaying  the  text
-   string between a left and right arrow. The  arrows  display  any  blank
-   spaces included in the text string.
-
-   If the output device is a file name with no  extension,  %RSE  defaults
-   the extension to .DAT.  %RSE  completes  processing  with  a  count  of
-   occurrences found.
-
-4 Prompts
-   Prompts
-
-        Routine: Requests (using %RSEL) the  name(s)  of  the  routines  to
-        search; <RETURN> ends selection.
-        Find string: Requests string for which to search.
-        Output device: <terminal>:
-        Requests a destination device; defaults to the principal device.
-4 Util_Labels
-   Utility Labels
-
-        CALL Works without user interaction unless %ZR is not defined.
-4 Input_Vars
-   Input Variables
-
-   The  following  input  variables  are  only  applicable  when  invoking
-   CALL^%RSE.
-
-        %ZR Contains an array of routines provided or generated with %RSEL.
-        %ZF Contains the string to find.
-        %ZD Identifies the device  to  display  the  results,  defaults  to
-        principal device. Make sure you open the device if  the  device  is
-        not the principal device.
-4 Ex_of_RSE
-   Examples of %RSE
-
-   Example:
-
-
-   GTM>DO ^%RSE
-
-   Routine Search for Every occurrence
-
-   Routine: BES*
-
-   BEST BEST2 BEST3 BEST4
-
-   Current total of 4 routines
-
-   Routine: <RETURN>
-
-   Find string:^NAME
-
-   Find all occurrences of:
-
->^NAME<
-   Output device: <terminal>:
-
-   USER:[SMITH.WORK]BEST.M
-
-   S ^NAME=SMITH
-
-   S ^NAME(1)=JOHN
-
-   USER:[SMITH.WORK]BEST2.M
-
-   USER:[SMITH.WORK]BEST3.M
-
-   S ^NAME=X
-
-   W ^NAME
-
-   USER:[SMITH.WORK]BEST4.M
-
-   Total of 4 routines parsed.
-
-   4 occurrences found in 2 routines.
-   GTM>
-
-   This example invokes %RSE that searches and finds a given  string.  The
-   output device specifies a terminal display of all lines where the text
-   string occurs.
-
-   Example:
-
-
-   GTM>DO ^%RSE
-
-   Routine Search for Every occurrence
-
-   Routine: BEST
-
-   BEST
-
-   Current total of 1 routine
-
-   Routine: <RETURN>
-
-   Find string:^NAME
-
-   Find all occurrences of:
-
->^NAME<
-   Output Device: OUT.LIS
-
-   BEST
-
-   GTM>
-
-   This example instructs ^%RSE to write all lines where the  text  string
-   occurs to an output file, OUT.LIS.
-
-3 RSEL
-   %RSEL
-
-
-   The %RSEL utility selects M  routines.  %RSEL  selects  routines  using
-   directories  specified  by  the  GT.M  special  variable  $ZROUTINES.
-   $ZROUTINES contains an ordered list of  VMS  directories  that  certain
-   GT.M functions use to locate source and object files. If $ZROUTINES is
-   not defined, %RSEL searches only the current default  directory.  Other
-   GT.M utilities call %RSEL.
-
-   %RSEL prompts for the name of a routine(s).
-
-
-   %RSEL accepts the wildcard characters asterisk  (*)  and  percent  sign
-   (%). The wildcards carry their DCL meanings, with one exception. %GSEL
-   interprets a % sign in the first position of a global name literally.
-
-   A colon (:) between two routines specifies a range.
-
-   %RSEL creates a read-write variable %ZR, which  is  a  local  array  of
-   selected routines. After each selection, %RSEL reports  the  number  of
-   routines in %ZR. A minus  sign  (-)  or  an  apostrophe  (')  character
-   preceding a routine name removes that routine from  the  %ZR  array.  A
-   question mark (?) provides online help, and "?D"  displays  M  routines
-   currently in the array.
-
-        If a local variable %ZRSET is  defined,  %RSEL  places  the  output
-        information into a global variable (^%RSET) instead  of  the  local
-        variable %ZR.
-
-4 Prompts
-   Prompts
-
-        Routine: Requests  the  name(s)  of  the  routines;  <RETURN>  ends
-        selection.
-4 Util_Labels
-   Utility Labels
-
-        CALL Performs %RSEL without reinitializing %ZR.
-        OBJ Searches only object files.
-        SRC Searches only source files (same as %RSEL).
-4 Input_Vars
-   Input Variables
-
-   The following input variables are only valid when invoking CALL^%RSEL:
-
-        %ZE Contains the file extension, usually either .M for source files
-        or .OBJ for object files.
-        %ZR As input, contains an existing list of routines to be modified.
-        %ZRSET On being set, requests %RSEL to  place  the  output  in  the
-        global variable ^%RSET.
-4 Output_Vars
-   Output Variables
-
-        %ZR As output, contains list of  directories  indexed  by  selected
-        routine names.
-        ^%RSET($JOB) The output global variable ^%RSET is used  instead  of
-        the local variable %RD if the input variable %ZRSET is set.  It  is
-        indexed by job number $JOB and the selected routine names.
-4 Ex_of_RSEL
-   Examples of %RSEL
-
-   Example:
-
-
-   GTM>DO ^%RSEL
-
-   Routine: TES*
-
-   TEST2 TEST3
-
-   Current total of 2 routines
-
-   Routine: <RETURN>
-
-   GTM>DO OBJ^%RSEL
-
-   Routine:Test%
-
-   Current total of 0 routines
-
-   Routine: <RETURN>
-
-   GTM>ZWRITE
-
-   %ZR=0
-
-   This example selects two source routines starting  with  "TES"  as  the
-   first three characters. Then, the example  invokes  %RSEL  at  the  OBJ
-   label to select object modules only. OBJ^%RSEL returns a %ZR=0 because
-   object modules for the TEST routines do not exist.
-
-   Example:
-
-
-   GTM>DO ^%RSEL
-
-   Routine: BES*
-
-   BEST BEST2 BEST3 BEST4
-
-   Current total of 4 routines
-
-   Routine: - BEST
-
-   BEST
-
-   Current total of 3 routines
-
-   Routine: ?D
-
-   BEST2 BEST3 BEST4
-
-   Routine: 'BEST2
-
-   BEST2
-
-   Current total of 2 routines
-
-   Routine: ?D
-
-   BEST3 BEST4
-
-   Routine: <RETURN>
-
-   GTM>ZWRITE
-
-   %ZR=2
-
-   %ZR("BEST3")="USER:[SMITH.WORK]"
-
-   %ZR("BEST4")="USER:[SMITH.TEST]"
-
-   GTM>
-
-   This example selects the routines using the asterisk (*)  wildcard  and
-   illustrates how to tailor your selection list. Note that  %ZR  contains
-   two routines from different directories.
-
-   By default, %RSEL bases the contents of %ZR on source files that have a
-   .M extension.
-
-   Example:
-
-
-   GTM>DO ^%RSEL
-
-   Routine:BEST*
-
-   BEST2 BEST3
-
-   Current total of 2 routines
-
-   Routine: <RETURN>
-
-   GTM>ZWRITE
-
-   %ZR=2
-
-   %ZR("BEST2")="USER:[SMITH.WORK]"
-
-   %ZR("BEST3")="USER:[SMITH.WORK]"
-
-   This example creates a %ZR array with BEST2 and BEST3.
-
-   Example:
-
-
-   GTM>DO ^%RSEL
-
-   Routine:LOCK
-
-   LOCK
-
-   Current total of 1 routine
-
-   Routine: <RETURN>
-
-   GTM>ZWRITE
-
-   %ZR=1
-
-   %ZR("LOCK")="USER:[SMITH.WORK]"
-
-   GTM>DO CALL^%RSEL
-
-   Routine:BEST*
-
-   BEST2 BEST3
-
-   Current total of 2 routines
-
-   Routine: <RETURN>
-
-   GTM>ZWRITE
-
-   %ZR=3
-
-   %ZR("BEST2")="USER:[SMITH.WORK]"
-
-   %ZR("BEST3")="USER:[SMITH.WORK]"
-
-   %ZR("LOCK")="USER:[SMITH.WORK]"
-
-   GTM>
-
-   This example creates a %ZR  array  with  LOCK  and  adds  to  it  using
-   CALL%RSEL.
-
-2 Internationalization_Util
-   Internationalization Utilities
-
-   The internationalization utilities are:
-
-        %GBLDEF Manipulates the collation sequence assigned to a global.
-        %LCLCOL  Manipulates  the  collation  sequence  assigned  to  local
-        variables in an active process.
-        %PATCODE Loads pattern definition files for use  within  an  active
-        database.
-   These utilities are an integral part of  the  GT.M  functionality  that
-   permits  you  to  customize  your  applications  for  use  with  other
-   languages.  For  a  description  of  these  utilities,  refer  to  the
-   "Internationalization" chapter in GT.M Programmers Guide.
-
-2 Sys_Mgmt_Util
-   System Management Utilities
-
-   The System Management utilities are:
-
-        %FREECNT Displays the number of free blocks in the  database  files
-        associated with the current global directory.
-        %ST Displays the  current  users  of  the  GT.M  run-time  library,
-        optionally by image.
-3 FREECNT
-   %FREECNT
-
-
-   The %FREECNT utility displays the number of free blocks in the database
-   files associated with the current global directory.
-
-3 ST
-   %ST
-
-
-   The %ST utility displays the  number  of  current  users  of  the  GT.M
-   run-time library and information about those processes  that  you  have
-   privileges to view. You must have the VMS SYSLCK privilege to run this
-   utility. If there are no users accessing GT.M, the message "No current
-   GT.M users" appears.
-
-   %ST displays the access method used by the processes. For a list of the
-   possible access methods, refer to the  Access  Methods  table  in  GT.M
-   Programmer's Guide.
-
-4 Util_Labels
-   Utility Labels
-
-
diff --git a/sr_vvms/mumps_clitab.cld b/sr_vvms/mumps_clitab.cld
deleted file mode 100644
index 9cf8934..0000000
--- a/sr_vvms/mumps_clitab.cld
+++ /dev/null
@@ -1,25 +0,0 @@
-MODULE	MUMPS_CLITAB
-
-DEFINE VERB MUMPS
-	QUALIFIER CROSS_REFERENCE	PLACEMENT=POSITIONAL
-	QUALIFIER DEBUG			PLACEMENT=POSITIONAL
-	QUALIFIER LIST			VALUE(TYPE=$FILE)
-					PLACEMENT=POSITIONAL
-	QUALIFIER MACHINE_CODE		PLACEMENT=POSITIONAL
-	QUALIFIER IGNORE		PLACEMENT=POSITIONAL
-	QUALIFIER LENGTH		VALUE(REQUIRED,TYPE=$NUMBER)
-					PLACEMENT=POSITIONAL
-	QUALIFIER SPACE			VALUE(REQUIRED,TYPE=$NUMBER)
-					PLACEMENT=POSITIONAL
-	QUALIFIER OBJECT		VALUE(TYPE=$FILE)
-					PLACEMENT=POSITIONAL
-	QUALIFIER WARNINGS		PLACEMENT=POSITIONAL
-	QUALIFIER LABELS		VALUE(REQUIRED)
-					PLACEMENT=POSITIONAL
-	QUALIFIER LINE_ENTRY		PLACEMENT=POSITIONAL
-	QUALIFIER INLINE_LITERALS	PLACEMENT=POSITIONAL
-	QUALIFIER ALIGN_STRINGS		PLACEMENT=POSITIONAL
-	QUALIFIER CE_PREPROCESS		VALUE(TYPE=$FILE)
-					PLACEMENT=POSITIONAL
-	DISALLOW(CROSS_REFERENCE AND NOT LIST)
-	PARAMETER P1, LABEL=INFILE,PROMPT="FILE",VALUE(LIST,TYPE=$FILE)
diff --git a/sr_vvms/mup_bak_sys.c b/sr_vvms/mup_bak_sys.c
deleted file mode 100644
index e5db9a6..0000000
--- a/sr_vvms/mup_bak_sys.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "efn.h"
-#include <dvidef.h>
-#include "util.h"
-
-GBLREF mstr directory;
-GBLREF int4 mubmaxblk;
-GBLREF bool error_mupip;
-
-void mup_bak_mag(void)
-{
-	int4		item_code;
-	$DESCRIPTOR(dir,"");
-	uint4	devbufsiz;
-
-	item_code = DVI$_DEVBUFSIZ;
-	dir.dsc$a_pointer = directory.addr;
-	dir.dsc$w_length =  directory.len;
-	devbufsiz = 0;
-	lib$getdvi(&item_code, 0, &dir, &devbufsiz, 0, 0);
-	if (devbufsiz < mubmaxblk + 8)
-	{
-		util_out_print("!/Buffer size !UL may not accomodate maximum GDS block size of !UL.", FALSE,
-			devbufsiz, mubmaxblk - 4);
-		util_out_print("!/4 bytes/GDS block + 8 bytes/tape block in overhead required for device.", FALSE);
-		util_out_print("!/MUPIP cannot start backup with above errors!/",TRUE);
-		error_mupip = TRUE;
-	}
-	return;
-}
-
-void mup_bak_pause(void)
-{
-	int4	pause[2];
-
-	pause[0] = 2 * -10000000;
-	pause[1] = -1;
-	if (sys$setimr( efn_immed_wait, &pause, 0, 0, 0) == SS$_NORMAL)	/* Safety wait to make sure that all blocks have been */
-	{	sys$synch(efn_immed_wait, 0);				/* returned to the frozen queues before flushing      */
-	}
-
-	return;
-}
diff --git a/sr_vvms/mupip.c b/sr_vvms/mupip.c
deleted file mode 100644
index a5c33e1..0000000
--- a/sr_vvms/mupip.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "gtm_inet.h"
-
-#include "cryptdef.h"
-#include "ladef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "filestruct.h"
-#include "error.h"		/* for EXIT_HANDLER macro used in SET_EXIT_HANDLER macro */
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "desblk.h"		/* for desblk structure */
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmimagename.h"
-#include "stp_parms.h"
-#include "stringpool.h"
-#include "util.h"
-#include "mupip_exit.h"
-#include "lmdef.h"
-#include "patcode.h"
-#include "generic_exit_handler.h"
-#include "ast_init.h"
-#include "init_secshr_addrs.h"
-#include "mupip_getcmd.h"
-#include "gtm_env_init.h"	/* for gtm_env_init() prototype */
-#include "common_startup_init.h"
-#include "gtm_threadgbl_init.h"
-
-GBLREF desblk		exi_blk;
-GBLREF bool		licensed;
-GBLREF int4		lkid, lid;
-GBLREF bool		in_backup;
-GBLREF int4		exi_condition;
-GBLREF spdesc		rts_stringpool, stringpool;
-
-error_def	(ERR_WILLEXPIRE);
-error_def	(LP_NOCNFDB);
-error_def	(LP_INVCSM);
-
-LITREF char		gtm_product[PROD];
-LITREF int4		gtm_product_len;
-LITREF char		gtm_version[VERS];
-LITREF int4		gtm_version_len;
-
-mupip()
-{
-	unsigned int	status;
-	int4		inid = 0;
-	int4		nid = 0;		/* system ID, node number */
-	int4		days = 128;		/* days to expiration	*/
-	int4		lic_x = 0;		/* license value	*/
-	char		*h = NULL;		/* license data base	*/
-	char		*pak = NULL;		/* pak record		*/
-	int4		mdl = 0;		/* hardw. model type	*/
-	$DESCRIPTOR(dprd, gtm_product);
-	$DESCRIPTOR(dver, gtm_version);
-	DCL_THREADGBL_ACCESS;
-
-	GTM_THREADGBL_INIT;
-	common_startup_init(MUPIP_IMAGE);
-	gtm_env_init();	/* read in all environment variables */
-	licensed = TRUE;
-	TREF(transform) = TRUE;
-	in_backup = FALSE;
-	util_out_open(0);
-	SET_EXIT_HANDLER(exi_blk, generic_exit_handler, exi_condition);	/* Establish exit handler */
-	ESTABLISH(util_base_ch);
-	INVOKE_INIT_SECSHR_ADDRS;
-#	ifdef	NOLICENSE
-	status = SS$_NORMAL;
-	lid = 1;
-	lic_x = 32767;
-#	else
-	if (NULL == (h = la_getdb(LMDB)))		/* license db in mem */
-		status = LP_NOCNFDB;
-	else
-		status = SS$_NORMAL;
-	if (1 == (status & 1))				/* licensing: node+ system  */
-		status = lm_mdl_nid(&mdl, &nid, &inid);
-	if (1 == (status & 1))				/* licensing: license */
-	{
-		dprd.dsc$w_length = gtm_product_len;
-		dver.dsc$w_length = gtm_version_len;
-		status = lp_licensed(h, &dprd, &dver, mdl, nid, &lid, &lic_x, &days, pak);
-	}
-#	endif
-	if (1 == (status & 1))					/* licensing: license units  */
-		status = LP_ACQUIRE(pak, lic_x, lid, &lkid);	/* def in cryptdef */
-#	ifdef	NOLICENSE
-	status = SS$_NORMAL;
-#	else
-	if (LP_NOCNFDB != status)
-		la_freedb(h);
-	if (1 == (status & 1))					/* licensing */
-	{
-		if (days < 14)
-			lm_putmsgu(ERR_WILLEXPIRE, 0, 0);
-	}
-	else
-	{
-		licensed = FALSE;
-		if (LP_INVCSM != status)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-#	endif
-	ast_init();
-	initialize_pattern_table();
-	stp_init(STP_INITSIZE);
-	rts_stringpool = stringpool;
-	mupip_getcmd();
-	mupip_exit(SS$_NORMAL);
-}
diff --git a/sr_vvms/mupip.hlp b/sr_vvms/mupip.hlp
deleted file mode 100644
index d17bcfa..0000000
--- a/sr_vvms/mupip.hlp
+++ /dev/null
@@ -1,2355 +0,0 @@
-
-
-1 Overview
-  MUPIP overview
-   The GT.M  MUMPS  Peripheral  Interchange  Program,  MUPIP,  is  a  utility
-   that provides an assortment of tools  for  GT.M  database  management  and
-   database journaling.
-
-   MUPIP provides the following commands:
-
-   For stand-alone database services:
-
-   o  CREATE database files
-
-   o  EXTEND Mapped Memory database files
-
-   o  JOURNAL, recover database files and extract journal records
-
-   o  INTEG, check the integrity of GDS database files
-
-   o  RESTORE incremental backups to GDS database files
-
-   o  SET database file characteristics
-
-   For concurrent database services:
-
-   o  BACKUP GDS database files
-
-   o  BACKUP/INCREMENTAL changes to GDS database files
-
-   o  EXTEND Buffered Global database files
-
-   o  EXTRACT data from GDS databases
-
-   o  INTEG, check the integrity of GDS databases
-
-   o  LOAD databases from sequential files
-
-   o  REORGanize database files to optimize performance
-
-   o  RUNDOWN database files that are not currently accessed
-
-   For non-database services:
-
-   o  CONVERT MUMPS programs in sequential format into RMS files
-
-   o  HELP for MUPIP commands
-
-   o  STOP GT.M processes
-
-1 Global_dir
-  MUPIP and the Global Directory
-   Some of the MUPIP commands require information  contained  in  the  Global
-   Directory. Therefore, a  process  must  have  access  to  a  valid  Global
-   Directory before using any MUPIP  database  service  commands  other  than
-   JOURNAL, RESTORE, and the /FILE options of INTEG and SET.
-
-   The  logical  name  GTM$GBLDIR  specifies  the  Global  Directory.  Define
-   GTM$GBLDIR using the DCL command DEFINE. The  system  manager  may  define
-   GTM$GBLDIR  in  a  GROUP  or  SYSTEM  table.   Individual   users   define
-   GTM$GBLDIR in their LOGIN.COM or other command files.
-
-   Example
-
-   $ DEFINE GTM$GBLDIR PROD.GLD
-
-1 BACKUP
-  B[ACKUP]
-   BACKUP copies blocks  from  one  or  more  Greystone  Technology  Database
-   Structure (GDS) files to a new file  or  files.  BACKUP  suspends  updates
-   to all regions specified by the BACKUP command from  the  time  it  starts
-   the first region until it finishes the  last  region.  This  ensures  that
-   BACKUP  captures  a  consistent  application  state.   BACKUP   does   not
-   suspend processes that only perform retrievals.
-
-   The format of the BACKUP command is:
-
-   B[ACKUP][/qualifier[...]]           region-list[,...]            file-spec
-   
-
-   By default, BACKUP is /COMPREHENSIVE.
-
-   The first argument may  specify  more  than  one  region  of  the  current
-   Global Directory in a list separated  with  commas.  Any  region-name  may
-   include the DCL wildcard characters * and %.
-
-   To BACKUP only one region,  the  file-specification  must  resolve  to  an
-   RMS  file  or   directory   name.   To   BACKUP   several   regions,   the
-   file-specification   must   be   a   directory   specification.   If   the
-   file-specification is a directory, MUPIP  assigns  the  backup  files  the
-   same name as  the  file  associated  with  the  dynamic  segment  of  each
-   region. Therefore, the target  directory  must  not  contain  any  of  the
-   regions included in the BACKUP.
-
-2 Qualifiers
-/COMPREHENSIVE
-  /C[OMPREHENSIVE]
-   Specifies that BACKUP copy the entire  file  from  disk  to  disk.  On
-   completion, the result is ready for  use  as  a  GT.M  database.  This
-   option does not support operation to magnetic tape.
-
-   BACKUP  /COMPREHENSIVE  produces  a  result  similar  to  the   result
-   produced by  a  DCL  COPY  command  or  some  variations  of  the  DCL
-   BACKUP command, but it has the following advantages:
-
-   o  It does not require exclusive access to the file
-
-   o  It can interlock multiple files simultaneously
-
-   The  /COMPREHENSIVE  qualifier  is  not  compatible  with  any   other
-   qualifier.
-
-   By default, BACKUP operates /COMPREHENSIVE.
-
-/INCREMENTAL
-  /I[NCREMENTAL]
-   Specifies that BACKUP include  only  blocks  from  the  database  that
-   have  changed  since  a  prior  point  specified  by  the  /SINCE   or
-   /TRANSACTION  qualifier.  MUPIP  RESTORE  integrates  the  results  of
-   a BACKUP /INCREMENTAL into a database.
-
-   When directing the  output  file  to  a  magnetic  tape,  use  DCL  to
-   MOUNT  the  tape  /INITIALIZE=CONTINUATION.  This   causes   automatic
-   handling of multiple volumes. When  mounting  a  volume  to  tape  for
-   a  BACKUP  /INCREMENTAL,  specify  a  blocksize  twelve   (12)   bytes
-   larger  than  the  size   of   the   blocks   in   the   database   to
-   accommodate overhead (i.e., 4 bytes  for  GTM  overhead  and  8  bytes
-   for RMS overhead).  If  the  block  size  is  too  small,  the  BACKUP
-   fails when it encounters a full block.
-
-   The   /INCREMENTAL   qualifier   is   not    compatible    with    the
-   /COMPREHENSIVE qualifier.
-
-/RECORD
-  /R[ECORD]
-   Specifies  that  the  BACKUP  utility  record   this   backup   as   a
-   reference  point  for  subsequent  backups.   Each   time   a   BACKUP
-   specifies  /RECORD,  that  backup  replaces  the   previous   recorded
-   backup as the RECORD reference point for the file.
-
-/SINCE
-  /S[INCE]=keyword
-   Specifies  that  a  BACKUP  /INCREMENTAL   includes   blocks   changed
-   since the last specified BACKUP.
-
-   /SINCE accepts the keywords:
-
-   o  C[OMPREHENSIVE]  -  Backup  all  changes  since  the  last   BACKUP
-      /COMPREHENSIVE
-
-   o  I[NCREMENTAL]  -  Backup  all  changes  since   the   last   BACKUP
-      /INCREMENTAL
-
-   o  R[ECORD] -  Backup  all  changes  since  the  last  BACKUP  /RECORD
-   
-   The /SINCE qualifier  is  incompatible  with  the  /COMPREHENSIVE  and
-   /TRANSACTION qualifiers.
-
-   By default, BACKUP /INCREMENTAL operates /SINCE=COMPREHENSIVE.
-
-/TRANSACTION
-  /T[RANSACTION]=transaction-number
-   Specifies a  hexadecimal  starting  transaction  which  causes  BACKUP
-   /INCREMENTAL to  copy  all  blocks  that  have  been  changed  by  the
-   specified  and  all  subsequent  transactions.   Transaction   numbers
-   appear in a DSE DUMP  /FILEHEADER,  with  a  "Current  TN"  label.  If
-   the transaction  number  is  invalid,  BACKUP  reports  an  error  and
-   rejects the command.
-   
-   BACKUP  /INCREMENTAL  /TRANSACTION=1  copies  all  in-use  blocks  and
-   produces  a  result  similar  to   the   result   produced   by   some
-   variations of  the  DCL  BACKUP  command  but  it  has  the  following
-   advantages:
-
-   o  It does not require exclusive access to the file
-
-   o  It can interlock multiple files simultaneously
-
-   o  It should  be  faster,  if  the  database  is  not  very  full  (it
-      must be nearly empty to be an advantage)
-
-   o  It is useful for backing up an entire database to tape
-
-   Different  regions  do  not  normally  have   a   single   transaction
-   number  that  marks  a   meaningful   point.   Therefore,   a   BACKUP
-   command  specifying  multiple  regions  and  using  the   /TRANSACTION
-   qualifier  with  arguments  other  than  one  (1)   is   unlikely   to
-   produce desirable results.
-
-   The    /TRANSACTION    qualifier    is    incompatible    with     the
-   /COMPREHENSIVE and /SINCE qualifiers.
-
-2 Examples
-  BACKUP Examples
-   Example:
-
-   $ MUPIP BACKUP * [.backup]
-   
-   This comprehensively  backs  up  all  regions  of  the  entire  database
-   (defined   by   the   current   Global   Directory)   into    the    RMS
-   sub-directory  [.backup].  BACKUP  creates  a  copy  of   each   dynamic
-   segment in  the  sub-directory.  The  file  for  each  segment  has  the
-   same name as the file being backed up.
-
-   Example
-
-   $ INIT MSA0: FULL
-   $ MOUNT/INIT=CONT/BLOCK=2060 MSA0: FULL
-   $ MUPIP BACKUP/INCREMENTAL/TRANSACTION=1 MAIN_REG FULL:MAIN
-   
-   In this example, the first command  initializes  a  magnetic  tape  with
-   the  label  FULL.  The  second  command  mounts  the   tape   with   VMS
-   automatic  volume  initialization  and  a  block  size  of   2060.   The
-   magnetic tape block size of  2060  handles  a  database  block  of  2048
-   bytes. The  MUPIP  command  backs  up  the  dynamic  segment  associated
-   with MAIN_REG  to  the  tape.  Because  of  the  /TRANSACTION=1,  BACKUP
-   copies all blocks in use to the tape.
-
-   Example
-
-   $ MUPIP BACKUP main*,%xref usr$bck:[tuesday]
-   
-   This comprehensively backs up  all  regions  that  have  names  starting
-   with  "main"  and  all  regions  that  have  names  starting  with   any
-   single   character   and   ending   with   "xref"   to   the   directory
-   usr$bck:[tuesday].
-
-   Example
-
-   $ MUPIP BACKUP/INCREMENTAL/SINCE=COMPREHENSIVE * [19880505]
-   
-   This backs up all changes made  since  the  last  BACKUP  /COMPREHENSIVE
-   for  all  regions  of  the  database  defined  by  the  current   Global
-   Directory into  the  RMS  directory  [19880505].  BACKUP  creates  files
-   in  the  directory,  with  names  corresponding   to   each      dynamic
-   segment's file name.
-
-   Note: BACKUPs of multiple  regions  can  lead  to  more  than  one  file
-   with the same  name  in  the  backup  directory,  as  different  regions
-   can  have  the  same  file  names  as  long  as   they   use   different
-   directory paths or logical names to access them.
-
-1 CONVERT
-  CO[NVERT]
-   CONVERT transforms MUMPS  routines  in  the  sequential  format  described
-   in the ANSI standard into individual RMS source files  for  use  by  GT.M.
-   Use CONVERT to make MUMPS RO format files accessable as GT.M routines.
-
-   The format of the CONVERT command is:
-
-   CO[NVERT][/F[ORMAT]=RO]              file-spec              directory-spec
-   
-   CONVERT   takes   its   input   from   the    file    defined    by    the
-   file-specification. CONVERT places  the  output  files  in  the  directory
-   defined by the directory-specification.  CONVERT  uses  the  routine  name
-   and a ".M" extension as the output file name for each routine.
-
-
-2 Qualifiers
-/FORMAT
-  /F[ORMAT]=RO
-   Specifies the format of  the  input  file.  The  RO  (Routine  Output)
-   format code is the default and the only code CONVERT recognizes.
-
-
-1 CREATE
-  CR[EATE]
-   CREATE generates database files using  the  characteristics  stored  in  a
-   Global Directory by the Global Directory Editor  (GDE).  CREATE  uses  the
-   Global Directory to map a region to a segment and a  segment  to  a  file.
-   Use the MUPIP CREATE command to create a new database or  a  new  copy  of
-   a  previously  existing  file  during  a  database  reorganization.  If  a
-   database file already exists for the  segment,  CREATE  takes  no  action.
-   If  a  file  does  not  exist,  CREATE  sets  up  the  file.  CREATE  also
-   initializes the database structure (GDS).
-
-   The format of the CREATE command is:
-
-   CR[EATE] [/R[EGION]=region-name]
-   
-   The optional /REGION qualifier specifies a  single  region  for  which  to
-   create a database file.
-
-   By default,  CREATE  sets  up  database  files  for  all  regions  in  the
-   current Global Directory.
-
-2 Qualifiers
-/REGION
-  /R[EGION]=region-name
-   Specifies a  single  region  for  creation  of  a  database  file.  By
-   default, CREATE sets up  (creates)  database  files  for  all  regions
-   in the current Global Directory.
-
-1 EXIT
-  EXI[T]
-   EXIT or <CTRL Z>  terminates  MUPIP  and  returns  control  to  the  point
-   where MUPIP was invoked. This command is  useful  when  you  invoke  MUPIP
-   without an action and wish to  leave  without  performing  one,  or  after
-   using MUPIP HELP.
-
-   The format of the EXIT command is:
-
-   EXI[T]
-
-   The Exit command does not accept any qualifiers.
-
-1 EXTEND
-  EXTE[ND]
-   EXTEND expands a GDS database file. Databases  with  a  BG  access  method
-   generally  extend  automatically  when  they  become  full.  MM  databases
-   must be MUPIP EXTENDed. For MM  segments,  EXTEND  requires  exclusive  or
-   stand-alone  access  to  the  file.   When   EXTEND   requires   exclusive
-   database access and cannot obtain it, MUPIP rejects the command.
-
-   The format of the EXTEND command is:
-
-   EXTE[ND] region-name [/B[LOCKS]=blocks]
-   
-   The required region-name parameter specifies the name  of  the  region  to
-   expand. EXTEND uses  the  Global  Directory  to  map  the  region  to  the
-   dynamic segment and the segment to the file.
-
-2 Qualifiers
-/BLOCKS
-  /B[LOCKS]=blocks
-   Specifies the number of GDS  database  blocks  by  which  GT.M  should
-   extend the file. GDS files  use  some  blocks  for  bit  maps.  EXTEND
-   adds  the  specified  number  of  blocks  and  the  bit   map   blocks
-   required as overhead. For  more  information  about  bit  maps,  refer
-   to the  "GDS"  chapter  of  the  GT.M  Administration  and  Operations
-   Guide.
-
-   EXTEND uses  the  value  in  the  fileheader  as  the  number  of  GDS
-   blocks by which to extend the database file.
-
-1 EXTRACT
-  EXTR[ACT]
-   EXTRACT  copies  specified  globals  from  the  current  database   to   a
-   sequential output file in one  of  two  formats  (i.e.,  GO,  or  BINARY).
-   Use EXTRACT to back up specific  globals  or  when  extracting  data  from
-   the  database  for  use  by  another  system.  EXTRACT  uses  the   Global
-   Directory  to  determine  which  database  files  to  use.   EXTRACT   may
-   operate concurrently with normal GT.M  database  access.  To  ensure  that
-   an EXTRACT reflects  a  consistent  application  state,  suspend  database
-   updates  to  all  regions  involved  in  the  extract  with  the   /FREEZE
-   qualifier.
-
-   The format of the EXTRACT command is:
-
-   EXTR[ACT][/qualifier[...]] file-specification
-
-   EXTRACT   places   its   output   in   the    file    defined    by    the
-   file-specification. EXTRACT may output  to  an  RMS  file  on  any  device
-   that supports such files, including magnetic  tapes.  Note  that  magnetic
-   tapes may have a smaller file maximum  size  than  disks.  When  directing
-   the  output  file  to  a  magnetic  tape,  use  DCL  to  MOUNT  the   tape
-   /INITIALIZE=CONTINUATION.  This  causes  automatic  handling  of  multiple
-   volumes. When mounting  a  volume  to  tape  for  an  EXTRACT,  specify  a
-   blocksize that is eight (8) bytes larger  than  the  size  of  the  blocks
-   in the database  to    accommodate  RMS  overhead.  <CTRL  C>  produces  a
-   status  message  from  EXTRACT.  <CTRL  Y>  aborts  EXTRACT.  An   EXTRACT
-   terminated abnormally by operator  action  or  error  produces  incomplete
-   output.
-
-2 Qualifiers
-/SELECT
-  /S[ELECT]=global-name-list
-   Specifies the  globals  to  extract.  The  "^"  in  the  specification
-   of the  global  name  is  optional.  Enclose  lowercase  global  names
-   in quotes ("").
-
-   The global-specification can be:
-
-   o  A global name, such as MEF
-
-   o  A range of global names, such as A7:B6
-
-   o  A parenthetical list, such as (A,B,C)
-
-   o  Global names with the same prefix, such as TMP*
-
-   In the  first  case,  EXTRACT  selects  only  global  ^MEF.    In  the
-   second  case,  EXTRACT  selects  all  global  names  between  ^A7  and
-   ^B6, inclusive.  In  the  third  case,  EXTRACT  selects  globals  ^A,
-   ^B, and ^C. In the fourth  case,  EXTRACT  selects  all  global  names
-   from ^TMP through ^TMPzzzzz.
-
-   By  default,  EXTRACT  selects  all  globals,  as  if   it   had   the
-   qualifier /SELECT=*.
-
-/FORMAT
-  /FO[RMAT]=GO|B[INARY]
-   Specifies the format of the output file.
-
-   The format codes are:
-
-   o  GO  -  Global  Output  format,  used  for   files   you   want   to
-      transport or archive
-
-   o  B[INARY]    -  Binary  format,  used  for  database  reorganization
-      or short term backups
-
-   /FORMAT=GO  stores  the  data  in  record  pairs.  Each  global   node
-   produces one record for the  key  and  one  for  the  data.  FORMAT=GO
-   has two header records.
-
-   /FORMAT=BINARY  only  applies  for   Greystone   Technology   Database
-   Structure  (GDS)  files.  EXTRACT  /FORMAT=BINARY  works  much  faster
-   than EXTRACT /FORMAT=GO.
-
-   By default, EXTRACT uses /FORMAT=GO.
-
-/FREEZE
-  /FR[EEZE]
-   Prevents database updates to  all  regions  of  the  Global  Directory
-   used by the EXTRACT for the duration of the EXTRACT.
-
-   By default, EXTRACT does not freeze regions during operation.
-
-/LABEL
-  /LA[BEL]=text
-   Specifies a  text  string  which  becomes  the  first  record  in  the
-   output  file.  Enclose  labels  containing  punctuation  or  lowercase
-   labels  in  quotes  ("").   EXTRACT   /FORMAT=BINARY   truncates   the
-   label text to 32 characters.
-
-   By default, EXTRACT uses the label "GT.M MUPIP EXTRACT".
-
-   For a description of  the  /FORMAT=BINARY  header  label,    refer  to
-   the subsequent section on EXTRACT /FORMAT=BINARY.
-
-/LOG
-  /[NO]LO[G]
-   Specifies whether or not  to  display  a  message  on  SYS$OUTPUT  for
-   each  global  extracted.  The  message  shows  the  number  of  global
-   nodes, the maximum  subscript  length  and  maximum  data  length  for
-   each global.
-
-   By default, EXTRACT operates /LOG.
-
-2 Examples
-  EXTRACT Examples
-   Example:
-
-   $ MUPIP EXTRACT/NOLOG FL.GLO
-
-   This instructs  EXTRACT  to  create  the  global  output  file,  FL.GLO,
-   consisting  of  all  global   variables   in   the   database,   without
-   displaying statistics on a  global-by-global  basis.  Because  no  label
-   is  specified,  the  first  record  in  FL.GLO   contain   "GT.M   MUPIP
-   EXTRACT" as text.
-
-   Example
-
-   $ INIT MSA0: SPECIAL
-   $ MOUNT/INIT=CONT/BLOCK=4104 MSA0: SPECIAL
-   $ MUPIP EXTR/FO=BIN/SEL=("a22",M:Z)/LAB="SPSAVE" MSA0:SPEC.SVX
-
-   In this example, the first command  initializes  a  magnetic  tape  with
-   the  label  SPECIAL.  The  second  command  mounts  the  tape  with  VMS
-   automatic  volume  initialization  and  a  block  size  of   4104.   The
-   magnetic tape block size of  4104  handles  a  database  block  of  4096
-   bytes.  The  MUPIP  command  instructs  EXTRACT  to  create   a   BINARY
-   output file, SPEC.SVX, with the label  SPSAVE.  The  file  contains  the
-   global ^a22, every global starting with the  letters  M  through  Y  and
-   the global ^Z.   EXTRACT displays statistics for each global.
-
-   Example
-
-   $ MUPIP EXTRACT/SELECT=DRG TT
-
-   This instructs EXTRACT to dump  the  global  ^DRG  to  the  device  with
-   the logical name TT (normally the login terminal).
-
-1 HELP
-  H[ELP]
-   HELP provides online information  about  MUPIP  commands  and  qualifiers.
-   HELP uses similar conventions to the VAX/VMS help facility.
-
-   The format of the HELP command is:
-
-   H[ELP] [options...]
-
-   The  HELP  command  does  not  accept  any  qualifiers.  Enter  the  MUPIP
-   command  for  which  you  want  information  at  the  Topic  prompt.   Use
-   <RETURN> or <CTRL Z> to leave the help facility.
-
-1 INTEG
-  I[NTEG]
-   The INTEG command performs an integrity check  on  a  GDS  database  file.
-   INTEG operates on one or more regions  in  the  current  global  directory
-   by suspending concurrent updates to  those  regions.  INTEG  of  a  single
-   file   database   without   a   Global   Directory   requires    exclusive
-   (stand-alone) access to that file.
-
-   Use INTEG at the following times:
-
-   o  Periodically - to insure ongoing  integrity  of  database(s);  frequent
-      INTEGs help catch integrity problems before  they  spread  through  the
-      database file
-
-   o  After a crash - to insure the database was not corrupted
-
-   o  When database errors are reported - to troubleshoot the problem
-
-   The format of the INTEG command is:
-
-   I[NTEG][/qualifier[...]] file-spec | region-list
-
-   The file-specification directly identifies the  GDS  file  to  INTEG.  The
-   region-list identifies one or more  regions  that  in  turn  identify  GDS
-   files through the current Global Directory.
-
-   Always analyze errors reported by INTEG  immediately  to  prevent  further
-   corruption. Greystone strongly  recommends  fixing  the  following  errors
-   as soon as they are discovered:
-
-   o  Blocks  incorrectly  marked  free  -  these  may   cause   accelerating
-      damage when  processes  make  updates  to  any  part  of  the  database
-      region.
-
-   o  Integrity errors in an index  block  -  these  may  cause  accelerating
-      damage when processes  make  updates  to  that  area  of  the  database
-      region that uses the faulty index.
-
-   INTEG /FAST and the  "regular"  INTEG  both  report  these  errors.  Other
-   database errors do not pose  the  threat  of  rapidly  spreading  problems
-   in GDS files,  but  if  operations  continue  the  errors  may  cause  the
-   following:
-
-   o  Invalid application operation due to "missing" data
-
-   o  Process errors when a database access encounters an error
-
-   o  Degrading  application  level  integrity  as  a  result  of  incomplete
-      update sequences caused by the prior symptoms
-
-   You must assess the type of damage,  the  risk  of  continued  operations,
-   and the disruption of  stopping  normal  operation  for  database  repair.
-   For information on analyzing and  correcting  database  errors,  refer  to
-   the  "Database  Integrity"  chapter  in  the   GT.M   Administration   and
-   Operations Guide.
-
-   <CTRL C> or <CTRL  Y>  aborts  INTEG.  Because  INTEG  does  most  of  its
-   reporting at the end, aborting the process before  it  completes  may  not
-   give you all the information you need.
-
-2 /FAST
-  /FA[ST]
-   Specifies that INTEG checks only index  blocks.  INTEG  /FAST  does  not
-   check data blocks. INTEG  /FAST  produces  results  dramatically  faster
-   than a full INTEG.  While  INTEG  /FAST  is  not  a  replacement  for  a
-   full INTEG, it  very  quickly  detects  the  most  dangerous  structural
-   errors in a database.
-
-   The /FAST qualifier is incompatible with the /TN_RESET qualifier.
-
-   By default, INTEG checks  all  active  index  and  data  blocks  in  the
-   database.
-
-2 /REGION
-  /R[EGION]
-   Specifies that the  INTEG  parameter  identifies  one  or  more  regions
-   rather than a database file.
-
-   INTEG /REGION does  not  require  sole  access  to  databases.  Instead,
-   it  freezes  updates   to   the   database   during   the   check.   The
-   region-list  argument  may  specify  more  than  one   region   of   the
-   current  Global  Directory  in  a  list  separated  with   commas.   Any
-   region-name may include the DCL  wildcard  characters  *  and  %.  INTEG
-   /REGION  requires  the  logical  name  GTM$GBLDIR  to  specify  a  valid
-   Global  Directory.  For  more  information   on   defining   GTM$GBLDIR,
-   refer  to  the  "Global  Directory   Editor"   chapter   of   the   GT.M
-   Administration and Operations Guide.
-
-   Note:  Because  a  KILL  may  briefly  defer  marking  the   blocks   it
-   releases "free" in the bit  maps,  INTEG  /REGION  may  report  spurious
-   block  incorrectly  marked  busy  errors.  Because   block   incorrectly
-   marked  busy  errors  are  benign,  ignore  these  errors  unless  INTEG
-   consistently reports a block as incorrectly marked busy.
-
-   The /REGION qualifier is  incompatible  with  the  /FILE  and  /TN_RESET
-   qualifiers.
-
-   By default, INTEG operates /FILE.
-
-2 /FILE
-  /FI[LE]
-   Specifies   that   the   parameter   to   the   INTEG   command   is   a
-   file-specification.  INTEG  /FILE   requires   exclusive   (stand-alone)
-   access to a database file and  does  not  require  a  Global  Directory.
-   Because it has stand-alone access to  the  file,  INTEG  /FILE  is  able
-   to check reference counts.
-
-   The /FILE qualifier is incompatible with the /REGION qualifier.
-
-   By default, INTEG operates /FILE.
-
-2 /TN_RESET
-  /TN[_RESET]
-   Instructs an INTEG /FILE to reset  the  transaction  number  to  one  in
-   every database block currently holding valid data.
-
-   Transaction number overflow back to 0  disrupts  the  integrity  of  the
-   database.
-
-   The  /TN_RESET  qualifier  is  incompatible  with  the  /BLOCK,   /FAST,
-   /REGION and /SUBSCRIPT qualifiers.
-
-   By default, INTEG does not modify the block transaction numbers.
-
-2 /SUBSCRIPT
-  /S[UBSCRIPT]=subscript
-   Specifies a global or a range of  keys  to  INTEG.  Enclose  the  global
-   key  in  quotes  ("")  and  identify   a   range   by   separating   two
-   subscripts  with  a  colon  (:).  /SUBSCRIPT  limits  map  checking   to
-   incorrectly marked free errors.
-
-   Use  /SUBSCRIPT  only  if  you  know  the  path  to  the  keys  in   the
-   subscript and have reason  to  believe  the  path  is  not  damaged.  If
-   the path is questionable or  known  to  be  damaged,  use  DSE  to  find
-   the block(s) and INTEG /BLOCK.
-
-   The  /SUBSCRIPT  qualifier  is  incompatible   with   the   /BLOCK   and
-   /TN_RESET qualifiers.
-
-   Use /FULL to have INTEG report all global-names covered by a range.
-
-2 Examples
-  INTEG /SUBSCRIPT= Examples
-
-   Example
-
-   MUPIP INTEG /SUBSCRIPT="^a" MUMPS.DAT
-
-   This INTEGs the global variable ^a in the database file MUMPS.DAT.
-
-   Example
-
-   MUPIP INTEG/SUBSCRIPT="^a(100)":"^b(""c"")"/reg $DEFAULT
-
-   This INTEGs all global  variables  greater  than  or  equal  to  ^a(100)
-   and less  than ^b("c") in the default region.
-
-   Note: To specify a literal in the  command  string,  use  double  quotes
-   e.g., ^b(""c"").
-
-2 /BLOCK
-  /BL[OCK]=block-number
-   Specifies the block at  which  to  start  checking  a  sub-tree  of  the
-   database.  /BLOCK  limits  map  checking  to  incorrectly  marked   free
-   errors.
-
-   The  /BLOCK  qualifier  is  incompatible   with   the   /SUBSCRIPT   and
-   /TN_RESET qualifiers.
-
-2 /KEYRANGES
-  /[NO]K[EYRANGES]
-   Specifies whether or not the  INTEG  report  includes  key  ranges  that
-   identify the data suspected of problems detected by INTEG.
-
-   By default, INTEG displays /KEYRANGES.
-
-2 /MAP
-  /[NO]MAP[=integer]
-   Specifies the maximum number of  incorrectly  marked  busy  errors  that
-   INTEG reports.
-
-   /NOMAP removes  limits  on  incorrectly  marked  busy  reporting,  i.e.,
-   INTEG reports all map errors.  /NOMAP  does  not  accept  assignment  of
-   an argument.
-
-   Because  incorrectly  marked  free  errors  are  very  dangerous,  INTEG
-   always reports them, and /MAP does not affect them.
-
-   An  error  in  an   index   block   prevents   INTEG   from   processing
-   potentially large areas  of  the  database.  A  single  "primary"  error
-   may  cause  large  numbers  of  "secondary"  incorrectly   marked   busy
-   errors.  Because  "real"  or  primary  incorrectly  marked  busy  errors
-   only  make  "empty"  blocks  unavailable  to  the   system,   they   are
-   relatively benign.
-
-   By default, INTEG reports a maximum of 10 map errors (/MAP=10).
-
-2 /MAXKEYSIZE
-  /[NO]MAX[KEYSIZE][=integer]
-   Specifies  the  maximum  number  of  key  size  too  large  errors  that
-   INTEG reports.
-
-   /NOMAXKEYSIZE  removes  limits  on  key  size  reporting,  i.e.,   INTEG
-   reports  all  key  size  too  large  errors.    /NOMAXKEYSIZE  does  not
-   accept assignment of an argument.
-
-   Key size too large error  should  only  occur  after  someone  uses  DSE
-   CHANGE /FILEHEADER /KEY_MAX_SIZE to reduce the maximum key-size.
-
-   By  default,  INTEG  reports  a  maximum   of   10   key   size   errors
-   (/NOMAXKEYSIZE=10).
-
-2 /TRANSACTION
-  /[NO]TR[ANSACTION][=integer]
-   Specifies the maximum number  of  block  transaction  number  too  large
-   errors that INTEG reports.
-
-   /NOTRANSACTION  removes   limits   on   transaction   reporting,   i.e.,
-   INTEG reports  all  transaction  number  errors.    /NOTRANSACTION  does
-   not accept assignment of an argument.
-
-   A system crash may generate many  block  transaction  number  too  large
-   errors.  These  errors  can  cause  problems  for  BACKUP  /INCREMENTAL,
-   but  have  no  effect  on  the  run-time  environment.  The  DSE  CHANGE
-   /FILEHEADER  /BLOCKS_FREE=  command  quickly  fixes  block   transaction
-   number too large number errors.
-
-   By default, INTEG reports a  maximum  of  10  block  transaction  errors
-   (/TRANSACTION=10).
-
-2 /BRIEF
-  /BR[IEF]
-   Specifies an INTEG  summary  report  which  displays  the  total  number
-   of  directory,  index  and  data  blocks.  The   /BRIEF   qualifier   is
-   incompatible with the /FULL qualifier.
-
-   By default, INTEG reports are /BRIEF.
-
-2 /FULL
-  /FU[LL]
-   Specifies  an  expanded  INTEG  report  which  displays  the  number  of
-   index and data blocks in the directory tree  and  in  each  global  tree
-   as well as the  total  number  of  directory,  index  and  data  blocks.
-   The /FULL qualifier is incompatible with the /BRIEF qualifier.
-
-   By default, INTEG reports are /BRIEF.
-
-2 /ADJACENCY
-  /A[DJACENCY]=integer
-   Specifies the range of blocks  within  which  INTEG  considers  a  block
-   adjacent to another database block on  the  same  level.  The  adjacency
-   report from INTEG  gives  an  approximation  of  physical  data  density
-   which   directly   affects   efficient   database   access.   Use    the
-   /ADJACENCY   qualifier   to   adjust   the    reporting    to    reflect
-   characteristics of your disks, e.g., pick  a  factor  that  matches  the
-   number of sectors on a drive.
-
-   By default, INTEG uses /ADJACENCY=10.
-
-1 Jrnl_overview
-  Journaling overview
-   Journaling  records  an  extra  copy  of   information   during   database
-   updates in order to  provide  resiliency  against  hardware  and  software
-   failures. Journaling can reduce the "window  of  exposure"  from  some  of
-   the most common types of  failure:  power  loss  and  media  loss  due  to
-   head-to-disk interference.  Journals  also  provide  a  valuable  tool  in
-   cases of software errors and  operational  miscues.  A  journal  file  has
-   questionable value only in the case where the  database  and  the  journal
-   share a common point of failure that  affects  the  information  in  both,
-   over a significant  period  of  time.  Therefore,  using  different  disks
-   and, when possible, different disk controllers for  the  journal  and  the
-   database  files  improves  the  likelihood  of  the  journal  serving  its
-   intended purpose.
-
-   The database management portion of a  MUMPS  implementation  ensures  that
-   multiple concurrent updates and retrievals of  the  same  information  (or
-   information "close  together"  in  ordered  sequence)  are  handled  in  a
-   predictable  and  logical  fashion.  The  database  manager  may  have  to
-   change multiple  records,  usually  indices,  as  a  result  of  a  single
-   update.   Therefore,   interrupting   a   process   performing   such    a
-   "multi-point"  update  violates  a  design   assumption   of   the   MUMPS
-   implementation  and  results  in  a  malformed  database.  Access   to   a
-   damaged area  of  the  database  does  not  produce  the  desired  result.
-   Instead, such an "integrity"  problem  causes  symptoms  including  system
-   hangs,  misplaced  updates,  failure  to  find  information  that  exists,
-   finding information out of sequence,  and  run-time  errors.  If  the  bad
-   records  contain  no  valid  information  or  redundant  information,  the
-   simplest  cures  for  integrity   errors   entail   deleting   incorrectly
-   formatted  records.  However,  sometimes  crashes  damage  information  of
-   value and, in any case, database repair  requires  time  and  skill.  GT.M
-   journaling provides a means to recover  or  replace  databases  that  have
-   integrity problems. Use of journaling  at  this  "global"  level  requires
-   no MUMPS programming.
-
-   MUPIP and its documentation uses the term  transaction  to  mean  database
-   update.  In  journaling,  the  term  transaction  may  refer  to  multiple
-   related database updates.
-
-2 Forward_Recovery
-  Forward Recovery
-   Forward  Recovery  consists  of  restoring  a   backup   copy   of   the
-   database and applying the  journal  file  to  that  database  file.  The
-   journal  file  contains  copies  of  each   database   update.   Forward
-   Recovery reads the entire journal file  from  beginning  to  end  (in  a
-   "forward" direction) and  updates  the  backup  copy  of  the  database.
-   The optional  MUPIP  JOURNAL  /BEFORE=  qualifier  specifies  a  journal
-   ending time that  stops  journal  processing  before  the  physical  end
-   of the journal file. In general,  Forward  Recovery  takes  longer  than
-   Backward  Recovery.  However,  if  the  current  database   is   somehow
-   destroyed, you must use  Forward  Recovery.  Also,  if  a  journal  file
-   was  created  NOBEFORE_IMAGE  with  a  MUPIP  SET,  that  journal   only
-   permits Forward Recovery.
-
-   Example of Forward Recovery:
-
-   MUPIP JOURNAL /RECOVER /FORWARD
-
-
-                                   /BEFORE
-                                   |
-   --------------------------------V-----------X--------->time
-                                  10:30       10:32
-   �+++++++++++++++++++++++++++++++�+++++++++��
-   
-
-   This  shows  a  recovery  after  a  system   crash   at   10:32,   which
-   processes the  entire  journal  file  forward.  If  we  add  /BEFORE="--
-   10:30"  to   the   command,   the   recovery   stops   when   processing
-   encounters updates that originally occurred after 10:30.
-
-2 Backward_Recovery
-  Backward Recovery
-   Backward Recovery works by  processing  from  the  end  of  the  journal
-   file that  contains  information  for  the  period  just  prior  to  the
-   failure event,  thereby  minimizing  recovery  time.  Backward  Recovery
-   uses  "before-image"   journaling.   With   "before-image"   journaling,
-   GT.M  captures  the  database  updates,  as  well  as  "snap-shots"   of
-   portions of the database immediately  prior  to  the  change  caused  by
-   the   update.   In   effect,    MUPIP    JOURNAL=BEFORE_IMAGE    creates
-   "mini-backups"  preceding  each  database  update.   Backward   Recovery
-   uses the mini-backups to restore  the  database  as  far  back  in  time
-   as specified, then it  goes  forward  in  time  replaying  the  database
-   updates. Using Backward  Recovery  with  the  MUPIP  JOURNAL  qualifiers
-   /BEFORE=, /SINCE=, and /LOOKBACK=, you  can  specify  a  block  of  time
-   to recover. JOURNAL /RECOVER /BACKWARD  only  works  if  the  production
-   database is useable, and if the  MUPIP  SET  command  that  created  the
-   journal file specified the BEFORE_IMAGE characteristic.
-
-   Note: Before-images require more disk I/O and storage space.
-
-   Example of Backward Recovery:
-
-   MUPIP JOURNAL /RECOVER /BACKWARD /SINCE="-- 9:30"
-
-
-                   /LOOKBACK_LIMIT
-                   |       /SINCE
-                   |       |       /BEFORE
-                   |       |       |
-   ----------------V-------V-------V------X--------->time
-                           9:30    10:30  10:32
-                   <*******<++++++++++++++�
-                   ********++++++++�++++++�
-
-   
-
-   This shows a recovery after  a  system  crash  at  10:32.  The  recovery
-   "undoes"  the  database  updates  backward  to  9:30  and  then  forward
-   until the crash. If we  add  /BEFORE="--  10:30"  to  the  command,  the
-   recovery  stops  when  forward  processing   encounters   updates   that
-   originally  occurred  after   10:30.   If   the   application   includes
-   ZTSTART  and  ZTCOMMIT  commands  to  fence  a  group  of  transactions,
-   backwards processing may  continue  back  prior  to  9:30  searching  to
-   resolve  fenced  transactions  that  were  incomplete   at   9:30.   The
-   /LOOKBACK_LIMIT=   qualifier   controls   the    maximum    amount    of
-   additional backward processing.
-
-2 Fencing_Transactions
-  Fencing Transactions
-   Journaling without fences in MUMPS addresses  the  fact  that  a  system
-   crash  can  damage  the  database  integrity.  However,   sound   design
-   frequently  dictates  modelling   a   single   "real-world"   event   in
-   updates to  more  than  one  global  variable.  Such  real-world  events
-   are  usually  captured  in  a  single  data  entry   session   and   are
-   referred  to  as  logical  transactions.   Therefore,   interrupting   a
-   process  performing  a  "multi-node"  logical  transaction  violates   a
-   design  assumption  of  the   application   and   results   in   logical
-   inconsistencies  in   the   database.   Such   logical   inconsistencies
-   produce symptoms  including  run-time  errors,  inappropriate  branching
-   and   incorrect   reports.   Sometimes   logical   inconsistencies   are
-   referred to as application-level database integrity problems.
-
-   Standard MUMPS does not yet  include  a  method  to  identify  the  fact
-   that a single logical transaction may be  made  up  of  multiple  global
-   updates.  Therefore,  a  journal   recovery   that   corrects   database
-   integrity  problems  may  perform  an  update  that  is   part   of   an
-   incomplete sequence of updates intended as a single logical unit.
-
-   GT.M provides the MUMPS commands ZTSTART to  mark  the  beginning  of  a
-   logical  transaction  and  ZTCOMMIT  to  mark  the  end  of  a   logical
-   transaction. When ZTSTART and  ZTCOMMIT  fence  a  logical  transaction,
-   the  journal  recovery  can  refrain   from   starting   an   incomplete
-   update. To  take  advantage  of  this  additional  level  of  journaling
-   functionality,  the  application   must   use   ZTSTART   and   ZTCOMMIT
-   commands.
-
-   Journaling  does  not  require  modification  of  application  programs.
-   However,  using  ZTSTART  and  ZTCOMMIT  to   add   transaction   fences
-   around updates that  comprise  a  logical  unit  significantly  improves
-   the  benefit  of  journaling.  For  instance,  the  logical  transaction
-   "transfer funds between accounts" consists of  a  debit  update  to  one
-   account and a credit update to  another  account.  One  of  the  updates
-   made without the other  is  not  valid.  When  recovering  from  journal
-   files,  JOURNAL  processing  recovers  either  all  updates  within  the
-   transaction fences or none  of  them.  MUPIP  JOURNAL  /RECOVER  reports
-   the latter case during recovery.
-
-1 SET
-  SE[T]
-
-   MUPIP SET  changes  some  database  characteristics,  such  as  whether  a
-   specified file  or  region(s)  have  journaling  activated.  SET  requires
-   sole access to the database. SET operates on either regions or files.
-
-   The format for the SET command is:
-
-   SE[T] /qualifier... file-spec or region-list
-   
-   The  file-specification  or  region-list  identifies  the  target  of  the
-   SET. Region-names  separated  by  commas  (,)  make  up  a    region-list.
-   Region-names may include  the  DCL  wildcards  %  and  *.  For  a  summary
-   table of MUPIP commands and  qualifiers  including  MUPIP  SET,  refer  to
-   the MUPIP chapter in the GT.M Administration and Operations Guide.
-
-2 Object_qualifiers
-  Object Qualifiers
-
-/FILE
-  /F[ILE]
-   Specifies that  the  argument  contains  a  file-specification  for  a
-   single  database  file.  The  /FILE  qualifier  is  incompatible  with
-   the /REGION qualifier.
-
-/REGION
-  /R[EGION]
-   Specifies  that   the   argument   contains   a   region-name   which,
-   through the  mapping  of  the  current  Global  Directory,  identifies
-   a  database  file.  SET  /REGION  modifies  multiple  files  when  the
-   parameter  contains  more  than  one  name   and/or   wildcards.   The
-   /REGION qualifier is incompatible with the /FILE qualifier.
-
-2 Action_qualifiers
-  Action Qualifiers
-
-/ACCESS_METHOD
-  /A[CCESS_METHOD]=BG or MM
-   Specifies  the  access  method  for   a   GDS   database   file.   For
-   information  on  ACCESS_METHOD,  refer  to   the   "Global   Directory
-   Editor" chapter of the GT.M Administration and Operations Guide.
-
-   By   default,   MUPIP   CREATE    establishes    ACCESS_METHOD    from
-   information entered in the Global Directory with GDE.
-
-/GLOBAL_BUFFERS
-  /G[LOBAL_BUFFERS]=integer
-   Specifies  the  number  of  cache  buffers  for  a  BG  database.  For
-   information on  determining  good  working  sizes  of  GLOBAL_BUFFERS,
-   refer  to  the  "Global  Directory  Editor"  chapter   of   the   GT.M
-   Administration and Operations Guide.
-
-   The minimum is  64  buffers  and  the  maximum  is  4096  buffers.  By
-   default,    MUPIP    CREATE    establishes     GLOBAL_BUFFERS     from
-   information entered in the Global Directory with GDE.
-
-/JOURNAL
-  /[NO]J[OURNAL][=journal-option-list]
-   Specifies  whether  the  database  allows  journaling   and,   if   it
-   does, characteristics for the journal file.
-
-   /NOJOURNAL   specifies   that   the   database    does    not    allow
-   journaling.  /NOJOURNAL  does  not  accept  an  argument   assignment.
-   /NOJOURNAL  does  not  create  new  journal  files.  When  a  database
-   has been SET  /NOJOURNAL,  it  appears  to  have  no  journaling  file
-   name or other characteristics.
-
-   /JOURNAL=  enables  journaling  for   a   database   file.   /JOURNAL=
-   takes  one  or  more  arguments  in  a   journal-option-list.   Except
-   when used  with  the  OFF  option,  SET  /JOURNAL=  always  creates  a
-   new    version    of    the    specified    journal    file(s).    The
-   journal-option-list  contains  keywords  separated  with  commas   (,)
-   enclosed  in  parentheses  ().  When  the  list  contains   only   one
-   keyword, the parentheses are optional.
-
-   For details on the list refer to the journal-option-list topic.
-
-2 journal-option-list
- journal-option-list elements
-
-    The following topics detail the journal-option-list elements.
-
-3 ON
-  ON
-   ON specifies that MUPIP create  a  new  journal  file  and  that  GT.M
-   record subsequent updates  to  the  database  in  that  journal  file.
-   A   SET   /JOURNAL=ON   must   include    either    BEFORE_IMAGE    or
-   NOBEFORE_IMAGE  in  the  accompanying  journal-option-list.   When   a
-   database has been SET  /JOURNAL=ON,  GT.M  journals  updates  to  that
-   file.
-
-   By default, SET /JOURNAL= turns journaling on.
-
-3 OFF
-  OFF
-   OFF  specifies  that  GT.M  not  record  subsequent  updates  to   the
-   database in the  journal  file.  OFF  may  also  be  used  to  set  up
-   journaling  characteristics  without  creating  a  journal   file   or
-   starting journaling.  When  a  database  has  been  SET  /JOURNAL=OFF,
-   it has established journal  characteristics  ready  to  turn  ON,  but
-   GT.M does not journal updates to that file.
-
-   By default, SET /JOURNAL= turns journaling on.
-
-3 BEFORE_IMAGE
-  [NO]BE[FORE_IMAGE]
-   [NO]BEFORE_IMAGE  controls  whether   the   journal   should   capture
-   before-images of information  that  an  update  is  about  to  modify.
-   MM   databases   must   use   NOBEFORE_IMAGE   journaling.    A    SET
-   /JOURNAL=ON  must  include  either  BEFORE_IMAGE   or   NOBEFORE_IMAGE
-   in the accompanying journal-option-list.
-
-   A  BEFORE_IMAGE  journal  permits  the   possibility   of   performing
-   "roll-back" recovery  (i.e.,  Backward  Recovery)  of  the  associated
-   database.  BEFORE_IMAGE  increases   the   load   on   I/O   and   CPU
-   resources and therefore may affect performance.
-
-3 FILE_NAME
-  F[ILE_NAME]=file-specification
-   FILE_NAME=file-specification  specifies  the  name  of   the   journal
-   file. FILE_NAME is incompatible with SET /REGION.
-
-   Journal file-specifications are limited to 55 characters.
-
-   By    default,    MUPIP     CREATE     establishes     the     journal
-   file-specification  from  the  Global   Directory.   If   the   Global
-   Directory  does  not  contain   a   journal   file-specification   SET
-   /JOURNAL   derives   the   journal   file-specification    from    the
-   database file-specification using a  file  type  of  .MJL.  Note  that
-   because the default usually  places  the  journal  file  on  the  same
-   disk  drive  as  the  database  file,  it  does   not   protect   well
-   against disk hardware failures.
-
-3 ALLOCATION
-  A[LLOCATION]=blocks
-   ALLOCATION=blocks specifies the  initial  size  of  the  journal  file
-   in RMS  blocks.  Because  frequent  journal  file  extensions  degrade
-   run-time  performance,  make  journal  file  allocation  ample  for  a
-   production database.
-
-   The  minimum  ALLOCATION   is   10   blocks   and   the   maximum   is
-   16,777,216 blocks.
-
-   If   journaling   characteristics    have    not    been    previously
-   established  by  GDE  or  a  prior  SET  /FILE  /JOURNAL  and  a   SET
-   /JOURNAL=  specifies  ALLOCATION  but  does  not  specify   EXTENSION,
-   the command automatically  changes  EXTENSION  to  equal  10%  of  the
-   new ALLOCATION.
-
-   By  default,  MUPIP  CREATE  establishes  the  ALLOCATION   from   the
-   Global  Directory,  where  the  Greystone  supplied  default  is   100
-   blocks.  If  the  Global  Directory  does   not   contain   ALLOCATION
-   information, SET /JOURNAL uses a default of 100 blocks.
-
-3 EXTENSION=blocks
-  E[XTENSION]=blocks
-   EXTENSION=blocks  specifies  the  size  by  which   a   journal   file
-   extends  when  it  becomes  full.   EXTENSION=0   disables   automatic
-   journal file extension.  While  this  technique  exerts  firm  control
-   over disk  space  consumption  by  a  journal  file,  running  out  of
-   journal file space  terminates  journaling  for  the  region.  Because
-   frequent  journal  file  extensions  degrade   run-time   performance,
-   make the journal file extension ample for a production database.
-
-   The  minimum  EXTENSION  is  0  blocks  and  the  maximum  is   65,536
-   blocks.
-
-   If   journaling   characteristics    have    not    been    previously
-   established  by  GDE  or  a  prior  SET  /FILE  /JOURNAL  and  a   SET
-   /JOURNAL=  specifies  ALLOCATION  but  does  not  specify   EXTENSION,
-   the command automatically  changes  EXTENSION  to  equal  10%  of  the
-   new ALLOCATION.
-
-   By  default,  MUPIP  CREATE  establishes  the   EXTENSION   from   the
-   Global  Directory,  where  the  Greystone-supplied  default   is   100
-   blocks.  If  the  Global  Directory   does   not   contain   EXTENSION
-   information  and  the   SET   /JOURNAL   does   not   specify   either
-   ALLOCATION or EXTENSION, MUPIP uses a default of 100 blocks.
-
-3 BUFFER_SIZE=pages
-  BU[FFER_SIZE]=pages
-   BUFFER_SIZE=pages specifies  the  amount  of  memory  used  to  buffer
-   journal file output.
-
-   A  larger  BUFFER_SIZE   usually   smooths   and   improves   run-time
-   performance  by  allowing  larger,  less  frequent  writes.   On   the
-   other hand, a  larger  BUFFER_SIZE  requires  more  memory  resources,
-   which may be scarce. A  larger  BUFFER_SIZE  provides  more  room  for
-   journal  records  in  buffered  memory  and  therefore  increases  the
-   number of update records that may be lost in a system failure.
-
-   The minimum BUFFER_SIZE is enough  512-byte  pages  to  hold  two  GDS
-   database blocks and the maximum is 2000 pages.
-
-   By  default,  MUPIP  CREATE  establishes  the  BUFFER_SIZE  from   the
-   Global  Directory,  where  the  Greystone-supplied  default   is   128
-   pages.  If  the  Global  Directory  does   not   contain   BUFFER_SIZE
-   information, SET /JOURNAL uses a default of 128 pages.
-
-2 Examples
-  SET /JOURNAL Examples
-
-   Example
-
-   $ mupip set /file /journal=(nobefore,buff=128) cus.dat
-   
-   This  initiates  journaling  for  the  database  file  cus.dat.  Because
-   the  parameters  include  NOBEFORE,  subsequent  JOURNAL   commands   to
-   /RECOVER the database updates in  the  journal  must  specify  /FORWARD.
-   The journal file created has the name cus.mjl.
-
-   Example
-
-   mupip set /region /journal=(before,alloc=50000,ext=5000) *
-
-   This enables  journaling  with  BEFORE_IMAGES  on  all  regions  of  the
-   current Global  Directory  and  gives  each  journal  an  ALLOCATION  of
-   50000  RMS  blocks  and  an  EXTENSION  of  5000  RMS  blocks.  If   the
-   regions have  significantly  different  levels  of  update,  either  set
-   the  ALLOCATION  and  EXTENSION  in  the  Global  Directory  before  the
-   MUPIP CREATE(s) or use several MUPIP SET /FILE commands.
-
-   Example
-
-   mupip set /region /journal=before *
-   
-   This declares journaling  active  with  before-images  for  all  regions
-   of the current Global Directory when they are next opened.
-
-   Example
-
-   mupip set /file /nojournal MUMPS.DAT
-   
-   This  disables  journaling  on  the  database  file  MUMPS.DAT  in   the
-   current default directory.
-
-1 JOURNAL
-  J[OURNAL]
-
-   The MUPIP  JOURNAL  command  analyzes,  extracts  from,  reports  on,  and
-   recovers journal files.
-
-   Another MUPIP command,  SET,  turns  journaling  on  and  off,  identifies
-   the   type   of   journaling,   and   sets   some   database    journaling
-   characteristics.
-
-   The format for the JOURNAL command is:
-
-   MUPIP J[OURNAL] /qualifier[...] file-specification[,...]
-   
-
-2 Action_qualifiers
-  Action Qualifiers
-
-/RECOVER
-  /REC[OVER]
-   Instructs the JOURNAL  command  to  replay  database  updates  in  the
-   specified  journal  file  into  the  appropriate  database.   /RECOVER
-   initiates  the  central  JOURNAL  operation.  JOURNAL   commands   may
-   specify /RECOVER alone or with other action qualifiers.
-
-/VERIFY
-  /[NO]V[ERIFY]
-   Checks  a  journal  file  for  proper  form.  JOURNAL   commands   may
-   specify  /VERIFY  alone  or  with  other  action  qualifiers.  JOURNAL
-   /RECOVER  commands  implicitly  /VERIFY  the  file(s)  on  which  they
-   operate.  JOURNAL  /RECOVER  ignores  /NOVERIFY  for   all   qualifier
-   combinations that do not include /FORWARD and /FENCES=NONE.
-
-/EXTRACT
-  /EX[TRACT][=file-specification]
-   Specifies  that  JOURNAL  transfer  the  contents  of  one   or   more
-   journal files to a  single  output  file  in  a  format  intended  for
-   processing  by  a  MUMPS  program.  For  a  description  of   /EXTRACT
-   output record formats,  refer  to  the  section  on  JOURNAL  /EXTRACT
-   output  records.  JOURNAL  commands  may  specify  /EXTRACT  alone  or
-   with other action qualifiers.
-
-   /EXTRACT  takes  an  optional  argument,  which  provides  an   output
-   file-specification.
-
-   By default,  MUPIP  JOURNAL  derives  the  output  file  specification
-   using the name of the  original  database  file  associated  with  the
-   journal and a file  type  of  .MJF.  If  the  command  specifies  more
-   than  one  journal  file,  JOURNAL  /EXTRACT   derives   the   default
-   output file specification from the name of the first database.
-
-/SHOW
-  /SH[OW]=show-option-list
-   Specifies what  information  the  JOURNAL  command  displays  about  a
-   journal file.  JOURNAL  commands  may  specify  /SHOW  alone  or  with
-   other action qualifiers.
-
-   For  information  on  the  options  refer  to   the   show-option-list
-   topic.
-
-2 show-option-list
- show-option-list
-
-    The following topics detail the show-option-list elements.
-
-3 ALL
-  AL[L]
-   ALL  displays  every  available  type   of   information   about   the
-   journal   file.   For   additional   information,   refer    to    the
-   descriptions of each of the other SHOW keywords.
-
-3 HEADER
-  H[EADER]
-   HEADER displays the journal file header information.
-
-   This includes:
-
-   o  Database file name
-
-   o  Journal file name
-
-   o  Journal file version label (.e.g. GDSJNLnn)
-
-   o  Whether before-images were captured
-
-   o  Journal creation time/date
-
-   o  Journal creator
-
-   o  The last user to open the journal
-
-   o  The last time the journal file was opened
-
-   The information for the creator and last user includes:
-
-   o  Process Name
-
-   o  Process Identification Number
-
-   o  Node Name
-
-   o  Terminal Number
-
-   o  Login date and time
-
-3 PROCESSES
-  P[ROCESSES]
-   PROCESSES  displays   all   processes   active   during   the   period
-   specified  implicitly  or   explicitly   by   JOURNAL   command   time
-   qualifiers.
-
-3 ACTIVE_PROCESSES
-  AC[TIVE_PROCESSES]
-   ACTIVE_PROCESSES displays all processes  active  at  the  end  of  the
-   period  specified  implicitly  or  explicitly   by   JOURNAL   command
-   time qualifiers.
-
-3 BROKEN_TRANSACTIONS
-  B[ROKEN_TRANSACTIONS]
-   BROKEN_TRANSACTIONS  displays  all  processes  that   had   incomplete
-   fenced  transactions  at  the  end  of  the  period  covered  by   the
-   JOURNAL command.
-
-3 STATISTICS
-  S[TATISTICS]
-   STATISTICS  displays   a   count   of   all   journal   record   types
-   processed  during  the  period  specified  implicitly  or   explicitly
-   by JOURNAL command time qualifiers.
-
-2 Direction_qualifiers
-  Direction Qualifiers
-
-/FORWARD
-  /FO[RWARD]
-   Specifies  that  JOURNAL  processing  should   proceed   from      the
-   beginning  of  the  given  journal  files.  If  the  actions   include
-   /RECOVER, the target database file  should  contain  a  copy  of  that
-   database made at  the  time  when  MUPIP  SET  /JOURNAL=  created  the
-   journal files.
-
-   /FORWARD is incompatible with /BACKWARD.
-
-/BACKWARD
-  /BA[CKWARD]
-   Specifies that JOURNAL processing  should  proceed  from  the  end  of
-   the  journal  files.  If  the  actions   include   /RECOVER,   JOURNAL
-   /BACKWARD starts  restoring  before-images  starting  at  the  end  of
-   the  file,  back  to  an  explicitly  or  implicitly  specified  point
-   before  it  "reverses"  and  processes   database   updates   in   the
-   forward  direction.  The  target  database  file  should  "match"  the
-   end of the journal  file,  i.e.,  be  the  same  as  when  GT.M  wrote
-   the last record of the journal.
-
-   /BACKWARD is incompatible with /FORWARD.
-
-2 Time_qualifiers
-  Journal time specifications
-   Journal qualifiers  specifying  time  take  arguments  in  VMS  absolute
-   or delta  time  format.  Enclose  time  arguments  in  quotes  ("")  and
-   include  all  leading  delimiters.  Absolute  format   is   "day-mm-yyyy
-   hh:mm:ss:cc" , where cc represents  hundredths  of  a  second.  Absolute
-   time may indicate  today's  date  with  "--"  before  the  hours.  Delta
-   format is "day hh:mm:ss:cc"  ,  where  cc  represents  hundredths  of  a
-   second. If delta time is less than  a  day,  it  must  start  with  zero
-   (0) followed by a  space,  or  just  a  space,  before  the  hours.  For
-   information on how to specify the time,  refer  to  the  VAX/VMS  System
-   Services Manual.
-
-   Delta time is always relative to the time of  the  last  record  in  all
-   journal  file  arguments  to  the  MUPIP  JOURNAL  command.   A   normal
-   database  closure,  caused  by  the  last  accessing   process   leaving
-   GT.M,   also   properly   closes   the    associated    journal    file.
-   Alternatively, a  system  failure  causes  the  journal  to  end  in  an
-   abnormal  or  "disorganized"  fashion.  JOURNAL  processing  deals  with
-   both cases.
-
-   The time qualifiers perform as follows:
-
-   o   /AFTER= only applies to  JOURNAL  /EXTRACT  /FORWARD  and  specifies
-       a starting time; processing for  all  other  /FORWARD  actions  must
-       start at the beginning of the journal files
-
-   o   /BEFORE= specifies  an  ending  time  for  any  action  /FORWARD  or
-       /BACKWARD
-
-   o   /SINCE= specifies a starting time for any action /BACKWARD
-
-   o   /LOOKBACK_LIMIT=  specifies  a  "safety  zone"  for  resolving  open
-       fenced  transactions  when  processing  any  action  /BACKWARD;  the
-       /LOOKBACK_LIMIT= argument may  be  a  list  of  limits:  "TIME=time"
-       and/or "OPERATIONS=integer"
-
-   Because GT.M rounds time-stamps within  the  journal  to  hundredths  of
-   a  second  and  the  JOURNAL  processing  can  only  determine  time  as
-   exactly  as  the   journal   records   permit,   the   JOURNAL   command
-   processes specified times  in  a  "fuzzy"  fashion.  Because  they  deal
-   with   processing   completed   logical   transactions,   /SINCE=    and
-   /LOOKBACK= times have more "blur" than /AFTER= and /BEFORE= times.
-
-/AFTER
-  /A[FTER]=time
-   Specifies  the  starting  time  for  JOURNAL  /EXTRACT   /FORWARD   to
-   commence  output.  The  time  specified  references  time  stamps   in
-   the  journal  and   identifies   the   point   after   which   JOURNAL
-   processing  starts  extracting  information   out   of   the   journal
-   file.  /AFTER=  specifies  time  in  VMS  absolute   or   delta   time
-   formats. Delta format  specifies  an  offset  from  the  time  of  the
-   last  record  of  the  journal  file.  If  /AFTER=  provides  a   time
-   following  the  last  time   recorded   in   the   journal   file   or
-   following  any  /BEFORE=  time,   JOURNAL   processing   produces   no
-   result.  Using  /BEFORE=  with  /AFTER=  restricts   /EXTRACT   to   a
-   particular period of time.
-
-   /AFTER=  is  incompatible  with  /BACKWARD   and   with   all   action
-   qualifiers except /EXTRACT.
-
-   By  default,  /EXTRACT  starts  at  the  beginning  of   the   journal
-   file.
-
-/BEFORE
-  /BE[FORE]=time
-   Specifies  the  ending  time  at  which   JOURNAL   processing   stops
-   extracting  or  recovering  data.  The   time   specified   references
-   time stamps in the journal  files.  /BEFORE=  specifies  time  in  VMS
-   absolute or delta time  formats.  Delta  format  specifies  an  offset
-   from the time stamp in the last  record  of  each  the  journal  file.
-   If /BEFORE= provides a time  preceding  the  first  time  recorded  in
-   the  journal  file  or  preceding  any  /AFTER=   or   /SINCE=   time,
-   JOURNAL processing produces no result.
-
-   /BEFORE= is compatible with all other JOURNAL qualifiers.
-
-   By  default,  JOURNAL  processing  terminates  at  the  end   of   the
-   journal file.
-
-/SINCE
-  /SI[NCE]=time
-   Specifies how far  back  in  time  JOURNAL  /BACKWARD  should  process
-   from the  end  of  the  journal  file,  before  starting  its  forward
-   processing.  The  time  specified  references  time  stamps   in   the
-   journal files.  /SINCE=  specifies  time  in  VMS  absolute  or  delta
-   time  formats. Delta format specifies  an  offset  from  the  time  of
-   the  last  record  of  the  journal  file.  When   JOURNAL   /BACKWARD
-   locates the /SINCE= time, if  it  has  open  fenced  transactions,  it
-   continues processing backward  to  resolve  them  unless  the  command
-   also  specifies  /FENCES=NONE.  The  /LOOKBACK=   qualifier   controls
-   the length of processing backward past the /SINCE= time.
-
-   If /SINCE=  time  exceeds  the  last  time  recorded  in  the  journal
-   files,  JOURNAL  processing   effectively   ignores   the   qualifier.
-   /SINCE=  is  incompatible  with  /FORWARD.  If  /SINCE=   provides   a
-   time preceding any  /BEFORE=  time,  JOURNAL  processing  produces  no
-   result.
-
-   By  default,  JOURNAL  /BACKWARD   processes   the   last   five   (5)
-   minutes of the journal file(s).
-
-/LOOKBACK_LIMIT
-                           /[NO]LOO[KBACK_LIMIT][=lookback-option-list]
-   Specifies  how  far  JOURNAL  /BACKWARD  processes   back   past   the
-   explicit (/SINCE=) or  implicit  turn  around  time  while  attempting
-   to  resolve  open  transaction  fences.  /LOOKBACK=  options   include
-   time and transaction counts.
-
-   /NOLOOKBACK_LIMIT  specifies  that  JOURNAL  /BACKWARD   can   process
-   all the way to the  beginning  of  the  journal  file,  if  necessary,
-   to resolve open transaction fences.
-
-   /LOOKBACK_LIMIT=    is    incompatible     with     /FORWARD.     When
-   /FENCES=NONE, JOURNAL processing ignores /LOOKBACK_LIMIT=.
-
-   The lookback-options are:
-
-   TIME=time             limits lookback by a specified amount of
-                         delta or absolute journal time
-
-   OPERATIONS=integer    limits  lookback  to  some  number  of  database
-                         updates
-
-   The lookback-option names  and  values  must  be  enclosed  in  quotes
-   (""),  e.g.,  "Time=0  00:05"   or   "Oper=10."      When   /LOOKBACK=
-   specifies both options,  they  must  be  enclosed  in  parentheses  ()
-   and  separated  by  a  comma  (,).  When  /LOOKBACK=  specifies   both
-   options, the first limit reached terminates the lookback.
-
-   By  default,  MUPIP  JOURNAL   uses   /LOOKBACK_LIMIT="TIME=0   00:05"
-   providing five minutes of journal  time  prior  to  /SINCE=  in  which
-   to resolve open fences.
-
-2 Control_qualifiers
-  Control Qualifiers
-
-/REDIRECT
-  /RED[IRECT]=file-pair-list
-   Specifies  that  JOURNAL  /RECOVER  replay  the  journal  file  to   a
-   database different  than  the  one  for  which  it  was  created.  Use
-   this qualifier  to  create  or  maintain  databases  for  training  or
-   testing.
-
-   JOURNAL rejects /REDIRECT unless it appears with /RECOVER.
-
-   The   file-pair-list   consists   of   one   or    more    pairs    of
-   file-specifications  enclosed  in  parentheses  ()  and  separated  by
-   commas  (,).  The  pairs  are  separated  by  an  equal  sign  in  the
-   form:
-
-   old-file-specification=new-file-specification
-   
-   where  the  first  file-specification  names  the  original   database
-   file and  the  second  file-specification  names  the  target  of  the
-   /RECOVER.  When  /REDIRECT  specifies  only   one   file   pair,   the
-   parentheses are optional.
-
-   By default,  JOURNAL  directs  /RECOVER  to  the  database  file  from
-   which the journal was made.
-
-/FENCES
-  /FE[NCES]=fence-option
-   Specifies  how   JOURNAL   processes   fenced   transactions.   Fenced
-   transactions  are   logical   transactions   made   up   of   database
-   updates preceded in MUMPS by a  ZTSTART  command  and  followed  by  a
-   ZTCOMMIT command.  All  updates  between  a  ZTSTART  and  a  ZTCOMMIT
-   are designed such that  they  should  all  occur  together,  i.e.,  no
-   one of them should reach the database unless they all do.
-
-   The fence options are:
-
-   o  NONE, which causes JOURNAL  to  apply  all  individual  updates  as
-      if transaction fences did not exist
-
-   o  ALWAYS,  which  causes   JOURNAL   to   treat   any   unfenced   or
-      improperly fenced updates as errors
-
-   o  PROCESS,  which  causes  JOURNAL  to   accept   unfenced   database
-      updates,  and  also   to   observe   fences   when   they   appear,
-      generating  an  error  in  the  case   of   a   ZTSTART   with   no
-      corresponding ZTCOMMIT
-
-   By default, MUPIP JOURNAL uses /FENCES=PROCESS.
-
-/INTERACTIVE
-  /[NO]IN[TERACTIVE]
-   Specifies whether, for  each  error  over  the  /ERROR_LIMIT,  JOURNAL
-   processing   prompts   the   invoking   operator   for    an    answer
-   controlling continuation  of  processing.  If  the  operator  responds
-   that  processing  should  not   continue,   the      JOURNAL   command
-   terminates.
-
-   /NOINTERACTIVE terminates  the  journal  processing  as  soon  as  the
-   process   generates   the    number    of    errors    specified    in
-   /ERROR_LIMIT.
-
-   When   processing   in    INTERACTIVE    mode,    the    default    is
-   /INTERACTIVE,  otherwise,   e.g.,   BATCH   mode,   the   default   is
-   /NOINTERACTIVE.
-
-/ERROR_LIMIT
-  /[NO]ER[ROR_LIMIT][=integer]
-   Specifies the number of  errors  that  JOURNAL  processing  treats  as
-   acceptable. When  the  number  of  errors  exceeds  the  /ERROR_LIMIT,
-   the  /INTERACTIVE  qualifier  determines  whether  JOURNAL  processing
-   halts or defers to the operator.
-
-   /NOERROR_LIMIT prevents  JOURNAL  from  stopping  because  of  errors.
-   Journal processing will continue until  it  reaches  the  end  of  the
-   journal  file,  regardless  of  the  number  of  errors.   Note   that
-   /NOERROR_LIMIT is not the same as /ERROR_LIMIT=0.
-
-   By default, MUPIP  JOURNAL  uses  /ERROR_LIMIT=0,  causing  the  first
-   error to initiate the appropriate error action.
-
-/LOG
-  /[NO]LOG[=file-specification]
-   Specifies  whether  JOURNAL  reports  its  actions  as   it   performs
-   them. /NOLOG suppresses JOURNAL messages.
-   /LOG=file-specification specifies the name of a log file.
-
-   By default, MUPIP JOURNAL uses /LOG=SYS$OUTPUT.
-
-/CHECKTN
-  /[NO]C[HECKTN]
-   /CHECKTN  specifies  that  JOURNAL  /FORWARD  must  ensure  that   the
-   first  database  update   in   the   journal   file   has   the   next
-   transaction number after  the  current  transaction  in  the  database
-   file.
-
-   /NOCHECKTN   suppresses   checking    of    the    starting    journal
-   transaction against the ending database transaction number.
-
-   /CHECKTN is incompatible with the /BACKWARD qualifier.
-
-   By default, JOURNAL /FORWARD uses /CHECKTN.
-
-2 Selection_qualifiers
-  Selection Qualifiers
-
-/GLOBAL
-  /G[LOBAL]=global-list
-   Specifies  globals  for   JOURNAL   to   include   or   exclude   from
-   processing.  You  may  find  this  qualifier  useful  for   extracting
-   and analyzing specific data.
-
-   The global-list contains  names  of  one  or  more  global-names  (not
-   including subscripts) preceded  by  "^"  enclosed  in  parentheses  ()
-   and separated by commas (,).  If  /GLOBAL  specifies  only  one  item,
-   the  parentheses  are  optional.  The  names  may  include   the   DCL
-   wildcards  %  and  *.  However,  to  allow  specification  of   global
-   names  starting  with  a  "percent"  (%),  MUPIP  JOURNAL   does   not
-   interpret  the  first  character  in  a  global-name  as  a  wildcard.
-   The entire  list  or  each  name  may  optionally  be  preceded  by  a
-   minus  (-),  requiring  JOURNAL  to  exclude  database  updates   that
-   update  the    specified  global(s).  When  the  global-list  with   a
-   JOURNAL /GLOBAL  does  not  start  with  a  minus,  JOURNAL  processes
-   only the explicitly named globals.
-
-   By default, JOURNAL processes all globals.
-
-/USER
-  /U[SER]=user-list
-   Specifies  that  JOURNAL  processing  include  or   exclude   database
-   updates  generated  by  one  or  more  users.   You   may   use   this
-   qualifier  to  "back-out"  database  updates  erroneously  entered  by
-   a specific user.
-
-   The user-list  contains  names  of  one  or  more  users  enclosed  in
-   parentheses ()  and  separated  by  commas  (,).  If  /USER  specifies
-   only  one  item,  the  parentheses  are  optional.   The   names   may
-   include the DCL wildcards % and  *.  The  entire  list  or  each  name
-   may optionally be preceded  by  a  minus  (-),  requiring  JOURNAL  to
-   exclude  database  updates  initiated  by   the   specified   user(s).
-   When the user-list  with  a  JOURNAL  /USER  does  not  start  with  a
-   minus, JOURNAL  processes  only  database  updates  generated  by  the
-   explicitly named users.
-
-   By default, JOURNAL  processes  database  updates  regardless  of  the
-   user by which they were initiated.
-
-/ID
-  /ID=pid-list
-   Specifies  that  JOURNAL  processing  include  or   exclude   database
-   updates  generated  by  one   or   more   processes,   identified   by
-   process  identification  numbers  (PIDs)  in  hexadecimal.   You   may
-   use this qualifier for troubleshooting or analysis of data.
-
-   The pid-list  contains  one  or  more  PIDs  enclosed  in  parentheses
-   () and separated by commas  (,).  If  /ID  specifies  only  one  item,
-   the parentheses  are  optional.  The  entire  list  or  each  PID  may
-   optionally  be  preceded  by  a  minus  (-),  requiring   JOURNAL   to
-   exclude  database  updates  associated  with  the  specified   PID(s).
-   When  the  pid-list  with  a  JOURNAL  /ID  does  not  start  with   a
-   minus,   JOURNAL  processes  only  database  updates  associated  with
-   the explicitly listed PIDs.
-
-   By default, JOURNAL  processes  database  updates  regardless  of  the
-   process by which they were initiated.
-
-/PROCESS
-  /P[ROCESS]=process-name-list
-   Specifies  that  JOURNAL  processing  include  or   exclude   database
-   updates generated by one  or  more  processes,  identified  by  names.
-   You  may  use  this  qualifier  to  extract  specific  process-related
-   data for testing or troubleshooting.
-
-   The  process-name-list  contains  names  of  one  or  more   processes
-   enclosed  in  parentheses  ()  and  separated  by   commas   (,).   If
-   /PROCESS specifies  only  one  item,  the  parentheses  are  optional.
-   The names may include the DCL wildcards  %  and  *.  The  entire  list
-   or each process-name  may  optionally  be  preceded  by  a  minus  (-)
-   requiring  JOURNAL  to  exclude  database  updates   associated   with
-   the specified process  name(s).  When  the  process-name-list  with  a
-   JOURNAL /PROCESS does  not  start  with  a  minus,  JOURNAL  processes
-   only  database  updates   associated   with   the   explicitly   named
-   processes.
-
-   By default, JOURNAL  processes  database  updates  regardless  of  the
-   process by which they were initiated.
-
-/TRANSACTION
-  /T[RANSACTION]=transaction-type
-   Specifies  transaction-types  for  JOURNAL  to  include   or   exclude
-   from  processing.  For  example,  you  may  use  this   qualifier   to
-   exclude  KILL  transactions  and  prevent  an  accidental  KILL   from
-   reoccurring during replay.
-
-   The transaction-types are:
-
-    SET
-
-    KILL
-
-   These types correspond to  the  MUMPS  commands  of  the  same  names.
-   The transaction-type  may  optionally  be  preceded  by  a  minus  (-)
-   requiring JOURNAL to  exclude  transactions  of  the  specified  type.
-   When  the  transaction-type  with  a  JOURNAL  /TRANSACTION  does  not
-   start with  a  minus,  JOURNAL  processes  only  transactions  of  the
-   explicitly named type.
-
-   By default, JOURNAL processes transactions regardless of type.
-
-2 Examples
-  Journal Examples
-
-   Example
-
-   $ copy sys$dat:cus.dat []
-   $ mupip journal /recover /forward /fences=none cus.mjl
-   
-   The COPY statement copies a backup copy  of  the  database  for  use  in
-   recovery. The MUPIP JOURNAL command  recovers  the  database  using  the
-   cus.mjl  journal  file.  The  JOURNAL  command  processes  the   journal
-   file in a  forward  direction  (from  the  beginning  of  the  journal).
-   The /FENCES=NONE directs  JOURNAL  to  ignore  any  fences  and  recover
-   all individual updates.
-
-   Example
-
-   $ mupip set /file /journal=(before,buff=128) cus.dat
-   $ mupip set /file /journal=(before,buff=128) acc.dat
-   ...
-   $ mupip journal/recover/verify/back/error=2 cus.mjl,acc.mjl
-   
-   The  first  two  command  lines  initiate   journaling   for   the   two
-   specified database  files.  MUPIP  JOURNAL  does  not  accept  wildcards
-   in  database  file  names.  Because  the  MUPIP  SET  command  specifies
-   JOURNAL=BEFORE,   subsequent   JOURNAL   /RECOVER   may   have    either
-   /FORWARD or /BACKWARD direction. The  last  line  contains  the  command
-   to recover the two  database  files  using  the  two  specified  journal
-   files. The journal recover  processes  in  a  BACKWARD  direction  using
-   before-image  processing.  If  JOURNAL  processing  encounters  two   or
-   more errors (/ERROR=2), the recovery process terminates.
-
-   Example
-
-   $ mupip journal/forw/befo="-- 10:30"/glob="^bv%r*"/extr=bv cus.mjl
-   
-   This command line extracts  database  updates  that  occurred  from  the
-   beginning of the journal  until  10:30  to  global  variables  with  the
-   prefix ^bv , followed by  some  character,  followed  by  r,  optionally
-   followed  by  more  characters.  The   JOURNAL   /EXTRACT   places   the
-   updates in a file called bv.mjf
-   
-   Because the command does  not  specify  an  extension,  JOURNAL  assigns
-   the default extension .mjf to the output file.
-
-   Example
-
-   $ mupip jour/rec/back/befo="-- 10:30"/since="-- 9:30" -
-   /lookback="time=0 00:05" cus.mjl
-   
-   This command  line  performs  a  /RECOVERY  /BACKWARD  of  the  database
-   file  that  corresponds  to  the  journal   file   cus.mjl.      JOURNAL
-   /RECOVER  processes  from  the  journal  time  9:30  to   journal   time
-   10:30.  If  the  JOURNAL  finds  open  fenced  transactions,  it  "looks
-   back" an additional five minutes  to  resolve  them.  The  /BEFORE=  and
-   /SINCE= qualifiers in  this  example  use  absolute  time.  Because  the
-   time specification omits the date, JOURNAL assumes today's date.
-
-2 extract_formats
-  JOURNAL /EXTRACT formats
-   EXTRACT  output  records  are  constructed   of   fields   or   "pieces"
-   delimited by back-slashes (\).
-
-   The first  piece  of  an  EXTRACT  output  record  always  contains  the
-   two-digit decimal transaction  record  type,  e.g.,  01  for  a  process
-   initialization record.
-
-   The  second  piece  always  contains  the  full   date   and   time   of
-   operation,  represented  in  $HOROLOG-format,  with   decimal   seconds,
-   e.g., 54271,44580.55.
-
-   The third piece always contains the process  id  (PID)  of  the  process
-   that performed the operation,  represented  as  a  decimal  number.  The
-   remainder of the record depends on the record type.
-
-   The  fields  described  as  "database  transaction  number"  contain   a
-   GT.M assigned number that is unique within the journal file.
-
-3 proc_initialization
-  Process Initialization Record
-   A  type  1  record  indicates  an  image-initiated  contact  with  the
-   GT.M  database  region  for  the  first  time.  The   format   for   a
-   process initialization record is:
-
-   01\time\pid\pnam\nnam\unam\mode\term\ltim\icnt
-   
-   where
-
-   time full time/date
-
-   pid        process id
-
-   pnam process name
-
-   nnam node name
-
-   unam user name
-
-   mode process mode, i.e., $zgetjpi("jobtype")
-
-   term terminal name
-
-   ltim process login time/date
-
-   icnt       process image count
-
-3 proc_termination
-  Type 2 - Process Termination Record
-   A  type  2  record  indicates  an   image   terminated   and   dropped
-   interest in the  GT.M  database  region.  The  format  for  a  process
-   termination record is:
-
-   02\time\pid\pnam\nnam\unam\mode\term\ltim\icnt
-
-   where
-
-   time full time/date
-
-   pid        process id
-
-   pnam process name
-
-   nnam node name
-
-   unam user name
-
-   mode process mode, i.e., $zgetjpi("jobtype")
-
-   term terminal name
-
-   ltim process login time/date
-
-   icnt       process image count
-
-   tnum database transaction number
-
-3 end_of_file
-  Type 3 - End of File Record
-   A type  3  record  indicates  all  GT.M  images  dropped  interest  in
-   the region and the  journal  file  was  closed  normally.  The  format
-   for an end-of-file record is:
-
-   03\time\pid\pnam\nnam\unam\mode\term\ltim\icnt\tnum
-
-   where
-
-   time full time/date
-
-   pid        process id
-
-   pnam process name
-
-   nnam node name
-
-   unam user name
-
-   mode process mode, i.e., $zgetjpi("jobtype")
-
-   term terminal name
-
-   ltim process login time/date
-
-   icnt       process image count
-
-   tnum database transaction number
-
-3 Kill
-  Type 4 - Kill Record
-   A type  4  record  indicates  a  database  update  caused  by  a  KILL
-   command. The format for a KILL record is:
-
-   04\time\pid\tnum\node
-   
-   where
-
-   time full time/date
-
-   pid        process id
-
-   tnum database transaction number
-
-   node a MUMPS node reference in external format
-
-3 Set
-  Type 5 - Set Record
-   A  type  5  record  indicates  a  database  update  caused  by  a  SET
-   command. The format for a SET record is:
-
-   05\time\pid\tnum\sarg
-
-   where
-
-   time full time/date
-
-   pid        process id
-
-   tnum database transaction number
-
-   sarg a MUMPS set argument
-
-   Note a MUMPS  SET  argument  has  a  node  reference  followed  by  an
-   equal-sign (=) and MUMPS data string expression.
-
-3 tr_start
-  Type 6 - Transaction Start Record
-   A type 6  record  indicates  a  ZTSTART  command.  The  format  for  a
-   transaction start record is:
-
-   06\time\pid
-
-   where
-
-   time full time/date
-
-   pid        process id
-
-3 tr_commit
-  Type 7 - Transaction Commit Record
-   A type 7 record  indicates  a  ZTCOMMIT  command.  The  format  for  a
-   transaction commit record is:
-
-   07\time\pid\tnum\part
-   
-   where
-
-   time full time/date
-
-   pid        process id
-
-   tnum database transaction number
-
-   part number of journal entries in the transaction
-
-1 Jrnl_examples
- The   following   examples   present   a   typical   use    of    database
-   journaling  to  prevent  loss  of  data.  In  our  examples  the  database
-   consists   of   three   regions,    ACC,    MAIN,    and    TMP,    mapped
-   respectively    to    files    USER:[PROD]ACC.DAT,    USER:[PROD]MUMPS.DAT
-   and USER:[PROD]TMP.DAT.
-
-2 Setting_Database_Regions_for_Journaling
- We  assume  that  region  TMP  holds  only  process-local   data,   and,
-   therefore, does  not  require  backups  or  journaling.  We  assume,  on
-   the  other  hand,  that   regions   ACC   and   MAIN   hold   production
-   application   data   that   should   be   protected    by    journaling.
-   Moreover,    our    application    requires    a    high    degree    of
-   availability.  Therefore,  we  set  up  journaling  with   BEFORE_IMAGES
-   for  regions  ACC  and  MAIN.  The  BEFORE_IMAGES  allow   for   JOURNAL
-   RECOVER  /BACKWARD,  which   generally   works   faster   than   JOURNAL
-   RECOVER  /FORWARD.  Because  both  our  journaled  regions  map  to  the
-   database files  on  device  USER:,  we  choose  a  different  disk  with
-   a  different  controller  to  accommodate  the   journal   files.   This
-   choice improves resiliency against hardware failures.
-
-   Example
-
-   $ mupip set /region/journal=(off,buff=200,file=JNL:[PROD]ACC)
-   ACC
-   $ mupip set/region/journal=(off,buff=200,file=JNL:[PROD]MAIN)
-   MAIN
-   
-   These  commands  must  be   issued   when   the   database   files   are
-   available   for   exclusive   (stand-alone)   access.   They   establish
-   several   journal   characteristics.   The   example    increases    the
-   journal buffer size from the default of 128 pages to 200 pages.
-
-2 Journal_Maintenance
- First  backup  the  database  files.  Thencreate  and   initialize   new
-   journal files.
-
-   Example
-
-   $ mupip backup ACC,MAIN USR$BCK:[051590]
-   $ mupip set /region /journal=(on,before) ACC,MAIN
-   $ purge JNL:[PROD]*.MJL
-   
-   This  sequence  of  commands  backs  up  the  database  files  to  disk,
-   initializes  new  journal  files   for   each   and   purges   the   old
-   journal  files.  MUPIP  BACKUP  can  operate  without  exclusive  access
-   to the database  files  by  freezing  all  updates.  However,  in  order
-   to ensure  that  the  BACKUP  captures  an  application  state  matching
-   the beginning of the journal files, it should run stand-alone.
-
-   Some   applications   with   high   rates   of   updates   may    create
-   considerable  amount  of  journaling  data.  To  save  the  disk  space,
-   you  may  archive  journal  files  to  magnetic  tapes  until  the  next
-   database backup.  Before  archiving  a  journal  file,  first  create  a
-   new one.
-
-   Example
-
-   $ mupip set /file /journal=(on,before) ACC.DAT
-   $ backup []ACC.MJL;-1 MSA0:051590JNL.BCK /save_set
-   $ purge JNL:[PROD]ACC.MJL
-   
-   This  sequence  creates  a  new  journal  file,   backs   up   the   old
-   journal  file  to  the  tape  and  finally,   purges   the   old   file.
-   Notice  that  the  MUPIP  SET   requires   exclusive   access   to   the
-   database file  to  ensure  that  the  old  journal  stops  and  the  new
-   journal starts with consistent transaction states.
-
-2 Recovery_from_Journal_Files
- Because  we  set  up  our  databases   with   BEFORE_IMAGE   journaling,
-   when  both  the  database  and  journal  files  are  available  after  a
-   failure event, we can use JOURNAL /RECOVER /BACKWARD.
-
-   Example
-
-   $ delete user:[prod]tmp.dat.
-   $ mupip create /region=tmp
-   $ mupip journal/reco/show/back/nointer JNL:[PROD]ACC,MAIN
-   $ mupip integ /region *
-   
-   This  first  deletes  and   recreates   TMP.DAT.   The   MUPIP   JOURNAL
-   command includes the  /SHOW  qualifier  to  generate  a  report  on  the
-   status  of  activity  in  the  journal  files.  It  also  includes   the
-   /NOINTERACTIVE  qualifier   to   prevent   operator   interaction   when
-   JOURNAL  processing  encounters  an  error.  By  default,  this  JOURNAL
-   /RECOVER  has  an  implicit  /ERROR_LIMIT=0,  which  causes  the   first
-   broken   transaction   to   terminate   processing.   In   addition   to
-   checking database  integrity,  the  MUPIP  INTEG  /REGION  acts  as  the
-   first database access  after  the  recovery  and,  if  the  old  journal
-   file  terminates  improperly,  creates  a  new  journal   file.   Unlike
-   INTEG /REGION,  the  command  MUPIP  INTEG  /FILE  does  not  initialize
-   a new journal file.  However,  if  the  old  journal  file  has  damage,
-   any  other  access  to  the  data  base  creates  a  new   version.   If
-   MUPIP   JOURNAL   /RECOVER   reports    broken    transactions    during
-   recovery, reenter the transactions.
-
-   If  the  databases  were  lost,  for  instance  due  to  a  disk   drive
-   failure,  we  would  have  to  use  JOURNAL  /RECOVER   /FORWARD   after
-   replacing  the  drive  and  retrieving   backups   of   the   databases.
-   This  recovery  may   take   much   longer   than   backward   recovery,
-   depending on the amount of data in the journal.
-
-   Example
-
-   $ delete USER:[PROD]*.DAT;*
-   $ backup USR$BCK:[051590]ACC.DAT USER:[PROD]
-   $ backup USR$BCK:[051590]MUMPS.DAT USER:[PROD]
-   $ mupip journal /reco /forw /err=5 JNL:[JNL]ACC,MAIN
-   $ mupip create /region=TMP
-   $ mupip integ /region /fast *
-   
-   This  sequence  of  commands  recreates  the  databases  to  the   point
-   of  the  last  backup.  Then  it   recovers   all   updates   from   the
-   journal   files.   The   /ERROR_LIMIT=    qualifier    causes    JOURNAL
-   /RECOVER to attempt  processing  through  up  to  five  (5)  errors.  By
-   default,  when  the  JOURNAL  /RECOVER  executes  in  batch,  processing
-   terminates  after  five  errors.  However  if   the   command   executes
-   interactively,  after  five  errors,  MUPIP  JOURNAL  prompts  the   the
-   operator  at  the  invoking  terminal  to  choose   between   continuing
-   or  terminating.  Also  by  default,  the   JOURNAL   /RECOVER   command
-   implies  a  /VERIFY,  causing  a  check  of   the   journal   prior   to
-   /RECOVER  processing.  The   commands   up   to   this   point   require
-   exclusive  (stand-alone)   access   to   the   database   files.   MUPIP
-   INTEG  /REGION  verifies  the  integrity  of  the  recovered   database.
-   If  the  journal  was  not  properly  closed,  the  INTEG  /REGION  also
-   creates a new  version  of  the  journal  file.  Because  the  databases
-   are  large,  we  use  the  /FAST  qualifier  on   the   INTEG.   Because
-   INTEG  freezes  all   updates   and   we   wish   to   ensure   database
-   integrity  before  going  back   into   production,   we   continue   to
-   restrict  access  to  the  database  until  the  INTEG  completes.  Once
-   the database  has  been  verified,  we  can  resume  work.  One  of  the
-   first  items   of   business   should   be   to   reenter   any   broken
-   transactions.
-
-   Should the system  crash  again  and  something  such  as  a  hard  disk
-   failure  prevent  backward  recovery,  we  must  recover  the   database
-   forward,  twice.  First,  restore  the  database   from   backup,   then
-   recover  to  the  point  of  the  first  crash,  finally,  recover  from
-   that  point  to  the   point   of   the   second   crash.   To   recover
-   transactions  in  their  proper  order,  include  the   file   versions.
-   Notice   that   it   is   not   necessary   to   reenter   the    broken
-   transactions   after   the   first   recovery   because   the    current
-   version of the journal file contains those transactions.
-
-   Example
-
-   $ delete *.DAT;*
-   $ mupip restore ACC.DAT USR$BCK:[051590]ACC.BCK
-   $ backup USR$BCK:[051590]ACC.DAT USER:[PROD]
-   $ backup USR$BCK:[051590]MUMPS.DAT USER:[PROD]
-   $ mupip journal/reco/veri/forw/err=5
-   JNL:[JNL]ACC.MJL;-1,MUMPS.MJL;-1
-   $ mupip journal/reco/veri/forw/err=5 JNL:[JNL]ACC.MJL,MUMPS.MJL
-   $ mupip create /region=TMP
-   $ mupip integ /region /fast *
-
-   This  is  similar  to  the  previous  example,  however,  this  sequence
-   recovers   the   database   regions   from   two   consecutive   journal
-   files.
-
-
-1 LOAD
-  L[OAD]
-   LOAD enters global variable names  and  their  corresponding  data  values
-   into a GT.M  database  from  a  sequential  file.  LOAD  uses  the  Global
-   Directory to determine which database  files  to  use.  LOAD  may  operate
-   concurrently with normal  GT.M  database  access.  However,  a  LOAD  does
-   not  use  MUMPS  LOCKs  and  therefore   may   produce   application-level
-   integrity problems if run concurrently with many applications.
-
-   The format of the LOAD command is:
-
-   L[OAD] [qualifier...] file-specification
-
-   LOAD takes its input from the file defined by the file-specification.
-
-   <CTRL C> produces a status message from LOAD.  <CTRL  Y>  aborts  LOAD.  A
-   LOAD terminated abnormally by  operator  action  or  error  is  incomplete
-   but does not adversely affect the database structure.
-
-2 /FORMAT
-  /FO[RMAT]=keyword
-   Specifies the format of the  input  file.  The  format  must  match  the
-   actual format of the input file for LOAD to operate.
-
-   The format codes are:
-
-   GO - Global Output format
-
-   B[INARY] - Binary format
-
-   GOQ - Format produced by certain MUMPS implementations
-
-   By default, LOAD uses /FORMAT=GO.
-
-3 GO
-  /FORMAT=GO
-   /FORMAT=GO stores the data in record pairs. Each global node  produces
-   one record for the key
-   and one for the data. /FORMAT=GO has  two  header  records,  therefore
-   LOAD /FORMAT=GO
-   starts active work with record number three (3).
-
-3 BINARY
-  /FORMAT=BINARY
-   /FORMAT=BINARY  only  applies  for   Greystone   Technology   Database
-   Structure (GDS) files. A
-   BINARY format file loads significantly faster than a GO  format  file.
-   /FORMAT=BINARY stores
-   the data in internal GDS format. /FORMAT=BINARY has one header record,
-   therefore LOAD
-   /FORMAT=BINARY starts active work with record number two (2).
-
-3 GOQ
-  /FORMAT=GOQ
-   /FORMAT=GOQ loads files prepared by certain MUMPS implementations  and
-   is significantly
-   faster than a GO format file. Use the GOQ format as a conversion  aid.
-   /FORMAT=GOQ stores the
-   data in fixed length 2048 byte blocks which contain a variable  number
-   of keys and data.
-   FORMAT=GOQ has one or more header records depending on the  number  of
-   globals in the tape.
-
-2 /BEGIN
-  /BE[GIN]=integer
-   Specifies the record number of the input file  with  which  LOAD  should
-   begin. Directing LOAD to begin
-   at a point other than the beginning of a valid key causes an error.
-
-   Each format has some number of header records to consider when  choosing
-   a /BEGIN point. For more
-   information, refer to the section on /FORMAT.
-
-   For /FORMAT=GO input, normally the value should be an odd number.
-
-   Because /FORMAT=BINARY requires important information from  the  header,
-   this type of load requires
-   an intact file header regardless of the /BEGIN value.
-
-   By default, LOAD starts at the beginning of the input file.
-
-2 /END
-  /E[ND]=integer
-   Specifies the record number of the input file at which LOAD should stop.
-   The /END=integer must be
-   greater than the /BEGIN=integer for LOAD  to  operate.  LOAD  terminates
-   after processing the record of
-   the number specified by /END or reaching the end of the input file.
-
-   For /FORMAT=GO input, normally the value should be an even number.
-
-   By default, LOAD continues to the end of the input file.
-
-2 /FILL_FACTOR
-  /FI[LL_FACTOR]=integer
-   Specifies the target fill density for the data  blocks  updated  in  the
-   database file. /FILL_FACTOR must be
-   an integer between 5 and 100 specifying the percentage fill rate for the
-   block.
-
-   In  general,  maximum  data  densities  provide  the  best  performance.
-   However, if you have an
-   understanding of the  update  patterns  of  your  application,  you  may
-   achieve a performance benefit over
-   time from lowering the initial fill-factor.
-
-   By default, LOAD uses /FILL_FACTOR=100 for maximum data density.
-
-1 REORG
-  REO[RG]
-   MUPIP REORG offers a tool for optimizing  your  database  files  for  peak
-   database performance. REORG
-   requires minimal operator resources,  and  runs  concurrently  with  other
-   database activity, including updates.
-   Competing activity generally increases the time to  perform  a  REORG,  as
-   well as that of the competing
-   operations. If you use REORG concurrently with normal database access, you
-   may wish to lower the priority
-   of the process performing the REORG  to  minimize  its  impact  on  normal
-   operations.
-
-   Note that while REORG optimizes the GDS structure of  database  files,  it
-   does not deal with native file system
-   file fragmentation. Because native file  fragmentation  may  significantly
-   impair database performance, its
-   prevention and control  is  still  important.  Always  create  files  with
-   appropriate allocations and extensions, on
-   disks  with  large  contiguous  free-space.  Use  native  utilities   and,
-   depending on your procedures, MUPIP
-   utilities to eliminate file fragmentation when database  files  have  been
-   extended more than a dozen times.
-
-   The format of the REORG command is:
-
-   REO[RG] [qualifier...] file-specification
-
-   <CTRL C> produces a status message from REORG. <CTRL Y>  aborts  REORG.  A
-   REORG terminated
-   abnormally by  operator  action  or  error  is  incomplete  but  does  not
-   adversely affect the database structure.
-
-2 Qualifiers
-/SELECT
-  /SELECT=global-name-list
-   Restricts REORG  operation  to  a  subset  of  specified  globals.  By
-   default, REORG operates on all
-   globals in  all  database  files  identified  by  the  current  global
-   directory for the process executing the
-   MUPIP command.
-
-   Arguments to this qualifier may be an individual global name, a prefix
-   followed by an asterisk (*)
-   wild-card symbol, or a list of names and/or prefixes followed  by  the
-   wild-card symbol. The "^" in
-   the specification of the global name is  optional.  Enclose  lowercase
-   global names in quotes ("").
-
-   The global-specification can be:
-
-   o  A global name, such as MEF
-
-   o  A range of global names, such as A7:B6
-
-   o  A parenthetical list, such as (A,B,C)
-
-   o  Global names with the same prefix, such as TMP*
-
-   In the first case, EXTRACT selects only global ^MEF.   In  the  second
-   case, EXTRACT selects all
-   global names between ^A7  and  ^B6,  inclusive.  In  the  third  case,
-   EXTRACT selects globals ^A, ^B,
-   and ^C. In the fourth case, EXTRACT selects all global names from ^TMP
-   through ^TMPzzzzz.
-
-/FILL_FACTOR
-  /FILL_FACTOR=percent-qualifier
-   Directs REORG to leave free space within blocks  for  future  updates.
-   Arguments to this qualifier must be
-   integers from 5 to 100. REORG uses this figure in deciding whether  to
-   place more information in a
-   block; currently REORG does not move information out  of  a  block  to
-   make more room. By default,
-   REORG attempts to fill blocks to their maximum capacity.
-
-1 RESTORE
-  RE[STORE]
-   RESTORE  integrates  one  or  more  BACKUP  /INCREMENTAL  files   into   a
-   corresponding database. For a
-   RESTORE to work, the transaction numbers in the incremental  file(s)  must
-   sequentially follow those in the
-   database. Gaps or overlaps in the transaction  numbers  at  RESTORE  input
-   file boundaries cause RESTORE to
-   issue errors.
-
-   The format of the RESTORE command is:
-
-   RE[STORE] [qualifier] file-spec file-list
-
-   The file-specification identifies the  name  of  the  database  file  that
-   RESTORE uses as a starting point. The
-   transaction number in the database must  match  the  starting  transaction
-   number of each successive input to the
-   RESTORE. If the BACKUP /INCREMENTAL was created using /TRANSACTION=1,  set
-   the database up
-   with MUPIP CREATE and do not access it  with  anything  except  the  MUPIP
-   commands INTEG, EXTEND,
-   and SET before initiating the RESTORE.
-
-   The file list specifies one or more files produced by BACKUP  /INCREMENTAL
-   to RESTORE into the
-   database. The file-specifications are separated by commas (,) and must  be
-   in sequential order, from the oldest
-   transaction number to the most recent. RESTORE may take its input from  an
-   RMS file on any device that
-   supports such files, including magnetic tape devices. When using an  input
-   file on a magnetic tape, use DCL
-   to MOUNT specifying the same /BLOCKSIZE= as the one used to make the tape.
-
-2 Qualifiers
-/EXTEND
-  /[NO]EXTEND
-   Specifies whether RESTORE should extend automatically  if  its  target
-   database file is smaller than the file
-   size identified by the input BACKUP /INCREMENTAL file. MUMPS  activity
-   between backups may
-   automatically extend a database file.  Therefore,  the  database  file
-   specified as the starting point for a
-   RESTORE may require an extension before the RESTORE. If  the  database
-   needs an extension, MUPIP
-   displays a message. The message gives  the  sizes  of  the  input  and
-   output database files and the number of
-   blocks by which to extend the database. If the RESTORE specifies  more
-   than one incremental backup
-   with a file  list,  the  database  file  may  require  more  than  one
-   extension.
-
-   By  default,  RESTORE  automatically  extends   the   database   file.
-1 RUNDOWN
-  RU[NDOWN]
-   When database files have not been properly closed,  RUNDOWN  closes  those
-   currently inactive databases and
-   releases the central memory they claim.  In  normal  operation,  the  last
-   process to close a database file performs
-   the RUNDOWN actions.
-
-   The format of the RUNDOWN command is:
-
-   RU[NDOWN] [/qualifier file-spec or region-list]
-
-   The  file-specification  or  region-list  identifies  the  target  of  the
-   RUNDOWN. If RUNDOWN has no parameter,
-   it ignores any qualifier  and  flushes  the  memory  associated  with  all
-   database      files       that       currently       have       associated
-   memory and no active users.
-
-   Use RUNDOWN after a system crash or after the  last  process  accessing  a
-   database terminates abnormally.
-   RUNDOWN ensures that an inactive database is properly closed and ready for
-   subsequent use. RUNDOWN
-   has no effect on any database that is actively being accessed at the  time
-   the RUNDOWN is issued.
-
-   A RUNDOWN that specifies a target file or region can  correct  file  state
-   problems which a RUNDOWN with
-   no parameters does not find.
-
-2 Qualifiers
-/FILE
-  /F[ILE]
-   Specifies that the argument  is  a  file-specification  for  a  single
-   database file. The /FILE qualifier is
-   incompatible with the /REGION  qualifier.  If  the  rundown  parameter
-   consists of a list of files, the
-   command only operates on the first item in the list.
-
-/REGION
-  /R[EGION]
-   Specifies that the argument contains one or  more  region-names  which
-   identify database files mapped
-   by the current Global Directory.  Region-names  may  include  the  DCL
-   wildcards % and *. The
-   /REGION qualifier is incompatible with the /FILE qualifier.
-
-1 STOP
-  ST[OP]
-   STOP terminates a GT.M image. The image executes an orderly rundown of all
-   databases in which it
-   currently has an interest and then exits. A  MUPIP  STOP  performs  a  VMS
-   FORCEX system service and
-   therefore may also be used to stop non-GT.M images.
-
-   The format of the STOP command is:
-
-   ST[OP] /N[AME]=process-name | /ID=process-id
-
-   At least one of the qualifiers must appear.  If  both  qualifiers  appear,
-   they must refer to the same process or
-   STOP rejects the command.
-
-   Use the DCL command SHOW SYSTEM to display a list of active process  names
-   and process identifiers
-   (PIDs). PIDs appear as hexadecimal numbers on a SHOW SYSTEM display, which
-   is how they are specified
-   to MUPIP STOP.
-
-
-2 Qualifiers
-/ID
-  /I[D]=process-id
-   Specifies the PID of the process to  stop.  STOP  interprets  the  /ID
-   qualifier as a hexadecimal number
-   that corresponds to the form displayed by the DCL command SHOW SYSTEM.
-
-/NAME
-  /N[AME]=process-name
-   Specifies the name of the process to stop. The maximum length  of  the
-   name is 15 characters. Use
-   the /ID qualifier if the process belongs to an owner  in  a  different
-   group.
-
-
diff --git a/sr_vvms/mupip_cmd.cld b/sr_vvms/mupip_cmd.cld
deleted file mode 100644
index 5bdd2b4..0000000
--- a/sr_vvms/mupip_cmd.cld
+++ /dev/null
@@ -1,482 +0,0 @@
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!								!
-!	Copyright 2005, 2013 Fidelity Information Services, Inc.!
-!								!
-!	This source code contains the intellectual property	!
-!	of its copyright holder(s), and is made available	!
-!	under a license.  If you do not know the terms of	!
-!	the license, please stop and do not read further.	!
-!								!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-MODULE MUPIP_CMD
-DEFINE VERB backup
-	ROUTINE mupip_backup
-	PARAMETER P1, LABEL=REG_NAME,  PROMPT="Region",         VALUE(REQUIRED,LIST)
-	PARAMETER P2, LABEL=DIRECTORY, PROMPT="Backup Directory", VALUE(REQUIRED,LIST)
-
-	QUALIFIER BYTESTREAM		NONNEGATABLE
-	QUALIFIER COMPREHENSIVE		NONNEGATABLE
-	QUALIFIER DATABASE		NONNEGATABLE
-	QUALIFIER DBG			NONNEGATABLE
-	QUALIFIER INCREMENTAL		NONNEGATABLE
-	QUALIFIER JOURNAL		NEGATABLE	VALUE (LIST, TYPE = journal_options)
-	QUALIFIER NETTIMEOUT				VALUE (TYPE = $NUMBER, REQUIRED)
-	QUALIFIER NEWJNLFILES		NEGATABLE	VALUE(LIST, TYPE = newjnlfiles_options)
-	QUALIFIER BKUPDBJNL		NONNEGATABLE	VALUE(REQUIRED, TYPE = bkupdbjnl_options)
-	QUALIFIER ONLINE		NEGATABLE
-	QUALIFIER RECORD		NONNEGATABLE
-	QUALIFIER REPLICATION		NEGATABLE	VALUE(REQUIRED, TYPE = replication_options)
-	QUALIFIER SINCE			NONNEGATABLE	VALUE (TYPE = SINCE_FMT)
-	QUALIFIER TRANSACTION				VALUE (REQUIRED)
-
-	DISALLOW((TRANSACTION OR SINCE) AND NOT(INCREMENTAL OR BYTESTREAM) )
-	DISALLOW(((INCREMENTAL OR BYTESTREAM) AND (COMPREHENSIVE OR DATABASE)) OR (TRANSACTION AND SINCE))
-	DISALLOW((BKUPDBJNL.DISABLE) AND (BKUPDBJNL.OFF))
-	DISALLOW(REPLICATION.off)
-	DISALLOW(REPLICATION.on AND NEG NEWJNLFILES)
-
-DEFINE	TYPE	newjnlfiles_options
-	KEYWORD prevlink		NEGATABLE
-	KEYWORD cache			NEGATABLE
-
-DEFINE	TYPE	bkupdbjnl_options
-	KEYWORD disable			NONNEGATABLE
-	KEYWORD off			NONNEGATABLE
-
-DEFINE TYPE SINCE_FMT
-	KEYWORD BYTESTREAM
-	KEYWORD DATABASE, DEFAULT
-	KEYWORD RECORD
-	KEYWORD COMPREHENSIVE
-	KEYWORD INCREMENTAL
-
-DEFINE VERB convert
-	ROUTINE mupip_cvtpgm
-	PARAMETER P1, LABEL=FILE, PROMPT="Input File",       VALUE(TYPE = $FILE, REQUIRED)
-	PARAMETER P2, LABEL=DIR,  PROMPT="Output Directory", VALUE(TYPE = $FILE, REQUIRED)
-
-	QUALIFIER FORMAT		NONNEGATABLE	VALUE(TYPE = CVT_FMT)
-
-DEFINE VERB create
-	ROUTINE mupip_create
-
-	QUALIFIER REGION		NONNEGATABLE	VALUE(REQUIRED)
-
-DEFINE VERB downgrade
-	ROUTINE mupip_downgrade
-	PARAMETER P1, LABEL=FILE, PROMPT="File", VALUE(REQUIRED, TYPE = $FILE)
-
-	QUALIFIER version		NONNEGATABLE	VALUE(REQUIRED, TYPE = downgrade_dbver)
-
-DEFINE VERB exit
-	ROUTINE mupip_exit
-
-DEFINE VERB extend
-	ROUTINE mupip_extend
-	PARAMETER P1, LABEL=REG_NAME, PROMPT="Region", VALUE(REQUIRED)
-
-	QUALIFIER BLOCKS				VALUE(TYPE = $NUMBER, REQUIRED)
-
-DEFINE TYPE CVT_FMT
-	KEYWORD RO
-
-DEFINE VERB extract
-	ROUTINE mu_extract
-	PARAMETER P1, LABEL=FILE, PROMPT="Output File", VALUE(TYPE = $FILE, REQUIRED)
-
-	QUALIFIER SELECT  DEFAULT	NONNEGATABLE	VALUE(LIST, DEFAULT = "*", TYPE = $QUOTED_STRING)
-	QUALIFIER LABEL   DEFAULT	NONNEGATABLE	VALUE(DEFAULT = "GT.M MUPIP EXTRACT")
-	QUALIFIER LOG			NEGATABLE
-	QUALIFIER FORMAT		NONNEGATABLE	VALUE(TYPE = EXTR_FMT, REQUIRED)
-	QUALIFIER FREEZE		NONNEGATABLE
-	QUALIFIER OCHSET		NONNEGATABLE	VALUE(TYPE = $QUOTED_STRING, REQUIRED)
-
-DEFINE TYPE EXTR_FMT
-	KEYWORD ZWR, DEFAULT
-	KEYWORD GO
-	KEYWORD BINARY
-
-DEFINE VERB freeze
-	ROUTINE mupip_freeze
-	PARAMETER P1, LABEL=REG_NAME, PROMPT="Region", VALUE(REQUIRED,LIST)
-	QUALIFIER DBG			NONNEGATABLE
-	QUALIFIER ON			NONNEGATABLE
-	QUALIFIER RECORD		NONNEGATABLE
-	QUALIFIER OFF			NONNEGATABLE
-	QUALIFIER OVERRIDE		NONNEGATABLE
-
-	DISALLOW(NOT(ON) AND NOT(OFF))
-	DISALLOW(RECORD AND NOT(ON))
-	DISALLOW(OVERRIDE AND NOT(OFF))
-	DISALLOW(ON AND OFF)
-
-DEFINE VERB integ
-	ROUTINE mupip_integ
-	PARAMETER P1, LABEL=WHAT, PROMPT="File or Region", VALUE(REQUIRED,LIST)
-	QUALIFIER DBG			NONNEGATABLE
-	QUALIFIER KEYRANGES		NEGATABLE
-	QUALIFIER BRIEF			NONNEGATABLE
-	QUALIFIER FULL			NONNEGATABLE
-	QUALIFIER FAST			NONNEGATABLE
-	QUALIFIER BLOCK			NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER MAP			NEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 10)
-	QUALIFIER REGION		NONNEGATABLE
-	QUALIFIER FILE			NONNEGATABLE
-	QUALIFIER TRANSACTION		NEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 10)
-	QUALIFIER SUBSCRIPT		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER ADJACENCY		NONNEGATABLE	VALUE(REQUIRED)
-	QUALIFIER MAXKEYSIZE		NEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 10)
-	QUALIFIER TN_RESET		NONNEGATABLE
-
-	DISALLOW(BRIEF AND FULL)
-	DISALLOW(FILE AND REGION)
-	DISALLOW(TN_RESET AND (FAST OR BLOCK OR SUBSCRIPT OR REGION))
-
-DEFINE VERB intrpt
-	ROUTINE mupip_intrpt
-	QUALIFIER name					VALUE(TYPE = $QUOTED_STRING)
-	QUALIFIER id					VALUE(REQUIRED)
-
-	DISALLOW NOT(name OR id)
-
-DEFINE VERB load
-	ROUTINE mupip_cvtgbl
-	PARAMETER P1, LABEL=FILE, PROMPT="Input File", VALUE(TYPE = $FILE, REQUIRED)
-	QUALIFIER FORMAT		NONNEGATABLE	VALUE(TYPE = LOAD_FMT, REQUIRED)
-	QUALIFIER FILL_FACTOR   DEFAULT	NONNEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 99)
-	QUALIFIER BLOCK_DENSITY DEFAULT	NONNEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 99)
-	QUALIFIER BEGIN					VALUE(REQUIRED)
-	QUALIFIER END					VALUE(REQUIRED)
-	QUALIFIER OCHSET		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-
-DEFINE TYPE LOAD_FMT
-	KEYWORD ZWR, DEFAULT
-	KEYWORD GO
-	KEYWORD BINARY
-	KEYWORD GOQ
-
-DEFINE VERB help
-	ROUTINE mupip_help
-	PARAMETER P1, LABEL=QUERY
-
-DEFINE VERB quit
-	ROUTINE mupip_exit
-
-DEFINE VERB restore
-	ROUTINE mupip_restore
-	PARAMETER P1, LABEL=DATABASE,   PROMPT="Database", VALUE (REQUIRED)
-	PARAMETER P2, LABEL=INPUT_FILE, PROMPT="Input_file", VALUE (REQUIRED, LIST)
-
-	QUALIFIER EXTEND		NEGATABLE
-	QUALIFIER NETTIMEOUT				VALUE (TYPE = $NUMBER, REQUIRED)
-
-DEFINE	VERB	journal
-	ROUTINE mupip_recover
-	PARAMETER P1, LABEL=FILE, PROMPT="Journal File(s)", VALUE(TYPE = $FILE, REQUIRED, LIST)
-
-	! -- JOURNAL ACTION QUALIFIERS --
-	QUALIFIER recover		NONNEGATABLE
-	QUALIFIER rollback		NONNEGATABLE
-	QUALIFIER verify		   NEGATABLE
-	QUALIFIER show			NONNEGATABLE	VALUE(LIST, TYPE = SHOW_FMT)
-	QUALIFIER extract		NONNEGATABLE	VALUE(TYPE = $FILE)
-
-	!  -- JOURNAL DIRECTION QUALIFIERS --
-	QUALIFIER forward		NONNEGATABLE
-	QUALIFIER backward		NONNEGATABLE
-
-	!  -- JOURNAL TIME QUALIFIERS --
-	QUALIFIER after			NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER before		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER since			NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER lookback_limit	   NEGATABLE	VALUE(LIST, TYPE = LOOKBK_FMT, DEFAULT = "TIME=0 00:05")
-
-	! -- JOURNAL SEQUENCE NUMBER QUALIFIERS --
-	QUALIFIER fetchresync		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER resync		NONNEGATABLE	VALUE(REQUIRED)
-
-	! -- JOURNAL CONTROL QUALIFIERS --
-	QUALIFIER redirect		NONNEGATABLE	VALUE(LIST, REQUIRED)
-	QUALIFIER fences		NONNEGATABLE	VALUE(TYPE = FENCE_FMT)
-	QUALIFIER interactive		   NEGATABLE
-	QUALIFIER error_limit		   NEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER checktn		   NEGATABLE
-	QUALIFIER chain			   NEGATABLE
-	QUALIFIER detail		NONNEGATABLE
-	QUALIFIER apply_after_image	   NEGATABLE
-	QUALIFIER losttrans		NONNEGATABLE	VALUE(REQUIRED, TYPE = $FILE)
-	QUALIFIER brokentrans		NONNEGATABLE	VALUE(REQUIRED, TYPE = $FILE)
-	QUALIFIER full			NONNEGATABLE
-	QUALIFIER output		NONNEGATABLE	VALUE(REQUIRED, TYPE = $FILE)
-	QUALIFIER verbose		NONNEGATABLE
-
-	! -- JOURNAL SELECTION QUALIFIERS --
-	QUALIFIER global		NONNEGATABLE	VALUE(LIST, REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER user			NONNEGATABLE	VALUE(LIST, REQUIRED)
-	QUALIFIER id			NONNEGATABLE	VALUE(LIST, REQUIRED)
-	QUALIFIER transaction		NONNEGATABLE	VALUE(REQUIRED, TYPE = TRANS_FMT)
-	QUALIFIER process		NONNEGATABLE	VALUE(LIST, REQUIRED)
-
-	DISALLOW NOT (recover OR verify OR show OR extract OR rollback)
-	DISALLOW recover and rollback
-	DISALLOW NOT (forward OR backward)
-	DISALLOW forward AND backward
-	DISALLOW since AND forward
-	DISALLOW lookback_limit AND forward
-	DISALLOW redirect AND NOT recover
-	DISALLOW checktn AND backward
-	DISALLOW resync and fetchresync
-	DISALLOW (resync OR fetchresync) AND NOT(rollback)
-	DISALLOW losttrans AND NOT(recover OR rollback OR extract)
-	DISALLOW brokentrans AND NOT(recover OR rollback OR extract)
-	DISALLOW forward AND rollback
-	DISALLOW full AND (recover OR rollback)
-	DISALLOW detail AND NOT extract
-	DISALLOW after and NOT forward
-	DISALLOW after and (recover OR rollback)
-	DISALLOW since and NOT backward
-	DISALLOW lookback_limit AND NOT backward
-	DISALLOW lookback_limit AND NOT (verify OR recover OR extract OR show)
-	DISALLOW apply_after_image AND NOT (recover OR rollback)
-	DISALLOW redirect AND NOT recover
-	DISALLOW redirect AND NOT forward
-	DISALLOW backward AND NEG chain
-	DISALLOW (after OR before OR since OR lookback_limit) AND rollback
-	DISALLOW (global OR user OR id OR process OR transaction) AND (recover OR rollback OR verify)
-	DISALLOW output AND interactive		! output is VMS only qualifier
-
-DEFINE TYPE SHOW_FMT
-	KEYWORD header
-	KEYWORD statistics
-	KEYWORD broken_transactions
-	KEYWORD processes
-	KEYWORD active_processes
-	KEYWORD all, DEFAULT
-
-DEFINE TYPE LOOKBK_FMT
-	KEYWORD time		NONNEGATABLE    VALUE(REQUIRED, TYPE=$QUOTED_STRING)
-	KEYWORD operations	NONNEGATABLE    VALUE(REQUIRED, TYPE=$NUMBER)
-
-DEFINE TYPE FENCE_FMT
-	KEYWORD always
-	KEYWORD process, DEFAULT
-	KEYWORD none
-
-DEFINE TYPE TRANS_FMT
-	KEYWORD set	NEGATABLE
-	KEYWORD kill	NEGATABLE
-
-DEFINE VERB reorg
-	ROUTINE mupip_reorg
-	PARAMETER P1, LABEL=REG_NAME, VALUE(LIST, TYPE = $QUOTED_STRING)
-	QUALIFIER SELECT		DEFAULT	NONNEGATABLE	VALUE(LIST, DEFAULT = "*", TYPE = $QUOTED_STRING)
-	QUALIFIER EXCLUDE		DEFAULT	NONNEGATABLE	VALUE(LIST, DEFAULT = "*", TYPE = $QUOTED_STRING)
-	QUALIFIER FILL_FACTOR		DEFAULT	NONNEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 99)
-	QUALIFIER INDEX_FILL_FACTOR	DEFAULT	NONNEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 99)
-	QUALIFIER RESUME			NONNEGATABLE
-	QUALIFIER USER_DEFINED_REORG	DEFAULT	NONNEGATABLE	VALUE(LIST, DEFAULT = "*", TYPE = $QUOTED_STRING)
-	QUALIFIER UPGRADE			NONNEGATABLE
-	QUALIFIER DOWNGRADE			NONNEGATABLE
-	QUALIFIER SAFEJNL			NEGATABLE
-	QUALIFIER REGION			NONNEGATABLE
-	QUALIFIER STARTBLK			NONNEGATABLE
-	QUALIFIER STOPBLK			NONNEGATABLE
-	DISALLOW(SELECT or EXCLUDE or FILL_FACTOR or INDEX_FILL_FACTOR or RESUME or USER_DEFINED_REORG) AND
-		(UPGRADE or DOWNGRADE)
-	DISALLOW(UPGRADE and DOWNGRADE)
-	DISALLOW((UPGRADE or DOWNGRADE) and NOT(REGION))
-	DISALLOW((SAFEJNL or NEG SAFEJNL or STARTBLK or STOPBLK) and NOT(UPGRADE or DOWNGRADE))
-
-DEFINE VERB rundown
-	ROUTINE mupip_rundown
-	PARAMETER P1, LABEL=DBFILE, PROMPT="File or Region", VALUE(LIST)
-
-	QUALIFIER REGION			NONNEGATABLE
-	QUALIFIER FILE				NONNEGATABLE
-
-	DISALLOW(FILE AND REGION)
-
-DEFINE	VERB	set
-	ROUTINE mupip_set
-	PARAMETER P1, LABEL=WHAT, PROMPT="File or Region", VALUE(REQUIRED,LIST)
-
-	QUALIFIER file			NONNEGATABLE
-	QUALIFIER region		NONNEGATABLE
-
-	QUALIFIER journal		NEGATABLE	VALUE(LIST, TYPE = journal_options)
-
-	QUALIFIER access_method		NONNEGATABLE	VALUE(REQUIRED, TYPE = acc_type)
-	QUALIFIER defer_time		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER extension_count	NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER flush_time		NONNEGATABLE	VALUE(TYPE = $DELTATIME, DEFAULT = 100)
-	QUALIFIER global_buffers	NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER lock_space		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER mutex_slots		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER reserved_bytes	NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-
-	QUALIFIER jnlfile		NONNEGATABLE	!dummy qualifier to go with unix impl.
-	QUALIFIER replication		NEGATABLE	VALUE(REQUIRED, TYPE = replication_options)
-
-	QUALIFIER bypass		NONNEGATABLE
-	QUALIFIER partial_recov_bypass	NONNEGATABLE
-	QUALIFIER dbfilename		NEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER prevjnlfile		NEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER repl_state		NEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER standalonenot
-	QUALIFIER version		NONNEGATABLE	VALUE(REQUIRED, TYPE = dbvers)
-	QUALIFIER wait_disk		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-
-	DISALLOW ANY2(file, region, jnlfile)
-	DISALLOW(NOT(file OR region OR jnlfile))
-	DISALLOW(journal.on AND journal.off)
-	! --- disallow /NOJOURNAL=DISABLE ---
-	DISALLOW(journal.disable AND NEG journal)
-	! --- disallow any other journal options for both /NOJOURNAL and DISABLE (Unix CLI disallows assignment for /NOJOURNAL) ---
-	DISALLOW((journal.disable OR NEG journal) AND (journal.on OR journal.off OR journal.enable OR journal.before_images
-		OR journal.filename OR journal.allocation OR journal.extension OR journal.buffer_size OR journal.alignsize
-		OR journal.epoch_interval OR journal.autoswitchlimit OR NEG journal.before_images))
-	DISALLOW(journal AND NOT(journal.disable OR journal.off OR journal.before_images OR NEG journal.before_images))
-	DISALLOW(replication.on AND replication.off)
-	DISALLOW(replication.on AND (journal.off OR journal.disable OR NEG journal OR NEG journal.before_images))
-	DISALLOW(prevjnlfile AND NOT(jnlfile))
-	DISALLOW(version AND (access_method OR global_buffers OR reserved_bytes OR flush_time OR lock_space
-				OR defer_time OR wait_disk OR partial_recov_bypass))
-
-DEFINE	TYPE	journal_options
-	KEYWORD on			NONNEGATABLE
-	KEYWORD off			NONNEGATABLE
-	KEYWORD enable			NONNEGATABLE
-	KEYWORD disable			NONNEGATABLE
-	KEYWORD before_images		NEGATABLE
-	KEYWORD filename		NONNEGATABLE	VALUE(REQUIRED, TYPE=$FILE)
-	KEYWORD allocation		NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-	KEYWORD extension		NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-	KEYWORD buffer_size		NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-	KEYWORD alignsize		NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-	KEYWORD epoch_interval		NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-	KEYWORD autoswitchlimit		NONNEGATABLE	VALUE(REQUIRED, TYPE=$NUMBER)
-	KEYWORD cache			NEGATABLE
-
-DEFINE	TYPE	replication_options
-	KEYWORD on			NONNEGATABLE
-	KEYWORD off			NONNEGATABLE
-
-DEFINE	TYPE	acc_type
-	KEYWORD bg
-	KEYWORD mm
-
-DEFINE	TYPE	dbvers
-	KEYWORD	v4
-	KEYWORD	v6
-
-DEFINE	TYPE	downgrade_dbver
-	KEYWORD	v4
-	KEYWORD	v5
-
-DEFINE VERB stop
-	ROUTINE mupip_stop
-	QUALIFIER name					VALUE(TYPE = $QUOTED_STRING)
-	QUALIFIER id					VALUE(REQUIRED)
-
-	DISALLOW NOT(name OR id)
-
-DEFINE VERB upgrade
-	ROUTINE mupip_upgrade
-	PARAMETER P1, LABEL=FILE, PROMPT="File", VALUE(REQUIRED, TYPE = $FILE)
-
-DEFINE VERB replicate
-	QUALIFIER RECEIVER	SYNTAX=REPL_RECV_SYN		NONNEGATABLE
-	QUALIFIER SOURCE	SYNTAX=REPL_SRC_SYN		NONNEGATABLE
-	QUALIFIER UPDATEPROC	SYNTAX=REPL_UPD_SYN		NONNEGATABLE
-	QUALIFIER UPDHELPER	SYNTAX=REPL_UPD_HELPER		NONNEGATABLE
-
-	DISALLOW NOT(RECEIVER OR SOURCE OR UPDATEPROC OR UPDHELPER)
-
-DEFINE SYNTAX REPL_RECV_SYN
-	ROUTINE gtmrecv
-	QUALIFIER buffsize		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER changelog		NONNEGATABLE
-	QUALIFIER checkhealth		NONNEGATABLE
-	QUALIFIER filter		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER helpers		NONNEGATABLE	VALUE(TYPE = $QUOTED_STRING, DEFAULT = "8,5") ! Keep DEFAULT_UPD_HELPERS_STR
-												      ! (in gtmrecv.h) and DEFAULT
-												      ! value for /helpers in sync
-	QUALIFIER listenport		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER log			NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER log_interval		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER startup_file		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER showbacklog		NONNEGATABLE
-	QUALIFIER shutdown		NONNEGATABLE
-	QUALIFIER start			NONNEGATABLE
-	QUALIFIER statslog		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER stopsourcefilter	NONNEGATABLE
-	QUALIFIER timeout		   NEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 30)
-	QUALIFIER updateonly		NONNEGATABLE
-	QUALIFIER updateresync		NONNEGATABLE
-	QUALIFIER dummy_start		NONNEGATABLE	! For internal use
-
-	DISALLOW ANY2(start, shutdown, checkhealth, statslog, showbacklog, changelog)
-	DISALLOW NOT(start OR shutdown OR checkhealth OR statslog OR showbacklog OR changelog)
-	DISALLOW (start AND NOT(listenport OR updateonly OR helpers))
-	DISALLOW (start AND listenport AND NOT(log))
-	DISALLOW (NOT(start) AND (listenport OR updateresync))
-	DISALLOW (NOT(start OR shutdown) AND updateonly)
-	DISALLOW (NOT(start OR shutdown OR checkhealth) AND helpers)
-	DISALLOW (listenport AND updateonly)
-	DISALLOW (updateonly AND helpers)
-	DISALLOW (changelog AND NOT(log OR log_interval))
-	DISALLOW (statslog AND log)
-
-DEFINE SYNTAX REPL_SRC_SYN
-	ROUTINE gtmsource
-	QUALIFIER activate		NONNEGATABLE
-	QUALIFIER buffsize		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER changelog		NONNEGATABLE
-	QUALIFIER checkhealth		NONNEGATABLE
-	QUALIFIER connectparams		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER deactivate		NONNEGATABLE
-	QUALIFIER filter		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER log			NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER log_interval		NONNEGATABLE	VALUE(REQUIRED, TYPE = $NUMBER)
-	QUALIFIER startup_file		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER passive		NONNEGATABLE
-	QUALIFIER secondary		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER showbacklog		NONNEGATABLE
-	QUALIFIER shutdown		NONNEGATABLE
-	QUALIFIER start			NONNEGATABLE
-	QUALIFIER statslog		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER stopsourcefilter	NONNEGATABLE
-	QUALIFIER timeout		   NEGATABLE	VALUE(TYPE = $NUMBER, DEFAULT = 30)
-	QUALIFIER update		NONNEGATABLE	VALUE(REQUIRED, TYPE = $QUOTED_STRING)
-	QUALIFIER dummy_start		NONNEGATABLE	! For internal use
-
-	DISALLOW ANY2(start, shutdown, activate, deactivate, checkhealth, statslog, showbacklog, changelog, stopsourcefilter)
-	DISALLOW NOT(start OR shutdown OR activate OR deactivate OR checkhealth
-			OR statslog OR showbacklog OR changelog OR stopsourcefilter)
-	DISALLOW (start AND passive AND secondary)
-	DISALLOW (start AND NOT(passive) AND NOT(secondary))
-	DISALLOW (start AND NOT(log))
-	DISALLOW (activate AND NOT(secondary))
-	DISALLOW (changelog AND NOT(log) AND NOT(log_interval))
-	DISALLOW (statslog AND log)
-
-DEFINE SYNTAX REPL_UPD_SYN
-	ROUTINE updproc
-
-DEFINE SYNTAX REPL_UPD_HELPER
-	QUALIFIER reader	SYNTAX=REPL_UPDHR_SYN		NONNEGATABLE
-	QUALIFIER writer	SYNTAX=REPL_UPDHW_SYN		NONNEGATABLE
-	DISALLOW NOT(reader OR writer)
-
-DEFINE SYNTAX REPL_UPDHR_SYN
-	ROUTINE updhelper_reader
-
-DEFINE SYNTAX REPL_UPDHW_SYN
-	ROUTINE updhelper_writer
-
-DEFINE VERB ftok
-	ROUTINE mupip_ftok
-	PARAMETER P1, LABEL=FILE, PROMPT="File", VALUE(TYPE = $FILE, REQUIRED)
-
-	QUALIFIER prefix		NONNEGATABLE	VALUE(TYPE = $QUOTED_STRING, DEFAULT = "GT$S")
diff --git a/sr_vvms/mupip_ctrl.c b/sr_vvms/mupip_ctrl.c
deleted file mode 100644
index a81c656..0000000
--- a/sr_vvms/mupip_ctrl.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include "mupip_ctrl.h"
-
-#define CTRLC     3
-#define CTRLY	  25
-
-GBLDEF bool	mu_ctrly_occurred;
-GBLDEF bool	mu_ctrlc_occurred;
-
-void mupip_ctrl(int4 ob_char)
-{
-
-	if (ob_char == CTRLC)
-	{	mu_ctrlc_occurred = TRUE;
-	}else if ( ob_char == CTRLY)
-	{	mu_ctrly_occurred = TRUE;
-	}else
-	{
-		GTMASSERT;
-	}
-}
diff --git a/sr_vvms/mupip_ctrl.h b/sr_vvms/mupip_ctrl.h
deleted file mode 100644
index 5f320d5..0000000
--- a/sr_vvms/mupip_ctrl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MUPIP_CTRL_INCLUDED
-#define MUPIP_CTRL_INCLUDED
-
-void mupip_ctrl(int4 ob_char);
-
-#endif /* MUPIP_CTRL_INCLUDED */
diff --git a/sr_vvms/mupip_cvtgbl.c b/sr_vvms/mupip_cvtgbl.c
deleted file mode 100644
index 5a9fc57..0000000
--- a/sr_vvms/mupip_cvtgbl.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "muextr.h"
-#include "util.h"
-#include "io.h"
-#include "mupip_exit.h"
-#include "load.h"
-#include "mu_outofband_setup.h"
-#include "mupip_cvtgbl.h"
-#include "trans_log_name.h"
-#include "cli.h"
-
-#define MAX_TRAN_NAM_LEN 257
-
-GBLREF	gd_region	*gv_cur_region;
-GBLREF	bool		mupip_error_occurred;
-GBLREF	int		gv_fillfactor;
-GBLREF	boolean_t	is_replicator;
-
-error_def(ERR_LOADFMT);
-error_def(ERR_LOADBGSZ);
-error_def(ERR_LOADBGSZ2);
-error_def(ERR_LOADEDSZ);
-error_def(ERR_LOADEDSZ2);
-error_def(ERR_LOADEDBG);
-error_def(ERR_LOADFILERR);
-error_def(ERR_MUPCLIERR);
-error_def(ERR_MUNOACTION);
-error_def(ERR_MUNOFINISH);
-
-void mupip_cvtgbl(void)
-{
-	char		*c, *b, format_buffer[50], infilename[256];
-	unsigned char	buf[MAX_TRAN_NAM_LEN];
-	unsigned short	n_len;
-	uint4		begin, end;
-	uint4		stat;
-	int		format, len, n;
-	struct		FAB infab;
-	struct		RAB inrab;
-	struct XABPRO	xabpro;
-	mstr		transed_file, untransed_file;
-	gtm_int64_t	begin_i8, end_i8;
-
-	is_replicator = TRUE;
-	n_len = SIZEOF(format_buffer);
-	if (0 == cli_get_str("FORMAT", format_buffer, &n_len))
-	{
-		n_len = SIZEOF("ZWR") - 1;
-		memcpy(format_buffer, "ZWR", n_len);
-		format = MU_FMT_ZWR;
-	} else
-	{
-		if (0 == memcmp(format_buffer, "ZWR", n_len))
-			format = MU_FMT_ZWR;
-		else  if (0 == memcmp(format_buffer, "GO", n_len))
-			format = MU_FMT_GO;
-		else  if (0 == memcmp(format_buffer, "BINARY", n_len))
-			format = MU_FMT_BINARY;
-		else  if (0 == memcmp(format_buffer, "GOQ", n_len))
-			format = MU_FMT_GOQ;
-		else
-			mupip_exit (ERR_LOADFMT);
-	}
-	mu_outofband_setup();
-	mupip_error_occurred = FALSE;
-	n_len = SIZEOF(infilename);
-	if (0 == cli_get_str("FILE", infilename, &n_len))
-		mupip_exit(ERR_MUPCLIERR);
-	if (0 == cli_get_int("FILL_FACTOR", &gv_fillfactor))
-		gv_fillfactor = MAX_FILLFACTOR;
-	else if (gv_fillfactor > MAX_FILLFACTOR)
-		gv_fillfactor = MAX_FILLFACTOR;
-	else if (gv_fillfactor < MIN_FILLFACTOR)
-		gv_fillfactor = MIN_FILLFACTOR;
-
-	if (cli_get_int64("BEGIN", &begin_i8))
-	{
-		if (1 > begin_i8)
-			mupip_exit(ERR_LOADBGSZ);
-		else if (MAXUINT4 < begin_i8)
-			mupip_exit(ERR_LOADBGSZ2);
-		begin = begin_i8;
-	} else
-	{
-		begin = 1;
-		begin_i8 = 1;
-	}
-	if (cli_get_int64("END", &end_i8))
-	{
-		if (1 > end_i8)
-			mupip_exit(ERR_LOADEDSZ);
-		else if (MAXUINT4 < end_i8)
-			mupip_exit(ERR_LOADEDSZ2);
-		if (end_i8 < 1)
-			mupip_exit(ERR_LOADEDSZ);
-		if (end_i8 < begin_i8)
-			mupip_exit(ERR_LOADEDBG);
-		end = end_i8;
-	} else
-		end = MAXUINT4;
-	gvinit();
-	infab = cc$rms_fab;
-	inrab = cc$rms_rab;
-	inrab.rab$l_fab = &infab;
-	untransed_file.addr = &infilename;
-	untransed_file.len = n_len;
-	switch(stat = trans_log_name(&untransed_file, &transed_file, buf))
-	{
-		case SS$_NORMAL:
-			infab.fab$l_fna = transed_file.addr;
-			infab.fab$b_fns = transed_file.len;
-			break;
-		case SS$_NOLOGNAM:
-			infab.fab$l_fna = infilename;
-			infab.fab$b_fns = n_len;
-			break;
-		default:
-			mupip_exit(stat);
-	}
-	if (MU_FMT_GOQ == format)
-	{
-		infab.fab$l_fop = FAB$M_UFO;
-		infab.fab$b_fac = FAB$M_BIO;
-	} else
-	{
-		infab.fab$l_fop = FAB$M_SQO;
-		infab.fab$b_fac = FAB$M_GET;
-	}
-	infab.fab$l_xab = &xabpro;
-	xabpro = cc$rms_xabpro;
-	inrab.rab$l_rop |= (RAB$M_LOC | RAB$M_RAH);
-	inrab.rab$b_mbf = 20;
-	stat = sys$open(&infab);
-	if ((RMS$_NORMAL == stat) && (MU_FMT_GOQ != format))
-		stat = sys$connect(&inrab);
-	if (RMS$_NORMAL != stat)
-	{
-		rts_error(VARLSTCNT(8) ERR_LOADFILERR, 2, infab.fab$b_fns, infab.fab$l_fna, stat, 0, infab.fab$l_stv, 0);
-		mupip_exit(ERR_MUNOACTION);
-	}
-	switch(format)
-	{
-		case MU_FMT_ZWR:
-		case MU_FMT_GO:
-			go_load(begin, end, &inrab, &infab);
-			break;
-		case MU_FMT_BINARY:
-			bin_load(begin, end, &inrab, &infab);
-			break;
-		case MU_FMT_GOQ:
-			goq_load(begin, end, &infab);
-	}
-	gv_cur_region = NULL;
-	mupip_exit(mupip_error_occurred ? ERR_MUNOFINISH : SS$_NORMAL);
-}
diff --git a/sr_vvms/mupip_cvtpgm.c b/sr_vvms/mupip_cvtpgm.c
deleted file mode 100644
index f1ee66a..0000000
--- a/sr_vvms/mupip_cvtpgm.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-
-#include "io.h"
-#include "cli.h"
-#include "mupip_exit.h"
-#include "mupip_cvtpgm.h"
-#include "trans_log_name.h"
-
-static struct FAB	infab, outfab;
-static struct RAB	inrab, outrab;
-static unsigned char	buffer[512];
-static int		buflen;
-static char		dirname[512];
-static short		full_name_len = 0;
-static unsigned short	prog_converted = 0;
-
-void mupip_cvtpgm(void)
-{
-	char		infilename[256];
-	unsigned char	buf[MAX_TRANS_NAME_LEN];
-	unsigned short	dir_len = 255;
-	unsigned short	in_len = 255;
-	uint4		stat;
-	int		status;
-	mstr		transed_dir, transed_file, untransed_dir, untransed_file;
-
-	status = cli_get_str("FILE", infilename, &in_len);
-	assert(TRUE == status);
-	status = cli_get_str("DIR", dirname, &dir_len);
-	assert(TRUE == status);
-	infab = cc$rms_fab;
-	inrab = cc$rms_rab;
-	inrab.rab$l_fab = &infab;
-	infab.fab$b_fac = FAB$M_GET;
-	untransed_file.addr = &infilename;
-	untransed_file.len = in_len;
-	switch(stat = trans_log_name(&untransed_file, &transed_file, buf))
-	{
-		case SS$_NORMAL:
-			infab.fab$l_fna = transed_file.addr;
-			infab.fab$b_fns = transed_file.len;
-			break;
-		case SS$_NOLOGNAM:
-			infab.fab$l_fna = infilename;
-			infab.fab$b_fns = in_len;
-			break;
-		default:
-			rts_error(VARLSTCNT(1) stat);
-	}
-	infab.fab$l_fop = FAB$M_SQO;
-	infab.fab$w_mrs = 511;
-	inrab.rab$l_ubf = buffer;
-	inrab.rab$w_usz = SIZEOF(buffer) - 1;
-	status = sys$open(&infab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-	status = sys$connect(&inrab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-	status = sys$get(&inrab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-	status = sys$get(&inrab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-	for (;;)
-	{
-		if (RMS$_EOF == status)
-			break;
-		/* get program name */
-		status = sys$get(&inrab);
-		if (RMS$_EOF == status)
-			break;
-		if (RMS$_NORMAL != status)
-			rts_error(status);
-		fixup();
-		if (buflen < 1)
-			continue;
-		if (*buffer == '%')
-			*buffer = '_';
-		untransed_dir.addr = &dirname;
-		untransed_dir.len = dir_len;
-		switch(stat = trans_log_name(&untransed_dir, &transed_dir, buf))
-			{
-			case SS$_NORMAL:
-				dir_len	= transed_dir.len;
-				memcpy(&dirname, transed_dir.addr, dir_len);
-				break;
-			case SS$_NOLOGNAM:
-				break;
-			default:
-				rts_error(VARLSTCNT(1) stat);
-			}
-		memcpy(&dirname[dir_len], buffer, buflen);
-		full_name_len = dir_len + buflen;
-		openoutfile(dirname, full_name_len);
-		for (;;)
-		{
-			status = sys$get(&inrab);
-			if (RMS$_EOF == status)
-				break;
-			if (RMS$_NORMAL != status)
-				rts_error(status);
-			fixup();
-			if (!buflen)
-			{
-				closeoutfile();
-				break;
-			}
-			putdata(buffer, buflen);
-		}
-		prog_converted++;
-	}
-	status = sys$close(&infab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-	mupip_exit(status);
-}
-
-openoutfile(char *fa, int fn)
-{
-	int	status;
-	char	*ch;
-
-	outfab = cc$rms_fab;
-	outrab = cc$rms_rab;
-	outrab.rab$l_fab = &outfab;
-	outfab.fab$l_dna = DOTM;
-	outfab.fab$b_dns = SIZEOF(DOTM);
-	outfab.fab$b_fac = FAB$M_PUT;
-	outfab.fab$l_fna = fa;
-	outfab.fab$b_fns = fn;
-	outfab.fab$l_fop = FAB$M_SQO | FAB$M_MXV;
-	outfab.fab$w_mrs = 511;
-	outfab.fab$b_rat = FAB$M_CR;
-	outrab.rab$l_ubf = buffer;
-	outrab.rab$w_usz = SIZEOF(buffer) - 1;
-	status = sys$create(&outfab);
-	switch (status )
-	{
-		case RMS$_NORMAL:
-		case RMS$_CREATED:
-		case RMS$_SUPERSEDE:
-		case RMS$_FILEPURGED:
-			break;
-		default:
-			rts_error(status);
-	}
-	status = sys$connect(&outrab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-}
-
-closeoutfile()
-{
-	int	status;
-
-	status = sys$close(&outfab);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-}
-
-putdata(unsigned char *buff, int len)
-{
-	char		*tempbuf;
-	unsigned char	*inpt, *cp, *ctop;
-	int		n;
-	int		status;
-
-	cp = tempbuf = malloc(512);
-	inpt = buff;
-	ctop = inpt + len;
-	/* copy label */
-	while (inpt < ctop && *inpt != ' ' && *inpt != '\t')
-		*cp++ = *inpt++;
-	/* use one tab as line separator*/
-	*cp++ = '\t';
-	/* get rid of spaces and tabs in input stream */
-	while (inpt < ctop && ((' ' == *inpt) || ('\t' == *inpt)))
-		inpt++;
-	if ((n = ctop - inpt) > 0)
-	{	memcpy(cp, inpt, n);
-		cp += n;
-	}
-	outrab.rab$l_rbf = tempbuf;
-	outrab.rab$w_rsz = cp - (unsigned char *) tempbuf;
-	status = sys$put(&outrab);
-	free(tempbuf);
-	if (RMS$_NORMAL != status)
-		rts_error(status);
-	return;
-}
-
-fixup()
-{
-	buflen = inrab.rab$w_rsz;
-	while (buflen > 0 &&
-		(('\n' == buffer[buflen - 1]) || ('\r' == buffer[buflen - 1])))
-		buflen--;
-}
diff --git a/sr_vvms/mupip_dispatch.c b/sr_vvms/mupip_dispatch.c
deleted file mode 100644
index 7d4bb54..0000000
--- a/sr_vvms/mupip_dispatch.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*------------------------------------------------------------------------------
- *
- * The 3 files, GTMCOMMANDS.CLDX, MUPIP_CMD.CLD and MUPIP_DISPATCH.C, must
- * be maintained in parallel.  In order to add a MUPIP command, first update
- * GTMCOMMANDS.CLDX.  The new command must be added as a member of the
- * TYPE MUPIP_ACTIONS.  The new syntax MUST have the first parameter:
- *
- *	PARAMETER	P1
- *		LABEL =	MUPIP_ACTION
- *		VALUE	(REQUIRED)
- *
- * The actual routine which executes the new command must be added to
- * MUPIP_DISPATCH.C by including a new descriptor:
- *
- *	$DESCRIPTOR	(newcommand, "NEWCOMMAND");
- *
- * and by adding a new comparison:
- *
- *	if (!dsccmp (action, &newcommand))	mupip_newcommand ();
- *	else ...
- *
- * The new syntax should be converted to a verb definition and added to
- * MUPIP_CMD.CLD.  In order to convert a syntax definition in GTMCOMMANDS.CLDX
- * to a verb definition in MUPIP_CMD.CLD:
- *
- * 1.	Change the line DEFINE SYNTAX MUPIP_NEWCOMMAND to
- * 	DEFINE VERB NEWCOMMAND.
- * 2.	Add the routine clause ROUTINE mupip_newcommand, where mupip_newcommand
- *	is the name of the routine used in MUPIP_DISPATCH.C.
- * 3.	Subtract 1 from every parameter number, i.e., P8 becomes P7, P7
- *	becomes P6, etc.
- *
- *----------------------------------------------------------------------------*/
-
-
-#include "mdef.h"
-#include <descrip.h>
-#include <ssdef.h>
-#include <rms.h>
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-
-#include "mupip_exit.h"
-#include "muextr.h"
-#include "mupip_create.h"
-#include "mupip_set.h"
-#include "mupip_backup.h"
-#include "mupip_cvtgbl.h"
-#include "mupip_cvtpgm.h"
-#include "mupip_help.h"
-#include "mupip_integ.h"
-#include "mupip_extend.h"
-#include "mupip_recover.h"
-#include "mupip_restore.h"
-#include "mupip_rundown.h"
-#include "mupip_stop.h"
-#include "mupip_upgrade.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-
-#define	dsccmp(a,b)	(memcmp ((a)->dsc$a_pointer, (b)->dsc$a_pointer, mupip_action_len (a)))
-
-mupip_dispatch ( struct dsc$descriptor *action)
-{
-	int		status;
-
-	$DESCRIPTOR	(backup, "BACKUP");
-	$DESCRIPTOR	(convert, "CONVERT");
-	$DESCRIPTOR	(create,"CREATE");
-	$DESCRIPTOR	(exit, "EXIT");
-	$DESCRIPTOR	(extend, "EXTEND");
-	$DESCRIPTOR	(extract, "EXTRACT");
-	$DESCRIPTOR	(integ, "INTEG");
-	$DESCRIPTOR	(load, "LOAD");
-	$DESCRIPTOR	(help, "HELP");
-	$DESCRIPTOR	(quit, "QUIT");
-	$DESCRIPTOR	(journal, "JOURNAL");
-	$DESCRIPTOR	(restore, "RESTORE");
-	$DESCRIPTOR	(rundown, "RUNDOWN");
-	$DESCRIPTOR	(set, "SET");
-	$DESCRIPTOR	(stop, "STOP");
-	$DESCRIPTOR	(upgrade, "UPGRADE");
-
-	if (!dsccmp (action, &backup))	mupip_backup ();
-	else
-	if (!dsccmp (action, &convert))	mupip_cvtpgm ();
-	else
-	if (!dsccmp (action, &create))	mupip_create ();
-	else
-	if (!dsccmp (action, &exit))	mupip_exit (SS$_NORMAL);
-	else
-	if (!dsccmp (action, &extend))	mupip_extend ();
-	else
-	if (!dsccmp (action, &extract))	mu_extract ();
-	else
-	if (!dsccmp (action, &integ))	mupip_integ ();
-	else
-	if (!dsccmp (action, &load))	mupip_cvtgbl ();
-	else
-	if (!dsccmp (action, &help))	mupip_help ();
-	else
-	if (!dsccmp (action, &quit))	mupip_exit (SS$_NORMAL);
-	else
-	if (!dsccmp (action, &journal))	mupip_recover ();
-	else
-	if (!dsccmp (action, &restore)) mupip_restore ();
-	else
-	if (!dsccmp (action, &rundown))	mupip_rundown ();
-	else
-	if (!dsccmp (action, &set))	mupip_set ();
-	else
-	if (!dsccmp (action, &stop))	mupip_stop ();
-	else
-	if (!dsccmp (action, &upgrade))	mupip_upgrade ();
-	else
-		GTMASSERT;
-}
-
-int mupip_action_len ( struct dsc$descriptor *d)
-{
-	unsigned char	*cp;
-
-	for (cp = d->dsc$a_pointer;
-		(char *) cp - d->dsc$a_pointer <= d->dsc$w_length &&
-		*cp != SP && *cp && *cp != 9;
-		cp++) ;
-	return (char *) cp - d->dsc$a_pointer;
-}
-
diff --git a/sr_vvms/mupip_exit.c b/sr_vvms/mupip_exit.c
deleted file mode 100644
index 89bd533..0000000
--- a/sr_vvms/mupip_exit.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include "mupip_exit.h"
-
-GBLREF	boolean_t	mupip_exit_status_displayed;
-
-void mupip_exit(int4 stat)
-{
-	mupip_exit_status_displayed = TRUE;
-	sys$exit(stat ? stat : SS$_NORMAL);
-}
diff --git a/sr_vvms/mupip_ftok.c b/sr_vvms/mupip_ftok.c
deleted file mode 100644
index 8208070..0000000
--- a/sr_vvms/mupip_ftok.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "vmsdtype.h"
-#include "gtm_logicals.h"
-#include "cli.h"
-#include "util.h"
-#include "is_file_identical.h"
-#include "mupip_exit.h"
-
-#define MAX_PATH_LEN		256
-#define MAX_FTOK_LEN		32		/* 1 for length, 31 for the actual ftok */
-#define FTOK_PREFIX_SIZE	4
-
-void mupip_ftok()
-{
-	unsigned short	prefix_size;
-	unsigned short	filename_len;
-	char		filename[MAX_PATH_LEN], prefix[FTOK_PREFIX_SIZE] = {'G', 'T', '$', 'S'};
-	gds_file_id	gds_fid;
-	char		ftok[MAX_FTOK_LEN];
-	error_def(ERR_MUPCLIERR);
-
-	filename_len	= SIZEOF(filename);
-	prefix_size	= SIZEOF(prefix);
-	if (!cli_get_str("FILE", filename, &filename_len))
-		mupip_exit(ERR_MUPCLIERR);
-	if (CLI_PRESENT == cli_present("PREFIX") && !cli_get_str("PREFIX", prefix, &prefix_size))
-		mupip_exit(ERR_MUPCLIERR);
-	set_gdid_from_file(&gds_fid, filename, filename_len);
-	global_name(prefix, &gds_fid, ftok);
-	util_out_print("!AD", TRUE, (char) ftok[0], &ftok[1]);
-	mupip_exit(SS$_NORMAL);
-}
diff --git a/sr_vvms/mupip_getcmd.c b/sr_vvms/mupip_getcmd.c
deleted file mode 100644
index 481ee37..0000000
--- a/sr_vvms/mupip_getcmd.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rmsdef.h>
-#include <descrip.h>
-#include <climsgdef.h>
-#include <ssdef.h>
-#include "mupip_exit.h"
-
-#ifdef 	IPCRM_FOR_SANCHEZ_ONLY
-#define	CMD_MODULE	IPCRM_CMD
-#else
-#define	CMD_MODULE	MUPIP_CMD
-#endif
-
-
-extern int	MUPIP_CMD(), IPCRM_CMD(),
-		CLI$DCL_PARSE(), CLI$DISPATCH();
-
-void mupip_getcmd(void)
-{
-	char buff[512];
-	$DESCRIPTOR(command,buff);
-
-	int		status;
-	unsigned short outlen;
-	unsigned char	buf[256];
-	$DESCRIPTOR	(action, buf);
-	$DESCRIPTOR	(prompt,"MUPIP> ");
-	$DESCRIPTOR	(mupip_action, "MUPIP_ACTION");
-
-	status = lib$get_foreign(&command,0,&outlen,0);
-	if ((status & 1) && outlen > 0)
-	{	command.dsc$w_length = outlen;
-		status = CLI$DCL_PARSE(&command ,&CMD_MODULE, &lib$get_input, 0, 0);
-		if (status == CLI$_NORMAL)
-			CLI$DISPATCH();
-	}else
-	{	for (;;)
-		{
-			status = CLI$DCL_PARSE (0, &CMD_MODULE,
-						&lib$get_input, &lib$get_input,
-						&prompt);
-			if (status == RMS$_EOF)
-				break;
-			if (status == CLI$_NORMAL)
-				CLI$DISPATCH ();
-		}
-	}
-/*****************REVERT TO DCL COMMAND TABLE CODE**********************
-	status = CLI$GET_VALUE (&mupip_action, &action, 0);
-	if (status == CLI$_ABSENT)
-		for (;;)
-		{
-			status = CLI$DCL_PARSE (0, &CMD_MODULE,
-						&lib$get_input, &lib$get_input,
-						&prompt);
-			if (status == RMS$_EOF)
-				mupip_exit(SS$_NORMAL);
-			if (status == CLI$_NORMAL)
-				CLI$DISPATCH ();
-		}
-	else
-		mupip_dispatch (&action);
-**************************************************************************/
-	mupip_exit(SS$_NORMAL);
-}
diff --git a/sr_vvms/mupip_getcmd.h b/sr_vvms/mupip_getcmd.h
deleted file mode 100644
index 15b0eda..0000000
--- a/sr_vvms/mupip_getcmd.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MUPIP_GETCMD_INCLUDED
-#define MUPIP_GETCMD_INCLUDED
-
-void mupip_getcmd(void);
-
-#endif /* MUPIP_GETCMD_INCLUDED */
diff --git a/sr_vvms/mupip_help.c b/sr_vvms/mupip_help.c
deleted file mode 100644
index a86e96d..0000000
--- a/sr_vvms/mupip_help.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <climsgdef.h>
-#include <descrip.h>
-#include "mupip_help.h"
-
-#define HLP$M_PROMPT 1
-#define HELP_LIBRARY "GTM$HELP:MUPIP"
-
-void mupip_help(void)
-{
-
-	uint4 flags;
-	char buff[256];
-	$DESCRIPTOR(line, buff);
-	$DESCRIPTOR(libr, HELP_LIBRARY);
-	$DESCRIPTOR(ent, "QUERY");
-
-	if (CLI$PRESENT(&ent) != CLI$_PRESENT || CLI$GET_VALUE(&ent,&line) != SS$_NORMAL)
-		line.dsc$w_length = 0;
-	flags = HLP$M_PROMPT;
-	lbr$output_help(lib$put_output,0,&line,&libr,&flags,lib$get_input);
-	return;
-
-}
diff --git a/sr_vvms/mupip_restore.c b/sr_vvms/mupip_restore.c
deleted file mode 100644
index 5a3f542..0000000
--- a/sr_vvms/mupip_restore.c
+++ /dev/null
@@ -1,559 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <psldef.h>
-#include <rms.h>
-#include <ssdef.h>
-#include <errno.h>
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-#include "gtm_netdb.h"
-#include "gtm_time.h"
-#include "eintr_wrappers.h"
-#include "gtm_select.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "cli.h"
-#include "efn.h"
-#include "gdsblk.h"
-#include "gdsbml.h"
-#include "mupipbckup.h"
-#include "murest.h"
-#include "gt_timer.h"
-#include "io.h"
-#include "iotimer.h"
-#include "util.h"
-#include "gtm_caseconv.h"
-#include "bit_set.h"
-#include "is_proc_alive.h"
-#include "locks.h"
-#include "mu_rndwn_file.h"
-#include "dbfilop.h"
-#include "mupip_exit.h"
-#ifdef BACKUP_TO_EXEC
-#include "gtm_pipe.h"
-#include "mupip_restore.h"
-#endif
-#include "mu_outofband_setup.h"
-#include "mu_gv_cur_reg_init.h"
-#include "gtmmsg.h"
-#include "shmpool.h"
-#include "gds_blk_downgrade.h"
-#include "min_max.h"
-
-#define TCP_LENGTH		5
-#define COMMON_READ(A, B, C)	{						\
-					(*common_read)(A, B, C);		\
-					if (0 != restore_read_errno)		\
-					{					\
-						free(inbuf);			\
-						free(old_data);			\
-						mupip_exit(restore_read_errno);	\
-					}					\
-				}
-
-
-/* No csa needed for VMS code, so use GTM_PUTMSG to avoid lots of CSA_ARG(NULL) boilerplate. */
-#define GTM_PUTMSG	gtm_putmsg
-
-GBLDEF	inc_list_struct 	in_files;
-GBLREF 	gd_region		*gv_cur_region;
-GBLREF	uint4			restore_read_errno;
-GBLREF  bool			mubtomag;
-GBLREF 	int4 			mubmaxblk;
-
-LITREF	char			*gtm_dbversion_table[];
-
-error_def(ERR_MUNODBNAME);
-error_def(ERR_MUPRESTERR);
-error_def(ERR_MUSTANDALONE);
-
-static void tcp_read(char *temp, char *buf, int nbytes);
-static void record_read(char *temp, char *buf, int nbytes);
-void exec_read(char *temp, char *buf, int nbytes);
-
-void mupip_restore(void)
-{
-	static readonly char	label[] = GDS_LABEL;
-	inc_list_struct 	*ptr;
-	inc_header		*inhead;
-	sgmnt_data		*old_data;
-	trans_num		curr_tn;
-	block_id		blk_num;
-	struct FAB		extfab, infab;
-	struct XABFHC		muxab;
-	struct RAB		inrab, extrab;
-	file_control		*fc;
-	int			i, size, next_pos, backup_socket, size1;
-	uint4			cli_status, cur_tot, rest_blks, status, totblks, bplmap, ii;
-	char			buff[DISK_BLOCK_SIZE], *inbuf, *common, *p, tcp[TCP_LENGTH], addr[SA_MAXLEN+1], *blk_ptr;
-	char			*newmap, *newmap_bptr;
-	char_ptr_t		ptr1, ptr1_top;
-	backup_type		type;
-	int4			timeout, cut, match, temp_int4;
-	unsigned short		port;
-	boolean_t		extend;
-	void			(*common_read)(char *, char *, int);
-	muinc_blk_hdr_ptr_t	sblkh_p;
-
-	if (!mubtomag)
-		mubmaxblk = BACKUP_TEMPFILE_BUFF_SIZE;
-	extend = TRUE;
-	if (CLI_NEGATED == (cli_status = cli_present("EXTEND")))
-		extend = FALSE;
-	mu_outofband_setup();
-	mu_gv_cur_reg_init();
-	gv_cur_region->dyn.addr->fname_len = SIZEOF(gv_cur_region->dyn.addr->fname);
-	if (0 == cli_get_str("DATABASE", gv_cur_region->dyn.addr->fname, &gv_cur_region->dyn.addr->fname_len))
-		mupip_exit(ERR_MUNODBNAME);
-	if (!mu_rndwn_file(TRUE))
-	{
-		GTM_PUTMSG(VARLSTCNT(4) ERR_MUSTANDALONE, 2, DB_LEN_STR(gv_cur_region));
-		mupip_exit(ERR_MUPRESTERR);
-	}
-	fc = gv_cur_region->dyn.addr->file_cntl;
-	fc->file_type = dba_bg;
-	fc->op = FC_OPEN;
-	status = dbfilop(fc);
-	if (SS$_NORMAL != status)
-	{
-		GTM_PUTMSG(VARLSTCNT(1) status);
-		util_out_print("Error accessing output file !AD. Aborting restore.", TRUE, DB_LEN_STR(gv_cur_region));
-		mupip_exit(status);
-	}
-	murgetlst();
-	old_data = malloc(ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE));
-	fc->op = FC_READ;
-	fc->op_buff = old_data;
-	fc->op_len = ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE);
-	fc->op_pos = 1;
-	dbfilop(fc);
-	if (memcmp(&old_data->label[0], &label[0], SIZEOF(old_data->label)))
-	{
-		util_out_print("Output file !AD has an unrecognizable format", TRUE, DB_LEN_STR(gv_cur_region));
-		free(old_data);
-		mupip_exit(ERR_MUPRESTERR);
-	}
-	inbuf = malloc(MAX(mubmaxblk, MAX((old_data->blk_size + SIZEOF(muinc_blk_hdr)),
-					  MAX(SGMNT_HDR_LEN, MASTER_MAP_SIZE_MAX))));
-	cur_tot = old_data->trans_hist.total_blks;
-	curr_tn = old_data->trans_hist.curr_tn;
-	bplmap = old_data->bplmap;
-	inhead = malloc(SIZEOF(inc_header));
-	rest_blks = 0;
-	for (ptr = in_files.next; ptr; ptr = ptr->next)
-	{
-		/* --- determine source type --- */
-		type = backup_to_file;
-		if (0 == ptr->input_file.len)
-			continue;
-		else if ('|' == *(ptr->input_file.addr + ptr->input_file.len - 1))
-		{
-			type = backup_to_exec;
-			ptr->input_file.len--;
-			*(ptr->input_file.addr + ptr->input_file.len) = '\0';
-		} else if (ptr->input_file.len > TCP_LENGTH)
-		{
-			lower_to_upper(tcp, ptr->input_file.addr, TCP_LENGTH);
-			if (0 == memcmp(tcp, "TCP:/", TCP_LENGTH))
-			{
-				type = backup_to_tcp;
-				cut = TCP_LENGTH;
-				while ('/' == *(ptr->input_file.addr + cut))
-					cut++;
-				ptr->input_file.len -= cut;
-				p = ptr->input_file.addr;
-				while (p < ptr->input_file.addr + ptr->input_file.len)
-				{
-					*p = *(p + cut);
-					p++;
-				}
-				*p = '\0';
-			}
-		}
-		/* --- open the input stream --- */
-		restore_read_errno = 0;
-		switch(type)
-		{
-			case backup_to_file:
-				infab = cc$rms_fab;
-				infab.fab$b_fac = FAB$M_GET;
-				infab.fab$l_fna = ptr->input_file.addr;
-				infab.fab$b_fns = ptr->input_file.len;
-				inrab = cc$rms_rab;
-				inrab.rab$l_fab = &infab;
-				if ((RMS$_NORMAL != (status = sys$open(&infab))) ||
-					(RMS$_NORMAL != (status = sys$connect(&inrab))))
-				{
-					GTM_PUTMSG(VARLSTCNT(1) status);
-					util_out_print("Error accessing input file !AD. Aborting restore.", TRUE,
-						infab.fab$b_fns, infab.fab$l_fna);
-					free(inbuf);
-					free(old_data);
-					free(inhead);
-					mupip_exit(status);
-				}
-				common_read = record_read;
-				common = (char *)(&inrab);
-				break;
-			case backup_to_exec:
-#				ifdef BACKUP_TO_EXEC
-				pipe_child = 0;
-				common_read = exec_read;
-				in = (BFILE *)malloc(SIZEOF(BFILE));
-				if (0 > (in->fd = gtm_pipe(ptr->input_file.addr, input_from_comm)))
-				{
-					util_out_print("Error creating input pipe from !AD.", TRUE, ptr->input_file.len, ptr->input_
-						file.addr);
-					mupip_exit(ERR_MUPRESTERR);
-				}
-				DBGFPF(stdout, "file descriptor for the openned pipe is %d.\n", in->fd);
-				DBGFPF(stdout, "the command passed to gtm_pipe is %s.\n", ptr->input_file.addr);
-				break;
-#				endif
-			case backup_to_tcp:
-				/* parse the input */
-				switch (match = SSCANF(ptr->input_file.addr, "%[^:]:%hu", addr, &port))
-				{
-					case 1:
-						port = DEFAULT_BKRS_PORT;
-					case 2:
-						break;
-					default:
-						util_out_print("Error : A hostname has to be specified.", TRUE);
-						free(inbuf);
-						free(old_data);
-						free(inhead);
-						mupip_exit(ERR_MUPRESTERR);
-				}
-				if ((0 == cli_get_int("NETTIMEOUT", &timeout)) || (0 > timeout))
-					timeout = DEFAULT_BKRS_TIMEOUT;
-				if (0 > (backup_socket = tcp_open(addr, port, timeout, TRUE)))
-				{
-					util_out_print("Error establishing TCP connection to !AD.", TRUE,
-						ptr->input_file.len, ptr->input_file.addr);
-					free(inbuf);
-					free(old_data);
-					free(inhead);
-					mupip_exit(ERR_MUPRESTERR);
-				}
-				common_read = tcp_read;
-				common = (char *)(&backup_socket);
-				break;
-			default:
-				util_out_print("Aborting restore!/", TRUE);
-				util_out_print("Unrecognized input format !AD", TRUE, ptr->input_file.len, ptr->input_file.addr);
-				free(inbuf);
-				free(old_data);
-				free(inhead);
-				mupip_exit(ERR_MUPRESTERR);
-		}
-		size = SIZEOF(inc_header);
-		COMMON_READ(common, (char *)(inhead), size);
-		/* validate incremental backup header */
-		if (0 != memcmp(&inhead->label[0], INC_HEADER_LABEL, INC_HDR_LABEL_SZ))
-		{
-			util_out_print("Input !AD has an unrecognizable format", TRUE, ptr->input_file.len, ptr->input_file.addr);
-			free(inbuf);
-			free(old_data);
-			free(inhead);
-			mupip_exit(ERR_MUPRESTERR);
-		}
-		if (curr_tn != inhead->start_tn)
-		{
-			util_out_print("Transaction in input !AD does not align with database TN.!/DB: 0x!16 at XQ!_Input : 0x!16 at XQ",
-				TRUE, ptr->input_file.len, ptr->input_file.addr, &curr_tn, &inhead->start_tn);
-			free(inbuf);
-			free(old_data);
-			free(inhead);
-			mupip_exit(ERR_MUPRESTERR);
-		}
-		if (old_data->blk_size != inhead->blk_size)
-		{
-			util_out_print("Incompatible block size.  Output file !AD has block size !XL,", TRUE,
-					DB_LEN_STR(gv_cur_region), old_data->blk_size);
-			util_out_print("while input !AD is from a database with block size !XL,", TRUE,
-					ptr->input_file.len, ptr->input_file.addr, inhead->blk_size);
-			free(inbuf);
-			free(old_data);
-			free(inhead);
-			mupip_exit(ERR_MUPRESTERR);
-		}
-		assert(0 < cur_tot);
-		if (cur_tot != inhead->db_total_blks)
-		{
-			if (cur_tot > inhead->db_total_blks || !extend)
-			{
-				totblks = cur_tot - DIVIDE_ROUND_UP(cur_tot, DISK_BLOCK_SIZE);
-				util_out_print("Incompatible database sizes.  Output file !AD has!/  !UL (!XL hex) total blocks,",
-					TRUE, DB_LEN_STR(gv_cur_region), totblks, totblks);
-				totblks = inhead->db_total_blks - DIVIDE_ROUND_UP(inhead->db_total_blks, DISK_BLOCK_SIZE);
-				util_out_print("while input !AD is from a database with!/  !UL (!XL hex) total blocks", TRUE,
-							ptr->input_file.len, ptr->input_file.addr, totblks, totblks);
-				free(inbuf);
-				free(old_data);
-				free(inhead);
-				mupip_exit(ERR_MUPRESTERR);
-			} else
-			{	/* Although we are extending the file, we need not write any local bit maps like would occur
-				 * with a regular extension of the db. This is because the backup process makes sure that any
-				 * necessary bitmaps are part of the backup and will thus be properly restored.
-				 */
-				muxab = cc$rms_xabfhc;
-				extrab = cc$rms_rab;
-				extrab.rab$l_fab = &extfab;
-				extfab = cc$rms_fab;
-				extfab.fab$l_xab = &muxab;
-				extfab.fab$l_fna = gv_cur_region->dyn.addr->fname;
-				extfab.fab$b_fns = gv_cur_region->dyn.addr->fname_len;
-				extfab.fab$b_fac = FAB$M_BIO | FAB$M_PUT;
-				extfab.fab$l_fop = FAB$M_CBT;
-				extfab.fab$b_shr = FAB$M_SHRPUT | FAB$M_UPI;
-				if ((RMS$_NORMAL != (status = sys$open(&extfab))) ||
-					(RMS$_NORMAL != (status = sys$connect(&extrab))))
-				{
-					util_out_print("Cannot extend output file.",TRUE);
-					free(inbuf);
-					free(old_data);
-					free(inhead);
-					mupip_exit(ERR_MUPRESTERR);
-				}
-				memset(buff, 0, DISK_BLOCK_SIZE);
-				extrab.rab$l_rbf = buff;
-				extrab.rab$w_rsz = DISK_BLOCK_SIZE;
-				extrab.rab$l_bkt =
-					old_data->start_vbn - 1 + (inhead->db_total_blks * (old_data->blk_size / DISK_BLOCK_SIZE));
-				if (RMS$_NORMAL != (status = sys$write(&extrab)))
-				{
-					util_out_print("Cannot write to output file.",TRUE);
-					free(inbuf);
-					free(old_data);
-					free(inhead);
-					mupip_exit(ERR_MUPRESTERR);
-				}
-				sys$close(&extfab);
-				/* --- initialize all new bitmaps, just in case they are not touched later --- */
-				if (DIVIDE_ROUND_DOWN(inhead->db_total_blks, bplmap) > DIVIDE_ROUND_DOWN(cur_tot, bplmap))
-				{	/* -- similar logic exist in bml_newmap.c, which need to pick up any new updates here -- */
-					newmap = (char *)malloc(old_data->blk_size);
-					((blk_hdr *)newmap)->bver = GDSVCURR;
-					((blk_hdr *)newmap)->bsiz = BM_SIZE(bplmap);
-					((blk_hdr *)newmap)->levl = LCL_MAP_LEVL;
-					((blk_hdr *)newmap)->tn = curr_tn;
-					newmap_bptr = newmap + SIZEOF(blk_hdr);
-					*newmap_bptr++ = THREE_BLKS_FREE;
-					memset(newmap_bptr, FOUR_BLKS_FREE, BM_SIZE(bplmap) - SIZEOF(blk_hdr) - 1);
-					fc->op = FC_WRITE;
-					fc->op_buff = newmap;
-					for (ii = ROUND_UP(cur_tot, bplmap); ii < inhead->db_total_blks; ii += bplmap)
-					{
-						fc->op_pos = old_data->start_vbn
-							+ ((gtm_int64_t)old_data->blk_size / DISK_BLOCK_SIZE * ii);
-						dbfilop(fc);
-					}
-					free(newmap);
-				}
-				cur_tot = inhead->db_total_blks;
-			}
-		}
-		fc->op = FC_WRITE;
-		fc->op_buff = inbuf + SIZEOF(muinc_blk_hdr);
-		sblkh_p = (muinc_blk_hdr_ptr_t)inbuf;
-		size = SIZEOF(muinc_blk_hdr) + old_data->blk_size;
-		for ( ; ;)
-		{
-			COMMON_READ(common, inbuf, size);
-			if (0 == MEMCMP_LIT(inbuf, END_MSG))
-				break;
-			blk_num = ((muinc_blk_hdr_ptr_t)inbuf)->blkid;
-			fc->op_pos = old_data->start_vbn + ((gtm_int64_t)old_data->blk_size / DISK_BLOCK_SIZE * blk_num);
-			/* For blocks that were read during the main backup phase of stream backup, the blocks are
-			 * recorded without version (there may even be some garbage blocks in the stream of
-			 * indeterminate/invalid format if a bitmap was written out prior to the data blocks that
-			 * were recently allocated in it). For these blocks, we just write out what we have as a
-			 * full block. For blocks that were written out during the backup as part of the online
-			 * image processing, these are always recorded in V5 mode. We will rewrite these in the mode
-			 * they were oringally found on disk (potentially necessitating a downgrade of the block).
-			 * This allows us to exactly match the blks_to_upgrade counter in the saved file-header without
-			 * worrying about what blocks were converted (or not) in the interim.
-			 */
-			blk_ptr = inbuf + SIZEOF(muinc_blk_hdr);
-			if (GDSNOVER != sblkh_p->use.bkup.ondsk_blkver)
-			{	/* Specifically versioned blocks - Put them back in the version they were originally */
-				if (GDSV4 == sblkh_p->use.bkup.ondsk_blkver)
-				{
-					gds_blk_downgrade((v15_blk_hdr_ptr_t)blk_ptr, (blk_hdr_ptr_t)blk_ptr);
-					fc->op_len = (((v15_blk_hdr_ptr_t)blk_ptr)->bsiz + 1) & ~1;
-				} else
-					fc->op_len = (((blk_hdr_ptr_t)blk_ptr)->bsiz + 1) & ~1;
-			} else
-				fc->op_len = old_data->blk_size;
-			rest_blks++;
-			dbfilop(fc);
-		}
-		/* Next section is the file header which we need to restore. */
-		ptr1 = inbuf;
-		size1 = ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE);
-		ptr1_top = ptr1 + size1;
-		fc->op_len = size1;
-		assert(size1 <= mubmaxblk);
-		COMMON_READ(common, ptr1, size1);
-		((sgmnt_data_ptr_t)inbuf)->start_vbn = old_data->start_vbn;
-		((sgmnt_data_ptr_t)inbuf)->free_space = ((old_data->start_vbn - 1) * DISK_BLOCK_SIZE) - SIZEOF_FILE_HDR(inbuf);
-		fc->op_buff = inbuf;	/* reset since no block_id for header */
-		fc->op_pos = 1;
-		dbfilop(fc);
-		size1 = ROUND_UP(((sgmnt_data_ptr_t)inbuf)->master_map_len, DISK_BLOCK_SIZE);
-		COMMON_READ(common, inbuf, SIZEOF(HDR_MSG));
-		if (MEMCMP_LIT(inbuf, HDR_MSG))
-		{	/* We didn't read the record we were supposed to. We just wrecked the db most likely */
-			util_out_print("Invalid information in restore file !AD. Aborting restore.",
-					TRUE, ptr->input_file.len,
-					ptr->input_file.addr);
-			assert(FALSE);
-			free(inbuf);
-			free(old_data);
-			free(inhead);
-			mupip_exit(ERR_MUPRESTERR);
-		}
-		/* Now for the master map. Use size gleened from master map length */
-		ptr1 = inbuf;
-		ptr1_top = ptr1 + size1;
-		fc->op_len = size1;
-		for (;ptr1 < ptr1_top ; ptr1 += size1)
-		{
-			if ((size1 = ptr1_top - ptr1) > mubmaxblk)
-				size1 = (mubmaxblk / DISK_BLOCK_SIZE) * DISK_BLOCK_SIZE;
-			COMMON_READ(common, ptr1, size1);
-		}
-		fc->op_buff = inbuf;	/* reset since no block_id for header */
-		fc->op_pos = MM_BLOCK;
-		dbfilop(fc);
-		COMMON_READ(common, inbuf, SIZEOF(MAP_MSG));
-		if (MEMCMP_LIT(inbuf, MAP_MSG))
-		{	/* We didn't read the record we were supposed to. We just wrecked the db most likely */
-			util_out_print("Invalid information in restore file !AD. Aborting restore.",
-					TRUE, ptr->input_file.len,
-					ptr->input_file.addr);
-			assert(FALSE);
-			free(inbuf);
-			free(old_data);
-			free(inhead);
-			mupip_exit(ERR_MUPRESTERR);
-		}
-		curr_tn = inhead->end_tn;
-		switch(type)
-		{
-			case backup_to_file:
-				if (RMS$_NORMAL != (status = sys$close(&infab)))
-				{
-					GTM_PUTMSG(VARLSTCNT(1) status);
-					util_out_print("WARNING:  DB file !AD restore aborted, file !AD not valid", TRUE,
-						DB_LEN_STR(gv_cur_region),
-						ptr->input_file.len, ptr->input_file.addr);;
-					free(inbuf);
-					free(old_data);
-					free(inhead);
-					mupip_exit(ERR_MUPRESTERR);
-				}
-				break;
-			case backup_to_exec:
-#			ifdef BACKUP_TO_EXEC
-				close(in->fd);
-				if ((pipe_child > 0) && (FALSE != is_proc_alive(pipe_child, 0)))
-					 waitpid(pipe_child, &status, 0);	/* BYPASSOK */
-#			endif
-				break;
-			case backup_to_tcp:
-				close(backup_socket);
-				break;
-		}
-	}
-	util_out_print("!/RESTORE COMPLETED", TRUE);
-	util_out_print("!UL blocks restored", TRUE, rest_blks);
-	free(inbuf);
-	free(old_data);
-	free(inhead);
-	mupip_exit(SS$_NORMAL);
-}
-
-static void record_read(char *temp, char *buf, int nbytes) /* *nbytes is what we are asking, normally, is what we get + 4 */
-{
-	struct RAB	*rab;
-	int4		status;
-
-	rab = (struct RAB *)(temp);
-	rab->rab$w_usz = nbytes;
-	rab->rab$l_ubf = buf;
-	status = sys$get(rab);
-	if (RMS$_NORMAL != status)
-	{
-		GTM_PUTMSG(VARLSTCNT(1) status);
-		util_out_print("Error accessing input file !AD. Aborting restore.", TRUE,
-			rab->rab$l_fab->fab$b_fns, rab->rab$l_fab->fab$l_fna);
-		sys$close(rab->rab$l_fab);
-		mupip_exit(status);
-	}
-	assert(nbytes == (int)(rab->rab$w_rsz) || 0 == MEMCMP_LIT(buf, "GDS"));
-	return;
-}
-
-static void tcp_read(char *temp, char *buf, int nbytes) /* asking for *nbytes, have to return *nbytes */
-{
-	int		socket, needed, status;
-	char		*curr;
-	fd_set		fs;
-	struct timeval	nap;
-
-	needed = nbytes;
-	curr = buf;
-	socket = *(int *)(temp);
-	nap.tv_sec = 1;
-	nap.tv_usec = 0;
-	while (1)
-	{
-		assertpro(FD_SETSIZE > socket);
-		FD_ZERO(&fs);
-		FD_SET(socket, &fs);
-		assert(0 != FD_ISSET(socket, &fs));
-		status = select(socket + 1, (void *)(&fs), (void *)0, (void *)0, &nap);
-		if (status > 0)
-		{
-			RECV(socket, curr, needed, 0, status);
-			if ((0 == status) || (needed == status))	/* lost connection or all set */
-			{
-				break;
-			} else if (status > 0)
-			{
-				needed -= status;
-				curr += status;
-			}
-		}
-		if ((status < 0) && (errno != EINTR))
-		{
-			GTM_PUTMSG(VARLSTCNT(1) errno);
-			close(socket);
-			restore_read_errno = errno;
-			break;
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/mupip_rundown.c b/sr_vvms/mupip_rundown.c
deleted file mode 100644
index 9f55754..0000000
--- a/sr_vvms/mupip_rundown.c
+++ /dev/null
@@ -1,380 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_inet.h"	/* Required for gtmsource.h */
-#include "gtm_stdlib.h"
-#include "gtm_string.h"
-#include <clidef.h>
-#include <iodef.h>
-#include <jpidef.h>
-#include <rms.h>
-#include <ssdef.h>
-#include <prtdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <errno.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "cli.h"
-#include "error.h"
-#include "mupipbckup.h"
-#include "vmsdtype.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "iosp.h"
-#include "gbldirnam.h"
-#include "repl_sem.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmrecv.h"
-#include "util.h"
-#include "mu_rndwn_file.h"
-#include "mu_rndwn_replpool.h"
-#include "is_file_identical.h"
-#include "dbfilop.h"
-#include "mupip_exit.h"
-#include "del_sec.h"
-#include "fid_from_sec.h"
-#include "mu_getlst.h"
-#include "mu_outofband_setup.h"
-#include "dpgbldir.h"
-#include "dpgbldir_sysops.h"
-#include "mu_gv_cur_reg_init.h"
-#include "gtmmsg.h"
-#include "gtm_logicals.h"
-
-#define SYS_EXC 0
-#define MAILBOX_SIZE 512
-
-GBLREF tp_region	*grlist;
-GBLREF bool		in_backup;
-GBLREF bool		error_mupip;
-GBLREF gd_region	*gv_cur_region;
-GBLREF bool		mu_ctrly_occurred;
-GBLREF bool		mu_ctrlc_occurred;
-GBLREF boolean_t	mu_star_specified;
-GBLREF boolean_t	mu_rndwn_process;
-static readonly $DESCRIPTOR(d_pnam, "GTM$MURNDWNPRC");
-static uint4		rndwn_pid;
-
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-error_def(ERR_MUDESTROYFAIL);
-error_def(ERR_MUDESTROYSUC);
-error_def(ERR_MUFILRNDWNFL);
-error_def(ERR_MUFILRNDWNSUC);
-error_def(ERR_MUJPOOLRNDWNFL);
-error_def(ERR_MUJPOOLRNDWNSUC);
-error_def(ERR_MUNOACTION);
-error_def(ERR_MUNODBNAME);
-error_def(ERR_MUNOTALLSEC);
-error_def(ERR_MUPCLIERR);
-error_def(ERR_MUREPLSECDEL);
-error_def(ERR_MUREPLSECNOTDEL);
-error_def(ERR_MURPOOLRNDWNFL);
-error_def(ERR_MURPOOLRNDWNSUC);
-error_def(ERR_MUSECDEL);
-error_def(ERR_MUSECNOTDEL);
-error_def(ERR_STACKOFLOW);
-error_def(ERR_VMSMEMORY);
-
-CONDITION_HANDLER(mupip_rundown_ch)
-{
-	START_CH(FALSE);
-	if ((0 != rndwn_pid) && !(SEVERITY & SUCCESS))
-	{
-		if (DUMPABLE)
-		{
-			sys$delprc(NULL, &d_pnam);
-			if (!SUPPRESS_DUMP)
-				TERMINATE;
-		} else
-			UNWIND(NULL, NULL);
-	} else if (DUMPABLE && !SUPPRESS_DUMP)
-		TERMINATE;
-	NEXTCH;
-}
-
-void mupip_rundown(void)
-{
-	uint4		channel, exit_status, flags, status;
-	unsigned int	full_len;
-	unsigned short	iosb[4];
-	unsigned char	*c, mbuff[MAILBOX_SIZE];
-	boolean_t	region, file, arg_present;
-	file_control	*fc;
-	tp_region	*rptr;
-	char            name_buff[GLO_NAME_MAXLEN], res_name[MAX_NAME_LEN + 2]; /* +1 for the terminating null and another +1 for
-										the length stored in [0] by global_name() */
-	boolean_t	sgmnt_found;
-	mstr		gbldir_mstr, *tran_name;
-	gds_file_id	file_id;
-	replpool_identifier	replpool_id;
-	struct dsc$descriptor_s name_dsc;
-	$DESCRIPTOR(d_sec, mbuff);
-	static readonly $DESCRIPTOR(d_cmd, "install lis/glo");
-	static readonly $DESCRIPTOR(d_mnam, "GTM$MURNDWNMBX");
-
-	exit_status = SS$_NORMAL;
-	mu_rndwn_process = TRUE;
-	mu_outofband_setup();
-
-	file = (CLI_PRESENT == cli_present("FILE"));
-	region = (CLI_PRESENT == cli_present("REGION"));
-	arg_present = (CLI_PRESENT == cli_present("DBFILE"));
-	if (arg_present && !file && !region)
-	{
-		util_out_print("MUPIP RUNDOWN only accepts a parameter when -FILE or -REGION is specified.", TRUE);
-		mupip_exit(ERR_MUPCLIERR);
-	}
-	if (!arg_present)
-	{
-		mu_gv_cur_reg_init();
-		status = sys$crembx(0, &channel, SIZEOF(mbuff), 0, 0, PSL$C_USER, &d_mnam);
-		if (SS$_NORMAL != status)
-			mupip_exit(status);
-		flags = CLI$M_NOWAIT | CLI$M_NOLOGNAM;
-		ESTABLISH(mupip_rundown_ch);
-		status = lib$spawn(&d_cmd, 0, &d_mnam, &flags, &d_pnam, &rndwn_pid);
-		if (SS$_NORMAL != status)
-		{
-			if (SS$_DUPLNAM == status)
-				util_out_print("Spawned process GTM$MURNDWNPRC already exists, cannot continue rundown", TRUE);
-				util_out_print("If the prior RUNDOWN ended abnormally, STOP GTM$MURNDWNPRC and retry", TRUE);
-			mupip_exit(status);
-		}
-		for (; ;)
-		{
-			status = sys$qiow(EFN$C_ENF, channel, IO$_READVBLK, &iosb, 0, 0, mbuff, SIZEOF(mbuff), 0, 0, 0, 0);
-			if (SS$_NORMAL != status)
-			{
-				mupip_exit(status);
-				break;
-			}
-			if (SS$_ENDOFFILE == iosb[0])
-				break;
-			if (SS$_NORMAL != iosb[0])
-			{
-				mupip_exit(iosb[0]);
-				break;
-			}
-			if ((FALSE == mu_ctrly_occurred) && (FALSE == mu_ctrlc_occurred))
-			{
-				if (0 == memcmp("GT$S", mbuff, SIZEOF("GT$S") - 1))
-				{
-					for (c = mbuff; *c > 32; c++)
-						;
-					d_sec.dsc$w_length = c - mbuff;
-					fid_from_sec(&d_sec, &FILE_INFO(gv_cur_region)->file_id);
-					status = mu_rndwn_file(FALSE);
-					if (gv_cur_region->read_only)
-						status = RMS$_PRV;
-					if (SS$_NORMAL == status)
-					{
-						sys$dassgn(FILE_INFO(gv_cur_region)->fab->fab$l_stv);
-						gv_cur_region->open = FALSE;
-					} else
-					{
-						if (RMS$_FNF == status)
-							status = del_sec(SEC$M_SYSGBL, &d_sec, 0);
-					}
-					if (status & 1)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUSECDEL, 2,
-								d_sec.dsc$w_length, d_sec.dsc$a_pointer);
-					else
-					{
-						if (status)
-							gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUSECNOTDEL, 2,
-								d_sec.dsc$w_length, d_sec.dsc$a_pointer);
-						exit_status = ERR_MUNOTALLSEC;
-					}
-				} else if ((0 == memcmp("GT$P", mbuff, SIZEOF("GT$P") - 1)) ||
-						(0 == memcmp("GT$R", mbuff, SIZEOF("GT$R") - 1)))
-				{
-					for (c = mbuff; *c > 32; c++)
-                                                ;
-                                        mbuff[c - mbuff] = '\0';
-					strcpy(replpool_id.repl_pool_key, mbuff);
-					if (!memcmp("GT$P", mbuff, SIZEOF("GT$P") - 1))
-						replpool_id.pool_type = JNLPOOL_SEGMENT;
-					else
-						replpool_id.pool_type = RECVPOOL_SEGMENT;
-					sgmnt_found = FALSE;
-					if (mu_rndwn_replpool(&replpool_id, TRUE, &sgmnt_found) && sgmnt_found)
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUREPLSECDEL, 2,
-								LEN_AND_STR(mbuff));
-					else if (sgmnt_found)
-					{
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUREPLSECNOTDEL, 2,
-								LEN_AND_STR(mbuff));
-						exit_status = ERR_MUNOTALLSEC;
-					}
-				}
-			}
-		}
-		rndwn_pid = 0;
-		REVERT;
-		mupip_exit(exit_status);
-	} else
-	{
-		if (region)
-		{
-			gvinit();
-			region = TRUE;
-			mu_getlst("DBFILE", SIZEOF(tp_region));
-			rptr = grlist;
-			if (error_mupip)
-				exit_status = ERR_MUNOTALLSEC;
-		} else
-		{
-			region = FALSE;
-			mu_gv_cur_reg_init();
-			gv_cur_region->dyn.addr->fname_len = SIZEOF(gv_cur_region->dyn.addr->fname);
-			if (0 == cli_get_str("DBFILE", (char *)&gv_cur_region->dyn.addr->fname,
-					&gv_cur_region->dyn.addr->fname_len))
-				mupip_exit(ERR_MUNODBNAME);
-		}
-		for (; ; rptr = rptr->fPtr)
-		{
-			if (region)
-			{
-				if (NULL == rptr)
-					break;
-				if (dba_usr == rptr->reg->dyn.addr->acc_meth)
-				{
-					util_out_print("!/Can't RUNDOWN region !AD; not GDS format", TRUE, REG_LEN_STR(rptr->reg));
-					continue;
-				}
-				if (!mupfndfil(rptr->reg, NULL))
-				{
-					exit_status = ERR_MUNOTALLSEC;
-					continue;
-				}
-				gv_cur_region = rptr->reg;
-				if (NULL == gv_cur_region->dyn.addr->file_cntl)
-				{
-					gv_cur_region->dyn.addr->acc_meth = dba_bg;
-					gv_cur_region->dyn.addr->file_cntl =
-						(file_control *)malloc(SIZEOF(*gv_cur_region->dyn.addr->file_cntl));
-					memset(gv_cur_region->dyn.addr->file_cntl, 0, SIZEOF(*gv_cur_region->dyn.addr->file_cntl));
-					gv_cur_region->dyn.addr->file_cntl->file_type = dba_bg;
-					gv_cur_region->dyn.addr->file_cntl->file_info = (GDS_INFO *)malloc(SIZEOF(GDS_INFO));
-					memset(gv_cur_region->dyn.addr->file_cntl->file_info, 0, SIZEOF(GDS_INFO));
-				}
-			}
-			status = mu_rndwn_file(FALSE);
-			if (SS$_NORMAL == status)
-			{
-#ifdef	IPCRM_FOR_SANCHEZ_ONLY
-				global_name("GT$S", &FILE_INFO(gv_cur_region)->file_id, name_buff);
-				name_dsc.dsc$a_pointer = &name_buff[1];
-				name_dsc.dsc$w_length = (short)name_buff[0];
-				name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-				name_dsc.dsc$b_class = DSC$K_CLASS_S;
-				status = del_sec(SEC$M_SYSGBL, &name_dsc, 0);
-#endif
-				sys$dassgn(FILE_INFO(gv_cur_region)->fab->fab$l_stv);
-			}
-			if (status & 1)
-			{
-#ifdef	IPCRM_FOR_SANCHEZ_ONLY
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_MUDESTROYSUC, 4,
-					name_dsc.dsc$w_length, name_dsc.dsc$a_pointer, DB_LEN_STR(gv_cur_region));
-#else
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUFILRNDWNSUC, 2, DB_LEN_STR(gv_cur_region));
-#endif
-			}
-			else
-			{
-				if (status)
-					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-#ifdef	IPCRM_FOR_SANCHEZ_ONLY
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_MUDESTROYFAIL, 4,
-					name_dsc.dsc$w_length, name_dsc.dsc$a_pointer, DB_LEN_STR(gv_cur_region));
-				exit_status = ERR_MUNOACTION;
-#else
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_MUFILRNDWNFL, 2, DB_LEN_STR(gv_cur_region));
-				exit_status = ERR_MUNOTALLSEC;
-#endif
-			}
-			if ((FALSE == region) || (TRUE == mu_ctrly_occurred) || (TRUE == mu_ctrlc_occurred))
-				break;
-		}
-		if (region && mu_star_specified)
-		{
-                        gbldir_mstr.addr = GTM_GBLDIR;
-                        gbldir_mstr.len = SIZEOF(GTM_GBLDIR) - 1;
-                        tran_name = get_name(&gbldir_mstr);
-			memcpy(replpool_id.gtmgbldir, tran_name->addr, tran_name->len);
-                        replpool_id.gtmgbldir[tran_name->len] = '\0';
-			full_len = tran_name->len;
-			if (!get_full_path(replpool_id.gtmgbldir, tran_name->len,
-					replpool_id.gtmgbldir, &full_len, SIZEOF(replpool_id.gtmgbldir), &status))
-			{
-				util_out_print("Failed to get full path for gtmgbldir, !AD", TRUE, tran_name->len, tran_name->addr);
-				gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				exit_status = ERR_MUNOTALLSEC;
-			} else
-			{
-				tran_name->len = full_len;	/* since on vax, mstr.len is a 'short' */
-				set_gdid_from_file((gd_id_ptr_t)&file_id, replpool_id.gtmgbldir, tran_name->len);
-				global_name("GT$P", &file_id, res_name); /* P - Stands for Journal Pool */
-				res_name[res_name[0] + 1] = '\0';
-				strcpy(replpool_id.repl_pool_key, &res_name[1]);
-				replpool_id.pool_type = JNLPOOL_SEGMENT;
-				sgmnt_found = FALSE;
-				if (mu_rndwn_replpool(&replpool_id, FALSE, &sgmnt_found) && sgmnt_found)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_MUJPOOLRNDWNSUC, 4, res_name[0], &res_name[1],
-							tran_name->len, replpool_id.gtmgbldir);
-				else if (sgmnt_found)
-				{
-					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_MUJPOOLRNDWNFL, 4, res_name[0], &res_name[1],
-							tran_name->len, replpool_id.gtmgbldir);
-					exit_status = ERR_MUNOTALLSEC;
-				}
-				global_name("GT$R", &file_id, res_name); /* R - Stands for Recv Pool */
-				res_name[res_name[0] + 1] = '\0';
-				strcpy(replpool_id.repl_pool_key, &res_name[1]);
-				replpool_id.pool_type = RECVPOOL_SEGMENT;
-				sgmnt_found = FALSE;
-				if (mu_rndwn_replpool(&replpool_id, FALSE, &sgmnt_found) && sgmnt_found)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_MURPOOLRNDWNSUC, 4, res_name[0], &res_name[1],
-							tran_name->len, replpool_id.gtmgbldir);
-				else if (sgmnt_found)
-				{
-					gtm_putmsg_csa(CSA_ARG(NULL) VARLSTCNT(6) ERR_MURPOOLRNDWNFL, 4, res_name[0], &res_name[1],
-							tran_name->len, replpool_id.gtmgbldir);
-					exit_status = ERR_MUNOTALLSEC;
-				}
-
-			}
-		}
-	}
-	mupip_exit(exit_status);
-}
diff --git a/sr_vvms/mupip_set_file.c b/sr_vvms/mupip_set_file.c
deleted file mode 100644
index 62f57b4..0000000
--- a/sr_vvms/mupip_set_file.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <climsgdef.h>
-#include <descrip.h>
-#include <fab.h>
-#include <iodef.h>
-#include <lckdef.h>
-#include <psldef.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <syidef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "cli.h"
-#include "efn.h"
-#include "gdsblk.h"
-#include "iosp.h"
-#include "mupipbckup.h"
-#include "vmsdtype.h"
-#include "gdscc.h"
-#include "gdskill.h"
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "timers.h"
-#include "gt_timer.h"
-#include "util.h"
-#include "mupip_set.h"
-#include "locks.h"
-#include "mu_rndwn_file.h"
-#include "dbfilop.h"
-#include "mupip_exit.h"
-#include "dbcx_ref.h"
-#include "mu_gv_cur_reg_init.h"
-#include "gvcst_protos.h"	/* for gvcst_init prototype */
-#include "gtmmsg.h"
-#include "wcs_flu.h"
-#include "gds_rundown.h"
-#include "change_reg.h"
-#include "desired_db_format_set.h"
-
-GBLREF tp_region	*grlist;
-GBLREF gd_region	*gv_cur_region;
-GBLREF bool		region;
-GBLREF sgmnt_data_ptr_t	cs_data;
-GBLREF sgmnt_addrs	*cs_addrs;
-LITREF char		*gtm_dbversion_table[];
-
-error_def(ERR_DBFILERR);
-error_def(ERR_DBOPNERR);
-error_def(ERR_DBRDERR);
-error_def(ERR_DBRDONLY);
-error_def(ERR_MUNOACTION);
-error_def(ERR_MUPCLIERR);
-error_def(ERR_MUSTANDALONE);
-error_def(ERR_WCERRNOTCHG);
-error_def(ERR_WCWRNNOTCHG);
-
-#define	CHANGE_FLUSH_TIME_IF_NEEDED(csd)									\
-{														\
-	if (flush_time_specified)										\
-	{	/* Do not invoke change_fhead_timer("FLUSH_TIME"...) more than once in this function		\
-		 * as that uses a function CLI$GET_VALUE which returns CLI$_ABSENT if called with the		\
-		 * same qualifier more than once. To work around this, invoke "change_fhead_timer" once		\
-		 * (for the first region in this loop) and store the "flush_time" that it calculated		\
-		 * into a temporary variable that is used for the other regions. The only thing that might	\
-		 * affect this is if a mix of regions with BG and MM access methods is specified in this	\
-		 * region list. That might present a problem since BG and MM have different default times	\
-		 * (TIM_FLU_MOD_BG and TIM_FLU_MOD_MM). But default time is used only if "NOFLUSH_TIME"		\
-		 * is specified which is not possible since FLUSH_TIME is NON-NEGATABLE.			\
-		 */												\
-		assert(SIZEOF(save_flush_time) == SIZEOF(csd->flush_time));					\
-		if (!flush_time_processed)									\
-		{												\
-			change_fhead_timer("FLUSH_TIME", csd->flush_time,					\
-					   (dba_bg == (n_dba == access ? csd->acc_meth : access)		\
-					    ? TIM_FLU_MOD_BG : TIM_FLU_MOD_MM), FALSE);				\
-			flush_time_processed = TRUE;								\
-			save_flush_time[0] = csd->flush_time[0];						\
-			save_flush_time[1] = csd->flush_time[1];						\
-		} else												\
-		{												\
-			csd->flush_time[0] = save_flush_time[0];						\
-			csd->flush_time[1] = save_flush_time[1];						\
-		}												\
-	}													\
-}
-
-int4 mupip_set_file(int db_fn_len, char *db_fn)
-{
-	boolean_t		bypass_partial_recov, need_standalone = FALSE, flush_time_specified, flush_time_processed;
-	char			exit_status, *command = "MUPIP SET VERSION";
-	enum db_acc_method	access;
-	enum db_ver		desired_dbver;
-	file_control		*fc;
-	int			defer_status, new_extn_count, new_lock_space, new_wait_disk, new_wc_size,
-				reserved_bytes, size, temp_new_wc_size, wait_disk_status, new_mutex_space;
-	sgmnt_addrs		*csa;
-	sgmnt_data		*sd, *sd1;
-	short			new_defer_time;
-	tp_region		*rptr, single;
-	uint4			space_available, space_needed, status, save_flush_time[2];
-	int4			status1;
-	vms_gds_info		*gds_info;
-
-	$DESCRIPTOR(mm_qualifier,"MM");
-	$DESCRIPTOR(bg_qualifier,"BG");
-	$DESCRIPTOR(access_qualifier, "ACCESS_METHOD");
-	$DESCRIPTOR(dbver_v4, "V4");
-	$DESCRIPTOR(dbver_v6, "V6");
-	$DESCRIPTOR(dbver_qualifier, "VERSION");
-
-	exit_status = EXIT_NRM;
-	bypass_partial_recov = cli_present("PARTIAL_RECOV_BYPASS") == CLI_PRESENT;
-	if (bypass_partial_recov)
-		need_standalone = TRUE;
-	if (CLI_PRESENT == (wait_disk_status = cli_present("WAIT_DISK")))
-	{
-		if (!cli_get_int("WAIT_DISK", &new_wait_disk))
-		{
-			util_out_print("Error getting WAIT_DISK qualifier value", TRUE);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		need_standalone = TRUE;
-	}
-	flush_time_specified = (CLI_PRESENT == cli_present("FLUSH_TIME")) ? TRUE : FALSE;
-	flush_time_processed = FALSE;
-	if (CLI_PRESENT == (defer_status = cli_present("DEFER_TIME")))
-	{
-		if (!cli_get_num("DEFER_TIME", &new_defer_time))
-		{
-			util_out_print("Error getting DEFER_TIME qualifier value", TRUE);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		if (-1 > new_defer_time)
-		{
-			util_out_print("DEFER_TIME cannot take negative values other than -1", TRUE);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		need_standalone = TRUE;
-	} else
-		defer_status = 0;
-	if (cli_get_int("GLOBAL_BUFFERS", &new_wc_size))
-	{
-		if (new_wc_size > WC_MAX_BUFFS)
-		{
-			util_out_print("!UL too large, maximum cache buffers allowed is !UL",TRUE,new_wc_size,WC_MAX_BUFFS);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		if (new_wc_size < WC_MIN_BUFFS)
-		{
-			util_out_print("!UL too small, minimum cache buffers allowed is !UL",TRUE,new_wc_size,WC_MIN_BUFFS);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		need_standalone = TRUE;
-	} else
-		new_wc_size = 0;
-	/* EXTENSION_COUNT does not require standalone access and hence need_standalone will not be set to TRUE for this. */
-	if (cli_get_int("EXTENSION_COUNT", &new_extn_count))
-	{
-		if (new_extn_count > MAX_EXTN_COUNT)
-		{
-			util_out_print("!UL too large, maximum extension count allowed is !UL",TRUE,new_extn_count,MAX_EXTN_COUNT);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		if (new_extn_count < MIN_EXTN_COUNT)
-		{
-			util_out_print("!UL too small, minimum extension count allowed is !UL",TRUE,new_extn_count,MIN_EXTN_COUNT);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-	} else
-		new_extn_count = 0;
-	if (cli_get_int("LOCK_SPACE", &new_lock_space))
-	{
-		if (new_lock_space > MAX_LOCK_SPACE)
-		{
-			util_out_print("!UL too large, maximum lock space allowed is !UL",TRUE,new_lock_space, MAX_LOCK_SPACE);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		if (new_lock_space < MIN_LOCK_SPACE)
-		{
-			util_out_print("!UL too small, minimum lock space allowed is !UL",TRUE,new_lock_space, MIN_LOCK_SPACE);
-			mupip_exit(ERR_MUPCLIERR);
-		}
-		need_standalone = TRUE;
-	} else
-		new_lock_space = 0;
-	if (cli_get_int("MUTEX_SLOTS", &new_mutex_space))
-	{
-		if (new_mutex_space > MAX_CRIT_ENTRY)
-		{
-			util_out_print("!UL too large, maximum number of mutex slots allowed is !UL", TRUE,
-					new_mutex_space, MAX_CRIT_ENTRY);
-			return (int4)ERR_WCWRNNOTCHG;
-		} else if (new_mutex_space < MIN_CRIT_ENTRY)
-		{
-			util_out_print("!UL too small, minimum number of mutex slots allowed is !UL", TRUE,
-					new_mutex_space, MIN_CRIT_ENTRY);
-			return (int4)ERR_WCWRNNOTCHG;
-		}
-		need_standalone = TRUE;
-	} else
-		new_mutex_space = 0;
-	if (0 == cli_get_num("RESERVED_BYTES" ,&reserved_bytes))
-		reserved_bytes = -1;
-	else
-		need_standalone = TRUE;
-	if (CLI$_ABSENT != cli$present(&access_qualifier))
-	{
-		if (CLI$_PRESENT == cli$present(&mm_qualifier))
-			access = dba_mm;
-		else  if (CLI$_PRESENT == cli$present(&bg_qualifier))
-			access = dba_bg;
-		else
-			/* ??? */
-			mupip_exit(ERR_MUPCLIERR);
-		need_standalone = TRUE;
-	} else
-		access = n_dba;		/* really want to keep current method, which has not yet been read */
-	if (CLI$_ABSENT != cli$present(&dbver_qualifier))
-	{
-		assert(!need_standalone);
-		if (CLI$_PRESENT == cli$present(&dbver_v4))
-			desired_dbver = GDSV4;
-		else  if (CLI$_PRESENT == cli$present(&dbver_v6))
-			desired_dbver = GDSV6;
-		else
-			GTMASSERT;	/* CLI should prevent us ever getting here */
-	} else
-		desired_dbver = GDSVLAST;	/* really want to keep current format, which has not yet been read */
-	if (region)
-		rptr = grlist;
-	else
-	{
-		rptr = &single;
-		memset(&single, 0, SIZEOF(single));
-		mu_gv_cur_reg_init();
-	}
-	sd = malloc(ROUND_UP(SIZEOF(sgmnt_data), DISK_BLOCK_SIZE));
-	for (;rptr;  rptr = rptr->fPtr)
-	{
-		if (region)
-		{
-			if (dba_usr == rptr->reg->dyn.addr->acc_meth)
-			{
-				util_out_print("!/Region !AD is not a GDS access type",TRUE, REG_LEN_STR(rptr->reg));
-				exit_status |= EXIT_WRN;
-				continue;
-			}
-			if (!mupfndfil(rptr->reg, NULL))
-			{
-				exit_status |= EXIT_ERR;
-				continue;
-			}
-			gv_cur_region = rptr->reg;
-			if (NULL == gv_cur_region->dyn.addr->file_cntl)
-			{
-				gv_cur_region->dyn.addr->acc_meth = dba_bg;
-				gv_cur_region->dyn.addr->file_cntl =
-					(file_control *)malloc(SIZEOF(*gv_cur_region->dyn.addr->file_cntl));
-				memset(gv_cur_region->dyn.addr->file_cntl, 0, SIZEOF(*gv_cur_region->dyn.addr->file_cntl));
-				gv_cur_region->dyn.addr->file_cntl->file_type = dba_bg;
-				gds_info =
-				gv_cur_region->dyn.addr->file_cntl->file_info = (GDS_INFO *)malloc(SIZEOF(GDS_INFO));
-				memset(gds_info, 0, SIZEOF(GDS_INFO));
-			}
-		} else
-		{
-			gv_cur_region->dyn.addr->fname_len = db_fn_len;
-			memcpy(gv_cur_region->dyn.addr->fname, db_fn, db_fn_len);
-		}
-		if (!need_standalone)
-		{
-			gvcst_init(gv_cur_region);
-			change_reg();
-			if (gv_cur_region->read_only)
-			{
-				gtm_putmsg(VARLSTCNT(4) ERR_DBRDONLY, 2, DB_LEN_STR(gv_cur_region));
-				exit_status |= EXIT_ERR;
-				gds_rundown();
-				continue;
-			}
-			grab_crit(gv_cur_region);
-			status = EXIT_NRM;
-			CHANGE_FLUSH_TIME_IF_NEEDED(cs_data);
-			if (GDSVLAST != desired_dbver)
-			{
-				status1 = desired_db_format_set(gv_cur_region, desired_dbver, command);
-				if (SS_NORMAL != status1)
-				{	/* "desired_db_format_set" would have printed appropriate error messages */
-					if (ERR_MUNOACTION != status1)
-					{	/* real error occurred while setting the db format. skip to next region */
-						status = EXIT_ERR;
-					}
-				}
-			}
-			if (EXIT_NRM == status)
-			{
-				if (new_extn_count)
-					cs_data->extension_size = new_extn_count;
-				wcs_flu(WCSFLU_FLUSH_HDR);
-				if (new_extn_count)
-					util_out_print("Database file !AD now has extension count !UL",
-							TRUE, db_fn_len, db_fn, cs_data->extension_size);
-				if (GDSVLAST != desired_dbver)
-					util_out_print("Database file !AD now has desired DB format !AD", TRUE,
-						db_fn_len, db_fn, LEN_AND_STR(gtm_dbversion_table[cs_data->desired_db_format]));
-			} else
-				exit_status |= status;
-			rel_crit(gv_cur_region);
-			gds_rundown();
-		} else
-		{	/* Following part needs standalone access */
-			assert(GDSVLAST == desired_dbver);
-			if (!mu_rndwn_file(TRUE))
-			{
-				gtm_putmsg(VARLSTCNT(4) ERR_MUSTANDALONE, 2, DB_LEN_STR(gv_cur_region));
-				exit_status |= EXIT_ERR;
-				continue;
-			}
-			gds_info = FILE_INFO(gv_cur_region);
-			fc = gv_cur_region->dyn.addr->file_cntl;
-			fc->op = FC_OPEN;
-			fc->file_type = dba_bg;
-			status = dbfilop(fc);
-			if (SS$_NORMAL != status)
-			{
-				gtm_putmsg(VARLSTCNT(6) ERR_DBOPNERR, 2,
-					DB_LEN_STR(gv_cur_region), status, gds_info->fab->fab$l_stv);
-				exit_status |= EXIT_ERR;
-				continue;
-			}
-			if (gv_cur_region->read_only)
-			{
-				gtm_putmsg(VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region), RMS$_PRV);
-				exit_status |= EXIT_ERR;
-				sys$dassgn(gds_info->fab->fab$l_stv);
-				continue;
-			}
-			fc->op = FC_READ;
-			fc->op_buff = sd;
-			fc->op_len = SGMNT_HDR_LEN;
-			fc->op_pos = 1;
-			status = dbfilop(fc);
-			if (SS_NORMAL != status)
-			{
-				gtm_putmsg(VARLSTCNT(6) ERR_DBRDERR, 2,
-					DB_LEN_STR(gv_cur_region), status, gds_info->fab->fab$l_stv);
-				exit_status |= EXIT_ERR;
-				sys$dassgn(gds_info->fab->fab$l_stv);
-				continue;
-			}
-			if (-1 != reserved_bytes)
-			{
-				if (reserved_bytes < 0 || (reserved_bytes > MAX_RESERVE_B(sd)))
-				{
-					util_out_print("!UL too large, maximum reserved bytes allowed is !UL for database file !AD",
-							TRUE, reserved_bytes, MAX_RESERVE_B(sd), gv_cur_region->dyn.addr->fname_len,
-							gv_cur_region->dyn.addr->fname);
-					exit_status |= EXIT_WRN;
-				} else
-					sd->reserved_bytes = reserved_bytes;
-			}
-			CHANGE_FLUSH_TIME_IF_NEEDED(sd);
-			if (new_extn_count)
-				sd->extension_size = new_extn_count;
-			if (CLI_PRESENT == wait_disk_status)
-				sd->wait_disk_space = new_wait_disk;
-			if (new_lock_space)
-				sd->lock_space_size = new_lock_space * OS_PAGELET_SIZE;
-			if (new_mutex_space)
-				NUM_CRIT_ENTRY(sd) = new_mutex_space;
-			if (bypass_partial_recov)
-				sd->file_corrupt = FALSE;
-			if (dba_mm == (n_dba == access ? sd->acc_meth : access))
-				/* always recalculate; n_dba is a proxy for no change */
-			{
-				if (CLI_NEGATED == defer_status)
-					sd->defer_time = 1;
-					/* default defer_time = 1 => defer time is 1*flush_time[0] */
-				else  if (CLI_PRESENT == defer_status)
-				{
-					sd->defer_time = new_defer_time;
-				}
-
-				if (dba_bg == sd->acc_meth)
-				{
-					if (FALSE == sd->unbacked_cache)
-						sd->free_space += (sd->n_bts + sd->bt_buckets + 1) * SIZEOF(bt_rec);
-#ifdef GT_CX_DEF
-					sd->free_space += sd->lock_space_size;
-#endif
-				}
-				sd->n_bts = sd->bt_buckets = 0;
-				if (n_dba != access)		/* n_dba is a proxy for no change */
-				{
-					if (dba_mm == access)
-					{
-						if (0 != sd->blks_to_upgrd)
-						{	/* changing to MM and blocks to upgrade */
-							util_out_print("MM access method cannot be set if there are blocks"
-								       " to upgrade", TRUE);
-							util_out_print("Database file !AD not changed", TRUE,
-								       DB_LEN_STR(gv_cur_region));
-							exit_status |= EXIT_WRN;
-							continue;
-						} else if (GDSVCURR != sd->desired_db_format)
-						{	/* changing to MM and DB not current format */
-							util_out_print("MM access method cannot be set in DB compatibility mode",
-								       TRUE);
-							util_out_print("Database file !AD not changed", TRUE,
-								       DB_LEN_STR(gv_cur_region));
-							exit_status |= EXIT_WRN;
-							continue;
-						} else if (JNL_ENABLED(sd) && (sd->jnl_before_image))
-						{	/* changing to MM and BEFORE image journaling set */
-							util_out_print("MM access cannot be used with BEFORE image journaling",
-								       TRUE);
-							util_out_print("Database file !AD not changed", TRUE,
-								       DB_LEN_STR(gv_cur_region));
-							exit_status |= EXIT_WRN;
-							continue;
-						} else
-						{
-							if (!JNL_ENABLED(sd))
-								sd->jnl_before_image = 0; /* default to NO_BEFORE journal imaging */
-							sd->acc_meth = access;
-						}
-					}
-				}
-				sd->clustered = FALSE;
-			} else
-			{
-				if (defer_status)
-				{
-					util_out_print("DEFER cannot be specified with BG access method, file - !AD not changed",
-							TRUE, DB_LEN_STR(gv_cur_region));
-					exit_status |= EXIT_WRN;
-					continue;
-				}
-
-				if (dba_mm == sd->acc_meth)
-					space_available = sd->free_space;
-				else
-				{
-					space_available = sd->free_space + sd->lock_space_size;
-					if (FALSE == sd->unbacked_cache)
-						space_available += ((sd->n_bts + sd->bt_buckets + 1) * SIZEOF(bt_rec));
-				}
-
-				temp_new_wc_size = new_wc_size;
-				if (0 == new_wc_size)
-					if (sd->n_bts)
-						temp_new_wc_size = sd->n_bts;
-					else
-						temp_new_wc_size = WC_DEF_BUFFS;
-				if (sd->clustered)
-				{
-				/* this code needs to be maintained to account for the new bt allocation algorithm - rprp */
-					space_needed = (temp_new_wc_size + getprime(temp_new_wc_size) + 1) * SIZEOF(bt_rec)
-						+ sd->lock_space_size;
-					if (space_needed > space_available)
-					{
-						if (space_available < (sd->lock_space_size +
-							(WC_MIN_BUFFS + getprime(WC_MIN_BUFFS) + 1) * SIZEOF(bt_rec)))
-						{
-							util_out_print("!/File !AD does not have enough space to be converted to BG"
-									, TRUE, DB_LEN_STR(gv_cur_region));
-						} else
-						{
-							util_out_print("!/File !AD does not have enough space for !UL cache "
-									"records." , TRUE, DB_LEN_STR(gv_cur_region),
-									temp_new_wc_size);
-							util_out_print("The maximum it will support is !UL",TRUE,
-									sd->n_bts + (sd->free_space / (2 * SIZEOF(bt_rec))));
-						}
-						exit_status |= EXIT_WRN;
-					} else
-						sd->free_space = space_available - space_needed;
-				} else
-				{
-					sd->unbacked_cache = TRUE;
-#ifdef GT_CX_DEF
-					sd->free_space = space_available - sd->lock_space_size;
-#endif
-				}
-
-				/* On Unix, following block was moved out of this 'if' check, as part of 'targetted msync' changes,
-			   	 * which is not relevant in VMS context */
-				sd->n_bts = BT_FACTOR(temp_new_wc_size);
-				sd->bt_buckets = getprime(sd->n_bts);
-				sd->n_wrt_per_flu = 7;
-				sd->flush_trigger = FLUSH_FACTOR(sd->n_bts);
-				if (n_dba != access)		/* n_dba is a proxy for no change */
-					sd->acc_meth = access;
-				if (sd->clustered)
-				{
-					size = LOCK_BLOCK(sd) + ROUND_UP(sd->lock_space_size, DISK_BLOCK_SIZE);
-					sd1 = malloc(size);
-					memcpy(sd1,sd,SIZEOF(sgmnt_data));
-					status = dbcx_ref(sd1, gds_info->fab->fab$l_stv);
-					if (0 == (status & 1))
-					{
-						if (SS$_NORMAL != gtm_deq(gds_info->file_cntl_lsb.lockid, NULL, PSL$C_USER, 0))
-							GTMASSERT;
-						gds_info->file_cntl_lsb.lockid = 0;
-						sys$dassgn(gds_info->fab->fab$l_stv);
-						free(sd1);
-						gtm_putmsg(VARLSTCNT(6) ERR_DBFILERR, 2,
-							DB_LEN_STR(gv_cur_region), status, gds_info->fab->fab$l_stv);
-						exit_status |= EXIT_ERR;
-						continue;
-					}
-					free(sd1);
-				}
-			}
-			if (FALSE == sd->clustered)
-			{
-				fc->op = FC_WRITE;
-				fc->op_buff = sd;
-				fc->op_len = SGMNT_HDR_LEN;
-				fc->op_pos = 1;
-				status = dbfilop(fc);
-				if (SS_NORMAL != status)
-				{
-					gtm_putmsg(VARLSTCNT(6) ERR_DBFILERR, 2,
-						DB_LEN_STR(gv_cur_region), status, gds_info->fab->fab$l_stv);
-					exit_status |= EXIT_ERR;
-				}
-			}
-			status = gtm_deq(gds_info->file_cntl_lsb.lockid, NULL, PSL$C_USER, 0);
-			assert(SS$_NORMAL == status);
-			gds_info->file_cntl_lsb.lockid = 0;
-			sys$dassgn(gds_info->fab->fab$l_stv);
-			util_out_print("!/File !AD updated.", TRUE, DB_LEN_STR(gv_cur_region));
-		} /* end of else part if (!need_standalone) */
-	}
-	free(sd);
-	assert(!(exit_status & EXIT_INF));
-	if (exit_status & EXIT_ERR)
-		mupip_exit(ERR_WCERRNOTCHG);
-	else if (exit_status & EXIT_WRN)
-		mupip_exit(ERR_WCWRNNOTCHG);
-	return SS_NORMAL; /* for prototype compatibility with Unix */
-}
diff --git a/sr_vvms/mupip_set_jnlfile.c b/sr_vvms/mupip_set_jnlfile.c
deleted file mode 100644
index f39b2cc..0000000
--- a/sr_vvms/mupip_set_jnlfile.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_fcntl.h"
-#include <unistd.h>
-#include <errno.h>
-#include "gtm_string.h"
-
-#include <fab.h>
-#include <iodef.h>
-#include <nam.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "cli.h"
-#include "iosp.h"
-#include "jnl.h"
-#include "mupip_set.h"
-#include "mupint.h"
-#include "eintr_wrappers.h"
-#include "util.h"
-#include "gtm_file_stat.h"
-#include "gtmmsg.h"
-
-#define DB_EXT_DEF	".DAT"
-
-int4 mupip_set_jnlfile(char *jnl_fname, int jnl_fn_len)
-{
-	int4		jnl_len, temp_jnl_fn_len;
-	uint4		status;
-	char		hdr_buffer[SIZEOF(jnl_file_header)];
-	char		es_buffer[MAX_FN_LEN], name_buffer[MAX_FN_LEN], temp_jnl_fn[MAX_FN_LEN];
-	jnl_file_header	*header;
-	struct FAB	fab;
-	struct NAM	nam;
-	short		iosb[4];
-	mstr 		dbfile, def;
-
-	error_def(ERR_JNLFILNOTCHG);
-
-	jnl_len = strlen(jnl_fname);
-	temp_jnl_fn_len = jnl_len;
-        memcpy(temp_jnl_fn, jnl_fname, jnl_len);
-	temp_jnl_fn[jnl_len] = '\0';
-	if (!get_full_path(temp_jnl_fn, temp_jnl_fn_len, jnl_fname, &jnl_len, jnl_fn_len, &status))
-	{
-		util_out_print("!/Unable to get full path file !AD", TRUE, temp_jnl_fn_len, temp_jnl_fn);
-		gtm_putmsg(VARLSTCNT(1) status);
-		return((int4)ERR_JNLFILNOTCHG);
-	}
-	nam = cc$rms_nam;
-	nam.nam$l_rsa = name_buffer;
-	nam.nam$b_rss = SIZEOF(name_buffer);
-	nam.nam$l_esa = es_buffer;
-	nam.nam$b_ess = SIZEOF(es_buffer);
-	fab = cc$rms_fab;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fna = jnl_fname;
-	fab.fab$b_fns = jnl_len;
-	fab.fab$l_fop = FAB$M_UFO | FAB$M_MXV | FAB$M_CBT;
-	fab.fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_BIO;
-	fab.fab$l_dna = JNL_EXT_DEF;
-	fab.fab$b_dns = SIZEOF(JNL_EXT_DEF) - 1;
-	if ((status = sys$open(&fab))!= RMS$_NORMAL)
-	{
-		util_out_print("Error opening journal file !AD", TRUE, jnl_len, jnl_fname);
-		if (0 != fab.fab$l_stv)
-			gtm_putmsg(VARLSTCNT(3) status, 0, (uint4)fab.fab$l_stv);
-		else
-			gtm_putmsg(VARLSTCNT(1) status);
-		return((int4)ERR_JNLFILNOTCHG);
-	}
-	/* Read Jnl Header */
-	status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_READVBLK, &iosb[0], 0, 0,
-					(sm_uc_ptr_t)hdr_buffer, SIZEOF(hdr_buffer), 1, 0, 0, 0);
-	if (status == SS$_NORMAL)
-		status = iosb[0];
-	if (status != SS$_NORMAL)
-	{
-		util_out_print("Error reading file !AD", TRUE, jnl_len, jnl_fname);
-		gtm_putmsg(VARLSTCNT(1) status);
-		return((int4)ERR_JNLFILNOTCHG);
-	}
-	header = (jnl_file_header *)hdr_buffer;
-        /* check if database is existing, warn if not  */
-	dbfile.addr = header->data_file_name;
-	dbfile.len = header->data_file_name_length;
-	def.addr = DB_EXT_DEF;
-	def.len = SIZEOF(DB_EXT_DEF)-1;
-	if (FILE_PRESENT != gtm_file_stat(&dbfile, &def, NULL, FALSE, &status))
-	{
-                util_out_print("WARNING : Data base file !AD for this journal does not exist, proceeding",
-                                TRUE, header->data_file_name_length, header->data_file_name);
-		gtm_putmsg(VARLSTCNT(1) status);
-	}
-	/* Processing */
-	if(SS_NORMAL != (status = mupip_set_jnlfile_aux(header, jnl_fname)))
-		return status;
-	/* Write Back Jnl Header */
-	status = sys$qiow(EFN$C_ENF, fab.fab$l_stv, IO$_WRITEVBLK, &iosb[0], 0, 0,
-					(sm_uc_ptr_t)hdr_buffer, SIZEOF(hdr_buffer), 1, 0, 0, 0);
-	if (status == SS$_NORMAL)
-		status = iosb[0];
-	if (status != SS$_NORMAL)
-	{
-		util_out_print("Error writing file !AD", TRUE, jnl_len, jnl_fname);
-		gtm_putmsg(VARLSTCNT(1) status);
-		return((int4)ERR_JNLFILNOTCHG);
-	}
-	/* Close Jnl File */
-	if(SS$_NORMAL != (status = sys$dassgn(fab.fab$l_stv)))
-	{
-		util_out_print("Error closing journal file !AD", jnl_len, jnl_fname);
-		gtm_putmsg(VARLSTCNT(1) status);
-		return((int4)ERR_JNLFILNOTCHG);
-	}
-
-	return SS_NORMAL;
-}
diff --git a/sr_vvms/muprecsp.h b/sr_vvms/muprecsp.h
deleted file mode 100644
index 0bce9d5..0000000
--- a/sr_vvms/muprecsp.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MUPRECSP_H_INCLUDED
-#define MUPRECSP_H_INCLUDED
-
-#define EXT_MJF		".MJF"
-#define EXT_BROKEN	".BROKEN"
-#define EXT_LOST	".LOST"
-#define FN_LEN_EXTR_FILE_INFO(file_info)	file_info->fab$b_fns
-#define FN_EXTR_FILE_INFO(file_info)		file_info->fab$l_fna
-
-#endif
diff --git a/sr_vvms/mur_cre_file_extfmt.c b/sr_vvms/mur_cre_file_extfmt.c
deleted file mode 100644
index 16ea33e..0000000
--- a/sr_vvms/mur_cre_file_extfmt.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <fab.h>
-#include <rms.h>
-#include <iodef.h>
-#include <descrip.h>
-
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "buddy_list.h"
-#include "jnl.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "gtmio.h"
-#include "gtmmsg.h"
-#include "gtm_rename.h"
-
-GBLREF 	mur_gbls_t	murgbl;
-GBLREF	mur_opt_struct	mur_options;
-
-/* VMS does not need rename if file name matches ??? */
-int4 mur_cre_file_extfmt(jnl_ctl_list *jctl, int recstat)
-{
-	fi_type			*file_info;
-	struct  FAB             *fab_ptr;
-	struct  NAM             nam;
-	uint4			status;
-	int			base_len, rename_fn_len, fn_exten_size;
-	char                    fn_buffer[MAX_FN_LEN], *ptr;
-	static readonly	char 	*fn_exten[] = {EXT_MJF, EXT_BROKEN, EXT_LOST};
-	static readonly	char 	*ext_file_type[] = {STR_JNLEXTR, STR_BRKNEXTR, STR_LOSTEXTR};
-
-	error_def(ERR_FILENOTCREATE);
-	error_def(ERR_FILEPARSE);
-	error_def(ERR_FILECREATE);
-	error_def(ERR_TEXT);
-
-	assert(GOOD_TN == recstat || BROKEN_TN == recstat || LOST_TN == recstat);
-	assert(0 == GOOD_TN);
-	assert(1 == BROKEN_TN);
-	assert(2 == LOST_TN);
-	assert(GOOD_TN != recstat || mur_options.extr[GOOD_TN]);
-	ptr = &jctl->jnl_fn[jctl->jnl_fn_len];
-	while (DOT != *ptr)	/* we know journal file name alway has a DOT */
-		ptr--;
-	base_len = ptr - (char *)&jctl->jnl_fn[0];
-	file_info = murgbl.file_info[recstat] = (void *)malloc(SIZEOF(fi_type));
-	fab_ptr = file_info->fab = (struct FAB *)malloc(SIZEOF(struct FAB));
-	*fab_ptr = cc$rms_fab;
-	fn_exten_size = strlen(fn_exten[recstat]);
-	if (0 == mur_options.extr_fn_len[recstat])
-	{
-		mur_options.extr_fn[recstat] = malloc(MAX_FN_LEN);
-		mur_options.extr_fn_len[recstat] = base_len;
-		memcpy(mur_options.extr_fn[recstat], jctl->jnl_fn, base_len);
-		memcpy(mur_options.extr_fn[recstat] + base_len, fn_exten[recstat], fn_exten_size);
-		mur_options.extr_fn_len[recstat] += fn_exten_size;
-	}
-	if (RENAME_FAILED == rename_file_if_exists(mur_options.extr_fn[recstat], mur_options.extr_fn_len[recstat],
-		fn_buffer, &rename_fn_len, &status))
-		return status;
-	fab_ptr->fab$b_fns = mur_options.extr_fn_len[recstat];
-	fab_ptr->fab$l_fna = mur_options.extr_fn[recstat];
-	fab_ptr->fab$b_dns = fn_exten_size;
-	fab_ptr->fab$l_dna = fn_exten[recstat];
-	fab_ptr->fab$l_nam = &nam;
-	nam = cc$rms_nam;
-	nam.nam$b_ess = SIZEOF(fn_buffer);
-	nam.nam$l_esa = fn_buffer;
-	nam.nam$b_nop |= NAM$M_SYNCHK;
-	file_info->rab = (struct RAB *)malloc(SIZEOF(struct RAB));
-	*file_info->rab = cc$rms_rab;
-	file_info->rab->rab$l_fab = fab_ptr;
-	file_info->rab->rab$l_rop = RAB$M_WBH;
-	status = sys$parse(fab_ptr);
-	if (!(1 & status))
-	{
-		gtm_putmsg(VARLSTCNT(6) ERR_FILEPARSE, 2, fab_ptr->fab$b_fns, fab_ptr->fab$l_fna, status, fab_ptr->fab$l_stv);
-		return status;
-	}
-	if (0 != nam.nam$b_node)
-	{
-		gtm_putmsg(VARLSTCNT(8) ERR_FILEPARSE, 2, fab_ptr->fab$b_fns, fab_ptr->fab$l_fna, ERR_TEXT, 2,
-			LEN_AND_LIT("Cannot open lost transactions file across network"));
-		return ERR_FILEPARSE;
-	}
-	fab_ptr->fab$l_nam = NULL;
-	fab_ptr->fab$w_mrs = 32767;
-	fab_ptr->fab$b_rat = FAB$M_CR;
-	fab_ptr->fab$l_fop = FAB$M_CBT | FAB$M_MXV;
-	fab_ptr->fab$b_fac = FAB$M_PUT;
-	status = sys$create(fab_ptr);
-	if (1 & status)
-	{
-		status = sys$connect(file_info->rab);
-		if (!(1 & status))
-			sys$close(fab_ptr);	/* use sys$close() if FAB$M_UFO was not specified in fab$l_fop in open */
-	}
-	if (!(1 & status))
-	{
-		gtm_putmsg(VARLSTCNT(6) ERR_FILENOTCREATE, 2, fab_ptr->fab$b_fns, fab_ptr->fab$l_fna, status, fab_ptr->fab$l_stv);
-		return status;
-	}
-	/* Write file version info for the file created here. See C9B08-001729 */
-	if (!mur_options.detail)
-	{
-		MEMCPY_LIT(murgbl.extr_buff, JNL_EXTR_LABEL);
-		jnlext_write(file_info, murgbl.extr_buff, SIZEOF(JNL_EXTR_LABEL));
-	} else
-	{
-		MEMCPY_LIT(murgbl.extr_buff, JNL_DET_EXTR_LABEL);
-		jnlext_write(file_info, murgbl.extr_buff, SIZEOF(JNL_DET_EXTR_LABEL));
-	}
-	gtm_putmsg(VARLSTCNT(6) ERR_FILECREATE, 4, LEN_AND_STR(ext_file_type[recstat]), fab_ptr->fab$b_fns, fab_ptr->fab$l_fna);
-	return SS$_NORMAL;
-}
diff --git a/sr_vvms/mur_read_file_sp.c b/sr_vvms/mur_read_file_sp.c
deleted file mode 100644
index dd1baa9..0000000
--- a/sr_vvms/mur_read_file_sp.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2003, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include <rmsdef.h>
-#include <xab.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "min_max.h"
-#include "gtmio.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "iosb_disk.h"
-#include "buddy_list.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int4.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "mur_read_file.h"
-#include "util.h"
-#include "gtmmsg.h"
-#include "iosp.h"	/* for SS_NORMAL */
-
-
-error_def(ERR_PREMATEOF);
-
-GBLREF	mur_opt_struct	mur_options;
-
-static	void	mur_fread_fini(void)
-{
-	sys$wake(NULL, NULL);
-	return;
-}
-/****************************************************************************************
- * Function Name: mur_fread_start
- * Input: struct mur_buffer_desc * buff
- * Output : SS_NORMAL on successful
- *          error status on unsuccessful
- *This function starts an asynchrounous read in a given buffer
- ****************************************************************************************/
-
-uint4	mur_fread_start(jnl_ctl_list *jctl, mur_buff_desc_t *buff)
-{
-	assert(0 == buff->dskaddr % DISK_BLOCK_SIZE);
-	buff->blen = MIN(MUR_BUFF_SIZE, jctl->eof_addr - buff->dskaddr);
-	buff->rip_channel = jctl->channel;	/* store channel that issued the AIO in order to use later for sys$_cancel() */
-	assert(!buff->read_in_progress);
-	buff->read_in_progress = TRUE;
-	jctl->status = sys$qio(EFN$C_ENF, jctl->channel, IO$_READVBLK, &buff->iosb, mur_fread_fini, buff, buff->base,
-					buff->blen, (buff->dskaddr >> LOG2_DISK_BLOCK_SIZE) + 1, 0, 0, 0);
-	return jctl->status;
-}
-
-/************************************************************************************
- * Function name: mur_fread_wait
- * Input : struct mur_buffer_desc *buff
- * Output: SS_NORMAL on success
- *         error status on unsuccessful
- * Purpose: The purpose of this routine is to make sure that a previously issued asynchrounous
- *          read in a given  buffer has completed
- **************************************************************************************/
-uint4	mur_fread_wait(jnl_ctl_list *jctl, mur_buff_desc_t *buff)
-{
-	uint4	status;
-
-	assert(buff->read_in_progress);
-	buff->read_in_progress = FALSE;
-	/* sys$qio clears iosb when it begins execution */
-	while ((status = buff->iosb.cond) == 0)
-		sys$hiber();
-	return ((SS$_NORMAL == status || SS$_CANCEL == status || SS$_ABORT == status) ? SS_NORMAL : status);
-}
-/************************************************************************************************
- * Function Name: mur_fread_cancel
- * Input: buffer index
- * Output: SS_NORMAL on successful
- *         error status on unsuccessful
- * This function is used for cancelling asynchronous I/O issued for seq buffers
- * ************************************************************************************************/
-uint4 mur_fread_cancel(jnl_ctl_list *jctl)
-{
-	uint4			status, save_err;
-	int			index;
-	reg_ctl_list		*rctl;
-	mur_read_desc_t		*mur_desc;
-	mur_buff_desc_t		*seq_buff;
-
-	rctl = jctl->reg_ctl;
-	mur_desc = rctl->mur_desc;
-	/* At most one buffer can have read_in_progress, not both */
-	assert(!(mur_desc->seq_buff[0].read_in_progress && mur_desc->seq_buff[1].read_in_progress));
-	for (index = 0, save_err = SS_NORMAL; index < ARRAYSIZE(mur_desc->seq_buff); index++)
-	{
-		seq_buff = &mur_desc->seq_buff[index];
-		if (seq_buff->read_in_progress)
-		{
-			status = sys$cancel(seq_buff->rip_channel);
-			if (1 & status)
-			{
-				if (SS_NORMAL != (status = mur_fread_wait(jctl, seq_buff)))
-					save_err = status;
-			} else
-				save_err = status;
-			seq_buff->read_in_progress = FALSE;
-		}
-	}
-	/* Note that although the cancellation errored out for rip_channel, we are storing the status in jctl which need not
-	 * actually be the jctl corresponding to rip_channel
-	 */
-	return (jctl->status = ((SS_NORMAL == save_err) ? SS_NORMAL : save_err));
-}
-/**************************************************************************************
- * Function name: mur_fopen
- * Input: jnl_ctl_list *
- * Return value : TRUE or False
- * *************************************************************************************/
-boolean_t mur_fopen_sp(jnl_ctl_list *jctl)
-{
-	struct FAB	*fab;
-	struct XABFHC	*xab;
-	uint4		status;
-
-	error_def(ERR_JNLFILEOPNERR);
-
-	fab = jctl->fab = malloc(SIZEOF(*fab));
-	*fab = cc$rms_fab;
-	fab->fab$l_fna = jctl->jnl_fn;
-	fab->fab$b_fns = jctl->jnl_fn_len;
-	fab->fab$b_fac = FAB$M_BIO | FAB$M_GET;
-	fab->fab$l_fop = FAB$M_UFO;
-	fab->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_UPI;
-	xab = fab->fab$l_xab = malloc(SIZEOF(*xab));
-	*xab = cc$rms_xabfhc;
-	jctl->read_only = TRUE;
-	/* Both for recover and rollback open in read/write mode. We do not need to write in journal file
-	 * for mupip journal extract/show/verify or recover -forward.  So open it as read-only
-	 */
-	if (mur_options.update && !mur_options.forward)
-	{
-		fab->fab$b_fac |= FAB$M_PUT;
-		jctl->read_only = FALSE;
-	}
-	status = sys$open(fab);
-	if (SYSCALL_SUCCESS(status))
-	{
-		jctl->channel = fab->fab$l_stv; /* if $open() is succedded, fab$l_stv contains the I/O channel */
-		jctl->os_filesize = (xab->xab$l_ebk - 1) * DISK_BLOCK_SIZE;
-		return TRUE;
-	}
-	jctl->status = status;
-	jctl->status2 = fab->fab$l_stv;
-	jctl->channel = NOJNL;
-	gtm_putmsg(VARLSTCNT(6) ERR_JNLFILEOPNERR, 2, jctl->jnl_fn_len, jctl->jnl_fn, jctl->status, jctl->status2);
-	return FALSE;
-}
diff --git a/sr_vvms/murgetlst.c b/sr_vvms/murgetlst.c
deleted file mode 100644
index 1f9c3f5..0000000
--- a/sr_vvms/murgetlst.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <climsgdef.h>
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "murest.h"
-#include <descrip.h>
-
-GBLREF inc_list_struct in_files;
-
-void murgetlst(void)
-{
-static readonly $DESCRIPTOR(inc_ent,"INPUT_FILE");
-unsigned char buffer[MAX_FN_LEN + 1];
-$DESCRIPTOR(rn_buf,buffer);
-inc_list_struct *ptr;
-unsigned short ret_len;
-
-ptr = &in_files;
-for (rn_buf.dsc$w_length = MAX_FN_LEN + 1; CLI$GET_VALUE(&inc_ent, &rn_buf, &ret_len) != CLI$_ABSENT;
-		rn_buf.dsc$w_length = MAX_FN_LEN + 1)
-{
-	rn_buf.dsc$w_length = ret_len;
-	ptr->next = malloc(SIZEOF(inc_list_struct));
-	ptr = ptr->next;
-	ptr->next = 0;
-	ptr->input_file.len = ret_len;
-	ptr->input_file.addr = malloc(ret_len);
-	memcpy(ptr->input_file.addr, buffer, ret_len);
-}
-return;
-}
diff --git a/sr_vvms/mutexsp.h b/sr_vvms/mutexsp.h
deleted file mode 100644
index 0fcc616..0000000
--- a/sr_vvms/mutexsp.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MUTEXSP_H
-#define MUTEXSP_H
-
-/*
- * Initialize a mutex with n que entries. If crash is TRUE, then this is
- * a "crash" reinitialization;  otherwise it's a "clean" initialization.
- */
-void		mutex_init(mutex_struct_ptr_t addr, int4 n, bool crash);
-
-/* mutex_lockw - write access to mutex at addr */
-#if defined(__vax)
-enum 	cdb_sc 	mutex_lockw(mutex_struct_ptr_t addr, int4 crash_count, uint4 *write_lock);
-#define MUTEX_LOCKW(addr, seq, flag, spin_parms)	mutex_lockw(addr, seq, flag) /* ignore spin_parms on VAX */
-
-#elif defined(__alpha)
-enum 	cdb_sc 	mutex_lockw(mutex_struct_ptr_t addr, int4 crash_count, uint4 *write_lock, mutex_spin_parms_ptr_t spin_parms);
-#define MUTEX_LOCKW(addr, seq, flag, spin_parms)	mutex_lockw(addr, seq, flag, spin_parms)
-
-#else
-#error UNSUPPORTED_PLATFORM /* neither ALPHA VMS, nor VAX VMS */
-#endif
-
-/*
- * mutex_lockwim - write access to mutex at addr; if cannot lock,
- *                 immediately return cdb_sc_nolock
- */
-enum	cdb_sc	mutex_lockwim(mutex_struct_ptr_t addr, int4 crash_count, uint4 *write_lock);
-
-/*
- * mutex_lockw_ccp - write access to mutex at addr; if cannot lock,
- *                   queue CCP for "wakeup" and return
- *                   cdb_sc_nolock (do NOT hiber)
- */
-enum	cdb_sc	mutex_lockw_ccp(mutex_struct_ptr_t addr, int4 crash_count, uint4 *write_lock, void *super_crit);
-
-/* mutex_unlockw - unlock write access to mutex at addr */
-enum	cdb_sc	mutex_unlockw(mutex_struct_ptr_t addr, int4 crash_count, uint4 *write_lock);
-
-
-#endif /* MUTEXSP_H */
diff --git a/sr_vvms/mval2desc.c b/sr_vvms/mval2desc.c
deleted file mode 100644
index 4e41f06..0000000
--- a/sr_vvms/mval2desc.c
+++ /dev/null
@@ -1,255 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include "mvalconv.h"
-#include "mval2desc.h"
-
-error_def(ERR_ERRCALL);
-error_def(ERR_NUMOFLOW);
-error_def(ERR_SYSCALL);
-error_def(ERR_UNSDCLASS);
-error_def(ERR_UNSDDTYPE);
-
-void mval2desc(mval *v, struct dsc$descriptor *d)
-{
-	if ($is_desc64(d))
-		mval2desc_64(v, (struct dsc64$descriptor *)d);
-	else
-		mval2desc_32(v, d);
-}
-
-void mval2desc_32(mval *v, struct dsc$descriptor *d)
-{
-	int4		status;
-	int4		lx;
-	struct dsc$descriptor	src;
-	double		srcnm;
-
-	switch(d->dsc$b_class)
-	{
-		case DSC$K_CLASS_D:	/* dynamic string descriptor */
-			switch(d->dsc$b_dtype)
-			{
-				case DSC$K_DTYPE_T:
-					MV_FORCE_STR(v);
-					if (v->str.len != d->dsc$w_length)
-					{	/* re-allocate descriptor if length doesn't match */
-						if (d->dsc$a_pointer) /* free only if already allocated */
-						{
-							status = lib$sfree1_dd(d);
-							if (0 == (status & 1))
-								rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$SFREE1_DD"),
-									  CALLFROM, status);
-						}
-						status = lib$sget1_dd(&v->str.len, d);
-						if (0 == (status & 1))
-							rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$SGET1_DD"),
-								  CALLFROM, status);
-					}
-					memcpy(d->dsc$a_pointer, v->str.addr, v->str.len);
-					break;
-				default:
-					rts_error(VARLSTCNT(1) ERR_UNSDDTYPE);
-			}
-			break;
-		case DSC$K_CLASS_S:	/* scalar or string descriptor */
-			switch(d->dsc$b_dtype)
-			{
-				case DSC$K_DTYPE_T:
-					MV_FORCE_STR(v);
-					lx = v->str.len;
-					if (lx > d->dsc$w_length)
-						lx = d->dsc$w_length;
-					if (lx)
-						memcpy(d->dsc$a_pointer, v->str.addr, lx);
-					if (d->dsc$w_length > lx)
-						memset(d->dsc$a_pointer + lx, 0, d->dsc$w_length - lx);
-					break;
-				case DSC$K_DTYPE_G:
-					MV_FORCE_NUM(v);
-					*(double *)d->dsc$a_pointer = mval2double(v);
-					break;
-				case DSC$K_DTYPE_B:
-					lx = MV_FORCE_INT(v);
-					if (lx > 127 || lx < -127)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(char *)d->dsc$a_pointer = lx;
-					break;
-				case DSC$K_DTYPE_BU:
-					lx = MV_FORCE_INT(v);
-					if (lx > 255)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(unsigned char *)d->dsc$a_pointer = lx;
-					break;
-				case DSC$K_DTYPE_W:
-					lx = MV_FORCE_INT(v);
-					if (lx > 32767 || lx < -32767)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(short *)d->dsc$a_pointer = lx;
-					break;
-				case DSC$K_DTYPE_WU:
-					lx = MV_FORCE_INT(v);
-					if (lx > 65535)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(unsigned short *)d->dsc$a_pointer = lx;
-					break;
-				case DSC$K_DTYPE_LU:
-					/* This case has been separated from the group immediately below
-					   to get around a bug in lib$cvt_dx_dx introduced in OpenVMS AXP V6.1
-					   that returns LIB$_INTOVF for any LU value greater than 2147483647. */
-					MV_FORCE_NUM(v);
-					srcnm = mval2double(v);
-					if (srcnm > 4294967295.0)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(uint4 *)d->dsc$a_pointer = srcnm;
-					break;
-				case DSC$K_DTYPE_L:
-				case DSC$K_DTYPE_Q:
-				case DSC$K_DTYPE_QU:
-				case DSC$K_DTYPE_D:
-				case DSC$K_DTYPE_F:
-				case DSC$K_DTYPE_H:
-					MV_FORCE_NUM(v);
-					srcnm = mval2double(v);
-					src.dsc$w_length	= 0;
-					src.dsc$b_dtype		= DSC$K_DTYPE_G;
-					src.dsc$b_class		= DSC$K_CLASS_S;
-					src.dsc$a_pointer	= &srcnm;
-					status = lib$cvt_dx_dx(&src, d);
-					if (0 == (status & 1))
-						rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$CVT_DX_DX"),
-							  CALLFROM, status);
-					break;
-				default:
-					rts_error(VARLSTCNT(1) ERR_UNSDDTYPE);
-			}
-			break;
-		default:
-			rts_error(VARLSTCNT(7) ERR_UNSDCLASS, 5, ERR_ERRCALL, 3, CALLFROM);
-	}
-}
-
-void mval2desc_64(mval *v, struct dsc64$descriptor *d)
-{
-	int4		status;
-	int4		lx;
-	struct dsc64$descriptor	src;
-	double		srcnm;
-
-	switch(d->dsc64$b_class)
-	{
-
-		case DSC64$K_CLASS_D:	/* dynamic string descriptor */
-			switch(d->dsc64$b_dtype)
-			{
-				case DSC64$K_DTYPE_T:
-					MV_FORCE_STR(v);
-					if (v->str.len != d->dsc64$q_length)
-					{	/* re-allocate descriptor if length doesn't match */
-						if (d->dsc64$pq_pointer) /* free only if already allocated */
-						{
-							status = lib$sfree1_dd(d);
-							if (0 == (status & 1))
-								rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$SFREE1_DD"),
-									  CALLFROM, status);
-						}
-						d->dsc64$q_length = v->str.len;
-						status = lib$sget1_dd_64(&d->dsc64$q_length, d);
-						if (0 == (status & 1))
-							rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$SGET1_DD_64"),
-								  CALLFROM, status);
-					}
-					memcpy(d->dsc64$pq_pointer, v->str.addr, v->str.len);
-					break;
-				default:
-					rts_error(VARLSTCNT(1) ERR_UNSDDTYPE);
-			}
-			break;
-		case DSC64$K_CLASS_S:	/* scalar or string descriptor */
-			switch(d->dsc64$b_dtype)
-			{
-				case DSC64$K_DTYPE_T:
-					MV_FORCE_STR(v);
-					lx = v->str.len;
-					if (lx > d->dsc64$q_length)
-						lx = d->dsc64$q_length;
-					if (lx)
-						memcpy(d->dsc64$pq_pointer, v->str.addr, lx);
-					if (d->dsc64$q_length > lx)
-						memset(d->dsc64$pq_pointer + lx, 0, d->dsc64$q_length - lx);
-					break;
-				case DSC64$K_DTYPE_G:
-					MV_FORCE_NUM(v);
-					*(double *)d->dsc64$pq_pointer = mval2double(v);
-					break;
-				case DSC64$K_DTYPE_B:
-					lx = MV_FORCE_INT(v);
-					if (lx > 127 || lx < -127)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(char *)d->dsc64$pq_pointer = lx;
-					break;
-				case DSC64$K_DTYPE_BU:
-					lx = MV_FORCE_INT(v);
-					if (lx > 255)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(unsigned char *)d->dsc64$pq_pointer = lx;
-					break;
-				case DSC64$K_DTYPE_W:
-					lx = MV_FORCE_INT(v);
-					if (lx > 32767 || lx < -32767)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(short *)d->dsc64$pq_pointer = lx;
-					break;
-				case DSC64$K_DTYPE_WU:
-					lx = MV_FORCE_INT(v);
-					if (lx > 65535)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(unsigned short *)d->dsc64$pq_pointer = lx;
-					break;
-				case DSC64$K_DTYPE_LU:
-					/* This case has been separated from the group immediately below
-					   to get around a bug in lib$cvt_dx_dx introduced in OpenVMS AXP V6.1
-					   that returns LIB$_INTOVF for any LU value greater than 2147483647. */
-					MV_FORCE_NUM(v);
-					srcnm = mval2double(v);
-					if (srcnm > 4294967295.0)
-						rts_error(VARLSTCNT(1) ERR_NUMOFLOW);
-					*(uint4 *)d->dsc64$pq_pointer = srcnm;
-					break;
-				case DSC64$K_DTYPE_L:
-				case DSC64$K_DTYPE_Q:
-				case DSC64$K_DTYPE_QU:
-				case DSC64$K_DTYPE_F:
-				case DSC64$K_DTYPE_D:
-				case DSC64$K_DTYPE_H:
-					MV_FORCE_NUM(v);
-					srcnm = mval2double(v);
-					src.dsc64$w_mbo = 1;
-					src.dsc64$l_mbmo = -1;
-					src.dsc64$q_length = 0;
-					src.dsc64$b_dtype = DSC64$K_DTYPE_G;
-					src.dsc64$b_class = DSC64$K_CLASS_S;
-					src.dsc64$pq_pointer	= (char *)&srcnm;
-					status = lib$cvt_dx_dx(&src, d);
-					if (0 == (status & 1))
-						rts_error(VARLSTCNT(8) ERR_SYSCALL, 5, LEN_AND_LIT("LIB$CVT_DX_DX"), CALLFROM,
-							  status);
-					break;
-				default:
-					rts_error(VARLSTCNT(1) ERR_UNSDDTYPE);
-			}
-			break;
-		default:
-			rts_error(VARLSTCNT(7) ERR_UNSDCLASS, 5, ERR_ERRCALL, 3, CALLFROM);
-	}
-}
diff --git a/sr_vvms/mval2desc.h b/sr_vvms/mval2desc.h
deleted file mode 100644
index 89a9ce9..0000000
--- a/sr_vvms/mval2desc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef MVAL2DESC_INCLUDED
-#define MVAL2DESC_INCLUDED
-
-void mval2desc(mval *v, struct dsc$descriptor *d);		/***type int added***/
-void mval2desc_32(mval *v, struct dsc$descriptor *d);
-void mval2desc_64(mval *v, struct dsc64$descriptor *d);
-
-#endif /* MVAL2DESC_INCLUDED */
diff --git a/sr_vvms/newincver.com b/sr_vvms/newincver.com
deleted file mode 100644
index c09495e..0000000
--- a/sr_vvms/newincver.com
+++ /dev/null
@@ -1,224 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2005 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! newincver - create incremental version of gtm
-$! parameters:
-$!	p1 = platform
-$!	p2 = newver
-$!	p3 = oldver
-$!	p4 = copyolb (y or n)
-$!	p5 = cms class from which to download following scripts into [.tools] (e.g. "V4.3001B" or "" for V9.9-0 or "n" for none)
-$!	p6 = copy all src (y or n)
-$!		cms_load.com
-$!		cms_load_verify_from_to_version.com
-$!		fetch_cms_version.com
-$!		vms_cms_load.com
-$!
-$ interact = (f$mode() .eqs. "INTERACTIVE")
-$!
-$ set noon
-$!
-$ if p1 .nes. "AXP" .and. p1 .nes. "VAX"
-$ then
-$   if interact then inquire p1 "Platform (AXP/VAX)"
-$   if p1 .nes. "AXP" .and. p1 .nes. "VAX"
-$   then
-$     write sys$output "No action taken"
-$     exit
-$   endif
-$ endif
-$ if f$getsyi("arch_name") .eqs. "VAX"
-$ then
-$   platform = "VAX"
-$ else
-$   platform = "AXP"
-$ endif
-$ if platform .nes. p1
-$ then
-$   write sys$output "NEWINCVER-E-PLATFORMUM     Platform does not match. Install requires platform to match."
-$   exit
-$ endif
-$!
-$asknew:
-$ if p2 .eqs. ""
-$ then
-$   write sys$output "Must specify a new directory"
-$   if interact then inquire p2 "New directory"
-$   if p2 .eqs. ""
-$   then
-$     write sys$output "No action taken"
-$     exit
-$   endif
-$ endif
-$!
-$ if f$search(p1+"_gtm$gtmdev:[library]"+p2+".dir") .nes. ""
-$ then
-$   write sys$output "Destination directory "+p2+" already exists. Can't continue on existing directory."
-$   p2 :=
-$   goto asknew
-$ endif
-$!
-$askold:
-$ if p3 .eqs. ""
-$ then
-$   write sys$output "Must specify an old directory"
-$   if interact then inquire p3 "Old directory"
-$   if p3 .eqs. ""
-$   then
-$     write "No action taken"
-$     exit
-$   endif
-$ endif
-$!
-$ if f$search(p1+"_gtm$gtmdev:[library]"+p3+".dir") .eqs. ""
-$ then
-$   write sys$output "Old directory not found"
-$   p3 :=
-$   goto askold
-$ endif
-$!
-$ if interact .and. (p4 .eqs. "")
-$ then
-$   write sys$output "Must specify whether to copy mumps.olb's"
-$   inquire p4 "Copy? <Yes>"
-$ endif
-$ if p4 .eqs. "" then p4 := y
-$!
-$! -------------- set up directories for a new version (used to be newverdir.com) -----------------
-$!
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log 'p1'_gtm$gtmdev:[library.'p2'] /owner='f$user()'
-$ set def 'p1'_gtm$gtmdev:[library.'p2']
-$!
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.cmi]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.dist]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.hlp]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.pct]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w="")/log [.src]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tools]
-$!
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tcm]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tcx]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tdp]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tdc]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tfi]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.tls]
-$!
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.pro]
-$ set def [.pro]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w="")/log [.map]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.obj]
-$ set def [-]
-$!
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.bta]
-$ set def [.bta]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w="")/log [.map]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.obj]
-$ set def [-]
-$!
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w=re)/log [.dbg]
-$ set def [.dbg]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w="")/log [.map]
-$ create/dir/prot=(o:rwed,s=rwe,g=re,w="")/log [.obj]
-$ set def [-]
-$!
-$! ---------- copy over stuff from old directory to new directory structure -----------
-$!
-$ set def 'p1'_gtm$gtmdev:[library.'p2']
-$!
-$ open/write newsrc 'p1'_gtm$gtmdev:[library.'p2']gtmsrc.com
-$ write newsrc "$ define/nolog/proc gtmsecshr gtm$sec:"+p2+"_gtmsecshr.exe"
-$ write newsrc "$ define/nolog/job gtmsecshr gtm$sec:"+p2+"_gtmsecshr.exe"
-$ write newsrc "$ define/nolog/proc/exec cmishr gtm$sec:"+p2+"_cmishr.exe"
-$ write newsrc "$ define/nolog/job/exec cmishr gtm$sec:"+p2+"_cmishr.exe"
-$ write newsrc "$ define gtm$src gtm$root:["+p2+".src]"
-$ close newsrc
-$ set prot=(w:re) 'p1'_gtm$gtmdev:[library.'p2']gtmsrc.com
-$!
-$ exclude_list = "gtmsrc.com,*comlist.com,*.log,*.dir,minclude.tlb,dbgflip.com"
-$ copy/log 'p1'_gtm$gtmdev:[library.'p3']*.* 'p1'_gtm$gtmdev:[library.'p2']/excl=('exclude_list')
-$!
-$ if "" .NES. f$search(p1+"_gtm$gtmdev:[library."+p3+"]cmi.dir")
-$ then
-$! smw 2001/08/15 cmi is small enough so we will just copy it
-$    copy/log 'p1'_gtm$gtmdev:[library.'p3'.cmi]*.* 'p1'_gtm$gtmdev:[library.'p2'.cmi]
-$ endif
-$!
-$ copy/log 'p1'_gtm$gtmdev:[library.'p3'.pct]*.* 'p1'_gtm$gtmdev:[library.'p2'.pct]
-$ if ((p6 .nes. "y") .and. (p6 .nes. "Y"))
-$ then
-$	p6 = "N"
-$ 	copy/log 'p1'_gtm$gtmdev:[library.'p3'.src]*.%lb/excl=(minclude.tlb) 'p1'_gtm$gtmdev:[library.'p2'.src]
-$ else
-$ 	copy/log 'p1'_gtm$gtmdev:[library.'p3'.src]*.*/excl=(minclude.tlb) 'p1'_gtm$gtmdev:[library.'p2'.src]
-$ endif
-$ if ("" .nes. f$search("''p1'_gtm$gtmdev:[library.''p3'.tools]*.*"))
-$ then
-$	copy/log 'p1'_gtm$gtmdev:[library.'p3'.tools]*.* 'p1'_gtm$gtmdev:[library.'p2'.tools]
-$ endif
-$!
-$ if p4
-$ then
-$   set noon
-$   copy/log 'p1'_gtm$gtmdev:[library.'p3'.bta.obj]*.%lb. 'p1'_gtm$gtmdev:[library.'p2'.bta.obj]
-$   copy/log 'p1'_gtm$gtmdev:[library.'p3'.dbg.obj]*.%lb. 'p1'_gtm$gtmdev:[library.'p2'.dbg.obj]
-$   copy/log 'p1'_gtm$gtmdev:[library.'p3'.pro.obj]*.%lb. 'p1'_gtm$gtmdev:[library.'p2'.pro.obj]
-$   write sys$output " "
-$ endif
-$!
-$!the following copy supplies an environment to bootstrap a build
-$ copy/log 'p1'_gtm$gtmdev:[library.'p3'.pro]*.exe,*.mlb,*.olb,*.cld/excl=(lmu.exe,ipcrm.exe) 'p1'_gtm$gtmdev:[library.'p2'.pro]
-$ rename/log 'p1'_gtm$gtmdev:[library.'p2'.pro]'p3'_gtmsecshr.exe 'p1'_gtm$gtmdev:[library.'p2'.pro]'p2'_gtmsecshr.exe
-$ rename/log 'p1'_gtm$gtmdev:[library.'p2'.pro]'p3'_cmishr.exe 'p1'_gtm$gtmdev:[library.'p2'.pro]'p2'_cmishr.exe
-$ if "" .NES. f$search(p1 + "_gtm$gtmdev:[library." + p2 + ".pro]" + p3 + "_crashandburn.exe")
-$ then
-$   rename/log 'p1'_gtm$gtmdev:[library.'p2'.pro]'p3'_crashandburn.exe 'p1'_gtm$gtmdev:[library.'p2'.pro]'p2'_crashandburn.exe
-$ endif
-$ set file/protection=w=re 'p1'_gtm$gtmdev:[library.'p2'.pro]'p2'_gtmsecshr.exe
-$ curr_priv = f$setprv("cmkrnl,bypas")
-$ if f$priv("cmkrnl,bypas")
-$ then
-$   copy 'p1'_gtm$gtmdev:[library.'p2'.pro]'p2'_gtmsecshr.exe gtm$sec:
-$   install replace gtm$sec:'p2'_gtmsecshr.exe/prot/shar/head/open
-$   install list gtm$sec:'p2'_gtmsecshr.exe
-$   purge gtm$sec:'p2'_gtmsecshr.exe
-$   copy 'p1'_gtm$gtmdev:[library.'p2'.pro]'p2'_cmishr.exe gtm$sec:
-$   install replace gtm$sec:'p2'_cmishr.exe/prot/shar/head/open
-$   install list gtm$sec:'p2'_cmishr.exe
-$   purge gtm$sec:'p2'_cmishr.exe
-$ else
-$   write sys$output "WARNING - not able to install gtmsecshr and cmishr due to privileges"
-$ endif
-$ curr_priv=f$setprv(curr_priv)
-$!
-$ dir = ''f$trnlnm("''p1'_gtm$gtmdev") + "[library.''p2']"
-$ set default 'dir'
-$ purge/log [...]
-$!
-$! ---------- download cms_load* scripts into [.tools] if necessary -----------
-$!
-$ if ((p5 .nes. "n") .and. (p5 .nes. "N"))
-$ then
-$	set def [.tools]
-$	cms set lib sl_vvms
-$	if (p5 .eqs. "")
-$	then
-$		classgener = ""
-$	else
-$		classgener = "/gener=''p5'"
-$	endif
-$ 	cms fetch 'classgener' cms_load.com
-$ 	cms fetch 'classgener' cms_load_verify_from_to_version.com
-$ 	cms fetch 'classgener' fetch_cms_version.com
-$ 	cms fetch 'classgener' vms_cms_load.com
-$	set def [-]
-$ endif
-$!
-$ exit
diff --git a/sr_vvms/nmadef.h b/sr_vvms/nmadef.h
deleted file mode 100644
index dd1e599..0000000
--- a/sr_vvms/nmadef.h
+++ /dev/null
@@ -1,1128 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define	NMA$C_OBJ_NIC	19
-#define	NMA$C_FNC_LOA	15
-#define	NMA$C_FNC_DUM	16
-#define	NMA$C_FNC_TRI	17
-#define	NMA$C_FNC_TES	18
-#define	NMA$C_FNC_CHA	19
-#define	NMA$C_FNC_REA	20
-#define	NMA$C_FNC_ZER	21
-#define	NMA$C_FNC_SYS	22
-#define	NMA$M_OPT_ENT	7
-#define	NMA$M_OPT_CLE	64
-#define	NMA$M_OPT_PER	128
-#define	NMA$M_OPT_INF	112
-#define	NMA$C_OPINF_SUM	0
-#define	NMA$C_OPINF_STA	1
-#define	NMA$C_OPINF_CHA	2
-#define	NMA$C_OPINF_COU	3
-#define	NMA$C_OPINF_EVE	4
-#define	NMA$M_OPT_ACC	128
-#define	NMA$M_OPT_REA	128
-#define	NMA$C_SYS_RST	1
-#define	NMA$C_SYS_RSX	2
-#define	NMA$C_SYS_TOP	3
-#define	NMA$C_SYS_VMS	4
-#define	NMA$C_SYS_RT	5
-#define	NMA$C_ENT_NOD	0
-#define	NMA$C_ENT_LIN	1
-#define	NMA$C_ENT_LOG	2
-#define	NMA$C_ENT_CIR	3
-#define	NMA$C_ENT_MOD	4
-#define	NMA$C_ENT_ARE	5
-#define	NMA$C_SENT_PROXY	2
-#define	NMA$C_SENT_ALI	3
-#define	NMA$C_SENT_OBJ	4
-#define	NMA$C_SENT_PRO	5
-#define	NMA$C_SENT_SYS	6
-#define	NMA$C_SENT_LNK	7
-#define	NMA$C_SENT_WLD	-30
-#define	NMA$M_ENT_EXE	128
-#define	NMA$C_ENT_WAR	-7
-#define	NMA$C_ENT_WAD	-6
-#define	NMA$C_ENT_ADJ	-4
-#define	NMA$C_ENT_ACT	-2
-#define	NMA$C_ENT_KNO	-1
-#define	NMA$C_ENT_ADD	0
-#define	NMA$C_ENT_ALL	-3
-#define	NMA$C_ENT_LOO	-3
-#define	NMA$C_SNK_CON	1
-#define	NMA$C_SNK_FIL	2
-#define	NMA$C_SNK_MON	3
-#define	NMA$M_CNT_TYP	4095
-#define	NMA$M_CNT_MAP	4096
-#define	NMA$M_CNT_WID	24576
-#define	NMA$M_CNT_COU	32768
-#define	NMA$M_CNT_WIL	8192
-#define	NMA$M_CNT_WIH	16384
-#define	NMA$S_OPT_ENT	3
-#define	NMA$V_OPT_ENT	0
-#define	NMA$V_OPT_CLE	6
-#define	NMA$V_OPT_PER	7
-#define	NMA$S_OPT_INF	3
-#define	NMA$V_OPT_INF	4
-#define	NMA$V_OPT_ACC	7
-#define	NMA$V_OPT_REA	7
-#define	NMA$V_ENT_EXE	7
-#define	NMA$S_CNT_TYP	12
-#define	NMA$V_CNT_TYP	0
-#define	NMA$V_CNT_MAP	12
-#define	NMA$S_CNT_WID	2
-#define	NMA$V_CNT_WID	13
-#define	NMA$V_CNT_COU	15
-#define	NMA$V_CNT_WIL	13
-#define	NMA$V_CNT_WIH	14
-#define	NMA$M_PTY_TYP	32767
-#define	NMA$C_PTY_MAX	15
-#define	NMA$M_PTY_CLE	63
-#define	NMA$M_PTY_MUL	64
-#define	NMA$M_PTY_COD	128
-#define	NMA$M_PTY_CMU	192
-#define	NMA$M_PTY_NLE	15
-#define	NMA$M_PTY_NTY	48
-#define	NMA$M_PTY_ASC	64
-#define	NMA$C_NTY_DU	0
-#define	NMA$C_NTY_DS	1
-#define	NMA$C_NTY_H	2
-#define	NMA$C_NTY_O	3
-#define	NMA$C_NLE_IMAGE	0
-#define	NMA$C_NLE_BYTE	1
-#define	NMA$C_NLE_WORD	2
-#define	NMA$C_NLE_LONG	4
-#define	NMA$C_NLE_QUAD	8
-#define	NMA$C_PTY_AI	64
-#define	NMA$C_PTY_HI	32
-#define	NMA$C_PTY_H1	33
-#define	NMA$C_PTY_H2	34
-#define	NMA$C_PTY_H4	36
-#define	NMA$C_PTY_DU1	1
-#define	NMA$C_PTY_DU2	2
-#define	NMA$C_PTY_CD1	129
-#define	NMA$C_PTY_CM2	194
-#define	NMA$C_PTY_CM3	195
-#define	NMA$C_PTY_CM4	196
-#define	NMA$C_PTY_CM5	197
-#define	NMA$C_CTLVL_UI	3
-#define	NMA$C_CTLVL_XID	175
-#define	NMA$C_CTLVL_XID_P	191
-#define	NMA$C_CTLVL_TEST	227
-#define	NMA$C_CTLVL_TEST_P	243
-#define	NMA$C_PCCI_STA	0
-#define	NMA$C_PCCI_SUB	1
-#define	NMA$C_PCCI_SER	100
-#define	NMA$C_PCCI_LCT	110
-#define	NMA$C_PCCI_SPY	120
-#define	NMA$C_PCCI_SSB	121
-#define	NMA$C_PCCI_CNO	200
-#define	NMA$C_PCCI_COB	201
-#define	NMA$C_PCCI_LOO	400
-#define	NMA$C_PCCI_ADJ	800
-#define	NMA$C_PCCI_DRT	801
-#define	NMA$C_PCCI_BLO	810
-#define	NMA$C_PCCI_COS	900
-#define	NMA$C_PCCI_MRT	901
-#define	NMA$C_PCCI_RPR	902
-#define	NMA$C_PCCI_HET	906
-#define	NMA$C_PCCI_LIT	907
-#define	NMA$C_PCCI_BLK	910
-#define	NMA$C_PCCI_MRC	920
-#define	NMA$C_PCCI_RCT	921
-#define	NMA$C_PCCI_NUM	930
-#define	NMA$C_PCCI_USR	1000
-#define	NMA$C_PCCI_POL	1010
-#define	NMA$C_PCCI_PLS	1011
-#define	NMA$C_PCCI_OWN	1100
-#define	NMA$C_PCCI_LIN	1110
-#define	NMA$C_PCCI_USE	1111
-#define	NMA$C_PCCI_TYP	1112
-#define	nma$c_pcci_net	1119
-#define	NMA$C_PCCI_DTE	1120
-#define	NMA$C_PCCI_CHN	1121
-#define	NMA$C_PCCI_MBL	1122
-#define	NMA$C_PCCI_MWI	1123
-#define	NMA$C_PCCI_TRI	1140
-#define	NMA$C_PCCI_BBT	1141
-#define	NMA$C_PCCI_TRT	1142
-#define	NMA$C_PCCI_RTT	1143
-#define	NMA$C_PCCI_MRB	1145
-#define	NMA$C_PCCI_MTR	1146
-#define	NMA$C_PCCI_ACB	1150
-#define	NMA$C_PCCI_ACI	1151
-#define	NMA$C_PCCI_IAB	1152
-#define	NMA$C_PCCI_IAI	1153
-#define	NMA$C_PCCI_IAT	1154
-#define	NMA$C_PCCI_DYB	1155
-#define	NMA$C_PCCI_DYI	1156
-#define	NMA$C_PCCI_DYT	1157
-#define	NMA$C_PCCI_DTH	1158
-#define	NMA$C_PCCI_RSX_MAC	2320
-#define	NMA$C_PCCI_RSX_LOG	2380
-#define	NMA$C_PCCI_RSX_DLG	2385
-#define	NMA$C_PCCI_RSX_ACT	2390
-#define	NMA$C_PCCI_VER	2700
-#define	NMA$C_PCCI_XPT	2720
-#define	NMA$C_PCCI_IRC	2750
-#define	NMA$C_PCCI_ORC	2751
-#define	NMA$C_PCCI_GRP	2752
-#define	NMA$C_PCCI_NOP	2753
-#define	NMA$C_PCCI_CAL	2754
-#define	NMA$C_PCCI_INA	2755
-#define	NMA$C_PCCI_RED	2756
-#define	NMA$C_PCCI_MOD	2757
-#define	NMA$C_PCCI_REQ	2758
-#define	NMA$C_PCCI_DTW	2759
-#define	NMA$C_PCCI_PRO	2760
-#define	NMA$C_PCCI_INF	2761
-#define	NMA$C_PCCI_ACC	2762
-#define	NMA$C_PCCI_CLR	2763
-#define	NMA$C_PCCI_DTC	2764
-#define	NMA$C_PCCI_CCG	2765
-#define	NMA$C_PCCI_ESA	2766
-#define	NMA$C_PCCI_DTI	2767
-#define	NMA$C_PCCI_SWC	2768
-#define	NMA$C_PCCI_TIC	2769
-#define	NMA$C_PCCI_CSG	2770
-#define	NMA$C_PCCI_AAS	2771
-#define	NMA$C_PCCI_DTS	2772
-#define	NMA$C_PCCI_CAS	2773
-#define	NMA$C_PCCI_CPS	2774
-#define	NMA$C_PCCI_CNT	2775
-#define	NMA$C_PCCI_RAT	2776
-#define	NMA$C_PCCI_PRD	2777
-#define	NMA$C_PCCI_DAY	2778
-#define	NMA$C_PCCI_BFN	2779
-#define	NMA$C_PCCI_BSZ	2780
-#define	NMA$C_PCCI_MDM	2781
-#define	NMA$C_PCCI_DTL	2782
-#define	NMA$C_PCCI_IDL	2783
-#define	NMA$C_PCCI_IMT	2784
-#define	NMA$C_PCCI_CAC	2785
-#define	NMA$C_PCCI_ORD	2786
-#define	NMA$C_PCCI_CID	2787
-#define	NMA$C_PCCI_MST	2810
-#define	NMA$C_PCCI_SRV_LOG	3380
-#define	NMA$C_PCCI_SRV_DLG	3385
-#define	NMA$C_PCCI_SRV_ACT	3390
-#define	NMA$C_PCLI_STA	0
-#define	NMA$C_PCLI_SUB	1
-#define	NMA$C_PCLI_SER	100
-#define	NMA$C_PCLI_LCT	110
-#define	NMA$C_PCLI_LOO	400
-#define	NMA$C_PCLI_ADJ	800
-#define	NMA$C_PCLI_BLO	810
-#define	NMA$C_PCLI_COS	900
-#define	NMA$C_PCLI_DEV	1100
-#define	NMA$C_PCLI_BFN	1105
-#define	NMA$C_PCLI_CON	1110
-#define	NMA$C_PCLI_DUP	1111
-#define	NMA$C_PCLI_PRO	1112
-#define	NMA$C_PCLI_LTY	1112
-#define	NMA$C_PCLI_CLO	1113
-#define	NMA$C_PCLI_STI	1120
-#define	NMA$C_PCLI_NTI	1121
-#define	NMA$C_PCLI_RTT	1121
-#define	NMA$C_PCLI_HTI	1122
-#define	NMA$C_PCLI_MBL	1130
-#define	NMA$C_PCLI_MRT	1131
-#define	NMA$C_PCLI_MWI	1132
-#define	NMA$C_PCLI_TRI	1140
-#define	NMA$C_PCLI_SLT	1150
-#define	NMA$C_PCLI_DDT	1151
-#define	NMA$C_PCLI_DLT	1152
-#define	NMA$C_PCLI_SRT	1153
-#define	NMA$C_PCLI_HWA	1160
-#define	nma$c_pcli_net	1190
-#define	NMA$C_PCLI_XMD	1191
-#define	NMA$C_PCLI_RSX_OWN	2300
-#define	NMA$C_PCLI_RSX_CCS	2310
-#define	NMA$C_PCLI_RSX_UCS	2311
-#define	NMA$C_PCLI_RSX_VEC	2312
-#define	NMA$C_PCLI_RSX_PRI	2313
-#define	NMA$C_PCLI_RSX_MDE	2321
-#define	NMA$C_PCLI_RSX_LLO	2330
-#define	NMA$C_PCLI_RSX_LOG	2380
-#define	NMA$C_PCLI_RSX_DLG	2385
-#define	NMA$C_PCLI_RSX_ACT	2390
-#define	NMA$C_PCLI_MCD	2701
-#define	NMA$C_PCLI_EPT	2720
-#define	NMA$C_PCLI_LNS	2730
-#define	NMA$C_PCLI_SWI	2740
-#define	NMA$C_PCLI_HNG	2750
-#define	NMA$C_PCLI_TPI	2760
-#define	nma$c_pcli_nrzi	2761
-#define	nma$c_pcli_code	2762
-#define	NMA$C_PCLI_FMT	2770
-#define	NMA$C_PCLI_SRV	2771
-#define	NMA$C_PCLI_SAP	2772
-#define	NMA$C_PCLI_GSP	2773
-#define	NMA$C_PCLI_PID	2774
-#define	NMA$C_PCLI_BUS	2801
-#define	NMA$C_PCLI_NMS	2810
-#define	NMA$C_PCLI_PHA	2820
-#define	NMA$C_PCLI_DPA	2821            ;  (same as HWA)
-#define	NMA$C_PCLI_PTY	2830
-#define	NMA$C_PCLI_MCA	2831
-#define	NMA$C_PCLI_ILP	2839
-#define	NMA$C_PCLI_PRM	2840
-#define	NMA$C_PCLI_MLT	2841
-#define	NMA$C_PCLI_PAD	2842
-#define	NMA$C_PCLI_DCH	2843
-#define	NMA$C_PCLI_CRC	2844
-#define	NMA$C_PCLI_HBQ	2845
-#define	NMA$C_PCLI_ACC	2846
-#define	NMA$C_PCLI_EKO	2847
-#define	NMA$C_PCLI_BSZ	2848
-#define	NMA$C_PCLI_DES	2849
-#define	NMA$C_PCLI_RET	2850
-#define	NMA$C_PCLI_MOD	2851
-#define	NMA$C_PCLI_RIB	2852
-#define	NMA$C_PCLI_MNTL	2860
-#define	NMA$C_PCLI_INTL0	2861
-#define	NMA$C_PCLI_INTL1	2862
-#define	NMA$C_PCLI_INTL2	2863
-#define	NMA$C_PCLI_INTL3	2864
-#define	NMA$C_PCLI_FRA	2865
-#define	NMA$C_PCLI_STI1	2866
-#define	NMA$C_PCLI_STI2	2867
-#define	NMA$C_PCLI_TMO	2868
-#define	NMA$C_PCLI_MCL	2869
-#define	NMA$C_PCLI_SYC	2870
-#define	NMA$C_PCLI_BPC	2871
-#define	NMA$C_PCLI_MBS	2872
-#define	NMA$C_PCLI_RES	2873
-#define	NMA$C_PCLI_SRV_OWN	3300
-#define	NMA$C_PCLI_SRV_UCS	3311
-#define	NMA$C_PCLI_SRV_VEC	3312
-#define	NMA$C_PCLI_SRV_PRI	3313
-#define	NMA$C_PCLI_SRV_LOG	3380
-#define	NMA$C_PCLI_SRV_DLG	3385
-#define	NMA$C_PCLI_SRV_ACT	3390
-#define	NMA$C_PCCO_RTR	110
-#define	NMA$C_PCLD_ASS	10
-#define	NMA$C_PCLP_ASS	10
-#define	NMA$C_PCCN_CIR	100
-#define	NMA$C_PCCN_SUR	110
-#define	NMA$C_PCCN_ELT	111
-#define	NMA$C_PCCN_PHA	120
-#define	NMA$C_PCCN_LRP	130
-#define	NMA$C_PCCN_MVR	20001
-#define	NMA$C_PCCN_FCT	20002
-#define	NMA$C_PCCN_CUS	20003
-#define	NMA$C_PCCN_RTR	20004
-#define	NMA$C_PCCN_CSZ	20005
-#define	NMA$C_PCCN_RSZ	20006
-#define	NMA$C_PCCN_HWA	20007
-#define	NMA$C_PCCN_DTY	20100
-#define	NMA$C_PCCN_SFI	20200
-#define	NMA$C_PCCN_SPR	20300
-#define	NMA$C_PCCN_DLK	20400
-#define	NMA$C_PCLO_STA	0
-#define	NMA$C_PCLO_LNA	100
-#define	NMA$C_PCLO_SIN	200
-#define	NMA$C_PCLO_EVE	201
-#define	NMA$C_PCXA_NOD	320
-#define	NMA$C_PCXA_USR	330
-#define	NMA$C_PCXA_SPW	331
-#define	NMA$C_PCXA_RPW	331
-#define	NMA$C_PCXA_ACC	332
-#define	NMA$C_PCXA_NET	1110
-#define	NMA$C_PCXA_RSX_ADS	2310
-#define	NMA$C_PCXA_RSX_ANB	2320
-#define	NMA$C_PCXA_RSX_ASC	2330
-#define	NMA$C_PCXA_SRV_ADS	3310
-#define	NMA$C_PCXA_SRV_ANB	3320
-#define	NMA$C_PCXA_SRV_ASC	3330
-#define	NMA$C_PCXP_STA	0
-#define	NMA$C_PCXP_SBS	1
-#define	NMA$C_PCXP_CTM	100
-#define	NMA$C_PCXP_ACH	1000
-#define	NMA$C_PCXP_ASW	1010
-#define	NMA$C_PCXP_DTE	1100
-#define	NMA$C_PCXP_GRP	1101
-#define	NMA$C_pcxp_netent	1110
-#define	NMA$C_pcxp_dnt	1111
-#define	NMA$C_PCXP_LIN	1120
-#define	NMA$C_PCXP_CHN	1130
-#define	NMA$C_PCXP_MCH	1131
-#define	NMA$C_PCXP_DBL	1140
-#define	NMA$C_PCXP_DWI	1141
-#define	NMA$C_PCXP_MBL	1150
-#define	NMA$C_PCXP_MWI	1151
-#define	NMA$C_PCXP_MCL	1152
-#define	NMA$C_PCXP_MRS	1153
-#define	NMA$C_PCXP_MST	1154
-#define	NMA$C_PCXP_CAT	1160
-#define	NMA$C_PCXP_CLT	1161
-#define	NMA$C_PCXP_RST	1162
-#define	NMA$C_PCXP_STT	1163
-#define	NMA$C_pcxp_itt	1164
-#define	NMA$C_PCXP_GDT	1170
-#define	NMA$C_PCXP_GNM	1171
-#define	NMA$C_PCXP_GTY	1172
-#define	NMA$C_pcxp_gnt	1173
-#define	nma$c_pcxp_mode	1180
-#define	nma$c_pcxp_prof	1190
-#define	NMA$C_PCXP_RSX_PMC	2300
-#define	NMA$C_PCXP_MCI	2710
-#define	NMA$C_PCXP_SRV_PMC	3300
-#define	nma$c_pcxs_sta	1
-#define	NMA$C_PCXS_CTM	100
-#define	NMA$C_PCXS_ACI	200
-#define	NMA$C_PCXS_DST	300
-#define	NMA$C_PCXS_MCI	310
-#define	NMA$C_PCXS_NOD	320
-#define	NMA$C_PCXS_USR	330
-#define	NMA$C_PCXS_SPW	331
-#define	NMA$C_PCXS_RPW	331
-#define	NMA$C_PCXS_ACC	332
-#define	NMA$C_PCXS_OBJ	340
-#define	NMA$C_PCXS_PRI	350
-#define	NMA$C_PCXS_CMK	351
-#define	NMA$C_PCXS_CVL	352
-#define	NMA$C_PCXS_GRP	353
-#define	NMA$C_PCXS_SDTE	354
-#define	NMA$C_PCXS_SAD	355
-#define	nma$c_pcxs_red	390
-#define	nma$c_pcxs_cdte	391
-#define	nma$c_pcxs_rdte	392
-#define	nma$c_pcxs_net	393
-#define	nma$C_pcxs_emk	394
-#define	nma$C_pcxs_evl	395
-#define	nma$C_pcxs_idte	396
-#define	NMA$C_PCXS_RSX_5ST	2310
-#define	NMA$C_PCXS_FIL	2710
-#define	NMA$C_PCXS_SRV_5ST	3310
-#define	NMA$C_PCXT_STA	0
-#define	NMA$C_PCXT_BSZ	100
-#define	NMA$C_PCXT_MBK	101
-#define	NMA$C_PCXT_FNM	102
-#define	NMA$C_PCXT_MBF	103
-#define	NMA$C_PCXT_CPL	104
-#define	NMA$C_PCXT_MVR	105
-#define	NMA$C_PCXT_TPT	106
-#define	NMA$C_PCXT_CPS	110
-#define	NMA$C_PCXT_TST	111
-#define	NMA$C_PCNO_STA	0
-#define	NMA$C_PCNO_PHA	10
-#define	NMA$C_PCNO_IDE	100
-#define	NMA$C_PCNO_MVE	101
-#define	NMA$C_PCNO_SLI	110
-#define	NMA$C_PCNO_SPA	111
-#define	NMA$C_PCNO_SDV	112
-#define	NMA$C_PCNO_CPU	113
-#define	NMA$C_PCNO_HWA	114
-#define	NMA$C_PCNO_SNV	115
-#define	NMA$C_PCNO_LOA	120
-#define	NMA$C_PCNO_SLO	121
-#define	NMA$C_PCNO_TLO	122
-#define	NMA$C_PCNO_DFL	123
-#define	NMA$C_PCNO_STY	125
-#define	NMA$C_PCNO_SID	126
-#define	NMA$C_PCNO_MFL	127
-#define	NMA$C_PCNO_DUM	130
-#define	NMA$C_PCNO_SDU	131
-#define	NMA$C_PCNO_DAD	135
-#define	NMA$C_PCNO_DCT	136
-#define	NMA$C_PCNO_OHO	140
-#define	NMA$C_PCNO_IHO	141
-#define	NMA$C_PCNO_LPC	150
-#define	NMA$C_PCNO_LPL	151
-#define	NMA$C_PCNO_LPD	152
-#define	NMA$C_PCNO_LPA	153
-#define	NMA$C_PCNO_LPH	154
-#define	NMA$C_PCNO_LPN	155
-#define	NMA$C_PCNO_LAN	156
-#define	NMA$C_PCNO_CTI	160
-#define	NMA$C_PCNO_NNA	500
-#define	NMA$C_PCNO_NLI	501
-#define	NMA$C_PCNO_ADD	502
-#define	NMA$C_PCNO_ITI	510
-#define	NMA$C_PCNO_OTI	511
-#define	NMA$C_PCNO_IPR	522
-#define	NMA$C_PCNO_OPR	523
-#define	NMA$C_PCNO_ACL	600
-#define	NMA$C_PCNO_DEL	601
-#define	NMA$C_PCNO_NVE	700
-#define	NMA$C_PCNO_MLK	710
-#define	NMA$C_PCNO_DFA	720
-#define	NMA$C_PCNO_DWE	721
-#define	NMA$C_PCNO_IAT	722
-#define	NMA$C_PCNO_RFA	723
-#define	NMA$C_PCNO_DTY	810
-#define	NMA$C_PCNO_DCO	820
-#define	NMA$C_PCNO_DHO	821
-#define	NMA$C_PCNO_DLI	822
-#define	NMA$C_PCNO_NND	830
-#define	NMA$C_PCNO_RVE	900
-#define	NMA$C_PCNO_ETY	901
-#define	NMA$C_PCNO_RTI	910
-#define	NMA$C_PCNO_SAD	911
-#define	NMA$C_PCNO_BRT	912
-#define	NMA$C_PCNO_MAD	920
-#define	NMA$C_PCNO_MLN	921
-#define	NMA$C_PCNO_MCO	922
-#define	NMA$C_PCNO_MHO	923
-#define	NMA$C_PCNO_MVI	924
-#define	NMA$C_PCNO_MAR	925
-#define	NMA$C_PCNO_MBE	926
-#define	NMA$C_PCNO_MBR	927
-#define	NMA$C_PCNO_AMC	928
-#define	NMA$C_PCNO_AMH	929
-#define	NMA$C_PCNO_MBU	930
-#define	NMA$C_PCNO_BUS	931
-#define	NMA$C_PCNO_SBS	932
-#define	NMA$C_PCNO_MPS	933
-#define	NMA$C_PCNO_FBS	933
-#define	NMA$C_PCNO_RSX_RPA	2300
-#define	NMA$C_PCNO_RSX_TPA	2301
-#define	NMA$C_PCNO_RSX_VER	2310
-#define	NMA$C_PCNO_PUS	2704
-#define	NMA$C_PCNO_PAC	2705
-#define	NMA$C_PCNO_PPW	2706
-#define	NMA$C_PCNO_NUS	2712
-#define	NMA$C_PCNO_NAC	2713
-#define	NMA$C_PCNO_NPW	2714
-#define	NMA$C_PCNO_RPA	2720
-#define	NMA$C_PCNO_TPA	2721
-#define	NMA$C_PCNO_ACC	2730
-#define	NMA$C_PCNO_DAC	2731
-#define	NMA$C_PCNO_PIQ	2740
-#define	NMA$C_PCNO_ALI	2742
-#define	NMA$C_PCNO_ALM	2743
-#define	NMA$C_PCNO_ALN	2744
-#define	NMA$C_PCNO_PRX	2750
-#define	NMA$C_PCNO_DPX	2751
-#define	NMA$C_PCNO_COP	2760
-#define	NMA$C_PCNO_INB	2765
-#define	NMA$C_PCNO_LAA	2770
-#define	NMA$C_PCNO_LAP	2771
-#define	NMA$C_PCNO_PSP	2780
-#define	NMA$C_PCNO_MDO	2785
-#define	NMA$C_PCNO_SRV_RPA	3300
-#define	NMA$C_PCNO_SRV_TPA	3301
-#define	NMA$C_PCNO_SRV_VER	3310
-#define	NMA$C_PCNO_SRV_ACB	3402
-#define	NMA$C_PCNO_SRV_ASB	3404
-#define	NMA$C_PCNO_SRV_ALB	3406
-#define	NMA$C_PCNO_SRV_MCB	3410
-#define	NMA$C_PCNO_SRV_MSB	3420
-#define	NMA$C_PCNO_SRV_MLB	3430
-#define	NMA$C_PCNO_SRV_LBS	3431
-#define	NMA$C_PCNO_SRV_NRB	3440
-#define	NMA$C_PCNO_SRV_CPT	3450
-#define	NMA$C_PCNO_SRV_CPF	3452
-#define	NMA$C_PCNO_SRV_CPL	3454
-#define	NMA$C_PCNO_SRV_XPT	3460
-#define	NMA$C_PCNO_SRV_XPF	3462
-#define	NMA$C_PCNO_SRV_XPL	3464
-#define	NMA$C_PCAR_STA	0
-#define	NMA$C_PCAR_COS	820
-#define	NMA$C_PCAR_HOP	821
-#define	NMA$C_PCAR_CIR	822
-#define	NMA$C_PCAR_NND	830
-#define	NMA$C_PCOB_OAN	400
-#define	NMA$C_PCOB_OAC	410
-#define	NMA$C_PCOB_ONA	500
-#define	NMA$C_PCOB_OCO	510
-#define	NMA$C_PCOB_OUS	511
-#define	NMA$C_PCOB_OVE	520
-#define	NMA$C_PCOB_NAM	500
-#define	NMA$C_PCOB_NUM	513
-#define	NMA$C_PCOB_FID	530
-#define	NMA$C_PCOB_PID	535
-#define	NMA$C_PCOB_PRV	540
-#define	NMA$C_PCOB_USR	550
-#define	NMA$C_PCOB_ACC	551
-#define	NMA$C_PCOB_PSW	552
-#define	NMA$C_PCOB_PRX	560
-#define	NMA$C_PCOB_ALO	565
-#define	NMA$C_PCOB_ALI	566
-#define	NMA$C_PCLK_STA	0
-#define	NMA$C_PCLK_PID	101
-#define	NMA$C_PCLK_NID	102
-#define	NMA$C_PCLK_LAD	105
-#define	NMA$C_PCLK_DLY	110
-#define	NMA$C_PCLK_RLN	120
-#define	NMA$C_PCLK_RID	121
-#define	NMA$C_PCLK_USR	130
-#define	NMA$C_PCLK_PRC	131
-#define	NMA$C_CTCIR_ZER	0
-#define	NMA$C_CTCIR_APR	800
-#define	NMA$C_CTCIR_DPS	801
-#define	NMA$C_CTCIR_ACL	802
-#define	NMA$C_CTCIR_CRL	805
-#define	NMA$C_CTCIR_TPR	810
-#define	NMA$C_CTCIR_TPS	811
-#define	NMA$C_CTCIR_TCL	812
-#define	NMA$C_CTCIR_LDN	820
-#define	NMA$C_CTCIR_IFL	821
-#define	NMA$C_CTCIR_AJD	822
-#define	NMA$C_CTCIR_PAJ	900
-#define	NMA$C_CTCIR_BRC	1000
-#define	NMA$C_CTCIR_BSN	1001
-#define	NMA$C_CTCIR_MBY	1002
-#define	NMA$C_CTCIR_DBR	1010
-#define	NMA$C_CTCIR_DBS	1011
-#define	NMA$C_CTCIR_DEI	1020
-#define	NMA$C_CTCIR_DEO	1021
-#define	NMA$C_CTCIR_RRT	1030
-#define	NMA$C_CTCIR_LRT	1031
-#define	NMA$C_CTCIR_RBE	1040
-#define	NMA$C_CTCIR_LBE	1041
-#define	NMA$C_CTCIR_SIE	1050
-#define	NMA$C_CTCIR_SLT	1051
-#define	NMA$C_CTCIR_UBU	1065
-#define	NMA$C_CTCIR_RPE	1100
-#define	NMA$C_CTCIR_LPE	1101
-#define	NMA$C_CTCIR_LIR	1240
-#define	NMA$C_CTCIR_RIR	1241
-#define	NMA$C_CTCIR_NIR	1242
-#define	NMA$C_CTCIR_MNE	2701
-#define	NMA$C_CTCIR_ERI	2750
-#define	NMA$C_CTCIR_ERO	2751
-#define	NMA$C_CTCIR_RTO	2752
-#define	NMA$C_CTCIR_LTO	2753
-#define	NMA$C_CTCIR_BER	2754
-#define	NMA$C_CTCIR_BEL	2755
-#define	NMA$C_CTLIN_ZER	0
-#define	NMA$C_CTLIN_APR	800
-#define	NMA$C_CTLIN_DPS	801
-#define	NMA$C_CTLIN_ACL	802
-#define	NMA$C_CTLIN_TPR	810
-#define	NMA$C_CTLIN_TPS	811
-#define	NMA$C_CTLIN_TCL	812
-#define	NMA$C_CTLIN_LDN	820
-#define	NMA$C_CTLIN_IFL	821
-#define	NMA$C_CTLIN_BRC	1000
-#define	NMA$C_CTLIN_BSN	1001
-#define	NMA$C_CTLIN_MBY	1002
-#define	NMA$C_CTLIN_DBR	1010
-#define	NMA$C_CTLIN_DBS	1011
-#define	NMA$C_CTLIN_MBL	1012
-#define	NMA$C_CTLIN_BID	1013
-#define	NMA$C_CTLIN_BS1	1014
-#define	NMA$C_CTLIN_BSM	1015
-#define	NMA$C_CTLIN_DEI	1020
-#define	NMA$C_CTLIN_DEO	1021
-#define	NMA$C_CTLIN_RRT	1030
-#define	NMA$C_CTLIN_LRT	1031
-#define	NMA$C_CTLIN_RBE	1040
-#define	NMA$C_CTLIN_LBE	1041
-#define	NMA$C_CTLIN_SIE	1050
-#define	NMA$C_CTLIN_SLT	1051
-#define	NMA$C_CTLIN_SFL	1060
-#define	NMA$C_CTLIN_CDC	1061
-#define	NMA$C_CTLIN_RFL	1062
-#define	NMA$C_CTLIN_UFD	1063
-#define	NMA$C_CTLIN_OVR	1064
-#define	NMA$C_CTLIN_SBU	1065
-#define	NMA$C_CTLIN_UBU	1066
-#define	NMA$C_CTLIN_RPE	1100
-#define	NMA$C_CTLIN_LPE	1101
-#define	NMA$W_NODE	0
-#define	NMA$S_ADDR	10
-#define	NMA$V_ADDR	0
-#define	NMA$S_AREA	6
-#define	NMA$V_AREA	10
-#define	NMA$S_PTY_TYP	15
-#define	NMA$V_PTY_TYP	0
-#define	NMA$S_PTY_CLE	6
-#define	NMA$V_PTY_CLE	0
-#define	NMA$V_PTY_MUL	6
-#define	NMA$V_PTY_COD	7
-#define	NMA$S_PTY_CMU	2
-#define	NMA$V_PTY_CMU	6
-#define	NMA$S_PTY_NLE	4
-#define	NMA$V_PTY_NLE	0
-#define	NMA$S_PTY_NTY	2
-#define	NMA$V_PTY_NTY	4
-#define	NMA$V_PTY_ASC	6
-#define	NMA$M_CTLIN_BTL	8
-#define	NMA$M_CTLIN_FCS	16
-#define	NMA$M_CTLIN_TRJ	32
-#define	NMA$V_CTLIN_BTL	3
-#define	NMA$V_CTLIN_FCS	4
-#define	NMA$V_CTLIN_TRJ	5
-#define	NMA$M_CTLIN_RRJ	8
-#define	NMA$V_CTLIN_RRJ	3
-#define	NMA$M_CTLIN_RRN	4
-#define	NMA$V_CTLIN_RRN	2
-#define	NMA$M_CTLIN_TRN	4
-#define	NMA$V_CTLIN_TRN	2
-#define	NMA$M_CTLIN_INR	16
-#define	NMA$M_CTLIN_FMS	32
-#define	NMA$V_CTLIN_INR	4
-#define	NMA$V_CTLIN_FMS	5
-#define	NMA$M_CTLIN_TUN	4
-#define	NMA$M_CTLIN_RUN	16
-#define	NMA$M_CTLIN_FMR	32
-#define	NMA$C_CTLIN_MBS	2701
-#define	NMA$C_CTLIN_MSN	2702
-#define	NMA$C_CTLIN_RME	2750
-#define	NMA$C_CTLIN_LCE	2751
-#define	NMA$C_CTLIN_MSE	2752
-#define	NMA$C_CTNOD_ZER	0
-#define	NMA$C_CTNOD_BRC	600
-#define	NMA$C_CTNOD_BSN	601
-#define	NMA$C_CTNOD_MRC	610
-#define	NMA$C_CTNOD_MSN	611
-#define	NMA$C_CTNOD_CRC	620
-#define	NMA$C_CTNOD_CSN	621
-#define	NMA$C_CTNOD_RTO	630
-#define	NMA$C_CTNOD_RSE	640
-#define	NMA$C_CTNOD_BUN	650
-#define	NMA$C_CTNOD_MLL	700
-#define	NMA$C_CTNOD_APL	900
-#define	NMA$C_CTNOD_NUL	901
-#define	NMA$C_CTNOD_NOL	902
-#define	NMA$C_CTNOD_OPL	903
-#define	NMA$C_CTNOD_PFE	910
-#define	NMA$C_CTNOD_RUL	920
-#define	NMA$C_CTNOD_VER	930
-#define	NMA$C_CTNOD_SRV_SYC	3310
-#define	NMA$C_CTNOD_SRV_SYS	3320
-#define	NMA$C_CTNOD_SRV_SYL	3330
-#define	NMA$C_CTNOD_SRV_SYR	3340
-#define	NMA$C_CTXP_ZER	0
-#define	NMA$C_CTXP_BRC	1000
-#define	NMA$C_CTXP_BSN	1001
-#define	NMA$C_CTXP_BLR	1010
-#define	NMA$C_CTXP_BLS	1011
-#define	NMA$C_CTXP_CRC	1200
-#define	NMA$C_CTXP_CSN	1201
-#define	NMA$C_CTXP_FSR	1210
-#define	NMA$C_CTXP_FSS	1211
-#define	NMA$C_CTXP_MSA	1220
-#define	NMA$C_CTXP_MCA	1221
-#define	NMA$C_CTXP_RSE	1230
-#define	NMA$C_CTXP_LIR	1240
-#define	NMA$C_CTXP_RIR	1241
-#define	NMA$C_CTXP_NIR	1242
-#define	NMA$C_CTXP_RST	1250
-#define	NMA$C_CTXS_ZER	0
-#define	NMA$C_CTXS_MCA	200
-#define	NMA$C_CTXS_ICR	210
-#define	NMA$C_CTXS_LLR	211
-#define	NMA$C_LOOP_MIX	2
-#define	NMA$C_LOOP_ONE	1
-#define	NMA$C_LOOP_ZER	0
-#define	NMA$C_LOOP_DCNT	1
-#define	NMA$C_LOOP_DSIZ	40
-#define	NMA$C_LOOP_XMIT	0
-#define	NMA$C_LOOP_RECV	1
-#define	NMA$C_LOOP_FULL	2
-#define	NMA$C_STATE_ON	0
-#define	NMA$C_STATE_OFF	1
-#define	NMA$C_STATE_SER	2
-#define	NMA$C_STATE_CLE	3
-#define	NMA$C_STATE_HOL	2
-#define	NMA$C_STATE_SHU	2
-#define	NMA$C_STATE_RES	3
-#define	NMA$C_STATE_REA	4
-#define	NMA$C_STATE_UNR	5
-#define	NMA$C_PCNO_DMAD	1023
-#define	NMA$C_ASS_ENA	0
-#define	NMA$C_ASS_DIS	1
-#define	NMA$C_SUR_ENA	0
-#define	NMA$C_SUR_DIS	1
-#define	NMA$C_LINSS_STA	0
-#define	NMA$C_LINSS_REF	1
-#define	NMA$C_LINSS_LOO	2
-#define	NMA$C_LINSS_LOA	3
-#define	NMA$C_LINSS_DUM	4
-#define	NMA$C_LINSS_TRI	5
-#define	NMA$C_LINSS_ASE	6
-#define	NMA$C_LINSS_ALO	7
-#define	NMA$C_LINSS_ADU	8
-#define	NMA$C_LINSS_ATR	9
-#define	NMA$C_LINSS_SYN	10
-#define	NMA$C_LINSS_FAI	11
-#define	NMA$C_LINSS_RUN	12
-#define	NMA$C_LINSS_UNS	13
-#define	NMA$C_LINSS_IDL	14
-#define	NMA$C_CIRTY_POI	0
-#define	NMA$C_CIRTY_CON	1
-#define	NMA$C_CIRTY_TRI	2
-#define	NMA$C_CIRTY_X25	3
-#define	NMA$C_CIRTY_DMC	4
-#define	NMA$C_CIRTY_NI	6
-#define	NMA$C_LINSV_ENA	0
-#define	NMA$C_LINSV_DIS	1
-#define	NMA$C_CIRPST_AUT	1
-#define	NMA$C_CIRPST_ACT	2
-#define	NMA$C_CIRPST_INA	3
-#define	NMA$C_CIRPST_DIE	4
-#define	NMA$C_CIRPST_DED	5
-#define	NMA$C_CIRBLK_ENA	0
-#define	NMA$C_CIRBLK_DIS	1
-#define	NMA$C_CIRUS_PER	0
-#define	NMA$C_CIRUS_INC	1
-#define	NMA$C_CIRUS_OUT	2
-#define	NMA$C_CIRHS_ENA	0
-#define	NMA$C_CIRHS_DIS	1
-#define	NMA$C_CIRBF_UNL	255
-#define	NMA$C_CIRVE_ENA	0
-#define	NMA$C_CIRVE_DIS	1
-#define	NMA$C_CIRVE_INB	2
-#define	NMA$C_CIRXPT_ZND	1
-#define	NMA$C_CIRXPT_PH2	2
-#define	NMA$C_CIRXPT_PH3	3
-#define	NMA$C_CIRXPT_RO3	3
-#define	NMA$C_CIRXPT_NR4	4
-#define	NMA$C_DPX_FUL	0
-#define	NMA$C_DPX_HAL	1
-#define	NMA$C_DPX_MPT	4
-#define	NMA$C_LINCN_NOR	0
-#define	NMA$C_LINCN_LOO	1
-#define	NMA$C_LINPR_POI	0
-#define	NMA$C_LINPR_CON	1
-#define	NMA$C_LINPR_TRI	2
-#define	NMA$C_LINPR_DMC	4
-#define	NMA$C_LINPR_LAPB	5
-#define	NMA$C_LINPR_NI	6
-#define	NMA$C_LINPR_BSY	9
-#define	nma$c_linpr_lapbe	10
-#define	nma$c_linpr_ea_hdlc	20
-#define	nma$c_linpr_sdlc	21
-#define	nma$c_linpr_bisync	22
-#define	nma$m_linpr_mop	128
-#define	nma$c_code_ascii	1
-#define	nma$c_code_ebcdic	2
-#define	NMA$C_LINPR_MAS	1
-#define	NMA$C_LINPR_NEU	2
-#define	NMA$C_LINPR_SEC	0
-#define	NMA$C_LINCL_EXT	0
-#define	NMA$C_LINCL_INT	1
-#define	NMA$C_LINFM_802E	0
-#define	NMA$C_LINFM_ETH	1
-#define	NMA$C_LINFM_802	2
-#define	NMA$C_LINSR_USR	1
-#define	NMA$C_LINSR_CLI	2
-#define	NMA$C_LINSWI_DIS	1
-#define	NMA$C_LINSWI_ENA	0
-#define	NMA$C_LINHNG_DIS	1
-#define	NMA$C_LINHNG_ENA	0
-#define	NMA$C_LINRES_DIS	1
-#define	NMA$C_LINRES_ENA	0
-#define	NMA$C_LINTY_POI	0
-#define	NMA$C_LINTY_CON	1
-#define	NMA$C_LINTY_TRI	2
-#define	NMA$C_LINTY_DMC	3
-#define	NMA$C_LINMC_SET	1
-#define	NMA$C_LINMC_CLR	2
-#define	NMA$C_LINMC_CAL	3
-#define	NMA$C_LINMC_SDF	4
-#define	NMA$C_ACC_SHR	1
-#define	NMA$C_ACC_LIM	2
-#define	NMA$C_ACC_EXC	3
-#define	NMA$C_LINMO_AUT	1
-#define	NMA$C_LINMO_SIL	2
-#define	NMA$C_X25MD_DTE	1
-#define	NMA$C_X25MD_DCE	2
-#define	NMA$C_X25MD_DTL	3
-#define	NMA$C_X25MD_DCL	4
-#define	nma$c_x25md_neg	5
-#define	nma$c_x25red_busy	0
-#define	nma$c_x25red_out_of_order	1
-#define	nma$c_x25red_systematic	2
-#define	NMA$C_NODTY_ROU	0
-#define	NMA$C_NODTY_NON	1
-#define	NMA$C_NODTY_PHA	2
-#define	NMA$C_NODTY_AREA	3
-#define	NMA$C_NODTY_RT4	4
-#define	NMA$C_NODTY_NR4	5
-#define	NMA$C_NODINB_ROUT	1
-#define	NMA$C_NODINB_ENDN	2
-#define	NMA$C_NODPW_SET	0
-#define	NMA$C_CPU_8	0
-#define	NMA$C_CPU_11	1
-#define	NMA$C_CPU_1020	2
-#define	NMA$C_CPU_VAX	3
-#define	NMA$C_NODSNV_PH3	0
-#define	NMA$C_NODSNV_PH4	1
-#define	NMA$C_SOFT_SECL	0
-#define	NMA$C_SOFT_TERL	1
-#define	NMA$C_SOFT_OSYS	2
-#define	NMA$C_SOFT_DIAG	3
-#define	NMA$C_ACES_NONE	0
-#define	NMA$C_ACES_INCO	1
-#define	NMA$C_ACES_OUTG	2
-#define	NMA$C_ACES_BOTH	3
-#define	NMA$C_ACES_REQU	4
-#define	NMA$C_ALIINC_ENA	0
-#define	NMA$C_ALIINC_DIS	1
-#define	NMA$C_ALOUT_ENA	0
-#define	NMA$C_ALOUT_DIS	1
-#define	NMA$C_ALINC_ENA	0
-#define	NMA$C_ALINC_DIS	1
-#define	NMA$C_PRXY_ENA	0
-#define	NMA$C_PRXY_DIS	1
-#define	NMA$C_PSPCY_NOR	0
-#define	NMA$C_PSPCY_INT	1
-#define	NMA$C_XPRTY_BIL	1
-#define	NMA$C_XPRST_ON	0
-#define	NMA$C_XPRST_OFF	1
-#define	NMA$C_XPRST_SHU	2
-#define	NMA$C_XPRMN_ENA	0
-#define	NMA$C_XPRMN_DIS	1
-#define	NMA$C_XPRSB_RUN	12
-#define	NMA$C_XPRSB_UNS	13
-#define	NMA$C_XPRSB_SYN	10
-#define	NMA$C_Clear_String	0
-#define	NMA$C_Clear_Longword	-1
-#define	NMA$C_CAL_CLR	0
-#define	NMA$C_CAL_NOW	1
-#define	NMA$C_DAY_ALL	0
-#define	NMA$C_DAY_MON	1
-#define	NMA$C_DAY_TUE	2
-#define	NMA$C_DAY_WED	3
-#define	NMA$C_DAY_THU	4
-#define	NMA$C_DAY_FRI	5
-#define	NMA$C_DAY_SAT	6
-#define	NMA$C_DAY_SUN	7
-#define	NMA$C_TIC_No_Cut	0
-#define	NMA$C_TIC_Cut	1
-#define	NMA$C_CSG_No_Signal	0
-#define	NMA$c_CSG_Signal	1
-#define	NMA$c_IRC_DIS	0
-#define	NMA$c_IRC_ENA	1
-#define	NMA$c_ORC_DIS	0
-#define	NMA$c_ORC_ENA	1
-#define	NMA$c_RED_DIS	0
-#define	NMA$c_RED_ENA	1
-#define	NMA$c_MOD_NOAUTO	0
-#define	NMA$c_MOD_AUTO	1
-#define	NMA$c_SWC_DIS	0
-#define	NMA$c_SWC_ENA	1
-#define	NMA$c_MDM_OFF	0
-#define	NMA$c_MDM_ON	1
-#define	NMA$c_DTS_NO_CABLE	1
-#define	NMA$c_DTS_NO_X21_CABLE	2
-#define	NMA$c_DTS_READY	3
-#define	NMA$c_DTS_NOT_READY	4
-#define	NMA$c_DTS_ACTIVE	5
-#define	NMA$c_DTS_NO_OUTGOING	6
-#define	NMA$c_CAS_NONE	1
-#define	NMA$c_CAS_OUT	2
-#define	NMA$c_CAS_IN	3
-#define	NMA$c_CAS_OUT_R	4
-#define	NMA$c_CAS_IN_R	5
-#define	NMA$c_DTL_ACCEPT	1
-#define	NMA$c_DTL_REJECT	2
-#define	NMA$C_CAC_MAN	1
-#define	NMA$C_CAC_AUTO_CONNECT	2
-#define	NMA$C_CAC_AUTO_ACCEPT	3
-#define	NMA$C_JAN	1
-#define	NMA$C_FEB	2
-#define	NMA$C_MAR	3
-#define	NMA$C_APR	4
-#define	NMA$C_MAY	5
-#define	NMA$C_JUN	6
-#define	NMA$C_JUL	7
-#define	NMA$C_AUG	8
-#define	NMA$C_SEP	9
-#define	NMA$C_OCT	10
-#define	NMA$C_NOV	11
-#define	NMA$C_DEC	12
-#define	NMA$C_SOFD_DP	0
-#define	NMA$C_SOFD_UNA	1
-#define	NMA$C_SOFD_DU	2
-#define	NMA$C_SOFD_CNA	3
-#define	NMA$C_SOFD_DL	4
-#define	NMA$C_SOFD_QNA	5
-#define	NMA$C_SOFD_DQ	6
-#define	NMA$C_SOFD_CI	7
-#define	NMA$C_SOFD_DA	8
-#define	NMA$C_SOFD_PCL	9
-#define	NMA$C_SOFD_DUP	10
-#define	NMA$C_SOFD_LUA	11
-#define	NMA$C_SOFD_DMC	12
-#define	NMA$C_SOFD_LNA	13
-#define	NMA$C_SOFD_DN	14
-#define	NMA$C_SOFD_DLV	16
-#define	NMA$C_SOFD_LCS	17
-#define	NMA$C_SOFD_DMP	18
-#define	NMA$C_SOFD_AMB	19
-#define	NMA$C_SOFD_DTE	20
-#define	NMA$C_SOFD_DBT	21
-#define	NMA$C_SOFD_DV	22
-#define	NMA$C_SOFD_BNA	23
-#define	NMA$C_SOFD_BNT	23
-#define	NMA$C_SOFD_DZ	24
-#define	NMA$C_SOFD_LPC	25
-#define	NMA$C_SOFD_DSV	26
-#define	NMA$C_SOFD_CEC	27
-#define	NMA$C_SOFD_KDP	28
-#define	NMA$C_SOFD_IEC	29
-#define	NMA$C_SOFD_KDZ	30
-#define	NMA$C_SOFD_UEC	31
-#define	NMA$C_SOFD_KL8	32
-#define	NMA$C_SOFD_DS2	33
-#define	NMA$C_SOFD_DMV	34
-#define	NMA$C_SOFD_DS5	35
-#define	NMA$C_SOFD_DPV	36
-#define	NMA$C_SOFD_LQA	37
-#define	NMA$C_SOFD_DMF	38
-#define	NMA$C_SOFD_SVA	39
-#define	NMA$C_SOFD_DMR	40
-#define	NMA$C_SOFD_MUX	41
-#define	NMA$C_SOFD_KMY	42
-#define	NMA$C_SOFD_DEP	43
-#define	NMA$C_SOFD_KMX	44
-#define	NMA$C_SOFD_LTM	45
-#define	NMA$C_SOFD_DMB	46
-#define	NMA$C_SOFD_DES	47
-#define	NMA$C_SOFD_KCP	48
-#define	NMA$C_SOFD_MX3	49
-#define	NMA$C_SOFD_SYN	50
-#define	NMA$C_SOFD_MEB	51
-#define	NMA$C_SOFD_DSB	52
-#define	NMA$C_SOFD_BAM	53
-#define	NMA$C_SOFD_DST	54
-#define	NMA$C_SOFD_FAT	55
-#define	NMA$C_SOFD_RSM	56
-#define	NMA$C_SOFD_RES	57
-#define	NMA$C_SOFD_3C2	58
-#define	NMA$C_SOFD_3CM	59
-#define	NMA$C_SOFD_DS3	60
-#define	NMA$C_SOFD_MF2	61
-#define	NMA$C_SOFD_MMR	62
-#define	NMA$C_SOFD_VIT	63
-#define	NMA$C_SOFD_VT5	64
-#define	NMA$C_SOFD_BNI	65
-#define	NMA$C_SOFD_MNA	66
-#define	NMA$C_SOFD_PMX	67
-#define	NMA$C_SOFD_NI5	68
-#define	NMA$C_SOFD_NI9	69
-#define	NMA$C_SOFD_KMK	70
-#define	NMA$C_SOFD_3CP	71
-#define	NMA$C_SOFD_DP2	72
-#define	NMA$C_SOFD_ISA	73
-#define	NMA$C_SOFD_DIV	74
-#define	NMA$C_SOFD_QTA	75
-#define	NMA$_SUCCESS	1
-#define	NMA$_SUCCFLDRPL	9
-#define	NMA$_BADFID	0
-#define	NMA$_BADDAT	8
-#define	NMA$_BADOPR	16
-#define	NMA$_BUFTOOSMALL	24
-#define	NMA$_FLDNOTFND	32
-#define	NMA$C_OPN_MIN	0
-#define	NMA$C_OPN_NODE	0
-#define	NMA$C_OPN_LINE	1
-#define	NMA$C_OPN_LOG	2
-#define	NMA$C_OPN_OBJ	3
-#define	NMA$C_OPN_CIR	4
-#define	NMA$C_OPN_X25	5
-#define	NMA$C_OPN_X29	6
-#define	NMA$C_OPN_CNF	7
-#define	NMA$C_OPN_MAX	7
-#define	NMA$C_OPN_ALL	127
-#define	NMA$C_OPN_AC_RO	0
-#define	NMA$C_OPN_AC_RW	1
-#define	NMA$C_FN2_DLL	2
-#define	NMA$C_FN2_ULD	3
-#define	NMA$C_FN2_TRI	4
-#define	NMA$C_FN2_LOO	5
-#define	NMA$C_FN2_TES	6
-#define	NMA$C_FN2_SET	7
-#define	NMA$C_FN2_REA	8
-#define	NMA$C_FN2_ZER	9
-#define	NMA$C_FN2_LNS	14
-#define	NMA$C_OP2_CHNST	5
-#define	NMA$C_OP2_CHLST	8
-#define	NMA$C_OP2_RENCT	0
-#define	NMA$C_OP2_RENST	1
-#define	NMA$C_OP2_RELCT	4
-#define	NMA$C_OP2_RELST	5
-#define	NMA$C_OP2_ZENCT	0
-#define	NMA$C_OP2_ZELCT	2
-#define	NMA$C_EN2_KNO	0
-#define	NMA$C_EN2_LID	1
-#define	NMA$C_EN2_LCN	2
-#define	NMA$C_STS_SUC	1
-#define	NMA$C_STS_MOR	2
-#define	NMA$C_STS_PAR	3
-#define	NMA$C_STS_DON	-128
-#define	NMA$C_STS_FUN	-1
-#define	NMA$C_STS_INV	-2
-#define	NMA$C_STS_PRI	-3
-#define	NMA$C_STS_SIZ	-4
-#define	NMA$C_STS_MPR	-5
-#define	NMA$C_STS_PTY	-6
-#define	NMA$C_STS_MVE	-7
-#define	NMA$C_STS_CMP	-8
-#define	NMA$C_STS_IDE	-9
-#define	NMA$C_STS_LCO	-10
-#define	NMA$C_STS_STA	-11
-#define	NMA$C_STS_FOP	-13
-#define	NMA$C_STS_FCO	-14
-#define	NMA$C_STS_RES	-15
-#define	NMA$C_STS_PVA	-16
-#define	NMA$C_STS_LPR	-17
-#define	NMA$C_STS_FIO	-18
-#define	NMA$C_STS_MLD	-19
-#define	NMA$C_STS_ROO	-20
-#define	NMA$C_STS_MCF	-21
-#define	NMA$C_STS_PNA	-22
-#define	NMA$C_STS_PLO	-23
-#define	NMA$C_STS_HAR	-24
-#define	NMA$C_STS_OPE	-25
-#define	NMA$C_STS_SYS	-26
-#define	NMA$C_STS_PGP	-27
-#define	NMA$C_STS_BLR	-28
-#define	NMA$C_STS_PMS	-29
-#define	NMA$C_STS_ALI	-127
-#define	NMA$C_STS_OBJ	-126
-#define	NMA$C_STS_PRO	-125
-#define	NMA$C_STS_LNK	-124
-#define	NMA$C_FOPDTL_PDB	0
-#define	NMA$C_FOPDTL_LFL	1
-#define	NMA$C_FOPDTL_DFL	2
-#define	NMA$C_FOPDTL_SLF	3
-#define	NMA$C_FOPDTL_TLF	4
-#define	NMA$C_FOPDTL_SDF	5
-#define	NMA$C_FOPDTL_PDR	6
-#define	NMA$C_FOPDTL_MFL	7
-#define	NMA$C_NCEDTL_NNA	0
-#define	NMA$C_NCEDTL_INN	1
-#define	NMA$C_NCEDTL_UNA	2
-#define	NMA$C_NCEDTL_UNR	3
-#define	NMA$C_NCEDTL_RSC	4
-#define	NMA$C_NCEDTL_RJC	5
-#define	NMA$C_NCEDTL_ONA	6
-#define	NMA$C_NCEDTL_OBJ	7
-#define	NMA$C_NCEDTL_ACC	8
-#define	NMA$C_NCEDTL_BSY	9
-#define	NMA$C_NCEDTL_NRS	10
-#define	NMA$C_NCEDTL_NSD	11
-#define	NMA$C_NCEDTL_DIE	12
-#define	NMA$C_NCEDTL_DIS	13
-#define	NMA$C_NCEDTL_ABO	14
-#define	NMA$C_NCEDTL_ABM	15
-#define	NMA$C_OPEDTL_DCH	0
-#define	NMA$C_OPEDTL_TIM	1
-#define	NMA$C_OPEDTL_ORN	2
-#define	NMA$C_OPEDTL_ACT	3
-#define	NMA$C_OPEDTL_BAF	4
-#define	NMA$C_OPEDTL_RUN	5
-#define	NMA$C_OPEDTL_DSC	6
-#define	NMA$C_OPEDTL_FTL	8
-#define	NMA$C_OPEDTL_MNT	11
-#define	NMA$C_OPEDTL_LST	12
-#define	NMA$C_OPEDTL_THR	13
-#define	NMA$C_OPEDTL_TRB	14
-#define	NMA$C_OPEDTL_STA	15
-#define	NMA$V_CTLIN_TUN	2
-#define	NMA$V_CTLIN_RUN	4
-#define	NMA$V_CTLIN_FMR	5
diff --git a/sr_vvms/ntd_root.c b/sr_vvms/ntd_root.c
deleted file mode 100644
index efdb101..0000000
--- a/sr_vvms/ntd_root.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-GBLDEF struct NTD *ntd_root;
-
diff --git a/sr_vvms/obj_code.c b/sr_vvms/obj_code.c
deleted file mode 100644
index 6e7edd1..0000000
--- a/sr_vvms/obj_code.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_fcntl.h"
-#include "gtm_stdio.h"
-#include <errno.h>
-#include <sys/types.h>
-#include "gtm_stat.h"
-#include "gtm_unistd.h"
-
-#include "compiler.h"
-#include "obj_gen.h"
-#include <rtnhdr.h>
-#include "cmd_qlf.h"
-#include "cgp.h"
-#include "mmemory.h"
-#include "obj_file.h"
-#include "alloc_reg.h"
-#include "jmp_opto.h"
-#include "mlabel2xtern.h"
-#include "cg_var.h"
-#include "gtm_string.h"
-#include "stringpool.h"
-#include "rtn_src_chksum.h"
-
-GBLREF boolean_t		run_time;
-GBLREF command_qualifier	cmd_qlf;
-GBLREF int4			mvmax, mlmax, mlitmax, psect_use_tab[], sa_temps[], sa_temps_offset[];
-GBLREF mlabel 			*mlabtab;
-GBLREF mline 			mline_root;
-GBLREF mvar 			*mvartab;
-GBLREF mident			module_name;
-GBLREF spdesc			stringpool;
-GBLREF int4			curr_addr, code_size;
-GBLREF char			cg_phase;	/* code generation phase */
-GBLREF char			cg_phase_last;	/* previous code generation phase */
-
-error_def(ERR_TEXT);
-
-void cg_lab (mlabel *l, int4 base);
-
-/* The sections of the internal GT.M object are grouped according to native sections.
- * Note: Once an object is linked, no section will be released from memory. All sections
- * will be retained.
- *
- * The GT.M object layout on the disk is as follows:
- *
- *	+---------------+
- *	|     rhead	| \
- *	+---------------+  \
- *	|   generated	|   |
- *	|     code	|   |
- *	+ - - - - - - - +   |
- *	| variable tbl	|   | - R/O (GTM$CODE psect)
- *	+ - - - - - - - +   |
- *	|   label tbl	|   |
- *	+---------------+  /
- *	| line num tbl	| /
- *	+ - - - - - - - +
- *	| lit text pool	| \
- *	+---------------+  | - R/W (GTM$LITERALS)
- *	| lit mval tbl 	| /
- *	+---------------+
- *	| GTM$Rxxx      | > - R/W (GTM$Rxx psect)
- *	+---------------+
- *	|  symbol tbl 	| > - External symbol table
- *	+---------------+
- *
- */
-
-void	obj_code (uint4 src_lines, void *checksum_ctx)
-{
-	rhdtyp		rhead;
-	mline		*mlx, *mly;
-	var_tabent	*vptr;
-	mstr		rname_mstr;
-	int4		mv, lnr_pad_len;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	assert(!run_time);
-	obj_init();
-
-	/* Define the routine name global symbol. */
-	rname_mstr.addr = module_name.addr;
-	rname_mstr.len = module_name.len;
-	define_symbol(GTM_MODULE_DEF_PSECT, &rname_mstr, 0);
-	memset(&rhead, 0, SIZEOF(rhead));
-	alloc_reg();
-	jmp_opto();
-	curr_addr = SIZEOF(rhdtyp);
-	cg_phase = CGP_APPROX_ADDR;
-	cg_phase_last = CGP_NOSTATE;
-	code_gen();
-	code_size = curr_addr;
-	cg_phase = CGP_ADDR_OPT;
-	comp_lits(&rhead);
-	shrink_trips();
-	if ((cmd_qlf.qlf & CQ_MACHINE_CODE))
-	{
-		cg_phase = CGP_ASSEMBLY;
-		code_gen();
-	}
-	if (!(cmd_qlf.qlf & CQ_OBJECT))
-		return;
-	rhead.ptext_ptr = SIZEOF(rhead);
-	set_rtnhdr_checksum(&rhead, (gtm_rtn_src_chksum_ctx *)checksum_ctx);
-	rhead.vartab_ptr = code_size;
-	rhead.vartab_len = mvmax;
-	code_size += mvmax * SIZEOF(var_tabent);
-	rhead.labtab_ptr = code_size;
-	rhead.labtab_len = mlmax;
-	code_size += mlmax * SIZEOF(lab_tabent);
-	rhead.lnrtab_ptr = code_size;
-	rhead.lnrtab_len = src_lines;
-	rhead.compiler_qlf = cmd_qlf.qlf;
-	rhead.temp_mvals = sa_temps[TVAL_REF];
-	rhead.temp_size = sa_temps_offset[TCAD_REF];
-	code_size += src_lines * SIZEOF(int4);
-	lnr_pad_len = PADLEN(code_size, SECTION_ALIGN_BOUNDARY);
-	code_size += lnr_pad_len;
-	create_object_file(&rhead);
-	cg_phase = CGP_MACHINE;
-	code_gen();
-	/* Variable table: */
-	vptr = (var_tabent *)mcalloc(mvmax * SIZEOF(var_tabent));
-	if (mvartab)
-		walktree(mvartab, cg_var, (char *)&vptr);
-	else
-		assert(0 == mvmax);
-	/* Although entire vartab is available, we cannot emit the table in one chunk using emit_immed()
-	 * since var_name.addr of each entry needs relocation and should be emitted using emit_pidr()
-	 * strictly in that order to maintain proper relocation base for fixup generation.
-	 */
-	for (mv = 0; mv < mvmax; mv++)
-	{
-		emit_immed((char *)&vptr[mv], ((char *)&vptr[mv].var_name.addr - (char *)&vptr[mv]));
-		emit_pidr((int4)vptr[mv].var_name.addr, GTM_LITERALS);
-		emit_immed(&vptr[mv].hash_code, SIZEOF(vptr[mv].hash_code));
-		emit_immed(&vptr[mv].marked, SIZEOF(vptr[mv].marked));
-	}
-	/* Label table: */
-	if (mlabtab)
-	{
-		TREF(lbl_tbl_entry_index) = -1;	/* this is incremented by 1 each time a label is emitted */
-		walktree((mvar *)mlabtab, cg_lab, (char *)&rhead);
-	} else
-		assert(0 == mlmax);
-	/* External entry definitions: */
-	emit_immed((char *)&(mline_root.externalentry->rtaddr), SIZEOF(mline_root.externalentry->rtaddr));	/* line 0 */
-	for (mlx = mline_root.child ; mlx ; mlx = mly)
-	{
-		if (mlx->table)
-			emit_immed((char *)&(mlx->externalentry->rtaddr), SIZEOF(mlx->externalentry->rtaddr));
-		if (0 == (mly = mlx->child))				/* note the assignment */
-			if (0 == (mly = mlx->sibling))			/* note the assignment */
-				for (mly = mlx; ; )
-				{
-					if (0 == (mly = mly->parent))	/* note the assignment */
-						break;
-					if (mly->sibling)
-					{
-						mly = mly->sibling;
-						break;
-					}
-				}
-	}
-	if (0 != lnr_pad_len) /* emit padding so literal text pool starts on proper boundary */
-		emit_immed(PADCHARS, lnr_pad_len);
-	emit_literals();
-	close_object_file(&rhead);
-}
-
-void cg_lab (mlabel *l, int4 base)
-{
-	mstr		glob_name;
-	int4		value;
-	boolean_t	has_parms;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	if (l->ml && l->gbl)
-	{
-		if (l->mvname.len)
-		{	/* Non-null label: emit relocation */
-			emit_immed((char *)&l->mvname.len, SIZEOF(l->mvname.len));
-			emit_pidr((l->mvname.addr - (char *)stringpool.base), GTM_LITERALS); /* Offset into literal text pool */
-		} else
-			/* Null label: no relocation needed, emit mident as it is */
-			emit_immed((char *)&l->mvname, SIZEOF(l->mvname));
-		value = (SIZEOF(int4) * l->ml->line_number) + ((rhdtyp *)base)->lnrtab_ptr;
-		emit_immed((char *)&value, SIZEOF(value));
-		has_parms = (NO_FORMALLIST != l->formalcnt);	/* Flag to indicate a formallist */
-		emit_immed((char *)&has_parms, SIZEOF(has_parms));
-		mlabel2xtern(&glob_name, &module_name, &l->mvname);
-		(TREF(lbl_tbl_entry_index))++;		/* Find out the index of this label in the label table */
-		/* Define this symbol by calculating the offset of lab_ln_ptr field of the current label relatively to
-		 * the routine header.
-		 */
-		define_symbol(GTM_CODE, &glob_name, ((rhdtyp *)base)->labtab_ptr
-			+ (SIZEOF(lab_tabent) * TREF(lbl_tbl_entry_index)) + OFFSETOF(lab_tabent, lab_ln_ptr));
-	}
-	return;
-}
diff --git a/sr_vvms/ojastread.c b/sr_vvms/ojastread.c
deleted file mode 100644
index 5f60f24..0000000
--- a/sr_vvms/ojastread.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <accdef.h>
-#include <stsdef.h>
-#include <iodef.h>
-#include "efn.h"
-#include "job.h"
-
-GBLREF	short		ojpchan;
-GBLREF	int4		ojcpid;
-
-void ojastread (int expected)
-{
-	int4		status;
-	mstr		stsdsc;
-	struct
-	{
-		pmsg_type	msg;
-		char		filler[ACC$K_TERMLEN - sizeof (pmsg_type)];
-	}		stsmsg;
-	mbx_iosb	iosb;
-	error_def	(ERR_JOBFAIL);
-	error_def	(ERR_UIDMSG);
-	error_def	(ERR_UIDSND);
-
-	stsdsc.addr = &stsmsg.msg;
-	stsdsc.len = sizeof stsmsg;
-	ojmbxio (IO$_READVBLK, ojpchan, &stsdsc, &iosb, TRUE);
-	if (iosb.pid != ojcpid)
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) ERR_UIDSND);
-	}
-	if ((iosb.byte_count != sizeof stsmsg.msg) &&
-	    (iosb.byte_count != ACC$K_TERMLEN))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) ERR_UIDMSG);
-	}
-	if (stsmsg.msg.finalsts != expected)
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(3) ERR_JOBFAIL, 0, (stsmsg.msg.finalsts & ~STS$M_INHIB_MSG));
-	}
-	status = sys$setef (efn_op_job);
-	if (!(status & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(3) ERR_JOBFAIL, 0, status);
-	}
-	return;
-}
diff --git a/sr_vvms/ojch.c b/sr_vvms/ojch.c
deleted file mode 100644
index 95e5db0..0000000
--- a/sr_vvms/ojch.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "error.h"
-#include <iodef.h>
-#include <stsdef.h>
-#include "job.h"
-
-#define FATAL(error)	(error & STS$M_COND_ID | STS$K_SEVERE)
-GBLREF pchan;
-
-error_def(ERR_ASSERT);
-error_def(ERR_GTMASSERT);
-error_def(ERR_GTMASSERT2);
-error_def(ERR_GTMCHECK);
-
-CONDITION_HANDLER(ojch)
-{
-	mstr		stsdsc;
-	pmsg_type	stsmsg;
-	mbx_iosb	iosb;
-
-	switch(SIGNAL)
-	{
-		case SS$_ACCVIO:
-		case SS$_ASTFLT:
-		case SS$_OPCCUS:
-		case SS$_OPCDEC:
-		case SS$_PAGRDERR:
-		case SS$_RADRMOD:
-		case SS$_ROPRAND:
-			gtm_dump();
-			break;
-		default:
-			if ((SIGNAL == ERR_ASSERT) || (SIGNAL == ERR_GTMCHECK) || (SIGNAL == ERR_GTMASSERT)	/* BYPASSOK */
-			    || (SIGNAL == ERR_GTMASSERT))
-				gtm_dump();
-			break;
-	}
-	stsdsc.addr = &stsmsg;
-	stsdsc.len = SIZEOF(stsmsg);
-	stsmsg.unused = 0;
-	stsmsg.finalsts = SIGNAL;
-	ojmbxio(IO$_WRITEVBLK, pchan, &stsdsc, &iosb, TRUE);
-	EXIT(FATAL(SIGNAL));
-	NEXTCH;
-}
diff --git a/sr_vvms/ojchkbytcnt.c b/sr_vvms/ojchkbytcnt.c
deleted file mode 100644
index 5443720..0000000
--- a/sr_vvms/ojchkbytcnt.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <jpidef.h>
-#include <accdef.h>
-#include "vmsdtype.h"
-
-#define	TERM_READ_MIN_BCOUNT	1036
-#define	CREMBX_OVRHD		144
-
-bool ojchkbytcnt (cmaxmsg)
-int4	cmaxmsg;
-{
-	int4		preq, creq;
-	int4		status;
-	int4		bytcnt;
-	unsigned short	ret;
-	int4		iosb[2];
-	struct
-	{
-		item_list_3	item[1];
-		int4		terminator;
-	} jpi_list = {4, JPI$_BYTCNT, &bytcnt, &ret, 0};
-
-	preq = CREMBX_OVRHD + ACC$K_TERMLEN;
-	creq = CREMBX_OVRHD + cmaxmsg;
-
-	status = sys$getjpi (0, 0, 0, &jpi_list, &iosb[0], 0, 0);
-	if (status != SS$_NORMAL) rts_error(VARLSTCNT(1) status);
-	sys$synch (0, &iosb[0]);
-	if (iosb[0] != SS$_NORMAL) rts_error(VARLSTCNT(1) iosb[0]);
-
-	if (bytcnt < preq + creq) return FALSE;
-	if (bytcnt - creq < TERM_READ_MIN_BCOUNT) return FALSE;
-	return TRUE;
-}
-
diff --git a/sr_vvms/ojchkfs.c b/sr_vvms/ojchkfs.c
deleted file mode 100644
index e571850..0000000
--- a/sr_vvms/ojchkfs.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <rms.h>
-#include "io.h"
-#include "job.h"
-
-int4	ojchkfs (char *addr, int4 len, bool exist)
-{
-	int4		status;
-	struct FAB	fab;
-	struct NAM	nam;
-	char		es[MAX_FILSPC_LEN];
-	mstr		tn;			/* translated name 	  */
-	enum io_dev_type dev_typ;
-
-	fab = cc$rms_fab;
-	fab.fab$l_fna = addr;
-	fab.fab$b_fns = len;
-	if (exist)
-	{
-		nam = cc$rms_nam;
-		nam.nam$l_esa = &es[0];
-		nam.nam$b_ess = MAX_FILSPC_LEN;
-		fab.fab$l_nam = &nam;
-	}
-	status = sys$parse (&fab);
-	if (exist)
-	{
-		tn.addr = addr;
-		tn.len = len;
-		dev_typ = io_type(&tn);
-
-		if (dev_typ == rm)
-			status = sys$search (&fab);
-	}
-	return status;
-}
diff --git a/sr_vvms/ojcleanup.c b/sr_vvms/ojcleanup.c
deleted file mode 100644
index 80cadb6..0000000
--- a/sr_vvms/ojcleanup.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "ast.h"
-#include "job.h"
-
-GBLREF	short		astq_dyn_avail;
-GBLREF	bool		ojtimeout;
-GBLREF	short		ojpchan;
-GBLREF	short		ojcchan;
-GBLREF	int4		ojcpid;
-GBLREF	short		ojastq;
-
-void ojcleanup(void)
-{
-	unsigned int 	ast_stat, status;
-
-	ast_stat = sys$setast(DISABLE);
-	if (FALSE == ojtimeout)
-	{
-		if (SS$_NORMAL != (status = sys$cantim(&(ojtimeout), 0)))
-			rts_error(VARLSTCNT(1) status);
-		ojtimeout = TRUE;
-	}
-	if (0 != ojpchan)
-	{
-		if (SS$_NORMAL != (status = sys$dassgn(ojpchan)))
-			rts_error(VARLSTCNT(1) status);
-		ojpchan = 0;
-	}
-	astq_dyn_avail += ojastq;
-	if (SS$_WASSET == ast_stat)
-		ENABLE_AST;
-	ojastq = 0;
-	if (0 != ojcchan)
-	{
-		if (SS$_NORMAL != (status = sys$dassgn(ojcchan)))
-			rts_error(VARLSTCNT(1) status);
-		ojcchan = 0;
-	}
-	if (ojcpid != 0)
-	{
-		if (SS$_NORMAL != (status = sys$delprc(ojcpid)))
-			rts_error(VARLSTCNT(1) status);
-		ojcpid = 0;
-	}
-	return;
-}
diff --git a/sr_vvms/ojcrembxs.c b/sr_vvms/ojcrembxs.c
deleted file mode 100644
index 16fec3d..0000000
--- a/sr_vvms/ojcrembxs.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <lnmdef.h>
-#include <ssdef.h>
-#include "vmsdtype.h"
-#include <accdef.h>
-#include "job.h"
-#include "gt_timer.h"
-#include "outofband.h"
-#include "dfntmpmbx.h"
-
-GBLREF	bool	ojtimeout;
-GBLREF	short	ojpchan;
-GBLREF	short	ojcchan;
-GBLREF  int4	outofband;
-
-static readonly mstr lnm$group = {9,  "LNM$GROUP"};
-static readonly mstr lnm$process = {11, "LNM$PROCESS"};
-
-bool ojcrembxs(uint4 *punit, struct dsc$descriptor_s *cmbx, int4 cmaxmsg, bool timed)
-{
-	int4		status;
-	$DESCRIPTOR	(plognam, "GTM$JOB_PMBX");
-	$DESCRIPTOR	(clognam, "GTM$JOB_CMBX");
-	$DESCRIPTOR	(lnmtab, "LNM$TEMPORARY_MAILBOX");
-	char		pmbxnam[MAX_MBXNAM_LEN];
-	short		pmbxnamsz;
-	struct
-	{
-		item_list_3	le[1];
-		int4		terminator;
-	}		item_list;
-	uint4	ojmba_to_unit ();
-
-
-	status = dfntmpmbx (lnm$process.len, lnm$process.addr);
-	if (!(status & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	do {
-		status = sys$crembx (0, &ojpchan, ACC$K_TERMLEN, ACC$K_TERMLEN,
-					0, 0, &plognam);
-		if (outofband)
-		{	ojcleanup();
-			outofband_action(FALSE);
-		}
-		switch (status)
-		{
-		case SS$_NORMAL:
-			break;
-		case SS$_NOIOCHAN:
-			hiber_start (1000);
-			if (timed && ojtimeout)
-			{
-				status = dfntmpmbx (lnm$group.len, lnm$group.addr);
-				if (!(status & 1))
-				{
-					ojerrcleanup ();
-					rts_error(VARLSTCNT(1) status);
-				}
-				return FALSE;
-			}
-			break;
-		default:
-			dfntmpmbx (lnm$group.len, lnm$group.addr);
-			ojerrcleanup ();
-			rts_error(VARLSTCNT(1) status);
-			break;
-		}
-	} while (status != SS$_NORMAL);
-	item_list.le[0].buffer_length		= MAX_MBXNAM_LEN;
-	item_list.le[0].item_code		= LNM$_STRING;
-	item_list.le[0].buffer_address		= &pmbxnam[0];
-	item_list.le[0].return_length_address	= &pmbxnamsz;
-	item_list.terminator			= 0;
-	status = sys$trnlnm (0, &lnmtab, &plognam, 0, &item_list);
-	if (!(status & 1))
-	{
-		dfntmpmbx (lnm$group.len, lnm$group.addr);
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	status = sys$dellnm (&lnmtab, &plognam, 0);
-	if (!(status & 1))
-	{
-		dfntmpmbx (lnm$group.len, lnm$group.addr);
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	*punit = ojmba_to_unit (&pmbxnam[0]);
-
-	do {
-		status = sys$crembx (0, &ojcchan, cmaxmsg, cmaxmsg,
-					0, 0, &clognam);
-		if (outofband)
-		{	ojcleanup();
-			outofband_action(FALSE);
-		}
-		switch (status)
-		{
-		case SS$_NORMAL:
-			break;
-		case SS$_NOIOCHAN:
-			hiber_start (1000);
-			if (timed && ojtimeout)
-			{
-				status = dfntmpmbx (lnm$group.len, lnm$group.addr);
-				if (!(status & 1))
-				{
-					ojerrcleanup ();
-					rts_error(VARLSTCNT(1) status);
-				}
-				return FALSE;
-			}
-			break;
-		default:
-			dfntmpmbx (lnm$group.len, lnm$group.addr);
-			ojerrcleanup ();
-			rts_error(VARLSTCNT(1) status);
-			break;
-		}
-	} while (status != SS$_NORMAL);
-	item_list.le[0].buffer_address		= cmbx->dsc$a_pointer;
-	item_list.le[0].return_length_address	= &(cmbx->dsc$w_length);
-	status = sys$trnlnm (0, &lnmtab, &clognam, 0, &item_list);
-	if (!(status & 1))
-	{
-		dfntmpmbx (lnm$group.len, lnm$group.addr);
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	status = sys$dellnm (&lnmtab, &clognam, 0);
-	if (!(status & 1))
-	{
-		dfntmpmbx (lnm$group.len, lnm$group.addr);
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-
-	status = dfntmpmbx (lnm$group.len, lnm$group.addr);
-	if (!(status & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/ojdefbaspri.c b/sr_vvms/ojdefbaspri.c
deleted file mode 100644
index 63a7cb1..0000000
--- a/sr_vvms/ojdefbaspri.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include "vmsdtype.h"
-#include "efn.h"
-#include "job.h"
-
-void ojdefbaspri (int4 *baspri)
-{
-	int4		status;
-	unsigned short	ret;
-	short		iosb[4];
-	struct
-	{
-		item_list_3	le[1];
-		int4		terminator;
-	}		item_list;
-
-	item_list.le[0].buffer_length		= sizeof *baspri;
-	item_list.le[0].item_code		= JPI$_PRIB;
-	item_list.le[0].buffer_address		= baspri;
-	item_list.le[0].return_length_address	= &ret;
-	item_list.terminator			= 0;
-
-	status = sys$getjpi (0, 0, 0, &item_list, &iosb[0], 0, 0);
-	if (!(status & 1))	rts_error(VARLSTCNT(1) status);
-	sys$synch (efn_immed_wait, &iosb[0]);
-	if (!(iosb[0] & 1))	rts_error(VARLSTCNT(1) iosb[0]);
-	return;
-}
diff --git a/sr_vvms/ojdefdeffs.c b/sr_vvms/ojdefdeffs.c
deleted file mode 100644
index dc16aef..0000000
--- a/sr_vvms/ojdefdeffs.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <rms.h>
-#include "job.h"
-
-static unsigned char *deffsbuf;
-
-void ojdefdeffs (mstr *deffs)
-{
-	int4		status;
-	struct FAB	fab;
-	struct NAM	nam;
-
-	if (!deffsbuf)
-		deffsbuf = malloc(MAX_FILSPC_LEN);
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &nam;
-	fab.fab$l_fna = "[]";
-	fab.fab$b_fns = 2;
-	nam.nam$l_esa = &deffsbuf[0];
-	nam.nam$b_ess = MAX_FILSPC_LEN;
-	status = sys$parse (&fab);
-	if (status != RMS$_NORMAL) rts_error(VARLSTCNT(1) status);
-
-	deffs->len = nam.nam$b_esl - 2;
-	deffs->addr = &deffsbuf[0];
-	return;
-}
diff --git a/sr_vvms/ojdefimage.c b/sr_vvms/ojdefimage.c
deleted file mode 100644
index 7754457..0000000
--- a/sr_vvms/ojdefimage.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include "vmsdtype.h"
-#include "job.h"
-#include "efn.h"
-
-void ojdefimage (mstr *image)
-{
-	static mstr imagebuf = {0, 0};
-	int4 status;
-	unsigned char local_buff[MAX_FILSPC_LEN];
-	short iosb[4];
-	unsigned short length;
-	struct
-	{
-		item_list_3	le[1];
-		int4		terminator;
-	}		item_list;
-
-	if (!imagebuf.addr)
-	{
-		item_list.le[0].buffer_length = MAX_FILSPC_LEN;
-		item_list.le[0].item_code = JPI$_IMAGNAME;
-		item_list.le[0].buffer_address = local_buff;
-		item_list.le[0].return_length_address = &length;
-		item_list.terminator = 0;
-		status = sys$getjpi (0, 0, 0, &item_list, &iosb[0], 0, 0);
-		if (!(status & 1))
-			rts_error(VARLSTCNT(1) status);
-		sys$synch (efn_immed_wait, &iosb[0]);
-		if (!(iosb[0] & 1))
-			rts_error(VARLSTCNT(1) iosb[0]);
-		imagebuf.addr = malloc(length);
-		imagebuf.len = length;
-		memcpy(imagebuf.addr, local_buff, length);
-	}
-	*image = imagebuf;
-	return;
-}
diff --git a/sr_vvms/ojdefprcnam.c b/sr_vvms/ojdefprcnam.c
deleted file mode 100644
index 872bbce..0000000
--- a/sr_vvms/ojdefprcnam.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2008 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <jpidef.h>
-#include <descrip.h>
-
-#include "vmsdtype.h"
-#include "job.h"
-#include "efn.h"
-#include "min_max.h"
-
-
-GBLREF mval		dollar_job;
-GBLDEF char		defprcnambuf[MAX_PRCNAM_LEN];
-
-static short	jobcnt = 0;
-
-void ojdefprcnam (struct dsc$descriptor_s *prcnam)
-{
-	int4		status;
-	char		*t;
-	unsigned short	prcnamlen;
-	char		username[12];
-	unsigned short	ret;
-	short		iosb[4];
-	struct
-	{
-		item_list_3	le[1];
-		int4		terminator;
-	}		item_list;
-	$DESCRIPTOR	(blank, " ");
-	$DESCRIPTOR	(usrnam, &username[0]);
-	unsigned short	usernamelen;
-	char		pidstr[8];
-	unsigned short	pidstrlen;
-	char		jobcntstr[8];
-	unsigned short	jobcntstrlen;
-	unsigned short	ojhex_to_str ();
-
-	item_list.le[0].buffer_length		= sizeof username;
-	item_list.le[0].item_code		= JPI$_USERNAME;
-	item_list.le[0].buffer_address		= &username[0];
-	item_list.le[0].return_length_address	= &ret;
-	item_list.terminator			= 0;
-
-	status = sys$getjpi (0, 0, 0, &item_list, &iosb[0], 0, 0);
-	if (!(status & 1))	rts_error(VARLSTCNT(1) status);
-	sys$synch (efn_immed_wait, &iosb[0]);
-	if (!(iosb[0] & 1))	rts_error(VARLSTCNT(1) iosb[0]);
-
-	usrnam.dsc$w_length = sizeof username;
-	if ((usernamelen = lib$locc (&blank, &usrnam)) == 0)
-		usernamelen = 13;
-
-	--usernamelen;
-	pidstrlen = ojhex_to_str ((int4) MV_FORCE_INTD(&dollar_job), &pidstr[0]);
-	jobcnt++;
-	jobcntstrlen = ojhex_to_str (jobcnt, &jobcntstr[0]);
-	usernamelen = MIN(usernamelen, MAX_PRCNAM_LEN - (1 + pidstrlen + 1 + jobcntstrlen));
-	prcnamlen = usernamelen + 1 + pidstrlen + 1 + jobcntstrlen;
-	assert (prcnamlen <= MAX_PRCNAM_LEN);
-	prcnam->dsc$w_length = prcnamlen;
-	t = prcnam->dsc$a_pointer = &defprcnambuf[0];
-	memcpy (t, &username[0], usernamelen);
-	t += usernamelen;
-	*t++ = '_';
-	memcpy (t, &pidstr[0], pidstrlen);
-	t += pidstrlen;
-	*t++ = 'J';
-	memcpy (t, &jobcntstr[0], jobcntstrlen);
-	return;
-}
diff --git a/sr_vvms/ojerrcleanup.c b/sr_vvms/ojerrcleanup.c
deleted file mode 100644
index a62d93a..0000000
--- a/sr_vvms/ojerrcleanup.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "ast.h"
-#include "job.h"
-
-GBLREF	short		astq_dyn_avail;
-GBLREF	bool		ojtimeout;
-GBLREF	short		ojpchan;
-GBLREF	short		ojcchan;
-GBLREF	int4		ojcpid;
-GBLREF	short		ojastq;
-
-void ojerrcleanup ()
-{
-	sys$setast(DISABLE);
-	if (FALSE == ojtimeout)
-	{
-		sys$cantim(&(ojtimeout), 0);
-		ojtimeout = TRUE;
-	}
-	if (0 != ojpchan)
-	{
-		sys$dassgn(ojpchan);
-		ojpchan = 0;
-	}
-	astq_dyn_avail += ojastq;
-	sys$setast(ENABLE);
-	ojastq = 0;
-	if (0 != ojcchan)
-	{
-		sys$dassgn(ojcchan);
-		ojcchan = 0;
-	}
-	if (0 != ojcpid)
-	{
-		sys$delprc(ojcpid);
-		ojcpid = 0;
-	}
-	return;
-}
diff --git a/sr_vvms/ojhex_to_str.c b/sr_vvms/ojhex_to_str.c
deleted file mode 100644
index 34f4813..0000000
--- a/sr_vvms/ojhex_to_str.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-unsigned short ojhex_to_str (s, t)
-uint4	s;
-char		*t;
-{
-	char		buf[8];
-	unsigned short	i, d, len;
-
-	i = 0;
-	do {
-		d = s % 0x10;
-		s = s / 0x10;
-		buf[i++] = d + ((d <= 9) ? '0' : 'A' - 0xA);
-	} while (s > 0);
-	len = i;
-	do {
-		*t++ = buf[--i];
-	} while (i > 0);
-
-	return len;
-}
diff --git a/sr_vvms/ojmba_to_unit.c b/sr_vvms/ojmba_to_unit.c
deleted file mode 100644
index 0eb9caa..0000000
--- a/sr_vvms/ojmba_to_unit.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-uint4 ojmba_to_unit (src)
-char	*src;
-{
-	uint4	n;
-
-	n = 0;
-	assert (*src == 'M');
-	src++;
-	assert (*src == 'B');
-	src++;
-	assert (*src == 'A');
-	src++;
-	while (('0' <= *src) && (*src <= '9'))
-	{
-		n *= 10;
-		n += (*src - '0');
-		src++;
-	}
-
-	return n;
-}
diff --git a/sr_vvms/ojmbxio.c b/sr_vvms/ojmbxio.c
deleted file mode 100644
index 45e08ff..0000000
--- a/sr_vvms/ojmbxio.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <iodef.h>
-#include "efn.h"
-#include "job.h"
-
-void ojmbxio (int4 func, short chan, mstr *msg, short *iosb, bool now)
-{
-	int4		status;
-
-	assert (func == IO$_READVBLK ||
-		func == IO$_WRITEVBLK ||
-		func == IO$_WRITEOF);
-	if (now) func |= IO$M_NOW;
-	status = sys$qio (efn_immed_wait, chan, func, iosb, 0, 0,
-				msg->addr, msg->len, 0, 0, 0, 0);
-	if (!(status & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	sys$synch (efn_immed_wait, iosb);
-	if (!(*iosb & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) *iosb);
-	}
-	return;
-}
diff --git a/sr_vvms/ojparams.c b/sr_vvms/ojparams.c
deleted file mode 100644
index 1d023f2..0000000
--- a/sr_vvms/ojparams.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <ssdef.h>
-#include <descrip.h>
-#include <rmsdef.h>
-#include <prcdef.h>
-#include "job.h"
-#include "min_max.h"
-
-static readonly unsigned char definput[] = "NL:";
-static readonly unsigned char deflogfile[] = "NL:";
-
-static unsigned char *defoutbuf;
-static unsigned char *deferrbuf;
-
-LITREF	jp_datatype	job_param_datatypes[];
-LITREF	mstr		define_gtm$job$_;
-LITREF	mstr		set_default_;
-LITREF	mstr		atsign;
-LITREF	mstr		run__nodebug_;
-
-error_def		(ERR_IVTIME);
-error_def		(ERR_PRCNAMLEN);
-error_def		(ERR_PARFILSPC);
-
-void ojparams(unsigned char *p, mval *routine, bool *defprcnam, int4 *cmaxmsg, mstr *image,
-        mstr *input, mstr *output, mstr *error, struct dsc$descriptor_s *prcnam, int4 *baspri,
-        int4 *stsflg, mstr *gbldir, mstr *startup, struct dsc$descriptor_s *logfile, mstr *deffs,
-        quadword *schedule)
-{
-	jp_type			ch;
-	int4			status;
-	struct dsc$descriptor_s	timdsc;
-	int4			defstsflg;
-	MSTR_CONST(defoutext, ".MJO");
-	MSTR_CONST(deferrext, ".MJE");
-
-/* Initializations */
-	*defprcnam = FALSE;
-	defstsflg = PRC$M_DETACH;
-	*cmaxmsg = MAX(*cmaxmsg, (define_gtm$job$_.len + MAX_PIDSTR_LEN));
-	image->len = 0;
-	input->len = output->len = error->len = 0;
-	prcnam->dsc$w_length	= 0;
-	prcnam->dsc$b_dtype	= DSC$K_DTYPE_T;
-	prcnam->dsc$b_class	= DSC$K_CLASS_S;
-	*baspri = JP_NO_BASPRI;
-	*stsflg = defstsflg;
-	gbldir->len = 0;
-	startup->len = 0;
-	logfile->dsc$w_length	= 0;
-	logfile->dsc$b_dtype	= DSC$K_DTYPE_T;
-	logfile->dsc$b_class	= DSC$K_CLASS_S;
-	deffs->len = 0;
-	schedule->hi = schedule->lo = 0;
-
-/* Process parameter list */
-	while (*p != jp_eol)
-	{
-		switch (ch = *p++)
-		{
-		case jp_account:
- 			*stsflg &= (~PRC$M_NOACNT);
-			break;
-		case jp_default:
-			if (*p != 0)
-			{
-				deffs->len = (int)((unsigned char) *p);
-				deffs->addr = (p + 1);
-			}
-			break;
-		case jp_detached:
- 			*stsflg |= PRC$M_DETACH;
-			break;
-		case jp_error:
-			if (*p != 0)
-			{
-				error->len = (int)((unsigned char) *p);
-				error->addr = (p + 1);
-			}
-			break;
-		case jp_gbldir:
-			if (*p != 0)
-			{
-				gbldir->len = (int)((unsigned char) *p);
-				gbldir->addr = (p + 1);
-			}
-			break;
-		case jp_image:
-			if (*p != 0)
-			{
-				image->len = (int)((unsigned char) *p);
-				image->addr = p + 1;
-			}
-			break;
-		case jp_input:
-			if (*p != 0)
-			{
-				input->len = (int)((unsigned char) *p);
-				input->addr = p + 1;
-			}
-			break;
-		case jp_logfile:
-			if (*p != 0)
-			{
-				logfile->dsc$w_length = (int)((unsigned char) *p);
-				logfile->dsc$a_pointer = p + 1;
-			}
-			break;
-		case jp_noaccount:
-			*stsflg |= PRC$M_NOACNT;
-			break;
-		case jp_nodetached:
- 			*stsflg &= (~PRC$M_DETACH);
-			break;
-		case jp_noswapping:
-			*stsflg |= PRC$M_PSWAPM;
-			break;
-		case jp_output:
-			if (*p != 0)
-			{
-				output->len = (int)((unsigned char) *p);
-				output->addr = p + 1;
-			}
-			break;
-		case jp_priority:
-			*baspri = *(int4 *)p;
-			break;
-		case jp_process_name:
-			if (*p != 0)
-			{
-				prcnam->dsc$w_length = (int)((unsigned char) *p);
-				prcnam->dsc$a_pointer = p + 1;
-			}
-			break;
-		case jp_schedule:
-			timdsc.dsc$w_length = (int)((unsigned char) *p);
-			timdsc.dsc$b_dtype = DSC$K_DTYPE_T;
-			timdsc.dsc$b_class = DSC$K_CLASS_S;
-			timdsc.dsc$a_pointer = p + 1;
-			status = sys$bintim (&timdsc, schedule);
-			if (status != SS$_NORMAL)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_IVTIME, 2, timdsc.dsc$w_length, timdsc.dsc$a_pointer);
-			break;
-		case jp_startup:
-			if (*p != 0)
-			{
-				startup->len = (int)((unsigned char) *p);
-				startup->addr = p + 1;
-			}
-			break;
-		case jp_swapping:
-			*stsflg &= (~PRC$M_PSWAPM);
-			break;
-		default:
-			GTMASSERT;
-		}
-		switch (job_param_datatypes[ch])
-		{
-		case jpdt_nul:
-			break;
-		case jpdt_num:
-			p += SIZEOF(int4);
-			break;
-		case jpdt_str:
-			p += ((int)((unsigned char)*p)) + 1;
-			break;
-		default:
-			GTMASSERT;
-		}
-	}
-
-/* Defaults and Checks */
-	if (image->len == 0)
-		ojdefimage (image);
-	else
-		if ((status = ojchkfs (image->addr, image->len, TRUE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 5, "IMAGE", image->len, image->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, run__nodebug_.len + image->len);
-	if (input->len == 0)
-	{
-		input->len = SIZEOF(definput) - 1;
-		input->addr = definput;
-	}
-	else
-		if ((status = ojchkfs (input->addr, input->len, TRUE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 5, "INPUT", input->len, input->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, 1 + input->len);
-	if (output->len == 0)
-	{
-		if (!defoutbuf)
-			defoutbuf = malloc(MAX_FILSPC_LEN);
-		memcpy (&defoutbuf[0], routine->str.addr, routine->str.len);
-		memcpy (&defoutbuf[routine->str.len], defoutext.addr, defoutext.len);
-		if (*defoutbuf == '%')
-			*defoutbuf = '_';
-		output->len = routine->str.len + defoutext.len;
-		output->addr = &defoutbuf[0];
-	}
-	else
-		if ((status = ojchkfs (output->addr, output->len, FALSE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 6, "OUTPUT", output->len, output->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, 1 + output->len);
-	if (error->len == 0)
-	{
-		if (!deferrbuf)
-			deferrbuf = malloc(MAX_FILSPC_LEN);
-		memcpy (&deferrbuf[0], routine->str.addr, routine->str.len);
-		memcpy (&deferrbuf[routine->str.len], deferrext.addr, deferrext.len);
-		if (*deferrbuf == '%')
-			*deferrbuf = '_';
-		error->len = routine->str.len + deferrext.len;
-		error->addr = &deferrbuf[0];
-	}
-	else
-		if ((status = ojchkfs (error->addr, error->len, FALSE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 5, "ERROR", error->len, error->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, 1 + error->len);
-
-	if (prcnam->dsc$w_length > MAX_PRCNAM_LEN)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
-				ERR_PRCNAMLEN, 3, prcnam->dsc$w_length, prcnam->dsc$a_pointer, MAX_PRCNAM_LEN);
-	if (prcnam->dsc$w_length == 0)
-	{
-		ojdefprcnam (prcnam);
-		*defprcnam = TRUE;
-	}
-	if (*baspri == JP_NO_BASPRI)
-		ojdefbaspri (baspri);
-
-	if (gbldir->len != 0)
-		if ((status = ojchkfs (gbldir->addr, gbldir->len, FALSE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 6, "GBLDIR", gbldir->len, gbldir->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, 1 + gbldir->len);
-	if (startup->len != 0)
-		if ((status = ojchkfs (startup->addr, startup->len, TRUE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7)
-					ERR_PARFILSPC, 4, 7, "STARTUP", startup->len, startup->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, atsign.len + startup->len);
-	if (deffs->len == 0)
-		ojdefdeffs (deffs);
-	else
-		if ((status = ojchkfs (deffs->addr, deffs->len, FALSE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 7, "DEFAULT", deffs->len, deffs->addr, status);
-	*cmaxmsg = MAX(*cmaxmsg, set_default_.len + deffs->len);
-	if (logfile->dsc$w_length == 0)
-	{
-		logfile->dsc$w_length = SIZEOF(deflogfile) - 1;
-		logfile->dsc$a_pointer = deflogfile;
-	}
-	else
-		if ((status = ojchkfs (logfile->dsc$a_pointer, logfile->dsc$w_length, FALSE)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_PARFILSPC, 4, 7, "LOGFILE", logfile->dsc$w_length,
-				logfile->dsc$a_pointer, status);
-	return;
-}
diff --git a/sr_vvms/ojsetattn.c b/sr_vvms/ojsetattn.c
deleted file mode 100644
index 175c785..0000000
--- a/sr_vvms/ojsetattn.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <iodef.h>
-#include "efn.h"
-#include "job.h"
-
-GBLREF	short	ojpchan;
-
-void ojsetattn (int msg)
-{
-	int4		status;
-	short		iosb[4];
-
-	status = sys$clref (efn_op_job);
-	if (!(status & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	status = sys$qio (efn_immed_wait, ojpchan, IO$_SETMODE | IO$M_WRTATTN,
-			iosb, 0, 0, ojastread, msg, 0, 0, 0, 0);
-	if (!(status & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) status);
-	}
-	sys$synch (efn_immed_wait, iosb);
-	if (!(iosb[0] & 1))
-	{
-		ojerrcleanup ();
-		rts_error(VARLSTCNT(1) iosb[0]);
-	}
-	return;
-}
diff --git a/sr_vvms/ojtmrinit.c b/sr_vvms/ojtmrinit.c
deleted file mode 100644
index 850d90e..0000000
--- a/sr_vvms/ojtmrinit.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "ast.h"
-#include "efn.h"
-#include "iotimer.h"
-#include "job.h"
-#include "rel_quant.h"
-
-GBLREF	short		astq_dyn_avail;
-GBLREF	bool		ojtimeout;
-GBLREF	short		ojastq;
-
-void ojtmrinit(int4 *timeout)
-{
-	int4		addend, onesec;
-	unsigned int	ast_stat, status;
-	quadword	timblk;
-
-	onesec = -10000000;	/* 1 second delta time */
-	addend = 0;
-	lib$emul(timeout, &onesec, &addend, &timblk);
-	ast_stat = sys$setast(DISABLE);
-	while (astq_dyn_avail < 1)
-	{
-		ENABLE_AST;
-		rel_quant();
-		DISABLE_AST;
-	}
-	ojastq++;
-	--astq_dyn_avail;
-	if (SS$_WASSET == ast_stat)
-		sys$setast(ENABLE);
-	ojtimeout = FALSE;
-	status = sys$setimr(efn_timer, &timblk, &ojtmrrtn, &(ojtimeout), 0);
-	if (!(status & 1))
-	{
-		astq_dyn_avail++;
-		rts_error(VARLSTCNT(1) status);
-	}
-	return;
-}
diff --git a/sr_vvms/ojtmrrtn.c b/sr_vvms/ojtmrrtn.c
deleted file mode 100644
index be036c7..0000000
--- a/sr_vvms/ojtmrrtn.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "job.h"
-
-GBLREF	short		astq_dyn_avail;
-GBLREF	bool		ojtimeout;
-GBLREF	short		ojastq;
-
-void ojtmrrtn (void)
-{
-	assert (lib$ast_in_prog());
-	assert (ojtimeout == FALSE);
-	--ojastq;
-	astq_dyn_avail++;
-	ojtimeout = TRUE;
-	return;
-}
diff --git a/sr_vvms/ojunit_to_mba.c b/sr_vvms/ojunit_to_mba.c
deleted file mode 100644
index 9243a1d..0000000
--- a/sr_vvms/ojunit_to_mba.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-unsigned short ojunit_to_mba (targ, n)
-char		*targ;
-uint4	n;
-{
-	char		buf[16];
-	unsigned short	i, len;
-
-	i = 0;
-	do {
-		buf[i++] = '0' + n % 10;
-		n = n / 10;
-	} while (n != 0);
-	len = i + 5;
-
-	*targ++ = '_';
-	*targ++ = 'M';
-	*targ++ = 'B';
-	*targ++ = 'A';
-	do {
-		*targ++ = buf[--i];
-	} while (i > 0);
-	*targ++ = ':';
-
-	return len;
-}
diff --git a/sr_vvms/op_fgnlookup.c b/sr_vvms/op_fgnlookup.c
deleted file mode 100644
index cab6150..0000000
--- a/sr_vvms/op_fgnlookup.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "zcall.h"
-
-GBLREF zctabrtn	*zctab, *zctab_end;
-GBLREF zcpackage *zcpack_start, *zcpack_end;
-
-zctabrtn *op_fgnlookup (mval *package, mval *extref)
-{
-	zctabrtn	*zcrtn, *zcrtn_top;
-	zcpackage	*zcpack;
-	error_def	(ERR_ZCALLTABLE);
-
-	assert(MV_IS_STRING(package));	/* package and routine are literal strings */
-	assert(MV_IS_STRING(extref));
-
-	if (package->str.len)
-	{
-		zcpack = zcpack_start;
-		while (zcpack < zcpack_end)
-		{
-			if (*zcpack->packname == 0) rts_error (ERR_ZCALLTABLE);
-			if ((*zcpack->packname == package->str.len) &&
-				!memcmp (zcpack->packname + 1, package->str.addr, package->str.len))
-				break;
-			zcpack++;
-		}
-		if (zcpack >= zcpack_end)
-		{	return (zctabrtn *) 0;
-		}
-		zcrtn = zcpack->begin;
-		zcrtn_top = zcpack->end;
-		if ((zcrtn > zctab_end || zcrtn < zctab) ||
-			(zcrtn_top > zctab_end || zcrtn_top < zctab) || (zcrtn > zcrtn_top))
-			 rts_error(ERR_ZCALLTABLE);
-	}
-	else
-	{	zcrtn = zctab;
-		zcrtn_top = zctab_end;
-	}
-
-	while (zcrtn < zcrtn_top)
-	{
-		if ((zcrtn >= zctab_end) || (zcrtn->entry_length == 0) || (zcrtn->callnamelen == 0))
-			rts_error (ERR_ZCALLTABLE);
-		if ((zcrtn->callnamelen == extref->str.len) &&
-			!memcmp (zcrtn->callname, extref->str.addr, extref->str.len))
-			break;
-		zcrtn = (zctabrtn *) ((char *) zcrtn + zcrtn->entry_length);
-	}
-	if (zcrtn >= zcrtn_top)
-	{	zcrtn = (zctabrtn *) 0;
-	}
-	return zcrtn;
-}
diff --git a/sr_vvms/op_fgnlookup.h b/sr_vvms/op_fgnlookup.h
deleted file mode 100644
index 58f9116..0000000
--- a/sr_vvms/op_fgnlookup.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef __OP_FGNLOOKUP_H__
-#define __OP_FGNLOOKUP_H__
-
-zctabrtn *op_fgnlookup(mval *package, mval *extref);
-
-#endif
-
diff --git a/sr_vvms/op_fn.h b/sr_vvms/op_fn.h
deleted file mode 100644
index c7ce33d..0000000
--- a/sr_vvms/op_fn.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*	File modified by Maccrone on  4-DEC-1986 14:45:13.23    */
-/*	File modified by Maccrone on  4-DEC-1986 08:28:30.71    */
-typedef struct
-{	char		len;
-	char		name[20];
-	short int 	item_code;
-}dvi_struct;
-
-typedef struct
-{	char	index;
-	char	len;
-}dvi_index_struct;
-
-typedef struct
-{	short int	bufflen;
-	short int	itmcode;
-	int4		buffaddr;
-	int4		retlen;
-	int4		end;
-}itmlist_struct;
diff --git a/sr_vvms/op_fnfgncal.c b/sr_vvms/op_fnfgncal.c
deleted file mode 100644
index 16f49dd..0000000
--- a/sr_vvms/op_fnfgncal.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <stdarg.h>
-
-#include "zcall.h"
-#include "have_crit.h"
-
-GBLREF volatile int4	gtmMallocDepth;
-
-error_def(ERR_ZCALLTABLE);
-error_def(ERR_ZCRTENOTF);
-error_def(ERR_ZCARGMSMTCH);
-
-void op_fnfgncal (mval *dst, ...)
-{
-	va_list		var;
-	int4		mask, i, argcnt;
-	mval		*mvallist[256];		/* maximum of fewer than 256 arguments passed via VAX calls instruction */
-	zctabrtn	*zcrtn;
-	unsigned char	*lastout;
-
-	va_start(var, dst);
-	zcrtn = va_arg(var, zctabrtn *);
-	if (!zcrtn)
-	{
-		va_end(var);
-		rts_error (VARLSTCNT(4) ERR_ZCRTENOTF, 2, 0, 0);
-	}
-	mask = va_arg(var, int4);
-	argcnt = va_arg(var, int4);
-
-	if (argcnt > zcrtn->n_inputs)
-	{
-		va_end(var);
-		rts_error (ERR_ZCARGMSMTCH, 2, argcnt, zcrtn->n_inputs);
-	}
-
-	lastout = (unsigned char *) zcrtn
-		  + ROUND_UP(SIZEOF(zctabrtn) + zcrtn->callnamelen - 1 + SIZEOF(zctabret), SIZEOF(int4))
-		  + zcrtn->n_inputs * SIZEOF(zctabinput)
-		  + zcrtn->n_outputs * SIZEOF(zctaboutput);
-
-	if (ROUND_UP((int) lastout + 1, SIZEOF(int4)) != (unsigned char *) zcrtn + zcrtn->entry_length)
-	{
-		va_end(var);
-		rts_error (ERR_ZCALLTABLE);
-	}
-
-	for (i = 0;   i < argcnt;  i++)
-		mvallist[i] = va_arg(var, mval *);
-	va_end(var);
-
-	assert(INTRPT_OK_TO_INTERRUPT == intrpt_ok_state); /* interrupts should be enabled for external calls */
-
-	zc_makespace (dst, mask, mvallist, &mvallist[argcnt], zcrtn, *lastout);
-
-	return;
-}
diff --git a/sr_vvms/op_fngetdvi.c b/sr_vvms/op_fngetdvi.c
deleted file mode 100644
index 1a47603..0000000
--- a/sr_vvms/op_fngetdvi.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <dvidef.h>
-#include <devdef.h>
-#include <ssdef.h>
-#include <descrip.h>
-#include "stringpool.h"
-#include "op_fn.h"
-#include "efn.h"
-#include "gtm_caseconv.h"
-#include "mvalconv.h"
-#include "op.h"
-
-#define MIN_INDEX 0
-#define MAX_INDEX 25
-#define MAX_DVI_STRLEN 128
-#define MAX_DEV_LENGTH 63
-#define MAX_KEY_LENGTH 14
-#define VAL_LENGTH 4
-#define SPL_CODE 83
-#define HEX_LEN 8
-
-
-static readonly dvi_struct dvi_table[] =
-{
-	{ 6, "ACPPID" , DVI$_ACPPID },		{ 7, "ACPTYPE", DVI$_ACPTYPE },
-	{ 3, "ALL" ,DVI$_ALL },			{ 9, "ALLDEVNAM", DVI$_ALLDEVNAM },
-	{ 9, "ALTYPEAHD", DVI$_TT_ALTYPEAHD },	{ 7, "ANSICRT", DVI$_TT_ANSICRT },
-	{ 10, "APP_KEYPAD", DVI$_TT_APP_KEYPAD },{ 8, "AUTOBAUD", DVI$_TT_AUTOBAUD },
-	{ 3,"AVL" , DVI$_AVL },			{ 3, "AVO", DVI$_TT_AVO },
-	{ 5, "BLOCK", DVI$_TT_BLOCK },		{ 9, "BRDCSTMBX", DVI$_TT_BRDCSTMBX },
-	{ 3,"CCL" , DVI$_CCL },			{ 7, "CLUSTER", DVI$_CLUSTER },
-	{ 9, "CONCEALED", DVI$_CONCEALED },	{ 6, "CRFILL", DVI$_TT_CRFILL },
-	{ 9, "CYLINDERS", DVI$_CYLINDERS },
-	{ 6, "DECCRT", DVI$_TT_DECCRT },
-	{ 9, "DEVBUFSIZ", DVI$_DEVBUFSIZ },	{ 7, "DEVCHAR", DVI$_DEVCHAR },
-	{ 8, "DEVCHAR2", DVI$_DEVCHAR2 },	{ 8, "DEVCLASS", DVI$_DEVCLASS },
-	{ 9, "DEVDEPEND", DVI$_DEVDEPEND },	{ 10, "DEVDEPEND2", DVI$_DEVDEPEND2 },
-	{ 10, "DEVLOCKNAM", DVI$_DEVLOCKNAM },	{ 6, "DEVNAM", DVI$_DEVNAM },
-	{ 6, "DEVSTS", DVI$_DEVSTS },		{ 7, "DEVTYPE", DVI$_DEVTYPE },
-	{ 6, "DIALUP", DVI$_TT_DIALUP },
-	{ 3,"DIR" , DVI$_DIR },			{ 10, "DISCONNECT", DVI$_TT_DISCONNECT },
-	{ 3, "DMA", DVI$_TT_DMA },		{ 3, "DMT" , DVI$_DMT },
-	{ 4, "DRCS", DVI$_TT_DRCS },		{ 3, "DUA" , DVI$_DUA },
-	{ 4, "EDIT", DVI$_TT_EDIT },		{ 7, "EDITING", DVI$_TT_EDITING },
-	{ 8, "EIGHTBIT", DVI$_TT_EIGHTBIT },	{ 3, "ELG" , DVI$_ELG },
-	{ 6, "ERRCNT", DVI$_ERRCNT },		{ 6, "ESCAPE", DVI$_TT_ESCAPE },
-	{ 8, "FALLBACK", DVI$_TT_FALLBACK },	{ 3, "FOD" , DVI$_FOD },
-	{ 3, "FOR" , DVI$_FOR },			{ 10, "FREEBLOCKS", DVI$_FREEBLOCKS },
-	{ 10, "FULLDEVNAM", DVI$_FULLDEVNAM },
-	{ 3, "GEN" , DVI$_GEN },
-	{ 7, "HALFDUP", DVI$_TT_HALFDUP },
-	{ 6, "HANGUP", DVI$_TT_HANGUP },	{ 8, "HOSTSYNC", DVI$_TT_HOSTSYNC },
-	{ 3, "IDV" , DVI$_IDV },			{ 6, "INSERT", DVI$_TT_INSERT },
-	{ 6, "LFFILL", DVI$_TT_LFFILL },	{ 9, "LOCALECHO", DVI$_TT_LOCALECHO },
-	{ 6, "LOCKID", DVI$_LOCKID },
-	{ 9, "LOGVOLNAM", DVI$_LOGVOLNAM },	{ 5, "LOWER", DVI$_TT_LOWER },
-	{ 8, "MAXBLOCK", DVI$_MAXBLOCK },	{ 8, "MAXFILES", DVI$_MAXFILES },
-	{ 3, "MBX" , DVI$_MBX },			{ 8, "MBXDSABL", DVI$_TT_MBXDSABL },
-	{ 8, "MECHFORM", DVI$_TT_MECHFORM },	{ 7, "MECHTAB", DVI$_TT_MECHTAB },
-	{ 3, "MNT" , DVI$_MNT },			{ 5, "MODEM", DVI$_TT_MODEM },
-	{ 9, "MODHANGUP", DVI$_TT_MODHANGUP },	{ 8, "MOUNTCNT", DVI$_MOUNTCNT },
-	{ 3, "NET" , DVI$_NET },			{ 10, "NEXTDEVNAM", DVI$_NEXTDEVNAM },
-	{ 8, "NOBRDCST", DVI$_TT_NOBRDCST },
-	{ 6, "NOECHO", DVI$_TT_NOECHO },	{ 9, "NOTYPEAHD", DVI$_TT_NOTYPEAHD },
-	{ 3, "ODV" , DVI$_ODV },			{ 5, "OPCNT", DVI$_OPCNT },
-	{ 4, "OPER", DVI$_TT_OPER},		{ 3, "OPR" , DVI$_OPR },
-	{ 6, "OWNUIC", DVI$_OWNUIC },
-	{ 7, "PASTHRU", DVI$_TT_PASTHRU },
-	{ 3, "PID", DVI$_PID },		{ 7, "PRINTER", DVI$_TT_PRINTER },
-	{ 3, "RCK" , DVI$_RCK },			{ 8, "READSYNC", DVI$_TT_READSYNC },
-	{ 3, "REC" , DVI$_REC },			{ 6, "RECSIZ", DVI$_RECSIZ },
-	{ 6, "REFCNT", DVI$_REFCNT },		{ 5, "REGIS", DVI$_TT_REGIS },
-	{ 3, "RND" , DVI$_RND },			{ 10, "ROOTDEVNAM", DVI$_ROOTDEVNAM },
-	{ 3, "RTM" , DVI$_RTM },
-	{ 5, "SCOPE", DVI$_TT_SCOPE },		{ 3, "SDI" , DVI$_SDI },
-	{ 7, "SECTORS", DVI$_SECTORS },		{ 6, "SECURE", DVI$_TT_SECURE },
-	{ 9, "SERIALNUM", DVI$_SERIALNUM },	{13, "SERVED_DEVICE", DVI$_SERVED_DEVICE},
-	{ 8, "SETSPEED", DVI$_TT_SETSPEED },
-	{ 3, "SHR" , DVI$_SHR },			{ 5, "SIXEL", DVI$_TT_SIXEL },
-	{ 3, "SPL" , DVI$_SPL },			{ 9, "SPLDEVNAM", DVI$_DEVNAM },
-	{ 3, "SQD" , DVI$_SQD },			{ 3, "STS", DVI$_STS },
-	{ 3, "SWL" , DVI$_SWL },			{ 6, "SYSPSW", DVI$_TT_SYSPWD },
-	{ 6, "TRACKS", DVI$_TRACKS },		{ 8, "TRANSCNT", DVI$_TRANSCNT },
-	{ 3, "TRM" , DVI$_TRM },		{ 12, "TT_ACCPORNAM" , DVI$_TT_ACCPORNAM },
-	{ 12, "TT_PHYDEVNAM" , DVI$_TT_PHYDEVNAM },	{ 6, "TTSYNC", DVI$_TT_TTSYNC },
-	{ 4, "UNIT", DVI$_UNIT },		{ 8, "VOLCOUNT", DVI$_VOLCOUNT },
-	{ 6, "VOLNAM", DVI$_VOLNAM },		{ 9, "VOLNUMBER", DVI$_VOLNUMBER },
-	{ 9, "VOLSETMEM", DVI$_VOLSETMEM },	{ 5, "VPROT", DVI$_VPROT },
-	{ 3, "WCK" , DVI$_WCK },			{ 4, "WRAP", DVI$_TT_WRAP }
-};
-
-static readonly dvi_index_struct dvi_index[] = {
-	/*	A	B		C	D		E		F	G		*/
-	{ 0 , 10 }, { 10 , 12 }, { 12 , 17 }, { 17, 35 }, { 35 , 41 }, { 41 , 46 }, { 46, 47 },
-	/*	H	I		J	K		L	M		N		*/
-	{ 47, 50 }, { 50 , 52 }, { 0 , 0 }, { 0 , 0 }, { 52 , 57 }, { 57 , 67 }, { 67 , 72 },
-	/*	O	P		Q	R		S	T		U		*/
-	{ 72 , 77 }, { 77 , 80 }, { 0 , 0 }, { 80 , 89 }, { 89 , 104 }, { 104 , 110 }, {110 , 111},
-	/*	V	W	X     Y	    Z								*/
-	{ 111,116},{116,118},{0,0},{0,0},{0,0}
-};
-GBLREF spdesc stringpool;
-
-void op_fngetdvi(mval *device, mval *keyword, mval *ret)
-{
-	itmlist_struct	item_list;
-	short 		out_len, iosb[4];
-	uint4 	status;
-	char 		index, slot, last_slot;
-	int4 		item_code, out_value;
-	unsigned char 	buff[MAX_KEY_LENGTH], *upper_case;
-	bool		want_secondary;
-	$DESCRIPTOR(device_name,"");
-	error_def(ERR_DVIKEYBAD);
-	error_def(ERR_INVSTRLEN);
-
-	MV_FORCE_STR(device);
-	MV_FORCE_STR(keyword);
-
-	if (MAX_DEV_LENGTH < device->str.len)
-		rts_error(VARLSTCNT(1) SS$_IVLOGNAM);
-	if (keyword->str.len > MAX_KEY_LENGTH)
-		rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, keyword->str.len, MAX_KEY_LENGTH);
-	if (!keyword->str.len)
-	{	rts_error(VARLSTCNT(6) ERR_DVIKEYBAD, 4, device->str.len, device->str.addr, 4, "NULL");
-	}
-
-	lower_to_upper(&buff[0], keyword->str.addr, keyword->str.len);
-	upper_case = buff;
-	if ( device->str.len == 0 || (device->str.len == 1 && *device->str.addr == '0'))
-	{	device_name.dsc$a_pointer = "SYS$INPUT";
-		device_name.dsc$w_length = SIZEOF("SYS$INPUT")-1;
-	}
-	else
-	{	device_name.dsc$a_pointer = device->str.addr;
-		device_name.dsc$w_length = device->str.len;
-	}
-	item_list.bufflen = VAL_LENGTH;
-	item_list.itmcode = SPL_CODE;
-	item_list.buffaddr = &out_value;
-	item_list.retlen = &out_len;
-	item_list.end = NULL;
-	status = sys$getdvi( efn_immed_wait, 0, &device_name, &item_list, &iosb[0], 0, 0, 0 );
-	if (status != SS$_NORMAL && status != SS$_NONLOCAL)
-	{	rts_error(VARLSTCNT(1)  status ) ;
-	}
-	sys$synch(efn_immed_wait, &iosb[0]);
-	if (iosb[0] != SS$_NORMAL && iosb[0] != SS$_NONLOCAL)
-	{	rts_error(VARLSTCNT(1)  iosb[0] );
-	}
-	if (out_value != NULL)
-	{	want_secondary = TRUE;
-	}
-	else
-	{	want_secondary = FALSE;
-	}
-
-	if ((index = *upper_case - 'A') < MIN_INDEX || index > MAX_INDEX)
-	{	rts_error(VARLSTCNT(6) ERR_DVIKEYBAD, 4, device->str.len, device->str.addr, keyword->str.len, keyword->str.addr);
-	}
-	item_code = 0;
-	if ( dvi_index[ index ].len)
-	{
-		slot = dvi_index[ index ].index;
-		last_slot = dvi_index[ index ].len;
-		for ( ; slot < last_slot ; slot++ )
-		{	if (keyword->str.len == dvi_table[ slot ].len &&
-				!memcmp(dvi_table[ slot ].name, upper_case, keyword->str.len))
-			{	item_code = dvi_table[ slot ].item_code;
-				break;
-			}
-		}
-	}
-	if (!item_code)
-	{	rts_error(VARLSTCNT(6) ERR_DVIKEYBAD, 4, device->str.len, device->str.addr, keyword->str.len, keyword->str.addr);
-	}
-
-	switch( item_code )
-	{
-	/* **** the following item codes require a string be returned **** */
-	case DVI$_ALLDEVNAM:
-	case DVI$_DEVLOCKNAM:
-	case DVI$_DEVNAM:
-	case DVI$_FULLDEVNAM:
-	case DVI$_LOGVOLNAM:
-	case DVI$_NEXTDEVNAM:
-	case DVI$_ROOTDEVNAM:
-	case DVI$_TT_ACCPORNAM:
-	case DVI$_TT_PHYDEVNAM:
-	case DVI$_VOLNAM:
-		if (want_secondary)
-		{
-			if (!((item_code == DVI$_DEVNAM) && (keyword->str.len == 9)))
-			{	item_code |= DVI$C_SECONDARY;
-			}
-		}
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		ENSURE_STP_FREE_SPACE(MAX_DVI_STRLEN);
-		item_list.bufflen = MAX_DVI_STRLEN;
-		item_list.itmcode = item_code;
-		item_list.buffaddr = stringpool.free;
-		item_list.retlen = &out_len;
-		item_list.end = NULL;
-		status = sys$getdvi( efn_immed_wait, 0, &device_name, &item_list, &iosb[0], 0, 0, 0 );
-		if (status != SS$_NORMAL && status != SS$_NONLOCAL)
-		{		rts_error(VARLSTCNT(1)  status );
-		}
-		sys$synch(efn_immed_wait, &iosb[0]);
-		if (iosb[0] != SS$_NORMAL && iosb[0] != SS$_NONLOCAL)
-		{		rts_error(VARLSTCNT(1)  iosb[0] ) ;
-		}
-		ret->str.addr = stringpool.free;
-		ret->str.len = out_len;
-		ret->mvtype = MV_STR;
-		stringpool.free += out_len;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		return;
-
-	default:
-		if (want_secondary)
-			item_code |= DVI$C_SECONDARY;
-		item_list.itmcode = item_code;
-		item_list.bufflen = VAL_LENGTH;
-		item_list.buffaddr = &out_value;
-		item_list.retlen = &out_len;
-		item_list.end = NULL;
-		status = sys$getdvi( efn_immed_wait, 0, &device_name, &item_list, &iosb[0], 0, 0, 0 );
-		if (status != SS$_NORMAL && status != SS$_NONLOCAL)
-			rts_error(VARLSTCNT(1)  status );
-		sys$synch(efn_immed_wait, &iosb[0]);
-		if (iosb[0] != SS$_NORMAL && iosb[0] != SS$_NONLOCAL)
-			rts_error(VARLSTCNT(1)  iosb[0] );
-		if (want_secondary)
-			item_code = item_code - 1;
-		switch(item_code)
-		{	case DVI$_LOCKID:
-			case DVI$_ACPPID:
-			case DVI$_OWNUIC:
-			if (out_value)
-			{	assert(stringpool.free >= stringpool.base);
-				assert(stringpool.top >= stringpool.free);
-				ENSURE_STP_FREE_SPACE(HEX_LEN);
-				i2hex(out_value, stringpool.free, HEX_LEN);
-				ret->str.addr = stringpool.free;
-				ret->str.len = HEX_LEN;
-				stringpool.free += HEX_LEN;
-				assert(stringpool.free >= stringpool.base);
-				assert(stringpool.top >= stringpool.free);
-			}
-			else
-			{	ret->str.addr = "";
-				ret->str.len = 0;
-			}
-			ret->mvtype = MV_STR;
-			break;
-		case DVI$_ACPTYPE:
-			switch(out_value)
-			{
-			case 0: ret->str.addr = "ILLEGAL";
-				ret->str.len = 7;
-				break;
-			case 1: ret->str.addr = "F11V1";
-				ret->str.len = 5;
-				break;
-			case 2: ret->str.addr = "F11V2";
-				ret->str.len = 5;
-				break;
-			case 3: ret->str.addr = "MTA";
-				ret->str.len = 3;
-				break;
-			case 4: ret->str.addr = "NET";
-				ret->str.len = 3;
-				break;
-			case 5: ret->str.addr = "REM";
-				ret->str.len = 3;
-			}
-			ret->mvtype = MV_STR;
-			break;
-		default:
-			i2mval(ret,out_value) ;
-		}
-		return;
-	}
-}
diff --git a/sr_vvms/op_fngetjpi.c b/sr_vvms/op_fngetjpi.c
deleted file mode 100644
index 965905d..0000000
--- a/sr_vvms/op_fngetjpi.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "stringpool.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include <jpidef.h>
-#include "gtm_caseconv.h"
-#include "op.h"
-#include "mvalconv.h"
-
-#define	MAX_KEY_LEN	20	/* maximum length across all keywords in the jpi_param_table[] array as well as "ISPROCALIVE" */
-
-typedef struct
-{	char	len;
-	char	name[MAX_KEY_LEN];
-	short int item_code;
-}jpi_tab;
-
-typedef struct
-{	char	index;
-	char	len;
-}jpi_ind;
-
-typedef struct
-{	int4 x;
-	int4 y;
-}out_struct;
-
-static readonly jpi_tab jpi_param_table[] =
-{
-	{ 7, "ACCOUNT" , JPI$_ACCOUNT },	{ 6, "APTCNT" , JPI$_APTCNT },
-	{ 6, "ASTACT" , JPI$_ASTACT},		{ 6, "ASTCNT" , JPI$_ASTCNT },
-	{ 5, "ASTEN" , JPI$_ASTEN }, 		{ 5, "ASTLM" , JPI$_ASTLM },
-	{ 7, "AUTHPRI" , JPI$_AUTHPRI },	{ 8, "AUTHPRIV" , JPI$_AUTHPRIV },
-	{ 6, "BIOCNT" , JPI$_BIOCNT },		{ 5, "BIOLM" , JPI$_BIOLM },
-	{ 5, "BUFIO" , JPI$_BUFIO },		{ 6, "BYTCNT" , JPI$_BYTCNT },
-	{ 5,"BYTLM" , JPI$_BYTLM },		{ 7, "CLINAME" , JPI$_CLINAME },
-	{ 6, "CPULIM" , JPI$_CPULIM },		{ 6, "CPUTIM" , JPI$_CPUTIM },
-	{ 11, "CREPRCFLAGS" , JPI$_CREPRC_FLAGS },
-	{ 7, "CURPRIV" , JPI$_CURPRIV },	{ 5, "DFPFC" , JPI$_DFPFC },
-	{ 7, "DFWSCNT" , JPI$_DFWSCNT },	{ 6, "DIOCNT" , JPI$_DIOCNT },
-	{ 5, "DIOLM" , JPI$_DIOLM },		{ 5, "DIRIO" , JPI$_DIRIO },
-	{ 4, "EFCS" , JPI$_EFCS }, 		{ 4, "EFCU" , JPI$_EFCU },
-	{ 4, "EFWM" , JPI$_EFWM },		{ 6, "ENQCNT" , JPI$_ENQCNT },
-	{ 5, "ENQLM" , JPI$_ENQLM },		{ 6, "EXCVEC" , JPI$_EXCVEC },
-	{ 6, "FILCNT" , JPI$_FILCNT },		{ 5, "FILLM" , JPI$_FILLM },
-	{ 8, "FINALEXC" , JPI$_FINALEXC },	{ 7, "FREP0VA" , JPI$_FREP0VA },
-	{ 7, "FREP1VA" , JPI$_FREP1VA },	{ 9, "FREPTECNT" , JPI$_FREPTECNT },
-	{ 6, "GPGCNT" , JPI$_GPGCNT },		{ 3, "GRP" , JPI$_GRP },
-	{ 10, "IMAGECOUNT" , JPI$_IMAGECOUNT },	{ 8, "IMAGNAME" , JPI$_IMAGNAME },
-	{ 8, "IMAGPRIV" , JPI$_IMAGPRIV },	{ 9, "JOBPRCCNT" , JPI$_JOBPRCCNT },
-	{ 7, "JOBTYPE" , JPI$_JOBTYPE },
-	{ 8, "LOGINTIM" , JPI$_LOGINTIM },	{ 10, "MASTER_PID" , JPI$_MASTER_PID },
-	{ 9, "MAXDETACH" , JPI$_MAXDETACH },	{ 7, "MAXJOBS" , JPI$_MAXJOBS },
-	{ 3, "MEM" , JPI$_MEM },		{ 4, "MODE" ,JPI$_MODE },
-	{ 7, "MSGMASK" , JPI$_MSGMASK },	{ 5, "OWNER" , JPI$_OWNER },
-	{ 8, "PAGEFLTS" , JPI$_PAGEFLTS },	{ 9, "PAGFILCNT" , JPI$_PAGFILCNT },
-	{ 9, "PAGFILLOC" , JPI$_PAGFILLOC },
-	{ 9, "PGFLQUOTA" , JPI$_PGFLQUOTA },	{ 8, "PHDFLAGS" , JPI$_PHDFLAGS },
-	{ 3, "PID" , JPI$_PID },		{ 6, "PPGCNT" , JPI$_PPGCNT },
-	{ 6, "PRCCNT" , JPI$_PRCCNT },		{ 5, "PRCLM" ,JPI$_PRCLM },
-	{ 6, "PRCNAM" , JPI$_PRCNAM },		{ 3, "PRI" , JPI$_PRI },
-	{ 4, "PRIB" , JPI$_PRIB },		{ 9, "PROCINDEX" , JPI$_PROC_INDEX },
-	{ 8, "PROCPRIV" , JPI$_PROCPRIV },	{ 8, "SHRFILLM" , JPI$_SHRFILLM },
-	{ 8, "SITESPEC" , JPI$_SITESPEC },
-	{ 5, "STATE" , JPI$_STATE },		{ 3, "STS" , JPI$_STS },
-	{ 9, "SWPFILLOC" , JPI$_SWPFILLOC },	{ 9, "TABLENAME" , JPI$_TABLENAME },
-	{ 8, "TERMINAL" ,JPI$_TERMINAL },
-	{ 4, "TMBU" , JPI$_TMBU },		{ 5, "TQCNT" , JPI$_TQCNT },
-	{ 4, "TQLM" , JPI$_TQLM },		{ 8, "UAFFLAGS" , JPI$_UAF_FLAGS },
-	{ 3, "UIC" , JPI$_UIC },
-	{ 8, "USERNAME" ,JPI$_USERNAME },	{ 8, "VIRTPEAK" , JPI$_VIRTPEAK },
-	{ 7, "VOLUMES" , JPI$_VOLUMES },	{ 6, "WSAUTH" , JPI$_WSAUTH },
-	{ 9, "WSAUTHEXT" , JPI$_WSAUTHEXT },	{ 8, "WSEXTENT" , JPI$_WSEXTENT },
-	{ 6, "WSPEAK" , JPI$_WSPEAK },		{ 7, "WSQUOTA" , JPI$_WSQUOTA },
-	{ 6, "WSSIZE" , JPI$_WSSIZE }
-};
-
-static readonly jpi_ind jpi_index_table[] =
-{
-	{ 0 , 8 }, { 8 , 13 }, { 13 , 18 }, { 18 , 23 }, { 23 , 29 }, { 29 , 35 },
-	{ 35 , 37 }, { 0 , 0 }, { 37 , 40 }, { 40 , 42 }, { 0, 0 }, { 42 , 43 },
-	{ 43, 49 }, { 0 , 0 }, { 49 , 50 }, { 50 , 64 }, { 0 , 0 }, { 0 , 0 },
-	{ 64 , 69 }, { 69 , 74 }, { 74 , 77 }, { 77 , 79 }, { 79 , 85 },
-	{ 0 , 0 }, { 0 , 0 }, { 0 , 0 },
-};
-
-#define MAX_JPI_STRLEN 512
-#define MIN_INDEX 0
-#define MAX_INDEX 25
-
-GBLREF spdesc stringpool;
-
-void op_fngetjpi(mint jpid, mval *keyword, mval *ret)
-{
-	out_struct	out_quad;
-	int4		out_long, jpi_code, pid;
-	short		index, length, slot, last_slot, out_len;
-	uint4		status;
-	char		upcase[MAX_KEY_LEN];
-
-	$DESCRIPTOR(out_string, "");
-	error_def(ERR_BADJPIPARAM);
-
-	assert (stringpool.free >= stringpool.base);
-	assert (stringpool.top >= stringpool.free);
-	ENSURE_STP_FREE_SPACE(MAX_JPI_STRLEN);
-	MV_FORCE_STR(keyword);
-	if (keyword->str.len == 0)
-		rts_error(VARLSTCNT(4) ERR_BADJPIPARAM, 2, 4, "Null");
-	if (keyword->str.len > MAX_KEY_LEN)
-		rts_error(VARLSTCNT(4)  ERR_BADJPIPARAM, 2, keyword->str.len, keyword->str.addr );
-	lower_to_upper((uchar_ptr_t)upcase, (uchar_ptr_t)keyword->str.addr, keyword->str.len);
-	if ((index = upcase[0] - 'A') < MIN_INDEX || index > MAX_INDEX)
-		rts_error(VARLSTCNT(4)  ERR_BADJPIPARAM, 2, keyword->str.len, keyword->str.addr );
-	/* Before checking if it is a VMS JPI attribute, check if it is GT.M specific "ISPROCALIVE" attribute */
-	if ((keyword->str.len == STR_LIT_LEN("ISPROCALIVE")) && !memcmp(upcase, "ISPROCALIVE", keyword->str.len))
-	{
-		out_long = (0 != jpid) ? is_proc_alive(jpid, 0) : 1;
-		i2mval(ret, out_long);
-		return;
-	}
-	/* Check if it is a VMS JPI attribute */
-	slot = jpi_index_table[ index ].index;
-	last_slot = jpi_index_table[ index ].len;
-	jpi_code = 0;
-	/* future enhancement:
-	 * 	(i) since keywords are sorted, we can exit the for loop if 0 < memcmp.
-	 * 	(ii) also, the current comparison relies on kwd->str.len which means a C would imply CPUTIM instead of CSTIME
-	 * 		or CUTIME this ambiguity should probably be removed by asking for an exact match of the full keyword
-	 */
-	for ( ; slot < last_slot ; slot++ )
-	{
-		if (jpi_param_table[ slot ].len == keyword->str.len
-			&& !(memcmp(jpi_param_table[ slot ].name, upcase, keyword->str.len)))
-		{
-			jpi_code = jpi_param_table[ slot ].item_code;
-			break;
-		}
-	}
-	if (!jpi_code)
-		rts_error(VARLSTCNT(4)  ERR_BADJPIPARAM, 2, keyword->str.len, keyword->str.addr);
-	assert (jpid >= 0);
-	switch( jpi_code )
-	{
-	/* **** This is a fall through for all codes that require a string returned **** */
-	case JPI$_ACCOUNT:
-	case JPI$_AUTHPRIV:
-	case JPI$_CLINAME:
-	case JPI$_CURPRIV:
-	case JPI$_IMAGNAME:
-	case JPI$_IMAGPRIV:
-	case JPI$_PRCNAM:
-	case JPI$_PROCPRIV:
-	case JPI$_TABLENAME:
-	case JPI$_TERMINAL:
-	case JPI$_USERNAME:
-		out_string.dsc$a_pointer = stringpool.free;
-		out_string.dsc$w_length = MAX_JPI_STRLEN;
-		if ((status = lib$getjpi(	 &jpi_code
-						,&jpid
-						,0
-						,0
-						,&out_string
-						,&out_len	)) != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(1)  status ); /* need a more specific GTM error message here and below */
-		}
-		ret->str.addr = stringpool.free;
-		ret->str.len = out_len;
-		ret->mvtype = MV_STR;
-		stringpool.free += out_len;
-		assert (stringpool.top >= stringpool.free);
-		assert (stringpool.free >= stringpool.base);
-		return;
-	case JPI$_LOGINTIM:
-	{	int4 days;
-		int4 seconds;
-
-		if ((status = lib$getjpi(	 &jpi_code
-					,&jpid
-					,0
-					,&out_quad
-					,0
-					,0	)) != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(1)  status );
-		}
-		if ((status = lib$day(	 &days
-					,&out_quad
-					,&seconds)) != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(1)  status );
-		}
-		days += DAYS;
-		seconds /= CENTISECONDS;
-		ret->str.addr = stringpool.free;
-		stringpool.free = i2s(&days);
-		*stringpool.free++ = ',';
-		stringpool.free = i2s(&seconds);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		ret->mvtype = MV_STR;
-		return;
-	}
-	default:
-		if ((status = lib$getjpi(	 &jpi_code
-						,&jpid
-						,0
-						,&out_long
-						,0
-						,0	)) != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(1)  status );
-		}
-		i2mval(ret, out_long) ;
-		return;
-	}
-}
diff --git a/sr_vvms/op_fngetlki.c b/sr_vvms/op_fngetlki.c
deleted file mode 100644
index 190aa1c..0000000
--- a/sr_vvms/op_fngetlki.c
+++ /dev/null
@@ -1,171 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <lkidef.h>
-#include "op_fn.h"
-#include "stringpool.h"
-#include <ssdef.h>
-#include <descrip.h>
-#include "gtm_caseconv.h"
-#include "mvalconv.h"
-#include "mval2desc.h"
-#include "op.h"
-
-#define MAX_KEY_LEN 12
-#define MAX_LKI_STRLEN 64
-#define MAX_LKI_VALBLK 16
-#define MIN_INDEX 0
-#define MAX_INDEX 25
-
-typedef struct
-{	char	len;
-	char	name[MAX_KEY_LEN];
-	short int item_code;
-} lki_tab;
-
-typedef struct
-{	char	index;
-	char	len;
-} lki_ind;
-
-static readonly lki_tab lki_param_table[] =
-{
-	{  4, "CSID",          LKI$_CSID },
-	{  8, "CVTCOUNT",      LKI$_CVTCOUNT },
-	{ 10, "GRANTCOUNT",    LKI$_GRANTCOUNT },
-	{  9, "LCKREFCNT",     LKI$_LCKREFCNT },
-	{  4, "LKID",          LKI$_LKID },
-	{  6, "LOCKID",        LKI$_LOCKID },
-	{  7, "MSTCSID",       LKI$_MSTCSID },
-	{  7, "MSTLKID",       LKI$_MSTLKID },
-	{  8, "NAMSPACE",      LKI$_NAMSPACE },
-	{  6, "PARENT",        LKI$_PARENT },
-	{  3, "PID",           LKI$_PID },
-	{  6, "RESNAM",        LKI$_RESNAM },
-	{  9, "RSBREFCNT",     LKI$_RSBREFCNT },
-	{  5, "STATE",         LKI$_STATE },
-	{  6, "VALBLK",        LKI$_VALBLK },
-	{  9, "WAITCOUNT",     LKI$_WAITCOUNT }
-};
-
-static readonly lki_ind lki_index_table[] =
-{
-	{ 0 , 0 }, { 0 , 0 }, { 0 , 2 }, { 0 , 0 }, { 0 , 0 }, { 0 , 0 }, { 2 , 3 },
-	{ 0 , 0 }, { 0 , 0 }, { 0 , 0 }, { 0 , 0 }, { 3 , 6 }, { 6 , 8 }, { 8 , 9 },
-	{ 0 , 0 }, { 9 , 11 }, { 0 , 0 }, { 11 , 13 }, { 13 , 14 }, { 0 , 0 }, { 0 , 0 },
-	{ 14 , 15 }, { 15 , 16 }, { 0 , 0 }, { 0 , 0 }, { 0 , 0 }
-};
-
-GBLREF spdesc stringpool;
-
-error_def(ERR_BADLKIPARAM);
-
-
-void op_fngetlki(mval *lkid_mval, mval *keyword, mval *ret)
-{
-	itmlist_struct	item_list;
-	int		i;
-	uint4		lkid, out_long, out_len, status, value_block[4];
-	short int	index, slot, last_slot, lki_code;
-	char		*p, upcase[MAX_KEY_LEN];
-	struct dsc$descriptor lkid_desc;
-
-assert (stringpool.free >= stringpool.base);
-assert (stringpool.top >= stringpool.free);
-ENSURE_STP_FREE_SPACE(MAX_LKI_STRLEN);
-MV_FORCE_STR(keyword);
-if (keyword->str.len == 0)
-	rts_error(VARLSTCNT(4) ERR_BADLKIPARAM,2,4,"Null");
-lower_to_upper(upcase,keyword->str.addr,keyword->str.len);
-if ((index = upcase[0] - 'A') < MIN_INDEX || index > MAX_INDEX)
-	rts_error(VARLSTCNT(4)  ERR_BADLKIPARAM,2,keyword->str.len,keyword->str.addr );
-slot = lki_index_table[ index ].index;
-last_slot = lki_index_table[ index ].len;
-lki_code = 0;
-for ( ; slot < last_slot ; slot++ )
-{
-	if (lki_param_table[ slot ].len == keyword->str.len
-		&& !(memcmp(lki_param_table[ slot ].name,upcase,keyword->str.len)))
-	{	lki_code = lki_param_table[ slot ].item_code;
-		break;
-	}
-}
-if (!lki_code)
-	rts_error(VARLSTCNT(4)  ERR_BADLKIPARAM, 2, keyword->str.len, keyword->str.addr);
-lkid_desc.dsc$b_class = DSC$K_CLASS_S;
-lkid_desc.dsc$b_dtype = DSC$K_DTYPE_LU;
-lkid_desc.dsc$w_length = SIZEOF(lkid);
-lkid_desc.dsc$a_pointer = &lkid;
-mval2desc(lkid_mval, &lkid_desc);
-switch( lki_code )
-{
-case LKI$_VALBLK:
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.top >= stringpool.free);
-	ENSURE_STP_FREE_SPACE(MAX_LKI_VALBLK*2);
-	item_list.itmcode = lki_code;
-	item_list.bufflen = MAX_LKI_VALBLK;
-	item_list.buffaddr = &value_block[0];
-	item_list.retlen = &out_len;
-	item_list.end = NULL;
-
-	if ((status = sys$getlkiw( 0, &lkid, &item_list, 0, 0, 0, 0)) != SS$_NORMAL)
-	{	rts_error(VARLSTCNT(1)  status );
-	}
-
-	for (p = stringpool.free, i = 0; i < 4; i++, p += 8)
-	  i2hex (value_block[i], p, 8);
-
-	ret->mvtype = MV_STR;
-	ret->str.addr = stringpool.free;
-	ret->str.len = MAX_LKI_VALBLK*2;
-	stringpool.free += MAX_LKI_VALBLK*2;
-	assert (stringpool.free >= stringpool.base);
-	assert (stringpool.top >= stringpool.free);
-	return;
-
-case LKI$_RESNAM:
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.top >= stringpool.free);
-	ENSURE_STP_FREE_SPACE(MAX_LKI_STRLEN);
-	item_list.itmcode = lki_code;
-	item_list.bufflen = MAX_LKI_STRLEN;
-	item_list.buffaddr = stringpool.free;
-	item_list.retlen = &out_len;
-	item_list.end = NULL;
-
-	if ((status = sys$getlkiw( 0, &lkid, &item_list, 0, 0, 0, 0)) != SS$_NORMAL)
-	{	rts_error(VARLSTCNT(1)  status );
-	}
-
-	ret->mvtype = MV_STR;
-	ret->str.addr = stringpool.free;
-	ret->str.len = out_len;		/* Note: this truncates the irrelevant high order word of out_len */
-	stringpool.free += ret->str.len;
-	assert (stringpool.free >= stringpool.base);
-	assert (stringpool.top >= stringpool.free);
-	return;
-
-default:
-	item_list.itmcode = lki_code;
-	item_list.bufflen = 4;
-	item_list.buffaddr = &out_long;
-	item_list.retlen = &out_len;
-	item_list.end = 0;
-
-	if ((status = sys$getlkiw( 0, &lkid, &item_list, 0, 0, 0, 0)) != SS$_NORMAL)
-	{	rts_error(VARLSTCNT(1)  status );
-	}
-	i2mval(ret,out_long) ;
-	return;
-}
-}
diff --git a/sr_vvms/op_fngetsyi.c b/sr_vvms/op_fngetsyi.c
deleted file mode 100644
index 06be97d..0000000
--- a/sr_vvms/op_fngetsyi.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <syidef.h>
-#include <descrip.h>
-#include "stringpool.h"
-#include <ssdef.h>
-#include "op_fn.h"
-#include "min_max.h"
-#include "gtm_caseconv.h"
-#include "op.h"
-#include "mvalconv.h"
-
-#define MAX_SYI_STRLEN 32
-#define MAX_KW_LEN     20
-#define MAX_ND_LEN     64
-#define ZINDX 25				/* index for char 'Z' */
-#define ALFA(k)		('A'<=k && k<='Z')
-#define PROPER(status) 	if (status != SS$_NORMAL) { rts_error(VARLSTCNT(1) status) ;}
-
-typedef struct
-{
-	char		kwlen ;			/* item keyword length 	*/
-	char		kw[MAX_KW_LEN] ;	/* item keyword		*/
-	unsigned short	code ;			/* syi code		*/
-	unsigned char	valsiz ;		/* size of item value   */
-	unsigned char	valtyp ;		/* item type		*/
-}syi_item ;
-
-static readonly syi_item kw_syi[] =
-{
-	 {13,"ACTIVECPU_CNT",	SYI$_ACTIVECPU_CNT,	4,	MV_NM}
-	,{12,"AVAILCPU_CNT",	SYI$_AVAILCPU_CNT,	4,	MV_NM}
-	,{ 8,"BOOTTIME",	SYI$_BOOTTIME	,	8,	MV_STR}
-	,{18,"CHARACTER_EMULATED",SYI$_CHARACTER_EMULATED,1,	MV_NM}
-	,{14,"CLUSTER_EVOTES",	SYI$_CLUSTER_EVOTES,	2,	MV_NM}
-	,{14,"CLUSTER_FSYSID",	SYI$_CLUSTER_FSYSID,	6,	MV_NM}
-	,{13,"CLUSTER_FTIME",	SYI$_CLUSTER_FTIME,	8,	MV_STR}
-	,{14,"CLUSTER_MEMBER",	SYI$_CLUSTER_MEMBER,	1,	MV_NM}
-	,{13,"CLUSTER_NODES",	SYI$_CLUSTER_NODES,	2,	MV_NM}
-	,{14,"CLUSTER_QUORUM",	SYI$_CLUSTER_QUORUM,	2,	MV_STR}
-	,{13,"CLUSTER_VOTES",	SYI$_CLUSTER_VOTES,	2,	MV_STR}
-	,{15,"CONTIG_GBLPAGES",	SYI$_CONTIG_GBLPAGES,	4,	MV_NM}
-	,{ 3,"CPU",		SYI$_CPU,		4,	MV_STR}
-	,{16,"DECIMAL_EMULATED",SYI$_DECIMAL_EMULATED,	1,	MV_NM}
-	,{16,"D_FLOAT_EMULATED",SYI$_D_FLOAT_EMULATED,	1,	MV_NM}
-	,{15,"ERRORLOGBUFFERS",	SYI$_ERRORLOGBUFFERS,	2,	MV_NM}
-	,{16,"F_FLOAT_EMULATED",SYI$_F_FLOAT_EMULATED,	1,	MV_NM}
-	,{13,"FREE_GBLPAGES",	SYI$_FREE_GBLPAGES,	4,	MV_NM}
-	,{13,"FREE_GBLSECTS",	SYI$_FREE_GBLSECTS,	4,	MV_NM}
-	,{16,"G_FLOAT_EMULATED",SYI$_G_FLOAT_EMULATED,	1,	MV_NM}
-	,{ 8,"HW_MODEL",	SYI$_HW_MODEL,		2,	MV_NM}
-	,{ 7,"HW_NAME", 	SYI$_HW_NAME,		31,	MV_STR}
-	,{14,"H_FLOAT_EMULATED",SYI$_H_FLOAT_EMULATED,	1,	MV_NM}
-	,{ 9,"NODE_AREA",	SYI$_NODE_AREA,		4,	MV_STR}
-	,{ 9,"NODE_CSID",	SYI$_NODE_CSID,		4,	MV_NM}
-	,{11,"NODE_EVOTES",	SYI$_NODE_EVOTES,	2,	MV_NM}
-	,{11,"NODE_HWVERS",	SYI$_NODE_HWVERS,	12,	MV_STR}
-	,{11,"NODE_NUMBER",	SYI$_NODE_NUMBER,	4,	MV_STR}
-	,{11,"NODE_QUORUM",	SYI$_NODE_QUORUM,	2,	MV_NM}
-	,{13,"NODE_SWINCARN",	SYI$_NODE_SWINCARN,	8,	MV_STR}
-	,{11,"NODE_SWTYPE",	SYI$_NODE_SWTYPE,	4,	MV_STR}
-	,{11,"NODE_SWVERS",	SYI$_NODE_SWVERS,	4,	MV_STR}
-	,{13,"NODE_SYSTEMID",	SYI$_NODE_SYSTEMID,	6,	MV_STR}
-	,{10,"NODE_VOTES",	SYI$_NODE_VOTES,	2,	MV_NM}
-	,{ 8,"NODENAME",	SYI$_NODENAME,		15,	MV_STR}
-	,{13,"PAGEFILE_FREE",	SYI$_PAGEFILE_FREE,	4,	MV_NM}
-	,{13,"PAGEFILE_PAGE",	SYI$_PAGEFILE_PAGE,	4,	MV_NM}
-	,{10,"SCS_EXISTS",	SYI$_SCS_EXISTS,	4,	MV_NM}
-	,{ 3,"SID",		SYI$_SID,		4,	MV_STR}
-	,{13,"SWAPFILE_FREE",	SYI$_SWAPFILE_FREE,	4,	MV_NM}
-	,{13,"SWAPFILE_PAGE",	SYI$_SWAPFILE_PAGE,	4,	MV_NM}
-	,{ 7,"VERSION",		SYI$_VERSION,		8,	MV_STR}
-	,{ 4,"XCPU",		SYI$_XCPU,		4,	MV_STR}
-	,{ 4,"XSID",		SYI$_XSID,		4,	MV_STR}
-} ;
-
-static readonly unsigned char kw_syi_index[] =
-{
-	0,2,3,13,14,15,18,19,22,22,22,22,22,22,35,35,37,37,37,41,41,41,42,42,44,44,44
-} ;
-
-GBLREF spdesc 	stringpool;
-
-void op_fngetsyi(mval *keyword,mval *node,mval *ret)
-{
-	error_def	(ERR_BADSYIPARAM) ;
-	error_def	(ERR_AMBISYIPARAM) ;
-	char		bufw[MAX_KW_LEN] ;
-	char		bufn[MAX_ND_LEN] ;
-	short		bufwlen ;
-	short		bufnlen ;
-	$DESCRIPTOR	(res_str,stringpool.free) ;
-	$DESCRIPTOR	(dnode,bufn) ;
-	uint4	res_val[2] ;
-	short		res_len ;
-	unsigned char	*pnode ;
-	unsigned char	k,j ;
-	bool		match ;
-	int4		item  ;
-	uint4 	status ;
-	mval		*tmp ;
-
-	assert(stringpool.top >= stringpool.free);
-	assert(stringpool.free >= stringpool.base);
-	MV_FORCE_STR(node);
-	MV_FORCE_STR(keyword);
-	ENSURE_STP_FREE_SPACE(MAX_SYI_STRLEN);
-	bufwlen = MIN(keyword->str.len,SIZEOF(bufw)) ;
-	bufnlen = MIN(node->str.len,SIZEOF(bufn)) ;
-	lower_to_upper(bufw,keyword->str.addr,bufwlen) ;
-	lower_to_upper(bufn,node->str.addr,bufnlen) ;
-	dnode.dsc$w_length = bufnlen ;
-	pnode = ((node->str.len != 0) ? &dnode : NULL) ;
-	k = bufw[0] ;
-	k = ( ALFA(k) ? k - 'A' : ZINDX ) ;
-	match = FALSE ;
-	for ( j = kw_syi_index[k] ; !match && j!=kw_syi_index[k+1] ; j++ )
-	{
-		match = (keyword->str.len<=kw_syi[j].kwlen && !memcmp(bufw,kw_syi[j].kw,keyword->str.len)) ;
-	}
-	if (!match)
-	{
-		rts_error(VARLSTCNT(4) ERR_BADSYIPARAM,2,keyword->str.len,keyword->str.addr) ;
-		return ;
-	}
-	else
-	{
-		if (j!=kw_syi_index[k+1] && keyword->str.len<=kw_syi[j].kwlen && !memcmp(bufw,kw_syi[j].kw,keyword->str.len))
-		{
-			rts_error(VARLSTCNT(4) ERR_AMBISYIPARAM,2,keyword->str.len,keyword->str.addr) ;
-			return ;
-		}
-		else
-		{
-			item = kw_syi[j-1].code ;
-			res_str.dsc$w_length = MAX_SYI_STRLEN ;
-			res_str.dsc$a_pointer = stringpool.free ;
-			status = lib$getsyi(&item,res_val,&res_str,&res_len,0,pnode) ;
-			PROPER(status) ;
-			ret->mvtype  = kw_syi[j-1].valtyp ;
-		}
-	}
-	if (item != SYI$_BOOTTIME && item != SYI$_CLUSTER_FTIME)
-	{
-		ret->str.addr = stringpool.free ;
-		ret->str.len  = res_len ;
-		stringpool.free += res_len ;
-	}
-	else
-	{
-		int4 day ;
-		int4 sec ;
-		status = lib$day(&day,res_val,&sec) ;
-		PROPER(status) ;
-		day += DAYS;
-		sec /= CENTISECONDS;
-		ret->str.addr = stringpool.free;
-		stringpool.free = i2s(&day) ;
-		*stringpool.free++ = ',' ;
-		stringpool.free = i2s(&sec) ;
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-	}
-	if (MV_IS_NUMERIC(ret))
-	{
-		i2mval(ret,res_val[0]) ;
-	}
-	assert (stringpool.top >= stringpool.free);
-}
diff --git a/sr_vvms/op_fnrandom.c b/sr_vvms/op_fnrandom.c
deleted file mode 100644
index aae4345..0000000
--- a/sr_vvms/op_fnrandom.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lib$routines.h>
-#include "gtm_stdlib.h"
-#include "gtm_string.h"
-
-#include "mvalconv.h"
-
-GBLREF int4 process_id;
-
-error_def(ERR_RANDARGNEG);
-
-void op_fnrandom (int4 interval, mval *ret)
-{
-	static int4	seed = 0;
-	int4		day;
-	double		randfloat;
-
-	if (1 > interval)
-		rts_error(VARLSTCNT(1) ERR_RANDARGNEG);
-	if (0 == seed)
-	{
-		lib$day(&day, 0, &seed);
-		seed *= process_id;
-		srandom(seed);
-	}
-	randfloat = ((double)random()) / RAND_MAX;
-	MV_FORCE_MVAL(ret, ((uint4)(interval * randfloat)));
-}
diff --git a/sr_vvms/op_fnzcall.c b/sr_vvms/op_fnzcall.c
deleted file mode 100644
index f449b7a..0000000
--- a/sr_vvms/op_fnzcall.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "zcall.h"
-#include <stdarg.h>
-
-GBLREF zctabrtn	*zctab, *zctab_end;
-
-void op_fnzcall(mval *dst, ...)
-{
-	va_list		var;
-	mval 		*v;
-	int4		n_mvals;	/* number of input parameters supplied in $ZCALL command */
-	int		i;
-	mval		*mvallist[256];
-	zctabrtn	*zcrtn;
-	unsigned char	*lastout;
-	error_def	(ERR_ZCALLTABLE);
-	error_def	(ERR_ZCRTENOTF);
-	error_def	(ERR_ZCARGMSMTCH);
-
-
-	VAR_START(var, dst);
-	va_count(n_mvals);
-	v = va_arg(var, mval *);
-	MV_FORCE_STR(v);
-
-	zcrtn = zctab;
-	while (zcrtn < zctab_end)
-	{
-		if (!zcrtn->entry_length)
-		{
-			va_end(var);
-			rts_error(VARLSTCNT(1) ERR_ZCALLTABLE);
-		}
-		if (zcrtn->callnamelen == 0)
-		{
-			va_end(var);
-			rts_error(VARLSTCNT(1) ERR_ZCALLTABLE);
-		}
-		if ((zcrtn->callnamelen == v->str.len) &&
-			!memcmp (zcrtn->callname, v->str.addr, v->str.len))
-			break;
-		zcrtn = (zctabrtn *) ((char *) zcrtn + zcrtn->entry_length);
-	}
-
-	if (zcrtn == zctab_end)
-	{
-		va_end(var);
-		rts_error(VARLSTCNT(4) ERR_ZCRTENOTF, 2, v->str.len, v->str.addr);
-	}
-
-	n_mvals -= 2;
-	if (n_mvals > zcrtn->n_inputs)
-	{
-		va_end(var);
-		rts_error(VARLSTCNT(4) ERR_ZCARGMSMTCH, 2, n_mvals, zcrtn->n_inputs);
-	}
-
-	lastout = (unsigned char *) zcrtn
-		  + ROUND_UP(SIZEOF(zctabrtn) + zcrtn->callnamelen - 1 + SIZEOF(zctabret), SIZEOF(int4))
-		  + zcrtn->n_inputs * SIZEOF(zctabinput)
-		  + zcrtn->n_outputs * SIZEOF(zctaboutput);
-
-	if (ROUND_UP((int) lastout + 1, SIZEOF(int4)) != (unsigned char *) zcrtn + zcrtn->entry_length)
-	{
-		va_end(var);
-		rts_error(VARLSTCNT(1) ERR_ZCALLTABLE);
-	}
-
-	for (i = 0;  i < n_mvals;  ++i)
-		mvallist[i] = va_arg(var, mval *);
-	va_end(var);
-
-	zc_makespace (dst, 0, mvallist, &mvallist[n_mvals], zcrtn, *lastout);
-	return;
-}
diff --git a/sr_vvms/op_fnzfile.c b/sr_vvms/op_fnzfile.c
deleted file mode 100644
index 3cd9b4a..0000000
--- a/sr_vvms/op_fnzfile.c
+++ /dev/null
@@ -1,491 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <rms.h>
-
-#include "stringpool.h"
-#include "min_max.h"
-#include "gtm_caseconv.h"
-#include "mvalconv.h"
-#include "op.h"
-
-GBLREF spdesc stringpool;
-
-#define ZF_ALQ	0
-#define ZF_BDT	1
-#define ZF_BKS	2
-#define ZF_BLS 	3
-#define ZF_CBT	4
-#define ZF_CDT	5
-#define ZF_CTG	6
-#define ZF_DEQ	7
-#define ZF_DID	8
-#define ZF_DVI	9
-#define ZF_EDT	10
-#define ZF_EOF	11
-#define ZF_FID	12
-#define ZF_FSZ	13
-#define ZF_GRP	14
-#define ZF_KNO	15
-#define ZF_MBM	16
-#define ZF_MRN	17
-#define ZF_MRS	18
-#define ZF_NOA	19
-#define ZF_NOK	20
-#define ZF_ORG	21
-#define ZF_PRO	22
-#define ZF_PVN	23
-#define ZF_RAT	24
-#define ZF_RCK	25
-#define ZF_RDT	26
-#define ZF_RFM	27
-#define ZF_RVN	28
-#define ZF_UIC	29
-#define ZF_WCK	30
-
-#define KEY_LEN	3
-#define MAX_ZF_LEN	128
-#define PRO_GRP_LEN	3
-#define PRO_MBM_LEN	5
-#define ORG_LEN	3
-#define RAT_LEN	3
-#define RAT_CR_LEN	2
-#define RFM_LEN	3
-#define RFM_STM_LEN	5
-#define MIN_ZF_INDEX	0
-#define MAX_ZF_INDEX	25
-#define PRO_FLDS	4
-#define ACC_FLDS	4
-#define FLD_SZ	4
-
-#define MAX_KW_LEN    	8
-
-typedef struct
-{	char *name;
-}zfile_key_struct;
-
-static readonly zfile_key_struct zfile_key[] =
-{
-	"ALQ","BDT","BKS","BLS","CBT","CDT","CTG","DEQ","DID","DVI","EDT","EOF","FID",
-	"FSZ","GRP","KNO","MBM","MRN","MRS","NOA","NOK","ORG","PRO","PVN","RAT","RCK",
-	"RDT","RFM","RVN","UIC","WCK"
-};
-
-typedef struct
-{	char index;
-	char last_index;
-}zfile_index_struct;
-
-static readonly zfile_index_struct zfile_index[] =
-{
-	{0,1},{1,4},{4,7},{7,10},{10,12},{12,14},{14,15},{0,0},{0,0},{0,0},{15,16},{0,0},
-	{16,19},{19,21},{21,22},{22,24},{0,0},{24,29},{0,0},{0,0},{29,30},{0,0},{30,31},
-	{0,0},{0,0},{0,0}
-};
-
-typedef struct
-{	unsigned x;
-	unsigned y;
-}quad_struct;
-
-error_def(ERR_ZFILNMBAD);
-error_def(ERR_ZFILKEYBAD);
-
-void op_fnzfile(mval *name,mval *key,mval *ret)
-{
-	struct NAM	nm;
-	struct XABDAT	dat;
-	struct XABSUM	sum;
-	struct XABPRO	pro;
-	struct XABFHC	fhc;
-	quad_struct 	*bdt;
-	quad_struct 	*cdt;
-	quad_struct 	*edt;
-	quad_struct 	*rdt;
-	int4		days;
-	int4		seconds;
-	struct FAB	f;
-	int4		status;
-	char		index,slot,last_slot;
-	char		buf[MAX_KW_LEN] ;
-
-	assert(stringpool.free >= stringpool.base);
-	assert(stringpool.top >= stringpool.free);
-	MV_FORCE_STR(name);
-	if (name->str.len == 0)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_ZFILNMBAD,2,4,"NULL");
-	MV_FORCE_STR(key);
-	if (key->str.len == 0 || key->str.len != KEY_LEN)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_ZFILKEYBAD,2,key->str.len,key->str.addr);
-	lower_to_upper(buf,key->str.addr,MIN(key->str.len,MAX_KW_LEN)) ;
-	nm = cc$rms_nam;
-	dat = cc$rms_xabdat;
-	sum = cc$rms_xabsum;
-	pro = cc$rms_xabpro;
-	fhc = cc$rms_xabfhc;
-	bdt = &(dat.xab$q_bdt);
-	cdt = &(dat.xab$q_cdt);
-	edt = &(dat.xab$q_edt);
-	rdt = &(dat.xab$q_rdt);
-	dat.xab$l_nxt = ∑
-	sum.xab$l_nxt = &pro;
-	pro.xab$l_nxt = &fhc;
-	if ((index = buf[0] - 'A') < MIN_ZF_INDEX || index > MAX_ZF_INDEX)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)  ERR_ZFILKEYBAD,2,key->str.len,key->str.addr);
-	if (!(last_slot = zfile_index[ index ].last_index))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)  ERR_ZFILKEYBAD,2,key->str.len,key->str.addr);
-	slot = zfile_index[ index ].index;
-	for ( ; slot < last_slot ; slot++ )
-	{
-		if (!memcmp(zfile_key[slot].name,buf,3))
-			break;
-	}
-	if (slot == last_slot)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4)  ERR_ZFILKEYBAD,2,key->str.len,key->str.addr);
-	f  = cc$rms_fab;
-	f.fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET | FAB$M_SHRDEL | FAB$M_SHRUPD;
-	f.fab$l_nam = &nm;
-	f.fab$l_xab = &dat;
-	f.fab$l_fna = name->str.addr;
-	f.fab$b_fns = name->str.len;
-	if ((status = sys$open(&f)) != RMS$_NORMAL)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	ENSURE_STP_FREE_SPACE(MAX_ZF_LEN);
-	switch( slot )
-	{
-	case ZF_ALQ:
-		i2mval(ret,f.fab$l_alq) ;
-		break;
-	case ZF_BDT:
-	{	ret->mvtype = MV_STR;
-		if (!bdt->x && !bdt->y)
-		{
-			ret->str.len = 0;
-			break;
-		}
-		if ((status= lib$day( &days, bdt, &seconds )) != SS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1)  status );
-		days += DAYS;
-		seconds /= CENTISECONDS;
-		ret->str.addr = stringpool.free;
-		stringpool.free = i2s(&days);
-		*stringpool.free++ = ',';
-		stringpool.free = i2s(&seconds);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-
-		break;
-	}
-	case ZF_BKS:
-		i2mval(ret,f.fab$b_bks) ;
-		break;
-	case ZF_BLS:
-		i2mval(ret,f.fab$w_bls) ;
-		break;
-	case ZF_CBT:
-		i2mval (ret,(f.fab$l_fop & FAB$M_CBT ? 1 : 0 )) ;
-		break;
-	case ZF_CDT:
-	{
-		if ((status= lib$day( &days, cdt, &seconds )) != SS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1)  status );
-		days += DAYS;
-		seconds /= CENTISECONDS;
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		stringpool.free = i2s(&days);
-		*stringpool.free++ = ',';
-		stringpool.free = i2s(&seconds);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		break;
-	}
-	case ZF_CTG:
-		i2mval (ret,(f.fab$l_fop & FAB$M_CTG ? 1 : 0 )) ;
-		break;
-	case ZF_DEQ:
-		i2mval(ret,f.fab$w_deq) ;
-		break;
-	case ZF_DID:
-	{	int4 did;
-
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		did = nm.nam$w_did[0];
-		stringpool.free = i2s(&did);
-		*stringpool.free++ = ',';
-		did = nm.nam$w_did[1];
-		stringpool.free = i2s(&did);
-		*stringpool.free++ = ',';
-		did = nm.nam$w_did[2];
-		stringpool.free = i2s(&did);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		break;
-	}
-	case ZF_DVI:
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		memcpy(stringpool.free,&(nm.nam$t_dvi[1]),nm.nam$t_dvi[0]);
-		ret->str.len = nm.nam$t_dvi[0];
-		stringpool.free += ret->str.len;
-		break;
-	case ZF_EDT:
-	{	ret->mvtype = MV_STR;
-		if (!edt->x && !edt->y)
-		{	ret->str.len = 0;
-			break;
-		}
-		if ((status= lib$day(	 &days
-					,edt
-					,&seconds	)) != SS$_NORMAL)
-		{	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1)  status );
-		}
-		days += DAYS;
-		seconds /= CENTISECONDS;
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		stringpool.free = i2s(&days);
-		*stringpool.free++ = ',';
-		stringpool.free = i2s(&seconds);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		break;
-	}
-	case ZF_EOF:
-		i2mval(ret,fhc.xab$l_ebk - 1) ;
-		break;
-	case ZF_FID:
-	{	int4 fid;
-
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		fid = nm.nam$w_fid[0];
-		stringpool.free = i2s(&fid);
-		*stringpool.free++ = ',';
-		fid = nm.nam$w_fid[1];
-		stringpool.free = i2s(&fid);
-		*stringpool.free++ = ',';
-		fid = nm.nam$w_fid[2];
-		stringpool.free = i2s(&fid);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		break;
-	}
-	case ZF_FSZ:
-		i2mval(ret,f.fab$b_fsz) ;
-		break;
-	case ZF_GRP:
-	{	char *pro_ptr;
-
-		pro_ptr = ((char *)&pro + XAB$C_PROLEN - PRO_GRP_LEN);
-		i2mval(ret,*(short *)pro_ptr) ;
-		break;
-	}
-	case ZF_KNO:
-		ret->mvtype = MV_STR;
-		ret->str.len = 0;
-		break;
-	case ZF_MBM:
-	{	char *pro_ptr;
-		pro_ptr = ((char *)&pro + XAB$C_PROLEN - PRO_MBM_LEN);
-		i2mval(ret,*(short *)pro_ptr) ;
-		break;
-	}
-	case ZF_MRN:
-		i2mval(ret,f.fab$l_mrn) ;
-		break;
-	case ZF_MRS:
-		i2mval(ret,f.fab$w_mrs) ;
-		break;
-	case ZF_NOA:
-		i2mval(ret,sum.xab$b_noa) ;
-		break;
-	case ZF_NOK:
-		i2mval(ret,sum.xab$b_nok) ;
-		break;
-	case ZF_ORG:
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		if (f.fab$b_org == FAB$C_SEQ)
-		{	memcpy(stringpool.free,"SEQ",ORG_LEN);
-		}
-		else if (f.fab$b_org == FAB$C_REL)
-		{	memcpy(stringpool.free,"REL",ORG_LEN);
-		}
-		else if (f.fab$b_org == FAB$C_IDX)
-		{	memcpy(stringpool.free,"IDX",ORG_LEN);
-		}
-		else if (f.fab$b_org == FAB$C_HSH)
-		{	memcpy(stringpool.free,"HSH",ORG_LEN);
-		}
-		ret->str.len = ORG_LEN;
-		stringpool.free += ORG_LEN;
-		break;
-	case ZF_PRO:
-	{	unsigned short mask;
-		char x,i;
-
-		x = XAB$V_SYS;
-		mask = pro.xab$w_pro;
-		ret->str.addr = stringpool.free;
-		ret->mvtype = MV_STR;
-		for ( x = 0 ; x < PRO_FLDS ;x++ )
-		{	if (x)
-			{	*stringpool.free++ = ',';
-			}
-			for (i = 0 ; i < ACC_FLDS ; i++ )
-			{	switch(i)
-				{
-				case XAB$V_NOREAD:
-					if ((mask & XAB$M_NOREAD) == 0)
-					{	*stringpool.free++ = 'R';
-					}
-					break;
-				case XAB$V_NOWRITE:
-					if ((mask & XAB$M_NOWRITE) == 0)
-					{	*stringpool.free++ = 'W';
-					}
-					break;
-				case XAB$V_NOEXE:
-					if ((mask & XAB$M_NOEXE) == 0)
-					{	*stringpool.free++ = 'E';
-					}
-					break;
-				case XAB$V_NODEL:
-					if ((mask & XAB$M_NODEL) == 0)
-					{	*stringpool.free++ = 'D';
-					}
-					break;
-				}
-			}
-			mask = (mask >> FLD_SZ);
-		}
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		break;
-	}
-	case ZF_PVN:
-		i2mval(ret,sum.xab$w_pvn) ;
-		break;
-	case ZF_RAT:
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		if (f.fab$b_rat & FAB$M_BLK)
-		{	memcpy(stringpool.free,"BLK",RAT_LEN);
-			stringpool.free += RAT_LEN;
-			*stringpool.free++ = ',';
-		}
-		if (f.fab$b_rat & FAB$M_CR)
-		{	memcpy(stringpool.free,"CR",RAT_CR_LEN);
-			stringpool.free += RAT_CR_LEN;
-			*stringpool.free++ = ',';
-		}
-		if (f.fab$b_rat & FAB$M_FTN)
-		{	memcpy(stringpool.free,"FTN",RAT_LEN);
-			stringpool.free += RAT_LEN;
-			*stringpool.free++ = ',';
-		}
-		if (f.fab$b_rat & FAB$M_PRN)
-		{	memcpy(stringpool.free,"PRN",RAT_LEN);
-			stringpool.free += RAT_LEN;
-			*stringpool.free++ = ',';
-		}
-		if (!IS_AT_END_OF_STRINGPOOL(ret->str.addr, 0));
-			stringpool.free--;
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		break;
-	case ZF_RCK:
-		i2mval(ret, (f.fab$l_fop & FAB$M_RCK ? 1 : 0 )) ;
-		break;
-	case ZF_RDT:
-	{	ret->mvtype = MV_STR;
-		if (!rdt->x && !rdt->y)
-		{	ret->str.len = 0;
-			break;
-		}
-		if ((status= lib$day(	 &days
-					,rdt
-					,&seconds	)) != SS$_NORMAL)
-		{	rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1)  status );
-		}
-		days += DAYS;
-		seconds /= CENTISECONDS;
-		ret->str.addr = stringpool.free;
-		stringpool.free = i2s(&days);
-		*stringpool.free++ = ',';
-		stringpool.free = i2s(&seconds);
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		assert(stringpool.free >= stringpool.base);
-		assert(stringpool.top >= stringpool.free);
-		break;
-	}
-	case ZF_RFM:
-		ret->mvtype = MV_STR;
-		ret->str.addr = stringpool.free;
-		switch( f.fab$b_rfm )
-		{
-		case FAB$C_FIX:
-			memcpy(stringpool.free,"FIX",RFM_LEN);
-			stringpool.free += RFM_LEN;
-			break;
-		case FAB$C_STM:
-			memcpy(stringpool.free,"STM",RFM_LEN);
-			stringpool.free += RFM_LEN;
-			break;
-		case FAB$C_STMCR:
-			memcpy(stringpool.free,"STMCR",RFM_STM_LEN);
-			stringpool.free += RFM_STM_LEN;
-			break;
-		case FAB$C_STMLF:
-			memcpy(stringpool.free,"STMLF",RFM_STM_LEN);
-			stringpool.free += RFM_STM_LEN;
-			break;
-		case FAB$C_UDF:
-			memcpy(stringpool.free,"UDF",RFM_LEN);
-			stringpool.free += RFM_LEN;
-			break;
-		case FAB$C_VAR:
-			memcpy(stringpool.free,"VAR",RFM_LEN);
-			stringpool.free += RFM_LEN;
-			break;
-		case FAB$C_VFC:
-			memcpy(stringpool.free,"VFC",RFM_LEN);
-			stringpool.free += RFM_LEN;
-			break;
-		default:
-			assert(0);
-		}
-		ret->str.len = (char *) stringpool.free - ret->str.addr;
-		break;
-	case ZF_RVN:
-		i2mval(ret,dat.xab$w_rvn) ;
-		break;
-	case ZF_UIC:
-		i2mval(ret,pro.xab$l_uic) ;
-		break;
-	case ZF_WCK:
-		i2mval(ret,(f.fab$l_fop & FAB$M_WCK ? 1 : 0 )) ;
-		break;
-	default:
-		assert(0);
-	}
-	if ((status = sys$close(&f)) != RMS$_NORMAL)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	return;
-}
diff --git a/sr_vvms/op_fnzlkid.c b/sr_vvms/op_fnzlkid.c
deleted file mode 100644
index c2f1c14..0000000
--- a/sr_vvms/op_fnzlkid.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "op_fn.h"
-#include <lkidef.h>
-#include <ssdef.h>
-#include "op.h"
-#include "mvalconv.h"
-
-static	bool	lock_used = FALSE;
-
-void op_fnzlkid (mint boolex, mval *retval)
-{
-error_def(ERR_ZLKIDBADARG);
-static	itmlist_struct	item_list;
-static	int4	lock_id = -1;
-static	int4	out_value;
-static	int4	out_len;
-static	int4	status;
-
-	if  (!lock_used && boolex)
-		rts_error(VARLSTCNT(1) ERR_ZLKIDBADARG);
-
-	if  (!boolex)  lock_id = -1;
-	item_list.itmcode = LKI$_LOCKID;
-	item_list.bufflen = 4;
-	item_list.buffaddr = &out_value;
-	item_list.retlen = &out_len;
-	item_list.end = 0;
-	if  ((status = sys$getlkiw (0, &lock_id, &item_list, 0, 0, 0, 0)) == SS$_NORMAL)
-	{
-		i2mval(retval,out_value) ;
-		lock_used = TRUE;
-	}
-	else
-	{
-		if  (status != SS$_NOMORELOCK)  rts_error(VARLSTCNT(1) status);
-		retval->mvtype = MV_STR;
-		retval->str.addr = 0;
-		retval->str.len = 0;
-		lock_used = FALSE;
-	}
-}
diff --git a/sr_vvms/op_fnzp1.c b/sr_vvms/op_fnzp1.c
deleted file mode 100644
index da5ffcf..0000000
--- a/sr_vvms/op_fnzp1.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- * -----------------------------------------------
- * op_fnzp1 $ZPIece function (the piecemaker) (and non-unicode $PIECE)
- * Special case of 1 char delimiter and 1 piece (reference)
- *
- * Arguments:
- *	src		- pointer to Source mval
- *	del		- delimiter char to use looking for a piece
- *	trgpcidx	- index of piece to extract from source string
- *	dst		- pointer to Destination mval to save the piece in
- *
- * Return:
- *	none
- *
- * Side effects:
- *	dst structure gets filled with the result
- * -----------------------------------------------
- */
-
-
-#include "mdef.h"
-
-#include "fnpc.h"
-#include "min_max.h"
-#include "op.h"
-
-GBLREF boolean_t	badchar_inhibit;	/* Not recognizing bad characters in UTF8 */
-
-#ifdef DEBUG
-GBLREF	uint4	process_id;
-GBLREF	boolean_t	setp_work;		/* The work we are doing is for set $piece */
-GBLREF	int	c_miss;				/* cache misses (debug) */
-GBLREF	int	c_hit;				/* cache hits (debug) */
-GBLREF	int	c_small;			/* scanned small string brute force */
-GBLREF	int	c_small_pcs;			/* chars scanned by small scan */
-GBLREF	int	c_pskip;			/* number of pieces "skipped" */
-GBLREF	int	c_pscan;			/* number of pieces "scanned" */
-GBLREF	int	c_parscan;			/* number of partial scans (partial cache hits) */
-GBLREF	int	cs_miss;			/* cache misses (debug) */
-GBLREF	int	cs_hit;				/* cache hits (debug) */
-GBLREF	int	cs_small;			/* scanned small string brute force */
-GBLREF	int	cs_small_pcs;			/* chars scanned by small scan */
-GBLREF	int	cs_pskip;			/* number of pieces "skipped" */
-GBLREF	int	cs_pscan;			/* number of pieces "scanned" */
-GBLREF	int	cs_parscan;			/* number of partial scans (partial cache hits) */
-GBLREF	int	c_clear;			/* cleared due to (possible) value change */
-#  define COUNT_EVENT(x) if (setp_work) ++cs_##x; else ++c_##x;
-#  define INCR_COUNT(x,y) if (setp_work) cs_##x += y; else c_##x += y;
-#else
-#  define COUNT_EVENT(x)
-#  define INCR_COUNT(x,y)
-#endif
-
-void op_fnzp1(mval *src, int delim, int trgpcidx,  mval *dst, boolean_t srcisliteral)
-{
-	unsigned char	*first, *last, *start, *end;
-	unsigned char	dlmc;
-	unsigned int	*pcoff, *pcoffmax, fnpc_indx, slen;
-	int		trgpc, cpcidx, spcidx;
-	fnpc   		*cfnpc;
-	delimfmt	ldelim;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	MV_FORCE_STR(src);
-	dst->mvtype = MV_STR;
-	ldelim.unichar_val = delim;
-	dlmc = ldelim.unibytes_val[0];
-	assert(0 == ldelim.unibytes_val[1] && 0 == ldelim.unibytes_val[2] &&
-			0 == ldelim.unibytes_val[3]);	/* delimiter should be 1-byte char */
-	start = first = last = (unsigned char *)src->str.addr;
-	slen = src->str.len;
-	end = start + slen;
-
-	/* Detect annoyance cases and deal with quickly so we don't muck up the
-	   logic below trying to handle it properly */
-	if (0 >= trgpcidx || 0 == slen)
-	{
-		dst->str.addr = (char *)start;
-		dst->str.len  = 0;
-		return;
-	}
-
-	/* If the string length meets our minimum requirements, lets play
-	   "What's in my cache"  */
-	if (FNPC_STRLEN_MIN < slen && !srcisliteral)
-	{
-		/* Test mval for valid cache: index ok, mval addr same, delim same */
-		fnpc_indx = src->fnpc_indx - 1;
-		cfnpc = &(TREF(fnpca)).fnpcs[fnpc_indx];
-		if (FNPC_MAX > fnpc_indx && cfnpc->last_str.addr == (char *)first &&
-		    cfnpc->last_str.len == slen && cfnpc->delim == ldelim.unichar_val)
-		{
-			assert(cfnpc->byte_oriented);
-			/* Have valid cache. See if piece we want already in cache */
-			COUNT_EVENT(hit);
-			INCR_COUNT(pskip, cfnpc->npcs);
-
-			if (trgpcidx <= cfnpc->npcs)
-			{
-				/* Piece is totally in cache no scan needed */
-				dst->str.addr = (char *)first + cfnpc->pstart[trgpcidx - 1];
-				dst->str.len = cfnpc->pstart[trgpcidx] - cfnpc->pstart[trgpcidx - 1] - 1;
-				assert(dst->str.len >= 0 && dst->str.len <= src->str.len);
-				return;
-			} else
-			{
-				/* Not in cache but pick up scan where we left off */
-				cpcidx = cfnpc->npcs;
-				first = last = start + cfnpc->pstart[cpcidx];	/* First char of next pc */
-				pcoff = &cfnpc->pstart[cpcidx];
-				if (pcoff == cfnpc->pcoffmax)
-					++pcoff; 		/* No further updates to pstart array */
-				++cpcidx;			/* Now past last piece and on to next one */
-				COUNT_EVENT(parscan);
-			}
-		} else
-		{
-			/* The piece cache index or mval validation was incorrect.
-			   Start from the beginning */
-
-			COUNT_EVENT(miss);
-
-			/* Need to steal a new piece cache, get "least recently reused" */
-			cfnpc = (TREF(fnpca)).fnpcsteal;	/* Get next element to steal */
-			if ((TREF(fnpca)).fnpcmax < cfnpc)
-				cfnpc = &(TREF(fnpca)).fnpcs[0];
-			(TREF(fnpca)).fnpcsteal = cfnpc + 1;	/* -> next element to steal */
-
-			cfnpc->last_str = src->str;		/* Save validation info */
-			cfnpc->delim = ldelim.unichar_val;
-			cfnpc->npcs = 0;
-			cfnpc->byte_oriented = TRUE;
-			src->fnpc_indx = cfnpc->indx + 1;	/* Save where we are putting this element
-								   (1 based index in mval so 0 isn't so common) */
-			pcoff = &cfnpc->pstart[0];
-			cpcidx = 1;				/* current piece index */
-		}
-
-		/* Do scan filling in offsets of pieces if they fit in the cache */
-		spcidx = cpcidx;				/* Starting value for search */
-		pcoffmax = cfnpc->pcoffmax;			/* Local end of array value */
-		while (cpcidx <= trgpcidx && last < end)
-		{
-			/* Once through for each piece we pass, last time through to find length of piece we want */
-			first = last;				/* first char of current piece */
-			while (last != end && *last != dlmc) last++;	/* Find delim signaling end of piece */
-			last++;					/* Bump past delim to first char next piece,
-								   or if hit last char, +2 past end of piece */
-			++cpcidx;				/* Next piece */
-			if (pcoff < pcoffmax)
-				*pcoff++ = first - start;	/* offset to this piece */
-			if (pcoff == pcoffmax)
-				*pcoff++ = last - start;	/* store start of first piece beyond what is in cache */
-		}
-
-		dst->str.addr = (char *)first;
-
-		/* If we scanned some chars, adjust end pointer and save end of final piece */
-		if (spcidx != cpcidx)
-		{
-			if (pcoff < pcoffmax)
-				*pcoff = last - start;		/* If not at end of cache, save start of "next" piece */
-
-			--last;					/* Undo bump past last delim or +2 past end char
-								   of piece for accurate string len */
-			/* Update count of pieces in cache */
-			cfnpc->npcs = MIN((cfnpc->npcs + cpcidx - spcidx), FNPC_ELEM_MAX);
-			assert(cfnpc->npcs <= FNPC_ELEM_MAX);
-			assert(cfnpc->npcs > 0);
-
-			/* If the above loop ended prematurely because we ran out of text, we return null string */
-			if (trgpcidx < cpcidx)
-				dst->str.len = last - first;	/* Length of piece we located */
-			else
-				dst->str.len = 0;
-
-			INCR_COUNT(pscan, cpcidx - spcidx);	/* Pieces scanned */
-		} else
-			dst->str.len  = 0;
-
-		assert(cfnpc->npcs > 0);
-		assert(dst->str.len >= 0 && dst->str.len <= src->str.len);
-	} else
-	{
-		/* We have too small a string to worry about cacheing with or the string is a literal for which we cannot
-		   change the fnpc index. In the first case it would take more work to set up the cache than it would to
-		   just scan it (several times). In the second case, linked images have their literal mvals in readonly
-		   storage so any attempt to set cacheing info into the mval results in an ACCVIO so cacheing must be
-		   bypassed.
-		*/
-		COUNT_EVENT(small);
-		cpcidx = 0 ;
-		while (cpcidx < trgpcidx && last < end)
-		{
-			first = last;
-			while (last != end && *last != dlmc) last++ ;
-			last++; cpcidx++;
-		}
-		last-- ;
-		dst->mvtype = MV_STR;
-		dst->str.addr = (char *)first;
-		dst->str.len  = (cpcidx == trgpcidx && cpcidx != 0 ? last - first : 0);
-		INCR_COUNT(small_pcs, cpcidx);
-	}
-	return;
-
-}
diff --git a/sr_vvms/op_fnzparse.c b/sr_vvms/op_fnzparse.c
deleted file mode 100644
index d8a7396..0000000
--- a/sr_vvms/op_fnzparse.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <rms.h>
-#include <ssdef.h>
-#include "gtm_caseconv.h"
-#include "stringpool.h"
-#include "op.h"
-
-#define ZP_DEVICE	1
-#define ZP_DIRECTORY	2
-#define ZP_NAME		3
-#define ZP_NODE		4
-#define ZP_TYPE		5
-#define ZP_VERSION	6
-#define ZP_FULL		7
-
-#define DEV_LEN		6
-#define DIR_LEN		9
-#define VER_LEN		7
-#define ZP_LEN		4
-#define ZP_STR_LEN	255
-#define NCON_LEN	10
-#define SYN_LEN		11
-
-void op_fnzparse( mval *file, mval *field, mval *def1, mval *def2, mval *type, mval *ret)
-{
-char 		field_type;
-uint4 	status;
-unsigned char 	field_buf[DIR_LEN],type_buf[SYN_LEN], def_buf[ZP_STR_LEN], esa[ZP_STR_LEN];
-struct FAB fab, fab_def;
-struct NAM nam, nam_def;
-error_def(ERR_ZPARSETYPE);
-error_def(ERR_ZPARSFLDBAD);
-error_def(ERR_INVSTRLEN);
-
-MV_FORCE_STR(field);
-MV_FORCE_STR(def1);
-MV_FORCE_STR(def2);
-MV_FORCE_STR(file);
-MV_FORCE_STR(type);
-
-if (def1->str.len > ZP_STR_LEN)
-	rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, def1->str.len, ZP_STR_LEN);
-if (def2->str.len > ZP_STR_LEN)
-	rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, def2->str.len, ZP_STR_LEN);
-
-if (field->str.len == 0)
-{	field_type = ZP_FULL;
-}
-else
-{	field_type = 0;
-	if (field->str.len <= DIR_LEN)
-	{
-		lower_to_upper(&field_buf[0], field->str.addr, field->str.len);
-		switch( field_buf[0] )
-		{
-		case 'D':
-			if (field->str.len <= DEV_LEN &&
-				!memcmp(&field_buf[0],"DEVICE",field->str.len))
-			{	field_type = ZP_DEVICE;
-			}
-			else if (field->str.len <= DIR_LEN &&
-				!memcmp(&field_buf[0],"DIRECTORY",field->str.len))
-			{	field_type = ZP_DIRECTORY;
-			}
-			break;
-		case 'N':
-			if (field->str.len <= ZP_LEN)
-			{	if(!memcmp(&field_buf[0],"NAME",field->str.len))
-				{	field_type = ZP_NAME;
-				}
-				else if (!memcmp(&field_buf[0],"NODE",field->str.len))
-				{	field_type = ZP_NODE;
-				}
-			}
-			break;
-		case 'T':
-			if (field->str.len <= ZP_LEN &&
-				!memcmp(&field_buf[0],"TYPE",field->str.len))
-			{	field_type = ZP_TYPE;
-			}
-			break;
-		case 'V':
-			if (field->str.len <= VER_LEN &&
-				!memcmp(&field_buf[0],"VERSION",field->str.len))
-			{	field_type = ZP_VERSION;
-			}
-			break;
-		default:
-			break;
-		}
-	}
-	if(!field_type)
-	{	rts_error(VARLSTCNT(4) ERR_ZPARSFLDBAD,2,field->str.len,field->str.addr);
-	}
-}
-fab = cc$rms_fab;
-nam = cc$rms_nam;
-if (type->str.len == 0)
-{	nam.nam$b_nop = 0;
-}
-else
-{
-	if (type->str.len <= SYN_LEN)
-		lower_to_upper(&type_buf[0], type->str.addr, type->str.len);
-	if (type->str.len <= SYN_LEN && !memcmp(&type_buf[0],"SYNTAX_ONLY",type->str.len))
-	{	nam.nam$b_nop = NAM$M_SYNCHK;
-	}
-	else if (type->str.len <= NCON_LEN &&
-			!memcmp(&type_buf[0],"NO_CONCEAL",type->str.len))
-	{	nam.nam$b_nop = NAM$M_NOCONCEAL;
-	}
-	else
-	{	rts_error(VARLSTCNT(4) ERR_ZPARSETYPE,2,type->str.len,type->str.addr);
-	}
-}
-
-fab.fab$l_nam = &nam;
-fab.fab$l_fop = FAB$M_NAM;
-fab.fab$l_fna = file->str.addr;
-fab.fab$b_fns = file->str.len;
-nam.nam$l_esa = esa;
-nam.nam$b_ess = sizeof (esa);
-
-if (def2->str.len)
-{
-	fab_def = cc$rms_fab;
-	nam_def = cc$rms_nam;
-	fab_def.fab$l_nam = &nam_def;
-	fab_def.fab$l_fop = FAB$M_NAM;
-	fab_def.fab$l_fna = def2->str.addr;
-	fab_def.fab$b_fns = def2->str.len;
-	nam_def.nam$b_nop = NAM$M_SYNCHK;
-	nam_def.nam$l_esa = def_buf;
-	nam_def.nam$b_ess = sizeof (def_buf);
-	if ((status = sys$parse(&fab_def,0,0)) != RMS$_NORMAL)
-	{	ret->mvtype = MV_STR;
-		ret->str.len = 0;
-		return;
-	}
-	nam_def.nam$l_rsa = nam_def.nam$l_esa;
-	nam_def.nam$b_rsl = nam_def.nam$b_esl;
-	nam.nam$l_rlf = &nam_def;
-}
-if (def1->str.len)
-{	fab.fab$l_dna = def1->str.addr;
-	fab.fab$b_dns = def1->str.len;
-}
-
-if ((status = sys$parse(&fab, 0, 0)) != RMS$_NORMAL)
-{	ret->mvtype = MV_STR;
-	ret->str.len = 0;
-	return;
-}
-
-ret->mvtype = MV_STR;
-switch( field_type )
-{
-case ZP_DEVICE:
-	ret->str.addr = nam.nam$l_dev;
-	ret->str.len = nam.nam$b_dev;
-	break;
-case ZP_DIRECTORY:
-	ret->str.addr = nam.nam$l_dir;
-	ret->str.len = nam.nam$b_dir;
-	break;
-case ZP_NAME:
-	ret->str.addr = nam.nam$l_name;
-	ret->str.len = nam.nam$b_name;
-	break;
-case ZP_NODE:
-	ret->str.addr = nam.nam$l_node;
-	ret->str.len = nam.nam$b_node;
-	break;
-case ZP_TYPE:
-	ret->str.addr = nam.nam$l_type;
-	ret->str.len = nam.nam$b_type;
-	break;
-case ZP_VERSION:
-	ret->str.addr = nam.nam$l_ver;
-	ret->str.len = nam.nam$b_ver;
-	break;
-default:
-	ret->str.addr = nam.nam$l_esa;
-	ret->str.len = nam.nam$b_esl;
-	break;
-}
-s2pool(&ret->str);
-
-if (nam.nam$b_nop != NAM$M_SYNCHK)
-{	/* release channel from parse */
-	fab.fab$b_dns = fab.fab$b_fns = 0;
-	nam.nam$b_nop = NAM$M_SYNCHK;
-	sys$parse(&fab, 0, 0);
-}
-
-return;
-}
diff --git a/sr_vvms/op_fnzpid.c b/sr_vvms/op_fnzpid.c
deleted file mode 100644
index 745f18f..0000000
--- a/sr_vvms/op_fnzpid.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include <ssdef.h>
-#include "op.h"
-#include "mvalconv.h"
-
-static uint4 last_pid = 0;
-static uint4 new_pid;
-static bool pid_used = FALSE;
-static int4 jpi_code = JPI$_PID;
-
-void op_fnzpid(mint boolexpr,mval *ret)
-{
-	error_def(ERR_ZPIDBADARG);
-	uint4 status;
-	int4 pid = -1;
-
-	if(!pid_used && boolexpr)
-	{	rts_error(VARLSTCNT(1) ERR_ZPIDBADARG);
-	}
-	if ( !boolexpr )
-	{	do
-		{	status = lib$getjpi(&jpi_code
-						,&pid
-						,0
-						,&new_pid
-						,0 ,0);
-		}while (status == SS$_NOPRIV || status == SS$_SUSPENDED);
-		if (status == SS$_NORMAL)
-		{
-			i2mval(ret,new_pid) ;
-			pid_used = TRUE;
-			last_pid = new_pid;
-			return;
-		}
-		else
-		{	rts_error(VARLSTCNT(1) status);
-		}
-	}
-	else
-	{	do
-		{	do
-			{	status = lib$getjpi(	 &jpi_code
-							,&pid
-							,0
-							,&new_pid
-							,0 ,0 );
-			}while (status == SS$_NOPRIV || status == SS$_SUSPENDED);
-		}while (new_pid != last_pid && status == SS$_NORMAL);
-		switch (status )
-		{
-		case SS$_NOMOREPROC:
-			ret->str.len = 0;
-			ret->mvtype = MV_STR;
-			pid_used = FALSE;
-			return;
-		case SS$_NORMAL:
-			do
-			{	status = lib$getjpi(	 &jpi_code
-							,&pid
-							,0
-							,&new_pid
-							,0 ,0 );
-			}while (status == SS$_NOPRIV || status == SS$_SUSPENDED);
-			if (status == SS$_NORMAL)
-			{
-				i2mval(ret,new_pid) ;
-				pid_used = TRUE;
-				last_pid = new_pid;
-				return;
-			}
-			else if (status == SS$_NOMOREPROC)
-			{	ret->str.len = 0;
-				ret->mvtype = MV_STR;
-				pid_used = FALSE;
-				return;
-			}
-			else
-			{	rts_error(VARLSTCNT(1)  status );
-			}
-		}
-	}
-}
diff --git a/sr_vvms/op_fnzpiece.c b/sr_vvms/op_fnzpiece.c
deleted file mode 100644
index 3884692..0000000
--- a/sr_vvms/op_fnzpiece.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "op.h"
-#include "matchc.h"
-#include "fnpc.h"
-
-/*
- * -----------------------------------------------
- * op_fnzpiece()
- * MUMPS $ZPIece function (and non-unicode $PIECE)
- *
- * Arguments:
- *	src	- Pointer to Source string mval
- *	del	- Pointer to delimiter mval
- *	first	- starting piece number
- *	last	- last piece number
- *	dst	- destination buffer to save the piece in
- *
- * Return:
- *	none
- * -----------------------------------------------
- */
-void op_fnzpiece(mval *src, mval *del, int first, int last, mval *dst, boolean_t srcisliteral)
-{
-	int		piece_cnt, ofirst;
-	int		del_len, src_len;
-	char		*del_str, *src_str, *tmp_str;
-	char		*match_start;
-	int		match_res, numpcs;
-	delimfmt	unichar;
-
-	ofirst = first;
-	if (--first < 0)
-		first = 0;
-
-	if ((piece_cnt = last - first) < 1)
-	{
-		dst->str.len = 0;
-		dst->mvtype = MV_STR;
-		return;
-	}
-
-	MV_FORCE_STR(src);
-	MV_FORCE_STR(del);
-
-	/* See if we can take a short cut to op_fnzp1 (need to reformat delim argument) */
-	if (1 == del->str.len && ofirst == last)
-	{
-		unichar.unichar_val = 0;
-		unichar.unibytes_val[0] = *del->str.addr;
-		op_fnzp1(src, unichar.unichar_val, ofirst, dst, srcisliteral);
-		return;
-	}
-	src_len = src->str.len;
-	src_str = src->str.addr;
-	del_len = del->str.len;
-	del_str = del->str.addr;
-	while (first--)
-	{
-		numpcs = 1;
-		tmp_str = (char *)matchb(del_len, (uchar_ptr_t)del_str, src_len, (uchar_ptr_t)src_str, &match_res, &numpcs);
-		src_len -= (tmp_str - src_str);
-		src_str = tmp_str;
-		if (0 == match_res)
-		{
-			dst->str.len = 0;
-			dst->mvtype = MV_STR;
-			return;
-		}
-	}
-	match_start = src_str;
-	while (piece_cnt--)
-	{
-		numpcs = 1;
-		tmp_str = (char *)matchb(del_len, (uchar_ptr_t)del_str, src_len, (uchar_ptr_t)src_str, &match_res, &numpcs);
-		src_len -= (tmp_str - src_str);
-		src_str = tmp_str;
-		if (0 == match_res)
-			break;
-	}
-	if (0 != match_res)
-		src_str -= del_len;
-	dst->str.addr = match_start;
-	dst->str.len = src_str - match_start;
-	dst->mvtype = MV_STR;
-	return;
-}
diff --git a/sr_vvms/op_fnzpriv.c b/sr_vvms/op_fnzpriv.c
deleted file mode 100644
index bc42019..0000000
--- a/sr_vvms/op_fnzpriv.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "prvdef.h"
-#include <jpidef.h>
-#include <ssdef.h>
-
-#include "min_max.h"
-#include "gtm_caseconv.h"
-#include "op.h"
-#include "mvalconv.h"
-
-typedef	struct
-{	char len;
-	char name[20];
-	char bit_number;
-}prv_struct;
-
-typedef struct
-{	char index;
-	char last_index;
-}ind_struct;
-
-static readonly prv_struct priv_table[] =
-{
-	{ 8, "ALLSPOOL", PRV$V_ALLSPOOL },	{ 6, "BUGCHK", PRV$V_BUGCHK },
-	{ 6, "BYPASS", PRV$V_BYPASS },		{ 6, "CMEXEC", PRV$V_CMEXEC },
-	{ 6, "CMKRNL", PRV$V_CMKRNL },		{ 6, "DETACH", PRV$V_DETACH },
-	{ 8, "DIAGNOSE", PRV$V_DIAGNOSE },	{ 9, "DOWNGRADE", PRV$V_DOWNGRADE },
-	{ 7, "EXQUOTA", PRV$V_EXQUOTA },	{ 5, "GROUP", PRV$V_GROUP },
-	{ 6, "GRPNAM", PRV$V_GRPNAM },		{ 6, "GRPPRV", PRV$V_GRPPRV },
-	{ 6, "LOG_IO", PRV$V_LOG_IO },		{ 5, "MOUNT", PRV$V_MOUNT },
-	{ 6, "NETMBX", PRV$V_NETMBX },		{ 6, "NOACNT", PRV$V_NOACNT },
-	{ 4, "OPER", PRV$V_OPER },		{ 6, "PFNMAP", PRV$V_PFNMAP },
-	{ 6, "PHY_IO", PRV$V_PHY_IO },		{ 6, "PRMCEB", PRV$V_PRMCEB },
-	{ 6, "PRMGBL", PRV$V_PRMGBL },		{ 6, "PRMJNL", PRV$V_PRMJNL },
-	{ 6, "PRMMBX", PRV$V_PRMMBX },		{ 6, "PSWAPM", PRV$V_PSWAPM },
-	{ 7, "READALL", PRV$V_READALL },	{ 8, "SECURITY", PRV$V_SECURITY },
-	{ 6, "SETPRI", PRV$V_SETPRI },		{ 6, "SETPRV", PRV$V_SETPRV },
-	{ 5, "SHARE", PRV$V_SHARE },		{ 5, "SHMEM", PRV$V_SHMEM },
-	{ 6, "SYSGBL", PRV$V_SYSGBL },		{ 6, "SYSLCK", PRV$V_SYSLCK },
-	{ 6, "SYSNAM", PRV$V_SYSNAM },		{ 6, "SYSPRV", PRV$V_SYSPRV },
-	{ 6, "TMPJNL", PRV$V_TMPJNL },		{ 6, "TMPMBX", PRV$V_TMPMBX },
-	{ 7, "UPGRADE", PRV$V_UPGRADE },	{ 6, "VOLPRO", PRV$V_VOLPRO },
-	{ 5, "WORLD", PRV$V_WORLD}
-};
-
-static readonly ind_struct prv_index[] =
-{
-	{ 0 , 1 }, { 1 , 3 }, { 3 , 5 }, { 5 , 8 }, { 8 , 9 }, { 0 , 0 }, { 9 , 12 }, { 0 , 0 },
-	{ 0 , 0 }, { 0 , 0 }, { 0 , 0 }, { 12 , 13 }, { 13 , 14 }, { 14 , 16 }, { 16 , 17 },
-	{ 17, 24 }, { 0 , 0 }, { 24 , 25 }, { 25 , 34 }, { 34 , 36 }, { 36 , 37 }, { 37 , 38 },
-	{ 38 , 39 }, { 0 , 0 }, { 0 , 0 }, { 0 , 0 }
-};
-
-static int4 jpi_code = JPI$_CURPRIV;
-
-#define MAX_KW_LEN  128
-#define MIN_INDEX 0
-#define MAX_INDEX 25
-
-void op_fnzpriv(mval *prv,mval *ret)
-{
-uint4 	status;
-int4 		priv_bit;
-short 		index, slot, last_slot, prv_len;
-short 		buflen ;
-unsigned char 	out_value[8];
-char		buf[MAX_KW_LEN] ;
-char 		*str_end,*str_cur,*prv_start;
-error_def	(ERR_ZPRIVARGBAD);
-error_def	(ERR_ZPRIVSYNTAXERR);
-
-MV_FORCE_STR(prv);
-ret->mvtype = MV_NM;
-if (prv->str.len == 0)
-{	rts_error(VARLSTCNT(4) ERR_ZPRIVARGBAD,2,4,"Null");
-}
-if ((status = lib$getjpi(	 &jpi_code
-				,0 ,0
-				,out_value
-				,0 ,0	)) != SS$_NORMAL)
-{	rts_error(VARLSTCNT(1)  status );
-}
-
-buflen = MIN(prv->str.len,MAX_KW_LEN) ;
-lower_to_upper(buf,prv->str.addr,buflen) ;
-str_cur = prv_start = str_end = buf ;
-str_end += buflen ;
-
-while (prv_start < str_end)
-{
-	while (*str_cur != ',' && str_cur != str_end)
-	{	str_cur++;
-	}
-	prv_len = str_cur - prv_start;
-	if ((index = *prv_start - 'A') < MIN_INDEX || index > MAX_INDEX
-		|| !(last_slot = prv_index[ index ].last_index) )
-	{	rts_error(VARLSTCNT(4) ERR_ZPRIVARGBAD,2,prv_len,prv_start);
-	}
-	slot = prv_index[ index ].index;
-	priv_bit = -1;
-	for ( ; slot < last_slot ; slot++)
-	{	if (prv_len == priv_table[slot].len && !memcmp(prv_start,priv_table[ slot ].name,prv_len))
-		{	priv_bit = priv_table[slot].bit_number;
-			break;
-		}
-	}
-	if (priv_bit == -1)
-	{	rts_error(VARLSTCNT(4) ERR_ZPRIVARGBAD,2,prv_len,prv_start);
-	}
-	if ( !lib$bbssi(&priv_bit,out_value) )
-	{	ret->m[1] = 0 ;
-		return;
-	}
-	if (str_cur++ == str_end)
-	{	break;
-	}
-	if (str_cur == str_end)
-	{	rts_error(VARLSTCNT(1) ERR_ZPRIVSYNTAXERR);
-	}
-	prv_start = str_cur;
-}
-MV_FORCE_MVAL(ret,1);
-}
diff --git a/sr_vvms/op_fnzsearch.c b/sr_vvms/op_fnzsearch.c
deleted file mode 100644
index a70bf34..0000000
--- a/sr_vvms/op_fnzsearch.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <rms.h>
-#include <ssdef.h>
-
-#include "stringpool.h"
-#include "op.h"
-#include "op_fnzsearch.h"
-
-
-typedef struct fnzsearch
-{	short	index;
-	struct FAB fab;
-	struct NAM nam;
-	struct fnzsearch *next;
-} search_struct;
-
-#define SEA_SIZE SIZEOF(search_struct)
-
-static search_struct *fab_sea;
-static bool search_init = FALSE;
-
-GBLREF spdesc stringpool;
-
-error_def(ERR_ZFILENMTOOLONG);
-error_def(ERR_ZSRCHSTRMCT);
-
-int op_fnzsearch(mval *file, mint strm, mint mcmd, mval *ret)
-{
-	search_struct	*sea_ptr,*sea,*ptr;
-	unsigned char	esa[MAX_FN_LEN];
-	uint4		status;
-	int		retlen;
-	short		index, ct;
-
-	if (!search_init)
-	{
-		fab_sea = malloc(SEA_SIZE);
-		fab_sea->index = 0;
-		fab_sea->fab = cc$rms_fab;
-		fab_sea->nam = cc$rms_nam;
-		fab_sea->fab.fab$l_nam = &(fab_sea->nam);
-		fab_sea->fab.fab$l_fop = FAB$M_NAM;
-		fab_sea->fab.fab$l_fna = malloc(MAX_FN_LEN);
-		fab_sea->nam.nam$l_esa = malloc(MAX_FN_LEN);
-		fab_sea->nam.nam$b_ess = MAX_FN_LEN;
-		fab_sea->nam.nam$l_rsa = malloc(MAX_FN_LEN);
-		fab_sea->nam.nam$b_rss = MAX_FN_LEN;
-		fab_sea->fab.fab$b_fns = 0;
-		fab_sea->next = 0;
-		search_init = TRUE;
-	}
-	assert(fab_sea != 0);
-	index = (short)strm;
-	if (mcmd && ((MAX_STRM_CT <= index) || ( 0 > index)))	/* Bypass stream check for internal uses */
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_ZSRCHSTRMCT);
-	MV_FORCE_STR(file);
-	if (file->str.len > MAX_FN_LEN)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_ZFILENMTOOLONG, 2, file->str.len, file->str.addr);
-	sea_ptr = fab_sea;
-	while(sea_ptr->next != 0 && sea_ptr->next->index <= index)
-		sea_ptr = sea_ptr->next;
-	if (sea_ptr->index != index)
-	{
-		sea = malloc(SEA_SIZE);
-		sea->index = index;
-		sea->fab = cc$rms_fab;
-		sea->nam = cc$rms_nam;
-		sea->fab.fab$l_nam = &(sea->nam);
-		sea->fab.fab$l_fop = FAB$M_NAM;
-		sea->fab.fab$l_fna = malloc(file->str.len);
-		sea->fab.fab$b_fns = file->str.len;
-		sea->nam.nam$l_esa = malloc(MAX_FN_LEN);
-		sea->nam.nam$b_ess = MAX_FN_LEN;
-		sea->nam.nam$l_rsa = malloc(MAX_FN_LEN);
-		sea->nam.nam$b_rss = MAX_FN_LEN;
-		sea->next = sea_ptr->next;
-		sea_ptr->next = sea;
-		sea_ptr =sea_ptr->next;
-		memcpy(sea_ptr->fab.fab$l_fna,file->str.addr,file->str.len);
-		if ((status = sys$parse(&(sea_ptr->fab),0,0)) != RMS$_NORMAL)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	} else
-	{
-		if (file->str.len > sea_ptr->fab.fab$b_fns)
-		{
-			free (sea_ptr->fab.fab$l_fna);
-			sea_ptr->fab.fab$l_fna = malloc(file->str.len);
-		}
-		if (file->str.len != sea_ptr->fab.fab$b_fns || memcmp(sea_ptr->fab.fab$l_fna,file->str.addr,file->str.len))
-		{
-			memcpy(sea_ptr->fab.fab$l_fna,file->str.addr,file->str.len);
-			sea_ptr->fab.fab$b_fns = file->str.len;
-			if ((status = sys$parse(&(sea_ptr->fab),0,0)) != RMS$_NORMAL)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-		}
-	}
-	status = sys$search(&(sea_ptr->fab), 0, 0);
-	switch(status)
-	{
-		case RMS$_NORMAL:
-			assert(stringpool.free >= stringpool.base);
-			assert(stringpool.top >= stringpool.free);
-			retlen = sea_ptr->nam.nam$b_rsl;
-			ENSURE_STP_FREE_SPACE(retlen);
-			ret->str.len = retlen;
-			ret->str.addr = stringpool.free;
-			memcpy(ret->str.addr,sea_ptr->nam.nam$l_rsa,ret->str.len);
-			stringpool.free += ret->str.len;
-			assert(stringpool.free >= stringpool.base);
-			assert(stringpool.top >= stringpool.free);
-			break;
-		case RMS$_NMF:
-		case RMS$_FNF:
-			ret->str.len = 0;
-			if (sea_ptr->index != 0)
-			{	ptr = fab_sea;
-				while(ptr->next->index < sea_ptr->index)
-					ptr = ptr->next;
-				ptr->next = sea_ptr->next;
-				free(sea_ptr->nam.nam$l_esa);
-				free(sea_ptr->nam.nam$l_rsa);
-				free(sea_ptr->fab.fab$l_fna);
-				free(sea_ptr);
-			} else
-				sea_ptr->fab.fab$b_fns = 0;
-			break;
-		default:
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-	ret->mvtype = MV_STR;
-	return 0; /* dummy for compatibility with unix prototype */
-}
diff --git a/sr_vvms/op_fnzsetprv.c b/sr_vvms/op_fnzsetprv.c
deleted file mode 100644
index 99cefd4..0000000
--- a/sr_vvms/op_fnzsetprv.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "prvdef.h"
-#include <jpidef.h>
-#include <ssdef.h>
-
-#include "stringpool.h"
-#include "min_max.h"
-#include "gtm_caseconv.h"
-#include "op.h"
-
-typedef	struct
-{	char len;
-	char name[20];
-	char bit_number;
-}prv_struct;
-
-typedef struct
-{	char index;
-	char last_index;
-}ind_struct;
-
-static readonly prv_struct priv_table[] =
-{
-	{ 4, "ACNT", PRV$V_NOACNT },		{ 8, "ALLSPOOL", PRV$V_ALLSPOOL },
-	{ 6, "BUGCHK", PRV$V_BUGCHK },
-	{ 6, "BYPASS", PRV$V_BYPASS },		{ 6, "CMEXEC", PRV$V_CMEXEC },
-	{ 6, "CMKRNL", PRV$V_CMKRNL },		{ 6, "DETACH", PRV$V_DETACH },
-	{ 8, "DIAGNOSE", PRV$V_DIAGNOSE },	{ 9, "DOWNGRADE", PRV$V_DOWNGRADE },
-	{ 7, "EXQUOTA", PRV$V_EXQUOTA },	{ 5, "GROUP", PRV$V_GROUP },
-	{ 6, "GRPNAM", PRV$V_GRPNAM },		{ 6, "GRPPRV", PRV$V_GRPPRV },
-	{ 6, "LOG_IO", PRV$V_LOG_IO },		{ 5, "MOUNT", PRV$V_MOUNT },
-	{ 6, "NETMBX", PRV$V_NETMBX },
-	{ 4, "OPER", PRV$V_OPER },		{ 6, "PFNMAP", PRV$V_PFNMAP },
-	{ 6, "PHY_IO", PRV$V_PHY_IO },		{ 6, "PRMCEB", PRV$V_PRMCEB },
-	{ 6, "PRMGBL", PRV$V_PRMGBL },		{ 6, "PRMJNL", PRV$V_PRMJNL },
-	{ 6, "PRMMBX", PRV$V_PRMMBX },		{ 6, "PSWAPM", PRV$V_PSWAPM },
-	{ 7, "READALL", PRV$V_READALL },	{ 8, "SECURITY", PRV$V_SECURITY },
-	{ 6, "SETPRI", PRV$V_SETPRI },		{ 6, "SETPRV", PRV$V_SETPRV },
-	{ 5, "SHARE", PRV$V_SHARE },		{ 5, "SHMEM", PRV$V_SHMEM },
-	{ 6, "SYSGBL", PRV$V_SYSGBL },		{ 6, "SYSLCK", PRV$V_SYSLCK },
-	{ 6, "SYSNAM", PRV$V_SYSNAM },		{ 6, "SYSPRV", PRV$V_SYSPRV },
-	{ 6, "TMPJNL", PRV$V_TMPJNL },		{ 6, "TMPMBX", PRV$V_TMPMBX },
-	{ 7, "UPGRADE", PRV$V_UPGRADE },	{ 6, "VOLPRO", PRV$V_VOLPRO },
-	{ 5, "WORLD", PRV$V_WORLD}
-};
-
-static readonly ind_struct prv_index[] =
-{
-	{ 0 , 2 }, { 2 , 4 }, { 4 , 6 }, { 6 , 9 }, { 9 , 10 }, { 0 , 0 }, { 10 , 13 }, { 0 , 0 },
-	{ 0 , 0 }, { 0 , 0 }, { 0 , 0 }, { 13 , 14 }, { 14 , 15 }, { 15 , 16 }, { 16 , 17 },
-	{ 17, 24 }, { 0 , 0 }, { 24 , 25 }, { 25 , 34 }, { 34 , 36 }, { 36 , 37 }, { 37 , 38 },
-	{ 38 , 39 }, { 0 , 0 }, { 0 , 0 }, { 0 , 0 }
-};
-
-#define MIN_INDEX 0
-#define MAX_INDEX 25
-#define MAX_STPRV_LEN 512
-#define QUAD_STR 8
-#define is_priv_set(a,b) ((b[a/QUAD_STR] & (1 << (a % QUAD_STR))) ? TRUE : FALSE)
-#define set_bit(a,b) (b[a/QUAD_STR] |= (1 << (a % QUAD_STR)))
-
-static unsigned char priv_disable = 0;
-static unsigned char priv_enable = 1;
-static int4 cur_priv_code = JPI$_CURPRIV;
-static unsigned char permanent = TRUE;
-
-GBLREF spdesc stringpool;
-
-void op_fnzsetprv(mval *prv,mval *ret)
-{
-int4 		priv_bit, status ;
-short 		index, slot, last_slot, prv_len, out_len;
-unsigned char	cur_priv[QUAD_STR], auth_priv[QUAD_STR], enable[QUAD_STR], disable[QUAD_STR], set_priv, priv_set;
-char		*str_end, *str_cur, *prv_start;
-char		buf[MAX_STPRV_LEN] ;
-error_def	(ERR_ZSETPRVARGBAD);
-error_def	(ERR_ZSETPRVSYNTAX);
-
-assert(stringpool.free >= stringpool.base);
-assert(stringpool.top >= stringpool.free);
-MV_FORCE_STR(prv);
-if (prv->str.len == 0)
-	rts_error(VARLSTCNT(4) ERR_ZSETPRVARGBAD,2,4,"Null");
-ENSURE_STP_FREE_SPACE(MAX_STPRV_LEN);
-if ((status = lib$getjpi(	 &cur_priv_code
-				,0 ,0
-				,cur_priv
-				,0  ,0	)) != SS$_NORMAL)
-{	rts_error(VARLSTCNT(1)  status );
-}
-prv_len = MIN(prv->str.len,MAX_STPRV_LEN) ;
-lower_to_upper(buf,prv->str.addr,prv_len) ;
-str_cur = prv_start = str_end = buf ;
-str_end += prv_len;
-ret->str.addr = stringpool.free;
-ret->mvtype = MV_STR;
-out_len = 0;
-memset(enable,'\0',QUAD_STR);
-memset(disable,'\0',QUAD_STR);
-while (prv_start < str_end)
-{	if (!memcmp(str_cur,"NO",2))
-	{	str_cur += 2;
-		set_priv = FALSE;
-		prv_start = str_cur;
-	}
-	else
-	{	set_priv = TRUE;
-	}
-	while (*str_cur != ',' && str_cur != str_end)
-	{	str_cur++;
-	}
-	prv_len = str_cur - prv_start;
-	if ((index = *prv_start - 'A') < MIN_INDEX || index > MAX_INDEX
-		|| !(last_slot = prv_index[ index ].last_index) )
-	{	rts_error(VARLSTCNT(4) ERR_ZSETPRVARGBAD,2,prv_len,prv_start);
-	}
-	slot = prv_index[ index ].index;
-	priv_bit = -1;
-	for ( ; slot < last_slot ; slot++)
-	{	if (prv_len == priv_table[slot].len && !memcmp(prv_start,priv_table[ slot ].name,prv_len))
-		{	priv_bit = priv_table[slot].bit_number;
-			break;
-		}
-	}
-	if (priv_bit == -1)
-	{	rts_error(VARLSTCNT(4) ERR_ZSETPRVARGBAD,2,prv_len,prv_start);
-	}
-	assert(stringpool.top >= stringpool.free);
-	if( !is_priv_set(priv_bit,cur_priv) )
-	{	memcpy(stringpool.free,"NO",2);
-		stringpool.free += 2;
-	}
-	memcpy(stringpool.free,prv_start,prv_len);
-	stringpool.free += prv_len;
-	if ( set_priv )
-	{	set_bit(priv_bit,enable);
-	}
-	else
-	{	set_bit(priv_bit,disable);
-	}
-	assert(stringpool.top >= stringpool.free);
-	if (str_cur++ == str_end)
-	{	break;
-	}
-	if (str_cur == str_end)
-	{	rts_error(VARLSTCNT(1) ERR_ZSETPRVSYNTAX);
-	}
-	prv_start = str_cur;
-	*stringpool.free++ = ',';
-}
-ret->str.len = (char *) stringpool.free - ret->str.addr;
-if ((status = sys$setprv(	 priv_disable
-				,disable
-				,permanent
-				,0	)) != SS$_NORMAL)
-{	rts_error(VARLSTCNT(1)  status );
-}
-if ((status = sys$setprv(	 priv_enable
-				,enable
-				,permanent
-				,0	)) != SS$_NORMAL)
-{
-	if ((status & 1)==0)
-	{
-		rts_error(VARLSTCNT(1)  status );
-	}
-}
-return ;
-}
-
diff --git a/sr_vvms/op_fnztrnlnm.c b/sr_vvms/op_fnztrnlnm.c
deleted file mode 100644
index d95df42..0000000
--- a/sr_vvms/op_fnztrnlnm.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_limits.h"
-
-#include <ssdef.h>
-#include "stringpool.h"
-#include <descrip.h>
-#include "op_fn.h"
-#include <psldef.h>
-#include <lnmdef.h>
-#include "vmsdtype.h"
-#include "gtm_caseconv.h"
-#include "op.h"
-#include "mvalconv.h"
-#include "min_max.h"
-
-#define FULL_VALUE -2
-#define NOVALUE -1
-#define MAX_INDEX 25
-#define MAX_RESULT_SIZE 256
-#define MAX_LOGNAM_LENGTH 255
-#define MIN_INDEX 0
-
-GBLREF spdesc stringpool;
-static readonly dvi_struct trnlnm_table[] =
-{
-	{ 11, "ACCESS_MODE", LNM$_ACMODE},	{ 9, "CONCEALED", LNM$_ATTRIBUTES },
-	{ 7, "CONFINE", LNM$_ATTRIBUTES},	{ 4, "FULL", FULL_VALUE },
-	{ 6, "LENGTH", LNM$_LENGTH},		{ 9, "MAX_INDEX", LNM$_MAX_INDEX},
-	{ 8, "NO_ALIAS", LNM$_ATTRIBUTES},	{ 5, "TABLE", LNM$_ATTRIBUTES},
-	{ 10, "TABLE_NAME", LNM$_TABLE},	{ 8, "TERMINAL", LNM$_ATTRIBUTES},
-	{ 5, "VALUE", LNM$_STRING}
-};
-
-static readonly int attr_tab[] = {NOVALUE, LNM$M_CONCEALED, LNM$M_CONFINE,NOVALUE,NOVALUE,NOVALUE,LNM$M_NO_ALIAS,
-		LNM$M_TABLE,NOVALUE,LNM$M_TERMINAL,NOVALUE};
-
-static readonly dvi_index_struct trnlnm_index[] = {
-	{ 0, 1 }, { 0, 0 }, { 1, 3}, { 0, 0}, { 0, 0}, { 3, 4}, { 0, 0}, { 0, 0}, { 0, 0},
-	{ 0, 0}, { 0, 0}, { 4, 5}, { 5, 6}, { 6, 7}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
-	{ 0, 0}, { 7, 10}, { 0, 0}, { 10, 11}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}
-};
-
-void op_fnztrnlnm(mval *name,mval *table,int4 ind,mval *mode,mval *case_blind,mval *item,mval *ret)
-{
-	struct dsc$descriptor	lname, ltable;
-	uint4		attribute, status, retlen, mask, full_mask;
-	char			acmode;
-	short int		*item_code, pass, index;
-	bool			full;
-	char			buff[256], result[MAX_RESULT_SIZE];
-	char			i, slot, last_slot;
-	char			def_table[] = "LNM$DCL_LOGICAL";
-
-	struct
-	{
-		item_list_3	item[3];
-		int4		terminator;
-	} item_list;
-	error_def(ERR_BADTRNPARAM);
-
-	if(!name->str.len || MAX_LOGNAM_LENGTH < name->str.len || MAX_LOGNAM_LENGTH < table->str.len)
-		rts_error(VARLSTCNT(1) SS$_IVLOGNAM);
-	memset(&item_list,0,SIZEOF(item_list));
-	item_list.item[0].item_code = 0;
-	item_list.item[0].buffer_address = result;
-	item_list.item[0].buffer_length = MAX_RESULT_SIZE;
-	item_list.item[0].return_length_address = &retlen;
-	item_code = &item_list.item[0].item_code;
-
-	lname.dsc$w_length = name->str.len;
-	lname.dsc$a_pointer = name->str.addr;
-	lname.dsc$b_dtype = DSC$K_DTYPE_T;
-	lname.dsc$b_class = DSC$K_CLASS_S;
-
-	if (table->str.len)
-	{	ltable.dsc$w_length = table->str.len;
-		ltable.dsc$a_pointer = table->str.addr;
-	}else
-	{	ltable.dsc$a_pointer = def_table;
-		ltable.dsc$w_length = strlen(def_table);
-	}
-	ltable.dsc$b_dtype = DSC$K_DTYPE_T;
-	ltable.dsc$b_class = DSC$K_CLASS_S;
-
-	if(ind)
-	{	item_list.item[0].item_code = LNM$_INDEX;
-		item_list.item[0].buffer_address = &ind;
-		item_list.item[1].item_code = 0;
-		item_list.item[1].buffer_address = result;
-		item_list.item[1].buffer_length = MAX_RESULT_SIZE;
-		item_list.item[1].return_length_address = &retlen;
-		item_code = &item_list.item[1].item_code;
-	}
-
-	attribute = LNM$M_CASE_BLIND;
-	if (case_blind->str.len)
-	{
-		if (case_blind->str.len > 14)
-			rts_error(VARLSTCNT(4) ERR_BADTRNPARAM, 2,
-				MIN(SHRT_MAX, case_blind->str.len), case_blind->str.addr);
-		lower_to_upper(buff,case_blind->str.addr,case_blind->str.len);
-		if (case_blind->str.len == 14 && !memcmp(buff,"CASE_SENSITIVE",14))
-			attribute = 0;
-		else if (case_blind->str.len != 10 || memcmp(buff,"CASE_BLIND",10))
-			rts_error(VARLSTCNT(4) ERR_BADTRNPARAM,2,case_blind->str.len,case_blind->str.addr);
-	}
-
-	acmode = NOVALUE;
-	if (mode->str.len)
-	{
-		if (mode->str.len > 14)
-			rts_error(VARLSTCNT(4) ERR_BADTRNPARAM, 2,
-				MIN(SHRT_MAX, mode->str.len), mode->str.addr);
-		lower_to_upper(buff,mode->str.addr,mode->str.len);
-		switch (buff[0])
-		{
-		case 'U':
-			if ( mode->str.len = 4 && !memcmp(buff, "USER", 4))
-				acmode = PSL$C_USER;
-		case 'S':
-			if ( mode->str.len = 10 && !memcmp(buff, "SUPERVISOR", 10))
-				acmode = PSL$C_SUPER;
-		case 'K':
-			if ( mode->str.len = 6 && !memcmp(buff, "KERNEL", 6))
-				acmode = PSL$C_KERNEL;
-		case 'E':
-			if ( mode->str.len = 9 && !memcmp(buff, "EXECUTIVE", 9))
-				acmode = PSL$C_EXEC;
-		}
-		if (acmode == NOVALUE)
-			rts_error(VARLSTCNT(4) ERR_BADTRNPARAM,2,mode->str.len,mode->str.addr);
-	}
-
-	full = FALSE;
-	*item_code = NOVALUE;
-	if (item->str.len)
-	{	if (item->str.len > 12)
-			rts_error(VARLSTCNT(4) ERR_BADTRNPARAM, 2,
-				MIN(SHRT_MAX, item->str.len), item->str.addr);
-		lower_to_upper(buff,item->str.addr,item->str.len);
-		if ((i = buff[0] - 'A') < MIN_INDEX || i > MAX_INDEX)
-		{	rts_error(VARLSTCNT(4) ERR_BADTRNPARAM, 2, item->str.len, item->str.addr);
-		}
-		if ( trnlnm_index[i].len)
-		{	slot = trnlnm_index[i].index;
-			last_slot = trnlnm_index[i].len;
-			for (; slot < last_slot; slot++)
-			{	if (item->str.len == trnlnm_table[slot].len &&
-					!memcmp(trnlnm_table[slot].name, buff, item->str.len))
-				{	if (trnlnm_table[slot].item_code == FULL_VALUE)
-					{	if (ind)
-							index = 2;
-						else
-							index = 1;
-						*item_code = LNM$_STRING;
-						item_list.item[index].buffer_address = &full_mask;
-						item_list.item[index].buffer_length = SIZEOF(full_mask);
-						item_list.item[index].item_code = LNM$_ATTRIBUTES;
-						item_code = &item_list.item[index].item_code;
-						full = TRUE;
-					}else
-					{	*item_code = trnlnm_table[slot].item_code;
-					}
-					break;
-				}
-			}
-		}
-		if (*item_code == NOVALUE)
-		{	rts_error(VARLSTCNT(4) ERR_BADTRNPARAM,2,item->str.len,item->str.addr);
-		}
-	}else
-	{	*item_code = LNM$_STRING;
-	}
-	for ( pass = 0 ; ; pass++ )
-	{	retlen = 0;
-		status = sys$trnlnm(&attribute, &ltable, &lname, acmode == NOVALUE ? 0 : &acmode, &item_list);
-		if (status & 1)
-		{	if (*item_code == LNM$_STRING || *item_code == LNM$_TABLE)
-			{	ret->mvtype = MV_STR;
-				ENSURE_STP_FREE_SPACE(retlen);
-				ret->str.addr = stringpool.free;
-				ret->str.len = retlen;
-				memcpy(ret->str.addr, result, retlen);
-				stringpool.free += retlen;
-				return;
-			}else if (*item_code == LNM$_LENGTH || *item_code == LNM$_MAX_INDEX)
-			{
-				MV_FORCE_MVAL(ret,*(int4 *)result) ;
-				n2s(ret);
-				return;
-			}else if (*item_code == LNM$_ACMODE)
-			{	ret->mvtype = MV_STR;
-				switch(*result)
-				{	case PSL$C_USER:
-						ENSURE_STP_FREE_SPACE(4);
-						ret->str.addr = stringpool.free;
-						ret->str.len = 4;
-						memcpy(ret->str.addr, "USER", 4);
-						stringpool.free += 4;
-						return;
-					case PSL$C_SUPER:
-						ENSURE_STP_FREE_SPACE(5);
-						ret->str.addr = stringpool.free;
-						ret->str.len = 5;
-						memcpy(ret->str.addr, "SUPER", 5);
-						stringpool.free += 5;
-						return;
-					case PSL$C_EXEC:
-						ENSURE_STP_FREE_SPACE(9);
-						ret->str.addr = stringpool.free;
-						ret->str.len = 9;
-						memcpy(ret->str.addr, "EXECUTIVE", 9);
-						stringpool.free += 9;
-						return;
-					case PSL$C_KERNEL:
-						ENSURE_STP_FREE_SPACE(6);
-						ret->str.addr = stringpool.free;
-						ret->str.len = 6;
-						memcpy(ret->str.addr, "KERNEL", 6);
-						stringpool.free += 6;
-						return;
-					default:
-						GTMASSERT;
-				}
-			}else
-			{	assert(*item_code == LNM$_ATTRIBUTES);
-				if (full)
-				{	if (!retlen)	/* If the logical name exists, but has no entry for the specified index, */
-					{		/* then the return status will be normal as the TERMINAL attribute will  */
-							/* be filled in, but there will be no equivalence name, thus retlen == 0 */
-						ret->mvtype = MV_STR;
-						if (!pass)
-						{	ret->str.len = 0;
-							return;
-						}
-						ENSURE_STP_FREE_SPACE(lname.dsc$w_length);
-						ret->str.addr = stringpool.free;
-						ret->str.len = lname.dsc$w_length;
-						memcpy(ret->str.addr, lname.dsc$a_pointer, lname.dsc$w_length);
-						stringpool.free += lname.dsc$w_length;
-						return;
-					}
-					if(full_mask & LNM$M_TERMINAL)
-					{	ret->mvtype = MV_STR;
-						ENSURE_STP_FREE_SPACE(retlen);
-						ret->str.addr = stringpool.free;
-						ret->str.len = retlen;
-						memcpy(ret->str.addr, result, retlen);
-						stringpool.free += retlen;
-						return;
-					}
-					memcpy(buff,result,retlen);
-					lname.dsc$w_length = retlen;
-					lname.dsc$a_pointer = buff;
-				}else
-				{	mask = attr_tab[slot];
-					if (mask == NOVALUE)
-						GTMASSERT;
-					MV_FORCE_MVAL(ret,( *((int4*)result) & mask ? 1 : 0 )) ;
-					n2s(ret);
-					return;
-				}
-			}
-		}else if (status == SS$_NOLOGNAM)
-		{	ret->mvtype = MV_STR;
-			if (full && pass > 0)
-			{
-				ENSURE_STP_FREE_SPACE(lname.dsc$w_length);
-				ret->str.addr = stringpool.free;
-				ret->str.len = lname.dsc$w_length;
-				memcpy(ret->str.addr, lname.dsc$a_pointer, lname.dsc$w_length);
-				stringpool.free += lname.dsc$w_length;
-			}else
-			{	ret->str.len = 0;
-			}
-			return;
-		}else
-		{	rts_error(VARLSTCNT(1) status);
-		}
-	}
-	MV_FORCE_MVAL(ret, 0) ;
-	return;
-}
diff --git a/sr_vvms/op_horolog.c b/sr_vvms/op_horolog.c
deleted file mode 100644
index 7f9ceb7..0000000
--- a/sr_vvms/op_horolog.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "stringpool.h"
-#include "op.h"
-
-GBLREF spdesc stringpool;
-
-void op_horolog(mval *s)
-{
-	int4 seconds,days;
-	uint4 lib$day();
-
-	assert (stringpool.free <= stringpool.top);
-	assert (stringpool.free >= stringpool.base);
-	ENSURE_STP_FREE_SPACE(MAXNUMLEN);
-	lib$day(&days,0,&seconds);
-	days += DAYS;
-	seconds /= CENTISECONDS;
-	s->str.addr = stringpool.free;
-	stringpool.free  = i2s(&days);
-	*stringpool.free++ = ',';
-	stringpool.free = i2s(&seconds);
-	s->str.len = (char *) stringpool.free - s->str.addr;
-	s->mvtype = MV_STR;
-	return;
-}
diff --git a/sr_vvms/op_job.c b/sr_vvms/op_job.c
deleted file mode 100644
index 96f780d..0000000
--- a/sr_vvms/op_job.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <iodef.h>
-#include <ssdef.h>
-#include <stdarg.h>
-
-#include "ast.h"
-#include "efn.h"
-#include "job.h"
-#include "op.h"
-#include "io.h"
-#include "gt_timer.h"
-#include "iotimer.h"
-#include "outofband.h"
-#include "rel_quant.h"
-
-#include "gdsroot.h"
-#include "gdskill.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "filestruct.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "jnl.h"
-#include "hashtab_int4.h"	/* needed for tp.h */
-#include "tp.h"
-#include "send_msg.h"
-#include "gtmmsg.h"		/* for gtm_putmsg() prototype */
-#include "change_reg.h"
-#include "setterm.h"
-#include "getzposition.h"
-#ifdef DEBUG
-#include "have_crit.h"		/* for the TPNOTACID_CHECK macro */
-#endif
-
-LITDEF mstr		define_gtm$job$_	= {16, "DEFINE GTM$JOB$ "};
-LITDEF mstr		set_default_		= {12, "SET DEFAULT "};
-LITDEF mstr		atsign			= {1,  "@"};
-LITDEF mstr		run__nodebug_		= {13, "RUN /NODEBUG "};
-LITDEF mstr		set_noverify		= {12, "SET NOVERIFY"};
-
-GBLDEF	bool		ojtimeout	= TRUE;
-GBLDEF	short		ojpchan		= 0;
-GBLDEF	short		ojcchan		= 0;
-GBLDEF	uint4		ojcpid		= 0;
-GBLDEF	short		ojastq;
-
-GBLREF	short	astq_dyn_avail;
-GBLREF	mval	dollar_job;
-GBLREF	uint4	dollar_trestart;
-GBLREF	uint4	dollar_zjob;
-GBLREF	int4	outofband;
-
-error_def(ERR_ACK);
-error_def(ERR_ENQ);
-error_def(ERR_INSFFBCNT);
-error_def(ERR_JOBARGMISSING);
-error_def(ERR_JOBFAIL);
-
-readonly $DESCRIPTOR	(loginout, "SYS$SYSTEM:LOGINOUT.EXE");
-
-#define JOBTIMESTR "JOB time too long"
-
-int op_job(mval *label, ...)
-{
-	va_list			var, save;
-	bool			defprcnam, timed;
-	/* The max possible value for combuff is 268, 256 bytes for DEFAULT + 12 bytes for set_default_ */
-	char			combuf[268];
-	int4			argcnt, i, offset, timeout;
-	unsigned int		ast_stat;
-	mstr			command;
-	mval			*parameters, *routine;
-	/* Parameters ... */
-	mval			*inp;
-	mstr			deffs, error, gbldir, image, input, output, startup;
-	struct dsc$descriptor_s	logfile, prcnam;
-	int4			baspri, stsflg;
-	quadword		schedule;
-	/* Mailboxes ... */
-	int4			cmaxmsg, punit;
-	char			cmbxnam[MAX_MBXNAM_LEN];
-	$DESCRIPTOR(cmbx, cmbxnam);
-	/* $CREPRC ... */
-	unsigned int		status;
-	/* Messages */
-	mstr			dummstr, isddsc;
-	isd_type		isd;
-	mbx_iosb		iosb;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	/* Initializations ... */
-	assert(TRUE == ojtimeout);
-	assert(0 == ojpchan);
-	assert(0 == ojcchan);
-	assert(0 == ojcpid);
-	assert(0 == ojastq);
-	VAR_START(var, label);
-	va_count(argcnt);
-	assert(argcnt >= 5);
-	offset = va_arg(var, int4);
-	routine = va_arg(var, mval *);
-	parameters = va_arg(var, mval *);
-	timeout = va_arg(var, int4);
-	argcnt -= 5;
-	VAR_COPY(save, var);
-	/* initialize $zjob = 0, in case JOB fails */
-	dollar_zjob = 0;
-	MV_FORCE_DEFINED(label);
-	MV_FORCE_DEFINED(routine);
-	MV_FORCE_DEFINED(parameters);
-	cmaxmsg = SIZEOF(isd_type);
-	for (i = argcnt;  i;  i--)
-	{
-		inp = va_arg(var, mval *);
-		if (!inp->mvtype)
-		{
-			if (1 == i)
-			{	/* if it's really empty let it work like it did before, even though it's not right */
-				argcnt--;
-				break;
-			}
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_JOBARGMISSING, 1, argcnt - i);
-		}
-		MV_FORCE_STR(inp);
-		if (inp->str.len > cmaxmsg)
-			cmaxmsg = inp->str.len;
-	}
-	va_end(var);		/* need before used as destination in va_copy */
-	command.addr = combuf;
-	ojparams(parameters->str.addr, routine, &defprcnam, &cmaxmsg,
-			&image, &input, &output, &error, &prcnam, &baspri,
-			&stsflg, &gbldir, &startup, &logfile, &deffs,
-			&schedule);
-	flush_pio();
-	if (!ojchkbytcnt(cmaxmsg))
-	{
-		va_end(save);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_INSFFBCNT);
-	}
-	if (timeout < 0)
-		timeout = 0;
-	else if (TREF(tpnotacidtime) < timeout)
-		TPNOTACID_CHECK(JOBTIMESTR);
-	timed = (NO_M_TIMEOUT != timeout);
-	if (timed)
-		ojtmrinit(&timeout);
-	if (!ojcrembxs(&punit, &cmbx, cmaxmsg, timed))
-	{
-		assert(timed);
-		assert(ojtimeout);
-		if (0 != ojpchan)
-		{
-			status = sys$dassgn(ojpchan);
-			if (!(status & 1))
-			{
-				ojerrcleanup();
-				va_end(save);
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-			}
-			ojpchan = 0;
-		}
-		if (0 != ojcchan)
-		{
-			status = sys$dassgn(ojcchan);
-			if (!(status & 1))
-			{
-				ojerrcleanup();
-				va_end(save);
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-			}
-			ojcchan = 0;
-		}
-		return (FALSE);
-	}
-	/* Allocate AST for mailbox reads */
-	ast_stat = sys$setast(DISABLE);
-	while (astq_dyn_avail < 1)
-	{
-		ENABLE_AST;
-		rel_quant();
-		DISABLE_AST;
-	}
-	ojastq++;
-	--astq_dyn_avail;
-	if (SS$_WASSET == ast_stat)
-		sys$setast(ENABLE);
-	ojsetattn(ERR_ENQ);
-	do
-	{
-		status = sys$creprc(&ojcpid, &loginout, &cmbx, &logfile, 0,
-				0, 0, &prcnam, baspri, 0, punit, stsflg);
-		if (outofband)
-		{
-			ojcleanup();
-			va_end(save);
-			outofband_action(FALSE);
-		}
-		switch (status)
-		{
-		case SS$_NORMAL:
-			break;
-		case SS$_DUPLNAM:
-			if (defprcnam)
-			{
-				ojdefprcnam(&prcnam);
-				continue;
-			}
-		case SS$_NOSLOT:
-		case SS$_INSSWAPSPACE:
-		case SS$_EXPRCLM:
-			hiber_start(1000);
-			if (timed && ojtimeout)
-			{
-				status = sys$dassgn(ojpchan);
-				if (!(status & 1))
-				{
-					ojerrcleanup();
-					va_end(save);
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
-				ojpchan = 0;
-				status = sys$dassgn(ojcchan);
-				if (!(status & 1))
-				{
-					ojerrcleanup();
-					va_end(save);
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-				}
-				ojcchan = 0;
-				ojcpid = 0;
-				--ojastq;
-				astq_dyn_avail++;
-				va_end(save);
-				return (FALSE);
-			}
-			break;
-		default:
-			ojerrcleanup();
-			va_end(save);
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(3) ERR_JOBFAIL, 0, status);
-			break;
-		}
-	} while (SS$_NORMAL != status);
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &set_noverify, &iosb, TRUE);
-	memcpy(combuf, define_gtm$job$_.addr, define_gtm$job$_.len);
-	assert(MV_IS_STRING(&dollar_job));
-	memcpy(&combuf[define_gtm$job$_.len], dollar_job.str.addr, dollar_job.str.len);
-	command.len = define_gtm$job$_.len + dollar_job.str.len;
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &command, &iosb, TRUE);
-	memcpy(combuf, set_default_.addr, set_default_.len);
-	memcpy(&combuf[set_default_.len], deffs.addr, deffs.len);
-	command.len = set_default_.len + deffs.len;
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &command, &iosb, TRUE);
-	if (0 != startup.len)
-	{
-		memcpy(combuf, atsign.addr, atsign.len);
-		memcpy(&combuf[atsign.len], startup.addr, startup.len);
-		command.len = atsign.len + startup.len;
-		ojmbxio(IO$_WRITEVBLK, ojcchan, &command, &iosb, TRUE);
-	}
-	memcpy(combuf, run__nodebug_.addr, run__nodebug_.len);
-	memcpy(&combuf[run__nodebug_.len], image.addr, image.len);
-	command.len = run__nodebug_.len + image.len;
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &command, &iosb, TRUE);
-	status = sys$waitfr(efn_op_job);
-	if (!(status & 1))
-	{
-		ojerrcleanup();
-		va_end(save);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-	/* Assertion: successful ENQ */
-	ojsetattn(ERR_ACK);
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &input, &iosb, TRUE);
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &output, &iosb, TRUE);
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &error, &iosb, TRUE);
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &gbldir, &iosb, TRUE);
-	isddsc.len = SIZEOF(isd);
-	isddsc.addr = &isd;
-	assert(label->str.len <= MAX_MIDENT_LEN);
-	memset(&isd.label, 0, SIZEOF(isd.label));
-	memcpy(&isd.label.c[0], label->str.addr, label->str.len);
-	isd.offset = offset;
-	assert(routine->str.len <= MAX_MIDENT_LEN);
-	memset(&isd.routine, 0, SIZEOF(isd.routine));
-	memcpy(&isd.routine.c[0], routine->str.addr, routine->str.len);
-	isd.schedule.lo = schedule.lo;
-	isd.schedule.hi = schedule.hi;
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &isddsc, &iosb, TRUE);
-	isddsc.len = SIZEOF(argcnt);
-	isddsc.addr = &argcnt;
-	ojmbxio(IO$_WRITEVBLK, ojcchan, &isddsc, &iosb, TRUE);
-	if (argcnt)
-	{
-		while (argcnt--)
-		{
-			inp = va_arg(save, mval *);
-			MV_FORCE_DEFINED(inp);		/* In case undefined mval in NOUNDEF mode */
-			assert(inp->mvtype & MV_STR);
-			isddsc = inp->str;
-			ojmbxio(IO$_WRITEVBLK, ojcchan, &isddsc, &iosb, TRUE);
-		}
-	}
-	va_end(save);
-	status = sys$waitfr(efn_op_job);
-	if (!(status & 1))
-	{
-		ojerrcleanup();
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-	/* Assertion: successful ACK */
-	--ojastq;
-	astq_dyn_avail++;
-	status = sys$dassgn(ojpchan);
-	if (!(status & 1))
-	{
-		ojerrcleanup();
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-	ojpchan = 0;
-	dummstr.len = 0;
-	dummstr.addr = 0;
-	ojmbxio(IO$_WRITEOF, ojcchan, &dummstr, &iosb, TRUE);
-	status = sys$dassgn(ojcchan);
-	if (!(status & 1))
-	{
-		ojerrcleanup();
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-	ojcchan = 0;
-	if (timed)
-	{
-		ast_stat = sys$setast(DISABLE);
-		if (!ojtimeout)
-		{
-			assert(1 == ojastq);
-			sys$cantim(&(ojtimeout), 0);
-			--ojastq;
-			astq_dyn_avail++;
-			ojtimeout = TRUE;
-		}
-		if (SS$_WASSET == ast_stat)
-			sys$setast(ENABLE);
-	}
-	assert(TRUE == ojtimeout);
-	assert(0 != ojcpid);
-	dollar_zjob = ojcpid;
-	ojcpid = 0;
-	return TRUE;
-}
diff --git a/sr_vvms/op_setzbrk.c b/sr_vvms/op_setzbrk.c
deleted file mode 100644
index aa6cf1f..0000000
--- a/sr_vvms/op_setzbrk.c
+++ /dev/null
@@ -1,238 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_stdio.h"
-
-#include "cache.h"
-#include <rtnhdr.h>
-#include "zbreak.h"
-#include "stack_frame.h"
-#include "xfer_enum.h"
-#include "indir_enum.h"
-#include "cachectl.h"
-#include "op.h"
-#include "fix_pages.h"
-#include "io.h"
-#include "inst_flush.h"
-#include "private_code_copy.h"
-#include "iosp.h"
-#include "gtm_text_alloc.h"
-#include "srcline.h"
-#include "compiler.h"
-#include "min_max.h"
-#ifdef GTM_TRIGGER
-# include "trigger_source_read_andor_verify.h"
-# include "gtm_trigger_trc.h"
-#else
-# define DBGIFTRIGR(x)
-# define DBGTRIGR(x)
-# define DBGTRIGR_ONLY(x)
-#endif
-
-GBLREF z_records		zbrk_recs;
-GBLREF mident_fixed		zlink_mname;
-GBLREF stack_frame		*frame_pointer;
-GBLREF unsigned short		proc_act_type;
-
-error_def(ERR_COMMENT);
-error_def(ERR_MEMORY);
-error_def(ERR_NOPLACE);
-error_def(ERR_NOZBRK);
-error_def(ERR_TRIGNAMENF);
-error_def(ERR_VMSMEMORY);
-error_def(ERR_ZBREAKFAIL);
-error_def(ERR_ZLINKFILE);
-error_def(ERR_ZLMODULE);
-
-void	op_setzbrk(mval *rtn, mval *lab, int offset, mval *act, int cnt)
-	/* act == action associated with ZBREAK */
-	/* cnt == perform break after this many passes */
-{
-	char		*cp, zbloc_buff[MAX_ENTRYREF_LEN], *zbloc_end;
-	mident		*lab_name, *dummy;
-	mident		rname, lname;
-	mstr		*obj, tmprtnname;
-	rhdtyp		*routine;
-	zb_code		*addr, tmp_xf_code;
-	int4		*line_offset_addr, *next_line_offset_addr;
-	ssize_t		addr_off;
-	zbrk_struct	*z_ptr;
-	cache_entry	*csp;
-	uint4		status;
-	int		sstatus;
-	icode_str	indir_src;
-	boolean_t	deleted;
-	GTMTRIG_ONLY(boolean_t	is_trigger);
-
-	MV_FORCE_STR(rtn);
-	MV_FORCE_STR(lab);
-	MV_FORCE_STR(act);
-	if (NULL == zbrk_recs.beg)
-	{
-		assert(NULL == zbrk_recs.free);
-		assert(NULL == zbrk_recs.end);
-		zr_init(&zbrk_recs, INIT_NUM_ZBREAKS);
-	}
-	if (CANCEL_ALL == cnt)
-		zr_remove_zbrks(NULL, NOBREAKMSG);
-	else
-	{
-		GTMTRIG_ONLY(IS_TRIGGER_RTN(&rtn->str, is_trigger));
-		DBGIFTRIGR((stderr, "op_setzbrk: Setting/clearing a zbreak in a trigger\n"));
-		flush_pio();
-		if (WANT_CURRENT_RTN(rtn))
-			routine = CURRENT_RHEAD_ADR(frame_pointer->rvector);
-		else if (NULL == (routine = find_rtn_hdr(&rtn->str)))	/* Note assignment */
-		{
-#			ifdef GTM_TRIGGER
-			/* trigger_source_read_andor_verify may alter the length part of the mstr to remove the +BREG
-			 * region-name specification (the string component is unmodified). Pass in a copy of the mstr
-			 * struct to avoid modification to routine->str as it affects the caller which relies on this
-			 * variable being untouched.
-			 */
-			tmprtnname = rtn->str;
-			if (is_trigger)
-			{
-				DEBUG_ONLY(routine = NULL;)
-				sstatus = trigger_source_read_andor_verify(&tmprtnname, TRIGGER_COMPILE, &routine);
-				if (0 != sstatus)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_TRIGNAMENF, 2, rtn->str.len, rtn->str.addr);
-				assert(NULL != routine);
-			} else
-#			endif
-			{
-				op_zlink(rtn, NULL);
-				routine = find_rtn_hdr(&rtn->str);
-				if (NULL == routine)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZLINKFILE, 2, rtn->str.len, rtn->str.addr,
-						  ERR_ZLMODULE, 2, mid_len(&zlink_mname), &zlink_mname.c[0]);
-			}
-		}
-		lab_name = NULL;
-		if (NULL == (line_offset_addr = find_line_addr(routine, &lab->str, offset, &lab_name)))
-			dec_err(VARLSTCNT(1) ERR_NOPLACE);
-		else if (CANCEL_ONE == cnt)	/* Cancel ZBREAK */
-		{
-			addr = (zb_code *)LINE_NUMBER_ADDR(CURRENT_RHEAD_ADR(routine), line_offset_addr);
-			addr = find_line_call(addr);
-			if (NULL != (z_ptr = zr_find(&zbrk_recs, addr)))
-				zr_remove_zbreak(&zbrk_recs, z_ptr);
-			else
-				dec_err(VARLSTCNT(1) ERR_NOZBRK);
-		} else if (0 <= cnt)		/* Set ZBREAK */
-		{
-#			ifdef ZB_AT_COMMENT_INFO
-			dummy = NULL;
-			next_line_offset_addr = find_line_addr(routine, &lab->str, offset + 1, &dummy);
-			if (NULL != next_line_offset_addr && *next_line_offset_addr == *line_offset_addr)
-			{ 	/* We don't recognize the case of last line comment 'coz that line generates LINESTART, RET code */
-				dec_err(VARLSTCNT(1) ERR_COMMENT);
-				assert(lab_name == dummy);
-			}
-#			endif
-			op_commarg(act, indir_linetail); 	/* This puts entry in stack and also increments refcnt field */
-			indir_src.str = act->str;
-			indir_src.code = indir_linetail;
-			obj = cache_get(&indir_src);
-			assert(NULL != obj);
-			csp = ((ihdtyp *)(obj->addr))->indce;	/* Cache entry for this object code */
-			csp->zb_refcnt++;			/* This will keep it around */
-			op_unwind();				/* This removes entry from stack and decrements refcnt field */
-			addr = (zb_code *)LINE_NUMBER_ADDR(CURRENT_RHEAD_ADR(routine), line_offset_addr);
-			/* On HPPA (& other platforms) the addr returned is the address of the field in the instruction which is
-			 * the offset of xfer table. But on IA64, as this field is set in the ADDS instruction as 14 bit immed
-			 * value and this is written into 3 bitwise fields, we need to return the address of the whole instruction
-			 * itself (in our case bundle as we are using a bundle for every instruction in the generated code.
-			 */
-			addr = find_line_call(addr);
-			if (NULL == (z_ptr = zr_find(&zbrk_recs, addr)))
-			{
-#				ifdef USHBIN_SUPPORTED
-				if ((NULL != routine->shared_ptext_adr) && (routine->shared_ptext_adr == routine->ptext_adr))
-				{	/* Setting a breakpoint in a shared routine, need to make a private copy */
-					addr_off = (unsigned char *)addr - routine->ptext_adr;
-					if (SS_NORMAL == (status = cre_private_code_copy(routine)))
-						addr = (zb_code *)(routine->ptext_adr + addr_off);
-					else
-					{
-						assert(UNIX_ONLY(ERR_MEMORY) VMS_ONLY(ERR_VMSMEMORY) == status);
-						/* Convert to label+offset^routine to be presented to the user */
-						rname.len = rtn->str.len;
-						rname.addr = rtn->str.addr;
-						lname.len = lab->str.len;
-						lname.addr = lab->str.addr;
-						zbloc_end = rtnlaboff2entryref(zbloc_buff, &rname, &lname, offset);
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_ZBREAKFAIL, 2, zbloc_end - zbloc_buff,
-								zbloc_buff);
-					}
-				}
-#				endif
-				z_ptr = zr_add_zbreak(&zbrk_recs, addr);
-				NON_USHBIN_ONLY(fix_pages((unsigned char *)addr, (unsigned char *)addr));
-				/* Modify the instruction at the ZBREAK site. See zbreaksp.h for description of how this works
-				 * on a given platform.
-				 *
-				 * Save original instruction for later restore when cancelling this breakpoint.
-				 */
-#				ifdef	COMPLEX_INSTRUCTION_UPDATE
-				EXTRACT_OFFSET_TO_M_OPCODE(z_ptr->m_opcode, addr);
-#				else
-				z_ptr->m_opcode = *addr;
-#				endif
-				/* Modify op_linestart or op_linefetch transfer table reference instruction to the appropriate
-				 * ZBREAK related flavor of instruction instead.
-				 */
-				tmp_xf_code = (z_ptr->m_opcode & ZB_CODE_MASK) >> ZB_CODE_SHIFT;
-				if (xf_linefetch * SIZEOF(UINTPTR_T) == tmp_xf_code)
-				{
-#					ifdef	COMPLEX_INSTRUCTION_UPDATE
-					FIX_OFFSET_WITH_ZBREAK_OFFSET(addr, xf_zbfetch);
-#					else
-					*addr = (*addr & (zb_code)(~ZB_CODE_MASK)) |
-						((xf_zbfetch * SIZEOF(UINTPTR_T)) << ZB_CODE_SHIFT);
-#					endif
-				} else if (xf_linestart * SIZEOF(UINTPTR_T) == tmp_xf_code)
-				{
-#					ifdef	COMPLEX_INSTRUCTION_UPDATE
-					FIX_OFFSET_WITH_ZBREAK_OFFSET(addr, xf_zbstart);
-#					else
-					*addr = (*addr & (zb_code)(~ZB_CODE_MASK)) |
-						((xf_zbstart * SIZEOF(UINTPTR_T)) << ZB_CODE_SHIFT);
-#					endif
-				} else
-					assertpro( ((xf_zbstart * SIZEOF(UINTPTR_T)) == tmp_xf_code)
-						|| ((xf_zbfetch * SIZEOF(UINTPTR_T)) == tmp_xf_code));
-				z_ptr->rtn = &(CURRENT_RHEAD_ADR(routine))->routine_name;
-				assert(NULL != lab_name);
-				z_ptr->lab = lab_name;
-				z_ptr->offset = offset;
-				z_ptr->mpc = (zb_code *)((unsigned char *)addr - SIZEOF_LA);
-				z_ptr->rtnhdr = routine;
-				USHBIN_ONLY(routine->has_ZBREAK = TRUE);	/* USHBIN platforms know which rtns have ZBREAK */
-				inst_flush(addr, SIZEOF(INST_TYPE));
-			}
-			if (z_ptr->action)
-			{	/* A ZBREAK command was already set for this line. Note when new action is same as
-				 * old action, no resultant changes in zb_refcnt.
-				 */
-				assert(0 <z_ptr->action->zb_refcnt);
-				z_ptr->action->zb_refcnt--;
-				assert((z_ptr->action != csp) || (0 <z_ptr->action->zb_refcnt));
-			}
-			z_ptr->action = csp;
-			z_ptr->count = cnt;
-		} else
-			assertpro(FALSE && line_offset_addr && cnt);
-	}
-}
diff --git a/sr_vvms/op_setzp1.c b/sr_vvms/op_setzp1.c
deleted file mode 100644
index c8cf916..0000000
--- a/sr_vvms/op_setzp1.c
+++ /dev/null
@@ -1,292 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "stringpool.h"
-#include "min_max.h"
-#include "fnpc.h"
-#include "op.h"
-
-GBLREF spdesc		stringpool;
-
-#ifdef DEBUG
-GBLREF	boolean_t	setp_work;
-GBLREF	int		cs_small;			/* scanned small string brute force */
-GBLREF	int		cs_small_pcs;			/* chars scanned by small scan */
-#  define SETWON setp_work = TRUE;
-#  define SETWOFF setp_work = FALSE;
-#  define COUNT_EVENT(x) ++x;
-#  define INCR_COUNT(x,y) x += y;
-#else
-#  define SETWON
-#  define SETWOFF
-#  define COUNT_EVENT(x)
-#  define INCR_COUNT(x,y)
-#endif
-
-error_def(ERR_MAXSTRLEN);
-
-/*
- * ----------------------------------------------------------
- * Fast path setzpiece when delimiter is one (lit) char replacing
- * a single piece (last is same as first).
- *
- * Arguments:
- *	src	- source mval
- *	delim	- delimiter char
- *	expr	- expression string mval
- *	ind	- index in source mval to be set
- *	dst	- destination mval where the result is saved.
- *
- * Return:
- *	none
- * ----------------------------------------------------------
- */
-void op_setzp1(mval *src, int delim, mval *expr, int ind, mval *dst)
-{
-	size_t		str_len, delim_cnt;
-	int		len, pfx_str_len, sfx_start_offset, sfx_str_len, rep_str_len, pfx_scan_offset;
-	int		cpy_cache_lines;
-	unsigned char	ldelimc, lc, *start_sfx, *str_addr, *end_pfx, *end_src, *start_pfx;
-	boolean_t	do_scan;
-	mval		dummymval;	/* It's value is not used but is part of the call to op_fnp1() */
-	fnpc		*cfnpc, *pfnpc;
-	delimfmt	ldelim;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	ldelim.unichar_val = delim;		/* Local copys (in unsigned char and integer formats) */
-	ldelimc = ldelim.unibytes_val[0];
-	do_scan = FALSE;
-	cpy_cache_lines = -1;
-	MV_FORCE_STR(expr);			/* Expression to put into piece place */
-	if (MV_DEFINED(src))
-	{
-		/* We have 3 possible scenarios:
-		 *
-		 * 1) If length of src is too small to cause cacheing by op_fnzp1, then just do
-		 *    the work ourselves with no cacheing.
-		 * 2) If the requested piece is larger than can be cached by op_fnzp1, call fnzp1
-		 *    for the maximum piece possible, use the cache info to "prime the pump" and
-		 *    then process the rest of the string ourselves.
-		 * 3) If the requested piece can be obtained from the cache, call op_fnzp1 to validate
-		 *    and rebuild the cache if necessary and then retrieve the necessary info from
-		 *    the fnpc cache.
-		 */
-		MV_FORCE_STR(src);	/* Make sure is string prior to length check */
-		if (FNPC_STRLEN_MIN < src->str.len && FNPC_ELEM_MAX >= ind)
-		{	/* 3) Best of all possible cases. The op_fnzp1 can do most of our work for us
-			 *     and we can preload the cache on the new string to help its subsequent
-			 *     uses along as well.
-			 */
-			SETWON;
-			op_fnzp1(src, delim, ind, &dummymval, FALSE);
-			SETWOFF;
-			cfnpc = &(TREF(fnpca)).fnpcs[src->fnpc_indx - 1];
-			assert(cfnpc->last_str.addr == src->str.addr);
-			assert(cfnpc->last_str.len == src->str.len);
-			assert(cfnpc->delim == ldelim.unichar_val);
-			assert(0 < cfnpc->npcs);
-			/* Three more scenarios: #1 piece all in cache, #2 piece would be in cache but ran
-			 * out of text or #3 piece is beyond what can be cached
-			 */
-			if (cfnpc->npcs >= ind)
-			{	/* #1 The piece we want is totally within the cache which is good news */
-				pfx_str_len = cfnpc->pstart[ind - 1];
-				delim_cnt = 0;
-				sfx_start_offset = cfnpc->pstart[ind] - 1;			/* Include delimiter */
-				rep_str_len = cfnpc->pstart[ind] - cfnpc->pstart[ind - 1] - 1;	/* Replace string length */
-				sfx_str_len = src->str.len - pfx_str_len - rep_str_len;
-				cpy_cache_lines = ind - 1;
-			} else
-			{	/* #2 The string was too short so the cache does not contain our string. This means
-				 * that the prefix becomes any text that IS in the cache and we set the delim_cnt
-				 * to be the number of missing pieces so the delimiters can be put in as part of the
-				 * prefix when we build the new string.
-				 */
-				pfx_str_len = cfnpc->pstart[cfnpc->npcs] - 1;
-				delim_cnt = (size_t)(ind - cfnpc->npcs);
-				sfx_start_offset = 0;
-				sfx_str_len = 0;
-				cpy_cache_lines = cfnpc->npcs;
-			}
-		} else if (FNPC_STRLEN_MIN < src->str.len)
-		{	/* 2) We have a element that would not be able to be in the fnpc cache. Go ahead
-			 *    and call op_fnzp1 to get cache info up to the maximum and then we will continue
-			 *    the scan on our own.
-			 */
-			SETWON;
-			op_fnzp1(src, delim, FNPC_ELEM_MAX, &dummymval, FALSE);
-			SETWOFF;
-			cfnpc = &(TREF(fnpca)).fnpcs[src->fnpc_indx - 1];
-			assert(cfnpc->last_str.addr == src->str.addr);
-			assert(cfnpc->last_str.len == src->str.len);
-			assert(cfnpc->delim == ldelim.unichar_val);
-			assert(0 < cfnpc->npcs);
-			if (FNPC_ELEM_MAX > cfnpc->npcs)
-			{	/* We ran out of text so the scan is complete. This is basically the same
-				 * as case #2 above.
-				 */
-				pfx_str_len = cfnpc->pstart[cfnpc->npcs] - 1;
-				delim_cnt = (size_t)(ind - cfnpc->npcs);
-				sfx_start_offset = 0;
-				sfx_str_len = 0;
-				cpy_cache_lines = cfnpc->npcs;
-			} else
-			{	/* We have a case where the piece we want cannot be kept in cache. In the special
-				 * case where there is no more text to handle, we don't need to scan further. Otherwise
-				 * we prime the pump and continue the scan where the cache left off.
-				 */
-				if ((pfx_scan_offset = cfnpc->pstart[FNPC_ELEM_MAX]) < src->str.len)
-				{	/* Normal case where we prime the pump */
-					do_scan = TRUE;
-				} else
-				{	/* Special case -- no more text to scan */
-					pfx_str_len = cfnpc->pstart[FNPC_ELEM_MAX] - 1;
-					sfx_start_offset = 0;
-					sfx_str_len = 0;
-				}
-				delim_cnt = (size_t)ind - FNPC_ELEM_MAX;
-				cpy_cache_lines = FNPC_ELEM_MAX;
-			}
-		} else
-		{	/* 1) We have a short string where no cacheing happens. Do the scanning work ourselves */
-			MV_FORCE_STR(src);
-			do_scan = TRUE;
-			pfx_scan_offset = 0;
-			delim_cnt = (size_t)ind;
-		}
-	} else
-	{	/* Source is not defined -- treat as a null string */
-		pfx_str_len = sfx_str_len = sfx_start_offset = 0;
-		delim_cnt = (size_t)ind - 1;
-	}
-	/* If we have been forced to do our own scan, do that here. Note the variable pfx_scan_offset has been
-	 * set to where the scan should begin in the src string and delim_cnt has been set to how many delimiters
-	 * still need to be processed.
-	 */
-	if (do_scan)
-	{	/* Scan the line isolating prefix piece, and end of the piece being replaced */
-		COUNT_EVENT(cs_small);
-		end_pfx = start_sfx = (unsigned char *)src->str.addr + pfx_scan_offset;
-		end_src = (unsigned char *)src->str.addr + src->str.len;
-		/* The compiler would unroll this loop this way anyway but we want to
-		 * adjust the start_sfx pointer after the loop but only if we have gone
-		 * into it at least once.
-		 */
-		if ((0 < delim_cnt) && (start_sfx < end_src))
-		{
-			do
-			{
-				end_pfx = start_sfx;
-				while (start_sfx < end_src && (lc = *start_sfx) != ldelimc) start_sfx++;
-				start_sfx++;
-				delim_cnt--;
-			} while ((0 < delim_cnt) && (start_sfx < end_src));
-			/* We have to backup up the suffix start pointer except under the condition
-			 * that the last character in the buffer is the last delimiter we were looking
-			 * for.
-			 */
-			if ((0 == delim_cnt) || (start_sfx < end_src) || (lc != ldelimc))
-				--start_sfx;				/* Back up suffix to include delimiter char */
-			/* If we scanned to the end (no text left) and still have delimiters to
-			 * find, the entire src text should be part of the prefix
-			 */
-			if ((start_sfx >= end_src) && (0 < delim_cnt))
-			{
-				end_pfx = start_sfx;
-				if (lc == ldelimc)			/* if last char was delim, reduce delim cnt */
-					--delim_cnt;
-			}
-		} else
-		{
-			/* If not doing any token finding, then this count becomes the number
-			 * of tokens to output. Adjust accordingly.
-			 */
-			if (0 < delim_cnt)
-				delim_cnt--;
-		}
-		INCR_COUNT(cs_small_pcs, (int)((size_t)ind - delim_cnt));
-		/* Now having the following situation:
-		 * end_pfx	-> end of the prefix piece including delimiter
-		 * start_sfx	-> start of suffix piece (with delimiter) or = end_pfx/src->str.addr if none
-		 */
-		pfx_str_len = end_pfx - (unsigned char *)src->str.addr;
-		if (0 > pfx_str_len)
-			pfx_str_len = 0;
-		sfx_start_offset = start_sfx - (unsigned char *)src->str.addr;
-		sfx_str_len = src->str.len - sfx_start_offset;
-		if (0 > sfx_str_len)
-			sfx_str_len = 0;
-	}
-	/* Calculate total string len. delim_cnt has needed padding delimiters for null fields */
-	str_len = (size_t)expr->str.len + (size_t)pfx_str_len + delim_cnt + (size_t)sfx_str_len;
-	if (MAX_STRLEN < str_len)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) ERR_MAXSTRLEN);
-	ENSURE_STP_FREE_SPACE((int)str_len);
-	str_addr = stringpool.free;
-	start_pfx = (unsigned char *)src->str.addr;
-	/* copy prefix */
-	if (0 < pfx_str_len)
-	{
-		memcpy(str_addr, src->str.addr, pfx_str_len);
-		str_addr += pfx_str_len;
-	}
-	/* copy delimiters */
-	while (0 < delim_cnt--)
-		*str_addr++ = ldelimc;
-	/* copy expression */
-	if (0 < expr->str.len)
-	{
-		memcpy(str_addr, expr->str.addr, expr->str.len);
-		str_addr += expr->str.len;
-	}
-	/* copy suffix */
-	if (0 < sfx_str_len)
-	{
-		memcpy(str_addr, start_pfx + sfx_start_offset, sfx_str_len);
-		str_addr += sfx_str_len;
-	}
-	assert(IS_AT_END_OF_STRINGPOOL(str_addr, -str_len));
-	dst->mvtype = MV_STR;
-	dst->str.len = str_addr - stringpool.free;
-	dst->str.addr = (char *)stringpool.free;
-	stringpool.free = str_addr;
-	/* If available, update the cache information for this newly created mval to hopefully
-	 * give it a head start on its next usage. Note that we can only copy over the cache info
-	 * for the prefix. We cannot include information for the 'expression' except where it starts
-	 * because the expression could itself contain delimiters that would be found on a rescan.
-	 */
-	if (0 < cpy_cache_lines)
-	{
-		pfnpc = cfnpc;				/* pointer for src mval's cache */
-		do
-		{
-			cfnpc = (TREF(fnpca)).fnpcsteal;	/* Next cache element to steal */
-			if ((TREF(fnpca)).fnpcmax < cfnpc)
-				cfnpc = &(TREF(fnpca)).fnpcs[0];
-			(TREF(fnpca)).fnpcsteal = cfnpc + 1;	/* -> next element to steal */
-		} while (cfnpc == pfnpc);		/* Make sure we don't step on ourselves */
-		cfnpc->last_str = dst->str;		/* Save validation info */
-		cfnpc->delim = ldelim.unichar_val;
-		cfnpc->npcs = cpy_cache_lines;
-		cfnpc->byte_oriented = TRUE;
-		dst->fnpc_indx = cfnpc->indx + 1;	/* Save where we are putting this element
-							 * (1 based index in mval so 0 isn't so common)
-							 */
-		memcpy(&cfnpc->pstart[0], &pfnpc->pstart[0], (cfnpc->npcs + 1) * SIZEOF(unsigned int));
-	} else
-		/* No cache available -- just reset index pointer to get fastest cache validation failure */
-		dst->fnpc_indx = -1;
-
-}
diff --git a/sr_vvms/op_zattach.c b/sr_vvms/op_zattach.c
deleted file mode 100644
index e370150..0000000
--- a/sr_vvms/op_zattach.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_limits.h"
-#include "io.h"
-#include <descrip.h>
-#include <ssdef.h>
-#include <jpidef.h>
-#include "gtm_caseconv.h"
-#include "setterm.h"
-#include "op.h"
-#include "min_max.h"
-
-#define PID_BUFF 15
-GBLREF io_pair		io_std_device;
-GBLREF mval 		dollar_zproc;
-static int4		parent_id;
-static bool		once_thru = FALSE;
-
-void op_zattach(mval *v)
-{
-	int4	pid;
-	int4 	jpi_code;
-	uint4 	status;
-	$DESCRIPTOR(p_name,"");
-	error_def(ERR_ZATTACHERR);
-
-	MV_FORCE_STR(v);
-	if (PID_BUFF < v->str.len)
-		rts_error(VARLSTCNT(5) ERR_ZATTACHERR, 2, MIN(SHRT_MAX, v->str.len), v->str.addr, SS$_IVLOGNAM);
-	if (once_thru == FALSE)
-	{	once_thru = TRUE;
-
-		p_name.dsc$w_length = dollar_zproc.str.len;
-		p_name.dsc$a_pointer = dollar_zproc.str.addr;
-		jpi_code = JPI$_MASTER_PID;
-
-		lib$getjpi(&jpi_code, 0, &p_name, &parent_id, 0, 0);
-	}
-
-	p_name.dsc$w_length = v->str.len;
-	if (!p_name.dsc$w_length)
-	{	pid = parent_id;
-	}
-	else
-	{
-		jpi_code = JPI$_PID;
-		p_name.dsc$a_pointer = v->str.addr;
-
-		status = lib$getjpi(&jpi_code, 0, &p_name, &pid, 0, 0);
-		if (status == SS$_NONEXPR)
-		{
-			char buf[PID_BUFF];
-
-			assert (v->str.len <= PID_BUFF);
-			lower_to_upper(&buf[0], v->str.addr, v->str.len);
-			p_name.dsc$a_pointer = buf;
-			status = lib$getjpi(&jpi_code, 0, &p_name, &pid, 0, 0);
-		}
-		if (status != SS$_NORMAL)
-		{	rts_error(VARLSTCNT(6) ERR_ZATTACHERR, 2, v->str.len, v->str.addr, status, 0);
-		}
-	}
-	flush_pio();
-	if (io_std_device.in->type == tt)
-		resetterm(io_std_device.in);
-	status = lib$attach(&pid);
-	if (io_std_device.in->type == tt)
-		setterm(io_std_device.in);
-	if (status != SS$_NORMAL)
-	{	rts_error(VARLSTCNT(6) ERR_ZATTACHERR, 2, v->str.len, v->str.addr, status, 0);
-	}
-}
diff --git a/sr_vvms/op_zedit.c b/sr_vvms/op_zedit.c
deleted file mode 100644
index 4eaa046..0000000
--- a/sr_vvms/op_zedit.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_limits.h"
-
-#include <descrip.h>
-#include <rms.h>
-#include <ssdef.h>
-
-#include "io.h"
-#include "zroutines.h"
-#include "stringpool.h"
-#include "op.h"
-#include "setterm.h"
-#include "get_tpu_addr.h"
-#include "min_max.h"
-
-GBLREF io_pair		io_std_device;
-GBLREF mval		dollar_zsource;
-GBLREF int4		dollar_zeditor;
-
-error_def	(ERR_ZEDFILSPEC);
-error_def	(ERR_FILENAMETOOLONG);
-
-void op_zedit(mval *v, mval *p)
-{
-	char		combuf[259] = {'T', 'P', 'U', ' '};
-	uint4		status;
-	static uint4	(*tpu_entry)() = 0;
-	int		comlen, objcnt, typ, ver;
-	struct FAB	fab;
-	struct NAM	nam;
-	unsigned char	es[MAX_FN_LEN];
-	zro_ent		*sp, *srcdir;
-	mstr		src;
-	$DESCRIPTOR	(com,combuf);
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	MV_FORCE_STR(v);
-	MV_FORCE_STR(p);
-	if (MAX_FN_LEN < v->str.len)
-		rts_error(VARLSTCNT(5) ERR_ZEDFILSPEC, 2, MIN(SHRT_MAX, v->str.len), v->str.addr,
-			ERR_FILENAMETOOLONG);
-	fab = cc$rms_fab;
-	fab.fab$l_fna = v->str.addr;
-	fab.fab$b_fns = v->str.len;
-	fab.fab$l_dna = DOTM;
-	fab.fab$b_dns = SIZEOF(DOTM) - 1;
-	fab.fab$l_nam = &nam;
-	nam = cc$rms_nam;
-	nam.nam$l_esa = es;
-	nam.nam$b_ess = SIZEOF(es);
-	status = sys$parse (&fab);
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-	if ((SIZEOF(DOTOBJ) - 1 == nam.nam$b_type) && !memcmp (nam.nam$l_type, LIT_AND_LEN(DOTOBJ)))
-		rts_error(VARLSTCNT(4) ERR_ZEDFILSPEC, 2, v->str.len, v->str.addr);
-	ver = nam.nam$b_ver;
-	if (!memcmp(nam.nam$l_type, LIT_AND_LEN(DOTM)))
-		typ = 0;
-	else
-		typ = nam.nam$b_type;
-	if (!(nam.nam$l_fnb & (NAM$M_NODE | NAM$M_EXP_DEV | NAM$M_EXP_DIR)))
-	{
-		src.addr = nam.nam$l_name;
-		src.len = nam.nam$b_name + nam.nam$b_type + nam.nam$b_ver;
-		zro_search (0, 0, &src, &srcdir);
-		if (NULL == srcdir)
-		{	/* find the first source directory */
-			objcnt = (TREF(zro_root))->count;
-			for (sp = TREF(zro_root) + 1;  (NULL == srcdir) && (0 < objcnt--);)
-			{
-				sp++;
-				if (0 != sp++->count)
-					srcdir = sp;
-			}
-		}
-		if (NULL != srcdir)
-		{
-			fab.fab$l_dna = srcdir->str.addr;
-			fab.fab$b_dns = srcdir->str.len;
-			nam.nam$b_nop = NAM$M_SYNCHK;
-			fab.fab$l_fna = src.addr;
-			fab.fab$b_fns = src.len;
-			status = sys$parse (&fab);
-			if (!(status & 1))
-				rts_error(VARLSTCNT(1) status);
-		}
-		dollar_zsource.str.addr = nam.nam$l_name;
-		dollar_zsource.str.len = nam.nam$b_name + typ;
-	} else
-	{
-		dollar_zsource.str.addr = es;
-		dollar_zsource.str.len = nam.nam$b_esl - nam.nam$b_type + typ - ver;
-	}
-	s2pool(&dollar_zsource.str);
-	comlen = 4;
-	memcpy (&combuf[comlen], es, nam.nam$b_esl);
-	comlen += nam.nam$b_esl;
-	if (0 != p->str.len && (comlen + p->str.len <= SIZEOF(combuf)))
-	{
-		memcpy (&combuf[comlen], p->str.addr, p->str.len);
-		comlen += p->str.len;
-	}
-	com.dsc$w_length = comlen;
-
-	if (tt == io_std_device.in->type)
-		resetterm(io_std_device.in);
-	if (0 == tpu_entry)
-		/* get_tpu_addr really should return a pointer to a uint4 function */
-		tpu_entry = get_tpu_addr();
-	status = (*tpu_entry)(&com);
-	if (tt == io_std_device.in->type)
-		setterm(io_std_device.in);
-	dollar_zeditor = status;
-	if (!(status & 1))
-		rts_error(VARLSTCNT(1) status);
-}
diff --git a/sr_vvms/op_zhelp.c b/sr_vvms/op_zhelp.c
deleted file mode 100644
index 8bb9fff..0000000
--- a/sr_vvms/op_zhelp.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2004 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_limits.h"
-#include <descrip.h>
-#include "io.h"
-
-#define	HLP$M_PROMPT	1
-#define	DEFAULT_LIBRARY	"GTM$HELP:MUMPS.HLB"
-
-void op_zhelp(mval *text,mval *lib)
-{
-	struct dsc$descriptor	helptext, library;
-	int			status, flags;
-	error_def(ERR_INVSTRLEN);
-
-	MV_FORCE_STR(text);
-	MV_FORCE_STR(lib);
-	if (SHRT_MAX < text->str.len)
-		rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, text->str.len, SHRT_MAX);
-	if (SHRT_MAX < lib->str.len)
-		rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, lib->str.len, SHRT_MAX);
-	flush_pio();
-	helptext.dsc$w_length	= text->str.len;
-	helptext.dsc$b_dtype	= DSC$K_DTYPE_T;
-	helptext.dsc$b_class	= DSC$K_CLASS_D;
-	helptext.dsc$a_pointer	= text->str.addr;
-	library.dsc$b_dtype	= DSC$K_DTYPE_T;
-	library.dsc$b_class	= DSC$K_CLASS_D;
-	if (!lib->str.len)
-	{
-		library.dsc$w_length	= sizeof DEFAULT_LIBRARY - 1;
-		library.dsc$a_pointer	= DEFAULT_LIBRARY;
-	}
-	else
-	{
-		library.dsc$w_length	= lib->str.len;
-		library.dsc$a_pointer	= lib->str.addr;
-	}
-	flags = HLP$M_PROMPT;
-	status = lbr$output_help(lib$put_output, 0, &helptext, &library, &flags, lib$get_input);
-	if (!(status & 1)) rts_error(VARLSTCNT(1) status);
-	return;
-}
diff --git a/sr_vvms/op_zlink.c b/sr_vvms/op_zlink.c
deleted file mode 100644
index f8876a0..0000000
--- a/sr_vvms/op_zlink.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <rms.h>
-#include "gtm_limits.h"
-
-#include "cmd_qlf.h"
-#include "stringpool.h"
-#include "zroutines.h"
-#include "gt_timer.h"
-#include "incr_link.h"
-#include "compiler.h"
-#include "zl_olb.h"
-#include "min_max.h"
-
-#define SRC			1
-#define OBJ			2
-#define NOTYPE			3
-
-#define QUADCMP(p1, p2)		(*((unsigned *)p1 + 1) > *((unsigned *)p2 + 1) || \
-				*((unsigned *)p1 + 1) == *((unsigned *)p2 + 1) && *(unsigned *)p1 > *(unsigned *)p2)
-
-GBLREF spdesc 			stringpool;
-GBLREF command_qualifier	cmd_qlf, glb_cmd_qlf;
-GBLREF mval			dollar_zsource;
-GBLREF char			object_file_name[];
-GBLREF short			object_name_len;
-GBLREF struct FAB		obj_fab;
-
-error_def (ERR_WILDCARD);
-error_def (ERR_VERSION);
-error_def (ERR_FILENOTFND);
-error_def (ERR_ZLINKFILE);
-error_def (ERR_FILEPARSE);
-error_def (ERR_ZLNOOBJECT);
-error_def (ERR_FILENAMETOOLONG);
-
-void op_zlink(mval *v, mval *quals)
-{
-	struct FAB		srcfab;
-	struct NAM		srcnam, objnam;
-	struct XABDAT		srcxab, objxab;
-	boolean_t		compile, expdir, libr, obj_found, src_found;
-	short			flen;
-	unsigned short		type;
-	unsigned char		srccom[MAX_FN_LEN], srcnamebuf[MAX_FN_LEN], objnamebuf[MAX_FN_LEN], objnamelen, srcnamelen,ver[6];
-	unsigned char		objcom[MAX_FN_LEN], list_file[MAX_FN_LEN], ceprep_file[MAX_FN_LEN], *fname;
-	zro_ent			*srcdir, *objdir;
-	mstr			srcstr, objstr, version;
-	mval			qualifier;
-	unsigned		status, srcfnb;
-	uint4			lcnt, librindx, qlf;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	MV_FORCE_STR(v);
-	if (MAX_FN_LEN < v->str.len)
-		rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, MIN(UCHAR_MAX, v->str.len), v->str.addr, ERR_FILENAMETOOLONG);
-	version.len = 0;
-	srcdir = objdir = 0;
-	version.addr = ver;
-	libr = FALSE;
-	obj_fab = cc$rms_fab;
-	if (quals)
-	{
-		MV_FORCE_STR(quals);
-		srcfab = cc$rms_fab;
-		srcfab.fab$l_fna = v->str.addr;
-		srcfab.fab$b_fns = v->str.len;
-		srcfab.fab$l_nam = &srcnam;
-		srcnam = cc$rms_nam;
-		srcnam.nam$l_esa = srcnamebuf;
-		srcnam.nam$b_ess = SIZEOF(srcnamebuf);
-		srcnam.nam$b_nop = NAM$M_SYNCHK;
-		status = sys$parse(&srcfab);
-		if (!(status & 1))
-			rts_error(VARLSTCNT(9) ERR_ZLINKFILE, 2, v->str.len, v->str.addr,
-				ERR_FILEPARSE, 2, v->str.len, v->str.addr, status);
-		if (srcnam.nam$l_fnb & NAM$M_WILDCARD)
-			rts_error(VARLSTCNT(8) ERR_ZLINKFILE, 2, v->str.len, v->str.addr,
-				ERR_WILDCARD, 2, v->str.len, v->str.addr);
-		srcfnb = srcnam.nam$l_fnb;
-		expdir = (srcfnb & (NAM$M_NODE | NAM$M_EXP_DEV | NAM$M_EXP_DIR));
-		if (srcfnb & NAM$M_EXP_VER)
-		{
-			memcpy(version.addr, srcnam.nam$l_ver, srcnam.nam$b_ver);
-			version.len = srcnam.nam$b_ver;
-		}
-		if (expdir)
-		{
-			if (version.len)
-				flen = srcnam.nam$b_esl - srcnam.nam$b_type - version.len;
-			else
-				flen = srcnam.nam$b_esl - srcnam.nam$b_type - 1; /* semicolon is put in by default */
-			fname = srcnam.nam$l_esa;
-		} else
-		{
-			flen = srcnam.nam$b_name;
-			fname = srcnam.nam$l_name;
-		}
-		ENSURE_STP_FREE_SPACE(flen);
-		memcpy(stringpool.free, fname, flen);
-		dollar_zsource.str.addr = stringpool.free;
-		dollar_zsource.str.len = flen;
-		stringpool.free += flen;
-		if (srcfnb & NAM$M_EXP_TYPE)
-		{
-			if ((SIZEOF(DOTOBJ) - 1 == srcnam.nam$b_type) &&
-				!MEMCMP_LIT(srcnam.nam$l_type, DOTOBJ))
-			{
-				type = OBJ;
-				objstr.addr = srcnam.nam$l_esa;
-				objstr.len = srcnam.nam$b_esl;
-			} else
-			{
-				type = SRC;
-				memcpy(srcnamebuf, dollar_zsource.str.addr, flen);
-				memcpy(&srcnamebuf[flen], srcnam.nam$l_type, srcnam.nam$b_type);
-				memcpy(&srcnamebuf[flen + srcnam.nam$b_type],
-					version.addr, version.len);
-				srcnamelen = flen + srcnam.nam$b_type + version.len;
-				srcnamebuf[srcnamelen] = 0;
-				srcstr.addr = srcnamebuf;
-				srcstr.len = srcnamelen;
-				memcpy(objnamebuf, dollar_zsource.str.addr, flen);
-				memcpy(&objnamebuf[flen], DOTOBJ, SIZEOF(DOTOBJ));
-				objnamelen = flen + SIZEOF(DOTOBJ) - 1;
-				objstr.addr = objnamebuf;
-				objstr.len = objnamelen;
-			}
-		} else
-		{
-			type = NOTYPE;
-			memcpy(srcnamebuf, dollar_zsource.str.addr, flen);
-			memcpy(&srcnamebuf[flen], DOTM, SIZEOF(DOTM));
-			srcnamelen = flen + SIZEOF(DOTM) - 1;
-			memcpy(objnamebuf, dollar_zsource.str.addr, flen);
-			MEMCPY_LIT(&objnamebuf[flen], DOTOBJ);
-			memcpy(&objnamebuf[flen + SIZEOF(DOTOBJ) - 1], version.addr, version.len);
-			objnamelen = flen + SIZEOF(DOTOBJ) + version.len - 1;
-			objnamebuf[objnamelen] = 0;
-			srcstr.addr = srcnamebuf;
-			srcstr.len = srcnamelen;
-			objstr.addr = objnamebuf;
-			objstr.len = objnamelen;
-		}
-		if (!expdir)
-		{
-			if (OBJ == type)
-			{
-				zro_search(&objstr, &objdir, 0, 0);
-				if (!objdir)
-					rts_error(VARLSTCNT(8) ERR_ZLINKFILE, 2, dollar_zsource.str.len, dollar_zsource.str.addr,
-						ERR_FILENOTFND, 2, dollar_zsource.str.len, dollar_zsource.str.addr);
-			} else  if (SRC == type)
-			{
-				zro_search(&objstr, &objdir, &srcstr, &srcdir);
-				if (!srcdir)
-					rts_error(VARLSTCNT(8) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf,
-						ERR_FILENOTFND, 2, srcnamelen, srcnamebuf);
-			} else
-			{
-				zro_search(&objstr, &objdir, &srcstr, &srcdir);
-				if (!objdir && !srcdir)
-					rts_error(VARLSTCNT(8) ERR_ZLINKFILE, 2, dollar_zsource.str.len, dollar_zsource.str.addr,
-						ERR_FILENOTFND, 2, dollar_zsource.str.len, dollar_zsource.str.addr);
-			}
-		}
-	} else
-	{
-		expdir = FALSE;
-		type = NOTYPE;
-		flen = v->str.len;
-		memcpy(srcnamebuf, v->str.addr, flen);
-		MEMCPY_LIT(&srcnamebuf[flen], DOTM);
-		srcnamelen = flen + SIZEOF(DOTM) - 1;
-		if ('%' == srcnamebuf[0])
-			srcnamebuf[0] = '_';
-		memcpy(objnamebuf, srcnamebuf, flen);
-		MEMCPY_LIT(&objnamebuf[flen], DOTOBJ);
-		objnamelen = flen + SIZEOF(DOTOBJ) - 1;
-		srcstr.addr = srcnamebuf;
-		srcstr.len = srcnamelen;
-		objstr.addr = objnamebuf;
-		objstr.len = objnamelen;
-		zro_search(&objstr, &objdir, &srcstr, &srcdir);
-		if (!objdir && !srcdir)
-			rts_error(VARLSTCNT(8) ERR_ZLINKFILE, 2, v->str.len, v->str.addr,
-				ERR_FILENOTFND, 2, v->str.len, v->str.addr);
-		qualifier.mvtype = MV_STR;
-		qualifier.str = TREF(dollar_zcompile);
-		quals = &qualifier;
-	}
-	if (OBJ == type)
-	{
-		obj_fab.fab$b_fac = FAB$M_GET;
-		obj_fab.fab$b_shr = FAB$M_SHRGET;
-		if (NULL != objdir)
-		{
-			if (ZRO_TYPE_OBJLIB == objdir->type)
-				libr = TRUE;
-			else
-			{
-				srcfab.fab$l_dna = objdir->str.addr;
-				srcfab.fab$b_dns = objdir->str.len;
-			}
-		}
-		for (lcnt = 0;  lcnt < MAX_FILE_OPEN_TRIES;  lcnt++)
-		{
-			status = (FALSE == libr) ? sys$open(&srcfab): zl_olb(&objdir->str, &objstr, &librindx);
-			if (RMS$_FLK != status)
-				break;
-			hiber_start(WAIT_FOR_FILE_TIME);
-		}
-		if (FALSE == (status & 1))
-			rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, dollar_zsource.str.len, dollar_zsource.str.addr, status);
-		if (FALSE == ((FALSE == libr) ? incr_link(&srcfab, libr) : incr_link(&librindx, libr)))
-			rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, dollar_zsource.str.len, dollar_zsource.str.addr, ERR_VERSION);
-		status = (FALSE == libr) ? sys$close(&srcfab) : lbr$close(&librindx);
-		if (FALSE == (status & 1))
-			rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, dollar_zsource.str.len, dollar_zsource.str.addr, status);
-	} else	/* either NO type or SOURCE type */
-	{
-		src_found = obj_found = compile = FALSE;
-		srcfab = obj_fab = cc$rms_fab;
-		obj_fab.fab$l_xab = &objxab;
-		srcxab = objxab = cc$rms_xabdat;
-		obj_fab.fab$l_nam = &objnam;
-		srcnam = objnam = cc$rms_nam;
-		obj_fab.fab$l_fna = objnamebuf;
-		obj_fab.fab$b_fns = objnamelen;
-		obj_fab.fab$b_fac = FAB$M_GET;
-		obj_fab.fab$b_shr = FAB$M_SHRGET;
-		objnam.nam$l_esa = objcom;
-		objnam.nam$b_ess = SIZEOF(objcom);
-		srcfab.fab$l_nam = &srcnam;
-		srcfab.fab$l_xab = &srcxab;
-		srcfab.fab$l_fna = srcnamebuf;
-		srcfab.fab$b_fns = srcnamelen;
-		srcfab.fab$b_fac = FAB$M_GET;
-		srcfab.fab$b_shr = FAB$M_SHRGET;
-		srcnam.nam$l_esa = srccom;
-		srcnam.nam$b_ess = SIZEOF(srccom);
-		cmd_qlf.object_file.str.addr = objcom;
-		cmd_qlf.object_file.str.len = 255;
-		cmd_qlf.list_file.str.addr = list_file;
-		cmd_qlf.list_file.str.len = 255;
-		cmd_qlf.ceprep_file.str.addr = ceprep_file;
-		cmd_qlf.ceprep_file.str.len = 255;
-		if (srcdir && srcdir->str.len)
-		{
-			srcfab.fab$l_dna = srcdir->str.addr;
-			srcfab.fab$b_dns = srcdir->str.len;
-		}
-		if (objdir && objdir->str.len)
-		{
-			if (ZRO_TYPE_OBJLIB == objdir->type)
-				libr = TRUE;
-			else
-			{
-				obj_fab.fab$l_dna = objdir->str.addr;
-				obj_fab.fab$b_dns = objdir->str.len;
-			}
-		}
-		if (SRC != type)
-		{
-			if (!expdir && !objdir)
-				obj_found = FALSE;
-			else  if (!libr)
-			{
-				for (lcnt = 0;  lcnt < MAX_FILE_OPEN_TRIES;  lcnt++)
-				{
-					status = sys$open(&obj_fab);
-					if (RMS$_FLK != status)
-						break;
-					hiber_start(WAIT_FOR_FILE_TIME);
-				}
-				if (!(status & 1))
-				{
-					if (RMS$_FNF == status)
-						obj_found = FALSE;
-					else
-						rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, objnamelen, objnamebuf, status);
-				} else
-					obj_found = TRUE;
-			} else
-			{
-				status = zl_olb(&objdir->str, &objstr, &librindx);
-				if (status)
-					obj_found = TRUE;
-			}
-		} else
-			compile = TRUE;
-		if (!expdir && !srcdir)
-			src_found = FALSE;
-		else
-		{
-			for (lcnt = 0;  lcnt < MAX_FILE_OPEN_TRIES;  lcnt++)
-			{
-				status = sys$open(&srcfab);
-				if (RMS$_FLK != status)
-					break;
-				hiber_start(WAIT_FOR_FILE_TIME);
-			}
-			if (!(status & 1))
-			{
-				if ((RMS$_FNF == status) && (SRC != type))
-					src_found = FALSE;
-				else
-					rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, status);
-			} else
-			{
-				src_found = TRUE;
-				if (SRC == type)
-				{
-					status = sys$close(&srcfab);
-					if (!(status & 1))
-						rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, status);
-				}
-			}
-		}
-		if (SRC != type)
-		{
-			if (src_found)
-			{
-				if (obj_found)
-				{
-					if (QUADCMP(&srcxab.xab$q_rdt, &objxab.xab$q_rdt))
-					{
-						status = sys$close(&obj_fab);
-						obj_fab = cc$rms_fab;
-						if (!(status & 1))
-							rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, objnamelen, objnamebuf, status);
-						compile = TRUE;
-					}
-				} else
-					compile = TRUE;
-				status = sys$close(&srcfab);
-				if (!(status & 1))
-					rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, status);
-			} else  if (!obj_found)
-				rts_error(VARLSTCNT(8) ERR_ZLINKFILE, 2, objnamelen, objnamebuf,
-					ERR_FILENOTFND, 2, objnamelen, objnamebuf);
-		}
-		if (compile)
-		{
-			zl_cmd_qlf(&quals->str, &cmd_qlf);
-			if (!MV_DEFINED(&cmd_qlf.object_file))
-			{
-				objnam.nam$b_nop = NAM$M_SYNCHK;
-				status = sys$parse(&obj_fab);
-				if (!(status & 1))
-					rts_error(VARLSTCNT(4) ERR_FILEPARSE, 2, obj_fab.fab$b_fns, obj_fab.fab$l_fna);
-				cmd_qlf.object_file.mvtype = MV_STR;
-				cmd_qlf.object_file.str.len = objnam.nam$b_esl - objnam.nam$b_ver;
-			}
-			qlf = cmd_qlf.qlf;
-			if (!(cmd_qlf.qlf & CQ_OBJECT) && (SRC != type))
-			{
-				cmd_qlf.qlf = glb_cmd_qlf.qlf;
-				rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, ERR_ZLNOOBJECT);
-			}
-			zlcompile(srcnam.nam$b_esl, srcnam.nam$l_esa);
-			if ((SRC == type) && !(qlf & CQ_OBJECT))
-				return;
-		}
-		status = libr ? incr_link(&librindx, libr) : incr_link(&obj_fab, libr);
-		if (!status)	/* due only to version mismatch, so recompile */
-		{
-			if (!libr)
-			{
-				status = sys$close(&obj_fab);
-				obj_fab = cc$rms_fab;
-			} else
-				status = lbr$close(&librindx);
-			if (!(status & 1))
-				rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, objstr.len, objstr.addr, status);
-			if (compile)
-				GTMASSERT;
-			if (!src_found)
-				rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, ERR_VERSION);
-			zl_cmd_qlf(&quals->str, &cmd_qlf);
-			if (!MV_DEFINED(&cmd_qlf.object_file))
-			{
-				objnam.nam$b_nop = NAM$M_SYNCHK;
-				status = sys$parse(&obj_fab);
-				if (!(status & 1))
-					rts_error(VARLSTCNT(4) ERR_FILEPARSE, 2, obj_fab.fab$b_fns, obj_fab.fab$l_fna);
-				cmd_qlf.object_file.mvtype = MV_STR;
-				cmd_qlf.object_file.str.len = objnam.nam$b_esl - objnam.nam$b_ver;
-			}
-			if (!(cmd_qlf.qlf & CQ_OBJECT) && (SRC != type))
-			{
-				cmd_qlf.qlf = glb_cmd_qlf.qlf;
-				rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, srcnamelen, srcnamebuf, ERR_ZLNOOBJECT);
-			}
-			zlcompile(srcnam.nam$b_esl, srcnam.nam$l_esa);
-			if (!incr_link(&obj_fab, libr))
-				GTMASSERT;
-		}
-		if (!libr)
-		{
-			status = sys$close(&obj_fab);
-			obj_fab = cc$rms_fab;
-		} else
-			status = lbr$close(&librindx);
-		if (!(status & 1))
-			rts_error(VARLSTCNT(5) ERR_ZLINKFILE, 2, objstr.len, objstr.addr, status);
-	}
-	return;
-}
diff --git a/sr_vvms/op_zmess.c b/sr_vvms/op_zmess.c
deleted file mode 100644
index bf74b58..0000000
--- a/sr_vvms/op_zmess.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "fao_parm.h"
-#include <descrip.h>
-#include <ssdef.h>
-#include <stdarg.h>
-#include "mval2fao.h"
-#include "op.h"
-#include "tp_restart.h"
-
-#define FAO_BUFFER_SPACE	2048
-#define MAX_MSG_SIZE		256
-
-error_def(ERR_TPRETRY);
-
-void op_zmess(int4 errnum, ...)
-{
-	va_list		var;
-	int4		status, cnt, faocnt;
-	unsigned short	m_len;
-	unsigned char	faostat[4];
-	unsigned char	msgbuff[MAX_MSG_SIZE + 1];
-	unsigned char	buff[FAO_BUFFER_SPACE];
-	int4		fao[MAX_FAO_PARMS];
-	$DESCRIPTOR(d_sp, msgbuff);
-
-	VAR_START(var, errnum);
-	va_count(cnt);
-	cnt--;
-	assert(34 == MAX_FAO_PARMS);			/* Defined in fao_parm.h. */
-	status = sys$getmsg(errnum, &m_len, &d_sp, 0, &faostat[0]);
-	if ((status & 1) && m_len)
-	{
-		buff[m_len] = 0;
-		memset(&fao[0], 0, SIZEOF(fao));
-		faocnt = (cnt ? faostat[1] : cnt);
-		faocnt = (faocnt > MAX_FAO_PARMS ? MAX_FAO_PARMS : faocnt);
-		if (faocnt)
-			faocnt = mval2fao(msgbuff, var, &fao[0], cnt, faocnt, buff, buff + SIZEOF(buff));
-		va_end(var);
-		if (faocnt != -1)
-		{
-			if (ERR_TPRETRY == errnum)
-			{	/* A TP restart is being signalled. Set t_fail_hist just like a TRESTART command would */
-				op_trestart_set_cdb_code();
-			}
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(MAX_FAO_PARMS + 2) errnum, faocnt, fao[0], fao[1], fao[2], fao[3],
-				fao[4], fao[5], fao[6], fao[7], fao[8], fao[9], fao[10], fao[11], fao[12], fao[13], fao[14],
-				fao[15], fao[16], fao[17], fao[18], fao[19], fao[20], fao[21], fao[22], fao[23], fao[24], fao[25],
-				fao[26], fao[27], fao[28], fao[29], fao[30], fao[31], fao[32], fao[33]);
-		}
-		return;
-	} else
-	{
-		va_end(var);
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(1) status);
-	}
-}
diff --git a/sr_vvms/pid.m b/sr_vvms/pid.m
deleted file mode 100644
index 20bfce0..0000000
--- a/sr_vvms/pid.m
+++ /dev/null
@@ -1,64 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 1990, 2002 Sanchez Computer Associates, Inc.	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-PID	; operations on VMS pids
-	;
-DELPRC(p);
-	n id,oldpriv,st,$zt
-	s ($zt,zt)="d error",oldpriv=$zsetprv("GROUP,WORLD"),id=""
-	f  s id=$o(p(id)) q:id=""  s st=$zc("DELPRC",id) w !,"Deleting process ",p(id)
-	i $zsetprv(oldpriv)
-	q
-FORCEX(p);
-	n id,oldpriv,st,$zt
-	s ($zt,zt)="d error",oldpriv=$zsetprv("GROUP,WORLD"),id=""
-	f  s id=$o(p(id)) q:id=""  s st=$zc("FORCEX",id) w !,"Stopping process ",p(id)
-	i $zsetprv(oldpriv)
-	q
-GETIMG(img,p);
-	q:'$l($g(img))
-	n id,oldpriv,$zt
-	k p s p=0,img=$tr(img,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
-	s ($zt,zt)="d error",oldpriv=$zsetprv("GROUP,WORLD"),id=$zpid(0)
-	d  f  s id=$zpid(1) q:id=""  d
-	. i $zparse($zgetjpi(id,"IMAGNAME"),"NAME")=img s p(id)=$$FUNC^%DH(id,8),p=p+1
-	i $zsetprv(oldpriv)
-	q
-SHOW(p);
-	n id s id=""
-	f  s id=$o(p(id)) q:id=""  w !,p(id)
-	q
-SHOWIMG	n image,pid
-	r !,"Image name: ",image d GETIMG(image,.pid)
-	i 'pid w !,"No processes found running that image" q
-	w !,"The following processes are running image ",image,":"
-	d SHOW(.pid)
-	q
-STOPIMG	n image,pid,wait
-	r !,"Image name: ",image d GETIMG(image,.pid)
-	i 'pid w !,"No processes found running that image" q
-	r !,"Pause in seconds between FORCEX and DELPRC: ",wait
-	d STPIMG(image,wait)
-	q
-STPIMG(img,wt)
-	q:'$l($g(img))
-	n t,pid s wt=$g(wt) s:wt<1 wt=20
-	d GETIMG(img,.pid)
-	i 'pid w !,"No processes stopped" q
-	d FORCEX(.pid)
-	f t=1:1:wt h 1 d GETIMG(img,.pid) q:'pid
-	i pid d DELPRC(.pid):pid
-	q
-error	w !
-	i $d(id),id w "Unable to access process with pid: ",$$FUNC^%DH(id)
-	e  w $p($zs,",",2,99),!
-	i $zs["GETIMG" s id=0
-	s $zt=zt
-	q
diff --git a/sr_vvms/probe.c b/sr_vvms/probe.c
deleted file mode 100644
index b0e4b00..0000000
--- a/sr_vvms/probe.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "min_max.h"
-
-GBLREF int4		rundown_os_page_size;
-
-boolean_t probe(uint4 len, sm_uc_ptr_t addr, boolean_t write)
-{
-	sm_uc_ptr_t	top;
-	uint4		status;
-
-	if ((int4)len <= 0)
-		return FALSE;
-	top = addr + len;
-	if (addr >= top)	/* in case addr + len resulted in a top that wrapped (was beyond the representable range) */
-		return FALSE;
-	/* the following MUST use ROUND_DOWN2 to avoid bringing in the C RTL to help with integer division;
-	 if any RTL comes into GTMSECSHR, the link looks fine, but the loader doesn't and the 1st call to SYS$ ACCVIOs */
-	len = MIN(ROUND_DOWN2((sm_ulong_t)addr, 2 * rundown_os_page_size) + (2 * rundown_os_page_size) - (sm_ulong_t)addr, len);
-	for (; addr < top; )
-	{	/* check every page from addr to addr + len - 1, at most, 2 at a time,
-		 * because probe just checks the first and last bytes of the interval specified by its arguments */
-		if (write)
-			status = probew(len > 1 ? len - 1 : 0, addr);
-		else
-			status = prober(len > 1 ? len - 1 : 0, addr);
-		if (!status)
-			return FALSE;
-		addr += len;
-		len = MIN(top - addr, 2 * rundown_os_page_size);
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/prvdef.h b/sr_vvms/prvdef.h
deleted file mode 100644
index 42f8d07..0000000
--- a/sr_vvms/prvdef.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#define	PRV$M_CMKRNL	1
-#define	PRV$M_CMEXEC	2
-#define	PRV$M_SYSNAM	4
-#define	PRV$M_GRPNAM	8
-#define	PRV$M_ALLSPOOL	16
-#define	PRV$M_DETACH	32
-#define	PRV$M_DIAGNOSE	64
-#define	PRV$M_LOG_IO	128
-#define	PRV$M_GROUP	256
-#define	PRV$M_NOACNT	512
-#define	PRV$M_PRMCEB	1024
-#define	PRV$M_PRMMBX	2048
-#define	PRV$M_PSWAPM	4096
-#define	PRV$M_SETPRI	8192
-#define	PRV$M_SETPRV	16384
-#define	PRV$M_TMPMBX	32768
-#define	PRV$M_WORLD	65536
-#define	PRV$M_MOUNT	131072
-#define	PRV$M_OPER	262144
-#define	PRV$M_EXQUOTA	524288
-#define	PRV$M_NETMBX	1048576
-#define	PRV$M_VOLPRO	2097152
-#define	PRV$M_PHY_IO	4194304
-#define	PRV$M_BUGCHK	8388608
-#define	PRV$M_PRMGBL	16777216
-#define	PRV$M_SYSGBL	33554432
-#define	PRV$M_PFNMAP	67108864
-#define	PRV$M_SHMEM	134217728
-#define	PRV$M_SYSPRV	268435456
-#define	PRV$M_BYPASS	536870912
-#define	PRV$M_SYSLCK	1073741824
-#define	PRV$M_SHARE	-2147483648
-#define	PRV$M_ACNT	512
-#define	PRV$M_ALTPRI	8192
-#define	PRV$S_PRVDEF	5
-#define	PRV$V_CMKRNL	0
-#define	PRV$V_CMEXEC	1
-#define	PRV$V_SYSNAM	2
-#define	PRV$V_GRPNAM	3
-#define	PRV$V_ALLSPOOL	4
-#define	PRV$V_DETACH	5
-#define	PRV$V_DIAGNOSE	6
-#define	PRV$V_LOG_IO	7
-#define	PRV$V_GROUP	8
-#define	PRV$V_NOACNT	9
-#define	PRV$V_PRMCEB	10
-#define	PRV$V_PRMMBX	11
-#define	PRV$V_PSWAPM	12
-#define	PRV$V_SETPRI	13
-#define	PRV$V_SETPRV	14
-#define	PRV$V_TMPMBX	15
-#define	PRV$V_WORLD	16
-#define	PRV$V_MOUNT	17
-#define	PRV$V_OPER	18
-#define	PRV$V_EXQUOTA	19
-#define	PRV$V_NETMBX	20
-#define	PRV$V_VOLPRO	21
-#define	PRV$V_PHY_IO	22
-#define	PRV$V_BUGCHK	23
-#define	PRV$V_PRMGBL	24
-#define	PRV$V_SYSGBL	25
-#define	PRV$V_PFNMAP	26
-#define	PRV$V_SHMEM	27
-#define	PRV$V_SYSPRV	28
-#define	PRV$V_BYPASS	29
-#define	PRV$V_SYSLCK	30
-#define	PRV$V_SHARE	31
-#define	PRV$V_UPGRADE	32
-#define	PRV$V_DOWNGRADE	33
-#define	PRV$V_GRPPRV	34
-#define	PRV$V_READALL	35
-#define	PRV$V_TMPJNL	36
-#define	PRV$V_PRMJNL	37
-#define	PRV$V_SECURITY	38
-#define	PRV$V_ACNT	9
-#define	PRV$V_ALTPRI	13
diff --git a/sr_vvms/quad2asc.c b/sr_vvms/quad2asc.c
deleted file mode 100644
index 7967c4c..0000000
--- a/sr_vvms/quad2asc.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <libdef.h>
-#include "quad2asc.h"
-
-/* convert a GOQ data value to a canonical MUMPS string */
-
-int quad2asc(int4 mantissa[2],char exponent,unsigned char *outaddr,unsigned short outaddrlen,unsigned short *actual_len)
-/*
-int4 mantissa[2];	a quad word which is the 'mantissa'
-char exponent;		the decimal exponent
-unsigned char *outaddr;	the address to put the output string
-unsigned short outaddrlen; the maximum length of the output string
-unsigned short *actual_len; the actual length of the output string
-*/
-/* value returned: status code */
-{
-	struct	dsc$descriptor in, out;
-	int4 status;
-	int n,m;
-	unsigned char *cp;
-	int4 exp;
-
-	in.dsc$w_length = SIZEOF(mantissa);
-	in.dsc$b_dtype = DSC$K_DTYPE_Q;
-	in.dsc$b_class = DSC$K_CLASS_S;
-	in.dsc$a_pointer = mantissa;
-	out.dsc$w_length = outaddrlen;
-	out.dsc$b_dtype = DSC$K_DTYPE_T;
-	out.dsc$b_class = DSC$K_CLASS_S;
-	out.dsc$a_pointer = outaddr;
-	status = lib$cvt_dx_dx(&in,&out,actual_len);
-	if ((status & 1) == 0)
-		rts_error(VARLSTCNT(1) status);
-	exp = exponent;
-	if (*actual_len == 1 && *outaddr == '0')
-		return status;
-	if (exp > 0)
-	{
-		n = exp + *actual_len;
-		if (n > outaddrlen)
-			return LIB$_DESSTROVF;
-		for (m = exp, cp = outaddr + *actual_len ; m > 0 ; m--)
-			*cp++ = '0';
-		*actual_len = n;
-	}
-	else if (exp < 0)
-	{
-		exp = - exp;
-		n = *actual_len;
-		cp = outaddr;
-		if (*cp == '-')
-		{
-			n--;
-			cp++;
-		}
-		m = n - exp;
-		if (m <= 0)
-		{
-			m = - m;
-			if (n + m + 1 > outaddrlen)
-				return LIB$_DESSTROVF;
-			*actual_len += m + 1;
-			memcpy(cp + m + 1, cp, n);
-			*cp++ = '.';
-			memset(cp, '0', m);
-		} else
-		{
-			if (n + 1 > outaddrlen)
-				return LIB$_DESSTROVF;
-			*actual_len += 1;
-			cp += m;
-			memcpy(cp + 1, cp, n - 1);
-			*cp = '.';
-		}
-		for (cp = outaddr + *actual_len, n = 0; cp > outaddr + 1; *actual_len -= 1)
-		{
-			if (*--cp != '0')
-				break;
-		}
-			if (*cp == '.')
-				*actual_len -= 1;
-	}
-	return status;
-}
diff --git a/sr_vvms/quad2asc.h b/sr_vvms/quad2asc.h
deleted file mode 100644
index 109d246..0000000
--- a/sr_vvms/quad2asc.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef QUAD2ASC_INCLUDED
-#define QUAD2ASC_INCLUDED
-
-int quad2asc(int4 mantissa[], char exponent, unsigned char *outaddr,
-	unsigned short outaddrlen, unsigned short *actual_len);		/***type int added***/
-
-#endif /* QUAD2ASC_INCLUDED */
diff --git a/sr_vvms/rc_cpt_ops.c b/sr_vvms/rc_cpt_ops.c
deleted file mode 100644
index cbd65e9..0000000
--- a/sr_vvms/rc_cpt_ops.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* STUB file for VMS */
-#include "rc_cpt_ops.h"
-
-int rc_cpt_entry(int blk)
-{
-	return 0;
-}
-
-void rc_cpt_unlock(void)
-{	return;
-}
-
-void rc_cpt_lock(void)
-{	return;
-}
-
-int rc_cpt_inval(void)
-{	return 0;
-}
-
-void rc_close_section(void)
-{
-	return;
-}
-
-
diff --git a/sr_vvms/recvpool_init.c b/sr_vvms/recvpool_init.c
deleted file mode 100644
index 80a9d38..0000000
--- a/sr_vvms/recvpool_init.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <prtdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <stddef.h>
-
-#include <errno.h>
-#include "gtm_fcntl.h"
-#include "gtm_unistd.h"
-#include "gtm_inet.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "repl_sem.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "jnl.h"
-#include "gtmrecv.h"
-#include "gtm_logicals.h"
-#include "repl_shm.h"
-#include "repl_shutdcode.h"
-#include "io.h"
-#include "is_file_identical.h"
-#include "trans_log_name.h"
-#include "interlock.h"
-
-GBLREF	recvpool_addrs		recvpool;
-GBLREF	int			recvpool_shmid;
-GBLREF 	uint4			process_id;
-GBLREF 	gtmrecv_options_t	gtmrecv_options;
-
-error_def(ERR_RECVPOOLSETUP);
-error_def(ERR_TEXT);
-
-LITREF  char                    gtm_release_name[];
-LITREF  int4                    gtm_release_name_len;
-
-#define MAX_RES_TRIES		620 		/* Also defined in gvcst_init_sysops.c */
-#define MEGA_BOUND		(1024*1024)
-
-void recvpool_init(recvpool_user pool_user,
-		   boolean_t gtmrecv_startup,
-		   boolean_t lock_opt_sem)
-{
-	mstr 			log_nam, trans_log_nam;
-	char		        trans_buff[MAX_FN_LEN+1];
-	key_t		        recvpool_key;
-	int4		        status;
-	uint4			ustatus;
-	int			lcnt;
-	unsigned int		full_len;
-	sm_long_t	        status_l;
-	boolean_t	        shm_created;
-	int		        semflgs;
-	struct dsc$descriptor_s name_dsc;
-	char			res_name[MAX_NAME_LEN + 2]; /* +1 for null terminator and another +1 for the length stored in [0]
-								by global_name() */
-	gds_file_id		file_id;
-
-	log_nam.addr = GTM_GBLDIR;
-	log_nam.len = SIZEOF(GTM_GBLDIR) - 1;
-	if (SS_NORMAL != trans_log_name(&log_nam, &trans_log_nam, trans_buff))
-		rts_error(VARLSTCNT(6) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2, RTS_ERROR_LITERAL("gtm$gbldir not defined"));
-	trans_buff[trans_log_nam.len] = '\0';
-	full_len = trans_log_nam.len;
-	if (!get_full_path(&trans_buff, trans_log_nam.len, &trans_buff, &full_len, MAX_TRANS_NAME_LEN, &ustatus))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Failed to get full path for gtm$gbldir"), ustatus);
-	trans_log_nam.len = full_len;	/* since on vax, mstr.len is a 'short' */
-	/* Get Journal Pool Resource Name : name_dsc holds the resource name */
-	set_gdid_from_file((gd_id_ptr_t)&file_id, trans_buff, trans_log_nam.len);
-	global_name("GT$R", &file_id, res_name); /* R - Stands for Receiver Pool */
-	name_dsc.dsc$a_pointer = &res_name[1];
-        name_dsc.dsc$w_length = res_name[0];
-        name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
-        name_dsc.dsc$b_class = DSC$K_CLASS_S;
-	name_dsc.dsc$a_pointer[name_dsc.dsc$w_length] = '\0';
-
-	/*
- 	 * We need to do some receive pool locking. The first lock
-	 * to obtain is the receive pool access control
-	 * lock which is also used as the rundown lock. When one has
-	 * this, no new attaches to the receive pool are allowed.
-	 * Also, a rundown cannot occur. We will get this lock,
- 	 * then initialize the fields (if not already initialized)
-	 * before we release the access control lock.
-	 * Refer to repl_sem.h for an enumeration of semaphores in the sem-set
- 	 */
-
-	assert(NUM_SRC_SEMS == NUM_RECV_SEMS);
-	if(0 != init_sem_set_recvr(&name_dsc))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0,
-				       ERR_TEXT, 2, RTS_ERROR_LITERAL("Error with receiver pool sem init."), REPL_SEM_ERRNO);
-	if(0 != grab_sem(RECV, RECV_POOL_ACCESS_SEM))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0,
-			  	       ERR_TEXT, 2, RTS_ERROR_LITERAL("Error with receive pool semaphores"), REPL_SEM_ERRNO);
-
-	/* Store the recvpool key */
-	memcpy(recvpool.vms_recvpool_key.name, name_dsc.dsc$a_pointer, name_dsc.dsc$w_length);
-	recvpool.vms_recvpool_key.desc.dsc$a_pointer = recvpool.vms_recvpool_key.name;
-	recvpool.vms_recvpool_key.desc.dsc$w_length = name_dsc.dsc$w_length;
-	recvpool.vms_recvpool_key.desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	recvpool.vms_recvpool_key.desc.dsc$b_class = DSC$K_CLASS_S;
-
-	/* Registering with the global section involves grabbing a lock on the recvpool global section
-	 * in the ConcurrentRead mode (CR). This lock will be used when deleting the recvpool (in signoff_from_gsec())
-	 * to make sure that nobody else is attached to the recvpool global section when detaching from it*/
-
-	if (SS$_NORMAL != (status = register_with_gsec(&recvpool.vms_recvpool_key.desc, &recvpool.shm_lockid)))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to get lock on recvpool"), status);
-
-	if (GTMRECV != pool_user || !gtmrecv_startup)
-	{	/* Global section should already exist */
-		if(SS$_NORMAL != (status = map_shm(RECV, &name_dsc, recvpool.shm_range)))
-		{
-			signoff_from_gsec(recvpool.shm_lockid);
-			rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-					RTS_ERROR_LITERAL("Receive pool does not exist"), status);
-		}
-		shm_created = FALSE;
-	} else
-	{
-		status = create_and_map_shm(RECV, &name_dsc, gtmrecv_options.buffsize, recvpool.shm_range);
-		if (SS$_CREATED == status)
-			shm_created = TRUE;
-		else if (SS$_NORMAL == status)
-			shm_created = FALSE;
-		else
-		{
-			signoff_from_gsec(recvpool.shm_lockid);
-			rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unalble to create or map to recvpool global section"), status);
-		}
-	}
-
-	recvpool_shmid = 1; /* A value > 0, as an indication of the existance of recvpool gsec */
-
-	/* Initialize receiver pool pointers to point to appropriate shared memory locations */
-        recvpool.recvpool_ctl = recvpool.shm_range[0];
-	if (shm_created)
-		recvpool.recvpool_ctl->initialized = FALSE;
-	recvpool.upd_proc_local = (upd_proc_local_ptr_t)((sm_uc_ptr_t)recvpool.recvpool_ctl   + RECVPOOL_CTL_SIZE);
-	recvpool.gtmrecv_local  = (gtmrecv_local_ptr_t)((sm_uc_ptr_t)recvpool.upd_proc_local + UPD_PROC_LOCAL_SIZE);
-	recvpool.upd_helper_ctl = (upd_helper_ctl_ptr_t)((sm_uc_ptr_t)recvpool.gtmrecv_local  + GTMRECV_LOCAL_SIZE);
-	recvpool.recvdata_base  = (sm_uc_ptr_t)recvpool.recvpool_ctl + RECVDATA_BASE_OFF;
-	if (GTMRECV == pool_user && gtmrecv_startup)
-		recvpool.recvpool_ctl->fresh_start = FALSE;
-	if (!recvpool.recvpool_ctl->initialized)
-	{
-		if (pool_user != GTMRECV || !gtmrecv_startup)
-			rts_error(VARLSTCNT(6) ERR_RECVPOOLSETUP, 0,
-					       ERR_TEXT, 2, RTS_ERROR_LITERAL("Receive pool has not been initialized"));
-
-		/* Initialize the shared memory fields */
-		QWASSIGNDW(recvpool.recvpool_ctl->start_jnl_seqno, 0);
-		recvpool.recvpool_ctl->recvdata_base_off = RECVDATA_BASE_OFF;
-		recvpool.recvpool_ctl->recvpool_size = gtmrecv_options.buffsize - recvpool.recvpool_ctl->recvdata_base_off;
-		recvpool.recvpool_ctl->write = 0;
-		recvpool.recvpool_ctl->write_wrap = recvpool.recvpool_ctl->recvpool_size;
-		strcpy(recvpool.recvpool_ctl->recvpool_id.repl_pool_key, name_dsc.dsc$a_pointer);
-		recvpool.recvpool_ctl->wrapped = FALSE;
-		strcpy(recvpool.recvpool_ctl->recvpool_id.gtmgbldir, trans_buff);
-		memcpy(recvpool.recvpool_ctl->recvpool_id.label, GDS_RPL_LABEL, GDS_LABEL_SZ);
-		memcpy(recvpool.recvpool_ctl->recvpool_id.now_running, gtm_release_name, gtm_release_name_len + 1);
-		assert(0 == (offsetof(recvpool_ctl_struct, start_jnl_seqno) % 8));
-			/* ensure that start_jnl_seqno starts at an 8 byte boundary */
-		assert(0 == offsetof(recvpool_ctl_struct, recvpool_id));
-			/* ensure that the pool identifier is at the top of the pool */
-		recvpool.recvpool_ctl->recvpool_id.pool_type = RECVPOOL_SEGMENT;
-		recvpool.upd_proc_local->upd_proc_shutdown = NO_SHUTDOWN;
-		recvpool.upd_proc_local->upd_proc_shutdown_time = -1;
-		recvpool.upd_proc_local->upd_proc_pid = 0;
-		recvpool.upd_proc_local->upd_proc_pid_prev = 0;
-		recvpool.upd_proc_local->updateresync = gtmrecv_options.updateresync;
-		recvpool.gtmrecv_local->recv_serv_pid = process_id;
-		recvpool.gtmrecv_local->lastrecvd_time = -1;
-		recvpool.gtmrecv_local->restart = GTMRECV_NO_RESTART;
-		recvpool.gtmrecv_local->statslog = FALSE;
-		recvpool.gtmrecv_local->shutdown = NO_SHUTDOWN;
-		recvpool.gtmrecv_local->shutdown_time = -1;
-		strcpy(recvpool.gtmrecv_local->filter_cmd, gtmrecv_options.filter_cmd);
-		recvpool.gtmrecv_local->statslog_file[0] = '\0';
-		memset(recvpool.upd_helper_ctl, 0, SIZEOF(*recvpool.upd_helper_ctl));
-		SET_LATCH_GLOBAL(&recvpool.upd_helper_ctl->pre_read_lock, LOCK_AVAILABLE);
-		recvpool.recvpool_ctl->initialized = TRUE;
-		recvpool.recvpool_ctl->fresh_start = TRUE;
-	}
-
-	/* If startup, lock out checkhealth and receiver startup */
-	if (GTMRECV == pool_user && lock_opt_sem && 0 != grab_sem(RECV, RECV_SERV_OPTIONS_SEM))
-		rts_error(VARLSTCNT(7) ERR_RECVPOOLSETUP, 0, ERR_TEXT, 2,
-			  RTS_ERROR_LITERAL("Error with receive pool options semaphore"), REPL_SEM_ERRNO);
-	/* Release receiver pool control lock out now that it is initialized */
-	rel_sem(RECV, RECV_POOL_ACCESS_SEM);
-	return;
-}
diff --git a/sr_vvms/reg_cmcheck.c b/sr_vvms/reg_cmcheck.c
deleted file mode 100644
index 072083b..0000000
--- a/sr_vvms/reg_cmcheck.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include <syidef.h>
-#include <rms.h>
-
-bool reg_cmcheck(gd_region *reg)
-{
-	struct FAB		fcb;
-	struct NAM		nam;
-	int4			status, iosb[2];
-	short			i, len;
-	char			node[16], nambuf[MAX_FN_LEN];
-	struct {short blen; short code; char *buf; short *len;} itm[2] = {{15, SYI$_NODENAME, &node, &len},{0, 0, 0, 0}};
-	error_def(ERR_DBOPNERR);
-
-	nam = cc$rms_nam;
-	nam.nam$l_esa = nambuf;
-	nam.nam$b_ess = SIZEOF(nambuf);
-	nam.nam$b_nop |= NAM$M_SYNCHK;
-	fcb = cc$rms_fab;
-	fcb.fab$l_fna = reg->dyn.addr->fname;
-	fcb.fab$b_fns = reg->dyn.addr->fname_len;
-	fcb.fab$l_dna = reg->dyn.addr->defext;
-	fcb.fab$b_dns = SIZEOF(reg->dyn.addr->defext);
-	fcb.fab$l_nam = &nam;
-	fcb.fab$w_deq = 0;
-	if ((status = sys$parse(&fcb, 0, 0)) != RMS$_NORMAL)
-		rts_error(VARLSTCNT(5) ERR_DBOPNERR, 2, fcb.fab$b_fns, fcb.fab$l_fna, status);
-	i = nam.nam$b_node ;
-	if (0 != i)
-	{
-		sys$getsyi(0, 0, 0, itm, iosb, 0, 0);
-		return ((i - 2) != len || 0 != memcmp(nam.nam$l_esa, node, len));
-	}
-	return FALSE;
-}
diff --git a/sr_vvms/rel_crit.c b/sr_vvms/rel_crit.c
deleted file mode 100644
index 77b5d9d..0000000
--- a/sr_vvms/rel_crit.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2008 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "ccpact.h"
-#include "filestruct.h"
-#include "have_crit.h"
-
-error_def(ERR_CRITRESET);
-error_def(ERR_DBCCERR);
-
-GBLREF	short			crash_count;
-GBLREF	volatile int4		crit_count;
-GBLREF	uint4			process_id;
-
-void	rel_crit(gd_region *reg)
-{
-	ccp_action_aux_value	msg;
-	sgmnt_addrs		*csa;
-	enum cdb_sc 		status;
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	if (csa->now_crit)
-	{
-		assert(0 == crit_count);
-		crit_count++;
-		assert(csa->nl->in_crit == process_id  ||  csa->nl->in_crit == 0);	/* : crit was held by this process */
-
-		/* [lidral] The next assert is commented out because it caused failures in the test suite, although it was
-		 * believed to be correct when added.  At the time it was added, no one knew what the comment about timeout
-		 * causing re-entry with in_crit cleared meant -- it has been left as a potential clue for future
-		 * investigation.
-		*/
-		/* Timeout can cause reentry with in_crit cleared */
-		/* assert(csa->hdr->clustered  ||  csa->nl->in_crit != 0); */	/* : in_crit can be clear only if clustered */
-
-		CRIT_TRACE(crit_ops_rw);		/* see gdsbt.h for comment on placement */
-
-		csa->nl->in_crit = 0;
-
-		if (csa->hdr->clustered  &&  csa->nl->ccp_crit_blocked)
-		{
-			/* For an explanation of the code dealing with clusters, see CCP_EXITWM_ATTEMPT.C.
-			   Please do not change this code without updating the comments in that file.	*/
-			msg.exreq.fid = FILE_INFO(reg)->file_id;
-			msg.exreq.cycle = csa->nl->ccp_cycle;
-			(void)ccp_sendmsg(CCTR_EXITWM, &msg);
-			(void)ccp_userwait(reg, CCST_MASK_WMXGNT | CCST_MASK_RDMODE, 0, msg.exreq.cycle);
-		}
-
-		if ((status = mutex_unlockw(csa->critical, crash_count, &csa->now_crit)) != cdb_sc_normal)
-		{
-			csa->now_crit = FALSE;
-			crit_count = 0;
-			if (status == cdb_sc_critreset)
-				rts_error(ERR_CRITRESET, 2, REG_LEN_STR(reg));
-			else
-			{
-				assert(status == cdb_sc_dbccerr);
-				rts_error(ERR_DBCCERR, 2, REG_LEN_STR(reg));
-			}
-			return;
-		}
-		crit_count = 0;
-	}
-	/* Now that crit for THIS region is released, check if deferred signal/exit handling can be done and if so do it */
-	DEFERRED_EXIT_HANDLING_CHECK;
-}
diff --git a/sr_vvms/rel_lock.c b/sr_vvms/rel_lock.c
deleted file mode 100644
index cbaaa2d..0000000
--- a/sr_vvms/rel_lock.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2008 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <signal.h>	/* for VSIG_ATOMIC_T type */
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "have_crit.h"
-
-error_def(ERR_CRITRESET);
-error_def(ERR_DBCCERR);
-
-GBLREF	volatile int4		crit_count;
-GBLREF	uint4			process_id;
-
-void	rel_lock(gd_region *reg)
-{
-	enum cdb_sc 	status;
-	sgmnt_addrs	*csa;
-
-	csa = &FILE_INFO(reg)->s_addrs;
-
-	if (csa->now_crit)
-	{
-		assert(0 == crit_count);
-		crit_count++;
-		assert(csa->nl->in_crit == process_id  ||  csa->nl->in_crit == 0); /* crit was held by this process */
-		CRIT_TRACE(crit_ops_rw);		/* see gdsbt.h for comment on placement */
-
-		csa->nl->in_crit = 0;
-
-		if ((status = mutex_unlockw(csa->critical, 0, &csa->now_crit)) != cdb_sc_normal)
-		{
-			csa->now_crit = FALSE;
-			crit_count = 0;
-			if (status == cdb_sc_critreset)
-				rts_error(ERR_CRITRESET, 2, REG_LEN_STR(reg));
-			else
-			{
-				assert(status == cdb_sc_dbccerr);
-				rts_error(ERR_DBCCERR, 2, REG_LEN_STR(reg));
-			}
-			return;
-		}
-		crit_count = 0;
-	}
-	/* Now that crit for THIS region is released, check if deferred signal/exit handling can be done and if so do it */
-	DEFERRED_EXIT_HANDLING_CHECK;
-}
diff --git a/sr_vvms/rel_quant.c b/sr_vvms/rel_quant.c
deleted file mode 100644
index f7356f6..0000000
--- a/sr_vvms/rel_quant.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "efn.h"
-#include "rel_quant.h"
-
-#define TINY_WAIT		(-5000)
-
-static void rel_quant_ast(void)
-{ /* Only purpose of this function is to provide a unique identifier for hiber_start timr driven while in an AST */
-	return;
-}
-
-void rel_quant(void)
-{
-	int4		pause[2];
-	int		status_timr, status_wait, ast_in_prog;
-	int4		event_flag;
-	gtm_int64_t	reqidt;
-
-	pause[0] = TINY_WAIT;
-	pause[1] = -1;
-	if (0 != (ast_in_prog = lib$ast_in_prog()))
-	{
-		reqidt = (gtm_int64_t)rel_quant_ast;
-		event_flag = efn_timer_ast;
-	} else
-	{
-		reqidt = (gtm_int64_t)rel_quant;
-		event_flag = efn_immed_wait;
-	}
-	status_timr = sys$setimr(event_flag, &pause, 0, reqidt, 0);
-	assert(SS$_NORMAL == status_timr);
-	if (SS$_NORMAL == status_timr)
-	{
-		status_wait = sys$waitfr(event_flag);
-		assert(SS$_NORMAL == status_wait);
-	}
-}
diff --git a/sr_vvms/relqueopi.mar b/sr_vvms/relqueopi.mar
deleted file mode 100644
index 5d9e5e4..0000000
--- a/sr_vvms/relqueopi.mar
+++ /dev/null
@@ -1,195 +0,0 @@
-	.title	relqueopi	C-callable relative queue interlocked routines
-
-;	These routines perform interlocked operations on doubly-linked
-;	relative queues.  They are designed to emulate the VAX machine
-;	instructions (and corresponding VAX C library routines) after
-;	which they are named.
-;
-;	insqhi - insert entry into queue at head, interlocked
-;	insqti - insert entry into queue at tail, interlocked
-;	remqhi - remove entry from queue at head, interlocked
-;	remqti - remove entry from queue at tail, interlocked
-
-
-QI_STARVATION	=	1000	; for (lcnt = 0; lcnt < QI_STARVATION; lcnt++) wcs_sleep(lcnt) implies 1.5 minute wait
-QI_RETRY	=	128	; times to retry in a spin loop before going to sleep
-
-; the code below should use wcs_backoff() instead of wcs_sleep() to give a random component for the wait
-; at the same time ensuring we wait for a minimum period of time (say 1 minute). note that if we use wcs_backoff()
-; it is possible (though statistically improbable) that we end up waiting for less than a second even with a loopcnt of 1000.
-
-	code_psect
-
-
-; vax_insqhi - insert entry into self-relative queue at head, interlocked
-;
-;	calling sequence:
-;
-;	typedef struct
-;	{
-;		long flink,blink;
-;	} self_rel_que;
-;
-;	self_rel_que *insqhi (queheader)
-;	self_rel_que *queheader;
-;
-;	return:
-;		if  1, success; the entry is the only entry in the queue
-;		if  0, success; the entry is not the only entry in the queue
-;
-;		if -1, failure; the secondary interlock failed, the instruction may
-;			be retried, but should declare a GTMCHECK if the secondary
-;			interlock fails repeatedly
-;
-
-
-	.entry	vax_insqhi,^m<r2,r3>
-
-	clrl	r0
-	movl	#QI_STARVATION,r2
-3$:	movl	#QI_RETRY,r1
-5$:	insqhi	@4(ap), at 8(ap)
-	bcs	20$
-	bneq	10$
-	incl	r0
-10$:	ret
-
-20$:	sobgtr	r1,5$
-	subl3	r2,#QI_STARVATION+1,r3
-	pushl	r3
-	calls	#1,G^wcs_sleep
-	clrl	r0	; we rely on r0 in the 5$: loop so reset it in case wcs_sleep trashed it
-	sobgtr	r2,3$
-	decl	r0
-	ret
-
-
-; vax_insqti - insert entry into self-relative queue at tail, interlocked
-;
-;	calling sequence:
-;
-;	typedef struct
-;	{
-;		long flink,blink;
-;	} self_rel_que;
-;
-;	self_rel_que *insqti (queheader)
-;	self_rel_que *queheader;
-;
-;	return:
-;		if  1, success; the entry is the only entry in the queue
-;		if  0, sucesss; the entry is not the only entry in the queue
-;
-;		if -1, failure; the secondary interlock failed, the instruction may
-;			be retried, but should declare a GTMCHECK if the secondary
-;			interlock fails repeatedly
-;
-
-	.entry	vax_insqti,^m<r2,r3>
-
-	clrl	r0
-	movl	#QI_STARVATION,r2
-3$:	movl	#QI_RETRY,r1
-5$:	insqti	@4(ap), at 8(ap)
-	bcs	20$
-	bneq	10$
-	incl	r0
-10$:	ret
-
-20$:	sobgtr	r1,5$
-	subl3	r2,#QI_STARVATION+1,r3
-	pushl	r3
-	calls	#1,G^wcs_sleep
-	clrl	r0	; we rely on r0 in the 5$: loop so reset it in case wcs_sleep trashed it
-	sobgtr	r2,3$
-	decl	r0
-	ret
-
-
-; vax_remqhi - remove entry from self-relative queue at head, interlocked
-;
-;	calling sequence:
-;
-;	typedef struct
-;	{
-;		long flink,blink;
-;	} self_rel_que;
-;
-;	self_rel_que *remqhi (queheader)
-;	self_rel_que *queheader;
-;
-;	return:
-;		if non-zero, success; a pointer to the queue entry which was removed
-;
-;		if zero, then the queue was empty (operation succeeded, but nothing
-;				was in the queue to remove)
-;
-;		if -1, failure; the secondary interlock failed, the instruction may
-;			be retried, but should declare a GTMCHECK if the secondary
-;			interlock fails repeatedly
-;
-
-
-	.entry	vax_remqhi,^m<r2,r3>
-
-	movl	#QI_STARVATION,r2
-3$:	movl	#QI_RETRY,r1
-5$:	remqhi	@4(ap),r0
-	bcs	20$
-	bvc	10$
-	clrl	r0
-10$:	ret
-
-20$:	sobgtr	r1,5$
-	subl3	r2,#QI_STARVATION+1,r3
-	pushl	r3
-	calls	#1,G^wcs_sleep
-	sobgtr	r2,3$
-	mnegl	#1,r0
-	ret
-
-
-; vax_remqti - remove entry from self-relative queue at tail, interlocked
-;
-;	calling sequence:
-;
-;	typedef struct
-;	{
-;		long flink,blink;
-;	} self_rel_que;
-;
-;	self_rel_que *remqti (queheader)
-;	self_rel_que *queheader;
-;
-;	return:
-;		if non-zero, success; a pointer to the queue entry which was removed
-;
-;		if zero, then the queue was empty (operation succeeded, but nothing
-;				was in the queue to remove)
-;
-;		if -1, failure; the secondary interlock failed, the instruction may
-;			be retried, but should declare a GTMCHECK if the secondary
-;			interlock fails repeatedly
-;
-
-
-	.entry	vax_remqti,^m<r2,r3>
-
-	movl	#QI_STARVATION,r2
-3$:	movl	#QI_RETRY,r1
-5$:	remqti	@4(ap),r0
-	bcs	20$
-	bvc	10$
-	clrl	r0
-10$:	ret
-
-20$:	sobgtr	r1,5$
-	subl3	r2,#QI_STARVATION+1,r3
-	pushl	r3
-	calls	#1,G^wcs_sleep
-	sobgtr	r2,3$
-	mnegl	#1,r0
-	ret
-
-	.end
-
diff --git a/sr_vvms/remove_rms.c b/sr_vvms/remove_rms.c
deleted file mode 100644
index 441d846..0000000
--- a/sr_vvms/remove_rms.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include <rab.h>
-#include <nam.h>
-#include "io.h"
-#include "iormdef.h"
-
-GBLREF	io_log_name	*io_root_log_name;
-
-void remove_rms ( io_desc *ciod)
-{
-	io_log_name	**lpp, *lp;	/* logical name pointers */
-	d_rm_struct     *rm_ptr;
-
-	assert (ciod->type == rm);
-	assert (ciod->state == dev_closed || ciod->state == dev_never_opened);
-	rm_ptr = (d_rm_struct *) ciod->dev_sp;
-	for (lpp = &io_root_log_name, lp = *lpp; lp; lp = *lpp)
-	{
-		if (lp->iod->pair.in == ciod)
-		{
-			assert (lp->iod == ciod);
-			*lpp = (*lpp)->next;
-			free (lp);
-		}
-		else
-			lpp = &lp->next;
-	}
-	assert (rm_ptr->inbuf);
-	assert (rm_ptr->outbuf_start);
-	if (rm_ptr->f.fab$l_nam)
-		free(rm_ptr->f.fab$l_nam);
-	free (rm_ptr->outbuf_start);
-	free (rm_ptr->inbuf);
-	free (rm_ptr);
-	free (ciod);
-}
diff --git a/sr_vvms/repl_create_server.c b/sr_vvms/repl_create_server.c
deleted file mode 100644
index 2b8d9c7..0000000
--- a/sr_vvms/repl_create_server.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <prtdef.h>
-#include <prcdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-#include <iodef.h>
-#include <prvdef.h>
-#include <lnmdef.h>
-#include <rms.h>
-#include <efndef.h>
-
-#include "gtm_string.h"
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_logicals.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "iosp.h"
-#include "vmsdtype.h"
-#include "repl_shutdcode.h"
-#include "repl_sp.h"
-#include "cli.h"
-#include "io.h"
-#include "job.h"
-#include "gtmmsg.h"
-#include "trans_log_name.h"
-
-#define MAX_MSG			1024
-#define MAX_TRIES		50
-#define MAX_PATH_LEN		255
-#define MAX_MBX_NAME_LEN	255
-#define SHORT_WAIT		10
-#define TRY(X)			if (SS$_NORMAL != (status = X)) { sys$dassgn(*cmd_channel); return status; }
-
-int4 repl_mbx_wr(uint4 channel, sm_uc_ptr_t msg, int len, uint4 err_code)
-{
-	int4		status;
-	unsigned short	mbsb[4];
-
-	error_def(ERR_TEXT);
-
-	/* Qio's should be used with care, We should use qiow or wait properly to ensure that
-		qio finished properly ( any arguments must not be on the stack before returning
-		from the routine which issues qio) checking the iosb status block. */
-
-	status = sys$qiow(EFN$C_ENF, channel, IO$_WRITEVBLK | IO$M_NOW, &mbsb[0], 0, 0, msg, len, 0, 0, 0, 0);
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(11) err_code, 0,
-					ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to write to send-cmd mailbox the message, "),
-					ERR_TEXT, 2, len, msg, status);
-	}
-	return status;
-}
-
-int4 repl_trnlnm(struct dsc$descriptor_s *d_tbl_srch_list, struct dsc$descriptor_s *d_logical,
-		 struct dsc$descriptor_s *d_expanded, struct dsc$descriptor_s *d_foundin_tbl)
-{
-	struct
-	{
-		item_list_3	le[2];
-		int4		terminator;
-	} item_list;
-	uint4 attr = LNM$M_CASE_BLIND;
-
-	item_list.le[0].buffer_length		= LEN_OF_DSC(*d_expanded);
-	item_list.le[0].item_code		= LNM$_STRING;
-	item_list.le[0].buffer_address		= STR_OF_DSC(*d_expanded);
-	item_list.le[0].return_length_address	= &(LEN_OF_DSC(*d_expanded));
-	item_list.le[1].buffer_length		= LEN_OF_DSC(*d_foundin_tbl);
-	item_list.le[1].item_code		= LNM$_TABLE;
-	item_list.le[1].buffer_address		= STR_OF_DSC(*d_foundin_tbl);
-	item_list.le[1].return_length_address	= &(LEN_OF_DSC(*d_foundin_tbl));
-	item_list.terminator			= 0;
-	return (sys$trnlnm(&attr, d_tbl_srch_list, d_logical, 0, &item_list));
-}
-
-int4 get_mbx_devname(struct dsc$descriptor_s *d_cmd_mbox, struct dsc$descriptor_s *d_cmd_dev)
-{
-	$DESCRIPTOR	(d_lnmtab, "LNM$TEMPORARY_MAILBOX");
-	struct
-	{
-		item_list_3	le[1];
-		int4		terminator;
-	} item_list;
-
-	item_list.le[0].buffer_length		= d_cmd_dev->dsc$w_length;
-	item_list.le[0].item_code		= LNM$_STRING;
-	item_list.le[0].buffer_address		= d_cmd_dev->dsc$a_pointer;
-	item_list.le[0].return_length_address	= &(d_cmd_dev->dsc$w_length);
-	item_list.terminator			= 0;
-	return (sys$trnlnm(0, &d_lnmtab, d_cmd_mbox, 0, &item_list));
-}
-
-int4 repl_create_server(struct dsc$descriptor_s *d_cmd, char *mbx_prefix, char *mbx_suffix, uint4 *cmd_channel, uint4 *server_pid,
-			uint4 err_code)
-{
-	int		cnt, i;
-	int4		status;
-	char		gbldir_path[MAX_PATH_LEN], gbldir_tbl[MAX_PATH_LEN], secshr_path[MAX_PATH_LEN], secshr_tbl[MAX_PATH_LEN];
-	char		cmdmbox_devname[MAX_PATH_LEN], def_dir[MAX_PATH_LEN];
-	char		creprc_log[MAX_PATH_LEN], creprc_log_exp[MAX_PATH_LEN];
-	char		startup_cmd[MAX_PATH_LEN+1];
-	char		cmdmbx_name[MAX_MBX_NAME_LEN + 1], trans_buff[MAX_FN_LEN];
-	char		proc_name[PROC_NAME_MAXLEN + 1];
-	mstr		image, log_nam, trans_log_nam;
-	unsigned short	length;
-	gds_file_id	file_id;
-
-	static char		startup_file[MAX_PATH_LEN];
-	static boolean_t	first_time = TRUE;
-
-	$DESCRIPTOR(d_null_str, "");
-	$DESCRIPTOR(d_loginout_image,"SYS$SYSTEM:LOGINOUT.EXE");
-	$DESCRIPTOR(d_null_dev, "NL:");
-	$DESCRIPTOR(d_secshr_logical, "GTMSECSHR");
-	$DESCRIPTOR(d_gbldir_logical, "GTM$GBLDIR");
-	$DESCRIPTOR(d_tbl_srch_list, "LNM$FILE_DEV");
-	$DESCRIPTOR(d_startup_qualifier, "STARTUP_FILE");
-	$DESCRIPTOR(d_cmd_dev, cmdmbox_devname);
-	$DESCRIPTOR(d_out_dev, creprc_log);
-	$DESCRIPTOR(d_out_dev_exp, creprc_log_exp);
-	$DESCRIPTOR(d_def_dir, def_dir);
-	$DESCRIPTOR(d_secshr, secshr_path);
-	$DESCRIPTOR(d_gbldir, gbldir_path);
-	$DESCRIPTOR(d_secshr_tbl, secshr_tbl);
-	$DESCRIPTOR(d_gbldir_tbl, gbldir_tbl);
-	$DESCRIPTOR(d_cmd_mbox, cmdmbx_name);
-	$DESCRIPTOR(d_proc_name, proc_name);
-	$DESCRIPTOR(d_startup_file, startup_file);
-	$DESCRIPTOR(d_startup_cmd, startup_cmd);
-
-	error_def(ERR_TEXT);
-	error_def(ERR_MULOGNAMEDEF);
-	error_def(ERR_MUNOACTION);
-
-	/* Generate a unique name for the cmd_mbx using global_name(gbldir) and mbx_prefix*/
-	log_nam.addr = GTM_GBLDIR;
-	log_nam.len = SIZEOF(GTM_GBLDIR) - 1;
-	if (SS_NORMAL != (status = trans_log_name(&log_nam, &trans_log_nam, trans_buff)))
-	{
-		gtm_putmsg(VARLSTCNT(6) err_code, 0, ERR_TEXT, 2, RTS_ERROR_LITERAL("gtm$gbldir not defined"));
-		return status;
-	}
-	set_gdid_from_file((gd_id_ptr_t)&file_id, trans_buff, trans_log_nam.len);
-	global_name(mbx_prefix, &file_id, cmdmbx_name);
-	STR_OF_DSC(d_cmd_mbox)++;
-        LEN_OF_DSC(d_cmd_mbox) = cmdmbx_name[0]; /* global_name() returns the length in the first byte */
-	assert(SIZEOF(cmdmbx_name) > LEN_OF_DSC(d_cmd_mbox) + strlen(mbx_suffix));
-	DSC_APND_STR(d_cmd_mbox, mbx_suffix);
-	/* Prepare for the startup commands */
-	if (RMS$_NORMAL != (status = parse_filename(&d_null_str, &d_def_dir, 0)))
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to get value of default directory"), status);
-		return status;
-	}
-	DSC_CPY(d_out_dev, d_def_dir);
-	DSC_APND_LIT(d_out_dev, "loginout_");
-	STR_OF_DSC(d_out_dev)[LEN_OF_DSC(d_out_dev)++] = STR_OF_DSC(d_cmd_mbox)[3];
-	DSC_APND_LIT(d_out_dev, ".log");
-	if ('\0' != mbx_suffix[0])
-	{
-		DSC_APND_LIT(d_out_dev, "_");
-		DSC_APND_STR(d_out_dev, mbx_suffix);
-	}
-	if (RMS$_NORMAL != (status = parse_filename(&d_out_dev, &d_out_dev_exp, 1)))
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to expand creprc_logfile"), status);
-		return status;
-	}
-	/* Create a mailbox to send commands to the detached 'loginout' process to start the server */
-	/* Before creating the mailbox, check to see that the mail box's logical is not already defined.
-	 * This is to take care of the cases where the previous incarnation of the server is just in the
-	 * shutdown logic and the current server (which is just being brought up) gets to read from that
-	 * server's mailbox (which contains just an 'exit' command). So, the current server fails to come up.
-	 * As a side affect, this message also appears when a server is attempted to be started while
-	 * another is already running from the same terminal.
-	 */
-	if (SS$_NORMAL ==  get_mbx_devname(&d_cmd_mbox, &d_cmd_dev))
-	{
-		gtm_putmsg(VARLSTCNT(6) err_code, 0, ERR_MULOGNAMEDEF, 2, LEN_STR_OF_DSC(d_cmd_mbox));
-		return ERR_MUNOACTION;
-	}
-	status = sys$crembx(0, cmd_channel, MAX_MSG, MAX_MSG, 0, PSL$C_USER, &d_cmd_mbox);
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to create send-command mailbox"), status);
-		return status;
-	}
-	/* Get the name of the send-command mailbox, which is needed for creprc() */
-	for (cnt = 0; SS$_NORMAL != (status = get_mbx_devname(&d_cmd_mbox, &d_cmd_dev)) && (MAX_TRIES > cnt); cnt++)
-	{
-		SHORT_SLEEP(SHORT_WAIT);
-	}
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to get dev-name of send-command mailbox"), status);
-		sys$dassgn(*cmd_channel);
-		return status;
-	}
-	/* Construct process name */
-	LEN_OF_DSC(d_proc_name) = (int) get_proc_name(STR_AND_LEN(mbx_prefix), getpid(), proc_name);
-	/* Create the server as a detached process */
-	status = sys$creprc(    server_pid,		/* process id */
-				&d_loginout_image,	/* image */
-				&d_cmd_dev,		/* input SYS$INPUT device */
-				&d_out_dev_exp,		/* output SYS$OUTPUT device*/
-				&d_out_dev_exp,		/* error SYS$ERROR device*/
-				0, 0,
-				&d_proc_name,		/* process name */
-				0, 0, 0, PRC$M_DETACH | PRC$M_IMGDMP);
-	if (SS$_NORMAL != status)
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to create detached server"), status);
-		sys$dassgn(*cmd_channel);
-		return status;
-	}
-	ojdefimage(&image);
-	if (SS$_NORMAL != (status = repl_trnlnm(&d_tbl_srch_list, &d_secshr_logical, &d_secshr, &d_secshr_tbl)))
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to translate GTMSECSHR logical"), status);
-		sys$dassgn(*cmd_channel);
-		return status;
-	}
-	if (SS$_NORMAL != (status = repl_trnlnm(&d_tbl_srch_list, &d_gbldir_logical, &d_gbldir, &d_gbldir_tbl)))
-	{
-		gtm_putmsg(VARLSTCNT(7) err_code, 0,
-				ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to translate GTM$GBLDIR logical"), status);
-		sys$dassgn(*cmd_channel);
-		return status;
-	}
-	if (CLI_PRESENT == cli_present("STARTUP_FILE"))
-	{
-		if (first_time && SS$_NORMAL != (status = cli$get_value(&d_startup_qualifier, &d_startup_file, &length)))
-		{
-			gtm_putmsg(VARLSTCNT(7) err_code, 0,
-					ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to get value of /STARTUP_FILE qualifier"), status);
-			sys$dassgn(*cmd_channel);
-			return status;
-		}
-		first_time = FALSE;
-		STR_OF_DSC(d_startup_cmd)[0] = '@';
-		LEN_OF_DSC(d_startup_cmd) = 1;
-		DSC_APND_DSC(d_startup_cmd, d_startup_file);
-		TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(d_startup_cmd), err_code));
-	}
-	/* Write the mupip command (constructed earlier) to start the server into the send-command mailbox */
-	TRY(repl_mbx_wr(*cmd_channel, LIT_AND_LEN("set default -"), err_code));
-	TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(d_def_dir), err_code));
-	if ((0 != memcmp(STR_OF_DSC(d_secshr_tbl), LIT_AND_LEN("LNM$GROUP"))) &&
-	    (0 != memcmp(STR_OF_DSC(d_secshr_tbl), LIT_AND_LEN("LNM$SYSTEM_TABLE"))))
-	{
-		if (0 == memcmp(STR_OF_DSC(d_secshr_tbl), LIT_AND_LEN("LNM$JOB")))	/* chop the job specific suffix */
-			LEN_OF_DSC(d_secshr_tbl) = SIZEOF("LNM$JOB") - 1;
-		TRY(repl_mbx_wr(*cmd_channel, LIT_AND_LEN("define gtmsecshr /table= -"), err_code));
-		STR_OF_DSC(d_secshr_tbl)[LEN_OF_DSC(d_secshr_tbl)] = ' ';
-		STR_OF_DSC(d_secshr_tbl)[LEN_OF_DSC(d_secshr_tbl) +1 ] = '-';
-		LEN_OF_DSC(d_secshr_tbl) += 2;
-		TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(d_secshr_tbl), err_code));
-		TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(d_secshr), err_code));
-	}
-	if ((0 != memcmp(STR_OF_DSC(d_gbldir_tbl), LIT_AND_LEN("LNM$GROUP"))) &&
-	    (0 != memcmp(STR_OF_DSC(d_gbldir_tbl), LIT_AND_LEN("LNM$SYSTEM_TABLE"))))
-	{
-		if (0 == memcmp(STR_OF_DSC(d_gbldir_tbl), LIT_AND_LEN("LNM$JOB")))	/* chop the job specific suffix */
-			LEN_OF_DSC(d_gbldir_tbl) = SIZEOF("LNM$JOB") - 1;
-		TRY(repl_mbx_wr(*cmd_channel, LIT_AND_LEN("define gtm$gbldir /table= -"), err_code));
-		STR_OF_DSC(d_gbldir_tbl)[LEN_OF_DSC(d_gbldir_tbl)] = ' ';
-		STR_OF_DSC(d_gbldir_tbl)[LEN_OF_DSC(d_gbldir_tbl) +1 ] = '-';
-		LEN_OF_DSC(d_gbldir_tbl) += 2;
-		TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(d_gbldir_tbl), err_code));
-		TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(d_gbldir), err_code));
-	}
-	TRY(repl_mbx_wr(*cmd_channel, LIT_AND_LEN("run -"), err_code));
-	TRY(repl_mbx_wr(*cmd_channel, image.addr, image.len, err_code));
-	TRY(repl_mbx_wr(*cmd_channel, STR_LEN_OF_DSC(*d_cmd), err_code));
-	TRY(repl_mbx_wr(*cmd_channel, LIT_AND_LEN("exit"), err_code));
-	return status;
-}
diff --git a/sr_vvms/repl_fork_rcvr_server.c b/sr_vvms/repl_fork_rcvr_server.c
deleted file mode 100644
index 5ed08bc..0000000
--- a/sr_vvms/repl_fork_rcvr_server.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005, 2009 Fidelity Information Services, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_string.h"
-#include <ssdef.h>
-#include <descrip.h>
-
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "repl_sp.h"
-#include "gdsfhead.h"
-#include "gtmrecv.h"
-#include "cli.h"
-
-error_def(ERR_JNLPOOLSETUP);
-error_def(ERR_RECVPOOLSETUP);
-
-
-GBLREF gtmrecv_options_t	gtmrecv_options;
-
-int repl_fork_rcvr_server(uint4 *pid, uint4 *cmd_channel)
-{
-	int		status, retval=0;
-	char		cmd_str[MAX_COMMAND_LINE_LENGTH];
-	uint4		flags, channel;
-	unsigned short	cmd_len, mbsb[4];
-	uint4		buff, server_pid, clus_flags_stat;
-	mstr		log_nam, trans_log_nam;
-	gds_file_id	file_id;
-	unsigned short	log_file_len;
-	int		exp_log_file_name_len, len;
-	char		*ptr, qwstring[100];
-
-	$DESCRIPTOR(cmd_desc, cmd_str);
-
-	/* Get the cmd line */
-	if (((status = lib$get_foreign(&cmd_desc, 0, &cmd_len)) & 1) == 0)
-		return status;
-	if (0 == cmd_len)
-	{ /* Command issued on the MUPIP command line, we have to build the argument string to pass to child */
-		MEMCPY_LIT(&cmd_str[cmd_len], RECV_PROMPT_START_QUAL);
-		cmd_len += SIZEOF(RECV_PROMPT_START_QUAL) - 1;
-		if (CLI_PRESENT == cli_present("BUFFSIZE"))
-		{
-			MEMCPY_LIT(&cmd_str[cmd_len], BUFF_QUAL);
-			cmd_len += SIZEOF(BUFF_QUAL) - 1;
-			ptr = i2asc(qwstring, gtmrecv_options.buffsize);
-			memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-			cmd_len += ptr - qwstring;
-		}
-		if (CLI_PRESENT == cli_present("FILTER"))
-		{
-			MEMCPY_LIT(&cmd_str[cmd_len], FILTER_QUAL);
-			cmd_len += SIZEOF(FILTER_QUAL) - 1;
-			len = strlen(gtmrecv_options.filter_cmd);
-			memcpy(&cmd_str[cmd_len], gtmrecv_options.filter_cmd, len);
-			cmd_len += len;
-		}
-		if (CLI_PRESENT == cli_present("LOG"))
-		{
-			MEMCPY_LIT(&cmd_str[cmd_len], LOG_QUAL);
-			cmd_len += SIZEOF(LOG_QUAL) - 1;
-			len = strlen(gtmrecv_options.log_file);
-			memcpy(&cmd_str[cmd_len], gtmrecv_options.log_file, len);
-			cmd_len += len;
-		}
-		if (CLI_PRESENT == cli_present("LOG_INTERVAL"))
-		{
-			MEMCPY_LIT(&cmd_str[cmd_len], LOGINTERVAL_QUAL);
-			cmd_len += SIZEOF(LOGINTERVAL_QUAL) - 1;
-			cmd_str[cmd_len++] = '"'; /* begin quote */
-			ptr = i2asc(qwstring, gtmrecv_options.rcvr_log_interval);
-			memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-			cmd_len += ptr - qwstring;
-			cmd_str[cmd_len++] = ','; /* delimiter */
-			ptr = i2asc(qwstring, gtmrecv_options.upd_log_interval);
-			memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-			cmd_len += ptr - qwstring;
-			cmd_str[cmd_len++] = '"'; /* end quote */
-		}
-		if (CLI_PRESENT == cli_present("LISTENPORT"))
-		{
-			MEMCPY_LIT(&cmd_str[cmd_len], LISTENPORT_QUAL);
-			cmd_len += SIZEOF(LISTENPORT_QUAL) - 1;
-			ptr = i2asc(qwstring, gtmrecv_options.listen_port);
-			memcpy(&cmd_str[cmd_len], qwstring, ptr - qwstring);
-			cmd_len += ptr - qwstring;
-		}
-	}
-
-	/* Append a dummy qualifier */
-	MEMCPY_LIT(&cmd_str[cmd_len], DUMMY_START_QUAL);
-	cmd_desc.dsc$w_length = cmd_len + SIZEOF(DUMMY_START_QUAL) - 1;
-	/* Create detached server and write startup commands to it */
-	return repl_create_server(&cmd_desc, "GTMR", "", cmd_channel, pid, ERR_RECVPOOLSETUP);
-}
diff --git a/sr_vvms/repl_ipc_cleanup.c b/sr_vvms/repl_ipc_cleanup.c
deleted file mode 100644
index be03508..0000000
--- a/sr_vvms/repl_ipc_cleanup.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_inet.h" /* Required for gtmsource.h */
-
-#include <ssdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <descrip.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmrecv.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "repl_shutdcode.h"
-#include "repl_sem.h"
-#include "repl_shm.h"
-#include "repl_log.h"
-
-GBLREF jnlpool_addrs 		jnlpool;
-GBLREF boolean_t	        pool_init;
-GBLREF jnlpool_ctl_ptr_t	jnlpool_ctl;
-GBLREF int4			jnlpool_shmid;
-GBLREF recvpool_addrs	        recvpool;
-GBLREF int		        recvpool_shmid;
-GBLREF int		        gtmsource_srv_count;
-GBLREF int		        gtmrecv_srv_count;
-
-int	gtmsource_ipc_cleanup(boolean_t auto_shutdown, int *exit_status)
-{
-	int		status, detach_status, remove_status;
-	boolean_t	attempt_ipc_cleanup;
-	int4		shm_lockid;
-
-	attempt_ipc_cleanup = TRUE; /* attempt cleaning up the IPCs */
-	/* Wait for the Source Server to detach and takeover the semaphore */
-	if (!auto_shutdown && 0 > grab_sem(SOURCE, SRC_SERV_COUNT_SEM))
-	{
-		repl_log(stderr, FALSE, TRUE, "Error taking control of source server count semaphore : %s. Shutdown not complete\n",
-														REPL_SEM_ERROR);
-		*exit_status = ABNORMAL_SHUTDOWN;
-		attempt_ipc_cleanup = FALSE;
-	}
-	/* Now we have locked out all users from the journal pool and no process can initiate any other action.
-	 * Save the lock-id in a local variable because the structure holding it ("jnlpool") is memset to 0 below */
-	shm_lockid = jnlpool.shm_lockid;
-	if (SS$_NORMAL != (status = lastuser_of_gsec(shm_lockid)))
-	{
-		repl_log(stderr, FALSE, TRUE,
-				"Not deleting jnlpool global section as other processes are still attached to it : %s\n",
-				REPL_STR_ERROR);
-		attempt_ipc_cleanup = FALSE;
-		*exit_status = ABNORMAL_SHUTDOWN;
-	}
-	if (attempt_ipc_cleanup)
-	{
-		if ((0 < jnlpool_shmid) && (auto_shutdown || SS$_NORMAL == (detach_status = detach_shm(jnlpool.shm_range)))
-					&& SS$_NORMAL == (remove_status = delete_shm(&jnlpool.vms_jnlpool_key.desc)))
-		{
-			memset((uchar_ptr_t)&jnlpool, 0, SIZEOF(jnlpool)); /* For gtmsource_exit */
-			jnlpool.jnlpool_ctl = NULL;
-			jnlpool_ctl = NULL;
-			jnlpool_shmid = 0;
-			pool_init = FALSE;
-			repl_log(stdout, FALSE, FALSE, "Journal pool shared memory removed\n");
-			if (0 == remove_sem_set(SOURCE))
-				repl_log(stdout, FALSE, TRUE, "Journal pool semaphore removed\n");
-			else
-			{
-				repl_log(stderr, FALSE, TRUE, "Error removing jnlpool semaphore : %s\n", REPL_SEM_ERROR);
-				*exit_status = ABNORMAL_SHUTDOWN;
-			}
-		} else if (0 < jnlpool_shmid)
-		{
-			if (!auto_shutdown && SS$_NORMAL != detach_status)
-				repl_log(stderr, TRUE, TRUE, "Error detaching from jnlpool : %s\n", REPL_STR_ERROR1(detach_status));
-			else if (SS$_NORMAL != remove_status)
-			{
-				if (!auto_shutdown)
-				{
-					jnlpool.jnlpool_ctl = NULL; /* Detached successfully */
-					jnlpool_ctl = NULL;
-					pool_init = FALSE;
-				}
-				repl_log(stderr, FALSE, TRUE, "Error removing jnlpool shared memory : %s\n",
-												REPL_STR_ERROR1(remove_status));
-			}
-			*exit_status = ABNORMAL_SHUTDOWN;
-		}
-		if (SS$_NORMAL != (status = signoff_from_gsec(shm_lockid)))
-			repl_log(stderr, TRUE, TRUE, "Error dequeueing lock on jnlpool global section : %s\n", REPL_STR_ERROR);
-	}
-	return attempt_ipc_cleanup;
-}
-
-int	gtmrecv_ipc_cleanup(boolean_t auto_shutdown, int *exit_status)
-{
-	int		status, detach_status, remove_status;
-	boolean_t	attempt_ipc_cleanup;
-	int4		shm_lockid;
-
-	attempt_ipc_cleanup = TRUE; /* attempt cleaning up the IPCs */
-	/* Wait for the Receiver Server and Update Process to detach and takeover the semaphores.
-	 * Note that the Receiver Server has already waited for the Update Process to detach.
-	 * It is done here as a precaution against Receiver Server crashes.
-	 */
-	if (!auto_shutdown)
-		status = grab_sem(RECV, RECV_SERV_COUNT_SEM);
-	else
-		status = 0;
-	if (0 == status && 0 > (status = grab_sem(RECV, UPD_PROC_COUNT_SEM)))
-		rel_sem(RECV, RECV_SERV_COUNT_SEM);
-	if (status < 0)
-	{
-		repl_log(stderr, FALSE, TRUE,
-			 "Error taking control of Receiver Server/Update Process count semaphore : "
-			 "%s. Shutdown not complete\n", REPL_SEM_ERROR);
-		*exit_status = ABNORMAL_SHUTDOWN;
-		attempt_ipc_cleanup = FALSE;
-	}
-	/* Now we have locked out all users from the receive pool and no process can initiate any other action.
-	 * Save the lock-id in a local variable because the structure holding it ("jnlpool") is memset to 0 below */
-	shm_lockid = recvpool.shm_lockid;
-	if ((!auto_shutdown || gtmrecv_srv_count) && SS$_NORMAL != (status = lastuser_of_gsec(shm_lockid)))
-	{
-		repl_log(stderr, FALSE, TRUE,
-				"Not deleting recvpool global section as other processes are still attached to it : "
-				"%s\n", REPL_STR_ERROR);
-		attempt_ipc_cleanup = FALSE;
-		*exit_status = ABNORMAL_SHUTDOWN;
-	}
-	if (attempt_ipc_cleanup)
-	{
-		if ((0 < recvpool_shmid) && (auto_shutdown || SS$_NORMAL == (detach_status = detach_shm(recvpool.shm_range)))
-					&& SS$_NORMAL == (remove_status = delete_shm(&recvpool.vms_recvpool_key.desc)))
-		{
-			memset((uchar_ptr_t)&recvpool, 0, SIZEOF(recvpool)); /* For gtmrecv_exit */
-			recvpool.recvpool_ctl = NULL;
-			recvpool_shmid = 0;
-			repl_log(stdout, FALSE, FALSE, "Recv pool shared memory removed\n");
-			if (0 == remove_sem_set(RECV))
-				repl_log(stdout, FALSE, TRUE, "Recv pool semaphore removed\n");
-			else
-			{
-				repl_log(stderr, FALSE, TRUE, "Error removing recvpool semaphore : %s\n", REPL_SEM_ERROR);
-				*exit_status = ABNORMAL_SHUTDOWN;
-			}
-		} else if (0 < recvpool_shmid)
-		{
-			if (!auto_shutdown && SS$_NORMAL != detach_status)
-				repl_log(stderr, TRUE, TRUE,
-						"Error detaching from recvpool : %s\n", REPL_STR_ERROR1(detach_status));
-			else if (SS$_NORMAL != remove_status)
-			{
-				if (!auto_shutdown)
-					recvpool.recvpool_ctl = NULL; /* Detached successfully */
-				repl_log(stderr, FALSE, TRUE, "Error removing recvpool shared memory : %s\n",
-												REPL_STR_ERROR1(remove_status));
-			}
-			*exit_status = ABNORMAL_SHUTDOWN;
-		}
-	}
-	if (SS$_NORMAL != (status = signoff_from_gsec(shm_lockid)))
-		repl_log(stderr, TRUE, TRUE, "Error dequeueing lock on recvpool global section : %s\n", REPL_STR_ERROR);
-	return attempt_ipc_cleanup;
-}
diff --git a/sr_vvms/repl_log.c b/sr_vvms/repl_log.c
deleted file mode 100644
index 8c97eb7..0000000
--- a/sr_vvms/repl_log.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <stdarg.h>
-#include "gtm_string.h"
-#include "gtm_stdlib.h"
-#include "gtm_time.h"
-#include "gtm_stdio.h"
-
-#include "repl_log.h"
-#include "iosp.h"
-#include "util.h"
-
-#define MAX_MSG_LEN 1024
-
-GBLREF int		gtmsource_log_fd;
-GBLREF int		gtmrecv_log_fd;
-GBLREF int		updproc_log_fd;
-
-GBLREF FILE		*gtmsource_log_fp;
-GBLREF FILE		*gtmrecv_log_fp;
-GBLREF FILE		*updproc_log_fp;
-
-/* Note :  On VMS 'fp' argument is dummy. Message is always logged to the log file specified by the
-   /LOG qualifier, or to the stdout otherwise */
-
-void map_esc_seq(char *in_msg)
-{
-	char	out_msg[MAX_MSG_LEN];
-	char	*out_ptr, *in_ptr;
-
-	in_ptr  = in_msg;
-	out_ptr = out_msg;
-	while('\0' != *in_ptr)
-	{
-		switch(*in_ptr)
-		{
-			case '\n': *out_ptr++ = '!';
-				   *out_ptr++ = '/';
-				   break;
-			case '\t': *out_ptr++ = '!';
-				   *out_ptr++ = '_';
-				   break;
-			case '\f': *out_ptr++ = '!';
-				   *out_ptr++ = '^';
-				   break;
-			case '!':  *out_ptr++ = '!';
-				   *out_ptr++ = '!';
-				   break;
-			default :  *out_ptr++ = *in_ptr;
-		}
-		in_ptr++;
-	}
-	*out_ptr = '\0';
-	strcpy(in_msg, out_msg);
-}
-
-int repl_log(FILE *fp, boolean_t stamptime, boolean_t flush, char *fmt, ...)
-{
-	va_list printargs;
-	now_t	now; /* for GET_CUR_TIME macro */
-	char	*time_ptr, time_str[CTIME_BEFORE_NL + 2]; /* for GET_CUR_TIME macro */
-	char	fmt_str[BUFSIZ];
-	char	msg[MAX_MSG_LEN];
-	int	msg_len, rc;
-
-	if (stamptime)
-	{
-		GET_CUR_TIME;
-		strcpy(fmt_str, time_ptr);
-		fmt_str[CTIME_BEFORE_NL] = ' '; /* Overwrite \n */
-		fmt_str[CTIME_BEFORE_NL + 1] = ':';
-		fmt_str[CTIME_BEFORE_NL + 2] = ' ';
-		strcpy(fmt_str + CTIME_BEFORE_NL + 3, fmt);
-		fmt = &fmt_str[0];
-	}
-
-	va_start(printargs, fmt);
-	VSPRINTF(msg, fmt, printargs, rc);
-	va_end(printargs);
-	msg_len = strlen(msg);
-	if (flush && '\n' == msg[msg_len - 1])
-		msg[msg_len - 1] = '\0'; /* Since the util_out_print() puts a CR by itself */
-	map_esc_seq(msg);
-	util_out_print(msg, flush);
-
-	return(SS_NORMAL);
-}
diff --git a/sr_vvms/repl_log_init.c b/sr_vvms/repl_log_init.c
deleted file mode 100644
index 31bdc58..0000000
--- a/sr_vvms/repl_log_init.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "gtm_stdio.h"
-
-GBLDEF int		gtmsource_log_fd = FD_INVALID;
-GBLDEF int		gtmrecv_log_fd = FD_INVALID;
-GBLDEF int		updproc_log_fd = FD_INVALID;
-GBLDEF int		updhelper_log_fd = FD_INVALID;
-
-GBLDEF FILE		*gtmsource_log_fp = NULL;
-GBLDEF FILE		*gtmrecv_log_fp = NULL;
-GBLDEF FILE		*updproc_log_fp = NULL;
-GBLDEF FILE		*updhelper_log_fp = NULL;
diff --git a/sr_vvms/repl_msg.h b/sr_vvms/repl_msg.h
deleted file mode 100644
index 6a85b64..0000000
--- a/sr_vvms/repl_msg.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef _REPL_MSG_H
-#define _REPL_MSG_H
-
-enum
-{
-	REPL_START_JNL_SEQNO = 0,
-	REPL_TR_JNL_RECS, /* 1 */
-	REPL_ROLLBACK_FIRST, /* 2 */
-	REPL_WILL_RESTART_OBSOLETE, /* 3 */ /* Obsoleted effective V4.4-002 since we no longer support dual site config with
-					     * V4.1 versions. But, DO NOT remove this message type to keep other message types
-					     * same as in V4.2 and V4.3 versions */
-	REPL_XOFF, /* 4 */
-	REPL_XON, /* 5 */
-	REPL_BADTRANS, /* 6 */
-	REPL_HEARTBEAT, /* 7 */
-	REPL_FETCH_RESYNC, /* 8 */
-	REPL_RESYNC_SEQNO, /* 9 */
-	REPL_START_SEQNO_STOPSRCFILTER, /* 10 */ /* needed for backward compatibility with 4.1-000 */
-	REPL_XOFF_ACK_ME, /* 11 */
-	REPL_XOFF_ACK, /* 12 */
-	REPL_WILL_RESTART_WITH_INFO /* 13 */
-};
-
-#define START_FLAG_NONE				0x00000000
-#define START_FLAG_STOPSRCFILTER		0x00000001
-#define START_FLAG_UPDATERESYNC			0x00000002
-#define START_FLAG_HASINFO			0x00000004
-#define START_FLAG_COLL_M			0x00000008
-#define	START_FLAG_VERSION_INFO			0x00000010
-#define	START_FLAG_TRIGGER_SUPPORT		0x00000020
-#define	START_FLAG_SRCSRV_IS_VMS		0x00000040
-
-#define	MIN_REPL_MSGLEN		32 /* To keep compiler happy with
-				    * the definition of repl_msg_t as well
-				    * as to accommodate a seq_num */
-
-#define REPL_MSG_HDRLEN	(SIZEOF(int4) + SIZEOF(int4)) /* For type and
-						     * len fields */
-
-typedef struct
-{
-	int4		type;
-	int4		len;
-	unsigned char 	msg[MIN_REPL_MSGLEN - REPL_MSG_HDRLEN];
-	/* All that we need is msg[1], but keep the  compiler happy with
-	 * this definition for msg. Also provide space to accommodate a seq_num
-	 * so that a static definition would suffice instead of malloc'ing a
-	 * small message buffer */
-} repl_msg_t;
-
-#define	MAX_REPL_MSGLEN	(1 * 1024 * 1024) /* should ideally match the TCP send (recv) bufsiz of source (receiver) server */
-#define MAX_TR_BUFFSIZE	(MAX_REPL_MSGLEN - REPL_MSG_HDRLEN) /* allow for replication message header */
-
-typedef struct
-{
-	int4		type;
-	int4		len;
-	unsigned char	start_seqno[SIZEOF(seq_num)];
-	uint4		start_flags;
-	unsigned char	jnl_ver;
-	char		filler[MIN_REPL_MSGLEN - REPL_MSG_HDRLEN - SIZEOF(seq_num) -
-			       SIZEOF(uint4) - SIZEOF(unsigned char)];
-} repl_start_msg_t; /* The first two fields should be as in repl_msg_t */
-
-typedef struct
-{
-	int4		type;
-	int4		len;
-	unsigned char	start_seqno[SIZEOF(seq_num)];
-	unsigned char	jnl_ver;
-	char		start_flags[4];
-	char		filler[MIN_REPL_MSGLEN - REPL_MSG_HDRLEN - SIZEOF(seq_num) -
-			       - SIZEOF(unsigned char) - 4 * SIZEOF(char)];
-} repl_start_reply_msg_t; /* The first two fields should be as in repl_msg_t */
-
-typedef struct
-{
-	int4		type;
-	int4		len;
-	unsigned char	ack_seqno[SIZEOF(seq_num)];
-	unsigned char	ack_time[SIZEOF(time_t)];
-	unsigned char	filler[MIN_REPL_MSGLEN - REPL_MSG_HDRLEN - SIZEOF(seq_num) - SIZEOF(time_t)];
-} repl_heartbeat_msg_t; /* The first two fields should be as in repl_msg_t */
-
-typedef struct
-{
-	struct
-	{
-		int4		fl;
-		int4		bl;
-	} que;
-	repl_heartbeat_msg_t	heartbeat;
-} repl_heartbeat_que_entry_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(save)
-# pragma pointer_size(long)
-#endif
-
-typedef repl_msg_t 		*repl_msg_ptr_t;
-typedef repl_start_msg_t	*repl_start_msg_ptr_t;
-typedef repl_start_reply_msg_t	*repl_start_reply_msg_ptr_t;
-
-#if defined(__osf__) && defined(__alpha)
-# pragma pointer_size(restore)
-#endif
-
-#endif
diff --git a/sr_vvms/repl_sem.c b/sr_vvms/repl_sem.c
deleted file mode 100644
index eb25edd..0000000
--- a/sr_vvms/repl_sem.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <prtdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <syidef.h>
-#include <descrip.h>
-#include <lkidef.h>
-#include <lckdef.h>
-#include <efndef.h>
-
-#include "gtm_string.h"
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "repl_sem.h"
-#include "vmsdtype.h"
-#include "repl_sp.h"
-#include "locks.h"
-#include "min_max.h"
-
-/* In the present shape, this module is not generic enough. Coded with the
- * view of brining SEM related code out of replication module. Could be made
- * more generic. Handles two semaphore sets one for source and another for
- * receiver server */
-
-#define SEMS_PER_SET		(MAX(NUM_SRC_SEMS, NUM_RECV_SEMS))
-#define MAX_LOCKS_QUED		20	/* Max. number of locks for a resource. Required for get_sem_pid() */
-#define BUFF_SIZE		255
-#define descrcpy(A, B)		(A)->dsc$b_dtype = (B)->dsc$b_dtype;\
-				(A)->dsc$b_class = (B)->dsc$b_class;\
-				(A)->dsc$w_length= (B)->dsc$w_length;\
-				memcpy((A)->dsc$a_pointer, (B)->dsc$a_pointer, (B)->dsc$w_length);
-#define INITIAL_N_LOCKS 	8	/* Used in get_lkpid() */
-
-GBLDEF	int4	repl_sem_errno;
-GBLDEF	char	repl_msg_buff[BUFF_SIZE];
-GBLDEF	mstr    repl_msg_str = {BUFF_SIZE, repl_msg_buff};
-
-typedef struct
-{
-	char	  res_name[MAX_NAME_LEN + 1];
-	sem_key_t key;
-	int4	  lock_id;
-} sem_ctl_t;
-
-typedef struct
-{
-	short int       buffer_length;
-	short int       item_code;
-	void            *bufaddress;
-	void            *retaddress;
-} t_lki_item_list;
-
-#ifndef __NEW_STARLET
-typedef struct lkidef LKIDEF;
-#endif
-
-static sem_ctl_t	sem_ctl[NUM_SEM_SETS][SEMS_PER_SET];
-
-boolean_t sem_set_exists(int which_set)
-{
-	return (0 < sem_ctl[which_set][0].lock_id);
-}
-
-int init_sem_set_source(sem_key_t *key)
-{
-	int status;
-	int i, j;
-
-	/* Resource Name format : refer to global_name.c
-	 * Example - GT$P_ALPHA2$DKA300$B522D2000000
-	 *	prefix -  4 chars = GT$P
-	 *	Dev-Id - 14 chars = _ALPHA2$DKA300
-	 *	Delimit-  1 char  = $
-	 *	File-Id- 12 chars = B522D2000000
-	 *      Total    31 chars (Max. length allowed for lock and gsec names!)
-	 * Since the length is limited and maximum is already reached, to get unique names for sems in the sem-set,
-	 * modify the prefix: GT$P to GT$K, GT$L, and GT$M
-	 */
-
-	/* Fill in the resource names */
-	for (i = JNL_POOL_ACCESS_SEM; i < NUM_SRC_SEMS; i++)
-	{
-		sem_ctl[SOURCE][i].key.dsc$a_pointer = sem_ctl[SOURCE][i].res_name;
-		descrcpy(&sem_ctl[SOURCE][i].key, key );
-	}
-
-	sem_ctl[SOURCE][JNL_POOL_ACCESS_SEM].res_name[3] = 'K';		/* K - Journal Pool Access */
-	sem_ctl[SOURCE][SRC_SERV_COUNT_SEM].res_name[3] = 'L';		/* L - Source Server Count */
-	sem_ctl[SOURCE][SRC_SERV_OPTIONS_SEM].res_name[3] = 'M';	/* M - Source Server Options */
-
-	/* Keep all the SEMs(locks) in NULL mode */
-	for (i = JNL_POOL_ACCESS_SEM; i < NUM_SRC_SEMS; i++)
-		if (status = grab_null_lock(SOURCE, i))
-			break;
-	if (status)
-	{
-		for (j = JNL_POOL_ACCESS_SEM; j < i; j++) /* grab_null_lock() on i-th sem failed */
-		{
-			if (SS$_NORMAL != gtm_deq(sem_ctl[SOURCE][j].lock_id, NULL, PSL$C_USER, 0))
-			{
-				assert(FALSE);
-				break;
-			}
-			sem_ctl[SOURCE][j].lock_id = 0;
-		}
-	}
-	return status;
-}
-
-int init_sem_set_recvr(sem_key_t *key)
-{
-	int status;
-	int  i, j;
-
-	/* Fill in the resource names */
-	/* Refer to init_sem_set_source() for an explanation */
-
-	for (i = RECV_POOL_ACCESS_SEM; i < NUM_RECV_SEMS; i++)
-	{
-		sem_ctl[RECV][i].key.dsc$a_pointer = sem_ctl[RECV][i].res_name;
-		descrcpy(&sem_ctl[RECV][i].key, key );
-	}
-	sem_ctl[RECV][RECV_POOL_ACCESS_SEM].res_name[3] = 'T';		/* T - Recv. Pool Access */
-	sem_ctl[RECV][RECV_SERV_COUNT_SEM].res_name[3] = 'U';		/* U - Recv. Server Count */
-	sem_ctl[RECV][UPD_PROC_COUNT_SEM].res_name[3] = 'V';		/* V - Update Process Count */
-	sem_ctl[RECV][RECV_SERV_OPTIONS_SEM].res_name[3] = 'W';		/* W - Recv. Server Options */
-
-	/* Keep all the SEMs in NULL mode */
-	for (i = RECV_POOL_ACCESS_SEM; i < NUM_RECV_SEMS; i++)
-		if (status = grab_null_lock(RECV, i))
-			break;
-	if (status)
-	{
-		for (j = RECV_POOL_ACCESS_SEM; j < i; j++) /* grab_null_lock() on i-th sem failed */
-		{
-			if (SS$_NORMAL != gtm_deq(sem_ctl[RECV][j].lock_id, NULL, PSL$C_USER, 0))
-			{
-				assert(FALSE);
-				break;
-			}
-			sem_ctl[RECV][j].lock_id = 0;
-		}
-	}
-	return status;
-}
-
-int grab_sem(int set_index, int sem_num)
-{
-	vms_lock_sb	lksb;
-	REPL_SEM_ENQW(set_index, sem_num, LCK$K_EXMODE, LCK$M_CONVERT | LCK$M_NODLCKWT);
-	return REPL_SEM_STATUS;
-}
-
-int grab_sem_immediate(int set_index, int sem_num)
-{
-	vms_lock_sb	lksb;
-	REPL_SEM_ENQW(set_index, sem_num, LCK$K_EXMODE, LCK$M_CONVERT | LCK$M_NODLCKWT | LCK$M_NOQUEUE);
-	return REPL_SEM_STATUS;
-}
-
-int rel_sem(int set_index, int sem_num)
-{
-	vms_lock_sb	lksb;
-	REPL_SEM_ENQW(set_index, sem_num, LCK$K_NLMODE, LCK$M_CONVERT | LCK$M_NODLCKWT);
-	return REPL_SEM_STATUS;
-}
-
-int rel_sem_immediate(int set_index, int sem_num)
-{
-	vms_lock_sb	lksb;
-	REPL_SEM_ENQW(set_index, sem_num, LCK$K_NLMODE, LCK$M_CONVERT | LCK$M_NODLCKWT | LCK$M_NOQUEUE);
-	return REPL_SEM_STATUS;
-}
-
-int remove_sem_set(int set_index)
-{
-	int i;
-
-	ASSERT_SET_INDEX;
-	if (SOURCE == set_index)
-	{
-		for (i = JNL_POOL_ACCESS_SEM; i < NUM_SRC_SEMS; i++)
-		{
-			if (SS$_NORMAL != (repl_sem_errno = gtm_deq(sem_ctl[SOURCE][i].lock_id, NULL, PSL$C_USER, 0)))
-			{
-				assert(FALSE);
-				break;
-			}
-			sem_ctl[SOURCE][i].lock_id = 0;
-		}
-	}
-	else /* RECIEVER */
-	{
-		for (i = RECV_POOL_ACCESS_SEM; i < NUM_SRC_SEMS; i++)
-		{
-			if (SS$_NORMAL != (repl_sem_errno = gtm_deq(sem_ctl[RECV][i].lock_id, NULL, PSL$C_USER, 0)))
-			{
-				assert(FALSE);
-				break;
-			}
-			sem_ctl[RECV][i].lock_id = 0;
-		}
-	}
-	return REPL_SEM_STATUS;
-}
-
-int get_sem_info(int set_index, int sem_num, sem_info_type info_id)
-{
-	int 	ret_val;
-	uint4	status, lk_pid, get_lkpid(struct dsc$descriptor_s *, int, uint4 *);
-
-	ASSERT_SET_INDEX;
-	switch(info_id)
-	{
-		case SEM_INFO_VAL :
-			status = get_lkpid(&sem_ctl[set_index][sem_num].key, LCK$K_EXMODE, &lk_pid);
-			if (SS$_NORMAL != status)
-			{
-				repl_sem_errno = status;
-				ret_val = -1;
-			} else if (lk_pid)
-				ret_val = 1;
-			else
-				ret_val = 0;
-			break;
-		default :
-			ret_val = -1;
-			break;
-	}
-	return ret_val;
-}
-
-static int grab_null_lock(int set_index, int sem_num)
-{
-	vms_lock_sb	lksb;
-
-	repl_sem_errno = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, &lksb, LCK$M_SYSTEM | LCK$M_EXPEDITE, &sem_ctl[set_index][sem_num].key,
-				  0, NULL, 0, NULL, PSL$C_USER, 0);
-	assert(SS$_NORMAL == repl_sem_errno);
-	if (SS$_NORMAL == repl_sem_errno)
-		repl_sem_errno = lksb.cond;
-	assert(SS$_NORMAL == repl_sem_errno);
-	if (SS$_NORMAL == repl_sem_errno)
-		sem_ctl[set_index][sem_num].lock_id = lksb.lockid;
-	return REPL_SEM_STATUS;
-}
-
-/* check if any process holds the lock identified by name_dsc in a mode at or above given lkmode.
- * If so, return the pid of such a process thru third arg. If there are multiple processes satisfying
- * the criterion, pid of any one such processes is returned. If there is no such process, zero is
- * returned in third arg.
- */
-
-uint4 get_lkpid(struct dsc$descriptor_s *name_dsc, int lkmode, uint4 *lk_pid)
-{
-	static char	*lki_locks = NULL;
-	static int	size = INITIAL_N_LOCKS;
-	uint4		ret_len, status;
-	vms_lock_sb	lksb;
-	LKIDEF		*item, *lki_top;
-	t_lki_item_list	lki_item_list[2] = {
-				{0, LKI$_LOCKS, 0, &ret_len},
-				{0, 0, 0, 0}
-			};
-
-	*lk_pid = 0;
-	/* Grab Null lock on the resource */
-	if (SS$_NORMAL != (status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, &lksb, LCK$M_SYSTEM | LCK$M_EXPEDITE,
-							name_dsc, 0, NULL, 0, NULL, PSL$C_USER, 0)))
-	{
-		assert(FALSE);
-		return status;
-	}
-	/* Get a list of all the locks on the resource of interest */
-	do
-	{
-		if (NULL == lki_locks)
-			lki_locks = (char *)malloc(size * LKI$C_LENGTH); /* see lkidef.h for LKI$C_LENGTH */
-		lki_item_list[0].buffer_length = size * LKI$C_LENGTH;
-		lki_item_list[0].bufaddress = lki_locks;
-		if (SS$_NORMAL != (status = gtm_getlkiw(EFN$C_ENF, &lksb.lockid, lki_item_list, 0, 0, 0, 0)))
-		{
-			gtm_deq(lksb.lockid, NULL, PSL$C_USER, 0); /* return status not as important as gtm_getlkiw()'s */
-			return status;
-		}
-		if (!(ret_len >> 31)) /* size of user buffer passed to gtm_getlkiw() was enough */
-			break;
-		free(lki_locks);
-		lki_locks = NULL;
-		size <<= 1;
-	} while(TRUE);
-	/* Release Null lock on the resource (grabbed above) */
-	if (SS$_NORMAL != (status = gtm_deq(lksb.lockid, NULL, PSL$C_USER, 0)))
-	{
-		assert(FALSE);
-		return status;
-	}
-	/* Check through the Locks list got above, if anyone holds the lock in mode >= lkmode.
-		If so fill lk_pid with the pid of that process */
-	lki_top	= (LKIDEF *)(lki_locks + (ret_len & 0x0000FFFF));
-	/* On vax sizeof LKIDEF is not the same as LKI$C_LENGTH (56 vs 24), hence the kludgery below */
-	for (item = (LKIDEF *)lki_locks; item < lki_top; item = (LKIDEF *) ((char *)item + LKI$C_LENGTH))
-		if (LKI$C_GRANTED == item->lki$b_queue && lkmode <= item->lki$b_grmode)
-		{
-			*lk_pid = item->lki$l_pid;
-			return SS$_NORMAL;
-		}
-	return SS$_NORMAL; /* Nobody holds the lock in mode >= lkmode */
-}
diff --git a/sr_vvms/repl_sem.h b/sr_vvms/repl_sem.h
deleted file mode 100644
index b49c419..0000000
--- a/sr_vvms/repl_sem.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2006 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef _REPL_SEM_H
-#define _REPL_SEM_H
-
-#include "repl_sem_sp.h"
-
-#define ASSERT_SET_INDEX	assert (NUM_SEM_SETS > set_index)
-
-enum
-{
-	SOURCE,
-	RECV,
-	NUM_SEM_SETS
-};
-
-typedef enum
-{
-	JNL_POOL_ACCESS_SEM,	/* For Startup / Shutdown */
-	SRC_SERV_COUNT_SEM,	/* Source sever holds it while alive */
-	SRC_SERV_OPTIONS_SEM,	/* For options change, since it is done through the shared memory */
-	DUMMY_SEM,		/* added just to make the number of semaphores same as in recvpool */
-	SOURCE_ID_SEM,
-	NUM_SRC_SEMS
-} source_sem_type;
-
-typedef enum
-{
-	RECV_POOL_ACCESS_SEM,	/* For Startup / Shutdown */
-	RECV_SERV_COUNT_SEM,	/* Receiver sever holds it while alive */
-	UPD_PROC_COUNT_SEM,	/* Update process holds it while alive */
-	RECV_SERV_OPTIONS_SEM,	/* For options change, since it is done through the shared memory */
-	RECV_ID_SEM,
-	NUM_RECV_SEMS
-} recv_sem_type;
-
-typedef enum
-{
-	SEM_INFO_VAL,
-	SEM_INFO_PID,
-	SEM_NUM_INFOS
-} sem_info_type;
-
-int		grab_sem(int set_index, int sem_num);	/* set_index can be SOURCE or RECV  */
-int		grab_sem_immediate(int set_index, int sem_num);
-int		rel_sem(int set_index, int sem_num);
-int		rel_sem_immediate(int set_index, int sem_num);
-int		get_sem_info(int set_index, int sem_num, sem_info_type info_id);
-int		remove_sem_set(int set_index);
-boolean_t	sem_set_exists(int which_set);
-
-#ifdef UNIX
-void 		rel_recvpool_ftok_sems(boolean_t, boolean_t);
-void 		rel_jnlpool_ftok_sems(boolean_t, boolean_t);
-void 		lock_recvpool_ftok_sems(boolean_t, boolean_t);
-void 		lock_jnlpool_ftok_sems(boolean_t, boolean_t);
-void 		get_lock_recvpool_ftok_sems(boolean_t, boolean_t);
-void 		get_lock_jnlpool_ftok_sems(boolean_t, boolean_t);
-void 		set_sem_set_src(int semid);
-void 		set_sem_set_recvr(int semid);
-int 		grab_sem_all_source(void);	/* rollback needs this */
-int 		grab_sem_all_receive(void);	/* rollback needs this */
-#endif
-
-#endif /* _REPL_SEM_H */
diff --git a/sr_vvms/repl_sem_sp.h b/sr_vvms/repl_sem_sp.h
deleted file mode 100644
index 179514f..0000000
--- a/sr_vvms/repl_sem_sp.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef _REPL_SEM_SP_H
-#define _REPL_SEM_SP_H
-
-#define REPL_SEM_ERRNO		repl_sem_errno
-#define REPL_SEM_ERROR		(gtm_getmsg(repl_sem_errno, &repl_msg_str),repl_msg_buff)
-#define REPL_SEM_NOT_GRABBED	(SS$_NOTQUEUED == repl_sem_errno)
-#define REPL_SEM_NOT_GRABBED1	(SS$_NOTQUEUED == save_errno)
-#define REPL_STR_ERROR		(gtm_getmsg(status, &repl_msg_str),repl_msg_buff)
-#define REPL_STR_ERROR1(status) (gtm_getmsg(status, &repl_msg_str),repl_msg_buff)
-#define REPL_SEM_STATUS		((SS$_NORMAL == repl_sem_errno) ? 0 : -1)
-
-#define REPL_SEM_ENQW(set_index, sem_num, mode, flags)									\
-	ASSERT_SET_INDEX;												\
-	lksb.lockid = sem_ctl[set_index][sem_num].lock_id; 								\
-	repl_sem_errno = gtm_enqw(EFN$C_ENF, mode, &lksb, flags, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);		\
-	assert(SS$_NORMAL == repl_sem_errno || (((flags) & LCK$M_NOQUEUE) && (SS$_NOTQUEUED == repl_sem_errno)));	\
-	if (SS$_NORMAL == repl_sem_errno) 										\
-		repl_sem_errno = lksb.cond;										\
-	assert(SS$_NORMAL == repl_sem_errno || (((flags) & LCK$M_NOQUEUE) && (SS$_NOTQUEUED == repl_sem_errno)));	\
-
-typedef struct dsc$descriptor_s sem_key_t;
-
-int init_sem_set_source(sem_key_t *key);
-int init_sem_set_recvr(sem_key_t *key);
-
-GBLREF int4 repl_sem_errno;
-GBLREF char repl_msg_buff[];
-GBLREF mstr repl_msg_str;
-#endif /* _REPL_SEM_SP_H */
diff --git a/sr_vvms/repl_shm.c b/sr_vvms/repl_shm.c
deleted file mode 100644
index c8e55ee..0000000
--- a/sr_vvms/repl_shm.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_inet.h"
-
-#include <stddef.h>
-#include <lkidef.h>
-#include <ssdef.h>
-#include <clidef.h>
-#include <iodef.h>
-#include <prtdef.h>
-#include <prvdef.h>
-#include <secdef.h>
-#include <psldef.h>
-#include <syidef.h>
-#include <descrip.h>
-#include <lckdef.h>
-#include <efndef.h>
-
-#include "gtm_string.h"
-
-#include "vmsdtype.h"
-#include "gdsroot.h"
-#include "repl_sem.h"
-#include "repl_shm.h"
-#include "repl_sp.h"
-
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "gtmrecv.h"
-#include "locks.h"
-#include "mem_list.h"
-#include "init_sec.h"
-
-#define MAILBOX_SIZE 512
-
-error_def(ERR_RECVPOOLSETUP);
-error_def(ERR_JNLPOOLSETUP);
-error_def(ERR_TEXT);
-error_def(ERR_REPLWARN);
-
-static uint4 header_size[2]	= {JNLDATA_BASE_OFF, RECVDATA_BASE_OFF};
-static uint4 size_offset[2]	= {offsetof(jnlpool_ctl_struct, jnlpool_size), offsetof(recvpool_ctl_struct, recvpool_size)};
-static uint4 ERR_POOLSETUP[2]	= {ERR_JNLPOOLSETUP, ERR_RECVPOOLSETUP};
-
-static uint4 get_pagelet_count(boolean_t src_or_rcv, char *gsec_name, int4 *pgcnt)
-{
-	sm_uc_ptr_t	shm_range[2];
-	uint4		hdr_pglets;
-	uint4		status, *psize, size;
-	$DESCR(d_gsec, gsec_name);
-
-	/* Map initial pages required to get the header*/
-	hdr_pglets = DIVIDE_ROUND_UP(header_size[src_or_rcv], OS_PAGELET_SIZE);
-        if (SS$_NORMAL != (status = map_shm_aux(src_or_rcv, &d_gsec, hdr_pglets, shm_range)))
-		/* Global section doesn't exist. Just return. Caller has to handle */
-		return status;
-
-	/* Get the size from the header */
-	psize		= (uint4 *) (shm_range[0]+size_offset[src_or_rcv]);
-	size		= header_size[src_or_rcv] + (*psize);
-	*pgcnt		= DIVIDE_ROUND_UP(size, OS_PAGELET_SIZE);
-
-	/* Unmap */
-	detach_shm(shm_range);
-
-	return SS$_NORMAL;
-}
-
-static int4 map_shm_aux(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc, int4 buff_pagelets, sm_uc_ptr_t *shm_range)
-{
-	int4		status;
-	uint4		flags;
-	sm_uc_ptr_t	inadr[2];
-
-	/* Expand virtual address space */
-        status = gtm_expreg(buff_pagelets, inadr, PSL$C_USER, 0);
-        if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_POOLSETUP[src_or_rcv], 0,
-				       ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to expand virtual address space"), status);
-
-	/* Optional gaurding of the shared space - to be done here, if needed.(gvcst_init_sysops.c is a sample)*/
-
-	/* map to the global section */
-        flags = SEC$M_SYSGBL | SEC$M_WRT;
-        if (SS$_NORMAL != (status = sys$mgblsc(inadr, shm_range, PSL$C_USER, flags, name_dsc, NULL, 0)))
-		detach_shm(inadr);
-	return status;
-}
-
-int4 create_and_map_shm(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc, int4 buffsize, sm_uc_ptr_t *shm_range)
-{
-	int4	buff_pagelets, status;
-	uint4	flags;
-	/* uint4	inadr[2]; temp for init_sec */
-
-	buff_pagelets = DIVIDE_ROUND_UP(buffsize, OS_PAGELET_SIZE);
-	/* If jnl-pool-size has to be in multiple of pages, uncomment the next line */
-	/* buff_pagelets = ROUND_UP(buff_pagelets, OS_PAGE_SIZE / OS_PAGELET_SIZE); */
-
-	/* Expand virtual address space */
-        status = gtm_expreg(buff_pagelets, shm_range, PSL$C_USER, 0);
-        if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_POOLSETUP[src_or_rcv], 0,
-				       ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to expand virtual address space"), status);
-
-	/* Optional gaurding of the shared space - to be done here, if needed.(gvcst_init_sysops.c is a sample)*/
-
-	/* Create if not already existing, and map the global section */
-        flags = SEC$M_GBL | SEC$M_SYSGBL | SEC$M_WRT | SEC$M_PAGFIL | SEC$M_PERM;
-        status = init_sec(shm_range, name_dsc, 0, buff_pagelets, flags);
-
-        if ((SS$_NORMAL != status) && (SS$_CREATED != status))
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_POOLSETUP[src_or_rcv], 0,
-				       ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to Create/Map global section"), status);
-	return status;
-}
-
-int4 map_shm(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc, sm_uc_ptr_t *shm_range)
-{
-	int4		buff_pagelets, status;
-	uint4		flags;
-	sm_uc_ptr_t	inadr[2];
-
-	status = get_pagelet_count(src_or_rcv, name_dsc->dsc$a_pointer, &buff_pagelets);
-	if (SS$_NORMAL != status)
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_POOLSETUP[src_or_rcv], 0,
-				       ERR_TEXT, 2, RTS_ERROR_LITERAL("Unable to get the number of gblsection pagelets"), status);
-
-	/* If jnl-pool-size has to be in multiple of pages, uncomment the next line */
-	/* buff_pagelets = ROUND_UP(buff_pagelets, OS_PAGE_SIZE / OS_PAGELET_SIZE); */
-
-	return (map_shm_aux(src_or_rcv, name_dsc, buff_pagelets, shm_range));
-}
-
-boolean_t shm_exists(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc)
-{
-	int4		buff_pagelets, status;
-	uint4		flags;
-	sm_uc_ptr_t	inadr[2], shm_range[2];
-	boolean_t	res;
-
-	buff_pagelets = 1;
-	status = gtm_expreg(buff_pagelets, inadr, PSL$C_USER, 0);
-	if (SS$_NORMAL != status)
-	{
-		rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_TEXT, 2,
-				RTS_ERROR_LITERAL("Unable to expand virtual address space"), status);
-		return FALSE;
-	}
-
-	/* map to the global section */
-	flags = SEC$M_SYSGBL | SEC$M_WRT;
-	res      = (SS$_NORMAL == sys$mgblsc(inadr, shm_range, PSL$C_USER, flags, name_dsc, NULL, 0));
-	status   = gtm_deltva(inadr, NULL, PSL$C_USER);
-	if (SS$_NORMAL != status)
-		if (SOURCE == src_or_rcv)
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_REPLWARN, 2,
-					RTS_ERROR_LITERAL("Could not detach from journal pool"), status);
-		else
-			rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_REPLWARN, 2,
-					 RTS_ERROR_LITERAL("Could not detach from receiver pool"), status);
-	return res;
-}
-
-int4	register_with_gsec(struct dsc$descriptor_s *name_dsc, int4 *lockid)
-{
-	int4		status;
-	vms_lock_sb	lksb;
-
-	status = gtm_enqw(EFN$C_ENF, LCK$K_NLMODE, &lksb, LCK$M_SYSTEM | LCK$M_EXPEDITE, name_dsc, 0, NULL, 0, NULL, PSL$C_USER, 0);
-	assert(SS$_NORMAL == status);
-	if (SS$_NORMAL == status)
-	{
-		status = gtm_enqw(EFN$C_ENF, LCK$K_CRMODE, &lksb, LCK$M_CONVERT, name_dsc, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		assert(SS$_NORMAL == status);
-		if (SS$_NORMAL == status)
-			status = lksb.cond;
-		assert(SS$_NORMAL == status);
-	}
-	if (SS$_NORMAL == status)
-		*lockid = lksb.lockid;
-	return status;
-}
-
-int4	lastuser_of_gsec(int4 gsec_lockid)
-{
-	int4		status;
-	vms_lock_sb	lksb;
-
-	lksb.lockid = gsec_lockid;
-	status = gtm_enqw(EFN$C_ENF, LCK$K_EXMODE, &lksb, LCK$M_CONVERT | LCK$M_NOQUEUE, NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-	assert(SS$_NORMAL == status || SS$_NOTQUEUED == status);
-	if (SS$_NORMAL == status)
-		status = lksb.cond;
-	assert(SS$_NORMAL == status || SS$_NOTQUEUED == status);
-	return status;
-}
-
-uint4	signoff_from_gsec_dbg(unsigned int gsec_lockid)
-{
-	uint4	status;
-
-	status = gtm_deq(gsec_lockid, NULL, PSL$C_USER, 0);
-	assert(SS$_NORMAL == status);
-	return status;
-}
diff --git a/sr_vvms/repl_shm.h b/sr_vvms/repl_shm.h
deleted file mode 100644
index ae2c28d..0000000
--- a/sr_vvms/repl_shm.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef _REPL_SHM_H
-#define _REPL_SHM_H
-
-/* signoff_from_gsec() invokes gtm_deq() and is used in a lot of places.
- * In DBG mode, we want to assert fail whenever gtm_deq() returns abnormal status.
- * Hence we define a new function that does a call to gtm_deq() and asserts on status.
- * In PRO, we dont want the extra-function-call overhead, hence the macro is a direct call to gtm_deq().
- */
-#ifndef DEBUG
-#define		signoff_from_gsec(gsec_lockid)		gtm_deq(gsec_lockid, NULL, PSL$C_USER, 0)
-#else
-#define		signoff_from_gsec(gsec_lockid)		signoff_from_gsec_dbg(gsec_lockid)
-#endif
-
-#define		detach_shm(shm_range)			gtm_deltva(shm_range, NULL, PSL$C_USER)
-#define		delete_shm(name_dsc)			del_sec(SEC$M_SYSGBL, name_dsc, NULL)
-
-boolean_t	create_and_map_shm(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc, int4 buffsize, sm_uc_ptr_t *shm_range);
-int4		map_shm(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc, sm_uc_ptr_t *shm_range);
-boolean_t	shm_exists(boolean_t src_or_rcv, struct dsc$descriptor_s *name_dsc);
-int4		register_with_gsec(struct dsc$descriptor_s *name_dsc, int4 *lockid);
-int4		lastuser_of_gsec(int4 gsec_lockid);
-uint4		signoff_from_gsec_dbg(unsigned int gsec_lockid);
-
-#define		DETACH_FROM_JNLPOOL(pool_init, jnlpool, jnlpool_ctl)	\
-{									\
-	if (pool_init)							\
-	{								\
-		rel_lock(jnlpool.jnlpool_dummy_reg);			\
-		detach_shm(jnlpool.shm_range);				\
-		signoff_from_gsec(jnlpool.shm_lockid);			\
-		memset(&jnlpool, 0, SIZEOF(jnlpool));			\
-		jnlpool_ctl = NULL;					\
-		pool_init = FALSE;					\
-	}								\
-}
-
-#endif /* _REPL_SHM_H */
diff --git a/sr_vvms/repl_sp.h b/sr_vvms/repl_sp.h
deleted file mode 100644
index 3e8168f..0000000
--- a/sr_vvms/repl_sp.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2010 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include <descrip.h>
-
-#ifndef _REPL_SP_H
-#define _REPL_SP_H
-
-#define ERRNO			((EVMSERR != errno)? errno : vaxc$errno)
-#define FORMAT_STR		"PID %X %s is%s alive\n"
-
-#define MAX_COMMAND_LINE_LENGTH 512
-#define DUMMY_START_QUAL	"/DUMMY_START"
-#define NOWAIT			0x1
-#define SERVER_UP		1
-#define MUPIP_CMD		"MUPIP "
-#define PROC_NAME_MAXLEN	15
-#define SOURCE_PROMPT_START_QUAL	"REPLICATE/SOURCE/START"
-#define RECV_PROMPT_START_QUAL		"REPLICATE /RECEIVER/START"
-#define BUFF_QUAL			"/BUFFSIZE="
-#define CONNECT_QUAL			"/CONNECTPARAMS="
-#define FILTER_QUAL			"/FILTER="
-#define SECONDARY_QUAL			"/SECONDARY="
-#define LISTENPORT_QUAL			"/LISTENPORT="
-#define LOG_QUAL			"/LOG="
-#define LOGINTERVAL_QUAL		"/LOG_INTERVAL="
-#define PASSIVE_QUAL			"/PASSIVE"
-#define $DESCR(name,string)	struct dsc$descriptor_s name = { strlen(string), DSC$K_DTYPE_T, DSC$K_CLASS_S, string }
-#define SET_PRIV(X, Y)	\
-{				\
-	prvadr[1] = 0;		\
-	prvadr[0] = (X);	\
-	Y = sys$setprv(TRUE, prvadr, FALSE, prvprv);	\
-}
-#define REL_PRIV	\
-if (0 != (prvadr[0] &= ~prvprv[0]))	\
-{				\
-	sys$setprv(FALSE, prvadr, FALSE, NULL);	\
-}
-
-uint4 get_proc_name(unsigned char *prefix, uint4 prefix_size, uint4 pid, unsigned char *buff);
-uint4 get_proc_info(uint4 pid, uint4 *time, uint4 *icount);
-int repl_fork_rcvr_server(uint4 *pid, uint4 *cmd_channel);
-int4 repl_mbx_wr(uint4 channel, sm_uc_ptr_t msg, int len, uint4 err_code);
-int4 repl_trnlnm(struct dsc$descriptor_s *d_tbl_srch_list, struct dsc$descriptor_s *d_logical,
-		 struct dsc$descriptor_s *d_expanded, struct dsc$descriptor_s *d_foundin_tbl);
-int4 get_mbx_devname(struct dsc$descriptor_s *d_cmd_mbox, struct dsc$descriptor_s *d_cmd_dev);
-int4 repl_create_server(struct dsc$descriptor_s *d_cmd, char *mbx_prefix, char *mbx_suffix, uint4 *cmd_channel, uint4 *server_pid,
-			uint4 err_code);
-
-/*----- FILE I/O related -----*/
-#define F_CLOSE(CHANNEL, RC)			(RC) = sys$dassgn(CHANNEL)
-#define F_COPY_GDID(to, from)	                \
-{\
-	memcpy(&(to).dvi, &(from).dvi, SIZEOF((to).dvi));\
-	memcpy(&(to).did, &(from).did, SIZEOF((to).did));\
-	memcpy(&(to).fid, &(from).fid, SIZEOF((to).fid));\
-}
-
-#define F_COPY_GDID_FROM_STAT(to, nam)		\
-{\
-	memcpy(&(to).dvi, &(nam).nam$t_dvi, SIZEOF((to).dvi));\
-	memcpy(&(to).did, &(nam).nam$w_did, SIZEOF((to).did));\
-	memcpy(&(to).fid, &(nam).nam$w_fid, SIZEOF((to).fid));\
-}
-
-#define F_READ_BLK_ALIGNED(channel, from, buff, size, status) \
-{\
-	status = sys$qiow(EFN$C_ENF, channel, IO$_READVBLK, &iosb[0], 0, 0,\
-			  (sm_uc_ptr_t)buff, size, 1+DIVIDE_ROUND_DOWN(from, DISK_BLOCK_SIZE), 0, 0, 0);\
-	if (status == SS$_NORMAL) \
-		status = iosb[0];\
-}
-
-#define F_WRITE_BLK_ALIGNED(channel, to, buff, size, status) \
-{\
-	status = sys$qiow(EFN$C_ENF, channel, IO$_WRITEVBLK, &iosb[0], 0, 0,\
-			  (sm_uc_ptr_t)buff, size, 1+DIVIDE_ROUND_DOWN(to, DISK_BLOCK_SIZE), 0, 0, 0);\
-	if (status == SS$_NORMAL) \
-		status = iosb[0];\
-}
-#endif
diff --git a/sr_vvms/repl_utils.c b/sr_vvms/repl_utils.c
deleted file mode 100644
index ab747fe..0000000
--- a/sr_vvms/repl_utils.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <fab.h>
-#include <rms.h>
-#include <iodef.h>
-#include <descrip.h>
-#include <secdef.h>
-#include <efndef.h>
-
-#include "gtm_inet.h"
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gdskill.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "gdscc.h"
-#include "copy.h"
-#include "filestruct.h"
-#include "jnl.h"
-#include "buddy_list.h"		/* needed for tp.h */
-#include "hashtab_int4.h"	/* needed for tp.h and muprec.h */
-#include "tp.h"
-#include "hashtab_mname.h"	/* needed for muprec.h */
-#include "hashtab_int8.h"	/* needed for muprec.h */
-#include "muprec.h"
-#include "iosp.h"
-#include <rtnhdr.h>
-#include "mv_stent.h"
-#include "stack_frame.h"
-#include "gtmrecv.h"
-#include "cli.h"
-#include "error.h"
-#include "repl_msg.h"
-#include "gtmsource.h"
-#include "repl_shutdcode.h"
-#include "repl_sp.h"
-#include "util.h"
-#include "gtmmsg.h"
-
-GBLREF 	mur_gbls_t	murgbl;
-
-uint4 get_proc_name(unsigned char *prefix, uint4 prefix_size, uint4 pid, unsigned char *buff)
-{
-	unsigned char *cp;
-	int j, n, nbcd;
-
-	cp = buff;
-	memcpy(cp, prefix, prefix_size);
-	cp    	+= prefix_size;
-	nbcd	 = SIZEOF(pid) * 2;
-	for (j = 0 ; j < nbcd; j++, pid >>= 4)
-	{
-		n = pid & 0xf;
-		cp[nbcd - 1 - j] = n + (n < 10 ? 48 : 55);
-	}
-	cp	+= nbcd;
-	*cp	 = '\0';
-	assert(cp - buff <= PROC_NAME_MAXLEN);
-	return (cp - buff);
-}
-
-int4 *parse_filename(struct dsc$descriptor_s *d_file, struct dsc$descriptor_s *d_exp_file, boolean_t exp_concealed)
-{
-	int4		status;
-	struct FAB	fab;
-	struct NAM	nam;
-
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &(nam);
-	fab.fab$l_fop = FAB$M_NAM;
-	fab.fab$l_fna = STR_OF_DSC(*d_file);
-	fab.fab$b_fns = LEN_OF_DSC(*d_file);
-	nam.nam$l_esa = STR_OF_DSC(*d_exp_file);
-	nam.nam$b_ess = LEN_OF_DSC(*d_exp_file);
-	nam.nam$b_nop = (exp_concealed * NAM$M_NOCONCEAL) | NAM$M_SYNCHK;
-	if (RMS$_NORMAL == (status = sys$parse(&fab,0,0)))
-		if (nam.nam$b_name != 0)
-			LEN_OF_DSC(*d_exp_file) = nam.nam$b_esl;
-		else
-			LEN_OF_DSC(*d_exp_file) = nam.nam$b_esl - nam.nam$b_type - nam.nam$b_ver;
-	return status;
-}
diff --git a/sr_vvms/route_table.c b/sr_vvms/route_table.c
deleted file mode 100644
index 22b8af3..0000000
--- a/sr_vvms/route_table.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "ddphdr.h"
-#include "ddpcom.h"
-#include "route_table.h"
-
-GBLREF unsigned short	my_group_mask;
-GBLREF volset_tab	volset_table[DDP_MAX_VOLSETS];
-
-static routing_tab 	routing_table[MAXIMUM_CIRCUITS];
-static circuit_tab 	circuit_table[MAXIMUM_CIRCUITS * DDP_MAX_VOLSETS];
-
-void remove_circuits(ddp_hdr_t *dp)
-{
-	unsigned short	target_circuit, ckt;
-	routing_tab	*rp1, *rp2;
-	circuit_tab	*ct1, *ct2;
-
-	if (0 == (((ddp_announce_msg_t *)dp->txt)->group_mask & my_group_mask)) /* we are not part of any of the announcer's	 */
-		return;								/* groups; ignore announce/status change message */
-	target_circuit = dp->source_circuit_name;
-	for (rp1 = routing_table; (0 != (ckt = rp1->circuit_name)) && (ckt < target_circuit); rp1++)
-		;
-	if (ckt == target_circuit)
-	{
-		for (rp2 = rp1 + 1; 0 != rp2->circuit_name; rp2++)
-			;
-		memmove(rp1, rp1 + 1, (rp2 - rp1) * SIZEOF(*rp1));
-	}
-	for (ct2 = ct1 = circuit_table; 0 != ct1->volset_name; ct1++)
-	{
-		if (ct1->circuit_name != target_circuit)
-			*ct2++ = *ct1;
-	}
-	*ct2 = *ct1;
-	return;
-}
-
-boolean_t enter_circuits(ddp_hdr_t *dp)
-{
-	unsigned short 		target_circuit, ckt, vol, *fb;
-	routing_tab		*rp1, *rp2;
-	circuit_tab		*ct1, *ctop;
-	int 			volset_index;
-	ddp_announce_msg_t	*ap;
-
-	ap = (ddp_announce_msg_t *)dp->txt;
-	if (0 == (ap->group_mask & my_group_mask)) /* we are not part of any of the announcer's groups; ignore announce */
-		return FALSE;
-	target_circuit = dp->source_circuit_name;
-	for (rp1 = routing_table; (0 != (ckt = rp1->circuit_name)) && (ckt < target_circuit); rp1++)
-		;
-	if (ckt != target_circuit)
-	{
-		for (rp2 = rp1 + 1; 0 != rp2->circuit_name; rp2++)
-			;
-		memmove(rp1 + 1, rp1, (rp2 - rp1) * SIZEOF(*rp1));
-		rp1->circuit_name = target_circuit;
-		memcpy(rp1->ether_addr, ap->ether_addr, ETHERADDR_LENGTH);
-		memset(&rp1->incoming_users[0], 0, SIZEOF(rp1->incoming_users));
-		memset(&rp1->outgoing_users[0], 0, SIZEOF(rp1->outgoing_users));
-	}
-	for (ctop = circuit_table; 0 != ctop->volset_name; ctop++)
-		;
-	for (volset_index = 0; volset_index < DDP_MAX_VOLSETS; volset_index++)
-	{
-		if (0 != (vol = ap->volset[volset_index]))
-		{
-			for (ct1 = circuit_table; (0 != ct1->volset_name) && (ct1->volset_name < vol); ct1++)
-				;
-			if (ct1->volset_name != vol)
-			{
-				memmove(ct1 + 1, ct1, (ctop - ct1) * SIZEOF(ct1));
-				ctop++;
-				ct1->volset_name = vol;
-				ct1->circuit_name = target_circuit;
-			}
-		}
-	}
-	return TRUE;
-}
-
-unsigned short find_circuit(unsigned short vol)
-{ /* given volume set, find circuit */
-	circuit_tab	*ct;
-	unsigned short	volset;
-
-	for (volset = vol, ct = circuit_table; 0 != ct->volset_name && ct->volset_name < volset; ct++)
-		;
-	if (volset == ct->volset_name)
-		return ct->circuit_name;
-	return 0;
-}
-
-routing_tab *find_route(unsigned short ckt)
-{ /* given circuit, find the corresponding routing table entry */
-	routing_tab	*rt;
-	unsigned short	circuit;
-
-	for (circuit = ckt, rt = routing_table; 0 != rt->circuit_name && rt->circuit_name < circuit; rt++)
-		;
-	if (circuit == rt->circuit_name)
-		return rt;
-	return 0;
-}
-
-void reset_user_count(int jobindex)
-{
-	routing_tab *rt;
-
-	for (rt = routing_table; 0 != rt->circuit_name; rt++)
-		rt->outgoing_users[jobindex] = 0;
-}
-
-boolean_t enter_vug(unsigned short vol, unsigned short uci, mstr *gld)
-{
-	boolean_t	new_entry;
-	volset_tab	*volset_entry, *volset_top;
-	uci_gld_pair	*ug, **ugp;
-
-	assert(0 != vol);
-	assert(0 != uci);
-	assert(NULL != gld);
-	assert(NULL != gld->addr);
-	assert(0 != gld->len);
-	for (volset_entry = volset_table; 0 != volset_entry->vol && volset_entry->vol < vol; volset_entry++)
-		;
-	if (volset_entry->vol != vol)
-	{
-		for (volset_top = volset_entry; 0 != volset_top->vol; volset_top++)
-			;
-		assert(DDP_MAX_VOLSETS >= volset_top + 1 - volset_table); /* We expect the callers of this function to make sure
-									   * that no more than DDP_MAX_VOLSETS vols are entered */
-		memmove(volset_entry + 1, volset_entry, (volset_top - volset_entry) * SIZEOF(*volset_entry));/* make space */
-		volset_entry->vol = vol;
-		volset_entry->ug = NULL;
-	}
-	for (ugp = &volset_entry->ug; NULL != *ugp && (*ugp)->uci < uci; ugp = &(*ugp)->next)
-		;
-	if (FALSE != (new_entry = (NULL == *ugp || (*ugp)->uci != uci)))
-	{
-		ug = (uci_gld_pair *)malloc(SIZEOF(uci_gld_pair));
-		ug->gld.addr = malloc(gld->len);
-		ug->next = *ugp;
-		*ugp = ug;
-		ug->uci = uci;
-	} else /* if there are multiple entries in the configuration file for the same <vol, uci> pair, the last one wins */
-	{
-		ug = *ugp;
-		free(ug->gld.addr);
-		ug->gld.addr = malloc(gld->len);
-	}
-	memcpy(ug->gld.addr, gld->addr, gld->len);
-	ug->gld.len = gld->len;
-	return new_entry;
-}
-
-void clear_volset_table(void)
-{
-	volset_tab	*volset_entry;
-	uci_gld_pair	*ug, *free_ug;
-
-	for (volset_entry = volset_table; 0 != volset_entry->vol; volset_entry++)
-	{
-		for (ug = volset_entry->ug; ug != NULL; )
-		{
-			free_ug = ug;
-			ug = ug->next;
-			free(free_ug->gld.addr);
-			free(free_ug);
-		}
-	}
-	memset(volset_table, 0, SIZEOF(volset_table) * SIZEOF(volset_table[0]));
-	return;
-}
-
-mstr *find_gld(unsigned short vol, unsigned short uci)
-{ /* given <vol,uci> pair, find the global directory used by the server */
-	volset_tab	*volset_entry;
-	uci_gld_pair	*ug;
-
-	if (0 == vol || 0 == uci)
-		return NULL;
-	for (volset_entry = volset_table; 0 != volset_entry->vol && volset_entry->vol < vol; volset_entry++)
-		;
-	if (vol == volset_entry->vol)
-	{
-		assert(NULL != volset_entry->ug); /* there has to be at least one uci/gld entry */
-		for (ug = volset_entry->ug; ug != NULL && ug->uci < uci; ug = ug->next)
-			;
-		if (NULL != ug && ug->uci == uci)
-			return &ug->gld;
-	}
-	return NULL;
-}
diff --git a/sr_vvms/route_table.h b/sr_vvms/route_table.h
deleted file mode 100644
index ffbf3bf..0000000
--- a/sr_vvms/route_table.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef ROUTE_TABLE_H_INCLUDED
-#define ROUTE_TABLE_H_INCLUDED
-
-void 		remove_circuits(ddp_hdr_t *dp);
-boolean_t	enter_circuits(ddp_hdr_t *dp);
-unsigned short	find_circuit(unsigned short vol);
-routing_tab	*find_route(unsigned short ckt);
-void		reset_user_count(int jobindex);
-boolean_t 	enter_vug(unsigned short vol, unsigned short uci, mstr *gld);
-void 		clear_volset_table(void);
-mstr 		*find_gld(unsigned short vol, unsigned short uci);
-
-#endif /* ROUTE_TABLE_H_INCLUDED */
diff --git a/sr_vvms/rtn_tbl_sort.c b/sr_vvms/rtn_tbl_sort.c
deleted file mode 100644
index d17d40b..0000000
--- a/sr_vvms/rtn_tbl_sort.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2004, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* NOTE: The rtn_tbl_qsort below uses exactly the same quick sort algorithm used in stpg_sort() and gvcst_kill_sort() */
-
-#include "mdef.h"
-#include <rtnhdr.h>
-#include "obj_file.h"		/* for RNAMB_PREF_LEN */
-#include "objlangdefs.h"	/* for EGPS$S_NAME */
-#include "min_max.h"		/* MIDENT_CMP needs MIN */
-
-#define S_CUTOFF		15
-
-void rtn_tbl_qsort(rtn_tabent *start, rtn_tabent *end);
-
-void rtn_tbl_sort(rtn_tabent *rtab_base, rtn_tabent *rtab_end)
-{
-	rtn_tabent	*start, *end;
-
-	for (start = rtab_base; start < rtab_end; start = end)
-	{ /* Since the table is already sorted by the VMS linker based on the first 26 characters of rt_name,
-	     we only need to sort those routines with longer than 26 char names. However, if the routine name
-	     starts with 26 all z's, it may not have been sorted. So, to avoid special cases, each iteration
-	     of this loop needs to find a contiguous segment of routines of more than 25 chars and invoke
-	     the quicksort on that segment. */
-		for (; start < rtab_end && start->rt_name.len < RNAME_SORTED_LEN; start++)
-			;
-		for (end = start; end < rtab_end && end->rt_name.len >= RNAME_SORTED_LEN; end++)
-			;
-		if (start < end)
-		{
-			if (end < rtab_end)
-				rtn_tbl_qsort(start, end - 1);
-			else
-				rtn_tbl_qsort(start, end);
-		}
-	}
-}
-
-/* Sorts a segment of contiguous routine table entries using the value of each rt_name.addr field as the key.
- * The algorithm is a modified QuickSort algorithm which assumes that top+1 has a greater key value than
- * any element in the segment. */
-void rtn_tbl_qsort(rtn_tabent *base, rtn_tabent *top)
-{
-	/* Since a pair of pointers are pushed at each level, the stack space of 64 is sufficient
-	 * upto a table size of 2**32 elements */
-	rtn_tabent	*stack[64], **sp;
-	rtn_tabent	v, t;
-	rtn_tabent	*l, *r;
-	rtn_tabent	*ix, *jx, *kx;
-	mident		*tval;
-	int		cmp;
-
-	sp = &stack[0];
-	l = base;
-	r = top;
-	for (;;)
-	{
-		if (r - l < S_CUTOFF)
-		{
-			for (ix  = l + 1;  ix <= r;  ix++)
-			{
-				for (jx = ix, t = *ix, tval = &t.rt_name; 1 < jx; jx--)
-				{
-					MIDENT_CMP(&(jx - 1)->rt_name, tval, cmp);
-					if (0 >= cmp)
-						break;
-					*jx = *(jx - 1);
-				}
-				if (ix != jx)
-					*jx = t;
-			}
-			if (sp <= stack)
-				break;
-			else
-			{	/* Pop the anchors of a subtable that were pushed earlier and begin a new sort */
-				l = *--sp;
-				r = *--sp;
-			}
-		} else
-		{
-			ix = l;
-			jx = r;
-			kx = l + ((int)(r - l) / 2); /* pivotal key */
-			/* Find the best possible pivotal key among ix, jx and kx (sorta median of those) */
-			MIDENT_CMP(&ix->rt_name, &jx->rt_name, cmp);
-			if (0 < cmp)
-			{
-				MIDENT_CMP(&jx->rt_name, &kx->rt_name, cmp);
-				if (0 < cmp)
-					kx = jx;
-				else
-				{
-					MIDENT_CMP(&ix->rt_name, &kx->rt_name, cmp);
-					if (0 >= cmp)
-						kx = ix;
-					/* else "kx" is already the right choice */
-				}
-			} else
-			{
-				MIDENT_CMP(&jx->rt_name, &kx->rt_name, cmp);
-				if (0 > cmp)
-					kx = jx;
-				else
-				{
-					MIDENT_CMP(&ix->rt_name, &kx->rt_name, cmp);
-					if (0 < cmp)
-						kx = ix;
-					/* else "kx" is already the right choice */
-				}
-			}
-			/* Partition the table into two subtables based on the pivotal */
-			v = *kx;
-			*kx = *jx;
-			*jx = v;
-			tval = &v.rt_name;
-			ix--;
-			do
-			{
-				do
-				{
-					ix++;
-					MIDENT_CMP(&ix->rt_name, tval, cmp);
-				} while (cmp < 0);
-				do
-				{
-					jx--;
-					MIDENT_CMP(&jx->rt_name, tval, cmp);
-				} while (cmp > 0);
-				t = *ix;
-				*ix = *jx;
-				*jx = t;
-			} while (jx > ix);
-			*jx = *ix;
-			*ix = *r;
-			*r = t;
-
-			/* Ensure there are at least two more slots available in the stack for the pushes below */
-			assert((sp - &stack[0]) + 2 < (SIZEOF(stack)/SIZEOF(stack[0])));
-			/* Push the anchors of the large subtable into the stack and begin a new sort on the smaller subtable */
-			if (ix - l > r - ix)
-			{
-				*sp++ = ix - 1;
-				*sp++ = l;
-				l = ix + 1;
-			}
-			else
-			{
-				*sp++ = r;
-				*sp++ = ix + 1;
-				r = ix - 1;
-			}
-		}
-	}
-	return;
-}
diff --git a/sr_vvms/rtnhdr.h b/sr_vvms/rtnhdr.h
deleted file mode 100644
index 1343001..0000000
--- a/sr_vvms/rtnhdr.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef RTNHDR_H_INCLUDED
-#define RTNHDR_H_INCLUDED
-
-/* rtnhdr.h - routine header */
-
-/* There are several references to this structure from assembly language; these include:
- *
- * From VAX VMS:	G_MSF.MAX,
- * 			GTM$FGNCALL.MAR, FGNCAL_RTN.MAR
- *
- * From Alpha VMS:	G_MSF.MAX,
- * 			GTM$FGNCAL.M64, FGNCAL_RTN.M64
- *
- * From Unix:	g_msf.si
- *
- * Any changes to the routine header must be reflected in those files as well.
- *
- * Warning: the lists above may not be complete.
- */
-
-/* rhead_struct is the routine header; it occurs at the beginning of the
- * object code part of each module.
- *
- * The routine header is initialized when a module is first linked into
- * an executable.  If a new version of that module is subsequently ZLINK'ed
- * into a running image, some of the fields will be updated to describe
- * the new version of the module so that existing references from other
- * modules to earlier versions of this module will be re-directed to the
- * current version.
- */
-
-typedef struct	rhead_struct
-{
-	char		jsb[RHEAD_JSB_SIZE];
-	mstr		src_full_name;		/* (updated) full source name of current module version */
-	mident		routine_name;
-	int4		vartab_off;		/* (updated) offset to variable table of current module version */
-	short int	vartab_len;		/* (updated) length of variable table of current module version */
-	int4		labtab_off;
-	short int	labtab_len;
-	int4		lnrtab_off;
-	short int	lnrtab_len;
-	int4		ptext_off;		/* (updated) offset to start of instructions for current module version */
-	int4		checksum;
-	uint4		compiler_qlf;		/* bit flags of compiler qualifiers used (see cmd_qlf.h) */
-	int4		old_rhead_off;
-	int4		current_rhead_off;	/* (updated) offset to routine header of current module version */
-	short int	temp_mvals;		/* (updated) temp_mvals value of current module version */
-	unsigned short	temp_size;		/* (updated) temp_size value of current module version */
-#ifdef HAS_LITERAL_SECT
-	int4		*linkage_ptr;		/* (updated) address of linkage Psect of current module version */
-	unsigned char	*literal_ptr;		/* (updated) address of literal Psect of current module version */
-#endif
-} rhdtyp;
-
-/* Although the names change from _ptr to _off is politically correct, (they ARE offsets, not pointers),
- * there is a lot of old code, espcially platform dependent code, that still deals with _ptr that we
- * do not wish to change at this time. Provide some translations for those entries to the proper ones.
-*/
-#define vartab_ptr		vartab_off
-#define labtab_ptr		labtab_off
-#define lnrtab_ptr		lnrtab_off
-#define ptext_ptr  		ptext_off
-#define old_rhead_ptr		old_rhead_off
-#define current_rhead_ptr 	current_rhead_off
-
-/* Macros for accessing routine header fields in a portable way */
-#define VARTAB_ADR(rtnhdr) ((var_tabent *)((char *)(rtnhdr) + (rtnhdr)->vartab_off))
-#define LABTAB_ADR(rtnhdr) ((lab_tabent *)((char *)(rtnhdr) + (rtnhdr)->labtab_off))
-#define LNRTAB_ADR(rtnhdr) ((lnr_tabent *)((char *)(rtnhdr) + (rtnhdr)->lnrtab_off))
-#define LITERAL_ADR(rtnhdr) ((unsigned char *)(rtnhdr)->literal_ptr)
-#define LINKAGE_ADR(rtnhdr) ((caddr_t)(rtnhdr)->linkage_ptr)
-#define PTEXT_ADR(rtnhdr) ((unsigned char *)((char *)(rtnhdr) + (rtnhdr)->ptext_off))
-#define PTEXT_END_ADR(rtnhdr) ((unsigned char *)((char *)(rtnhdr) + (rtnhdr)->vartab_off))
-#define CURRENT_RHEAD_ADR(rtnhdr) ((rhdtyp *)((char *)(rtnhdr) + (rtnhdr)->current_rhead_off))
-#define OLD_RHEAD_ADR(rtnhdr) ((rhdtyp *)((char *)(rtnhdr) + (rtnhdr)->old_rhead_off))
-#define LINE_NUMBER_ADDR(rtnhdr, lnr_tabent_ptr) ((unsigned char *)((char *)(rtnhdr) + *(lnr_tabent_ptr)))
-#define LABENT_LNR_ENTRY(rtnhdr, lab_tabent_ptr) ((lnr_tabent *)((char *)(rtnhdr) + (lab_tabent_ptr)->lab_ln_ptr))
-#define LABEL_ADDR(rtnhdr, lab_tabent_ptr)(CODE_BASE_ADDR(rtnhdr) + *(LABENT_LNR_ENTRY(rtnhdr, lab_tabent_ptr)))
-#define CODE_BASE_ADDR(rtnhdr) ((unsigned char *)(rtnhdr))
-#define CODE_OFFSET(rtnhdr, addr) ((char *)(addr) - (char *)(rtnhdr))
-
-#define DYNAMIC_LITERALS_ENABLED(rtnhdr) FALSE
-
-/* Macro to determine if given address is inside code segment. Note that even though
- * the PTEXT_END_ADR macro is the address of end_of_code + 1, we still want a <= check
- * here because in many cases, the address being tested is the RETURN address from a
- * call that was done as the last instruction in the code segment. Sometimes this call
- * is to an error or it could be the implicit quit. On HPUX, the delay slot for the
- * implicit quit call at the end of the module can also cause the problem. Without
- * the "=" check also being there, the test will fail when it should succeed.
- */
-#define ADDR_IN_CODE(caddr, rtnhdr) (PTEXT_ADR((rtnhdr)) <= (caddr) && (caddr) <= PTEXT_END_ADR((rtnhdr)))
-
-/* Types that are different across the versions */
-#define LABENT_LNR_OFFSET lab_ln_ptr
-
-/* Variable table entry */
-typedef mname_entry var_tabent; /* the actual variable name is stored in the literal text pool */
-
-/* Routine table entry */
-typedef struct
-{
-	mident		rt_name;	/* The name of the routine (in the literal text pool) */
-	rhdtyp		*rt_adr;	/* Pointer to its routine header */
-} rtn_tabent;
-
-/* Line number table entry */
-typedef int4	lnr_tabent;
-
-typedef struct
-{
-	mident			lab_name;	/* The name of the label */
-	int4 			lab_ln_ptr;	/* Offset of the lnrtab entry from the routine header */
-	boolean_t		has_parms;	/* Flag to indicate whether the callee has a formallist */
-} lab_tabent;
-
-/* Label table entry proxy for run-time linking */
-typedef struct
-{
-	int4			lab_ln_ptr;	/* Pointer to lnrtab entry offset into code for this label */
-	boolean_t		has_parms;	/* Flag to indicate whether the callee has a formallist */
-} lab_tabent_proxy;
-
-/* Flag values for get_src_line call */
-#define VERIFY		TRUE
-#define NOVERIFY	FALSE
-
-int get_src_line(mval *routine, mval *label, int offset, mstr **srcret, rhdtyp **rtn_vec);
-void free_src_tbl(rhdtyp *rtn_vector);
-unsigned char *find_line_start(unsigned char *in_addr, rhdtyp *routine);
-int4 *find_line_addr(rhdtyp *routine, mstr *label, int4 offset, mident **lent_name);
-rhdtyp *find_rtn_hdr(mstr *name);
-boolean_t find_rtn_tabent(rtn_tabent **res, mstr *name);
-bool zlput_rname(rhdtyp *hdr);
-rhdtyp *make_dmode(void);
-void comp_lits(rhdtyp *rhead);
-rhdtyp  *op_rhdaddr(mval *name, rhdtyp *rhd);
-rhdtyp	*op_rhdaddr1(mval *name);
-lnr_tabent *op_labaddr(rhdtyp *routine, mval *label, int4 offset);
-void urx_resolve(rhdtyp *rtn, lab_tabent *lbl_tab, lab_tabent *lbl_top);
-char *rtnlaboff2entryref(char *entryref_buff, mident *rtn, mident *lab, int offset);
-void rtn_tbl_sort(rtn_tabent *base, rtn_tabent *end);
-boolean_t on_stack(rhdtyp *rtnhdr, boolean_t *need_duplicate);
-
-#endif /* RTNHDR_H_INCLUDED */
diff --git a/sr_vvms/runall.com b/sr_vvms/runall.com
deleted file mode 100644
index e950fee..0000000
--- a/sr_vvms/runall.com
+++ /dev/null
@@ -1,170 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2013 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$!	p1 - comma separated set of C files (wildcards supported '*' and '%')
-$!
-$ if (p1 .eqs. "")
-$ then
-$	write sys$output ""
-$ 	write sys$output "Syntax :  runall file1,file2,... "
-$	write sys$output ""
-$	write sys$output "            where wild-cards are accepted "
-$	write sys$output ""
-$	write sys$output "      e.g. runall t_end.c,gds*.c,gvcst_init.c,w*.c"
-$	write sys$output ""
-$ 	exit
-$ endif
-$!
-$ proc_verify = f$environment("VERIFY_PROCEDURE")
-$ image_verify = f$environment("VERIFY_IMAGE")
-$!
-$ set noverify
-$ pwd = f$environment("DEFAULT")
-$!
-$ on control_y then goto TERMINATE
-$ on severe_error then goto TERMINATE
-$ on error then goto TERMINATE
-$!
-$ minimal = f$trnlnm("minimal_build")
-$ bypass_vercheck = f$trnlnm("runall_bypass_version_check")
-$ stop_with_compile = f$trnlnm("runall_stop_with_compile")
-$!
-$ common_options := /standard=vaxc/share/assume=nowrit/float=g_float
-$ common_options := 'common_options'/warn=disable=(signedknown,signedmember)/inc=(gtm$src:,tcpip$examples:)
-$ ccdbg := cc'common_options'/define=(debug,nolicense)/debug/nooptimize
-$ ccbta := cc'common_options'/debug/nooptimize
-$ ccpro := cc'common_options'
-$!
-$ verno = f$trnlnm("gtm$verno")
-$ image = f$trnlnm("gtm$exe")
-$ img = f$extract(4,3,image)
-$!
-$ if (bypass_vercheck .eqs. ""  .and.  (f$extract(1,1,verno) .nes. "9"  .or.  f$extract(1,3,verno) .eqs. "990"))
-$ then
-$	write sys$output " "
-$	write sys$output "RUNALL-E-WRONGVERSION -- Cannot Runall Non-Developmental version :: ",verno,""
-$	write sys$output "Define the logical, RUNALL_BYPASS_VERSION_CHECK to bypass this check"
-$	write sys$output " "
-$	goto TERMINATE
-$ endif
-$!
-$! rebuild this which won't cause any recompilations itself but may be usable.
-$ @gtm$tools:gen_gtm_threadgbl_deftypes
-$!
-$ write sys$output ""
-$ write sys$output "---------------------------------------------------------------------------------------------------"
-$ write sys$output " ****  Compiling from   USER:[LIBRARY.''verno'.SRC]  ------------>   USER:[LIBRARY.''verno'.''img'.OBJ]"
-$ write sys$output "---------------------------------------------------------------------------------------------------"
-$ write sys$output ""
-$ len_cur = 0
-$ len_index = 0
-$ len_max = f$length(p1)
-$ offset = 0
-$!
-$ star_element = ""
-$!
-$outer_loop:
-$	element = ""
-$	cur_index = 0
-$!
-$inner_loop:
-$	if (star_element .eqs. "")
-$	then
-$		t_element = f$element(len_index,",",p1)
-$		len_index = len_index + 1
-$		if (t_element .eqs. ",") then goto end_inner_loop
-$	endif
-$!
-$	if (f$locate("*",t_element) .eqs. f$length(t_element) .and. f$locate("%",t_element) .eqs. f$length(t_element))
-$	then
-$		leaf_element = t_element
-$	else
-$		star_element = f$search(t_element,1)
-$		leaf_element = star_element
-$	endif
-$!
-$	if (leaf_element .nes. "")
-$	then
-$		leaf_element_head = f$element(0,"]",leaf_element)
-$		if (leaf_element_head .nes. leaf_element)
-$		then
-$			leaf_element_tail = f$element(1,"]",leaf_element)
-$		else
-$			leaf_element_tail = leaf_element
-$		endif
-$!
-$		leaf_element = f$element(0,";",leaf_element_tail)
-$!
-$		if (f$location(".CLD",leaf_element) .nes. f$length(leaf_element))
-$		then
-$			set def gtm$vrt:['img'.obj]
-$			write sys$output "        ---->    set command/object/nolist gtm$src:''leaf_element'"
-$			set command/object/nolist gtm$src:'leaf_element'
-$			set def 'pwd'
-$		else
-$			if (f$location(".MSG",leaf_element) .nes. f$length(leaf_element))
-$			then
-$				set def gtm$vrt:['img'.obj]
-$				write sys$output "        ---->    message object/nolist gtm$src:''leaf_element'"
-$				message /object/nolist gtm$src:'leaf_element'
-$				set def 'pwd'
-$			else
-$				if (leaf_element .nes. "SECSHR_DB_CLNUP.C" .and. leaf_element .nes. "SEC_SHR_BLK_BUILD.C")
-$				then
-$					element = element + "," + leaf_element
-$					cur_index = cur_index + 1
-$				endif
-$			endif
-$		endif
-$	endif
-$!
-$	if (cur_index .eqs. 5) then goto end_inner_loop
-$	goto inner_loop
-$!
-$end_inner_loop:
-$	if (element .nes. "")
-$	then
-$		element = element - ","
-$		set def gtm$vrt:['img'.obj]
-$		write sys$output "        ---->    cc''img' gtm$src:''element'"
-$		cc'img' gtm$src:'element'
-$		set def 'pwd'
-$		goto outer_loop
-$	endif
-$!
-$ write sys$output ""
-$!
-$end_outer_loop:
-$!
-$ set def gtm$vrt:['img'.obj]
-$ libr/repl mumps *.obj
-$ delete/nolog *.obj;*
-$!
-$ if (stop_with_compile .nes. "")
-$ then
-$ 	goto TERMINATE
-$ endif
-$!
-$ write sys$output ""
-$ write sys$output "----------------------------------------------------------------------------------"
-$ write sys$output " ****  Linking and forming executables in  USER:[LIBRARY.''verno'.''img']"
-$ write sys$output "----------------------------------------------------------------------------------"
-$ write sys$output ""
-$!
-$ @gtm$tools:build'img' 'verno' V72
-$!
-$ write sys$output ""
-$ write sys$output ""
-$!
-$TERMINATE:
-$ set def 'pwd'
-$ temp = f$verify(proc_verify, image_verify)
-$!
diff --git a/sr_vvms/same_device_check.c b/sr_vvms/same_device_check.c
deleted file mode 100644
index 3e0faf5..0000000
--- a/sr_vvms/same_device_check.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-
-#define TRL_OFF 4
-
-GBLREF io_pair		io_curr_device;		/* current device	*/
-
-/* This module checks whether standard and out are the same.
-In VMS, it gets the input device from the previously established GT.M structure and the output device from its caller.
-In UNIX, it ignores its arguments and gets the devices from the system designators */
-bool   same_device_check(mstr tname, char buf[MAX_TRANS_NAME_LEN])
-{
-	if (io_curr_device.in->type == io_type(&tname))
-	{
-		if (io_curr_device.in->trans_name->len == tname.len - TRL_OFF &&
-		    !memcmp(&io_curr_device.in->trans_name->dollar_io[0],
-		    &buf[TRL_OFF], tname.len - TRL_OFF))
-			return TRUE;
-	}
-	return FALSE;
-}
diff --git a/sr_vvms/send_msg.c b/sr_vvms/send_msg.c
deleted file mode 100644
index 49c145b..0000000
--- a/sr_vvms/send_msg.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_stdio.h"
-#include <stdarg.h>
-
-#include "error.h"
-#include "fao_parm.h"
-#include "util.h"
-#include "gtmmsg.h"
-
-GBLREF bool caller_id_flag;
-
-#define NOFLUSH 0
-#define FLUSH   1
-#define RESET   2
-#define OPER    4
-
-
-
-/*
-**  WARNING:    For chained error messages, all messages MUST be followed by an fao count;
-**  =======     zero MUST be specified if there are no parameters.
-*/
-
-/* This routine is a variation on the unix version of rts_error, and has an identical interface */
-
-void send_msg(int msg_id_arg, ...)
-{
-        va_list		var;
-        int		arg_count, dummy, fao_actual, fao_count, fao_list[MAX_FAO_PARMS + 1], i, msg_id;
-        char		msg_buffer[1024];
-        mstr		msg_string;
-	char		*save_util_outptr;
-	va_list		save_last_va_list_ptr;
-	boolean_t	util_copy_saved = FALSE;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-        VAR_START(var, msg_id_arg);
-        va_count(arg_count);
-        assert(arg_count > 0);
-	msg_id = msg_id_arg;
-	if ((NULL != TREF(util_outptr)) && (TREF(util_outptr) != TREF(util_outbuff_ptr)))
-	{
-		SAVE_UTIL_OUT_BUFFER(save_util_outptr, save_last_va_list_ptr, util_copy_saved);
-	}
-        util_out_print(NULL, RESET);
-
-        for (;;)
-        {
-                --arg_count;
-
-                msg_string.addr = msg_buffer;
-                msg_string.len = SIZEOF(msg_buffer);
-                gtm_getmsg(msg_id, &msg_string);
-
-                if (arg_count > 0)
-                {
-                        fao_actual = va_arg(var, int);
-                        --arg_count;
-
-                        fao_count = fao_actual;
-                        if (fao_count > MAX_FAO_PARMS)
-			{
-				assert(FALSE);
-				fao_count = MAX_FAO_PARMS;
-			}
-                } else
-                        fao_actual = fao_count = 0;
-
-                memset(fao_list, 0, SIZEOF(fao_list));
-
-                for (i = 0;  i < fao_count;  ++i)
-                {
-                        fao_list[i] = va_arg(var, int);
-                        --arg_count;
-                }
-
-		/* Currently there are a max of 34 fao parms (MAX_FAO_PARMS) allowed, hence passing upto fao_list[33].
-		 * An assert is added to ensure this code is changed whenever the macro MAX_FAO_PARMS is changed.
-		 * The # of arguments passed below should change accordingly.
-		 */
-		assert(MAX_FAO_PARMS == 34);
-		util_out_print(msg_string.addr, NOFLUSH, fao_list[0], fao_list[1], fao_list[2], fao_list[3], fao_list[4],
-			fao_list[5], fao_list[6], fao_list[7], fao_list[8], fao_list[9], fao_list[10], fao_list[11], fao_list[12],
-			fao_list[13], fao_list[14], fao_list[15], fao_list[16], fao_list[17], fao_list[18], fao_list[19],
-			fao_list[20], fao_list[21], fao_list[22], fao_list[23], fao_list[24], fao_list[25], fao_list[26],
-			fao_list[27], fao_list[28], fao_list[29], fao_list[30], fao_list[31], fao_list[32], fao_list[33]);
-
-                if (arg_count < 1)
-                {
-                        if (caller_id_flag)
-                                PRINT_CALLERID;
-                        break;
-                } else
-                	msg_id = va_arg(var, int);
-                util_out_print("!/", NOFLUSH);
-        }
-	va_end(var);
-
-        util_out_print(NULL, OPER);
-	RESTORE_UTIL_OUT_BUFFER(save_util_outptr, save_last_va_list_ptr, util_copy_saved);
-        /* it has been suggested that this would be a place to check a view_debugN
-         * and conditionally enter a "forever" loop on wcs_sleep for unix debugging
-         */
-}
diff --git a/sr_vvms/set_jnl_file_close.c b/sr_vvms/set_jnl_file_close.c
deleted file mode 100644
index babddcd..0000000
--- a/sr_vvms/set_jnl_file_close.c
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lckdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "efn.h"
-#include "error.h"
-#include "jnl.h"
-#include "locks.h"
-#include "wcs_flu.h"
-
-GBLREF	gd_region	*gv_cur_region;
-GBLREF	boolean_t       is_src_server;
-GBLREF 	jnl_gbls_t	jgbl;
-
-static	const	int4    delta_30_sec[2] = { -300000000, -1 };
-
-static	void	enq_timeout_ast(sgmnt_addrs *csa)
-{
-	uint4	status;
-
-	assert(0 != csa->jnl->jnllsb->lockid);
-	status = gtm_deq(csa->jnl->jnllsb->lockid, NULL, PSL$C_USER, LCK$M_CANCEL);
-	assert(SS$_NORMAL == status);
-	csa->jnl->jnllsb->lockid = 0;
-}
-
-uint4	set_jnl_file_close(set_jnl_file_close_opcode_t set_jnl_file_close_opcode)
-{
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	uint4			status, jnl_status;
-	jnl_private_control	*jpc;
-
-	csa = &FILE_INFO(gv_cur_region)->s_addrs;
-	csd = csa->hdr;
-	jpc = csa->jnl;
-	assert(!is_src_server);	/* source server does not hold the journal lock (jpc->jnllsb) so it should never come here */
-	assert(TRUE == csa->now_crit);
-	jnl_status = jnl_ensure_open();
-	if (jnl_status)
-		rts_error(VARLSTCNT(6) jnl_status, 4, JNL_LEN_STR(csd), DB_LEN_STR(gv_cur_region));
-	assert(NOJNL != jpc->channel);
-	status = sys$setimr(efn_timer, delta_30_sec, enq_timeout_ast, csa, 0);
-	if (SS$_NORMAL == status)
-	{	/* Notify any active GT.M processes (via a blocking AST) that they must close the journal file */
-		csd->jnl_state = jnl_closed;
-		status = gtm_enqw(EFN$C_ENF, LCK$K_EXMODE, jpc->jnllsb, LCK$M_CONVERT | LCK$M_NODLCKBLK,
-						NULL, 0, NULL, 0, NULL, PSL$C_USER, 0);
-		if (SS$_NORMAL == status)
-			status = jpc->jnllsb->cond;
-		if (SS$_NORMAL == status)
-		{	/* The cantim below also has the side effect of cancelling all pending dbsync timers, but it is
-			 * fine since anyway we are going to do the dbsync timer's job, i.e. a wcs_flu() right here.
-			 */
-			sys$cantim(csa, PSL$C_USER);
-			if (0 != jpc->jnllsb->lockid)
-			{
-				status = gtm_deq(jpc->jnllsb->lockid, NULL, PSL$C_USER, 0);
-				assert(SS$_NORMAL == status);
-				jpc->jnllsb->lockid = 0;
-			}
-			/* Re-enable journalling so that we can clean up */
-			csd->jnl_state = jnl_open;
-			switch (set_jnl_file_close_opcode)
-			{
-			case SET_JNL_FILE_CLOSE_EXTEND:
-				assert(0 == jpc->pini_addr);
-				/* at this point we have the new journal opened but have released the jpc->jnllsb lock.
-				 * the best thing to do here is to do a gtm_enqw() of jpc->jnllsb and get that journal lock
-				 * in CR mode. but since this change is going in last minute in V4.3-001, and that change involves
-				 * dealing with system calls, a relatively safer but sleazy overhead method is used.
-				 * We close the file here. jnl_file_extend() then re-opens the journal immediately.
-				 * jnl_ensure_open() makes sure we reopen the journal file and get the jnllsb lock in the
-				 * appropriate mode. This can be improved in V4.4 --- nars -- 2002/04/18
-				 */
-				jnl_file_close(gv_cur_region, FALSE, FALSE);
-				/* At this point, jpc->cycle == jb->cycle (due to the jnl_ensure_open() above in this routine)
-				 * although jpc->channel is NOJNL. It is desired that jnl_ensure_open() will do only a
-				 * JNL_FILE_SWITCHED(jpc) check (in the future) and not the (NOJNL == jpc->channel) check.
-				 * That would mean the jnl_ensure_open() done immediately after returning from here to
-				 * jnl_file_extend() is going to consider there is nothing to open as the cycle numbers match.
-				 * To avoid this situation, we decrement the private cycle to induce a cycle mismatch.
-				 */
-				jpc->cycle--;
-				break;
-			case SET_JNL_FILE_CLOSE_RUNDOWN:
-				if (!jgbl.mur_extract)
-				{
-					if (0 == jpc->pini_addr)
-						jnl_put_jrt_pini(csa);
-					jnl_put_jrt_pfin(csa);
-				}
-				if (dba_mm == csd->acc_meth)			/* this should parallel vvms/gds_rundown() */
-					sys$cantim(gv_cur_region, PSL$C_USER);	/* see comment there for details. */
-				jnl_file_close(gv_cur_region, TRUE, FALSE);
-				break;
-			case SET_JNL_FILE_CLOSE_SETJNL:
-				assert(0 == jpc->pini_addr);
-			case SET_JNL_FILE_CLOSE_BACKUP:
-				if (0 == jpc->pini_addr)
-					jnl_put_jrt_pini(csa);
-				wcs_flu(WCSFLU_FLUSH_HDR | WCSFLU_WRITE_EPOCH);
-				jnl_put_jrt_pfin(csa);
-				jnl_file_close(gv_cur_region, TRUE, TRUE);
-				break;
-			default:
-				GTMASSERT;
-			}
-		}
-	}
-	assert(SS$_NORMAL == status);
-	return (status);
-}
diff --git a/sr_vvms/set_num_additional_processors.c b/sr_vvms/set_num_additional_processors.c
deleted file mode 100644
index cb3637f..0000000
--- a/sr_vvms/set_num_additional_processors.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <syidef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-
-#include "vmsdtype.h"
-#include "send_msg.h"
-#include "set_num_additional_processors.h"
-
-GBLREF int	num_additional_processors;
-
-void	set_num_additional_processors(void)
-{
-	struct
-	{
-		item_list_3	item[1];
-		int4		terminator;
-	}		item_list;
-	unsigned short	iosb[4];
-	uint4	mode, status, dummy, numcpus = 1;
-	error_def(ERR_NUMPROCESSORS);
-
-	item_list.item[0].buffer_length		= SIZEOF(numcpus);
-	item_list.item[0].item_code		= SYI$_ACTIVECPU_CNT;
-	item_list.item[0].buffer_address	= &numcpus;
-	item_list.item[0].return_length_address	= &dummy;
-
-	item_list.terminator = 0;
-
-	if ((status = sys$getsyiw(EFN$C_ENF, NULL, NULL, &item_list, iosb, NULL, 0)) != SS$_NORMAL  ||
-	    (status = iosb[0]) != SS$_NORMAL)
-	{
-		numcpus = 1;
-		send_msg(VARLSTCNT(3) ERR_NUMPROCESSORS, 0, status);
-	}
-
-	num_additional_processors = numcpus - 1;
-}
diff --git a/sr_vvms/set_zstatus.c b/sr_vvms/set_zstatus.c
deleted file mode 100644
index 0379c0e..0000000
--- a/sr_vvms/set_zstatus.c
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2008 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <chfdef.h>
-#include <descrip.h>
-
-#include "stringpool.h"
-#include "mlkdef.h"
-#include "zshow.h"
-#include <rtnhdr.h>
-#include "stack_frame.h"
-#include "mvalconv.h"
-#include "error_trap.h"
-#include "trans_code_cleanup.h"
-
-GBLREF mval		dollar_zstatus, dollar_zerror;
-GBLREF mval             dollar_ztrap, dollar_etrap;
-GBLREF spdesc           rts_stringpool, stringpool;
-GBLREF stack_frame	*zyerr_frame, *frame_pointer;
-GBLREF mstr             *err_act;
-
-#define	DSZ_BUF_SIZ	512
-
-static short zs_size;
-int put_zstatus(struct dsc$descriptor_s *txt, unsigned char *buffer);
-
-unsigned char *set_zstatus(mstr *src, struct chf$signal_array *sig, unsigned char **ctxtp, boolean_t need_rtsloc)
-{
-	unsigned char	*b_line;	/* beginning of line (used to restart line) */
-	mval		val;		/* dummy mval */
-	int4		save_sig_args, save_sig_name;
-	unsigned char	zstatus_buff[DSZ_BUF_SIZ];
-	mval		*status_loc;
-	boolean_t	trans_frame;
-	short 		save_zs_size;
-	error_def(ERR_VMSMEMORY);
-
-	b_line = 0;
-	if (need_rtsloc)
-	{
-		/* get the line address of the last "known" MUMPS code that was executed.  MUMPS indirection
-		 * consitutes MUMPS code that is "unknown" is the sense that there is no line address for it.
-		 */
-		src->len = get_symb_line((unsigned char*)src->addr, &b_line, ctxtp) - (unsigned char*)src->addr;
-		trans_frame = (!(SFT_DM & frame_pointer->type) &&
-			       ((!(frame_pointer->type & SFT_COUNT || 0 == frame_pointer->type)) ||
-			        (SFT_ZINTR & frame_pointer->type)));
-		if (trans_frame)
-		{
-			save_sig_name = sig->chf$l_sig_name;
-			SET_ERR_CODE(frame_pointer, sig->chf$l_sig_name);
-		}
-	} else
-		trans_frame = FALSE;
-	MV_FORCE_MVAL(&val, sig->chf$l_sig_name) ;
-	n2s(&val);
-	memcpy(zstatus_buff, val.str.addr, val.str.len);
-	zs_size = val.str.len;
-	zstatus_buff[zs_size++] = ',';
-	if (0 != b_line)
-	{
-		memcpy(&(zstatus_buff[zs_size]), src->addr, src->len);
-		zs_size += src->len;
-	}
-	save_sig_args = sig->chf$l_sig_args;
-	assert(2 < sig->chf$l_sig_args);
-	sig->chf$l_sig_args -= 2;
-	sig->chf$l_sig_args |= 0x000F0000;
-	if (trans_frame)
-	{ /* currently no inserted message (sig->chf$l_sig_name) needs arguments.
-	     The following code needs to be changed for any new message with arguments */
-		sys$putmsg(sig, put_zstatus, 0, zstatus_buff);
-		save_zs_size = zs_size;
-		sig->chf$l_sig_name = save_sig_name;
-		sys$putmsg(sig, put_zstatus, 0, zstatus_buff);
-		zstatus_buff[save_zs_size + 1] = '-'; /* auxiliary msgs need prefix '-' instead of '%' */
-	} else
-		sys$putmsg(sig, put_zstatus, 0, zstatus_buff);
-	sig->chf$l_sig_args = save_sig_args;
-	status_loc = (NULL == zyerr_frame) ? &dollar_zstatus : &dollar_zerror;
-	status_loc->str.len = zs_size;
-	status_loc->str.addr = zstatus_buff;
-	assert(stringpool.base == rts_stringpool.base);
-	s2pool(&status_loc->str);
-	status_loc->mvtype = MV_STR;
-	/* If this is a VMSMEMORY issue, setting the ecode is of dubious worth since we are not going
-	   to drive any handlers and it can definitely be expensive in terms of memory use as ecode_add()
-	   (further down the pike) is likely to load the text of the module into storage if it can. So we bypass
-	   ecode setting for these two fatal errors. 02/2008 se
-	*/
-	if (ERR_VMSMEMORY != sig->chf$l_sig_name)
-		ecode_set(sig->chf$l_sig_name);
-	return (b_line);
-}
-
-int put_zstatus(struct dsc$descriptor_s *txt, unsigned char *buffer)
-{
-	short msg_len;
-
-	assert(DSZ_BUF_SIZ >= zs_size);
-	msg_len = (zs_size + 1 + txt->dsc$w_length < DSZ_BUF_SIZ ? 1 + txt->dsc$w_length : DSZ_BUF_SIZ - zs_size);
-	if (msg_len)
-	{
-		*(buffer + zs_size++) = ',';
-		memcpy(buffer + zs_size, txt->dsc$a_pointer, txt->dsc$w_length);
-		zs_size += txt->dsc$w_length;
-		assert(DSZ_BUF_SIZ >= zs_size);
-	}
-	return 0;	/* suppress display on SYS$OUTPUT */
-}
diff --git a/sr_vvms/setactive_silent.com b/sr_vvms/setactive_silent.com
deleted file mode 100644
index 60afa4f..0000000
--- a/sr_vvms/setactive_silent.com
+++ /dev/null
@@ -1,24 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! same as setactive.com except that this does not print output unless "set verify" is on
-$!
-$ if f$environment("VERIFY_PROCEDURE")
-$ then
-$	ver 'p1' 'p2'
-$ else
-$	define sys$output nl:
-$	define sys$error  nl:
-$	ver 'p1' 'p2'
-$	deassign sys$output
-$	deassign sys$error
-$ endif
-$!
diff --git a/sr_vvms/setfileprot.c b/sr_vvms/setfileprot.c
deleted file mode 100644
index 77380d9..0000000
--- a/sr_vvms/setfileprot.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* should not be called from runtime routines, otherwise, get rid of the util_out_print/gtm_putmsg */
-#include "mdef.h"
-
-#include <rms.h>
-#include "util.h"
-#include "setfileprot.h"
-#include "gtmmsg.h"
-
-boolean_t setfileprot(char *filename, int4 filelen, unsigned short mask)
-{
-	struct FAB	fab;
-	struct XABPRO	xabpro;
-	int4		status;
-
-	fab = cc$rms_fab;
-	xabpro = cc$rms_xabpro;
-
-	fab.fab$l_fop = FAB$M_MXV | FAB$M_CBT | FAB$M_TEF | FAB$M_CIF;
-	fab.fab$b_fac = FAB$M_GET | FAB$M_PUT | FAB$M_BIO | FAB$M_TRN;
-	fab.fab$l_xab = &xabpro;
-	fab.fab$l_fna = filename;
-	fab.fab$b_fns = filelen;
-
-	if (RMS$_NORMAL != (status = sys$open(&fab)))
-	{
-		gtm_putmsg(VARLSTCNT(1) status);
-		util_out_print("Error openning !AD", TRUE, filelen, filename);
-		return FALSE;
-	}
-
-	xabpro.xab$w_pro = mask;
-
-	if (RMS$_NORMAL != (status = sys$close(&fab)))
-	{
-                gtm_putmsg(VARLSTCNT(1) status);
-                util_out_print("Error closing !AD", TRUE, filelen, filename);
-                return FALSE;
-        }
-
-	return TRUE;
-}
diff --git a/sr_vvms/setfileprot.h b/sr_vvms/setfileprot.h
deleted file mode 100644
index 51786a9..0000000
--- a/sr_vvms/setfileprot.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef SETFILEPROT_INCLUDED
-#define SETFILEPROT_INCLUDED
-
-boolean_t setfileprot(char *filename, int4 filelen, unsigned short mask);
-
-#endif /* SETFILEPROT_INCLUDED */
diff --git a/sr_vvms/setterm.c b/sr_vvms/setterm.c
deleted file mode 100644
index 30a5a92..0000000
--- a/sr_vvms/setterm.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include <efndef.h>
-
-#include "io.h"
-#include "iottdef.h"
-#include "outofband.h"
-#include "setterm.h"
-
-GBLREF int4		outofband;
-
-void resetterm(io_desc *iod)
-{
-	short		iosb[4];
-	uint4 	status;
-	d_tt_struct     *tt_ptr;
-
-	assert(iod->type == tt);
-	if (outofband)
-	{
-		outofband_action(FALSE);
-		assert(FALSE);
-	}
-	tt_ptr = (d_tt_struct *) iod->dev_sp;
-	status = sys$qiow(EFN$C_ENF, tt_ptr->channel ,(IO$_SETMODE | IO$M_OUTBAND) ,iosb ,NULL ,0 ,0 ,0 ,0 ,0 ,0 ,0);
-	if (status == SS$_NORMAL)
-		status = iosb[0];
-	if (status != SS$_NORMAL)
-		rts_error(VARLSTCNT(1) status);
-}
-
-void setterm(io_desc *iod)
-{
-	uint4 	disable_msk, dummy_msk, status;
-
-	assert(iod->type == tt);
-	disable_msk = CTRLY_MSK;
-	status = lib$disable_ctrl(&disable_msk, &dummy_msk);
-	if (status != SS$_NORMAL)
-		rts_error(VARLSTCNT(1) status);
-	iott_resetast(iod);
-}
diff --git a/sr_vvms/sgtm_putmsg.c b/sr_vvms/sgtm_putmsg.c
deleted file mode 100644
index 08bcdf0..0000000
--- a/sr_vvms/sgtm_putmsg.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-
-#include "gtm_stdio.h"
-#include <stdarg.h>
-
-#include "error.h"
-#include "fao_parm.h"
-#include "util.h"
-#include "gtmmsg.h"
-#include "sgtm_putmsg.h"
-
-/*
-**  WARNING:    For chained error messages, all messages MUST be followed by an fao count;
-**  =======     zero MUST be specified if there are no parameters.
-*/
-
-/* This routine is a variation on the unix version of rts_error, and has an identical interface */
-
-void sgtm_putmsg(char *out_str, ...)
-{
-	va_list	var;
-	int	arg_count, dummy, fao_actual, fao_count, fao_list[MAX_FAO_PARMS + 1], i, msg_id;
-	char	msg_buffer[1024];
-	mstr	msg_string;
-	int	util_outbufflen;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	VAR_START(var, out_str);
-	va_count(arg_count);
-	arg_count--;
-	assert(arg_count > 0);
-	util_out_print(NULL, RESET);
-
-	for (;;)
-	{
-		msg_id = va_arg(var, int);
-		--arg_count;
-
-		msg_string.addr = msg_buffer;
-		msg_string.len = SIZEOF(msg_buffer);
-		gtm_getmsg(msg_id, &msg_string);
-
-		if (arg_count > 0)
-		{
-			fao_actual = va_arg(var, int);
-			--arg_count;
-
-			fao_count = fao_actual;
-			if (fao_count > MAX_FAO_PARMS)
-			{
-				assert(FALSE);
-				fao_count = MAX_FAO_PARMS;
-			}
-		}
-		else
-			fao_actual = fao_count
-				   = 0;
-
-		memset(fao_list, 0, SIZEOF(fao_list));
-
-		for (i = 0;  i < fao_count;  ++i)
-		{
-			fao_list[i] = va_arg(var, int);
-			--arg_count;
-		}
-
-		/* Currently there are a max of 34 fao parms (MAX_FAO_PARMS) allowed, hence passing upto fao_list[33].
-		 * An assert is added to ensure this code is changed whenever the macro MAX_FAO_PARMS is changed.
-		 * The # of arguments passed below should change accordingly.
-		 */
-		assert(MAX_FAO_PARMS == 34);
-		util_out_print(msg_string.addr, NOFLUSH, fao_list[0], fao_list[1], fao_list[2], fao_list[3], fao_list[4],
-			fao_list[5], fao_list[6], fao_list[7], fao_list[8], fao_list[9], fao_list[10], fao_list[11], fao_list[12],
-			fao_list[13], fao_list[14], fao_list[15], fao_list[16], fao_list[17], fao_list[18], fao_list[19],
-			fao_list[20], fao_list[21], fao_list[22], fao_list[23], fao_list[24], fao_list[25], fao_list[26],
-			fao_list[27], fao_list[28], fao_list[29], fao_list[30], fao_list[31], fao_list[32], fao_list[33]);
-
-		if (arg_count < 1)
-			break;
-
-		util_out_print("!/", NOFLUSH);
-	}
-	va_end(var);
-	util_out_print(NULL, SPRINT);
-	util_outbufflen = STRLEN(TREF(util_outbuff_ptr));
-	memcpy(out_str, TREF(util_outbuff_ptr), util_outbufflen);
-	out_str[util_outbufflen] = '\n';
-	out_str[util_outbufflen + 1] = '\0';
-}
diff --git a/sr_vvms/source_file.c b/sr_vvms/source_file.c
deleted file mode 100644
index 75a5b63..0000000
--- a/sr_vvms/source_file.c
+++ /dev/null
@@ -1,207 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_limits.h"
-
-#include <descrip.h>
-#include <ssdef.h>
-#include <rms.h>
-#include <devdef.h>
-
-#include "compiler.h"
-#include "cmd_qlf.h"
-#include "source_file.h"
-
-GBLREF char			object_file_name[];
-GBLREF char			rev_time_buf[];
-GBLREF char			source_file_name[];
-GBLREF unsigned char 		*source_buffer;
-GBLREF short			object_name_len;
-GBLREF unsigned short		source_name_len;
-GBLREF command_qualifier	cmd_qlf;
-GBLREF mident			routine_name, module_name;
-GBLREF struct FAB		obj_fab;			/* file access block for the object file */
-
-error_def(ERR_ERRORSUMMARY);
-error_def(ERR_FILENOTFND);
-error_def(ERR_OBJFILERR);
-error_def(ERR_SRCFILERR);
-
-static	bool			tt_so_do_once;
-static struct FAB fab;
-static struct RAB rab;
-
-void compile_source_file(unsigned short flen, char *faddr, boolean_t mExtReqd /* not used in VMS */)
-{
-	struct FAB	srch_fab;
-	struct NAM	srch_nam;
-	char		exp_string_area[255], list_file[256], obj_file[256], ceprep_file[256];
-	int		status;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	obj_fab = cc$rms_fab;
-	srch_fab = cc$rms_fab;
-	srch_fab.fab$l_dna = DOTM;
-	srch_fab.fab$b_dns = STR_LIT_LEN(DOTM);
-	srch_fab.fab$l_fna = faddr;
-	srch_fab.fab$b_fns = flen;
-	srch_fab.fab$l_fop |= FAB$M_NAM;
-	srch_fab.fab$l_nam = &srch_nam;
-	srch_nam = cc$rms_nam;
-	srch_nam.nam$l_rsa = source_file_name;
-	srch_nam.nam$b_rss = NAME_MAX;		/* 255 since PATH_MAX is 256 on 7.3-2 */
-	srch_nam.nam$l_esa = exp_string_area;
-	srch_nam.nam$b_ess = SIZEOF(exp_string_area);
-	status = sys$parse(&srch_fab);
-	if (RMS$_NORMAL != status)
-	{	dec_err(VARLSTCNT(4) ERR_SRCFILERR, 2, source_name_len, source_file_name);
-		dec_err(VARLSTCNT(1) status);
-		TREF(dollar_zcstatus) = ERR_ERRORSUMMARY;
-	} else
-	{
-		cmd_qlf.object_file.str.addr = obj_file;
-		cmd_qlf.object_file.str.len = 255;
-		cmd_qlf.list_file.str.addr = list_file;
-		cmd_qlf.list_file.str.len = 255;
-		cmd_qlf.ceprep_file.str.addr = ceprep_file;
-		cmd_qlf.ceprep_file.str.len = 255;
-		get_cmd_qlf(&cmd_qlf);
-		tt_so_do_once = FALSE;
-		for (; ;)
-		{
-			if (srch_fab.fab$l_dev & DEV$M_FOD)
-			{	status = sys$search(&srch_fab);
-				if (status == RMS$_NMF )
-				{	break;
-				}
-				else if (status == RMS$_FNF)
-				{	dec_err(VARLSTCNT(4) ERR_FILENOTFND, 2, srch_nam.nam$b_esl, srch_nam.nam$l_esa);
-					TREF(dollar_zcstatus) = ERR_ERRORSUMMARY;
-					break;
-				}
-				else 	if (status != RMS$_NORMAL)
-				{	dec_err(VARLSTCNT(4) ERR_SRCFILERR, 2, source_name_len, source_file_name);
-					dec_err(VARLSTCNT(1) status);
-					TREF(dollar_zcstatus) = ERR_ERRORSUMMARY;
-					break;
-				}
-				else
-				{	source_name_len = srch_nam.nam$b_rsl;
-					source_file_name[source_name_len] = '\0';
-				}
-			} else
-			{	source_name_len = SIZEOF("SYS$INPUT");
-				memcpy(source_file_name, "SYS$INPUT", source_name_len);
-				source_file_name[source_name_len] = '\0';
-				tt_so_do_once = TRUE;
-			}
-			if (compiler_startup())
-				TREF(dollar_zcstatus) = ERR_ERRORSUMMARY;
-			else
-			{
-				status = sys$close(&obj_fab);
-				obj_fab = cc$rms_fab;
-				if (RMS$_NORMAL != status)
-					rts_error(VARLSTCNT(6) ERR_OBJFILERR, 2, object_name_len, object_file_name, status,
-						  obj_fab.fab$l_stv);
-			}
-			if (tt_so_do_once)
-				break;
-		}
-	}
-}
-
-bool open_source_file(void)
-{
-	static readonly char inprompt[] = "\015\012>";
-	struct NAM	nam;
-	struct XABDAT	xab;
-	char		exp_name[255];
-	char		*p;
-	int		n;
-	int		rms_status;
-	struct dsc$descriptor_s t_desc
-		= {REV_TIME_BUFF_LEN, DSC$K_DTYPE_T, DSC$K_CLASS_S, rev_time_buf};
-
-	fab = cc$rms_fab;
-	fab.fab$l_fna = source_file_name;
-	fab.fab$b_fns = source_name_len;
-	fab.fab$w_mrs = MAX_SRCLINE;
-	fab.fab$l_xab =	&xab;
-	fab.fab$l_nam = &nam;
-	nam = cc$rms_nam;
-	nam.nam$l_esa = exp_name;
-	nam.nam$b_ess = SIZEOF(exp_name);
-	xab = cc$rms_xabdat;
-	rms_status = sys$open(&fab);
-	fab.fab$l_xab = 0;
-	fab.fab$l_nam = 0;
-	if (RMS$_NORMAL != rms_status)
-	{
-		dec_err(VARLSTCNT(4) ERR_SRCFILERR, 2, source_name_len, source_file_name);
-		dec_err(VARLSTCNT(1) rms_status);
-		return FALSE;
-	}
-	assert(tt_so_do_once || (source_name_len == nam.nam$b_esl && !memcmp(source_file_name, exp_name, nam.nam$b_esl)));
-	rab = cc$rms_rab;
-	rab.rab$l_fab = &fab;
-	rab.rab$l_pbf = inprompt;
-	rab.rab$b_psz = SIZEOF(inprompt) - 1;
-	rab.rab$l_rop = RAB$M_PMT;
-	rab.rab$l_ubf = source_buffer;
-	rab.rab$w_usz = MAX_SRCLINE;
-	rms_status = sys$connect(&rab);
-	if (RMS$_NORMAL != rms_status)
-	{
-		dec_err(VARLSTCNT(4) ERR_SRCFILERR, 2, source_name_len, source_file_name);
-		dec_err(VARLSTCNT(1) rms_status);
-		return FALSE;
-	}
-	sys$asctim(0,&t_desc,&xab.xab$q_rdt,0);
-	p = nam.nam$l_name ;
-	n = nam.nam$b_name ;
-	if (n > MAX_MIDENT_LEN)
-		n = MAX_MIDENT_LEN;
-	else if (!n)
-	{
-		p = "MDEFAULT";
-		n = STR_LIT_LEN("MDEFAULT");
-	}
-	memcpy(routine_name.addr, p, n);
-	memcpy(module_name.addr, p, n);
-	routine_name.len = module_name.len = n;
-	if  ('_' == *p)
-		routine_name.addr[0] = '%';
-	return TRUE;
-}
-
-int4 read_source_file(void)
-{
-	int rms_status;
-
-	rms_status = sys$get(&rab);
-	if (RMS$_EOF == rms_status)
-		return -1;
-	if (RMS$_NORMAL != rms_status)
-		rts_error(VARLSTCNT(5) ERR_SRCFILERR, 2, source_name_len, source_file_name, rms_status);
-	*(rab.rab$l_ubf + rab.rab$w_rsz + 1) = *(rab.rab$l_ubf + rab.rab$w_rsz)= 0;
-	return rab.rab$w_rsz;
-}
-
-void close_source_file(void)
-{
-	sys$close(&fab);
-	return;
-}
diff --git a/sr_vvms/spawn_and_bgwait.c b/sr_vvms/spawn_and_bgwait.c
deleted file mode 100644
index 4923bbb..0000000
--- a/sr_vvms/spawn_and_bgwait.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <ssdef.h>
-#include <clidef.h>
-
-#include "efn.h"
-
-uint4 spawn_and_bgwait(struct dsc$descriptor_s *d_cmd, struct dsc$descriptor_s *d_infile, struct dsc$descriptor_s *d_outfile,
-		uint4 *flags, struct dsc$descriptor_s *d_prcname, uint4 *pid, int4 *completion_status)
-{
-	uint4 status;
-	uint4 flags_with_nowait = CLI$M_NOWAIT;
-	unsigned char ef = efn_sys_wait;
-
-	if (flags)
-		flags_with_nowait |= *flags;
-	status = lib$spawn(d_cmd, d_infile, d_outfile, &flags_with_nowait, d_prcname, pid, completion_status, &ef);
-	if (SS$_NORMAL == status)
-		status = sys$waitfr(ef);
-	return status;
-}
diff --git a/sr_vvms/spkitbld.m b/sr_vvms/spkitbld.m
deleted file mode 100644
index 6f7ca7f..0000000
--- a/sr_vvms/spkitbld.m
+++ /dev/null
@@ -1,48 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2014 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-spkitbld	; ; ; edit the gtm$vrt:[t%%]*_spkitbld.dat version
-	;
-	New
-	Set cnt=0
-	New $ZTrap Set $ZTrap="Use $Principal Write !,""FAILED!!"",!,$ZStatus ZGoto "_$ZLevel_":error"
-	Set gtmvrt=$TRanslate($ZCMDLINE,""""),temp=gtmvrt_"temp.dat",mask=$Piece(gtmvrt,"]")_".t%%]*_spkitbld.dat"
-	If gtmvrt=""!(gtmvrt="/DIR") Do		;arg overrides gtm$vrt
-	. Set gtmvrt=$ZTRNLNM("gtm$vrt"),temp="gtm$vrt:[000000]temp.dat",mask="gtm$vrt:[t%%]*_spkitbld.dat"
-	Set gtmvrt=$Piece(gtmvrt,"]")
-	Set newver=$$FUNC^%ucase($Piece(gtmvrt,".",2))
-	If newver'?1"V"2N.2A1.3N.1A Write !,"Invalid version designation" Quit
-	Write "Fixing the version in packaging config files to ",newver,!
-	Set newver=$Extract(newver,2,9999)
-	For tv="BL","FT" If newver[tv Set newver=$Piece(newver,tv)_$Select(tv="BL":88,1:99)_$Piece(newver,tv,2)
-	If newver?.N1.A For i=$Length(newver):-1:2 Set newver=$Extract(newver,1,i-1)_($Ascii(newver,i)#10)_$Extract(newver,i+1,9999)
-	Set file=$ZSEARCH("foo.bar")	;clear any current search
-	For  Set file=$Piece($ZSEARCH(mask),";") Quit:'$l(file)  Do
-	. Use $principal
-	. Write "Opening file ",file,!
-	. Open file:(readonly:exception="Goto eof"),temp:newversion
-	. Use file
-	. Read line
-	. Use $principal
-	. Write "Old version: ",line,!
-	. Set oldver=$Piece(line," ",3)
-	. For i=1:1:$l(oldver) Quit:$Extract(oldver,i)?1N
-	. Set prod=$Extract(oldver,1,i-1)
-	. Set $Piece(line," ",3)=prod_newver
-	. Write "New version: ",line,!,!
-	. Use temp
-	. Write line,!
-	. For  Use file Read line Use temp Write line,!
-eof	. Close file:delete
-	. Close temp:rename=file
-	. Set cnt=cnt+1
-	Write !,"Complete"
-error	Write !,"Updated ",cnt," files",!
-	Quit
diff --git a/sr_vvms/spkitupdate.com b/sr_vvms/spkitupdate.com
deleted file mode 100644
index bd734bb..0000000
--- a/sr_vvms/spkitupdate.com
+++ /dev/null
@@ -1,29 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2014 Fidelity Information Services Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! spkitupdate.com p1=version
-$!
-$ vno = p1
-$ p1 = ""
-$ say = "write sys$output"
-$ gawk:=$gtm$bin:gawk.exe
-$ say "Fixing the version in packaging config files to "'vno'
-$ ver 'vno' p
-$ curr_priv = f$setprv("sysprv")
-$ gtma := $ gtm$exe:gtm$dmod.exe
-$ gtma "user:[library.''vno']"
-set $zro=$piece($zroutines,"=(",1)_"=(gtm$vrt:[src],"_$piece($zroutines,"=(",2)
-d ^spkitbld
-$ curr_priv=f$setprv(curr_priv)
-$ delete/nolog/since spkitbld.obj.,_ucase.obj.
-$ say "Should show the correct version"
-$ pipe gawk /commands ="/KITNAME/{printf(""%-32s\t%s\n"", FILENAME, $2);}" /field_sep=":=" gtm$vrt:[t%%]*_spkitbld.dat
-$ exit
diff --git a/sr_vvms/srm_check.com b/sr_vvms/srm_check.com
deleted file mode 100644
index 9ad5f37..0000000
--- a/sr_vvms/srm_check.com
+++ /dev/null
@@ -1,29 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2003 Sanchez Computer Associates, Inc.	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! check for invalid alpha code sequences in .exe files found in directory p1
-$!
-$ proc_verify = f$environment("VERIFY_PROCEDURE")
-$ set noverify
-$!
-$ if "" .nes. p1 then $ set def 'p1'
-$ srmck := $ sys$system:srm_check.exe
-$ exe = f$search("foo.exe")	! clear any active search list
-$loop:
-$ exe = f$search("*.exe.")
-$ if "" .nes. exe
-$  then
-$   srmck 'exe'
-$   goto loop
-$ endif
-$!
-$ temp = f$verify(proc_verify)
-$ exit
diff --git a/sr_vvms/st.mpt b/sr_vvms/st.mpt
deleted file mode 100644
index faa965b..0000000
--- a/sr_vvms/st.mpt
+++ /dev/null
@@ -1,77 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 1989,2001 Sanchez Computer Associates, Inc.	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-%ST	;GT.M %ST utility - status display
-	;
-	n image s image=0 d work
-	q
-IMAGE	n image s image=1 d work
-	q
-work	n nopriv,lock,pid,access,users,ctime,group,jtype,ltime,member,procid,tname,uname,iname,i,sort,oldpriv,$zt
-	s (lock,nopriv,users)=0
-	s $zt="zg "_$zl_":ERR^%ST" u $p:ctrap=$c(3)
-	s oldpriv=$zsetprv("SYSLCK,GROUP,WORLD")
-	i '$zpriv("SYSLCK") w !,"You need SYSLCK privilege to run this program.",! d exit q
-	s access(0)="Detach",access(1)="Network",access(2)="Batch",access(3)="Local",access(4)="Dialup",access(5)="Remote"
-	s lock=$zlkid(0)
-	i lock d  f  s lock=$zlkid(1) q:'lock  d
-	. i $extract($zgetlki(lock,"RESNAM"),1,6)="GTM$LM" s pid=$zgetlki(lock,"PID") d getjob(pid)
-	s users=users+nopriv
-	i users d header,ishow:image,ushow:'image w !!,"Total ",users," user",$s(users>1:"s.",1:"."),!
-	e  w !,"No current GT.M users.",!
-	i nopriv w !,"Insufficient privileges to examine ",nopriv," process",$s(nopriv>1:"es.",1:"."),!
-exit	s oldpriv=$zsetprv(oldpriv) u $p:ctrap=""
-	q
-header	w !,"GT.M Mumps users on ",$$datetime($horolog),!
-	w !,"Terminal",?9,"Username",?24,"UIC",?30,"Proc. id",?39,"Access",?47,"CPU time",?61,"Login time"
-	w !,"--------",?9,"------------",?22,"-------",?30,"--------",?39,"------",?47,"-------------",?61,"------------------"
-	q
-ushow	s uname="" f  s uname=$order(sort(uname)) q:uname=""  f i=1:1:sort(uname) d
-	. s tname=$piece(sort(uname,i),"^",1),procid=$piece(sort(uname,i),"^",2),group=$piece(sort(uname,i),"^",3)
-	. s member=$piece(sort(uname,i),"^",4),jtype=$piece(sort(uname,i),"^",5),ctime=$piece(sort(uname,i),"^",6)
-	. s ltime=$piece(sort(uname,i),"^",7)
-	. w !,tname,?9,uname,?22,group,",",member,?30,procid,?39,access(jtype),?47,ctime,?61,ltime
-	q
-ishow	s iname="" f  s iname=$order(sort(iname)) q:iname=""  d
-	. w !,"Image  : ",iname s uname="" f  s uname=$order(sort(iname,uname)) q:uname=""  f i=1:1:sort(iname,uname) d
-	. . s tname=$piece(sort(iname,uname,i),"^",1),procid=$piece(sort(iname,uname,i),"^",2)
-	. . s group=$piece(sort(iname,uname,i),"^",3),member=$piece(sort(iname,uname,i),"^",4)
-	. . s jtype=$piece(sort(iname,uname,i),"^",5),ctime=$piece(sort(iname,uname,i),"^",6)
-	. . s ltime=$piece(sort(iname,uname,i),"^",7)
-	. . w !,tname,?9,uname,?22,group,",",member,?30,procid,?39,access(jtype),?47,ctime,?61,ltime
-	. w !
-	q
-getjob(pid)
-	n $zt
-	s $zt="g blindpid"
-	s procid=$$FUNC^%DH(pid,8),tname=$zgetjpi(pid,"terminal"),uname=$zgetjpi(pid,"USERNAME")
-	s group=$$FUNC^%DO($zgetjpi(pid,"grp"),3),member=$$FUNC^%DO($zgetjpi(pid,"mem"),3),jtype=$zgetjpi(pid,"JOBTYPE")
-	s ltime=$$datetime($zgetjpi(pid,"logintim")),ctime=$$cputime($zgetjpi(pid,"CPUTIM"))
-	i image s iname=$zgetjpi(pid,"IMAGNAME"),i=$get(sort(iname,uname))+1,sort(iname,uname)=i
-	i  s sort(iname,uname,i)=tname_"^"_procid_"^"_group_"^"_member_"^"_jtype_"^"_ctime_"^"_ltime_"^"_iname
-	e  s i=$get(sort(uname))+1,sort(uname)=i,sort(uname,i)=tname_"^"_procid_"^"_group_"^"_member_"^"_jtype_"^"_ctime_"^"_ltime
-	s users=users+1
-	q
-datetime(horolog)
-	q $zdate(horolog,"DD-MON-YY 24:60:SS","Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")
-	;
-cputime(s)
-	n T,S,M,H,D
-	s T=s#100,s=s\100 s:$length(T)=1 T="0"_T
-	s S=s#60,s=s\60 s:$length(S)=1 S="0"_S
-	s M=s#60,s=s\60 s:$length(M)=1 M="0"_M
-	s H=s#24,D=s\24 s:$length(H)=1 H="0"_H
-	q D_" "_H_":"_M_":"_S_"."_T
-	;
-blindpid
-	i $zs["NOPRIV" s nopriv=nopriv+1 q
-ERR	w !,"lock = ",lock,!
-	w !,$p($zs,",",2,99),! u $p:ctrap="" s:$d(oldpriv) oldpriv=$zsetprv(oldpriv)
-	q
diff --git a/sr_vvms/std_dev_outbndset.c b/sr_vvms/std_dev_outbndset.c
deleted file mode 100644
index e837b60..0000000
--- a/sr_vvms/std_dev_outbndset.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001,2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "iottdef.h"
-#include "outofband.h"
-#include "deferred_events.h"
-#include "std_dev_outbndset.h"
-
-GBLREF volatile io_pair 	io_std_device;
-GBLREF volatile int4		spc_inp_prc;
-GBLREF volatile bool		ctrlu_occurred;
-GBLREF volatile bool		std_dev_outbnd;
-
-/* NOTE: xfer_set_handlers() returns success or failure for attempts to set
- *       xfer_table. That value is not currently used here, hence the
- *       cast to void.
- */
-
-void std_dev_outbndset(int4 ob_char)
-{
-	uint4	mask;
-	d_tt_struct	*tt_ptr;
-
-	if (MAXOUTOFBAND < ob_char)
-		GTMASSERT;
-	else if (tt == io_std_device.in->type)
-	{
-		tt_ptr = (d_tt_struct *)io_std_device.in->dev_sp;
-		std_dev_outbnd = TRUE;
-		mask = SHFT_MSK << ob_char;
-		if (mask & tt_ptr->enbld_outofbands.mask)
-			(void)xfer_set_handlers(outofband_event, &ctrap_set, ob_char);
-		else if (mask & CTRLC_MSK)
-	        	(void)xfer_set_handlers(outofband_event, &ctrlc_set, 0);
-		else if (mask & CTRLY_MSK)
-	        	(void)xfer_set_handlers(outofband_event, &ctrly_set, 0);
-		else if ((ob_char ==  CTRL_U) && (spc_inp_prc & (SHFT_MSK << CTRL_U)))
-				ctrlu_occurred = TRUE;
-		else
-			GTMASSERT;
-	}
-}
diff --git a/sr_vvms/stpimg.m b/sr_vvms/stpimg.m
deleted file mode 100644
index 9b70425..0000000
--- a/sr_vvms/stpimg.m
+++ /dev/null
@@ -1,22 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 1991, 2002 Sanchez Computer Associates, Inc.	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-stpimg	; stpimg is takes parameters passed to GT.M by the invoking CLI and
-	; passes them to ^PID which tries to stop all processes running a
-	; given image.
-	; P1 is the image name
-	; P2 is the number of second to wait after issuing a FORCEX before
-	;  using a DELPRC against a process which doesn't leave the image
-	;
-	n image,$zt
-	s image=$p($zcmdline," ")
-	i '$l(image) w "Invoked with no image name" q
-	d STPIMG^PID(image,+$p($zcmdline," ",2))
-	q
diff --git a/sr_vvms/term_setup.c b/sr_vvms/term_setup.c
deleted file mode 100644
index 97db7b9..0000000
--- a/sr_vvms/term_setup.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <ssdef.h>
-#include <iodef.h>
-#include "io.h"
-#include "iottdef.h"
-#include "efn.h"
-#include "outofband.h"
-#include "term_setup.h"
-
-GBLDEF boolean_t	ctrlc_on;			/* TRUE in cenable mode; FALSE in nocenable mode */
-
-GBLREF	int4		outofband;			/* enumerated: ctrap,ctrlc or ctrly */
-GBLREF	int4		std_dev_outofband_msk;
-GBLREF	io_pair		io_std_device;			/* standard device */
-
-void  term_setup(boolean_t ctrlc_enable)
-{
-	io_terminator	outofbands;
-	uint4		status;
-
-	status = sys$clref(efn_outofband);
-	assert(status == SS$_WASSET || status == SS$_WASCLR);
-	outofband = 0;
-	if (io_std_device.in->type == tt)
-	{
-		ctrlc_on = ctrlc_enable ;
-		if (ctrlc_on)
-			std_dev_outofband_msk |= CTRLC_MSK;
-		iott_resetast(io_std_device.in);
-	} else
-		ctrlc_on = FALSE;
-}
diff --git a/sr_vvms/timedef.h b/sr_vvms/timedef.h
deleted file mode 100644
index 42de8d0..0000000
--- a/sr_vvms/timedef.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-typedef struct
-{
-	int4 mask1;
-	int4 mask2;
-}quad_mask;
-
-#define quadgtr(a,b) (a[1] > b[1] || a[1] == b[1] && a[0] > b[0])
-#define time_low(t) ((t % 430) * 10000000) /* time in 100 nanosecond intervals */
-#define time_high(t) (t / 430)
-	/* Convert time in msecs. to Quadword Hi and Low */
-#define time_low_ms(t) ((t % 429496) * 10000)
-#define time_high_ms(t) (t / 429496)
-#define status_normal(a) ((norm_stat = (a)) == SS$_NORMAL ? TRUE : rts_error(norm_stat))
diff --git a/sr_vvms/timersp.h b/sr_vvms/timersp.h
deleted file mode 100644
index f275900..0000000
--- a/sr_vvms/timersp.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef TIMERSP_included
-#define TIMERSP_included
-
-#define TIMER_SCALE		-10000		/* 100 nanoseconds / millisecond (delta time representations are negative) */
-
-/* These values are used during file creation  but may be changed on the fly */
-#define TIM_FLU_MOD_BG		(1000 * TIMER_SCALE)	/* 1 sec */
-#define TIM_FLU_MOD_MM		(30000 * TIMER_SCALE)	/* 30 sec - longer since is a full sync */
-#define TIM_AST_WAIT		(5 * TIMER_SCALE)	/* 5 msec */
-
-#endif /*TIMERSP_included */
diff --git a/sr_vvms/trans_log_name.c b/sr_vvms/trans_log_name.c
deleted file mode 100644
index 4b096b8..0000000
--- a/sr_vvms/trans_log_name.c
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-#include <lnmdef.h>
-#include <ssdef.h>
-
-#include "io.h"
-#include "iottdef.h"
-#include "trans_log_name.h"
-
-static $DESCRIPTOR(tables,"LNM$FILE_DEV");
-static $DESCRIPTOR(lognam,"");
-static $DESCRIPTOR(colon,":");
-static $DESCRIPTOR(src_str,"");
-static uint4 attr = LNM$M_CASE_BLIND;
-
-#define TRL_SZ	3
-#define MAX_TRAN_DEPTH 10
-
-int4 trans_log_name(mstr *log, mstr *trans, char *buffer)
-/* 1st arg: logical name    */
-/* 2nd arg: translated name */
-{
-	item_list_struct trl_list[TRL_SZ];
-	char		buff1[MAX_TRANS_NAME_LEN], buff2[MAX_TRANS_NAME_LEN], tail_buff[MAX_TRANS_NAME_LEN];
-	char		*temp_buffer, *tail_ptr;
-	int4		status, max_index, x, new_pos;
-	uint4		attr_mask, pos, tail_len;
-	unsigned short	ret_len, pass;
-
-	error_def(ERR_INVSTRLEN);
-
-	if (MAX_TRANS_NAME_LEN < log->len)
-		rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, log->len, MAX_TRANS_NAME_LEN);
-	trl_list[0].buf_len = SIZEOF(attr_mask);
-	trl_list[0].item_code = LNM$_ATTRIBUTES;
-	trl_list[0].addr = &attr_mask;
-	trl_list[0].ret_addr = &ret_len;
-	trl_list[1].buf_len = MAX_TRANS_NAME_LEN;
-	trl_list[1].item_code = LNM$_STRING;
-	trl_list[1].addr = buff1;
-	trl_list[1].ret_addr = &ret_len;
-	trl_list[2].buf_len = 0;
-	trl_list[2].item_code = 0;
-
-	src_str.dsc$a_pointer = log->addr;
-	src_str.dsc$w_length = log->len;
-
-	tail_ptr = &tail_buff[MAX_TRANS_NAME_LEN];
-	tail_len = 0;
-
-	for (pass = 0; ;pass++)
-	{
-		ret_len = 0;
-		attr_mask = 0;
-		pos = lib$locc(&colon,&src_str);
-		if (pos != 0 && pos != log->len)
-		{
-			tail_len += src_str.dsc$w_length - pos;
-			if (tail_len > MAX_TRANS_NAME_LEN)
-				rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, tail_len, MAX_TRANS_NAME_LEN);
-			tail_ptr -= src_str.dsc$w_length - pos;
-			memcpy(tail_ptr, src_str.dsc$a_pointer + pos, src_str.dsc$w_length - pos);
-			src_str.dsc$w_length = pos - 1;
-		} else
-			pos = 0;
-		status = sys$trnlnm(&attr ,&tables ,&src_str,0,trl_list);
-		if ((status & 1) || (status == SS$_NOLOGNAM && pass))
-		{
-			if (attr_mask & LNM$M_TERMINAL)
-			{
-				memcpy(buffer, trl_list[1].addr, ret_len);
-				trans->addr = buffer;
-				trans->len = ret_len;
-				if (tail_len)
-				{
-					if (tail_len + trans->len  > MAX_TRANS_NAME_LEN)
-						rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, tail_len, MAX_TRANS_NAME_LEN);
-					memcpy(trans->addr + trans->len, tail_ptr, tail_len);
-					trans->len += tail_len;
-				}
-				/* Null-terminate returned string (even though an mstr), as this is relied upon
-				 * by callers who do ATOI etc. directly on the return string.
-				 */
-				trans->addr[trans->len] = '\0';
-				return (SS$_NORMAL);
-			}
-			if (status == SS$_NOLOGNAM || pass > MAX_TRAN_DEPTH)
-			{
-				memcpy(buffer, src_str.dsc$a_pointer, src_str.dsc$w_length);
-				trans->addr = buffer;
-				trans->len = src_str.dsc$w_length;
-				if (pos)
-				{
-					if (trans->len + 1 > MAX_TRANS_NAME_LEN)
-						rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, trans->len + 1, MAX_TRANS_NAME_LEN);
-					*((unsigned char *) trans->addr + trans->len) = ':';
-					trans->len++;
-				}
-				if (tail_len)
-				{
-					if (tail_len + trans->len  > MAX_TRANS_NAME_LEN)
-						rts_error(VARLSTCNT(4) ERR_INVSTRLEN, 2, tail_len + trans->len, MAX_TRANS_NAME_LEN);
-					memcpy(trans->addr + trans->len, tail_ptr, tail_len);
-					trans->len += tail_len;
-				}
-				/* Null-terminate returned string (even though an mstr), as this is relied upon
-				 * by callers who do ATOI etc. directly on the return string.
-				 */
-				trans->addr[trans->len] = '\0';
-				return (SS$_NORMAL);
-			}
-			temp_buffer = pass ? src_str.dsc$a_pointer : buff2;
-			src_str.dsc$a_pointer = trl_list[1].addr;
-			src_str.dsc$w_length = ret_len;
-			trl_list[1].addr = temp_buffer;
-		} else
-		{	trans->addr = 0;
-			trans->len = 0;
-			return(status);
-		}
-	}
-}
diff --git a/sr_vvms/ttt.c b/sr_vvms/ttt.c
deleted file mode 100644
index eb24019..0000000
--- a/sr_vvms/ttt.c
+++ /dev/null
@@ -1,699 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "vxi.h"
-#include "vxt.h"
-#include "xfer_enum.h"
-LITDEF short ttt[4240] = {
-
-/*    0 */	0,0,0,0,330,3497,2951,574,
-/*    8 */	2329,2936,2966,2001,426,3447,2122,3069,
-/*   16 */	2205,2193,3680,3717,2166,2175,2247,2187,
-/*   24 */	2238,2217,2145,794,809,821,833,872,
-/*   32 */	890,911,940,970,985,1000,1018,3054,
-/*   40 */	1090,1123,1159,1225,1276,1573,1606,1621,
-/*   48 */	1651,1717,1747,1771,1834,1855,1873,3512,
-/*   56 */	3534,0,0,0,0,589,0,530,
-/*   64 */	0,1987,0,3040,0,0,0,0,
-/*   72 */	0,0,362,438,2307,2313,2728,2755,
-/*   80 */	2773,2876,2814,2805,2891,3586,3670,2987,
-/*   88 */	0,3019,3135,3098,3083,3113,3461,3311,
-/*   96 */	3592,3604,3619,3643,3652,3637,3628,3346,
-/*  104 */	3713,3726,3748,3785,3797,3818,3842,3908,
-/*  112 */	0,0,2924,2289,3187,4189,668,4192,
-/*  120 */	722,2785,3153,544,550,4195,2392,2479,
-/*  128 */	2379,497,2415,2499,2154,2437,2509,4198,
-/*  136 */	2274,2265,4202,1294,4203,358,354,3335,
-/*  144 */	450,4207,4210,4213,3005,4216,4219,4222,
-/*  152 */	4225,4228,4231,3483,0,2900,2568,2546,
-/*  160 */	1534,2537,2325,2136,2851,2022,747,2841,
-/*  168 */	0,0,2344,3661,3689,1498,3613,2427,
-/*  176 */	2015,559,3809,1819,2256,1210,345,3139,
-/*  184 */	631,700,612,678,3773,1138,3741,2980,
-/*  192 */	2283,2915,2994,650,1030,2855,4234,2489,
-/*  200 */	3860,3878,3893,521,2870,3131,1948,3929,
-/*  208 */	3920,1312,3475,603,1636,1705,2452,4237,
-/*  216 */	3546,2525,756,851,3170,3701,3570,3556,
-/*  224 */	3563,3552,732,925,2402,1072,2366,1060,
-/*  232 */	2226,1045,1105,2464,1468,1411,1396,1450,
-/*  240 */	1366,1378,1423,1351,1435,1483,777,3433,
-/*  248 */	0,949,958,3290,1846,3269,2353,3965,
-/*  256 */	3935,3941,3953,3975,1249,1261,1183,1195,
-/*  264 */	1237,3524,1681,1933,0,1324,1510,1555,
-/*  272 */	3367,1588,1666,1693,1804,1783,3409,1729,
-/*  280 */	3388,1915,0,0,1975,3998,1897,3197,
-/*  288 */	3209,3221,3233,2764,2779,1522,461,1339,
-/*  296 */	0,659,3245,3257,0,3989,0,0,
-/*  304 */	0,0,3764,4010,4021,4033,4042,4056,
-/*  312 */	4069,4079,4096,4108,4117,4129,4141,4153,
-/*  320 */	4168,4180,0,0,0,1885,0,0,
-/*  328 */	0,0,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,
-/*  336 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_add,
-/*  344 */	VXT_END,
-/*  345 */	VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_bindparm,
-/*  353 */	VXT_END,
-/*  354 */	VXI_INCL,VXT_VAL,1,VXT_END,
-/*  358 */	VXI_CLRL,VXT_VAL,0,VXT_END,
-/*  362 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_break,VXT_END,
-/*  366 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callb,VXI_BRB,VXT_JMP,
-/*  374 */	1,VXT_END,
-/*  376 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_calll,VXI_JMP,VXT_JMP,
-/*  384 */	1,VXT_END,
-/*  386 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callw,VXI_BRW,VXT_JMP,
-/*  394 */	1,VXT_END,
-/*  396 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspb,VXI_BRB,VXT_JMP,
-/*  404 */	1,VXT_END,
-/*  406 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspl,VXI_JMP,VXT_JMP,
-/*  414 */	1,VXT_END,
-/*  416 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspw,VXI_BRW,VXT_JMP,
-/*  424 */	1,VXT_END,
-/*  426 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/*  434 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_cat,VXT_END,
-/*  438 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  446 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_close,VXT_END,
-/*  450 */	VXI_BICB2,VXT_LIT,1,VXT_REG,0x5A,VXI_CALLS,VXT_LIT,0,
-/*  458 */	VXT_XFER,SIZEOF(char *) * (short int)xf_dt_false,VXT_END,
-/*  461 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_clralsvars,
-/*  469 */	VXT_END,
-/*  470 */	VXI_TSTL,VXT_VAL,1,VXT_END,
-/*  474 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2bool,
-/*  482 */	VXT_END,
-/*  483 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2mint,
-/*  491 */	VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,VXT_END,
-/*  497 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/*  505 */	SIZEOF(char *) * (short int)xf_commarg,VXT_END,
-/*  507 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVL,VXT_VAL,1,
-/*  515 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mint2mval,VXT_END,
-/*  521 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2num,
-/*  529 */	VXT_END,
-/*  530 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/*  538 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_contain,VXT_END,
-/*  544 */	VXI_MOVL,VXT_REG,0x6C,VXT_ADDR,0,VXT_END,
-/*  550 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_currtn,
-/*  558 */	VXT_END,
-/*  559 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/*  567 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_cvtparm,VXT_END,
-/*  574 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  582 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_div,VXT_END,
-/*  589 */	VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
-/*  597 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equ,VXT_END,
-/*  603 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equnul,
-/*  611 */	VXT_END,
-/*  612 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  620 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_LIT,0,VXI_JSB,
-/*  628 */	VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
-/*  631 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  639 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_JSB,
-/*  647 */	VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
-/*  650 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunret,
-/*  658 */	VXT_END,
-/*  659 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunretals,
-/*  667 */	VXT_END,
-/*  668 */	VXI_PUSHAB,VXT_GREF,2,VXI_PUSHAB,VXT_GREF,1,VXI_JSB,VXT_XFER,
-/*  676 */	SIZEOF(char *) * (short int)xf_extcall,VXT_END,
-/*  678 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  686 */	3,VXI_PUSHL,VXT_LIT,0,VXI_PUSHAB,VXT_GREF,2,VXI_PUSHAB,
-/*  694 */	VXT_GREF,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
-/*  700 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  708 */	3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_GREF,2,VXI_PUSHAB,
-/*  716 */	VXT_GREF,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
-/*  722 */	VXI_PUSHAB,VXT_GREF,2,VXI_PUSHAB,VXT_GREF,1,VXI_JSB,VXT_XFER,
-/*  730 */	SIZEOF(char *) * (short int)xf_extjmp,VXT_END,
-/*  732 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  740 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_exp,VXT_END,
-/*  747 */	VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fetch,
-/*  755 */	VXT_END,
-/*  756 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  764 */	3,VXI_PUSHAB,VXT_GREF,2,VXI_PUSHL,VXT_LIT,0,VXI_CALLS,
-/*  772 */	VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
-/*  777 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  785 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fgnlookup,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/*  793 */	VXT_END,
-/*  794 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/*  802 */	2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnascii,VXT_END,
-/*  809 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/*  817 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnchar,VXT_END,
-/*  821 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  829 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fndata,VXT_END,
-/*  833 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/*  841 */	2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/*  849 */	SIZEOF(char *) * (short int)xf_fnextract,VXT_END,
-/*  851 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  859 */	3,VXI_PUSHAB,VXT_GREF,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,
-/*  867 */	VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
-/*  872 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/*  880 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/*  888 */	SIZEOF(char *) * (short int)xf_fnfind,VXT_END,
-/*  890 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  898 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/*  906 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfnumber,VXT_END,
-/*  911 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
-/*  919 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget,VXT_END,
-/*  925 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  933 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget2,VXT_END,
-/*  940 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget,
-/*  948 */	VXT_END,
-/*  949 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget1,
-/*  957 */	VXT_END,
-/*  958 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  966 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget1,VXT_END,
-/*  970 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  978 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnincr,VXT_END,
-/*  985 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  993 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnj2,VXT_END,
-/* 1000 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1008 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1016 */	SIZEOF(char *) * (short int)xf_fnj3,VXT_END,
-/* 1018 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1026 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlength,VXT_END,
-/* 1030 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1038 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvname,VXT_END,
-/* 1045 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
-/* 1053 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvnameo2,VXT_END,
-/* 1060 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1068 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvprvname,VXT_END,
-/* 1072 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/* 1080 */	3,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,2,VXT_XFER,
-/* 1088 */	SIZEOF(char *) * (short int)xf_fnname,VXT_END,
-/* 1090 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1098 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnnext,VXT_END,
-/* 1105 */	VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
-/* 1113 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1121 */	SIZEOF(char *) * (short int)xf_fno2,VXT_END,
-/* 1123 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1131 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnorder,VXT_END,
-/* 1138 */	VXI_PUSHL,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,
-/* 1146 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 1154 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnp1,VXT_END,
-/* 1159 */	VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,
-/* 1167 */	4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 1175 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpiece,VXT_END,
-/* 1183 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1191 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqlength,VXT_END,
-/* 1195 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1203 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqsubscript,VXT_END,
-/* 1210 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1218 */	0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnquery,VXT_END,
-/* 1225 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1233 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnrandom,VXT_END,
-/* 1237 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1245 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnreverse,VXT_END,
-/* 1249 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1257 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack1,VXT_END,
-/* 1261 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1269 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack2,VXT_END,
-/* 1276 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1284 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1292 */	SIZEOF(char *) * (short int)xf_fntext,VXT_END,
-/* 1294 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1302 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1310 */	SIZEOF(char *) * (short int)xf_fntranslate,VXT_END,
-/* 1312 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1320 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnview,VXT_END,
-/* 1324 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/* 1332 */	2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzascii,VXT_END,
-/* 1339 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1347 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzahandle,VXT_END,
-/* 1351 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1359 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitand,VXT_END,
-/* 1366 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 1374 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitcoun,VXT_END,
-/* 1378 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1386 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1394 */	SIZEOF(char *) * (short int)xf_fnzbitfind,VXT_END,
-/* 1396 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1404 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitget,VXT_END,
-/* 1411 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 1419 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitlen,VXT_END,
-/* 1423 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 1431 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitnot,VXT_END,
-/* 1435 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1443 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitor,VXT_END,
-/* 1450 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1458 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1466 */	SIZEOF(char *) * (short int)xf_fnzbitset,VXT_END,
-/* 1468 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1476 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitstr,VXT_END,
-/* 1483 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1491 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitxor,VXT_END,
-/* 1498 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1506 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzcall,VXT_END,
-/* 1510 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1518 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzchar,VXT_END,
-/* 1522 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1530 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdata,VXT_END,
-/* 1534 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
-/* 1542 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 1550 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdate,VXT_END,
-/* 1555 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/* 1563 */	2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1571 */	SIZEOF(char *) * (short int)xf_fnzextract,VXT_END,
-/* 1573 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1581 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzfile,VXT_END,
-/* 1588 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1596 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1604 */	SIZEOF(char *) * (short int)xf_fnzfind,VXT_END,
-/* 1606 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1614 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetdvi,VXT_END,
-/* 1621 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1629 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetjpi,VXT_END,
-/* 1636 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1644 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetlki,VXT_END,
-/* 1651 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1659 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetsyi,VXT_END,
-/* 1666 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1674 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzj2,VXT_END,
-/* 1681 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1689 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzjobexam,VXT_END,
-/* 1693 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1701 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlength,VXT_END,
-/* 1705 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1713 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlkid,VXT_END,
-/* 1717 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1725 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzm,VXT_END,
-/* 1729 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1737 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1745 */	SIZEOF(char *) * (short int)xf_fnzp1,VXT_END,
-/* 1747 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
-/* 1755 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 1763 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzparse,VXT_END,
-/* 1771 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1779 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpid,VXT_END,
-/* 1783 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 1791 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 1799 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpiece,VXT_END,
-/* 1804 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1812 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpopulation,VXT_END,
-/* 1819 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1827 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzprevious,VXT_END,
-/* 1834 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1842 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpriv,VXT_END,
-/* 1846 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzqgblmod,
-/* 1854 */	VXT_END,
-/* 1855 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1863 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1871 */	SIZEOF(char *) * (short int)xf_fnzsearch,VXT_END,
-/* 1873 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1881 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsetprv,VXT_END,
-/* 1885 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1893 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsocket,VXT_END,
-/* 1897 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1905 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1913 */	SIZEOF(char *) * (short int)xf_fnzsubstr,VXT_END,
-/* 1915 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1923 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1931 */	SIZEOF(char *) * (short int)xf_fnztranslate,VXT_END,
-/* 1933 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1941 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsigproc,VXT_END,
-/* 1948 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,6,VXI_PUSHAB,VXT_VAL,
-/* 1956 */	5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,
-/* 1964 */	VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,7,
-/* 1972 */	VXT_XFER,SIZEOF(char *) * (short int)xf_fnztrnlnm,VXT_END,
-/* 1975 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1983 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwidth,VXT_END,
-/* 1987 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 1995 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_follow,VXT_END,
-/* 2001 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
-/* 2009 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forcenum,VXT_END,
-/* 2015 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forchk1,VXT_END,
-/* 2022 */	VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2030 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forinit,VXT_END,
-/* 2035 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldob,VXI_BRB,VXT_JMP,
-/* 2043 */	1,VXT_END,
-/* 2045 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldol,VXI_JMP,VXT_JMP,
-/* 2053 */	1,VXT_END,
-/* 2055 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldow,VXI_BRW,VXT_JMP,
-/* 2063 */	1,VXT_END,
-/* 2065 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
-/* 2073 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
-/* 2081 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
-/* 2084 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
-/* 2092 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
-/* 2100 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
-/* 2103 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
-/* 2111 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
-/* 2119 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
-/* 2122 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_getindx,
-/* 2130 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 2136 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_gettruth,
-/* 2144 */	VXT_END,
-/* 2145 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvdata,
-/* 2153 */	VXT_END,
-/* 2154 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2162 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvextnam,VXT_END,
-/* 2166 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvget,
-/* 2174 */	VXT_END,
-/* 2175 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 2183 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvincr,VXT_END,
-/* 2187 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvkill,VXT_END,
-/* 2193 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2201 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnaked,VXT_END,
-/* 2205 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2213 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvname,VXT_END,
-/* 2217 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnext,
-/* 2225 */	VXT_END,
-/* 2226 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 2234 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvo2,VXT_END,
-/* 2238 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvorder,
-/* 2246 */	VXT_END,
-/* 2247 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvput,
-/* 2255 */	VXT_END,
-/* 2256 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvquery,
-/* 2264 */	VXT_END,
-/* 2265 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvrectarg,
-/* 2273 */	VXT_END,
-/* 2274 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvsavtarg,
-/* 2282 */	VXT_END,
-/* 2283 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvzwithdraw,VXT_END,
-/* 2289 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 2297 */	3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,
-/* 2305 */	SIZEOF(char *) * (short int)xf_gvzwrite,VXT_END,
-/* 2307 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_halt,VXT_END,
-/* 2313 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 2321 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_hang,VXT_END,
-/* 2325 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_hardret,VXT_END,
-/* 2329 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2337 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_idiv,VXT_END,
-/* 2344 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_igetsrc,
-/* 2352 */	VXT_END,
-/* 2353 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2361 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_inddevparms,VXT_END,
-/* 2366 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2374 */	0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname,VXT_END,
-/* 2379 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2387 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfun,VXT_END,
-/* 2392 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2400 */	SIZEOF(char *) * (short int)xf_indglvn,VXT_END,
-/* 2402 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2410 */	0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indincr,VXT_END,
-/* 2415 */	VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvadr,VXI_MOVL,VXT_REG,
-/* 2423 */	0x50,VXT_ADDR,0,VXT_END,
-/* 2427 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2435 */	SIZEOF(char *) * (short int)xf_indlvarg,VXT_END,
-/* 2437 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2445 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indname,VXT_END,
-/* 2452 */	VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvnamadr,VXI_MOVL,VXT_REG,
-/* 2460 */	0x50,VXT_ADDR,0,VXT_END,
-/* 2464 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2472 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indo2,VXT_END,
-/* 2479 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2487 */	SIZEOF(char *) * (short int)xf_indpat,VXT_END,
-/* 2489 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2497 */	SIZEOF(char *) * (short int)xf_indrzshow,VXT_END,
-/* 2499 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2507 */	SIZEOF(char *) * (short int)xf_indset,VXT_END,
-/* 2509 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 2517 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indtext,VXT_END,
-/* 2525 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2533 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_iocontrol,VXT_END,
-/* 2537 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_iretmvad,
-/* 2545 */	VXT_END,
-/* 2546 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2554 */	SIZEOF(char *) * (short int)xf_iretmval,VXT_END,
-/* 2556 */	VXI_BRB,VXT_JMP,1,VXT_END,
-/* 2560 */	VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2564 */	VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2568 */	VXI_JMP,VXT_VAL,1,VXT_END,
-/* 2572 */	VXI_BEQL,VXT_JMP,1,VXT_END,
-/* 2576 */	VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2583 */	VXI_BNEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2590 */	VXI_BGEQ,VXT_JMP,1,VXT_END,
-/* 2594 */	VXI_BLSS,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2601 */	VXI_BLSS,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2608 */	VXI_BGTR,VXT_JMP,1,VXT_END,
-/* 2612 */	VXI_BLEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2619 */	VXI_BLEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2626 */	VXI_BLEQ,VXT_JMP,1,VXT_END,
-/* 2630 */	VXI_BGTR,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2637 */	VXI_BGTR,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2644 */	VXI_BLSS,VXT_JMP,1,VXT_END,
-/* 2648 */	VXI_BGEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2655 */	VXI_BGEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2662 */	VXI_BNEQ,VXT_JMP,1,VXT_END,
-/* 2666 */	VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2673 */	VXI_BEQL,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2680 */	VXI_BLBC,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
-/* 2686 */	VXI_BLBS,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
-/* 2694 */	VXT_END,
-/* 2695 */	VXI_BLBS,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
-/* 2703 */	VXT_END,
-/* 2704 */	VXI_BLBS,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
-/* 2710 */	VXI_BLBC,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
-/* 2718 */	VXT_END,
-/* 2719 */	VXI_BLBC,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
-/* 2727 */	VXT_END,
-/* 2728 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,7,VXI_PUSHL,VXT_VAL,
-/* 2736 */	6,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,
-/* 2744 */	VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,
-/* 2752 */	VXT_XFER,SIZEOF(char *) * (short int)xf_job,VXT_END,
-/* 2755 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_kill,
-/* 2763 */	VXT_END,
-/* 2764 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_killalias,
-/* 2772 */	VXT_END,
-/* 2773 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killall,VXT_END,
-/* 2779 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killaliasall,VXT_END,
-/* 2785 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2793 */	3,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_labaddr,VXI_MOVL,VXT_REG,
-/* 2801 */	0x50,VXT_ADDR,0,VXT_END,
-/* 2805 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckdecr,
-/* 2813 */	VXT_END,
-/* 2814 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckincr,
-/* 2822 */	VXT_END,
-/* 2823 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
-/* 2829 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
-/* 2835 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
-/* 2841 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2849 */	SIZEOF(char *) * (short int)xf_linefetch,VXT_END,
-/* 2851 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_linestart,VXT_END,
-/* 2855 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 2863 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
-/* 2870 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_lkinit,VXT_END,
-/* 2876 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 2884 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
-/* 2891 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lock,
-/* 2899 */	VXT_END,
-/* 2900 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 2908 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvpatwrite,VXT_END,
-/* 2915 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwithdraw,
-/* 2923 */	VXT_END,
-/* 2924 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2932 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwrite,VXT_END,
-/* 2936 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2944 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_flt_mod,VXT_END,
-/* 2951 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2959 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_mul,VXT_END,
-/* 2966 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
-/* 2974 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_neg,VXT_END,
-/* 2980 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newintrinsic,VXT_END,
-/* 2987 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newvar,VXT_END,
-/* 2994 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_nullexp,VXI_MOVL,VXT_REG,0x50,
-/* 3002 */	VXT_ADDR,0,VXT_END,
-/* 3005 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 3013 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_numcmp,VXT_END,
-/* 3019 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3027 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3035 */	VXT_LIT,4,VXT_XFER,SIZEOF(char *) * (short int)xf_open,VXT_END,
-/* 3040 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 3048 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_pattern,VXT_END,
-/* 3054 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3062 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpopulation,VXT_END,
-/* 3069 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_putindx,
-/* 3077 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 3083 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 3091 */	0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_rdone,VXT_END,
-/* 3098 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 3106 */	0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_read,VXT_END,
-/* 3113 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 3121 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,3,VXT_XFER,
-/* 3129 */	SIZEOF(char *) * (short int)xf_readfl,VXT_END,
-/* 3131 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_END,
-/* 3135 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_ret,VXT_END,
-/* 3139 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVL,VXT_VAL,2,
-/* 3147 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_retarg,VXT_END,
-/* 3153 */	VXI_PUSHAB,VXT_GREF,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3161 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/* 3169 */	VXT_END,
-/* 3170 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3178 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/* 3186 */	VXT_END,
-/* 3187 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 3195 */	SIZEOF(char *) * (short int)xf_rterror,VXT_END,
-/* 3197 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3205 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setals2als,VXT_END,
-/* 3209 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3217 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsin2alsct,VXT_END,
-/* 3221 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3229 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsctin2als,VXT_END,
-/* 3233 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3241 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsct2alsct,VXT_END,
-/* 3245 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3253 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2als,VXT_END,
-/* 3257 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3265 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2alsct,VXT_END,
-/* 3269 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 3277 */	2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3285 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setextract,VXT_END,
-/* 3290 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 3298 */	4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3306 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setp1,VXT_END,
-/* 3311 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3319 */	3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 3327 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setpiece,VXT_END,
-/* 3335 */	VXI_BISB2,VXT_LIT,1,VXT_REG,0x5A,VXI_CALLS,VXT_LIT,0,
-/* 3343 */	VXT_XFER,SIZEOF(char *) * (short int)xf_dt_true,VXT_END,
-/* 3346 */	VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3354 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,3,VXI_CALLS,
-/* 3362 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzbrk,VXT_END,
-/* 3367 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 3375 */	2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3383 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzextract,VXT_END,
-/* 3388 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 3396 */	4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3404 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzp1,VXT_END,
-/* 3409 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3417 */	3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 3425 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setzpiece,VXT_END,
-/* 3433 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 3441 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sorts_after,VXT_END,
-/* 3447 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_srchindx,
-/* 3455 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 3461 */	VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
-/* 3469 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
-/* 3475 */	VXI_MOVC3,VXT_LIT,16,VXT_VAL,2,VXT_VAL,1,VXT_END,
-/* 3483 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
-/* 3491 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
-/* 3497 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3505 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_sub,VXT_END,
-/* 3512 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3520 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_svget,VXT_END,
-/* 3524 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 3532 */	SIZEOF(char *) * (short int)xf_psvput,VXT_END,
-/* 3534 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3542 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_svput,VXT_END,
-/* 3546 */	VXI_MOVL,VXT_REG,0x50,VXT_REG,0x5A,VXT_END,
-/* 3552 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tcommit,VXT_END,
-/* 3556 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trollback,VXT_END,
-/* 3563 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trestart,VXT_END,
-/* 3570 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 3578 */	2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tstart,VXT_END,
-/* 3586 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_unlock,VXT_END,
-/* 3592 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3600 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_use,VXT_END,
-/* 3604 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_view,
-/* 3612 */	VXT_END,
-/* 3613 */	VXI_CMPL,VXT_VAL,1,VXT_VAL,2,VXT_END,
-/* 3619 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_write,
-/* 3627 */	VXT_END,
-/* 3628 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wteol,
-/* 3636 */	VXT_END,
-/* 3637 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_wtff,VXT_END,
-/* 3643 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wtone,
-/* 3651 */	VXT_END,
-/* 3652 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wttab,
-/* 3660 */	VXT_END,
-/* 3661 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_xkill,
-/* 3669 */	VXT_END,
-/* 3670 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 3678 */	SIZEOF(char *) * (short int)xf_xnew,VXT_END,
-/* 3680 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zallocate,
-/* 3688 */	VXT_END,
-/* 3689 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3697 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zattach,VXT_END,
-/* 3701 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3709 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zcompile,VXT_END,
-/* 3713 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
-/* 3717 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zdeallocate,
-/* 3725 */	VXT_END,
-/* 3726 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3734 */	1,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_zedit,VXT_END,
-/* 3741 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zg1,VXT_END,
-/* 3748 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHL,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
-/* 3756 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zgoto,VXT_END,
-/* 3764 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zhalt,
-/* 3772 */	VXT_END,
-/* 3773 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3781 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zhelp,VXT_END,
-/* 3785 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3793 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zlink,VXT_END,
-/* 3797 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 3805 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zmess,VXT_END,
-/* 3809 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zprevious,
-/* 3817 */	VXT_END,
-/* 3818 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
-/* 3826 */	4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 3834 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_zprint,VXT_END,
-/* 3842 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,
-/* 3850 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
-/* 3858 */	SIZEOF(char *) * (short int)xf_zshow,VXT_END,
-/* 3860 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 3868 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
-/* 3876 */	SIZEOF(char *) * (short int)xf_zshow,VXT_END,
-/* 3878 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3886 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
-/* 3893 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3901 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
-/* 3908 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3916 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zsystem,VXT_END,
-/* 3920 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_ztcommit,
-/* 3928 */	VXT_END,
-/* 3929 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztstart,VXT_END,
-/* 3935 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_merge,VXT_END,
-/* 3941 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3949 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
-/* 3953 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3961 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
-/* 3965 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,
-/* 3973 */	SIZEOF(char *) * (short int)xf_indmerge,VXT_END,
-/* 3975 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_m_srchindx,
-/* 3983 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 3989 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zwritesvn,
-/* 3997 */	VXT_END,
-/* 3998 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4006 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwrite,VXT_END,
-/* 4010 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_igetdst,VXI_MOVL,VXT_REG,0x50,
-/* 4018 */	VXT_ADDR,0,VXT_END,
-/* 4021 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4029 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_indget1,VXT_END,
-/* 4033 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_glvnpop,
-/* 4041 */	VXT_END,
-/* 4042 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_glvnslot,
-/* 4050 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 4056 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 4064 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indsavglvn,VXT_END,
-/* 4069 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 4077 */	SIZEOF(char *) * (short int)xf_indsavlvn,VXT_END,
-/* 4079 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4087 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshlvn,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/* 4095 */	VXT_END,
-/* 4096 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 4104 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_savgvn,VXT_END,
-/* 4108 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_savlvn,
-/* 4116 */	VXT_END,
-/* 4117 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4125 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_shareslot,VXT_END,
-/* 4129 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4137 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_stoglvn,VXT_END,
-/* 4141 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4149 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshgvn,VXT_END,
-/* 4153 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 4161 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname2,VXT_END,
-/* 4168 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 4176 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_indget2,VXT_END,
-/* 4180 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_indmerge2,
-/* 4188 */	VXT_END,
-/* 4189 */	366,386,376,2556,2564,2560,2823,2835,
-/* 4197 */	2829,0,0,0,507,483,474,0,
-/* 4205 */	0,470,2065,2103,2084,2704,2719,2710,
-/* 4213 */	2680,2695,2686,2572,2583,2576,2662,2673,
-/* 4221 */	2666,2608,2619,2612,2626,2637,2630,2644,
-/* 4229 */	2655,2648,2590,2601,2594,2035,2055,2045,
-/* 4237 */	396,416,406};
diff --git a/sr_vvms/ttt.txt b/sr_vvms/ttt.txt
deleted file mode 100644
index 15740cc..0000000
--- a/sr_vvms/ttt.txt
+++ /dev/null
@@ -1,1016 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;								;
-;	Copyright 2001, 2014 Fidelity Information Services, Inc	;
-;								;
-;	This source code contains the intellectual property	;
-;	of its copyright holder(s), and is made available	;
-;	under a license.  If you do not know the terms of	;
-;	the license, please stop and do not read further.	;
-;								;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;This table defines the intermediate code (vax code) generated by an opcode.
-;It drives tttgen.m to generate ttt.c.
-;There are multiple versions of this file by platform family and
-;changes to one should trigger review and likely changes to the others.
-;The format is OC_<opcode name>:<tabs>list of vax instructions,one to a line.
-;The opcode must have a corresponding entry in opcode_def.h
-OC_ADD:		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_add
-OC_BINDPARM:	irepl	val.2
-		calls	val.1,xfer.xf_bindparm
-OC_BOOLFINI:	incl	val.1
-OC_BOOLINIT:	clrl	val.0
-OC_BREAK:	jsb	xfer.xf_break
-OC_CALL-BYTE:	pushl	val.2
-		jsb	xfer.xf_callb
-		brb	jmp.1
-OC_CALL-LONG:	pushl	val.2
-		jsb	xfer.xf_calll
-		jmp	jmp.1
-OC_CALL-WORD:	pushl	val.2
-		jsb	xfer.xf_callw
-		brw	jmp.1
-OC_CALLSP-BYTE:	pushl	val.2
-		jsb	xfer.xf_callspb
-		brb	jmp.1
-OC_CALLSP-LONG:	pushl	val.2
-		jsb	xfer.xf_callspl
-		jmp	jmp.1
-OC_CALLSP-WORD:	pushl	val.2
-		jsb	xfer.xf_callspw
-		brw	jmp.1
-OC_CAT:		irepab	val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_cat
-OC_CLOSE:	pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_close
-OC_CLRTEST:	bicb2	#1,r10
-		calls 	#0,xfer.xf_dt_false
-OC_CLRALSVARS:	pushab	val.1
-		calls	#1,xfer.xf_clralsvars
-OC_COBOOL-MINT:	tstl	val.1
-OC_COBOOL-MVAL:	movab	val.1,r1
-		jsb	xfer.xf_mval2bool
-OC_COMINT-MVAL: movab	val.1,r1
-		jsb	xfer.xf_mval2mint
-		movl	r0,val.0
-OC_COMMARG:	pushl	val.2
-		pushab	val.1
-		jsb	xfer.xf_commarg
-OC_COMVAL-MINT:	movab	val.0,r0
-		movl	val.1,r1
-		jsb	xfer.xf_mint2mval
-OC_CONUM:	movab	val.1,r1
-		jsb	xfer.xf_mval2num
-OC_CONTAIN:	movab	val.1,r0
-		movab	val.2,r1
-		jsb	xfer.xf_contain
-OC_CURRHD:	movl	(ap),addr.0
-OC_CURRTN:	movab	val.0,r1
-		jsb	xfer.xf_currtn
-OC_CVTPARM:	pushab	val.0
-		pushab	val.2
-		pushl	val.1
-		calls	#3,xfer.xf_cvtparm
-OC_DIV:		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_div
-OC_EQU:		movab	val.2,r1
-		movab	val.1,r0
-		jsb	xfer.xf_equ
-OC_EQUNUL:	movab	val.1,r0
-		jsb	xfer.xf_equnul
-OC_EXCAL:	irepab	val.5
-		pushl	val.4
-		pushl	val.3
-		pushl	val.2
-		pushl	#0
-		jsb	xfer.xf_exfun
-OC_EXFUN:	irepab	val.5
-		pushl	val.4
-		pushl	val.3
-		pushl	val.2
-		pushab	val.0
-		jsb	xfer.xf_exfun
-OC_EXFUNRET:	pushab	val.1
-		calls   #1,xfer.xf_exfunret
-OC_EXFUNRETALS:	pushab  val.1
-		calls   #1,xfer.xf_exfunretals
-OC_EXTCALL:	pushab	G^val.2
-		pushab	G^val.1
-		jsb	xfer.xf_extcall
-OC_EXTEXCAL:	irepab	val.5
-		pushl	val.4
-		pushl	val.3
-		pushl	#0
-		pushab	G^val.2
-		pushab	G^val.1
-		jsb	xfer.xf_extexfun
-OC_EXTEXFUN:	irepab	val.5
-		pushl	val.4
-		pushl	val.3
-		pushab	val.0
-		pushab	G^val.2
-		pushab	G^val.1
-		jsb	xfer.xf_extexfun
-OC_EXTJMP:	pushab	G^val.2
-		pushab	G^val.1
-		jsb	xfer.xf_extjmp
-OC_EXP:		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_exp
-OC_FETCH:	irepl	val.2
-		calls	val.1,xfer.xf_fetch
-OC_FGNCAL:	irepab	val.5
-		pushl	val.4
-		pushl	val.3
-		pushab	G^val.2
-		pushl	#0
-		calls	val.1,xfer.xf_fnfgncal
-OC_FGNLOOKUP:	pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_fgnlookup
-		movl	r0,addr.0
-OC_FNASCII:	pushab	val.0
-		pushab	val.1
-		pushl	val.2
-		calls	#3,xfer.xf_fnascii
-OC_FNCHAR:	irepl	val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_fnchar
-OC_FNDATA:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fndata
-OC_FNEXTRACT:	pushab	val.0
-		pushab	val.1
-		pushl	val.2
-		pushl	val.3
-		calls	#4,xfer.xf_fnextract
-OC_FNFGNCAL:	irepab	val.5
-		pushl	val.4
-		pushl	val.3
-		pushab	G^val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_fnfgncal
-OC_FNFIND:	pushab	val.0
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fnfind
-OC_FNFNUMBER:	pushab	val.0
-		pushl	val.4
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#5,xfer.xf_fnfnumber
-OC_FNGET:	movab	val.1,r1
-		movab	val.0,r0
-		jsb	xfer.xf_fnget
-OC_FNGET2:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnget2
-OC_FNGVGET:	pushab	val.0
-		calls	#1,xfer.xf_fngvget
-OC_FNGVGET1:	pushab	val.0
-		calls	#1,xfer.xf_fngvget1
-OC_FNGET1:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnget1
-OC_FNINCR:	pushab	val.0		; result of $INCR
-		pushab	val.2		; r->operand[1] = increment
-		pushab	val.1		; r->operand[0] = local-variable to increment
-		calls	#3,xfer.xf_fnincr
-OC_FNJ2:	pushab	val.0
-		pushl	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnj2
-OC_FNJ3:	pushab	val.0
-		pushl	val.3
-		pushl	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fnj3
-OC_FNLENGTH:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnlength
-OC_FNLVNAME:	pushab	val.0
-		pushl	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnlvname
-OC_FNLVNAMEO2:	pushab	val.2
-		pushab	val.0
-		pushab	val.1
-		calls	#3,xfer.xf_fnlvnameo2
-OC_FNLVPRVNAME:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnlvprvname
-OC_FNNAME:	irepab	val.4
-		pushab	val.1		; r->operand[0]
-		pushl	val.3
-		pushab	val.0		; result of $NAME
-		calls	val.2,xfer.xf_fnname
-OC_FNNEXT:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnnext
-OC_FNO2:	pushab	val.3
-		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fno2
-OC_FNORDER:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnorder
-OC_FNP1:	pushl	val.4
-		pushab	val.0
-		pushl	val.3
-		pushl	val.2
-		pushab	val.1
-		calls	#5,xfer.xf_fnp1
-OC_FNPIECE:	pushl	val.5
-		pushab	val.0
-		pushl	val.4
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#6,xfer.xf_fnpiece
-OC_FNQLENGTH:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnqlength
-OC_FNQSUBSCR:	pushab	val.0
-		pushl	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnqsubscript
-OC_FNQUERY:	irepab	val.3
-		pushab	val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_fnquery
-OC_FNRANDOM:	pushab	val.0
-		pushl	val.1
-		calls	#2,xfer.xf_fnrandom
-OC_FNREVERSE:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnreverse
-OC_FNSTACK1:	pushab	val.0
-		pushl	val.1
-		calls	#2,xfer.xf_fnstack1
-OC_FNSTACK2:	pushab	val.0
-		pushab	val.2
-		pushl	val.1
-		calls	#3,xfer.xf_fnstack2
-OC_FNTEXT:	pushab	val.0
-		pushab	val.3
-		pushl	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fntext
-OC_FNTRANSLATE:	pushab	val.0
-		pushab	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fntranslate
-OC_FNVIEW:	irepab	val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_fnview
-OC_FNZASCII:	pushab  val.0
-		pushab  val.1
-		pushl   val.2
-		calls   #3,xfer.xf_fnzascii
-OC_FNZAHANDLE:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnzahandle
-OC_FNZBITAND:	pushab	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_fnzbitand
-OC_FNZBITCOUN:	pushab	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_fnzbitcoun
-OC_FNZBITFIND:	pushl	val.3
-		pushl	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#4,xfer.xf_fnzbitfind
-OC_FNZBITGET:	pushl	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_fnzbitget
-OC_FNZBITLEN:	pushab	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_fnzbitlen
-OC_FNZBITNOT:	pushab	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_fnzbitnot
-OC_FNZBITOR:	pushab	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_fnzbitor
-OC_FNZBITSET:	pushl	val.3
-		pushl	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#4,xfer.xf_fnzbitset
-OC_FNZBITSTR:	pushl	val.2
-		pushl	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_fnzbitstr
-OC_FNZBITXOR:	pushab	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_fnzbitxor
-OC_FNZCALL:	irepab	val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_fnzcall
-OC_FNZCHAR:	irepl   val.2
-		pushab  val.0
-		calls   val.1,xfer.xf_fnzchar
-OC_FNZDATA:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnzdata
-OC_FNZDATE:	pushab	val.0
-		pushab	val.4
-		pushab	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#5,xfer.xf_fnzdate
-OC_FNZEXTRACT:	pushab  val.0
-		pushab  val.1
-		pushl   val.2
-		pushl   val.3
-		calls   #4,xfer.xf_fnzextract
-OC_FNZFILE:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnzfile
-OC_FNZFIND:	pushab  val.0
-		pushl   val.3
-		pushab  val.2
-		pushab  val.1
-		calls   #4,xfer.xf_fnzfind
-OC_FNZGETDVI:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fngetdvi
-OC_FNZGETJPI:	pushab	val.0
-		pushab	val.2
-		pushl	val.1
-		calls	#3,xfer.xf_fngetjpi
-OC_FNZGETLKI:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fngetlki
-OC_FNZGETSYI:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fngetsyi
-OC_FNZJ2:	pushab	val.0
-		pushl	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnzj2
-OC_FNZJOBEXAM:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnzjobexam
-OC_FNZLENGTH:	pushab  val.0
-		pushab  val.1
-		calls   #2,xfer.xf_fnzlength
-OC_FNZLKID:	pushab	val.0
-		pushl	val.1
-		calls	#2,xfer.xf_fnzlkid
-OC_FNZM:	pushab	val.0
-		pushl	val.1
-		calls	#2,xfer.xf_fnzm
-OC_FNZP1:	pushab	val.0
-		pushl	val.3
-		pushl   val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fnzp1
-OC_FNZPARSE:	pushab	val.0
-		pushab	val.5
-		pushab	val.4
-		pushab	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#6,xfer.xf_fnzparse
-OC_FNZPID:	pushab	val.0
-		pushl	val.1
-		calls	#2,xfer.xf_fnzpid
-OC_FNZPIECE:	pushab	val.0
-		pushl	val.4
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#5,xfer.xf_fnzpiece
-OC_FNZPOPULATION: pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnzpopulation
-OC_FNZPREVIOUS:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnzprevious
-OC_FNZPRIV:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnzpriv
-OC_FNZQGBLMOD:	pushab	val.0
-		calls	#1,xfer.xf_fnzqgblmod
-OC_FNZSEA:	pushab	val.0
-		pushl	val.3
-		pushl	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_fnzsearch
-OC_FNZSETPRV:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_fnzsetprv
-OC_FNZSOCKET:	irepab	val.2
-		pushab	val.0
-		calls	val.1,xfer.xf_fnzsocket
-OC_FNZSUBSTR:	pushab  val.0                   ; Destination mval
-		pushl   val.3                   ; max byte length
-		pushl   val.2                   ; starting character position
-		pushab  val.1                   ; string
-		calls   #4,xfer.xf_fnzsubstr
-OC_FNZTRANSLATE: pushab val.0
-		pushab  val.3
-		pushab  val.2
-		pushab  val.1
-		calls   #4,xfer.xf_fnztranslate
-OC_FNZSIGPROC:	pushab	val.0
-		pushl	val.2
-		pushl	val.1
-		calls	#3,xfer.xf_fnzsigproc
-OC_FNZTRNLNM:	pushab	val.0
-		pushab	val.6
-		pushab	val.5
-		pushab	val.4
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#7,xfer.xf_fnztrnlnm
-OC_FNZWIDTH:    pushab  val.0                   ; destination mval
-                pushab  val.1                   ; string
-                calls   #2,xfer.xf_fnzwidth
-OC_FOLLOW:	movab	val.1,r0
-		movab	val.2,r1
-		jsb	xfer.xf_follow
-OC_FORCENUM:	movab	val.0,r0
-		movab	val.1,r1
-		jsb	xfer.xf_forcenum
-OC_FORCHK1:	jsb	xfer.xf_restartpc
-		jsb 	xfer.xf_forchk1
-OC_FORINIT:	pushab	val.3
-		pushab	val.2
-		pushab	val.1
-		jsb	xfer.xf_forinit
-OC_FORLCLDO-BYTE:	pushl	val.2
-		jsb	xfer.xf_forlcldob
-		brb	jmp.1
-OC_FORLCLDO-LONG:	pushl val.2
-		jsb	xfer.xf_forlcldol
-		jmp	jmp.1
-OC_FORLCLDO-WORD:	pushl val.2
-		jsb	xfer.xf_forlcldow
-		brw	jmp.1
-OC_FORLOOP-BYTE:jsb	xfer.xf_restartpc
-		pushab	jmp.1
-		pushab	val.4
-		pushab	val.3
-		pushab	val.2
-		jsb	xfer.xf_forloop
-OC_FORLOOP-LONG:jsb	xfer.xf_restartpc
-		pushab	jmp.1
-		pushab	val.4
-		pushab	val.3
-		pushab	val.2
-		jsb	xfer.xf_forloop
-OC_FORLOOP-WORD:jsb	xfer.xf_restartpc
-		pushab	jmp.1
-		pushab	val.4
-		pushab	val.3
-		pushab	val.2
-		jsb	xfer.xf_forloop
-OC_GETINDX:	irepab	val.2
-		calls	val.1,xfer.xf_getindx
-		movl	r0,addr.0
-OC_GETTRUTH:	movab	val.0,r1
-		jsb	xfer.xf_gettruth
-OC_GVDATA:	pushab	val.0
-		calls	#1,xfer.xf_gvdata
-OC_GVEXTNAM:	irepab	val.3
-		pushl	val.2	; hash_code
-		calls	val.1,xfer.xf_gvextnam
-OC_GVGET:	pushab	val.0
-		calls	#1,xfer.xf_gvget
-OC_GVINCR:	pushab	val.0		; result of $INCR
-		pushab	val.2		; r->operand[1] = increment (global-variable to increment is gv_currkey so no operand[0])
-		calls	#2,xfer.xf_gvincr
-OC_GVKILL:	calls	#0,xfer.xf_gvkill
-OC_GVNAKED:	irepab	val.3
-		pushl	val.2	; hash_code
-		calls	val.1,xfer.xf_gvnaked
-OC_GVNAME:	irepab	val.3
-		pushl	val.2	; hash_code
-		calls	val.1,xfer.xf_gvname
-OC_GVNEXT:	pushab	val.0
-		calls	#1,xfer.xf_gvnext
-OC_GVO2:	pushab	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_gvo2
-OC_GVORDER:	pushab	val.0
-		calls	#1,xfer.xf_gvorder
-OC_GVPUT:	pushab	val.1
-		calls	#1,xfer.xf_gvput
-OC_GVQUERY:	pushab	val.0
-		calls	#1,xfer.xf_gvquery
-OC_GVRECTARG:	pushab	val.1
-		calls	#1,xfer.xf_gvrectarg
-OC_GVSAVTARG:	pushab	val.0
-		calls	#1,xfer.xf_gvsavtarg
-OC_GVZWITHDRAW: calls	#0,xfer.xf_gvzwithdraw
-OC_GVZWRITE:	jsb 	xfer.xf_restartpc
-		irepab	val.4
-		pushl	val.3
-		pushl	val.2
-		calls	val.1,xfer.xf_gvzwrite
-OC_HALT:	calls	#0,xfer.xf_halt
-OC_HANG:	jsb 	xfer.xf_restartpc
-		pushab	val.1
-		calls	#1,xfer.xf_hang
-OC_HARDRET:	jsb	xfer.xf_hardret
-OC_IDIV:	pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_idiv
-OC_IGETSRC:	pushab	val.0
-		calls	#1,xfer.xf_igetsrc
-OC_INDDEVPARMS:	pushab	val.0
-		pushl	val.2
-		pushab	val.1
-		jsb	xfer.xf_inddevparms
-OC_INDFNNAME:	pushab	val.2		; r->operand[1] = depth
-		pushab	val.1		; r->operand[0]	= name
-		pushab	val.0		; r->dst
-		jsb	xfer.xf_indfnname
-OC_INDFUN:	pushab	val.0
-		pushl	val.2
-		pushab	val.1
-		jsb	xfer.xf_indfun
-OC_INDGLVN:	pushab	val.0
-		pushab	val.1
-		jsb	xfer.xf_indglvn
-OC_INDINCR:	pushab	val.1		; r->operand[0] = indirection expression
-		pushab 	val.2		; r->operand[1] = increment (ILIT)
-		pushab	val.0		; r->dst
-		jsb	xfer.xf_indincr
-OC_INDLVADR:	pushab	val.1
-		jsb	xfer.xf_indlvadr
-		movl	r0,addr.0
-OC_INDLVARG:	pushab	val.0
-		pushab	val.1
-		jsb	xfer.xf_indlvarg
-OC_INDNAME:	pushab	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_indname
-OC_INDLVNAMADR:	pushab	val.1
-		jsb	xfer.xf_indlvnamadr
-		movl	r0,addr.0
-OC_INDO2:	pushab	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_indo2
-OC_INDPAT:	pushab	val.0
-		pushab	val.1
-		jsb	xfer.xf_indpat
-OC_INDRZSHOW:	pushab	val.2
-		pushab	val.1
-		jsb	xfer.xf_indrzshow
-OC_INDSET:	pushab	val.2
-		pushab	val.1
-		jsb	xfer.xf_indset
-OC_INDTEXT:	pushab	val.0
-		pushab	val.3
-		pushl	val.2
-		pushab	val.1
-		jsb	xfer.xf_indtext
-OC_IOCONTROL:	jsb     xfer.xf_restartpc
-		irepab	val.2
-		calls	val.1,xfer.xf_iocontrol
-OC_IRETMVAD:	movab	val.1,r1
-		jsb	xfer.xf_iretmvad
-OC_IRETMVAL:	pushab 	val.2
-		pushab	val.1
-		jsb	xfer.xf_iretmval
-OC_JMP-BYTE:	brb	jmp.1
-OC_JMP-LONG:	jmp	jmp.1
-OC_JMP-WORD:	brw	jmp.1
-OC_JMPAT:	jmp	val.1
-OC_JMPEQU-BYTE:	beql	jmp.1
-OC_JMPEQU-LONG:	bneq	#6
-		jmp	jmp.1
-OC_JMPEQU-WORD:	bneq	#3
-		brw	jmp.1
-OC_JMPGEQ-BYTE:	bgeq	jmp.1
-OC_JMPGEQ-LONG:	blss	#6
-		jmp	jmp.1
-OC_JMPGEQ-WORD:	blss	#3
-		brw	jmp.1
-OC_JMPGTR-BYTE:	bgtr	jmp.1
-OC_JMPGTR-LONG:	bleq	#6
-		jmp	jmp.1
-OC_JMPGTR-WORD:	bleq	#3
-		brw	jmp.1
-OC_JMPLEQ-BYTE:	bleq	jmp.1
-OC_JMPLEQ-LONG:	bgtr	#6
-		jmp	jmp.1
-OC_JMPLEQ-WORD:	bgtr	#3
-		brw	jmp.1
-OC_JMPLSS-BYTE:	blss	jmp.1
-OC_JMPLSS-LONG:	bgeq	#6
-		jmp	jmp.1
-OC_JMPLSS-WORD:	bgeq	#3
-		brw	jmp.1
-OC_JMPNEQ-BYTE:	bneq	jmp.1
-OC_JMPNEQ-LONG:	bneq	#6
-		jmp	jmp.1
-OC_JMPNEQ-WORD:	beql	#3
-		brw	jmp.1
-OC_JMPTCLR-BYTE:	blbc	r10,jmp.1
-OC_JMPTCLR-LONG:	blbs	r10,#6
-			jmp	jmp.1
-OC_JMPTCLR-WORD:	blbs	r10,#3
-			brw	jmp.1
-OC_JMPTSET-BYTE:	blbs	r10,jmp.1
-OC_JMPTSET-LONG:	blbc	r10,#6
-			jmp	jmp.1
-OC_JMPTSET-WORD:	blbc	r10,#3
-			brw	jmp.1
-OC_JOB:		jsb 	xfer.xf_restartpc
-		irepab	val.7
-		pushl	val.6
-		pushab	val.5
-		pushab	val.4
-		pushl	val.3
-		pushab	val.2
-		calls	val.1,xfer.xf_job
-OC_KILL:	pushab	val.1
-		calls	#1,xfer.xf_kill
-OC_KILLALIAS:   pushl	val.1
-		calls	#1,xfer.xf_killalias
-OC_KILLALL:	calls	#0,xfer.xf_killall
-OC_KILLALIASALL:	calls	#0,xfer.xf_killaliasall
-OC_LABADDR:	pushl	val.2
-		pushab	val.1
-		pushab	val.3
-		calls	#3,xfer.xf_labaddr
-		movl	r0,addr.0
-OC_LCKDECR:	pushl	val.1
-		calls	#1,xfer.xf_lckdecr
-OC_LCKINCR:	pushl	val.1
-		calls	#1,xfer.xf_lckincr
-OC_LDADDR-BYTE:	movab	jmp.1,addr.0
-OC_LDADDR-LONG:	movab	jmp.1,addr.0
-OC_LDADDR-WORD:	movab	jmp.1,addr.0
-OC_LINEFETCH:	irepl	val.2
-		pushl	val.1
-		jsb	xfer.xf_linefetch
-OC_LINESTART:	jsb	xfer.xf_linestart
-OC_LKEXTNAME:	irepab	val.4
-		pushab	val.3
-		pushab	val.2
-		calls	val.1,xfer.xf_lkname
-OC_LKINIT:	calls	#0,xfer.xf_lkinit
-OC_LKNAME:	irepab	val.4
-		pushab	val.3
-		pushl	val.2
-		calls	val.1,xfer.xf_lkname
-OC_LOCK:	pushl	val.1
-		calls	#1,xfer.xf_lock
-OC_LVPATWRITE:	jsb 	xfer.xf_restartpc
-		irepab	val.3
-		pushl	val.2
-		calls	val.1,xfer.xf_lvpatwrite
-OC_LVZWITHDRAW:	pushab	val.1
-		calls	#1,xfer.xf_lvzwithdraw
-OC_LVZWRITE:	jsb 	xfer.xf_restartpc
-		irepab	val.2
-		calls	val.1,xfer.xf_lvzwrite
-OC_MOD:		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_flt_mod
-OC_MUL:		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_mul
-OC_NEG:		movab	val.0,r0
-		movab	val.1,r1
-		jsb	xfer.xf_neg
-OC_NEWINTRINSIC:  pushl	val.1
-		jsb	xfer.xf_newintrinsic
-OC_NEWVAR:	pushl	val.1
-		jsb	xfer.xf_newvar
-OC_NULLEXP:	calls	#0,xfer.xf_nullexp
-		movl    r0,addr.0
-OC_NUMCMP:	movab	val.1,r0
-		movab	val.2,r1
-		jsb	xfer.xf_numcmp
-OC_OPEN:	jsb 	xfer.xf_restartpc
-		pushab	val.4
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#4,xfer.xf_open
-OC_PATTERN:	movab	val.1,r0
-		movab	val.2,r1
-		jsb	xfer.xf_pattern
-OC_FNPOPULATION: pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_fnpopulation
-OC_PUTINDX:	irepab	val.2
-		calls	val.1,xfer.xf_putindx
-		movl	r0,addr.0
-OC_RDONE:	jsb 	xfer.xf_restartpc
-		pushl	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_rdone
-OC_READ:	jsb 	xfer.xf_restartpc
-		pushl	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_read
-OC_READFL:	jsb 	xfer.xf_restartpc
-		pushl	val.2
-		pushl	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_readfl
-OC_RESTARTPC:	jsb	xfer.xf_restartpc
-OC_RET:		jsb	xfer.xf_ret
-OC_RETARG:	movab	val.1,r0
-		movl	val.2,r1
-		jsb	xfer.xf_retarg
-OC_RHDADDR:	pushab	G^val.2
-		pushab	val.1
-		calls	#2,xfer.xf_rhdaddr
-		movl	r0,addr.0
-OC_RHDADDR1:	pushl	#0
-		pushab	val.1
-		calls	#2,xfer.xf_rhdaddr
-		movl	r0,addr.0
-OC_RTERROR:	pushl	val.2	; Note if OC_RTERROR call changes, linetail.c and eval_expr.c will also need
-		pushl	val.1	; to change due to them dereferencing the backpoints to get to the opcode.
-		jsb	xfer.xf_rterror
-OC_SETALS2ALS:	pushl	val.1
-		pushab	val.2
-		calls	#2,xfer.xf_setals2als
-OC_SETALSIN2ALSCT:	pushab	val.1
-			pushab	val.2
-			calls	#2,xfer.xf_setalsin2alsct
-OC_SETALSCTIN2ALS:	pushl	val.1
-			pushab	val.2
-			calls	#2,xfer.xf_setalsctin2als
-OC_SETALSCT2ALSCT:	pushab	val.1
-			pushab	val.2
-			calls	#2,xfer.xf_setalsct2alsct
-OC_SETFNRETIN2ALS:	pushl	val.1
-			pushab	val.2
-			calls	#2,xfer.xf_setfnretin2als
-OC_SETFNRETIN2ALSCT:	pushab	val.1
-			pushab	val.2
-			calls	#2,xfer.xf_setfnretin2alsct
-OC_SETEXTRACT:	pushab	val.0
-		pushl	val.3
-		pushl	val.2
-		pushab	val.4
-		pushab	val.1
-		calls	#5,xfer.xf_setextract
-OC_SETP1:	pushab	val.0
-		pushl	val.3
-		pushab	val.4
-		pushl	val.2
-		pushab	val.1
-		calls	#5,xfer.xf_setp1
-OC_SETPIECE:	pushab	val.0
-		pushl	val.4
-		pushl	val.3
-		pushab	val.5
-		pushab	val.2
-		pushab	val.1
-		calls	#6,xfer.xf_setpiece
-OC_SETTEST:	bisb2	#1,r10
-		calls	#0,xfer.xf_dt_true
-OC_SETZBRK:	pushl	val.5
-		pushab	val.4
-		pushl	val.2
-		pushab	val.1
-		pushab	val.3
-		calls	#5,xfer.xf_setzbrk
-OC_SETZEXTRACT:	pushab  val.0
-		pushl   val.3
-		pushl   val.2
-		pushab  val.4
-		pushab  val.1
-		calls   #5,xfer.xf_setzextract
-OC_SETZP1:	pushab  val.0
-		pushl   val.3
-		pushab  val.4
-		pushl   val.2
-		pushab  val.1
-		calls   #5,xfer.xf_setzp1
-OC_SETZPIECE:	pushab  val.0
-		pushl   val.4
-		pushl   val.3
-		pushab  val.5
-		pushab  val.2
-		pushab  val.1
-		calls   #6,xfer.xf_setzpiece
-OC_SORTS_AFTER:	movab	val.1,r0
-		movab	val.2,r1
-		jsb	xfer.xf_sorts_after
-OC_SRCHINDX:	irepab	val.2
-		calls	val.1,xfer.xf_srchindx
-		movl	r0,addr.0
-OC_STO:		movab	val.2,r1
-		movab	val.1,r0
-		jsb	xfer.xf_sto
-OC_STOLIT:	movc3	#16,val.2,val.1
-OC_STOTEMP:	movab	val.1,r1
-		movab	val.0,r0
-		jsb	xfer.xf_sto
-OC_SUB:		pushab	val.0
-		pushab	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_sub
-OC_SVGET:	pushab	val.0
-		pushl	val.1
-		calls	#2,xfer.xf_svget
-OC_PSVPUT:	pushab	val.2
-		pushl	val.1
-		jsb	xfer.xf_psvput
-OC_SVPUT:	pushab	val.2
-		pushl	val.1
-		calls	#2,xfer.xf_svput
-OC_TIMTRU:	movl	r0,r10
-OC_TCOMMIT:	jsb	xfer.xf_tcommit
-OC_TROLLBACK:	pushl	val.1
-		jsb	xfer.xf_trollback
-OC_TRESTART:	pushl	val.1
-		jsb	xfer.xf_trestart
-OC_TSTART:	irepab	val.4
-		pushl	val.3
-		pushab	val.2
-		pushl	val.1
-		jsb	xfer.xf_tstart
-OC_UNLOCK:	calls	#0,xfer.xf_unlock
-OC_USE:		pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_use
-OC_VIEW:	irepab	val.2
-		calls	val.1,xfer.xf_view
-OC_VXCMPL:	cmpl	val.1,val.2
-OC_WRITE:	pushab	val.1
-		calls	#1,xfer.xf_write
-OC_WTEOL:	pushl	val.1
-		calls	#1,xfer.xf_wteol
-OC_WTFF:	calls	#0,xfer.xf_wtff
-OC_WTONE:	pushl	val.1
-		calls	#1,xfer.xf_wtone
-OC_WTTAB:	pushl	val.1
-		calls	#1,xfer.xf_wttab
-OC_XKILL:	irepab	val.2
-		calls	val.1,xfer.xf_xkill
-OC_XNEW:	irepab	val.2
-		pushl	val.1
-		jsb	xfer.xf_xnew
-OC_ZALLOCATE:	pushl	val.1
-		calls	#1,xfer.xf_zallocate
-OC_ZATTACH:	jsb 	xfer.xf_restartpc
-		pushab	val.1
-		calls	#1,xfer.xf_zattach
-OC_ZCOMPILE:	pushl	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_zcompile
-OC_ZCONT:	jsb	xfer.xf_zcont
-OC_ZDEALLOCATE:	pushl	val.1
-		calls	#1,xfer.xf_zdeallocate
-OC_ZEDIT:	jsb 	xfer.xf_restartpc
-		pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_zedit
-OC_ZG1:		pushl	val.1
-		jsb	xfer.xf_zg1
-OC_ZGOTO:	pushl	val.1
-		pushl	val.4
-		pushab	val.3
-		pushab	val.2
-		jsb	xfer.xf_zgoto
-OC_ZHALT:	pushab	val.1
-		calls	#1,xfer.xf_zhalt
-OC_ZHELP:	pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_zhelp
-OC_ZLINK:	pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_zlink
-OC_ZMESS:	irepab	val.3
-		pushl	val.2
-		calls	val.1,xfer.xf_zmess
-OC_ZPREVIOUS:	pushab	val.0
-		calls	#1,xfer.xf_zprevious
-OC_ZPRINT:	jsb 	xfer.xf_restartpc
-		pushl 	val.5
-		pushab	val.4
-		pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		calls	#5,xfer.xf_zprint
-OC_ZSHOW:	jsb	xfer.xf_restartpc
-		pushl	#0
-		pushl	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_zshow
-OC_ZSHOWLOC:	jsb     xfer.xf_restartpc
-		pushab	val.3
-		pushl	val.2
-		pushab	val.1
-		calls	#3,xfer.xf_zshow
-OC_ZSTEP:	pushl	#0
-		pushl	val.1
-		calls	#2,xfer.xf_zstep
-		jsb	xfer.xf_zcont
-OC_ZSTEPACT:	pushab	val.2
-		pushl	val.1
-		calls	#2,xfer.xf_zstep
-		jsb	xfer.xf_zcont
-OC_ZSYSTEM:	jsb 	xfer.xf_restartpc
-		pushab	val.1
-		calls	#1,xfer.xf_zsystem
-OC_ZTCOMMIT:	pushl	val.1
-		calls	#1,xfer.xf_ztcommit
-OC_ZTSTART:	calls	#0,xfer.xf_ztstart
-OC_MERGE:	calls	#0,xfer.xf_merge
-OC_MERGE_GVARG: pushl	#0
-		pushl	val.1
-		calls	#2,xfer.xf_merge_arg
-OC_MERGE_LVARG: pushab	val.2
-		pushl	val.1
-		calls	#2,xfer.xf_merge_arg
-OC_INDMERGE:	pushab	val.1
-		pushab	val.2
-		jsb	xfer.xf_indmerge
-OC_M_SRCHINDX:	irepab	val.2
-		calls	val.1,xfer.xf_m_srchindx
-		movl	r0,addr.0
-OC_ZWRITESVN:	pushl	val.1
-		calls	#1,xfer.xf_zwritesvn
-OC_FNZWRITE:    pushab  val.0                   ; destination mval
-                pushab  val.1                   ; string
-                calls   #2,xfer.xf_fnzwrite
-OC_IGETDST:	calls	#0,xfer.xf_igetdst
-		movl    r0,addr.0
-OC_INDGET1:	pushab	val.0
-		pushab	val.1
-		calls	#2,xfer.xf_indget1
-OC_GLVNPOP:	pushab	val.1
-		calls	#1,xfer.xf_glvnpop
-OC_GLVNSLOT:	pushl	val.1
-		calls	#1,xfer.xf_glvnslot
-		movl	r0,addr.0
-OC_INDSAVGLVN:	pushl	val.3
-		pushab	val.2
-		pushab	val.1
-		jsb	xfer.xf_indsavglvn
-OC_INDSAVLVN:	pushab	val.2
-		pushab	val.1
-		jsb	xfer.xf_indsavlvn
-OC_RFRSHLVN:	pushl	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_rfrshlvn
-		movl	r0,addr.0
-OC_SAVGVN:	irepab	val.3
-		pushl	val.2	; hash_code
-		calls	val.1,xfer.xf_savgvn
-OC_SAVLVN:	irepab	val.2
-		calls	val.1,xfer.xf_savlvn
-OC_SHARESLOT:	pushl	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_shareslot
-OC_STOGLVN:	pushab	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_stoglvn
-OC_RFRSHGVN:	pushl	val.2
-		pushab	val.1
-		calls	#2,xfer.xf_rfrshgvn
-OC_INDFNNAME2:	pushab	val.2
-		pushab	val.1
-		pushab	val.0
-		calls	#3,xfer.xf_indfnname2
-OC_INDGET2:	pushab	val.1
-		pushab	val.0
-		calls	#2,xfer.xf_indget2
-OC_INDMERGE2:	pushab	val.1
-		calls	#1,xfer.xf_indmerge2
diff --git a/sr_vvms/upd_log_init.c b/sr_vvms/upd_log_init.c
deleted file mode 100644
index f16884e..0000000
--- a/sr_vvms/upd_log_init.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#ifdef VMS
-#include <descrip.h> /* Required for gtmrecv.h */
-#endif
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "gtmrecv.h"
-#include "iosp.h"
-#include "repl_log.h"
-#include "repl_dbg.h"
-#include "gtm_stdio.h"
-#include "util.h"
-#include "gtm_event_log.h"
-#include "read_db_files_from_gld.h"
-#include "updproc.h"
-
-#define UPDPROC_LOG_FILE_SUFFIX			"_updproc"
-#define UPDHELPER_READER_LOG_FILE_SUFFIX	"_uhr_"
-#define UPDHELPER_WRITER_LOG_FILE_SUFFIX	"_uhw_"
-
-GBLREF	recvpool_addrs	recvpool;
-GBLREF	uint4		process_id;
-
-int upd_log_init(recvpool_user who)
-{
-	char		log_file[MAX_FN_LEN + 1], file_suffix_str[MAX_FN_LEN + 1], pid_str[9], *file_suffix;
-	int		status = SS_NORMAL, len;
-
-	strcpy(log_file, recvpool.gtmrecv_local->log_file);
-	if (UPDPROC == who)
-		file_suffix = UPDPROC_LOG_FILE_SUFFIX;
-	else
-	{
-		if (UPD_HELPER_READER == who)
-			strcpy(file_suffix_str, UPDHELPER_READER_LOG_FILE_SUFFIX);
-		else /* UPD_HELPER_WRITER == who */
-			strcpy(file_suffix_str, UPDHELPER_WRITER_LOG_FILE_SUFFIX);
-		i2hex(process_id, pid_str, 8);
-		pid_str[8] = '\0';
-		strcat(file_suffix_str, pid_str);
-		file_suffix = file_suffix_str;
-	}
-	strcat(log_file, file_suffix);
-	len = strlen(log_file);
-	if (!util_is_log_open() || UPDPROC != who || 0 != memcmp(log_file, recvpool.upd_proc_local->log_file, len))
-	{
-		util_log_open(log_file, len);
-		if (UPDPROC == who)
-		{
-			memcpy(recvpool.upd_proc_local->log_file, log_file, len+1); /* +1 for '\0' */
-			gtm_event_log_init();
-		}
-	}
-	return(status);
-}
diff --git a/sr_vvms/user_rundown.c b/sr_vvms/user_rundown.c
deleted file mode 100644
index 4008b80..0000000
--- a/sr_vvms/user_rundown.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <lkidef.h>
-#include <prvdef.h>
-#include <psldef.h>
-#include <ssdef.h>
-#include <efndef.h>
-
-#include "gtmsecshr.h"
-#include "secshr_db_clnup.h"
-#include "locks.h"
-#include "vmsdtype.h"
-
-GBLREF uint4		rundown_process_id;
-GBLREF lock_sb		vms_lock_list[MAX_VMS_LOCKS + 1];
-GBLREF int		vms_lock_tail;
-
-#define MAX_TRIES 10
-
-void	user_rundown()
-{
-	struct
-	{
-		item_list_3	item[1];
-		int4		terminator;
-	} item_list;
-	boolean_t	repeat;
-	int		index, lcnt;
-	unsigned short	iosb[4];
-	uint4		lk_pid, retlen, status;
-	uint4		prvadr[2], prvprv[2];
-
-#ifndef TEST_REPL
-	secshr_db_clnup(ABNORMAL_TERMINATION);
-#endif
-	GTMSECSHR_SET_DBG_PRIV(PRV$M_SYSLCK, status);
-	if (SS$_NORMAL == status)
-	{
-		item_list.item[0].buffer_length = SIZEOF(lk_pid);
-		item_list.item[0].item_code = LKI$_PID;
-		item_list.item[0].buffer_address = &lk_pid;
-		item_list.item[0].return_length_address = &retlen;
-		item_list.terminator = 0;
-		repeat = TRUE;
-		for (lcnt = 0;  repeat && lcnt < MAX_TRIES;  lcnt++)
-		{
-			repeat = FALSE;
-			for (index = 0;  index < vms_lock_tail;  index++)
-			{
-				if (vms_lock_list[index].lockid)
-				{
-					if ((SS$_NORMAL == (status = sys$getlkiw(EFN$C_ENF, &vms_lock_list[index].lockid,
-								&item_list, iosb, NULL, 0, 0)))
-							&& (lk_pid == rundown_process_id))
-						status = sys$deq(vms_lock_list[index].lockid, NULL, PSL$C_USER, 0);
-					if (SS$_SUBLOCKS != status)
-						vms_lock_list[index].lockid = 0;
-					else
-						repeat = TRUE;
-				}
-			}
-		}
-		GTMSECSHR_REL_DBG_PRIV;
-	}
-}
diff --git a/sr_vvms/util_input.c b/sr_vvms/util_input.c
deleted file mode 100644
index 7916c25..0000000
--- a/sr_vvms/util_input.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <fab.h>
-#include <rab.h>
-#include <descrip.h>
-#include <climsgdef.h>
-
-#define IN_BUFF_SIZE 256
-
-static struct RAB *util_input_rab = 0;
-static struct FAB *util_input_fab = 0;
-static char inbuff[IN_BUFF_SIZE];
-static char *inptr;
-
-void util_in_open(file_prompt)
-struct dsc$descriptor_s *file_prompt;
-{
-	static readonly unsigned char	sys_input_name[] = "SYS$INPUT";
-	short unsigned			innamlen;
-	uint4			status;
-	char				input_name[255];
-	$DESCRIPTOR(input_name_desc, input_name);
-
-	if (file_prompt)
-	{	status = cli$get_value(file_prompt, &input_name_desc, &innamlen);
-		if (status != 1)
-		{
-			innamlen = SIZEOF(sys_input_name) - 1;
-			input_name_desc.dsc$a_pointer = sys_input_name;
-		}
-	}else
-	{
-		innamlen = SIZEOF(sys_input_name) - 1;
-		input_name_desc.dsc$a_pointer = sys_input_name;
-	}
-	inptr = inbuff;
-	util_input_fab = malloc(SIZEOF(*util_input_fab));
-	util_input_rab = malloc(SIZEOF(*util_input_rab));
-	*util_input_fab  = cc$rms_fab;
-	*util_input_rab  = cc$rms_rab;
-	util_input_rab->rab$l_fab = util_input_fab;
-	util_input_rab->rab$w_usz = 255;
-	util_input_fab->fab$w_mrs = 255;
-	util_input_fab->fab$b_fac = FAB$M_GET | FAB$M_PUT;
-	util_input_fab->fab$l_fna = input_name_desc.dsc$a_pointer;
-	util_input_fab->fab$b_fns = innamlen;
-	status = sys$open(util_input_fab, 0, 0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-	status = sys$connect(util_input_rab, 0, 0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-}
-
-char *util_in_read(len)
-int *len;
-{
-	int	status;
-
-	util_input_rab->rab$l_ubf = inbuff;
-	status = sys$get(util_input_rab,0 ,0);
-	if ((status & 1) == 0)
-		lib$signal(status);
-	*len = util_input_rab->rab$w_rsz;
-	return util_input_rab->rab$l_rbf;
-}
diff --git a/sr_vvms/util_output.c b/sr_vvms/util_output.c
deleted file mode 100644
index 1c528d8..0000000
--- a/sr_vvms/util_output.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include <climsgdef.h>
-#include <descrip.h>
-#include <fab.h>
-#include <rab.h>
-#include <opcdef.h>
-#include <rmsdef.h>
-#include <ssdef.h>
-#include <stdarg.h>
-
-#include "gdsroot.h"
-#include "gdsblk.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "fao_parm.h"
-#include "util.h"
-#include "gt_timer.h"
-
-static struct RAB *util_output_rab = NULL;
-static struct FAB *util_output_fab = NULL;
-
-GBLDEF	unsigned int	sndopr_missed = 0, sndopr_mbfull = 0;
-
-error_def(ERR_DEVOPENFAIL);
-error_def(ERR_SYSCALL);
-error_def(ERR_TEXT);
-
-void format_special_chars(void);
-void util_out_close(void);
-
-boolean_t util_is_log_open(void)
-{
-	return (NULL != util_output_fab);
-}
-
-void util_log_open(char *filename, uint4 len)
-{
-	unsigned int	status;
-	uint4		ustatus;
-	char		exp_file_name[MAX_FN_LEN];
-	int		exp_file_name_len;
-
-	if(util_output_fab)
-		util_out_close();
-	memcpy(exp_file_name, filename, len);
-	exp_file_name_len = len;
-	if (!get_full_path(filename, len, exp_file_name, &exp_file_name_len, SIZEOF(exp_file_name), &ustatus))
-		rts_error(VARLSTCNT(5) ERR_DEVOPENFAIL, 2, len, filename, ustatus);
-	util_output_fab = malloc(SIZEOF(*util_output_fab));
-	util_output_rab = malloc(SIZEOF(*util_output_rab));
-	*util_output_fab  = cc$rms_fab;
-	*util_output_rab  = cc$rms_rab;
-	util_output_rab->rab$l_fab = util_output_fab;
-	util_output_rab->rab$w_usz = OUT_BUFF_SIZE;
-	util_output_fab->fab$w_mrs = OUT_BUFF_SIZE;
-	util_output_fab->fab$b_fac = FAB$M_GET | FAB$M_PUT;
-	util_output_fab->fab$b_rat = FAB$M_CR;
-	util_output_fab->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET;
-	util_output_fab->fab$l_fna = exp_file_name;
-	util_output_fab->fab$b_fns = exp_file_name_len;
-	status = sys$create(util_output_fab, 0, 0);
-	if (1 & status)
-		status = sys$connect(util_output_rab, 0, 0);
-	if (RMS$_NORMAL != status)
-		rts_error(VARLSTCNT(10) ERR_SYSCALL, 5, LEN_AND_LIT("SYS$CONNECT"), CALLFROM, status, 0,util_output_fab->fab$l_stv);
-}
-
-void util_out_open(struct dsc$descriptor_s *file_prompt)
-{
-	short unsigned			outnamlen;
-	unsigned int			status;
-	char				output_name[255];
-	$DESCRIPTOR(output_name_desc, output_name);
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	TREF(util_outptr) = TREF(util_outbuff_ptr);
-	util_output_fab = NULL;
-	util_output_rab = NULL;
-	if (file_prompt)
-	{
-		status = cli$get_value(file_prompt, &output_name_desc, &outnamlen);
-		if (SS$_NORMAL == status)
-		{
-			util_output_fab = malloc(SIZEOF(*util_output_fab));
-			util_output_rab = malloc(SIZEOF(*util_output_rab));
-			*util_output_fab  = cc$rms_fab;
-			*util_output_rab  = cc$rms_rab;
-			util_output_rab->rab$l_fab = util_output_fab;
-			util_output_rab->rab$w_usz = OUT_BUFF_SIZE;
-			util_output_fab->fab$w_mrs = OUT_BUFF_SIZE;
-			util_output_fab->fab$b_fac = FAB$M_GET | FAB$M_PUT;
-			util_output_fab->fab$b_rat = FAB$M_CR;
-			util_output_fab->fab$b_shr = FAB$M_SHRPUT | FAB$M_SHRGET;
-			util_output_fab->fab$l_fna = output_name_desc.dsc$a_pointer;
-			util_output_fab->fab$b_fns = outnamlen;
-			status = sys$create(util_output_fab, 0, 0);
-			if (1 & status)
-				status = sys$connect(util_output_rab, 0, 0);
-			if (RMS$_NORMAL != status)
-				rts_error(VARLSTCNT(10) ERR_SYSCALL, 5, LEN_AND_LIT("SYS$CONNECT"), CALLFROM, status, 0,
-						util_output_fab->fab$l_stv);
-		}
-	}
-}
-
-void util_out_write(unsigned char *addr, unsigned int len)
-{
-	unsigned int	status;
-	$DESCRIPTOR(output_mess_desc, "");
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	if (NULL == util_output_rab)
-	{
-		output_mess_desc.dsc$a_pointer = addr;
-		output_mess_desc.dsc$w_length = len;
-		status = lib$put_output(&output_mess_desc);
-		if (SS$_NORMAL != status)
-			lib$signal(status);
-	} else
-	{
-		util_output_rab->rab$l_rbf = addr;
-		util_output_rab->rab$w_rsz = len;
-		assert(!lib$ast_in_prog());
-		if (RMS$_NORMAL == (status = sys$put(util_output_rab, 0, 0)))
-			status = sys$flush(util_output_rab);
-		if (RMS$_NORMAL != status)
-		{
-			assert(FALSE);
-			if (TREF(gtm_environment_init))
-				GTMASSERT;
-			gtm_putmsg(ERR_TEXT, 2, LEN_AND_LIT("Error in util_output"));
-			lib$signal(status, util_output_rab->rab$l_stv);
-		}
-	}
-	return;
-}
-
-void util_out_send_oper(char *addr, unsigned int len)
-{
-
-	unsigned int	status, thislen;
-	int		retry = SNDOPR_TRIES;
-	uchar_ptr_t	operptr;
-	oper_msg_struct	oper;
-	$DESCRIPTOR(opmsg, "");
-
-	if (len > SIZEOF(oper.text))
-		len = SIZEOF(oper.text);
-	do
-	{
-		oper.req_code = OPC$_RQ_RQST;
-		oper.target = OPC$M_NM_CENTRL | OPC$M_NM_DEVICE | OPC$M_NM_DISKS;
-		memcpy(&oper.text, addr, len);
-		opmsg.dsc$a_pointer = &oper;
-		opmsg.dsc$w_length = SIZEOF(oper) - SIZEOF(oper.text) + len;
-		status = sys$sndopr(&opmsg, 0);
-		if (SS$_MBFULL == status)
-			hiber_start(SNDOPR_DELAY);	/* OPCOM mailbox full so give it a chance to empty */
-	} while ((SS$_MBFULL == status) && (0 < --retry));
-	assert((SS$_NORMAL == status) || (OPC$_NOPERATOR == status) || (SS$_MBFULL == status));
-	/* the documentation of sys$sndopr() indicates that a success status OPC-S-OPC$_NOPERATOR status
-	 * gets returned in case OPCOM is not running. hence the explicit || check in the assert above.
-	 * If %SYSTEM-W-MBFULL, mailbox is full, we gave it our best try but
-	 * the message could be dropped if OPCOM is busy enough.
-	 */
-	if (SS$_MBFULL == status)
-		sndopr_mbfull++;
-	else if ((SS$_NORMAL != status) && (OPC$_NOPERATOR != status))
-		sndopr_missed++;
-	else if (0 < sndopr_mbfull || 0 < sndopr_missed)
-	{	/* sndopr with info on missed and mbfull then reset */
-		oper.req_code = OPC$_RQ_RQST;
-		oper.target = OPC$M_NM_CENTRL | OPC$M_NM_DEVICE | OPC$M_NM_DISKS;
-		thislen = SIZEOF(GTMOPCOMMISSED1) - 1;
-		memcpy(&oper.text, GTMOPCOMMISSED1, thislen);
-		operptr = i2asc((uchar_ptr_t)&oper.text + thislen, sndopr_missed);
-		thislen = SIZEOF(GTMOPCOMMISSED2) - 1;
-		memcpy(operptr, GTMOPCOMMISSED2, thislen);
-		operptr = i2asc(operptr + thislen, sndopr_mbfull);
-		thislen = SIZEOF(GTMOPCOMMISSED3) - 1;
-		memcpy(operptr, GTMOPCOMMISSED3, thislen);
-		opmsg.dsc$a_pointer = &oper;
-		opmsg.dsc$w_length = SIZEOF(oper) - SIZEOF(oper.text) + ((operptr - &oper.text) + thislen);
-		status = sys$sndopr(&opmsg, 0);
-		if ((SS$_NORMAL == status) || (OPC$_NOPERATOR == status))
-			sndopr_missed = sndopr_mbfull = 0;
-	}
-	return;
-}
-
-void util_out_close()
-{
-	unsigned int	status;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	if (TREF(util_outbuff_ptr) != TREF(util_outptr))
-		util_out_write(TREF(util_outbuff_ptr), TREF(util_outptr) - TREF(util_outbuff_ptr));
-	if (NULL != util_output_fab)
-	{
-		status = sys$close(util_output_fab, 0, 0);
-		free(util_output_fab);
-		free(util_output_rab);
-		util_output_fab = NULL;
-		util_output_rab = NULL;
-		if (RMS$_NORMAL != status)
-			lib$signal(status);
-	}
-	return;
-}
-
-#define	NOFLUSH	0
-#define FLUSH	1
-#define RESET	2
-#define OPER	4
-#define SPRINT	5
-
-void	util_out_print(char *message, int flush, ...)
-{
-	va_list	var;
-	int4	cnt, faocnt, faolist[MAX_FAO_PARMS + 1];
-	char	*util_format();
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	VAR_START(var, flush);
-	va_count(cnt);
-
-	cnt -= 2;	/* for message and flush */
-	assert(cnt <= MAX_FAO_PARMS);
-	faocnt = cnt;
-	memset(faolist, 0, SIZEOF(faolist));
-	for (cnt = 0;  cnt < faocnt;  cnt++)
-		faolist[cnt] = va_arg(var, int4);
-	va_end(var);
-	if (message)
-		TREF(util_outptr) = util_format(message, faolist, TREF(util_outptr),
-			OUT_BUFF_SIZE - (TREF(util_outptr) - TREF(util_outbuff_ptr)));
-	switch (flush)
-	{
-	case NOFLUSH :	break;
-	case FLUSH   :	util_out_write(TREF(util_outbuff_ptr), TREF(util_outptr) - TREF(util_outbuff_ptr));
-			TREF(util_outptr) = TREF(util_outbuff_ptr);
-			break;
-	case RESET   :	TREF(util_outptr) = TREF(util_outbuff_ptr);
-			break;
-	case OPER    :	util_out_send_oper(TREF(util_outbuff_ptr), TREF(util_outptr) - TREF(util_outbuff_ptr));
-			TREF(util_outptr) = TREF(util_outbuff_ptr);
-			break;
-	case SPRINT  :  *(TREF(util_outptr)) = '\0';
-			format_special_chars();
-			TREF(util_outptr) = TREF(util_outbuff_ptr);
-			break;
-	default      :	break;
-	}
-	return;
-}
-
-
-char *util_format(char *message, int4 fao[], char *buff, int4 size)
-{
-	short			faolen;
-	unsigned int		status;
-	struct dsc$descriptor	desc;
-	struct dsc$descriptor	out;
-
-	desc.dsc$a_pointer = message;
-	desc.dsc$b_dtype = DSC$K_DTYPE_T;
-	desc.dsc$b_class = DSC$K_CLASS_S;
-	desc.dsc$w_length = STRLEN(message);
-	out.dsc$b_dtype = DSC$K_DTYPE_T;
-	out.dsc$b_class = DSC$K_CLASS_S;
-	out.dsc$a_pointer = buff;
-	out.dsc$w_length = size;
-	status = sys$faol(&desc, &faolen, &out, fao);
-	if (SS$_NORMAL != status)
-		lib$signal(status);
-	return buff + faolen;
-}
-
-void format_special_chars(void)
-{
-	/* Taken from util_out_print_vaparm() of Unix (see there for potential truncation of input in case of buffer overflow) */
-	char	fmt_buff[OUT_BUFF_SIZE];	/* needs to be same size as that of util_outbuff */
-	char	*pout, *pin;
-	char	*fmt_top1, *fmt_top2; /* the top of the buffer after leaving 1 (and 2 bytes respectively) at the end */
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	fmt_top1 = fmt_buff + SIZEOF(fmt_buff) - 1;	/* leave out last byte for null byte termination */
-	fmt_top2 = fmt_top1 - 1;
-	for (pin = TREF(util_outbuff_ptr), pout = fmt_buff; ('\0' != *pin) && (pout < fmt_top1); )
-	{
-		if ('%' == *pin)
-		{
-			if (pout >= fmt_top2) /* Check if there is room for 2 bytes. If not stop copying */
-				break;
-			*pout++ = '%'; /* escape for '%' */
-		}
-		if ('\n' == *pin)
-		{
-			if (pout >= fmt_top2) /* Check if there is room for 2 bytes. If not stop copying */
-				break;
-			*pout++ = ',';
-			*pout++ = ' ';
-			pin++;
-			continue;
-		}
-		*pout++ = *pin++;
-	}
-	assert(pout <= fmt_top1);
-	*pout++ = '\0';
-	memcpy(TREF(util_outbuff_ptr), fmt_buff, pout-(char *)fmt_buff);
-}
diff --git a/sr_vvms/util_output_cm.c b/sr_vvms/util_output_cm.c
deleted file mode 100644
index 586d29c..0000000
--- a/sr_vvms/util_output_cm.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <stdarg.h>
-
-#include "cmidef.h"
-#include "hashtab_mname.h"	/* needed for cmmdef.h */
-#include "cmmdef.h"
-#include <descrip.h>
-#include "util.h"
-#include "cmi.h"
-
-#include "fao_parm.h"
-#include "gvcmz.h"
-
-#define PROPER(X,status) if ((status & 1)==0) { ((link_info *)(lnk->usr))->neterr = TRUE ; gvcmz_error(X,status) ;}
-
-#define	NOFLUSH	0
-#define FLUSH	1
-#define RESET	2
-
-static char outbuff[OUT_BUFF_SIZE];
-static char *outptr;
-
-void util_cm_print(clb_struct *lnk, int code, char *message, int flush, ...)
-{
-	va_list		var;
-
-
-	int4		status;
-	short		faolen;
-	struct dsc$descriptor	desc;
-	struct dsc$descriptor	out;
-
-	int4		cnt, faolist[MAX_FAO_PARMS + 1];
-	int 		i;
-
-	VAR_START(var, flush);
-	va_count(cnt);
-	memset(faolist, 0, SIZEOF(faolist));
-	for(i = 0; i < (cnt - 4); i++)        /* already 4 args */
-	  {
-	    faolist[i] = va_arg(var, int4);
-	  }
-	va_end(var);
-
-	if (outptr==outbuff)
-	{
-		outbuff[0] = code ; outptr++ ;
-	}
-	if (message)
-	{	desc.dsc$a_pointer = message;
-		desc.dsc$b_dtype = DSC$K_DTYPE_T;
-		desc.dsc$b_class = DSC$K_CLASS_S;
-		desc.dsc$w_length = strlen(message);
-		out.dsc$b_dtype = DSC$K_DTYPE_T;
-		out.dsc$b_class = DSC$K_CLASS_S;
-		out.dsc$a_pointer = outptr;
-		out.dsc$w_length = OUT_BUFF_SIZE - (outptr - outbuff);
-		faolen = 0;
-		status = sys$faol(&desc,&faolen,&out,faolist);
-		if (!(status & 1))
-		{	lib$signal(status);
-		}
-		outptr += faolen;
-	}
-	switch (flush)
-	{
-	case NOFLUSH:	break;
-	case FLUSH  :	*outptr++ = 0 ; lnk->mbf = outbuff ; lnk->cbl = outptr - outbuff ; lnk->ast = 0 ;
-			status = cmi_write(lnk) ;
-			PROPER (code,status) ;
-			outptr = outbuff ;
-			break;
-	case RESET  :	outptr = outbuff ;
-			break;
-	default	    :	break ;
-	}
-	return;
-}
diff --git a/sr_vvms/util_spawn.c b/sr_vvms/util_spawn.c
deleted file mode 100644
index 568ae03..0000000
--- a/sr_vvms/util_spawn.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <descrip.h>
-#include <ssdef.h>
-#include <climsgdef.h>
-#include "util_spawn.h"
-
-void util_spawn(void)
-{
-
-	char buf[256];
-	$DESCRIPTOR(d_buf,buf);
-	$DESCRIPTOR(d_ent," ");
-
-	d_ent.dsc$a_pointer = "COMMAND";
-	d_ent.dsc$w_length = 7;
-
-	if (CLI$PRESENT(&d_ent) == CLI$_PRESENT)
-	{
-		if (CLI$GET_VALUE(&d_ent,&d_buf) == SS$_NORMAL)
-			lib$spawn(&d_buf);
-		return;
-	}
-	d_buf.dsc$w_length = 0;
-	lib$spawn(&d_buf);
-	return;
-
-}
diff --git a/sr_vvms/v010_jnl_prc_vector.c b/sr_vvms/v010_jnl_prc_vector.c
deleted file mode 100644
index d0657dd..0000000
--- a/sr_vvms/v010_jnl_prc_vector.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include <jpidef.h>
-#include <syidef.h>
-#include <ssdef.h>
-#include "gdsroot.h"
-#include "gdsbt.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "v010_jnl.h"
-#include "vmsdtype.h"
-
-int v010_jnl_process_vector_size(void)
-{
-	return V010_JNL_PROCESS_VECTOR_SIZE;
-}
-
-void v010_jnl_prc_vector(jnl_process_vector *pv)
-{
-	struct
-	{
-		item_list_3	item[7];
-		int4		terminator;
-	}		item_list;
-	unsigned short	iosb[4];
-	uint4	mode, status, dummy;
-
-
-	memset(pv, 0, SIZEOF(jnl_process_vector));
-
-	sys$gettim(&pv->jpv_time);
-
-	item_list.item[0].buffer_length		= SIZEOF(pv->jpv_pid);
-	item_list.item[0].item_code		= JPI$_PID;
-	item_list.item[0].buffer_address	= &pv->jpv_pid;
-	item_list.item[0].return_length_address	= &dummy;
-
-	item_list.item[1].buffer_length		= SIZEOF(pv->jpv_login_time);
-	item_list.item[1].item_code		= JPI$_LOGINTIM;
-	item_list.item[1].buffer_address	= &pv->jpv_login_time;
-	item_list.item[1].return_length_address	= &dummy;
-
-	item_list.item[2].buffer_length		= SIZEOF(pv->jpv_image_count);
-	item_list.item[2].item_code		= JPI$_IMAGECOUNT;
-	item_list.item[2].buffer_address	= &pv->jpv_image_count;
-	item_list.item[2].return_length_address	= &dummy;
-
-	item_list.item[3].buffer_length		= SIZEOF(mode);
-	item_list.item[3].item_code		= JPI$_JOBTYPE;
-	item_list.item[3].buffer_address	= &mode;	/* jpv_mode set below */
-	item_list.item[3].return_length_address	= &dummy;
-
-	item_list.item[4].buffer_length		= SIZEOF(pv->jpv_user);
-	item_list.item[4].item_code		= JPI$_USERNAME;
-	item_list.item[4].buffer_address	= pv->jpv_user;
-	item_list.item[4].return_length_address	= &dummy;
-
-	item_list.item[5].buffer_length		= SIZEOF(pv->jpv_prcnam);
-	item_list.item[5].item_code		= JPI$_PRCNAM;
-	item_list.item[5].buffer_address	= pv->jpv_prcnam;
-	item_list.item[5].return_length_address	= &dummy;
-
-	item_list.item[6].buffer_length		= SIZEOF(pv->jpv_terminal);
-	item_list.item[6].item_code		= JPI$_TERMINAL;
-	item_list.item[6].buffer_address	= pv->jpv_terminal;
-	item_list.item[6].return_length_address	= &dummy;
-
-	item_list.terminator = 0;
-
-	if ((status = sys$getjpiw(0, NULL, NULL, &item_list, iosb, NULL, 0)) != SS$_NORMAL  ||
-	    (status = iosb[0]) != SS$_NORMAL)
-		rts_error(status);
-
-	pv->jpv_mode = mode;
-
-
-	item_list.item[0].buffer_length		= SIZEOF(pv->jpv_node);
-	item_list.item[0].item_code		= SYI$_NODENAME;
-	item_list.item[0].buffer_address	= pv->jpv_node;
-	item_list.item[0].return_length_address	= &dummy;
-
-	*((int4 *)&item_list.item[1]) = 0;	/* terminator */
-
-	if ((status = sys$getsyiw(0, NULL, NULL, &item_list, iosb, NULL, 0)) != SS$_NORMAL  ||
-	    (status = iosb[0]) != SS$_NORMAL)
-		rts_error(status);
-
-}
diff --git a/sr_vvms/v010_jnlsp.h b/sr_vvms/v010_jnlsp.h
deleted file mode 100644
index 9f64c23..0000000
--- a/sr_vvms/v010_jnlsp.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* Start jnlsp.h - platform-specific journaling definitions.  */
-
-#ifndef V010_JNLSP_H_INCLUDED
-#define V010_JNLSP_H_INCLUDED
-
-#ifndef SS$_NORMAL
-#include <ssdef.h>
-#endif
-
-
-#ifdef __ALPHA
-# pragma member_alignment save
-# pragma nomember_alignment
-#endif
-
-typedef	struct
-{
-	short		low_time;
-	uint4	mid_time;
-	short		hi_time;
-} jnl_proc_time;
-
-#ifdef __ALPHA
-# pragma member_alignment restore
-#endif
-
-/* in disk blocks but jnl file addresses are kept by byte so limited by uint4 for now */
-#define JNL_ALLOC_MAX		 8388608
-
-#define JPV_LEN_NODE		15
-#define JPV_LEN_USER		12
-#define JPV_LEN_PRCNAM		15
-#define JPV_LEN_TERMINAL	8
-
-typedef struct jnl_process_vector_struct
-{
-	uint4	jpv_pid;			/* Process id */
-	jnl_proc_time	jpv_time,			/* Journal record timestamp;  also used for process termination time */
-			jpv_login_time;			/* Process login time;  also used for process initialization time */
-	int4		jpv_image_count;		/* Image activations [VMS only] */
-	unsigned char	jpv_mode;			/* a la JPI$_MODE [VMS only] */
-	char		jpv_node[JPV_LEN_NODE],		/* Node name */
-			jpv_user[JPV_LEN_USER],		/* User name */
-			jpv_prcnam[JPV_LEN_PRCNAM],	/* Process name */
-			jpv_terminal[JPV_LEN_TERMINAL];	/* Login terminal */
-	/* SIZEOF(jnl_process_vector) must be a multiple of SIZEOF(int4) */
-	char		jpv_padding;
-} jnl_process_vector;
-
-#define V010_JNL_PROCESS_VECTOR_SIZE	76
-
-typedef	short			fd_type;
-typedef vms_file_info		fi_type;
-
-#define NOJNL			0
-#define LENGTH_OF_TIME		23
-#define SOME_TIME(X)		(X.mid_time != 0)
-#define JNL_S_TIME(Y,X)		Y->val.X.process_vector.jpv_time.mid_time
-#define JNL_M_TIME(X)		mur_options.X.mid_time
-#define EXTTIME(T)		extract_len = exttime(T->mid_time, ref_time, extract_len)
-#define EXTTIMEVMS(T)		extract_len = exttime(T.mid_time, &T, extract_len)
-#define	EXTINTVMS(I)		EXTINT(I)
-#define	EXTTXTVMS(T,L)		EXTTXT(T,L)
-
-#define JNL_FILE_SWITCHED(reg)	(memcmp((&FILE_INFO(reg)->s_addrs)->hdr->jnl_file.jnl_file_id.fid, (&FILE_INFO(reg)->s_addrs)->jnl->fileid.fid, SIZEOF((&FILE_INFO(reg)->s_addrs)->jnl->fileid.fid)) != 0)
-
-/* End of jnlsp.h */
-
-#endif
diff --git a/sr_vvms/v15_filestruct.h b/sr_vvms/v15_filestruct.h
deleted file mode 100644
index 67a5fdf..0000000
--- a/sr_vvms/v15_filestruct.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2005 Fidelity Information Services, LLC.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* filestruct.h */
-
-#define V15_GDS_LABEL 	"GDSDYNSEG10" /* This string must be of length GDS_LABEL_SZ */
-
diff --git a/sr_vvms/vaxsym.h b/sr_vvms/vaxsym.h
deleted file mode 100644
index ffe6021..0000000
--- a/sr_vvms/vaxsym.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-#ifndef VAXSYM_H_INCLUDED
-#define VAXSYM_H_INCLUDED
-
-/* Maximum size of an package or external routine reference of the form routine^label */
-#define MAX_EXTREF 	(2 * MAX_MIDENT_LEN + STR_LIT_LEN("^"))
-#define ZCSYM_PREFIX	"__GTM$ZC"
-#define MAX_SYMREF	SIZEOF(ZCSYM_PREFIX) + 2 * MAX_EXTREF	/* __GTM$ZC<package>.<extref> */
-
-#endif /* VAXSYM_H_INCLUDED */
diff --git a/sr_vvms/vms_cms_load.com b/sr_vvms/vms_cms_load.com
deleted file mode 100644
index 350a0e6..0000000
--- a/sr_vvms/vms_cms_load.com
+++ /dev/null
@@ -1,211 +0,0 @@
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!								!
-$!	Copyright 2001, 2005 Fidelity Information Services, Inc	!
-$!								!
-$!	This source code contains the intellectual property	!
-$!	of its copyright holder(s), and is made available	!
-$!	under a license.  If you do not know the terms of	!
-$!	the license, please stop and do not read further.	!
-$!								!
-$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-$!
-$! This DCL command file fetches a version of GT.M and GT.CM (GDP) from the CMS libraries
-$! into the appropriate VMS source directory.
-$!
-$!	p1 - "to version", version of GT.M to populate on the target platform
-$!	p2 - name of the platform (e.g., CETUS, ASGARD, etc.)
-$!	p3 - CMS library specification for the target platform (e.g., S_VMS, S_AVMS, etc.)
-$!      p4 - ignored, only used by UNIX_CMS_LOAD.COM
-$!      p5 - "from version", version of GT.M to fetch from the CMS libraries
-$!
-$  set verify
-$  set noon
-$  interact = (f$mode() .eqs. "INTERACTIVE")
-$!
-$  if ( p1 .eqs. "" )
-$  then
-$!     N.B., there is no need to download V9.9-0 on VMS targets.
-$      write sys$output "%CMS_LOAD-E-NOPARAM, Must provide a Version"
-$      if ( interact )
-$      then
-$          inquire "Version ",p1
-$      endif
-$      if ( p1 .eqs. "" )
-$      then
-$          write sys$output "No action taken"
-$          exit
-$      endif
-$  endif
-$  to_version = ''p1'
-$!
-$  if ( (p2 .nes. "ASGARD") .and.  (p2 .nes. "ALPHA2") .and. (p2 .nes. "CETUS") .and. (p2 .nes. "WIGLAF") )
-$  then
-$      write sys$putput "%CMS_LOAD-E-NOTARGET, Must provide a Platform"
-$      if ( interact )
-$      then
-$          inquire "Platform ",p2
-$      endif
-$      if ( (p2 .nes. "ASGARD") .and. (p2 .nes. "ALPHA2") .and. (p2 .nes. "CETUS") .and. (p2 .nes. "WIGLAF") )
-$      then
-$          write sys$output "No action taken"
-$          exit
-$      endif
-$  endif
-$!
-$  dirname = to_version - "." - "-"
-$  if ( dirname .eqs. "V990" )
-$  then
-$      write sys$output "%CMS_LOAD-E-V990, Cannot download to V9.9-0 on VMS"
-$      exit
-$  endif
-$!
-$  device = f$trnlnm("gtm$gtmdev")
-$  if ( f$locate("_",device) .eq. f$length(device) )
-$  then
-$      device := gtm$gtmdev
-$  endif
-$!
-$  if ( (p2 .eqs. "ASGARD") .or. (p2 .eqs. "ALPHA2") .or. (p2 .eqs. "WIGLAF") )
-$  then
-$      type := AXP
-$  endif
-$!
-$  if ( p2 .eqs. "CETUS" )
-$  then
-$      type := VAX
-$  endif
-$!
-$  toolsdir = "user:[library.''dirname'.tools]"
-$!
-$  version 'dirname' p
-$  if ( f$trnlnm("gtm$verno") .nes. dirname )
-$  then
-$      write sys$output "%CMS_LOAD-E-VERSIONFAIL, Version command failed"
-$      exit
-$  endif
-$!
-$!  set default gtm$vrt:[src]
-$  if ( type .eqs. "VAX")
-$  then
-$      set default 'type'_gtm$gtmdev:[library.'dirname'.src]
-$   else
-$!     'type'_gtm$gtmdev should ideally be used here, but it is a search list and edrelnam fails for search lists
-$!     in fetch_cms_version.com. hence using alternate "user" logical.
-$      set default user:[library.'dirname'.src]
-$  endif
-$!
-$!  clean up the source directory
-$  if ( f$search("*.c") .nes. "" )
-$  then
-$      delete/log *.*;*/exclude=(maclib.mlb)
-$  endif
-$!
-$  rename/log maclib.mlb; maclib.mlb;1
-$!
-$  if ( p3 .eqs. "" )
-$  then
-$      if ( type .eqs. "AXP" )
-$      then
-$          p3 = S_AVMS
-$      endif
-$      if ( type .eqs. "VAX" )
-$      then
-$          p3 = S_VMS
-$      endif
-$  endif
-$!
-$  @'toolsdir'cms_load_verify_from_to_version 'to_version' 'p5'
-$  if ( $status .ne. 1 )
-$  then
-$      exit $status
-$  endif
-$!
-$  t1 = "=" + from_version
-$  if (f$extract(0, 3, from_version) .eqs. "V9.") .or. ("NEXT" .eqs. from_version) then $ t1 :=
-$  cms set library sl_cmi
-$  cms fetch cmierrors.msg /generation't1' ""
-$  @'toolsdir'fetch_cms_version 'from_version' 'p3'
-$  @'toolsdir'fetch_cms_version 'from_version' S_VMS_CM
-$  set def [-]
-$!
-$! -----------------------------------------------------------------------------
-$!           download the CMI sources onto gtm$vrt:[cmi] directory
-$! -----------------------------------------------------------------------------
-$  if ( f$search("cmi.dir") .eqs. "" )
-$  then
-$      create/dir [.cmi]
-$  else
-$      set def [.cmi]
-$      delete/log *.*;*
-$      set def [-]
-$  endif
-$  set def [.cmi]
-$  @'toolsdir'fetch_cms_version 'from_version' SL_CMI
-$  set def [-]
-$!
-$! ----------------------------------------------------------------------------------
-$!           move kit building stuff into gtm$vrt:[tcm,tcx,tdp,tfi,tls,tdc] directories
-$! ----------------------------------------------------------------------------------
-$  set def [.tcm]
-$  rename/log [-.src]GTCMKITHLP.COM []
-$  rename/log [-.src]GTCM_SPKITBLD.DAT []
-$  rename/log [-.src]GTCMKITINSTAL.COM []KITINSTAL.COM
-$  set def [-]
-$  set def [.tcx]
-$  rename/log [-.src]GTCXKITHLP.COM []
-$  rename/log [-.src]GTCX_SPKITBLD.DAT []
-$  rename/log [-.src]GTCXKITINSTAL.COM []KITINSTAL.COM
-$  set def [-]
-$  set def [.tdp]
-$  rename/log [-.src]DDPKITHLP.COM []
-$  rename/log [-.src]DDP_SPKITBLD.DAT []
-$  rename/log [-.src]DDPKITINSTAL.COM []KITINSTAL.COM
-$  set def [-]
-$  set def [.tdc]
-$  rename/log [-.src]GTMDCKITHLP.COM []
-$  rename/log [-.src]GTMDC_SPKITBLD.DAT []
-$  rename/log [-.src]GTMDCKITINSTAL.COM []KITINSTAL.COM
-$  set def [-]
-$  set def [.tfi]
-$  rename/log [-.src]GTMFIKITHLP.COM []
-$  rename/log [-.src]GTMFI_SPKITBLD.DAT []
-$  rename/log [-.src]GTMFIKITINSTAL.COM []KITINSTAL.COM
-$  set def [-]
-$  set def [.tls]
-$  rename/log [-.src]GTMKITHLP.COM []
-$  rename/log [-.src]GTM_SPKITBLD.DAT []
-$  rename/log [-.src]GTMKITINSTAL.COM []KITINSTAL.COM
-$  rename/log [-.src]GTM$IVP.TLB []
-$  rename/log [-.src]GTM$CE.H []
-$  copy/log   [-.src]GTM$DEFAULTS.M64 []	! gtm$src copy is used by the build so take only a copy
-$  rename/log [-.src]GTMCOLLECT.OPT []
-$  set def [-]
-$!
-$! -----------------------------------------------------------------------------
-$!           move scripts into gtm$vrt:[tools] directory
-$! -----------------------------------------------------------------------------
-$  set def [.tools]
-$  rename/log [-.src]*.com []
-$  rename/log [-.src]*.axp []
-$  rename/log [-.src]*.awk []
-$  purge/log *.*/(excl=vms_cms_load.com,cms_load.com)	! remove versions of *.com files copied over by newincver.com
-$				! except cms_load.com and vms_cms_load.com as they are the currently running scripts
-$  set def [-]
-$!
-$! -----------------------------------------------------------------------------
-$!           edit gtm$vrt:[t%%]*_spkitbld.dat version ids
-$! -----------------------------------------------------------------------------
-$  set def [.src]
-$  ver p p
-$  curr_priv = f$setprv("bypas")
-$  gtma := $ gtm$exe:gtm$dmod.exe
-$  define/user gtm$routines "[]/src=(gtm$root:[''dirname'.src],gtm$root:[''dirname'.pct])"
-$  gtma "user:[library.''dirname']"
-d ^spkitbld
-$  curr_priv=f$setprv(curr_priv)
-$  delete/nolog/since spkitbld.obj.,_ucase.obj.
-$!
-$!  write sys$output "Please review the version ids in gtm$vrt:[t%%]*_spkitbld.dat"
-$!  write sys$output "Please edit GTMSRC.COM and README.TXT as appropriate"
-$!
-$  exit
diff --git a/sr_vvms/vmsdtype.h b/sr_vvms/vmsdtype.h
deleted file mode 100644
index 8027d91..0000000
--- a/sr_vvms/vmsdtype.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2002 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef VMSDTYPE_H_INCLUDED
-#define VMSDTYPE_H_INCLUDED
-
-#pragma member_alignment save
-#pragma nomember_alignment
-
-/* user-defined VMS 'conceptual' data type */
-typedef struct
-{	unsigned short int	buffer_length;
-	unsigned short int	item_code;
-	void			*buffer_address;
-	void			*return_length_address; /* some system services expect this to be short * (eg. sys$getsyi), but
-						         * some expect this to be a int4 * (eg. sys$getlki). Hence, we use void * */
-} item_list_3;
-
-#pragma member_alignment restore
-
-#endif /* VMSDTYPE_H_INCLUDED */
diff --git a/sr_vvms/wait_for_block_flush.c b/sr_vvms/wait_for_block_flush.c
deleted file mode 100644
index 4e4f162..0000000
--- a/sr_vvms/wait_for_block_flush.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* This function is called from t_qread to wait out a "flushing" state.
-   It assumes that the database is clustered. */
-
-#include "mdef.h"
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "ccp.h"
-#include "filestruct.h"
-
-GBLREF sgmnt_addrs	*cs_addrs;
-GBLREF gd_region	*gv_cur_region;
-
-void wait_for_block_flush(bt_rec *bt, block_id block)
-{
-	register sgmnt_addrs	*csa;
-	unsigned short		cycle;
-
-	csa = cs_addrs;
-	assert(csa->hdr->clustered);
-
-	for (;(bt->blk == block) && bt->flushing && !CCP_SEGMENT_STATE(csa->nl,CCST_MASK_HAVE_DIRTY_BUFFERS);)
-	{	/* as int4 as the bt and block match, the bt shows flushing, and the ccp state indicates */
-		cycle = csa->nl->ccp_cycle;
-		CCP_FID_MSG(gv_cur_region, CCTR_FLUSHLK);
-		ccp_userwait(gv_cur_region, CCST_MASK_HAVE_DIRTY_BUFFERS, 0, cycle);
-	}
-	return;
-}
diff --git a/sr_vvms/wcs_clean_dbsync_ast.c b/sr_vvms/wcs_clean_dbsync_ast.c
deleted file mode 100644
index ae5e656..0000000
--- a/sr_vvms/wcs_clean_dbsync_ast.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <stddef.h>		/* for offsetof macro */
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "gdskill.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"		/* for the FILE_INFO macros */
-#include "jnl.h"
-#include "iosp.h"
-#include "efn.h"		/* for efn_immed_wait and efn_ignore */
-#include "gdsbgtr.h"		/* for the BG_TRACE_PRO_ANY macros */
-#include "timers.h"		/* for TIM_AST_WAIT */
-#include "wcs_phase2_commit_wait.h"
-
-#define	MAX_DBSYNC_DEFERS	10	/* 10 times deferring of 5 sec (TIM_DEFER_DBSYNC) each for a total of 50 seconds */
-#define MAX_DBSYNC_LOOPS	600	/* each loop is of 5msec and we wait for a max. of 30 seconds */
-
-#ifdef GTM_MALLOC_RENT
-#	define	GTM_MALLOC_NO_RENT_ONLY(X)
-#else
-#	define	GTM_MALLOC_NO_RENT_ONLY(X)	X
-#endif
-
-GBLDEF	int4			defer_dbsync[2] = { TIM_DEFER_DBSYNC, -1 };	/* picked from timers.h */
-
-GBLREF	gd_region		*gv_cur_region;
-GBLREF	int4			wtfini_in_prog;
-GBLREF	short			astq_dyn_avail;
-GBLREF	volatile int4		gtmMallocDepth;		/* Recursion indicator */
-GBLREF	uint4			process_id;
-GBLREF	boolean_t		mupip_jnl_recover;
-GBLREF 	jnl_gbls_t		jgbl;
-GBLREF	volatile int4		fast_lock_count;
-GBLREF	volatile int4		crit_count;
-GBLREF	volatile boolean_t	in_mutex_deadlock_check;
-
-error_def(ERR_JNLFLUSH);
-error_def(ERR_TEXT);
-
-/* Sync the filehdr (and epoch in the journal file if before imaging). The goal is to sync the database,
- * but if we find us in a situation where we need to block on someone else, then we defer this to the next round.
- * This is the equivalent of the Unix wcs_clean_dbsync() routine.
- */
-void	wcs_clean_dbsync_ast(sgmnt_addrs *csa)
-{
-	static readonly int4	pause[2] = { TIM_AST_WAIT, -1 };	/* picked from wcs_timer_start */
-	boolean_t		bimg_jnl, dbsync_defer_timer;		/* bimg_jnl --> before-imaging or not */
-	cache_que_head		*crqwip;
-	int			counter, status;
-	gd_region		*reg;
-	jnl_private_control	*jpc;
-	jnl_buffer_ptr_t	jb;
-	node_local_ptr_t	cnl;
-	sgmnt_addrs		*save_csa;
-	sgmnt_data_ptr_t	csd;
-	void			fileheader_sync();
-	uint4			jnl_status;
-
-	assert(lib$ast_in_prog());	/* If dclast fails and setast is used, this assert trips, but in that
-					 * case, we anyway want to know why we needed setast. */
-	/* Although csa->dbsync_timer is almost always TRUE if here, there is a small possibility it is FALSE. This is
-	 * possible if we are currently in gds_rundown for this region where the flag is reset to FALSE irrespective
-	 * of whether we have a pending timer or a sys$qio-termination-signalling-ast. In the case dbsync_timer is
-	 * FALSE, return. There is a very remote possibility that we miss syncing the db if the qio of the last
-	 * dirty buffer finishes after we die and we are not the last writer. In this case the sync won't be done
-	 * since all the maintenance is process-private. But that possibility is too remote and we will live with
-	 * it for now since otherwise we need to implement grander mechanisms involving shared memory and the like.
-	 */
-	reg = csa->region;
-	assert(FALSE == csa->dbsync_timer || reg->open);
-	/* Don't know how this can happen, but if region is closed, just return in PRO */
-	/* In MM, not yet sure whether it will work */
-	if (FALSE == csa->dbsync_timer || dba_mm == reg->dyn.addr->acc_meth || !reg->open)
-	{
-		csa->dbsync_timer = FALSE;
-		astq_dyn_avail++;
-		return;
-	}
-	/* Save to see if we are in crit anywhere */
-	save_csa = ((NULL == gv_cur_region || FALSE == gv_cur_region->open) ?  NULL : (&FILE_INFO(gv_cur_region)->s_addrs));
-	csa = &FILE_INFO(reg)->s_addrs;
-	csd = csa->hdr;
-	cnl = csa->nl;
-	jpc = csa->jnl;
-	BG_TRACE_PRO_ANY(csa, n_dbsync_timers);
-	assert(!JNL_ALLOWED(csd) || NULL != jpc);
-
-	/* Note that even if the active queue was emptied when this routine was called, due to
-	 * concurrent update activity, cnl->wcs_active_lvl can be non-zero when we reach here. We
-	 * defer syncing the database in this case to the next time the active queue becomes empty or
-	 * when we reach the next scheduled epoch_time (only if before-imaging) whichever is earlier.
-	 */
-	dbsync_defer_timer = FALSE;
-	if (!cnl->wcs_active_lvl)
-	{	/* Currently VMS timer writes don't have the optimizations for deferring expensive IO at
-		 * critical times that exist in Unix. Need to get them (those that apply) to VMS too. They are
-		 *   1) We are in the midst of lseek/read/write IO. This could reset an lseek. (Doesn't apply to VMS).
-		 *   2) We are aquiring/releasing crit in any region (Strictly speaking it is enough
-		 *		to check this in the current region, but doesn't harm us much).
-		 *	Note that the function "mutex_deadlock_check" resets crit_count to 0 temporarily even though we
-		 *	might actually be in the midst of acquiring crit. Therefore we should not interrupt mainline code
-		 *	if we are in the "mutex_deadlock_check" as otherwise it presents reentrancy issues.
-		 *   3) We have crit in the current region OR are in the middle of commit for this region (even though
-		 *	we dont hold crit) OR are in wcs_wtstart (potentially holding write interlock and keeping another
-		 *	process in crit waiting) OR we need to wait to obtain crit.
-		 *   4) We are in a "fast lock".
-		 * Out of the above, items (2) & (3) are currently being taken care of below since they can cause
-		 *	deadlocks (if not taken care of) while the others are just performance enhancements. Note
-		 *	that the last part of (3) is taken care of by doing a grab_crit_immediate() rather than a grab_crit().
-		 * Also to be taken care of are the following situations.
-		 *   1) We are currently in wcs_wtfini be it the same or a different region.
-		 *	To avoid reentrancy issues (if same region) and deadlock issues (if different region).
-		 *   2) We are currently in malloc(). Although nested malloc() now works and we won't be needing it
-		 *	as much, want to be paranoid here since there are quite a few functions called from here.
-		 * Other reentrancy issues to be taken care of are
-		 *   1) Avoid doing recursive wcs_recovers.
-		 */
-		dbsync_defer_timer = TRUE;
-		crqwip = &csa->acc_meth.bg.cache_state->cacheq_wip;
-		if (!mupip_jnl_recover && 0 == crit_count && !in_mutex_deadlock_check && !wtfini_in_prog && !fast_lock_count
-			GTM_MALLOC_NO_RENT_ONLY(&& 0 == gtmMallocDepth)
-			&& ((NULL == save_csa) || !T_IN_CRIT_OR_COMMIT_OR_WRITE(save_csa))
-			&& !T_IN_CRIT_OR_COMMIT_OR_WRITE(csa)
-			&& (TRUE == grab_crit_immediate(reg)))
-		{	/* Note that if we are here, we have obtained crit using grab_crit_immediate. Also grab_crit_immediate
-			 * doesn't call wcs_recover if wc_blocked is TRUE in order to prevent possible deadlocks.
-			 * Note that mutex_lockwim() cannot be used since crit_count is not maintained there.
-			 */
-			assert(csa->ti->early_tn == csa->ti->curr_tn);
-			/* if wcs_wtfini() returns FALSE, it means the cache is suspect. but we are in interrupt code
-			 * and therefore want to play it safe. Hence we will not set wc_blocked. we will defer writing
-			 * epoch and wait for a future call to mainline code to detect this and initiate cache recovery.
-			 */
-			/* Wait for ALL active phase2 commits to complete first. If they dont complete in time then defer
-			 * writing the epoch. Also dont wait if cnl->wc_blocked is already set to TRUE. In that case
-			 * defer writing the EPOCH unconditionally. */
-			if (!cnl->wc_blocked && (!cnl->wcs_phase2_commit_pidcnt || wcs_phase2_commit_wait(csa, NULL))
-				&& wcs_wtfini(reg)) /* wcs_wtfini handles calls from ASTs appropriately */
-			{
-				if (JNL_ENABLED(csd))
-				{
-					jb = jpc->jnl_buff;
-					if (jb->before_images)
-						bimg_jnl = TRUE;
-				} else
-					bimg_jnl = FALSE;
-				/* Note that if before-imaging and we haven't opened the journal file, then we
-				 * can't write an epoch record here because opening the jnl file involves a
-				 * heavyweight routine jnl_file_open() which is risky in this ast-prone code.
-				 * Also, if before-imaging and the journal file has been switched since the time the
-				 * dbsync timer started, we do not want to do any writes as they will go to the older
-				 * generation journal file. It is ok not to write an EPOCH record in the older generation
-				 * journal file because whichever process did the journal file switch would have done
-				 * exactly that. And therefore there is no need to start a new dbsync timer in this case.
-				 */
-				if (cnl->wcs_active_lvl || bimg_jnl && ((NOJNL == jpc->channel) || JNL_FILE_SWITCHED(jpc)))
-					dbsync_defer_timer = FALSE;	/* don't/can't write epoch. */
-				else if (0 == crqwip->fl)
-				{
-					if (!bimg_jnl)
-					{	/* Entire wip queue is flushed. So sync the file-header now */
-						assert(cnl->wc_in_free == csd->n_bts);
-						BG_TRACE_PRO_ANY(csa, n_dbsync_writes);
-						fileheader_sync(reg);	/* sync the fileheader to disk */
-						dbsync_defer_timer = FALSE;
-					} else if (jb->dskaddr == jb->freeaddr)
-					{	/* Entire wip queue and jnl buffer is flushed. So write an epoch record now. */
-						assert(cnl->wc_in_free == csd->n_bts);
-						BG_TRACE_PRO_ANY(csa, n_dbsync_writes);
-						fileheader_sync(reg);	/* sync the fileheader to disk */
-						/* To avoid deadlocks (e.g. we waiting for a jnl_flush while someone
-						 * is holding the io_in_prog lock) we use a kludge. Setting jb->blocked
-						 * prevents others from picking up the io_in_prog lock. We then check
-						 * whether there is anyone holding the lock. If so, we defer writing the
-						 * epoch to the next round and if not go ahead with the flush. Note that
-						 * "someone" above includes ourselves too since the qio we have done prior
-						 * to entering wcs_wipchk_ast will again be delivered as a jnl_qio_end AST
-						 * which will again be blocked.
-						 */
-						jb->blocked = process_id;
-						if (!jb->io_in_prog)
-						{
-							assert(NOJNL != jpc->channel);
-							/* Since the journal buffer is flushed to disk at this point
-							 * we don't expect any other routines (like jnl_write_attempt etc.)
-							 * to be called. Also since the epoch-record is less than a hundred
-							 * bytes, we don't expect a jnl_qio_start to be called at the end
-							 * of jnl_write(). We also assume that the check for extension of
-							 * journal file takes into account space for an epoch + eof + align.
-							 * Note that the assert below checks that the min_write_size (the value
-							 * needed to trigger a jnl_qio_write) is less than the maximum number of
-							 * bytes that will be written in the journal buffer by jnl_write_epoch_rec
-							 * (= size of the epoch record + maximum size of align record if needed).
-							 */
-							/* Is there a correctness issue if the file gets extended? The assumption
-							 * about space check for epoch + eof + align may not be correct. Also,
-							 * now we may be writing a PINI as well. Vinaya, 2003, May 2. Check with
-							 * Narayanan */
-							assert(2 * EPOCH_RECLEN + PINI_RECLEN + 3 * MIN_ALIGN_RECLEN <
-									jb->min_write_size);
-							assert(csa->ti->curr_tn == csa->ti->early_tn);
-							/* There is no need for jnl_ensure_open here since we have crit and
-							 * have already determined that the journal file has not been switched.
-							 */
-							/* Initialize gbl_jrec_time if necessary before jnl_put_jrt_pini */
-							if (!jgbl.dont_reset_gbl_jrec_time)
-								SET_GBL_JREC_TIME;
-							/* Before writing to jnlfile, adjust jgbl.gbl_jrec_time (if needed) to
-							 * maintain time order of jnl records. This needs to be done BEFORE
-							 * writing any records to the journal file.
-							 */
-							ADJUST_GBL_JREC_TIME(jgbl, jb);
-							if (0 == jpc->pini_addr)
-							{/* in the rare case when we haven't done any updates to the db (till
-							   * now only db reads), but had to flush the jnl buffer and cache due to
-							   * lack of cache buffer (flush trigger mechanism in t_qread) we may not
-							   * have written our PINI record yet */
-								jnl_put_jrt_pini(csa);
-							}
-							jnl_write_epoch_rec(csa);
-							INCR_GVSTATS_COUNTER(csa, cnl, n_jrec_epoch_idle, 1);
-							/* Need to flush this epoch record out */
-							jnl_status = jnl_flush(reg);	/* handles calls from ASTs appropriately */
-							if (SS_NORMAL == jnl_status)
-							{
-								assert(jb->dskaddr == jb->freeaddr);
-								dbsync_defer_timer = FALSE;
-								assert(0 == jb->blocked);    /* jnl_flush should have reset this.*/
-								if (process_id == jb->blocked)
-									jb->blocked = 0;
-							} else
-							{
-								send_msg(VARLSTCNT(9) ERR_JNLFLUSH, 2, JNL_LEN_STR(csd),
-									ERR_TEXT, 2,
-									RTS_ERROR_TEXT("Error with journal flush in wcsdbsyncast"),
-									jnl_status);
-								assert(NOJNL == jpc->channel);/* jnl file lost has been triggered */
-								/* In this routine, all code that follows from here on does not
-								 * assume anything about the journaling characteristics of this
-								 * database so it is safe to continue execution even though
-								 * journaling got closed in the middle.
-								 */
-							}
-						} else
-							jb->blocked = 0;
-					} else
-						jnl_start_ast(jpc);	/* Start a journal write and defer epoch writing. */
-				}
-			}
-			rel_crit(reg);
-		}
-	}
-	if (FALSE != dbsync_defer_timer)
-	{
-		for (counter = 0; 1 > astq_dyn_avail; counter++)
-		{	/* Wait until we have room to queue our timer AST for wcs_clean_dbsync_ast. */
-			assert(FALSE);
-			if (SS$_NORMAL == sys$setimr(efn_timer_ast, &pause, 0, 0, 0))
-				sys$synch(efn_timer_ast, 0);
-			if (counter > MAX_DBSYNC_LOOPS)
-			{
-				csa->dbsync_timer = FALSE;
-				astq_dyn_avail++;
-				return;		/* in this case, we skip syncing the db. */
-			}
-		}
-		astq_dyn_avail--;
-		if (MAX_DBSYNC_DEFERS > csa->dbsync_timer++)
-		{
-			status = sys$setimr(efn_ignore, &defer_dbsync[0], wcs_clean_dbsync_ast, csa, 0);
-			if (0 == (status & 1))
-			{
-				assert(FALSE);
-				csa->dbsync_timer = FALSE;
-				astq_dyn_avail++;	/* in this case too, we skip syncing the db. */
-			}
-		} else
-		{	/* We have deferred the dbsync timer at least MAX_DBSYNC_DEFERS times (nearly 50 seconds). We cannot keep
-			 * doing this indefinitely as it is possible that whatever is causing us to defer this timer (crit_count
-			 * being non-zero etc.) is in turn blocked because it needs a timer queue entry but cannot find one due
-			 * to wcs_clean_dbsync_ast eternally using up the same (eats up the TQELM job/process quota). Therefore
-			 * to avoid a potential deadlock, we stop requeueing ourselves even though it means we will skip syncing
-			 * the db. The only one that cares for this dbsync is journal recovery which anyways has been worked around
-			 * to take care of indefinite deferring (equivalent to skipping the syncing) so that should not be an issue.
-			 */
-			csa->dbsync_timer = FALSE;	/* in this case, we skip syncing the db. */
-		}
-	} else
-		csa->dbsync_timer = FALSE;
-	astq_dyn_avail++;
-	return;
-}
diff --git a/sr_vvms/wcs_clean_dbsync_timer_ast.c b/sr_vvms/wcs_clean_dbsync_timer_ast.c
deleted file mode 100644
index b70bf9e..0000000
--- a/sr_vvms/wcs_clean_dbsync_timer_ast.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "gdskill.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "efn.h"		/* for efn_ignore */
-
-GBLREF	int4		defer_dbsync[2];
-GBLREF	short		astq_dyn_avail;
-
-/* wcs_clean_dbsync_ast() is not directly being called when the active queue becomes empty. This is because
- * we want to avoid syncing the database, in the case where it is actively being updated though frequently
- * getting emptied (by something other than a wcs_flu). Only in the case where there is prolonged update
- * inactivity after emptying the active queue do we sync the db. "prolonged" is defined by TIM_DEFER_DBSYNC.
- */
-void	wcs_clean_dbsync_timer_ast(sgmnt_addrs *csa)
-{
-	int		status;
-	void		wcs_clean_dbsync_ast();
-
-	assert(lib$ast_in_prog());	/* If dclast fails and setast is used, this assert trips, but in that
-					 * case, we anyway want to know why we needed setast. */
-	assert(0 < astq_dyn_avail);
-	if (0 >= astq_dyn_avail)
-		csa->dbsync_timer = FALSE;
-	/* Note that csa->dbsync_timer can be FALSE while entering this routine in case we had issued the dsk_write (sys$qio)
-	 * of the last dirty cache-record and then went to gds_rundown() which resets the dbsync_timer to FALSE unconditionally.
-	 * In this case, we need to return.
-	 */
-	if (FALSE == csa->dbsync_timer)
-	{
-		astq_dyn_avail++;
-		return;
-	}
-	status = sys$setimr(efn_ignore, &defer_dbsync[0], wcs_clean_dbsync_ast, csa, 0);
-	if (0 == (status & 1))
-	{
-		assert(FALSE);
-		csa->dbsync_timer = FALSE;
-		astq_dyn_avail++;	/* in this case too, we skip syncing the database */
-	}
-	return;
-}
diff --git a/sr_vvms/wcs_flu.c b/sr_vvms/wcs_flu.c
deleted file mode 100644
index 0266d9d..0000000
--- a/sr_vvms/wcs_flu.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-#include <psldef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsbgtr.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ast.h"
-#include "efn.h"
-#include "jnl.h"
-#include "iosp.h"
-#include "sleep_cnt.h"
-#include "send_msg.h"
-#include "wcs_recover.h"
-#include "wcs_sleep.h"
-#include "wcs_flu.h"
-#include "wcs_phase2_commit_wait.h"
-#include "wbox_test_init.h"
-#include "memcoherency.h"
-
-GBLREF	gd_region	*gv_cur_region;
-GBLREF	uint4		process_id;
-GBLREF	sgmnt_addrs	*cs_addrs;
-GBLREF 	jnl_gbls_t	jgbl;
-GBLREF 	bool		in_backup;
-#ifdef DEBUG
-GBLREF	boolean_t	in_mu_rndwn_file;
-#endif
-
-error_def(ERR_DBFILERR);
-error_def(ERR_JNLFILOPN);
-error_def(ERR_JNLFLUSH);
-error_def(ERR_TEXT);
-error_def(ERR_WCBLOCKED);
-
-static	const	unsigned short	zero_fid[3];
-
-boolean_t wcs_flu(uint4 options)
-{
-	bool			broken, ret, was_crit;
-	boolean_t		jnl_enabled, flush_hdr, write_epoch, sync_epoch, in_commit;
-	cache_que_head		*crq, *crqwip;
-	cache_rec		*cr, *crtop;
-	file_control		*fc;
-	sgmnt_addrs		*csa;
-	sgmnt_data		*csd;
-	short			iosb[4];
-	uint4			jnl_status;
-	unsigned int		lcnt1, lcnt2, lcnt3, pass, status;
-	jnl_private_control	*jpc;
-	jnl_buffer_ptr_t	jbp;
-	node_local_ptr_t        cnl;
-#	ifdef DEBUG
-	cache_que_head		lclwip, lclact;
-	cache_rec		lclcr;
-#	endif
-
-	flush_hdr = options & WCSFLU_FLUSH_HDR;
-	write_epoch = options & WCSFLU_WRITE_EPOCH;
-	sync_epoch = options & WCSFLU_SYNC_EPOCH;
-	/* WCSFLU_IN_COMMIT bit is set if caller is t_end or tp_tend. In that case, we should NOT invoke wcs_recover if we
-	 * encounter an error. Instead we should return the error as such so they can trigger appropriate error handling.
-	 * This is necessary because t_end and tp_tend could have pinned one or more cache-records (cr->in_cw_set non-zero)
-	 * BEFORE invoking wcs_flu. And code AFTER the wcs_flu in them relies on the fact that those cache records stay
-	 * pinned. If wcs_flu invokes wcs_recover, it will reset cr->in_cw_set to 0 for ALL cache-records so code AFTER
-	 * the wcs_flu in the caller will fail because no buffer is pinned at that point.
-	 */
-	in_commit = options & WCSFLU_IN_COMMIT;
-	csa = &(FILE_INFO(gv_cur_region)->s_addrs);
-	csd = csa->hdr;
-	cnl = csa->nl;
-	assert(cnl->glob_sec_init);
-	INCR_GVSTATS_COUNTER(csa, cnl, n_db_flush, 1);
-	if (!(was_crit = csa->now_crit))	/* Caution: assignment */
-		grab_crit(gv_cur_region);
-	if (dba_mm == csa->hdr->acc_meth)
-	{
-		if (SS$_NORMAL == (ret = sys$updsec(csa->db_addrs, NULL, PSL$C_USER, 0, efn_immed_wait, iosb, NULL, 0)))
-		{
-			sys$synch(efn_immed_wait, iosb);
-			ret = iosb[0];
-		} else  if (SS$_NOTMODIFIED == ret)
-			ret = SS$_NORMAL;
-		if (!was_crit)
-			rel_crit(gv_cur_region);
-		return (SS$_NORMAL == ret);
-	}
-	cnl->wcsflu_pid = process_id;
-	assert(dba_bg == csa->hdr->acc_meth);
-	/* Worry about journaling only if JNL_ENABLED and if journal has been opened in shared memory */
-	jnl_enabled = (JNL_ENABLED(csa->hdr) && (0 != memcmp(cnl->jnl_file.jnl_file_id.fid, zero_fid, SIZEOF(zero_fid))));
-	if (jnl_enabled)
-	{
-		jpc = csa->jnl;
-		jbp = jpc->jnl_buff;
-		/* Assert that we never flush the cache in the midst of a database commit. The only exception is MUPIP RUNDOWN */
-		assert((csa->ti->curr_tn == csa->ti->early_tn) || in_mu_rndwn_file);
-		if (!jgbl.dont_reset_gbl_jrec_time)
-			SET_GBL_JREC_TIME;	/* needed before jnl_ensure_open */
-		/* Before writing to jnlfile, adjust jgbl.gbl_jrec_time (if needed) to maintain time order of jnl
-		 * records. This needs to be done BEFORE the jnl_ensure_open as that could write journal records
-		 * (if it decides to switch to a new journal file)
-		 */
-		ADJUST_GBL_JREC_TIME(jgbl, jbp);
-		assert(csa == cs_addrs);	/* for jnl_ensure_open */
-		jnl_status = jnl_ensure_open();
-		if (0 != jnl_status)
-		{
-			assert(ERR_JNLFILOPN == jnl_status);
-			cnl->wcsflu_pid = 0;
-			if (!was_crit)
-				rel_crit(gv_cur_region);
-			send_msg(VARLSTCNT(6) jnl_status, 4, JNL_LEN_STR(csd), DB_LEN_STR(gv_cur_region));
-			return FALSE;
-		}
-		assert(NOJNL != jpc->channel);
-		if (SS_NORMAL != (jnl_status = jnl_flush(gv_cur_region)))
-		{
-			assert(NOJNL == jpc->channel); /* jnl file lost */
-			if (!was_crit)
-				rel_crit(gv_cur_region);
-			send_msg(VARLSTCNT(9) ERR_JNLFLUSH, 2, JNL_LEN_STR(csd),
-				ERR_TEXT, 2, RTS_ERROR_TEXT("Error with journal flush during wcs_flu"),
-				jnl_status);
-			return FALSE;
-		}
-	}
-	/* If not mupip rundown, wait for ALL active phase2 commits to complete first.
-	 * In case of mupip rundown, we know no one else is accessing shared memory so no point waiting.
-	 */
-	assert(!in_mu_rndwn_file || (0 == cnl->wcs_phase2_commit_pidcnt));
-	if (cnl->wcs_phase2_commit_pidcnt && !wcs_phase2_commit_wait(csa, NULL))
-	{
-		if (!was_crit)
-			rel_crit(gv_cur_region);
-		return FALSE;	/* we expect the caller to trigger cache-recovery which will fix this counter */
-	}
-	/* Now that all concurrent commits are complete, wait for these dirty buffers to be flushed to disk. */
-	crq = &csa->acc_meth.bg.cache_state->cacheq_active;
-	crqwip = &csa->acc_meth.bg.cache_state->cacheq_wip;
-	for (pass = 1, ret = FALSE; FALSE == ret; pass++)
-	{
-		for (lcnt1 = DIVIDE_ROUND_UP(csd->n_bts, csd->n_wrt_per_flu);  (0 != crq->fl);  lcnt1--)
-		{	/* attempt to clear the active queue */
-			if (SS$_NORMAL != (status = sys$dclast(wcs_wtstart, gv_cur_region, 0)))
-			{
-				send_msg(VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region), status);
-				assert(FALSE);
-				status = sys$setast(DISABLE);
-				wcs_wtstart(gv_cur_region);
-				if (SS$_WASSET == status)
-					ENABLE_AST;
-			}
-			if (!wcs_wtfini(gv_cur_region) || (0 == lcnt1))
-				break;
-		}
-		assert((1 == pass) || (0 == cnl->in_wtstart));	/* in second pass there should be no active writers */
-		/* Wait for all active writers to finish. We wait for 1 minute (similar to code in wcs_recover) */
-		SIGNAL_WRITERS_TO_STOP(cnl);	/* to stop all active writers */
-		WAIT_FOR_WRITERS_TO_STOP(cnl, lcnt2, MAXWTSTARTWAIT);
-		SIGNAL_WRITERS_TO_RESUME(cnl);
-		/* Attempt to clear the wip queue and double check that all is well */
-		cr = &csa->acc_meth.bg.cache_state->cache_array;
-		cr += csd->bt_buckets;
-		crtop = cr + csd->n_bts;
-		for (lcnt3 = 0, broken = FALSE;  FALSE == ret; )
-		{
-			for ( ; cr < crtop; cr++)
-			{	/* check that nothing is dirty */
-				if (cr->dirty)
-				{
-					broken = TRUE;
-					if (0 != crqwip->fl)
-					{
-						broken = ((!wcs_wtfini(gv_cur_region)) ? TRUE : FALSE);
-						assert(FALSE == broken);
-						if ((FALSE == broken) && !cr->dirty)
-							continue;
-					}
-					if (0 != crq->fl)
-					{
-						broken = FALSE;
-						if (SS$_NORMAL != (status = sys$dclast(wcs_wtstart, gv_cur_region, 0)))
-						{
-							send_msg(VARLSTCNT(5) ERR_DBFILERR, 2, DB_LEN_STR(gv_cur_region), status);
-							assert(FALSE);
-							status = sys$setast(DISABLE);
-							wcs_wtstart(gv_cur_region);
-							if (SS$_WASSET == status)
-								ENABLE_AST;
-						}
-					}
-					/* This means we found a dirty cache-record that is neither in the active or wip queue.
-					 * This is possible in the following situations.
-					 * 	a) If crash shutdown and mupip rundown is invoked.
-					 * 	b) If a process encountered an error in the midst of committing in phase2
-					 * 	   and secshr_db_clnup completed the commit for it. That would not have
-					 * 	   inserted the cr into the queues (see comment there as to why). But in
-					 * 	   that case, it would have set cnl->wc_blocked to TRUE. Unfortunately, we
-					 * 	   reset c>nl->wc_blocked to FALSE as part of the SIGNAL_WRITERS_TO_RESUME
-					 * 	   macro call (a few line above). So the only test that we can do is that
-					 * 	   a phase2 commit error occurred. This is tested by checking that the
-					 * 	   variable gtm_white_box_test_case_enabled is non-zero.
-					 */
-					assert((FALSE == broken) || in_mu_rndwn_file || gtm_white_box_test_case_enabled);
-					break;
-				}
-			}
-			if (FALSE == (ret = !broken))
-				break;
-			if (FALSE == (ret = (cr == crtop)))
-			{	/* didn't make it to the top without a dirty */
-				if (++lcnt3 > BUF_OWNER_STUCK)
-				{
-					DEBUG_ONLY(
-						lclcr = *cr;
-						lclwip = *crqwip;
-						lclact = *crq;
-					)
-					break;
-				}
-				else if (0 < lcnt3)
-					wcs_sleep(lcnt3);
-			}
-		}
-		if (FALSE == ret)
-		{	/* something wrong */
-			/* The only case we know of currently when this is possible is if a process encountered an error
-			 * in the midst of committing in phase2 and secshr_db_clnup completed the commit for it and set
-			 * wc_blocked to TRUE (even though it was out of crit) causing the wcs_wtstart calls done above
-			 * to do nothing. But phase2 commit errors are currently enabled only through white-box testing.
-			 * The only exception to this is if this is a crash shutdown and later mupip rundown is being
-			 * invoked on this shared memory. Assert accordingly.
-			 */
-			assert(gtm_white_box_test_case_enabled || in_mu_rndwn_file);
-			SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-			BG_TRACE_PRO_ANY(csa, wcb_wcs_flu1);
-                	send_msg(VARLSTCNT(8) ERR_WCBLOCKED, 6, LEN_AND_LIT("wcb_wcs_flu1"),
-                        	process_id, &csa->ti->curr_tn, DB_LEN_STR(gv_cur_region));
-			if (in_commit)
-			{	/* We should NOT be invoking wcs_recover as otherwise the callers (t_end or tp_tend)
-				 * will get confused (see explanation above where variable "in_commit" gets set).
-				 */
-				assert(was_crit);	/* so dont need to rel_crit */
-				return FALSE;
-			}
-			if (pass > 1)
-				GTMASSERT;
-			wcs_recover(gv_cur_region);
-		}
-	}
-	if (flush_hdr)
-		fileheader_sync(gv_cur_region);
-	if (jnl_enabled && write_epoch && jbp->before_images)
-	{	/* Parallel code in Unix does an fsync. Not needed here since VMS writes are hard writes */
-		assert(jgbl.gbl_jrec_time);
-		if (!jgbl.mur_extract)
-		{
-			if (0 == jpc->pini_addr)
-				jnl_put_jrt_pini(csa);
-			jnl_write_epoch_rec(csa);
-			INCR_GVSTATS_COUNTER(csa, cnl, n_jrec_epoch_regular, 1);
-		}
-	}
-	cnl->last_wcsflu_tn = csa->ti->curr_tn;	/* record when last successful wcs_flu occurred */
-	cnl->wcsflu_pid = 0;
-	if (!was_crit)
-		rel_crit(gv_cur_region);
-	/* sync the epoch record in the journal if needed. */
-	if (jnl_enabled && jbp->before_images &&
-			write_epoch && sync_epoch && (csa->ti->curr_tn == csa->ti->early_tn))
-	{	/* Note that if we are in the midst of committing and came here through a bizarre
-		 * stack trace (like wcs_get_space etc.) we want to defer syncing to when we go out of crit.
-		 * Note that we are guaranteed to come back to wcs_wtstart since we are currently in commit-phase
-		 * and will dirty atleast one block for a timer to be triggered.
-		 */
-		jnl_wait(gv_cur_region);
-	}
-	return ret;
-}
diff --git a/sr_vvms/wcs_get_space.c b/sr_vvms/wcs_get_space.c
deleted file mode 100644
index 65d9d49..0000000
--- a/sr_vvms/wcs_get_space.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2007, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_facility.h"
-#include "gdsroot.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "interlock.h"
-#include "jnl.h"
-#include "sleep_cnt.h"
-#include "gdsbgtr.h"
-
-#include "wcs_get_space.h"
-#include "wbox_test_init.h"
-#include "memcoherency.h"
-
-GBLREF	sgmnt_addrs		*cs_addrs;
-GBLREF	gd_region		*gv_cur_region;	/* needed for the JNL_ENSURE_OPEN_WCS_WTSTART macro */
-
-/* go after a specific number of buffers or a particular buffer */
-bool	wcs_get_space(gd_region *reg, int needed, cache_rec *cr)
-{
-	unsigned int		lcnt, ocnt, status;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	node_local_ptr_t        cnl;
-	que_ent_ptr_t		base, q0;
-	int4			dummy_errno;
-	boolean_t		is_mm;
-
-	assert((0 != needed) || (NULL != cr));
-	csa = &(FILE_INFO(reg)->s_addrs);
-	assert(csa == cs_addrs);
-	csd = csa->hdr;
-	is_mm = (dba_mm == csd->acc_meth);
-	assert(is_mm || (dba_bg == csd->acc_meth));
-	cnl = csa->nl;
-	if (FALSE == csa->now_crit)
-	{
-		assert(0 != needed);	/* if needed == 0, then we should be in crit */
-		for (lcnt = DIVIDE_ROUND_UP(needed, csd->n_wrt_per_flu);  0 < lcnt;  lcnt--)
-			JNL_ENSURE_OPEN_WCS_WTSTART(csa, reg, 0, dummy_errno);
-					/* a macro that ensure jnl is open, dclast's wcs_wtstart and checks for errors etc. */
-		return TRUE;
-	}
-	if (FALSE == wcs_wtfini(reg))
-		return FALSE;
-	/* while calculating flush_trigger, the decrement should be atleast 1 if still not reached the minimum allowed */
-	csd->flush_trigger = MAX(csd->flush_trigger - MAX(csd->flush_trigger/STEP_FACTOR, 1), MIN_FLUSH_TRIGGER(csd->n_bts));
-	if (0 == needed)
-	{
-		if (!is_mm)
-		{	/* If another process is concurrently finishing up phase2 of commit, wait for that to complete first. */
-			if (cr->in_tend && !wcs_phase2_commit_wait(csa, cr))
-				return FALSE;	/* assumption is that caller will set wc_blocked and trigger cache recovery */
-		}
-		for (lcnt = 1; (MAXGETSPACEWAIT > lcnt) && (0 != cr->dirty); lcnt++)
-		{	/* We want to flush a specific cache-record. We speed up the wait by moving the dirty cache-record
-			 * to the head of the active queue. But to do this, we need exclusive access to the active queue.
-			 * The only other processes outside of crit that can be touching this concurrently are wcs_wtstart
-			 * (which can remove entries from the queue) and bg_update_phase2 (which can add entries to the queue).
-			 * In the case of writers, we can wait for those to complete (by setting cnl->wc_blocked to TRUE)
-			 * and then play with the queue. But in the case of bg_update_phase2, it is not easily possible to
-			 * do a similar wait so in this case we choose to do plain wcs_wtstart (which uses interlocked
-			 * queue operations and hence can work well with concurrent bg_update_phase2) and wait until the
-			 * cache record of interest becomes non-dirty. The consequence is we might wait a little longer than
-			 * necessary but that is considered acceptable for now.
-			 */
-			/* Check if cache recovery is needed (could be set by another process in
-			 * secshr_db_clnup finishing off a phase2 commit). If so, no point invoking
-			 * wcs_wtstart as it will return right away. Instead return FALSE so
-			 * cache-recovery can be triggered by the caller.
-			 */
-			if (cnl->wc_blocked)
-			{
-				assert(gtm_white_box_test_case_enabled);
-				return FALSE;
-			}
-			if (!is_mm && cnl->wcs_phase2_commit_pidcnt)
-			{
-				JNL_ENSURE_OPEN_WCS_WTSTART(csa, reg, 0, dummy_errno);
-					/* a macro that ensure jnl is open, dclast's wcs_wtstart and checks for errors etc. */
-				wcs_sleep(lcnt);
-			} else if (LATCH_CLEAR == WRITE_LATCH_VAL(cr))
-			{
-				SIGNAL_WRITERS_TO_STOP(cnl);	/* to stop all active writers */
-				WAIT_FOR_WRITERS_TO_STOP(cnl, ocnt, MAXGETSPACEWAIT);
-				if (MAXGETSPACEWAIT <= ocnt)
-				{
-					assert(FALSE);
-					return FALSE;
-				}
-				if (LATCH_CLEAR == WRITE_LATCH_VAL(cr))
-				{	/* Check if cache-record is part of the active queue. If so, then remove it from the
-					 * tail of the active queue and move it to the head to try and speed up the flush.
-					 * If not and if cr->dirty is non-zero, then the only way this is possible we know
-					 * of is if a concurrent process encountered an error in the midst of commit in phase2
-					 * of bg_update and finished the update but did not reinsert the cache-record in the
-					 * active queue (see comment in secshr_db_clnup about why INSQ*I macros are not used
-					 * in VMS). In this case, return FALSE as wcs_get_space cannot flush this cache-record.
-					 * The caller will trigger appropriate error handling. We are guaranteed that cr cannot
-					 * be part of the wip queue because WRITE_LATCH_VAL(cr) is LATCH_CLEAR (in wip queue it
-					 * will be > LATCH_CLEAR).
-					 */
-					if (0 != cr->state_que.fl)
-					{	/* We are about to play with the queues without using interlocks.
-						 * Assert no one else could be concurrently playing with the queue.
-						 */
-						assert(!cnl->wcs_phase2_commit_pidcnt && !cnl->in_wtstart);
-						base = &csa->acc_meth.bg.cache_state->cacheq_active;
-						q0 = (que_ent_ptr_t)((sm_uc_ptr_t)&cr->state_que + cr->state_que.fl);
-						shuffqth((que_ent_ptr_t)q0, (que_ent_ptr_t)base);
-					} else if (cr->dirty)
-					{
-						assert(gtm_white_box_test_case_enabled);
-						return FALSE;
-					}
-				}
-				SIGNAL_WRITERS_TO_RESUME(cnl);
-				JNL_ENSURE_OPEN_WCS_WTSTART(csa, reg, 0, dummy_errno);
-					/* a macro that ensure jnl is open, dclast's wcs_wtstart and checks for errors etc. */
-				wcs_sleep(lcnt);
-			} else if ((0 == cr->iosb.cond) || (WRT_STRT_PNDNG == cr->iosb.cond))
-			{
-				JNL_ENSURE_OPEN_WCS_WTSTART(csa, reg, 0, dummy_errno);
-					/* a macro that ensure jnl is open, dclast's wcs_wtstart and checks for errors etc. */
-				wcs_sleep(lcnt);
-			}
-			if (FALSE == wcs_wtfini(reg))
-				return FALSE;
-		}
-		if (0 == cr->dirty)
-			return TRUE;
-		assert(FALSE);
-		return FALSE;
-	}
-	for (lcnt = 1; ((cnl->wc_in_free < needed) && (MAXGETSPACEWAIT > lcnt)); lcnt++)
-	{
-		DCLAST_WCS_WTSTART(reg, 0, dummy_errno); /* a macro that dclast's wcs_wtstart and checks for errors etc. */
-		wcs_sleep(lcnt);
-		if (FALSE == wcs_wtfini(reg))
-			return FALSE;
-	}
-	if (cnl->wc_in_free < needed)
-	{
-		assert(FALSE);
-		return FALSE;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/wcs_wtfini.c b/sr_vvms/wcs_wtfini.c
deleted file mode 100644
index 64efe2e..0000000
--- a/sr_vvms/wcs_wtfini.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <ssdef.h>
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "gdskill.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsfhead.h"
-#include "gdsbgtr.h"		/* for the BG_TRACE_ANY macros */
-#include "filestruct.h"		/* for WRT_STRT_PNDNG and FILE_INFO macros */
-#include "ast.h"		/* for ENABLE and DISABLE macros to pass to sys$setast() */
-#include "interlock.h"		/* atleast for *_LATCH_* macros */
-#include "relqueopi.h"		/* for REMQHI and INSQHI macros */
-#include "send_msg.h"
-#include "is_proc_alive.h"
-#include "shmpool.h"
-
-GBLREF	int4		wtfini_in_prog;
-GBLREF	uint4		image_count;
-GBLREF	uint4		process_id;
-
-error_def(ERR_BLKWRITERR);
-error_def(ERR_DBCCERR);
-error_def(ERR_DBFILERR);
-error_def(ERR_IOWRITERR);
-
-bool	wcs_wtfini(gd_region *reg)
-{
-	cache_state_rec_ptr_t	csr, start_csr;
-	cache_rec_ptr_t		cr_alt;
-	cache_que_head_ptr_t	whead;
-	sgmnt_addrs		*csa;
-	sgmnt_data_ptr_t	csd;
-	shmpool_blk_hdr_ptr_t	sblkh_p;
-	sm_off_t		sblkh_off;
-	unsigned int		ast_status, dummy, lcnt;
-	uint4			wrtfail_epid;
-	int			status;
-	cache_rec_ptr_t		cr, cr_lo, cr_hi;
-	boolean_t		ret_value;
-	unsigned int		iosb_cond;
-	node_local_ptr_t	cnl;
-
-	csa = &FILE_INFO(reg)->s_addrs;
-	csd = csa->hdr;
-	cnl = csa->nl;
-	BG_TRACE_ANY(csa, wcs_wtfini_invoked);
-	wtfini_in_prog++;
-	assert((TRUE == csa->now_crit) || (TRUE == csd->clustered));
-	whead = &csa->acc_meth.bg.cache_state->cacheq_wip;
-	assert(0 == (((int4)whead) & 7));
-	cr_lo = csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets;
-	cr_hi = cr_lo + csd->n_bts;
-	ret_value = TRUE;
-	for (lcnt = 0, start_csr = NULL;  lcnt <= csd->n_bts;  lcnt++)
-	{
-		csr = (cache_state_rec_ptr_t)REMQHI((que_head_ptr_t)whead);
-		if (INTERLOCK_FAIL == (int4)csr)
-		{
-			assert(FALSE);
-			SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-			BG_TRACE_PRO_ANY(csa, wcb_wtfini_lckfail1);
-			ret_value = FALSE;
-			break;
-		}
-		if (NULL == csr)
-			break;		/* empty queue */
-		/* wcs_get_space relies on the fact that a cache-record that is out of either active or wip queue has its
-		 * fl and bl fields set to 0. Initialize those fields now that this cache-record is out of the active queue.
-		 */
-		csr->state_que.fl = csr->state_que.bl = 0;
-		if (csr == start_csr)
-		{
-			status = INSQHI((que_ent_ptr_t)csr, (que_head_ptr_t)whead);
-			if (INTERLOCK_FAIL == status)
-			{
-				assert(FALSE);
-				SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-				BG_TRACE_PRO_ANY(csa, wcb_wtfini_lckfail2);
-				ret_value = FALSE;
-			}
-			break;		/* looped the queue */
-		}
-		cr = (cache_rec_ptr_t)((sm_uc_ptr_t)csr - SIZEOF(cr->blkque));
-		if (CR_NOT_ALIGNED(cr, cr_lo) || CR_NOT_IN_RANGE(cr, cr_lo, cr_hi))
-		{
-			assert(FALSE);
-			SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-			BG_TRACE_PRO_ANY(csa, wc_blocked_wcs_wtfini_bad_cr);
-			ret_value = FALSE;
-			break;
-		}
-		assert(0 == csr->r_epid);
-		assert(LATCH_CLEAR < WRITE_LATCH_VAL(csr));
-		iosb_cond = csr->iosb.cond;
-		/* Since cr->iosb.cond can change concurrently (wcs_wtstart.c can issue a dsk_write for the same cache-record
-		 * concurrently which can change the iosb) and since it needs to be used in multiple places in the if statement
-		 * below, we note down cr->iosb.cond in a local variable and use that instead. Using the shared memory value
-		 * might cause us to go into the if block for a block whose IO is not complete and end up reissuing the IO for
-		 * the same block causing TWO CONCURRENTLY PENDING IOs for the same block.
-		 */
-		if ((((0 != iosb_cond)
-				&& ((WRT_STRT_PNDNG != iosb_cond) || (FALSE == is_proc_alive(csr->epid, csr->image_count))))
-				|| ((TRUE == csr->wip_stopped) && (FALSE == is_proc_alive(csr->epid, csr->image_count)))))
-		{	/* if 0 == csr->epid, is_proc_alive returns FALSE */
-			/* As long as the cache-record is PINNED (in_cw_set is TRUE), wcs_wtfini should NOT remove an older
-			 * twin even if it is an older twin whose write is complete. This is because the contents of that
-			 * buffer could be relied upon by secshr_db_clnup/wcs_recover to complete the flush of the before-image
-			 * to the backup file (in case of an error in the midst of commit) so we should NOT touch csr->blk.
-			 */
-			if (1 == (iosb_cond & 1) || (0 == csr->dirty) || (CR_BLKEMPTY == csr->blk)
-				|| ((0 == csr->bt_index) && !csr->in_cw_set))
-			{	/* it's done properly, or it doesn't matter */
-				if (0 != csr->twin)
-				{
-					cr_alt = (cache_rec_ptr_t)GDS_ANY_REL2ABS(csa, csr->twin);
-					assert(&((cache_rec_ptr_t)GDS_ANY_REL2ABS(csa, cr_alt->twin))->state_que == csr);
-					cr_alt->twin = csr->twin = 0;
-					if (0 == csr->bt_index)
-					{
-						assert(CR_BLKEMPTY != cr_alt->blk);
-						assert(LATCH_CONFLICT == WRITE_LATCH_VAL(csr));
-						csr->cycle++;	/* increment cycle whenever blk number changes (tp_hist needs it) */
-						csr->blk = CR_BLKEMPTY;
-					} else
-					{
-						assert(CR_BLKEMPTY != csr->blk);
-						cr_alt->cycle++;	/* increment cycle for blk number changes (for tp_hist) */
-						cr_alt->blk = CR_BLKEMPTY;
-					}
-				}
-				assert(FALSE == csr->data_invalid);
-				BG_TRACE_ANY(csa, qio_to_clean);
-				csr->flushed_dirty_tn = csr->dirty;
-				csr->dirty = 0;
-				csr->epid = 0;
-				csr->iosb.cond = 0;
-				csr->wip_stopped = FALSE;
-				INCR_CNT(&cnl->wc_in_free, &dummy);
-				WRITE_LATCH_VAL(csr) = LATCH_CLEAR; /* off the queues and now_crit */
-				SHMPOOL_FREE_CR_RFMT_BLOCK(reg, csa, cr);
-			} else
-			{	/* block is still valid, current, dirty and the write was not successful OR in_cw_set is TRUE */
-				status = INSQTI((que_ent_ptr_t)csr, (que_head_ptr_t)whead);
-				if (INTERLOCK_FAIL == status)
-				{
-					assert(FALSE);
-					SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-					BG_TRACE_PRO_ANY(csa, wcb_wtfini_lckfail3);
-					ret_value = FALSE;
-					break;
-				}
-				if ((FALSE == reg->read_only) && !lib$ast_in_prog())
-				{	/* Don't want to do setast(DISABLE)s when we are within an AST.
-					 * Anyway a future non-AST driven wcs_wtfini will take care of this.
-					 */
-					wrtfail_epid = csr->epid;
-					csr->image_count = image_count;
-					csr->epid = process_id;
-					csr->iosb.cond = WRT_STRT_PNDNG;
-					csr->wip_stopped = FALSE;
-					csr->shmpool_blk_off = 0;	/* dsk_write() may (if dwngrd) want to redo this anyway */
-					ast_status = sys$setast(DISABLE);
-					/* Notify of IO error. Notify of status if not special retry and the original job died. */
-					send_msg(VARLSTCNT(7) ERR_IOWRITERR, 5, wrtfail_epid, csr->blk, DB_LEN_STR(reg), csr->epid);
-					if (WRT_STRT_PNDNG != iosb_cond)
-						send_msg(VARLSTCNT(1) iosb_cond);
-					CR_BUFFER_CHECK1(reg, csa, csd, cr, cr_lo, cr_hi);
-					status = dsk_write(reg, csr->blk, cr, NULL, 0, &csr->iosb);
-					if (SS$_WASSET == ast_status)
-						sys$setast(ENABLE);
-					if (0 == (status & 1))
-					{	/* if it fails, leave it and hope that another process will work (infinite retry) */
-						send_msg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(reg));
-						send_msg(VARLSTCNT(3) ERR_BLKWRITERR, 1, csr->blk);
-						send_msg(VARLSTCNT(1) status);
-						/* since the state of iosb.cond is indeterminate (but believed to never have
-						 * severity of SUCCESS) the following [slightly sleazy] assignment forces a retry */
-						csr->iosb.cond = WRT_STRT_PNDNG;
-						csr->epid = 0;
-						csr->shmpool_blk_off = 0; /* Allow reuse of our reformat buffer (if any) */
-						assert(FALSE);
-					}
-				}
-				if (NULL == start_csr)
-					start_csr = csr;
-			}
-		} else
-		{
-			assert(csr->epid);
-			status = INSQTI((que_ent_ptr_t)csr, (que_head_ptr_t)whead);
-			if (INTERLOCK_FAIL == status)
-			{
-				assert(FALSE);
-				SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-				BG_TRACE_PRO_ANY(csa, wcb_wtfini_lckfail4);
-				ret_value = FALSE;
-				break;
-			}
-			if (NULL == start_csr)
-				start_csr = csr;
-		}
-	}
-	wtfini_in_prog--;
-	assert(0 <= wtfini_in_prog);
-	if (0 > wtfini_in_prog)
-		wtfini_in_prog = 0;
-	if (!ret_value || ((NULL != csr) && (csr != start_csr)))
-	{
-		assert(FALSE);
-		return FALSE;
-	}
-	return TRUE;
-}
diff --git a/sr_vvms/wcs_wtstart.c b/sr_vvms/wcs_wtstart.c
deleted file mode 100644
index c9c7a32..0000000
--- a/sr_vvms/wcs_wtstart.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gdsroot.h"
-#include "gtm_facility.h"
-#include "fileinfo.h"
-#include "gdsbt.h"
-#include "gdsblk.h"
-#include "gdsbml.h"
-#include "gdsfhead.h"
-#include "filestruct.h"
-#include "ast.h"
-#include "interlock.h"
-#include "jnl.h"
-#include "relqueopi.h"
-#include "send_msg.h"
-#include "iosp.h"
-#include "gdsbgtr.h"		/* for the BG_TRACE_ANY macros */
-#include "memcoherency.h"
-
-GBLREF	short	astq_dyn_avail;
-GBLREF	uint4	process_id;
-GBLREF	uint4	image_count;
-
-error_def(ERR_BLKWRITERR);
-error_def(ERR_DBCCERR);
-error_def(ERR_DBFILERR);
-
-/* currently returns 0 always */
-int4	wcs_wtstart(gd_region *reg)
-{
-	boolean_t		bmp_status;
-	blk_hdr_ptr_t		bp;
-	cache_que_head_ptr_t	ahead, whead;
-	cache_state_rec_ptr_t	csr, start_csr;
-	jnl_private_control	*jpc;
-	node_local_ptr_t	cnl;
-	sgmnt_data_ptr_t	csd;
-	sgmnt_addrs		*csa;
-	unsigned int		max_writes, wcnt;
-	int			status, dummy, lcnt, n;
-	cache_rec_ptr_t		cr, cr_lo, cr_hi;
-	uint4			index;
-
-        assert(lib$ast_in_prog());	/* if a dclast fails and the setast is used, this assert fails - put can't happen in pro */
-	assert(0 != WRT_STRT_PNDNG);
-	assert(0 == (1 & WRT_STRT_PNDNG));
-	assert(FALSE == reg->read_only);
-	csa = &FILE_INFO(reg)->s_addrs;
-	csd = csa->hdr;
-	cnl = csa->nl;
-	if (cnl->wc_blocked)
-		return 0;
-	INCR_INTENT_WTSTART(cnl);	/* signal intent to enter wcs_wtstart */
-	/* the above interlocked instruction does the appropriate write memory barrier to publish this change to the world */
-	SHM_READ_MEMORY_BARRIER;	/* need to do this to ensure uptodate value of csa->nl->wc_blocked is read */
-	if (cnl->wc_blocked)
-	{
-		DECR_INTENT_WTSTART(cnl);
-		return 0;
-	}
-	csa->in_wtstart = TRUE;			/* secshr_db_clnup depends on the order of this and the INCR_CNT done below */
-	INCR_CNT(&cnl->in_wtstart, &dummy);	/* if a wc_blocked sneeks in the loop below will prevent queue operations */
-	SAVE_WTSTART_PID(cnl, process_id, index);
-	assert(cnl->in_wtstart > 0 && csa->in_wtstart);
-
-	jpc = csa->jnl;
-	assert(!JNL_ALLOWED(csd) || NULL != jpc);
-	if (JNL_ENABLED(csd) && (NULL != jpc) && (NOJNL != jpc->channel)) /* not jnl_write, which is believed to be ok */
-		jnl_start_ast(jpc);
-	cnl->wcs_staleness = -1;
-	lcnt = csd->n_bts;
-	max_writes = csd->n_wrt_per_flu;
-	whead = &csa->acc_meth.bg.cache_state->cacheq_wip;
-	assert(0 == ((int4)whead & 7));
-	ahead = &csa->acc_meth.bg.cache_state->cacheq_active;
-	assert(0 == ((int4)ahead & 7));
-	cr_lo = csa->acc_meth.bg.cache_state->cache_array + csd->bt_buckets;
-	cr_hi = cr_lo + csd->n_bts;
-	csa->wbuf_dqd++;	/* increase the counter. In case ACCVIO or something bad happens
-				 * secshr_db_cleanup will check the field and handle appropriarely */
-	for (wcnt = 0, start_csr = NULL;  (0 < lcnt) && (wcnt < max_writes) &&  (FALSE == cnl->wc_blocked);  --lcnt)
-	{
-		csr = (cache_state_rec_ptr_t)REMQHI((que_head_ptr_t)ahead);
-		if (INTERLOCK_FAIL == (int4)csr)
-		{
-			assert(FALSE);
-			SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-			BG_TRACE_PRO_ANY(csa, wcb_wtstart_lckfail1);
-			break;
-		}
-		if (NULL == csr)
-			break;		/* the queue is empty */
-		/* wcs_get_space relies on the fact that a cache-record that is out of either active or wip queue has its
-		 * fl and bl fields set to 0. Initialize those fields now that this cache-record is out of the active queue.
-		 */
-		csr->state_que.fl = csr->state_que.bl = 0;
-		if (csr == start_csr)
-		{	/* completed a tour of the queue */
-			status = INSQTI((que_ent_ptr_t)csr, (que_head_ptr_t)ahead);
-			if (INTERLOCK_FAIL == status)
-			{
-				assert(FALSE);
-				SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-				BG_TRACE_PRO_ANY(csa, wcb_wtstart_lckfail2);
-			}
-			break;
-		}
-		cr = (cache_rec_ptr_t)((sm_uc_ptr_t)csr - SIZEOF(cr->blkque));
-		assert(!CR_NOT_ALIGNED(cr, cr_lo) && !CR_NOT_IN_RANGE(cr, cr_lo, cr_hi));
-		if (CR_BLKEMPTY == csr->blk)
-		{	/* must be left by t_commit_cleanup - remove it from the queue and complete the cleanup */
-			assert(0 == csr->twin);
-			assert(FALSE == csr->data_invalid);
-			assert(csr->dirty);
-			assert(0 == csr->iosb.cond);
-			csr->dirty = 0;
-			INCR_CNT(&cnl->wc_in_free, &dummy);
-			if (!SUB_ENT_FROM_ACTIVE_QUE_CNT(&cnl->wcs_active_lvl, &cnl->wc_var_lock)
-							&& !cnl->wcsflu_pid && FALSE == csa->dbsync_timer)
-			{
-				assert(0 < astq_dyn_avail);
-				if (0 < astq_dyn_avail)
-				{
-					csa->dbsync_timer = TRUE;
-					astq_dyn_avail--;
-					/* Since we are already in an ast, we can invoke wcs_clean_dbsync_timer_ast directly. */
-					wcs_clean_dbsync_timer_ast(csa);
-				}
-			}
-			continue;
-		}
-		assert(0 != csr->dirty);
-		assert(0 == csr->iosb.cond);
-		assert(0 == csr->epid);
-		assert(0 == csr->r_epid);
-		if (((0 != csr->twin) && (1 != ((cache_rec_ptr_t)GDS_ANY_REL2ABS(csa, csr->twin))->iosb.cond))
-			|| ((0 != csr->jnl_addr) && JNL_ENABLED(csd) && (csr->jnl_addr > jpc->jnl_buff->dskaddr)))
-		{	/* twin still in write OR would write ahead of journal */
-			status = INSQTI((que_ent_ptr_t)csr, (que_head_ptr_t)ahead);
-			if ((unsigned int)INTERLOCK_FAIL == status)
-			{
-				assert(FALSE);
-				SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-				BG_TRACE_PRO_ANY(csa, wcb_wtstart_lckfail3);
-				break;
-			}
-			if (NULL == start_csr)
-				start_csr = csr;
-			continue;
-		}
-		csr->image_count = image_count;
-		csr->epid = process_id;
-		csr->iosb.cond = WRT_STRT_PNDNG;		/* Illegal value, shows that write has not been issued */
-		LOCK_BUFF_FOR_WRITE(csr, n);
-		assert(WRITE_LATCH_VAL(csr) >= LATCH_CLEAR);
-		assert(WRITE_LATCH_VAL(csr) <= LATCH_CONFLICT);
-		if (n < 1)
-		{	/* sole owner; if not, leave it off the queue for t_end_sysops to replace */
-			assert(WRITE_LATCH_VAL(csr) > LATCH_CLEAR);
-			assert(FALSE == csr->data_invalid);	/* check that buffer has valid data */
-			assert(0 == n);
-			assert(csr->epid);
-			status = INSQTI((que_ent_ptr_t)csr, (que_head_ptr_t)whead);
-			if (INTERLOCK_FAIL == status)
-			{
-				assert(FALSE);
-				SET_TRACEABLE_VAR(cnl->wc_blocked, TRUE);
-				BG_TRACE_PRO_ANY(csa, wcb_wtstart_lckfail4);
-				break;
-			}
-			INCR_GVSTATS_COUNTER(csa, cnl, n_dsk_write, 1);
-			CR_BUFFER_CHECK1(reg, csa, csd, cr, cr_lo, cr_hi);
-			bp = (blk_hdr_ptr_t)(GDS_ANY_REL2ABS(csa, csr->buffaddr));
-			VALIDATE_BM_BLK(csr->blk, bp, csa, reg, bmp_status);	/* bmp_status reflects bitmap buffer's validity */
-			if (SUB_ENT_FROM_ACTIVE_QUE_CNT(&cnl->wcs_active_lvl, &cnl->wc_var_lock) || cnl->wcsflu_pid)
-				status = dsk_write(reg, csr->blk, cr, NULL, 0, &csr->iosb);
-			else
-			{
-				if ((0 < astq_dyn_avail) && (FALSE == csa->dbsync_timer))
-				{
-					astq_dyn_avail--;
-					csa->dbsync_timer = TRUE;
-					status = dsk_write(reg, csr->blk, cr, wcs_clean_dbsync_timer_ast, csa, &csr->iosb);
-				} else
-				{
-					assert(csa->dbsync_timer);	/* in PRO, we skip writing an epoch record. */
-					status = dsk_write(reg, csr->blk, cr, NULL, 0, &csr->iosb);
-				}
-			}
-			if (0 == (status & 1))
-			{	/* if it fails, leave it and hope that another time, another process will work (infinite retry) */
-				send_msg(VARLSTCNT(4) ERR_DBFILERR, 2, DB_LEN_STR(reg));
-				send_msg(VARLSTCNT(3) ERR_BLKWRITERR, 1, csr->blk);
-				send_msg(VARLSTCNT(1) status);
-				/* since the state of iosb.cond is indeterminate (but believed to never have severity of SUCCESS)
-				 * when the qio fails, the following [slightly sleazy] assignment forces a retry */
-				csr->iosb.cond = WRT_STRT_PNDNG;/* this and the next line assume that iosb and epid are aligned */
-				csr->epid = 0;			/* so that memory coherency is not disrupted by concurrent access */
-				assert(FALSE);
-			}
-			++wcnt;
-		}
-	}
-	csa->wbuf_dqd--;	/* Everything completed successfully, so clear the field now */
-	assert(cnl->in_wtstart > 0 && csa->in_wtstart);
-	DECR_CNT(&cnl->in_wtstart, &dummy);		/* secshr_db_clnup depends on the order of this and the next line */
-	CLEAR_WTSTART_PID(cnl, index);
-	csa->in_wtstart = FALSE;
-	DECR_INTENT_WTSTART(cnl);
-	/* Ideally we should be having an invocation of the DEFERRED_EXIT_HANDLING_CHECK macro here (see unix wcs_wtstart.c).
-	 * But since we are in an AST at this point, invoking the exit handler is going to defer it once again (there is
-	 * code in generic_exit_handler.c which checks for ast_in_prog) so no point invoking it here. This means if
-	 * a MUPIP STOP gets delivered while we are in wcs_wtstart and therefore exit-handling gets deferred, it will not
-	 * be triggered at the end of wcs_wtstart but has to wait until the next t_end/tp_tend/rel_crit/rel_lock occurs
-	 * (those places have the DEFERRED_EXIT_HANDLING_CHECK checks).
-	 */
-	return 0;
-}
diff --git a/sr_vvms/zcall.h b/sr_vvms/zcall.h
deleted file mode 100644
index fd287e3..0000000
--- a/sr_vvms/zcall.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/*
- *	ZCALL Table Definitions
- *
- * NOTES:
- *   1.	Any changes made here must also be reflected in ZC_CALL.MAR (for VAX)
- *	or in ZC_CALL.M64 (for Alpha);
- *   2.	In order for these definitions to be portable across both VAX and Alpha
- *	platforms, the structure types defined here must be padded, if necessary,
- *	such that their declared sizes (as returned by the SIZEOF operator ) are
- *	a multiple of the alignment boundary of their most stringently aligned
- *	member.  (This is only because the respective compilers would otherwise
- *	compute SIZEOF differently .)
- */
-
-typedef	struct zctabrtn_type
-	{
-		unsigned short		entry_length;
-		unsigned char		n_inputs;
-		unsigned char		n_outputs;
-		unsigned char		*entrypoint;
-		unsigned char		outbnd_reset;
-		char			padding;	/* make SIZEOF(zctabrtn) == 12 */
-		unsigned char		callnamelen;
-		unsigned char		callname[1];	/* variable size > 0 */
-	}	zctabrtn;
-
-typedef	struct zctabret_type
-	{
-		unsigned char		class;
-		unsigned char		type;
-	}	zctabret;
-
-typedef	struct zctabinput_type
-	{
-		unsigned char		mechanism;
-		unsigned char		type;
-		unsigned char		position;
-		unsigned char		qualifier;
-		char			*value;
-	}	zctabinput;
-
-typedef	struct zctaboutput_type
-	{
-		unsigned char		mechanism;
-		unsigned char		type;
-		unsigned char		position;
-		unsigned char		qualifier;
-		int4			value;
-	}	zctaboutput;
-
-typedef struct zcpackage_type
-	{
-		zctabrtn	*begin, *end;
-		unsigned char	*packname;
-	}	zcpackage;
diff --git a/sr_vvms/zcch.c b/sr_vvms/zcch.c
deleted file mode 100644
index a05bce1..0000000
--- a/sr_vvms/zcch.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "io.h"
-#include "error.h"
-#include "setterm.h"
-
-GBLREF io_pair		io_std_device;
-
-CONDITION_HANDLER(zcch)
-{
-	static struct chf$signal_array *newsig = 0;
-	void		free();
-	error_def	(ERR_ZCUSRRTN);
-
-	if (SIGNAL == SS$_DEBUG)
-		return SS$_RESIGNAL;
-	if (SIGNAL == SS$_UNWIND)
-	{
-		if (newsig)
-			free(newsig);
-		return SS$_NORMAL;
-	}
-
-	if (io_std_device.in->type == tt)
-	{	setterm(io_std_device.in);
-	}
-
-	/* add GT.M cover message over users error */
-	newsig = malloc((sig->chf$l_sig_args + 2 + 1) * SIZEOF(int4));
-	memcpy(&newsig->chf$l_sig_name + 2, &sig->chf$l_sig_name, sig->chf$l_sig_args * SIZEOF(int4));
-	newsig->chf$l_sig_args = sig->chf$l_sig_args + 2;
-	newsig->chf$l_sig_name = ERR_ZCUSRRTN;
-	newsig->chf$l_sig_arg1 = 0;
-	sig = newsig;
-	NEXTCH;
-}
diff --git a/sr_vvms/zcdef.h b/sr_vvms/zcdef.h
deleted file mode 100644
index f3fae13..0000000
--- a/sr_vvms/zcdef.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2012 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-/* ZCDEF.H -- coincides with module ZCDEF in GTMZCALL.MAX, GTMZCALL.MLB */
-
-#define	ZC$RETC_		0		; Return classes
-#define	ZC$RETC_STATUS		1
-#define	ZC$RETC_VALUE		2
-#define	ZC$RETC_IGNORED		3
-
-#define	ZC$MECH_		0		; Argument-passing mechanisms
-#define	ZC$MECH_VALUE		1
-#define	ZC$MECH_REFERENCE	2
-#define	ZC$MECH_DESCRIPTOR	3
-#define	ZC$MECH_DESCRIPTOR64	4
-
-#define	ZC$DTYPE_		0		; Native data types
-#define	ZC$DTYPE_STRING		DSC$K_DTYPE_T
-#define ZC$DTYPE_BYTE		DSC$K_DTYPE_B
-#define ZC$DTYPE_BYTEU		DSC$K_DTYPE_BU
-#define ZC$DTYPE_WORD		DSC$K_DTYPE_W
-#define ZC$DTYPE_WORDU		DSC$K_DTYPE_WU
-#define	ZC$DTYPE_LONG		DSC$K_DTYPE_L
-#define	ZC$DTYPE_LONGU		DSC$K_DTYPE_LU
-#define	ZC$DTYPE_QUAD		DSC$K_DTYPE_Q
-#define	ZC$DTYPE_FLOATING	DSC$K_DTYPE_F
-#define	ZC$DTYPE_DOUBLE		DSC$K_DTYPE_G
-#define	ZC$DTYPE_G_FLOATING	DSC$K_DTYPE_G
-#define	ZC$DTYPE_H_FLOATING	DSC$K_DTYPE_H
-
-#define	ZC$IQUAL_		0		; Input argument qualifiers
-#define	ZC$IQUAL_CONSTANT	1
-#define	ZC$IQUAL_OPTIONAL	2
-#define	ZC$IQUAL_OPTIONAL_0	3
-#define	ZC$IQUAL_DEFAULT	4
-#define	ZC$IQUAL_REQUIRED	5
-#define	ZC$IQUAL_BLOCK		6
-
-#define	ZC$OQUAL_		0		; Output argument qualifiers
-#define	ZC$OQUAL_REQUIRED	1
-#define	ZC$OQUAL_DUMMY		2
-#define	ZC$OQUAL_PREALLOCATE	3
-
diff --git a/sr_vvms/zl_cmd_qlf.c b/sr_vvms/zl_cmd_qlf.c
deleted file mode 100644
index a3ba57b..0000000
--- a/sr_vvms/zl_cmd_qlf.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2009 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-
-#include "cmd_qlf.h"
-#include "stringpool.h"
-#include <descrip.h>
-
-unsigned int clich();
-
-#define	COMMAND			"MUMPS "
-
-GBLREF spdesc stringpool;
-
-void zl_cmd_qlf (mstr *quals, command_qualifier *qualif)
-{
-	unsigned		status, mumps_clitab ();
-	struct dsc$descriptor	comdsc;
-	error_def		(ERR_COMPILEQUALS);
-
-	ENSURE_STP_FREE_SPACE(quals->len + SIZEOF(COMMAND) - 1);
-
-	memcpy (stringpool.free, COMMAND, SIZEOF(COMMAND) - 1);
-	memcpy (stringpool.free + SIZEOF(COMMAND) - 1, quals->addr, quals->len);
-	comdsc.dsc$w_length	= SIZEOF(COMMAND) - 1 + quals->len;
-	comdsc.dsc$b_dtype	= DSC$K_DTYPE_T;
-	comdsc.dsc$b_class	= DSC$K_CLASS_S;
-	comdsc.dsc$a_pointer	= stringpool.free;
-	lib$establish (clich);
-	status = cli$dcl_parse (&comdsc, &mumps_clitab, 0, 0);
-	lib$revert ();
-	if (!(status & 1))
-		rts_error(VARLSTCNT(5) ERR_COMPILEQUALS, 2, quals->len, quals->addr, status);
-	qualif->object_file.mvtype = qualif->list_file.mvtype = qualif->ceprep_file.mvtype = 0;
-	get_cmd_qlf (qualif);
-}
diff --git a/sr_vvms/zl_olb.c b/sr_vvms/zl_olb.c
deleted file mode 100644
index ad7561b..0000000
--- a/sr_vvms/zl_olb.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "lbrdef.h"
-#include <descrip.h>
-
-globalvalue int4 LBR$_NORMAL;
-globalvalue int4 LBR$_LIBOPN;
-globalvalue int4 LBR$_OLDLIBRARY;
-globalvalue int4 LBR$_KEYNOTFND;
-
-zl_olb(mstr *olblib, mstr *module, int4 *libindex)
-{
-	int4			txtrfa[2];
-	uint4			pos, status;
-	struct dsc$descriptor_s	libnamdes, modnamdes;
-	static readonly		$DESCRIPTOR(period, ".");
-
-	modnamdes.dsc$b_dtype   = DSC$K_DTYPE_T;
-	modnamdes.dsc$b_class   = DSC$K_CLASS_S;
-	modnamdes.dsc$a_pointer = module->addr;
-	modnamdes.dsc$w_length  = module->len;
-	pos = lib$locc(&period, &modnamdes);
-	if (pos != 0 && pos != module->len)
-		modnamdes.dsc$w_length = pos - 1;
-	else
-		GTMASSERT;
-	libnamdes.dsc$b_dtype   = DSC$K_DTYPE_T;
-	libnamdes.dsc$b_class   = DSC$K_CLASS_S;
-	libnamdes.dsc$a_pointer = olblib->addr;
-	libnamdes.dsc$w_length  = olblib->len;
-	status = lbr$ini_control(libindex, &LBR$C_READ, &LBR$C_TYP_OBJ, 0);
-	if (LBR$_NORMAL == status)
-	{
-		status = lbr$open(libindex, &libnamdes, 0, 0, 0, 0, 0);
-		if ((LBR$_OLDLIBRARY | LBR$_LIBOPN | LBR$_NORMAL) & status)
-		{
-			status = lbr$set_locate(libindex);
-			if (LBR$_NORMAL == status)
-				status = lbr$lookup_key(libindex, &modnamdes, txtrfa);
-		}
-	}
-	return status;
-}
diff --git a/sr_vvms/zl_olb.h b/sr_vvms/zl_olb.h
deleted file mode 100644
index a46111c..0000000
--- a/sr_vvms/zl_olb.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef ZL_OLB_INCLUDED
-#define ZL_OLB_INCLUDED
-
-int zl_olb(mstr *olblib, mstr *module, int4 *libindex);		/***type int added***/
-
-#endif /* ZL_OLB_INCLUDED */
diff --git a/sr_vvms/zro_gettok.c b/sr_vvms/zro_gettok.c
deleted file mode 100644
index f9ef2d0..0000000
--- a/sr_vvms/zro_gettok.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-#include "toktyp.h"
-#include "zroutines.h"
-
-void zro_gettok (unsigned char **lp, unsigned char *top, unsigned *toktyp, mstr *tok)
-{
-	while (*lp < top && **lp == ' ')
-		(*lp)++;
-	if (*lp >= top)
-		*toktyp = TK_EOL;
-	else
-	switch (**lp)
-	{
-	case ',':
-		*toktyp = TK_COMMA;
-		(*lp)++;
-		break;
-	case '=':
-		*toktyp = TK_EQUAL;
-		(*lp)++;
-		break;
-	case '(':
-		*toktyp = TK_LPAREN;
-		(*lp)++;
-		break;
-	case ')':
-		*toktyp = TK_RPAREN;
-		(*lp)++;
-		break;
-	case '/':
-		*toktyp = TK_SLASH;
-		(*lp)++;
-		break;
-	default:
-		tok->addr = *lp;
-		while (*lp < top && **lp != ',' && **lp != '=' && **lp != '(' && **lp != ')' && **lp != '/' && **lp != ' ')
-			(*lp)++;
-		*toktyp = TK_IDENT;
-		tok->len = *lp - (unsigned char *) tok->addr;
-		break;
-	}
-	return;
-}
diff --git a/sr_vvms/zro_load.c b/sr_vvms/zro_load.c
deleted file mode 100644
index 9f9cad0..0000000
--- a/sr_vvms/zro_load.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2013 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <rms.h>
-
-#include "toktyp.h"
-#include "zroutines.h"
-#include "gtm_caseconv.h"
-#include "longcpy.h"
-#include "error.h"
-
-#define GETTOK		zro_gettok (&lp, top, &toktyp, &tok)
-
-static	char		*zro_str;
-
-error_def		(ERR_BADQUAL);
-error_def		(ERR_COMMAORRPAREXP);
-error_def		(ERR_DIRONLY);
-error_def		(ERR_FILEPARSE);
-error_def		(ERR_FSEXP);
-error_def		(ERR_MAXARGCNT);
-error_def		(ERR_QUALEXP);
-error_def		(ERR_QUALVAL);
-error_def		(ERR_WILDCARD);
-error_def		(ERR_ZROSYNTAX);
-error_def		(ERR_NOLBRSRC);
-
-CONDITION_HANDLER(zro_load_ch)
-{
-	START_CH(FALSE);
-	if (zro_str)
-		free(zro_str);
-	zro_str = NULL;
-	NEXTCH;
-}
-
-void  zro_load (mstr *str)
-{
-	unsigned		toktyp, status;
-	mstr			tok;
-	struct FAB		fab;
-	struct NAM		nam;
-	unsigned char		*lp, *top, qual[8];
-	boolean_t		file;
-	zro_ent			array[ZRO_MAX_ENTS];
-	int			oi, si;
-	unsigned char		buff[255];
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	/* D9D01-002286 - copy str->addr into the malloc'd area (zro_str) so that zro_root components
-	 * always point to the persistent area (rather than to the string pool which may get garbage
-	 * collected later). */
-	if (zro_str)
-		free(zro_str);
-	zro_str = (char *)malloc(str->len);
-	memcpy(zro_str, str->addr, str->len);
-
-	ESTABLISH(zro_load_ch);	/* Condition handler to release zro_str if $ZRO fails to load */
-	fab = cc$rms_fab;
-	nam = cc$rms_nam;
-	fab.fab$l_nam = &nam;
-	nam.nam$l_esa = buff;
-	nam.nam$b_ess = SIZEOF(buff);
-
-	lp = zro_str;
-	top = lp + str->len;
-	array[0].type = ZRO_TYPE_COUNT;
-	array[0].count = 0;
-
-	GETTOK;
-	if (toktyp == TK_EOL)
-	{
-		status = sys$parse (&fab);
-		array[0].count = 1;
-		array[1].type = ZRO_TYPE_OBJECT;
-		array[1].node_present = FALSE;
-		array[1].str.len = 0;
-		memcpy (array[1].dvi, nam.nam$t_dvi, NAM$C_DVI + 12);
-		array[2].type = ZRO_TYPE_COUNT;
-		array[2].count = 1;
-		array[3] = array[1];
-		array[3].type = ZRO_TYPE_SOURCE;
-		si = 4;
-	} else
-	{
-		for (oi = 1;;)
-		{
-			file = FALSE;
-			if (toktyp != TK_IDENT)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZROSYNTAX, 2, str->len, str->addr, ERR_FSEXP);
-			if (oi + 1 >= ZRO_MAX_ENTS)
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_ZROSYNTAX, 2, str->len, str->addr,
-					ERR_MAXARGCNT, 1, ZRO_MAX_ENTS);
-			fab.fab$b_fns = tok.len;
-			fab.fab$l_fna = tok.addr;
-			status = sys$parse (&fab);
-			if (!(status & 1))
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_ZROSYNTAX, 2, str->len, str->addr,
-					ERR_FILEPARSE, 2, tok.len, tok.addr, status);
-			if (nam.nam$l_fnb & (NAM$M_WILDCARD))
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZROSYNTAX, 2, str->len, str->addr,
-					ERR_WILDCARD, 2, tok.len, tok.addr);
-			if (nam.nam$l_fnb & (NAM$M_EXP_NAME | NAM$M_EXP_TYPE | NAM$M_EXP_VER))
-			{
-				file = TRUE;
-				status = sys$search(&fab);
-				if (!(status & 1))
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9) ERR_ZROSYNTAX, 2, str->len, str->addr,
-						  ERR_FILEPARSE, 2, tok.len, tok.addr, status);
-			}
-			array[0].count++;
-			if (file)
-				array[oi].type = ZRO_TYPE_OBJLIB;
-			else
-				array[oi].type = ZRO_TYPE_OBJECT;
-			array[oi].node_present = (nam.nam$l_fnb & (NAM$M_NODE));
-			array[oi].str = tok;
-			memcpy (array[oi].dvi, nam.nam$t_dvi, NAM$C_DVI + 12);
-			array[oi + 1].type = ZRO_TYPE_COUNT;
-			si = oi + 2;
-			GETTOK;
-			if (toktyp == TK_SLASH)
-			{
-				GETTOK;
-				if (toktyp != TK_IDENT)
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZROSYNTAX, 2,
-							str->len, str->addr, ERR_QUALEXP);
-				if (tok.len == 3)
-				{
-					lower_to_upper (qual, tok.addr, 3);
-					if (!memcmp (qual, "SRC", 3))
-					{
-						if (file)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5) ERR_ZROSYNTAX, 2,
-									str->len, str->addr, ERR_NOLBRSRC);
-
-						GETTOK;
-						if (si >= ZRO_MAX_ENTS)
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7) ERR_ZROSYNTAX, 2,
-									str->len, str->addr, ERR_MAXARGCNT, 1, ZRO_MAX_ENTS);
-						if (toktyp == TK_COMMA || toktyp == TK_EOL)
-						{
-							array[oi + 1].count = 1;
-							array[si] = array[oi];
-							array[si].type = ZRO_TYPE_SOURCE;
-							si++;
-						} else if (toktyp == TK_EQUAL)
-						{
-							GETTOK;
-							if (toktyp != TK_LPAREN)
-							{
-								if (toktyp != TK_IDENT)
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
-											ERR_ZROSYNTAX, 2, str->len,
-										  	str->addr, ERR_FSEXP);
-								fab.fab$b_fns = tok.len;
-								fab.fab$l_fna = tok.addr;
-								status = sys$parse (&fab);
-								if (!(status & 1))
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9)
-										ERR_ZROSYNTAX, 2, str->len, str->addr,
-										ERR_FILEPARSE, 2, tok.len, tok.addr, status);
-								if (nam.nam$l_fnb & (NAM$M_EXP_NAME | NAM$M_EXP_TYPE
-										     | NAM$M_EXP_VER))
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8)
-										ERR_ZROSYNTAX, 2, str->len, str->addr,
-										ERR_DIRONLY, 2, tok.len, tok.addr);
-								if (nam.nam$l_fnb & (NAM$M_WILDCARD))
-									rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8)
-										ERR_ZROSYNTAX, 2, str->len, str->addr,
-										ERR_WILDCARD, 2, tok.len, tok.addr);
-								array[oi + 1].count = 1;
-								array[si].type = ZRO_TYPE_SOURCE;
-								array[si].node_present = (nam.nam$l_fnb & (NAM$M_NODE));
-								array[si].str = tok;
-								memcpy (array[si].dvi, nam.nam$t_dvi, NAM$C_DVI + 12);
-								si++;
-								GETTOK;
-							} else
-							{
-								array[oi + 1].count = 0;
-								for (;;)
-								{
-									GETTOK;
-									if (toktyp != TK_IDENT)
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
-											ERR_ZROSYNTAX, 2, str->len,
-											str->addr, ERR_FSEXP);
-									if (si >= ZRO_MAX_ENTS)
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(7)
-											ERR_ZROSYNTAX, 2, str->len,
-											str->addr,ERR_MAXARGCNT, 1, ZRO_MAX_ENTS);
-									fab.fab$b_fns = tok.len;
-									fab.fab$l_fna = tok.addr;
-									status = sys$parse (&fab);
-									if (!(status & 1))
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(9)
-											ERR_ZROSYNTAX, 2, str->len,
-											str->addr,ERR_FILEPARSE, 2, tok.len,
-											tok.addr, status);
-									if (nam.nam$l_fnb & (NAM$M_EXP_NAME | NAM$M_EXP_TYPE
-											     | NAM$M_EXP_VER))
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8)
-											ERR_ZROSYNTAX, 2, str->len, str->addr,
-											ERR_DIRONLY, 2, tok.len, tok.addr);
-									if (nam.nam$l_fnb & (NAM$M_WILDCARD))
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8)
-											ERR_ZROSYNTAX, 2, str->len, str->addr,
-											ERR_WILDCARD, 2, tok.len, tok.addr);
-									array[oi + 1].count++;
-									array[si].type = ZRO_TYPE_SOURCE;
-									array[si].node_present = (nam.nam$l_fnb & (NAM$M_NODE));
-									array[si].str = tok;
-									memcpy (array[si].dvi, nam.nam$t_dvi, NAM$C_DVI + 12);
-									si++;
-									GETTOK;
-									if (toktyp == TK_RPAREN)
-										break;
-									if (toktyp != TK_COMMA)
-										rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
-											ERR_ZROSYNTAX, 2, str->len, str->addr,
-											ERR_COMMAORRPAREXP);
-								}
-								GETTOK;
-							}
-						} else
-							rts_error_csa(CSA_ARG(NULL) VARLSTCNT(5)
-								ERR_ZROSYNTAX, 2, str->len, str->addr, ERR_QUALVAL);
-					} else
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZROSYNTAX, 2, str->len, str->addr,
-							  ERR_BADQUAL, 2, tok.len, tok.addr);
-				} else if (tok.len == 5)
-				{
-					lower_to_upper (qual, tok.addr, 5);
-					if (!memcmp (qual, "NOSRC", 5))
-					{
-						array[oi + 1].count = 0;
-						GETTOK;
-					} else
-						rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZROSYNTAX, 2, str->len, str->addr,
-							  ERR_BADQUAL, 2, tok.len, tok.addr);
-				} else
-					rts_error_csa(CSA_ARG(NULL) VARLSTCNT(8) ERR_ZROSYNTAX, 2, str->len, str->addr,
-						  ERR_BADQUAL, 2, tok.len, tok.addr);
-			} else if (toktyp == TK_COMMA || toktyp == TK_EOL)
-			{
-				if (!file)
-				{
-					array[oi + 1].count = 1;
-					array[si] = array[oi];
-					array[si].type = ZRO_TYPE_SOURCE;
-					si++;
-				} else
-					array[oi + 1].count = 0;
-			}
-			if (toktyp == TK_COMMA)
-				GETTOK;
-			else if (toktyp == TK_EOL)
-				break;
-			else
-				rts_error_csa(CSA_ARG(NULL) VARLSTCNT(4) ERR_ZROSYNTAX, 2, str->len, str->addr);
-			oi = si;
-		}
-	}
-	if (TREF(zro_root))
-		free (TREF(zro_root));
-	TREF(zro_root) = malloc(si * SIZEOF(zro_ent));
-	memcpy((uchar_ptr_t)TREF(zro_root), (uchar_ptr_t)array, si * SIZEOF(zro_ent));
-	REVERT;
-}
diff --git a/sr_vvms/zro_search.c b/sr_vvms/zro_search.c
deleted file mode 100644
index 3da3069..0000000
--- a/sr_vvms/zro_search.c
+++ /dev/null
@@ -1,163 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include <rms.h>
-
-#include "zroutines.h"
-#include "zl_olb.h"
-
-error_def	(ERR_ZFILENMTOOLONG);
-
-/* if NULL == objstr, do not search for object, else pointer to object file text string */
-/* objdir is NULL if objstr is NULL, otherwise, return pointer to associated object directory
-					*objdir is NULL if object directory is not found */
-/* srcstr is like objstr, except for associated source program */
-/* srcdir is like objdir, except for associated source program directory*/
-void zro_search(mstr *objstr, zro_ent **objdir, mstr *srcstr, zro_ent **srcdir)
-{
-	unsigned	obj_status, src_status;
-	uint4		librindx, status;
-	zro_ent		*op, *sp, *op_result, *sp_result;
-	struct FAB	objfab, srcfab;
-	struct NAM	objnam, srcnam;
-	unsigned char	objfn[255], srcfn[255];
-	unsigned char	objes[255], srces[255];
-	int		objcnt, srccnt, namidx;
-	mstr		obj_string;
-	DCL_THREADGBL_ACCESS;
-
-	SETUP_THREADGBL_ACCESS;
-	if (!TREF(zro_root))
-		zro_init();
-	assert(objstr || srcstr);	/* must search for object or source or both */
-	op_result = sp_result = NULL;
-	if (objstr)
-	{
-		assert(objdir);		/* if object text, then must have pointer for result */
-		objfab = cc$rms_fab;
-		objnam = cc$rms_nam;
-		objfab.fab$l_nam = &objnam;
-	}
-	if (srcstr)
-	{
-		assert(srcdir);		/* if source text, then must have pointer for result */
-		srcfab = cc$rms_fab;
-		srcnam = cc$rms_nam;
-		srcfab.fab$l_nam = &srcnam;
-	}
-	assert((TREF(zro_root))->type == ZRO_TYPE_COUNT);
-	objcnt = (TREF(zro_root))->count;
-	assert(objcnt);
-	for (op = TREF(zro_root) + 1; !op_result && !sp_result && objcnt-- > 0;)
-	{
-		assert(op->type == ZRO_TYPE_OBJECT || op->type == ZRO_TYPE_OBJLIB);
-		if (objstr)
-		{
-			if (op->type == ZRO_TYPE_OBJECT)
-			{
-				if (op->str.len > SIZEOF(objfn))
-					rts_error(VARLSTCNT(4) ERR_ZFILENMTOOLONG, 2, op->str.len, op->str.addr);
-				memcpy(objfn, op->str.addr, op->str.len);
-				namidx = op->str.len;
-				if (':' != objfn[namidx - 1] && ']' != objfn[namidx - 1]
-				       && '>' != objfn[namidx - 1])
-				    objfn[namidx++] = ':';
-				if (namidx + objstr->len > SIZEOF(objfn))
-					rts_error(VARLSTCNT(4) ERR_ZFILENMTOOLONG, 2, op->str.len, op->str.addr);
-				memcpy(&objfn[namidx], objstr->addr, objstr->len);
-				objfab.fab$l_fna = objfn;
-				objfab.fab$b_fns = namidx + objstr->len;
-				objnam.nam$l_esa = objes;
-				objnam.nam$b_ess = SIZEOF(objes);
-				obj_status = sys$parse(&objfab);
-				if (!(obj_status & 1))
-					rts_error(VARLSTCNT(2) obj_status, objfab.fab$l_stv);
-				objnam.nam$l_wcc = 0;
-				obj_status = sys$search(&objfab);
-				switch (obj_status)
-				{
-					case RMS$_NORMAL:
-						op_result = op;
-						break;
-					case RMS$_FNF:
-					case RMS$_NMF:
-						break;
-					default:
-						rts_error(VARLSTCNT(2) obj_status, objfab.fab$l_stv);
-				}
-			} else
-			{
-				obj_status = zl_olb(&op->str, objstr, &librindx);
-				status = lbr$close(&librindx);
-				if (!(status & 1))
-					rts_error(VARLSTCNT(1) status);
-				if (1 & obj_status)
-					op_result = op;
-			}
-		}
-		if (srcstr)
-		{
-			sp = op + 1;
-			assert(sp->type == ZRO_TYPE_COUNT);
-			srccnt = sp++->count;
-			for (;  !sp_result && srccnt-- > 0;  sp++)
-			{
-				assert(sp->type == ZRO_TYPE_SOURCE);
-				if (sp->str.len > SIZEOF(srcfn))
-					rts_error(VARLSTCNT(4) ERR_ZFILENMTOOLONG, 2, sp->str.len, sp->str.addr);
-      				memcpy(srcfn, sp->str.addr, sp->str.len);
-				namidx = sp->str.len;
-				if (':' != srcfn[namidx - 1] && ']' != srcfn[namidx - 1]
-				       && '>' != srcfn[namidx - 1])
-				    srcfn[namidx++] = ':';
-				if (namidx + srcstr->len > SIZEOF(srcfn))
-					rts_error(VARLSTCNT(4) ERR_ZFILENMTOOLONG, 2, sp->str.len, sp->str.addr);
-      				memcpy(&srcfn[namidx], srcstr->addr, srcstr->len);
-				srcfab.fab$l_fna = srcfn;
-				srcfab.fab$b_fns = namidx + srcstr->len;
-				srcnam.nam$l_esa = srces;
-				srcnam.nam$b_ess = SIZEOF(srces);
-				src_status = sys$parse(&srcfab);
-				if (!(src_status & 1))
-					rts_error(VARLSTCNT(2) src_status, srcfab.fab$l_stv);
-				srcnam.nam$l_wcc = 0;
-				src_status = sys$search(&srcfab);
-				switch (src_status)
-				{
-				case RMS$_NORMAL:
-					sp_result = sp;
-					op_result = op;
-					break;
-				case RMS$_FNF:
-				case RMS$_NMF:
-					break;
-				default:
-					rts_error(VARLSTCNT(2) src_status, srcfab.fab$l_stv);
-				}
-			}
-			op = sp;
-		} else
-		{
-			op++;
-			assert(op->type == ZRO_TYPE_COUNT);
-			op += op->count;
-			op++;
-		}
-	}
-	if (objdir)
-		*objdir = op_result;
-	if (srcdir)
-		*srcdir = sp_result;
-	return;
-}
diff --git a/sr_vvms/zroutinessp.h b/sr_vvms/zroutinessp.h
deleted file mode 100644
index 872d9fc..0000000
--- a/sr_vvms/zroutinessp.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2011 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef __ZROUTINESSP_H__
-#define __ZROUTINESSP_H__
-
-#include <nam.h>
-/*
- * CAUTION ----	It is assumed that dvi, fid and did are contiguous not
- *		only in the zro_ent structures but also in the RMS
- *		NAM structure.
- */
-
-typedef	struct zro_ent_type
-{
-	uint4		type;
-	uint4		count;
-	boolean_t	node_present;
-	mstr		str;
-	char		dvi[NAM$C_DVI];
-	unsigned short	fid[3];
-	unsigned short	did[3];
-} zro_ent;
-
-#define MAX_FILE_OPEN_TRIES	20
-#define WAIT_FOR_FILE_TIME	100	/* msec */
-
-void zro_gettok(unsigned char **lp, unsigned char *top, unsigned *toktyp, mstr *tok);
-void zro_search (mstr *objstr, zro_ent **objdir, mstr *srcstr, zro_ent **srcdir);
-
-#endif
diff --git a/sr_vvms/zshow_devices.c b/sr_vvms/zshow_devices.c
deleted file mode 100644
index 0a7ee2d..0000000
--- a/sr_vvms/zshow_devices.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "gtm_string.h"
-#include "gtm_socket.h"
-#include "gtm_inet.h"
-
-#include <iodef.h>
-#include <rms.h>
-#include <trmdef.h>
-#include <ttdef.h>
-#include <tt2def.h>
-
-#include "io.h"
-#include "iottdef.h"
-#include "iombdef.h"
-#include "iomtdef.h"
-#include "iormdef.h"
-#include "gt_timer.h"
-#include "iosocketdef.h"
-#include "nametabtyp.h"
-#include "mlkdef.h"
-#include "zshow.h"
-#include "zshow_params.h"
-#include "mvalconv.h"
-
-GBLREF boolean_t	ctrlc_on;
-GBLREF io_log_name	*io_root_log_name;
-GBLREF io_pair		*io_std_device;
-
-LITREF nametabent dev_param_names[];
-LITREF uint4 dev_param_index[];
-LITREF zshow_index zshow_param_index[];
-
-static readonly char space_text[] = {' '};
-
-typedef struct
-{
-	unsigned short mem;
-	unsigned short grp;
-} uic_struct;
-
-#define ZS_ONE_OUT(V, TEXT) ((V)->str.len = 1, (V)->str.addr = (TEXT), zshow_output(output, &(V)->str))
-#define ZS_STR_OUT(V, TEXT) ((V)->str.len = SIZEOF((TEXT)) - 1, (V)->str.addr = (TEXT), zshow_output(output, &(V)->str))
-#define ZS_PARM_SP(V, TEXT) ((V)->str.len = dev_param_names[dev_param_index[zshow_param_index[(TEXT)].letter] + \
-			zshow_param_index[(TEXT)].offset ].len, \
-			(V)->str.addr = dev_param_names[dev_param_index[zshow_param_index[(TEXT)].letter] + \
-			zshow_param_index[(TEXT)].offset ].name, zshow_output(output, &(V)->str), ZS_ONE_OUT((V), space_text))
-#define ZS_PARM_EQU(V, TEXT) ((V)->str.len = dev_param_names[dev_param_index[zshow_param_index[(TEXT)].letter] + \
-			zshow_param_index[(TEXT)].offset ].len, \
-			(V)->str.addr = dev_param_names[dev_param_index[zshow_param_index[(TEXT)].letter] + \
-			zshow_param_index[(TEXT)].offset ].name, zshow_output(output, &(V)->str), ZS_ONE_OUT((V), equal_text))
-
-void zshow_devices(zshow_out *output)
-{
-	static readonly char filchar_text[] = "CHARACTERS";
-	static readonly char filesc_text[] = "ESCAPES";
-	static readonly char terminal_text[] = "TERMINAL ";
-	static readonly char magtape_text[] =  "MAGTAPE ";
-	static readonly char rmsfile_text[] =  "RMS ";
-	static readonly char mailbox_text[] =  "MAILBOX ";
-	static readonly char dollarc_text[] = "$C(";
-	static readonly char equal_text[] = {'='};
-	static readonly char comma_text[] = {','};
-	static readonly char quote_text[] = {'"'};
-	static readonly char lparen_text[] = {'('};
-	static readonly char rparen_text[] = {')'};
-	static readonly char devop[] = "OPEN ";
-	static readonly char devcl[] = "CLOSED ";
-	static readonly char largerecord[] = "BIGRECORD ";
-	static readonly char rfm_tab[][7] = {"UDF   ", "FIXED ", "VAR   ", "VFC   ", "STM   ", "STMLF ", "STMCR "};
-	bool		first;
-	int4		i, j, ii, jj;
-	io_log_name	*l;		/* logical name pointer		*/
-	mval		v;
-	mval		m;
-	struct FAB	*f;
-	struct RAB	*r;
-	d_mb_struct	*mb_ptr;
-	d_mt_struct	*mt_ptr;
-	d_rm_struct	*rm_ptr;
-	d_tt_struct	*tt_ptr;
-	d_socket_struct	*dsocketptr;
-	socket_struct	*socketptr;
-	io_termmask	*mask_out;
-	unsigned char	delim_buff_sm[MAX_DELIM_LEN];
-	unsigned short	delim_len_sm;
-	char		delim_mstr_buff[(MAX_DELIM_LEN * MAX_ZWR_EXP_RATIO) + 11];
-	mstr		delim;
-	int		delim_len;
-	static readonly char space8_text[] = "        "; 	/* starting from here, for gtmsocket only */
-	static readonly char lb_text[] = {'['};
-	static readonly char rb_text[] = {']'};
-	static readonly char at_text[] = {'@'};
-	static readonly char delimiter_text[] = "DELIMITER ";
-	static readonly char nodelimiter_text[] = "NODELIMITER ";
-	static readonly char local_text[] = "LOCAL=";
-	static readonly char remote_text[] = "REMOTE=";
-	static readonly char total_text[] = "TOTAL=";
-	static readonly char current_text[] = "CURRENT=";
-	static readonly char passive_text[] = "PASSIVE ";
-	static readonly char active_text[] = "ACTIVE ";
-	static readonly char socket_text[] = "SOCKET";
-	static readonly char descriptor_text[] = "DESC=";
-	static readonly char trap_text[] = "TRAP ";
-	static readonly char notrap_text[] = "NOTRAP ";
-	static readonly char zdelay_text[] = "ZDELAY ";
-	static readonly char znodelay_text[] = "ZNODELAY ";
-	static readonly char zbfsize_text[] = "ZBFSIZE=";
-	static readonly char zibfsize_text[] = "ZIBFSIZE=";
-	static readonly char port_text[] = "PORT=";
-	static readonly char zsh_socket_state[][10] =
-					{	"CONNECTED"
-						,"LISTENING"
-						,"BOUND"
-						,"CREATED"
-					};
-	static readonly	char morereadtime_text[] = "MOREREADTIME=";
-	struct XABPRO	*xabpro;
-	uic_struct	uic;
-
-	v.mvtype = MV_STR;
-	for (l = io_root_log_name;  l != 0;  l = l->next)
-	{
-		if (l->dollar_io[0] != IO_ESC && l->iod->trans_name == l)
-		{
-			v.str.addr = &l->dollar_io[0];
-			v.str.len = l->len;
-			zshow_output(output, &v.str);
-			ZS_ONE_OUT(&v, space_text);
-			if (l->iod->state == dev_open)
-			{
-				ZS_STR_OUT(&v, devop);
-				switch(l->iod->type)
-				{
-				case tt:
-					ZS_STR_OUT(&v, terminal_text);
-					tt_ptr = (d_tt_struct *)l->iod->dev_sp;
-					if (!ctrlc_on && io_std_device->out == l->iod) /* and standard input */
-						ZS_PARM_SP(&v, zshow_nocene);
-					if ((int4)(tt_ptr->item_list[0].addr) & TRM$M_TM_CVTLOW)
-						ZS_PARM_SP(&v, zshow_conv);
-					if (tt_ptr->enbld_outofbands.mask)
-					{
-						ZS_PARM_EQU(&v, zshow_ctra);
-						ZS_STR_OUT(&v, dollarc_text);
-						first = TRUE;
-						for (i = 1, j = 0;  j < 32;  j++, i = i * 2)
-						{
-							if (i & tt_ptr->enbld_outofbands.mask)
-							{
-								if (!first)
-									ZS_ONE_OUT(&v, comma_text);
-								else
-									first = FALSE;
-								MV_FORCE_MVAL(&m, j);
-								mval_write(output, &m, FALSE);
-							}
-						}
-						ZS_ONE_OUT(&v, rparen_text);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if ((int4)(tt_ptr->term_char) & TT$M_NOECHO)
-						ZS_PARM_SP(&v, zshow_noecho);
-					if ((int4)(tt_ptr->ext_cap) & TT2$M_EDITING)
-						ZS_PARM_SP(&v, zshow_edit);
-					else
-						ZS_PARM_SP(&v, zshow_noedit);
-					if (!((int4)(tt_ptr->term_char) & TT$M_ESCAPE))
-						ZS_PARM_SP(&v, zshow_noesca);
-					if (tt_ptr->in_buf_sz != TTDEF_BUF_SZ)
-					{
-						ZS_PARM_EQU(&v, zshow_field);
-						MV_FORCE_MVAL(&m, tt_ptr->in_buf_sz);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if (tt_ptr->term_char & TT$M_HOSTSYNC)
-						ZS_PARM_SP(&v, zshow_host);
-					else
-						ZS_PARM_SP(&v, zshow_nohost);
-					if (tt_ptr->ext_cap & TT2$M_INSERT)
-						ZS_PARM_SP(&v, zshow_inse);
-					else
-						ZS_PARM_SP(&v, zshow_noinse);
-					if (tt_ptr->ext_cap & TT2$M_PASTHRU)
-						ZS_PARM_SP(&v, zshow_past);
-					else
-						ZS_PARM_SP(&v, zshow_nopast);
-					if (tt_ptr->term_char & TT$M_READSYNC)
-						ZS_PARM_SP(&v, zshow_reads);
-					else
-						ZS_PARM_SP(&v, zshow_noreads);
-					if (tt_ptr->term_char & TT$M_TTSYNC)
-						ZS_PARM_SP(&v, zshow_ttsy);
-					else
-						ZS_PARM_SP(&v, zshow_nottsy);
-					if (tt_ptr->term_char & TT$M_NOTYPEAHD)
-						ZS_PARM_SP(&v, zshow_notype);
-					else
-						ZS_PARM_SP(&v, zshow_type);
-					if (!l->iod->wrap)
-						ZS_PARM_SP(&v, zshow_nowrap);
-					mask_out = tt_ptr->item_list[2].addr;
-					if (mask_out->mask[0] != TERM_MSK)
-					{
-						ZS_PARM_EQU(&v, zshow_term);
-						ZS_STR_OUT(&v, dollarc_text);
-						first = TRUE;
-						for (i = 0;  i < 8;  i++)
-						{
-							for (j = 0;  j < 32;  j++)
-								if (mask_out->mask[i] & (1 << j))
-								{
-									if (!first)
-										ZS_ONE_OUT(&v, comma_text);
-									else
-										first = FALSE;
-									MV_FORCE_MVAL(&m, i * 32 + j);
-									mval_write(output, &m, FALSE);
-								}
-						}
-						ZS_ONE_OUT(&v, rparen_text);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					ZS_PARM_EQU(&v, zshow_width);
-					MV_FORCE_MVAL(&m, l->iod->width);
-					mval_write(output, &m, FALSE);
-					ZS_ONE_OUT(&v, space_text);
-					ZS_PARM_EQU(&v, zshow_leng);
-					MV_FORCE_MVAL(&m, l->iod->pair.out->length);
-					mval_write(output, &m, FALSE);
-					ZS_ONE_OUT(&v, space_text);
-					if (l->iod->write_filter)
-					{
-						bool twoparms = FALSE;
-
-						ZS_PARM_EQU(&v, zshow_fil);
-						if (l->iod->write_filter & CHAR_FILTER)
-						{
-							if (l->iod->write_filter & ESC1)
-							{
-								twoparms = TRUE;
-								ZS_ONE_OUT(&v, lparen_text);
-							}
-							ZS_STR_OUT(&v, filchar_text);
-							if (twoparms)
-							{
-								ZS_ONE_OUT(&v, comma_text);
-								ZS_ONE_OUT(&v, space_text);
-							}
-						}
-						if (l->iod->write_filter & ESC1)
-							ZS_STR_OUT(&v, filesc_text);
-						if (twoparms)
-							ZS_ONE_OUT(&v, rparen_text);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					break;
-				case mt:
-					ZS_STR_OUT(&v, magtape_text);
-					mt_ptr = (d_tt_struct *)l->iod->dev_sp;
-					if (mt_ptr->block_sz != MTDEF_BUF_SZ)
-					{
-						ZS_PARM_EQU(&v, zshow_bloc);
-						MV_FORCE_MVAL(&m, mt_ptr->block_sz);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if (mt_ptr->record_sz != MTDEF_REC_SZ)
-					{
-						ZS_PARM_EQU(&v, zshow_rec);
-						MV_FORCE_MVAL(&m, mt_ptr->record_sz);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if (mt_ptr->read_only)
-						ZS_PARM_SP(&v, zshow_read);
-					if (mt_ptr->ebcdic)
-						ZS_PARM_SP(&v, zshow_ebcd);
-					if (mt_ptr->fixed)
-						ZS_PARM_SP(&v, zshow_fixed);
-					if (mt_ptr->read_mask & IO$M_DATACHECK)
-						ZS_PARM_SP(&v, zshow_rchk);
-					if (mt_ptr->write_mask & IO$M_DATACHECK)
-						ZS_PARM_SP(&v, zshow_wchk);
-					if (!l->iod->wrap)
-						ZS_PARM_SP(&v, zshow_nowrap);
-					break;
-				case rm:
-					ZS_STR_OUT(&v, rmsfile_text);
-					rm_ptr = (d_rm_struct *)l->iod->dev_sp;
-					f = &rm_ptr->f;
-					r = &rm_ptr->r;
-					if (r->rab$l_rop & RAB$M_CVT)
-						ZS_PARM_SP(&v, zshow_conv);
-					if (f->fab$l_alq != 0)
-					{
-						ZS_PARM_EQU(&v, zshow_allo);
-						MV_FORCE_MVAL(&m, f->fab$l_alq);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if (f->fab$l_fop & FAB$M_DLT)
-						ZS_PARM_SP(&v, zshow_dele);
-					if (f->fab$w_deq != 0)
-					{
-						ZS_PARM_EQU(&v, zshow_exte);
-						MV_FORCE_MVAL(&m, f->fab$w_deq);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					assert(FAB$C_MAXRFM == (SIZEOF(rfm_tab)/SIZEOF(rfm_tab[0]) - 1));
-					if (FAB$C_MAXRFM >= rm_ptr->b_rfm && FAB$C_RFM_DFLT != rm_ptr->b_rfm)
-						ZS_STR_OUT(&v, rfm_tab[rm_ptr->b_rfm]);
-					if (rm_ptr->largerecord)
-						ZS_STR_OUT(&v, largerecord);
-					if (f->fab$b_fac == FAB$M_GET)
-						ZS_PARM_SP(&v, zshow_read);
-					if (rm_ptr->l_mrs != DEF_RM_WIDTH)
-					{
-						ZS_PARM_EQU(&v, zshow_rec);
-						MV_FORCE_MVAL(&m, rm_ptr->l_mrs);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-/* smw should we add width aka usz */
-					if (f->fab$b_shr & FAB$M_SHRGET)
-						ZS_PARM_SP(&v, zshow_shar);
-	/*
-					if (f->fab$l_fop & FAB$M_SPL)
-						ZS_PARM_SP(&v, zshow_spo);
-					if (f->fab$l_fop & FAB$M_SCF)
-						ZS_PARM_SP(&v, zshow_sub);
-	*/
-					if (!l->iod->wrap)
-						ZS_PARM_SP(&v, zshow_nowrap);
-					if (f->fab$l_xab)
-					{
-/* smw need to handle other XABs and uic as octal */
-						ZS_PARM_EQU(&v, zshow_uic);
-						ZS_ONE_OUT(&v, quote_text);
-						xabpro = f->fab$l_xab;
-						memcpy(&uic, &xabpro->xab$l_uic, SIZEOF(int4));
-						MV_FORCE_MVAL(&m, uic.grp);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, comma_text);
-						MV_FORCE_MVAL(&m, uic.mem);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, quote_text);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					break;
-				case mb:
-					ZS_STR_OUT(&v, mailbox_text);
-					mb_ptr = (d_mb_struct *)l->iod->dev_sp;
-					if (!(mb_ptr->write_mask & IO$M_NOW))
-						ZS_PARM_SP(&v, zshow_wait);
-					if (mb_ptr->prmflg)
-						ZS_PARM_SP(&v, zshow_prmmbx);
-					if (mb_ptr->maxmsg != DEF_MB_MAXMSG)
-					{
-						ZS_PARM_EQU(&v, zshow_bloc);
-						MV_FORCE_MVAL(&m, mb_ptr->maxmsg);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if (mb_ptr->promsk & IO_RD_ONLY)
-						ZS_PARM_SP(&v, zshow_read);
-					if (mb_ptr->del_on_close)
-						ZS_PARM_SP(&v, zshow_dele);
-					if (mb_ptr->promsk & IO_SEQ_WRT)
-						ZS_PARM_SP(&v, zshow_write);
-					if (l->iod->width != DEF_MB_MAXMSG)
-					{
-						ZS_PARM_EQU(&v, zshow_width);
-						MV_FORCE_MVAL(&m, l->iod->width);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					if (!l->iod->wrap)
-						ZS_PARM_SP(&v, zshow_nowrap);
-					if (l->iod->length != DEF_MB_LENGTH)
-					{
-						ZS_PARM_EQU(&v, zshow_leng);
-						MV_FORCE_MVAL(&m, l->iod->length);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-					}
-					break;
-				case gtmsocket:
-					delim.addr = delim_mstr_buff;
-					delim_len = 0;
-					ZS_STR_OUT(&v, socket_text);
-					dsocketptr = (d_socket_struct *)l->iod->dev_sp;
-					ZS_ONE_OUT(&v, space_text);
-					ZS_STR_OUT(&v, total_text);
-					MV_FORCE_MVAL(&m, (int)dsocketptr->n_socket);
-					mval_write(output, &m, FALSE);
-					ZS_ONE_OUT(&v, space_text);
-					ZS_STR_OUT(&v, current_text);
-					MV_FORCE_MVAL(&m, (int)dsocketptr->current_socket);
-					mval_write(output, &m, FALSE);
-					output->flush = TRUE;
-					zshow_output(output, 0);
-					for(ii = 0; ii < dsocketptr->n_socket; ii++)
-					{
-						/* output each socket */
-						socketptr = dsocketptr->socket[ii];
-						ZS_STR_OUT(&v, space8_text);
-		/* socket handle */		ZS_STR_OUT(&v, socket_text);
-						ZS_ONE_OUT(&v, lb_text);
-						MV_FORCE_MVAL(&m, ii);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, rb_text);
-						ZS_ONE_OUT(&v, equal_text);
-						v.str.addr = socketptr->handle;
-						v.str.len = socketptr->handle_len;
-						zshow_output(output, &v.str);
-						ZS_ONE_OUT(&v, space_text);
-		/* socket descriptor */		ZS_STR_OUT(&v, descriptor_text);
-						MV_FORCE_MVAL(&m, socketptr->sd);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-		/* socket state */		ZS_STR_OUT(&v, zsh_socket_state[socketptr->state]);
-						ZS_ONE_OUT(&v, space_text);
-		/* socket type */		if (socketptr->passive)
-						{
-							ZS_STR_OUT(&v, passive_text);
-						} else
-						{
-							ZS_STR_OUT(&v, active_text);
-						}
-						ZS_ONE_OUT(&v, space_text);
-		/* error trapping */		if (socketptr->ioerror)
-						{
-							ZS_STR_OUT(&v, trap_text);
-						} else
-						{
-							ZS_STR_OUT(&v, notrap_text);
-						}
-						ZS_ONE_OUT(&v, space_text);
-		/* address + port */		if (socketptr->passive)
-						{
-							ZS_STR_OUT(&v, port_text);
-							MV_FORCE_MVAL(&m, (int)socketptr->local.port);
-							mval_write(output, &m, FALSE);
-						} else
-						{
-							ZS_STR_OUT(&v, remote_text);
-							if (NULL != socketptr->remote.saddr_ip)
-							{
-								v.str.addr = socketptr->remote.saddr_ip;
-								v.str.len = strlen(socketptr->remote.saddr_ip);
-							} else
-							{
-								v.str.addr = "";
-								v.str.len = 0;
-							}
-							zshow_output(output, &v.str);
-							ZS_ONE_OUT(&v, at_text);
-							MV_FORCE_MVAL(&m, (int)socketptr->remote.port);
-							mval_write(output, &m, FALSE);
-							ZS_ONE_OUT(&v, space_text);
-							/* to be added later ...
-								ZS_STR_OUT(&v, local_text);
-								v.str.addr = socketptr->local.saddr_ip;
-								v.str.len = strlen(socketptr->local.saddr_ip);
-								zshow_output(output, &v.str);
-								ZS_ONE_OUT(&v, at_text);
-								MV_FORCE_MVAL(&m, (int)socketptr->local.port);
-								mval_write(output, &m, FALSE);
-							*/
-						}
-						ZS_ONE_OUT(&v, space_text);
-						output->flush = TRUE;
-						zshow_output(output, 0);
-						ZS_STR_OUT(&v, space8_text);
-						ZS_STR_OUT(&v, space8_text);
-		/* zdelay */			if (socketptr->nodelay)
-						{
-							ZS_STR_OUT(&v, znodelay_text);
-						} else
-						{
-							ZS_STR_OUT(&v, zdelay_text);
-						}
-						ZS_ONE_OUT(&v, space_text);
-		/* zbfsize */			ZS_STR_OUT(&v, zbfsize_text);
-						MV_FORCE_MVAL(&m, socketptr->buffer_size);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-		/* izbfsize */			ZS_STR_OUT(&v, zibfsize_text);
-						MV_FORCE_MVAL(&m, socketptr->bufsiz);
-						mval_write(output, &m, FALSE);
-						ZS_ONE_OUT(&v, space_text);
-		/* delimiters */		if (socketptr->n_delimiter > 0)
-						{
-							output->flush = TRUE;
-							zshow_output(output, 0);
-							ZS_STR_OUT(&v, space8_text);
-							ZS_STR_OUT(&v, space8_text);
-							ZS_STR_OUT(&v, delimiter_text);
-							for (jj = 0; jj < socketptr->n_delimiter; jj++)
-							{
-								delim_len_sm = socketptr->delimiter[jj].len;
-								memcpy(delim_buff_sm, socketptr->delimiter[jj].addr, delim_len_sm);
-								format2zwr(delim_buff_sm, delim_len_sm, (uchar_ptr_t)delim.addr,
-									&delim_len);
-								delim.len = (unsigned short) delim_len;
-								assert(SIZEOF(delim_mstr_buff) >= delim_len);
-								zshow_output(output, &delim);
-								ZS_ONE_OUT(&v, space_text);
-							}
-						} else
-						{
-							ZS_STR_OUT(&v, nodelimiter_text);
-						}
-		/* readmoretime */		if (DEFAULT_MOREREAD_TIMEOUT != socketptr->moreread_timeout)
-						{
-							ZS_STR_OUT(&v, morereadtime_text);
-							MV_FORCE_MVAL(&m, socketptr->moreread_timeout);
-							mval_write(output, &m, FALSE);
-						}
-						output->flush = TRUE;
-						zshow_output(output, 0);
-					}
-				default:
-					v.str.len = 0;
-					break;
-				}
-				if (l->iod->error_handler.len)
-				{
-					ZS_PARM_EQU(&v, zshow_exce);
-					ZS_ONE_OUT(&v, quote_text);
-					v.str = l->iod->error_handler;
-					zshow_output(output, &v.str);
-					output->flush = TRUE;
-					ZS_ONE_OUT(&v, quote_text);
-				} else
-				{
-					output->flush = TRUE;
-					zshow_output(output, 0);
-				}
-			}
-			else
-			{
-				output->flush = TRUE;
-				ZS_STR_OUT(&v, devcl);
-			}
-		}
-	}
-}
diff --git a/sr_vvms/zshow_zcalls.c b/sr_vvms/zshow_zcalls.c
deleted file mode 100644
index edaf775..0000000
--- a/sr_vvms/zshow_zcalls.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2001 Sanchez Computer Associates, Inc.	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#include "mdef.h"
-
-#include <descrip.h>
-
-#include "mlkdef.h"
-#include "zshow.h"
-#include "zcall.h"
-
-GBLREF zctabrtn *zctab, *zctab_end;
-GBLREF zcpackage *zcpack_start, *zcpack_end;
-
-/********************************************************************
- * the package and routine data structures are as follows:
- * zcpackage structure points to the
- *      name of each package.
- *  and begin, and endpoints of the routines in the package.
- *
- *    +-------------|----------|---------------------+
- * zcpack_start   zcpack ... zcpack...		zcpack_end
- *
- * zctabrtn structure points to the routines
- *
- * zctab        (...routines...)		zctab_end
- * +---------------------------------------------+
- *
- *		 sample
- *		 zctab:	 --routine--	|There might be routines that do
- *			 --routine--	|not belong to a package
- *	zcpack1->begin:	 --routine--
- *			 --routine--
- *	  zcpack1->end:	 --routine--	|Other routines that do not
- *			 --routine--	|belong to a package
- *	zcpack2->begin:	 --routine--
- *			 --routine--
- *zctab_end:zcpack2->end:--routine--
- *
- *
- ********************************************************************/
-static readonly char period[] = ".";
-void zshow_zcalls(zshow_out *output)
-{
-	mval			decpt_mv,pack_mv,rtn_mv;
-	zctabrtn		*zcrtn;
-	zcpackage		*zcpack;
-	error_def(ERR_ZCALLTABLE);
-
-	decpt_mv.mvtype = pack_mv.mvtype = rtn_mv.mvtype = MV_STR;
-	decpt_mv.str.len = 1;
-	decpt_mv.str.addr = .
-	pack_mv.str.len = 0;
-	zcrtn = zctab;
-	zcpack = zcpack_start;
-	while (zcrtn < zctab_end)
-	{
-		if (0 == zcrtn->callnamelen)
-			rts_error(VARLSTCNT(1) ERR_ZCALLTABLE);
-		if (zcpack < zcpack_end)
-		{
-			if (zcpack->end <= zcrtn)
-			{
-				zcpack++;
-				pack_mv.str.len = 0;
-			}
-			if ((0 == pack_mv.str.len) && (zcpack->begin <= zcrtn))
-			{
-				pack_mv.str.addr = zcpack->packname + 1;
-				pack_mv.str.len = *zcpack->packname;
-			}
-		}
-		rtn_mv.str.addr = &zcrtn->callname;
-		rtn_mv.str.len = zcrtn->callnamelen;
-		if (pack_mv.str.len)
-		{
-			zshow_output(output,&pack_mv.str);
-			zshow_output(output,&decpt_mv.str);
-		}
-		output->flush = TRUE;
-		zshow_output(output,&rtn_mv.str);
-		zcrtn = (zctabrtn *)((char *)zcrtn + zcrtn->entry_length);
-	}
-	return;
-}
diff --git a/sr_x86_64/aswp.s b/sr_x86_64/aswp.s
index 1b25c00..9349103 100644
--- a/sr_x86_64/aswp.s
+++ b/sr_x86_64/aswp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,15 +10,16 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	aswp.s
-	.sbttl	aswp
-.include "g_msf.si"
-.include "linkage.si"
+	.include "g_msf.si"
+	.include "linkage.si"
 
 	.text
-ENTRY aswp
-	movl REG32_ARG1, REG32_RET0
+#
+# Note since this routine makes no calls, stack alignment is not critical. If ever a call is added then this
+# routine should take care to align the stack to 16 bytes and add a CHKSTKALIGN macro.
+#
+ENTRY	aswp
+	movl	REG32_ARG1, REG32_RET0
 	lock
-	xchg	(REG64_ARG0),REG32_RET0		# return original value
+	xchg	(REG64_ARG0),REG32_RET0		# Return original value
 	ret
diff --git a/sr_x86_64/auto_zlink_sp.c b/sr_x86_64/auto_zlink_sp.c
deleted file mode 100644
index b622278..0000000
--- a/sr_x86_64/auto_zlink_sp.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************
- *                                                              *
- *      Copyright 2008, 2014 Fidelity Information Services, Inc *
- *                                                              *
- *      This source code contains the intellectual property     *
- *      of its copyright holder(s), and is made available       *
- *      under a license.  If you do not know the terms of       *
- *      the license, please stop and do not read further.       *
- *                                                              *
- ****************************************************************/
-
-#include "mdef.h"
-
-#include "opcode.h"
-#include <mdefsp.h>
-#include "x86_64.h"
-#include <auto_zlink_sp.h>
-#include "i386.h"
-
-GBLREF int4	rtnhdr_off, labaddr_off;
-
-union
-{
-	ModR_M	modrm;
-	unsigned char	byte;
-} modrm_byte_byte, modrm_byte_long, modrm_byte_actual;
-
-
-short opcode_correct(unsigned char *curr_pc, short opcode, short reg_opcode, short is_rm, short r_m)
-{
-	if (*(curr_pc - MOD_BYTE_SZ) == opcode)
-        {
-		modrm_byte_actual.byte = *(curr_pc - MOD_BYTE_SZ + 1);
-		if ((modrm_byte_actual.modrm.reg_opcode == reg_opcode) && (modrm_byte_actual.modrm.mod == I386_MOD32_BASE_DISP_8))
-		{
-			if ((is_rm) && (modrm_byte_actual.modrm.r_m == r_m))
-				return MOD_BYTE_SZ;
-			else if (!is_rm)
-				return MOD_BYTE_SZ;
-			else
-				return FALSE;
-		}
-	} else if (*(curr_pc - MOD_LONG_SZ) == opcode)
-	{
-		modrm_byte_actual.byte = *(curr_pc - MOD_LONG_SZ + 1);
-		if ((modrm_byte_actual.modrm.reg_opcode == reg_opcode) && (modrm_byte_actual.modrm.mod == I386_MOD32_BASE_DISP_32))
-		{
-			if (is_rm && (modrm_byte_actual.modrm.r_m == r_m))
-				return MOD_LONG_SZ;
-			else if (!is_rm)
-				return MOD_LONG_SZ;
-			else
-				return FALSE;
-		}
-	} else if (*(curr_pc - MOD_NONE_SZ) == opcode)
-	{
-		modrm_byte_actual.byte = *(curr_pc - MOD_NONE_SZ + 1);
-		if ((modrm_byte_actual.modrm.reg_opcode == reg_opcode) && (modrm_byte_actual.modrm.mod == I386_MOD32_BASE))
-		{
-			if (is_rm && modrm_byte_actual.modrm.r_m == r_m)
-				return MOD_NONE_SZ;
-			else if (!is_rm)
-				return MOD_NONE_SZ;
-			else
-				return FALSE;
-		}
-	}
-	return FALSE;
-}
-
-
-short valid_calling_sequence(mach_inst *pc)
-{
-	short curr_offset = 0, inst_sz;
-
-	modrm_byte_byte.modrm.reg_opcode = I386_INS_CALL_Ev;
-	modrm_byte_byte.modrm.mod = I386_MOD32_BASE_DISP_8;
-	modrm_byte_byte.modrm.r_m = GTM_REG_XFER_TABLE;
-
-	modrm_byte_long.modrm.reg_opcode = I386_INS_CALL_Ev;
-	modrm_byte_long.modrm.mod = I386_MOD32_BASE_DISP_32;
-	modrm_byte_long.modrm.r_m = GTM_REG_XFER_TABLE;
-
-			/*	 inst = call off(%reg_xfer) 	*/
-	if (curr_offset += opcode_correct((unsigned char*)pc, I386_INS_Grp5_Prefix, I386_INS_CALL_Ev, TRUE, GTM_REG_XFER_TABLE))
-	{
-			/* 	inst is :: mov R0 = MEM 	*/
-		inst_sz = 1 + opcode_correct(((unsigned char*)pc) - curr_offset, I386_INS_MOV_Gv_Ev, I386_REG_RDI, TRUE,
-					     GTM_REG_PV & 0x7);
-		switch(inst_sz - 1)
-		{
-			case FALSE :
-				return FALSE;
-			case MOD_NONE_SZ :
-				rtnhdr_off = 0;
-				break;
-			case MOD_BYTE_SZ :
-				rtnhdr_off = (int4) *((char *)pc - curr_offset - 1);
-				break;
-			case MOD_LONG_SZ :
-				rtnhdr_off = (int4) *((int4 *)(pc - curr_offset - 4));
-				break;
-			default :
-				assertpro(FALSE && (inst_sz - 1));
-		}
-		curr_offset += inst_sz;
-		/* if invalid, would've returned before... */
-			/*	inst is :: mov R1 = MEM		*/
-		inst_sz = 1 + opcode_correct(((unsigned char*)pc) - curr_offset, I386_INS_MOV_Gv_Ev, I386_REG_RSI, TRUE,
-					     GTM_REG_PV & 0x7);
-		switch(inst_sz - 1)
-		{
-			case FALSE :
-				return FALSE;
-			case MOD_NONE_SZ :
-				labaddr_off = 0;
-				break;
-			case MOD_BYTE_SZ :
-				labaddr_off = (int4) *((char *)pc - curr_offset - 1);
-				break;
-			case MOD_LONG_SZ :
-				labaddr_off = (int4) *((int4 *)(pc - curr_offset - 4));
-				break;
-			default :
-				assertpro(FALSE && (inst_sz - 1));
-		}
-		return TRUE;
-	}
-	return FALSE;
-}
diff --git a/sr_x86_64/auto_zlink_sp.h b/sr_x86_64/auto_zlink_sp.h
deleted file mode 100644
index 99da65b..0000000
--- a/sr_x86_64/auto_zlink_sp.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- *								*
- *	Copyright 2007, 2014 Fidelity Information Services, Inc	*
- *								*
- *	This source code contains the intellectual property	*
- *	of its copyright holder(s), and is made available	*
- *	under a license.  If you do not know the terms of	*
- *	the license, please stop and do not read further.	*
- *								*
- ****************************************************************/
-
-#ifndef AUTO_ZLINK_SP_INCLUDED
-#define AUTO_ZLINK_SP_INCLUDED
-
-#define XFER_BYTE_SZ    3
-#define XFER_LONG_SZ    6
-#define MOV_SZ    7
-#define MOD_NONE_SZ 	2
-#define MOD_BYTE_SZ	3
-#define MOD_LONG_SZ	6
-
-short opcode_correct(unsigned char *curr_pc, short opcode, short reg_opcode, short is_rm, short r_m);
-short valid_calling_sequence(mach_inst *pc);
-
-#define VALID_CALLING_SEQUENCE(pc) 	valid_calling_sequence(pc)
-#define RTNHDR_PV_OFF(pc)	rtnhdr_off
-#define LABADDR_PV_OFF(pc)	labaddr_off
-
-#endif /* AUTO_ZLINK_SP_INCLUDED */
diff --git a/sr_x86_64/call_dm.s b/sr_x86_64/call_dm.s
index 37133f7..145769e 100644
--- a/sr_x86_64/call_dm.s
+++ b/sr_x86_64/call_dm.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,22 +10,22 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	call_dm.s
-	.sbttl	call_dm
-.include "g_msf.si"
-.include "linkage.si"
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 
-	.DATA
 	.text
-.extern	op_oldvar
-.extern	opp_dmode
+	.extern	op_oldvar
+	.extern	opp_dmode
 
-# PUBLIC	call_dm
-# call_dm	PROC
-ENTRY call_dm
-l1:	call	opp_dmode
+#
+# Note call_dm is only ever branched to so does not have a return address pushed on the stack throwing off the
+# needed 16 byte alignment of the stack. Verify that first thing on each iteration.
+#
+ENTRY	call_dm
+newcmd:
+	CHKSTKALIGN			# Verify stack alignment
+	call	opp_dmode
 	call	op_oldvar
-	jmp	l1
-	ret
-# END
+	jmp	newcmd
+
diff --git a/sr_x86_64/ci_restart.s b/sr_x86_64/ci_restart.s
index 8c7f99b..205b0f2 100644
--- a/sr_x86_64/ci_restart.s
+++ b/sr_x86_64/ci_restart.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,39 +10,37 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	ci_restart.s
-	.sbttl	ci_restart
-#	.386
-#	.MODEL	FLAT, C
-.include "g_msf.si"
-.include "linkage.si"
+	.include "g_msf.si"
+	.include "linkage.si"
 
-	.DATA
-.extern	param_list
+	.data
+	.extern	param_list
 
 	.text
-ENTRY ci_restart
-	movq	param_list(REG_IP),REG64_ARG2
-	movl	8(REG64_ARG2),REG32_ARG3
-	cmpl 	$0,REG32_ARG3				# if (argcnt > 0) {
+#
+# Note since this routine makes no calls, stack alignment is not critical. If ever a call is added then this
+# routine should take care to align the stack to 16 bytes and add a CHKSTKALIGN macro.
+#
+ENTRY	ci_restart
+	movq	param_list(REG_IP), REG64_ARG2
+	movl	8(REG64_ARG2), REG32_ARG3
+	cmpl 	$0, REG32_ARG3				# if (argcnt > 0) {
 	jle 	L0
-	leaq	48(REG64_ARG2),REG64_ARG2
-	movq    0(REG64_ARG2),REG64_ARG5
-	subl	$1,REG32_ARG3
-	leaq	8(REG64_ARG2),REG64_ARG1
-	leaq	8(REG_SP),REG64_ARG0
+	leaq	48(REG64_ARG2), REG64_ARG2
+	movq    0(REG64_ARG2), REG64_ARG5
+	subl	$1, REG32_ARG3
+	leaq	8(REG64_ARG2), REG64_ARG1
+	leaq	8(REG_SP), REG64_ARG0
 	REP
 	movsq						# }
-L0:	movq	param_list(REG_IP),REG64_ACCUM
-	movl	8(REG64_ACCUM),REG32_ARG4		#argcnt
-	movl	40(REG64_ACCUM),REG32_ARG3	#mask
-	movq	32(REG64_ACCUM),REG64_ARG2	#retaddr
-	movq	24(REG64_ACCUM),REG64_ARG1	#labaddr
-	movq	16(REG64_ACCUM),REG64_ARG0	#rtnaddr
+L0:
+	movq	param_list(REG_IP), REG64_ACCUM
+	movl	8(REG64_ACCUM), REG32_ARG4		# argcnt
+	movl	40(REG64_ACCUM), REG32_ARG3		# mask
+	movq	32(REG64_ACCUM), REG64_ARG2		# retaddr
+	movq	24(REG64_ACCUM), REG64_ARG1		# labaddr
+	movq	16(REG64_ACCUM), REG64_ARG0		# rtnaddr
 	jmp	*(REG64_ACCUM)
-	ret
-
-# ci_restart ENDP
-
-# END
+	#
+	# No return from transfer of control
+	#
diff --git a/sr_x86_64/cmerrors_ctl.c b/sr_x86_64/cmerrors_ctl.c
index 02581fe..a06b948 100644
--- a/sr_x86_64/cmerrors_ctl.c
+++ b/sr_x86_64/cmerrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
diff --git a/sr_x86_64/cmierrors_ctl.c b/sr_x86_64/cmierrors_ctl.c
index 3656c97..d83e1d5 100644
--- a/sr_x86_64/cmierrors_ctl.c
+++ b/sr_x86_64/cmierrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
diff --git a/sr_x86_64/compswap.s b/sr_x86_64/compswap.s
index d8d2c62..e27400a 100644
--- a/sr_x86_64/compswap.s
+++ b/sr_x86_64/compswap.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2013 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,29 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	compswap.s
-	.sbttl	compswap
-.include "g_msf.si"
-.include "linkage.si"
-
-#	.386
-#	.MODEL	FLAT, C
-
-	.text
-ENTRY compswap
+	.include "g_msf.si"
+	.include "linkage.si"
+	#
 	# A(latch longword)	Arg0
 	# comparison value	Arg1
 	# replacement value	Arg2
+	#
 	# cmpxchg will compare REG32_RET0 i.e EAX with 1st arg so copy
-	# comparison value to EAX
-	movl	REG32_ARG1,REG32_RET0
+	# comparison value to EAX (REG32_RET0).
+	#
+	# Note since this routine makes no calls, stack alignment is not critical. If ever a call is added then this
+	# routine should take care to align the stack to 16 bytes and add a CHKSTKALIGN macro.
+	#
+
+	.text
+ENTRY	compswap
+	movl	REG32_ARG1, REG32_RET0
 	lock
-	cmpxchgl  REG32_ARG2,(REG64_ARG0)		# compare-n-swap
+	cmpxchgl  REG32_ARG2, 0(REG64_ARG0)	# compare-and-swap
 	jnz	fail
-	movl	$1,REG32_RET0			# return TRUE
+	movl	$1, REG32_RET0			# Return TRUE
 	ret
-
 fail:
-	xor	REG32_RET0,REG32_RET0		# return FALSE
+	xor	REG32_RET0, REG32_RET0		# Return FALSE
 	pause
 	ret
diff --git a/sr_x86_64/debug.si b/sr_x86_64/debug.si
new file mode 100644
index 0000000..bb1f627
--- /dev/null
+++ b/sr_x86_64/debug.si
@@ -0,0 +1,46 @@
+#################################################################
+#								#
+# Copyright (c) 2015 Fidelity National Information 		#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
+#								#
+#	This source code contains the intellectual property	#
+#	of its copyright holder(s), and is made available	#
+#	under a license.  If you do not know the terms of	#
+#	the license, please stop and do not read further.	#
+#								#
+#################################################################
+
+#
+# Any debugging macros should be defined here
+#
+
+#
+# Define debugging macro that verifies 16 byte stack alignment. Note this macro should be called after any initial
+# stack adjustment. For example, when a routine is called via CALL, it automatically is no longer aligned due to
+# the 8 byte return address on the stack. Since many routines need at least 8 bytes of save area, this is not an
+# issue but for those short routines that need no saving, the 8 byte difference should be addressed before calling
+# this macro.
+#
+.macro	CHKSTKALIGN
+	.ifdef	DEBUG
+	.data
+	.extern ERR_GTMCHECK
+	.text
+	.extern rts_error
+	subq	$16, %rsp		# Create save area plus maintain 16 byte alignment
+	movq	%rax, 0(%rsp)		# Save %rax - potential arg reg used in some asm rtns
+	movq	%rsp, %rax		# Copy stack pointer
+	andl	$15, %eax		# Check for 16 byte alignment
+	jz	stkok\@			# Branch around if stack ok
+	#
+	# Stack is not aligned - raise error
+	#
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb    $0, REG8_ACCUM		# Variable length argument
+	call	rts_error
+stkok\@:
+	movq	0(%rsp), %rax		# Restore %rax
+	addq	$16, %rsp		# Remove save area
+	.endif
+.endm
diff --git a/sr_x86_64/dm_start.s b/sr_x86_64/dm_start.s
index 4c43150..91f2d76 100644
--- a/sr_x86_64/dm_start.s
+++ b/sr_x86_64/dm_start.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,68 +10,57 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	dm_start.s
-	.sbttl	dm_start
-
-#	.386
-#	.MODEL	FLAT, C
-
-
-.include "g_msf.si"
-.include "linkage.si"
-.include "error.si"
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "error.si"
+	.include "debug.si"
 
 	.DATA
-.extern	dollar_truth
-.extern	xfer_table
-.extern	frame_pointer
-.extern	msp
-.extern	mumps_status
-.extern	restart
+	.extern	dollar_truth
+	.extern	xfer_table
+	.extern	frame_pointer
+	.extern	msp
+	.extern	mumps_status
+	.extern	restart
 
 	.text
-.extern	mdb_condition_handler
-.extern	op_unwind
-.extern __sigsetjmp
-#       setjmp is really __sigsetjmp(env,0)
-
+	.extern	mdb_condition_handler
+	.extern	op_unwind
+	.extern __sigsetjmp			# setjmp() is really __sigsetjmp(env,0)
 
-#	.type dm_start, at function
-ENTRY dm_start
-	enter	$SUPER_STACK_SIZE,$0   # Ensure that the stack is 16 bytes aligned
+ENTRY	dm_start
+	pushq	%rbp				# Preserve caller's %rbp register (aka REG_STACK_FRAME) which 16 byte aligns stack
+	subq	$SUPER_STACK_SIZE, REG_SP	# Create super-stack-frame with room for many args
 	save_callee_saved
+	CHKSTKALIGN				# Verify stack alignment
 	movq    REG_FRAME_POINTER, REG_FRAME_POINTER_SAVE_OFF(REG_SP)  # Save the %rbp value, as that will be trashed in the runtime
 	movq	REG_XFER_TABLE, REG_XFER_TABLE_SAVE_OFF(REG_SP)
 	movl    $1, mumps_status(REG_IP)
-	leaq	xfer_table(REG_IP),REG_XFER_TABLE
+	leaq	xfer_table(REG_IP), REG_XFER_TABLE
 	movl	$1, dollar_truth(REG_IP)
 	ESTABLISH l30
 	movq    restart(REG_IP), REG64_SCRATCH1
 	call    *REG64_SCRATCH1
-
 return:
-	movl	mumps_status(REG_IP),REG32_ACCUM
+	movl	mumps_status(REG_IP), REG32_ACCUM
 	movq	REG_XFER_TABLE_SAVE_OFF(REG_SP), REG_XFER_TABLE
 	movq	REG_FRAME_POINTER_SAVE_OFF(REG_SP), REG_FRAME_POINTER  # Restore the %rbp value, as it will be trashed in runtime
 	restore_callee_saved
-	leave
+	addq	$SUPER_STACK_SIZE, REG_SP	# Unwind super stack
+	popq	%rbp				# Restore caller's %rbp register
 	ret
 
-ENTRY gtm_ret_code
+ENTRY	gtm_ret_code
+	CHKSTKALIGN				# Verify stack alignment
 	REVERT
 	call	op_unwind
-	movq	msp(REG_IP),REG64_ACCUM
-	movq	(REG64_ACCUM),REG64_ACCUM
-	movq	REG64_ACCUM,frame_pointer(REG_IP)
-	#movq	REG_XFER_TABLE, frame_pointer(REG_IP)
+	movq	msp(REG_IP), REG64_ACCUM
+	movq	(REG64_ACCUM), REG64_ACCUM
+	movq	REG64_ACCUM, frame_pointer(REG_IP)
 	addq	$8, msp(REG_IP)
 	jmp	return
 
-ENTRY gtm_levl_ret_code
+ENTRY	gtm_levl_ret_code
+	CHKSTKALIGN				# Verify stack alignment
 	REVERT
 	jmp	return
-
-# dm_start ENDP
-
-# END
diff --git a/sr_x86_64/emit_code_sp.c b/sr_x86_64/emit_code_sp.c
index 3d2cb12..071a90e 100644
--- a/sr_x86_64/emit_code_sp.c
+++ b/sr_x86_64/emit_code_sp.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *                                                              *
- *      Copyright 2007, 2012 Fidelity Information Services, Inc *
+ * Copyright (c) 2007-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *                                                              *
  *      This source code contains the intellectual property     *
  *      of its copyright holder(s), and is made available       *
@@ -159,16 +160,24 @@ int	x86_64_arg_reg(int indx)
 {
 	switch(indx)
 	{
-		case 0: return I386_REG_RDI ;
-		case 1: return I386_REG_RSI ;
-		case 2: return I386_REG_RDX ;
-		case 3: return I386_REG_RCX ;
-		case 4: return I386_REG_R8 ;
-		case 5: return I386_REG_R9 ;
-		default: GTMASSERT ; break ;
+		case 0:
+			return I386_REG_RDI;
+		case 1:
+			return I386_REG_RSI;
+		case 2:
+			return I386_REG_RDX;
+		case 3:
+			return I386_REG_RCX;
+		case 4:
+			return I386_REG_R8;
+		case 5:
+			return I386_REG_R9;
+		default:
+			assertpro(FALSE);
+			break ;
 	}
 	/* Control will never reach here */
-	return - 1 ;
+	return -1 ;
 }
 
 void	emit_jmp(uint4 branch_op, short **instp, int reg) /* Note that the 'reg' parameter is ignored */
@@ -229,7 +238,7 @@ void	emit_jmp(uint4 branch_op, short **instp, int reg) /* Note that the 'reg' pa
 						code_buf[code_idx++] = I386_INS_JMP_Jb;
 						break;
 					default:
-						GTMASSERT;
+						assertpro(FALSE);
 						break;
 				}
 				code_buf[code_idx++] = jmp_offset & 0xff;
@@ -265,7 +274,7 @@ void	emit_jmp(uint4 branch_op, short **instp, int reg) /* Note that the 'reg' pa
 							code_buf[code_idx++] = I386_INS_JNZ_Jv;
 							break;
 						default:
-							GTMASSERT;
+							assertpro(FALSE);
 							break;
 					}
 				}
@@ -351,7 +360,7 @@ void print_source_operand()
 	switch(instruction.source_operand_class)
 	{
 		case undefined_class :
-			GTMASSERT;
+			assertpro(FALSE);
 			break;
 		case register_class :
 			assert(instruction.source_operand_reg != NULL);
@@ -380,7 +389,7 @@ void print_source_operand()
 			SET_OBPT_INT8(instruction.immediate);
 			break;
 		default :
-			GTMASSERT;
+			assertpro(FALSE);
 	}
 }
 
@@ -389,7 +398,7 @@ void print_destination_operand()
 	switch(instruction.destination_operand_class)
 	{
 		case undefined_class :
-			GTMASSERT;
+			assertpro(FALSE);
 			break;
 		case register_class :
 			assert(instruction.destination_operand_reg != NULL);
@@ -418,7 +427,7 @@ void print_destination_operand()
 			SET_OBPT_INT8(instruction.immediate);
 			break;
 		default :
-			GTMASSERT;
+			assertpro(FALSE);
 	}
 }
 
@@ -430,7 +439,7 @@ void print_instruction()
 	obpt = &outbuf[0];
 	memset(obpt, SP, ASM_OUT_BUFF);
 	obpt += 10;
-	i2hex((curr_addr - SIZEOF(rhdtyp)), obpt, 8);
+	i2hex((curr_addr - PTEXT_OFFSET), obpt, 8);
 	curr_addr += (instidx - prev_idx);
 	obpt += 10;
 	for( ;  prev_idx < instidx; prev_idx++)
@@ -468,7 +477,7 @@ void print_instruction()
 			print_destination_operand();
 			break;
 		default :
-		GTMASSERT;
+		assertpro(FALSE);
 	}
 	/*  Now reset the instruction structure  */
 	emit_eoi();
@@ -491,7 +500,7 @@ void set_memory_reg()
 		else if (instruction.destination_operand_class == memory_class)
 			instruction.destination_operand_reg =(char *) register_list[REG_RIP];
 		else
-			GTMASSERT;
+			assertpro(FALSE);
 }
 
 void set_register_reg()
@@ -608,7 +617,7 @@ void format_machine_inst()
 					case I386_INS_Grp2_Eb_CL_Prefix :
 					case I386_INS_Grp2_Ev_CL_Prefix :
 						next_inst_byte_meaning = modrm_sib_bytes;
-						GTMASSERT;  /* Not taking care of this case for now - not used!! */
+						assertpro(FALSE);  /* Not taking care of this case for now - not used!! */
 						break;
 					case I386_INS_Grp3_Eb_Prefix :
 						modrm_byte.byte = code_buf[instidx + 1];
@@ -795,7 +804,7 @@ void format_machine_inst()
 						break;
 
 					default :
-						GTMASSERT;
+						assertpro(FALSE);
 				}
 				break;
 			case two_byte_opcode :
@@ -826,7 +835,7 @@ void format_machine_inst()
 						next_inst_byte_meaning = double_word_offset;
 						break;
 					default :
-						GTMASSERT;
+						assertpro(FALSE);
 				}
 				break;
 			case modrm_sib_bytes :
@@ -912,7 +921,7 @@ void format_machine_inst()
 							next_inst_byte_meaning = double_word_offset;
 							break;
 						default :
-							GTMASSERT;
+							assertpro(FALSE);
 					}
 				} else 		/* No SIB */
 				{
@@ -957,7 +966,7 @@ void format_machine_inst()
 							}
 							break;
 						default :
-							GTMASSERT;
+							assertpro(FALSE);
 					}
 				}
 				break;
@@ -1011,7 +1020,7 @@ void format_machine_inst()
 				}
 				break;
 			default :
-				GTMASSERT;
+				assertpro(FALSE);
 
 		 }
 	}
diff --git a/sr_x86_64/error.si b/sr_x86_64/error.si
index a4cb3cd..c36bc95 100644
--- a/sr_x86_64/error.si
+++ b/sr_x86_64/error.si
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,8 +10,6 @@
 #								#
 #################################################################
 
-	.sbttl	error.si
-#	PAGE	+
 #-----------------------------------------------
 # Mumps error condition handler macros
 #-----------------------------------------------
@@ -21,34 +20,30 @@ chnd_ch		=	16
 chnd_jmp	=	24
 
 	.data
-.extern	ctxt
+	.extern	ctxt
 
-#	.text
-#	setjmp is really __sigsetjmp(env,0)
-#.extern	__sigsetjmp
-.extern gtm_asm_establish
+	.text
+	.extern gtm_asm_establish
 
-	.sbttl	error.si    ESTABLISH
 .macro ESTABLISH label
         call	gtm_asm_establish
-	movq	ctxt(REG_IP),%rax
+	movq	ctxt(REG_IP), REG64_ACCUM
 	leaq	mdb_condition_handler(REG_IP), REG64_SCRATCH1
 	movq    REG64_SCRATCH1, chnd_ch(%rax)		# ctxt->ch = x
-	addq	$chnd_jmp,%rax			# setjmp(ctxt->jmp)
-	movq	$0,%rsi
-	movq	%rax,%rdi
+	addq	$chnd_jmp, REG64_ACCUM			# setjmp(ctxt->jmp)
+	movq	$0, REG64_ARG1
+	movq	REG64_ACCUM, REG64_ARG0
 	call 	__sigsetjmp at PLT
-	incl  	%eax
+	incl  	REG32_RET0
 	jne  	\label
 	REVERT
 	jmp  	return
 \label:
 .endm
 
-	.sbttl	error.si    REVERT
 .macro REVERT
-	movq	ctxt(REG_IP),%rax			# active_ch = ctxt->save_active_c
-	movq	chnd_save_active(%rax),%rax
-	movq	%rax,active_ch(REG_IP)
-	subq  	$chnd_size,ctxt(REG_IP)			# ctxt--
+	movq	ctxt(REG_IP), REG64_ACCUM		# active_ch = ctxt->save_active_c
+	movq	chnd_save_active(REG64_ACCUM), REG64_ACCUM
+	movq	REG64_ACCUM, active_ch(REG_IP)
+	subq  	$chnd_size, ctxt(REG_IP)		# ctxt--
 .endm
diff --git a/sr_x86_64/follow.s b/sr_x86_64/follow.s
index 9df7ca8..ec5ce93 100644
--- a/sr_x86_64/follow.s
+++ b/sr_x86_64/follow.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,24 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	follow.s
-	.sbttl	follow
-
-.include "g_msf.si"
-.include "linkage.si"
-
-#	.386
-#	.MODEL	FLAT, C
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 
 	.text
-.extern	op_follow
+	.extern	op_follow
 
-# PUBLIC	follow
-ENTRY follow
-	movq	REG64_ARG0,REG64_RET0
-	movq	REG64_ARG1,REG64_RET1
+ENTRY	follow
+	subq	$8, REG_SP		# Align to 16 bytes
+	CHKSTKALIGN			# Verify stack alignment
+	movq	REG64_ARG0, REG64_RET0
+	movq	REG64_ARG1, REG64_RET1
 	call	op_follow
-	jle	l1
-	movq	$1,REG64_RET0
+	jle	notfollow
+	movq	$1, REG64_RET0
+	jmp	done
+notfollow:
+	movq	$0, REG64_RET0
+done:
+	addq	$8, REG_SP		# Remove stack extension
 	ret
-
-l1:	movq	$0,REG64_RET0
-	ret
-# follow	ENDP
-
-# END
diff --git a/sr_x86_64/g_msf.si b/sr_x86_64/g_msf.si
index d0c7623..b6b73a4 100644
--- a/sr_x86_64/g_msf.si
+++ b/sr_x86_64/g_msf.si
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,11 +10,9 @@
 #								#
 #################################################################
 
-	.sbttl	g_msf.si
-#	PAGE	+
 #-----------------------------------------------
 # Mumps stack frame manipulation macros
-#  for the GNU gas i386 assembler version
+#  for the GNU gas x86-64 assembler version
 #-----------------------------------------------
 
 /* Register definitions */
@@ -49,7 +48,7 @@ REG64_ARG2		=	%rdx
 REG64_ARG3		=	%rcx
 REG64_ARG4		=	%r8
 REG64_ARG5		=	%r9
-#REG64_SCRATCH0		=	%r10     # Note asme as REG64_RET1
+#REG64_SCRATCH0		=	%r10     # Note same as REG64_RET1
 REG64_SCRATCH1		=	%r11
 
 REG64_OUT_ARG0		=	%rdi
@@ -143,67 +142,60 @@ REG_XFER_TABLE_SAVE_OFF    =   REG_FRAME_POINTER_SAVE_OFF - 8
 ARG_SAVE_OFFSET            =   REG_XFER_TABLE_SAVE_OFF - 8
 ARG_COUNT_OFFSET	   =   ARG_SAVE_OFFSET - (8*NO_REG_SAVED)
 
-
-        .sbttl  g_msf.si        save_callee_saved
 .macro save_callee_saved
-        movq    %r12,ARG_SAVE_OFFSET(REG_SP)
-        movq    %r13,ARG_SAVE_OFFSET-8(REG_SP)
-        movq    %r14,ARG_SAVE_OFFSET-16(REG_SP)
-        movq    %r15,ARG_SAVE_OFFSET-24(REG_SP)
-        movq    %rbx,ARG_SAVE_OFFSET-32(REG_SP)
+        movq    %r12, ARG_SAVE_OFFSET(REG_SP)
+        movq    %r13, ARG_SAVE_OFFSET-8(REG_SP)
+        movq    %r14, ARG_SAVE_OFFSET-16(REG_SP)
+        movq    %r15, ARG_SAVE_OFFSET-24(REG_SP)
+        movq    %rbx, ARG_SAVE_OFFSET-32(REG_SP)
 .endm
 
-        .sbttl  g_msf.si        restore_callee_saved
 .macro restore_callee_saved
-        movq    ARG_SAVE_OFFSET-32(REG_SP),%rbx
-        movq    ARG_SAVE_OFFSET-24(REG_SP),%r15
-        movq    ARG_SAVE_OFFSET-16(REG_SP),%r14
-        movq    ARG_SAVE_OFFSET-8(REG_SP),%r13
-        movq    ARG_SAVE_OFFSET(REG_SP),%r12
+        movq    ARG_SAVE_OFFSET-32(REG_SP), %rbx
+        movq    ARG_SAVE_OFFSET-24(REG_SP), %r15
+        movq    ARG_SAVE_OFFSET-16(REG_SP), %r14
+        movq    ARG_SAVE_OFFSET-8(REG_SP), %r13
+        movq    ARG_SAVE_OFFSET(REG_SP), %r12
 .endm
 
-
-	.sbttl	g_msf.si	putframe
 .macro putframe
-	movq	frame_pointer(%rip),REG_FRAME_POINTER
-	movq	REG_FRAME_TMP_PTR,msf_temps_ptr_off(REG_FRAME_POINTER)
-	movq	REG_FRAME_VAR_PTR,msf_l_symtab_off(REG_FRAME_POINTER)
-	movq	REG_LITERAL_BASE,msf_literal_ptr_off(REG_FRAME_POINTER)
-	movq	REG_PV,msf_ctxt_off(REG_FRAME_POINTER)
-	movq	(%rsp),REG64_SCRATCH1
-	movq	REG64_SCRATCH1,msf_mpc_off(REG_FRAME_POINTER)
+	movq	frame_pointer(%rip), REG_FRAME_POINTER
+	movq	REG_FRAME_TMP_PTR, msf_temps_ptr_off(REG_FRAME_POINTER)
+	movq	REG_FRAME_VAR_PTR, msf_l_symtab_off(REG_FRAME_POINTER)
+	movq	REG_LITERAL_BASE, msf_literal_ptr_off(REG_FRAME_POINTER)
+	movq	REG_PV, msf_ctxt_off(REG_FRAME_POINTER)
+	movq	(%rsp), REG64_SCRATCH1
+	movq	REG64_SCRATCH1, msf_mpc_off(REG_FRAME_POINTER)
 .endm
 
 .extern	error_return
 
-	.sbttl	g_msf.si	getframe
-
 .macro getframe
-	movq	frame_pointer(%rip),REG_FRAME_POINTER
-	movb	msf_flags_off(REG_FRAME_POINTER),REG8_SCRATCH1
-	andb	$SFF_ETRAP_ERR,REG8_SCRATCH1
+	movq	frame_pointer(%rip), REG_FRAME_POINTER
+	movb	msf_flags_off(REG_FRAME_POINTER), REG8_SCRATCH1
+	andb	$SFF_ETRAP_ERR, REG8_SCRATCH1
 	jz	lab1\@
 	call	error_return
-	movq	frame_pointer(%rip),REG_FRAME_POINTER
+	movq	frame_pointer(%rip), REG_FRAME_POINTER
 lab1\@:
-	movq	msf_temps_ptr_off(REG_FRAME_POINTER),REG_FRAME_TMP_PTR
-	movq	msf_l_symtab_off(REG_FRAME_POINTER),REG_FRAME_VAR_PTR
-	movq	msf_literal_ptr_off(REG_FRAME_POINTER),REG_LITERAL_BASE
-	movq	msf_ctxt_off(REG_FRAME_POINTER),REG_PV
+	movq	msf_temps_ptr_off(REG_FRAME_POINTER), REG_FRAME_TMP_PTR
+	movq	msf_l_symtab_off(REG_FRAME_POINTER), REG_FRAME_VAR_PTR
+	movq	msf_literal_ptr_off(REG_FRAME_POINTER), REG_LITERAL_BASE
+	movq	msf_ctxt_off(REG_FRAME_POINTER), REG_PV
 	pushq	msf_mpc_off(REG_FRAME_POINTER)
 .endm
 
-	.sbttl	g_msf.si	pullstack
-
 .macro	pullstack size=8
-	addq	$\size,REG_SP
+	addq	$\size, REG_SP
 .endm
 
 .macro	resetstack size=8
-	subq	$\size,REG_SP
+	subq	$\size, REG_SP
 .endm
 
-	.sbttl	g_msf.si
+#
+# Field for routine header - offsets must match rtnhdr.h
+#
 mrt_jsb			=	0
 mrt_shlib_handle	=	16
 mrt_src_len		=	28
@@ -221,9 +213,8 @@ mrt_lnr_len		=	104
 mrt_lit_ptr		=	128
 mrt_lnk_ptr		=	144
 mrt_ptext_adr		=	176
-mrt_checksum		=	192
 mrt_tmp_mv		=	196
 mrt_tmp_sz		=	200
 mrt_curr_ptr		=	208
 mrt_oldr_ptr		=	216
-
+mrt_zhist		=	264
diff --git a/sr_x86_64/gdeerrors_ctl.c b/sr_x86_64/gdeerrors_ctl.c
index d43120c..a2b0e4f 100644
--- a/sr_x86_64/gdeerrors_ctl.c
+++ b/sr_x86_64/gdeerrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
diff --git a/sr_x86_64/gtm_threadgbl_deftypes.h b/sr_x86_64/gtm_threadgbl_deftypes.h
new file mode 100644
index 0000000..bd35723
--- /dev/null
+++ b/sr_x86_64/gtm_threadgbl_deftypes.h
@@ -0,0 +1,906 @@
+/****************************************************************
+ *								*
+ * Copyright (c) 2010-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
+ *								*
+ *	This source code contains the intellectual property	*
+ *	of its copyright holder(s), and is made available	*
+ *	under a license.  If you do not know the terms of	*
+ *	the license, please stop and do not read further.	*
+ *								*
+ ****************************************************************/
+
+/* Generated by /usr/library/V62002/tools/gen_gtm_threadgbl_deftypes.csh */
+
+#ifndef GTM_THREADGBL_DEFTYPES_INCLUDED
+#define GTM_THREADGBL_DEFTYPES_INCLUDED
+/* Output selection criteria for PRO build */
+#if !defined(DEBUG) || defined(PRO_BUILD)
+# define ggo_grabbing_crit 0
+# define ggt_grabbing_crit gd_region *
+# define ggo_boolchain 8
+# define ggt_boolchain triple
+# define ggo_boolchain_ptr 144
+# define ggt_boolchain_ptr triple *
+# define ggo_bool_targ_anchor 152
+# define ggt_bool_targ_anchor tbp
+# define ggo_bool_targ_ptr 176
+# define ggt_bool_targ_ptr tbp *
+# define ggo_code_generated 184
+# define ggt_code_generated boolean_t
+# define ggo_codegen_padlen 188
+# define ggt_codegen_padlen int4
+# define ggo_compile_time 192
+# define ggt_compile_time boolean_t
+# define ggo_curtchain 200
+# define ggt_curtchain triple *
+# define ggo_director_ident 208
+# define ggt_director_ident mstr
+# define ggo_director_mval 224
+# define ggt_director_mval mval
+# define ggo_director_token 256
+# define ggt_director_token char
+# define ggo_dollar_zcstatus 260
+# define ggt_dollar_zcstatus int4
+# define ggo_expr_depth 264
+# define ggt_expr_depth unsigned int
+# define ggo_expr_start 272
+# define ggt_expr_start triple *
+# define ggo_expr_start_orig 280
+# define ggt_expr_start_orig triple *
+# define ggo_defined_symbols 288
+# define ggt_defined_symbols struct sym_table *
+# define ggo_for_stack_ptr 296
+# define ggt_for_stack_ptr oprtype **
+# define ggo_gtm_fullbool 304
+# define ggt_gtm_fullbool unsigned int
+# define ggo_ind_result 312
+# define ggt_ind_result mval *
+# define ggo_ind_source 320
+# define ggt_ind_source mval *
+# define ggo_indirection_mval 328
+# define ggt_indirection_mval mval
+# define ggo_last_source_column 360
+# define ggt_last_source_column int
+# define ggo_max_advancewindow_line 364
+# define ggt_max_advancewindow_line int4
+# define ggo_linkage_first 368
+# define ggt_linkage_first struct linkage_entry *
+# define ggo_linkage_last 376
+# define ggt_linkage_last struct linkage_entry *
+# define ggo_objhash_state 384
+# define ggt_objhash_state hash128_state_t
+# define ggo_pos_in_chain 424
+# define ggt_pos_in_chain triple
+# define ggo_s2n_intlit 560
+# define ggt_s2n_intlit boolean_t
+# define ggo_routine_source_offset 564
+# define ggt_routine_source_offset uint4
+# define ggo_saw_side_effect 568
+# define ggt_saw_side_effect boolean_t
+# define ggo_shift_side_effects 572
+# define ggt_shift_side_effects int
+# define ggo_side_effect_base 576
+# define ggt_side_effect_base boolean_t *
+# define ggo_side_effect_depth 584
+# define ggt_side_effect_depth uint4
+# define ggo_side_effect_handling 588
+# define ggt_side_effect_handling int
+# define ggo_source_error_found 592
+# define ggt_source_error_found int4
+# define ggo_temp_subs 596
+# define ggt_temp_subs boolean_t
+# define ggo_trigger_compile_and_link 600
+# define ggt_trigger_compile_and_link boolean_t
+# define ggo_window_ident 608
+# define ggt_window_ident mstr
+# define ggo_window_mval 624
+# define ggt_window_mval mval
+# define ggo_window_token 656
+# define ggt_window_token char
+# define ggo_dbinit_max_hrtbt_delta 660
+# define ggt_dbinit_max_hrtbt_delta uint4
+# define ggo_dollar_zmaxtptime 664
+# define ggt_dollar_zmaxtptime int4
+# define ggo_donot_commit 668
+# define ggt_donot_commit boolean_t
+# define ggo_donot_write_inctn_in_wcs_recover 672
+# define ggt_donot_write_inctn_in_wcs_recover boolean_t
+# define ggo_gbuff_limit 680
+# define ggt_gbuff_limit mval
+# define ggo_gd_targ_tn 712
+# define ggt_gd_targ_tn trans_num
+# define ggo_gd_targ_reg_array 720
+# define ggt_gd_targ_reg_array trans_num *
+# define ggo_gd_targ_reg_array_size 728
+# define ggt_gd_targ_reg_array_size uint4
+# define ggo_gd_targ_addr 736
+# define ggt_gd_targ_addr gd_addr *
+# define ggo_gd_targ_gvnh_reg 744
+# define ggt_gd_targ_gvnh_reg gvnh_reg_t *
+# define ggo_gd_targ_map 752
+# define ggt_gd_targ_map gd_binding *
+# define ggo_gtm_custom_errors 760
+# define ggt_gtm_custom_errors mstr
+# define ggo_gv_extname_size 776
+# define ggt_gv_extname_size int4
+# define ggo_gv_last_subsc_null 780
+# define ggt_gv_last_subsc_null boolean_t
+# define ggo_gv_mergekey2 784
+# define ggt_gv_mergekey2 gv_key *
+# define ggo_gv_reorgkey 792
+# define ggt_gv_reorgkey gv_key *
+# define ggo_gv_some_subsc_null 800
+# define ggt_gv_some_subsc_null boolean_t
+# define ggo_gv_sparekey 808
+# define ggt_gv_sparekey gv_key *
+# define ggo_gv_sparekey_mval 816
+# define ggt_gv_sparekey_mval mval
+# define ggo_gv_sparekey_size 848
+# define ggt_gv_sparekey_size int4
+# define ggo_gv_tporigkey_ptr 856
+# define ggt_gv_tporigkey_ptr gv_orig_key_array *
+# define ggo_gv_tporig_extnam_str 864
+# define ggt_gv_tporig_extnam_str mstr
+# define ggo_in_gvcst_redo_root_search 880
+# define ggt_in_gvcst_redo_root_search boolean_t
+# define ggo_in_op_gvget 884
+# define ggt_in_op_gvget boolean_t
+# define ggo_issue_DBROLLEDBACK_anyways 888
+# define ggt_issue_DBROLLEDBACK_anyways boolean_t
+# define ggo_last_fnquery_return_subcnt 892
+# define ggt_last_fnquery_return_subcnt int
+# define ggo_last_fnquery_return_varname 896
+# define ggt_last_fnquery_return_varname mval
+# define ggo_ok_to_call_wcs_recover 928
+# define ggt_ok_to_call_wcs_recover boolean_t
+# define ggo_in_gvcst_bmp_mark_free 932
+# define ggt_in_gvcst_bmp_mark_free boolean_t
+# define ggo_prev_gv_target 936
+# define ggt_prev_gv_target gv_namehead *
+# define ggo_ready2signal_gvundef 944
+# define ggt_ready2signal_gvundef boolean_t
+# define ggo_redo_rootsrch_ctxt 952
+# define ggt_redo_rootsrch_ctxt redo_root_search_context
+# define ggo_semwait2long 2072
+# define ggt_semwait2long volatile boolean_t
+# define ggo_skip_file_corrupt_check 2076
+# define ggt_skip_file_corrupt_check boolean_t
+# define ggo_tpnotacidtime 2080
+# define ggt_tpnotacidtime int4
+# define ggo_tp_restart_count 2084
+# define ggt_tp_restart_count uint4
+# define ggo_tp_restart_dont_counts 2088
+# define ggt_tp_restart_dont_counts int4
+# define ggo_tp_restart_entryref 2096
+# define ggt_tp_restart_entryref mval
+# define ggo_tp_restart_failhist_indx 2128
+# define ggt_tp_restart_failhist_indx int4
+# define ggo_tprestart_syslog_delta 2132
+# define ggt_tprestart_syslog_delta int4
+# define ggo_tprestart_syslog_limit 2136
+# define ggt_tprestart_syslog_limit int4
+# define ggo_transform 2140
+# define ggt_transform boolean_t
+# define ggo_wcs_recover_done 2144
+# define ggt_wcs_recover_done boolean_t
+# define ggo_in_op_fnnext 2148
+# define ggt_in_op_fnnext boolean_t
+# define ggo_local_collseq 2152
+# define ggt_local_collseq collseq *
+# define ggo_local_collseq_stdnull 2160
+# define ggt_local_collseq_stdnull boolean_t
+# define ggo_local_coll_nums_as_strings 2164
+# define ggt_local_coll_nums_as_strings boolean_t
+# define ggo_lv_null_subs 2168
+# define ggt_lv_null_subs int
+# define ggo_max_lcl_coll_xform_bufsiz 2172
+# define ggt_max_lcl_coll_xform_bufsiz int
+# define ggo_replgbl 2176
+# define ggt_replgbl replgbl_t
+# define ggo_tqread_nowait 2200
+# define ggt_tqread_nowait boolean_t
+# define ggo_arlink_enabled 2204
+# define ggt_arlink_enabled boolean_t
+# define ggo_arlink_loaded 2208
+# define ggt_arlink_loaded uint4
+# define ggo_collseq_list 2216
+# define ggt_collseq_list collseq *
+# define ggo_create_fatal_error_zshow_dmp_fptr 2224
+# define ggt_create_fatal_error_zshow_dmp_fptr void
+# define gga_create_fatal_error_zshow_dmp_fptr (void)
+typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
+# define ggo_disable_sigcont 2232
+# define ggt_disable_sigcont boolean_t
+# define ggo_dollar_zcompile 2240
+# define ggt_dollar_zcompile mstr
+# define ggo_dollar_zmode 2256
+# define ggt_dollar_zmode mval
+# define ggo_dollar_zonlnrlbk 2288
+# define ggt_dollar_zonlnrlbk int
+# define ggo_dollar_zclose 2292
+# define ggt_dollar_zclose int
+# define ggo_dollar_zroutines 2296
+# define ggt_dollar_zroutines mstr
+# define ggo_error_on_jnl_file_lost 2312
+# define ggt_error_on_jnl_file_lost unsigned int
+# define ggo_fnzsearch_lv_vars 2320
+# define ggt_fnzsearch_lv_vars lv_val *
+# define ggo_fnzsearch_sub_mval 2328
+# define ggt_fnzsearch_sub_mval mval
+# define ggo_fnzsearch_nullsubs_sav 2360
+# define ggt_fnzsearch_nullsubs_sav int
+# define ggo_fnzsearch_globbuf_ptr 2368
+# define ggt_fnzsearch_globbuf_ptr glob_t *
+# define ggo_glvn_pool_ptr 2376
+# define ggt_glvn_pool_ptr glvn_pool *
+# define ggo_gtm_env_init_started 2384
+# define ggt_gtm_env_init_started boolean_t
+# define ggo_gtm_env_xlate_entry 2392
+# define ggt_gtm_env_xlate_entry int
+# define gga_gtm_env_xlate_entry ()
+typedef int (*ggf_gtm_env_xlate_entry)();
+# define ggo_gtm_environment_init 2400
+# define ggt_gtm_environment_init boolean_t
+# define ggo_gtm_sigusr1_handler 2408
+# define ggt_gtm_sigusr1_handler void
+# define gga_gtm_sigusr1_handler (void)
+typedef void (*ggf_gtm_sigusr1_handler)(void);
+# define ggo_gtm_linktmpdir 2416
+# define ggt_gtm_linktmpdir mstr
+# define ggo_gtm_trctbl_cur 2432
+# define ggt_gtm_trctbl_cur trctbl_entry *
+# define ggo_gtm_trctbl_end 2440
+# define ggt_gtm_trctbl_end trctbl_entry *
+# define ggo_gtm_trctbl_groups 2448
+# define ggt_gtm_trctbl_groups unsigned int
+# define ggo_gtm_trctbl_start 2456
+# define ggt_gtm_trctbl_start trctbl_entry *
+# define ggo_gtm_waitstuck_script 2464
+# define ggt_gtm_waitstuck_script mstr
+# define ggo_gtmprompt 2480
+# define ggt_gtmprompt mstr
+# define ggo_gtmsecshr_comkey 2496
+# define ggt_gtmsecshr_comkey unsigned int
+# define ggo_in_zwrite 2500
+# define ggt_in_zwrite boolean_t
+# define ggo_lab_lnr 2504
+# define ggt_lab_lnr lnr_tabent **
+# define ggo_jobexam_counter 2512
+# define ggt_jobexam_counter unsigned int
+# define ggo_lnk_proxy 2520
+# define ggt_lnk_proxy lnk_tabent_proxy
+# define ggo_mprof_alloc_reclaim 2544
+# define ggt_mprof_alloc_reclaim boolean_t
+# define ggo_mprof_chunk_avail_size 2548
+# define ggt_mprof_chunk_avail_size int
+# define ggo_mprof_env_gbl_name 2552
+# define ggt_mprof_env_gbl_name mval
+# define ggo_mprof_ptr 2584
+# define ggt_mprof_ptr mprof_wrapper *
+# define ggo_mprof_reclaim_addr 2592
+# define ggt_mprof_reclaim_addr char *
+# define ggo_mprof_reclaim_cnt 2600
+# define ggt_mprof_reclaim_cnt int
+# define ggo_mprof_stack_curr_frame 2608
+# define ggt_mprof_stack_curr_frame mprof_stack_frame *
+# define ggo_mprof_stack_next_frame 2616
+# define ggt_mprof_stack_next_frame mprof_stack_frame *
+# define ggo_open_relinkctl_list 2624
+# define ggt_open_relinkctl_list open_relinkctl_sgm *
+# define ggo_relinkctl_shm_min_index 2632
+# define ggt_relinkctl_shm_min_index int
+# define ggo_gtm_autorelink_keeprtn 2636
+# define ggt_gtm_autorelink_keeprtn boolean_t
+# define ggo_open_shlib_root 2640
+# define ggt_open_shlib_root open_shlib *
+# define ggo_parm_pool_ptr 2648
+# define ggt_parm_pool_ptr parm_pool *
+# define ggo_parms_cnt 2656
+# define ggt_parms_cnt unsigned int
+# define ggo_zpeek_regname 2660
+# define ggt_zpeek_regname char
+# define ggl_zpeek_regname 31
+# define ggo_zpeek_regname_len 2692
+# define ggt_zpeek_regname_len int
+# define ggo_zpeek_reg_ptr 2696
+# define ggt_zpeek_reg_ptr gd_region *
+# define ggo_pipefifo_interrupt 2704
+# define ggt_pipefifo_interrupt int
+# define ggo_prof_fp 2712
+# define ggt_prof_fp mprof_stack_frame *
+# define ggo_relink_allowed 2720
+# define ggt_relink_allowed int
+# define ggo_save_zhist 2728
+# define ggt_save_zhist zro_hist *
+# define ggo_set_zroutines_cycle 2736
+# define ggt_set_zroutines_cycle uint4
+# define ggo_trans_code_pop 2744
+# define ggt_trans_code_pop mval *
+# define ggo_view_ydirt_str 2752
+# define ggt_view_ydirt_str char *
+# define ggo_view_ydirt_str_len 2760
+# define ggt_view_ydirt_str_len int4
+# define ggo_zdate_form 2764
+# define ggt_zdate_form int4
+# define ggo_zintcmd_active 2768
+# define ggt_zintcmd_active zintcmd_active_info
+# define ggl_zintcmd_active 72
+# define ggo_zro_root 2840
+# define ggt_zro_root zro_ent *
+# define ggo_zsearch_var 2848
+# define ggt_zsearch_var lv_val *
+# define ggo_poll_fds_buffer 2856
+# define ggt_poll_fds_buffer char *
+# define ggo_poll_fds_buffer_size 2864
+# define ggt_poll_fds_buffer_size size_t
+# define ggo_socket_handle_counter 2872
+# define ggt_socket_handle_counter int
+# define ggo_director_string 2876
+# define ggt_director_string char
+# define ggl_director_string 32
+# define ggo_fnpca 2912
+# define ggt_fnpca fnpc_area
+# define ggo_for_stack 21328
+# define ggt_for_stack oprtype *
+# define ggl_for_stack 256
+# define ggo_for_temps 21584
+# define ggt_for_temps boolean_t
+# define ggl_for_temps 128
+# define ggo_last_fnquery_return_sub 21712
+# define ggt_last_fnquery_return_sub mval
+# define ggl_last_fnquery_return_sub 1024
+# define ggo_lcl_coll_xform_buff 22736
+# define ggt_lcl_coll_xform_buff char *
+# define ggo_protmem_ba 22744
+# define ggt_protmem_ba mstr
+# define ggo_parm_ary 22760
+# define ggt_parm_ary char *
+# define ggl_parm_ary 8192
+# define ggo_parm_ary_len 30952
+# define ggt_parm_ary_len int
+# define ggl_parm_ary_len 4096
+# define ggo_parm_str_len 35048
+# define ggt_parm_str_len int
+# define ggl_parm_str_len 4096
+# define ggo_prombuf 39144
+# define ggt_prombuf char
+# define ggl_prombuf 32
+# define ggo_tp_restart_failhist_arry 39176
+# define ggt_tp_restart_failhist_arry char
+# define ggl_tp_restart_failhist_arry 32
+# define ggo_window_string 39208
+# define ggt_window_string char
+# define ggl_window_string 32
+# define ggo_tmp_object_file_name 39240
+# define ggt_tmp_object_file_name char
+# define ggl_tmp_object_file_name 4097
+# define ggo_last_va_list_ptr 43344
+# define ggt_last_va_list_ptr va_list
+# define ggo_util_outbuff 43368
+# define ggt_util_outbuff char
+# define ggl_util_outbuff 6144
+# define ggo_util_outbuff_ptr 49512
+# define ggt_util_outbuff_ptr char *
+# define ggo_util_outptr 49520
+# define ggt_util_outptr char *
+# define ggo_callin_hashtab 49528
+# define ggt_callin_hashtab hash_table_str *
+# define ggo_ci_table 49536
+# define ggt_ci_table callin_entry_list *
+# define ggo_extcall_package_root 49544
+# define ggt_extcall_package_root struct extcall_package_list *
+# define ggo_gtmci_nested_level 49552
+# define ggt_gtmci_nested_level unsigned int
+# define ggo_temp_fgncal_stack 49560
+# define ggt_temp_fgncal_stack unsigned char *
+# define ggo_midchild_send_locals 49568
+# define ggt_midchild_send_locals boolean_t
+# define ggo_want_empty_gvts 49572
+# define ggt_want_empty_gvts boolean_t
+# define ggo_in_mu_swap_root_state 49576
+# define ggt_in_mu_swap_root_state unsigned int
+# define ggo_prev_t_tries 49580
+# define ggt_prev_t_tries unsigned int
+# define ggo_rlbk_during_redo_root 49584
+# define ggt_rlbk_during_redo_root boolean_t
+# define ggo_mlk_yield_pid 49588
+# define ggt_mlk_yield_pid uint4
+# define ggo_jnl_extract_nocol 49592
+# define ggt_jnl_extract_nocol uint4
+# define ggo_skip_gtm_putmsg 49596
+# define ggt_skip_gtm_putmsg boolean_t
+# define ggo_spangbl_seen 49600
+# define ggt_spangbl_seen boolean_t
+# define ggo_no_spangbls 49604
+# define ggt_no_spangbls boolean_t
+# define ggo_max_fid_index 49608
+# define ggt_max_fid_index int
+# define ggo_is_mu_rndwn_rlnkctl 49612
+# define ggt_is_mu_rndwn_rlnkctl int
+# define ggo_expand_prev_key 49616
+# define ggt_expand_prev_key boolean_t
+# define ggo_gtm_autorelink_ctlmax 49620
+# define ggt_gtm_autorelink_ctlmax uint4
+# define ggo_gvt_triggers_read_this_tn 49624
+# define ggt_gvt_triggers_read_this_tn boolean_t
+# define ggo_op_fntext_tlevel 49628
+# define ggt_op_fntext_tlevel uint4
+# define ggo_in_op_fntext 49632
+# define ggt_in_op_fntext boolean_t
+# define ggo_ztrigbuff 49640
+# define ggt_ztrigbuff char *
+# define ggo_ztrigbuffAllocLen 49648
+# define ggt_ztrigbuffAllocLen int
+# define ggo_ztrigbuffLen 49652
+# define ggt_ztrigbuffLen int
+# define ggo_ztrig_use_io_curr_device 49656
+# define ggt_ztrig_use_io_curr_device boolean_t
+# define size_gtm_threadgbl_struct 49664
+#else
+# define ggo_grabbing_crit 0
+# define ggt_grabbing_crit gd_region *
+# define ggo_boolchain 8
+# define ggt_boolchain triple
+# define ggo_boolchain_ptr 144
+# define ggt_boolchain_ptr triple *
+# define ggo_bool_targ_anchor 152
+# define ggt_bool_targ_anchor tbp
+# define ggo_bool_targ_ptr 176
+# define ggt_bool_targ_ptr tbp *
+# define ggo_code_generated 184
+# define ggt_code_generated boolean_t
+# define ggo_codegen_padlen 188
+# define ggt_codegen_padlen int4
+# define ggo_compile_time 192
+# define ggt_compile_time boolean_t
+# define ggo_curtchain 200
+# define ggt_curtchain triple *
+# define ggo_director_ident 208
+# define ggt_director_ident mstr
+# define ggo_director_mval 224
+# define ggt_director_mval mval
+# define ggo_director_token 256
+# define ggt_director_token char
+# define ggo_dollar_zcstatus 260
+# define ggt_dollar_zcstatus int4
+# define ggo_expr_depth 264
+# define ggt_expr_depth unsigned int
+# define ggo_expr_start 272
+# define ggt_expr_start triple *
+# define ggo_expr_start_orig 280
+# define ggt_expr_start_orig triple *
+# define ggo_defined_symbols 288
+# define ggt_defined_symbols struct sym_table *
+# define ggo_for_stack_ptr 296
+# define ggt_for_stack_ptr oprtype **
+# define ggo_gtm_fullbool 304
+# define ggt_gtm_fullbool unsigned int
+# define ggo_ind_result 312
+# define ggt_ind_result mval *
+# define ggo_ind_source 320
+# define ggt_ind_source mval *
+# define ggo_indirection_mval 328
+# define ggt_indirection_mval mval
+# define ggo_last_source_column 360
+# define ggt_last_source_column int
+# define ggo_max_advancewindow_line 364
+# define ggt_max_advancewindow_line int4
+# define ggo_linkage_first 368
+# define ggt_linkage_first struct linkage_entry *
+# define ggo_linkage_last 376
+# define ggt_linkage_last struct linkage_entry *
+# define ggo_objhash_state 384
+# define ggt_objhash_state hash128_state_t
+# define ggo_pos_in_chain 424
+# define ggt_pos_in_chain triple
+# define ggo_s2n_intlit 560
+# define ggt_s2n_intlit boolean_t
+# define ggo_routine_source_offset 564
+# define ggt_routine_source_offset uint4
+# define ggo_saw_side_effect 568
+# define ggt_saw_side_effect boolean_t
+# define ggo_shift_side_effects 572
+# define ggt_shift_side_effects int
+# define ggo_side_effect_base 576
+# define ggt_side_effect_base boolean_t *
+# define ggo_side_effect_depth 584
+# define ggt_side_effect_depth uint4
+# define ggo_side_effect_handling 588
+# define ggt_side_effect_handling int
+# define ggo_source_error_found 592
+# define ggt_source_error_found int4
+# define ggo_temp_subs 596
+# define ggt_temp_subs boolean_t
+# define ggo_trigger_compile_and_link 600
+# define ggt_trigger_compile_and_link boolean_t
+# define ggo_window_ident 608
+# define ggt_window_ident mstr
+# define ggo_window_mval 624
+# define ggt_window_mval mval
+# define ggo_window_token 656
+# define ggt_window_token char
+# define ggo_dbinit_max_hrtbt_delta 660
+# define ggt_dbinit_max_hrtbt_delta uint4
+# define ggo_dollar_zmaxtptime 664
+# define ggt_dollar_zmaxtptime int4
+# define ggo_donot_commit 668
+# define ggt_donot_commit boolean_t
+# define ggo_donot_write_inctn_in_wcs_recover 672
+# define ggt_donot_write_inctn_in_wcs_recover boolean_t
+# define ggo_gbuff_limit 680
+# define ggt_gbuff_limit mval
+# define ggo_gd_targ_tn 712
+# define ggt_gd_targ_tn trans_num
+# define ggo_gd_targ_reg_array 720
+# define ggt_gd_targ_reg_array trans_num *
+# define ggo_gd_targ_reg_array_size 728
+# define ggt_gd_targ_reg_array_size uint4
+# define ggo_gd_targ_addr 736
+# define ggt_gd_targ_addr gd_addr *
+# define ggo_gd_targ_gvnh_reg 744
+# define ggt_gd_targ_gvnh_reg gvnh_reg_t *
+# define ggo_gd_targ_map 752
+# define ggt_gd_targ_map gd_binding *
+# define ggo_gtm_custom_errors 760
+# define ggt_gtm_custom_errors mstr
+# define ggo_gv_extname_size 776
+# define ggt_gv_extname_size int4
+# define ggo_gv_last_subsc_null 780
+# define ggt_gv_last_subsc_null boolean_t
+# define ggo_gv_mergekey2 784
+# define ggt_gv_mergekey2 gv_key *
+# define ggo_gv_reorgkey 792
+# define ggt_gv_reorgkey gv_key *
+# define ggo_gv_some_subsc_null 800
+# define ggt_gv_some_subsc_null boolean_t
+# define ggo_gv_sparekey 808
+# define ggt_gv_sparekey gv_key *
+# define ggo_gv_sparekey_mval 816
+# define ggt_gv_sparekey_mval mval
+# define ggo_gv_sparekey_size 848
+# define ggt_gv_sparekey_size int4
+# define ggo_gv_tporigkey_ptr 856
+# define ggt_gv_tporigkey_ptr gv_orig_key_array *
+# define ggo_gv_tporig_extnam_str 864
+# define ggt_gv_tporig_extnam_str mstr
+# define ggo_in_gvcst_redo_root_search 880
+# define ggt_in_gvcst_redo_root_search boolean_t
+# define ggo_in_op_gvget 884
+# define ggt_in_op_gvget boolean_t
+# define ggo_issue_DBROLLEDBACK_anyways 888
+# define ggt_issue_DBROLLEDBACK_anyways boolean_t
+# define ggo_last_fnquery_return_subcnt 892
+# define ggt_last_fnquery_return_subcnt int
+# define ggo_last_fnquery_return_varname 896
+# define ggt_last_fnquery_return_varname mval
+# define ggo_ok_to_call_wcs_recover 928
+# define ggt_ok_to_call_wcs_recover boolean_t
+# define ggo_in_gvcst_bmp_mark_free 932
+# define ggt_in_gvcst_bmp_mark_free boolean_t
+# define ggo_prev_gv_target 936
+# define ggt_prev_gv_target gv_namehead *
+# define ggo_ready2signal_gvundef 944
+# define ggt_ready2signal_gvundef boolean_t
+# define ggo_redo_rootsrch_ctxt 952
+# define ggt_redo_rootsrch_ctxt redo_root_search_context
+# define ggo_semwait2long 2112
+# define ggt_semwait2long volatile boolean_t
+# define ggo_skip_file_corrupt_check 2116
+# define ggt_skip_file_corrupt_check boolean_t
+# define ggo_tpnotacidtime 2120
+# define ggt_tpnotacidtime int4
+# define ggo_tp_restart_count 2124
+# define ggt_tp_restart_count uint4
+# define ggo_tp_restart_dont_counts 2128
+# define ggt_tp_restart_dont_counts int4
+# define ggo_tp_restart_entryref 2136
+# define ggt_tp_restart_entryref mval
+# define ggo_tp_restart_failhist_indx 2168
+# define ggt_tp_restart_failhist_indx int4
+# define ggo_tprestart_syslog_delta 2172
+# define ggt_tprestart_syslog_delta int4
+# define ggo_tprestart_syslog_limit 2176
+# define ggt_tprestart_syslog_limit int4
+# define ggo_transform 2180
+# define ggt_transform boolean_t
+# define ggo_wcs_recover_done 2184
+# define ggt_wcs_recover_done boolean_t
+# define ggo_in_op_fnnext 2188
+# define ggt_in_op_fnnext boolean_t
+# define ggo_local_collseq 2192
+# define ggt_local_collseq collseq *
+# define ggo_local_collseq_stdnull 2200
+# define ggt_local_collseq_stdnull boolean_t
+# define ggo_local_coll_nums_as_strings 2204
+# define ggt_local_coll_nums_as_strings boolean_t
+# define ggo_lv_null_subs 2208
+# define ggt_lv_null_subs int
+# define ggo_max_lcl_coll_xform_bufsiz 2212
+# define ggt_max_lcl_coll_xform_bufsiz int
+# define ggo_replgbl 2216
+# define ggt_replgbl replgbl_t
+# define ggo_tqread_nowait 2240
+# define ggt_tqread_nowait boolean_t
+# define ggo_arlink_enabled 2244
+# define ggt_arlink_enabled boolean_t
+# define ggo_arlink_loaded 2248
+# define ggt_arlink_loaded uint4
+# define ggo_collseq_list 2256
+# define ggt_collseq_list collseq *
+# define ggo_create_fatal_error_zshow_dmp_fptr 2264
+# define ggt_create_fatal_error_zshow_dmp_fptr void
+# define gga_create_fatal_error_zshow_dmp_fptr (void)
+typedef void (*ggf_create_fatal_error_zshow_dmp_fptr)(void);
+# define ggo_disable_sigcont 2272
+# define ggt_disable_sigcont boolean_t
+# define ggo_dollar_zcompile 2280
+# define ggt_dollar_zcompile mstr
+# define ggo_dollar_zmode 2296
+# define ggt_dollar_zmode mval
+# define ggo_dollar_zonlnrlbk 2328
+# define ggt_dollar_zonlnrlbk int
+# define ggo_dollar_zclose 2332
+# define ggt_dollar_zclose int
+# define ggo_dollar_zroutines 2336
+# define ggt_dollar_zroutines mstr
+# define ggo_error_on_jnl_file_lost 2352
+# define ggt_error_on_jnl_file_lost unsigned int
+# define ggo_fnzsearch_lv_vars 2360
+# define ggt_fnzsearch_lv_vars lv_val *
+# define ggo_fnzsearch_sub_mval 2368
+# define ggt_fnzsearch_sub_mval mval
+# define ggo_fnzsearch_nullsubs_sav 2400
+# define ggt_fnzsearch_nullsubs_sav int
+# define ggo_fnzsearch_globbuf_ptr 2408
+# define ggt_fnzsearch_globbuf_ptr glob_t *
+# define ggo_glvn_pool_ptr 2416
+# define ggt_glvn_pool_ptr glvn_pool *
+# define ggo_gtmdbgflags 2424
+# define ggt_gtmdbgflags int
+# define ggo_gtmdbgflags_freq 2428
+# define ggt_gtmdbgflags_freq int
+# define ggo_gtmdbgflags_freq_cntr 2432
+# define ggt_gtmdbgflags_freq_cntr int
+# define ggo_gtm_env_init_started 2436
+# define ggt_gtm_env_init_started boolean_t
+# define ggo_gtm_env_xlate_entry 2440
+# define ggt_gtm_env_xlate_entry int
+# define gga_gtm_env_xlate_entry ()
+typedef int (*ggf_gtm_env_xlate_entry)();
+# define ggo_gtm_environment_init 2448
+# define ggt_gtm_environment_init boolean_t
+# define ggo_gtm_sigusr1_handler 2456
+# define ggt_gtm_sigusr1_handler void
+# define gga_gtm_sigusr1_handler (void)
+typedef void (*ggf_gtm_sigusr1_handler)(void);
+# define ggo_gtm_linktmpdir 2464
+# define ggt_gtm_linktmpdir mstr
+# define ggo_gtm_trctbl_cur 2480
+# define ggt_gtm_trctbl_cur trctbl_entry *
+# define ggo_gtm_trctbl_end 2488
+# define ggt_gtm_trctbl_end trctbl_entry *
+# define ggo_gtm_trctbl_groups 2496
+# define ggt_gtm_trctbl_groups unsigned int
+# define ggo_gtm_trctbl_start 2504
+# define ggt_gtm_trctbl_start trctbl_entry *
+# define ggo_gtm_waitstuck_script 2512
+# define ggt_gtm_waitstuck_script mstr
+# define ggo_gtmprompt 2528
+# define ggt_gtmprompt mstr
+# define ggo_gtmsecshr_comkey 2544
+# define ggt_gtmsecshr_comkey unsigned int
+# define ggo_in_zwrite 2548
+# define ggt_in_zwrite boolean_t
+# define ggo_lab_lnr 2552
+# define ggt_lab_lnr lnr_tabent **
+# define ggo_jobexam_counter 2560
+# define ggt_jobexam_counter unsigned int
+# define ggo_lnk_proxy 2568
+# define ggt_lnk_proxy lnk_tabent_proxy
+# define ggo_mprof_alloc_reclaim 2592
+# define ggt_mprof_alloc_reclaim boolean_t
+# define ggo_mprof_chunk_avail_size 2596
+# define ggt_mprof_chunk_avail_size int
+# define ggo_mprof_env_gbl_name 2600
+# define ggt_mprof_env_gbl_name mval
+# define ggo_mprof_ptr 2632
+# define ggt_mprof_ptr mprof_wrapper *
+# define ggo_mprof_reclaim_addr 2640
+# define ggt_mprof_reclaim_addr char *
+# define ggo_mprof_reclaim_cnt 2648
+# define ggt_mprof_reclaim_cnt int
+# define ggo_mprof_stack_curr_frame 2656
+# define ggt_mprof_stack_curr_frame mprof_stack_frame *
+# define ggo_mprof_stack_next_frame 2664
+# define ggt_mprof_stack_next_frame mprof_stack_frame *
+# define ggo_open_relinkctl_list 2672
+# define ggt_open_relinkctl_list open_relinkctl_sgm *
+# define ggo_relinkctl_shm_min_index 2680
+# define ggt_relinkctl_shm_min_index int
+# define ggo_gtm_autorelink_keeprtn 2684
+# define ggt_gtm_autorelink_keeprtn boolean_t
+# define ggo_open_shlib_root 2688
+# define ggt_open_shlib_root open_shlib *
+# define ggo_parm_pool_ptr 2696
+# define ggt_parm_pool_ptr parm_pool *
+# define ggo_parms_cnt 2704
+# define ggt_parms_cnt unsigned int
+# define ggo_zpeek_regname 2708
+# define ggt_zpeek_regname char
+# define ggl_zpeek_regname 31
+# define ggo_zpeek_regname_len 2740
+# define ggt_zpeek_regname_len int
+# define ggo_zpeek_reg_ptr 2744
+# define ggt_zpeek_reg_ptr gd_region *
+# define ggo_pipefifo_interrupt 2752
+# define ggt_pipefifo_interrupt int
+# define ggo_prof_fp 2760
+# define ggt_prof_fp mprof_stack_frame *
+# define ggo_relink_allowed 2768
+# define ggt_relink_allowed int
+# define ggo_save_zhist 2776
+# define ggt_save_zhist zro_hist *
+# define ggo_set_zroutines_cycle 2784
+# define ggt_set_zroutines_cycle uint4
+# define ggo_trans_code_pop 2792
+# define ggt_trans_code_pop mval *
+# define ggo_view_ydirt_str 2800
+# define ggt_view_ydirt_str char *
+# define ggo_view_ydirt_str_len 2808
+# define ggt_view_ydirt_str_len int4
+# define ggo_zdate_form 2812
+# define ggt_zdate_form int4
+# define ggo_zintcmd_active 2816
+# define ggt_zintcmd_active zintcmd_active_info
+# define ggl_zintcmd_active 72
+# define ggo_zro_root 2888
+# define ggt_zro_root zro_ent *
+# define ggo_zsearch_var 2896
+# define ggt_zsearch_var lv_val *
+# define ggo_poll_fds_buffer 2904
+# define ggt_poll_fds_buffer char *
+# define ggo_poll_fds_buffer_size 2912
+# define ggt_poll_fds_buffer_size size_t
+# define ggo_socket_handle_counter 2920
+# define ggt_socket_handle_counter int
+# define ggo_director_string 2924
+# define ggt_director_string char
+# define ggl_director_string 32
+# define ggo_fnpca 2960
+# define ggt_fnpca fnpc_area
+# define ggo_for_stack 21376
+# define ggt_for_stack oprtype *
+# define ggl_for_stack 256
+# define ggo_for_temps 21632
+# define ggt_for_temps boolean_t
+# define ggl_for_temps 128
+# define ggo_last_fnquery_return_sub 21760
+# define ggt_last_fnquery_return_sub mval
+# define ggl_last_fnquery_return_sub 1024
+# define ggo_lcl_coll_xform_buff 22784
+# define ggt_lcl_coll_xform_buff char *
+# define ggo_protmem_ba 22792
+# define ggt_protmem_ba mstr
+# define ggo_parm_ary 22808
+# define ggt_parm_ary char *
+# define ggl_parm_ary 8192
+# define ggo_parm_ary_len 31000
+# define ggt_parm_ary_len int
+# define ggl_parm_ary_len 4096
+# define ggo_parm_str_len 35096
+# define ggt_parm_str_len int
+# define ggl_parm_str_len 4096
+# define ggo_prombuf 39192
+# define ggt_prombuf char
+# define ggl_prombuf 32
+# define ggo_tp_restart_failhist_arry 39224
+# define ggt_tp_restart_failhist_arry char
+# define ggl_tp_restart_failhist_arry 32
+# define ggo_window_string 39256
+# define ggt_window_string char
+# define ggl_window_string 32
+# define ggo_tmp_object_file_name 39288
+# define ggt_tmp_object_file_name char
+# define ggl_tmp_object_file_name 4097
+# define ggo_last_va_list_ptr 43392
+# define ggt_last_va_list_ptr va_list
+# define ggo_util_outbuff 43416
+# define ggt_util_outbuff char
+# define ggl_util_outbuff 6144
+# define ggo_util_outbuff_ptr 49560
+# define ggt_util_outbuff_ptr char *
+# define ggo_util_outptr 49568
+# define ggt_util_outptr char *
+# define ggo_callin_hashtab 49576
+# define ggt_callin_hashtab hash_table_str *
+# define ggo_ci_table 49584
+# define ggt_ci_table callin_entry_list *
+# define ggo_extcall_package_root 49592
+# define ggt_extcall_package_root struct extcall_package_list *
+# define ggo_gtmci_nested_level 49600
+# define ggt_gtmci_nested_level unsigned int
+# define ggo_temp_fgncal_stack 49608
+# define ggt_temp_fgncal_stack unsigned char *
+# define ggo_midchild_send_locals 49616
+# define ggt_midchild_send_locals boolean_t
+# define ggo_want_empty_gvts 49620
+# define ggt_want_empty_gvts boolean_t
+# define ggo_in_mu_swap_root_state 49624
+# define ggt_in_mu_swap_root_state unsigned int
+# define ggo_prev_t_tries 49628
+# define ggt_prev_t_tries unsigned int
+# define ggo_rlbk_during_redo_root 49632
+# define ggt_rlbk_during_redo_root boolean_t
+# define ggo_mlk_yield_pid 49636
+# define ggt_mlk_yield_pid uint4
+# define ggo_jnl_extract_nocol 49640
+# define ggt_jnl_extract_nocol uint4
+# define ggo_skip_gtm_putmsg 49644
+# define ggt_skip_gtm_putmsg boolean_t
+# define ggo_spangbl_seen 49648
+# define ggt_spangbl_seen boolean_t
+# define ggo_no_spangbls 49652
+# define ggt_no_spangbls boolean_t
+# define ggo_max_fid_index 49656
+# define ggt_max_fid_index int
+# define ggo_is_mu_rndwn_rlnkctl 49660
+# define ggt_is_mu_rndwn_rlnkctl int
+# define ggo_expand_prev_key 49664
+# define ggt_expand_prev_key boolean_t
+# define ggo_gtm_autorelink_ctlmax 49668
+# define ggt_gtm_autorelink_ctlmax uint4
+# define ggo_gvt_triggers_read_this_tn 49672
+# define ggt_gvt_triggers_read_this_tn boolean_t
+# define ggo_op_fntext_tlevel 49676
+# define ggt_op_fntext_tlevel uint4
+# define ggo_in_op_fntext 49680
+# define ggt_in_op_fntext boolean_t
+# define ggo_ztrigbuff 49688
+# define ggt_ztrigbuff char *
+# define ggo_ztrigbuffAllocLen 49696
+# define ggt_ztrigbuffAllocLen int
+# define ggo_ztrigbuffLen 49700
+# define ggt_ztrigbuffLen int
+# define ggo_ztrig_use_io_curr_device 49704
+# define ggt_ztrig_use_io_curr_device boolean_t
+# define ggo_continue_proc_cnt 49708
+# define ggt_continue_proc_cnt int
+# define ggo_gtm_test_fake_enospc 49712
+# define ggt_gtm_test_fake_enospc boolean_t
+# define ggo_gtm_usesecshr 49716
+# define ggt_gtm_usesecshr boolean_t
+# define ggo_rts_error_unusable 49720
+# define ggt_rts_error_unusable boolean_t
+# define ggo_rts_error_unusable_seen 49724
+# define ggt_rts_error_unusable_seen boolean_t
+# define ggo_trans_restart_hist_array 49728
+# define ggt_trans_restart_hist_array trans_restart_hist_t
+# define ggl_trans_restart_hist_array 20480
+# define ggo_trans_restart_hist_index 70208
+# define ggt_trans_restart_hist_index uint4
+# define ggo_skip_mv_num_approx_assert 70212
+# define ggt_skip_mv_num_approx_assert boolean_t
+# define ggo_gtm_gvundef_fatal 70216
+# define ggt_gtm_gvundef_fatal boolean_t
+# define ggo_gtm_dirtree_collhdr_always 70220
+# define ggt_gtm_dirtree_collhdr_always boolean_t
+# define ggo_activelv_cycle 70224
+# define ggt_activelv_cycle int
+# define ggo_activelv_index 70228
+# define ggt_activelv_index int
+# define ggo_activelv_dbg_array 70232
+# define ggt_activelv_dbg_array activelv_dbg_t *
+# define ggo_cli_get_str_max_len 70240
+# define ggt_cli_get_str_max_len uint4
+# define ggo_gtmio_skip_tlevel_assert 70244
+# define ggt_gtmio_skip_tlevel_assert boolean_t
+# define ggo_in_trigger_upgrade 70248
+# define ggt_in_trigger_upgrade boolean_t
+# define ggo_gtm_test_autorelink_always 70252
+# define ggt_gtm_test_autorelink_always boolean_t
+# define ggo_fork_without_child_wait 70256
+# define ggt_fork_without_child_wait boolean_t
+# define size_gtm_threadgbl_struct 70264
+#endif
+#endif
diff --git a/sr_x86_64/gtm_threadgbl_deftypes_asm_dbg.si b/sr_x86_64/gtm_threadgbl_deftypes_asm_dbg.si
new file mode 100644
index 0000000..66cb476
--- /dev/null
+++ b/sr_x86_64/gtm_threadgbl_deftypes_asm_dbg.si
@@ -0,0 +1,4 @@
+#
+# Created by gtmthreadgblasm for version V6.0-003 on Linux x86_64 (gtm_threadgbl_deftypes_asm_dbg.si)
+#
+ggo_lnk_proxy = 2568
diff --git a/sr_x86_64/gtm_threadgbl_deftypes_asm_pro.si b/sr_x86_64/gtm_threadgbl_deftypes_asm_pro.si
new file mode 100644
index 0000000..4e3abab
--- /dev/null
+++ b/sr_x86_64/gtm_threadgbl_deftypes_asm_pro.si
@@ -0,0 +1,4 @@
+#
+# Created by gtmthreadgblasm for version V6.0-003 on Linux x86_64 (gtm_threadgbl_deftypes_asm_pro.si)
+#
+ggo_lnk_proxy = 2520
diff --git a/sr_x86_64/linkage.si b/sr_x86_64/linkage.si
index 6500660..dfff158 100644
--- a/sr_x86_64/linkage.si
+++ b/sr_x86_64/linkage.si
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,20 +10,11 @@
 #								#
 #################################################################
 
-#  #define SYMBOL_NAME_STR(X) #X
-#  #define SYMBOL_NAME(X) X
-#  #ifdef __STDC__
-#  #define SYMBOL_NAME_LABEL(X) X##:
-# #else
-# #define SYMBOL_NAME_LABEL(X) X/**/:
-# #endif
-
 .macro SYMBOL_NAME_LABEL X
 \X:
 .endm
 
 .macro ENTRY name
-#	.globl SYMBOL_NAME \name
 	.globl \name
 	.align 16,0x90
 	SYMBOL_NAME_LABEL \name
diff --git a/sr_x86_64/merrors_ansi.h b/sr_x86_64/merrors_ansi.h
index f00646a..558ea24 100644
--- a/sr_x86_64/merrors_ansi.h
+++ b/sr_x86_64/merrors_ansi.h
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -9,7 +10,6 @@
  *								*
  ****************************************************************/
 
-
 const static readonly int error_ansi[] = {
 	   0,	/* ACK */
 	   0,	/* BREAKZST */
@@ -510,8 +510,8 @@ const static readonly int error_ansi[] = {
 	   0,	/* NOPRINCIO */
 	   0,	/* INVPORTSPEC */
 	   0,	/* INVADDRSPEC */
-	  78,	/* UNUSEDMSG677 */
-	   0,	/* UNUSEDMSG678 */
+	  78,	/* UNUSEDMSG678 */
+	   0,	/* UNUSEDMSG679 */
 	  80,	/* SOCKWAIT */
 	  81,	/* SOCKACPT */
 	  80,	/* SOCKINIT */
@@ -609,7 +609,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* FREEZEID */
 	   0,	/* BLKWRITERR */
 	   0,	/* STOPTIMEOUT */
-	   0,	/* UNUSEDMSG776 */
+	   0,	/* UNUSEDMSG777 */
 	   0,	/* BCKUPBUFLUSH */
 	   0,	/* NOFORKCORE */
 	   0,	/* JNLREAD */
@@ -732,7 +732,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* MUINFOUINT4 */
 	   0,	/* NLMISMATCHCALC */
 	   0,	/* RELINKCTLFULL */
-	   0,	/* UNUSEDMSG899 */
+	   0,	/* UNUSEDMSG900 */
 	   0,	/* DBBADNSUB */
 	   0,	/* DBBADKYNM */
 	   0,	/* DBBADPNTR */
@@ -783,7 +783,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* DBMBPFRINT */
 	   0,	/* DBMAXKEYEXC */
 	   0,	/* DBMXRSEXCMIN */
-	   0,	/* UNUSEDMSG950 */
+	   0,	/* UNUSEDMSG951 */
 	   0,	/* DBREADBM */
 	   0,	/* DBCOMPTOOLRG */
 	   0,	/* DBVERPERFWARN2 */
@@ -1152,7 +1152,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* CRYPTKEYFETCHFAILED */
 	   0,	/* CRYPTKEYFETCHFAILEDNF */
 	   0,	/* CRYPTHASHGENFAILED */
-	   0,	/* UNUSEDMSG1319 */
+	   0,	/* UNUSEDMSG1320 */
 	   0,	/* BADTAG */
 	   0,	/* ICUVERLT36 */
 	   0,	/* ICUSYMNOTFOUND */
@@ -1206,7 +1206,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* MUUSERLBK */
 	   0,	/* SETINSETTRIGONLY */
 	   0,	/* DZTRIGINTRIG */
-	   0,	/* UNUSEDMSG1373 */
+	   0,	/* UNUSEDMSG1374 */
 	   0,	/* BOOLSIDEFFECT */
 	   0,	/* DBBADUPGRDSTATE */
 	   0,	/* WRITEWAITPID */
@@ -1218,7 +1218,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* JNLORDBFLU */
 	   0,	/* ZCCLNUPRTNMISNG */
 	   0,	/* ZCINVALIDKEYWORD */
-	   0,	/* UNUSEDMSG1385 */
+	   0,	/* UNUSEDMSG1386 */
 	   0,	/* DBSHMNAMEDIFF */
 	   0,	/* SHMREMOVED */
 	   0,	/* DEVICEWRITEONLY */
@@ -1370,7 +1370,7 @@ const static readonly int error_ansi[] = {
 	   0,	/* ISSPANGBL */
 	   0,	/* TPNOSUPPORT */
 	   0,	/* GVSUBSERR */
-	   0,	/* UNUSEDMSG1539 */
+	   0,	/* UNUSEDMSG1540 */
 	   0,	/* FILTERTIMEDOUT */
 	   0,	/* TLSDLLNOOPEN */
 	   0,	/* TLSINIT */
@@ -1422,4 +1422,15 @@ const static readonly int error_ansi[] = {
 	   0,	/* RLNKRECLATCH */
 	   0,	/* RLNKSHMLATCH */
 	   0,	/* JOBLVN2LONG */
+	   0,	/* JOBLVNDETAIL */
+	   0,	/* PREALLOCATEFAIL */
+	   0,	/* NODFRALLOCSUPP */
+	   0,	/* LASTWRITERBYPAS */
+	   0,	/* TRIGUPBADLABEL */
+	   0,	/* WEIRDSYSTIME */
+	   0,	/* REPLSRCEXITERR */
+	   0,	/* INVZBREAK */
+	   0,	/* INVTMPDIR */
+	   0,	/* ARCTLMAXHIGH */
+	   0,	/* ARCTLMAXLOW */
 	};
diff --git a/sr_x86_64/merrors_ctl.c b/sr_x86_64/merrors_ctl.c
index fc01b83..9482212 100644
--- a/sr_x86_64/merrors_ctl.c
+++ b/sr_x86_64/merrors_ctl.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001,2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -8,7 +9,6 @@
  *	the license, please stop and do not read further.	*
  *								*
  ****************************************************************/
-
 #include "mdef.h"
 #include "error.h"
 
@@ -512,8 +512,8 @@ LITDEF	err_msg merrors[] = {
 	"NOPRINCIO", "Unable to write to principal device", 0,
 	"INVPORTSPEC", "Invalid port specification", 0,
 	"INVADDRSPEC", "Invalid IP address specification", 0,
-	"UNUSEDMSG677", "SOCKPARMREQ last used in V6.0-002", 0,
-	"UNUSEDMSG678", "IPADDRREQ last used in V6.0-002", 0,
+	"UNUSEDMSG678", "SOCKPARMREQ last used in V6.0-002", 0,
+	"UNUSEDMSG679", "IPADDRREQ last used in V6.0-002", 0,
 	"SOCKWAIT", "Error waiting for socket connection", 0,
 	"SOCKACPT", "Error accepting socket connection", 0,
 	"SOCKINIT", "Error initializing socket: (errno == !UL) !AD", 3,
@@ -542,7 +542,7 @@ LITDEF	err_msg merrors[] = {
 	"MUSTANDALONE", "Could not get exclusive access to !AD", 2,
 	"MUNOACTION", "MUPIP unable to perform requested action", 0,
 	"RMBIGSHARE", "File with BIGRECORD specified may only be shared if READONLY", 0,
-	"TPRESTART", "Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16 at XQ", 14,
+	"TPRESTART", "Database !AD; code: !AD; blk: 0x!XL in glbl: ^!AD; pvtmods: !UL, blkmods: !UL, blklvl: !UL, type: !UL, readset: !UL, writeset: !UL, local_tn: 0x!16 at XQ, zpos: !AD", 16,
 	"SOCKWRITE", "Write to a socket failed", 0,
 	"DBCNTRLERR", "Database file !AD: control error suspected but not found", 2,
 	"NOTERMENV", "Environment variable TERM not set.  Assuming \"unknown.\"", 0,
@@ -611,7 +611,7 @@ LITDEF	err_msg merrors[] = {
 	"FREEZEID", "Cache !AD on !AD by freeze id 0x!XL with match 0x!XL from 0x!XJ", 7,
 	"BLKWRITERR", "Unable to queue disk write for block 0x!XL.  Will keep trying.", 1,
 	"STOPTIMEOUT", "Waited too long for stopped process to release.  Region: !AD.", 2,
-	"UNUSEDMSG776", "TRIGMODINTP last used in V6.2-000", 0,
+	"UNUSEDMSG777", "TRIGMODINTP last used in V6.2-000", 0,
 	"BCKUPBUFLUSH", "Unable to flush buffer for online backup", 0,
 	"NOFORKCORE", "Unable to fork off process to create core.  Core creation postponed.", 0,
 	"JNLREAD", "Error reading from journal file !AD at offset [0x!XL]", 3,
@@ -734,7 +734,7 @@ LITDEF	err_msg merrors[] = {
 	"MUINFOUINT4", "!AD : !UL [0x!XL]", 4,
 	"NLMISMATCHCALC", "Location of !AD expected at 0x!XL, but found at 0x!XL", 4,
 	"RELINKCTLFULL", "Relinkctl file for directory !AD is full (maximum entries !UL)", 3,
-	"UNUSEDMSG899", "GTMSECSHRDEFLOG last used in V5.5-000", 0,
+	"UNUSEDMSG900", "GTMSECSHRDEFLOG last used in V5.5-000", 0,
 	"DBBADNSUB", "!AD Bad numeric subscript", 2,
 	"DBBADKYNM", "!AD Bad key name", 2,
 	"DBBADPNTR", "!AD Bad pointer value in directory", 2,
@@ -785,7 +785,7 @@ LITDEF	err_msg merrors[] = {
 	"DBMBPFRINT", "!AD Master bit map shows this map has space, agreeing with MUPIP INTEG", 2,
 	"DBMAXKEYEXC", "!AD Maximum key size for database exceeds design maximum", 2,
 	"DBMXRSEXCMIN", "!AD Maximum record size for database is less than the design minimum", 2,
-	"UNUSEDMSG950", "DBMAXRSEXBL : Last used in V5.5-000", 0,
+	"UNUSEDMSG951", "DBMAXRSEXBL : Last used in V5.5-000", 0,
 	"DBREADBM", "!AD Read error on bitmap", 2,
 	"DBCOMPTOOLRG", "!AD Record has too large compression count", 2,
 	"DBVERPERFWARN2", "Peformance warning: Database !AD is not fully upgraded. Run MUPIP REORG UPGRADE for best overall performance", 2,
@@ -1154,7 +1154,7 @@ LITDEF	err_msg merrors[] = {
 	"CRYPTKEYFETCHFAILED", "Could not retrieve encryption key corresponding to file !AD. !AD", 4,
 	"CRYPTKEYFETCHFAILEDNF", "Could not retrieve encryption key during !AD operation key. !AD", 4,
 	"CRYPTHASHGENFAILED", "Could not generate cryptographic hash for symmetric key corresponding to file !AD. !AD", 4,
-	"UNUSEDMSG1319", "CRYPTNOPSWDINTP : Last used in V6.0-003", 0,
+	"UNUSEDMSG1320", "CRYPTNOPSWDINTP : Last used in V6.0-003", 0,
 	"BADTAG", "Unable to use file !AD (CCSID !UL) with CCSID !UL", 4,
 	"ICUVERLT36", "!AD !UL.!UL. ICU version greater than or equal to 3.6 should be used", 4,
 	"ICUSYMNOTFOUND", "Symbol !AD not found in the ICU libraries. ICU needs to be built with symbol-renaming disabled or gtm_icu_version environment variable needs to be properly specified", 2,
@@ -1208,7 +1208,7 @@ LITDEF	err_msg merrors[] = {
 	"MUUSERLBK", "Abnormal shutdown of replication-enabled database !AD detected", 2,
 	"SETINSETTRIGONLY", "ISV !AD can only be modified in a 'SET' type trigger", 2,
 	"DZTRIGINTRIG", "$ZTRIGGER() is not allowed inside trigger context. Trigger name: !AD", 2,
-	"UNUSEDMSG1373", "SECNODZTRIGINTP : Last used in V6.2-000", 0,
+	"UNUSEDMSG1374", "SECNODZTRIGINTP : Last used in V6.2-000", 0,
 	"BOOLSIDEFFECT", "Extrinsic ($$), External call ($&) or $INCREMENT() with potential side effects in Boolean expression", 0,
 	"DBBADUPGRDSTATE", "Correcting conflicting values for fields describing database version upgrade state in the file header for region !AD (!AD) - make fresh backups with new journal files immediately.", 4,
 	"WRITEWAITPID", "PID !UL waited !UL minute(s) for PID !UL to finish writing block 0x!XL in database file !AD", 6,
@@ -1220,7 +1220,7 @@ LITDEF	err_msg merrors[] = {
 	"JNLORDBFLU", "Error flushing database blocks to !AD. See related messages in the operator log", 2,
 	"ZCCLNUPRTNMISNG", "External call: Cleanup routine name missing. Cannot continue", 0,
 	"ZCINVALIDKEYWORD", "External call: Invalid keyword found. Cannot continue", 0,
-	"UNUSEDMSG1385", "REPLNOMULTILINETRG : Last used in V6.2-000", 0,
+	"UNUSEDMSG1386", "REPLNOMULTILINETRG : Last used in V6.2-000", 0,
 	"DBSHMNAMEDIFF", "Database file !AD points to shared memory (id = !UL) which points to a different database file !AZ", 4,
 	"SHMREMOVED", "Removed Shared Memory id !UL corresponding to file !AD", 3,
 	"DEVICEWRITEONLY", "Cannot read from a write-only device", 0,
@@ -1372,7 +1372,7 @@ LITDEF	err_msg merrors[] = {
 	"ISSPANGBL", "Operation cannot be performed on global ^!AD as it spans multiple regions in current global directory", 2,
 	"TPNOSUPPORT", "Operation cannot be performed while inside of a TP transaction", 0,
 	"GVSUBSERR", "Invalid subscripted global name specification in $VIEW() function", 0,
-	"UNUSEDMSG1539", "TRIGNOSPANBL : Last used in V6.2-000", 0,
+	"UNUSEDMSG1540", "TRIGNOSPANBL : Last used in V6.2-000", 0,
 	"FILTERTIMEDOUT", "Replication server timed out attempting to read seqno !16 at XQ from external filter", 1,
 	"TLSDLLNOOPEN", "Failed to load GT.M TLS/SSL library for secure communication", 0,
 	"TLSINIT", "Failed to initialize GT.M TLS/SSL library for secure communication", 0,
@@ -1408,7 +1408,7 @@ LITDEF	err_msg merrors[] = {
 	"CRYPTBADWRTPOS", "Encrypted WRITE disallowed from a position different than where the last WRITE completed", 0,
 	"LABELNOTFND", "GOTO referenced a label that does not exist", 0,
 	"RELINKCTLERR", "Error with relink control structure for $ZROUTINES directory !AD", 2,
-	"INVLINKTMPDIR", "Value for $gtm_linktmpdir is either not found or not a directory: !AD", 2,
+	"INVLINKTMPDIR", "Value for $gtm_linktmpdir is either not found or not a directory(!AD) - Reverting to default value", 2,
 	"NOEDITOR", "Can't find an executable editor: !AD", 2,
 	"UPDPROC", "Update Process error", 0,
 	"HLPPROC", "Helper Process error", 0,
@@ -1423,7 +1423,18 @@ LITDEF	err_msg merrors[] = {
 	"TLSPARAM", "TLS parameter !AD !AD", 4,
 	"RLNKRECLATCH", "Failed to get latch on relinkctl record for routine name !AZ in $ZROUTINES directory !AD", 3,
 	"RLNKSHMLATCH", "Failed to get latch on relinkctl shared memory for $ZROUTINES directory !AD", 2,
-	"JOBLVN2LONG", "The zwrite representation of a local variable transferred to a JOB'd process can not exceed !UL. Encountered size: !UL", 2,
+	"JOBLVN2LONG", "The zwrite representation of a local variable transferred to a JOB'd process is too long. Please check the output of the JOB'd process for more details", 0,
+	"JOBLVNDETAIL", "The zwrite representation of a local variable transferred to a JOB'd process is too long. The zwrite representation cannot exceed !UL. Encountered size: !UL", 2,
+	"PREALLOCATEFAIL", "Disk space reservation for !AD segment has failed", 2,
+	"NODFRALLOCSUPP", "The NODEFER_ALLOCATE qualifier is not allowed on this operating system. Not changing the defer allocation flag", 0,
+	"LASTWRITERBYPAS", "The last writer for database file !AD bypassed the rundown", 2,
+	"TRIGUPBADLABEL", "Trigger upgrade cannot upgrade label !UL to !UL on ^!AD in region !AD", 6,
+	"WEIRDSYSTIME", "Time reported by the system clock is outside the acceptable range.  Please check and correct the system clock", 0,
+	"REPLSRCEXITERR", "Source server for secondary instance !AZ exited abnormally. See log file !AZ for details.", 2,
+	"INVZBREAK", "Cannot set ZBREAK in direct mode routine (GTM$DMOD)", 0,
+	"INVTMPDIR", "Value or default for $gtm_tmp is either not found or not a directory (!AD) - Reverting to default value", 2,
+	"ARCTLMAXHIGH", "The environment variable !AD = !UL is too high. Assuming the maximum acceptable value of !UL", 4,
+	"ARCTLMAXLOW", "The environment variable !AD = !UL is too low. Assuming the minimum acceptable value of !UL", 4,
 };
 
 LITDEF	int ERR_ACK = 150372361;
@@ -1925,8 +1936,8 @@ LITDEF	int ERR_CCPSIGDMP = 150376323;
 LITDEF	int ERR_NOPRINCIO = 150376332;
 LITDEF	int ERR_INVPORTSPEC = 150376338;
 LITDEF	int ERR_INVADDRSPEC = 150376346;
-LITDEF	int ERR_UNUSEDMSG677 = 150376354;
-LITDEF	int ERR_UNUSEDMSG678 = 150376362;
+LITDEF	int ERR_UNUSEDMSG678 = 150376354;
+LITDEF	int ERR_UNUSEDMSG679 = 150376362;
 LITDEF	int ERR_SOCKWAIT = 150376370;
 LITDEF	int ERR_SOCKACPT = 150376378;
 LITDEF	int ERR_SOCKINIT = 150376386;
@@ -2024,7 +2035,7 @@ LITDEF	int ERR_MEMORYRECURSIVE = 150377116;
 LITDEF	int ERR_FREEZEID = 150377123;
 LITDEF	int ERR_BLKWRITERR = 150377131;
 LITDEF	int ERR_STOPTIMEOUT = 150377138;
-LITDEF	int ERR_UNUSEDMSG776 = 150377146;
+LITDEF	int ERR_UNUSEDMSG777 = 150377146;
 LITDEF	int ERR_BCKUPBUFLUSH = 150377154;
 LITDEF	int ERR_NOFORKCORE = 150377160;
 LITDEF	int ERR_JNLREAD = 150377170;
@@ -2147,7 +2158,7 @@ LITDEF	int ERR_SCNDDBNOUPD = 150378098;
 LITDEF	int ERR_MUINFOUINT4 = 150378107;
 LITDEF	int ERR_NLMISMATCHCALC = 150378114;
 LITDEF	int ERR_RELINKCTLFULL = 150378122;
-LITDEF	int ERR_UNUSEDMSG899 = 150378131;
+LITDEF	int ERR_UNUSEDMSG900 = 150378131;
 LITDEF	int ERR_DBBADNSUB = 150378138;
 LITDEF	int ERR_DBBADKYNM = 150378146;
 LITDEF	int ERR_DBBADPNTR = 150378154;
@@ -2198,7 +2209,7 @@ LITDEF	int ERR_DBMBPFRDLBM = 150378504;
 LITDEF	int ERR_DBMBPFRINT = 150378512;
 LITDEF	int ERR_DBMAXKEYEXC = 150378522;
 LITDEF	int ERR_DBMXRSEXCMIN = 150378530;
-LITDEF	int ERR_UNUSEDMSG950 = 150378538;
+LITDEF	int ERR_UNUSEDMSG951 = 150378538;
 LITDEF	int ERR_DBREADBM = 150378546;
 LITDEF	int ERR_DBCOMPTOOLRG = 150378554;
 LITDEF	int ERR_DBVERPERFWARN2 = 150378560;
@@ -2567,7 +2578,7 @@ LITDEF	int ERR_CRYPTJNLWRONGHASH = 150381458;
 LITDEF	int ERR_CRYPTKEYFETCHFAILED = 150381466;
 LITDEF	int ERR_CRYPTKEYFETCHFAILEDNF = 150381474;
 LITDEF	int ERR_CRYPTHASHGENFAILED = 150381482;
-LITDEF	int ERR_UNUSEDMSG1319 = 150381490;
+LITDEF	int ERR_UNUSEDMSG1320 = 150381490;
 LITDEF	int ERR_BADTAG = 150381498;
 LITDEF	int ERR_ICUVERLT36 = 150381506;
 LITDEF	int ERR_ICUSYMNOTFOUND = 150381514;
@@ -2621,7 +2632,7 @@ LITDEF	int ERR_GVZTRIGFAIL = 150381890;
 LITDEF	int ERR_MUUSERLBK = 150381898;
 LITDEF	int ERR_SETINSETTRIGONLY = 150381906;
 LITDEF	int ERR_DZTRIGINTRIG = 150381914;
-LITDEF	int ERR_UNUSEDMSG1373 = 150381922;
+LITDEF	int ERR_UNUSEDMSG1374 = 150381922;
 LITDEF	int ERR_BOOLSIDEFFECT = 150381928;
 LITDEF	int ERR_DBBADUPGRDSTATE = 150381936;
 LITDEF	int ERR_WRITEWAITPID = 150381946;
@@ -2633,7 +2644,7 @@ LITDEF	int ERR_GTMSECSHRCHDIRF = 150381986;
 LITDEF	int ERR_JNLORDBFLU = 150381994;
 LITDEF	int ERR_ZCCLNUPRTNMISNG = 150382002;
 LITDEF	int ERR_ZCINVALIDKEYWORD = 150382010;
-LITDEF	int ERR_UNUSEDMSG1385 = 150382018;
+LITDEF	int ERR_UNUSEDMSG1386 = 150382018;
 LITDEF	int ERR_DBSHMNAMEDIFF = 150382026;
 LITDEF	int ERR_SHMREMOVED = 150382035;
 LITDEF	int ERR_DEVICEWRITEONLY = 150382042;
@@ -2785,7 +2796,7 @@ LITDEF	int ERR_GBLNOMAPTOREG = 150383202;
 LITDEF	int ERR_ISSPANGBL = 150383210;
 LITDEF	int ERR_TPNOSUPPORT = 150383218;
 LITDEF	int ERR_GVSUBSERR = 150383226;
-LITDEF	int ERR_UNUSEDMSG1539 = 150383234;
+LITDEF	int ERR_UNUSEDMSG1540 = 150383234;
 LITDEF	int ERR_FILTERTIMEDOUT = 150383242;
 LITDEF	int ERR_TLSDLLNOOPEN = 150383250;
 LITDEF	int ERR_TLSINIT = 150383258;
@@ -2837,9 +2848,20 @@ LITDEF	int ERR_TLSPARAM = 150383618;
 LITDEF	int ERR_RLNKRECLATCH = 150383626;
 LITDEF	int ERR_RLNKSHMLATCH = 150383634;
 LITDEF	int ERR_JOBLVN2LONG = 150383642;
+LITDEF	int ERR_JOBLVNDETAIL = 150383650;
+LITDEF	int ERR_PREALLOCATEFAIL = 150383658;
+LITDEF	int ERR_NODFRALLOCSUPP = 150383664;
+LITDEF	int ERR_LASTWRITERBYPAS = 150383672;
+LITDEF	int ERR_TRIGUPBADLABEL = 150383682;
+LITDEF	int ERR_WEIRDSYSTIME = 150383690;
+LITDEF	int ERR_REPLSRCEXITERR = 150383696;
+LITDEF	int ERR_INVZBREAK = 150383706;
+LITDEF	int ERR_INVTMPDIR = 150383714;
+LITDEF	int ERR_ARCTLMAXHIGH = 150383720;
+LITDEF	int ERR_ARCTLMAXLOW = 150383728;
 
 GBLDEF	err_ctl merrors_ctl = {
 	246,
 	"GTM",
 	&merrors[0],
-	1411};
+	1422};
diff --git a/sr_x86_64/mint2mval.s b/sr_x86_64/mint2mval.s
index c2a7f8d..3d78fa0 100644
--- a/sr_x86_64/mint2mval.s
+++ b/sr_x86_64/mint2mval.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,34 +9,26 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
-
-#	PAGE	,132
-	.title	mint2mval.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.include	"mval_def.si"
-
-	.sbttl	mint2mval
-#	PAGE	+
-	.text
-
-# --------------------------------
+#
 # mint2mval.s
 #	Convert int to mval
-# --------------------------------
+# args:
+#	%rax   - (aka REG64_RET0) - Destination mval pointer
+#	%r10d  - (aka REG32_RET1) - Input integer value to convert
+#
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-.extern	i2mval
+	.text
+	.extern	i2mval
 
-# PUBLIC	mint2mval
-ENTRY mint2mval
-	movl	REG32_RET1,REG32_ARG1
-        movq	REG64_RET0,REG64_ARG0
+ENTRY	mint2mval
+	subq	$8, REG_SP		# Align stack to 16 bytes
+	CHKSTKALIGN			# Verify stack alignment
+	movl	REG32_RET1, REG32_ARG1
+        movq	REG64_RET0, REG64_ARG0
 	call	i2mval
+	addq	$8, REG_SP
 	ret
-# mint2mval ENDP
-
-# END
diff --git a/sr_x86_64/mum_tstart.s b/sr_x86_64/mum_tstart.s
index 5d753fa..24c7944 100644
--- a/sr_x86_64/mum_tstart.s
+++ b/sr_x86_64/mum_tstart.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,26 +9,30 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
+#
+# Routine to transfer control from C to M environment driving the top M frame on the stack with optional
+# (depending on thevalue of proc_act_typ) compilation of dynamic code (device or error handler or
+# an outofband driver).
+#
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-	.TITLE	mum_tstart.s
-
-.include	"linkage.si"
-.include	"g_msf.si"
-
-	.sbttl	mum_tstart
 	.data
-.extern	frame_pointer
-.extern	proc_act_type
-.extern xfer_table
+	.extern	frame_pointer
+	.extern	proc_act_type
+	.extern xfer_table
 
 	.text
-.extern	trans_code
+	.extern	trans_code
 
-ENTRY mum_tstart
-	addq	$8, REG_SP	# back up over return address
+ENTRY	mum_tstart
+	addq	$8, REG_SP			# Back up over return address (stack should now be 16 byte aligned)
+	CHKSTKALIGN				# Verify stack alignment
 	cmpw	$0, proc_act_type(REG_IP)
-	je	l1
+	je	notrans
 	call	trans_code
-l1:	getframe
+notrans:
+	getframe				# Pushes return addr on stack
 	leaq	xfer_table(REG_IP), REG_XFER_TABLE
 	ret
diff --git a/sr_x86_64/mval2bool.s b/sr_x86_64/mval2bool.s
index e5a121f..7a9c676 100644
--- a/sr_x86_64/mval2bool.s
+++ b/sr_x86_64/mval2bool.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,36 +9,30 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
-
-#	PAGE	,132
-	.title	mval2bool.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	mval2bool
-#	PAGE	+
-# --------------------------------
+#
 # mval2bool.s
 #	Convert mval to bool
-# --------------------------------
-#	edx - src. mval
+# arg:
+#	%r10 - (aka REG64_RET1) source mval pointer
+# return value:
+#	condition code is set
+#
+
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
 	.text
-.extern	s2n
+	.extern	s2n
 
-# PUBLIC	mval2bool
-ENTRY mval2bool
+ENTRY	mval2bool
+	subq	$8, REG_SP			# Allocate area to align stack to 16 bytes
+	CHKSTKALIGN				# Verify stack alignment
 	mv_force_defined REG_RET1, isdefined
-	pushq	REG_RET1
+	movq	REG_RET1, 0(REG_SP)		# Save mval addr across potential call (it may have been changed)
 	mv_force_num REG_RET1, skip_conv
-	popq    REG_RET1
-	cmpl    $0,mval_l_m1(REG_RET1)		#set condition of flag refgister
+	movq    0(REG_SP), REG_RET1		# Restore mval addr
+	addq	$8, REG_SP			# Release save area
+	cmpl    $0, mval_l_m1(REG_RET1)		# Set condition of flag register
 	ret
-# mval2bool ENDP
-
-# END
diff --git a/sr_x86_64/mval2mint.s b/sr_x86_64/mval2mint.s
index a921821..a3214a8 100644
--- a/sr_x86_64/mval2mint.s
+++ b/sr_x86_64/mval2mint.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,38 +9,30 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
-
-#	PAGE	,132
-	.title	mval2mint.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	mval2mint
-#	PAGE	+
-# --------------------------------
+#
 # mval2mint.s
 #	Convert mval to int
-# --------------------------------
-#	edx - source mval
-#	eax - destination mval
+# arg:
+#	%r10 - (aka REG64_RET1) source mval pointer
+# return value:
+#	%eax - return value int
+#
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
 	.text
-.extern	mval2i
-.extern	s2n
+	.extern	mval2i
+	.extern	s2n
 
-# PUBLIC	mval2mint
-ENTRY mval2mint
+ENTRY	mval2mint
+	subq	$8, REG_SP			# Allocate area to align stack to 16 bytes
+	CHKSTKALIGN				# Verify stack alignment
 	mv_force_defined REG64_RET1, isdefined
-	pushq	REG64_RET1
+	movq	REG64_RET1, 0(REG_SP)		# Save mval ptr - mv_force_defined may have re-defined it
         mv_force_num REG64_RET1, skip_conv
-	popq	REG64_ARG0
+	movq	0(REG_SP), REG64_ARG0		# Move saved value to arg reg
 	call	mval2i
+	addq	$8, REG_SP			# Remove save area
 	ret
-# mval2mint ENDP
-
-# END
diff --git a/sr_x86_64/mval2num.s b/sr_x86_64/mval2num.s
index 3487c48..9a7ce53 100644
--- a/sr_x86_64/mval2num.s
+++ b/sr_x86_64/mval2num.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,32 +9,30 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
+#
+# mval2num.s
+#	Force mval to numeric value if not already - if is approximate, also force it to string
+# arg:
+#	%r10 - (aka REG64_RET1) source mval pointer
+#
+# Note updates mval in place
+#
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	PAGE	,132
-	.title	mval2num.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	mval2num
-#	PAGE	+
 	.text
+	.extern	n2s
+	.extern	s2n
 
-.extern	n2s
-.extern	s2n
-
-# PUBLIC	mval2num
-ENTRY mval2num
+ENTRY	mval2num
+	subq	$8, REG_SP				# Allocate area to align stack to 16 bytes
+	CHKSTKALIGN					# Verify stack alignment
 	mv_force_defined REG64_RET1, isdefined
-	pushq   REG64_RET1                            # save in case call s2n
+	movq	REG64_RET1, 0(REG_SP)			# Save mval ptr - mv_force_defined may have re-defined it
         mv_force_num REG64_RET1, l1
-        popq    REG64_RET1
+	movq	0(REG_SP), REG64_RET1			# Restore saved mval pointer
         mv_force_str_if_num_approx REG64_RET1, l2
+	addq	$8, REG_SP				# Remove save area
 	ret
-# mval2num ENDP
-
-# END
diff --git a/sr_x86_64/mval_def.si b/sr_x86_64/mval_def.si
index 92b13f4..eed0bcc 100644
--- a/sr_x86_64/mval_def.si
+++ b/sr_x86_64/mval_def.si
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,15 +10,12 @@
 #								#
 #################################################################
 
-	.sbttl	mval_def.si
-#	PAGE	+
-# -------------------------------------------
+#
 # mval_def.si
 #
-#	This is an include file for
-#	SCO Unix 80386 masm assembler containing
-#	the macros for mval-related assembly routines.
-# -------------------------------------------
+#	This is an include file for x86-64 assembler routines containing
+#	the macros for mval-related actions.
+#
 
 mval_v_nm		=	0
 mval_v_int		=	1
@@ -42,30 +40,19 @@ mval_m_retarg		=	0x080
 mval_m_utflen		=	0x100
 mval_m_aliascont	=	0x200
 
-#smw 99/7/12 Now using MS VC 5.0 so the following paragraph should
-#		be replaced.
-#	NOTE:  The SCO C compiler pads out bit fields to the length of
-#	the underlying type.  For example, a series of "unsigned int"
-#	bit fields will be padded out to a multiple of 4 bytes, even if
-#	they require less than one byte total, because the underlying
-#	type is "int".  Similarly, a series of "unsigned short" bit
-#	fields will be padded out to a multiple of 2 bytes, and a
-#	series of "unsigned char" will be padded out to a byte boundary.
-#	Also note the padding is not related to alignment, only to
-#	total length.
-#
-#smw 99/10/19 gcc on Linux doesn't do the above
-#
-#	Length of mval in bytes
-mval_byte_len		=	32
+mval_byte_len		=	32	#	Length of mval in bytes
 
+#
 #	Offsets of type, exp, strlen, stradd, num in mval structure
+#
 mval_w_mvtype		=	0
 mval_b_exp		=	2
 mval_l_strlen		=	20
 mval_a_straddr		=	24
 
+#
 #	Address offset of number in mval
+#
 mvalnm_offs		=	4
 mval_l_m0		=	4
 mval_l_m1		=	8
@@ -76,19 +63,22 @@ MANT_LO			=	100000000	# 10**8
 MANT_HI			=	1000000000	# 10**9
 INT_HI			=	1000000		# 10**6
 
+#
 #	Stringpool structure offsets
+#
 base			=	0
 free			=	8
 top			=	16
 
+#
 # mvals passed to these macros must be registers
+#
 
-        .sbttl  mval_def.si    mv_force_defined
-# ---------------------------------------
-#       mv_force_defined(mval, label)
-# ---------------------------------------
+#
+# mv_force_defined(mval, label)
+#
 .macro  mv_force_defined mval, label
-        testw   $(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
+        testw   $(mval_m_str+mval_m_nm), mval_w_mvtype(\mval)
         jne     \label
         movq    \mval, REG64_ARG0
 	movb	$0, REG8_ACCUM	#variable argument list
@@ -97,12 +87,11 @@ top			=	16
 \label:
 .endm
 
-        .sbttl  mval_def.si    mv_force_defined_strict
-# ---------------------------------------
-#       mv_force_defined_strict(mval, label)
-# ---------------------------------------
+#
+# mv_force_defined_strict(mval, label)
+#
 .macro  mv_force_defined_strict mval, label
-	testw   $(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
+	testw   $(mval_m_str+mval_m_nm), mval_w_mvtype(\mval)
 	jne     \label
 	movq    \mval, REG64_ARG0
 	movb	$0, REG8_ACCUM	#variable argument list
@@ -110,144 +99,131 @@ top			=	16
 \label:
 .endm
 
-	.sbttl	mval_def.si    mv_force_str
-# ---------------------------------------
-#	mv_force_str(mval, label)
-# ---------------------------------------
-.macro	mv_force_str	mval, label
-	testw	$mval_m_str,mval_w_mvtype(\mval)
+#
+# mv_force_str(mval, label)
+#
+.macro	mv_force_str mval, label
+	testw	$mval_m_str, mval_w_mvtype(\mval)
 	jne	\label
-	movq	\mval,%rdi
+	movq	\mval, REG64_ARG0
 	call	n2s
 \label:
 .endm
 
-	.sbttl	mval_def.si    mv_force_num
-# ---------------------------------------
-#	mv_force_num(mval, label)
-# ---------------------------------------
+#
+# mv_force_num(mval, label)
+#
 .macro	mv_force_num	mval, label
-	testw	$mval_m_nm,mval_w_mvtype(\mval)
+	testw	$mval_m_nm, mval_w_mvtype(\mval)
 	jne	\label
-	movq	\mval,%rdi
+	movq	\mval, REG64_ARG0
 	call	s2n
 \label:
 .endm
 
-	.sbttl	mval_def.si    mv_force_str_if_num_approx
-# ---------------------------------------
-#	mv_force_str_if_num_approx(mval, label)
-# ---------------------------------------
-.macro	mv_force_str_if_num_approx	mval, label
-	testw	$mval_m_num_approx,mval_w_mvtype(\mval)
+#
+# mv_force_str_if_num_approx(mval, label)
+#
+.macro	mv_force_str_if_num_approx mval, label
+	testw	$mval_m_num_approx, mval_w_mvtype(\mval)
 	je	\label
-	movq	\mval,%rdi
+	movq	\mval, REG64_ARG0
 	call	n2s
 \label:
 .endm
 
-	.sbttl	mval_def.si    mv_i2mval
-# ---------------------------------------
-#	mv_i2mval(int, mval)
-# ---------------------------------------
-.macro	mv_i2mval	int, mval
-	movw	$mval_m_int,mval_w_mvtype(\mval)
-	movl	\int,%eax
-	imull	$MV_BIAS,%eax,%eax
-	movl	%eax,mval_l_m1(\mval)
+#
+# mv_i2mval(int, mval)
+#
+.macro	mv_i2mval int, mval
+	movw	$mval_m_int, mval_w_mvtype(\mval)
+	movl	\int, %eax
+	imull	$MV_BIAS, %eax, %eax
+	movl	%eax, mval_l_m1(\mval)
 .endm
 
-	.sbttl	mval_def.si    mv_if_string
-# ---------------------------------------
-#	mv_if_string(mval,label)
-# ---------------------------------------
-.macro	mv_if_string	mval, label
-	testw	$mval_m_str,mval_w_mvtype(\mval)
+#
+# mv_if_string(mval,label)
+#
+.macro	mv_if_string mval, label
+	testw	$mval_m_str, mval_w_mvtype(\mval)
 	jne	\label
 .endm
 
-	.sbttl	mval_def.si	mv_if_number
-# ---------------------------------------
-#	mv_if_number(mval,label)
-# ---------------------------------------
-.macro	mv_if_number	mval, label
-	testw	$mval_m_nm,mval_w_mvtype(\mval)
+#
+# mv_if_number(mval,label)
+#
+.macro	mv_if_number mval, label
+	testw	$mval_m_nm, mval_w_mvtype(\mval)
 	jne	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_int
-# ---------------------------------------
-#	mv_if_int(mval,label)
-# ---------------------------------------
-.macro	mv_if_int	mval, label
-	testw	$mval_m_int_without_nm,mval_w_mvtype(\mval)
+#
+# mv_if_int(mval,label)
+#
+.macro	mv_if_int mval, label
+	testw	$mval_m_int_without_nm, mval_w_mvtype(\mval)
 	jne	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_notstring
-# ---------------------------------------
-#	mv_if_notstring(mval,label)
-# ---------------------------------------
+#
+# mv_if_notstring(mval,label)
+#
 .macro	mv_if_notstring	mval, label
-	testw	$mval_m_str,mval_w_mvtype(\mval)
+	testw	$mval_m_str, mval_w_mvtype(\mval)
 	je	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_notnumber
-# ---------------------------------------
-#	mv_if_notnumber(mval,label)
-# ---------------------------------------
+#
+# mv_if_notnumber(mval,label)
+#
 .macro	mv_if_notnumber	mval, label
-	testw	$mval_m_nm,mval_w_mvtype(\mval)
+	testw	$mval_m_nm, mval_w_mvtype(\mval)
 	je	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_notint
-# ---------------------------------------
-#	mv_if_notint(mval,label)
-# ---------------------------------------
-.macro	mv_if_notint	mval, label
-	testw	$mval_m_int_without_nm,mval_w_mvtype(\mval)
+#
+# mv_if_notint(mval,label)
+#
+.macro	mv_if_notint mval, label
+	testw	$mval_m_int_without_nm, mval_w_mvtype(\mval)
 	je	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_defined
-# ---------------------------------------
-#	mv_if_defined(mval,label)
-# ---------------------------------------
-.macro	mv_if_defined	mval, label
-	testw	$(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
+#
+# mv_if_defined(mval,label)
+#
+.macro	mv_if_defined mval, label
+	testw	$(mval_m_str+mval_m_nm), mval_w_mvtype(\mval)
 	jne	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_notdefined
-# ---------------------------------------
-#	mv_if_notdefined(mval,label)
-# ---------------------------------------
+#
+# mv_if_notdefined(mval,label)
+#
 .macro	mv_if_notdefined mval, label
-	testw	$(mval_m_str+mval_m_nm),mval_w_mvtype(\mval)
+	testw	$(mval_m_str+mval_m_nm), mval_w_mvtype(\mval)
 	je	\label
 .endm
 
-	.sbttl	mval_def.si    mv_if_canonical
 # -------------------------------------------------------------
 # WARNING:
 # Following macro needs to be supplied with 2 extra labels that
 # are used by local branch instructions, tmp_label1 and tmp_label2
 # -------------------------------------------------------------
-#	mv_if_canonical(mval,mainlabel, tmp_label1, tmp_label2)
-# -------------------------------------------------------------
+#
+# mv_if_canonical(mval, mainlabel, tmp_label1, tmp_label2)
+#
 .macro	mv_if_canonical	mval, mainlabel, tmp_label1, tmp_label2
-	testw	$mval_m_nm,mval_w_mvtype(\mval)
+	testw	$mval_m_nm, mval_w_mvtype(\mval)
 	je	\tmp_label1
-	testw	$mval_m_num_approx,mval_w_mvtype(\mval)
+	testw	$mval_m_num_approx, mval_w_mvtype(\mval)
 	jne	\tmp_label2
 	jmp	\mainlabel
-
 \tmp_label1:
-	movq	\mval,%rdi
+	movq	\mval, REG64_ARG0
 	call	val_iscan
-	cmpl	$0,%eax
+	cmpl	$0, REG32_RET0
 	jne	\mainlabel
 
 \tmp_label2:
diff --git a/sr_x86_64/obj_filesp.c b/sr_x86_64/obj_filesp.c
index 625bf95..fc0d445 100644
--- a/sr_x86_64/obj_filesp.c
+++ b/sr_x86_64/obj_filesp.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2007, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2007-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -110,8 +111,6 @@ GBLREF int4		mlmax, mvmax;
 GBLREF int4		code_size, lit_addrs, lits_size;
 GBLREF int4		psect_use_tab[];	/* bytes of each psect in this module */
 
-error_def(ERR_OBJFILERR);
-
 /* Open the object file and write out the gtm object. Actual ELF creation happens at later stage during close_object_file */
 void create_object_file(rhdtyp *rhead)
 {
@@ -326,4 +325,3 @@ void finish_object_file(void)
         free(string_tbl);
         free(gtm_obj_code);
 }
-
diff --git a/sr_x86_64/op_bkpt.s b/sr_x86_64/op_bkpt.s
index 5d41d67..ce9f7b9 100644
--- a/sr_x86_64/op_bkpt.s
+++ b/sr_x86_64/op_bkpt.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,249 +10,234 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_bkpt.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
+save0	= 0						# Stack offset for first save arg
+save1	= 8						# Stack offset for 2nd save arg
 
-.include "linkage.si"
-	.INCLUDE "g_msf.si"
-
-	.sbttl	opp_zstepret
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
-.extern	zstep_level
+	.data
+	.extern	frame_pointer
+	.extern	zstep_level
 
 	.text
-.extern	gtm_fetch
-.extern	op_retarg
-.extern	op_zbreak
-.extern	op_zst_break
-.extern	op_zst_over
-.extern	op_zstepret
-.extern	opp_ret
-
-# PUBLIC	opp_zstepret
-ENTRY opp_zstepret
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movw	msf_typ_off(REG64_ACCUM),REG16_SCRATCH1
-	testw	$1,REG16_SCRATCH1
+	.extern	gtm_fetch
+	.extern	op_retarg
+	.extern	op_zbreak
+	.extern	op_zst_break
+	.extern	op_zst_over
+	.extern	op_zstepret
+	.extern	opp_ret
+
+ENTRY	opp_zstepret
+	subq	$8, REG_SP				# Align stack to 16 bytes
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	movw	msf_typ_off(REG64_ACCUM), REG16_SCRATCH1
+	testw	$1, REG16_SCRATCH1
 	je	l1
-	movq	zstep_level(REG_IP),REG64_ARG2
-	cmpq	REG64_ACCUM,REG64_ARG2
+	movq	zstep_level(REG_IP), REG64_ARG2
+	cmpq	REG64_ACCUM, REG64_ARG2
 	jg	l1
 	call	op_zstepret
-l1:	jmp	opp_ret
-
-# PUBLIC	opp_zstepretarg
-ENTRY opp_zstepretarg
-	pushq   REG64_RET0
-	pushq	REG64_RET1
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movw	msf_typ_off(REG64_ACCUM),REG16_ARG2
-	testw	$1,REG16_ARG2
+l1:
+	addq	$8, REG_SP				# Remove stack alignment bump
+	jmp	opp_ret
+
+ENTRY	opp_zstepretarg
+	subq	$24, REG_SP				# Align stack to 16 bytes plus 2 long int save areas
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET0, save0(REG_SP)		# Save input regs
+	movq	REG64_RET1, save1(REG_SP)
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	movw	msf_typ_off(REG64_ACCUM), REG16_ARG2
+	testw	$1, REG16_ARG2
 	je	l2
-	movq	zstep_level(REG_IP),REG64_ARG2
+	movq	zstep_level(REG_IP), REG64_ARG2
 	cmpq	REG64_ACCUM, REG64_ARG2
 	jg	l2
 	call	op_zstepret
-l2:	popq	REG64_RET1
-	popq	REG64_RET0
+l2:
+	movq	save1(REG_SP), REG64_RET1		# Restore input regs
+	movq	save0(REG_SP), REG64_RET0
+	addq	$24, REG_SP				# Remove our stack bump
 	jmp	op_retarg
-# opp_zstepretarg ENDP
 
-# PUBLIC	op_zbfetch
-ENTRY op_zbfetch
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movb    $0,REG8_ACCUM             # variable length argumentt
+ENTRY	op_zbfetch
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
+	movb    $0, REG8_ACCUM             		# Variable length argumentt
 	call	gtm_fetch
-	#popq	REG64_ACCUM
-	#leaq	(REG_SP,REG64_ACCUM,8),REG_SP
-	movq	frame_pointer(REG_IP),REG64_ARG0
+	movq	frame_pointer(REG_IP), REG64_ARG0
 	call	op_zbreak
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-# op_zbfetch ENDP
 
-# PUBLIC	op_zbstart
-ENTRY op_zbstart
-	movq	frame_pointer(REG_IP),REG64_ARG0
-	popq	msf_mpc_off(REG64_ARG0)
+ENTRY	op_zbstart
+	movq	frame_pointer(REG_IP), REG64_ARG0
+	popq	msf_mpc_off(REG64_ARG0)			# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
 	call	op_zbreak
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-# op_zbstart ENDP
 
-# PUBLIC	op_zstepfetch
-ENTRY op_zstepfetch
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movb    $0,REG8_ACCUM             # variable length argument
+ENTRY	op_zstepfetch
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
+	movb    $0, REG8_ACCUM             		# Variable length argument
 	call	gtm_fetch
-	#popq	REG64_ACCUM
-	#leaq	(REG_SP,REG64_ACCUM,8),REG_SP
 	call	op_zst_break
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-# op_zstepfetch ENDP
 
-# PUBLIC	op_zstepstart
-ENTRY op_zstepstart
-	movq	frame_pointer(REG_IP),REG64_ARG2
-	popq	msf_mpc_off(REG64_ARG2)
+ENTRY	op_zstepstart
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	popq	msf_mpc_off(REG64_ARG2)			# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
 	call	op_zst_break
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-# op_zstepstart ENDP
 
-# PUBLIC	op_zstzbfetch
-ENTRY op_zstzbfetch
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movb    $0,REG8_ACCUM             # variable length argument
+ENTRY	op_zstzbfetch
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
+	movb    $0, REG8_ACCUM             		# Variable length argument
 	call	gtm_fetch
-	#popq	REG64_ACCUM
-	#leaq	(REG_SP,REG64_ACCUM,8),REG_SP
-	movq	frame_pointer(REG_IP),REG64_ARG0
+	movq	frame_pointer(REG_IP), REG64_ARG0
 	call	op_zbreak
 	call	op_zst_break
 	getframe
 	ret
-# op_zstzbfetch ENDP
 
-# PUBLIC	op_zstzbstart
-ENTRY op_zstzbstart
-	movq	frame_pointer(REG_IP),REG64_ARG0
-	popq	msf_mpc_off(REG64_ARG0)
+ENTRY	op_zstzbstart
+	movq	frame_pointer(REG_IP), REG64_ARG0
+	popq	msf_mpc_off(REG64_ARG0)			# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
 	call	op_zbreak
 	call	op_zst_break
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-# op_zstzbstart ENDP
 
-# PUBLIC	op_zstzb_fet_over
-ENTRY op_zstzb_fet_over
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movb    $0,REG8_ACCUM             # variable length argument
+ENTRY	op_zstzb_fet_over
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save return address and remove from stack (now 16 byte aligned)
+	movb    $0, REG8_ACCUM             		# Variable length argument
+	CHKSTKALIGN					# Verify stack alignment
 	call	gtm_fetch
-	#popq	REG64_ACCUM
-	#leaq	(REG_SP,REG64_ACCUM,8),REG_SP
-	movq	frame_pointer(REG_IP),REG64_ARG0
+	movq	frame_pointer(REG_IP), REG64_ARG0
 	call	op_zbreak
-	movq	zstep_level(REG_IP),REG64_ARG2
+	movq	zstep_level(REG_IP), REG64_ARG2
 	movq    frame_pointer(REG_IP), REG64_SCRATCH1
-	cmpq	REG64_SCRATCH1,REG64_ARG2
+	cmpq	REG64_SCRATCH1, REG64_ARG2
 	jae	l3
-	cmpl	$0,REG32_RET0
+	cmpl	$0, REG32_RET0
 	jne	l5
 	jmp	l4
-
-l3:	call	op_zst_break
-l4:	getframe
+l3:
+	call	op_zst_break
+l4:
+	getframe					# Pushes return addr on stack
 	ret
-
-l5:	call	op_zst_over
-	movq	frame_pointer(REG_IP),REG64_ARG2
-	pushq	msf_mpc_off(REG_IP)
+l5:
+	call	op_zst_over
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	pushq	msf_mpc_off(REG_IP)			# Restore return address
 	ret
-# op_zstzb_fet_over ENDP
 
-# PUBLIC	op_zstzb_st_over
-ENTRY op_zstzb_st_over
-	movq	frame_pointer(REG_IP),REG64_ARG0
-	popq	msf_mpc_off(REG64_ARG0)
+ENTRY	op_zstzb_st_over
+	movq	frame_pointer(REG_IP), REG64_ARG0
+	popq	msf_mpc_off(REG64_ARG0)			# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
 	call	op_zbreak
-	movq	zstep_level(REG_IP),REG64_ARG0
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	cmpq	REG64_SCRATCH1,REG64_ARG0
+	movq	zstep_level(REG_IP), REG64_ARG0
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	cmpq	REG64_SCRATCH1, REG64_ARG0
 	jae	l6
-	cmpl	$0,REG32_RET0
+	cmpl	$0, REG32_RET0
 	jne	l8
 	jmp	l7
-
-l6:	call	op_zst_break
-l7:	getframe
+l6:
+	call	op_zst_break
+l7:
+	getframe					# Pushes return addr on stack
 	ret
-
-l8:	call	op_zst_over
-	movq	frame_pointer(REG_IP),REG64_ARG0
-	pushq	msf_mpc_off(REG64_ARG0)
+l8:
+	call	op_zst_over
+	movq	frame_pointer(REG_IP), REG64_ARG0
+	pushq	msf_mpc_off(REG64_ARG0)			# Restore return address
 	ret
-# op_zstzb_st_over ENDP
 
-# PUBLIC	op_zst_fet_over
-ENTRY op_zst_fet_over
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movb    $0,REG8_ACCUM             # variable length argument
+ENTRY	op_zst_fet_over
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
+	movb    $0, REG8_ACCUM				# Variable length argument
 	call	gtm_fetch
-	#popq	REG64_ACCUM
-	#leaq	(REG_SP,REG64_ACCUM,8),REG_SP
-	movq	zstep_level(REG_IP),REG64_ACCUM
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	cmpq	REG64_SCRATCH1,REG64_ACCUM
+	movq	zstep_level(REG_IP), REG64_ACCUM
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	cmpq	REG64_SCRATCH1, REG64_ACCUM
 	jg	l9
 	call	op_zst_break
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-
-l9:	call	op_zst_over
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	pushq	msf_mpc_off(REG64_ACCUM)
+l9:
+	call	op_zst_over
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	pushq	msf_mpc_off(REG64_ACCUM)		# Restore return address
 	ret
-# op_zst_fet_over ENDP
 
-# PUBLIC	op_zst_st_over
-ENTRY op_zst_st_over
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movq	zstep_level(REG_IP),REG64_ARG2
-	cmpq	REG64_ACCUM,REG64_ARG2
+ENTRY	op_zst_st_over
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save return address and remove from stack (now 16 byte aligned)
+	CHKSTKALIGN					# Verify stack alignment
+	movq	zstep_level(REG_IP), REG64_ARG2
+	cmpq	REG64_ACCUM, REG64_ARG2
 	jg	l10
 	call	op_zst_break
-	getframe
+	getframe					# Pushes return addr on stack
 	ret
-
-l10:	call	op_zst_over
-	movq	frame_pointer(REG_IP),REG64_ARG2
-	pushq	msf_mpc_off(REG64_ARG2)
+l10:
+	call	op_zst_over
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	pushq	msf_mpc_off(REG64_ARG2)			# Restore return address
 	ret
-# op_zst_st_over ENDP
 
-# PUBLIC	opp_zst_over_ret
-ENTRY opp_zst_over_ret
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movw	msf_typ_off(REG64_ACCUM),REG16_ARG2
-	testw	$1,REG16_ARG2
+ENTRY	opp_zst_over_ret
+	subq	$8, REG_SP				# Align stack to 16 bytes
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	movw	msf_typ_off(REG64_ACCUM), REG16_ARG2
+	testw	$1, REG16_ARG2
 	je	l11
-	movq	zstep_level(REG_IP),REG64_ARG2
-	movq	msf_old_frame_off(REG64_ACCUM),REG64_ACCUM
-	cmpq	REG64_ACCUM,REG64_ARG2
+	movq	zstep_level(REG_IP), REG64_ARG2
+	movq	msf_old_frame_off(REG64_ACCUM), REG64_ACCUM
+	cmpq	REG64_ACCUM, REG64_ARG2
 	jg	l11
 	call	op_zstepret
-l11:	jmp	opp_ret
-# opp_zst_over_ret ENDP
-
-# PUBLIC	opp_zst_over_retarg
-ENTRY opp_zst_over_retarg
-	pushq	REG64_RET0
-	pushq	REG64_RET1
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movw	msf_typ_off(REG64_ACCUM),REG16_ARG2
-	testw	$1,REG16_ARG2
+l11:
+	addq	$8, REG_SP				# Remove stack alignment bump
+	jmp	opp_ret
+
+ENTRY	opp_zst_over_retarg
+	subq	$24, REG_SP				# Align stack to 16 bytes plus 2 long int save areas
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET0, save0(REG_SP)		# Save input regs
+	movq	REG64_RET1, save1(REG_SP)
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	movw	msf_typ_off(REG64_ACCUM), REG16_ARG2
+	testw	$1, REG16_ARG2
 	je	l12
-	movq	zstep_level(REG_IP),REG64_ARG2
-	movq	msf_old_frame_off(REG64_ACCUM),REG64_ACCUM
-	cmpq	REG64_ACCUM,REG64_ARG2
+	movq	zstep_level(REG_IP), REG64_ARG2
+	movq	msf_old_frame_off(REG64_ACCUM), REG64_ACCUM
+	cmpq	REG64_ACCUM, REG64_ARG2
 	jg	l12
 	call	op_zstepret
-l12:	popq	REG64_RET1
-	popq	REG64_RET0
+l12:
+	movq	save1(REG_SP), REG64_RET1		# Restore input regs
+	movq	save0(REG_SP), REG64_RET0
+	addq	$24, REG_SP				# Remove our stack bump
 	jmp	op_retarg
-# opp_zst_over_retarg ENDP
-
-# END
diff --git a/sr_x86_64/op_call.s b/sr_x86_64/op_call.s
index 99d5461..05b6e35 100644
--- a/sr_x86_64/op_call.s
+++ b/sr_x86_64/op_call.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,34 +10,32 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_call.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_callb
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	copy_stack_frame
+	.extern	copy_stack_frame
 
-# PUBLIC	op_callb
-ENTRY op_calll
-ENTRY op_callw
-ENTRY op_callb
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	movq	(REG_SP),REG64_ACCUM
-	enter $0,$0
-	movq	REG64_ACCUM,msf_mpc_off(REG64_SCRATCH1)
-	addq	REG64_ARG0,msf_mpc_off(REG64_SCRATCH1)	# OCNT_REF triple newly added to send byte offset from return address
-	call	copy_stack_frame		# Refer emit_code.c
-	leave
+#
+# op_call - Sets up a local routine call (does not leave routine)
+#
+# Argument:
+#	REG64_ARG0 - Value from OCNT_REF triple that contains the byte offset from the return address
+#		     where the local call should actually return to.
+#
+ENTRY	op_calll
+ENTRY	op_callw
+ENTRY	op_callb
+	movq	(REG_SP), REG64_ACCUM			# Save return addr in reg
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	REG64_ACCUM, msf_mpc_off(REG64_SCRATCH1) # Save return addr in M frame
+	addq	REG64_ARG0, msf_mpc_off(REG64_SCRATCH1)	# Add in return offset
+	call	copy_stack_frame			# Copy current stack frame for local call
+	addq	$8, REG_SP				# Remove stack alignment bump
 	ret
-# op_callb ENDP
-# END
diff --git a/sr_x86_64/op_callsp.s b/sr_x86_64/op_callsp.s
index dba3292..3124ca3 100644
--- a/sr_x86_64/op_callsp.s
+++ b/sr_x86_64/op_callsp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,38 +10,41 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_callsp.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_callsp
-#	PAGE	+
-	.DATA
-.extern	dollar_truth
-.extern	frame_pointer
+	.data
+	.extern	dollar_truth
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame
-.extern	push_tval
+	.extern	exfun_frame
+	.extern	push_tval
 
-	.sbttl	op_callspb
-# PUBLIC	op_callspb
-ENTRY op_callspl
-ENTRY op_callspw
-ENTRY op_callspb
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	movq	(REG_SP),REG64_ACCUM                        # Return address
-	movq	REG64_ACCUM,msf_mpc_off(REG64_SCRATCH1)
-	addq	REG64_ARG0,msf_mpc_off(REG64_SCRATCH1)
-	call	exfun_frame
-	movl	dollar_truth(REG_IP),REG32_ARG0
+#
+# op_callsp - Used to build a new stack level for argumentless DO (also saves $TEST)
+#
+# Argument:
+#	REG64_ARG0 - Value from OCNT_REF triple that contains the byte offset from the return address
+#		     to return to when the level pops.
+#
+# Note this routine calls exfun_frame() instead of copy_stack_frame() because this routine needs to provide a
+# separate set of compiler temps for use by the new frame. Particularly when it called on same line with FOR.
+#
+ENTRY	op_callspl
+ENTRY	op_callspw
+ENTRY	op_callspb
+	movq	(REG_SP), REG64_ACCUM			# Save return addr in reg
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	REG64_ACCUM, msf_mpc_off(REG64_SCRATCH1) # Save return addr in M frame
+	addq	REG64_ARG0, msf_mpc_off(REG64_SCRATCH1) # Add in return offset
+	call	exfun_frame				# Copies stack frame and creates new temps
+	movl	dollar_truth(REG_IP), REG32_ARG0
 	call	push_tval
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	movq	msf_temps_ptr_off(REG64_SCRATCH1),REG_FRAME_TMP_PTR
+	movq	frame_pointer(REG_IP), REG_FRAME_POINTER
+	movq	msf_temps_ptr_off(REG_FRAME_POINTER), REG_FRAME_TMP_PTR
+	addq	$8, REG_SP				# Remove stack alignment bump
 	ret
-# op_callspb ENDP
diff --git a/sr_x86_64/op_contain.s b/sr_x86_64/op_contain.s
index 03ae01a..53183d1 100644
--- a/sr_x86_64/op_contain.s
+++ b/sr_x86_64/op_contain.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2009 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,53 +10,46 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_contain.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
+sav_rax		= -8
+sav_rdx		= -16
+arg5		= -24
+arg6		= -32
+SAVE_SIZE	= 32
 
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_contain
-#	PAGE	+
 	.text
-sav_rax	=	-8
-sav_rdx	=	-16
-
-.extern	matchc
-.extern	n2s
+	.extern	matchc
+	.extern	n2s
 
-# PUBLIC	op_contain
-ENTRY op_contain
-	enter	$16,$0
-	movq	REG64_RET1,sav_rdx(REG_FRAME_POINTER)
+ENTRY	op_contain
+	pushq	%rbp					# Save %rbp (aka REG_FRAME_POINTER) - aligns stack to 16 bytes
+	movq	REG_SP, %rbp				# Save current stack pointer to %rbp
+	subq	$SAVE_SIZE, REG_SP			# Get 16 byte save area and room for two parms
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET1, sav_rdx(%rbp)
 	mv_force_defined REG64_RET0, l1
-	movq	REG64_RET0,sav_rax(REG_FRAME_POINTER)
-	mv_force_str	REG64_RET0, l2
-	movq	sav_rdx(REG_FRAME_POINTER),REG64_RET1
+	movq	REG64_RET0, sav_rax(%rbp)
+	mv_force_str REG64_RET0, l2
+	movq	sav_rdx(%rbp), REG64_RET1
 	mv_force_defined REG64_RET1, l3
-	movq    REG64_RET1,sav_rdx(REG_FRAME_POINTER)
+	movq    REG64_RET1, sav_rdx(%rbp)
 	mv_force_str	REG64_RET1, l4
-	subq	$8,REG_SP
-	movq	REG_SP,REG64_ARG5					# 6th Argument
-	movq	$1,(REG_SP)						# init arg to 1.
-	subq	$8,REG_SP
-	movq	REG_SP,REG64_ARG4					# 5th Argument
-	movq	sav_rax(REG_FRAME_POINTER),REG64_RET0
-	movq	sav_rdx(REG_FRAME_POINTER),REG64_RET1
-	movq 	mval_a_straddr(REG64_RET0),REG64_ARG3			# 4th Argument
-	movl	mval_l_strlen(REG64_RET0),REG32_ARG2			# 3rd Argument
-	movq	mval_a_straddr(REG64_RET1),REG64_ARG1			# 2nd Argument
-	movl	mval_l_strlen(REG64_RET1),REG32_ARG0
+	leaq	arg6(%rbp), REG64_ARG5			# 6th Argument address
+	movq	$1, 0(REG64_ARG5)			# init arg to 1
+	leaq	arg5(%rbp), REG64_ARG4			# 5th Argument address
+	movq	sav_rax(%rbp), REG64_RET0
+	movq	sav_rdx(%rbp), REG64_RET1
+	movq 	mval_a_straddr(REG64_RET0), REG64_ARG3	# 4th Argument
+	movl	mval_l_strlen(REG64_RET0), REG32_ARG2	# 3rd Argument
+	movq	mval_a_straddr(REG64_RET1), REG64_ARG1	# 2nd Argument
+	movl	mval_l_strlen(REG64_RET1), REG32_ARG0
 	call	matchc
-	movl	(REG_SP), REG32_RET0    # The 5th argument is a pointer to a int. So read only 4 bytes
-	addq    $1, REG_SP
-	cmpl	$0,REG32_RET0
-	leave
+	movl	arg5(%rbp), REG32_RET0    		# Return int arg5 value
+	addq	$SAVE_SIZE, REG_SP
+	popq	%rbp
+	cmpl	$0, REG32_RET0
 	ret
-# op_contain ENDP
-
-# END
diff --git a/sr_x86_64/op_currtn.s b/sr_x86_64/op_currtn.s
index cc5e924..89d3f97 100644
--- a/sr_x86_64/op_currtn.s
+++ b/sr_x86_64/op_currtn.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,34 +10,27 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_currtn.s
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "g_msf.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE "mval_def.si"
-
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_currtn
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
 
-# PUBLIC	op_currtn
-ENTRY op_currtn
-	movw	$mval_m_str,mval_w_mvtype(REG64_RET1)
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	movq	msf_rvector_off(REG64_SCRATCH1),REG64_RET0
-	movl	mrt_rtn_len(REG64_RET0),REG32_SCRATCH1
-	movl	REG32_SCRATCH1,mval_l_strlen(REG64_RET1)
-	movq	mrt_rtn_addr(REG64_RET0),REG64_SCRATCH1
-	movq	REG64_SCRATCH1,mval_a_straddr(REG64_RET1)
+#
+# Routine to fill in an mval with the current routine name.
+#
+# Note since this routine makes no calls, stack alignment is not critical. If ever a call is added then this
+# routine should take care to align the stack to 16 bytes and add a CHKSTKALIGN macro.
+#
+ENTRY	op_currtn
+	movw	$mval_m_str, mval_w_mvtype(REG64_RET1)
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	msf_rvector_off(REG64_SCRATCH1), REG64_RET0
+	movl	mrt_rtn_len(REG64_RET0), REG32_SCRATCH1
+	movl	REG32_SCRATCH1, mval_l_strlen(REG64_RET1)
+	movq	mrt_rtn_addr(REG64_RET0), REG64_SCRATCH1
+	movq	REG64_SCRATCH1, mval_a_straddr(REG64_RET1)
 	ret
-# op_currtn ENDP
-
-# END
diff --git a/sr_x86_64/op_equ.s b/sr_x86_64/op_equ.s
index d0225ad..510e21c 100644
--- a/sr_x86_64/op_equ.s
+++ b/sr_x86_64/op_equ.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,26 +10,19 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_equ.s
-	.sbttl	op_equ
-
-.include "g_msf.si"
-.include "linkage.si"
-
-#	.386
-#	.MODEL	FLAT, C
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 
 	.text
-.extern	is_equ
+	.extern	is_equ
 
-# PUBLIC	op_equ
-ENTRY op_equ
+ENTRY	op_equ
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
 	movq	REG_RET1, REG64_ARG1
 	movq	REG_RET0, REG64_ARG0
 	call	is_equ
-	cmpl	$0,REG32_RET0
+	addq	$8, REG_SP				# Remove stack alignment bump
+	cmpl	$0, REG32_RET0
 	ret
-# op_equ	ENDP
-
-# END
diff --git a/sr_x86_64/op_equnul.s b/sr_x86_64/op_equnul.s
index 13c213d..392f8cf 100644
--- a/sr_x86_64/op_equnul.s
+++ b/sr_x86_64/op_equnul.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,50 +10,53 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_equnul.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_equnul
-#	PAGE	+
-	.DATA
-.extern	undef_inhibit
+	.data
+	.extern	undef_inhibit
 
 	.text
-.extern	underr
-
-# PUBLIC	op_equnul
-ENTRY op_equnul
-	enter $0, $0   # Align the stack to 16 bytes
-	mv_if_notdefined REG64_RET0, l3
-	testw	$mval_m_str,mval_w_mvtype(REG64_RET0)
-	je	l2
-	cmpl	$0,mval_l_strlen(REG64_RET0)
-	jne	l2
-l1:	movl	$1,REG32_RET0
-	cmpl	$0,REG32_RET0
-	leave
-	ret
-
-l2:	movl	$0,REG32_RET0
-	cmpl	$0,REG32_RET0
-	leave
-	ret
-
-l3:	cmpb	$0,undef_inhibit(REG_IP)	# not defined
-	jne	l1			# if undef_inhibit, then all undefined
-					# values are equal to null string
-	movq	REG64_RET0,REG64_ARG0
-	movb    $0,REG8_ACCUM             # variable length argumentt
-	call	underr
-	leave
+	.extern	underr
+
+#
+# Routine to compare input mval (passed in REG64_RET0) to see if it is the NULL string. Primary return is setting
+# the condition code for a conditional branch in the caller. If caller wants/needs it, the return (int) value is
+# also set.
+#
+ENTRY	op_equnul
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	mv_if_notdefined REG64_RET0, undefmval
+	testw	$mval_m_str, mval_w_mvtype(REG64_RET0)	# See if a string
+	je	notnullstr				# If not a string, then not a null string
+	cmpl	$0, mval_l_strlen(REG64_RET0)		# Verify string length is 0
+	jne	notnullstr				# If not, not a null string
+nullstr:
+	#
+	# We have a null string. Return value not really used but set it for comparison purposes
+	#
+	movl	$1, REG32_RET0
+	jmp	done
+notnullstr:
+	#
+	# We have either a non-null string or not a string at all.
+	#
+	movl	$0, REG32_RET0
+done:
+	addq	$8, REG_SP				# Remove stack alignment bump
+	cmpl	$0, REG32_RET0				# Set condition code for caller
 	ret
-# op_equnul ENDP
-
-# END
+	#
+	# Here when input mval not defined. If undef_inhibit set, make the assumption the value is the NULL string.
+	# Else, raise the undef error.
+	#
+undefmval:
+	cmpb	$0, undef_inhibit(REG_IP)		# Test undef_inhibit setting
+	jne	nullstr					# It's set, return as if was NULL
+	movq	REG64_RET0, REG64_ARG0			# Move mval to arg register
+	movb    $0, REG8_ACCUM             		# Variable length argumentt
+	call	underr					# Give undef error
+	jmp	done					# Should never return but if do - at least return
diff --git a/sr_x86_64/op_exfun.s b/sr_x86_64/op_exfun.s
index 31950e1..1f5ea43 100644
--- a/sr_x86_64/op_exfun.s
+++ b/sr_x86_64/op_exfun.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2013 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,110 +10,132 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_exfun.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-	.sbttl	op_exfun
-#	PAGE	+
-#	call op_exfun with the following stack:
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
+#
+# Routine to set up the stack frame for a local (same routine) invocation. It can
+# be one of any of the following forms:
+#
+#   1. A local call with parameters (OC_EXCAL triple - DO rtn(parms)). In this case the
+#      address of the return value is NULL.
+#   2. A local extrinsic with no parameters (OC_EXFUN triple $$func).
+#   2. A local extrinsic with parameters (OC_EXFUN triple $$func(parms)).
+#
+# Arguments:
+#
+#   REG_ARG0: Address of return value
+#   REG_ARG1: Offset from our return address to where this stackframe needs to return
+#   REG_ARG2: Mask
+#   REG_ARG3: Actualcnt
+#   REG_ARG4: Actuallist1 address
+#   REG_ARG5: Actuallist2 address
+#   (remainder of args on stack if any)
+#
+# Note no need to save %rbp in the prologue as it gets reset to the new frame when we return
 #
-#		return PC
-#		ret_value address
-#		offset from our return address to where this stackframe needs to return
-# 		mask
-#		actualcnt
-#		actual1 address
-#		actual2 address
-#		...
 
-	.DATA
-.extern	ERR_GTMCHECK
-.extern	dollar_truth
-.extern	frame_pointer
+	.data
+	.extern	ERR_GTMCHECK
+	.extern	dollar_truth
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame
-.extern	push_parm
-.extern	rts_error
-
-arg2_off	=	-72
-arg1_off	=	-64
-arg0_off	=	-56
-act_cnt		=	-48
-mask_arg	=	-44
-ret_val		=	-40
-rtn_pc		=	-32
+	.extern	exfun_frame
+	.extern	push_parm
+	.extern	rts_error
 
-sav_esi		=	-8
-sav_ebx		=	-16
-sav_msf		=	-24
+arg2_off	= -48
+arg1_off	= -40
+arg0_off	= -32
+act_cnt		= -24
+mask_arg	= -20
+ret_val		= -16
+rtn_pc		= -8
+FRAME_SAVE_SIZE	= 56					# This size 16 byte aligns the stack
 
-# PUBLIC	op_exfun
-ENTRY op_exfun
-	pushq	REG_XFER_TABLE
-	enter	$80,$0
-	movq	16(REG_FRAME_POINTER), REG64_SCRATCH1			# above enter makes pushes old rbp and copies old SP to rbp
-									# get the return address from rbp which is offset 16
-	movq	REG64_SCRATCH1,rtn_pc(REG_FRAME_POINTER) 		# Save return address
-	movq	REG64_ARG0,ret_val(REG_FRAME_POINTER)			# Save incoming arguments
-	movl	REG32_ARG2,mask_arg(REG_FRAME_POINTER)
-	movl	REG32_ARG3,act_cnt(REG_FRAME_POINTER)
-	movq	REG64_ARG4,arg0_off(REG_FRAME_POINTER)
-	movq	REG64_ARG5,arg1_off(REG_FRAME_POINTER)
-	movq	frame_pointer(REG_IP),REG64_ARG2
-	movq	rtn_pc(REG_FRAME_POINTER),REG64_ACCUM			# Verify the immediate instruction after
-	cmpb	$JMP_Jv,(REG64_ACCUM)					# this function call
-	je	long
-
-error:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-	movl	$1,REG32_ARG0
-	movb	$0,REG8_ACCUM             # variable length argument
-	call	rts_error
-	jmp	retlab
-
-long:	movq	REG64_ACCUM,msf_mpc_off(REG64_ARG2)
-	addq	REG64_ARG1,msf_mpc_off(REG64_ARG2)
-cont:	call	exfun_frame
-
-	movl	act_cnt(REG_FRAME_POINTER),REG32_ACCUM
-	cmpl	$0,REG32_ACCUM                          #arg0, arg1, arg2 are stored in rbp
+ENTRY	op_exfun
+	movq	0(REG_SP), REG64_SCRATCH1		# Save return address for storage in M stack frame
+	movq	REG_SP, %rbp				# Copy previous stack-frame to %rbp
+	subq	$FRAME_SAVE_SIZE, REG_SP		# Create save area
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_SCRATCH1, rtn_pc(%rbp) 		# Save return address
+	movq	REG64_ARG0, ret_val(%rbp)		# Save incoming arguments
+	movl	REG32_ARG2, mask_arg(%rbp)
+	movl	REG32_ARG3, act_cnt(%rbp)
+	movq	REG64_ARG4, arg0_off(%rbp)
+	movq	REG64_ARG5, arg1_off(%rbp)
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	movq	rtn_pc(%rbp), REG64_ACCUM		# Verify the immediate instruction after
+	cmpb	$JMP_Jv, 0(REG64_ACCUM)			# .. this function call
+	jne	error
+	movq	REG64_ACCUM, msf_mpc_off(REG64_ARG2)
+	addq	REG64_ARG1, msf_mpc_off(REG64_ARG2)
+	call	exfun_frame
+	movl	act_cnt(%rbp), REG32_ACCUM
+	cmpl	$0, REG32_ACCUM                         # arg0, arg1, arg2 are stored in save area off of %rbp
 	je	no_arg
-	cmpl	$1,REG32_ACCUM				#We have only one register free for push_param args
+	cmpl	$1, REG32_ACCUM				# We have only one register free for push_parm args
 	je	arg0
-	cmpl	$2,REG32_ACCUM
+	#
+	# We have more than 1 actuallist parameters so we need some aligned space on the stack for parameters that
+	# don't fit in the 6 parm registers. Only the first actuallist parameter can fit in a parm register. All
+	# others must reside on the stack starting at the lowest address. So for example, if we need 7 slots, we
+	# must allocate 8 slots to keep the stack aligned but the 7 slots used must be those with the lowest address
+	# for this to work correctly.
+	#
+	# Normally we would subtract 1 to get the count of parms to be on the stack then round that to a multiple of
+	# 2 since 2 parms would be 16 bytes. The rounding would add 1 and shift but to avoid -1 then +1, just do the
+	# rounding "AND" instruction on the value we have. Use REG64_ARG/ARG5 as temporary work registers.
+	#
+	cltq						# Convert REG32_ACCUM to REG64_ACCUM
+	movq	REG64_ACCUM, REG64_ARG5			# Copy of parmcnt
+	andq	$-2, REG64_ARG5				# Round to even value
+	shlq	$3, REG64_ARG5				# Mult by 8 via shifting gives us 16 byte aligned value
+	subq	REG64_ARG5, REG_SP			# Allocate aligned parm area on stack
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG_SP, REG64_ARG4			# Save bottom of allocation to REG64_ARG4
+	subq	$2, REG64_ACCUM				# Remove one parm to be passed in parmreg and one for 0 origin
+	leaq	(REG64_ARG4, REG64_ACCUM, 8), REG64_ARG4 # Address for last actuallist parm to be stored
+	cmpq	$0, REG64_ACCUM				# Only 1 arg left?
 	je	arg1
-	cltq
-	leaq	(REG_FRAME_POINTER,REG64_ACCUM,8),REG64_SCRATCH1
-again:	pushq	(REG64_SCRATCH1)
-	subq	$8,REG64_SCRATCH1
-	subl	$1,REG32_ACCUM
-	cmpl	$2,REG32_ACCUM
+	leaq	(%rbp, REG64_ACCUM, 8), REG64_SCRATCH1	# Address of last passed-in parameter
+again:
+	movq	0(REG64_SCRATCH1), REG64_ARG5		# Move parm to temp register
+	movq	REG64_ARG5, 0(REG64_ARG4)		# Move parm to home in stack location
+	subq	$8, REG64_SCRATCH1			# Move pointers to previous argument
+	subq	$8, REG64_ARG4
+	subq	$1, REG64_ACCUM				# Count down the parm
+	cmpq	$0, REG64_ACCUM				# See if down to 1 parm and if so, fall thru to handle it
 	jg	again
-arg1:	pushq	arg1_off(REG_FRAME_POINTER)
-arg0:	movq	arg0_off(REG_FRAME_POINTER),REG64_ARG5  #Only one argument which can be fitted into REG5
-no_arg:	movl	act_cnt(REG_FRAME_POINTER), REG32_ARG4	#Actual Arg cnt
-	movl	mask_arg(REG_FRAME_POINTER),REG32_ARG3	#Mask
-	movq	ret_val(REG_FRAME_POINTER), REG64_ARG2	#ret_value
-	movl	dollar_truth(REG_IP),REG32_ACCUM
-	andl	$1,REG32_ACCUM
-	movl	REG32_ACCUM,REG32_ARG1			#$T
-	movl	act_cnt(REG_FRAME_POINTER),REG32_ACCUM
-	addl	$4,REG32_ACCUM
-	movl	REG32_ACCUM, REG32_ARG0			#Totalcount = Act count +4
-	movb	$0,REG8_ACCUM				# variable length argument
-	call	push_parm				# push_parm (total, $T, ret_value, mask, argc [,arg1, arg2, ...]);
-done:	movq    frame_pointer(REG_IP),REG64_SCRATCH1
-	movq	msf_temps_ptr_off(REG64_SCRATCH1),REG_FRAME_TMP_PTR
-retlab:	leave
-	movq    REG64_SCRATCH1,REG_FRAME_POINTER
-	popq	REG_XFER_TABLE
+arg1:
+	movq	arg1_off(%rbp), REG64_SCRATCH1		# Copy parm to register
+	movq	REG64_SCRATCH1, 0(REG64_ARG4)		# Copy parm to stack resident location
+arg0:
+	movq	arg0_off(%rbp), REG64_ARG5  		# Only one argument which can be fitted into REG5
+no_arg:
+	movl	act_cnt(%rbp), REG32_ARG4		# Actual Arg cnt
+	movl	mask_arg(%rbp), REG32_ARG3		# Mask
+	movq	ret_val(%rbp), REG64_ARG2		# ret_value
+	movl	dollar_truth(REG_IP), REG32_ARG1	# $TEST
+	andl	$1, REG32_ARG1
+	movl	act_cnt(%rbp), REG32_ARG0
+	addl	$4, REG32_ARG0				# Totalcount = Act count +4
+	movb	$0, REG8_ACCUM				# variable length argument
+	call	push_parm				# push_parm(total, $T, ret_value, mask, argc [,arg1, arg2, ...])
+done:
+	#
+	# Ready to return - need to pick up allocated temp area and new frame pointer value (%rbp)
+	#
+	movq    frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	msf_temps_ptr_off(REG64_SCRATCH1), REG_FRAME_TMP_PTR
+	movq	%rbp, REG_SP				# Unwind C stack back to caller
+	movq    REG64_SCRATCH1, REG_FRAME_POINTER	# Resets %rbp aka REG_FRAME_POINTER with frame just created
 	ret
-# op_exfun ENDP
 
-# END
+error:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb	$0, REG8_ACCUM             		# Variable length argument
+	call	rts_error
+	jmp	done					# Shouldn't return but in case..
diff --git a/sr_x86_64/op_extcall.s b/sr_x86_64/op_extcall.s
index c00dd60..3e91f97 100644
--- a/sr_x86_64/op_extcall.s
+++ b/sr_x86_64/op_extcall.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,75 +10,173 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_extcall.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_extcall
-#	PAGE	+
-	.DATA
-.extern	ERR_GTMCHECK
-.extern	ERR_LABELUNKNOWN
-.extern	frame_pointer
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "gtm_threadgbl_deftypes_asm.si"
+	.include "debug.si"
+#
+# op_extcall calls an external GT.M MUMPS routine with no arguments. If the routine
+# has not yet been linked into the current image, op_extcall will first link it by
+# invoking the auto-ZLINK function. Before driving the function, we check if *any*
+# routines have been linked in as autorelink-enabled or if any directories are
+# autorelink-enabled and if so, drive a check to see if a newer version exists that
+# could be linked in.
+#
+# Parameters:
+#
+#  - arg0 (%rdi) - Index into linkage table of caller containing the routine header
+#	           address of the routine to call.
+#  - arg1 (%rsi) - Index into linkage table of caller containing the address of an
+#		   offset into routine to which to transfer control associated with
+#	           a given label. This value is typically the address of the lnr_adr
+#		   field in a label entry
+#
+# Note if arg1 is negative, this means the linkage table to use is not from the
+# caller but is contained in TREF(lnk_proxy) used by indirects and other dynamic
+# code (like callins).
+#
+# Note the return address is also supplied (on the stack) but we remove that immediately
+# since we do not return directly to it but to the the called rtn when the return address
+# is loaded out of the top M stackframe by getframe.
+#
+# Note we use %r12 as a flag that we don't do more than one of auto_zlink() OR auto_relink_check()
+# call. This keeps us out of any possible loop condition as only one or the other should
+# ever be necessary. Register %r12 is also known as REG_LITERAL_BASE and is saved by the putframe
+# macro so we need not save it separately.
+#
+	.data
+	.extern	ERR_GTMCHECK
+	.extern	frame_pointer
+	.extern gtm_threadgbl
 
 	.text
-.extern	auto_zlink
-.extern	new_stack_frame
-.extern	rts_error
-
-# PUBLIC	op_extcall
-ENTRY op_extcall
-	putframe
-	addq    $8,REG_SP     					# burn the saved return pc
-	cmpq	$0,REG64_ARG0					# if rhdaddr == 0, not yet linked into image
-	je	l2
-	cmpq    $0,REG64_ARG1					# if labaddr == 0 && rhdaddr != 0, label does not exist
-        je      l4
+	.extern	auto_zlink
+	.extern auto_relink_check
+	.extern	new_stack_frame
+	.extern	rts_error
+	.extern laberror
+#
+# Define offsets for arguments pushed back on the stack
+#
+stack_arg0	= 0
+stack_arg1	= 8
+SAVE_SIZE	= 16
 
-l1:	movq	(REG64_ARG1),REG64_ACCUM			# &(code_offset) for this label (usually & of lntabent)
-	cmpq	$0,REG64_ACCUM
-	je	l4
-	movslq	0(REG64_ACCUM),REG64_ACCUM			# code offset for this label
-	movq	mrt_ptext_adr(REG64_ARG0),REG64_ARG1
-	addq	REG64_ARG1,REG64_ACCUM
-	movq	REG64_ACCUM,REG64_ARG2
-	movq	mrt_lnk_ptr(REG64_ARG0),REG64_ARG1
+ENTRY	op_extcall
+	putframe						# Save registers into current M stack frame (includes %r12)
+	addq    $8, REG_SP     					# Burn the saved return pc (also aligns stack to 16 bytes)
+	CHKSTKALIGN						# Verify stack alignment
+	subq	$SAVE_SIZE, REG_SP				# Allocate save area on stack (16 byte aligned)
+	movq	$0, %r12					# Init flag - We haven't done auto_zlink/auto_relink_check
+	movslq	REG32_ARG1, REG64_ARG1				# Sign extend arg1
+	movq	REG64_ARG1, stack_arg1(REG_SP)			# Save index args
+	movq	REG64_ARG0, stack_arg0(REG_SP)
+	#
+	# First up, check the label index to see if tiz negative. If so, we must use lnk_proxy as a base address
+	# and pseudo linkagetable. Else use the caller's linkage table.
+	#
+	cmpq	$0, REG64_ARG1					# Use current frame linkage table or lnk_proxy?
+	jge	loadandgo
+	#
+	# We have a negative index. Use lnk_proxy as a proxy linkage table.
+	#
+	movq	gtm_threadgbl(REG_IP), REG64_RET1		# REG64_RET1 contains threadgbl base
+	leaq	ggo_lnk_proxy(REG64_RET1), REG64_ACCUM		# -> lnk_proxy.rtnhdr_adr
+	cmpq	$0, REG64_ARG0					# Using proxy table, rtnhdr index must be 0
+	jne	gtmcheck
+	movq	(REG64_ACCUM), REG64_ARG0			# -> rtnhdr
+	cmpq	$0, REG64_ARG0					# See if defined yet
+	je	gtmcheck					# If rhdaddr == 0, not yet linked into image which
+								# .. should never happen for indirects
+	cmpq	$-1, REG64_ARG1					# Using proxy table, label index must be -1
+	jne	gtmcheck
+	leaq	8(REG64_ACCUM), REG64_ARG1			# -> label table code offset ptr
+	cmpq    $0, 0(REG64_ARG1)
+        je      gtmcheck					# If labaddr == 0 && rhdaddr != 0, label does not exist
+								# .. which also should never happen for indirects
+	jmp	justgo						# Bypass autorelink check for indirects (done by caller)
+	#
+	# We have a non-negative index. Use args as indexes into caller's linkage table.
+	#
+loadandgo:
+	movq	msf_rvector_off(REG_FRAME_POINTER), REG64_RET0	# -> frame_pointer->rvector (rtnhdr)
+	movq	mrt_lnk_ptr(REG64_RET0), REG64_RET0		# -> frame_pointer->rvector->linkage_adr
+	shlq	$3, REG64_ARG0					# arg * 8 = offset for rtnhdr ptr
+	cmpq	$0, (REG64_RET0, REG64_ARG0)			# See if defined
+	je	autozlink					# No - try auto-zlink
+	movq	(REG64_RET0, REG64_ARG0), REG64_ARG0		# -> rtnhdr
+	#
+	# Have rtnhdr to call now. If rtnhdr->zhist, we should do an autorelink check on this routine to see if it needs
+	# to be relinked. Only do this if %r12 is 0 meaning we haven't already done an autorelink check or if we just
+	# loaded the routine via auto_zlink.
+	#
+	cmpq	$0, %r12					# Already checked/resolved?
+	jne	getlabeloff					# Yes, bypass this check and resolve the label offset
+	cmpq	$0, mrt_zhist(REG64_ARG0)			# See if we need to do an autorelink check
+	jne	autorelink_check				# Need autorelink check
+getlabeloff:
+	shlq	$3, REG64_ARG1					# arg * 8 = offset for label offset ptr
+	cmpq	$0, (REG64_RET0, REG64_ARG1)			# See if defined
+	je	label_missing
+	movq	(REG_RET0, REG64_ARG1), REG64_ARG1		# -> label table code offset
+	#
+	# Create stack frame and invoke routine
+	#
+justgo:
+	movq	0(REG64_ARG1), REG64_ACCUM			# &(code_offset) for this label (usually & of lntabent)
+	cmpq	$0, REG64_ACCUM
+	je	label_missing
+	movslq	0(REG64_ACCUM), REG64_ARG2			# Code offset for this label
+	addq	mrt_ptext_adr(REG64_ARG0), REG64_ARG2		# Transfer address: codebase reg + offset to label
+	movq	mrt_lnk_ptr(REG64_ARG0), REG64_ARG1		# Linkage table address (context pointer)
 	call	new_stack_frame
-	getframe
+retlab:								# If error, return to caller, else "return" to callee
+	addq	$SAVE_SIZE, REG_SP				# Undo save area bump
+	getframe						# Sets regs (including %r12) as they should be for new frame
 	ret
 
-l2:	cmpq	$0,REG64_ARG1
-	jne	l4
-	subq    $8,REG_SP					# Pass the SP as 2nd argument to auto_zlink.
-        movq    REG_SP,REG64_ARG1				# auto_zlink will populate this with labaddr
-        movq    frame_pointer(REG_IP),REG64_ACCUM
-        movq    msf_mpc_off(REG64_ACCUM),REG64_ARG0
+#
+# Drive auto_zlink to fetch module
+#
+autozlink:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Get index arg back
 	call	auto_zlink
-	cmpq	$0,REG64_RET0
-	je	l3
-	movq	REG64_RET0,REG64_ARG0
-	popq	REG64_ARG1					# Get the 2nd argument populated by auto_zlink
-	cmpq	$0,REG64_ARG1
-	jne	l1
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args after call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	movq	$1, %r12
+	jmp	loadandgo
 
-l3:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-	movl	$1,REG32_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
-	call	rts_error
-	getframe
-	ret
+#
+# Drive auto_relink_check to see if a newer routine should be loaded
+#
+autorelink_check:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args as parms for call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	call	auto_relink_check				# REG64_ARG0 still populated by rtnhdr
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args after call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	movq	$2, %r12
+	jmp	loadandgo
 
-l4:	movl    ERR_LABELUNKNOWN(REG_IP),REG32_ARG1
-        movl    $1,REG32_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
+#
+# Raise GTMCHECK (pseudo-GTMASSERT since args are more difficult in assembler) when something really screwedup
+# occurs
+#
+gtmcheck:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb    $0, REG8_ACCUM					# Variable length argument
 	call	rts_error
-	getframe
-	ret
-# op_extcall ENDP
+	jmp	retlab
 
-# END
+#
+# Make call so we can raise the appropriate LABELMISSING error for the not-found label.
+#
+label_missing:
+	movq	stack_arg1(REG_SP), REG64_ARG0			# Index to linkage table and to linkage name table
+	call	laberror
+	jmp	retlab
diff --git a/sr_x86_64/op_extexfun.s b/sr_x86_64/op_extexfun.s
index e084447..8717f58 100644
--- a/sr_x86_64/op_extexfun.s
+++ b/sr_x86_64/op_extexfun.s
@@ -1,6 +1,7 @@
-##################################################################
+#################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,141 +10,257 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_extexfun.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_extexfun
-#	PAGE	+
-
-#	call op_extexfun with the following stack:
-#
-#		return PC
-#		routine
-#		label
-#		ret_value address
-#		mask
-#		actualcnt
-#		actual1 address
-#		actual2 address
-#		...
-
-	.DATA
-.extern	ERR_FMLLSTMISSING
-.extern	ERR_GTMCHECK
-.extern	ERR_LABELUNKNOWN
-.extern	dollar_truth
-.extern	frame_pointer
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "gtm_threadgbl_deftypes_asm.si"
+	.include "debug.si"
+#
+# op_extexfun calls an external GT.M MUMPS routine with arguments and provides for
+# a return value in most instances. If the routine has not yet been linked into the
+# current image, op_extexfun will first link it by invoking the auto-ZLINK function.
+# Before driving the function, we check if *any* routines have been linked in as
+# autorelink-enabled or if any directories are autorelink-enabled and if so, drive
+# a check to see if a newer version exists that could be linked in.
+#
+# Parameters:
+#
+#  - arg0 (%rdi) - Index into linkage table of caller containing the routine header
+#	           address of the routine to call (rtnidx).
+#  - arg1 (%rsi) - Index into linkage table of caller containing the address of an
+#		   offset into routine to which to transfer control associated with
+#	           a given label. This value is typically the address of the lnr_adr
+#		   field in a label entry (lblidx).
+#  - arg2 (%rdx) - Address of where return value is placed or NULL if none (ret_value).
+#  - arg3 (%rcx) - Bit mask with 1 bit per argument (ordered low to high). When bit is
+#		   set, argument is pass-by-value, else pass-by-reference (mask).
+#  - arg4 (%r8)  - Count of M routine parameters supplied (actualcnt).
+#  - arg5 (%r9)  - List of addresses of mval parameters (actual1).
+#
+# Note if lblidx (arg1) is negative, this means the linkage table to use is not from the
+# caller but is contained in TREF(lnk_proxy) used by indirects and other dynamic
+# code (like callins).
+#
+# Note the return address is also supplied (on the stack) but we remove that immediately
+# since we do not return directly to it but to the the called rtn when the return address
+# is loaded out of the top M stackframe by getframe.
+#
+# Note we use %r12 as a flag that we don't do more than one of auto_zlink() OR auto_relink_check()
+# call. This keeps us out of any possible loop condition as only one or the other should
+# ever be necessary. Register %r12 is also known as REG_LITERAL_BASE and is saved by the putframe
+# macro so we need not save it separately.
+#
+	.data
+	.extern	ERR_FMLLSTMISSING
+	.extern	ERR_GTMCHECK
+	.extern	dollar_truth
+	.extern	frame_pointer
+	.extern gtm_threadgbl
 
 	.text
-.extern	auto_zlink
-.extern	new_stack_frame
-.extern	push_parm
-.extern	rts_error
-
-arg0_off        =       -56
-act_cnt         =       -48
-mask_arg        =       -44
-ret_val         =       -40
-label_arg       =       -32
-routine         =       -24
-sav_ebx		=	-8
-sav_msf		=	-16
-
-# PUBLIC	op_extexfun
-ENTRY op_extexfun
-	putframe
-	addq    $8,REG_SP            # burn return PC
-	pushq   REG_XFER_TABLE
-	enter   $64,$0
-        movq    REG64_ARG0,routine(REG_FRAME_POINTER)
-        movq    REG64_ARG1,label_arg(REG_FRAME_POINTER)
-        movq    REG64_ARG2,ret_val(REG_FRAME_POINTER)
-        movl    REG32_ARG3,mask_arg(REG_FRAME_POINTER)
-	movl	REG32_ARG4,act_cnt(REG_FRAME_POINTER)
-	movq    REG64_ARG5,arg0_off(REG_FRAME_POINTER)
-	cmpq	$0,REG64_ARG0
-	je	l3
-	cmpq    $0,REG64_ARG1
-        je      l5
-
-l1:	movq	0(REG64_ARG1),REG64_ACCUM
-	cmpq	$0,REG64_ACCUM
-	je	l5
-	movq	mrt_ptext_adr(REG64_ARG0),REG_XFER_TABLE
-	movslq	0(REG64_ACCUM),REG64_ARG2
-	addq	REG_XFER_TABLE,REG64_ARG2
+	.extern	auto_zlink
+	.extern auto_relink_check
+	.extern	new_stack_frame
+	.extern	push_parm
+	.extern	rts_error
+	.extern laberror
 
-	addq	$8,REG64_ARG1			# labaddr += 8, to point to has_parms
-	cmpl	$0,0(REG64_ARG1)		# if has_parms == 0, then issue an error
-	je	l6
+arg0_off	= -40
+act_cnt		= -32
+mask_arg	= -28
+ret_val		= -24
+lblidx		= -16
+rtnidx		= -8
+SAVE_SIZE	= 48						# This size 16 byte aligns the stack
 
-	movq	mrt_lnk_ptr(REG64_ARG0),REG64_ARG1
+ENTRY	op_extexfun
+	putframe						# Save registers into current M stack frame
+	addq    $8, REG_SP            				# Burn return PC (also 16 byte aligns the stack)
+	CHKSTKALIGN						# Verify stack alignment
+	movq	$0, %r12					# We haven't done auto_zlink/auto_relink_check
+	movq	REG_SP, %rbp					# Copy stack pointer to %rbp
+	subq	$SAVE_SIZE, REG_SP				# Allocate save area (16 byte aligned)
+	#
+	# Note from here down, do *not* use REG_FRAME_POINTER which was overwritten above. REG_FRAME_POINTER  is an alias for
+	# register %rbp which contains a copy of %rsp before %rsp was decremented by the save area size so %rbp contains a
+	# pointer just past the save area we've allocated which is why all references are using negative offsets.
+	#
+	movslq	REG32_ARG1, REG64_ARG1				# Sign extend arg1 so can check for negative arg
+        movq    REG64_ARG0, rtnidx(%rbp)			# Save argument registers
+        movq    REG64_ARG1, lblidx(%rbp)
+        movq    REG64_ARG2, ret_val(%rbp)
+        movl    REG32_ARG3, mask_arg(%rbp)
+	movl	REG32_ARG4, act_cnt(%rbp)
+	movq    REG64_ARG5, arg0_off(%rbp)
+	#
+	# First up, check the label index to see if tiz negative. If so, we must use lnk_proxy as a base address
+	# and pseudo linkagetable. Else use the caller's linkage table.
+	#
+	cmpq	$0, REG64_ARG1					# Use current frame linkage table or lnk_proxy?
+	jge	loadandgo
+	#
+	# We have a negative index. Use lnk_proxy as a proxy linkage table.
+	#
+	movq	gtm_threadgbl(REG_IP), REG64_RET1		# REG64_RET1 contains threadgbl base
+	leaq	ggo_lnk_proxy(REG64_RET1), REG64_ACCUM		# -> &lnk_proxy.rtnhdr_adr
+	cmpq	$0, REG64_ARG0					# Using proxy table, rtnhdr index must be 0
+	jne	gtmcheck
+	movq	(REG64_ACCUM), REG64_ARG0			# -> rtnhdr
+	cmpq	$0, REG64_ARG0					# See if defined yet
+	je	gtmcheck					# If rhdaddr == 0, not yet linked into image which
+								# .. should never happen for indirects
+	cmpq	$-1, REG64_ARG1					# Using proxy table, label index must be -1
+	jne	gtmcheck
+	leaq	8(REG64_ACCUM), REG64_ARG1			# -> label table code offset ptr
+	cmpq    $0, 0(REG64_ARG1)
+        je      gtmcheck					# If labaddr == 0 && rhdaddr != 0, label does not exist
+								# .. which also should never happen for indirects
+	cmpl	$0, 16(REG64_ACCUM)				# See if a parameter list was supplied
+	je	fmllstmissing					# If not, raise error
+	jmp	justgo						# Bypass autorelink check for indirects (done by caller)
+	#
+	# We have a non-negative index. Use args as indexes into caller's linkage table. Note we cannot overwrite
+	# REG_FRAME_POINTER as it is being used as %rbp in this routine (copy of %rsp before we did 'enter' above).
+	#
+loadandgo:
+	movq	frame_pointer(%rip), REG_RET0			# -> frame_pointer
+	movq	msf_rvector_off(REG_RET0), REG64_RET0		# -> frame_pointer->rvector (rtnhdr)
+	movq	mrt_lnk_ptr(REG64_RET0), REG64_RET0		# -> frame_pointer->rvector->linkage_adr
+	shlq	$3, REG64_ARG0					# arg * 8 = offset for rtnhdr ptr
+	cmpq	$0, (REG64_RET0, REG64_ARG0)			# See if defined
+	je	autozlink					# No - try auto-zlink
+	movq	(REG64_RET0, REG64_ARG0), REG64_ARG0		# -> rtnhdr
+	#
+	# Have rtnhdr to call now. If rtnhdr->zhist, we should do an autorelink check on this routine to see if it needs
+	# to be relinked. Only do this if %r12 is 0 meaning we haven't already done an autorelink check or if we just
+	# loaded the routine via auto_zlink.
+	#
+	cmpq	$0, %r12					# Already checked/resolved?
+	jne	getlabeloff					# Yes, bypass this check and resolve the label offset
+	cmpq	$0, mrt_zhist(REG64_ARG0)			# See if we need to do an autorelink check
+	jne	autorelink_check				# Need autorelink check
+getlabeloff:
+	shlq	$3, REG64_ARG1					# arg * 8 = offset for label offset pointer
+	cmpq	$0, (REG64_RET0, REG64_ARG1)			# See if defined
+	je	label_missing
+	movq	(REG_RET0, REG64_ARG1), REG64_ARG1		# -> label table code offset
+	cmpl	$0, 8(REG64_ARG1)				# If has_parms == 0, then issue an error
+	je	fmllstmissing
+	#
+	# Create stack frame and invoke routine
+	#
+justgo:
+	movq	0(REG64_ARG1), REG64_ACCUM			# &(code_offset) for this label (usually & of lntabent)
+	cmpq	$0, REG64_ACCUM
+	je	label_missing
+	movslq	0(REG64_ACCUM), REG64_ARG2			# Code offset for this label
+	addq	mrt_ptext_adr(REG64_ARG0), REG64_ARG2		# Transfer address: codebase reg + offset to label
+	movq	mrt_lnk_ptr(REG64_ARG0), REG64_ARG1		# Linkage table address (context pointer)
 	call	new_stack_frame
-
-        movl    act_cnt(REG_FRAME_POINTER),REG32_ACCUM
-	cmpl    $0,REG32_ACCUM
-        je     	no_arg
-	cmpl    $1,REG32_ACCUM
-        je     	arg_1
-        cltq
-	leaq    (REG_FRAME_POINTER,REG64_ACCUM,8),REG64_SCRATCH1
-again:  pushq   (REG64_SCRATCH1)
-        subq    $8,REG64_SCRATCH1
-        subl    $1,REG32_ACCUM
-        cmpl    $1,REG32_ACCUM
-        jg	again
-arg_1:  movq    arg0_off(REG_FRAME_POINTER),REG64_ARG5
-no_arg: movl	act_cnt(REG_FRAME_POINTER),REG32_ARG4
-	movl    mask_arg(REG_FRAME_POINTER),REG32_ARG3
-        movq    ret_val(REG_FRAME_POINTER),REG64_ARG2
-	movl   	dollar_truth(REG_IP),REG32_ARG1
-	andl   	$1,REG32_ARG1
-	movl   	act_cnt(REG_FRAME_POINTER),REG32_ARG0
-	addl   	$4,REG32_ARG0			# include: $T(just pushed) plus other 3
-	movb    $0,REG8_ACCUM			# variable length argument
-	call	push_parm			# push_parm (total, $T, ret_value, mask, argc [,arg1, arg2, ...]);
-retlab:	leave
-	popq	REG_XFER_TABLE
-	getframe
+	#
+	# Move parameters into place
+	#
+	movl	act_cnt(%rbp), REG32_ACCUM			# Number of actuallist parms
+	cmpl	$0, REG32_ACCUM
+	je	no_arg						# There are no actuallist parms
+	cmpl	$1, REG32_ACCUM					# See if just one arg left
+        je     	one_arg						# Just one - load it from the saved parm regs
+	#
+	# We need one or more actuallist parms to reside on the stack as we have overflowed the 6 parameter registers. We
+	# need to allocate a 16 byte aligned chunk of stack memory to house those parms. If some of that block is actually
+	# padding, the parms need to live in the lower address slots to work correctly with C varargs. So for example, if
+	# we need 7 slots, we have to allocate 8 slots and use the lowest addressed 7 slots for vargs to work correctly.
+	#
+	# Normally we would subtract 1 to get the count of parms to be on the stack then round that to a multiple of
+	# 2 since 2 parms would be 16 bytes. The rounding would add 1 and shift but to avoid -1 then +1, just do the
+	# rounding "AND" on the value we have. Use REG64_ARG/ARG5 as temporary work registers.
+	#
+        cltq							# Convert REG32_ACCUM to REG64_ACCUM
+	movq	REG64_ACCUM, REG64_ARG5				# Copy of parmcnt
+	andq	$-2, REG64_ARG5					# Round to even value
+	shlq	$3, REG64_ARG5					# Mult by 8 via shifting gives us 16 byte aligned value
+	subq	REG64_ARG5, REG_SP				# Allocate aligned parm area on stack
+	CHKSTKALIGN						# Verify stack alignment
+	movq	REG_SP, REG64_ARG4				# Save bottom of allocation to REG64_ARG4
+	subq	$2, REG64_ACCUM					# Remove one parm to be passed in parmreg and one for 0 origin
+	leaq	(REG64_ARG4, REG64_ACCUM, 8), REG64_ARG4	# Address for last actuallist parm to be stored
+	leaq	(%rbp, REG64_ACCUM, 8), REG64_SCRATCH1		# Address of last passed-in parameter
+again:
+	movq	0(REG64_SCRATCH1), REG64_ARG5			# Move parm to temp register
+	movq	REG64_ARG5, 0(REG64_ARG4)			# Move parm to home in stack location
+	subq	$8, REG64_SCRATCH1				# Move pointers to previous argument
+	subq	$8, REG64_ARG4
+	subq	$1, REG64_ACCUM					# Count down the parm
+	cmpq	$0, REG64_ACCUM					# Branch unless all parms are done (0 > REG64_ACCUM)
+	jnl	again
+one_arg:
+	movq    arg0_off(%rbp), REG64_ARG5
+no_arg:
+	movl	act_cnt(%rbp), REG32_ARG4
+	movl    mask_arg(%rbp), REG32_ARG3
+        movq    ret_val(%rbp), REG64_ARG2
+	movl   	dollar_truth(REG_IP), REG32_ARG1
+	andl   	$1, REG32_ARG1
+	movl   	act_cnt(%rbp), REG32_ARG0
+	addl   	$4, REG32_ARG0					# Includes: $TEST, ret_value, mask, act_cnt
+	movb    $0, REG8_ACCUM					# Variable length argument
+	call	push_parm					# push_parm (total, $T, ret_value, mask, argc [,arg1, arg2, ...]);
+retlab:
+	movq	%rbp, REG_SP					# Unwind C stack back to caller
+	getframe						# Load regs from top M frame (pushes return reg)
 	ret
 
-l3:	cmpq	$0,REG64_ARG1
-	jne	l5
-	subq    $8,REG_SP			# Pass the SP as 2nd argument to auto_zlink.
-        movq    REG_SP,REG64_ARG1		# auto_zlink will populate this with labaddr
-        movq    frame_pointer(REG_IP),REG64_ARG2
-        movq    msf_mpc_off(REG64_ARG2),REG64_ARG0
+#
+# Drive auto_zlink to fetch module
+#
+autozlink:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	rtnidx(%rbp), REG64_ARG0			# Get index arg back
 	call	auto_zlink
-	cmpq	$0,REG64_RET0
-	je	l4
-	movq	REG64_RET0,REG64_ARG0
-	popq	REG64_ARG1			# auto_zlink will populate this with labaddr
-	cmpq	$0,REG64_ARG1
-	jne	l1
-l4:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-	movl	$1,REG32_ARG0
-	movb    $0,     REG8_ACCUM		# variable length argument
+	movq	rtnidx(%rbp), REG64_ARG0			# Restore both args after call
+	movq	lblidx(%rbp), REG64_ARG1
+	movq	$1, %r12
+	jmp	loadandgo
+
+#
+# Drive auto_relink_check to see if a newer routine should be loaded
+#
+autorelink_check:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	rtnidx(%rbp), REG64_ARG0			# Restore both args as parms for call
+	movq	lblidx(%rbp), REG64_ARG1
+	call	auto_relink_check				# REG64_ARG0 still populated by rtnhdr
+	movq	rtnidx(%rbp), REG64_ARG0			# Restore both args after call
+	movq	lblidx(%rbp), REG64_ARG1
+	movq	$2, %r12
+	jmp	loadandgo
+
+#
+# Raise GTMCHECK (pseudo-GTMASSERT since args are more difficult in assembler) when something really screwedup
+# occurs
+#
+gtmcheck:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb    $0, REG8_ACCUM					# Variable length argument
 	call	rts_error
 	jmp	retlab
 
-l5:	movl    ERR_LABELUNKNOWN(REG_IP),REG32_ARG1
-        movl    $1,REG32_ARG0
-	movb    $0,     REG8_ACCUM             # variable length argument
-	call	rts_error
+#
+# Make call so we can raise the appropriate LABELMISSING error for the not-found label.
+#
+label_missing:
+	movq	lblidx(%rbp), REG64_ARG0			# Index to linkage table and to linkage name table
+	call	laberror
 	jmp	retlab
 
-l6:	movl    ERR_FMLLSTMISSING(REG_IP),REG32_ARG1
-        movl    $1,REG32_ARG0
-	movb	$0,     REG8_ACCUM             # variable length argument
+#
+# Raise missing formal list error
+#
+fmllstmissing:
+	movl    ERR_FMLLSTMISSING(REG_IP), REG32_ARG1
+        movl    $1, REG32_ARG0
+	movb	$0, REG8_ACCUM					# Variable length argument
 	call	rts_error
 	jmp	retlab
-
-# op_extexfun ENDP
-
-# END
diff --git a/sr_x86_64/op_extjmp.s b/sr_x86_64/op_extjmp.s
index 8bd4b39..7636018 100644
--- a/sr_x86_64/op_extjmp.s
+++ b/sr_x86_64/op_extjmp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2014 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,89 +10,176 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_extjmp.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-	.sbttl	op_extjmp
-#	PAGE	+
-	.DATA
-.extern	ERR_GTMCHECK
-.extern	ERR_LABELNOTFND
-.extern	frame_pointer
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "gtm_threadgbl_deftypes_asm.si"
+	.include "debug.si"
+#
+# op_extjmp transfers control to an external GT.M MUMPS routine with no arguments
+# by rewriting the existing M stack frame rather than stacking a new stack frame
+# like most other forms of control transfer. If the routine to jump to has not yet
+# been linked into the current image, op_extcall will first link it by invoking
+# the auto-ZLINK function. Before driving the new routine, we check if *any* routines
+# have been linked in as autorelink-enabled or if any directories are
+# autorelink-enabled and if so, drive a check to see if a newer version exists that
+# could be linked in.
+#
+# Parameters:
+#
+#  - arg0 (%rdi) - Index into linkage table of caller containing the routine header
+#	           address of the routine to call.
+#  - arg1 (%rsi) - Index into linkage table of caller containing the address of an
+#		   offset into routine to which to transfer control associated with
+#	           a given label. This value is typically the address of the lnr_adr
+#		   field in a label entry
+#
+# Note if arg1 is negative, this means the linkage table to use is not from the
+# caller but is contained in TREF(lnk_proxy) used by indirects and other dynamic
+# code (like callins).
+#
+# Note the return address is also supplied (on the stack) but we remove that immediately
+# since we do not return directly to it but to the the transfer rtn when the return address
+# is loaded out of the top M stackframe by getframe.
+#
+# Note we use %r12 as a flag that we don't do more than one of auto_zlink() OR auto_relink_check()
+# call. This keeps us out of any possible loop condition as only one or the other should
+# ever be necessary. Register %r12 is also known as REG_LITERAL_BASE and is saved by the putframe
+# macro so we need not save it separately.
+#
+	.data
+	.extern	ERR_GTMCHECK
+	.extern	ERR_LABELNOTFND
+	.extern	frame_pointer
+	.extern gtm_threadgbl
 
 	.text
-.extern	auto_zlink
-.extern	flush_jmp
-.extern	rts_error
-
-# PUBLIC	op_extjmp
-ENTRY op_extjmp
-	putframe
-	addq	$8,REG_SP        # burn return pc
-	cmpq	$0,REG64_ARG0
-	je	l2
-	cmpq	$0,REG64_ARG1
-	je	l4
-
-l1:	#&(code_offset) for this label (usually & of linenumber table entry
-	movq	(REG64_ARG1),REG64_ACCUM
-
-	#check if label has been replaced and error out if yes.
-	cmpq	$0,REG64_ACCUM
-	je	l4
-
-	#Offset to label
-	movslq	0(REG64_ACCUM),REG64_ACCUM
-
-	#code base reg
-	movq	mrt_ptext_adr(REG64_ARG0),REG64_ARG1
-	#transfer address: codebase reg + offset to label
-	addq	REG64_ARG1,REG64_ACCUM
-	movq	REG64_ACCUM,REG64_ARG2
-
-	#linkage ptr(ctxt ptr)
-	movq	mrt_lnk_ptr(REG64_ARG0),REG64_ARG1
-
+	.extern	auto_zlink
+	.extern auto_relink_check
+	.extern	flush_jmp
+	.extern	rts_error
+	.extern	laberror
+#
+# Define offsets for arguments pushed back on the stack
+#
+stack_arg0	= 0
+stack_arg1	= 8
+SAVE_SIZE	= 16
+
+ENTRY	op_extjmp
+	putframe						# Save registers into current stack frame (includes %r12)
+	addq    $8, REG_SP     					# Burn the saved return pc (also aligns stack to 16 bytes)
+	CHKSTKALIGN						# Verify stack alignment
+	subq	$SAVE_SIZE, REG_SP				# Allocate save area on stack (16 byte aligned)
+	movq	$0, %r12					# Init flag - We haven't done auto_zlink/auto_relink_check
+	movslq	REG32_ARG1, REG64_ARG1				# Sign extend arg1
+	movq	REG64_ARG1, stack_arg1(REG_SP)			# Save index args
+	movq	REG64_ARG0, stack_arg0(REG_SP)
+	#
+	# First up, check the label index to see if tiz negative. If so, we must use lnk_proxy as a base address
+	# and pseudo linkagetable. Else use the caller's linkage table.
+	#
+	cmpq	$0, REG64_ARG1					# Use current frame linkage table or lnk_proxy?
+	jge	loadandgo
+	#
+	# We have a negative index. Use lnk_proxy as a proxy linkage table.
+	#
+	movq	gtm_threadgbl(REG_IP), REG64_RET1		# REG64_RET1 contains threadgbl base
+	leaq	ggo_lnk_proxy(REG64_RET1), REG64_ACCUM		# -> &lnk_proxy.rtnhdr_adr
+	cmpq	$0, REG64_ARG0					# Using proxy table, rtnhdr index must be 0
+	jne	gtmcheck
+	movq	(REG64_ACCUM), REG64_ARG0			# -> rtnhdr
+	cmpq	$0, REG64_ARG0					# See if defined yet
+	je	gtmcheck					# If rhdaddr == 0, not yet linked into image which
+								# .. should never happen for indirects
+	cmpq	$-1, REG64_ARG1					# Using proxy table, label index must be -1
+	jne	gtmcheck
+	leaq	8(REG64_ACCUM), REG64_ARG1			# -> label table code offset ptr
+	cmpq    $0,0(REG64_ARG1)
+        je      gtmcheck					# If labaddr == 0 && rhdaddr != 0, label does not exist
+								# .. which also should never happen for indirects
+	jmp	justgo						# Bypass autorelink check for indirects (done by caller)
+	#
+	# We have a non-negative index. Use args as indexes into caller's linkage table.
+	#
+loadandgo:
+	movq	msf_rvector_off(REG_FRAME_POINTER), REG64_RET0	# -> frame_pointer->rvector (rtnhdr)
+	movq	mrt_lnk_ptr(REG64_RET0), REG64_RET0		# -> frame_pointer->rvector->linkage_adr
+	shlq	$3, REG64_ARG0					# arg * 8 = offset for rtnhdr ptr
+	cmpq	$0,(REG64_RET0, REG64_ARG0)			# See if defined
+	je	autozlink					# No - try auto-zlink
+	movq	(REG64_RET0, REG64_ARG0), REG64_ARG0		# -> rtnhdr
+	#
+	# Have rtnhdr to call now. If rtnhdr->zhist, we should do an autorelink check on this routine to see if it needs
+	# to be relinked. Only do this if %r12 is 0 meaning we haven't already done an autorelink check or if we just
+	# loaded the routine via auto_zlink.
+	#
+	cmpq	$0, %r12					# Already checked/resolved?
+	jne	getlabeloff					# Yes, bypass this check and resolve the label offset
+	cmpq	$0, mrt_zhist(REG64_ARG0)			# See if we need to do an autorelink check
+	jne	autorelink_check				# Need autorelink check
+getlabeloff:
+	shlq	$3, REG64_ARG1					# arg * 8 = offset for label offset ptr
+	cmpq	$0,(REG64_RET0, REG64_ARG1)			# See if defined
+	je	label_missing
+	movq	(REG_RET0, REG64_ARG1), REG64_ARG1		# -> label table code offset
+	#
+	# Rewrite stack frame and invoke routine
+	#
+justgo:
+	movq	(REG64_ARG1), REG64_ACCUM			# &(code_offset) for this label (usually & of lnr table entry)
+	cmpq	$0, REG64_ACCUM					# check if label has been replaced and error out if yes.
+	je	label_missing
+	movslq	0(REG64_ACCUM), REG64_ARG2			# Code offset for this label
+	addq	mrt_ptext_adr(REG64_ARG0), REG64_ARG2		# Transfer address: codebase reg + offset to label
+	movq	mrt_lnk_ptr(REG64_ARG0), REG64_ARG1		# Linkage table address (context pointer)
 	call	flush_jmp
-	getframe
+retlab:								# If error, return to caller, else "return" to callee
+	addq	$SAVE_SIZE, REG_SP				# Undo save area bump
+	getframe						# Sets regs (including %r12) as they should be for new frame
 	ret
 
-l2:	#point to "temp" arg auto_zlink can set with new labaddr
-	subq	$8,REG_SP
-	movq	REG_SP, REG64_ARG1
-
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movq	msf_mpc_off(REG64_ACCUM),REG64_ARG0
+#
+# Drive auto_zlink to fetch module
+#
+autozlink:
+	cmpq	$0, %r12						# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Get index arg back
 	call	auto_zlink
-
-	cmpq	$0,REG64_RET0
-	je	l3
-	movq	REG64_RET0,REG64_ARG0
-
-	popq	REG64_ARG1
-	cmpq	$0,REG64_ARG1
-	jne	l1
-	jmp	l4
-
-l3:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-	movl	$1,REG32_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args after call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	movq	$1, %r12
+	jmp	loadandgo
+
+#
+# Drive auto_relink_check to see if a newer routine should be loaded
+#
+autorelink_check:
+	cmpq	$0, %r12						# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args as parms for call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	call	auto_relink_check				# REG64_ARG0 still populated by rtnhdr
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args after call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	movq	$2, %r12
+	jmp	loadandgo
+
+#
+# Raise GTMCHECK (pseudo-GTMASSERT since args are more difficult in assembler) when something really screwedup
+# occurs
+#
+gtmcheck:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb    $0, REG8_ACCUM             			# Variable length argument
 	call	rts_error
-	getframe
-	ret
-
-l4:	movl	ERR_LABELNOTFND(REG_IP),REG32_ARG1
-	movl	$1,REG32_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
-	call	rts_error
-	getframe
-	ret
-# op_extjmp ENDP
-
-# END
+	jmp	retlab
+
+#
+# Make call so we can raise the appropriate LABELMISSING error for the not-found label.
+#
+label_missing:
+	movq	stack_arg1(REG_SP), REG64_ARG0			# Index to linkage table and to linkage name table
+	call	laberror
+	jmp	retlab
diff --git a/sr_x86_64/op_fetchintrrpt.s b/sr_x86_64/op_fetchintrrpt.s
index 06bcd01..48634b0 100644
--- a/sr_x86_64/op_fetchintrrpt.s
+++ b/sr_x86_64/op_fetchintrrpt.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2009 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,44 +10,35 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_fetchintrrpt.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_fetchintrrpt
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
-.extern	neterr_pending
+	.data
+	.extern	frame_pointer
+	.extern	neterr_pending
 
 	.text
-.extern	gtm_fetch
-.extern	gvcmz_neterr
-.extern	outofband_clear
-.extern	async_action
+	.extern	gtm_fetch
+	.extern	gvcmz_neterr
+	.extern	outofband_clear
+	.extern	async_action
 
-# PUBLIC	op_fetchintrrpt
-ENTRY op_fetchintrrpt
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	popq	msf_mpc_off(REG64_SCRATCH1)
+ENTRY	op_fetchintrrpt
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	popq	msf_mpc_off(REG64_SCRATCH1)		# Save return addr in M frame, also aligns stack to 16 bytes
+	CHKSTKALIGN					# Verify stack alignment
 	movq    REG_PV, msf_ctxt_off(REG64_SCRATCH1)
-	movb    $0,REG8_ACCUM             # variable length argument
+	movb    $0, REG8_ACCUM             		# Variable length argument
 	call	gtm_fetch
-	cmpb	$0,neterr_pending(REG_IP)
+	cmpb	$0, neterr_pending(REG_IP)
 	je	l1
 	call	outofband_clear
-	movq 	$0,REG64_ARG0
+	movq 	$0, REG64_ARG0
 	call	gvcmz_neterr
-l1:	movl	$1,REG32_ARG0
+l1:
+	movl	$1, REG32_ARG0
 	call	async_action
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	pushq	msf_mpc_off(REG64_SCRATCH1)
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	pushq	msf_mpc_off(REG64_SCRATCH1)		# Push return address for current frame back on stack
 	ret
-# op_fetchintrrpt ENDP
-
-# END
diff --git a/sr_x86_64/op_fnget.s b/sr_x86_64/op_fnget.s
index ccb87df..b548b87 100644
--- a/sr_x86_64/op_fnget.s
+++ b/sr_x86_64/op_fnget.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2009 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,43 +10,44 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_fnget.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_fnget
-#	PAGE	+
-# ------------------------------------
+#
 # op_fnget.s
 #
 # Mumps $Get function
-# ------------------------------------
-
-#	edx->REG64_RET1 - src. mval
-#	eax->REG64_RET0 - dest. mval
+#
+#
+#	r10->REG64_RET1 - src. mval
+#	rax->REG64_RET0 - dest. mval
+#
+# Note there is no stack padding for alignment and no check in this routine because it is a leaf routine
+# so never calls anything else. The stack is unaligned by 8 bytes due to the return register but that is
+# not an issue unless this routine calls something in the future in which case it needs changes to pad
+# the stack for alignment and should then also use the CHKSTKALIGN macro to verify it.
+#
 
 	.text
-# PUBLIC	op_fnget
-ENTRY op_fnget
-	cmpq	$0,REG64_RET1
-	je	l5			# if arg = 0, set type and len
-	mv_if_notdefined REG64_RET1, l5
-	movl	$mval_byte_len,REG32_ARG3	#Size of mval
-	movq	REG64_RET1,REG64_ARG1		#Set source
-	movq	REG64_RET0,REG64_ARG0		#Set destination
-	REP					#Repeat until count is zero
+
+ENTRY	op_fnget
+	cmpq	$0, REG64_RET1
+	je	l5				# Source mval does not exist
+	mv_if_notdefined REG64_RET1, l5		# Branch if source mval is not defined
+	movl	$mval_byte_len, REG32_ARG3	# Size of mval
+	movq	REG64_RET1, REG64_ARG1		# Set source
+	movq	REG64_RET0, REG64_ARG0		# Set destination
+	REP					# Repeat until count is zero
 	movsb
 	andw	$~mval_m_aliascont, mval_w_mvtype(REG64_RET0)	# Don't propagate alias container flag
 	ret
-l5:	movw	$mval_m_str,mval_w_mvtype(REG64_RET0)
-	movl	$0,mval_l_strlen(REG64_RET0)
-	ret
-# op_fnget ENDP
 
-# END
+	#
+	# Source mval either non-existent or undefined. Set return mval to null string and return it
+	#
+l5:
+	movw	$mval_m_str, mval_w_mvtype(REG64_RET0)
+	movl	$0, mval_l_strlen(REG64_RET0)
+	ret
diff --git a/sr_x86_64/op_fnzextract.s b/sr_x86_64/op_fnzextract.s
index 06e319e..8c05886 100644
--- a/sr_x86_64/op_fnzextract.s
+++ b/sr_x86_64/op_fnzextract.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,75 +10,68 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_fnzextract.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_fnzextract
-#	PAGE	+
-# ------------------------------------
+#
 # op_fnzextract.s
 #
 # Mumps $Extract function
-# ------------------------------------
-
-# --------------------------------
+#
 #	op_fnzextract (int last, int first, mval *src, mval *dest)
-# --------------------------------
-last    =       -12
-first	=	-16
-src	=	-24
-dest	=	-32
+#
+
+last		= -12
+first		= -16
+src		= -24
+dest		= -32
+FRAME_SIZE	= 32
 
 	.text
-.extern	n2s
+	.extern	n2s
 
-# PUBLIC	op_fnzextract
-ENTRY op_fnzextract
-	pushq	REG_XFER_TABLE
-	enter	$48,$0    # Need to make sure that the SP will be 16 bytes aligned
-	movl	REG32_ARG0,last(REG_FRAME_POINTER)
-	movl	REG32_ARG1,first(REG_FRAME_POINTER)
-	movq	REG64_ARG3,dest(REG_FRAME_POINTER)
+ENTRY	op_fnzextract
+	pushq	%rbp					# Preserve caller's %rpb register (aka REG_STACK_FRAME)
+	movq	REG_SP, %rbp				# Save current stack pointer to %rbp
+	subq	$FRAME_SIZE, REG_SP			# Allocate save area for parameters
+	CHKSTKALIGN					# Verify stack alignment
+	movl	REG32_ARG0, last(%rbp)			# Save the parameters
+	movl	REG32_ARG1, first(%rbp)
+	movq	REG64_ARG3, dest(%rbp)
 	mv_force_defined REG64_ARG2, l00
-	movq	REG64_ARG2,src(REG_FRAME_POINTER)
-	mv_force_str REG64_ARG2,l01
-	movq	src(REG_FRAME_POINTER),REG64_ARG1
-	movl	first(REG_FRAME_POINTER),REG32_ACCUM
-	cmpl	$0,REG32_ACCUM
+	movq	REG64_ARG2, src(%rbp)
+	mv_force_str REG64_ARG2, l01
+	movq	src(%rbp), REG64_ARG1
+	movl	first(%rbp), REG32_ACCUM
+	cmpl	$0, REG32_ACCUM
 	jg	l10
-	movl	$1,REG32_ACCUM			# if first < 1, then first = 1
-l10:	movl	last(REG_FRAME_POINTER),REG32_ARG2
-	movq	dest(REG_FRAME_POINTER),REG64_ARG0
-	movw	$mval_m_str,mval_w_mvtype(REG64_ARG0)
-	movl	mval_l_strlen(REG64_ARG1),REG32_ARG3
-	cmpl	REG32_ACCUM,REG32_ARG3		# if left index > str. len,
-						# then null result
+	movl	$1, REG32_ACCUM				# If first < 1, then first = 1
+l10:
+	movl	last(%rbp), REG32_ARG2
+	movq	dest(%rbp), REG64_ARG0
+	movw	$mval_m_str, mval_w_mvtype(REG64_ARG0)
+	movl	mval_l_strlen(REG64_ARG1), REG32_ARG3
+	cmpl	REG32_ACCUM, REG32_ARG3			# If left index > str. len, then null result
 	jl	l25
-	cmpl	REG32_ARG2,REG32_ARG3		# right index may be at most the len.
-	jge	l20			# of the source string
-	movl	REG32_ARG3,REG32_ARG2
-l20:	movl	REG32_ARG2,REG32_SCRATCH1
-	subl	REG32_ACCUM,REG32_SCRATCH1		# result len. = end - start + 1
-	addl	$1,REG32_SCRATCH1
-	jg	l30			# if len > 0, then continue
-l25:	movl	$0,mval_l_strlen(REG64_ARG0)
+	cmpl	REG32_ARG2, REG32_ARG3			# Right index may be at most the len.
+	jge	l20					# .. of the source string
+	movl	REG32_ARG3, REG32_ARG2
+l20:
+	movl	REG32_ARG2, REG32_SCRATCH1
+	subl	REG32_ACCUM, REG32_SCRATCH1		# Result len. = end - start + 1
+	addl	$1, REG32_SCRATCH1
+	jg	l30					# If len > 0, then continue
+l25:
+	movl	$0, mval_l_strlen(REG64_ARG0)
 	jmp	retlab
-
-l30:	movl 	REG32_SCRATCH1,mval_l_strlen(REG64_ARG0)
-	subl	$1,REG32_ACCUM				# base = src.addr + left ind. - 1
-	addq	mval_a_straddr(REG64_ARG1),REG64_ACCUM
-	movq	REG64_ACCUM,mval_a_straddr(REG64_ARG0)
+l30:
+	movl 	REG32_SCRATCH1, mval_l_strlen(REG64_ARG0)
+	subl	$1, REG32_ACCUM				# Base = src.addr + left ind. - 1
+	addq	mval_a_straddr(REG64_ARG1), REG64_ACCUM
+	movq	REG64_ACCUM, mval_a_straddr(REG64_ARG0)
 retlab:
-	leave
-	popq	REG_XFER_TABLE
+	addq	$FRAME_SIZE, REG_SP			# Pull save area back off of stack
+	popq	%rbp
 	ret
-# op_fnzextract ENDP
-
-# END
diff --git a/sr_x86_64/op_follow.s b/sr_x86_64/op_follow.s
index b343f3c..4b548a7 100644
--- a/sr_x86_64/op_follow.s
+++ b/sr_x86_64/op_follow.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,47 +10,39 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_follow.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_follow
-#	PAGE	+
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
 sav_rax	=	-8
 sav_rdx	=	-16
 
 	.text
-.extern	memvcmp
-.extern	n2s
-
-# PUBLIC	op_follow
-ENTRY op_follow
-	enter   $16, $0
-        movq    REG64_RET1,sav_rdx(REG_FRAME_POINTER)
+	.extern	memvcmp
+	.extern	n2s
+
+ENTRY	op_follow
+	pushq	%rbp				# Save %rbp (aka REG_FRAME_POINTER) - aligns stack to 16 bytes
+	movq	REG_SP, %rbp
+	subq	$16, REG_SP			# Get 16 byte save area
+	CHKSTKALIGN				# Verify stack alignment
+        movq    REG64_RET1, sav_rdx(%rbp)
 	mv_force_defined REG64_RET0, l1
-	movq	REG64_RET0,sav_rax(REG_FRAME_POINTER)
+	movq	REG64_RET0, sav_rax(%rbp)
 	mv_force_str REG64_RET0, l2
-        movq    sav_rdx(REG_FRAME_POINTER),REG64_RET1
+        movq    sav_rdx(%rbp), REG64_RET1
 	mv_force_defined REG64_RET1, l3
-	movq    REG64_RET1,sav_rdx(REG_FRAME_POINTER)
+	movq    REG64_RET1, sav_rdx(%rbp)
 	mv_force_str REG64_RET1, l4
-	movq	sav_rax(REG_FRAME_POINTER),REG64_RET0
-        movq    sav_rdx(REG_FRAME_POINTER),REG64_RET1
-	movl	mval_l_strlen(REG64_RET1),REG32_ARG3
-	movq 	mval_a_straddr(REG64_RET1),REG64_ARG2
-	movl    mval_l_strlen(REG64_RET0),REG32_ARG1
-	movq	mval_a_straddr(REG64_RET0),REG64_ARG0
+	movq	sav_rax(%rbp), REG64_RET0
+        movq    sav_rdx(%rbp), REG64_RET1
+	movl	mval_l_strlen(REG64_RET1), REG32_ARG3
+	movq 	mval_a_straddr(REG64_RET1), REG64_ARG2
+	movl    mval_l_strlen(REG64_RET0), REG32_ARG1
+	movq	mval_a_straddr(REG64_RET0), REG64_ARG0
 	call	memvcmp
-	cmpl	$0,REG32_RET0
-	leave
+	addq	$16, REG_SP
+	popq	%rbp
+	cmpl	$0, REG32_RET0			# Set condition code for use by caller
 	ret
-# op_follow ENDP
-
-# END
diff --git a/sr_x86_64/op_forcenum.s b/sr_x86_64/op_forcenum.s
index a87e67f..aae63b2 100644
--- a/sr_x86_64/op_forcenum.s
+++ b/sr_x86_64/op_forcenum.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,71 +10,66 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_forcenum.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_forcenum
-#	PAGE	+
 	.text
-.extern	s2n
+	.extern	s2n
+#
+# Routine to force the input source mval to a number if it is not already so.
+#
+#	REG64_RET1 [r10] - source mval
+#	REG64_RET0 [rax] - destination mval
+#
 
-#	r10 - source mval
-#	rax - destination mval
+save_ret0	= 0
+save_ret1	= 8
+FRAME_SIZE	= 24					# This frame size gives us a 16 byte aligned stack
 
-# PUBLIC	op_forcenum
-ENTRY op_forcenum
-	pushq	REG64_RET0
+ENTRY	op_forcenum
+	subq	$FRAME_SIZE, REG_SP			# Allocate save area and align stack
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET0, save_ret0(REG_SP)
 	mv_force_defined REG64_RET1, l00
-	pushq	REG64_RET1
+	movq	REG64_RET1, save_ret1(REG_SP)
 	mv_force_num REG64_RET1, l10
-	popq 	REG64_RET1
-	popq	REG64_RET0
-
-	testw	$mval_m_str,mval_w_mvtype(REG64_RET1)
-	je	l20
-	testw	$mval_m_num_approx,mval_w_mvtype(REG64_RET1)
-	je	l40
-l20:	testw	$mval_m_int_without_nm,mval_w_mvtype(REG64_RET1)
-	je	l30
-	movw	$mval_m_int,mval_w_mvtype(REG64_RET0)
-	movl	mval_l_m1(REG64_RET1),REG32_ARG2
-	movl	REG32_ARG2,mval_l_m1(REG64_RET0)
-	ret
-
-l30:	pushq	REG_XFER_TABLE
-	movw	$mval_m_nm,mval_w_mvtype(REG64_RET0)
-	movb	mval_b_exp(REG64_RET1),REG8_ARG2
-	movb	REG8_ARG2,mval_b_exp(REG64_RET0)
-
-#	Copy the only numeric part of Mval from [edx] to [eax].
-
-	movl	mval_l_m0(REG64_RET1),REG32_ARG2
-	movl	REG32_ARG2,mval_l_m0(REG64_RET0)
-	movl	mval_l_m1(REG64_RET1),REG32_ARG2
-	movl	REG32_ARG2,mval_l_m1(REG64_RET0)
-	popq	REG_XFER_TABLE
-	ret
+	movq 	save_ret1(REG_SP), REG64_RET1
+	movq	save_ret0(REG_SP), REG64_RET0
+	testw	$mval_m_str, mval_w_mvtype(REG64_RET1)
+	jz	l20
+	testw	$mval_m_num_approx, mval_w_mvtype(REG64_RET1)
+	jz	l40
+l20:
+	testw	$mval_m_int_without_nm, mval_w_mvtype(REG64_RET1)
+	jz	l30
+	movw	$mval_m_int, mval_w_mvtype(REG64_RET0)
+	movl	mval_l_m1(REG64_RET1), REG32_ARG2
+	movl	REG32_ARG2, mval_l_m1(REG64_RET0)
+	jmp	done
 
+l30:
+	movw	$mval_m_nm, mval_w_mvtype(REG64_RET0)
+	movb	mval_b_exp(REG64_RET1), REG8_ARG2
+	movb	REG8_ARG2, mval_b_exp(REG64_RET0)
+	#
+	# Copy the only numeric part of Mval from [r10] to [rax].
+	#
+	movl	mval_l_m0(REG64_RET1), REG32_ARG2
+	movl	REG32_ARG2, mval_l_m0(REG64_RET0)
+	movl	mval_l_m1(REG64_RET1), REG32_ARG2
+	movl	REG32_ARG2, mval_l_m1(REG64_RET0)
+	jmp	done
 l40:
-#	Copy the Mval from [edx] to [eax].
-
-	pushq	REG64_ARG0
-	pushq	REG64_ARG1
-	movq	REG64_RET0,REG64_ARG0
-	movq	REG64_RET1,REG64_ARG1
-	movl	$mval_byte_len,REG32_ARG3
+	#
+	# Copy the Mval from REG64_RET1 [r10] to REG64_RET0 [rax].
+	#
+	movq	REG64_RET0, REG64_ARG0
+	movq	REG64_RET1, REG64_ARG1
+	movl	$mval_byte_len, REG32_ARG3
 	REP
 	movsb
-	popq	REG64_ARG1
-	popq	REG64_ARG0
+done:
+	addq	$FRAME_SIZE, REG_SP			# Remove save area from C stack
 	ret
-# op_forcenum ENDP
-
-# END
diff --git a/sr_x86_64/op_forchk1.s b/sr_x86_64/op_forchk1.s
index 16e25f4..58d2c95 100644
--- a/sr_x86_64/op_forchk1.s
+++ b/sr_x86_64/op_forchk1.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,20 +10,14 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_forchk1.s
-	.sbttl	op_forchk1
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
+	.include "g_msf.si"
+	.include "linkage.si"
 
 	.text
-# PUBLIC	op_forchk1
-ENTRY op_forchk1
+#
+# This routine just provides an interception point potential. No work happens here so no need to
+# check stack alignment (which is off due to the return address on the stack). If ever a call is
+# added then this routine should take care to align the stack to 16 bytes and add a CHKSTKALIGN macro.
+#
+ENTRY	op_forchk1
 	ret
-# op_forchk1 ENDP
-
-# END
diff --git a/sr_x86_64/op_forinit.s b/sr_x86_64/op_forinit.s
index f94696d..c31b279 100644
--- a/sr_x86_64/op_forinit.s
+++ b/sr_x86_64/op_forinit.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,61 +10,53 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_forinit.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_forinit
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	numcmp
-.extern	s2n
+	.extern	numcmp
+	.extern	s2n
+
+arg0_save	= 0
+arg1_save	= 8
+arg2_save	= 16
+FRAME_SIZE	= 32					# 32 bytes of save area
 
-# PUBLIC	op_forinit
-ENTRY op_forinit
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
+ENTRY	op_forinit
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
 	movq    REG_PV, msf_ctxt_off(REG64_SCRATCH1)
-	popq	msf_mpc_off(REG64_SCRATCH1)
-	pushq	REG64_ARG2			#Push args to avoid getting modified across function calls
-	pushq	REG64_ARG1
-	pushq	REG64_ARG0
-	movq	REG64_ARG1,REG64_ACCUM		# 2nd argument
+	popq	msf_mpc_off(REG64_SCRATCH1)		# Save return address (and 16 byte align the stack)
+	subq	$FRAME_SIZE, REG_SP			# Allocate save area
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_ARG2, arg2_save(REG_SP)		# Save args to avoid getting modified across function calls
+	movq	REG64_ARG0, arg0_save(REG_SP)
+	movq	REG64_ARG1, REG64_ACCUM			# Copy 2nd argument (REG64_ARG1)
 	mv_force_defined REG64_ACCUM, t1
-	pushq	REG64_ACCUM
+	movq	REG64_ACCUM, arg1_save(REG_SP)		# Save (possibly modified) 2nd argument (REG64_ARG1)
 	mv_force_num REG64_ACCUM, t2
-	popq	REG64_ACCUM			# restore 2nd argument
-	cmpl	$0,mval_l_m1(REG64_ACCUM)
+	movq	arg1_save(REG_SP), REG64_ACCUM		# Restore 2nd argument (REG64_ARG1)
+	cmpl	$0, mval_l_m1(REG64_ACCUM)
 	js	l2
 	mv_if_int REG64_ACCUM, l1
-	testb 	$mval_esign_mask,mval_b_exp(REG64_ACCUM)
+	testb 	$mval_esign_mask, mval_b_exp(REG64_ACCUM)
 	jne	l2
-l1:	movq	0(REG_SP),REG64_ARG0		#compare first with third
-	movq	16(REG_SP),REG64_ARG1		#third
+l1:
+	movq	arg0_save(REG_SP), REG64_ARG0		# Compare first with third
+	movq	arg2_save(REG_SP), REG64_ARG1
 	call	numcmp
-	addq	$24,REG_SP			#Pop all the argument locally pushed
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	pushq	msf_mpc_off(REG64_SCRATCH1)
-	cmpl	$0,REG32_RET0
-	ret
-
-l2:	movq	16(REG_SP),REG64_ARG0		#compare third with first
-	movq	0(REG_SP),REG64_ARG1		#first
+	jmp	done
+l2:
+	movq	arg2_save(REG_SP), REG64_ARG0		# Compare third with first
+	movq	arg0_save(REG_SP), REG64_ARG1
 	call	numcmp
-	addq	$24,REG_SP			#Pop all the argument locally pushed
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	pushq	msf_mpc_off(REG64_SCRATCH1)
-	cmpl	$0,REG32_RET0
+done:
+	addq	$FRAME_SIZE, REG_SP			# Unwind stack frame savearea
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	pushq	msf_mpc_off(REG64_SCRATCH1)		# Push return addr back on stack
+	cmpl	$0, REG32_RET0				# Set condition code for caller
 	ret
-# op_forinit ENDP
-
-# END
diff --git a/sr_x86_64/op_forintrrpt.s b/sr_x86_64/op_forintrrpt.s
index 4121813..6fa4657 100644
--- a/sr_x86_64/op_forintrrpt.s
+++ b/sr_x86_64/op_forintrrpt.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,35 +10,29 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_forintrrpt.s
-	.sbttl	op_forintrrpt
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-	.DATA
-.extern	neterr_pending
-.extern	restart_pc
+	.data
+	.extern	neterr_pending
+	.extern	restart_pc
 
 	.text
-.extern	gvcmz_neterr
-.extern	async_action
-.extern	outofband_clear
+	.extern	gvcmz_neterr
+	.extern	async_action
+	.extern	outofband_clear
 
-# PUBLIC	op_forintrrpt
-ENTRY op_forintrrpt
-	cmpb	$0,neterr_pending(REG_IP)
+ENTRY	op_forintrrpt
+	subq	$8, REG_SP			# Allocate save area and align stack to 16 bytes
+	CHKSTKALIGN				# Verify stack alignment
+	cmpb	$0, neterr_pending(REG_IP)
 	je	l1
 	call	outofband_clear
-	movq	$0,REG64_ARG0
+	movq	$0, REG64_ARG0
 	call	gvcmz_neterr
-l1:	movl	$0,REG32_ARG0
+l1:
+	movl	$0, REG32_ARG0
 	call	async_action
+	addq	$8, REG_SP			# Remove alignment stack bump
 	ret
-# op_forintrrpt ENDP
-
-# END
diff --git a/sr_x86_64/op_forlcldo.s b/sr_x86_64/op_forlcldo.s
index 36fbe3b..ad91bcc 100644
--- a/sr_x86_64/op_forlcldo.s
+++ b/sr_x86_64/op_forlcldo.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,34 +10,27 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_forlcldo.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_forlcldo
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame
+	.extern	exfun_frame
 
-	.sbttl	op_forlcldob
-# PUBLIC	op_forlcldob
-ENTRY op_forlcldow
-ENTRY op_forlcldol
-ENTRY op_forlcldob
-	movq	frame_pointer(REG_IP),REG64_ARG2
-	movq	(REG_SP),REG64_ACCUM               # return address
-	addq    REG64_ARG0, REG64_ACCUM
-        movq	REG64_ACCUM,msf_mpc_off(REG64_ARG2)
-	call	exfun_frame
-	movq	frame_pointer(REG_IP),REG64_ARG2
-	movq	msf_temps_ptr_off(REG64_ARG2),REG_FRAME_TMP_PTR
+ENTRY	op_forlcldow
+ENTRY	op_forlcldol
+ENTRY	op_forlcldob
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	movq	8(REG_SP), REG64_ACCUM			# Get our return address
+	addq    REG64_ARG0, REG64_ACCUM			# Add in return offset parm
+        movq	REG64_ACCUM, msf_mpc_off(REG64_ARG2)	# Save as return address for this frame
+	call	exfun_frame				# Create new frame
+	movq	frame_pointer(REG_IP), REG_FRAME_POINTER # Get updated frame pointer
+	movq	msf_temps_ptr_off(REG_FRAME_POINTER), REG_FRAME_TMP_PTR # .. and updated temps pointer
+	addq	$8, REG_SP				# Remove our stack alignment bump
 	ret
-# op_forlcldob ENDP
diff --git a/sr_x86_64/op_forloop.s b/sr_x86_64/op_forloop.s
index 32d5971..8860b6f 100644
--- a/sr_x86_64/op_forloop.s
+++ b/sr_x86_64/op_forloop.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,175 +10,177 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_forloop.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_forloop
-#	PAGE	+
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
+#
 #	Called with the stack contents:
 #		call return
 #		ptr to index mval
 #		ptr to step mval
 #		ptr to terminator mval
 #		loop address
-	.DATA
-.extern	frame_pointer
-
-ten_dd:
-.long	10
+#
+	.data
+	.extern	frame_pointer
+ten_dd:	.long	10
 
 	.text
-.extern	add_mvals
-.extern	numcmp
-.extern	s2n
-
-loop	=	32
-term	=	24
-step	=	16
-indx	=	8
-
-# PUBLIC	op_forloop
-ENTRY op_forloop
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
+	.extern	add_mvals
+	.extern	numcmp
+	.extern	s2n
+
+indx		= -8
+step		= -16
+term		= -24
+loop		= -32
+FRAME_SIZE	= 40					# Includes 8 bytes padding to 16 byte align stack
+
+ENTRY	op_forloop
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
 	popq	msf_mpc_off(REG64_SCRATCH1)
-	#Push the arguments on stack Argument registers are used in intermediate logic
-        pushq	REG64_ARG3		#loop address. Return address
-        pushq	REG64_ARG2
-        pushq	REG64_ARG1
-        pushq	REG64_ARG0
-	enter	$0, $0			#rbp pushed on stack and then rbp = rsp
-	pushq	REG_XFER_TABLE
-	movq	indx(REG_FRAME_POINTER),REG64_ARG1
-	mv_force_defined_strict REG64_ARG1, l0			# disregard NOUNDEF
-	movq	REG64_ARG1, indx(REG_FRAME_POINTER)
+	pushq	%rbp					# Save %rbp (aka GTM_FRAME_POINTER)
+	movq	REG_SP, %rbp				# Copy of stack pointer
+	subq	$FRAME_SIZE, REG_SP			# Create save area that leaves stack 16 byte aligned
+	CHKSTKALIGN					# Verify stack alignment
+	#
+	# Save the arguments on stack
+	#
+        movq	REG64_ARG3, loop(%rbp)
+        movq	REG64_ARG2, term(%rbp)
+        movq	REG64_ARG1, step(%rbp)
+        movq	REG64_ARG0, indx(%rbp)
+	movq	REG64_ARG0, REG64_ARG1
+	mv_force_defined_strict REG64_ARG1, l0		# Disregard NOUNDEF - errors if not defined
 	mv_force_num REG64_ARG1, l1
-	movq	indx(REG_FRAME_POINTER),REG64_ARG1
-	movq	step(REG_FRAME_POINTER),REG64_ARG0
-	movw	mval_w_mvtype(REG64_ARG1),REG16_ACCUM
-	movw	mval_w_mvtype(REG64_ARG0),REG16_ARG2
-	andw	REG16_ARG2,REG16_ACCUM
-	testw	$mval_m_int_without_nm,REG16_ACCUM
+	movq	indx(%rbp), REG64_ARG1
+	movq	step(%rbp), REG64_ARG0
+	movw	mval_w_mvtype(REG64_ARG1), REG16_ACCUM
+	movw	mval_w_mvtype(REG64_ARG0), REG16_ARG2
+	andw	REG16_ARG2, REG16_ACCUM
+	testw	$mval_m_int_without_nm, REG16_ACCUM
 	je	L66
-	movl	mval_l_m1(REG64_ARG1),REG32_ACCUM
-	addl	mval_l_m1(REG64_ARG0),REG32_ACCUM
-	cmpl	$MANT_HI,REG32_ACCUM
+	movl	mval_l_m1(REG64_ARG1), REG32_ACCUM
+	addl	mval_l_m1(REG64_ARG0), REG32_ACCUM
+	cmpl	$MANT_HI, REG32_ACCUM
 	jge	L68
-	cmpl	$-MANT_HI,REG32_ACCUM
+	cmpl	$-MANT_HI, REG32_ACCUM
 	jle	L67
-	movw	$mval_m_int,mval_w_mvtype(REG64_ARG1)
-	movl	REG32_ACCUM,mval_l_m1(REG64_ARG1)
+	movw	$mval_m_int, mval_w_mvtype(REG64_ARG1)
+	movl	REG32_ACCUM, mval_l_m1(REG64_ARG1)
 	jmp	L63
-
-L67:	movb	$mval_esign_mask,mval_b_exp(REG64_ARG1)	#set sign bit
+L67:
+	movb	$mval_esign_mask, mval_b_exp(REG64_ARG1) # Set sign bit
 	negl	REG32_ACCUM
 	jmp	L69
-
-L68:	movb	$0,mval_b_exp(REG64_ARG1)			# clear sign bit
-L69:	movw	$mval_m_nm,mval_w_mvtype(REG64_ARG1)
-	orb	$69,mval_b_exp(REG64_ARG1)			# set exponent field
-	movl	REG32_ACCUM,REG32_SCRATCH1
-	movl	$0,REG32_ARG2
-	idivl	ten_dd(REG_IP),REG32_ACCUM
-	movl	REG32_ACCUM,mval_l_m1(REG64_ARG1)
-	imull	$10,REG32_ACCUM,REG32_ACCUM
-	subl	REG32_ACCUM,REG32_SCRATCH1
-	imull	$MANT_LO,REG32_SCRATCH1,REG32_SCRATCH1
-	movl	REG32_SCRATCH1,mval_l_m0(REG64_ARG1)
+L68:
+	movb	$0, mval_b_exp(REG64_ARG1)		# Clear sign bit
+L69:
+	movw	$mval_m_nm, mval_w_mvtype(REG64_ARG1)
+	orb	$69, mval_b_exp(REG64_ARG1)		# Set exponent field
+	movl	REG32_ACCUM, REG32_SCRATCH1
+	movl	$0, REG32_ARG2
+	idivl	ten_dd(REG_IP), REG32_ACCUM
+	movl	REG32_ACCUM, mval_l_m1(REG64_ARG1)
+	imull	$10, REG32_ACCUM, REG32_ACCUM
+	subl	REG32_ACCUM, REG32_SCRATCH1
+	imull	$MANT_LO, REG32_SCRATCH1, REG32_SCRATCH1
+	movl	REG32_SCRATCH1, mval_l_m0(REG64_ARG1)
 	jmp	L63
-
-L66:	movq	REG64_ARG1,REG64_ARG3
-	movl	$0,REG32_ARG2
-	movq	REG64_ARG0,REG64_ARG1
-	movq	REG64_ARG3,REG64_ARG0
+L66:
+	movq	REG64_ARG1, REG64_ARG3
+	movl	$0, REG32_ARG2
+	movq	REG64_ARG0, REG64_ARG1
+	movq	REG64_ARG3, REG64_ARG0
 	call	add_mvals
-	movq	indx(REG_FRAME_POINTER),REG64_ARG1
-L63:	movq	step(REG_FRAME_POINTER),REG64_ARG0
-	testw	$mval_m_int_without_nm,mval_w_mvtype(REG64_ARG0)
+	movq	indx(%rbp), REG64_ARG1
+L63:
+	movq	step(%rbp), REG64_ARG0
+	testw	$mval_m_int_without_nm, mval_w_mvtype(REG64_ARG0)
 	jne	a
-	cmpb	$0,mval_b_exp(REG64_ARG0)
+	cmpb	$0, mval_b_exp(REG64_ARG0)
 	jl	b
 	jmp	a2
-
-a:	cmpl	$0,mval_l_m1(REG64_ARG0)
+a:
+	cmpl	$0, mval_l_m1(REG64_ARG0)
 	jl	b
-a2:	movq	term(REG_FRAME_POINTER),REG64_ARG0
+a2:
+	movq	term(%rbp), REG64_ARG0
 	jmp	e
-
-b:	movq	REG64_ARG1,REG64_ARG0		# if step is negative, reverse compare
-	movq	term(REG_FRAME_POINTER),REG64_ARG1
-e:	# compare indx and term
-	movw	mval_w_mvtype(REG64_ARG1),REG16_ACCUM
-	movw	mval_w_mvtype(REG64_ARG0),REG16_ARG2
-	andw	REG16_ARG2,REG16_ACCUM
-	testw	$2,REG16_ACCUM
+b:
+	movq	REG64_ARG1, REG64_ARG0			# If step is negative, reverse compare
+	movq	term(%rbp), REG64_ARG1
+e:
+	#
+	# Compare indx and term
+	#
+	movw	mval_w_mvtype(REG64_ARG1), REG16_ACCUM
+	movw	mval_w_mvtype(REG64_ARG0), REG16_ARG2
+	andw	REG16_ARG2, REG16_ACCUM
+	testw	$2, REG16_ACCUM
 	je	ccmp
-	movl	mval_l_m1(REG64_ARG1),REG32_ACCUM
-	subl	mval_l_m1(REG64_ARG0),REG32_ACCUM
+	movl	mval_l_m1(REG64_ARG1), REG32_ACCUM
+	subl	mval_l_m1(REG64_ARG0), REG32_ACCUM
 	jmp	tcmp
-
-ccmp:	xchgq	REG64_ARG0,REG64_ARG1
+ccmp:
+	xchgq	REG64_ARG0, REG64_ARG1
 	call	numcmp
-	cmpl	$0,REG32_ACCUM
-tcmp:	jle	d
-	movq	indx(REG_FRAME_POINTER),REG64_ARG1
-	movq	step(REG_FRAME_POINTER),REG64_ARG0
-	movw	mval_w_mvtype(REG64_ARG1),REG16_ACCUM
-	movw	mval_w_mvtype(REG64_ARG0),REG16_ARG2
-	andw	REG16_ARG2,REG16_ACCUM
-	testw	$mval_m_int_without_nm,REG16_ACCUM
+	cmpl	$0, REG32_ACCUM
+tcmp:
+	jle	newiter
+	movq	indx(%rbp), REG64_ARG1
+	movq	step(%rbp), REG64_ARG0
+	movw	mval_w_mvtype(REG64_ARG1), REG16_ACCUM
+	movw	mval_w_mvtype(REG64_ARG0), REG16_ARG2
+	andw	REG16_ARG2, REG16_ACCUM
+	testw	$mval_m_int_without_nm, REG16_ACCUM
 	je	l66
-	movl	mval_l_m1(REG64_ARG1),REG32_ACCUM
-	subl	mval_l_m1(REG64_ARG0),REG32_ACCUM
-	cmpl	$MANT_HI,REG32_ACCUM
+	movl	mval_l_m1(REG64_ARG1), REG32_ACCUM
+	subl	mval_l_m1(REG64_ARG0), REG32_ACCUM
+	cmpl	$MANT_HI, REG32_ACCUM
 	jge	l68
-	cmpl	$-MANT_HI,REG32_ACCUM
+	cmpl	$-MANT_HI, REG32_ACCUM
 	jle	l67
-	movw	$mval_m_int,mval_w_mvtype(REG64_ARG1)
-	movl	REG32_ACCUM,mval_l_m1(REG64_ARG1)
-	jmp	l63
-
-l67:	movb	$mval_esign_mask,mval_b_exp(REG64_ARG1)		# set sign bit
+	movw	$mval_m_int, mval_w_mvtype(REG64_ARG1)
+	movl	REG32_ACCUM, mval_l_m1(REG64_ARG1)
+	jmp	done
+l67:
+	movb	$mval_esign_mask, mval_b_exp(REG64_ARG1) # Set sign bit
 	negl	REG32_ACCUM
 	jmp	l69
-
-l68:	movb	$0,mval_b_exp(REG64_ARG1)				# clear sign bit
-l69:	movw	$mval_m_nm,mval_w_mvtype(REG64_ARG1)
-	orb	$69,mval_b_exp(REG64_ARG1)
-	movl	REG32_ACCUM,REG32_SCRATCH1
-	movl	$0,REG32_ARG2					#set edx to 0 before div
-	idivl	ten_dd(REG_IP),REG32_ACCUM
-	movl	REG32_ACCUM,mval_l_m1(REG64_ARG1)
-	imull	$10,REG32_ACCUM,REG32_ACCUM
-	subl	REG32_ACCUM,REG32_SCRATCH1
-	imull	$MANT_LO,REG32_SCRATCH1,REG32_SCRATCH1
-	movl	REG32_SCRATCH1,mval_l_m0(REG64_ARG1)
-	jmp	l63
-
-l66:	movq	REG64_ARG1,REG64_ARG3
-	movl	$1,REG32_ARG2
-	movq	REG64_ARG0,REG64_ARG1
-	movq	REG64_ARG3,REG64_ARG0		#First and fourth args are same
+l68:
+	movb	$0, mval_b_exp(REG64_ARG1)		# Clear sign bit
+l69:
+	movw	$mval_m_nm, mval_w_mvtype(REG64_ARG1)
+	orb	$69, mval_b_exp(REG64_ARG1)
+	movl	REG32_ACCUM, REG32_SCRATCH1
+	movl	$0, REG32_ARG2				# Set edx to 0 before div
+	idivl	ten_dd(REG_IP), REG32_ACCUM
+	movl	REG32_ACCUM, mval_l_m1(REG64_ARG1)
+	imull	$10, REG32_ACCUM, REG32_ACCUM
+	subl	REG32_ACCUM, REG32_SCRATCH1
+	imull	$MANT_LO, REG32_SCRATCH1, REG32_SCRATCH1
+	movl	REG32_SCRATCH1, mval_l_m0(REG64_ARG1)
+	jmp	done
+l66:
+	movq	REG64_ARG1, REG64_ARG3
+	movl	$1, REG32_ARG2
+	movq	REG64_ARG0, REG64_ARG1
+	movq	REG64_ARG3, REG64_ARG0			# First and fourth args are same
 	call	add_mvals
-l63:	popq	REG_XFER_TABLE
-	leave
-	addq	$32,REG_SP			#Pop all incoming arguments
-	movq	frame_pointer(REG_IP),REG64_SCRATCH1
-	pushq	msf_mpc_off(REG64_SCRATCH1)
+done:
+	movq	%rbp, REG_SP				# Unwind save frame
+	popq	%rbp					# Restore caller's %rbp
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	pushq	msf_mpc_off(REG64_SCRATCH1)		# End of loop - return to caller
 	ret
-
-d:	popq	REG_XFER_TABLE
-	leave
-	addq	$24,REG_SP			#Pop all the arguments except loop address
+newiter:
+	#
+	# Return to loop return address for another iteration
+	#
+	movq	loop(%rbp), REG64_SCRATCH1		# Save loop return address
+	movq	%rbp, REG_SP				# Unwind save frame
+	popq	%rbp					# Restore caller's %rbp
+	pushq	REG64_SCRATCH1				# Set return address
 	ret
-
-# op_forloop ENDP
-
-# END
-
diff --git a/sr_x86_64/op_gettruth.s b/sr_x86_64/op_gettruth.s
index 1d31cf4..7f1fc2d 100644
--- a/sr_x86_64/op_gettruth.s
+++ b/sr_x86_64/op_gettruth.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,37 +10,36 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_gettruth.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_gettruth
-#	PAGE	+
-	.DATA
-.extern	dollar_truth
-.extern	literal_one
-.extern	literal_zero
+	.data
+	.extern	dollar_truth
+	.extern	literal_one
+	.extern	literal_zero
 
 	.text
-# PUBLIC	op_gettruth
-ENTRY op_gettruth
-	cmpl	$0,dollar_truth(REG_IP)
+	#
+	# Routine to fetch mval representing value of $TEST (formerly $TRUTH).
+	#
+	# Note this routine is a leaf routine so does no stack-alignment or checking. If that changes, this routine
+	# needs to use CHKSTKALIGN macro and make sure stack is 16 byte aligned.
+	#
+ENTRY	op_gettruth
+	cmpl	$0, dollar_truth(REG_IP)
 	jne	l1
-	leaq	literal_zero(REG_IP),REG64_ARG1
+	leaq	literal_zero(REG_IP), REG64_ARG1
 	jmp	doit
 
-l1:	leaq	literal_one(REG_IP),REG64_ARG1
-doit:	movq	REG64_RET1,REG64_ARG0
-	movl	$mval_byte_len,REG32_ARG3
+l1:
+	leaq	literal_one(REG_IP), REG64_ARG1
+doit:
+	#
+	# Copy/return literal_zero or literal_one mval to caller
+	#
+	movq	REG64_RET1, REG64_ARG0
+	movl	$mval_byte_len, REG32_ARG3
 	REP
 	movsb
 	ret
-# op_gettruth ENDP
-
-# END
diff --git a/sr_x86_64/op_iretmvad.s b/sr_x86_64/op_iretmvad.s
index 44d6371..9c0c948 100644
--- a/sr_x86_64/op_iretmvad.s
+++ b/sr_x86_64/op_iretmvad.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,34 +10,24 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_iretmvad.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_iretmvad
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_unwind
+	.extern	op_unwind
 
-# PUBLIC	op_iretmvad
-ENTRY op_iretmvad
-	movq	REG64_RET1,REG64_ARG3
+ENTRY	op_iretmvad
 	putframe
-	addq    $8,REG_SP              # burn return PC
-	movq	REG64_ARG3,REG64_ARG2
-	pushq	REG64_RET1
+	addq    $8, REG_SP		# Burn return PC and 16 byte align stack
+	subq	$16, REG_SP		# Bump stack for 16 byte alignment and a save area
+	CHKSTKALIGN			# Verify stack alignment
+	movq	REG64_RET1, 0(REG_SP)
 	call	op_unwind
-	popq	REG64_RET0		# return input parameter
-	getframe
+	movq	0(REG_SP), REG64_RET0	# Return input parameter
+	addq	$16, REG_SP		# Unwind C frame save area
+	getframe			# Pick up new stack frame regs & push return addr
 	ret
-# op_iretmvad ENDP
-
-# END
diff --git a/sr_x86_64/op_linefetch.s b/sr_x86_64/op_linefetch.s
index aad83d4..3ac89d0 100644
--- a/sr_x86_64/op_linefetch.s
+++ b/sr_x86_64/op_linefetch.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2009 Fidelity Information Services, Inc       #
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,33 +10,29 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_linefetch.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_linefetch
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	gtm_fetch
+	.extern	gtm_fetch
 
-# PUBLIC	op_linefetch
-ENTRY op_linefetch
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)            # save incoming return PC in frame_pointer->mpc
-	movq	REG_PV, msf_ctxt_off(REG64_ACCUM)   # Save linkage pointer
-	movb    $0,REG8_ACCUM                       # variable length argument
+	#
+	# This routine does local variable fetch for all variables on a given line of code, or alternatively, all
+	# variables in a routine depending on arguments from generated code we pass-thru.
+	#
+	# Since this routine pops its return address off the stack, the stack becomes 16 byte aligned. Verify that.
+	#
+ENTRY	op_linefetch
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save incoming return PC in frame_pointer->mpc
+	movq	REG_PV, msf_ctxt_off(REG64_ACCUM)	# Save linkage pointer
+	CHKSTKALIGN					# Verify stack alignment
+	movb    $0, REG8_ACCUM				# No variable length arguments
 	call	gtm_fetch
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	pushq	msf_mpc_off(REG64_ACCUM)
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	pushq	msf_mpc_off(REG64_ACCUM)		# Push return address back on stack for return
 	ret
-# op_linefetch ENDP
-
-# END
diff --git a/sr_x86_64/op_linestart.s b/sr_x86_64/op_linestart.s
index 3c24019..33f3b74 100644
--- a/sr_x86_64/op_linestart.s
+++ b/sr_x86_64/op_linestart.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,28 +10,24 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_linestart.s
+	.include "linkage.si"
+	.include "g_msf.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_linestart
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-# PUBLIC	op_linestart
-ENTRY op_linestart
-	movq    frame_pointer(REG_IP),REG64_RET1
-        movq    (REG_SP),REG64_ACCUM
-        movq    REG64_ACCUM,msf_mpc_off(REG64_RET1)   # save incoming return address in frame_pointer->mpc
-	movq    REG_PV, msf_ctxt_off(REG64_RET1)      # Save ctxt in frame_pointer
-	ret
-# op_linestart ENDP
 
-# END
+	#
+	# Routine to save the current return address and context in the current stack frame.
+	#
+	# Since this routine is a leaf routine (no calls), its stack frame alignment is not critical. If that changes,
+	# this routine should do the necessary to keep the stack 16 byte aligned and use the CHKSTKALIGN macro to verify
+	# it is so.
+	#
+ENTRY	op_linestart
+	movq    frame_pointer(REG_IP), REG64_RET1	# -> M frame
+        movq    (REG_SP), REG64_ACCUM			# Fetch return address to save
+        movq    REG64_ACCUM, msf_mpc_off(REG64_RET1)	# Save incoming return address in frame_pointer->mpc
+	movq    REG_PV, msf_ctxt_off(REG64_RET1)	# Save ctxt in frame_pointer
+	ret
diff --git a/sr_x86_64/op_mprofcall.s b/sr_x86_64/op_mprofcall.s
index 81b60ac..3f9cdcd 100644
--- a/sr_x86_64/op_mprofcall.s
+++ b/sr_x86_64/op_mprofcall.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,32 +10,34 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofcall.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mprofcallb
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	copy_stack_frame_sp
+	.extern	copy_stack_frame_sp
 
-# PUBLIC	op_mprofcallb
-ENTRY op_mprofcallb
-ENTRY op_mprofcallw
-ENTRY op_mprofcalll
-	movq    frame_pointer(REG_IP),REG64_SCRATCH1
-        movq    (REG_SP),REG64_ACCUM
-        movq    REG64_ACCUM,msf_mpc_off(REG64_SCRATCH1)
-        addq    REG64_ARG0,msf_mpc_off(REG64_SCRATCH1) # OCNT_REF triple newly added to send byte offset from return address
-	call	copy_stack_frame_sp			# Refer emit_code.c
+#
+# op_mprofcall - Sets up a local routine call (does not leave routine)
+#
+# This is the M profiling version which calls different routine(s) for M profiling purposes.
+#
+# Argument:
+#	REG64_ARG0 - Value from OCNT_REF triple that contains the byte offset from the return address
+#		     where the local call should actually return to.
+#
+ENTRY	op_mprofcalll
+ENTRY	op_mprofcallw
+ENTRY	op_mprofcallb
+	movq	(REG_SP),REG64_ACCUM			# Save return addr in reg
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	REG64_ACCUM, msf_mpc_off(REG64_SCRATCH1) # Save return addr in M frame
+	addq	REG64_ARG0, msf_mpc_off(REG64_SCRATCH1)	# Add in return offset
+	call	copy_stack_frame_sp			# Copy current stack frame for local call
+	addq	$8, REG_SP				# Remove stack alignment bump
 	ret
-# op_callb ENDP
-# END
diff --git a/sr_x86_64/op_mprofcallsp.s b/sr_x86_64/op_mprofcallsp.s
index ba63d62..5c02e64 100644
--- a/sr_x86_64/op_mprofcallsp.s
+++ b/sr_x86_64/op_mprofcallsp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,39 +10,40 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofcallsp.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mprofcallsp
-#	PAGE	+
-	.DATA
-.extern	dollar_truth
-.extern	frame_pointer
+	.data
+	.extern	dollar_truth
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame_push_dummy_frame
-.extern	push_tval
+	.extern	exfun_frame_push_dummy_frame
+	.extern	push_tval
 
-	.sbttl	op_mprofcallspb
-# PUBLIC	op_mprofcallspb
-ENTRY op_mprofcallspb
-ENTRY op_mprofcallspw
-ENTRY op_mprofcallspl
-	movq    frame_pointer(REG_IP),REG64_SCRATCH1
-        movq    (REG_SP),REG64_ACCUM
-        movq    REG64_ACCUM,msf_mpc_off(REG64_SCRATCH1)
-        addq    REG64_ARG0,msf_mpc_off(REG64_SCRATCH1)
-	call	exfun_frame_push_dummy_frame
-	movl	dollar_truth(REG_IP),REG32_ARG0
-	call    push_tval
-        movq    frame_pointer(REG_IP),REG64_SCRATCH1
-        movq    msf_temps_ptr_off(REG64_SCRATCH1),REG_FRAME_TMP_PTR
+#
+# op_mprofcallsp - Used to build a new stack level for argumentless DO (also saves $TEST)
+#
+# This is the M profiling version which calls different routine(s) for M profiling purposes.
+#
+# Argument:
+#	REG64_ARG0 - Value from OCNT_REF triple that contains the byte offset from the return address
+#		     to return to when the level pops.
+#
+ENTRY	op_mprofcallspl
+ENTRY	op_mprofcallspw
+ENTRY	op_mprofcallspb
+	movq	(REG_SP), REG64_ACCUM			# Save return addr in reg
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	REG64_ACCUM, msf_mpc_off(REG64_SCRATCH1) # Save return addr in M frame
+	addq	REG64_ARG0, msf_mpc_off(REG64_SCRATCH1) # Add in return offset
+	call	exfun_frame_push_dummy_frame		# Copies stack frame and creates new temps
+	movl	dollar_truth(REG_IP), REG32_ARG0
+	call	push_tval
+	movq	frame_pointer(REG_IP), REG_FRAME_POINTER
+	movq	msf_temps_ptr_off(REG_FRAME_POINTER), REG_FRAME_TMP_PTR
+	addq	$8, REG_SP				# Remove stack alignment bump
 	ret
-# op_mprofcallspb ENDP
-# END
diff --git a/sr_x86_64/op_mprofexfun.s b/sr_x86_64/op_mprofexfun.s
index 6db6ab1..2babd19 100644
--- a/sr_x86_64/op_mprofexfun.s
+++ b/sr_x86_64/op_mprofexfun.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2013 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,109 +10,134 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofexfun.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mprofexfun
-#	PAGE	+
-#	call op_mprofexfun with the following stack:
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
+#
+# Routine to set up the stack frame for a local (same routine) invocation. It can
+# be one of any of the following forms:
+#
+#   1. A local call with parameters (OC_EXCAL triple - DO rtn(parms)). In this case the
+#      address of the return value is NULL.
+#   2. A local extrinsic with no parameters (OC_EXFUN triple $$func).
+#   2. A local extrinsic with parameters (OC_EXFUN triple $$func(parms)).
+#
+# Arguments:
+#
+#   REG_ARG0: Address of return value
+#   REG_ARG1: Offset from our return address to where this stackframe needs to return
+#   REG_ARG2: Mask
+#   REG_ARG3: Actualcnt
+#   REG_ARG4: Actuallist1 address
+#   REG_ARG5: Actuallist2 address
+#   (remainder of args on stack if any)
+#
+# This is the M profiling version which calls different routine(s) for M profiling purposes.
+#
+# Note no need to save %rbp in the prologue as it gets reset to the new frame when we return
 #
-#		return PC
-#		ret_value address
-# 		mask
-#		actualcnt
-#		actual1 address
-#		actual2 address
-#		...
 
-	.DATA
-.extern	ERR_GTMCHECK
-.extern	dollar_truth
-.extern	frame_pointer
+	.data
+	.extern	ERR_GTMCHECK
+	.extern	dollar_truth
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame_sp
-.extern	push_parm
-.extern	rts_error
-
-arg2_off	=	-72
-arg1_off	=	-64
-arg0_off	=	-56
-act_cnt		=	-48
-mask_arg	=	-44
-ret_val		=	-40
-rtn_pc		=	-32
+	.extern	exfun_frame_sp
+	.extern	push_parm
+	.extern	rts_error
 
-sav_esi		=	-8
-sav_ebx		=	-16
-sav_msf		=	-24
+arg2_off	= -48
+arg1_off	= -40
+arg0_off	= -32
+act_cnt		= -24
+mask_arg	= -20
+ret_val		= -16
+rtn_pc		= -8
+FRAME_SAVE_SIZE	= 56					# This size 16 byte aligns the stack
 
-# PUBLIC	op_mprofexfun
-ENTRY op_mprofexfun
-	pushq	REG_XFER_TABLE
-	enter   $80,$0
-        movq    16(REG_FRAME_POINTER), REG64_SCRATCH1
-	movq	REG64_SCRATCH1,rtn_pc(REG_FRAME_POINTER)		# Save return address
-        movq    REG64_ARG0,ret_val(REG_FRAME_POINTER)			# Save incoming arguments
-        movl    REG32_ARG2,mask_arg(REG_FRAME_POINTER)
-        movl    REG32_ARG3,act_cnt(REG_FRAME_POINTER)
-	movq    REG64_ARG4,arg0_off(REG_FRAME_POINTER)
-        movq    REG64_ARG5,arg1_off(REG_FRAME_POINTER)
-	movq    frame_pointer(REG_IP),REG64_ARG2
-        movq    rtn_pc(REG_FRAME_POINTER),REG64_ACCUM			#Verify the immediate instruction after this
-	cmpb	$JMP_Jv,(REG64_ACCUM)					# function call
-	je	long
-
-error:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-        movl	$1,REG32_ARG0
-	movb	$0,REG8_ACCUM             # variable length argument
-	call	rts_error
-	jmp	retlab
-
-long:	movq    REG64_ACCUM,msf_mpc_off(REG64_ARG2)
-	addq	REG64_ARG1,msf_mpc_off(REG64_ARG2)
-cont:	call	exfun_frame_sp
-	movq    frame_pointer(REG_IP),REG64_SCRATCH1
-
-        movl    act_cnt(REG_FRAME_POINTER),REG32_ACCUM
-        cmpl    $0,REG32_ACCUM                          #arg0, arg1, arg2 are stored in rbp
-        je      no_arg
-        cmpl    $1,REG32_ACCUM                          #We have only one register free for push_param args
-        je      arg0
-        cmpl	$2,REG32_ACCUM
-        je	arg1
-	cltq
-	leaq	(REG_FRAME_POINTER,REG64_ACCUM,8),REG64_SCRATCH1
-again:	pushq	(REG64_SCRATCH1)
-        subq    $8,REG64_SCRATCH1
-        subl    $1,REG32_ACCUM
-        cmpl    $2,REG32_ACCUM
-        jg	again
-arg1:   pushq   arg1_off(REG_FRAME_POINTER)
-arg0:   movq    arg0_off(REG_FRAME_POINTER),REG64_ARG5  #Only one argument which can be fitted into REG5
-no_arg: movl    act_cnt(REG_FRAME_POINTER), REG32_ARG4  #Actual Arg cnt
-	movl    mask_arg(REG_FRAME_POINTER),REG32_ARG3	#Mask
-        movq    ret_val(REG_FRAME_POINTER), REG64_ARG2	#ret_value
-	movl	dollar_truth(REG_IP),REG32_ACCUM
-	andl	$1,REG32_ACCUM
-	movl    REG32_ACCUM,REG32_ARG1                  #$T
-	movl	act_cnt(REG_FRAME_POINTER),REG32_ACCUM
-	addl	$4,REG32_ACCUM
-	movl    REG32_ACCUM, REG32_ARG0                 #Totalcount = Act count +4
-	movb    $0,REG8_ACCUM             		# variable length argument
-	call	push_parm				# push_parm (total, $T, ret_value, mask, argc [,arg1, arg2, ...]);
-done:	movq    frame_pointer(REG_IP),REG64_SCRATCH1
-	movq	msf_temps_ptr_off(REG64_SCRATCH1),REG_FRAME_TMP_PTR
-retlab:	leave
-	movq    REG64_SCRATCH1,REG_FRAME_POINTER
-	popq	REG_XFER_TABLE
+ENTRY	op_mprofexfun
+	movq	0(REG_SP), REG64_SCRATCH1		# Save return address for storage in M stack frame
+	movq	REG_SP, %rbp				# Copy previous stack-frame to %rbp
+	subq	$FRAME_SAVE_SIZE, REG_SP		# Create save area
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_SCRATCH1, rtn_pc(%rbp) 		# Save return address
+	movq	REG64_ARG0, ret_val(%rbp)		# Save incoming arguments
+	movl	REG32_ARG2, mask_arg(%rbp)
+	movl	REG32_ARG3, act_cnt(%rbp)
+	movq	REG64_ARG4, arg0_off(%rbp)
+	movq	REG64_ARG5, arg1_off(%rbp)
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	movq	rtn_pc(%rbp), REG64_ACCUM		# Verify the immediate instruction after
+	cmpb	$JMP_Jv, 0(REG64_ACCUM)			# .. this function call
+	jne	error
+	movq	REG64_ACCUM, msf_mpc_off(REG64_ARG2)
+	addq	REG64_ARG1, msf_mpc_off(REG64_ARG2)
+	call	exfun_frame_sp
+	movl	act_cnt(%rbp), REG32_ACCUM
+	cmpl	$0, REG32_ACCUM                         # arg0, arg1, arg2 are stored in save area off of %rbp
+	je	no_arg
+	cmpl	$1, REG32_ACCUM				# We have only one register free for push_parm args
+	je	arg0
+	#
+	# We have more than 1 actuallist parameters so we need some aligned space on the stack for parameters that
+	# don't fit in the 6 parm registers. Only the first actuallist parameter can fit in a parm register. All
+	# others must reside on the stack starting at the lowest address. So for example, if we need 7 slots, we
+	# must allocate 8 slots to keep the stack aligned but the 7 slots used must be those with the lowest address
+	# for this to work correctly.
+	#
+	# Normally we would subtract 1 to get the count of parms to be on the stack then round that to a multiple of
+	# 2 since 2 parms would be 16 bytes. The rounding would add 1 and shift but to avoid -1 then +1, just do the
+	# rounding "AND" on the value we have. Use REG64_ARG/ARG5 as temporary work registers.
+	#
+	cltq						# Convert REG32_ACCUM to REG64_ACCUM
+	movq	REG64_ACCUM, REG64_ARG5			# Copy of parmcnt
+	andq	$-2, REG64_ARG5				# Round to even value
+	shlq	$3, REG64_ARG5				# Mult by 8 via shifting gives us 16 byte aligned value
+	subq	REG64_ARG5, REG_SP			# Allocate aligned parm area on stack
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG_SP, REG64_ARG4			# Save bottom of allocation to REG64_ARG4
+	subq	$2, REG64_ACCUM				# Remove one parm to be passed in parmreg and one for 0 origin
+	leaq	(REG64_ARG4, REG64_ACCUM, 8), REG64_ARG4 # Address for last actuallist parm to be stored
+	cmpq	$0, REG64_ACCUM				# Only 1 arg left?
+	je	arg1
+	leaq	(%rbp, REG64_ACCUM, 8), REG64_SCRATCH1	# Address of last passed-in parameter
+again:
+	movq	0(REG64_SCRATCH1), REG64_ARG5		# Move parm to temp register
+	movq	REG64_ARG5, 0(REG64_ARG4)		# Move parm to home in stack location
+	subq	$8, REG64_SCRATCH1			# Move pointers to previous argument
+	subq	$8, REG64_ARG4
+	subq	$1, REG64_ACCUM				# Count down the parm
+	cmpq	$0, REG64_ACCUM				# See if down to 1 parm and if so, fall thru to handle it
+	jg	again
+arg1:
+	movq	arg1_off(%rbp), REG64_SCRATCH1		# Copy parm to register
+	movq	REG64_SCRATCH1, 0(REG64_ARG4)		# Copy parm to stack resident location
+arg0:
+	movq	arg0_off(%rbp), REG64_ARG5  		# Only one argument which can be fitted into REG5
+no_arg:
+	movl	act_cnt(%rbp), REG32_ARG4		# Actual Arg cnt
+	movl	mask_arg(%rbp), REG32_ARG3		# Mask
+	movq	ret_val(%rbp), REG64_ARG2		# ret_value
+	movl	dollar_truth(REG_IP), REG32_ARG1	# $TEST
+	andl	$1, REG32_ARG1
+	movl	act_cnt(%rbp), REG32_ARG0
+	addl	$4, REG32_ARG0				# Totalcount = Act count +4
+	movb	$0, REG8_ACCUM				# variable length argument
+	call	push_parm				# push_parm(total, $T, ret_value, mask, argc [,arg1, arg2, ...])
+done:
+	#
+	# Ready to return - need to pick up new frame pointer value (%rbp) and new allocated temp area
+	#
+	movq    frame_pointer(REG_IP), REG64_SCRATCH1
+	movq	msf_temps_ptr_off(REG64_SCRATCH1), REG_FRAME_TMP_PTR
+	movq	%rbp, REG_SP				# Unwind C stack back to caller
+	movq    REG64_SCRATCH1, REG_FRAME_POINTER	# Resets %rbp aka REG_FRAME_POINTER with frame just created
 	ret
-# op_mprofexfun ENDP
 
-# END
+error:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb	$0, REG8_ACCUM             		# Variable length argument
+	call	rts_error
+	jmp	done					# Shouldn't return but in case..
diff --git a/sr_x86_64/op_mprofextcall.s b/sr_x86_64/op_mprofextcall.s
index dbdd09c..bce9522 100644
--- a/sr_x86_64/op_mprofextcall.s
+++ b/sr_x86_64/op_mprofextcall.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,76 +10,176 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofextcall.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mprofextcall
-#	PAGE	+
-	.DATA
-.extern	ERR_GTMCHECK
-.extern	ERR_LABELUNKNOWN
-.extern	frame_pointer
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "gtm_threadgbl_deftypes_asm.si"
+	.include "debug.si"
+#
+# op_mprofextcall calls an external GT.M MUMPS routine with no arguments. If the routine
+# has not yet been linked into the current image, op_mprofextcall will first link it by
+# invoking the auto-ZLINK function. Before driving the function, we check if *any*
+# routines have been linked in as autorelink-enabled or if any directories are
+# autorelink-enabled and if so, drive a check to see if a newer version exists that
+# could be linked in.
+#
+# Parameters:
+#
+#  - arg0 (%rdi) - Index into linkage table of caller containing the routine header
+#	           address of the routine to call.
+#  - arg1 (%rsi) - Index into linkage table of caller containing the address of an
+#		   offset into routine to which to transfer control associated with
+#	           a given label. This value is typically the address of the lnr_adr
+#		   field in a label entry
+#
+# Note if arg1 is negative, this means the linkage table to use is not from the
+# caller but is contained in TREF(lnk_proxy) used by indirects and other dynamic
+# code (like callins).
+#
+# Note the return address is also supplied (on the stack) but we remove that immediately
+# since we do not return directly to it but to the the called rtn when the return address
+# is loaded out of the top M stackframe by getframe.
+#
+# Note we use %r12 as a flag that we don't do more than one of auto_zlink() OR auto_relink_check()
+# call. This keeps us out of any possible loop condition as only one or the other should
+# ever be necessary. Register %r12 is also known as REG_LITERAL_BASE and is saved by the putframe
+# macro so we need not save it separately.
+#
+# Note op_mprofextcall is a near exact copy of op_extcall differing only in the name and
+# the version of new_stack_frame() it calls (calls new_stack_frame_sp() instead).
+#
+	.data
+	.extern	ERR_GTMCHECK
+	.extern	frame_pointer
+	.extern gtm_threadgbl
 
 	.text
-.extern	auto_zlink
-.extern	new_stack_frame_sp
-.extern	rts_error
-
-# PUBLIC	op_mprofextcall
-ENTRY op_mprofextcall
-	putframe
-	addq	$8,REG_SP                                       # burn the saved return pc
-	movq	REG64_ARG0,REG64_ARG2
-	movq	REG64_ARG1,REG64_ACCUM
-	cmpq	$0,REG64_ARG0
-	je	l2
-	cmpq    $0,REG64_ARG1
-        je      l4
+	.extern	auto_zlink
+	.extern auto_relink_check
+	.extern	new_stack_frame_sp
+	.extern	rts_error
+	.extern laberror
+#
+# Define offsets for arguments pushed back on the stack
+#
+stack_arg0	= 0
+stack_arg1	= 8
+SAVE_SIZE	= 16
 
-l1:	movq    (REG64_ARG1),REG64_ACCUM
-	cmpq	$0,REG64_ACCUM
-	je	l4
-	movslq  0(REG64_ACCUM),REG64_ACCUM
-        movq    mrt_ptext_adr(REG64_ARG0),REG64_ARG1
-        addq    REG64_ARG1,REG64_ACCUM
-	movq	REG64_ACCUM,REG64_ARG2
-        movq    mrt_lnk_ptr(REG64_ARG0),REG64_ARG1
+ENTRY	op_mprofextcall
+	putframe						# Save registers into current M stack frame (includes %r12)
+	addq    $8, REG_SP     					# Burn the saved return pc (also aligns stack to 16 bytes)
+	CHKSTKALIGN						# Verify stack alignment
+	subq	$SAVE_SIZE, REG_SP				# Allocate save area on stack (16 byte aligned)
+	movq	$0, %r12					# Init flag - We haven't done auto_zlink/auto_relink_check
+	movslq	REG32_ARG1, REG64_ARG1				# Sign extend arg1
+	movq	REG64_ARG1, stack_arg1(REG_SP)			# Save index args
+	movq	REG64_ARG0, stack_arg0(REG_SP)
+	#
+	# First up, check the label index to see if tiz negative. If so, we must use lnk_proxy as a base address
+	# and pseudo linkagetable. Else use the caller's linkage table.
+	#
+	cmpq	$0, REG64_ARG1					# Use current frame linkage table or lnk_proxy?
+	jge	loadandgo
+	#
+	# We have a negative index. Use lnk_proxy as a proxy linkage table.
+	#
+	movq	gtm_threadgbl(REG_IP), REG64_RET1		# REG64_RET1 contains threadgbl base
+	leaq	ggo_lnk_proxy(REG64_RET1), REG64_ACCUM		# -> lnk_proxy.rtnhdr_adr
+	cmpq	$0, REG64_ARG0					# Using proxy table, rtnhdr index must be 0
+	jne	gtmcheck
+	movq	(REG64_ACCUM), REG64_ARG0			# -> rtnhdr
+	cmpq	$0, REG64_ARG0					# See if defined yet
+	je	gtmcheck					# If rhdaddr == 0, not yet linked into image which
+								# .. should never happen for indirects
+	cmpq	$-1, REG64_ARG1					# Using proxy table, label index must be -1
+	jne	gtmcheck
+	leaq	8(REG64_ACCUM), REG64_ARG1			# -> label table code offset ptr
+	cmpq    $0, 0(REG64_ARG1)
+        je      gtmcheck					# If labaddr == 0 && rhdaddr != 0, label does not exist
+								# .. which also should never happen for indirects
+	jmp	justgo						# Bypass autorelink check for indirects (done by caller)
+	#
+	# We have a non-negative index. Use args as indexes into caller's linkage table.
+	#
+loadandgo:
+	movq	msf_rvector_off(REG_FRAME_POINTER), REG64_RET0	# -> frame_pointer->rvector (rtnhdr)
+	movq	mrt_lnk_ptr(REG64_RET0), REG64_RET0		# -> frame_pointer->rvector->linkage_adr
+	shlq	$3, REG64_ARG0					# arg * 8 = offset for rtnhdr ptr
+	cmpq	$0, (REG64_RET0, REG64_ARG0)			# See if defined
+	je	autozlink					# No - try auto-zlink
+	movq	(REG64_RET0, REG64_ARG0), REG64_ARG0		# -> rtnhdr
+	#
+	# Have rtnhdr to call now. If rtnhdr->zhist, we should do an autorelink check on this routine to see if it needs
+	# to be relinked. Only do this if %r12 is 0 meaning we haven't already done an autorelink check or if we just
+	# loaded the routine via auto_zlink.
+	#
+	cmpq	$0, %r12					# Already checked/resolved?
+	jne	getlabeloff					# Yes, bypass this check and resolve the label offset
+	cmpq	$0, mrt_zhist(REG64_ARG0)			# See if we need to do an autorelink check
+	jne	autorelink_check				# Need autorelink check
+getlabeloff:
+	shlq	$3, REG64_ARG1					# arg * 8 = offset for label offset ptr
+	cmpq	$0, (REG64_RET0, REG64_ARG1)			# See if defined
+	je	label_missing
+	movq	(REG_RET0, REG64_ARG1), REG64_ARG1		# -> label table code offset
+	#
+	# Create stack frame and invoke routine
+	#
+justgo:
+	movq	0(REG64_ARG1), REG64_ACCUM			# &(code_offset) for this label (usually & of lntabent)
+	cmpq	$0, REG64_ACCUM
+	je	label_missing
+	movslq	0(REG64_ACCUM), REG64_ARG2			# Code offset for this label
+	addq	mrt_ptext_adr(REG64_ARG0), REG64_ARG2		# Transfer address: codebase reg + offset to label
+	movq	mrt_lnk_ptr(REG64_ARG0), REG64_ARG1		# Linkage table address (context pointer)
 	call	new_stack_frame_sp
-	getframe
+retlab:								# If error, return to caller, else "return" to callee
+	addq	$SAVE_SIZE, REG_SP				# Undo save area bump
+	getframe						# Sets regs (including %r12) as they should be for new frame
 	ret
 
-l2:	cmpq	$0,REG64_ARG1
-	jne	l4
-	subq	$8,REG_SP
-	movq 	REG_SP,REG64_ARG1
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movq	msf_mpc_off(REG64_ACCUM),REG64_ARG0
+#
+# Drive auto_zlink to fetch module
+#
+autozlink:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Get index arg back
 	call	auto_zlink
-	cmpq	$0,REG64_RET0
-	je	l3
-	movq	REG64_RET0,REG64_ARG0
-	popq	REG64_ARG1
-	cmpq	$0,REG64_ACCUM
-	jne	l1
-l3:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-	movl	$1,REG32_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
-	call	rts_error
-	getframe
-	ret
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args after call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	movq	$1, %r12
+	jmp	loadandgo
 
-l4:	movl    ERR_LABELUNKNOWN(REG_IP),REG32_ARG1
-        movl    $1,REG32_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
+#
+# Drive auto_relink_check to see if a newer routine should be loaded
+#
+autorelink_check:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args as parms for call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	call	auto_relink_check				# REG64_ARG0 still populated by rtnhdr
+	movq	stack_arg0(REG_SP), REG64_ARG0			# Restore both args after call
+	movq	stack_arg1(REG_SP), REG64_ARG1
+	movq	$2, %r12
+	jmp	loadandgo
+
+#
+# Raise GTMCHECK (pseudo-GTMASSERT since args are more difficult in assembler) when something really screwedup
+# occurs
+#
+gtmcheck:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb    $0, REG8_ACCUM					# Variable length argument
 	call	rts_error
-	getframe
-	ret
-# op_mprofextcall ENDP
+	jmp	retlab
 
-# END
+#
+# Make call so we can raise the appropriate LABELMISSING error for the not-found label.
+#
+label_missing:
+	movq	stack_arg1(REG_SP), REG64_ARG0			# Index to linkage table and to linkage name table
+	call	laberror
+	jmp	retlab
diff --git a/sr_x86_64/op_mprofextexfun.s b/sr_x86_64/op_mprofextexfun.s
index 0fa107a..78c4086 100644
--- a/sr_x86_64/op_mprofextexfun.s
+++ b/sr_x86_64/op_mprofextexfun.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,142 +10,260 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofextexfun.s
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-	.sbttl	op_mprofextexfun
-#	PAGE	+
-
-#	call op_mprofextexfun with the following stack:
-#
-#		return PC
-#		routine
-#		label
-#		ret_value address
-#		mask
-#		actualcnt
-#		actual1 address
-#		actual2 address
-#		...
-
-	.DATA
-.extern	ERR_FMLLSTMISSING
-.extern	ERR_GTMCHECK
-.extern	ERR_LABELUNKNOWN
-.extern	dollar_truth
-.extern	frame_pointer
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "gtm_threadgbl_deftypes_asm.si"
+	.include "debug.si"
+#
+# op_mprofextexfun calls an external GT.M MUMPS routine with arguments and provides for
+# a return value in most instances. If the routine has not yet been linked into the
+# current image, op_mprofextexfun will first link it by invoking the auto-ZLINK function.
+# Before driving the function, we check if *any* routines have been linked in as
+# autorelink-enabled or if any directories are autorelink-enabled and if so, drive
+# a check to see if a newer version exists that could be linked in.
+#
+# Parameters:
+#
+#  - arg0 (%rdi) - Index into linkage table of caller containing the routine header
+#	           address of the routine to call (rtnidx).
+#  - arg1 (%rsi) - Index into linkage table of caller containing the address of an
+#		   offset into routine to which to transfer control associated with
+#	           a given label. This value is typically the address of the lnr_adr
+#		   field in a label entry (lblidx).
+#  - arg2 (%rdx) - Address of where return value is placed or NULL if none (ret_value).
+#  - arg3 (%rcx) - Bit mask with 1 bit per argument (ordered low to high). When bit is
+#		   set, argument is pass-by-value, else pass-by-reference (mask).
+#  - arg4 (%r8)  - Count of M routine parameters supplied (actualcnt).
+#  - arg5 (%r9)  - List of addresses of mval parameters (actual1).
+#
+# Note if lblidx (arg1) is negative, this means the linkage table to use is not from the
+# caller but is contained in TREF(lnk_proxy) used by indirects and other dynamic
+# code (like callins).
+#
+# Note the return address is also supplied (on the stack) but we remove that immediately
+# since we do not return directly to it but to the the called rtn when the return address
+# is loaded out of the top M stackframe by getframe.
+#
+# Note we use %r12 as a flag that we don't do more than one of auto_zlink() OR auto_relink_check()
+# call. This keeps us out of any possible loop condition as only one or the other should
+# ever be necessary. Register %r12 is also known as REG_LITERAL_BASE and is saved by the putframe
+# macro so we need not save it separately.
+#
+# Note op_mprofextexfun is a near exact copy of op_extexfun differing only in the name and
+# the version of new_stack_frame() it calls (calls new_stack_frame_sp() instead).
+#
+	.data
+	.extern	ERR_FMLLSTMISSING
+	.extern	ERR_GTMCHECK
+	.extern	dollar_truth
+	.extern	frame_pointer
+	.extern gtm_threadgbl
 
 	.text
-.extern	auto_zlink
-.extern	new_stack_frame_sp
-.extern	push_parm
-.extern	rts_error
-
-arg0_off        =       -56
-act_cnt         =       -48
-mask_arg        =       -44
-ret_val         =       -40
-label_arg       =       -32
-routine         =       -24
-sav_ebx		=	-8
-sav_msf		=	-16
-
-# PUBLIC	op_mprofextexfun
-ENTRY op_mprofextexfun
-	putframe
-	addq	$8,REG_SP		# burn return PC
-        pushq  	REG_XFER_TABLE
-	enter   $64,$0
-        movq    REG64_ARG0,routine(REG_FRAME_POINTER)
-        movq    REG64_ARG1,label_arg(REG_FRAME_POINTER)
-        movq    REG64_ARG2,ret_val(REG_FRAME_POINTER)
-        movl    REG32_ARG3,mask_arg(REG_FRAME_POINTER)
-        movl    REG32_ARG4,act_cnt(REG_FRAME_POINTER)
-	movq	REG64_ARG5,arg0_off(REG_FRAME_POINTER)
-	cmpq	$0,REG64_ARG0
-	je	l3
-	cmpq    $0,REG64_ARG1
-        je      l5
-
-l1:	movq    0(REG64_ARG1),REG64_ACCUM
-        cmpq    $0,REG64_ACCUM
-        je      l5
-        movq    mrt_ptext_adr(REG64_ARG0),REG_XFER_TABLE
-	movslq  0(REG64_ACCUM),REG64_ARG2
-        addq    REG_XFER_TABLE,REG64_ARG2
+	.extern	auto_zlink
+	.extern auto_relink_check
+	.extern	new_stack_frame_sp
+	.extern	push_parm
+	.extern	rts_error
+	.extern laberror
 
-	addq	$8,REG64_ARG1			# labaddr += 8, to point to has_parms
-	cmpl	$0,0(REG64_ARG1)		# if has_parms == 0, then issue an error
-	je	l6
+arg0_off	= -40
+act_cnt		= -32
+mask_arg	= -28
+ret_val		= -24
+lblidx		= -16
+rtnidx		= -8
+SAVE_SIZE	= 48						# This size 16 byte aligns the stack
 
-	movq    mrt_lnk_ptr(REG64_ARG0),REG64_ARG1
+ENTRY	op_mprofextexfun
+	putframe						# Save registers into current M stack frame
+	addq    $8, REG_SP            				# Burn return PC (also 16 byte aligns the stack)
+	CHKSTKALIGN						# Verify stack alignment
+	movq	$0, %r12					# We haven't done auto_zlink/auto_relink_check
+	movq	REG_SP, %rbp					# Copy stack pointer to %rbp
+	subq	$SAVE_SIZE, REG_SP				# Allocate save area (16 byte aligned)
+	#
+	# Note from here down, do *not* use REG_FRAME_POINTER which was overwritten above. REG_FRAME_POINTER  is an alias for
+	# register %rbp which contains a copy of %rsp before %rsp was decremented by the save area size so %rbp contains a
+	# pointer just past the save area we've allocated which is why all references are using negative offsets.
+	#
+	movslq	REG32_ARG1, REG64_ARG1				# Sign extend arg1 so can check for negative arg
+        movq    REG64_ARG0, rtnidx(%rbp)			# Save argument registers
+        movq    REG64_ARG1, lblidx(%rbp)
+        movq    REG64_ARG2, ret_val(%rbp)
+        movl    REG32_ARG3, mask_arg(%rbp)
+	movl	REG32_ARG4, act_cnt(%rbp)
+	movq    REG64_ARG5, arg0_off(%rbp)
+	#
+	# First up, check the label index to see if tiz negative. If so, we must use lnk_proxy as a base address
+	# and pseudo linkagetable. Else use the caller's linkage table.
+	#
+	cmpq	$0, REG64_ARG1					# Use current frame linkage table or lnk_proxy?
+	jge	loadandgo
+	#
+	# We have a negative index. Use lnk_proxy as a proxy linkage table.
+	#
+	movq	gtm_threadgbl(REG_IP), REG64_RET1		# REG64_RET1 contains threadgbl base
+	leaq	ggo_lnk_proxy(REG64_RET1), REG64_ACCUM		# -> &lnk_proxy.rtnhdr_adr
+	cmpq	$0, REG64_ARG0					# Using proxy table, rtnhdr index must be 0
+	jne	gtmcheck
+	movq	(REG64_ACCUM), REG64_ARG0			# -> rtnhdr
+	cmpq	$0, REG64_ARG0					# See if defined yet
+	je	gtmcheck					# If rhdaddr == 0, not yet linked into image which
+								# .. should never happen for indirects
+	cmpq	$-1, REG64_ARG1					# Using proxy table, label index must be -1
+	jne	gtmcheck
+	leaq	8(REG64_ACCUM), REG64_ARG1			# -> label table code offset ptr
+	cmpq    $0, 0(REG64_ARG1)
+        je      gtmcheck					# If labaddr == 0 && rhdaddr != 0, label does not exist
+								# .. which also should never happen for indirects
+	cmpl	$0, 16(REG64_ACCUM)				# See if a parameter list was supplied
+	je	fmllstmissing					# If not, raise error
+	jmp	justgo						# Bypass autorelink check for indirects (done by caller)
+	#
+	# We have a non-negative index. Use args as indexes into caller's linkage table. Note we cannot overwrite
+	# REG_FRAME_POINTER as it is being used as %rbp in this routine (copy of %rsp before we did 'enter' above).
+	#
+loadandgo:
+	movq	frame_pointer(%rip), REG_RET0			# -> frame_pointer
+	movq	msf_rvector_off(REG_RET0), REG64_RET0		# -> frame_pointer->rvector (rtnhdr)
+	movq	mrt_lnk_ptr(REG64_RET0), REG64_RET0		# -> frame_pointer->rvector->linkage_adr
+	shlq	$3, REG64_ARG0					# arg * 8 = offset for rtnhdr ptr
+	cmpq	$0, (REG64_RET0, REG64_ARG0)			# See if defined
+	je	autozlink					# No - try auto-zlink
+	movq	(REG64_RET0, REG64_ARG0), REG64_ARG0		# -> rtnhdr
+	#
+	# Have rtnhdr to call now. If rtnhdr->zhist, we should do an autorelink check on this routine to see if it needs
+	# to be relinked. Only do this if %r12 is 0 meaning we haven't already done an autorelink check or if we just
+	# loaded the routine via auto_zlink.
+	#
+	cmpq	$0, %r12					# Already checked/resolved?
+	jne	getlabeloff					# Yes, bypass this check and resolve the label offset
+	cmpq	$0, mrt_zhist(REG64_ARG0)			# See if we need to do an autorelink check
+	jne	autorelink_check				# Need autorelink check
+getlabeloff:
+	shlq	$3, REG64_ARG1					# arg * 8 = offset for label offset pointer
+	cmpq	$0, (REG64_RET0, REG64_ARG1)			# See if defined
+	je	label_missing
+	movq	(REG_RET0, REG64_ARG1), REG64_ARG1		# -> label table code offset
+	cmpl	$0, 8(REG64_ARG1)				# If has_parms == 0, then issue an error
+	je	fmllstmissing
+	#
+	# Create stack frame and invoke routine
+	#
+justgo:
+	movq	0(REG64_ARG1), REG64_ACCUM			# &(code_offset) for this label (usually & of lntabent)
+	cmpq	$0, REG64_ACCUM
+	je	label_missing
+	movslq	0(REG64_ACCUM), REG64_ARG2			# Code offset for this label
+	addq	mrt_ptext_adr(REG64_ARG0), REG64_ARG2		# Transfer address: codebase reg + offset to label
+	movq	mrt_lnk_ptr(REG64_ARG0), REG64_ARG1		# Linkage table address (context pointer)
 	call	new_stack_frame_sp
-
-        movl    act_cnt(REG_FRAME_POINTER),REG32_ACCUM
-       	cmpl    $0,REG32_ACCUM
-        je	no_arg
-	cmpl    $1,REG32_ACCUM
-        je	arg_1
-	cltq
-	leaq    (REG_FRAME_POINTER,REG64_ACCUM,8),REG64_SCRATCH1
-again:  pushq	(REG64_SCRATCH1)
-        subq    $8,REG64_SCRATCH1
-        subl    $1,REG32_ACCUM
-        cmpl    $1,REG32_ACCUM
-        jg	again
-arg_1:  movq    arg0_off(REG_FRAME_POINTER),REG64_ARG5
-no_arg: movl    act_cnt(REG_FRAME_POINTER),REG32_ARG4
-	movl    mask_arg(REG_FRAME_POINTER),REG32_ARG3
-        movq    ret_val(REG_FRAME_POINTER),REG64_ARG2
-	movl	dollar_truth(REG_IP),REG32_ARG1
-	andl	$1,REG32_ARG1
-	movl	act_cnt(REG_FRAME_POINTER),REG32_ARG0
-	addl	$4,REG32_ARG0			# include: $T(just pushed) plus other 3
-	movb    $0,REG8_ACCUM			# variable length argument
-	call	push_parm			# push_parm (total_cnt,$T, ret_value, mask, argc [,arg1, arg2, ...]);
-retlab:	leave
-	popq	REG_XFER_TABLE
-	getframe
+	#
+	# Move parameters into place
+	#
+	movl	act_cnt(%rbp), REG32_ACCUM			# Number of actuallist parms
+	cmpl	$0, REG32_ACCUM
+	je	no_arg						# There are no actuallist parms
+	cmpl	$1, REG32_ACCUM					# See if just one arg left
+        je     	one_arg						# Just one - load it from the saved parm regs
+	#
+	# We need one or more actuallist parms to reside on the stack as we have overflowed the 6 parameter registers. We
+	# need to allocate a 16 byte aligned chunk of stack memory to house those parms. If some of that block is actually
+	# padding, the parms need to live in the lower address slots to work correctly with C varargs. So for example, if
+	# we need 7 slots, we have to allocate 8 slots and use the lowest addressed 7 slots for vargs to work correctly.
+	#
+	# Normally we would subtract 1 to get the count of parms to be on the stack then round that to a multiple of
+	# 2 since 2 parms would be 16 bytes. The rounding would add 1 and shift but to avoid -1 then +1, just do the
+	# rounding "AND" on the value we have. Use REG64_ARG/ARG5 as temporary work registers.
+	#
+        cltq							# Convert REG32_ACCUM to REG64_ACCUM
+	movq	REG64_ACCUM, REG64_ARG5				# Copy of parmcnt
+	andq	$-2, REG64_ARG5					# Round to even value
+	shlq	$3, REG64_ARG5					# Mult by 8 via shifting gives us 16 byte aligned value
+	subq	REG64_ARG5, REG_SP				# Allocate aligned parm area on stack
+	CHKSTKALIGN						# Verify stack alignment
+	movq	REG_SP, REG64_ARG4				# Save bottom of allocation to REG64_ARG4
+	subq	$2, REG64_ACCUM					# Remove one parm to be passed in parmreg and one for 0 origin
+	leaq	(REG64_ARG4, REG64_ACCUM, 8), REG64_ARG4	# Address for last actuallist parm to be stored
+	leaq	(%rbp, REG64_ACCUM, 8), REG64_SCRATCH1		# Address of last passed-in parameter
+again:
+	movq	0(REG64_SCRATCH1), REG64_ARG5			# Move parm to temp register
+	movq	REG64_ARG5, 0(REG64_ARG4)			# Move parm to home in stack location
+	subq	$8, REG64_SCRATCH1				# Move pointers to previous argument
+	subq	$8, REG64_ARG4
+	subq	$1, REG64_ACCUM					# Count down the parm
+	cmpq	$0, REG64_ACCUM					# Branch unless all parms are done (0 > REG64_ACCUM)
+	jnl	again
+one_arg:
+	movq    arg0_off(%rbp), REG64_ARG5
+no_arg:
+	movl	act_cnt(%rbp), REG32_ARG4
+	movl    mask_arg(%rbp), REG32_ARG3
+        movq    ret_val(%rbp), REG64_ARG2
+	movl   	dollar_truth(REG_IP), REG32_ARG1
+	andl   	$1, REG32_ARG1
+	movl   	act_cnt(%rbp), REG32_ARG0
+	addl   	$4, REG32_ARG0					# Includes: $TEST, ret_value, mask, act_cnt
+	movb    $0, REG8_ACCUM					# Variable length argument
+	call	push_parm					# push_parm (total, $T, ret_value, mask, argc [,arg1, arg2, ...]);
+retlab:
+	movq	%rbp, REG_SP					# Unwind C stack back to caller
+	getframe						# Load regs from top M frame (pushes return reg)
 	ret
 
-l3:	cmpq	$0,REG64_ARG1
-	jne	l5
-	subq	$8,REG_SP
-	movq	REG_SP,REG64_ACCUM
-	movq	REG64_ACCUM,REG64_ARG1
-        movq    frame_pointer(REG_IP),REG64_ARG2
-        movq	msf_mpc_off(REG64_ARG2),REG64_ARG0
+#
+# Drive auto_zlink to fetch module
+#
+autozlink:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	rtnidx(%rbp), REG64_ARG0			# Get index arg back
 	call	auto_zlink
-	cmpq	$0,REG64_RET0
-	je	l4
-	movq    REG64_RET0,REG64_ARG0
-	popq	REG64_ARG1
-	cmpq	$0,REG64_ARG1
-	jne	l1
-l4:	movl	ERR_GTMCHECK(REG_IP),REG32_ARG1
-        movl	$1,REG32_ARG0
-	movb    $0,     REG8_ACCUM             # variable length argument
+	movq	rtnidx(%rbp), REG64_ARG0			# Restore both args after call
+	movq	lblidx(%rbp), REG64_ARG1
+	movq	$1, %r12
+	jmp	loadandgo
+
+#
+# Drive auto_relink_check to see if a newer routine should be loaded
+#
+autorelink_check:
+	cmpq	$0, %r12					# Already did autorelink or autorelink check?
+	jne	gtmcheck
+	movq	rtnidx(%rbp), REG64_ARG0			# Restore both args as parms for call
+	movq	lblidx(%rbp), REG64_ARG1
+	call	auto_relink_check				# REG64_ARG0 still populated by rtnhdr
+	movq	rtnidx(%rbp), REG64_ARG0			# Restore both args after call
+	movq	lblidx(%rbp), REG64_ARG1
+	movq	$2, %r12
+	jmp	loadandgo
+
+#
+# Raise GTMCHECK (pseudo-GTMASSERT since args are more difficult in assembler) when something really screwedup
+# occurs
+#
+gtmcheck:
+	movl	ERR_GTMCHECK(REG_IP), REG32_ARG1
+	movl	$1, REG32_ARG0
+	movb    $0, REG8_ACCUM					# Variable length argument
 	call	rts_error
 	jmp	retlab
 
-l5:	movl	ERR_LABELUNKNOWN(REG_IP),REG32_ARG1
-        movl	$1,REG32_ARG0
-	movb    $0,	REG8_ACCUM             # variable length argument
-	call	rts_error
+#
+# Make call so we can raise the appropriate LABELMISSING error for the not-found label.
+#
+label_missing:
+	movq	lblidx(%rbp), REG64_ARG0			# Index to linkage table and to linkage name table
+	call	laberror
 	jmp	retlab
 
-l6:	movl	ERR_FMLLSTMISSING(REG_IP),REG32_ARG1
-        movl	$1,REG32_ARG0
-	movb	$0,	REG8_ACCUM             # variable length argument
+#
+# Raise missing formal list error
+#
+fmllstmissing:
+	movl    ERR_FMLLSTMISSING(REG_IP), REG32_ARG1
+        movl    $1, REG32_ARG0
+	movb	$0, REG8_ACCUM					# Variable length argument
 	call	rts_error
 	jmp	retlab
-
-# op_mprofextexfun ENDP
-
-# END
diff --git a/sr_x86_64/op_mprofforchk1.s b/sr_x86_64/op_mprofforchk1.s
index 9a3effc..dcf9e3f 100644
--- a/sr_x86_64/op_mprofforchk1.s
+++ b/sr_x86_64/op_mprofforchk1.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2011 Fidelity Information Services, Inc	#
+# Copyright (c) 2011-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,24 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofforchk1.s
-	.sbttl	op_mprofforchk1
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 
 	.text
-.extern forchkhandler
+	.extern forchkhandler
 
-# PUBLIC	op_mprofforchk1
-ENTRY op_mprofforchk1
-	movq    (REG_SP),REG64_ARG0	# Send return address to forchkhandler
+#
+# This is the M profiling version which calls different routine(s) for M profiling purposes.
+#
+ENTRY	op_mprofforchk1
+	movq    (REG_SP), REG64_ARG0		# Send return address to forchkhandler
+	subq	$8, REG_SP			# Bump stack for 16 byte alignment
+	CHKSTKALIGN				# Verify stack alignment
 	call	forchkhandler
+	addq	$8, REG_SP			# Remove stack alignment bump
 	ret
-# op_mprofforchk1 ENDP
-
-# END
diff --git a/sr_x86_64/op_mprofforlcldo.s b/sr_x86_64/op_mprofforlcldo.s
index a72844b..9923c0b 100644
--- a/sr_x86_64/op_mprofforlcldo.s
+++ b/sr_x86_64/op_mprofforlcldo.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,34 +10,30 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mprofforlcldo.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mprofforlcldo
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	exfun_frame_sp
+	.extern	exfun_frame_sp
 
-	.sbttl	op_mprofforlcldob
-# PUBLIC	op_mprofforlcldob
-ENTRY op_mprofforlcldob
-ENTRY op_mprofforlcldol
-ENTRY op_mprofforlcldow
-	movq    frame_pointer(REG_IP),REG64_ARG2
-        movq    (REG_SP),REG64_ACCUM
-        movq    REG64_ACCUM,msf_mpc_off(REG64_ARG2)
-        addq    REG64_ARG0,msf_mpc_off(REG64_ARG2)
-	call	exfun_frame_sp
-	movq    frame_pointer(REG_IP),REG64_ARG2
-        movq    msf_temps_ptr_off(REG64_ARG2),REG_FRAME_TMP_PTR
+#
+# This is the M profiling version which calls different routine(s) for M profiling purposes.
+#
+ENTRY	op_mprofforlcldow
+ENTRY	op_mprofforlcldol
+ENTRY	op_mprofforlcldob
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	frame_pointer(REG_IP), REG64_ARG2
+	movq	8(REG_SP), REG64_ACCUM			# Get our return address
+	addq    REG64_ARG0, REG64_ACCUM			# Add in return offset parm
+        movq	REG64_ACCUM, msf_mpc_off(REG64_ARG2)	# Save as return address for this frame
+	call	exfun_frame_sp				# Create new frame
+	movq	frame_pointer(REG_IP), REG_FRAME_POINTER # Get updated frame pointer
+	movq	msf_temps_ptr_off(REG_FRAME_POINTER), REG_FRAME_TMP_PTR # .. and updated temps pointer
+	addq	$8, REG_SP				# Remove our stack alignment bump
 	ret
-# op_mprofforlcldob ENDP
diff --git a/sr_x86_64/op_mproflinefetch.s b/sr_x86_64/op_mproflinefetch.s
index 92c73f8..c6d8583 100644
--- a/sr_x86_64/op_mproflinefetch.s
+++ b/sr_x86_64/op_mproflinefetch.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2011 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,37 +10,35 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mproflinefetch.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mproflinefetch
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	gtm_fetch
-.extern	stack_leak_check
-.extern pcurrpos
+	.extern	gtm_fetch
+	.extern pcurrpos
+	.extern	stack_leak_check
 
-# PUBLIC	op_mproflinefetch
-ENTRY op_mproflinefetch
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	popq	msf_mpc_off(REG64_ACCUM)
-	movq    REG_PV, msf_ctxt_off(REG64_ACCUM)
-	movb    $0,REG8_ACCUM             # variable length argument
+	#
+	# This routine does local variable fetch for all variables on a given line of code, or alternatively, all
+	# variables in a routine depending on arguments from generated code we pass-thru.
+	#
+	# This is the M profiling version which calls extra routines for M profiling purposes.
+	#
+	# Since this routine pops its return address off the stack, the stack becomes 16 byte aligned. Verify that.
+	#
+ENTRY	op_mproflinefetch
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	popq	msf_mpc_off(REG64_ACCUM)		# Save incoming return PC in frame_pointer->mpc
+	movq	REG_PV, msf_ctxt_off(REG64_ACCUM)	# Save linkage pointer
+	CHKSTKALIGN					# Verify stack alignment
+	movb    $0, REG8_ACCUM				# No variable length arguments
 	call	gtm_fetch
 	call	pcurrpos
 	call	stack_leak_check
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	pushq	msf_mpc_off(REG64_ACCUM)
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	pushq	msf_mpc_off(REG64_ACCUM)		# Push return address back on stack for return
 	ret
-# op_mproflinefetch ENDP
-
-# END
diff --git a/sr_x86_64/op_mproflinestart.s b/sr_x86_64/op_mproflinestart.s
index f99a19e..1aec38e 100644
--- a/sr_x86_64/op_mproflinestart.s
+++ b/sr_x86_64/op_mproflinestart.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2011 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,31 +10,26 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_mproflinestart.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_mproflinestart
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	pcurrpos
+	.extern	pcurrpos
 
-# PUBLIC	op_mproflinestart
-ENTRY op_mproflinestart
-	movq	frame_pointer(REG_IP),REG64_RET1
-	movq    (REG_SP),REG64_ACCUM
-	movq	REG64_ACCUM,msf_mpc_off(REG64_RET1)
-	movq    REG_PV, msf_ctxt_off(REG64_RET1)      # Save ctxt into frame_pointer
+#
+# This is the M profiling version which calls different routine(s) for M profiling purposes.
+#
+ENTRY	op_mproflinestart
+	movq	frame_pointer(REG_IP), REG64_RET1
+	movq    (REG_SP), REG64_ACCUM			# Save return address
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_ACCUM, msf_mpc_off(REG64_RET1)	# Store return addr in M frame
+	movq    REG_PV, msf_ctxt_off(REG64_RET1)	# Save ctxt into M frame
 	call	pcurrpos
+	addq	$8, REG_SP				# Remove stack alignment bump
 	ret
-# op_mproflinestart ENDP
-
-# END
diff --git a/sr_x86_64/op_neg.s b/sr_x86_64/op_neg.s
index d12d7a3..85df248 100644
--- a/sr_x86_64/op_neg.s
+++ b/sr_x86_64/op_neg.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2008 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,56 +10,52 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_neg.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
+	.text
+	.extern	s2n
+	.extern underr
 
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
+save_ret1	= 8
+save_ret0	= 0
+FRAME_SIZE	= 24					# This size 16 byte aligns the stack
 
-	.sbttl	op_neg
-#	PAGE	+
-	.text
 #
 # op_neg ( mval *u, mval *v ) : u = -v
 #
 #	REG64_RET1 - source mval      = &v
 #	REG64_RET0 - destination mval = &u
-
-.extern	s2n
-.extern underr
-
-# PUBLIC	op_neg
-ENTRY op_neg
-	pushq	REG64_RET0
+#
+ENTRY	op_neg
+	subq	$FRAME_SIZE, REG_SP			# Create save area and 16 byte align stack
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET0, save_ret0(REG_SP)		# Save dest mval addr across potential call
 	mv_force_defined REG64_RET1, isdefined
-	popq	REG64_RET0
-	mv_if_number REG64_RET1, numer
-	pushq	REG64_RET0
-	pushq	REG64_RET1
-	movq	REG64_RET1,REG64_ARG0
+	mv_if_number REG64_RET1, numer			# Branch if numeric
+	movq	REG64_RET1, save_ret1(REG_SP)		# Save src mval (may not be original if noundef set)
+	movq	REG64_RET1, REG64_ARG0			# Move src mval to parm reg for s2n()
 	call	s2n
-	popq	REG64_RET1
-	popq	REG64_RET0
-numer:	mv_if_notint REG64_RET1, float
-	movw	$mval_m_int,mval_w_mvtype(REG64_RET0)
-	movl	mval_l_m1(REG64_RET1),REG32_RET1
+	movq	save_ret1(REG_SP), REG64_RET1		# Restore source mval addr
+numer:
+	movq	save_ret0(REG_SP), REG64_RET0		# Restore destination mval addr
+	mv_if_notint REG64_RET1, float			# Branch if not an integer
+	movw	$mval_m_int, mval_w_mvtype(REG64_RET0)
+	movl	mval_l_m1(REG64_RET1), REG32_RET1
 	negl	REG32_RET1
-	movl	REG32_RET1,mval_l_m1(REG64_RET0)
-	ret
-
-float:	movw	$mval_m_nm,mval_w_mvtype(REG64_RET0)
-	movb	mval_b_exp(REG64_RET1),REG8_SCRATCH1
-	xorb	$mval_esign_mask,REG8_SCRATCH1		# flip the sign bit
-	movb	REG8_SCRATCH1,mval_b_exp(REG64_RET0)
-	movl	mval_l_m0(REG64_RET1),REG32_SCRATCH1
-	movl	REG32_SCRATCH1,mval_l_m0(REG64_RET0)
-	movl	mval_l_m1(REG64_RET1),REG32_SCRATCH1
-	movl	REG32_SCRATCH1,mval_l_m1(REG64_RET0)
+	movl	REG32_RET1, mval_l_m1(REG64_RET0)
+	jmp	done
+float:
+	movw	$mval_m_nm, mval_w_mvtype(REG64_RET0)
+	movb	mval_b_exp(REG64_RET1), REG8_SCRATCH1
+	xorb	$mval_esign_mask, REG8_SCRATCH1		# Flip the sign bit
+	movb	REG8_SCRATCH1, mval_b_exp(REG64_RET0)
+	movl	mval_l_m0(REG64_RET1), REG32_SCRATCH1
+	movl	REG32_SCRATCH1, mval_l_m0(REG64_RET0)
+	movl	mval_l_m1(REG64_RET1), REG32_SCRATCH1
+	movl	REG32_SCRATCH1, mval_l_m1(REG64_RET0)
+done:
+	addq	$FRAME_SIZE, REG_SP			# Remove save area from C stack
 	ret
-# op_neg	ENDP
-
-#END
diff --git a/sr_x86_64/op_numcmp.s b/sr_x86_64/op_numcmp.s
index 0cab34e..17f4812 100644
--- a/sr_x86_64/op_numcmp.s
+++ b/sr_x86_64/op_numcmp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,36 +10,29 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_numcmp.s
-	.sbttl	op_numcmp
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-#	op_numcmp calls numcmp to compare two mvals
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 #
-#	entry:
-#		eax	mval *u
-#		edx	mval *v
+# op_numcmp calls numcmp to compare two mvals
+#
+# entry:
+#   rax	- mval *u
+#   rdx	- mval *v
+#
+# exit:
+#   condition codes set according to value of numcmp(u, v)
 #
-#	exit:
-#		condition codes set according to value of
-#			numcmp (u, v)
 
 	.text
-.extern	numcmp
+	.extern	numcmp
 
-# PUBLIC	op_numcmp
-ENTRY op_numcmp
-	movq	REG64_RET1,REG64_ARG1
-	movq	REG64_RET0,REG64_ARG0
+ENTRY	op_numcmp
+	subq	$8, REG_SP			# Bump stack for 16 byte alignment
+	CHKSTKALIGN				# Verify stack alignment
+	movq	REG64_RET1, REG64_ARG1
+	movq	REG64_RET0, REG64_ARG0
 	call	numcmp
-	cmpl	$0,REG32_ACCUM		# set flags according to result from numcmp
+	addq	$8, REG_SP			# Remove stack alignment bump
+	cmpq	$0, REG64_ACCUM			# Set flags according to result from numcmp
 	ret
-# op_numcmp ENDP
-
-# END
diff --git a/sr_x86_64/op_pattern.s b/sr_x86_64/op_pattern.s
index 473136d..397cd45 100644
--- a/sr_x86_64/op_pattern.s
+++ b/sr_x86_64/op_pattern.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,42 +10,35 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_pattern.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_pattern
-#	PAGE	+
 	.text
-.extern	do_patfixed
-.extern	do_pattern
+	.extern	do_patfixed
+	.extern	do_pattern
 
-# PUBLIC	op_pattern
-ENTRY op_pattern
-	movq	REG64_RET1,REG64_ARG1
-	movq	REG64_RET0,REG64_ARG0
-	movq	mval_a_straddr(REG64_RET1),REG64_ACCUM
+ENTRY	op_pattern
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET1, REG64_ARG1
+	movq	REG64_RET0, REG64_ARG0
+	movq	mval_a_straddr(REG64_RET1), REG64_ACCUM
 	#
 	# This is an array of unaligned ints. If the first word is zero, then call do_pattern
 	# instead of do_patfixed. Only the low order byte is significant and so it is the only
 	# one we need to test. We would do this in assembly because (1) we need the assmembly
-	# routine anyway to save the return value into $TEST and (2) it saves an extra level of
-	# call linkage at the C level to do the decision here.
+	# routine anyway to set up the condition code the generated code needs and (2) it
+	# saves an extra level of call linkage at the C level to do the decision here.
 	#
-	cmpb	$0,(REG64_ACCUM) # little endian compare of low order byte
+	cmpb	$0, 0(REG64_ACCUM)			# Little endian compare of low order byte
 	je	l1
 	call	do_patfixed
 	jmp	l2
-
-l1:	call	do_pattern
-l2:	cmpl	$0,REG32_ACCUM
+l1:
+	call	do_pattern
+l2:
+	addq	$8, REG_SP				# Remove stack alignment bump
+	cmpl	$0, REG32_ACCUM				# Set condition code for generated code
 	ret
-# op_pattern ENDP
-
-# END
diff --git a/sr_x86_64/op_restartpc.s b/sr_x86_64/op_restartpc.s
index 39151a6..af80246 100644
--- a/sr_x86_64/op_restartpc.s
+++ b/sr_x86_64/op_restartpc.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,31 +10,27 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_restartpc.s
-	.sbttl	op_restartpc
+	.include "linkage.si"
+	.include "g_msf.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-.include "g_msf.si"
-
-	.DATA
-.extern	restart_pc
-.extern restart_ctxt
-.extern frame_pointer
+	.data
+	.extern	restart_pc
+	.extern restart_ctxt
+	.extern frame_pointer
 
 	.text
-# PUBLIC	op_restartpc
+#
+# Routine to save the address of the *start* of this call along with its context as the restart point should this
+# process encounter a restart situation (return from $ZTRAP or outofband call typically).
+#
+# Since this is a leaf routine (makes no calls), the stack frame alignment is not important so is not adjusted
+# or tested. Should that change, the alignment should be fixed and implement use of the CHKSTKALIGN macro made.
+#
 ENTRY op_restartpc
-	movq	(REG_SP),REG64_ACCUM
-	subq	$6,REG64_ACCUM 		# xfer call size is constant
-	movq	REG64_ACCUM,restart_pc(REG_IP)
-	movq	frame_pointer(REG_IP),REG64_ACCUM
-	movq	msf_ctxt_off(REG64_ACCUM),REG64_SCRATCH1
-	movq	REG64_SCRATCH1,restart_ctxt(REG_IP)
+	movq	(REG_SP), REG64_ACCUM
+	subq	$6, REG64_ACCUM 				# XFER call size is constant
+	movq	REG64_ACCUM, restart_pc(REG_IP)
+	movq	frame_pointer(REG_IP), REG64_ACCUM
+	movq	msf_ctxt_off(REG64_ACCUM), REG64_SCRATCH1
+	movq	REG64_SCRATCH1, restart_ctxt(REG_IP)
 	ret
-# op_restartpc ENDP
-
-# END
diff --git a/sr_x86_64/op_retarg.s b/sr_x86_64/op_retarg.s
index 96feebc..e68de6e 100644
--- a/sr_x86_64/op_retarg.s
+++ b/sr_x86_64/op_retarg.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,31 +10,31 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_retarg.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_retarg
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	unw_retarg
+	.extern	unw_retarg
 
-# PUBLIC	op_retarg
-ENTRY op_retarg
-	movq	REG64_RET0,REG64_ARG0
-	movq	REG64_RET1,REG64_ARG1
+#
+# Routine to unwind the M stack returning a value. Note this routine burns the return value like many others
+# but waits until the call is complete to do so. This better keeps the debugger trace-back information intact.
+# But because we wait, we need an initial bump to the C stack pointer to get it aligned.
+#
+# Args:
+#   REG64_RET0 - return value mval
+#   REG64_RET1 - alias value flag
+#
+ENTRY	op_retarg
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET0, REG64_ARG0
+	movq	REG64_RET1, REG64_ARG1
 	call	unw_retarg
-	addq    $8, REG_SP
-	getframe
+	addq	$16, REG_SP				# Remove stack alignment bump & burn return address
+	getframe					# Load regs for prev stack frame & push return addr
 	ret
-# op_retarg ENDP
-
-# END
diff --git a/sr_x86_64/op_sorts_after.s b/sr_x86_64/op_sorts_after.s
index 975a5d1..d1f6450 100644
--- a/sr_x86_64/op_sorts_after.s
+++ b/sr_x86_64/op_sorts_after.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,43 +10,34 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_sorts_after.s
-	.sbttl	op_sorts_after
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-
-# op_sorts_after.s 80386
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 #
 # op_sorts_after(mval *mval1, *mval2)
-#	Call sorts_after() to determine whether mval1 comes after mval2
-#	in sorting order.  Use alternate local collation sequence if
-#	present.
 #
-#	entry:
-#		eax	mval *mval1
-#		edx	mval *mval2
+# Call sorts_after() to determine whether mval1 comes after mval2
+# in sorting order.  Use alternate local collation sequence if
+# present.
 #
-#	Sets condition flags and returns in eax:
-##	1	mval1 > mval2
-##	0	mval1 = mval2
-##	-1	mval1 < mval2
+# entry:
+#   rax	mval *mval1
+#   rdx	mval *mval2
+#
+# Sets condition flags and returns in eax:
+#   1	mval1 > mval2
+#   0	mval1 = mval2
+#   -1	mval1 < mval2
 #
-
 	.text
-.extern	sorts_after
+	.extern	sorts_after
 
-# PUBLIC	op_sorts_after
-ENTRY op_sorts_after
-	movq	REG64_RET1,REG64_ARG1
-	movq	REG64_RET0,REG64_ARG0
+ENTRY	op_sorts_after
+	subq	$8, REG_SP				# Bump stack for 16 byte alignment
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_RET1, REG64_ARG1
+	movq	REG64_RET0, REG64_ARG0
 	call	sorts_after
-	cmpl	$0,REG32_ACCUM		# set flags according to result from
-	ret			# sorts_after.
-# op_sorts_after ENDP
-
-# END
+	addq	$8, REG_SP				# Remove stack alignment bump
+	cmpl	$0, REG32_ACCUM				# Set flags according to result from
+	ret
diff --git a/sr_x86_64/op_startintrrpt.s b/sr_x86_64/op_startintrrpt.s
index 1bf06b3..57c632e 100644
--- a/sr_x86_64/op_startintrrpt.s
+++ b/sr_x86_64/op_startintrrpt.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,39 +10,31 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_startintrrpt.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	op_startintrrpt
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
-.extern	neterr_pending
+	.data
+	.extern	frame_pointer
+	.extern	neterr_pending
 
 	.text
-.extern	gvcmz_neterr
-.extern	async_action
-.extern	outofband_clear
+	.extern	gvcmz_neterr
+	.extern	async_action
+	.extern	outofband_clear
 
-# PUBLIC	op_startintrrpt
-ENTRY op_startintrrpt
+ENTRY	op_startintrrpt
 	putframe
-	cmpb	$0,neterr_pending(REG_IP)
+	subq	$8, REG_SP			# Allocate save area and align stack to 16 bytes
+	CHKSTKALIGN				# Verify stack alignment
+	cmpb	$0, neterr_pending(REG_IP)
 	je	l1
 	call	outofband_clear
-	movq	$0,REG64_ARG0
+	movq	$0, REG64_ARG0
 	call	gvcmz_neterr
-l1:	movl	$1,REG32_ARG0
+l1:
+	movl	$1, REG32_ARG0
 	call	async_action
-	addq	$8,REG_SP		# 8 bytes to burn return PC
-	getframe
+	addq	$16, REG_SP			# Remove alignment stack bump & burn return addr
+	getframe				# Load regs for possible new frame and push return addr
 	ret
-# op_startintrrpt ENDP
-
-# END
diff --git a/sr_x86_64/op_sto.s b/sr_x86_64/op_sto.s
index b02a3f7..4df3198 100644
--- a/sr_x86_64/op_sto.s
+++ b/sr_x86_64/op_sto.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2009 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,49 +10,39 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_sto.s
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "mval_def.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
-	.INCLUDE	"mval_def.si"
-
-	.sbttl	op_sto
-#	PAGE	+
-	.DATA
-.extern	literal_null
-.extern	undef_inhibit
+	.data
+	.extern	literal_null
+	.extern	undef_inhibit
 
 	.text
-.extern	underr
-
-# PUBLIC	op_sto
-ENTRY op_sto
-	enter $0, $0  # Align the stack to 16 bytes
-	mv_if_notdefined REG64_RET1, b
-a:	movl	$mval_byte_len,REG32_ARG3
-	movq	REG64_RET1,REG64_ARG1
-	movq	REG64_RET0,REG64_ARG0
+	.extern	underr
+
+ENTRY	op_sto
+	subq	$8, REG_SP					# Bump stack for 16 byte alignment
+	CHKSTKALIGN						# Verify stack alignment
+	mv_if_notdefined REG64_RET1, notdef
+nowdef:
+	movl	$mval_byte_len, REG32_ARG3
+	movq	REG64_RET1, REG64_ARG1
+	movq	REG64_RET0, REG64_ARG0
 	REP
 	movsb
 	andw	$~mval_m_aliascont, mval_w_mvtype(REG64_RET0)	# Don't propagate alias container flag
-	leave
+done:
+	addq	$8, REG_SP					# Remove stack alignment bump
 	ret
-
-b:	cmpb	$0,undef_inhibit(REG_IP)
+notdef:
+	cmpb	$0, undef_inhibit(REG_IP)
 	je	clab
-	leaq	literal_null(REG_IP),REG_RET1
-	jmp	a
-
-clab:	movq	REG_RET1, REG64_ARG0
-	movb    $0,REG8_ACCUM             # variable length argument
+	leaq	literal_null(REG_IP), REG_RET1
+	jmp	nowdef
+clab:
+	movq	REG_RET1, REG64_ARG0
+	movb    $0, REG8_ACCUM             			# Variable length argument
 	call	underr
-	leave
-	ret
-
-# op_sto	ENDP
-
-# END
+	jmp	done
diff --git a/sr_x86_64/op_zhelp.s b/sr_x86_64/op_zhelp.s
index b9e490a..b005310 100644
--- a/sr_x86_64/op_zhelp.s
+++ b/sr_x86_64/op_zhelp.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,29 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	op_zhelp.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE "g_msf.si"
-
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_zhelp_xfr
+	.extern	op_zhelp_xfr
 
-# PUBLIC	op_zhelp
-ENTRY op_zhelp
-	movq	frame_pointer(REG_IP),REG64_RET1
-	popq	msf_mpc_off(REG64_RET1)
+ENTRY	op_zhelp
+	movq	frame_pointer(REG_IP), REG64_RET1
+	popq	msf_mpc_off(REG64_RET1)			# Pop return addr into M frame (16 byte aligns stack)
+	CHKSTKALIGN					# Verify stack alignment
 	call	op_zhelp_xfr
-	getframe
+	getframe					# Pick up new stack frame regs & push return addr
 	ret
-# op_zhelp ENDP
-
-# END
diff --git a/sr_x86_64/opp_break.s b/sr_x86_64/opp_break.s
index 0e1db34..bb6c762 100644
--- a/sr_x86_64/opp_break.s
+++ b/sr_x86_64/opp_break.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_break.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_break
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_break
+	.extern	op_break
 
-# PUBLIC	opp_break
-ENTRY opp_break
+ENTRY	opp_break
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_break
 	getframe
 	ret
-# opp_break ENDP
-
-# END
diff --git a/sr_x86_64/opp_commarg.s b/sr_x86_64/opp_commarg.s
index 2389023..47d6226 100644
--- a/sr_x86_64/opp_commarg.s
+++ b/sr_x86_64/opp_commarg.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_commarg.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_commarg
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_commarg
+	.extern	op_commarg
 
-# PUBLIC	opp_commarg
-ENTRY opp_commarg
+ENTRY	opp_commarg
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_commarg
 	getframe
 	ret
-# opp_commarg ENDP
-
-# END
diff --git a/sr_x86_64/opp_dmode.s b/sr_x86_64/opp_dmode.s
index d2a33b6..d923346 100644
--- a/sr_x86_64/opp_dmode.s
+++ b/sr_x86_64/opp_dmode.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_dmode.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_dmode
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_dmode
+	.extern	op_dmode
 
-# PUBLIC	opp_dmode
-ENTRY opp_dmode
+ENTRY	opp_dmode
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_dmode
 	getframe
 	ret
-# opp_dmode ENDP
-
-# END
diff --git a/sr_x86_64/opp_hardret.s b/sr_x86_64/opp_hardret.s
index 2ff4681..9f726c1 100644
--- a/sr_x86_64/opp_hardret.s
+++ b/sr_x86_64/opp_hardret.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_hardret.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_hardret
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_hardret
+	.extern	op_hardret
 
-# PUBLIC	opp_hardret
-ENTRY opp_hardret
+ENTRY	opp_hardret
 	putframe
-	addq        $8,REG_SP   # burn return pc
+	addq	$8, REG_SP		# Burn return pc & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_hardret
 	getframe
 	ret
-# opp_hardret ENDP
-
-# END
diff --git a/sr_x86_64/opp_inddevparms.s b/sr_x86_64/opp_inddevparms.s
index 552a89e..a8f4753 100644
--- a/sr_x86_64/opp_inddevparms.s
+++ b/sr_x86_64/opp_inddevparms.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_inddevparms.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_inddevparms
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_inddevparms
+	.extern	op_inddevparms
 
-# PUBLIC	opp_inddevparms
-ENTRY opp_inddevparms  	# /* PROC */
+ENTRY	opp_inddevparms
 	putframe
-	addq	$8,REG_SP  # burn return pc
+	addq	$8, REG_SP		# Burn return pc & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_inddevparms
 	getframe
 	ret
-# opp_inddevparms ENDP
-
-# END
diff --git a/sr_x86_64/opp_indfnname.s b/sr_x86_64/opp_indfnname.s
index 730ced3..db6ad9d 100644
--- a/sr_x86_64/opp_indfnname.s
+++ b/sr_x86_64/opp_indfnname.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indfnname.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indfnname
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indfnname
+	.extern	op_indfnname
 
-# PUBLIC	opp_indfnname
-ENTRY opp_indfnname
+ENTRY	opp_indfnname
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indfnname
 	getframe
 	ret
-# opp_indfnname ENDP
-
-# END
diff --git a/sr_x86_64/opp_indfun.s b/sr_x86_64/opp_indfun.s
index f3fab50..2c66a89 100644
--- a/sr_x86_64/opp_indfun.s
+++ b/sr_x86_64/opp_indfun.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indfun.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indfun
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indfun
+	.extern	op_indfun
 
-# PUBLIC	opp_indfun
-ENTRY opp_indfun  	# /* PROC */
+ENTRY	opp_indfun
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# burn return PC
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indfun
 	getframe
 	ret
-# opp_indfun ENDP
-
-# END
diff --git a/sr_x86_64/opp_indglvn.s b/sr_x86_64/opp_indglvn.s
index 114390d..d952625 100644
--- a/sr_x86_64/opp_indglvn.s
+++ b/sr_x86_64/opp_indglvn.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indglvn.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indglvn
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indglvn
+	.extern	op_indglvn
 
-# PUBLIC	opp_indglvn
-ENTRY opp_indglvn  	# /* PROC */
+ENTRY	opp_indglvn
 	putframe
-	addq	$8,REG_SP	   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indglvn
 	getframe
 	ret
-# opp_indglvn ENDP
-
-# END
diff --git a/sr_x86_64/opp_indincr.s b/sr_x86_64/opp_indincr.s
index 2d5f0ba..39bc905 100644
--- a/sr_x86_64/opp_indincr.s
+++ b/sr_x86_64/opp_indincr.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indincr.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indincr
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indincr
+	.extern	op_indincr
 
-# PUBLIC	opp_indincr
-ENTRY opp_indincr  	# /* PROC */
+ENTRY	opp_indincr
 	putframe
-	addq 	$8,REG_SP   # burn return PC
+	addq 	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indincr
 	getframe
 	ret
-# opp_indincr ENDP
-
-# END
diff --git a/sr_x86_64/opp_indlvadr.s b/sr_x86_64/opp_indlvadr.s
index 41f1313..cbdd6f5 100644
--- a/sr_x86_64/opp_indlvadr.s
+++ b/sr_x86_64/opp_indlvadr.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indlvadr.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indlvadr
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indlvadr
+	.extern	op_indlvadr
 
-# PUBLIC	opp_indlvadr
-ENTRY opp_indlvadr  	# /* PROC */
+ENTRY	opp_indlvadr
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indlvadr
 	getframe
 	ret
-# opp_indlvadr ENDP
-
-# END
diff --git a/sr_x86_64/opp_indlvarg.s b/sr_x86_64/opp_indlvarg.s
index f1e9321..9f0376d 100644
--- a/sr_x86_64/opp_indlvarg.s
+++ b/sr_x86_64/opp_indlvarg.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indlvarg.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indlvarg
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indlvarg
+	.extern	op_indlvarg
 
-# PUBLIC	opp_indlvarg
-ENTRY opp_indlvarg  	# /* PROC */
+ENTRY	opp_indlvarg
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indlvarg
 	getframe
 	ret
-# opp_indlvarg ENDP
-
-# END
diff --git a/sr_x86_64/opp_indlvnamadr.s b/sr_x86_64/opp_indlvnamadr.s
index 45ca68d..c6e897a 100644
--- a/sr_x86_64/opp_indlvnamadr.s
+++ b/sr_x86_64/opp_indlvnamadr.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indlvnamadr.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indlvnamadr
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indlvnamadr
+	.extern	op_indlvnamadr
 
-# PUBLIC	opp_indlvnamadr
-ENTRY opp_indlvnamadr  # /* PROC */
+ENTRY	opp_indlvnamadr
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indlvnamadr
 	getframe
 	ret
-# opp_indlvnamadr ENDP
-
-# END
diff --git a/sr_x86_64/opp_indmerge.s b/sr_x86_64/opp_indmerge.s
index 94658fd..3f6a524 100644
--- a/sr_x86_64/opp_indmerge.s
+++ b/sr_x86_64/opp_indmerge.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indmerge.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indmerge
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indmerge
+	.extern	op_indmerge
 
-# PUBLIC	opp_indmerge
-ENTRY opp_indmerge  	# /* PROC */
+ENTRY	opp_indmerge
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indmerge
 	getframe
 	ret
-# opp_indmerge ENDP
-
-# END
diff --git a/sr_x86_64/opp_indpat.s b/sr_x86_64/opp_indpat.s
index 3a61452..bcb7acd 100644
--- a/sr_x86_64/opp_indpat.s
+++ b/sr_x86_64/opp_indpat.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indpat.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indpat
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indpat
+	.extern	op_indpat
 
-# PUBLIC	opp_indpat
-ENTRY opp_indpat  	# /* PROC */
+ENTRY	opp_indpat
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indpat
 	getframe
 	ret
-# opp_indpat ENDP
-
-# END
diff --git a/sr_x86_64/opp_indrzshow.s b/sr_x86_64/opp_indrzshow.s
index fc7c986..43f2e8d 100644
--- a/sr_x86_64/opp_indrzshow.s
+++ b/sr_x86_64/opp_indrzshow.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indrzshow.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indrzshow
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indrzshow
+	.extern	op_indrzshow
 
-# PUBLIC	opp_indrzshow
-ENTRY opp_indrzshow  	# /* PROC */
+ENTRY	opp_indrzshow
 	putframe
-	addq 	$8,REG_SP   # burn return PC
+	addq 	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indrzshow
 	getframe
 	ret
-# opp_indrzshow ENDP
-
-# END
diff --git a/sr_x86_64/opp_indsavglvn.s b/sr_x86_64/opp_indsavglvn.s
index 48fc0cf..c9b9931 100644
--- a/sr_x86_64/opp_indsavglvn.s
+++ b/sr_x86_64/opp_indsavglvn.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2012-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indsavglvn.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indsavglvn
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indsavglvn
+	.extern	op_indsavglvn
 
-# PUBLIC	opp_indsavglvn
-ENTRY opp_indsavglvn  	# /* PROC */
+ENTRY	opp_indsavglvn
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indsavglvn
 	getframe
 	ret
-# opp_indsavglvn ENDP
-
-# END
diff --git a/sr_x86_64/opp_indsavlvn.s b/sr_x86_64/opp_indsavlvn.s
index 2259eb2..20105c0 100644
--- a/sr_x86_64/opp_indsavlvn.s
+++ b/sr_x86_64/opp_indsavlvn.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2012 Fidelity Information Services, Inc	#
+# Copyright (c) 2012-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indsavlvn.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indsavlvn
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indsavlvn
+	.extern	op_indsavlvn
 
-# PUBLIC	opp_indsavlvn
-ENTRY opp_indsavlvn 	# /* PROC */
+ENTRY	opp_indsavlvn
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indsavlvn
 	getframe
 	ret
-# opp_indsavlvn ENDP
-
-# END
diff --git a/sr_x86_64/opp_indset.s b/sr_x86_64/opp_indset.s
index b4bf7f7..9b95c38 100644
--- a/sr_x86_64/opp_indset.s
+++ b/sr_x86_64/opp_indset.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indset.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indset
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indset
+	.extern	op_indset
 
-# PUBLIC	opp_indset
-ENTRY opp_indset  	# /* PROC */
+ENTRY	opp_indset
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indset
 	getframe
 	ret
-# opp_indset ENDP
-
-# END
diff --git a/sr_x86_64/opp_indtext.s b/sr_x86_64/opp_indtext.s
index 9d5e6da..6e5fcfc 100644
--- a/sr_x86_64/opp_indtext.s
+++ b/sr_x86_64/opp_indtext.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_indtext.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_indtext
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_indtext
+	.extern	op_indtext
 
-# PUBLIC	opp_indtext
-ENTRY opp_indtext  	# /* PROC */
+ENTRY	opp_indtext
 	putframe
-	addq 	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_indtext
 	getframe
 	ret
-# opp_indtext ENDP
-
-# END
diff --git a/sr_x86_64/opp_iretmval.s b/sr_x86_64/opp_iretmval.s
index ba41b43..806e1f8 100644
--- a/sr_x86_64/opp_iretmval.s
+++ b/sr_x86_64/opp_iretmval.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_iretmval.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_iretmval
-#	PAGE	+
-	.DATA
-.extern	frame_pointer	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_iretmval
+	.extern	op_iretmval
 
-# PUBLIC	opp_iretmval
-ENTRY opp_iretmval 	# /* PROC */
+ENTRY	opp_iretmval
 	putframe
-	addq 	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_iretmval
 	getframe
 	ret
-# opp_iretmval ENDP
-
-# END
diff --git a/sr_x86_64/opp_newintrinsic.s b/sr_x86_64/opp_newintrinsic.s
index 1d88fef..e22317f 100644
--- a/sr_x86_64/opp_newintrinsic.s
+++ b/sr_x86_64/opp_newintrinsic.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_newintrinsic.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_newintrinsic
-#	PAGE	+
-	.DATA
-.extern	frame_pointer #	/* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_newintrinsic
+	.extern	op_newintrinsic
 
-# PUBLIC	opp_newintrinsic
-ENTRY opp_newintrinsic 	# /* PROC */
+ENTRY	opp_newintrinsic
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align frame
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_newintrinsic
 	getframe
 	ret
-# opp_newintrinsic ENDP
-
-# END
diff --git a/sr_x86_64/opp_newvar.s b/sr_x86_64/opp_newvar.s
index 9886cb9..7be15fc 100644
--- a/sr_x86_64/opp_newvar.s
+++ b/sr_x86_64/opp_newvar.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_newvar.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_newvar
-#	PAGE	+
-	.DATA
-.extern	frame_pointer #	/* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_newvar
+	.extern	op_newvar
 
-# PUBLIC	opp_newvar
-ENTRY opp_newvar 	# /* PROC */
+ENTRY	opp_newvar
 	putframe
-	addq	$8,REG_SP	#Go past return address
+	addq	$8, REG_SP		# Burn return address & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_newvar
 	getframe
 	ret
-# opp_newvar ENDP
-
-# END
diff --git a/sr_x86_64/opp_ret.s b/sr_x86_64/opp_ret.s
index beb2dd3..3f10c10 100644
--- a/sr_x86_64/opp_ret.s
+++ b/sr_x86_64/opp_ret.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,29 +10,19 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_ret.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_ret
-#	PAGE	+
-	.DATA
-.extern	frame_pointer #	/* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_unwind
+	.extern	op_unwind
 
-# PUBLIC	opp_ret
-ENTRY opp_ret  	# /*	PROC */
-	addq	$8,REG_SP   # burn return PC
+ENTRY	opp_ret
+	addq	$8, REG_SP			# Burn return PC & 16 byte align stack
+	CHKSTKALIGN				# Verify stack alignment
 	call	op_unwind
 	getframe
 	ret
-# opp_ret	ENDP
-
-#END
diff --git a/sr_x86_64/opp_rterror.s b/sr_x86_64/opp_rterror.s
index 710d08a..43b9fd6 100644
--- a/sr_x86_64/opp_rterror.s
+++ b/sr_x86_64/opp_rterror.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_rterror.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_rterror
-#	PAGE	+
-	.DATA
-.extern	frame_pointer #	/* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_rterror
+	.extern	op_rterror
 
-# PUBLIC	opp_rterror
-ENTRY opp_rterror  #	/* PROC */
+ENTRY	opp_rterror
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_rterror
 	getframe
 	ret
-# opp_rterror ENDP
-
-# END
diff --git a/sr_x86_64/opp_setzbrk.s b/sr_x86_64/opp_setzbrk.s
index 8a34979..bdef09a 100644
--- a/sr_x86_64/opp_setzbrk.s
+++ b/sr_x86_64/opp_setzbrk.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2013, 2014 Fidelity Information Services, Inc	#
+# Copyright (c) 2013-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_setzbrk.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_setzbrk
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_setzbrk
+	.extern	op_setzbrk
 
-# PUBLIC	opp_setzbrk
-ENTRY opp_setzbrk
+ENTRY	opp_setzbrk
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_setzbrk
 	getframe
 	ret
-# opp_setzbrk ENDP
-
-# END
diff --git a/sr_x86_64/opp_svput.s b/sr_x86_64/opp_svput.s
index dd9c2dc..6548264 100644
--- a/sr_x86_64/opp_svput.s
+++ b/sr_x86_64/opp_svput.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_svput.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_svput
-#	PAGE	+
-	.DATA
-.extern	frame_pointer #	/* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_svput
+	.extern	op_svput
 
-# PUBLIC	opp_svput
-ENTRY opp_svput 	# /* PROC */
+ENTRY	opp_svput
 	putframe
-	addq	$8,REG_SP	# burn return PC
-	call	op_svput
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
+	call	op_svput		# For some ISVs ($ET/$ZT) may cause stack shift
 	getframe
 	ret
-# opp_svput ENDP
-
-# END
diff --git a/sr_x86_64/opp_tcommit.s b/sr_x86_64/opp_tcommit.s
index 4f045d6..b87adda 100644
--- a/sr_x86_64/opp_tcommit.s
+++ b/sr_x86_64/opp_tcommit.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_tcommit.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_tcommit
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_tcommit
+	.extern	op_tcommit
 
-# PUBLIC	opp_tcommit
-ENTRY opp_tcommit  #	/* PROC */
+ENTRY	opp_tcommit
 	putframe
-	addq	$8,REG_SP		#Go past return address
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_tcommit
 	getframe
 	ret
-# opp_tcommit ENDP
-
-# END
diff --git a/sr_x86_64/opp_trestart.s b/sr_x86_64/opp_trestart.s
index ebf5ddb..4554c6e 100644
--- a/sr_x86_64/opp_trestart.s
+++ b/sr_x86_64/opp_trestart.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_trestart.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_trestart
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /*:DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_trestart
+	.extern	op_trestart
 
-# PUBLIC	opp_trestart
-ENTRY opp_trestart  #	/* PROC */
+ENTRY	opp_trestart
 	putframe
-	addq	$8,REG_SP		#Go past return address
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_trestart
 	getframe
 	ret
-# opp_trestart ENDP
-
-# END
diff --git a/sr_x86_64/opp_trollback.s b/sr_x86_64/opp_trollback.s
index 30cac9a..9b3f960 100644
--- a/sr_x86_64/opp_trollback.s
+++ b/sr_x86_64/opp_trollback.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_trollback.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_trollback
-#	PAGE	+
-	.DATA
-.extern	frame_pointer 	# /*:DWORD */
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_trollback
+	.extern	op_trollback
 
-# PUBLIC	opp_trollback
-ENTRY opp_trollback  #	/* PROC */
+ENTRY	opp_trollback
 	putframe
-	addq	$8,REG_SP   # burn return PC
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_trollback
 	getframe
 	ret
-# opp_trollback ENDP
-
-# END
diff --git a/sr_x86_64/opp_tstart.s b/sr_x86_64/opp_tstart.s
index cb453f7..32a3b53 100644
--- a/sr_x86_64/opp_tstart.s
+++ b/sr_x86_64/opp_tstart.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007, 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,57 +10,99 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_tstart.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_tstart
-#	PAGE	+
 	.DATA
-.extern	frame_pointer 	# /* :DWORD */
+	.extern	frame_pointer
 
 	.text
-.extern	op_tstart
+	.extern	op_tstart
 
-# PUBLIC	opp_tstart
-ENTRY opp_tstart        # /* PROC */
+save_arg5	= -16
+save_arg4	= -8
+FRAME_SIZE	= 16
+#
+# Wrapper for op_tstart that rebuffers the arguments and adds an arg to the front of the list to so op_tstart
+# knows whether it was called from generated code or from C code since it handles TP restarts differently in
+# those cases. This routine also saves/reloads the stackframe and related pointers because on an indirect call
+# op_tstart() may shift the stack frame due to where it needs to put the TPHOST mv_stent.
+#
+# Parameters:
+#    arg0:      (int) SERIAL flag
+#    arg1:      (mval *) transaction id
+#    arg2:      (int) count of local vars to be saved/restored
+#    arg3-arg5: (mval *) list of (arg2) mvals (continuing on stack if needed) containing the NAMES of variables
+#               to be saved and restored on a TP restart.
+#
+# Note no need to save %rbp in the prologue as it gets reset to the new frame when we return. Note also we subtract
+# 8 from FRAME_SIZE because this routine pops the return address after putframe saves it. So instead of removing the
+# stack space for the return address then adding 16 bytes for save area, just reduce by the difference.
+#
+ENTRY	opp_tstart
         putframe
-        addq    $8, REG_SP # burn the return pc
-        enter   $8, $0     # pull a small stack, used only for saving the incoming $rsp value.
-                           # But make sure that the $rsp is 16 byte aligned
-        movl    REG32_ARG2,REG32_ACCUM
-        cmpl    $0,REG32_ACCUM
+	leaq	8(REG_SP), %rbp				# Address of start of parameter list on stack
+        subq    $FRAME_SIZE-8, REG_SP 			# Burn the return pc, add 16 byte save area and 16 byte align stack
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG64_ARG4, save_arg4(%rbp)		# Save two parms as we need more temp registers
+	movq	REG64_ARG5, save_arg5(%rbp)
+        movl    REG32_ARG2, REG32_ACCUM			# Count of mval var name parms
+        cmpl    $0, REG32_ACCUM
         je      no_arg
-        cmpl    $1,REG32_ACCUM
+        cmpl    $1, REG32_ACCUM
         je      arg_1
-        cmpl    $2,REG32_ACCUM
+        cmpl    $2, REG32_ACCUM
         je      arg_2
-        subl    $3,REG32_ACCUM          #3 arguments are already in register
-        cltq
-        leaq    (REG_FRAME_POINTER,REG64_ACCUM,8),REG64_SCRATCH1
-again:  pushq   (REG64_SCRATCH1)
-        subq    $8,REG64_SCRATCH1
-        subq    $1,REG64_ACCUM
-        cmpq    $0,REG64_ACCUM
-        jg      again
-        pushq   REG64_ARG5
-arg_2:  movq    REG64_ARG4,REG64_ARG5
-arg_1:  movq    REG64_ARG3,REG64_ARG4
-no_arg: movq    REG64_ARG2,REG64_ARG3
-        movq    REG64_ARG1,REG64_ARG2
-        movq    REG64_ARG0,REG64_ARG1
-        movl    $0,REG32_ARG0		# arg0: NOT an implicit op_tstart() call
-        movb    $0,REG8_ACCUM           # variable length argument
+	#
+	# We have more than 2 local variable names to save/restore so we need some aligned space on the stack for
+	# parameters that don't fit in the 6 parm registers. Only the first two var name parameters can fit in
+	# parm registers though a third var was initially in a parm reg but is now to be shifted to the stack since
+	# this code adds a parm. All other parms s must reside on the stack starting at the lowest address. So for
+	# example, if we need 7 slots, we must allocate 8 slots to keep the stack aligned but the 7 slots used must
+	# be those with the lowest address for this to work correctly.
+	#
+	cltq						# Convert REG32_ACCUM to REG64_ACCUM
+	subq	$1, REG64_ACCUM				# Two parms in regs so reduce by 1 to get "roundable" count
+	movq	REG64_ACCUM, REG64_ARG5			# Copy of argument count
+	andq	$-2, REG64_ARG5				# Round to even value
+	shlq	$3, REG64_ARG5				# Mult by 8 via shifting gives us 16 byte aligned value
+	subq	REG64_ARG5, REG_SP			# Allocate aligned parm area on stack
+	CHKSTKALIGN					# Verify stack alignment
+	movq	REG_SP, REG64_ARG4			# Save bottom of allocation to REG64_ARG4
+	subq	$2, REG64_ACCUM				# Remove 1 (more) parm to be passed in parmreg plus 1 for 0 origin
+	leaq	(REG64_ARG4, REG64_ACCUM, 8), REG64_ARG4 # Address for last actuallist parm to be stored
+	cmpq	$0, REG64_ACCUM				# Only 1 arg left (zero origin)?
+	je	arg_3
+	leaq	(%rbp, REG64_ACCUM, 8), REG64_SCRATCH1	# Address of last passed-in parameter + 8 since 3 parms
+							# .. were passed in parm registers
+	subq	$8, REG64_SCRATCH1			# Correct pointer to last passed-in parm
+again:
+	movq	0(REG64_SCRATCH1), REG64_ARG5		# There are only 3 parms on the incoming stack
+	movq	REG64_ARG5, 0(REG64_ARG4)		# Move parm to home in stack location
+	subq	$8, REG64_SCRATCH1			# Move pointers to previous argument
+	subq	$8, REG64_ARG4
+	subq	$1, REG64_ACCUM				# Count down the parm
+	cmpq	$0, REG64_ACCUM				# See if down to 1 parm and if so, fall thru to handle it
+	jg	again
+	#
+	# When one arg is left, it is the originally passed-in arg5 now saved in save_arg5(%rbp). Since there is no
+	# room for this this parm in the registers anymore, put it in its place on the stack as well.
+	#
+arg_3:
+        movq	save_arg5(%rbp), REG64_ARG5
+	movq	REG64_ARG5, 0(REG64_ARG4)		# Move parm to home in stack location
+arg_2:
+	movq	save_arg4(%rbp), REG64_ARG5
+arg_1:
+	movq	REG64_ARG3, REG64_ARG4
+no_arg:
+	movq	REG64_ARG2, REG64_ARG3
+        movq	REG64_ARG1, REG64_ARG2
+        movq	REG64_ARG0, REG64_ARG1
+        movl	$0, REG32_ARG0				# arg0: NOT an implicit op_tstart() call
+        movb	$0, REG8_ACCUM				# Variable length argument
         call    op_tstart
-        leave   # restore $rsp
-        getframe
+	movq	%rbp, %rsp				# Restore stack pointer unwinding save/parm area
+        getframe					# Get frame pointers and push return addr
         ret
-# opp_tstart ENDP
-
-# END
-
diff --git a/sr_x86_64/opp_xnew.s b/sr_x86_64/opp_xnew.s
index 52bf574..a269db0 100644
--- a/sr_x86_64/opp_xnew.s
+++ b/sr_x86_64/opp_xnew.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,31 +10,21 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_xnew.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_xnew
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_xnew
+	.extern	op_xnew
 
-# PUBLIC	opp_xnew
-ENTRY opp_xnew
+ENTRY	opp_xnew
 	putframe
-	addq	$8,REG_SP                 # burn return PC
-	movb    $0,REG8_ACCUM             # variable length argument
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
+	movb    $0, REG8_ACCUM		# Variable length argument
 	call	op_xnew
 	getframe
 	ret
-# opp_xnew ENDP
-
-# END
diff --git a/sr_x86_64/opp_zcont.s b/sr_x86_64/opp_zcont.s
index 07e09bb..8e83f29 100644
--- a/sr_x86_64/opp_zcont.s
+++ b/sr_x86_64/opp_zcont.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_zcont.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_zcont
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_zcont
+	.extern	op_zcont
 
-# PUBLIC	opp_zcont
 ENTRY opp_zcont
 	putframe
-	addq	$8,REG_SP	#go past return address
+	addq	$8, REG_SP		# Burn return PC & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_zcont
 	getframe
 	ret
-# opp_zcont ENDP
-
-# END
diff --git a/sr_x86_64/opp_zg1.s b/sr_x86_64/opp_zg1.s
index 14fc0aa..ea81c4f 100644
--- a/sr_x86_64/opp_zg1.s
+++ b/sr_x86_64/opp_zg1.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2010 Fidelity Information Services, Inc	#
+# Copyright (c) 2010-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,30 +10,20 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	opp_zg1.s
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-#	.386
-#	.MODEL	FLAT, C
-
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_zg1
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_zg1
+	.extern	op_zg1
 
-# PUBLIC	opp_zg1
 ENTRY	opp_zg1
 	putframe
-	addq	$8,REG_SP	# burn return pc (args in regs)
+	addq	$8, REG_SP		# Burn return pc & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
 	call	op_zg1
 	getframe
 	ret
-# opp_zg1	ENDP
-
-# END
diff --git a/sr_x86_64/opp_zgoto.s b/sr_x86_64/opp_zgoto.s
index 33f6a78..d7eef54 100644
--- a/sr_x86_64/opp_zgoto.s
+++ b/sr_x86_64/opp_zgoto.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2010, 2011 Fidelity Information Services, Inc	#
+# Copyright (c) 2010-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -8,36 +9,27 @@
 #	the license, please stop and do not read further.	#
 #								#
 #################################################################
-
+#
 #      Args:
-#	 mval* (routine name)
-#	 mval* (label name)
+#	 mval * (routine name)
+#	 mval * (label name)
 #	 int (offset from label)
 #	 int (stack frame nesting level to which to transfer control)
-#	PAGE	,132
-	.title	opp_zgoto.s
-
-#	.386
-#	.MODEL	FLAT, C
+#
+	.include "linkage.si"
+	.include "g_msf.si"
+	.include "debug.si"
 
-.include "linkage.si"
-	.INCLUDE	"g_msf.si"
-
-	.sbttl	opp_zgoto
-#	PAGE	+
-	.DATA
-.extern	frame_pointer
+	.data
+	.extern	frame_pointer
 
 	.text
-.extern	op_zgoto
+	.extern	op_zgoto
 
-# PUBLIC	opp_zgoto
 ENTRY	opp_zgoto
 	putframe
-	addq	$8,REG_SP	# Burn return address
-	call	op_zgoto	# All three arg regs passed to zgoto_level
+	addq	$8, REG_SP		# Burn return address & 16 byte align stack
+	CHKSTKALIGN			# Verify stack alignment
+	call	op_zgoto		# All 4 arg regs passed to opp_zgoto
 	getframe
 	ret
-# opp_zgoto ENDP
-
-# END
diff --git a/sr_x86_64/pseudo_ret.s b/sr_x86_64/pseudo_ret.s
index 96e187d..26558ac 100644
--- a/sr_x86_64/pseudo_ret.s
+++ b/sr_x86_64/pseudo_ret.s
@@ -1,6 +1,7 @@
 #################################################################
 #								#
-#	Copyright 2007 Fidelity Information Services, Inc	#
+# Copyright (c) 2007-2015 Fidelity National Information 	#
+# Services, Inc. and/or its subsidiaries. All rights reserved.	#
 #								#
 #	This source code contains the intellectual property	#
 #	of its copyright holder(s), and is made available	#
@@ -9,22 +10,19 @@
 #								#
 #################################################################
 
-#	PAGE	,132
-	.title	pseudo_ret.s
-	.sbttl	pseudo_ret
-
-#	.386
-#	.MODEL	FLAT, C
-
-.include "g_msf.si"
-.include "linkage.si"
+	.include "g_msf.si"
+	.include "linkage.si"
+	.include "debug.si"
 
 	.text
-.extern	opp_ret
-
-# PUBLIC	pseudo_ret
-ENTRY pseudo_ret
+	.extern	opp_ret
+#
+# This routine is only ever "returned to" since its address stored into the mpc field of stack frames
+# during certain types of error recovery. Because of that, there is no "return address" on the stack
+# so this routine's call to opp_ret is the equivalent of a goto because opp_ret *will* unwind the caller's
+# address. So this routine has no caller and no return. Nevertheless, we check the stack alignment to
+# verify it before passing control to opp_ret for the unwind.
+#
+ENTRY	pseudo_ret
+	CHKSTKALIGN			# Verify stack alignment
 	call	opp_ret
-# pseudo_ret ENDP
-
-# END
diff --git a/sr_x86_64/ttt.c b/sr_x86_64/ttt.c
index 3f8de37..dd2d63a 100644
--- a/sr_x86_64/ttt.c
+++ b/sr_x86_64/ttt.c
@@ -1,6 +1,7 @@
 /****************************************************************
  *								*
- *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
+ * Copyright (c) 2001-2015 Fidelity National Information 	*
+ * Services, Inc. and/or its subsidiaries. All rights reserved.	*
  *								*
  *	This source code contains the intellectual property	*
  *	of its copyright holder(s), and is made available	*
@@ -13,709 +14,704 @@
 #include "vxi.h"
 #include "vxt.h"
 #include "xfer_enum.h"
-LITDEF short ttt[4378] = {
+LITDEF short ttt[4346] = {
 
-/*    0 */	0,0,0,0,330,3579,3052,572,
-/*    8 */	2376,3037,3067,2048,426,3529,2169,3155,
-/*   16 */	2252,2240,3762,3799,2213,2222,2294,2234,
-/*   24 */	2285,2264,2192,778,793,805,817,859,
-/*   32 */	877,898,927,957,972,987,1005,1164,
-/*   40 */	1077,1110,1143,1221,1272,1602,1635,1650,
-/*   48 */	1680,1746,1776,1800,1863,1884,1902,3594,
-/*   56 */	3616,0,0,0,0,587,0,528,
-/*   64 */	0,2034,0,3141,0,0,0,0,
-/*   72 */	0,0,362,438,2354,2360,2785,2812,
-/*   80 */	2830,2933,2871,2862,2948,3668,3752,3088,
-/*   88 */	0,3120,3221,3184,3169,3199,3543,3397,
-/*   96 */	3674,3686,3701,3725,3734,3719,3710,3430,
-/*  104 */	3795,3808,3830,3867,3879,3900,3924,3990,
-/*  112 */	0,0,2981,2336,3273,4327,666,4330,
-/*  120 */	720,2842,3239,542,548,4333,2439,2536,
-/*  128 */	2426,495,2462,2556,2201,2494,2566,4336,
-/*  136 */	2321,2312,4340,1290,4341,358,354,3421,
-/*  144 */	450,4345,4348,4351,3106,4354,4357,4360,
-/*  152 */	4363,4366,4369,3565,0,2957,2625,2603,
-/*  160 */	1563,2594,2372,2183,2908,2069,745,2898,
-/*  168 */	0,0,2391,3743,3771,1494,3695,2474,
-/*  176 */	2062,557,3891,1848,2303,1206,345,3225,
-/*  184 */	629,698,610,676,3855,1125,3823,3081,
-/*  192 */	2330,2972,3095,648,1017,2912,4372,2546,
-/*  200 */	3942,3960,3975,519,2927,3217,1995,4017,
-/*  208 */	4002,1308,3557,601,1665,1734,2509,4375,
-/*  216 */	3628,2582,754,835,3256,3783,3652,3638,
-/*  224 */	3645,3634,730,912,2449,1059,2413,1047,
-/*  232 */	2273,1032,1092,2521,1464,1407,1392,1446,
-/*  240 */	1362,1374,1419,1347,1431,1479,0,3515,
-/*  248 */	0,936,945,3376,1875,3355,2400,2484,
-/*  256 */	3007,3013,3025,2993,1245,1257,1179,1191,
-/*  264 */	1233,3606,1710,1914,0,1320,1506,1584,
-/*  272 */	3449,1617,1695,1722,1833,1812,3491,1758,
-/*  280 */	3470,1959,1518,1533,2022,4032,1941,3283,
-/*  288 */	3295,3307,3319,2821,2836,1551,459,1335,
-/*  296 */	1977,657,3331,3343,4011,4023,0,0,
-/*  304 */	0,0,3846,4044,4055,4067,4076,4090,
-/*  312 */	4103,4113,4130,4142,4151,4163,4175,4187,
-/*  320 */	4202,4214,4223,4235,4251,1929,4272,4284,
-/*  328 */	4307,4318,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,
-/*  336 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_add,
-/*  344 */	VXT_END,
-/*  345 */	VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_bindparm,
-/*  353 */	VXT_END,
-/*  354 */	VXI_INCL,VXT_VAL,1,VXT_END,
-/*  358 */	VXI_CLRL,VXT_VAL,0,VXT_END,
-/*  362 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_break,VXT_END,
-/*  366 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callb,VXI_BRB,VXT_JMP,
-/*  374 */	1,VXT_END,
-/*  376 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_calll,VXI_JMP,VXT_JMP,
-/*  384 */	1,VXT_END,
-/*  386 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callw,VXI_BRW,VXT_JMP,
-/*  394 */	1,VXT_END,
-/*  396 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspb,VXI_BRB,VXT_JMP,
-/*  404 */	1,VXT_END,
-/*  406 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspl,VXI_JMP,VXT_JMP,
-/*  414 */	1,VXT_END,
-/*  416 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspw,VXI_BRW,VXT_JMP,
-/*  424 */	1,VXT_END,
-/*  426 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/*  434 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_cat,VXT_END,
-/*  438 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  446 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_close,VXT_END,
-/*  450 */	VXI_BICB2,VXT_LIT,1,VXT_REG,0x5A,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_dt_false,
-/*  458 */	VXT_END,
-/*  459 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_clralsvars,
-/*  467 */	VXT_END,
-/*  468 */	VXI_TSTL,VXT_VAL,1,VXT_END,
-/*  472 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2bool,
-/*  480 */	VXT_END,
-/*  481 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2mint,
-/*  489 */	VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,VXT_END,
-/*  495 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/*  503 */	SIZEOF(char *) * (short int)xf_commarg,VXT_END,
-/*  505 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVL,VXT_VAL,1,
-/*  513 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mint2mval,VXT_END,
-/*  519 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2num,
-/*  527 */	VXT_END,
-/*  528 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/*  536 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_contain,VXT_END,
-/*  542 */	VXI_MOVL,VXT_REG,0x6C,VXT_ADDR,0,VXT_END,
-/*  548 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_currtn,
-/*  556 */	VXT_END,
-/*  557 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/*  565 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_cvtparm,VXT_END,
-/*  572 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  580 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_div,VXT_END,
-/*  587 */	VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
-/*  595 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equ,VXT_END,
-/*  601 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equnul,
-/*  609 */	VXT_END,
-/*  610 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  618 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_LIT,0,VXI_JSB,
-/*  626 */	VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
-/*  629 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  637 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_JSB,
-/*  645 */	VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
-/*  648 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunret,
-/*  656 */	VXT_END,
-/*  657 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunretals,
-/*  665 */	VXT_END,
-/*  666 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/*  674 */	SIZEOF(char *) * (short int)xf_extcall,VXT_END,
-/*  676 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  684 */	3,VXI_PUSHL,VXT_LIT,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/*  692 */	VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
-/*  698 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  706 */	3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/*  714 */	VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
-/*  720 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/*  728 */	SIZEOF(char *) * (short int)xf_extjmp,VXT_END,
-/*  730 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  738 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_exp,VXT_END,
-/*  745 */	VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fetch,
-/*  753 */	VXT_END,
-/*  754 */	VXT_IREPAB,VXT_VAL,6,VXI_PUSHL,VXT_VAL,5,VXI_PUSHL,VXT_VAL,
-/*  762 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,
-/*  770 */	VXT_LIT,0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
-/*  778 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/*  786 */	2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnascii,VXT_END,
-/*  793 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/*  801 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnchar,VXT_END,
-/*  805 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  813 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fndata,VXT_END,
-/*  817 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/*  825 */	2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/*  833 */	SIZEOF(char *) * (short int)xf_fnextract,VXT_END,
-/*  835 */	VXT_IREPAB,VXT_VAL,6,VXI_PUSHL,VXT_VAL,5,VXI_PUSHL,VXT_VAL,
-/*  843 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/*  851 */	VXT_VAL,0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
-/*  859 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/*  867 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/*  875 */	SIZEOF(char *) * (short int)xf_fnfind,VXT_END,
-/*  877 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/*  885 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/*  893 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfnumber,VXT_END,
-/*  898 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
-/*  906 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget,VXT_END,
-/*  912 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  920 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget2,VXT_END,
-/*  927 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget,
-/*  935 */	VXT_END,
-/*  936 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget1,
-/*  944 */	VXT_END,
-/*  945 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/*  953 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget1,VXT_END,
-/*  957 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  965 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnincr,VXT_END,
-/*  972 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/*  980 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnj2,VXT_END,
-/*  987 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/*  995 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1003 */	SIZEOF(char *) * (short int)xf_fnj3,VXT_END,
-/* 1005 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1013 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlength,VXT_END,
-/* 1017 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1025 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvname,VXT_END,
-/* 1032 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
-/* 1040 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvnameo2,VXT_END,
-/* 1047 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1055 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvprvname,VXT_END,
-/* 1059 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/* 1067 */	3,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,2,VXT_XFER,
-/* 1075 */	SIZEOF(char *) * (short int)xf_fnname,VXT_END,
-/* 1077 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1085 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnnext,VXT_END,
-/* 1092 */	VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
-/* 1100 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1108 */	SIZEOF(char *) * (short int)xf_fno2,VXT_END,
-/* 1110 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1118 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnorder,VXT_END,
-/* 1125 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1133 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1141 */	SIZEOF(char *) * (short int)xf_fnp1,VXT_END,
-/* 1143 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 1151 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 1159 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpiece,VXT_END,
-/* 1164 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1172 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpopulation,VXT_END,
-/* 1179 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1187 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqlength,VXT_END,
-/* 1191 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1199 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqsubscript,VXT_END,
-/* 1206 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1214 */	0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnquery,VXT_END,
-/* 1221 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1229 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnrandom,VXT_END,
-/* 1233 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1241 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnreverse,VXT_END,
-/* 1245 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1253 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack1,VXT_END,
-/* 1257 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1265 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack2,VXT_END,
-/* 1272 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1280 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1288 */	SIZEOF(char *) * (short int)xf_fntext,VXT_END,
-/* 1290 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1298 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1306 */	SIZEOF(char *) * (short int)xf_fntranslate,VXT_END,
-/* 1308 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1316 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnview,VXT_END,
-/* 1320 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/* 1328 */	2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzascii,VXT_END,
-/* 1335 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1343 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzahandle,VXT_END,
-/* 1347 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1355 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitand,VXT_END,
-/* 1362 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 1370 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitcoun,VXT_END,
-/* 1374 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1382 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1390 */	SIZEOF(char *) * (short int)xf_fnzbitfind,VXT_END,
-/* 1392 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1400 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitget,VXT_END,
-/* 1407 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 1415 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitlen,VXT_END,
-/* 1419 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 1427 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitnot,VXT_END,
-/* 1431 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1439 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitor,VXT_END,
-/* 1446 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1454 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1462 */	SIZEOF(char *) * (short int)xf_fnzbitset,VXT_END,
-/* 1464 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1472 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitstr,VXT_END,
-/* 1479 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 1487 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitxor,VXT_END,
-/* 1494 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1502 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzcall,VXT_END,
-/* 1506 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1514 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzchar,VXT_END,
-/* 1518 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1526 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzconvert2,VXT_END,
-/* 1533 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1541 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1549 */	SIZEOF(char *) * (short int)xf_fnzconvert3,VXT_END,
-/* 1551 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1559 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdata,VXT_END,
-/* 1563 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
-/* 1571 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 1579 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdate,VXT_END,
-/* 1584 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
-/* 1592 */	2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1600 */	SIZEOF(char *) * (short int)xf_fnzextract,VXT_END,
-/* 1602 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1610 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzfile,VXT_END,
-/* 1617 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1625 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1633 */	SIZEOF(char *) * (short int)xf_fnzfind,VXT_END,
-/* 1635 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1643 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetdvi,VXT_END,
-/* 1650 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1658 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetjpi,VXT_END,
-/* 1665 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1673 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetlki,VXT_END,
-/* 1680 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1688 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetsyi,VXT_END,
-/* 1695 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1703 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzj2,VXT_END,
-/* 1710 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1718 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzjobexam,VXT_END,
-/* 1722 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1730 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlength,VXT_END,
-/* 1734 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1742 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlkid,VXT_END,
-/* 1746 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1754 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzm,VXT_END,
-/* 1758 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1766 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1774 */	SIZEOF(char *) * (short int)xf_fnzp1,VXT_END,
-/* 1776 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
-/* 1784 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 1792 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzparse,VXT_END,
-/* 1800 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1808 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpid,VXT_END,
-/* 1812 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 1820 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 1828 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpiece,VXT_END,
-/* 1833 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1841 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpopulation,VXT_END,
-/* 1848 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 1856 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzprevious,VXT_END,
-/* 1863 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1871 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpriv,VXT_END,
-/* 1875 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzqgblmod,
-/* 1883 */	VXT_END,
-/* 1884 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1892 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1900 */	SIZEOF(char *) * (short int)xf_fnzsearch,VXT_END,
-/* 1902 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 1910 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsetprv,VXT_END,
-/* 1914 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 1922 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsigproc,VXT_END,
-/* 1929 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
-/* 1937 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsocket,VXT_END,
-/* 1941 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 1949 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1957 */	SIZEOF(char *) * (short int)xf_fnzsubstr,VXT_END,
-/* 1959 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1967 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1975 */	SIZEOF(char *) * (short int)xf_fnztranslate,VXT_END,
-/* 1977 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 1985 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 1993 */	SIZEOF(char *) * (short int)xf_fnztrigger,VXT_END,
-/* 1995 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,6,VXI_PUSHAB,VXT_VAL,
-/* 2003 */	5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,
-/* 2011 */	VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,7,
-/* 2019 */	VXT_XFER,SIZEOF(char *) * (short int)xf_fnztrnlnm,VXT_END,
-/* 2022 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 2030 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwidth,VXT_END,
-/* 2034 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 2042 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_follow,VXT_END,
-/* 2048 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
-/* 2056 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forcenum,VXT_END,
-/* 2062 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forchk1,VXT_END,
-/* 2069 */	VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2077 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forinit,VXT_END,
-/* 2082 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldob,VXI_BRB,VXT_JMP,
-/* 2090 */	1,VXT_END,
-/* 2092 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldol,VXI_JMP,VXT_JMP,
-/* 2100 */	1,VXT_END,
-/* 2102 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldow,VXI_BRW,VXT_JMP,
-/* 2110 */	1,VXT_END,
-/* 2112 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
-/* 2120 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
-/* 2128 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
-/* 2131 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
-/* 2139 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
-/* 2147 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
-/* 2150 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
-/* 2158 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
-/* 2166 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
-/* 2169 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_getindx,
-/* 2177 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 2183 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_gettruth,
-/* 2191 */	VXT_END,
-/* 2192 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvdata,
-/* 2200 */	VXT_END,
-/* 2201 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2209 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvextnam,VXT_END,
-/* 2213 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvget,
-/* 2221 */	VXT_END,
-/* 2222 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 2230 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvincr,VXT_END,
-/* 2234 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvkill,VXT_END,
-/* 2240 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2248 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnaked,VXT_END,
-/* 2252 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2260 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvname,VXT_END,
-/* 2264 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnext,
-/* 2272 */	VXT_END,
-/* 2273 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 2281 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvo2,VXT_END,
-/* 2285 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvorder,
-/* 2293 */	VXT_END,
-/* 2294 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvput,
-/* 2302 */	VXT_END,
-/* 2303 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvquery,
-/* 2311 */	VXT_END,
-/* 2312 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvrectarg,
-/* 2320 */	VXT_END,
-/* 2321 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvsavtarg,
-/* 2329 */	VXT_END,
-/* 2330 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvzwithdraw,VXT_END,
-/* 2336 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 2344 */	3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,
-/* 2352 */	SIZEOF(char *) * (short int)xf_gvzwrite,VXT_END,
-/* 2354 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_halt,VXT_END,
-/* 2360 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 2368 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_hang,VXT_END,
-/* 2372 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_hardret,VXT_END,
-/* 2376 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2384 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_idiv,VXT_END,
-/* 2391 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_igetsrc,
-/* 2399 */	VXT_END,
-/* 2400 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2408 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_inddevparms,VXT_END,
-/* 2413 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2421 */	0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname,VXT_END,
-/* 2426 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2434 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfun,VXT_END,
-/* 2439 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2447 */	SIZEOF(char *) * (short int)xf_indglvn,VXT_END,
-/* 2449 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 2457 */	0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indincr,VXT_END,
-/* 2462 */	VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvadr,VXI_MOVL,VXT_REG,
-/* 2470 */	0x50,VXT_ADDR,0,VXT_END,
-/* 2474 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2482 */	SIZEOF(char *) * (short int)xf_indlvarg,VXT_END,
-/* 2484 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,
-/* 2492 */	SIZEOF(char *) * (short int)xf_indmerge,VXT_END,
-/* 2494 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2502 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indname,VXT_END,
-/* 2509 */	VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvnamadr,VXI_MOVL,VXT_REG,
-/* 2517 */	0x50,VXT_ADDR,0,VXT_END,
-/* 2521 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2529 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indo2,VXT_END,
-/* 2536 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2544 */	SIZEOF(char *) * (short int)xf_indpat,VXT_END,
-/* 2546 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2554 */	SIZEOF(char *) * (short int)xf_indrzshow,VXT_END,
-/* 2556 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2564 */	SIZEOF(char *) * (short int)xf_indset,VXT_END,
-/* 2566 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 2574 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indtext,VXT_END,
-/* 2582 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2590 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_iocontrol,VXT_END,
-/* 2594 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_iretmvad,
-/* 2602 */	VXT_END,
-/* 2603 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2611 */	SIZEOF(char *) * (short int)xf_iretmval,VXT_END,
-/* 2613 */	VXI_BRB,VXT_JMP,1,VXT_END,
-/* 2617 */	VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2621 */	VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2625 */	VXI_JMP,VXT_VAL,1,VXT_END,
-/* 2629 */	VXI_BEQL,VXT_JMP,1,VXT_END,
-/* 2633 */	VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2640 */	VXI_BNEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2647 */	VXI_BGEQ,VXT_JMP,1,VXT_END,
-/* 2651 */	VXI_BLSS,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2658 */	VXI_BLSS,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2665 */	VXI_BGTR,VXT_JMP,1,VXT_END,
-/* 2669 */	VXI_BLEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2676 */	VXI_BLEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2683 */	VXI_BLEQ,VXT_JMP,1,VXT_END,
-/* 2687 */	VXI_BGTR,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2694 */	VXI_BGTR,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2701 */	VXI_BLSS,VXT_JMP,1,VXT_END,
-/* 2705 */	VXI_BGEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2712 */	VXI_BGEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2719 */	VXI_BNEQ,VXT_JMP,1,VXT_END,
-/* 2723 */	VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
-/* 2730 */	VXI_BEQL,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
-/* 2737 */	VXI_BLBC,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
-/* 2743 */	VXI_BLBS,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
-/* 2751 */	VXT_END,
-/* 2752 */	VXI_BLBS,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
-/* 2760 */	VXT_END,
-/* 2761 */	VXI_BLBS,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
-/* 2767 */	VXI_BLBC,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
-/* 2775 */	VXT_END,
-/* 2776 */	VXI_BLBC,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
-/* 2784 */	VXT_END,
-/* 2785 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,7,VXI_PUSHL,VXT_VAL,
-/* 2793 */	6,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,
-/* 2801 */	VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,
-/* 2809 */	VXT_XFER,SIZEOF(char *) * (short int)xf_job,VXT_END,
-/* 2812 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_kill,
-/* 2820 */	VXT_END,
-/* 2821 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_killalias,
-/* 2829 */	VXT_END,
-/* 2830 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killall,VXT_END,
-/* 2836 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killaliasall,VXT_END,
-/* 2842 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 2850 */	3,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_labaddr,VXI_MOVL,VXT_REG,
-/* 2858 */	0x50,VXT_ADDR,0,VXT_END,
-/* 2862 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckdecr,
-/* 2870 */	VXT_END,
-/* 2871 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckincr,
-/* 2879 */	VXT_END,
-/* 2880 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
-/* 2886 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
-/* 2892 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
-/* 2898 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 2906 */	SIZEOF(char *) * (short int)xf_linefetch,VXT_END,
-/* 2908 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_linestart,VXT_END,
-/* 2912 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 2920 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
-/* 2927 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_lkinit,VXT_END,
-/* 2933 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 2941 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
-/* 2948 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lock,
-/* 2956 */	VXT_END,
-/* 2957 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 2965 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvpatwrite,VXT_END,
-/* 2972 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwithdraw,
-/* 2980 */	VXT_END,
-/* 2981 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 2989 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwrite,VXT_END,
-/* 2993 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_m_srchindx,
-/* 3001 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 3007 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_merge,VXT_END,
-/* 3013 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3021 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
-/* 3025 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3033 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
-/* 3037 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3045 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_flt_mod,VXT_END,
-/* 3052 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3060 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_mul,VXT_END,
-/* 3067 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
-/* 3075 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_neg,VXT_END,
-/* 3081 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newintrinsic,VXT_END,
-/* 3088 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newvar,VXT_END,
-/* 3095 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_nullexp,VXI_MOVL,VXT_REG,0x50,
-/* 3103 */	VXT_ADDR,0,VXT_END,
-/* 3106 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 3114 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_numcmp,VXT_END,
-/* 3120 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3128 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3136 */	VXT_LIT,4,VXT_XFER,SIZEOF(char *) * (short int)xf_open,VXT_END,
-/* 3141 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 3149 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_pattern,VXT_END,
-/* 3155 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_putindx,
-/* 3163 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 3169 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 3177 */	0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_rdone,VXT_END,
-/* 3184 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 3192 */	0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_read,VXT_END,
-/* 3199 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
-/* 3207 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,3,VXT_XFER,
-/* 3215 */	SIZEOF(char *) * (short int)xf_readfl,VXT_END,
-/* 3217 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_END,
-/* 3221 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_ret,VXT_END,
-/* 3225 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVL,VXT_VAL,2,
-/* 3233 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_retarg,VXT_END,
-/* 3239 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3247 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/* 3255 */	VXT_END,
-/* 3256 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3264 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/* 3272 */	VXT_END,
-/* 3273 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 3281 */	SIZEOF(char *) * (short int)xf_rterror,VXT_END,
-/* 3283 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3291 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setals2als,VXT_END,
-/* 3295 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3303 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsin2alsct,VXT_END,
-/* 3307 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3315 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsctin2als,VXT_END,
-/* 3319 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3327 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsct2alsct,VXT_END,
-/* 3331 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3339 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2als,VXT_END,
-/* 3343 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
-/* 3351 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2alsct,VXT_END,
-/* 3355 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 3363 */	2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3371 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setextract,VXT_END,
-/* 3376 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 3384 */	4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3392 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setp1,VXT_END,
-/* 3397 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3405 */	3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 3413 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setpiece,VXT_END,
-/* 3421 */	VXI_BISB2,VXT_LIT,1,VXT_REG,0x5A,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_dt_true,
-/* 3429 */	VXT_END,
-/* 3430 */	VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3438 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,3,VXI_JSB,
-/* 3446 */	VXT_XFER,SIZEOF(char *) * (short int)xf_setzbrk,VXT_END,
-/* 3449 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 3457 */	2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3465 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzextract,VXT_END,
-/* 3470 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 3478 */	4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 3486 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzp1,VXT_END,
-/* 3491 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 3499 */	3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 3507 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setzpiece,VXT_END,
-/* 3515 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
-/* 3523 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sorts_after,VXT_END,
-/* 3529 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_srchindx,
-/* 3537 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 3543 */	VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
-/* 3551 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
-/* 3557 */	VXI_MOVC3,VXT_LIT,16,VXT_VAL,2,VXT_VAL,1,VXT_END,
-/* 3565 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
-/* 3573 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
-/* 3579 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3587 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_sub,VXT_END,
-/* 3594 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3602 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_svget,VXT_END,
-/* 3606 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 3614 */	SIZEOF(char *) * (short int)xf_psvput,VXT_END,
-/* 3616 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3624 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_svput,VXT_END,
-/* 3628 */	VXI_MOVL,VXT_REG,0x50,VXT_REG,0x5A,VXT_END,
-/* 3634 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tcommit,VXT_END,
-/* 3638 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trollback,VXT_END,
-/* 3645 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trestart,VXT_END,
-/* 3652 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 3660 */	2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tstart,VXT_END,
-/* 3668 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_unlock,VXT_END,
-/* 3674 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3682 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_use,VXT_END,
-/* 3686 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_view,
-/* 3694 */	VXT_END,
-/* 3695 */	VXI_CMPL,VXT_VAL,1,VXT_VAL,2,VXT_END,
-/* 3701 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_write,
-/* 3709 */	VXT_END,
-/* 3710 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wteol,
-/* 3718 */	VXT_END,
-/* 3719 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_wtff,VXT_END,
-/* 3725 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wtone,
-/* 3733 */	VXT_END,
-/* 3734 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wttab,
-/* 3742 */	VXT_END,
-/* 3743 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_xkill,
-/* 3751 */	VXT_END,
-/* 3752 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 3760 */	SIZEOF(char *) * (short int)xf_xnew,VXT_END,
-/* 3762 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zallocate,
-/* 3770 */	VXT_END,
-/* 3771 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3779 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zattach,VXT_END,
-/* 3783 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3791 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zcompile,VXT_END,
-/* 3795 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
-/* 3799 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zdeallocate,
-/* 3807 */	VXT_END,
-/* 3808 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 3816 */	1,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_zedit,VXT_END,
-/* 3823 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zg1,VXT_END,
-/* 3830 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHL,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
-/* 3838 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zgoto,VXT_END,
-/* 3846 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zhalt,
-/* 3854 */	VXT_END,
-/* 3855 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3863 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zhelp,VXT_END,
-/* 3867 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3875 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zlink,VXT_END,
-/* 3879 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 3887 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zmess,VXT_END,
-/* 3891 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zprevious,
-/* 3899 */	VXT_END,
-/* 3900 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
-/* 3908 */	4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
-/* 3916 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_zprint,VXT_END,
-/* 3924 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,
-/* 3932 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
-/* 3940 */	SIZEOF(char *) * (short int)xf_zshow,VXT_END,
-/* 3942 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
-/* 3950 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
-/* 3958 */	SIZEOF(char *) * (short int)xf_zshow,VXT_END,
-/* 3960 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3968 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
-/* 3975 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3983 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
-/* 3990 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 3998 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zsystem,VXT_END,
-/* 4002 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_ztcommit,
-/* 4010 */	VXT_END,
-/* 4011 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztrigger,VXT_END,
-/* 4017 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztstart,VXT_END,
-/* 4023 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zwritesvn,
-/* 4031 */	VXT_END,
-/* 4032 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4040 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwrite,VXT_END,
-/* 4044 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_igetdst,VXI_MOVL,VXT_REG,0x50,
-/* 4052 */	VXT_ADDR,0,VXT_END,
-/* 4055 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4063 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_indget1,VXT_END,
-/* 4067 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_glvnpop,
-/* 4075 */	VXT_END,
-/* 4076 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_glvnslot,
-/* 4084 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 4090 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
-/* 4098 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indsavglvn,VXT_END,
-/* 4103 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
-/* 4111 */	SIZEOF(char *) * (short int)xf_indsavlvn,VXT_END,
-/* 4113 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4121 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshlvn,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
-/* 4129 */	VXT_END,
-/* 4130 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
-/* 4138 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_savgvn,VXT_END,
-/* 4142 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_savlvn,
-/* 4150 */	VXT_END,
-/* 4151 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4159 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_shareslot,VXT_END,
-/* 4163 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4171 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_stoglvn,VXT_END,
-/* 4175 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4183 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshgvn,VXT_END,
-/* 4187 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
-/* 4195 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname2,VXT_END,
-/* 4202 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 4210 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_indget2,VXT_END,
-/* 4214 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_indmerge2,
-/* 4222 */	VXT_END,
-/* 4223 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
-/* 4231 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_litc,VXT_END,
-/* 4235 */	VXI_MOVC3,VXT_LIT,16,VXT_VAL,2,VXT_VAL,1,VXI_PUSHAB,
-/* 4243 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_stolitc,VXT_END,
-/* 4251 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
-/* 4259 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
-/* 4267 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpeek,VXT_END,
-/* 4272 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
-/* 4280 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsyslog,VXT_END,
-/* 4284 */	VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
-/* 4292 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
-/* 4300 */	SIZEOF(char *) * (short int)xf_rhd_ext,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
-/* 4307 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_lab_ext,VXI_MOVL,VXT_REG,0x50,
-/* 4315 */	VXT_ADDR,0,VXT_END,
-/* 4318 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zrupdate,
-/* 4326 */	VXT_END,
-/* 4327 */	366,386,376,2613,2621,2617,2880,2892,
-/* 4335 */	2886,0,0,0,505,481,472,0,
-/* 4343 */	0,468,2112,2150,2131,2761,2776,2767,
-/* 4351 */	2737,2752,2743,2629,2640,2633,2719,2730,
-/* 4359 */	2723,2665,2676,2669,2683,2694,2687,2701,
-/* 4367 */	2712,2705,2647,2658,2651,2082,2102,2092,
-/* 4375 */	396,416,406};
+/*    0 */	0,0,0,0,329,3581,3054,574,
+/*    8 */	2378,3039,3069,2050,425,3531,2171,3157,
+/*   16 */	2254,2242,3764,3801,2215,2224,2296,2236,
+/*   24 */	2287,2266,2194,780,795,807,819,861,
+/*   32 */	879,900,929,959,974,989,1007,1166,
+/*   40 */	1079,1112,1145,1223,1274,1604,1637,1652,
+/*   48 */	1682,1748,1778,1802,1865,1886,1904,3596,
+/*   56 */	3618,0,0,0,0,589,0,527,
+/*   64 */	0,2036,0,3143,0,0,0,0,
+/*   72 */	0,0,361,437,2356,2362,2787,2814,
+/*   80 */	2832,2935,2873,2864,2950,3670,3754,3090,
+/*   88 */	0,3122,3223,3186,3171,3201,3545,3399,
+/*   96 */	3676,3688,3703,3727,3736,3721,3712,3432,
+/*  104 */	3797,3810,3832,3869,3881,3902,3926,3992,
+/*  112 */	0,0,2983,2338,3275,4295,668,4298,
+/*  120 */	722,2844,3241,541,550,4301,2441,2538,
+/*  128 */	2428,494,2464,2558,2203,2496,2568,4304,
+/*  136 */	2323,2314,4308,1292,4309,357,353,3423,
+/*  144 */	449,4313,4316,4319,3108,4322,4325,4328,
+/*  152 */	4331,4334,4337,3567,0,2959,2627,2605,
+/*  160 */	1565,2596,2374,2185,2910,2071,747,2900,
+/*  168 */	0,0,2393,3745,3773,1496,3697,2476,
+/*  176 */	2064,559,3893,1850,2305,1208,344,3227,
+/*  184 */	631,700,612,678,3857,1127,3825,3083,
+/*  192 */	2332,2974,3097,650,1019,2914,4340,2548,
+/*  200 */	3944,3962,3977,518,2929,3219,1997,4019,
+/*  208 */	4004,1310,3559,603,1667,1736,2511,4343,
+/*  216 */	3630,2584,756,837,3258,3785,3654,3640,
+/*  224 */	3647,3636,732,914,2451,1061,2415,1049,
+/*  232 */	2275,1034,1094,2523,1466,1409,1394,1448,
+/*  240 */	1364,1376,1421,1349,1433,1481,0,3517,
+/*  248 */	0,938,947,3378,1877,3357,2402,2486,
+/*  256 */	3009,3015,3027,2995,1247,1259,1181,1193,
+/*  264 */	1235,3608,1712,1916,0,1322,1508,1586,
+/*  272 */	3451,1619,1697,1724,1835,1814,3493,1760,
+/*  280 */	3472,1961,1520,1535,2024,4034,1943,3285,
+/*  288 */	3297,3309,3321,2823,2838,1553,458,1337,
+/*  296 */	1979,659,3333,3345,4013,4025,0,0,
+/*  304 */	0,0,3848,4046,4057,4069,4078,4092,
+/*  312 */	4105,4115,4132,4144,4153,4165,4177,4189,
+/*  320 */	4204,4216,4225,4237,4253,1931,4274,4286,
+/*  328 */	0,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
+/*  336 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_add,VXT_END,
+/*  344 */	VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_bindparm,
+/*  352 */	VXT_END,
+/*  353 */	VXI_INCL,VXT_VAL,1,VXT_END,
+/*  357 */	VXI_CLRL,VXT_VAL,0,VXT_END,
+/*  361 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_break,VXT_END,
+/*  365 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callb,VXI_BRB,VXT_JMP,
+/*  373 */	1,VXT_END,
+/*  375 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_calll,VXI_JMP,VXT_JMP,
+/*  383 */	1,VXT_END,
+/*  385 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callw,VXI_BRW,VXT_JMP,
+/*  393 */	1,VXT_END,
+/*  395 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspb,VXI_BRB,VXT_JMP,
+/*  403 */	1,VXT_END,
+/*  405 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspl,VXI_JMP,VXT_JMP,
+/*  413 */	1,VXT_END,
+/*  415 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_callspw,VXI_BRW,VXT_JMP,
+/*  423 */	1,VXT_END,
+/*  425 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
+/*  433 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_cat,VXT_END,
+/*  437 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/*  445 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_close,VXT_END,
+/*  449 */	VXI_BICB2,VXT_LIT,1,VXT_REG,0x5A,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_dt_false,
+/*  457 */	VXT_END,
+/*  458 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_clralsvars,
+/*  466 */	VXT_END,
+/*  467 */	VXI_TSTL,VXT_VAL,1,VXT_END,
+/*  471 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2bool,
+/*  479 */	VXT_END,
+/*  480 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2mint,
+/*  488 */	VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,VXT_END,
+/*  494 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/*  502 */	SIZEOF(char *) * (short int)xf_commarg,VXT_END,
+/*  504 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVL,VXT_VAL,1,
+/*  512 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mint2mval,VXT_END,
+/*  518 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_mval2num,
+/*  526 */	VXT_END,
+/*  527 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
+/*  535 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_contain,VXT_END,
+/*  541 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_currhd,VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,
+/*  549 */	VXT_END,
+/*  550 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_currtn,
+/*  558 */	VXT_END,
+/*  559 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
+/*  567 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_cvtparm,VXT_END,
+/*  574 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/*  582 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_div,VXT_END,
+/*  589 */	VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
+/*  597 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equ,VXT_END,
+/*  603 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_equnul,
+/*  611 */	VXT_END,
+/*  612 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/*  620 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_LIT,0,VXI_JSB,
+/*  628 */	VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
+/*  631 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/*  639 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_JSB,
+/*  647 */	VXT_XFER,SIZEOF(char *) * (short int)xf_exfun,VXT_END,
+/*  650 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunret,
+/*  658 */	VXT_END,
+/*  659 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_exfunretals,
+/*  667 */	VXT_END,
+/*  668 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/*  676 */	SIZEOF(char *) * (short int)xf_extcall,VXT_END,
+/*  678 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/*  686 */	3,VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,
+/*  694 */	VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
+/*  700 */	VXT_IREPAB,VXT_VAL,5,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/*  708 */	3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,
+/*  716 */	VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_extexfun,VXT_END,
+/*  722 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/*  730 */	SIZEOF(char *) * (short int)xf_extjmp,VXT_END,
+/*  732 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/*  740 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_exp,VXT_END,
+/*  747 */	VXT_IREPL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fetch,
+/*  755 */	VXT_END,
+/*  756 */	VXT_IREPAB,VXT_VAL,6,VXI_PUSHL,VXT_VAL,5,VXI_PUSHL,VXT_VAL,
+/*  764 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,
+/*  772 */	VXT_LIT,0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
+/*  780 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
+/*  788 */	2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnascii,VXT_END,
+/*  795 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
+/*  803 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnchar,VXT_END,
+/*  807 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/*  815 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fndata,VXT_END,
+/*  819 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
+/*  827 */	2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/*  835 */	SIZEOF(char *) * (short int)xf_fnextract,VXT_END,
+/*  837 */	VXT_IREPAB,VXT_VAL,6,VXI_PUSHL,VXT_VAL,5,VXI_PUSHL,VXT_VAL,
+/*  845 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
+/*  853 */	VXT_VAL,0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfgncal,VXT_END,
+/*  861 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/*  869 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/*  877 */	SIZEOF(char *) * (short int)xf_fnfind,VXT_END,
+/*  879 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/*  887 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/*  895 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnfnumber,VXT_END,
+/*  900 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
+/*  908 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget,VXT_END,
+/*  914 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/*  922 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget2,VXT_END,
+/*  929 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget,
+/*  937 */	VXT_END,
+/*  938 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fngvget1,
+/*  946 */	VXT_END,
+/*  947 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/*  955 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnget1,VXT_END,
+/*  959 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/*  967 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnincr,VXT_END,
+/*  974 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/*  982 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnj2,VXT_END,
+/*  989 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/*  997 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1005 */	SIZEOF(char *) * (short int)xf_fnj3,VXT_END,
+/* 1007 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1015 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlength,VXT_END,
+/* 1019 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1027 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvname,VXT_END,
+/* 1034 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
+/* 1042 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvnameo2,VXT_END,
+/* 1049 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1057 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnlvprvname,VXT_END,
+/* 1061 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
+/* 1069 */	3,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,2,VXT_XFER,
+/* 1077 */	SIZEOF(char *) * (short int)xf_fnname,VXT_END,
+/* 1079 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1087 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnnext,VXT_END,
+/* 1094 */	VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,
+/* 1102 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1110 */	SIZEOF(char *) * (short int)xf_fno2,VXT_END,
+/* 1112 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1120 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnorder,VXT_END,
+/* 1127 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 1135 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1143 */	SIZEOF(char *) * (short int)xf_fnp1,VXT_END,
+/* 1145 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 1153 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 1161 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpiece,VXT_END,
+/* 1166 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1174 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnpopulation,VXT_END,
+/* 1181 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1189 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqlength,VXT_END,
+/* 1193 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1201 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnqsubscript,VXT_END,
+/* 1208 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1216 */	0,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnquery,VXT_END,
+/* 1223 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1231 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnrandom,VXT_END,
+/* 1235 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1243 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnreverse,VXT_END,
+/* 1247 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1255 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack1,VXT_END,
+/* 1259 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
+/* 1267 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnstack2,VXT_END,
+/* 1274 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 1282 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1290 */	SIZEOF(char *) * (short int)xf_fntext,VXT_END,
+/* 1292 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 1300 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1308 */	SIZEOF(char *) * (short int)xf_fntranslate,VXT_END,
+/* 1310 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
+/* 1318 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnview,VXT_END,
+/* 1322 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
+/* 1330 */	2,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzascii,VXT_END,
+/* 1337 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1345 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzahandle,VXT_END,
+/* 1349 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 1357 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitand,VXT_END,
+/* 1364 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
+/* 1372 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitcoun,VXT_END,
+/* 1376 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1384 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1392 */	SIZEOF(char *) * (short int)xf_fnzbitfind,VXT_END,
+/* 1394 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 1402 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitget,VXT_END,
+/* 1409 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
+/* 1417 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitlen,VXT_END,
+/* 1421 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
+/* 1429 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitnot,VXT_END,
+/* 1433 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 1441 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitor,VXT_END,
+/* 1448 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1456 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1464 */	SIZEOF(char *) * (short int)xf_fnzbitset,VXT_END,
+/* 1466 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 1474 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitstr,VXT_END,
+/* 1481 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 1489 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzbitxor,VXT_END,
+/* 1496 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
+/* 1504 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzcall,VXT_END,
+/* 1508 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
+/* 1516 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzchar,VXT_END,
+/* 1520 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1528 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzconvert2,VXT_END,
+/* 1535 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 1543 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1551 */	SIZEOF(char *) * (short int)xf_fnzconvert3,VXT_END,
+/* 1553 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1561 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdata,VXT_END,
+/* 1565 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
+/* 1573 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 1581 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzdate,VXT_END,
+/* 1586 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
+/* 1594 */	2,VXI_PUSHL,VXT_VAL,3,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1602 */	SIZEOF(char *) * (short int)xf_fnzextract,VXT_END,
+/* 1604 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1612 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzfile,VXT_END,
+/* 1619 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 1627 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1635 */	SIZEOF(char *) * (short int)xf_fnzfind,VXT_END,
+/* 1637 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1645 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetdvi,VXT_END,
+/* 1652 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
+/* 1660 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetjpi,VXT_END,
+/* 1667 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
+/* 1675 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetlki,VXT_END,
+/* 1682 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1690 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fngetsyi,VXT_END,
+/* 1697 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1705 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzj2,VXT_END,
+/* 1712 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1720 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzjobexam,VXT_END,
+/* 1724 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1732 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlength,VXT_END,
+/* 1736 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1744 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzlkid,VXT_END,
+/* 1748 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1756 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzm,VXT_END,
+/* 1760 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 1768 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1776 */	SIZEOF(char *) * (short int)xf_fnzp1,VXT_END,
+/* 1778 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
+/* 1786 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
+/* 1794 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzparse,VXT_END,
+/* 1802 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1810 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpid,VXT_END,
+/* 1814 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 1822 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 1830 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpiece,VXT_END,
+/* 1835 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1843 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpopulation,VXT_END,
+/* 1850 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 1858 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzprevious,VXT_END,
+/* 1865 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1873 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpriv,VXT_END,
+/* 1877 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzqgblmod,
+/* 1885 */	VXT_END,
+/* 1886 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 1894 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1902 */	SIZEOF(char *) * (short int)xf_fnzsearch,VXT_END,
+/* 1904 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 1912 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsetprv,VXT_END,
+/* 1916 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
+/* 1924 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsigproc,VXT_END,
+/* 1931 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_VAL,
+/* 1939 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsocket,VXT_END,
+/* 1943 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 1951 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1959 */	SIZEOF(char *) * (short int)xf_fnzsubstr,VXT_END,
+/* 1961 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 1969 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1977 */	SIZEOF(char *) * (short int)xf_fnztranslate,VXT_END,
+/* 1979 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 1987 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,4,VXT_XFER,
+/* 1995 */	SIZEOF(char *) * (short int)xf_fnztrigger,VXT_END,
+/* 1997 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,6,VXI_PUSHAB,VXT_VAL,
+/* 2005 */	5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,
+/* 2013 */	VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,7,
+/* 2021 */	VXT_XFER,SIZEOF(char *) * (short int)xf_fnztrnlnm,VXT_END,
+/* 2024 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 2032 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwidth,VXT_END,
+/* 2036 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
+/* 2044 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_follow,VXT_END,
+/* 2050 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
+/* 2058 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forcenum,VXT_END,
+/* 2064 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forchk1,VXT_END,
+/* 2071 */	VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 2079 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forinit,VXT_END,
+/* 2084 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldob,VXI_BRB,VXT_JMP,
+/* 2092 */	1,VXT_END,
+/* 2094 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldol,VXI_JMP,VXT_JMP,
+/* 2102 */	1,VXT_END,
+/* 2104 */	VXI_PUSHL,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_forlcldow,VXI_BRW,VXT_JMP,
+/* 2112 */	1,VXT_END,
+/* 2114 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
+/* 2122 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
+/* 2130 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
+/* 2133 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
+/* 2141 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
+/* 2149 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
+/* 2152 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_JMP,1,VXI_PUSHAB,VXT_VAL,
+/* 2160 */	4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,
+/* 2168 */	VXT_XFER,SIZEOF(char *) * (short int)xf_forloop,VXT_END,
+/* 2171 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_getindx,
+/* 2179 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
+/* 2185 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_gettruth,
+/* 2193 */	VXT_END,
+/* 2194 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvdata,
+/* 2202 */	VXT_END,
+/* 2203 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 2211 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvextnam,VXT_END,
+/* 2215 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvget,
+/* 2223 */	VXT_END,
+/* 2224 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 2232 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvincr,VXT_END,
+/* 2236 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvkill,VXT_END,
+/* 2242 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 2250 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnaked,VXT_END,
+/* 2254 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 2262 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvname,VXT_END,
+/* 2266 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvnext,
+/* 2274 */	VXT_END,
+/* 2275 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
+/* 2283 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_gvo2,VXT_END,
+/* 2287 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvorder,
+/* 2295 */	VXT_END,
+/* 2296 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvput,
+/* 2304 */	VXT_END,
+/* 2305 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvquery,
+/* 2313 */	VXT_END,
+/* 2314 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvrectarg,
+/* 2322 */	VXT_END,
+/* 2323 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_gvsavtarg,
+/* 2331 */	VXT_END,
+/* 2332 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_gvzwithdraw,VXT_END,
+/* 2338 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 2346 */	3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,
+/* 2354 */	SIZEOF(char *) * (short int)xf_gvzwrite,VXT_END,
+/* 2356 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_halt,VXT_END,
+/* 2362 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 2370 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_hang,VXT_END,
+/* 2374 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_hardret,VXT_END,
+/* 2378 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 2386 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_idiv,VXT_END,
+/* 2393 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_igetsrc,
+/* 2401 */	VXT_END,
+/* 2402 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 2410 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_inddevparms,VXT_END,
+/* 2415 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 2423 */	0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname,VXT_END,
+/* 2428 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 2436 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indfun,VXT_END,
+/* 2441 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2449 */	SIZEOF(char *) * (short int)xf_indglvn,VXT_END,
+/* 2451 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 2459 */	0,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indincr,VXT_END,
+/* 2464 */	VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvadr,VXI_MOVL,VXT_REG,
+/* 2472 */	0x50,VXT_ADDR,0,VXT_END,
+/* 2476 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2484 */	SIZEOF(char *) * (short int)xf_indlvarg,VXT_END,
+/* 2486 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,
+/* 2494 */	SIZEOF(char *) * (short int)xf_indmerge,VXT_END,
+/* 2496 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 2504 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indname,VXT_END,
+/* 2511 */	VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indlvnamadr,VXI_MOVL,VXT_REG,
+/* 2519 */	0x50,VXT_ADDR,0,VXT_END,
+/* 2523 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 2531 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indo2,VXT_END,
+/* 2538 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2546 */	SIZEOF(char *) * (short int)xf_indpat,VXT_END,
+/* 2548 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2556 */	SIZEOF(char *) * (short int)xf_indrzshow,VXT_END,
+/* 2558 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2566 */	SIZEOF(char *) * (short int)xf_indset,VXT_END,
+/* 2568 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 2576 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indtext,VXT_END,
+/* 2584 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 2592 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_iocontrol,VXT_END,
+/* 2596 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_iretmvad,
+/* 2604 */	VXT_END,
+/* 2605 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2613 */	SIZEOF(char *) * (short int)xf_iretmval,VXT_END,
+/* 2615 */	VXI_BRB,VXT_JMP,1,VXT_END,
+/* 2619 */	VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2623 */	VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2627 */	VXI_JMP,VXT_VAL,1,VXT_END,
+/* 2631 */	VXI_BEQL,VXT_JMP,1,VXT_END,
+/* 2635 */	VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2642 */	VXI_BNEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2649 */	VXI_BGEQ,VXT_JMP,1,VXT_END,
+/* 2653 */	VXI_BLSS,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2660 */	VXI_BLSS,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2667 */	VXI_BGTR,VXT_JMP,1,VXT_END,
+/* 2671 */	VXI_BLEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2678 */	VXI_BLEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2685 */	VXI_BLEQ,VXT_JMP,1,VXT_END,
+/* 2689 */	VXI_BGTR,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2696 */	VXI_BGTR,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2703 */	VXI_BLSS,VXT_JMP,1,VXT_END,
+/* 2707 */	VXI_BGEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2714 */	VXI_BGEQ,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2721 */	VXI_BNEQ,VXT_JMP,1,VXT_END,
+/* 2725 */	VXI_BNEQ,VXT_LIT,6,VXI_JMP,VXT_JMP,1,VXT_END,
+/* 2732 */	VXI_BEQL,VXT_LIT,3,VXI_BRW,VXT_JMP,1,VXT_END,
+/* 2739 */	VXI_BLBC,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
+/* 2745 */	VXI_BLBS,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
+/* 2753 */	VXT_END,
+/* 2754 */	VXI_BLBS,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
+/* 2762 */	VXT_END,
+/* 2763 */	VXI_BLBS,VXT_REG,0x5A,VXT_JMP,1,VXT_END,
+/* 2769 */	VXI_BLBC,VXT_REG,0x5A,VXT_LIT,6,VXI_JMP,VXT_JMP,1,
+/* 2777 */	VXT_END,
+/* 2778 */	VXI_BLBC,VXT_REG,0x5A,VXT_LIT,3,VXI_BRW,VXT_JMP,1,
+/* 2786 */	VXT_END,
+/* 2787 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,7,VXI_PUSHL,VXT_VAL,
+/* 2795 */	6,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,
+/* 2803 */	VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,
+/* 2811 */	VXT_XFER,SIZEOF(char *) * (short int)xf_job,VXT_END,
+/* 2814 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_kill,
+/* 2822 */	VXT_END,
+/* 2823 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_killalias,
+/* 2831 */	VXT_END,
+/* 2832 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killall,VXT_END,
+/* 2838 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_killaliasall,VXT_END,
+/* 2844 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHL,VXT_VAL,
+/* 2852 */	3,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_labaddr,VXI_MOVL,VXT_REG,
+/* 2860 */	0x50,VXT_VAL,0,VXT_END,
+/* 2864 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckdecr,
+/* 2872 */	VXT_END,
+/* 2873 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lckincr,
+/* 2881 */	VXT_END,
+/* 2882 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
+/* 2888 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
+/* 2894 */	VXI_MOVAB,VXT_JMP,1,VXT_ADDR,0,VXT_END,
+/* 2900 */	VXT_IREPL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 2908 */	SIZEOF(char *) * (short int)xf_linefetch,VXT_END,
+/* 2910 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_linestart,VXT_END,
+/* 2914 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 2922 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
+/* 2929 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_lkinit,VXT_END,
+/* 2935 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 2943 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lkname,VXT_END,
+/* 2950 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lock,
+/* 2958 */	VXT_END,
+/* 2959 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 2967 */	2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvpatwrite,VXT_END,
+/* 2974 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwithdraw,
+/* 2982 */	VXT_END,
+/* 2983 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 2991 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_lvzwrite,VXT_END,
+/* 2995 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_m_srchindx,
+/* 3003 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
+/* 3009 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_merge,VXT_END,
+/* 3015 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3023 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
+/* 3027 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3035 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_merge_arg,VXT_END,
+/* 3039 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 3047 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_flt_mod,VXT_END,
+/* 3054 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 3062 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_mul,VXT_END,
+/* 3069 */	VXI_MOVAB,VXT_VAL,0,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,1,
+/* 3077 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_neg,VXT_END,
+/* 3083 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newintrinsic,VXT_END,
+/* 3090 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_newvar,VXT_END,
+/* 3097 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_nullexp,VXI_MOVL,VXT_REG,0x50,
+/* 3105 */	VXT_ADDR,0,VXT_END,
+/* 3108 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
+/* 3116 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_numcmp,VXT_END,
+/* 3122 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 3130 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 3138 */	VXT_LIT,4,VXT_XFER,SIZEOF(char *) * (short int)xf_open,VXT_END,
+/* 3143 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
+/* 3151 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_pattern,VXT_END,
+/* 3157 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_putindx,
+/* 3165 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
+/* 3171 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 3179 */	0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_rdone,VXT_END,
+/* 3186 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 3194 */	0,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_read,VXT_END,
+/* 3201 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,
+/* 3209 */	1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,3,VXT_XFER,
+/* 3217 */	SIZEOF(char *) * (short int)xf_readfl,VXT_END,
+/* 3219 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXT_END,
+/* 3223 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_ret,VXT_END,
+/* 3227 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVL,VXT_VAL,2,
+/* 3235 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_retarg,VXT_END,
+/* 3241 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3249 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,
+/* 3257 */	VXT_END,
+/* 3258 */	VXI_PUSHL,VXT_LIT,-1,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3266 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rhdaddr,VXI_MOVL,VXT_REG,0x50,VXT_VAL,0,
+/* 3274 */	VXT_END,
+/* 3275 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 3283 */	SIZEOF(char *) * (short int)xf_rterror,VXT_END,
+/* 3285 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 3293 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setals2als,VXT_END,
+/* 3297 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 3305 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsin2alsct,VXT_END,
+/* 3309 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 3317 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsctin2als,VXT_END,
+/* 3321 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 3329 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setalsct2alsct,VXT_END,
+/* 3333 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 3341 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2als,VXT_END,
+/* 3345 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,2,VXI_CALLS,VXT_LIT,
+/* 3353 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_setfnretin2alsct,VXT_END,
+/* 3357 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 3365 */	2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 3373 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setextract,VXT_END,
+/* 3378 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 3386 */	4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 3394 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setp1,VXT_END,
+/* 3399 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 3407 */	3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
+/* 3415 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setpiece,VXT_END,
+/* 3423 */	VXI_BISB2,VXT_LIT,1,VXT_REG,0x5A,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_dt_true,
+/* 3431 */	VXT_END,
+/* 3432 */	VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 3440 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,3,VXI_JSB,
+/* 3448 */	VXT_XFER,SIZEOF(char *) * (short int)xf_setzbrk,VXT_END,
+/* 3451 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 3459 */	2,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 3467 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzextract,VXT_END,
+/* 3472 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 3480 */	4,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 3488 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_setzp1,VXT_END,
+/* 3493 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 3501 */	3,VXI_PUSHAB,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
+/* 3509 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,6,VXT_XFER,SIZEOF(char *) * (short int)xf_setzpiece,VXT_END,
+/* 3517 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x50,VXI_MOVAB,VXT_VAL,2,
+/* 3525 */	VXT_REG,0x51,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sorts_after,VXT_END,
+/* 3531 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_srchindx,
+/* 3539 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
+/* 3545 */	VXI_MOVAB,VXT_VAL,2,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,1,
+/* 3553 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
+/* 3559 */	VXI_MOVC3,VXT_LIT,16,VXT_VAL,2,VXT_VAL,1,VXT_END,
+/* 3567 */	VXI_MOVAB,VXT_VAL,1,VXT_REG,0x51,VXI_MOVAB,VXT_VAL,0,
+/* 3575 */	VXT_REG,0x50,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_sto,VXT_END,
+/* 3581 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 3589 */	1,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_sub,VXT_END,
+/* 3596 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3604 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_svget,VXT_END,
+/* 3608 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 3616 */	SIZEOF(char *) * (short int)xf_psvput,VXT_END,
+/* 3618 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3626 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_svput,VXT_END,
+/* 3630 */	VXI_MOVL,VXT_REG,0x50,VXT_REG,0x5A,VXT_END,
+/* 3636 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tcommit,VXT_END,
+/* 3640 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trollback,VXT_END,
+/* 3647 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_trestart,VXT_END,
+/* 3654 */	VXT_IREPAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,
+/* 3662 */	2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_tstart,VXT_END,
+/* 3670 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_unlock,VXT_END,
+/* 3676 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3684 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_use,VXT_END,
+/* 3688 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_view,
+/* 3696 */	VXT_END,
+/* 3697 */	VXI_CMPL,VXT_VAL,1,VXT_VAL,2,VXT_END,
+/* 3703 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_write,
+/* 3711 */	VXT_END,
+/* 3712 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wteol,
+/* 3720 */	VXT_END,
+/* 3721 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_wtff,VXT_END,
+/* 3727 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wtone,
+/* 3735 */	VXT_END,
+/* 3736 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_wttab,
+/* 3744 */	VXT_END,
+/* 3745 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_xkill,
+/* 3753 */	VXT_END,
+/* 3754 */	VXT_IREPAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 3762 */	SIZEOF(char *) * (short int)xf_xnew,VXT_END,
+/* 3764 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zallocate,
+/* 3772 */	VXT_END,
+/* 3773 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3781 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zattach,VXT_END,
+/* 3785 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3793 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zcompile,VXT_END,
+/* 3797 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
+/* 3801 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zdeallocate,
+/* 3809 */	VXT_END,
+/* 3810 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 3818 */	1,VXI_CALLS,VXT_LIT,2,VXT_XFER,SIZEOF(char *) * (short int)xf_zedit,VXT_END,
+/* 3825 */	VXI_PUSHL,VXT_VAL,1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zg1,VXT_END,
+/* 3832 */	VXI_PUSHL,VXT_VAL,1,VXI_PUSHL,VXT_VAL,4,VXI_PUSHAB,VXT_VAL,
+/* 3840 */	3,VXI_PUSHAB,VXT_VAL,2,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zgoto,VXT_END,
+/* 3848 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zhalt,
+/* 3856 */	VXT_END,
+/* 3857 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3865 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zhelp,VXT_END,
+/* 3869 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3877 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zlink,VXT_END,
+/* 3881 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 3889 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zmess,VXT_END,
+/* 3893 */	VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zprevious,
+/* 3901 */	VXT_END,
+/* 3902 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_VAL,5,VXI_PUSHAB,VXT_VAL,
+/* 3910 */	4,VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,
+/* 3918 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_zprint,VXT_END,
+/* 3926 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,
+/* 3934 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
+/* 3942 */	SIZEOF(char *) * (short int)xf_zshow,VXT_END,
+/* 3944 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,
+/* 3952 */	2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,3,VXT_XFER,
+/* 3960 */	SIZEOF(char *) * (short int)xf_zshow,VXT_END,
+/* 3962 */	VXI_PUSHL,VXT_LIT,0,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3970 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
+/* 3977 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 3985 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_zstep,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_zcont,VXT_END,
+/* 3992 */	VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_restartpc,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4000 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_zsystem,VXT_END,
+/* 4004 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_ztcommit,
+/* 4012 */	VXT_END,
+/* 4013 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztrigger,VXT_END,
+/* 4019 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_ztstart,VXT_END,
+/* 4025 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zwritesvn,
+/* 4033 */	VXT_END,
+/* 4034 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4042 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzwrite,VXT_END,
+/* 4046 */	VXI_CALLS,VXT_LIT,0,VXT_XFER,SIZEOF(char *) * (short int)xf_igetdst,VXI_MOVL,VXT_REG,0x50,
+/* 4054 */	VXT_ADDR,0,VXT_END,
+/* 4057 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4065 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_indget1,VXT_END,
+/* 4069 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_glvnpop,
+/* 4077 */	VXT_END,
+/* 4078 */	VXI_PUSHL,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_glvnslot,
+/* 4086 */	VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,VXT_END,
+/* 4092 */	VXI_PUSHL,VXT_VAL,3,VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,
+/* 4100 */	1,VXI_JSB,VXT_XFER,SIZEOF(char *) * (short int)xf_indsavglvn,VXT_END,
+/* 4105 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_JSB,VXT_XFER,
+/* 4113 */	SIZEOF(char *) * (short int)xf_indsavlvn,VXT_END,
+/* 4115 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4123 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshlvn,VXI_MOVL,VXT_REG,0x50,VXT_ADDR,0,
+/* 4131 */	VXT_END,
+/* 4132 */	VXT_IREPAB,VXT_VAL,3,VXI_PUSHL,VXT_VAL,2,VXI_CALLS,VXT_VAL,
+/* 4140 */	1,VXT_XFER,SIZEOF(char *) * (short int)xf_savgvn,VXT_END,
+/* 4144 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_savlvn,
+/* 4152 */	VXT_END,
+/* 4153 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4161 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_shareslot,VXT_END,
+/* 4165 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4173 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_stoglvn,VXT_END,
+/* 4177 */	VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4185 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_rfrshgvn,VXT_END,
+/* 4189 */	VXI_PUSHAB,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,
+/* 4197 */	0,VXI_CALLS,VXT_LIT,3,VXT_XFER,SIZEOF(char *) * (short int)xf_indfnname2,VXT_END,
+/* 4204 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
+/* 4212 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_indget2,VXT_END,
+/* 4216 */	VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_indmerge2,
+/* 4224 */	VXT_END,
+/* 4225 */	VXI_PUSHAB,VXT_VAL,1,VXI_PUSHAB,VXT_VAL,0,VXI_CALLS,VXT_LIT,
+/* 4233 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_litc,VXT_END,
+/* 4237 */	VXI_MOVC3,VXT_LIT,16,VXT_VAL,2,VXT_VAL,1,VXI_PUSHAB,
+/* 4245 */	VXT_VAL,1,VXI_CALLS,VXT_LIT,1,VXT_XFER,SIZEOF(char *) * (short int)xf_stolitc,VXT_END,
+/* 4253 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,4,VXI_PUSHL,VXT_VAL,
+/* 4261 */	3,VXI_PUSHL,VXT_VAL,2,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,
+/* 4269 */	VXT_LIT,5,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzpeek,VXT_END,
+/* 4274 */	VXI_PUSHAB,VXT_VAL,0,VXI_PUSHAB,VXT_VAL,1,VXI_CALLS,VXT_LIT,
+/* 4282 */	2,VXT_XFER,SIZEOF(char *) * (short int)xf_fnzsyslog,VXT_END,
+/* 4286 */	VXT_IREPAB,VXT_VAL,2,VXI_CALLS,VXT_VAL,1,VXT_XFER,SIZEOF(char *) * (short int)xf_zrupdate,
+/* 4294 */	VXT_END,
+/* 4295 */	365,385,375,2615,2623,2619,2882,2894,
+/* 4303 */	2888,0,0,0,504,480,471,0,
+/* 4311 */	0,467,2114,2152,2133,2763,2778,2769,
+/* 4319 */	2739,2754,2745,2631,2642,2635,2721,2732,
+/* 4327 */	2725,2667,2678,2671,2685,2696,2689,2703,
+/* 4335 */	2714,2707,2649,2660,2653,2084,2104,2094,
+/* 4343 */	395,415,405};

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/fis-gtm.git



More information about the debian-med-commit mailing list